diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..9cecc1d --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md index 79bacbe..44a540b 100644 --- a/README.md +++ b/README.md @@ -13,16 +13,17 @@ Supreme Auto Checkout is a Google Chrome extension to automate the process of bu Supreme Auto Checkout provides many features such as: - **Auto Checkout** - The product will automatically be added to your cart and will straight go to the checkout page. - **AutoFill** - All of your billing informations will be automaticaly filled on the checkout page. + - **Multi profiles** - You can setup multiple profiles to quickly switch settings during drop day! - **Configurable delays for every steps of the checkout process.** - **Size choice for every category of product.** - **Captcha bypass** (beta feature). - **Option to set a minimum/maximum price for a product.** - **Option to hide sold out products.** - **Easy configuration.** + - **AutoCop** - You can set keywords for products and they will automatically be added to cart when they are available on the shop. # Coming soon Features that will be added in the future: - - **AutoCop** - You can set keywords for products and they will automatically be added to cart when they are available on the shop. - **Product Monitor** - Be notified when new products are added to the shop. # Installation @@ -33,6 +34,14 @@ Once it's done, follow these steps: >- Extract the downloaded release to a folder of your choice. >- Open Google Chrome and type in your address bar **chrome://extensions/** and enable the **Developer** mode option at the top of the page. >- Drag the **bot/build** folder containing the extension into Google Chrome. + + +# Updating + +If you already have a previous version of the bot installed, I recommend you to **uninstall it before installing the new version** +as it can cause issues if the new version introduced some changes in the way the data is saved to the local storage. + +Note: You'll have to reconfigure the bot when you reinstall it. # Configuration @@ -40,6 +49,8 @@ After the extension is installed, the extension logo should appear on the Chrome Make sure to configure all the required options otherwise the bot won't load. +It is also recommended to clear your cookies on the Supreme shop before using the bot. + # Usage After you have configured the extension, go to the Supreme website. If the extension is installed correctly you should see a message on the top of the webpage stating that the bot is running. @@ -53,6 +64,36 @@ If you have set the **Minimum Price** or **Maximum Price** option, the product w If **Auto Payment** is enabled, the bot will automatically submit the checkout form once you're on the checkout page, otherwise, your billing infos will still be automatically filled but you will need to manually click on the checkout button. +# AutoCop + +Autocop is a feature to automatically add to cart products who matches some specific keywords. + +You **MUST** keep your browser open for this feature to work. + +To set it up, you first must enable **AutoCheckout** and **Enable AutoCop** in the Options tab. + +You'll then have to setup an **ATC Start Time**, which would most likely be the time when the online shop updates (11AM). + +You will have to set the time as a 24hour format (hh:mm:ss), note that it will be based on your system's time. + +A recommended value would be **11:00:10** to make sure that the shop has updated before running the ATC. + +Once the ATC time is reached, the bot will automatically open tabs to add to cart matching products. + +The product who matches the most the keywords will be added to the cart. + +# Setting up AutoCop products + +To setup AutoCop products, you need to go in the **AutoCop** tab of your bot then click on the **Add new** button. + +This will open a form requesting the following informations: + - **Name** - A name to distinct your atc products, not really important + - **Product keywords** - This field is a multi-selectable input, you can add keywords by pressing the Enter key, + thoses keywords are **case insensitive** and white-spaces at the end and start of the keyword will be removed. + - **Color** (optional) - If set, the ATC will try to checkout the product matching this color, also **case insensitive** + - **Product category** - The category of the product + - **Enabled** + # Captcha Bypass The **Captcha Bypass** feature works by deleting from the DOM the node containing the re-captcha input. diff --git a/bot/build/background.js b/bot/build/background.js new file mode 100644 index 0000000..a034b20 --- /dev/null +++ b/bot/build/background.js @@ -0,0 +1,3099 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "/"; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 38); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(27)('wks') + , uid = __webpack_require__(28) + , Symbol = __webpack_require__(1).Symbol + , USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function(name){ + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); +if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +var core = module.exports = {version: '2.4.0'}; +if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8) + , createDesc = __webpack_require__(24); +module.exports = __webpack_require__(5) ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); +} : function(object, key, value){ + object[key] = value; + return object; +}; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(9); +module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; +}; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(17)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; +}); + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +module.exports = {}; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(16); +module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; +}; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(4) + , IE8_DOM_DEFINE = __webpack_require__(44) + , toPrimitive = __webpack_require__(45) + , dP = Object.defineProperty; + +exports.f = __webpack_require__(5) ? Object.defineProperty : function defineProperty(O, P, Attributes){ + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if(IE8_DOM_DEFINE)try { + return dP(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; + return O; +}; + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + +module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function(it, key){ + return hasOwnProperty.call(it, key); +}; + +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function(it){ + return toString.call(it).slice(8, -1); +}; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(40), __esModule: true }; + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil + , floor = Math.floor; +module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; +}; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(1) + , core = __webpack_require__(2) + , ctx = __webpack_require__(7) + , hide = __webpack_require__(3) + , PROTOTYPE = 'prototype'; + +var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(a, b, c){ + if(this instanceof C){ + switch(arguments.length){ + case 0: return new C; + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if(IS_PROTO){ + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + +/***/ }), +/* 16 */ +/***/ (function(module, exports) { + +module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; +}; + +/***/ }), +/* 17 */ +/***/ (function(module, exports) { + +module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } +}; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(9) + , document = __webpack_require__(1).document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); +module.exports = function(it){ + return is ? document.createElement(it) : {}; +}; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(51) + , defined = __webpack_require__(14); +module.exports = function(it){ + return IObject(defined(it)); +}; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(27)('keys') + , uid = __webpack_require__(28); +module.exports = function(key){ + return shared[key] || (shared[key] = uid(key)); +}; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(8).f + , has = __webpack_require__(10) + , TAG = __webpack_require__(0)('toStringTag'); + +module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); +}; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(23) + , $export = __webpack_require__(15) + , redefine = __webpack_require__(46) + , hide = __webpack_require__(3) + , has = __webpack_require__(10) + , Iterators = __webpack_require__(6) + , $iterCreate = __webpack_require__(47) + , setToStringTag = __webpack_require__(21) + , getPrototypeOf = __webpack_require__(54) + , ITERATOR = __webpack_require__(0)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + +var returnThis = function(){ return this; }; + +module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; + // Fix native + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +module.exports = true; + +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; +}; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(50) + , enumBugKeys = __webpack_require__(29); + +module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); +}; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(13) + , min = Math.min; +module.exports = function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(1) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); +module.exports = function(key){ + return store[key] || (store[key] = {}); +}; + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +var id = 0 + , px = Math.random(); +module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(1).document && document.documentElement; + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(14); +module.exports = function(it){ + return Object(defined(it)); +}; + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(11) + , TAG = __webpack_require__(0)('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function(it, key){ + try { + return it[key]; + } catch(e){ /* empty */ } +}; + +module.exports = function(it){ + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(7) + , invoke = __webpack_require__(66) + , html = __webpack_require__(30) + , cel = __webpack_require__(18) + , global = __webpack_require__(1) + , process = global.process + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; +var run = function(){ + var id = +this; + if(queue.hasOwnProperty(id)){ + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function(event){ + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if(!setTask || !clearTask){ + setTask = function setImmediate(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id){ + delete queue[id]; + }; + // Node.js 0.8- + if(__webpack_require__(11)(process) == 'process'){ + defer = function(id){ + process.nextTick(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if(MessageChannel){ + channel = new MessageChannel; + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ + defer = function(id){ + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if(ONREADYSTATECHANGE in cel('script')){ + defer = function(id){ + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function(id){ + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(71); + + +/***/ }), +/* 35 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _promise = __webpack_require__(12); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new _promise2.default(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return _promise2.default.resolve(value).then(function (value) { + step("next", value); + }, function (err) { + step("throw", err); + }); + } + } + + return step("next"); + }); + }; +}; + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(77); + +var _keys2 = _interopRequireDefault(_keys); + +exports.isObjectEmpty = isObjectEmpty; +exports.getQueryStringValue = getQueryStringValue; +exports.pageHasNodeOfClass = pageHasNodeOfClass; +exports.hasStringInPath = hasStringInPath; +exports.pathCount = pathCount; +exports.setTimeForToday = setTimeForToday; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isObjectEmpty(obj) { + return (0, _keys2.default)(obj).length === 0 && obj.constructor === Object; +} + +function getQueryStringValue(key) { + var urlParams = new URLSearchParams(window.location.search); + return urlParams.get(key); +} + +function pageHasNodeOfClass(className) { + return document.getElementsByClassName(className).length > 0; +} + +function hasStringInPath(value) { + return location.pathname.substring(1).split('/').filter(function (x) { + return !!x && x === value; + }).length > 0; +} + +function pathCount() { + return location.pathname.substring(1).split('/').length; +} + +function setTimeForToday(time) { + var d = new Date(); + var split = time.split(':'); + if (!split.length || split.length > 3) { + return null; + } + var hour = +split[0]; + var minute = +split[1]; + var seconds = +split[2]; + if (isNaN(hour) || hour > 24) { + return null; + } + + if (isNaN(minute) || minute > 60 || hour === 24 && minute > 0) { + return null; + } + + if (isNaN(seconds) || seconds > 60) { + return null; + } + if (hour < 0 || minute < 0 || seconds < 0) return null; + d.setHours(hour); + d.setMinutes(minute); + d.setSeconds(seconds); + return d; +} + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(39); + + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _promise = __webpack_require__(12); + +var _promise2 = _interopRequireDefault(_promise); + +var _regenerator = __webpack_require__(34); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _asyncToGenerator2 = __webpack_require__(36); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); + +var getEnabledAtcProducts = function () { + var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() { + var atc; + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return (0, _StorageManager.getFromChromeStorage)('atc'); + + case 2: + atc = _context.sent; + + if (!(atc && atc.atcProducts)) { + _context.next = 5; + break; + } + + return _context.abrupt('return', atc.atcProducts.filter(function (x) { + return x.enabled; + })); + + case 5: + return _context.abrupt('return', []); + + case 6: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + })); + + return function getEnabledAtcProducts() { + return _ref.apply(this, arguments); + }; +}(); + +var getSettings = function () { + var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2() { + var settings; + return _regenerator2.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return (0, _StorageManager.getFromChromeStorage)('settings'); + + case 2: + settings = _context2.sent; + + if (!(settings && settings['Supreme'])) { + _context2.next = 5; + break; + } + + return _context2.abrupt('return', settings['Supreme']); + + case 5: + return _context2.abrupt('return', null); + + case 6: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + })); + + return function getSettings() { + return _ref2.apply(this, arguments); + }; +}(); + +var processProducts = function () { + var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(products) { + var i, product, category, keywords, color, url; + return _regenerator2.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + for (i = 0; i < products.length; i += 1) { + product = products[i]; + category = product.category; + + if (category === 'tops-sweaters') { + category = 'tops_sweaters'; + } + keywords = product.keywords; + color = product.color; + url = 'http://supremenewyork.com/shop/all/' + category + '?atc-kw=' + keywords.join(';'); + + if (color) { + url = url + '&atc-color=' + color; + } + chrome.tabs.create({ url: url }); + } + + case 1: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + })); + + return function processProducts(_x) { + return _ref3.apply(this, arguments); + }; +}(); + +var sleep = function () { + var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(ms) { + return _regenerator2.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + return _context4.abrupt('return', new _promise2.default(function (resolve) { + setTimeout(function () { + return resolve(); + }, ms); + })); + + case 1: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + })); + + return function sleep(_x2) { + return _ref4.apply(this, arguments); + }; +}(); + +var timeout = function () { + var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ms, callback) { + return _regenerator2.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return sleep(ms); + + case 2: + callback(); + + case 3: + case 'end': + return _context5.stop(); + } + } + }, _callee5, this); + })); + + return function timeout(_x3, _x4) { + return _ref5.apply(this, arguments); + }; +}(); + +var loop = function () { + var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6() { + var now, settings, startTime, diffTime, products; + return _regenerator2.default.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + now = new Date(); + _context6.next = 3; + return getSettings(); + + case 3: + settings = _context6.sent; + startTime = getAtcStartTime(settings); + + if (startTime) { + _context6.next = 9; + break; + } + + _context6.next = 8; + return timeout(1000, function () { + return loop(); + }); + + case 8: + return _context6.abrupt('return'); + + case 9: + diffTime = (startTime.getTime() - now.getTime()) / 1000; + + console.log('ATC starting in ' + diffTime + ' seconds...'); + + if (!(diffTime <= 0 && Math.abs(diffTime) < 3)) { + _context6.next = 20; + break; + } + + _context6.next = 14; + return getEnabledAtcProducts(); + + case 14: + products = _context6.sent; + _context6.next = 17; + return processProducts(products); + + case 17: + _context6.next = 19; + return timeout(4000, function () { + return loop(); + }); + + case 19: + return _context6.abrupt('return'); + + case 20: + _context6.next = 22; + return timeout(1000, function () { + return loop(); + }); + + case 22: + case 'end': + return _context6.stop(); + } + } + }, _callee6, this); + })); + + return function loop() { + return _ref6.apply(this, arguments); + }; +}(); + +var start = function () { + var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7() { + return _regenerator2.default.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + _context7.next = 2; + return loop(); + + case 2: + case 'end': + return _context7.stop(); + } + } + }, _callee7, this); + })); + + return function start() { + return _ref7.apply(this, arguments); + }; +}(); + +var _StorageManager = __webpack_require__(74); + +var _Menus = __webpack_require__(81); + +var menus = _interopRequireWildcard(_Menus); + +var _Helpers = __webpack_require__(37); + +var Helpers = _interopRequireWildcard(_Helpers); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getAtcStartTime(settings) { + if (!settings || !settings[menus.MENU_OPTIONS] || !settings[menus.MENU_OPTIONS].atcEnabled) { + return null; + } + var atcStartTime = settings[menus.MENU_OPTIONS].atcStartTime; + if (!atcStartTime) { + return null; + } + return Helpers.setTimeForToday(atcStartTime); +} + +start(); + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(41); +__webpack_require__(42); +__webpack_require__(55); +__webpack_require__(59); +module.exports = __webpack_require__(2).Promise; + +/***/ }), +/* 41 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(43)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(22)(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; +}); + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(13) + , defined = __webpack_require__(14); +// true -> String#at +// false -> String#codePointAt +module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(5) && !__webpack_require__(17)(function(){ + return Object.defineProperty(__webpack_require__(18)('div'), 'a', {get: function(){ return 7; }}).a != 7; +}); + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(9); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function(it, S){ + if(!isObject(it))return it; + var fn, val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + throw TypeError("Can't convert object to primitive value"); +}; + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(3); + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(48) + , descriptor = __webpack_require__(24) + , setToStringTag = __webpack_require__(21) + , IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(3)(IteratorPrototype, __webpack_require__(0)('iterator'), function(){ return this; }); + +module.exports = function(Constructor, NAME, next){ + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(4) + , dPs = __webpack_require__(49) + , enumBugKeys = __webpack_require__(29) + , IE_PROTO = __webpack_require__(20)('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(18)('iframe') + , i = enumBugKeys.length + , lt = '<' + , gt = '>' + , iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(30).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties){ + var result; + if(O !== null){ + Empty[PROTOTYPE] = anObject(O); + result = new Empty; + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8) + , anObject = __webpack_require__(4) + , getKeys = __webpack_require__(25); + +module.exports = __webpack_require__(5) ? Object.defineProperties : function defineProperties(O, Properties){ + anObject(O); + var keys = getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(10) + , toIObject = __webpack_require__(19) + , arrayIndexOf = __webpack_require__(52)(false) + , IE_PROTO = __webpack_require__(20)('IE_PROTO'); + +module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(names.length > i)if(has(O, key = names[i++])){ + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(11); +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); +}; + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(19) + , toLength = __webpack_require__(26) + , toIndex = __webpack_require__(53); +module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; + // Array#includes uses SameValueZero equality algorithm + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(13) + , max = Math.max + , min = Math.min; +module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(10) + , toObject = __webpack_require__(31) + , IE_PROTO = __webpack_require__(20)('IE_PROTO') + , ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function(O){ + O = toObject(O); + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(typeof O.constructor == 'function' && O instanceof O.constructor){ + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(56); +var global = __webpack_require__(1) + , hide = __webpack_require__(3) + , Iterators = __webpack_require__(6) + , TO_STRING_TAG = __webpack_require__(0)('toStringTag'); + +for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype; + if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(57) + , step = __webpack_require__(58) + , Iterators = __webpack_require__(6) + , toIObject = __webpack_require__(19); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(22)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + +/***/ }), +/* 57 */ +/***/ (function(module, exports) { + +module.exports = function(){ /* empty */ }; + +/***/ }), +/* 58 */ +/***/ (function(module, exports) { + +module.exports = function(done, value){ + return {value: value, done: !!done}; +}; + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(23) + , global = __webpack_require__(1) + , ctx = __webpack_require__(7) + , classof = __webpack_require__(32) + , $export = __webpack_require__(15) + , isObject = __webpack_require__(9) + , aFunction = __webpack_require__(16) + , anInstance = __webpack_require__(60) + , forOf = __webpack_require__(61) + , speciesConstructor = __webpack_require__(65) + , task = __webpack_require__(33).set + , microtask = __webpack_require__(67)() + , PROMISE = 'Promise' + , TypeError = global.TypeError + , process = global.process + , $Promise = global[PROMISE] + , process = global.process + , isNode = classof(process) == 'process' + , empty = function(){ /* empty */ } + , Internal, GenericPromiseCapability, Wrapper; + +var USE_NATIVE = !!function(){ + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1) + , FakePromise = (promise.constructor = {})[__webpack_require__(0)('species')] = function(exec){ exec(empty, empty); }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch(e){ /* empty */ } +}(); + +// helpers +var sameConstructor = function(a, b){ + // with library wrapper special case + return a === b || a === $Promise && b === Wrapper; +}; +var isThenable = function(it){ + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var newPromiseCapability = function(C){ + return sameConstructor($Promise, C) + ? new PromiseCapability(C) + : new GenericPromiseCapability(C); +}; +var PromiseCapability = GenericPromiseCapability = function(C){ + var resolve, reject; + this.promise = new C(function($$resolve, $$reject){ + if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +}; +var perform = function(exec){ + try { + exec(); + } catch(e){ + return {error: e}; + } +}; +var notify = function(promise, isReject){ + if(promise._n)return; + promise._n = true; + var chain = promise._c; + microtask(function(){ + var value = promise._v + , ok = promise._s == 1 + , i = 0; + var run = function(reaction){ + var handler = ok ? reaction.ok : reaction.fail + , resolve = reaction.resolve + , reject = reaction.reject + , domain = reaction.domain + , result, then; + try { + if(handler){ + if(!ok){ + if(promise._h == 2)onHandleUnhandled(promise); + promise._h = 1; + } + if(handler === true)result = value; + else { + if(domain)domain.enter(); + result = handler(value); + if(domain)domain.exit(); + } + if(result === reaction.promise){ + reject(TypeError('Promise-chain cycle')); + } else if(then = isThenable(result)){ + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch(e){ + reject(e); + } + }; + while(chain.length > i)run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if(isReject && !promise._h)onUnhandled(promise); + }); +}; +var onUnhandled = function(promise){ + task.call(global, function(){ + var value = promise._v + , abrupt, handler, console; + if(isUnhandled(promise)){ + abrupt = perform(function(){ + if(isNode){ + process.emit('unhandledRejection', value, promise); + } else if(handler = global.onunhandledrejection){ + handler({promise: promise, reason: value}); + } else if((console = global.console) && console.error){ + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if(abrupt)throw abrupt.error; + }); +}; +var isUnhandled = function(promise){ + if(promise._h == 1)return false; + var chain = promise._a || promise._c + , i = 0 + , reaction; + while(chain.length > i){ + reaction = chain[i++]; + if(reaction.fail || !isUnhandled(reaction.promise))return false; + } return true; +}; +var onHandleUnhandled = function(promise){ + task.call(global, function(){ + var handler; + if(isNode){ + process.emit('rejectionHandled', promise); + } else if(handler = global.onrejectionhandled){ + handler({promise: promise, reason: promise._v}); + } + }); +}; +var $reject = function(value){ + var promise = this; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if(!promise._a)promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function(value){ + var promise = this + , then; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if(promise === value)throw TypeError("Promise can't be resolved itself"); + if(then = isThenable(value)){ + microtask(function(){ + var wrapper = {_w: promise, _d: false}; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch(e){ + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch(e){ + $reject.call({_w: promise, _d: false}, e); // wrap + } +}; + +// constructor polyfill +if(!USE_NATIVE){ + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor){ + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch(err){ + $reject.call(this, err); + } + }; + Internal = function Promise(executor){ + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(68)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected){ + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if(this._a)this._a.push(reaction); + if(this._s)notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function(onRejected){ + return this.then(undefined, onRejected); + } + }); + PromiseCapability = function(){ + var promise = new Internal; + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); +__webpack_require__(21)($Promise, PROMISE); +__webpack_require__(69)(PROMISE); +Wrapper = __webpack_require__(2)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r){ + var capability = newPromiseCapability(this) + , $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x){ + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; + var capability = newPromiseCapability(this) + , $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(70)(function(iter){ + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable){ + var C = this + , capability = newPromiseCapability(C) + , resolve = capability.resolve + , reject = capability.reject; + var abrupt = perform(function(){ + var values = [] + , index = 0 + , remaining = 1; + forOf(iterable, false, function(promise){ + var $index = index++ + , alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function(value){ + if(alreadyCalled)return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable){ + var C = this + , capability = newPromiseCapability(C) + , reject = capability.reject; + var abrupt = perform(function(){ + forOf(iterable, false, function(promise){ + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + } +}); + +/***/ }), +/* 60 */ +/***/ (function(module, exports) { + +module.exports = function(it, Constructor, name, forbiddenField){ + if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(7) + , call = __webpack_require__(62) + , isArrayIter = __webpack_require__(63) + , anObject = __webpack_require__(4) + , toLength = __webpack_require__(26) + , getIterFn = __webpack_require__(64) + , BREAK = {} + , RETURN = {}; +var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , index = 0 + , length, step, iterator, result; + if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if(result === BREAK || result === RETURN)return result; + } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ + result = call(iterator, f, step.value, entries); + if(result === BREAK || result === RETURN)return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(4); +module.exports = function(iterator, fn, value, entries){ + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch(e){ + var ret = iterator['return']; + if(ret !== undefined)anObject(ret.call(iterator)); + throw e; + } +}; + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(6) + , ITERATOR = __webpack_require__(0)('iterator') + , ArrayProto = Array.prototype; + +module.exports = function(it){ + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(32) + , ITERATOR = __webpack_require__(0)('iterator') + , Iterators = __webpack_require__(6); +module.exports = __webpack_require__(2).getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(4) + , aFunction = __webpack_require__(16) + , SPECIES = __webpack_require__(0)('species'); +module.exports = function(O, D){ + var C = anObject(O).constructor, S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + +/***/ }), +/* 66 */ +/***/ (function(module, exports) { + +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function(fn, args, that){ + var un = that === undefined; + switch(args.length){ + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(1) + , macrotask = __webpack_require__(33).set + , Observer = global.MutationObserver || global.WebKitMutationObserver + , process = global.process + , Promise = global.Promise + , isNode = __webpack_require__(11)(process) == 'process'; + +module.exports = function(){ + var head, last, notify; + + var flush = function(){ + var parent, fn; + if(isNode && (parent = process.domain))parent.exit(); + while(head){ + fn = head.fn; + head = head.next; + try { + fn(); + } catch(e){ + if(head)notify(); + else last = undefined; + throw e; + } + } last = undefined; + if(parent)parent.enter(); + }; + + // Node.js + if(isNode){ + notify = function(){ + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if(Observer){ + var toggle = true + , node = document.createTextNode(''); + new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new + notify = function(){ + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if(Promise && Promise.resolve){ + var promise = Promise.resolve(); + notify = function(){ + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function(){ + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function(fn){ + var task = {fn: fn, next: undefined}; + if(last)last.next = task; + if(!head){ + head = task; + notify(); + } last = task; + }; +}; + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +var hide = __webpack_require__(3); +module.exports = function(target, src, safe){ + for(var key in src){ + if(safe && target[key])target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(1) + , core = __webpack_require__(2) + , dP = __webpack_require__(8) + , DESCRIPTORS = __webpack_require__(5) + , SPECIES = __webpack_require__(0)('species'); + +module.exports = function(KEY){ + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + configurable: true, + get: function(){ return this; } + }); +}; + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(0)('iterator') + , SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function(){ SAFE_CLOSING = true; }; + Array.from(riter, function(){ throw 2; }); +} catch(e){ /* empty */ } + +module.exports = function(exec, skipClosing){ + if(!skipClosing && !SAFE_CLOSING)return false; + var safe = false; + try { + var arr = [7] + , iter = arr[ITERATOR](); + iter.next = function(){ return {done: safe = true}; }; + arr[ITERATOR] = function(){ return iter; }; + exec(arr); + } catch(e){ /* empty */ } + return safe; +}; + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this; + +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; + +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; + +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; + +module.exports = __webpack_require__(72); + +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; + } +} + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(35))) + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, process) {/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + if (typeof process === "object" && process.domain) { + invoke = process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + while (true) { + var delegate = context.delegate; + if (delegate) { + if (method === "return" || + (method === "throw" && delegate.iterator[method] === undefined)) { + // A return or throw (when the delegate iterator has no throw + // method) always terminates the yield* loop. + context.delegate = null; + + // If the delegate iterator has a return method, give it a + // chance to clean up. + var returnMethod = delegate.iterator["return"]; + if (returnMethod) { + var record = tryCatch(returnMethod, delegate.iterator, arg); + if (record.type === "throw") { + // If the return method threw an exception, let that + // exception prevail over the original return or throw. + method = "throw"; + arg = record.arg; + continue; + } + } + + if (method === "return") { + // Continue with the outer return, now that the delegate + // iterator has been terminated. + continue; + } + } + + var record = tryCatch( + delegate.iterator[method], + delegate.iterator, + arg + ); + + if (record.type === "throw") { + context.delegate = null; + + // Like returning generator.throw(uncaught), but without the + // overhead of an extra function call. + method = "throw"; + arg = record.arg; + continue; + } + + // Delegate generator ran and handled its own exceptions so + // regardless of what the method was, we continue as if it is + // "next" with an undefined arg. + method = "next"; + arg = undefined; + + var info = record.arg; + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + } else { + state = GenStateSuspendedYield; + return info; + } + + context.delegate = null; + } + + if (method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = arg; + + } else if (method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw arg; + } + + if (context.dispatchException(arg)) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + method = "next"; + arg = undefined; + } + + } else if (method === "return") { + context.abrupt("return", arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + var info = { + value: record.arg, + done: context.done + }; + + if (record.arg === ContinueSentinel) { + if (context.delegate && method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + arg = undefined; + } + } else { + return info; + } + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(arg) call above. + method = "throw"; + arg = record.arg; + } + } + }; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.next = finallyEntry.finallyLoc; + } else { + this.complete(record); + } + + return ContinueSentinel; + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = record.arg; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + return ContinueSentinel; + } + }; +})( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this +); + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(35), __webpack_require__(73))) + +/***/ }), +/* 73 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.saveState = exports.loadSavedState = exports.initializeLocalStorageState = undefined; + +var _regenerator = __webpack_require__(34); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _asyncToGenerator2 = __webpack_require__(36); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); + +var _promise = __webpack_require__(12); + +var _promise2 = _interopRequireDefault(_promise); + +var _stringify = __webpack_require__(75); + +var _stringify2 = _interopRequireDefault(_stringify); + +exports.saveToChromeStorage = saveToChromeStorage; +exports.getFromChromeStorage = getFromChromeStorage; + +var _Helpers = __webpack_require__(37); + +var Helpers = _interopRequireWildcard(_Helpers); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var initializeLocalStorageState = exports.initializeLocalStorageState = function initializeLocalStorageState(initialState, version) { + localStorage.setItem('state', (0, _stringify2.default)([{ value: initialState || {}, version: version }])); +}; + +var loadSavedState = exports.loadSavedState = function loadSavedState(version) { + try { + var items = JSON.parse(localStorage.getItem('state')) || []; + var state = items.filter(function (x) { + return x.version === version; + })[0]; + if (state) { + return state.value; + } + return {}; + } catch (err) { + initializeLocalStorageState({}, version); + return {}; + } +}; + +var saveState = exports.saveState = function saveState(state, version) { + try { + // If no state is saved, we create it using the current version number + if (!localStorage.getItem('state')) { + initializeLocalStorageState(state, version); + } else { + var currentState = JSON.parse(localStorage.getItem('state')); + var currentVersionState = currentState.filter(function (x) { + return x.version === version; + })[0]; + // If a state for the current version already exists, we update it + if (currentVersionState) { + currentVersionState.value = state; + } else { + currentState.push({ value: state, version: version }); + } + localStorage.setItem('state', (0, _stringify2.default)(currentState)); + } + } catch (err) { + console.info('Possible corrupted or incompatible state found in the localstorage, reinitializing the state...'); + initializeLocalStorageState({}, version); + } +}; + +function saveToChromeStorage(key, value) { + return new _promise2.default(function (resolve) { + var obj = {}; + obj[key] = value; + chrome.storage.local.set(obj, function () { + resolve(); + }); + }); +} + +function getFromChromeStorage(key) { + var _this = this; + + return new _promise2.default(function (resolve) { + chrome.storage.local.get(key, function () { + var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(settings) { + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + resolve(Helpers.isObjectEmpty(settings) ? {} : settings[key]); + + case 1: + case 'end': + return _context.stop(); + } + } + }, _callee, _this); + })); + + return function (_x) { + return _ref.apply(this, arguments); + }; + }()); + }); +} + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(76), __esModule: true }; + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(2) + , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify}); +module.exports = function stringify(it){ // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); +}; + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(78), __esModule: true }; + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(79); +module.exports = __webpack_require__(2).Object.keys; + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(31) + , $keys = __webpack_require__(25); + +__webpack_require__(80)('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; +}); + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(15) + , core = __webpack_require__(2) + , fails = __webpack_require__(17); +module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); +}; + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var MENU_OPTIONS = exports.MENU_OPTIONS = 'Options'; +var MENU_BILLING = exports.MENU_BILLING = 'Billing'; +var MENU_SIZES = exports.MENU_SIZES = 'Sizes'; +var MENU_ATC = exports.MENU_ATC = 'AutoCop'; + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/bot/build/bundle.js b/bot/build/bundle.js index 1f7e483..5148feb 100644 --- a/bot/build/bundle.js +++ b/bot/build/bundle.js @@ -60,7 +60,7 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 335); +/******/ return __webpack_require__(__webpack_require__.s = 346); /******/ }) /************************************************************************/ /******/ ([ @@ -70,7 +70,7 @@ "use strict"; -module.exports = __webpack_require__(65); +module.exports = __webpack_require__(56); /***/ }), @@ -97,7 +97,7 @@ exports.default = function (instance, Constructor) { exports.__esModule = true; -var _defineProperty = __webpack_require__(185); +var _defineProperty = __webpack_require__(196); var _defineProperty2 = _interopRequireDefault(_defineProperty); @@ -125,7 +125,7 @@ exports.default = function () { /* 3 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(660), __esModule: true }; +module.exports = { "default": __webpack_require__(662), __esModule: true }; /***/ }), /* 4 */ @@ -136,7 +136,7 @@ module.exports = { "default": __webpack_require__(660), __esModule: true }; exports.__esModule = true; -var _typeof2 = __webpack_require__(92); +var _typeof2 = __webpack_require__(61); var _typeof3 = _interopRequireDefault(_typeof2); @@ -159,15 +159,15 @@ exports.default = function (self, call) { exports.__esModule = true; -var _setPrototypeOf = __webpack_require__(682); +var _setPrototypeOf = __webpack_require__(666); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); -var _create = __webpack_require__(686); +var _create = __webpack_require__(670); var _create2 = _interopRequireDefault(_create); -var _typeof2 = __webpack_require__(92); +var _typeof2 = __webpack_require__(61); var _typeof3 = _interopRequireDefault(_typeof2); @@ -215,7 +215,7 @@ module.exports = function (target) { exports.__esModule = true; -var _assign = __webpack_require__(49); +var _assign = __webpack_require__(42); var _assign2 = _interopRequireDefault(_assign); @@ -359,47 +359,6 @@ exports.default = { /***/ }), /* 11 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__splice__ = __webpack_require__(500); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getIn__ = __webpack_require__(501); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setIn__ = __webpack_require__(526); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepEqual__ = __webpack_require__(527); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__deleteIn__ = __webpack_require__(562); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys__ = __webpack_require__(563); - - - - - - - -var structure = { - allowsArrayErrors: true, - empty: {}, - emptyList: [], - getIn: __WEBPACK_IMPORTED_MODULE_1__getIn__["a" /* default */], - setIn: __WEBPACK_IMPORTED_MODULE_2__setIn__["a" /* default */], - deepEqual: __WEBPACK_IMPORTED_MODULE_3__deepEqual__["a" /* default */], - deleteIn: __WEBPACK_IMPORTED_MODULE_4__deleteIn__["a" /* default */], - fromJS: function fromJS(value) { - return value; - }, - keys: __WEBPACK_IMPORTED_MODULE_5__keys__["a" /* default */], - size: function size(array) { - return array ? array.length : 0; - }, - splice: __WEBPACK_IMPORTED_MODULE_0__splice__["a" /* default */], - toJS: function toJS(value) { - return value; - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (structure); - -/***/ }), -/* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -415,7 +374,7 @@ var structure = { -var emptyFunction = __webpack_require__(24); +var emptyFunction = __webpack_require__(22); /** * Similar to invariant but only logs a warning if the condition is not met. @@ -427,49 +386,51 @@ var emptyFunction = __webpack_require__(24); var warning = emptyFunction; if (false) { - var printWarning = function printWarning(format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; + (function () { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } - warning = function warning(condition, format) { - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); - } + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. } - printWarning.apply(undefined, [format].concat(args)); - } - }; + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); } module.exports = warning; /***/ }), -/* 13 */ +/* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -513,43 +474,7 @@ function reactProdInvariant(code) { module.exports = reactProdInvariant; /***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -if (false) { - var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && - Symbol.for && - Symbol.for('react.element')) || - 0xeac7; - - var isValidElement = function(object) { - return typeof object === 'object' && - object !== null && - object.$$typeof === REACT_ELEMENT_TYPE; - }; - - // By explicitly using `prop-types` you are opting into new development behavior. - // http://fb.me/prop-types-in-prod - var throwOnDirectAccess = true; - module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess); -} else { - // By explicitly using `prop-types` you are opting into new production behavior. - // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(431)(); -} - - -/***/ }), -/* 15 */ +/* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -646,7 +571,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { /***/ }), -/* 16 */ +/* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -662,10 +587,10 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); -var DOMProperty = __webpack_require__(67); -var ReactDOMComponentFlags = __webpack_require__(216); +var DOMProperty = __webpack_require__(72); +var ReactDOMComponentFlags = __webpack_require__(225); var invariant = __webpack_require__(9); @@ -846,7 +771,7 @@ var ReactDOMComponentTree = { module.exports = ReactDOMComponentTree; /***/ }), -/* 17 */ +/* 15 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -913,25 +838,17 @@ module.exports = warning; /***/ }), -/* 18 */ -/***/ (function(module, exports) { - -var core = module.exports = { version: '2.5.0' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - - -/***/ }), -/* 19 */ +/* 16 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = __webpack_require__(354); +module.exports = __webpack_require__(363); /***/ }), -/* 20 */ +/* 17 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -989,77 +906,86 @@ module.exports = invariant; /***/ }), -/* 21 */ +/* 18 */ +/***/ (function(module, exports) { + +var core = module.exports = {version: '2.4.0'}; +if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }), +/* 19 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +exports.__esModule = true; +exports.connect = exports.Provider = undefined; -var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); +var _Provider = __webpack_require__(471); -/** - * Simple, lightweight module assisting with the detection and context of - * Worker. Helps avoid circular dependencies and allows code to reason about - * whether or not they are in a Worker, even if they never include the main - * `ReactWorker` dependency. - */ -var ExecutionEnvironment = { +var _Provider2 = _interopRequireDefault(_Provider); - canUseDOM: canUseDOM, +var _connect = __webpack_require__(472); - canUseWorkers: typeof Worker !== 'undefined', +var _connect2 = _interopRequireDefault(_connect); - canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - canUseViewport: canUseDOM && !!window.screen, +exports.Provider = _Provider2["default"]; +exports.connect = _connect2["default"]; - isInWorker: !canUseDOM // For now, this is true - might change in the future. +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { -}; +"use strict"; -module.exports = ExecutionEnvironment; + +exports.__esModule = true; + +var _shouldUpdate = __webpack_require__(725); + +var _shouldUpdate2 = _interopRequireDefault(_shouldUpdate); + +var _shallowEqual = __webpack_require__(63); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _createHelper = __webpack_require__(323); + +var _createHelper2 = _interopRequireDefault(_createHelper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var pure = (0, _shouldUpdate2.default)(function (props, nextProps) { + return !(0, _shallowEqual2.default)(props, nextProps); +}); + +exports.default = (0, _createHelper2.default)(pure, 'pure', true, true); /***/ }), -/* 22 */ +/* 21 */ /***/ (function(module, exports, __webpack_require__) { -var store = __webpack_require__(137)('wks'); -var uid = __webpack_require__(100); -var Symbol = __webpack_require__(23).Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; +"use strict"; -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; -$exports.store = store; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; +var _SvgIcon = __webpack_require__(730); -/***/ }), -/* 23 */ -/***/ (function(module, exports) { +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +exports.default = _SvgIcon2.default; /***/ }), -/* 24 */ +/* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1103,175 +1029,73 @@ emptyFunction.thatReturnsArgument = function (arg) { module.exports = emptyFunction; /***/ }), -/* 25 */ +/* 23 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -exports.__esModule = true; - -var _shouldUpdate = __webpack_require__(741); - -var _shouldUpdate2 = _interopRequireDefault(_shouldUpdate); - -var _shallowEqual = __webpack_require__(58); - -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); - -var _createHelper = __webpack_require__(318); - -var _createHelper2 = _interopRequireDefault(_createHelper); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var pure = (0, _shouldUpdate2.default)(function (props, nextProps) { - return !(0, _shallowEqual2.default)(props, nextProps); -}); -exports.default = (0, _createHelper2.default)(pure, 'pure', true, true); +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); -/***/ }), -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ +var ExecutionEnvironment = { -"use strict"; + canUseDOM: canUseDOM, + canUseWorkers: typeof Worker !== 'undefined', -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), -var _SvgIcon = __webpack_require__(746); + canUseViewport: canUseDOM && !!window.screen, -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + isInWorker: !canUseDOM // For now, this is true - might change in the future. -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +}; -exports.default = _SvgIcon2.default; +module.exports = ExecutionEnvironment; /***/ }), -/* 27 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -exports.__esModule = true; -exports.connect = exports.Provider = undefined; - -var _Provider = __webpack_require__(463); - -var _Provider2 = _interopRequireDefault(_Provider); - -var _connect = __webpack_require__(464); +var store = __webpack_require__(143)('wks') + , uid = __webpack_require__(103) + , Symbol = __webpack_require__(25).Symbol + , USE_SYMBOL = typeof Symbol == 'function'; -var _connect2 = _interopRequireDefault(_connect); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -exports.Provider = _Provider2["default"]; -exports.connect = _connect2["default"]; - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(23); -var core = __webpack_require__(18); -var ctx = __webpack_require__(61); -var hide = __webpack_require__(50); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var IS_WRAP = type & $export.W; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE]; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; - var key, own, out; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - if (own && key in exports) continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function (C) { - var F = function (a, b, c) { - if (this instanceof C) { - switch (arguments.length) { - case 0: return new C(); - case 1: return new C(a); - case 2: return new C(a, b); - } return new C(a, b, c); - } return C.apply(this, arguments); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% - if (IS_PROTO) { - (exports.virtual || (exports.virtual = {}))[key] = out; - // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% - if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); - } - } +var $exports = module.exports = function(name){ + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; +$exports.store = store; /***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - - -// Trust the developer to only use ReactInstrumentation with a __DEV__ check - -var debugTool = null; - -if (false) { - var ReactDebugTool = require('./ReactDebugTool'); - debugTool = ReactDebugTool; -} +/* 25 */ +/***/ (function(module, exports) { -module.exports = { debugTool: debugTool }; +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); +if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef /***/ }), -/* 30 */ +/* 26 */ /***/ (function(module, exports) { // Source: http://jsfiddle.net/vWx8V/ @@ -1423,7 +1247,36 @@ for (var alias in aliases) { /***/ }), -/* 31 */ +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +// Trust the developer to only use ReactInstrumentation with a __DEV__ check + +var debugTool = null; + +if (false) { + var ReactDebugTool = require('./ReactDebugTool'); + debugTool = ReactDebugTool; +} + +module.exports = { debugTool: debugTool }; + +/***/ }), +/* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1439,14 +1292,14 @@ for (var alias in aliases) { -var _prodInvariant = __webpack_require__(13), - _assign = __webpack_require__(15); +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); -var CallbackQueue = __webpack_require__(220); -var PooledClass = __webpack_require__(53); -var ReactFeatureFlags = __webpack_require__(221); -var ReactReconciler = __webpack_require__(70); -var Transaction = __webpack_require__(104); +var CallbackQueue = __webpack_require__(229); +var PooledClass = __webpack_require__(58); +var ReactFeatureFlags = __webpack_require__(230); +var ReactReconciler = __webpack_require__(75); +var Transaction = __webpack_require__(107); var invariant = __webpack_require__(9); @@ -1679,11 +1532,11 @@ var ReactUpdates = { module.exports = ReactUpdates; /***/ }), -/* 32 */ +/* 29 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(253); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(259); /** Detect free variable `self`. */ @@ -1696,7 +1549,7 @@ var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || fr /***/ }), -/* 33 */ +/* 30 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -1729,7 +1582,303 @@ var isArray = Array.isArray; /***/ }), -/* 34 */ +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var red50 = exports.red50 = '#ffebee'; +var red100 = exports.red100 = '#ffcdd2'; +var red200 = exports.red200 = '#ef9a9a'; +var red300 = exports.red300 = '#e57373'; +var red400 = exports.red400 = '#ef5350'; +var red500 = exports.red500 = '#f44336'; +var red600 = exports.red600 = '#e53935'; +var red700 = exports.red700 = '#d32f2f'; +var red800 = exports.red800 = '#c62828'; +var red900 = exports.red900 = '#b71c1c'; +var redA100 = exports.redA100 = '#ff8a80'; +var redA200 = exports.redA200 = '#ff5252'; +var redA400 = exports.redA400 = '#ff1744'; +var redA700 = exports.redA700 = '#d50000'; + +var pink50 = exports.pink50 = '#fce4ec'; +var pink100 = exports.pink100 = '#f8bbd0'; +var pink200 = exports.pink200 = '#f48fb1'; +var pink300 = exports.pink300 = '#f06292'; +var pink400 = exports.pink400 = '#ec407a'; +var pink500 = exports.pink500 = '#e91e63'; +var pink600 = exports.pink600 = '#d81b60'; +var pink700 = exports.pink700 = '#c2185b'; +var pink800 = exports.pink800 = '#ad1457'; +var pink900 = exports.pink900 = '#880e4f'; +var pinkA100 = exports.pinkA100 = '#ff80ab'; +var pinkA200 = exports.pinkA200 = '#ff4081'; +var pinkA400 = exports.pinkA400 = '#f50057'; +var pinkA700 = exports.pinkA700 = '#c51162'; + +var purple50 = exports.purple50 = '#f3e5f5'; +var purple100 = exports.purple100 = '#e1bee7'; +var purple200 = exports.purple200 = '#ce93d8'; +var purple300 = exports.purple300 = '#ba68c8'; +var purple400 = exports.purple400 = '#ab47bc'; +var purple500 = exports.purple500 = '#9c27b0'; +var purple600 = exports.purple600 = '#8e24aa'; +var purple700 = exports.purple700 = '#7b1fa2'; +var purple800 = exports.purple800 = '#6a1b9a'; +var purple900 = exports.purple900 = '#4a148c'; +var purpleA100 = exports.purpleA100 = '#ea80fc'; +var purpleA200 = exports.purpleA200 = '#e040fb'; +var purpleA400 = exports.purpleA400 = '#d500f9'; +var purpleA700 = exports.purpleA700 = '#aa00ff'; + +var deepPurple50 = exports.deepPurple50 = '#ede7f6'; +var deepPurple100 = exports.deepPurple100 = '#d1c4e9'; +var deepPurple200 = exports.deepPurple200 = '#b39ddb'; +var deepPurple300 = exports.deepPurple300 = '#9575cd'; +var deepPurple400 = exports.deepPurple400 = '#7e57c2'; +var deepPurple500 = exports.deepPurple500 = '#673ab7'; +var deepPurple600 = exports.deepPurple600 = '#5e35b1'; +var deepPurple700 = exports.deepPurple700 = '#512da8'; +var deepPurple800 = exports.deepPurple800 = '#4527a0'; +var deepPurple900 = exports.deepPurple900 = '#311b92'; +var deepPurpleA100 = exports.deepPurpleA100 = '#b388ff'; +var deepPurpleA200 = exports.deepPurpleA200 = '#7c4dff'; +var deepPurpleA400 = exports.deepPurpleA400 = '#651fff'; +var deepPurpleA700 = exports.deepPurpleA700 = '#6200ea'; + +var indigo50 = exports.indigo50 = '#e8eaf6'; +var indigo100 = exports.indigo100 = '#c5cae9'; +var indigo200 = exports.indigo200 = '#9fa8da'; +var indigo300 = exports.indigo300 = '#7986cb'; +var indigo400 = exports.indigo400 = '#5c6bc0'; +var indigo500 = exports.indigo500 = '#3f51b5'; +var indigo600 = exports.indigo600 = '#3949ab'; +var indigo700 = exports.indigo700 = '#303f9f'; +var indigo800 = exports.indigo800 = '#283593'; +var indigo900 = exports.indigo900 = '#1a237e'; +var indigoA100 = exports.indigoA100 = '#8c9eff'; +var indigoA200 = exports.indigoA200 = '#536dfe'; +var indigoA400 = exports.indigoA400 = '#3d5afe'; +var indigoA700 = exports.indigoA700 = '#304ffe'; + +var blue50 = exports.blue50 = '#e3f2fd'; +var blue100 = exports.blue100 = '#bbdefb'; +var blue200 = exports.blue200 = '#90caf9'; +var blue300 = exports.blue300 = '#64b5f6'; +var blue400 = exports.blue400 = '#42a5f5'; +var blue500 = exports.blue500 = '#2196f3'; +var blue600 = exports.blue600 = '#1e88e5'; +var blue700 = exports.blue700 = '#1976d2'; +var blue800 = exports.blue800 = '#1565c0'; +var blue900 = exports.blue900 = '#0d47a1'; +var blueA100 = exports.blueA100 = '#82b1ff'; +var blueA200 = exports.blueA200 = '#448aff'; +var blueA400 = exports.blueA400 = '#2979ff'; +var blueA700 = exports.blueA700 = '#2962ff'; + +var lightBlue50 = exports.lightBlue50 = '#e1f5fe'; +var lightBlue100 = exports.lightBlue100 = '#b3e5fc'; +var lightBlue200 = exports.lightBlue200 = '#81d4fa'; +var lightBlue300 = exports.lightBlue300 = '#4fc3f7'; +var lightBlue400 = exports.lightBlue400 = '#29b6f6'; +var lightBlue500 = exports.lightBlue500 = '#03a9f4'; +var lightBlue600 = exports.lightBlue600 = '#039be5'; +var lightBlue700 = exports.lightBlue700 = '#0288d1'; +var lightBlue800 = exports.lightBlue800 = '#0277bd'; +var lightBlue900 = exports.lightBlue900 = '#01579b'; +var lightBlueA100 = exports.lightBlueA100 = '#80d8ff'; +var lightBlueA200 = exports.lightBlueA200 = '#40c4ff'; +var lightBlueA400 = exports.lightBlueA400 = '#00b0ff'; +var lightBlueA700 = exports.lightBlueA700 = '#0091ea'; + +var cyan50 = exports.cyan50 = '#e0f7fa'; +var cyan100 = exports.cyan100 = '#b2ebf2'; +var cyan200 = exports.cyan200 = '#80deea'; +var cyan300 = exports.cyan300 = '#4dd0e1'; +var cyan400 = exports.cyan400 = '#26c6da'; +var cyan500 = exports.cyan500 = '#00bcd4'; +var cyan600 = exports.cyan600 = '#00acc1'; +var cyan700 = exports.cyan700 = '#0097a7'; +var cyan800 = exports.cyan800 = '#00838f'; +var cyan900 = exports.cyan900 = '#006064'; +var cyanA100 = exports.cyanA100 = '#84ffff'; +var cyanA200 = exports.cyanA200 = '#18ffff'; +var cyanA400 = exports.cyanA400 = '#00e5ff'; +var cyanA700 = exports.cyanA700 = '#00b8d4'; + +var teal50 = exports.teal50 = '#e0f2f1'; +var teal100 = exports.teal100 = '#b2dfdb'; +var teal200 = exports.teal200 = '#80cbc4'; +var teal300 = exports.teal300 = '#4db6ac'; +var teal400 = exports.teal400 = '#26a69a'; +var teal500 = exports.teal500 = '#009688'; +var teal600 = exports.teal600 = '#00897b'; +var teal700 = exports.teal700 = '#00796b'; +var teal800 = exports.teal800 = '#00695c'; +var teal900 = exports.teal900 = '#004d40'; +var tealA100 = exports.tealA100 = '#a7ffeb'; +var tealA200 = exports.tealA200 = '#64ffda'; +var tealA400 = exports.tealA400 = '#1de9b6'; +var tealA700 = exports.tealA700 = '#00bfa5'; + +var green50 = exports.green50 = '#e8f5e9'; +var green100 = exports.green100 = '#c8e6c9'; +var green200 = exports.green200 = '#a5d6a7'; +var green300 = exports.green300 = '#81c784'; +var green400 = exports.green400 = '#66bb6a'; +var green500 = exports.green500 = '#4caf50'; +var green600 = exports.green600 = '#43a047'; +var green700 = exports.green700 = '#388e3c'; +var green800 = exports.green800 = '#2e7d32'; +var green900 = exports.green900 = '#1b5e20'; +var greenA100 = exports.greenA100 = '#b9f6ca'; +var greenA200 = exports.greenA200 = '#69f0ae'; +var greenA400 = exports.greenA400 = '#00e676'; +var greenA700 = exports.greenA700 = '#00c853'; + +var lightGreen50 = exports.lightGreen50 = '#f1f8e9'; +var lightGreen100 = exports.lightGreen100 = '#dcedc8'; +var lightGreen200 = exports.lightGreen200 = '#c5e1a5'; +var lightGreen300 = exports.lightGreen300 = '#aed581'; +var lightGreen400 = exports.lightGreen400 = '#9ccc65'; +var lightGreen500 = exports.lightGreen500 = '#8bc34a'; +var lightGreen600 = exports.lightGreen600 = '#7cb342'; +var lightGreen700 = exports.lightGreen700 = '#689f38'; +var lightGreen800 = exports.lightGreen800 = '#558b2f'; +var lightGreen900 = exports.lightGreen900 = '#33691e'; +var lightGreenA100 = exports.lightGreenA100 = '#ccff90'; +var lightGreenA200 = exports.lightGreenA200 = '#b2ff59'; +var lightGreenA400 = exports.lightGreenA400 = '#76ff03'; +var lightGreenA700 = exports.lightGreenA700 = '#64dd17'; + +var lime50 = exports.lime50 = '#f9fbe7'; +var lime100 = exports.lime100 = '#f0f4c3'; +var lime200 = exports.lime200 = '#e6ee9c'; +var lime300 = exports.lime300 = '#dce775'; +var lime400 = exports.lime400 = '#d4e157'; +var lime500 = exports.lime500 = '#cddc39'; +var lime600 = exports.lime600 = '#c0ca33'; +var lime700 = exports.lime700 = '#afb42b'; +var lime800 = exports.lime800 = '#9e9d24'; +var lime900 = exports.lime900 = '#827717'; +var limeA100 = exports.limeA100 = '#f4ff81'; +var limeA200 = exports.limeA200 = '#eeff41'; +var limeA400 = exports.limeA400 = '#c6ff00'; +var limeA700 = exports.limeA700 = '#aeea00'; + +var yellow50 = exports.yellow50 = '#fffde7'; +var yellow100 = exports.yellow100 = '#fff9c4'; +var yellow200 = exports.yellow200 = '#fff59d'; +var yellow300 = exports.yellow300 = '#fff176'; +var yellow400 = exports.yellow400 = '#ffee58'; +var yellow500 = exports.yellow500 = '#ffeb3b'; +var yellow600 = exports.yellow600 = '#fdd835'; +var yellow700 = exports.yellow700 = '#fbc02d'; +var yellow800 = exports.yellow800 = '#f9a825'; +var yellow900 = exports.yellow900 = '#f57f17'; +var yellowA100 = exports.yellowA100 = '#ffff8d'; +var yellowA200 = exports.yellowA200 = '#ffff00'; +var yellowA400 = exports.yellowA400 = '#ffea00'; +var yellowA700 = exports.yellowA700 = '#ffd600'; + +var amber50 = exports.amber50 = '#fff8e1'; +var amber100 = exports.amber100 = '#ffecb3'; +var amber200 = exports.amber200 = '#ffe082'; +var amber300 = exports.amber300 = '#ffd54f'; +var amber400 = exports.amber400 = '#ffca28'; +var amber500 = exports.amber500 = '#ffc107'; +var amber600 = exports.amber600 = '#ffb300'; +var amber700 = exports.amber700 = '#ffa000'; +var amber800 = exports.amber800 = '#ff8f00'; +var amber900 = exports.amber900 = '#ff6f00'; +var amberA100 = exports.amberA100 = '#ffe57f'; +var amberA200 = exports.amberA200 = '#ffd740'; +var amberA400 = exports.amberA400 = '#ffc400'; +var amberA700 = exports.amberA700 = '#ffab00'; + +var orange50 = exports.orange50 = '#fff3e0'; +var orange100 = exports.orange100 = '#ffe0b2'; +var orange200 = exports.orange200 = '#ffcc80'; +var orange300 = exports.orange300 = '#ffb74d'; +var orange400 = exports.orange400 = '#ffa726'; +var orange500 = exports.orange500 = '#ff9800'; +var orange600 = exports.orange600 = '#fb8c00'; +var orange700 = exports.orange700 = '#f57c00'; +var orange800 = exports.orange800 = '#ef6c00'; +var orange900 = exports.orange900 = '#e65100'; +var orangeA100 = exports.orangeA100 = '#ffd180'; +var orangeA200 = exports.orangeA200 = '#ffab40'; +var orangeA400 = exports.orangeA400 = '#ff9100'; +var orangeA700 = exports.orangeA700 = '#ff6d00'; + +var deepOrange50 = exports.deepOrange50 = '#fbe9e7'; +var deepOrange100 = exports.deepOrange100 = '#ffccbc'; +var deepOrange200 = exports.deepOrange200 = '#ffab91'; +var deepOrange300 = exports.deepOrange300 = '#ff8a65'; +var deepOrange400 = exports.deepOrange400 = '#ff7043'; +var deepOrange500 = exports.deepOrange500 = '#ff5722'; +var deepOrange600 = exports.deepOrange600 = '#f4511e'; +var deepOrange700 = exports.deepOrange700 = '#e64a19'; +var deepOrange800 = exports.deepOrange800 = '#d84315'; +var deepOrange900 = exports.deepOrange900 = '#bf360c'; +var deepOrangeA100 = exports.deepOrangeA100 = '#ff9e80'; +var deepOrangeA200 = exports.deepOrangeA200 = '#ff6e40'; +var deepOrangeA400 = exports.deepOrangeA400 = '#ff3d00'; +var deepOrangeA700 = exports.deepOrangeA700 = '#dd2c00'; + +var brown50 = exports.brown50 = '#efebe9'; +var brown100 = exports.brown100 = '#d7ccc8'; +var brown200 = exports.brown200 = '#bcaaa4'; +var brown300 = exports.brown300 = '#a1887f'; +var brown400 = exports.brown400 = '#8d6e63'; +var brown500 = exports.brown500 = '#795548'; +var brown600 = exports.brown600 = '#6d4c41'; +var brown700 = exports.brown700 = '#5d4037'; +var brown800 = exports.brown800 = '#4e342e'; +var brown900 = exports.brown900 = '#3e2723'; + +var blueGrey50 = exports.blueGrey50 = '#eceff1'; +var blueGrey100 = exports.blueGrey100 = '#cfd8dc'; +var blueGrey200 = exports.blueGrey200 = '#b0bec5'; +var blueGrey300 = exports.blueGrey300 = '#90a4ae'; +var blueGrey400 = exports.blueGrey400 = '#78909c'; +var blueGrey500 = exports.blueGrey500 = '#607d8b'; +var blueGrey600 = exports.blueGrey600 = '#546e7a'; +var blueGrey700 = exports.blueGrey700 = '#455a64'; +var blueGrey800 = exports.blueGrey800 = '#37474f'; +var blueGrey900 = exports.blueGrey900 = '#263238'; + +var grey50 = exports.grey50 = '#fafafa'; +var grey100 = exports.grey100 = '#f5f5f5'; +var grey200 = exports.grey200 = '#eeeeee'; +var grey300 = exports.grey300 = '#e0e0e0'; +var grey400 = exports.grey400 = '#bdbdbd'; +var grey500 = exports.grey500 = '#9e9e9e'; +var grey600 = exports.grey600 = '#757575'; +var grey700 = exports.grey700 = '#616161'; +var grey800 = exports.grey800 = '#424242'; +var grey900 = exports.grey900 = '#212121'; + +var black = exports.black = '#000000'; +var white = exports.white = '#ffffff'; + +var transparent = exports.transparent = 'rgba(0, 0, 0, 0)'; +var fullBlack = exports.fullBlack = 'rgba(0, 0, 0, 1)'; +var darkBlack = exports.darkBlack = 'rgba(0, 0, 0, 0.87)'; +var lightBlack = exports.lightBlack = 'rgba(0, 0, 0, 0.54)'; +var minBlack = exports.minBlack = 'rgba(0, 0, 0, 0.26)'; +var faintBlack = exports.faintBlack = 'rgba(0, 0, 0, 0.12)'; +var fullWhite = exports.fullWhite = 'rgba(255, 255, 255, 1)'; +var darkWhite = exports.darkWhite = 'rgba(255, 255, 255, 0.87)'; +var lightWhite = exports.lightWhite = 'rgba(255, 255, 255, 0.54)'; + +/***/ }), +/* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1740,7 +1889,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _Paper = __webpack_require__(755); +var _Paper = __webpack_require__(741); var _Paper2 = _interopRequireDefault(_Paper); @@ -1749,40 +1898,104 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.default = _Paper2.default; /***/ }), -/* 35 */ +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(25) + , core = __webpack_require__(18) + , ctx = __webpack_require__(67) + , hide = __webpack_require__(53) + , PROTOTYPE = 'prototype'; + +var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(a, b, c){ + if(this instanceof C){ + switch(arguments.length){ + case 0: return new C; + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if(IS_PROTO){ + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + +/***/ }), +/* 34 */ /***/ (function(module, exports, __webpack_require__) { -var anObject = __webpack_require__(36); -var IE8_DOM_DEFINE = __webpack_require__(206); -var toPrimitive = __webpack_require__(132); -var dP = Object.defineProperty; +var anObject = __webpack_require__(35) + , IE8_DOM_DEFINE = __webpack_require__(213) + , toPrimitive = __webpack_require__(138) + , dP = Object.defineProperty; -exports.f = __webpack_require__(44) ? Object.defineProperty : function defineProperty(O, P, Attributes) { +exports.f = __webpack_require__(43) ? Object.defineProperty : function defineProperty(O, P, Attributes){ anObject(O); P = toPrimitive(P, true); anObject(Attributes); - if (IE8_DOM_DEFINE) try { + if(IE8_DOM_DEFINE)try { return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; return O; }; - /***/ }), -/* 36 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(62); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); +var isObject = __webpack_require__(68); +module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; }; - /***/ }), -/* 37 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1816,7 +2029,7 @@ var ReactCurrentOwner = { module.exports = ReactCurrentOwner; /***/ }), -/* 38 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1832,12 +2045,12 @@ module.exports = ReactCurrentOwner; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var PooledClass = __webpack_require__(53); +var PooledClass = __webpack_require__(58); -var emptyFunction = __webpack_require__(24); -var warning = __webpack_require__(12); +var emptyFunction = __webpack_require__(22); +var warning = __webpack_require__(11); var didWarnForAddedNewProperty = false; var isProxySupported = typeof Proxy === 'function'; @@ -1924,6 +2137,7 @@ function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarg } _assign(SyntheticEvent.prototype, { + preventDefault: function () { this.defaultPrevented = true; var event = this.nativeEvent; @@ -1933,8 +2147,8 @@ _assign(SyntheticEvent.prototype, { if (event.preventDefault) { event.preventDefault(); - // eslint-disable-next-line valid-typeof } else if (typeof event.returnValue !== 'unknown') { + // eslint-disable-line valid-typeof event.returnValue = false; } this.isDefaultPrevented = emptyFunction.thatReturnsTrue; @@ -1948,8 +2162,8 @@ _assign(SyntheticEvent.prototype, { if (event.stopPropagation) { event.stopPropagation(); - // eslint-disable-next-line valid-typeof } else if (typeof event.cancelBubble !== 'unknown') { + // eslint-disable-line valid-typeof // The ChangeEventPlugin registers a "propertychange" event for // IE. This event does not support bubbling or cancelling, and // any references to cancelBubble throw "Member not found". A @@ -1998,6 +2212,7 @@ _assign(SyntheticEvent.prototype, { Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)); } } + }); SyntheticEvent.Interface = EventInterface; @@ -2013,7 +2228,7 @@ if (false) { return new Proxy(constructor.apply(that, args), { set: function (target, prop, value) { if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) { - process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0; didWarnForAddedNewProperty = true; } target[prop] = value; @@ -2082,49 +2297,12 @@ function getPooledWarningPropertyDefinition(propName, getVal) { function warn(action, result) { var warningCondition = false; - false ? warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0; + false ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0; } } /***/ }), -/* 39 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - - -var React = __webpack_require__(0); -var factory = __webpack_require__(215); - -if (typeof React === 'undefined') { - throw Error( - 'create-react-class could not find the React object. If you are using script tags, ' + - 'make sure that React is being loaded before create-react-class.' - ); -} - -// Hack to grab NoopUpdateQueue from isomorphic React -var ReactNoopUpdateQueue = new React.Component().updater; - -module.exports = factory( - React.Component, - React.isValidElement, - ReactNoopUpdateQueue -); - - -/***/ }), -/* 40 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2141,7 +2319,7 @@ exports.default = function (prefixedValue, value, keepUnprefixed) { module.exports = exports["default"]; /***/ }), -/* 41 */ +/* 39 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2178,7 +2356,7 @@ exports.default = { }; /***/ }), -/* 42 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2208,19 +2386,15 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _typeof2 = __webpack_require__(92); +var _typeof2 = __webpack_require__(61); var _typeof3 = _interopRequireDefault(_typeof2); -var _keys = __webpack_require__(79); +var _keys = __webpack_require__(62); var _keys2 = _interopRequireDefault(_keys); -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - -var _assign = __webpack_require__(49); +var _assign = __webpack_require__(42); var _assign2 = _interopRequireDefault(_assign); @@ -2230,19 +2404,15 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _propTypes = __webpack_require__(14); +var _reactAddonsShallowCompare = __webpack_require__(736); -var _propTypes2 = _interopRequireDefault(_propTypes); +var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); -var _shallowEqual = __webpack_require__(87); - -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); - -var _warning = __webpack_require__(17); +var _warning = __webpack_require__(15); var _warning2 = _interopRequireDefault(_warning); -var _supports = __webpack_require__(752); +var _supports = __webpack_require__(738); var supports = _interopRequireWildcard(_supports); @@ -2250,11 +2420,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/* eslint-disable prefer-spread */ + var defaultEventOptions = { capture: false, passive: false }; -/* eslint-disable prefer-spread */ function mergeDefaultEventOptions(options) { return (0, _assign2.default)({}, defaultEventOptions, options); @@ -2286,18 +2457,15 @@ function off(target, eventName, callback, options) { } } -function forEachListener(props, iteratee) { - var children = props.children, - target = props.target, - eventProps = (0, _objectWithoutProperties3.default)(props, ['children', 'target']); - +var state = {}; - (0, _keys2.default)(eventProps).forEach(function (name) { +function forEachListener(props, iteratee) { + (0, _keys2.default)(props).forEach(function (name) { if (name.substring(0, 2) !== 'on') { return; } - var prop = eventProps[name]; + var prop = props[name]; var type = typeof prop === 'undefined' ? 'undefined' : (0, _typeof3.default)(prop); var isObject = type === 'object'; var isFunction = type === 'function'; @@ -2343,7 +2511,10 @@ var EventListener = function (_Component) { }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps) { - return !(0, _shallowEqual2.default)(this.props, nextProps); + return (0, _reactAddonsShallowCompare2.default)({ + props: this.props, + state: state + }, nextProps, state); } }, { key: 'componentWillUpdate', @@ -2399,16 +2570,16 @@ var EventListener = function (_Component) { /** * You can provide a single child too. */ - children: _propTypes2.default.element, + children: _react.PropTypes.element, /** * The DOM target to listen to. */ - target: _propTypes2.default.oneOfType([_propTypes2.default.object, _propTypes2.default.string]).isRequired + target: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.string]) } : void 0; exports.default = EventListener; /***/ }), -/* 43 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2471,17 +2642,22 @@ function createComponent(MaterialUIComponent, mapProps) { } /***/ }), -/* 44 */ +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(347), __esModule: true }; + +/***/ }), +/* 43 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(63)(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +module.exports = !__webpack_require__(69)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; }); - /***/ }), -/* 45 */ +/* 44 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -2573,7 +2749,7 @@ function createRoutes(routes) { } /***/ }), -/* 46 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2582,17 +2758,19 @@ function createRoutes(routes) { exports.__esModule = true; exports.createPath = exports.parsePath = exports.getQueryStringValueFromPath = exports.stripQueryStringValueFromPath = exports.addQueryStringValueToPath = undefined; -var _warning = __webpack_require__(17); +var _warning = __webpack_require__(15); var _warning2 = _interopRequireDefault(_warning); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var addQueryStringValueToPath = exports.addQueryStringValueToPath = function addQueryStringValueToPath(path, key, value) { - var _parsePath = parsePath(path), - pathname = _parsePath.pathname, - search = _parsePath.search, - hash = _parsePath.hash; + var _parsePath = parsePath(path); + + var pathname = _parsePath.pathname; + var search = _parsePath.search; + var hash = _parsePath.hash; + return createPath({ pathname: pathname, @@ -2602,10 +2780,12 @@ var addQueryStringValueToPath = exports.addQueryStringValueToPath = function add }; var stripQueryStringValueFromPath = exports.stripQueryStringValueFromPath = function stripQueryStringValueFromPath(path, key) { - var _parsePath2 = parsePath(path), - pathname = _parsePath2.pathname, - search = _parsePath2.search, - hash = _parsePath2.hash; + var _parsePath2 = parsePath(path); + + var pathname = _parsePath2.pathname; + var search = _parsePath2.search; + var hash = _parsePath2.hash; + return createPath({ pathname: pathname, @@ -2617,8 +2797,9 @@ var stripQueryStringValueFromPath = exports.stripQueryStringValueFromPath = func }; var getQueryStringValueFromPath = exports.getQueryStringValueFromPath = function getQueryStringValueFromPath(path, key) { - var _parsePath3 = parsePath(path), - search = _parsePath3.search; + var _parsePath3 = parsePath(path); + + var search = _parsePath3.search; var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)')); return match && match[1]; @@ -2660,10 +2841,10 @@ var parsePath = exports.parsePath = function parsePath(path) { var createPath = exports.createPath = function createPath(location) { if (location == null || typeof location === 'string') return location; - var basename = location.basename, - pathname = location.pathname, - search = location.search, - hash = location.hash; + var basename = location.basename; + var pathname = location.pathname; + var search = location.search; + var hash = location.hash; var path = (basename || '') + pathname; @@ -2675,7 +2856,7 @@ var createPath = exports.createPath = function createPath(location) { }; /***/ }), -/* 47 */ +/* 46 */ /***/ (function(module, exports) { var g; @@ -2702,7 +2883,7 @@ module.exports = g; /***/ }), -/* 48 */ +/* 47 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -2740,228 +2921,67 @@ function isObject(value) { /***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(336), __esModule: true }; - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__(35); -var createDesc = __webpack_require__(82); -module.exports = __webpack_require__(44) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), -/* 51 */ -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - - -/***/ }), -/* 52 */ -/***/ (function(module, exports, __webpack_require__) { - -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(208); -var defined = __webpack_require__(133); -module.exports = function (it) { - return IObject(defined(it)); -}; - - -/***/ }), -/* 53 */ -/***/ (function(module, exports, __webpack_require__) { +/* 48 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__splice__ = __webpack_require__(604); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getIn__ = __webpack_require__(292); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setIn__ = __webpack_require__(605); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepEqual__ = __webpack_require__(606); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__deleteIn__ = __webpack_require__(607); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys__ = __webpack_require__(608); -var _prodInvariant = __webpack_require__(13); - -var invariant = __webpack_require__(9); - -/** - * Static poolers. Several custom versions for each potential number of - * arguments. A completely generic pooler is easy to implement, but would - * require accessing the `arguments` object. In each of these, `this` refers to - * the Class itself, not an instance. If any others are needed, simply add them - * here, or in their own files. - */ -var oneArgumentPooler = function (copyFieldsFrom) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, copyFieldsFrom); - return instance; - } else { - return new Klass(copyFieldsFrom); - } -}; - -var twoArgumentPooler = function (a1, a2) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2); - return instance; - } else { - return new Klass(a1, a2); - } -}; - -var threeArgumentPooler = function (a1, a2, a3) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3); - return instance; - } else { - return new Klass(a1, a2, a3); - } -}; -var fourArgumentPooler = function (a1, a2, a3, a4) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3, a4); - return instance; - } else { - return new Klass(a1, a2, a3, a4); - } -}; -var standardReleaser = function (instance) { - var Klass = this; - !(instance instanceof Klass) ? false ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; - instance.destructor(); - if (Klass.instancePool.length < Klass.poolSize) { - Klass.instancePool.push(instance); - } -}; -var DEFAULT_POOL_SIZE = 10; -var DEFAULT_POOLER = oneArgumentPooler; -/** - * Augments `CopyConstructor` to be a poolable class, augmenting only the class - * itself (statically) not adding any prototypical fields. Any CopyConstructor - * you give this may have a `poolSize` property, and will look for a - * prototypical `destructor` on instances. - * - * @param {Function} CopyConstructor Constructor that can be used to reset. - * @param {Function} pooler Customizable pooler. - */ -var addPoolingTo = function (CopyConstructor, pooler) { - // Casting as any so that flow ignores the actual implementation and trusts - // it to match the type we declared - var NewKlass = CopyConstructor; - NewKlass.instancePool = []; - NewKlass.getPooled = pooler || DEFAULT_POOLER; - if (!NewKlass.poolSize) { - NewKlass.poolSize = DEFAULT_POOL_SIZE; +var structure = { + empty: {}, + emptyList: [], + getIn: __WEBPACK_IMPORTED_MODULE_1__getIn__["a" /* default */], + setIn: __WEBPACK_IMPORTED_MODULE_2__setIn__["a" /* default */], + deepEqual: __WEBPACK_IMPORTED_MODULE_3__deepEqual__["a" /* default */], + deleteIn: __WEBPACK_IMPORTED_MODULE_4__deleteIn__["a" /* default */], + fromJS: function fromJS(value) { + return value; + }, + keys: __WEBPACK_IMPORTED_MODULE_5__keys__["a" /* default */], + size: function size(array) { + return array ? array.length : 0; + }, + splice: __WEBPACK_IMPORTED_MODULE_0__splice__["a" /* default */], + toJS: function toJS(value) { + return value; } - NewKlass.release = standardReleaser; - return NewKlass; -}; - -var PooledClass = { - addPoolingTo: addPoolingTo, - oneArgumentPooler: oneArgumentPooler, - twoArgumentPooler: twoArgumentPooler, - threeArgumentPooler: threeArgumentPooler, - fourArgumentPooler: fourArgumentPooler }; -module.exports = PooledClass; - -/***/ }), -/* 54 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -/* harmony default export */ __webpack_exports__["a"] = (isObjectLike); - +/* harmony default export */ __webpack_exports__["a"] = (structure); /***/ }), -/* 55 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(507); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__(510); - - - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = Object(__WEBPACK_IMPORTED_MODULE_1__getValue_js__["a" /* default */])(object, key); - return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */])(value) ? value : undefined; -} -/* harmony default export */ __webpack_exports__["a"] = (getNative); +Object.defineProperty(exports, "__esModule", { + value: true +}); +var CHANGE_MENU = exports.CHANGE_MENU = 'CHANGE_MENU'; +var NOTIFICATION_ADD = exports.NOTIFICATION_ADD = 'NOTIFICATION_ADD'; +var PROFILE_CREATE = exports.PROFILE_CREATE = 'PROFILE_CREATE'; +var PROFILE_UPDATE_SETTINGS = exports.PROFILE_UPDATE_SETTINGS = 'PROFILE_UPDATE_SETTINGS'; +var PROFILE_REMOVE = exports.PROFILE_REMOVE = 'PROFILE_REMOVE'; +var PROFILE_SET_ENABLED = exports.PROFILE_SET_ENABLED = 'PROFILE_SET_ENABLED'; +var ATC_PRODUCT_ADD = exports.ATC_PRODUCT_ADD = 'ATC_PRODUCT_ADD'; +var ATC_PRODUCT_REMOVE = exports.ATC_PRODUCT_REMOVE = 'ATC_PRODUCT_REMOVE'; +var ATC_SET_PRODUCT_ENABLED = exports.ATC_SET_PRODUCT_ENABLED = 'ATC_SET_PRODUCT_ENABLED'; /***/ }), -/* 56 */ +/* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3199,7 +3219,7 @@ function lighten(color, coefficient) { } /***/ }), -/* 57 */ +/* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3208,371 +3228,58 @@ function lighten(color, coefficient) { Object.defineProperty(exports, "__esModule", { value: true }); -var red50 = exports.red50 = '#ffebee'; -var red100 = exports.red100 = '#ffcdd2'; -var red200 = exports.red200 = '#ef9a9a'; -var red300 = exports.red300 = '#e57373'; -var red400 = exports.red400 = '#ef5350'; -var red500 = exports.red500 = '#f44336'; -var red600 = exports.red600 = '#e53935'; -var red700 = exports.red700 = '#d32f2f'; -var red800 = exports.red800 = '#c62828'; -var red900 = exports.red900 = '#b71c1c'; -var redA100 = exports.redA100 = '#ff8a80'; -var redA200 = exports.redA200 = '#ff5252'; -var redA400 = exports.redA400 = '#ff1744'; -var redA700 = exports.redA700 = '#d50000'; -var pink50 = exports.pink50 = '#fce4ec'; -var pink100 = exports.pink100 = '#f8bbd0'; -var pink200 = exports.pink200 = '#f48fb1'; -var pink300 = exports.pink300 = '#f06292'; -var pink400 = exports.pink400 = '#ec407a'; -var pink500 = exports.pink500 = '#e91e63'; -var pink600 = exports.pink600 = '#d81b60'; -var pink700 = exports.pink700 = '#c2185b'; -var pink800 = exports.pink800 = '#ad1457'; -var pink900 = exports.pink900 = '#880e4f'; -var pinkA100 = exports.pinkA100 = '#ff80ab'; -var pinkA200 = exports.pinkA200 = '#ff4081'; -var pinkA400 = exports.pinkA400 = '#f50057'; -var pinkA700 = exports.pinkA700 = '#c51162'; +var _extends2 = __webpack_require__(7); -var purple50 = exports.purple50 = '#f3e5f5'; -var purple100 = exports.purple100 = '#e1bee7'; -var purple200 = exports.purple200 = '#ce93d8'; -var purple300 = exports.purple300 = '#ba68c8'; -var purple400 = exports.purple400 = '#ab47bc'; -var purple500 = exports.purple500 = '#9c27b0'; -var purple600 = exports.purple600 = '#8e24aa'; -var purple700 = exports.purple700 = '#7b1fa2'; -var purple800 = exports.purple800 = '#6a1b9a'; -var purple900 = exports.purple900 = '#4a148c'; -var purpleA100 = exports.purpleA100 = '#ea80fc'; -var purpleA200 = exports.purpleA200 = '#e040fb'; -var purpleA400 = exports.purpleA400 = '#d500f9'; -var purpleA700 = exports.purpleA700 = '#aa00ff'; +var _extends3 = _interopRequireDefault(_extends2); -var deepPurple50 = exports.deepPurple50 = '#ede7f6'; -var deepPurple100 = exports.deepPurple100 = '#d1c4e9'; -var deepPurple200 = exports.deepPurple200 = '#b39ddb'; -var deepPurple300 = exports.deepPurple300 = '#9575cd'; -var deepPurple400 = exports.deepPurple400 = '#7e57c2'; -var deepPurple500 = exports.deepPurple500 = '#673ab7'; -var deepPurple600 = exports.deepPurple600 = '#5e35b1'; -var deepPurple700 = exports.deepPurple700 = '#512da8'; -var deepPurple800 = exports.deepPurple800 = '#4527a0'; -var deepPurple900 = exports.deepPurple900 = '#311b92'; -var deepPurpleA100 = exports.deepPurpleA100 = '#b388ff'; -var deepPurpleA200 = exports.deepPurpleA200 = '#7c4dff'; -var deepPurpleA400 = exports.deepPurpleA400 = '#651fff'; -var deepPurpleA700 = exports.deepPurpleA700 = '#6200ea'; +var _objectWithoutProperties2 = __webpack_require__(8); -var indigo50 = exports.indigo50 = '#e8eaf6'; -var indigo100 = exports.indigo100 = '#c5cae9'; -var indigo200 = exports.indigo200 = '#9fa8da'; -var indigo300 = exports.indigo300 = '#7986cb'; -var indigo400 = exports.indigo400 = '#5c6bc0'; -var indigo500 = exports.indigo500 = '#3f51b5'; -var indigo600 = exports.indigo600 = '#3949ab'; -var indigo700 = exports.indigo700 = '#303f9f'; -var indigo800 = exports.indigo800 = '#283593'; -var indigo900 = exports.indigo900 = '#1a237e'; -var indigoA100 = exports.indigoA100 = '#8c9eff'; -var indigoA200 = exports.indigoA200 = '#536dfe'; -var indigoA400 = exports.indigoA400 = '#3d5afe'; -var indigoA700 = exports.indigoA700 = '#304ffe'; +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var blue50 = exports.blue50 = '#e3f2fd'; -var blue100 = exports.blue100 = '#bbdefb'; -var blue200 = exports.blue200 = '#90caf9'; -var blue300 = exports.blue300 = '#64b5f6'; -var blue400 = exports.blue400 = '#42a5f5'; -var blue500 = exports.blue500 = '#2196f3'; -var blue600 = exports.blue600 = '#1e88e5'; -var blue700 = exports.blue700 = '#1976d2'; -var blue800 = exports.blue800 = '#1565c0'; -var blue900 = exports.blue900 = '#0d47a1'; -var blueA100 = exports.blueA100 = '#82b1ff'; -var blueA200 = exports.blueA200 = '#448aff'; -var blueA400 = exports.blueA400 = '#2979ff'; -var blueA700 = exports.blueA700 = '#2962ff'; +var _getPrototypeOf = __webpack_require__(3); -var lightBlue50 = exports.lightBlue50 = '#e1f5fe'; -var lightBlue100 = exports.lightBlue100 = '#b3e5fc'; -var lightBlue200 = exports.lightBlue200 = '#81d4fa'; -var lightBlue300 = exports.lightBlue300 = '#4fc3f7'; -var lightBlue400 = exports.lightBlue400 = '#29b6f6'; -var lightBlue500 = exports.lightBlue500 = '#03a9f4'; -var lightBlue600 = exports.lightBlue600 = '#039be5'; -var lightBlue700 = exports.lightBlue700 = '#0288d1'; -var lightBlue800 = exports.lightBlue800 = '#0277bd'; -var lightBlue900 = exports.lightBlue900 = '#01579b'; -var lightBlueA100 = exports.lightBlueA100 = '#80d8ff'; -var lightBlueA200 = exports.lightBlueA200 = '#40c4ff'; -var lightBlueA400 = exports.lightBlueA400 = '#00b0ff'; -var lightBlueA700 = exports.lightBlueA700 = '#0091ea'; +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -var cyan50 = exports.cyan50 = '#e0f7fa'; -var cyan100 = exports.cyan100 = '#b2ebf2'; -var cyan200 = exports.cyan200 = '#80deea'; -var cyan300 = exports.cyan300 = '#4dd0e1'; -var cyan400 = exports.cyan400 = '#26c6da'; -var cyan500 = exports.cyan500 = '#00bcd4'; -var cyan600 = exports.cyan600 = '#00acc1'; -var cyan700 = exports.cyan700 = '#0097a7'; -var cyan800 = exports.cyan800 = '#00838f'; -var cyan900 = exports.cyan900 = '#006064'; -var cyanA100 = exports.cyanA100 = '#84ffff'; -var cyanA200 = exports.cyanA200 = '#18ffff'; -var cyanA400 = exports.cyanA400 = '#00e5ff'; -var cyanA700 = exports.cyanA700 = '#00b8d4'; +var _classCallCheck2 = __webpack_require__(1); -var teal50 = exports.teal50 = '#e0f2f1'; -var teal100 = exports.teal100 = '#b2dfdb'; -var teal200 = exports.teal200 = '#80cbc4'; -var teal300 = exports.teal300 = '#4db6ac'; -var teal400 = exports.teal400 = '#26a69a'; -var teal500 = exports.teal500 = '#009688'; -var teal600 = exports.teal600 = '#00897b'; -var teal700 = exports.teal700 = '#00796b'; -var teal800 = exports.teal800 = '#00695c'; -var teal900 = exports.teal900 = '#004d40'; -var tealA100 = exports.tealA100 = '#a7ffeb'; -var tealA200 = exports.tealA200 = '#64ffda'; -var tealA400 = exports.tealA400 = '#1de9b6'; -var tealA700 = exports.tealA700 = '#00bfa5'; +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var green50 = exports.green50 = '#e8f5e9'; -var green100 = exports.green100 = '#c8e6c9'; -var green200 = exports.green200 = '#a5d6a7'; -var green300 = exports.green300 = '#81c784'; -var green400 = exports.green400 = '#66bb6a'; -var green500 = exports.green500 = '#4caf50'; -var green600 = exports.green600 = '#43a047'; -var green700 = exports.green700 = '#388e3c'; -var green800 = exports.green800 = '#2e7d32'; -var green900 = exports.green900 = '#1b5e20'; -var greenA100 = exports.greenA100 = '#b9f6ca'; -var greenA200 = exports.greenA200 = '#69f0ae'; -var greenA400 = exports.greenA400 = '#00e676'; -var greenA700 = exports.greenA700 = '#00c853'; +var _createClass2 = __webpack_require__(2); -var lightGreen50 = exports.lightGreen50 = '#f1f8e9'; -var lightGreen100 = exports.lightGreen100 = '#dcedc8'; -var lightGreen200 = exports.lightGreen200 = '#c5e1a5'; -var lightGreen300 = exports.lightGreen300 = '#aed581'; -var lightGreen400 = exports.lightGreen400 = '#9ccc65'; -var lightGreen500 = exports.lightGreen500 = '#8bc34a'; -var lightGreen600 = exports.lightGreen600 = '#7cb342'; -var lightGreen700 = exports.lightGreen700 = '#689f38'; -var lightGreen800 = exports.lightGreen800 = '#558b2f'; -var lightGreen900 = exports.lightGreen900 = '#33691e'; -var lightGreenA100 = exports.lightGreenA100 = '#ccff90'; -var lightGreenA200 = exports.lightGreenA200 = '#b2ff59'; -var lightGreenA400 = exports.lightGreenA400 = '#76ff03'; -var lightGreenA700 = exports.lightGreenA700 = '#64dd17'; +var _createClass3 = _interopRequireDefault(_createClass2); -var lime50 = exports.lime50 = '#f9fbe7'; -var lime100 = exports.lime100 = '#f0f4c3'; -var lime200 = exports.lime200 = '#e6ee9c'; -var lime300 = exports.lime300 = '#dce775'; -var lime400 = exports.lime400 = '#d4e157'; -var lime500 = exports.lime500 = '#cddc39'; -var lime600 = exports.lime600 = '#c0ca33'; -var lime700 = exports.lime700 = '#afb42b'; -var lime800 = exports.lime800 = '#9e9d24'; -var lime900 = exports.lime900 = '#827717'; -var limeA100 = exports.limeA100 = '#f4ff81'; -var limeA200 = exports.limeA200 = '#eeff41'; -var limeA400 = exports.limeA400 = '#c6ff00'; -var limeA700 = exports.limeA700 = '#aeea00'; +var _possibleConstructorReturn2 = __webpack_require__(4); -var yellow50 = exports.yellow50 = '#fffde7'; -var yellow100 = exports.yellow100 = '#fff9c4'; -var yellow200 = exports.yellow200 = '#fff59d'; -var yellow300 = exports.yellow300 = '#fff176'; -var yellow400 = exports.yellow400 = '#ffee58'; -var yellow500 = exports.yellow500 = '#ffeb3b'; -var yellow600 = exports.yellow600 = '#fdd835'; -var yellow700 = exports.yellow700 = '#fbc02d'; -var yellow800 = exports.yellow800 = '#f9a825'; -var yellow900 = exports.yellow900 = '#f57f17'; -var yellowA100 = exports.yellowA100 = '#ffff8d'; -var yellowA200 = exports.yellowA200 = '#ffff00'; -var yellowA400 = exports.yellowA400 = '#ffea00'; -var yellowA700 = exports.yellowA700 = '#ffd600'; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var amber50 = exports.amber50 = '#fff8e1'; -var amber100 = exports.amber100 = '#ffecb3'; -var amber200 = exports.amber200 = '#ffe082'; -var amber300 = exports.amber300 = '#ffd54f'; -var amber400 = exports.amber400 = '#ffca28'; -var amber500 = exports.amber500 = '#ffc107'; -var amber600 = exports.amber600 = '#ffb300'; -var amber700 = exports.amber700 = '#ffa000'; -var amber800 = exports.amber800 = '#ff8f00'; -var amber900 = exports.amber900 = '#ff6f00'; -var amberA100 = exports.amberA100 = '#ffe57f'; -var amberA200 = exports.amberA200 = '#ffd740'; -var amberA400 = exports.amberA400 = '#ffc400'; -var amberA700 = exports.amberA700 = '#ffab00'; +var _inherits2 = __webpack_require__(5); -var orange50 = exports.orange50 = '#fff3e0'; -var orange100 = exports.orange100 = '#ffe0b2'; -var orange200 = exports.orange200 = '#ffcc80'; -var orange300 = exports.orange300 = '#ffb74d'; -var orange400 = exports.orange400 = '#ffa726'; -var orange500 = exports.orange500 = '#ff9800'; -var orange600 = exports.orange600 = '#fb8c00'; -var orange700 = exports.orange700 = '#f57c00'; -var orange800 = exports.orange800 = '#ef6c00'; -var orange900 = exports.orange900 = '#e65100'; -var orangeA100 = exports.orangeA100 = '#ffd180'; -var orangeA200 = exports.orangeA200 = '#ffab40'; -var orangeA400 = exports.orangeA400 = '#ff9100'; -var orangeA700 = exports.orangeA700 = '#ff6d00'; +var _inherits3 = _interopRequireDefault(_inherits2); -var deepOrange50 = exports.deepOrange50 = '#fbe9e7'; -var deepOrange100 = exports.deepOrange100 = '#ffccbc'; -var deepOrange200 = exports.deepOrange200 = '#ffab91'; -var deepOrange300 = exports.deepOrange300 = '#ff8a65'; -var deepOrange400 = exports.deepOrange400 = '#ff7043'; -var deepOrange500 = exports.deepOrange500 = '#ff5722'; -var deepOrange600 = exports.deepOrange600 = '#f4511e'; -var deepOrange700 = exports.deepOrange700 = '#e64a19'; -var deepOrange800 = exports.deepOrange800 = '#d84315'; -var deepOrange900 = exports.deepOrange900 = '#bf360c'; -var deepOrangeA100 = exports.deepOrangeA100 = '#ff9e80'; -var deepOrangeA200 = exports.deepOrangeA200 = '#ff6e40'; -var deepOrangeA400 = exports.deepOrangeA400 = '#ff3d00'; -var deepOrangeA700 = exports.deepOrangeA700 = '#dd2c00'; +var _simpleAssign = __webpack_require__(6); -var brown50 = exports.brown50 = '#efebe9'; -var brown100 = exports.brown100 = '#d7ccc8'; -var brown200 = exports.brown200 = '#bcaaa4'; -var brown300 = exports.brown300 = '#a1887f'; -var brown400 = exports.brown400 = '#8d6e63'; -var brown500 = exports.brown500 = '#795548'; -var brown600 = exports.brown600 = '#6d4c41'; -var brown700 = exports.brown700 = '#5d4037'; -var brown800 = exports.brown800 = '#4e342e'; -var brown900 = exports.brown900 = '#3e2723'; +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -var blueGrey50 = exports.blueGrey50 = '#eceff1'; -var blueGrey100 = exports.blueGrey100 = '#cfd8dc'; -var blueGrey200 = exports.blueGrey200 = '#b0bec5'; -var blueGrey300 = exports.blueGrey300 = '#90a4ae'; -var blueGrey400 = exports.blueGrey400 = '#78909c'; -var blueGrey500 = exports.blueGrey500 = '#607d8b'; -var blueGrey600 = exports.blueGrey600 = '#546e7a'; -var blueGrey700 = exports.blueGrey700 = '#455a64'; -var blueGrey800 = exports.blueGrey800 = '#37474f'; -var blueGrey900 = exports.blueGrey900 = '#263238'; - -var grey50 = exports.grey50 = '#fafafa'; -var grey100 = exports.grey100 = '#f5f5f5'; -var grey200 = exports.grey200 = '#eeeeee'; -var grey300 = exports.grey300 = '#e0e0e0'; -var grey400 = exports.grey400 = '#bdbdbd'; -var grey500 = exports.grey500 = '#9e9e9e'; -var grey600 = exports.grey600 = '#757575'; -var grey700 = exports.grey700 = '#616161'; -var grey800 = exports.grey800 = '#424242'; -var grey900 = exports.grey900 = '#212121'; - -var black = exports.black = '#000000'; -var white = exports.white = '#ffffff'; - -var transparent = exports.transparent = 'rgba(0, 0, 0, 0)'; -var fullBlack = exports.fullBlack = 'rgba(0, 0, 0, 1)'; -var darkBlack = exports.darkBlack = 'rgba(0, 0, 0, 0.87)'; -var lightBlack = exports.lightBlack = 'rgba(0, 0, 0, 0.54)'; -var minBlack = exports.minBlack = 'rgba(0, 0, 0, 0.26)'; -var faintBlack = exports.faintBlack = 'rgba(0, 0, 0, 0.12)'; -var fullWhite = exports.fullWhite = 'rgba(255, 255, 255, 1)'; -var darkWhite = exports.darkWhite = 'rgba(255, 255, 255, 0.87)'; -var lightWhite = exports.lightWhite = 'rgba(255, 255, 255, 0.54)'; - -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _shallowEqual = __webpack_require__(87); - -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _shallowEqual2.default; - -/***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - -var _getPrototypeOf = __webpack_require__(3); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(1); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(2); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(4); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(5); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - -var _react = __webpack_require__(0); +var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _childUtils = __webpack_require__(127); +var _childUtils = __webpack_require__(131); -var _events = __webpack_require__(196); +var _events = __webpack_require__(203); var _events2 = _interopRequireDefault(_events); -var _keycode = __webpack_require__(30); +var _keycode = __webpack_require__(26); var _keycode2 = _interopRequireDefault(_keycode); -var _FocusRipple = __webpack_require__(197); +var _FocusRipple = __webpack_require__(204); var _FocusRipple2 = _interopRequireDefault(_FocusRipple); -var _TouchRipple = __webpack_require__(314); +var _TouchRipple = __webpack_require__(318); var _TouchRipple2 = _interopRequireDefault(_TouchRipple); @@ -3914,7 +3621,7 @@ EnhancedButton.contextTypes = { exports.default = EnhancedButton; /***/ }), -/* 60 */ +/* 52 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3923,92 +3630,118 @@ exports.default = EnhancedButton; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getTheme = getTheme; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -var mapError = function mapError(_ref) { - var errorProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'errorText'; - var _ref$meta = _ref.meta; - _ref$meta = _ref$meta === undefined ? {} : _ref$meta; +var _getMuiTheme = __webpack_require__(129); - var touched = _ref$meta.touched, - error = _ref$meta.error, - warning = _ref$meta.warning, - input = _ref.input, - props = _objectWithoutProperties(_ref, ['meta', 'input']); +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); - return touched && (error || warning) ? _extends({}, props, input, _defineProperty({}, errorProp, error || warning)) : _extends({}, input, props); -}; +var _colors = __webpack_require__(31); -exports.default = mapError; +var _styles = __webpack_require__(746); -/***/ }), -/* 61 */ -/***/ (function(module, exports, __webpack_require__) { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -// optional / simple context binding -var aFunction = __webpack_require__(99); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; +var styles = { + paper: { + margin: _styles.spacing.desktopGutter, + padding: _styles.spacing.desktopGutter + }, + container: { + display: 'flex', + flexFlow: 'column', + alignItems: 'center', + minHeight: '100%', + backgroundColor: _colors.grey50 + }, + content: { + maxWidth: 1200, + margin: '0 auto', + zIndex: 101 + }, + tabs: { + marginLeft: -24, + marginRight: -24 + }, + appBar: { + flex: 'none', + display: 'block', + flexWrap: 'wrap', + zIndex: 100, + height: 64 + }, + logo: { + fontSize: 16, + color: _styles.typography.textFullWhite, + lineHeight: _styles.spacing.desktopKeylineIncrement + 'px', + fontWeight: _styles.typography.fontWeightLight, + backgroundColor: 'rgb(72, 72, 72)', + marginBottom: 8, + height: 64, + textAlign: 'center' + }, + fields: { + text: { + width: '100%' + } + }, + colors: { + main: 'rgb(72, 72, 72)', + drawer: 'rgb(250, 250, 250)', + tabs: 'rgb(137, 189, 191)' + }, + theme: { + palette: { + primary1Color: 'rgb(72, 72, 72)', + primary2Color: 'rgb(72, 72, 72)' + }, + drawer: { + color: 'rgb(250, 250, 250)' + } } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; }; +function getTheme() { + return (0, _getMuiTheme2.default)(styles.theme); +} + +exports.default = styles; /***/ }), -/* 62 */ -/***/ (function(module, exports) { +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; +var dP = __webpack_require__(34) + , createDesc = __webpack_require__(86); +module.exports = __webpack_require__(43) ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); +} : function(object, key, value){ + object[key] = value; + return object; }; - /***/ }), -/* 63 */ +/* 54 */ /***/ (function(module, exports) { -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function(it, key){ + return hasOwnProperty.call(it, key); }; - /***/ }), -/* 64 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(207); -var enumBugKeys = __webpack_require__(138); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(215) + , defined = __webpack_require__(139); +module.exports = function(it){ + return IObject(defined(it)); }; - /***/ }), -/* 65 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4024,17 +3757,17 @@ module.exports = Object.keys || function keys(O) { -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var ReactBaseClasses = __webpack_require__(209); -var ReactChildren = __webpack_require__(342); -var ReactDOMFactories = __webpack_require__(347); -var ReactElement = __webpack_require__(66); -var ReactPropTypes = __webpack_require__(348); -var ReactVersion = __webpack_require__(351); +var ReactBaseClasses = __webpack_require__(216); +var ReactChildren = __webpack_require__(219); +var ReactDOMFactories = __webpack_require__(355); +var ReactElement = __webpack_require__(57); +var ReactPropTypes = __webpack_require__(356); +var ReactVersion = __webpack_require__(359); -var createReactClass = __webpack_require__(352); -var onlyChild = __webpack_require__(353); +var createReactClass = __webpack_require__(360); +var onlyChild = __webpack_require__(362); var createElement = ReactElement.createElement; var createFactory = ReactElement.createFactory; @@ -4145,7 +3878,7 @@ if (false) { module.exports = React; /***/ }), -/* 66 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4161,15 +3894,15 @@ module.exports = React; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var ReactCurrentOwner = __webpack_require__(37); +var ReactCurrentOwner = __webpack_require__(36); -var warning = __webpack_require__(12); -var canDefineProperty = __webpack_require__(211); +var warning = __webpack_require__(11); +var canDefineProperty = __webpack_require__(218); var hasOwnProperty = Object.prototype.hasOwnProperty; -var REACT_ELEMENT_TYPE = __webpack_require__(212); +var REACT_ELEMENT_TYPE = __webpack_require__(220); var RESERVED_PROPS = { key: true, @@ -4491,7 +4224,7 @@ ReactElement.isValidElement = function (object) { module.exports = ReactElement; /***/ }), -/* 67 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4503,241 +4236,645 @@ module.exports = ReactElement; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * */ -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); var invariant = __webpack_require__(9); -function checkMask(value, bitmask) { - return (value & bitmask) === bitmask; -} - -var DOMPropertyInjection = { - /** - * Mapping from normalized, camelcased property names to a configuration that - * specifies how the associated DOM property should be accessed or rendered. - */ - MUST_USE_PROPERTY: 0x1, - HAS_BOOLEAN_VALUE: 0x4, - HAS_NUMERIC_VALUE: 0x8, - HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, - HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, - - /** - * Inject some specialized knowledge about the DOM. This takes a config object - * with the following properties: - * - * isCustomAttribute: function that given an attribute name will return true - * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* - * attributes where it's impossible to enumerate all of the possible - * attribute names, - * - * Properties: object mapping DOM property name to one of the - * DOMPropertyInjection constants or null. If your attribute isn't in here, - * it won't get written to the DOM. - * - * DOMAttributeNames: object mapping React attribute name to the DOM - * attribute name. Attribute names not specified use the **lowercase** - * normalized name. - * - * DOMAttributeNamespaces: object mapping React attribute name to the DOM - * attribute namespace URL. (Attribute names not specified use no namespace.) - * - * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. - * Property names not specified use the normalized name. - * - * DOMMutationMethods: Properties that require special mutation methods. If - * `value` is undefined, the mutation method should unset the property. - * - * @param {object} domPropertyConfig the config as described above. - */ - injectDOMPropertyConfig: function (domPropertyConfig) { - var Injection = DOMPropertyInjection; - var Properties = domPropertyConfig.Properties || {}; - var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; - var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; - var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; - var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; - - if (domPropertyConfig.isCustomAttribute) { - DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); - } - - for (var propName in Properties) { - !!DOMProperty.properties.hasOwnProperty(propName) ? false ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0; - - var lowerCased = propName.toLowerCase(); - var propConfig = Properties[propName]; - - var propertyInfo = { - attributeName: lowerCased, - attributeNamespace: null, - propertyName: propName, - mutationMethod: null, - - mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), - hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), - hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), - hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), - hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) - }; - !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? false ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0; - - if (false) { - DOMProperty.getPossibleStandardName[lowerCased] = propName; - } - - if (DOMAttributeNames.hasOwnProperty(propName)) { - var attributeName = DOMAttributeNames[propName]; - propertyInfo.attributeName = attributeName; - if (false) { - DOMProperty.getPossibleStandardName[attributeName] = propName; - } - } +/** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ +var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; - if (DOMAttributeNamespaces.hasOwnProperty(propName)) { - propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; - } +var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } +}; - if (DOMPropertyNames.hasOwnProperty(propName)) { - propertyInfo.propertyName = DOMPropertyNames[propName]; - } +var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } +}; - if (DOMMutationMethods.hasOwnProperty(propName)) { - propertyInfo.mutationMethod = DOMMutationMethods[propName]; - } +var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } +}; - DOMProperty.properties[propName] = propertyInfo; - } +var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) ? false ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); } }; -/* eslint-disable max-len */ -var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; -/* eslint-enable max-len */ +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; /** - * DOMProperty exports lookup objects that can be used like functions: - * - * > DOMProperty.isValid['id'] - * true - * > DOMProperty.isValid['foobar'] - * undefined - * - * Although this may be confusing, it performs better in general. + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. * - * @see http://jsperf.com/key-exists - * @see http://jsperf.com/key-missing + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. */ -var DOMProperty = { - ID_ATTRIBUTE_NAME: 'data-reactid', - ROOT_ATTRIBUTE_NAME: 'data-reactroot', - - ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, - ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', - - /** - * Map from property "standard name" to an object with info about how to set - * the property in the DOM. Each object contains: - * - * attributeName: - * Used when rendering markup or with `*Attribute()`. - * attributeNamespace - * propertyName: - * Used on DOM node instances. (This includes properties that mutate due to - * external factors.) - * mutationMethod: - * If non-null, used instead of the property or `setAttribute()` after - * initial render. - * mustUseProperty: - * Whether the property must be accessed and mutated as an object property. - * hasBooleanValue: - * Whether the property should be removed when set to a falsey value. - * hasNumericValue: - * Whether the property must be numeric or parse as a numeric and should be - * removed when set to a falsey value. - * hasPositiveNumericValue: - * Whether the property must be positive numeric or parse as a positive - * numeric and should be removed when set to a falsey value. - * hasOverloadedBooleanValue: - * Whether the property can be used as a flag as well as with a value. - * Removed when strictly equal to false; present without a value when - * strictly equal to true; present with a value otherwise. - */ - properties: {}, - - /** - * Mapping from lowercase property names to the properly cased version, used - * to warn in the case of missing properties. Available only in __DEV__. - * - * autofocus is predefined, because adding it to the property whitelist - * causes unintended side effects. - * - * @type {Object} - */ - getPossibleStandardName: false ? { autofocus: 'autoFocus' } : null, - - /** - * All of the isCustomAttribute() functions that have been injected. - */ - _isCustomAttributeFunctions: [], - - /** - * Checks whether a property name is a custom attribute. - * @method - */ - isCustomAttribute: function (attributeName) { - for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { - var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; - if (isCustomAttributeFn(attributeName)) { - return true; - } - } - return false; - }, +var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; +}; - injection: DOMPropertyInjection +var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler }; -module.exports = DOMProperty; +module.exports = PooledClass; /***/ }), -/* 68 */ -/***/ (function(module, exports, __webpack_require__) { +/* 59 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false * + * _.isObjectLike(null); + * // => false */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} +/* harmony default export */ __webpack_exports__["a"] = (isObjectLike); -var EventPluginHub = __webpack_require__(69); -var EventPluginUtils = __webpack_require__(103); +/***/ }), +/* 60 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var accumulateInto = __webpack_require__(217); -var forEachAccumulated = __webpack_require__(218); -var warning = __webpack_require__(12); +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(506); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__(509); -var getListener = EventPluginHub.getListener; -/** - * Some event types have a notion of different registration names for different - * "phases" of propagation. This finds listeners by a given phase. - */ -function listenerAtPhase(inst, event, propagationPhase) { - var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; - return getListener(inst, registrationName); -} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = __WEBPACK_IMPORTED_MODULE_1__getValue_js__["a" /* default */](object, key); + return __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */](value) ? value : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (getNative); + + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _iterator = __webpack_require__(641); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = __webpack_require__(649); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(708), __esModule: true }; + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _shallowEqual = __webpack_require__(90); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _shallowEqual2.default; + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _IconButton = __webpack_require__(722); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _IconButton2.default; + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _RaisedButton = __webpack_require__(756); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _RaisedButton2.default; + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var mapError = function mapError(_ref) { + var errorProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'errorText'; + var _ref$meta = _ref.meta; + _ref$meta = _ref$meta === undefined ? {} : _ref$meta; + + var touched = _ref$meta.touched, + error = _ref$meta.error, + warning = _ref$meta.warning, + input = _ref.input, + props = _objectWithoutProperties(_ref, ['meta', 'input']); + + return touched && (error || warning) ? _extends({}, props, input, _defineProperty({}, errorProp, error || warning)) : _extends({}, input, props); +}; + +exports.default = mapError; + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(136); +module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; +}; + +/***/ }), +/* 68 */ +/***/ (function(module, exports) { + +module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +/***/ }), +/* 69 */ +/***/ (function(module, exports) { + +module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } +}; + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(214) + , enumBugKeys = __webpack_require__(144); + +module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); +}; + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + +/** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + +function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; +} + +module.exports = reactProdInvariant; + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var invariant = __webpack_require__(9); + +function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; +} + +var DOMPropertyInjection = { + /** + * Mapping from normalized, camelcased property names to a configuration that + * specifies how the associated DOM property should be accessed or rendered. + */ + MUST_USE_PROPERTY: 0x1, + HAS_BOOLEAN_VALUE: 0x4, + HAS_NUMERIC_VALUE: 0x8, + HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, + HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, + + /** + * Inject some specialized knowledge about the DOM. This takes a config object + * with the following properties: + * + * isCustomAttribute: function that given an attribute name will return true + * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* + * attributes where it's impossible to enumerate all of the possible + * attribute names, + * + * Properties: object mapping DOM property name to one of the + * DOMPropertyInjection constants or null. If your attribute isn't in here, + * it won't get written to the DOM. + * + * DOMAttributeNames: object mapping React attribute name to the DOM + * attribute name. Attribute names not specified use the **lowercase** + * normalized name. + * + * DOMAttributeNamespaces: object mapping React attribute name to the DOM + * attribute namespace URL. (Attribute names not specified use no namespace.) + * + * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. + * Property names not specified use the normalized name. + * + * DOMMutationMethods: Properties that require special mutation methods. If + * `value` is undefined, the mutation method should unset the property. + * + * @param {object} domPropertyConfig the config as described above. + */ + injectDOMPropertyConfig: function (domPropertyConfig) { + var Injection = DOMPropertyInjection; + var Properties = domPropertyConfig.Properties || {}; + var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; + + if (domPropertyConfig.isCustomAttribute) { + DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); + } + + for (var propName in Properties) { + !!DOMProperty.properties.hasOwnProperty(propName) ? false ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0; + + var lowerCased = propName.toLowerCase(); + var propConfig = Properties[propName]; + + var propertyInfo = { + attributeName: lowerCased, + attributeNamespace: null, + propertyName: propName, + mutationMethod: null, + + mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), + hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), + hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), + hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), + hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) + }; + !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? false ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0; + + if (false) { + DOMProperty.getPossibleStandardName[lowerCased] = propName; + } + + if (DOMAttributeNames.hasOwnProperty(propName)) { + var attributeName = DOMAttributeNames[propName]; + propertyInfo.attributeName = attributeName; + if (false) { + DOMProperty.getPossibleStandardName[attributeName] = propName; + } + } + + if (DOMAttributeNamespaces.hasOwnProperty(propName)) { + propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; + } + + if (DOMPropertyNames.hasOwnProperty(propName)) { + propertyInfo.propertyName = DOMPropertyNames[propName]; + } + + if (DOMMutationMethods.hasOwnProperty(propName)) { + propertyInfo.mutationMethod = DOMMutationMethods[propName]; + } + + DOMProperty.properties[propName] = propertyInfo; + } + } +}; + +/* eslint-disable max-len */ +var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; +/* eslint-enable max-len */ + +/** + * DOMProperty exports lookup objects that can be used like functions: + * + * > DOMProperty.isValid['id'] + * true + * > DOMProperty.isValid['foobar'] + * undefined + * + * Although this may be confusing, it performs better in general. + * + * @see http://jsperf.com/key-exists + * @see http://jsperf.com/key-missing + */ +var DOMProperty = { + + ID_ATTRIBUTE_NAME: 'data-reactid', + ROOT_ATTRIBUTE_NAME: 'data-reactroot', + + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', + + /** + * Map from property "standard name" to an object with info about how to set + * the property in the DOM. Each object contains: + * + * attributeName: + * Used when rendering markup or with `*Attribute()`. + * attributeNamespace + * propertyName: + * Used on DOM node instances. (This includes properties that mutate due to + * external factors.) + * mutationMethod: + * If non-null, used instead of the property or `setAttribute()` after + * initial render. + * mustUseProperty: + * Whether the property must be accessed and mutated as an object property. + * hasBooleanValue: + * Whether the property should be removed when set to a falsey value. + * hasNumericValue: + * Whether the property must be numeric or parse as a numeric and should be + * removed when set to a falsey value. + * hasPositiveNumericValue: + * Whether the property must be positive numeric or parse as a positive + * numeric and should be removed when set to a falsey value. + * hasOverloadedBooleanValue: + * Whether the property can be used as a flag as well as with a value. + * Removed when strictly equal to false; present without a value when + * strictly equal to true; present with a value otherwise. + */ + properties: {}, + + /** + * Mapping from lowercase property names to the properly cased version, used + * to warn in the case of missing properties. Available only in __DEV__. + * + * autofocus is predefined, because adding it to the property whitelist + * causes unintended side effects. + * + * @type {Object} + */ + getPossibleStandardName: false ? { autofocus: 'autoFocus' } : null, + + /** + * All of the isCustomAttribute() functions that have been injected. + */ + _isCustomAttributeFunctions: [], + + /** + * Checks whether a property name is a custom attribute. + * @method + */ + isCustomAttribute: function (attributeName) { + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; + if (isCustomAttributeFn(attributeName)) { + return true; + } + } + return false; + }, + + injection: DOMPropertyInjection +}; + +module.exports = DOMProperty; + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPluginHub = __webpack_require__(74); +var EventPluginUtils = __webpack_require__(106); + +var accumulateInto = __webpack_require__(226); +var forEachAccumulated = __webpack_require__(227); +var warning = __webpack_require__(11); + +var getListener = EventPluginHub.getListener; + +/** + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. + */ +function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); +} /** * Tags a `SyntheticEvent` with dispatched listeners. Creating this function @@ -4844,7 +4981,7 @@ var EventPropagators = { module.exports = EventPropagators; /***/ }), -/* 69 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4860,14 +4997,14 @@ module.exports = EventPropagators; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); -var EventPluginRegistry = __webpack_require__(140); -var EventPluginUtils = __webpack_require__(103); -var ReactErrorUtils = __webpack_require__(141); +var EventPluginRegistry = __webpack_require__(146); +var EventPluginUtils = __webpack_require__(106); +var ReactErrorUtils = __webpack_require__(147); -var accumulateInto = __webpack_require__(217); -var forEachAccumulated = __webpack_require__(218); +var accumulateInto = __webpack_require__(226); +var forEachAccumulated = __webpack_require__(227); var invariant = __webpack_require__(9); /** @@ -4955,10 +5092,12 @@ function shouldPreventMouseEvent(name, type, props) { * @public */ var EventPluginHub = { + /** * Methods for injecting dependencies. */ injection: { + /** * @param {array} InjectedEventPluginOrder * @public @@ -4969,6 +5108,7 @@ var EventPluginHub = { * @param {object} injectedNamesToPlugins Map from names to plugin modules. */ injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName + }, /** @@ -5118,12 +5258,13 @@ var EventPluginHub = { __getListenerBank: function () { return listenerBank; } + }; module.exports = EventPluginHub; /***/ }), -/* 70 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5139,10 +5280,10 @@ module.exports = EventPluginHub; -var ReactRef = __webpack_require__(362); -var ReactInstrumentation = __webpack_require__(29); +var ReactRef = __webpack_require__(371); +var ReactInstrumentation = __webpack_require__(27); -var warning = __webpack_require__(12); +var warning = __webpack_require__(11); /** * Helper to call ReactRef.attachRefs with this composite component, split out @@ -5153,6 +5294,7 @@ function attachRefs() { } var ReactReconciler = { + /** * Initializes the component, renders markup, and registers event listeners. * @@ -5164,8 +5306,8 @@ var ReactReconciler = { * @final * @internal */ - mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots - { + mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots + ) { if (false) { if (internalInstance._debugID !== 0) { ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID); @@ -5289,12 +5431,13 @@ var ReactReconciler = { } } } + }; module.exports = ReactReconciler; /***/ }), -/* 71 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5310,9 +5453,9 @@ module.exports = ReactReconciler; -var SyntheticEvent = __webpack_require__(38); +var SyntheticEvent = __webpack_require__(37); -var getEventTarget = __webpack_require__(142); +var getEventTarget = __webpack_require__(148); /** * @interface UIEvent @@ -5358,7 +5501,7 @@ SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); module.exports = SyntheticUIEvent; /***/ }), -/* 72 */ +/* 77 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5374,11 +5517,11 @@ module.exports = SyntheticUIEvent; -var DOMNamespaces = __webpack_require__(147); -var setInnerHTML = __webpack_require__(106); +var DOMNamespaces = __webpack_require__(153); +var setInnerHTML = __webpack_require__(109); -var createMicrosoftUnsafeLocalFunction = __webpack_require__(148); -var setTextContent = __webpack_require__(224); +var createMicrosoftUnsafeLocalFunction = __webpack_require__(154); +var setTextContent = __webpack_require__(232); var ELEMENT_NODE_TYPE = 1; var DOCUMENT_FRAGMENT_NODE_TYPE = 11; @@ -5481,13 +5624,13 @@ DOMLazyTree.queueText = queueText; module.exports = DOMLazyTree; /***/ }), -/* 73 */ +/* 78 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export default */ /* unused harmony export _resetWarned */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); @@ -5517,7 +5660,7 @@ function _resetWarned() { } /***/ }), -/* 74 */ +/* 79 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5526,7 +5669,7 @@ function _resetWarned() { /* harmony export (immutable) */ __webpack_exports__["b"] = getParamNames; /* unused harmony export getParams */ /* harmony export (immutable) */ __webpack_exports__["a"] = formatPattern; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); @@ -5708,7 +5851,7 @@ function formatPattern(pattern, params) { if (token === '*' || token === '**') { paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat; - !(paramValue != null || parenCount > 0) ? false ? invariant(false, 'Missing splat #%s for path "%s"', splatIndex, pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + !(paramValue != null || parenCount > 0) ? false ? invariant(false, 'Missing splat #%s for path "%s"', splatIndex, pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; if (paramValue != null) pathname += encodeURI(paramValue); } else if (token === '(') { @@ -5727,7 +5870,7 @@ function formatPattern(pattern, params) { paramName = token.substring(1); paramValue = params[paramName]; - !(paramValue != null || parenCount > 0) ? false ? invariant(false, 'Missing "%s" parameter for path "%s"', paramName, pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + !(paramValue != null || parenCount > 0) ? false ? invariant(false, 'Missing "%s" parameter for path "%s"', paramName, pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; if (paramValue == null) { if (parenCount) { @@ -5744,7 +5887,7 @@ function formatPattern(pattern, params) { } } - !(nextParenIdx > 0) ? false ? invariant(false, 'Path "%s" is missing end paren at segment "%s"', pattern, tokensSubset.join('')) : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + !(nextParenIdx > 0) ? false ? invariant(false, 'Path "%s" is missing end paren at segment "%s"', pattern, tokensSubset.join('')) : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; // jump to ending paren i = curTokenIdx + nextParenIdx - 1; @@ -5755,13 +5898,13 @@ function formatPattern(pattern, params) { } } - !(parenCount <= 0) ? false ? invariant(false, 'Path "%s" is missing end paren', pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + !(parenCount <= 0) ? false ? invariant(false, 'Path "%s" is missing end paren', pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; return pathname.replace(/\/+/g, '/'); } /***/ }), -/* 75 */ +/* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5770,21 +5913,21 @@ function formatPattern(pattern, params) { exports.__esModule = true; exports.locationsAreEqual = exports.statesAreEqual = exports.createLocation = exports.createQuery = undefined; -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _invariant = __webpack_require__(20); +var _invariant = __webpack_require__(17); var _invariant2 = _interopRequireDefault(_invariant); -var _warning = __webpack_require__(17); +var _warning = __webpack_require__(15); var _warning2 = _interopRequireDefault(_warning); -var _PathUtils = __webpack_require__(46); +var _PathUtils = __webpack_require__(45); -var _Actions = __webpack_require__(109); +var _Actions = __webpack_require__(113); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -5793,9 +5936,9 @@ var createQuery = exports.createQuery = function createQuery(props) { }; var createLocation = exports.createLocation = function createLocation() { - var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/'; - var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Actions.POP; - var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var input = arguments.length <= 0 || arguments[0] === undefined ? '/' : arguments[0]; + var action = arguments.length <= 1 || arguments[1] === undefined ? _Actions.POP : arguments[1]; + var key = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2]; var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input; @@ -5859,13 +6002,13 @@ var locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a }; /***/ }), -/* 76 */ +/* 81 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(455); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(456); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(116); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(463); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(464); @@ -5889,42 +6032,140 @@ function baseGetTag(value) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) - ? Object(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */])(value) - : Object(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */])(value); + ? __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */](value) + : __WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */](value); } /* harmony default export */ __webpack_exports__["a"] = (baseGetTag); /***/ }), -/* 77 */ -/***/ (function(module, exports, __webpack_require__) { +/* 82 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionTypes", function() { return actionTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Field", function() { return Field; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fields", function() { return Fields; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FieldArray", function() { return FieldArray; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return Form; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormSection", function() { return FormSection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formValueSelector", function() { return formValueSelector; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormValues", function() { return getFormValues; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormInitialValues", function() { return getFormInitialValues; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncErrors", function() { return getFormSyncErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormAsyncErrors", function() { return getFormAsyncErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSubmitErrors", function() { return getFormSubmitErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDirty", function() { return isDirty; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInvalid", function() { return isInvalid; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPristine", function() { return isPristine; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValid", function() { return isValid; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSubmitting", function() { return isSubmitting; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitSucceeded", function() { return hasSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitFailed", function() { return hasSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return propTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduxForm", function() { return reduxForm; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubmissionError", function() { return SubmissionError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return values; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createAll__ = __webpack_require__(498); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(48); + + + +var _createAll = __WEBPACK_IMPORTED_MODULE_0__createAll__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]); + +var actionTypes = _createAll.actionTypes, + arrayInsert = _createAll.arrayInsert, + arrayMove = _createAll.arrayMove, + arrayPop = _createAll.arrayPop, + arrayPush = _createAll.arrayPush, + arrayRemove = _createAll.arrayRemove, + arrayRemoveAll = _createAll.arrayRemoveAll, + arrayShift = _createAll.arrayShift, + arraySplice = _createAll.arraySplice, + arraySwap = _createAll.arraySwap, + arrayUnshift = _createAll.arrayUnshift, + autofill = _createAll.autofill, + blur = _createAll.blur, + change = _createAll.change, + destroy = _createAll.destroy, + Field = _createAll.Field, + Fields = _createAll.Fields, + FieldArray = _createAll.FieldArray, + Form = _createAll.Form, + FormSection = _createAll.FormSection, + focus = _createAll.focus, + formValueSelector = _createAll.formValueSelector, + getFormValues = _createAll.getFormValues, + getFormInitialValues = _createAll.getFormInitialValues, + getFormSyncErrors = _createAll.getFormSyncErrors, + getFormAsyncErrors = _createAll.getFormAsyncErrors, + getFormSubmitErrors = _createAll.getFormSubmitErrors, + initialize = _createAll.initialize, + isDirty = _createAll.isDirty, + isInvalid = _createAll.isInvalid, + isPristine = _createAll.isPristine, + isValid = _createAll.isValid, + isSubmitting = _createAll.isSubmitting, + hasSubmitSucceeded = _createAll.hasSubmitSucceeded, + hasSubmitFailed = _createAll.hasSubmitFailed, + propTypes = _createAll.propTypes, + reducer = _createAll.reducer, + reduxForm = _createAll.reduxForm, + registerField = _createAll.registerField, + reset = _createAll.reset, + setSubmitFailed = _createAll.setSubmitFailed, + setSubmitSucceeded = _createAll.setSubmitSucceeded, + startAsyncValidation = _createAll.startAsyncValidation, + startSubmit = _createAll.startSubmit, + stopAsyncValidation = _createAll.stopAsyncValidation, + stopSubmit = _createAll.stopSubmit, + submit = _createAll.submit, + SubmissionError = _createAll.SubmissionError, + touch = _createAll.touch, + unregisterField = _createAll.unregisterField, + untouch = _createAll.untouch, + values = _createAll.values; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var CHANGE_MENU = exports.CHANGE_MENU = 'CHANGE_MENU'; -var UPDATE_SETTINGS = exports.UPDATE_SETTINGS = 'UPDATE_SETTINGS'; -var NOTIFICATION_ADD = exports.NOTIFICATION_ADD = 'NOTIFICATION_ADD'; - /***/ }), -/* 78 */ +/* 83 */ /***/ (function(module, exports) { module.exports = {}; - -/***/ }), -/* 79 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(724), __esModule: true }; - /***/ }), -/* 80 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5933,85 +6174,13 @@ module.exports = { "default": __webpack_require__(724), __esModule: true }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getTheme = getTheme; - -var _getMuiTheme = __webpack_require__(125); - -var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); - -var _colors = __webpack_require__(57); - -var _styles = __webpack_require__(758); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var styles = { - paper: { - margin: _styles.spacing.desktopGutter, - padding: _styles.spacing.desktopGutter - }, - container: { - display: 'flex', - flexFlow: 'column', - alignItems: 'center', - minHeight: '100%', - backgroundColor: _colors.grey50 - }, - content: { - maxWidth: 1200, - margin: '0 auto', - zIndex: 101 - }, - tabs: { - marginLeft: -24, - marginRight: -24 - }, - appBar: { - flex: 'none', - display: 'block', - flexWrap: 'wrap', - zIndex: 100, - height: 64 - }, - logo: { - fontSize: 16, - color: _styles.typography.textFullWhite, - lineHeight: _styles.spacing.desktopKeylineIncrement + 'px', - fontWeight: _styles.typography.fontWeightLight, - backgroundColor: 'rgb(72, 72, 72)', - marginBottom: 8, - height: 64, - textAlign: 'center' - }, - fields: { - text: { - width: '100%' - } - }, - colors: { - main: 'rgb(72, 72, 72)', - drawer: 'rgb(250, 250, 250)', - tabs: 'rgb(137, 189, 191)' - }, - theme: { - palette: { - primary1Color: 'rgb(72, 72, 72)', - primary2Color: 'rgb(72, 72, 72)' - }, - drawer: { - color: 'rgb(250, 250, 250)' - } - } -}; - -function getTheme() { - return (0, _getMuiTheme2.default)(styles.theme); -} - -exports.default = styles; +var MENU_OPTIONS = exports.MENU_OPTIONS = 'Options'; +var MENU_BILLING = exports.MENU_BILLING = 'Billing'; +var MENU_SIZES = exports.MENU_SIZES = 'Sizes'; +var MENU_ATC = exports.MENU_ATC = 'AutoCop'; /***/ }), -/* 81 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6039,7 +6208,7 @@ exports.isBetweenDates = isBetweenDates; exports.monthDiff = monthDiff; exports.yearDiff = yearDiff; -var _warning = __webpack_require__(17); +var _warning = __webpack_require__(15); var _warning2 = _interopRequireDefault(_warning); @@ -6197,87 +6366,40 @@ function yearDiff(d1, d2) { } /***/ }), -/* 82 */ +/* 86 */ /***/ (function(module, exports) { -module.exports = function (bitmap, value) { +module.exports = function(bitmap, value){ return { - enumerable: !(bitmap & 1), + enumerable : !(bitmap & 1), configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value + writable : !(bitmap & 4), + value : value }; }; - /***/ }), -/* 83 */ +/* 87 */ /***/ (function(module, exports) { var toString = {}.toString; -module.exports = function (it) { +module.exports = function(it){ return toString.call(it).slice(8, -1); }; - /***/ }), -/* 84 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) -var defined = __webpack_require__(133); -module.exports = function (it) { +var defined = __webpack_require__(139); +module.exports = function(it){ return Object(defined(it)); }; - /***/ }), -/* 85 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - -/** - * WARNING: DO NOT manually require this module. - * This is a replacement for `invariant(...)` used by the error code system - * and will _only_ be required by the corresponding babel pass. - * It always throws. - */ - -function reactProdInvariant(code) { - var argCount = arguments.length - 1; - - var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; - - for (var argIdx = 0; argIdx < argCount; argIdx++) { - message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); - } - - message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; - - var error = new Error(message); - error.name = 'Invariant Violation'; - error.framesToPop = 1; // we don't care about reactProdInvariant's own frame - - throw error; -} - -module.exports = reactProdInvariant; - -/***/ }), -/* 86 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6303,6 +6425,7 @@ module.exports = reactProdInvariant; // TODO: Replace this with ES6: var ReactInstanceMap = new Map(); var ReactInstanceMap = { + /** * This API should be called `delete` but we'd have to make sure to always * transform these to strings for IE support. When this transform is fully @@ -6323,12 +6446,13 @@ var ReactInstanceMap = { set: function (key, value) { key._reactInternalInstance = value; } + }; module.exports = ReactInstanceMap; /***/ }), -/* 87 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6401,7 +6525,7 @@ function shallowEqual(objA, objB) { module.exports = shallowEqual; /***/ }), -/* 88 */ +/* 91 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -6411,42 +6535,39 @@ module.exports = shallowEqual; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return components; }); /* unused harmony export route */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return routes; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); + + +var func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + object = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object, + arrayOf = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].arrayOf, + oneOfType = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType, + element = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].element, + shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape, + string = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string; function falsy(props, propName, componentName) { if (props[propName]) return new Error('<' + componentName + '> should not have a "' + propName + '" prop'); } -var history = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["shape"])({ - listen: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, - push: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, - replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, - go: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, - goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, - goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired +var history = shape({ + listen: func.isRequired, + push: func.isRequired, + replace: func.isRequired, + go: func.isRequired, + goBack: func.isRequired, + goForward: func.isRequired }); -var component = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["oneOfType"])([__WEBPACK_IMPORTED_MODULE_0_prop_types__["func"], __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"]]); -var components = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["oneOfType"])([component, __WEBPACK_IMPORTED_MODULE_0_prop_types__["object"]]); -var route = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["oneOfType"])([__WEBPACK_IMPORTED_MODULE_0_prop_types__["object"], __WEBPACK_IMPORTED_MODULE_0_prop_types__["element"]]); -var routes = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["oneOfType"])([route, Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["arrayOf"])(route)]); +var component = oneOfType([func, string]); +var components = oneOfType([component, object]); +var route = oneOfType([object, element]); +var routes = oneOfType([route, arrayOf(route)]); /***/ }), -/* 89 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = formatName; -function formatName(context, name) { - var sectionPrefix = context._reduxForm.sectionPrefix; - - return !sectionPrefix ? name : sectionPrefix + "." + name; -} - -/***/ }), -/* 90 */ +/* 92 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -6490,11 +6611,11 @@ function eq(value, other) { /***/ }), -/* 91 */ +/* 93 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(115); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(118); /** Used as references for various `Number` constants. */ @@ -6508,7 +6629,7 @@ var INFINITY = 1 / 0; * @returns {string|symbol} Returns the key. */ function toKey(value) { - if (typeof value == 'string' || Object(__WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */])(value)) { + if (typeof value == 'string' || __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */](value)) { return value; } var result = (value + ''); @@ -6519,58 +6640,57 @@ function toKey(value) { /***/ }), -/* 92 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +var $at = __webpack_require__(643)(true); -exports.__esModule = true; - -var _iterator = __webpack_require__(664); - -var _iterator2 = _interopRequireDefault(_iterator); - -var _symbol = __webpack_require__(672); +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(297)(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; +}); -var _symbol2 = _interopRequireDefault(_symbol); +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { -var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; +"use strict"; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { - return typeof obj === "undefined" ? "undefined" : _typeof(obj); -} : function (obj) { - return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); -}; +exports.__esModule = true; -/***/ }), -/* 93 */ -/***/ (function(module, exports, __webpack_require__) { +var _from = __webpack_require__(306); -"use strict"; +var _from2 = _interopRequireDefault(_from); -var $at = __webpack_require__(666)(true); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -// 21.1.3.27 String.prototype[@@iterator]() -__webpack_require__(295)(String, 'String', function (iterated) { - this._t = String(iterated); // target - this._i = 0; // next index -// 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function () { - var O = this._t; - var index = this._i; - var point; - if (index >= O.length) return { value: undefined, done: true }; - point = $at(O, index); - this._i += point.length; - return { value: point, done: false }; -}); +exports.default = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + return arr2; + } else { + return (0, _from2.default)(arr); + } +}; /***/ }), -/* 94 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6586,7 +6706,7 @@ exports.default = { }; /***/ }), -/* 95 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6597,16 +6717,16 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _IconButton = __webpack_require__(737); +var _MenuItem = __webpack_require__(326); -var _IconButton2 = _interopRequireDefault(_IconButton); +var _MenuItem2 = _interopRequireDefault(_MenuItem); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = _IconButton2.default; +exports.default = _MenuItem2.default; /***/ }), -/* 96 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6615,12 +6735,58 @@ exports.default = _IconButton2.default; Object.defineProperty(exports, "__esModule", { value: true }); -var MENU_OPTIONS = exports.MENU_OPTIONS = 'Options'; -var MENU_BILLING = exports.MENU_BILLING = 'Billing'; -var MENU_SIZES = exports.MENU_SIZES = 'Sizes'; +exports.Toggle = exports.TextField = exports.Slider = exports.SelectField = exports.RadioButtonGroup = exports.TimePicker = exports.DatePicker = exports.Checkbox = exports.AutoComplete = undefined; + +var _AutoComplete = __webpack_require__(757); + +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); + +var _Checkbox = __webpack_require__(764); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +var _DatePicker = __webpack_require__(768); + +var _DatePicker2 = _interopRequireDefault(_DatePicker); + +var _RadioButtonGroup = __webpack_require__(786); + +var _RadioButtonGroup2 = _interopRequireDefault(_RadioButtonGroup); + +var _SelectField = __webpack_require__(791); + +var _SelectField2 = _interopRequireDefault(_SelectField); + +var _Slider = __webpack_require__(799); + +var _Slider2 = _interopRequireDefault(_Slider); + +var _TextField = __webpack_require__(804); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _TimePicker = __webpack_require__(805); + +var _TimePicker2 = _interopRequireDefault(_TimePicker); + +var _Toggle = __webpack_require__(818); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.AutoComplete = _AutoComplete2.default; +exports.Checkbox = _Checkbox2.default; +exports.DatePicker = _DatePicker2.default; +exports.TimePicker = _TimePicker2.default; +exports.RadioButtonGroup = _RadioButtonGroup2.default; +exports.SelectField = _SelectField2.default; +exports.Slider = _Slider2.default; +exports.TextField = _TextField2.default; +exports.Toggle = _Toggle2.default; /***/ }), -/* 97 */ +/* 99 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6631,7 +6797,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _TextField = __webpack_require__(780); +var _TextField = __webpack_require__(759); var _TextField2 = _interopRequireDefault(_TextField); @@ -6640,7 +6806,27 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.default = _TextField2.default; /***/ }), -/* 98 */ +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _FlatButton = __webpack_require__(774); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _FlatButton2.default; + +/***/ }), +/* 101 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6741,35 +6927,114 @@ function isInner(props) { } /***/ }), -/* 99 */ -/***/ (function(module, exports) { +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.email = email; +exports.required = required; +exports.notEmpty = notEmpty; +exports.simpleText = simpleText; +exports.number = number; +exports.minValue = minValue; +exports.maxValue = maxValue; +exports.fullName = fullName; +exports.unique = unique; +exports.date = date; +exports.time24 = time24; + +var _Helpers = __webpack_require__(338); + +var Helpers = _interopRequireWildcard(_Helpers); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function email(input) { + var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return re.test(input) ? undefined : 'Please enter a valid email'; +} + +function required(value) { + var empty = typeof value !== 'number' && !value; + return empty ? 'Required field' : undefined; +} + +function notEmpty(arr) { + if (!Array.isArray(arr) || !arr.length) { + return 'This field must not be empty'; + } +} + +function simpleText(value) { + return value && !value.match(/^[0-9a-zA-Z_]{1,64}$/) ? 'Only use characters (a-z, A-Z, 0-9, _)' : undefined; +} + +function number(value) { + return value && (isNaN(Number(value)) || +value < 0) ? 'This field must be a positive number' : undefined; +} + +function minValue(min) { + return function (value) { + return value && value < min ? 'The value must be greater than ' + min : undefined; + }; +} + +function maxValue(max) { + return function (value) { + return value && value > max ? 'The value must be less than ' + max : undefined; + }; +} + +function fullName(value) { + return !value || value.split(' ').filter(function (x) { + return x !== ""; + }).length < 2 ? 'Please enter a valid full name (firstname + lastname)' : undefined; +} + +function unique(candidates) { + return function (value) { + if (candidates.indexOf(value) !== -1) { + return 'This value already exists and must be unique'; + } + return undefined; + }; +} +function date(val) { + var d = new Date(val); + return isNaN(d.getTime()) ? 'Required date' : undefined; +} + +function time24(val) { + var msg = 'Invalid time'; + if (!Helpers.setTimeForToday(val)) { + return msg; + } +} /***/ }), -/* 100 */ +/* 103 */ /***/ (function(module, exports) { -var id = 0; -var px = Math.random(); -module.exports = function (key) { +var id = 0 + , px = Math.random(); +module.exports = function(key){ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; - /***/ }), -/* 101 */ +/* 104 */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; - /***/ }), -/* 102 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6794,7 +7059,7 @@ if (false) { module.exports = emptyObject; /***/ }), -/* 103 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6810,12 +7075,12 @@ module.exports = emptyObject; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); -var ReactErrorUtils = __webpack_require__(141); +var ReactErrorUtils = __webpack_require__(147); var invariant = __webpack_require__(9); -var warning = __webpack_require__(12); +var warning = __webpack_require__(11); /** * Injected dependencies: @@ -7025,7 +7290,7 @@ var EventPluginUtils = { module.exports = EventPluginUtils; /***/ }), -/* 104 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7042,7 +7307,7 @@ module.exports = EventPluginUtils; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); var invariant = __webpack_require__(9); @@ -7139,8 +7404,6 @@ var TransactionImpl = { return !!this._isInTransaction; }, - /* eslint-disable space-before-function-paren */ - /** * Executes the function within a safety window. Use this for the top level * methods that result in large amounts of computation/mutations that would @@ -7159,7 +7422,6 @@ var TransactionImpl = { * @return {*} Return value from `method`. */ perform: function (method, scope, a, b, c, d, e, f) { - /* eslint-enable space-before-function-paren */ !!this.isInTransaction() ? false ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0; var errorThrown; var ret; @@ -7258,7 +7520,7 @@ var TransactionImpl = { module.exports = TransactionImpl; /***/ }), -/* 105 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7274,10 +7536,10 @@ module.exports = TransactionImpl; -var SyntheticUIEvent = __webpack_require__(71); -var ViewportMetrics = __webpack_require__(144); +var SyntheticUIEvent = __webpack_require__(76); +var ViewportMetrics = __webpack_require__(150); -var getEventModifierState = __webpack_require__(145); +var getEventModifierState = __webpack_require__(151); /** * @interface MouseEvent @@ -7335,7 +7597,7 @@ SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); module.exports = SyntheticMouseEvent; /***/ }), -/* 106 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7351,13 +7613,13 @@ module.exports = SyntheticMouseEvent; -var ExecutionEnvironment = __webpack_require__(21); -var DOMNamespaces = __webpack_require__(147); +var ExecutionEnvironment = __webpack_require__(23); +var DOMNamespaces = __webpack_require__(153); var WHITESPACE_TEST = /^[ \r\n\t\f]/; var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; -var createMicrosoftUnsafeLocalFunction = __webpack_require__(148); +var createMicrosoftUnsafeLocalFunction = __webpack_require__(154); // SVG temp container for IE lacking innerHTML var reusableSVGContainer; @@ -7417,7 +7679,7 @@ if (ExecutionEnvironment.canUseDOM) { // in hopes that this is preserved even if "\uFEFF" is transformed to // the actual Unicode character (by Babel, for example). // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 - node.innerHTML = String.fromCharCode(0xfeff) + html; + node.innerHTML = String.fromCharCode(0xFEFF) + html; // deleteData leaves an empty `TextNode` which offsets the index of all // children. Definitely want to avoid this. @@ -7438,7 +7700,7 @@ if (ExecutionEnvironment.canUseDOM) { module.exports = setInnerHTML; /***/ }), -/* 107 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7546,6 +7808,7 @@ function escapeHtml(string) { } // end code copied and modified from escape-html + /** * Escapes text to prevent scripting attacks. * @@ -7565,7 +7828,7 @@ function escapeTextContentForBrowser(text) { module.exports = escapeTextContentForBrowser; /***/ }), -/* 108 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7581,14 +7844,14 @@ module.exports = escapeTextContentForBrowser; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var EventPluginRegistry = __webpack_require__(140); -var ReactEventEmitterMixin = __webpack_require__(383); -var ViewportMetrics = __webpack_require__(144); +var EventPluginRegistry = __webpack_require__(146); +var ReactEventEmitterMixin = __webpack_require__(392); +var ViewportMetrics = __webpack_require__(150); -var getVendorPrefixedEventName = __webpack_require__(384); -var isEventSupported = __webpack_require__(143); +var getVendorPrefixedEventName = __webpack_require__(393); +var isEventSupported = __webpack_require__(149); /** * Summary of `ReactBrowserEventEmitter` event handling: @@ -7746,6 +8009,7 @@ function getListeningForDocument(mountAt) { * @internal */ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { + /** * Injectable event backend */ @@ -7819,12 +8083,14 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt); } } else if (dependency === 'topScroll') { + if (isEventSupported('scroll', true)) { ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt); } else { ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); } } else if (dependency === 'topFocus' || dependency === 'topBlur') { + if (isEventSupported('focus', true)) { ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt); ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt); @@ -7889,12 +8155,199 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { isMonitoringScrollValue = true; } } + }); module.exports = ReactBrowserEventEmitter; /***/ }), -/* 109 */ +/* 112 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 113 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7922,7 +8375,7 @@ var REPLACE = exports.REPLACE = 'REPLACE'; var POP = exports.POP = 'POP'; /***/ }), -/* 110 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7967,27 +8420,18 @@ var supportsPopstateOnHashchange = exports.supportsPopstateOnHashchange = functi return window.navigator.userAgent.indexOf('Trident') === -1; }; -/** - * Returns true if a given popstate event is an extraneous WebKit event. - * Accounts for the fact that Chrome on iOS fires real popstate events - * containing undefined state when pressing the back button. - */ -var isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) { - return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; -}; - /***/ }), -/* 111 */ +/* 115 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(252); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(460); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(461); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(462); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(258); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(257); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(258); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(468); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(469); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(470); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(264); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(263); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; }); @@ -8013,11 +8457,11 @@ if (false) { /***/ }), -/* 112 */ +/* 116 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29); /** Built-in value references. */ @@ -8027,183 +8471,17 @@ var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; /***/ }), -/* 113 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionTypes", function() { return actionTypes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actions", function() { return actions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmitErrors", function() { return clearSubmitErrors; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actions__ = __webpack_require__(265); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__actionTypes__ = __webpack_require__(167); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultShouldAsyncValidate__ = __webpack_require__(266); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultShouldAsyncValidate", function() { return __WEBPACK_IMPORTED_MODULE_2__defaultShouldAsyncValidate__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultShouldValidate__ = __webpack_require__(267); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultShouldValidate", function() { return __WEBPACK_IMPORTED_MODULE_3__defaultShouldValidate__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Form__ = __webpack_require__(490); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return __WEBPACK_IMPORTED_MODULE_4__Form__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__FormSection__ = __webpack_require__(491); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FormSection", function() { return __WEBPACK_IMPORTED_MODULE_5__FormSection__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__SubmissionError__ = __webpack_require__(268); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SubmissionError", function() { return __WEBPACK_IMPORTED_MODULE_6__SubmissionError__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__propTypes__ = __webpack_require__(493); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fieldInputPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["b"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fieldMetaPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["c"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fieldPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["d"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["e"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Field__ = __webpack_require__(494); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Field", function() { return __WEBPACK_IMPORTED_MODULE_8__Field__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Fields__ = __webpack_require__(564); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Fields", function() { return __WEBPACK_IMPORTED_MODULE_9__Fields__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__FieldArray__ = __webpack_require__(567); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FieldArray", function() { return __WEBPACK_IMPORTED_MODULE_10__FieldArray__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__formValueSelector__ = __webpack_require__(585); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formValueSelector", function() { return __WEBPACK_IMPORTED_MODULE_11__formValueSelector__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__formValues__ = __webpack_require__(587); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formValues", function() { return __WEBPACK_IMPORTED_MODULE_12__formValues__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__getFormNames__ = __webpack_require__(589); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormNames", function() { return __WEBPACK_IMPORTED_MODULE_13__getFormNames__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__getFormValues__ = __webpack_require__(591); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormValues", function() { return __WEBPACK_IMPORTED_MODULE_14__getFormValues__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__getFormInitialValues__ = __webpack_require__(593); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormInitialValues", function() { return __WEBPACK_IMPORTED_MODULE_15__getFormInitialValues__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__getFormSyncErrors__ = __webpack_require__(595); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncErrors", function() { return __WEBPACK_IMPORTED_MODULE_16__getFormSyncErrors__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__getFormMeta__ = __webpack_require__(597); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormMeta", function() { return __WEBPACK_IMPORTED_MODULE_17__getFormMeta__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__getFormAsyncErrors__ = __webpack_require__(599); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormAsyncErrors", function() { return __WEBPACK_IMPORTED_MODULE_18__getFormAsyncErrors__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__getFormSyncWarnings__ = __webpack_require__(601); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncWarnings", function() { return __WEBPACK_IMPORTED_MODULE_19__getFormSyncWarnings__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__getFormSubmitErrors__ = __webpack_require__(603); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSubmitErrors", function() { return __WEBPACK_IMPORTED_MODULE_20__getFormSubmitErrors__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__isDirty__ = __webpack_require__(605); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isDirty", function() { return __WEBPACK_IMPORTED_MODULE_21__isDirty__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__isInvalid__ = __webpack_require__(607); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isInvalid", function() { return __WEBPACK_IMPORTED_MODULE_22__isInvalid__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__isPristine__ = __webpack_require__(610); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isPristine", function() { return __WEBPACK_IMPORTED_MODULE_23__isPristine__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__isValid__ = __webpack_require__(611); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isValid", function() { return __WEBPACK_IMPORTED_MODULE_24__isValid__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__isSubmitting__ = __webpack_require__(612); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isSubmitting", function() { return __WEBPACK_IMPORTED_MODULE_25__isSubmitting__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__hasSubmitSucceeded__ = __webpack_require__(614); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitSucceeded", function() { return __WEBPACK_IMPORTED_MODULE_26__hasSubmitSucceeded__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__hasSubmitFailed__ = __webpack_require__(616); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitFailed", function() { return __WEBPACK_IMPORTED_MODULE_27__hasSubmitFailed__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__reduxForm__ = __webpack_require__(618); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reduxForm", function() { return __WEBPACK_IMPORTED_MODULE_28__reduxForm__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__reducer__ = __webpack_require__(648); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return __WEBPACK_IMPORTED_MODULE_29__reducer__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__values__ = __webpack_require__(651); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return __WEBPACK_IMPORTED_MODULE_30__values__["a"]; }); - - - - - - - -// alias for propTypes - - - - - - - - - - - - - - - - - - - - - - - - -var actionTypes = __WEBPACK_IMPORTED_MODULE_1__actionTypes__; -var actions = __WEBPACK_IMPORTED_MODULE_0__actions__; -var arrayInsert = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayInsert"], - arrayMove = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayMove"], - arrayPop = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayPop"], - arrayPush = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayPush"], - arrayRemove = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayRemove"], - arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayRemoveAll"], - arrayShift = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayShift"], - arraySplice = __WEBPACK_IMPORTED_MODULE_0__actions__["arraySplice"], - arraySwap = __WEBPACK_IMPORTED_MODULE_0__actions__["arraySwap"], - arrayUnshift = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayUnshift"], - autofill = __WEBPACK_IMPORTED_MODULE_0__actions__["autofill"], - blur = __WEBPACK_IMPORTED_MODULE_0__actions__["blur"], - change = __WEBPACK_IMPORTED_MODULE_0__actions__["change"], - clearSubmitErrors = __WEBPACK_IMPORTED_MODULE_0__actions__["clearSubmitErrors"], - destroy = __WEBPACK_IMPORTED_MODULE_0__actions__["destroy"], - focus = __WEBPACK_IMPORTED_MODULE_0__actions__["focus"], - initialize = __WEBPACK_IMPORTED_MODULE_0__actions__["initialize"], - registerField = __WEBPACK_IMPORTED_MODULE_0__actions__["registerField"], - reset = __WEBPACK_IMPORTED_MODULE_0__actions__["reset"], - setSubmitFailed = __WEBPACK_IMPORTED_MODULE_0__actions__["setSubmitFailed"], - setSubmitSucceeded = __WEBPACK_IMPORTED_MODULE_0__actions__["setSubmitSucceeded"], - startAsyncValidation = __WEBPACK_IMPORTED_MODULE_0__actions__["startAsyncValidation"], - startSubmit = __WEBPACK_IMPORTED_MODULE_0__actions__["startSubmit"], - stopAsyncValidation = __WEBPACK_IMPORTED_MODULE_0__actions__["stopAsyncValidation"], - stopSubmit = __WEBPACK_IMPORTED_MODULE_0__actions__["stopSubmit"], - submit = __WEBPACK_IMPORTED_MODULE_0__actions__["submit"], - touch = __WEBPACK_IMPORTED_MODULE_0__actions__["touch"], - unregisterField = __WEBPACK_IMPORTED_MODULE_0__actions__["unregisterField"], - untouch = __WEBPACK_IMPORTED_MODULE_0__actions__["untouch"]; - - -/***/ }), -/* 114 */ +/* 117 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(272); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyArray_js__ = __webpack_require__(273); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(115); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringToPath_js__ = __webpack_require__(274); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(91); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toString_js__ = __webpack_require__(276); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(271); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyArray_js__ = __webpack_require__(272); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(118); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringToPath_js__ = __webpack_require__(273); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(93); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toString_js__ = __webpack_require__(275); @@ -8230,22 +8508,22 @@ var arrayInsert = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayInsert"], * // => ['a', '0', 'b', 'c'] */ function toPath(value) { - if (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value)) { - return Object(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(value, __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */]); + if (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value)) { + return __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */](value, __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */]); } - return Object(__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */])(value) ? [value] : Object(__WEBPACK_IMPORTED_MODULE_1__copyArray_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_4__stringToPath_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_6__toString_js__["a" /* default */])(value))); + return __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */](value) ? [value] : __WEBPACK_IMPORTED_MODULE_1__copyArray_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_4__stringToPath_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_6__toString_js__["a" /* default */](value))); } /* harmony default export */ __webpack_exports__["a"] = (toPath); /***/ }), -/* 115 */ +/* 118 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(81); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59); @@ -8271,36 +8549,36 @@ var symbolTag = '[object Symbol]'; */ function isSymbol(value) { return typeof value == 'symbol' || - (Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == symbolTag); + (__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) == symbolTag); } /* harmony default export */ __webpack_exports__["a"] = (isSymbol); /***/ }), -/* 116 */ +/* 119 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); /* Built-in method references that are verified to be native. */ -var nativeCreate = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(Object, 'create'); +var nativeCreate = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](Object, 'create'); /* harmony default export */ __webpack_exports__["a"] = (nativeCreate); /***/ }), -/* 117 */ +/* 120 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__ = __webpack_require__(515); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__ = __webpack_require__(516); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__ = __webpack_require__(517); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__ = __webpack_require__(518); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__ = __webpack_require__(519); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__ = __webpack_require__(514); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__ = __webpack_require__(515); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__ = __webpack_require__(516); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__ = __webpack_require__(517); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__ = __webpack_require__(518); @@ -8336,11 +8614,11 @@ ListCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__["a" /* /***/ }), -/* 118 */ +/* 121 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(90); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(92); /** @@ -8354,7 +8632,7 @@ ListCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__["a" /* function assocIndexOf(array, key) { var length = array.length; while (length--) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */])(array[length][0], key)) { + if (__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */](array[length][0], key)) { return length; } } @@ -8365,11 +8643,11 @@ function assocIndexOf(array, key) { /***/ }), -/* 119 */ +/* 122 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__ = __webpack_require__(521); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__ = __webpack_require__(520); /** @@ -8382,7 +8660,7 @@ function assocIndexOf(array, key) { */ function getMapData(map, key) { var data = map.__data__; - return Object(__WEBPACK_IMPORTED_MODULE_0__isKeyable_js__["a" /* default */])(key) + return __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__["a" /* default */](key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } @@ -8391,12 +8669,45 @@ function getMapData(map, key) { /***/ }), -/* 120 */ +/* 123 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(169); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(179); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__(277); + + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */]) { + __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */](object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +/* harmony default export */ __webpack_exports__["a"] = (baseAssignValue); + + +/***/ }), +/* 124 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(182); @@ -8426,92 +8737,62 @@ function getMapData(map, key) { * // => false */ function isArrayLike(value) { - return value != null && Object(__WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */])(value.length) && !Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(value); + return value != null && __WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */](value.length) && !__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */](value); } /* harmony default export */ __webpack_exports__["a"] = (isArrayLike); /***/ }), -/* 121 */ +/* 125 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__(283); - +/* harmony export (immutable) */ __webpack_exports__["a"] = formatName; +function formatName(context, name) { + var sectionPrefix = context._reduxForm.sectionPrefix; -/** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */]) { - Object(__WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */])(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } + return !sectionPrefix ? name : sectionPrefix + "." + name; } -/* harmony default export */ __webpack_exports__["a"] = (baseAssignValue); - - /***/ }), -/* 122 */ +/* 126 */ /***/ (function(module, exports) { module.exports = true; - /***/ }), -/* 123 */ +/* 127 */ /***/ (function(module, exports, __webpack_require__) { -var def = __webpack_require__(35).f; -var has = __webpack_require__(51); -var TAG = __webpack_require__(22)('toStringTag'); +var def = __webpack_require__(34).f + , has = __webpack_require__(54) + , TAG = __webpack_require__(24)('toStringTag'); -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); }; - /***/ }), -/* 124 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(669); -var global = __webpack_require__(23); -var hide = __webpack_require__(50); -var Iterators = __webpack_require__(78); -var TO_STRING_TAG = __webpack_require__(22)('toStringTag'); +__webpack_require__(646); +var global = __webpack_require__(25) + , hide = __webpack_require__(53) + , Iterators = __webpack_require__(83) + , TO_STRING_TAG = __webpack_require__(24)('toStringTag'); -var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + - 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + - 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + - 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + - 'TextTrackList,TouchList').split(','); - -for (var i = 0; i < DOMIterables.length; i++) { - var NAME = DOMIterables[i]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); +for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype; + if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } - /***/ }), -/* 125 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8521,47 +8802,47 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _toConsumableArray2 = __webpack_require__(189); +var _toConsumableArray2 = __webpack_require__(95); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); exports.default = getMuiTheme; -var _lodash = __webpack_require__(692); +var _lodash = __webpack_require__(676); var _lodash2 = _interopRequireDefault(_lodash); -var _colorManipulator = __webpack_require__(56); +var _colorManipulator = __webpack_require__(50); -var _lightBaseTheme = __webpack_require__(306); +var _lightBaseTheme = __webpack_require__(310); var _lightBaseTheme2 = _interopRequireDefault(_lightBaseTheme); -var _zIndex = __webpack_require__(307); +var _zIndex = __webpack_require__(311); var _zIndex2 = _interopRequireDefault(_zIndex); -var _autoprefixer = __webpack_require__(693); +var _autoprefixer = __webpack_require__(677); var _autoprefixer2 = _interopRequireDefault(_autoprefixer); -var _callOnce = __webpack_require__(722); +var _callOnce = __webpack_require__(706); var _callOnce2 = _interopRequireDefault(_callOnce); -var _rtl = __webpack_require__(723); +var _rtl = __webpack_require__(707); var _rtl2 = _interopRequireDefault(_rtl); -var _compose = __webpack_require__(726); +var _compose = __webpack_require__(710); var _compose2 = _interopRequireDefault(_compose); -var _typography = __webpack_require__(311); +var _typography = __webpack_require__(315); var _typography2 = _interopRequireDefault(_typography); -var _colors = __webpack_require__(57); +var _colors = __webpack_require__(31); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -8896,7 +9177,7 @@ function getMuiTheme(muiTheme) { } /***/ }), -/* 126 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8922,7 +9203,7 @@ exports.default = function (property, value) { module.exports = exports['default']; /***/ }), -/* 127 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8938,7 +9219,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactAddonsCreateFragment = __webpack_require__(730); +var _reactAddonsCreateFragment = __webpack_require__(714); var _reactAddonsCreateFragment2 = _interopRequireDefault(_reactAddonsCreateFragment); @@ -8980,46 +9261,13 @@ function extendChildren(children, extendedProps, extendedChildren) { } /***/ }), -/* 128 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - - -module.exports = __webpack_require__(732); - - -/***/ }), -/* 129 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; - -var _MenuItem = __webpack_require__(321); - -var _MenuItem2 = _interopRequireDefault(_MenuItem); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _MenuItem2.default; +module.exports = __webpack_require__(717); /***/ }), -/* 130 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9065,35 +9313,35 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); +var _reactDom = __webpack_require__(16); var _reactDom2 = _interopRequireDefault(_reactDom); -var _reactEventListener = __webpack_require__(42); +var _reactEventListener = __webpack_require__(40); var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -var _RenderToLayer = __webpack_require__(322); +var _RenderToLayer = __webpack_require__(327); var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer); -var _propTypes = __webpack_require__(41); +var _propTypes = __webpack_require__(39); var _propTypes2 = _interopRequireDefault(_propTypes); -var _Paper = __webpack_require__(34); +var _Paper = __webpack_require__(32); var _Paper2 = _interopRequireDefault(_Paper); -var _lodash = __webpack_require__(771); +var _lodash = __webpack_require__(751); var _lodash2 = _interopRequireDefault(_lodash); -var _PopoverAnimationDefault = __webpack_require__(772); +var _PopoverAnimationDefault = __webpack_require__(752); var _PopoverAnimationDefault2 = _interopRequireDefault(_PopoverAnimationDefault); -var _iOSHelpers = __webpack_require__(773); +var _iOSHelpers = __webpack_require__(753); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -9533,96 +9781,138 @@ Popover.contextTypes = { exports.default = Popover; /***/ }), -/* 131 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(62); -var document = __webpack_require__(23).document; -// typeof document.createElement is 'object' in old IE -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { - return is ? document.createElement(it) : {}; +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Dialog = __webpack_require__(785); + +var _Dialog2 = _interopRequireDefault(_Dialog); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Dialog2.default; + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Toggle = __webpack_require__(819); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Toggle2.default; + +/***/ }), +/* 136 */ +/***/ (function(module, exports) { + +module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; }; +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(68) + , document = __webpack_require__(25).document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); +module.exports = function(it){ + return is ? document.createElement(it) : {}; +}; /***/ }), -/* 132 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(62); +var isObject = __webpack_require__(68); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; +module.exports = function(it, S){ + if(!isObject(it))return it; var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; throw TypeError("Can't convert object to primitive value"); }; - /***/ }), -/* 133 */ +/* 139 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); +module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); return it; }; - /***/ }), -/* 134 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength -var toInteger = __webpack_require__(135); -var min = Math.min; -module.exports = function (it) { +var toInteger = __webpack_require__(141) + , min = Math.min; +module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; - /***/ }), -/* 135 */ +/* 141 */ /***/ (function(module, exports) { // 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { +var ceil = Math.ceil + , floor = Math.floor; +module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; - /***/ }), -/* 136 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { -var shared = __webpack_require__(137)('keys'); -var uid = __webpack_require__(100); -module.exports = function (key) { +var shared = __webpack_require__(143)('keys') + , uid = __webpack_require__(103); +module.exports = function(key){ return shared[key] || (shared[key] = uid(key)); }; - /***/ }), -/* 137 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { -var global = __webpack_require__(23); -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); -module.exports = function (key) { +var global = __webpack_require__(25) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); +module.exports = function(key){ return store[key] || (store[key] = {}); }; - /***/ }), -/* 138 */ +/* 144 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys @@ -9630,16 +9920,14 @@ module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); - /***/ }), -/* 139 */ +/* 145 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; - /***/ }), -/* 140 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9656,7 +9944,7 @@ exports.f = Object.getOwnPropertySymbols; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); var invariant = __webpack_require__(9); @@ -9753,6 +10041,7 @@ function publishRegistrationName(registrationName, pluginModule, eventName) { * @see {EventPluginHub} */ var EventPluginRegistry = { + /** * Ordered list of injected plugins. */ @@ -9892,12 +10181,13 @@ var EventPluginRegistry = { } } } + }; module.exports = EventPluginRegistry; /***/ }), -/* 141 */ +/* 147 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9968,6 +10258,7 @@ if (false) { var evtType = 'react-' + name; fakeNode.addEventListener(evtType, boundFunc, false); var evt = document.createEvent('Event'); + // $FlowFixMe https://github.com/facebook/flow/issues/2336 evt.initEvent(evtType, false, false); fakeNode.dispatchEvent(evt); fakeNode.removeEventListener(evtType, boundFunc, false); @@ -9978,7 +10269,7 @@ if (false) { module.exports = ReactErrorUtils; /***/ }), -/* 142 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10018,7 +10309,7 @@ function getEventTarget(nativeEvent) { module.exports = getEventTarget; /***/ }), -/* 143 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10034,7 +10325,7 @@ module.exports = getEventTarget; -var ExecutionEnvironment = __webpack_require__(21); +var ExecutionEnvironment = __webpack_require__(23); var useHasFeature; if (ExecutionEnvironment.canUseDOM) { @@ -10083,7 +10374,7 @@ function isEventSupported(eventNameSuffix, capture) { module.exports = isEventSupported; /***/ }), -/* 144 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10100,6 +10391,7 @@ module.exports = isEventSupported; var ViewportMetrics = { + currentScrollLeft: 0, currentScrollTop: 0, @@ -10108,12 +10400,13 @@ var ViewportMetrics = { ViewportMetrics.currentScrollLeft = scrollPosition.x; ViewportMetrics.currentScrollTop = scrollPosition.y; } + }; module.exports = ViewportMetrics; /***/ }), -/* 145 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10135,10 +10428,10 @@ module.exports = ViewportMetrics; */ var modifierKeyToProp = { - Alt: 'altKey', - Control: 'ctrlKey', - Meta: 'metaKey', - Shift: 'shiftKey' + 'Alt': 'altKey', + 'Control': 'ctrlKey', + 'Meta': 'metaKey', + 'Shift': 'shiftKey' }; // IE8 does not implement getModifierState so we simply map it to the only @@ -10161,7 +10454,7 @@ function getEventModifierState(nativeEvent) { module.exports = getEventModifierState; /***/ }), -/* 146 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10177,14 +10470,14 @@ module.exports = getEventModifierState; -var DOMLazyTree = __webpack_require__(72); -var Danger = __webpack_require__(368); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactInstrumentation = __webpack_require__(29); +var DOMLazyTree = __webpack_require__(77); +var Danger = __webpack_require__(377); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactInstrumentation = __webpack_require__(27); -var createMicrosoftUnsafeLocalFunction = __webpack_require__(148); -var setInnerHTML = __webpack_require__(106); -var setTextContent = __webpack_require__(224); +var createMicrosoftUnsafeLocalFunction = __webpack_require__(154); +var setInnerHTML = __webpack_require__(109); +var setTextContent = __webpack_require__(232); function getNodeAfter(parentNode, node) { // Special case for text components, which return [open, close] comments @@ -10312,6 +10605,7 @@ if (false) { * Operations for updating with DOM children. */ var DOMChildrenOperations = { + dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup, replaceDelimitedText: replaceDelimitedText, @@ -10337,10 +10631,7 @@ var DOMChildrenOperations = { ReactInstrumentation.debugTool.onHostOperation({ instanceID: parentNodeDebugID, type: 'insert child', - payload: { - toIndex: update.toIndex, - content: update.content.toString() - } + payload: { toIndex: update.toIndex, content: update.content.toString() } }); } break; @@ -10387,12 +10678,13 @@ var DOMChildrenOperations = { } } } + }; module.exports = DOMChildrenOperations; /***/ }), -/* 147 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10417,7 +10709,7 @@ var DOMNamespaces = { module.exports = DOMNamespaces; /***/ }), -/* 148 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10454,7 +10746,7 @@ var createMicrosoftUnsafeLocalFunction = function (func) { module.exports = createMicrosoftUnsafeLocalFunction; /***/ }), -/* 149 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10470,25 +10762,22 @@ module.exports = createMicrosoftUnsafeLocalFunction; -var _prodInvariant = __webpack_require__(13); - -var ReactPropTypesSecret = __webpack_require__(386); -var propTypesFactory = __webpack_require__(213); +var _prodInvariant = __webpack_require__(12); -var React = __webpack_require__(65); -var PropTypes = propTypesFactory(React.isValidElement); +var React = __webpack_require__(56); +var ReactPropTypesSecret = __webpack_require__(395); var invariant = __webpack_require__(9); -var warning = __webpack_require__(12); +var warning = __webpack_require__(11); var hasReadOnlyValue = { - button: true, - checkbox: true, - image: true, - hidden: true, - radio: true, - reset: true, - submit: true + 'button': true, + 'checkbox': true, + 'image': true, + 'hidden': true, + 'radio': true, + 'reset': true, + 'submit': true }; function _assertSingleLink(inputProps) { @@ -10517,7 +10806,7 @@ var propTypes = { } return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); }, - onChange: PropTypes.func + onChange: React.PropTypes.func }; var loggedTypeFailures = {}; @@ -10597,7 +10886,7 @@ var LinkedValueUtils = { module.exports = LinkedValueUtils; /***/ }), -/* 150 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10614,13 +10903,14 @@ module.exports = LinkedValueUtils; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); var invariant = __webpack_require__(9); var injected = false; var ReactComponentEnvironment = { + /** * Optionally injectable hook for swapping out mount images in the middle of * the tree. @@ -10641,12 +10931,13 @@ var ReactComponentEnvironment = { injected = true; } } + }; module.exports = ReactComponentEnvironment; /***/ }), -/* 151 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10693,7 +10984,7 @@ function shouldUpdateReactComponent(prevElement, nextElement) { module.exports = shouldUpdateReactComponent; /***/ }), -/* 152 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10757,7 +11048,391 @@ var KeyEscapeUtils = { module.exports = KeyEscapeUtils; /***/ }), -/* 153 */ +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(71); + +var ReactCurrentOwner = __webpack_require__(36); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); + +function isNative(fn) { + // Based on isNative() from Lodash + var funcToString = Function.prototype.toString; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var reIsNative = RegExp('^' + funcToString + // Take an example native function source for comparison + .call(hasOwnProperty + // Strip regex characters so we can use it for regex + ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&' + // Remove hasOwnProperty from the template to make it generic + ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + try { + var source = funcToString.call(fn); + return reIsNative.test(source); + } catch (err) { + return false; + } +} + +var canUseCollections = +// Array.from +typeof Array.from === 'function' && +// Map +typeof Map === 'function' && isNative(Map) && +// Map.prototype.keys +Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) && +// Set +typeof Set === 'function' && isNative(Set) && +// Set.prototype.keys +Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys); + +var setItem; +var getItem; +var removeItem; +var getItemIDs; +var addRoot; +var removeRoot; +var getRootIDs; + +if (canUseCollections) { + var itemMap = new Map(); + var rootIDSet = new Set(); + + setItem = function (id, item) { + itemMap.set(id, item); + }; + getItem = function (id) { + return itemMap.get(id); + }; + removeItem = function (id) { + itemMap['delete'](id); + }; + getItemIDs = function () { + return Array.from(itemMap.keys()); + }; + + addRoot = function (id) { + rootIDSet.add(id); + }; + removeRoot = function (id) { + rootIDSet['delete'](id); + }; + getRootIDs = function () { + return Array.from(rootIDSet.keys()); + }; +} else { + var itemByKey = {}; + var rootByKey = {}; + + // Use non-numeric keys to prevent V8 performance issues: + // https://github.com/facebook/react/pull/7232 + var getKeyFromID = function (id) { + return '.' + id; + }; + var getIDFromKey = function (key) { + return parseInt(key.substr(1), 10); + }; + + setItem = function (id, item) { + var key = getKeyFromID(id); + itemByKey[key] = item; + }; + getItem = function (id) { + var key = getKeyFromID(id); + return itemByKey[key]; + }; + removeItem = function (id) { + var key = getKeyFromID(id); + delete itemByKey[key]; + }; + getItemIDs = function () { + return Object.keys(itemByKey).map(getIDFromKey); + }; + + addRoot = function (id) { + var key = getKeyFromID(id); + rootByKey[key] = true; + }; + removeRoot = function (id) { + var key = getKeyFromID(id); + delete rootByKey[key]; + }; + getRootIDs = function () { + return Object.keys(rootByKey).map(getIDFromKey); + }; +} + +var unmountedIDs = []; + +function purgeDeep(id) { + var item = getItem(id); + if (item) { + var childIDs = item.childIDs; + + removeItem(id); + childIDs.forEach(purgeDeep); + } +} + +function describeComponentFrame(name, source, ownerName) { + return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); +} + +function getDisplayName(element) { + if (element == null) { + return '#empty'; + } else if (typeof element === 'string' || typeof element === 'number') { + return '#text'; + } else if (typeof element.type === 'string') { + return element.type; + } else { + return element.type.displayName || element.type.name || 'Unknown'; + } +} + +function describeID(id) { + var name = ReactComponentTreeHook.getDisplayName(id); + var element = ReactComponentTreeHook.getElement(id); + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var ownerName; + if (ownerID) { + ownerName = ReactComponentTreeHook.getDisplayName(ownerID); + } + false ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0; + return describeComponentFrame(name, element && element._source, ownerName); +} + +var ReactComponentTreeHook = { + onSetChildren: function (id, nextChildIDs) { + var item = getItem(id); + !item ? false ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; + item.childIDs = nextChildIDs; + + for (var i = 0; i < nextChildIDs.length; i++) { + var nextChildID = nextChildIDs[i]; + var nextChild = getItem(nextChildID); + !nextChild ? false ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0; + !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? false ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0; + !nextChild.isMounted ? false ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0; + if (nextChild.parentID == null) { + nextChild.parentID = id; + // TODO: This shouldn't be necessary but mounting a new root during in + // componentWillMount currently causes not-yet-mounted components to + // be purged from our tree data so their parent id is missing. + } + !(nextChild.parentID === id) ? false ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0; + } + }, + onBeforeMountComponent: function (id, element, parentID) { + var item = { + element: element, + parentID: parentID, + text: null, + childIDs: [], + isMounted: false, + updateCount: 0 + }; + setItem(id, item); + }, + onBeforeUpdateComponent: function (id, element) { + var item = getItem(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.element = element; + }, + onMountComponent: function (id) { + var item = getItem(id); + !item ? false ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; + item.isMounted = true; + var isRoot = item.parentID === 0; + if (isRoot) { + addRoot(id); + } + }, + onUpdateComponent: function (id) { + var item = getItem(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.updateCount++; + }, + onUnmountComponent: function (id) { + var item = getItem(id); + if (item) { + // We need to check if it exists. + // `item` might not exist if it is inside an error boundary, and a sibling + // error boundary child threw while mounting. Then this instance never + // got a chance to mount, but it still gets an unmounting event during + // the error boundary cleanup. + item.isMounted = false; + var isRoot = item.parentID === 0; + if (isRoot) { + removeRoot(id); + } + } + unmountedIDs.push(id); + }, + purgeUnmountedComponents: function () { + if (ReactComponentTreeHook._preventPurging) { + // Should only be used for testing. + return; + } + + for (var i = 0; i < unmountedIDs.length; i++) { + var id = unmountedIDs[i]; + purgeDeep(id); + } + unmountedIDs.length = 0; + }, + isMounted: function (id) { + var item = getItem(id); + return item ? item.isMounted : false; + }, + getCurrentStackAddendum: function (topElement) { + var info = ''; + if (topElement) { + var name = getDisplayName(topElement); + var owner = topElement._owner; + info += describeComponentFrame(name, topElement._source, owner && owner.getName()); + } + + var currentOwner = ReactCurrentOwner.current; + var id = currentOwner && currentOwner._debugID; + + info += ReactComponentTreeHook.getStackAddendumByID(id); + return info; + }, + getStackAddendumByID: function (id) { + var info = ''; + while (id) { + info += describeID(id); + id = ReactComponentTreeHook.getParentID(id); + } + return info; + }, + getChildIDs: function (id) { + var item = getItem(id); + return item ? item.childIDs : []; + }, + getDisplayName: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (!element) { + return null; + } + return getDisplayName(element); + }, + getElement: function (id) { + var item = getItem(id); + return item ? item.element : null; + }, + getOwnerID: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (!element || !element._owner) { + return null; + } + return element._owner._debugID; + }, + getParentID: function (id) { + var item = getItem(id); + return item ? item.parentID : null; + }, + getSource: function (id) { + var item = getItem(id); + var element = item ? item.element : null; + var source = element != null ? element._source : null; + return source; + }, + getText: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (typeof element === 'string') { + return element; + } else if (typeof element === 'number') { + return '' + element; + } else { + return null; + } + }, + getUpdateCount: function (id) { + var item = getItem(id); + return item ? item.updateCount : 0; + }, + + + getRootIDs: getRootIDs, + getRegisteredIDs: getItemIDs, + + pushNonStandardWarningStack: function (isCreatingElement, currentSource) { + if (typeof console.reactStack !== 'function') { + return; + } + + var stack = []; + var currentOwner = ReactCurrentOwner.current; + var id = currentOwner && currentOwner._debugID; + + try { + if (isCreatingElement) { + stack.push({ + name: id ? ReactComponentTreeHook.getDisplayName(id) : null, + fileName: currentSource ? currentSource.fileName : null, + lineNumber: currentSource ? currentSource.lineNumber : null + }); + } + + while (id) { + var element = ReactComponentTreeHook.getElement(id); + var parentID = ReactComponentTreeHook.getParentID(id); + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null; + var source = element && element._source; + stack.push({ + name: ownerName, + fileName: source ? source.fileName : null, + lineNumber: source ? source.lineNumber : null + }); + id = parentID; + } + } catch (err) { + // Internal state is messed up. + // Stop building the stack (it's just a nice to have). + } + + console.reactStack(stack); + }, + popNonStandardWarningStack: function () { + if (typeof console.reactStackEnd !== 'function') { + return; + } + console.reactStackEnd(); + } +}; + +module.exports = ReactComponentTreeHook; + +/***/ }), +/* 160 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10773,15 +11448,15 @@ module.exports = KeyEscapeUtils; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); -var ReactCurrentOwner = __webpack_require__(37); -var ReactInstanceMap = __webpack_require__(86); -var ReactInstrumentation = __webpack_require__(29); -var ReactUpdates = __webpack_require__(31); +var ReactCurrentOwner = __webpack_require__(36); +var ReactInstanceMap = __webpack_require__(89); +var ReactInstrumentation = __webpack_require__(27); +var ReactUpdates = __webpack_require__(28); var invariant = __webpack_require__(9); -var warning = __webpack_require__(12); +var warning = __webpack_require__(11); function enqueueUpdate(internalInstance) { ReactUpdates.enqueueUpdate(internalInstance); @@ -10814,7 +11489,7 @@ function getInternalInstanceReadyForUpdate(publicInstance, callerName) { } if (false) { - process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + "within `render` or another component's constructor). Render methods " + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0; + process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0; } return internalInstance; @@ -10825,6 +11500,7 @@ function getInternalInstanceReadyForUpdate(publicInstance, callerName) { * reconciliation step. */ var ReactUpdateQueue = { + /** * Checks whether or not this composite component is mounted. * @param {ReactClass} publicInstance The instance we want to test. @@ -10930,7 +11606,7 @@ var ReactUpdateQueue = { * @param {object} completeState Next state. * @internal */ - enqueueReplaceState: function (publicInstance, completeState, callback) { + enqueueReplaceState: function (publicInstance, completeState) { var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); if (!internalInstance) { @@ -10940,16 +11616,6 @@ var ReactUpdateQueue = { internalInstance._pendingStateQueue = [completeState]; internalInstance._pendingReplaceState = true; - // Future-proof 15.5 - if (callback !== undefined && callback !== null) { - ReactUpdateQueue.validateCallback(callback, 'replaceState'); - if (internalInstance._pendingCallbacks) { - internalInstance._pendingCallbacks.push(callback); - } else { - internalInstance._pendingCallbacks = [callback]; - } - } - enqueueUpdate(internalInstance); }, @@ -10991,12 +11657,13 @@ var ReactUpdateQueue = { validateCallback: function (callback, callerName) { !(!callback || typeof callback === 'function') ? false ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0; } + }; module.exports = ReactUpdateQueue; /***/ }), -/* 154 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11012,10 +11679,10 @@ module.exports = ReactUpdateQueue; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var emptyFunction = __webpack_require__(24); -var warning = __webpack_require__(12); +var emptyFunction = __webpack_require__(22); +var warning = __webpack_require__(11); var validateDOMNesting = emptyFunction; @@ -11123,6 +11790,7 @@ if (false) { // but case 'option': return tag === '#text'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption // No special behavior since these rules fall back to "in body" mode for @@ -11131,20 +11799,25 @@ if (false) { // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr case 'tr': return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody case 'tbody': case 'thead': case 'tfoot': return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup case 'colgroup': return tag === 'col' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable case 'table': return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead case 'head': return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element case 'html': return tag === 'head' || tag === 'body'; @@ -11220,11 +11893,16 @@ if (false) { case 'section': case 'summary': case 'ul': + case 'pre': case 'listing': + case 'table': + case 'hr': + case 'xmp': + case 'h1': case 'h2': case 'h3': @@ -11340,7 +12018,7 @@ if (false) { tagDisplayName = 'Text nodes'; } else { tagDisplayName = 'Whitespace text nodes'; - whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.'; + whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.'; } } else { tagDisplayName = '<' + childTag + '>'; @@ -11372,7 +12050,7 @@ if (false) { module.exports = validateDOMNesting; /***/ }), -/* 155 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11427,47 +12105,47 @@ function getEventCharCode(nativeEvent) { module.exports = getEventCharCode; /***/ }), -/* 156 */ +/* 163 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(430); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(439); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_0__Router__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(244); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(250); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_1__Link__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(438); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(446); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexLink", function() { return __WEBPACK_IMPORTED_MODULE_2__IndexLink__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(439); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(447); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_3__withRouter__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(440); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(448); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRedirect", function() { return __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(441); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(449); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRoute", function() { return __WEBPACK_IMPORTED_MODULE_5__IndexRoute__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(245); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(251); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(442); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(450); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(44); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createRoutes", function() { return __WEBPACK_IMPORTED_MODULE_8__RouteUtils__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(158); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(165); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "RouterContext", function() { return __WEBPACK_IMPORTED_MODULE_9__RouterContext__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(160); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(167); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "locationShape", function() { return __WEBPACK_IMPORTED_MODULE_10__PropTypes__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "routerShape", function() { return __WEBPACK_IMPORTED_MODULE_10__PropTypes__["b"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(443); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(451); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "match", function() { return __WEBPACK_IMPORTED_MODULE_11__match__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(249); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(255); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useRouterHistory", function() { return __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(74); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(79); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formatPattern", function() { return __WEBPACK_IMPORTED_MODULE_13__PatternUtils__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = __webpack_require__(448); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = __webpack_require__(456); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyRouterMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(449); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(457); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "browserHistory", function() { return __WEBPACK_IMPORTED_MODULE_15__browserHistory__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(452); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(460); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hashHistory", function() { return __WEBPACK_IMPORTED_MODULE_16__hashHistory__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(246); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(252); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createMemoryHistory", function() { return __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__["a"]; }); /* components */ @@ -11516,7 +12194,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /***/ }), -/* 157 */ +/* 164 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -11607,21 +12285,17 @@ function mapAsync(array, work, callback) { } /***/ }), -/* 158 */ +/* 165 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getRouteParams__ = __webpack_require__(437); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(159); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouteUtils__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getRouteParams__ = __webpack_require__(445); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(44); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; @@ -11633,24 +12307,29 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol - +var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_1_react___default.a.PropTypes, + array = _React$PropTypes.array, + func = _React$PropTypes.func, + object = _React$PropTypes.object; /** * A renders the component tree for a given router state * and sets the history object and the current location in context. */ -var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + +var RouterContext = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({ displayName: 'RouterContext', - mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__["a" /* ContextProvider */])('router')], + + mixins: [__WEBPACK_IMPORTED_MODULE_3__ContextUtils__["a" /* ContextProvider */]('router')], propTypes: { - router: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"].isRequired, - location: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"].isRequired, - routes: __WEBPACK_IMPORTED_MODULE_3_prop_types__["array"].isRequired, - params: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"].isRequired, - components: __WEBPACK_IMPORTED_MODULE_3_prop_types__["array"].isRequired, - createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"].isRequired + router: object.isRequired, + location: object.isRequired, + routes: array.isRequired, + params: object.isRequired, + components: array.isRequired, + createElement: func.isRequired }, getDefaultProps: function getDefaultProps() { @@ -11661,7 +12340,7 @@ var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ childContextTypes: { - router: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"].isRequired + router: object.isRequired }, getChildContext: function getChildContext() { @@ -11689,7 +12368,7 @@ var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ if (components == null) return element; // Don't create new children; use the grandchildren. var route = routes[index]; - var routeParams = Object(__WEBPACK_IMPORTED_MODULE_4__getRouteParams__["a" /* default */])(route, params); + var routeParams = __WEBPACK_IMPORTED_MODULE_2__getRouteParams__["a" /* default */](route, params); var props = { location: location, params: params, @@ -11699,7 +12378,7 @@ var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ routes: routes }; - if (Object(__WEBPACK_IMPORTED_MODULE_6__RouteUtils__["c" /* isReactChildren */])(element)) { + if (__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["c" /* isReactChildren */](element)) { props.children = element; } else if (element) { for (var prop in element) { @@ -11727,7 +12406,7 @@ var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ }, element); } - !(element === null || element === false || __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element)) ? false ? invariant(false, 'The root route must render a single element') : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + !(element === null || element === false || __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element)) ? false ? invariant(false, 'The root route must render a single element') : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; return element; } @@ -11736,14 +12415,14 @@ var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ /* harmony default export */ __webpack_exports__["a"] = (RouterContext); /***/ }), -/* 159 */ +/* 166 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = ContextProvider; /* harmony export (immutable) */ __webpack_exports__["b"] = ContextSubscriber; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); // Works around issues with context updates failing to propagate. @@ -11751,9 +12430,9 @@ var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ // https://github.com/facebook/react/issues/2517 // https://github.com/reactjs/react-router/issues/470 -var contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ - subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, - eventIndex: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired +var contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired, + eventIndex: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].number.isRequired }); function makeContextName(name) { @@ -11861,36 +12540,42 @@ function ContextSubscriber(name) { } /***/ }), -/* 160 */ +/* 167 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return routerShape; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return locationShape; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); - - -var routerShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["shape"])({ - push: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, - replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, - go: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, - goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, - goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, - setRouteLeaveHook: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, - isActive: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); + + +var func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + object = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object, + shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape, + string = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string; + + +var routerShape = shape({ + push: func.isRequired, + replace: func.isRequired, + go: func.isRequired, + goBack: func.isRequired, + goForward: func.isRequired, + setRouteLeaveHook: func.isRequired, + isActive: func.isRequired }); -var locationShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["shape"])({ - pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"].isRequired, - search: __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"].isRequired, - state: __WEBPACK_IMPORTED_MODULE_0_prop_types__["object"], - action: __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"].isRequired, - key: __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"] +var locationShape = shape({ + pathname: string.isRequired, + search: string.isRequired, + state: object, + action: string.isRequired, + key: string }); /***/ }), -/* 161 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11947,7 +12632,7 @@ module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, /***/ }), -/* 162 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11955,7 +12640,7 @@ module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, exports.__esModule = true; -var _warning = __webpack_require__(17); +var _warning = __webpack_require__(15); var _warning2 = _interopRequireDefault(_warning); @@ -11976,7 +12661,7 @@ var runTransitionHook = function runTransitionHook(hook, location, callback) { exports.default = runTransitionHook; /***/ }), -/* 163 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11984,28 +12669,28 @@ exports.default = runTransitionHook; exports.__esModule = true; -var _AsyncUtils = __webpack_require__(447); +var _AsyncUtils = __webpack_require__(455); -var _PathUtils = __webpack_require__(46); +var _PathUtils = __webpack_require__(45); -var _runTransitionHook = __webpack_require__(162); +var _runTransitionHook = __webpack_require__(169); var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); -var _Actions = __webpack_require__(109); +var _Actions = __webpack_require__(113); -var _LocationUtils = __webpack_require__(75); +var _LocationUtils = __webpack_require__(80); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var createHistory = function createHistory() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var getCurrentLocation = options.getCurrentLocation, - getUserConfirmation = options.getUserConfirmation, - pushLocation = options.pushLocation, - replaceLocation = options.replaceLocation, - go = options.go, - keyLength = options.keyLength; + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var getCurrentLocation = options.getCurrentLocation; + var getUserConfirmation = options.getUserConfirmation; + var pushLocation = options.pushLocation; + var replaceLocation = options.replaceLocation; + var go = options.go; + var keyLength = options.keyLength; var currentLocation = void 0; @@ -12134,7 +12819,7 @@ var createHistory = function createHistory() { }; var createLocation = function createLocation(location, action) { - var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createKey(); + var key = arguments.length <= 2 || arguments[2] === undefined ? createKey() : arguments[2]; return (0, _LocationUtils.createLocation)(location, action, key); }; @@ -12158,7 +12843,7 @@ var createHistory = function createHistory() { exports.default = createHistory; /***/ }), -/* 164 */ +/* 171 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12168,7 +12853,7 @@ exports.__esModule = true; var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); /***/ }), -/* 165 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12177,15 +12862,15 @@ var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.d exports.__esModule = true; exports.go = exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getUserConfirmation = exports.getCurrentLocation = undefined; -var _LocationUtils = __webpack_require__(75); +var _LocationUtils = __webpack_require__(80); -var _DOMUtils = __webpack_require__(110); +var _DOMUtils = __webpack_require__(114); -var _DOMStateStorage = __webpack_require__(250); +var _DOMStateStorage = __webpack_require__(256); -var _PathUtils = __webpack_require__(46); +var _PathUtils = __webpack_require__(45); -var _ExecutionEnvironment = __webpack_require__(164); +var _ExecutionEnvironment = __webpack_require__(171); var PopStateEvent = 'popstate'; var HashChangeEvent = 'hashchange'; @@ -12222,9 +12907,8 @@ var getUserConfirmation = exports.getUserConfirmation = function getUserConfirma var startListener = exports.startListener = function startListener(listener) { var handlePopState = function handlePopState(event) { - if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) // Ignore extraneous popstate events in WebKit - return; - listener(_createLocation(event.state)); + if (event.state !== undefined) // Ignore extraneous popstate events in WebKit + listener(_createLocation(event.state)); }; (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState); @@ -12247,8 +12931,8 @@ var startListener = exports.startListener = function startListener(listener) { }; var updateLocation = function updateLocation(location, updateState) { - var state = location.state, - key = location.key; + var state = location.state; + var key = location.key; if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state); @@ -12273,13 +12957,13 @@ var go = exports.go = function go(n) { }; /***/ }), -/* 166 */ +/* 173 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(254); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(81); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(260); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(59); @@ -12329,10 +13013,10 @@ var objectCtorString = funcToString.call(Object); * // => true */ function isPlainObject(value) { - if (!Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) != objectTag) { + if (!__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */](value) || __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) != objectTag) { return false; } - var proto = Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(value); + var proto = __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */](value); if (proto === null) { return true; } @@ -12345,12 +13029,11 @@ function isPlainObject(value) { /***/ }), -/* 167 */ +/* 174 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefix", function() { return prefix; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_INSERT", function() { return ARRAY_INSERT; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_MOVE", function() { return ARRAY_MOVE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_POP", function() { return ARRAY_POP; }); @@ -12365,7 +13048,6 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BLUR", function() { return BLUR; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CHANGE", function() { return CHANGE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_SUBMIT", function() { return CLEAR_SUBMIT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_SUBMIT_ERRORS", function() { return CLEAR_SUBMIT_ERRORS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_ASYNC_ERROR", function() { return CLEAR_ASYNC_ERROR; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DESTROY", function() { return DESTROY; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOCUS", function() { return FOCUS; }); @@ -12384,52 +13066,49 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNTOUCH", function() { return UNTOUCH; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_SYNC_ERRORS", function() { return UPDATE_SYNC_ERRORS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_SYNC_WARNINGS", function() { return UPDATE_SYNC_WARNINGS; }); -var prefix = '@@redux-form/'; - -var ARRAY_INSERT = prefix + 'ARRAY_INSERT'; -var ARRAY_MOVE = prefix + 'ARRAY_MOVE'; -var ARRAY_POP = prefix + 'ARRAY_POP'; -var ARRAY_PUSH = prefix + 'ARRAY_PUSH'; -var ARRAY_REMOVE = prefix + 'ARRAY_REMOVE'; -var ARRAY_REMOVE_ALL = prefix + 'ARRAY_REMOVE_ALL'; -var ARRAY_SHIFT = prefix + 'ARRAY_SHIFT'; -var ARRAY_SPLICE = prefix + 'ARRAY_SPLICE'; -var ARRAY_UNSHIFT = prefix + 'ARRAY_UNSHIFT'; -var ARRAY_SWAP = prefix + 'ARRAY_SWAP'; -var AUTOFILL = prefix + 'AUTOFILL'; -var BLUR = prefix + 'BLUR'; -var CHANGE = prefix + 'CHANGE'; -var CLEAR_SUBMIT = prefix + 'CLEAR_SUBMIT'; -var CLEAR_SUBMIT_ERRORS = prefix + 'CLEAR_SUBMIT_ERRORS'; -var CLEAR_ASYNC_ERROR = prefix + 'CLEAR_ASYNC_ERROR'; -var DESTROY = prefix + 'DESTROY'; -var FOCUS = prefix + 'FOCUS'; -var INITIALIZE = prefix + 'INITIALIZE'; -var REGISTER_FIELD = prefix + 'REGISTER_FIELD'; -var RESET = prefix + 'RESET'; -var SET_SUBMIT_FAILED = prefix + 'SET_SUBMIT_FAILED'; -var SET_SUBMIT_SUCCEEDED = prefix + 'SET_SUBMIT_SUCCEEDED'; -var START_ASYNC_VALIDATION = prefix + 'START_ASYNC_VALIDATION'; -var START_SUBMIT = prefix + 'START_SUBMIT'; -var STOP_ASYNC_VALIDATION = prefix + 'STOP_ASYNC_VALIDATION'; -var STOP_SUBMIT = prefix + 'STOP_SUBMIT'; -var SUBMIT = prefix + 'SUBMIT'; -var TOUCH = prefix + 'TOUCH'; -var UNREGISTER_FIELD = prefix + 'UNREGISTER_FIELD'; -var UNTOUCH = prefix + 'UNTOUCH'; -var UPDATE_SYNC_ERRORS = prefix + 'UPDATE_SYNC_ERRORS'; -var UPDATE_SYNC_WARNINGS = prefix + 'UPDATE_SYNC_WARNINGS'; +var ARRAY_INSERT = '@@redux-form/ARRAY_INSERT'; +var ARRAY_MOVE = '@@redux-form/ARRAY_MOVE'; +var ARRAY_POP = '@@redux-form/ARRAY_POP'; +var ARRAY_PUSH = '@@redux-form/ARRAY_PUSH'; +var ARRAY_REMOVE = '@@redux-form/ARRAY_REMOVE'; +var ARRAY_REMOVE_ALL = '@@redux-form/ARRAY_REMOVE_ALL'; +var ARRAY_SHIFT = '@@redux-form/ARRAY_SHIFT'; +var ARRAY_SPLICE = '@@redux-form/ARRAY_SPLICE'; +var ARRAY_UNSHIFT = '@@redux-form/ARRAY_UNSHIFT'; +var ARRAY_SWAP = '@@redux-form/ARRAY_SWAP'; +var AUTOFILL = '@@redux-form/AUTOFILL'; +var BLUR = '@@redux-form/BLUR'; +var CHANGE = '@@redux-form/CHANGE'; +var CLEAR_SUBMIT = '@@redux-form/CLEAR_SUBMIT'; +var CLEAR_ASYNC_ERROR = '@redux-form/CLEAR_ASYNC_ERROR'; +var DESTROY = '@@redux-form/DESTROY'; +var FOCUS = '@@redux-form/FOCUS'; +var INITIALIZE = '@@redux-form/INITIALIZE'; +var REGISTER_FIELD = '@@redux-form/REGISTER_FIELD'; +var RESET = '@@redux-form/RESET'; +var SET_SUBMIT_FAILED = '@@redux-form/SET_SUBMIT_FAILED'; +var SET_SUBMIT_SUCCEEDED = '@@redux-form/SET_SUBMIT_SUCCEEDED'; +var START_ASYNC_VALIDATION = '@@redux-form/START_ASYNC_VALIDATION'; +var START_SUBMIT = '@@redux-form/START_SUBMIT'; +var STOP_ASYNC_VALIDATION = '@@redux-form/STOP_ASYNC_VALIDATION'; +var STOP_SUBMIT = '@@redux-form/STOP_SUBMIT'; +var SUBMIT = '@@redux-form/SUBMIT'; +var TOUCH = '@@redux-form/TOUCH'; +var UNREGISTER_FIELD = '@@redux-form/UNREGISTER_FIELD'; +var UNTOUCH = '@@redux-form/UNTOUCH'; +var UPDATE_SYNC_ERRORS = '@@redux-form/UPDATE_SYNC_ERRORS'; +var UPDATE_SYNC_WARNINGS = '@@redux-form/UPDATE_SYNC_WARNINGS'; /***/ }), -/* 168 */ +/* 175 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__ = __webpack_require__(504); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__ = __webpack_require__(520); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__ = __webpack_require__(522); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__ = __webpack_require__(523); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__ = __webpack_require__(524); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__ = __webpack_require__(503); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__ = __webpack_require__(519); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__ = __webpack_require__(521); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__ = __webpack_require__(522); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__ = __webpack_require__(523); @@ -12465,12 +13144,12 @@ MapCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__["a" /* de /***/ }), -/* 169 */ +/* 176 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(81); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(47); @@ -12498,12 +13177,12 @@ var asyncTag = '[object AsyncFunction]', * // => false */ function isFunction(value) { - if (!Object(__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" /* default */])(value)) { + if (!__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" /* default */](value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value); + var tag = __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } @@ -12511,69 +13190,32 @@ function isFunction(value) { /***/ }), -/* 170 */ +/* 177 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29); /* Built-in method references that are verified to be native. */ -var Map = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Map'); +var Map = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Map'); /* harmony default export */ __webpack_exports__["a"] = (Map); /***/ }), -/* 171 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__ = __webpack_require__(528); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54); - - - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && !Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(other))) { - return value !== value && other !== other; - } - return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__["a" /* default */])(value, other, bitmask, customizer, baseIsEqual, stack); -} - -/* harmony default export */ __webpack_exports__["a"] = (baseIsEqual); - - -/***/ }), -/* 172 */ +/* 178 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(117); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stackClear_js__ = __webpack_require__(529); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__ = __webpack_require__(530); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stackGet_js__ = __webpack_require__(531); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stackHas_js__ = __webpack_require__(532); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stackSet_js__ = __webpack_require__(533); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(120); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stackClear_js__ = __webpack_require__(528); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__ = __webpack_require__(529); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stackGet_js__ = __webpack_require__(530); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stackHas_js__ = __webpack_require__(531); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stackSet_js__ = __webpack_require__(532); @@ -12604,59 +13246,67 @@ Stack.prototype.set = __WEBPACK_IMPORTED_MODULE_5__stackSet_js__["a" /* default /***/ }), -/* 173 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 179 */ +/***/ (function(module, exports) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(280); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__ = __webpack_require__(555); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(120); +module.exports = function(originalModule) { + if(!originalModule.webpackPolyfill) { + var module = Object.create(originalModule); + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + Object.defineProperty(module, "exports", { + enumerable: true, + }); + module.webpackPolyfill = 1; + } + return module; +}; +/***/ }), +/* 180 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/** Used for built-in method references. */ +var objectProto = Object.prototype; /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) + * Checks if `value` is likely a prototype object. * - * _.keys('hi'); - * // => ['0', '1'] + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ -function keys(object) { - return Object(__WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */])(object) ? Object(__WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */])(object) : Object(__WEBPACK_IMPORTED_MODULE_1__baseKeys_js__["a" /* default */])(object); +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; } -/* harmony default export */ __webpack_exports__["a"] = (keys); +/* harmony default export */ __webpack_exports__["a"] = (isPrototype); /***/ }), -/* 174 */ +/* 181 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__ = __webpack_require__(550); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__ = __webpack_require__(540); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59); @@ -12687,8 +13337,8 @@ var propertyIsEnumerable = objectProto.propertyIsEnumerable; * _.isArguments([1, 2, 3]); * // => false */ -var isArguments = Object(__WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */])(function() { return arguments; }()) ? __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */] : function(value) { - return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && hasOwnProperty.call(value, 'callee') && +var isArguments = __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */](function() { return arguments; }()) ? __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */] : function(value) { + return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; @@ -12696,12 +13346,54 @@ var isArguments = Object(__WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" / /***/ }), -/* 175 */ +/* 182 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__ = __webpack_require__(551); +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/* harmony default export */ __webpack_exports__["a"] = (isLength); + + +/***/ }), +/* 183 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__ = __webpack_require__(542); @@ -12741,40 +13433,47 @@ var isBuffer = nativeIsBuffer || __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__["a" /* harmony default export */ __webpack_exports__["a"] = (isBuffer); -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(176)(module))) +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(179)(module))) /***/ }), -/* 176 */ -/***/ (function(module, exports) { +/* 184 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -module.exports = function(originalModule) { - if(!originalModule.webpackPolyfill) { - var module = Object.create(originalModule); - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - Object.defineProperty(module, "exports", { - enumerable: true, - }); - module.webpackPolyfill = 1; - } - return module; -}; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__ = __webpack_require__(543); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(544); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(545); + + + + +/* Node.js helper references. */ +var nodeIsTypedArray = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */](nodeIsTypedArray) : __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isTypedArray); /***/ }), -/* 177 */ +/* 185 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -12803,116 +13502,124 @@ function isIndex(value, length) { /***/ }), -/* 178 */ +/* 186 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__ = __webpack_require__(552); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(553); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(554); - - - - -/* Node.js helper references. */ -var nodeIsTypedArray = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isTypedArray; - /** - * Checks if `value` is classified as a typed array. + * This method returns the first argument it receives. * * @static + * @since 0.1.0 * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. * @example * - * _.isTypedArray(new Uint8Array); - * // => true + * var object = { 'a': 1 }; * - * _.isTypedArray([]); - * // => false + * console.log(_.identity(object) === object); + * // => true */ -var isTypedArray = nodeIsTypedArray ? Object(__WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */])(nodeIsTypedArray) : __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__["a" /* default */]; +function identity(value) { + return value; +} -/* harmony default export */ __webpack_exports__["a"] = (isTypedArray); +/* harmony default export */ __webpack_exports__["a"] = (identity); /***/ }), -/* 179 */ +/* 187 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(281); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__ = __webpack_require__(562); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(124); + + + /** - * Checks if `value` is a valid array-like length. + * Creates an array of the own enumerable property names of `object`. * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. * * @static + * @since 0.1.0 * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. * @example * - * _.isLength(3); - * // => true + * function Foo() { + * this.a = 1; + * this.b = 2; + * } * - * _.isLength(Number.MIN_VALUE); - * // => false + * Foo.prototype.c = 3; * - * _.isLength(Infinity); - * // => false + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) * - * _.isLength('3'); - * // => false + * _.keys('hi'); + * // => ['0', '1'] */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +function keys(object) { + return __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */](object) ? __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */](object) : __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__["a" /* default */](object); } -/* harmony default export */ __webpack_exports__["a"] = (isLength); +/* harmony default export */ __webpack_exports__["a"] = (keys); /***/ }), -/* 180 */ +/* 188 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** Used for built-in method references. */ -var objectProto = Object.prototype; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__ = __webpack_require__(567); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59); + + /** - * Checks if `value` is likely a prototype object. + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && !__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](other))) { + return value !== value && other !== other; + } + return __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__["a" /* default */](value, other, bitmask, customizer, baseIsEqual, stack); } -/* harmony default export */ __webpack_exports__["a"] = (isPrototype); +/* harmony default export */ __webpack_exports__["a"] = (baseIsEqual); /***/ }), -/* 181 */ +/* 189 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(115); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(118); @@ -12929,12 +13636,12 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */])(value)) { + if (__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */](value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || Object(__WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" /* default */])(value)) { + value == null || __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" /* default */](value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || @@ -12945,46 +13652,29 @@ function isKey(value, object) { /***/ }), -/* 182 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 190 */ +/***/ (function(module, exports) { -"use strict"; -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} +module.exports = isPromise; -/* harmony default export */ __webpack_exports__["a"] = (identity); +function isPromise(obj) { + return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; +} /***/ }), -/* 183 */ +/* 191 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hasError__ = __webpack_require__(609); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hasError__ = __webpack_require__(610); var createIsValid = function createIsValid(structure) { var getIn = structure.getIn, keys = structure.keys; - var hasError = Object(__WEBPACK_IMPORTED_MODULE_0__hasError__["a" /* default */])(structure); + var hasError = __WEBPACK_IMPORTED_MODULE_0__hasError__["a" /* default */](structure); return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); @@ -13026,44 +13716,54 @@ var createIsValid = function createIsValid(structure) { /* harmony default export */ __webpack_exports__["a"] = (createIsValid); /***/ }), -/* 184 */ -/***/ (function(module, exports) { +/* 192 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -module.exports = isPromise; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(293); -function isPromise(obj) { - return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; -} -/***/ }), -/* 185 */ -/***/ (function(module, exports, __webpack_require__) { +var customizer = function customizer(objectValue, otherValue, indexOrkey, object, other, stack) { + // https://lodash.com/docs/4.17.4#isEqualWith + if (stack) { + // Shallow compares + // For 1st level, stack === undefined. + // -> Do nothing (and implicitly return undefined so that it goes to compare 2nd level) + // For 2nd level and up, stack !== undefined. + // -> Compare by === operator + return objectValue === otherValue; + } +}; -module.exports = { "default": __webpack_require__(662), __esModule: true }; +var shallowCompare = function shallowCompare(instance, nextProps, nextState) { + return !__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](instance.props, nextProps, customizer) || !__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](instance.state, nextState, customizer); +}; + +/* harmony default export */ __webpack_exports__["a"] = (shallowCompare); /***/ }), -/* 186 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(36); -var dPs = __webpack_require__(668); -var enumBugKeys = __webpack_require__(138); -var IE_PROTO = __webpack_require__(136)('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; +var anObject = __webpack_require__(35) + , dPs = __webpack_require__(645) + , enumBugKeys = __webpack_require__(144) + , IE_PROTO = __webpack_require__(142)('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { +var createDict = function(){ // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(131)('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; + var iframe = __webpack_require__(137)('iframe') + , i = enumBugKeys.length + , lt = '<' + , gt = '>' + , iframeDocument; iframe.style.display = 'none'; - __webpack_require__(297).appendChild(iframe); + __webpack_require__(299).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); @@ -13072,15 +13772,15 @@ var createDict = function () { iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; -module.exports = Object.create || function create(O, Properties) { +module.exports = Object.create || function create(O, Properties){ var result; - if (O !== null) { + if(O !== null){ Empty[PROTOTYPE] = anObject(O); - result = new Empty(); + result = new Empty; Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; @@ -13090,86 +13790,62 @@ module.exports = Object.create || function create(O, Properties) { /***/ }), -/* 187 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { -exports.f = __webpack_require__(22); - +exports.f = __webpack_require__(24); /***/ }), -/* 188 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { -var global = __webpack_require__(23); -var core = __webpack_require__(18); -var LIBRARY = __webpack_require__(122); -var wksExt = __webpack_require__(187); -var defineProperty = __webpack_require__(35).f; -module.exports = function (name) { +var global = __webpack_require__(25) + , core = __webpack_require__(18) + , LIBRARY = __webpack_require__(126) + , wksExt = __webpack_require__(194) + , defineProperty = __webpack_require__(34).f; +module.exports = function(name){ var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); - if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); + if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); }; - /***/ }), -/* 189 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -exports.__esModule = true; - -var _from = __webpack_require__(302); - -var _from2 = _interopRequireDefault(_from); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { - arr2[i] = arr[i]; - } - - return arr2; - } else { - return (0, _from2.default)(arr); - } -}; +module.exports = { "default": __webpack_require__(664), __esModule: true }; /***/ }), -/* 190 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { -var classof = __webpack_require__(191); -var ITERATOR = __webpack_require__(22)('iterator'); -var Iterators = __webpack_require__(78); -module.exports = __webpack_require__(18).getIteratorMethod = function (it) { - if (it != undefined) return it[ITERATOR] +var classof = __webpack_require__(198) + , ITERATOR = __webpack_require__(24)('iterator') + , Iterators = __webpack_require__(83); +module.exports = __webpack_require__(18).getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; - /***/ }), -/* 191 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(83); -var TAG = __webpack_require__(22)('toStringTag'); -// ES3 wrong here -var ARG = cof(function () { return arguments; }()) == 'Arguments'; +var cof = __webpack_require__(87) + , TAG = __webpack_require__(24)('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error -var tryGet = function (it, key) { +var tryGet = function(it, key){ try { return it[key]; - } catch (e) { /* empty */ } + } catch(e){ /* empty */ } }; -module.exports = function (it) { +module.exports = function(it){ var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case @@ -13180,9 +13856,8 @@ module.exports = function (it) { : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; - /***/ }), -/* 192 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13207,7 +13882,7 @@ exports.default = { }; /***/ }), -/* 193 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13225,7 +13900,7 @@ exports.default = function (str) { module.exports = exports["default"]; /***/ }), -/* 194 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13244,7 +13919,7 @@ exports.default = function (value) { module.exports = exports['default']; /***/ }), -/* 195 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13290,7 +13965,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _Subheader = __webpack_require__(312); +var _Subheader = __webpack_require__(316); var _Subheader2 = _interopRequireDefault(_Subheader); @@ -13354,7 +14029,7 @@ List.contextTypes = { exports.default = List; /***/ }), -/* 196 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13399,7 +14074,7 @@ exports.default = { }; /***/ }), -/* 197 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13437,15 +14112,15 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); +var _reactDom = __webpack_require__(16); var _reactDom2 = _interopRequireDefault(_reactDom); -var _shallowEqual = __webpack_require__(58); +var _shallowEqual = __webpack_require__(63); var _shallowEqual2 = _interopRequireDefault(_shallowEqual); -var _autoPrefix = __webpack_require__(94); +var _autoPrefix = __webpack_require__(96); var _autoPrefix2 = _interopRequireDefault(_autoPrefix); @@ -13453,7 +14128,7 @@ var _transitions = __webpack_require__(10); var _transitions2 = _interopRequireDefault(_transitions); -var _ScaleIn = __webpack_require__(731); +var _ScaleIn = __webpack_require__(716); var _ScaleIn2 = _interopRequireDefault(_ScaleIn); @@ -13600,27 +14275,7 @@ FocusRipple.contextTypes = { exports.default = FocusRipple; /***/ }), -/* 198 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; - -var _FlatButton = __webpack_require__(766); - -var _FlatButton2 = _interopRequireDefault(_FlatButton); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _FlatButton2.default; - -/***/ }), -/* 199 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13638,7 +14293,7 @@ var _objectWithoutProperties2 = __webpack_require__(8); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var _toArray2 = __webpack_require__(315); +var _toArray2 = __webpack_require__(319); var _toArray3 = _interopRequireDefault(_toArray2); @@ -13670,31 +14325,31 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); +var _reactDom = __webpack_require__(16); var _reactDom2 = _interopRequireDefault(_reactDom); -var _shallowEqual = __webpack_require__(58); +var _shallowEqual = __webpack_require__(63); var _shallowEqual2 = _interopRequireDefault(_shallowEqual); -var _ClickAwayListener = __webpack_require__(320); +var _ClickAwayListener = __webpack_require__(206); var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener); -var _keycode = __webpack_require__(30); +var _keycode = __webpack_require__(26); var _keycode2 = _interopRequireDefault(_keycode); -var _propTypes = __webpack_require__(41); +var _propTypes = __webpack_require__(39); var _propTypes2 = _interopRequireDefault(_propTypes); -var _List = __webpack_require__(195); +var _List = __webpack_require__(202); var _List2 = _interopRequireDefault(_List); -var _menuUtils = __webpack_require__(775); +var _menuUtils = __webpack_require__(755); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -14306,7 +14961,7 @@ var _initialiseProps = function _initialiseProps() { exports.default = Menu; /***/ }), -/* 200 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14315,78 +14970,149 @@ exports.default = Menu; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = undefined; -var _RaisedButton = __webpack_require__(776); +var _getPrototypeOf = __webpack_require__(3); -var _RaisedButton2 = _interopRequireDefault(_RaisedButton); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _classCallCheck2 = __webpack_require__(1); -exports.default = _RaisedButton2.default; +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -/***/ }), -/* 201 */ -/***/ (function(module, exports, __webpack_require__) { +var _createClass2 = __webpack_require__(2); -"use strict"; +var _createClass3 = _interopRequireDefault(_createClass2); +var _possibleConstructorReturn2 = __webpack_require__(4); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Toggle = exports.TextField = exports.Slider = exports.SelectField = exports.RadioButtonGroup = exports.TimePicker = exports.DatePicker = exports.Checkbox = exports.AutoComplete = undefined; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var _AutoComplete = __webpack_require__(777); +var _inherits2 = __webpack_require__(5); -var _AutoComplete2 = _interopRequireDefault(_AutoComplete); +var _inherits3 = _interopRequireDefault(_inherits2); -var _Checkbox = __webpack_require__(788); +var _react = __webpack_require__(0); -var _Checkbox2 = _interopRequireDefault(_Checkbox); +var _reactDom = __webpack_require__(16); -var _DatePicker = __webpack_require__(793); +var _reactDom2 = _interopRequireDefault(_reactDom); -var _DatePicker2 = _interopRequireDefault(_DatePicker); +var _events = __webpack_require__(203); -var _RadioButtonGroup = __webpack_require__(809); +var _events2 = _interopRequireDefault(_events); -var _RadioButtonGroup2 = _interopRequireDefault(_RadioButtonGroup); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _SelectField = __webpack_require__(814); +var isDescendant = function isDescendant(el, target) { + if (target !== null) { + return el === target || isDescendant(el, target.parentNode); + } + return false; +}; -var _SelectField2 = _interopRequireDefault(_SelectField); +var clickAwayEvents = ['mouseup', 'touchend']; +var bind = function bind(callback) { + return clickAwayEvents.forEach(function (event) { + return _events2.default.on(document, event, callback); + }); +}; +var unbind = function unbind(callback) { + return clickAwayEvents.forEach(function (event) { + return _events2.default.off(document, event, callback); + }); +}; -var _Slider = __webpack_require__(822); +var ClickAwayListener = function (_Component) { + (0, _inherits3.default)(ClickAwayListener, _Component); -var _Slider2 = _interopRequireDefault(_Slider); + function ClickAwayListener() { + var _ref; -var _TextField = __webpack_require__(827); + var _temp, _this, _ret; -var _TextField2 = _interopRequireDefault(_TextField); + (0, _classCallCheck3.default)(this, ClickAwayListener); -var _TimePicker = __webpack_require__(828); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -var _TimePicker2 = _interopRequireDefault(_TimePicker); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClickAwayListener.__proto__ || (0, _getPrototypeOf2.default)(ClickAwayListener)).call.apply(_ref, [this].concat(args))), _this), _this.handleClickAway = function (event) { + if (event.defaultPrevented) { + return; + } -var _Toggle = __webpack_require__(842); + // IE11 support, which trigger the handleClickAway even after the unbind + if (_this.isCurrentlyMounted) { + var el = _reactDom2.default.findDOMNode(_this); -var _Toggle2 = _interopRequireDefault(_Toggle); + if (document.documentElement.contains(event.target) && !isDescendant(el, event.target)) { + _this.props.onClickAway(event); + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClickAwayListener, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.isCurrentlyMounted = true; + if (this.props.onClickAway) { + bind(this.handleClickAway); + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps) { + if (prevProps.onClickAway !== this.props.onClickAway) { + unbind(this.handleClickAway); + if (this.props.onClickAway) { + bind(this.handleClickAway); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.isCurrentlyMounted = false; + unbind(this.handleClickAway); + } + }, { + key: 'render', + value: function render() { + return this.props.children; + } + }]); + return ClickAwayListener; +}(_react.Component); + + false ? ClickAwayListener.propTypes = { + children: _react.PropTypes.element, + onClickAway: _react.PropTypes.func +} : void 0; +exports.default = ClickAwayListener; + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Checkbox = __webpack_require__(765); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.AutoComplete = _AutoComplete2.default; -exports.Checkbox = _Checkbox2.default; -exports.DatePicker = _DatePicker2.default; -exports.TimePicker = _TimePicker2.default; -exports.RadioButtonGroup = _RadioButtonGroup2.default; -exports.SelectField = _SelectField2.default; -exports.Slider = _Slider2.default; -exports.TextField = _TextField2.default; -exports.Toggle = _Toggle2.default; +exports.default = _Checkbox2.default; /***/ }), -/* 202 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14432,11 +15158,11 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactEventListener = __webpack_require__(42); +var _reactEventListener = __webpack_require__(40); var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -var _keycode = __webpack_require__(30); +var _keycode = __webpack_require__(26); var _keycode2 = _interopRequireDefault(_keycode); @@ -14444,19 +15170,19 @@ var _transitions = __webpack_require__(10); var _transitions2 = _interopRequireDefault(_transitions); -var _FocusRipple = __webpack_require__(197); +var _FocusRipple = __webpack_require__(204); var _FocusRipple2 = _interopRequireDefault(_FocusRipple); -var _TouchRipple = __webpack_require__(314); +var _TouchRipple = __webpack_require__(318); var _TouchRipple2 = _interopRequireDefault(_TouchRipple); -var _Paper = __webpack_require__(34); +var _Paper = __webpack_require__(32); var _Paper2 = _interopRequireDefault(_Paper); -var _warning = __webpack_require__(17); +var _warning = __webpack_require__(15); var _warning2 = _interopRequireDefault(_warning); @@ -14843,7 +15569,7 @@ EnhancedSwitch.contextTypes = { exports.default = EnhancedSwitch; /***/ }), -/* 203 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14889,11 +15615,11 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactAddonsTransitionGroup = __webpack_require__(128); +var _reactAddonsTransitionGroup = __webpack_require__(132); var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); -var _SlideInChild = __webpack_require__(806); +var _SlideInChild = __webpack_require__(783); var _SlideInChild2 = _interopRequireDefault(_SlideInChild); @@ -14983,7 +15709,7 @@ SlideIn.contextTypes = { exports.default = SlideIn; /***/ }), -/* 204 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14992,120 +15718,319 @@ exports.default = SlideIn; Object.defineProperty(exports, "__esModule", { value: true }); -exports.email = email; -exports.required = required; -exports.simpleText = simpleText; -exports.number = number; -exports.minValue = minValue; -exports.maxValue = maxValue; -exports.fullName = fullName; -function email(input) { - var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; - return re.test(input) ? undefined : 'Please enter a valid email'; -} +var countries = exports.countries = [{ "text": "USA", "value": "USA" }, { "text": "CANADA", "value": "CANADA" }, { "text": "JAPAN", "value": "JAPAN" }, { "text": "UK", "value": "GB" }, { "text": "UK (N. IRELAND)", "value": "NB" }, { "text": "AUSTRIA", "value": "AT" }, { "text": "BELARUS", "value": "BY" }, { "text": "BELGIUM", "value": "BE" }, { "text": "BULGARIA", "value": "BG" }, { "text": "CROATIA", "value": "HR" }, { "text": "CZECH REPUBLIC", "value": "CZ" }, { "text": "DENMARK", "value": "DK" }, { "text": "ESTONIA", "value": "EE" }, { "text": "FINLAND", "value": "FI" }, { "text": "FRANCE", "value": "FR" }, { "text": "GERMANY", "value": "DE" }, { "text": "GREECE", "value": "GR" }, { "text": "HUNGARY", "value": "HU" }, { "text": "ICELAND", "value": "IS" }, { "text": "IRELAND", "value": "IE" }, { "text": "ITALY", "value": "IT" }, { "text": "LATVIA", "value": "LV" }, { "text": "LITHUANIA", "value": "LT" }, { "text": "LUXEMBOURG", "value": "LU" }, { "text": "MONACO", "value": "MC" }, { "text": "NETHERLANDS", "value": "NL" }, { "text": "NORWAY", "value": "NO" }, { "text": "POLAND", "value": "PL" }, { "text": "PORTUGAL", "value": "PT" }, { "text": "ROMANIA", "value": "RO" }, { "text": "RUSSIA", "value": "RU" }, { "text": "SLOVAKIA", "value": "SK" }, { "text": "SLOVENIA", "value": "SI" }, { "text": "SPAIN", "value": "ES" }, { "text": "SWEDEN", "value": "SE" }, { "text": "SWITZERLAND", "value": "CH" }, { "text": "TURKEY", "value": "TR" }]; +var sizes = exports.sizes = ["Small", "Medium", "Large", "XLarge"]; +var sizesPants = exports.sizesPants = [28, 30, 32, 34, 36, 38, 40]; +var shoeSizes = exports.shoeSizes = [4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5]; +var skateSizes = exports.skateSizes = [7.5, 7.7, 7.75, 7.8, 7.875, 8, 8.06, 8.125, 8.13, 8.18, 8.2, 8.25, 8.375, 8.38, 8.5, 8.6, 8.625, 8.75, 8.8, 9, 9.25, 9.5, 10, 10]; +var usaRegions = exports.usaRegions = [{ "text": "AL", "value": "AL" }, { "text": "AK", "value": "AK" }, { "text": "AS", "value": "AS" }, { "text": "AZ", "value": "AZ" }, { "text": "AR", "value": "AR" }, { "text": "CA", "value": "CA" }, { "text": "CO", "value": "CO" }, { "text": "CT", "value": "CT" }, { "text": "DE", "value": "DE" }, { "text": "DC", "value": "DC" }, { "text": "FM", "value": "FM" }, { "text": "FL", "value": "FL" }, { "text": "GA", "value": "GA" }, { "text": "GU", "value": "GU" }, { "text": "HI", "value": "HI" }, { "text": "ID", "value": "ID" }, { "text": "IL", "value": "IL" }, { "text": "IN", "value": "IN" }, { "text": "IA", "value": "IA" }, { "text": "KS", "value": "KS" }, { "text": "KY", "value": "KY" }, { "text": "LA", "value": "LA" }, { "text": "ME", "value": "ME" }, { "text": "MH", "value": "MH" }, { "text": "MD", "value": "MD" }, { "text": "MA", "value": "MA" }, { "text": "MI", "value": "MI" }, { "text": "MN", "value": "MN" }, { "text": "MS", "value": "MS" }, { "text": "MO", "value": "MO" }, { "text": "MT", "value": "MT" }, { "text": "NE", "value": "NE" }, { "text": "NV", "value": "NV" }, { "text": "NH", "value": "NH" }, { "text": "NJ", "value": "NJ" }, { "text": "NM", "value": "NM" }, { "text": "NY", "value": "NY" }, { "text": "NC", "value": "NC" }, { "text": "ND", "value": "ND" }, { "text": "MP", "value": "MP" }, { "text": "OH", "value": "OH" }, { "text": "OK", "value": "OK" }, { "text": "OR", "value": "OR" }, { "text": "PW", "value": "PW" }, { "text": "PA", "value": "PA" }, { "text": "PR", "value": "PR" }, { "text": "RI", "value": "RI" }, { "text": "SC", "value": "SC" }, { "text": "SD", "value": "SD" }, { "text": "TN", "value": "TN" }, { "text": "TX", "value": "TX" }, { "text": "UT", "value": "UT" }, { "text": "VT", "value": "VT" }, { "text": "VI", "value": "VI" }, { "text": "VA", "value": "VA" }, { "text": "WA", "value": "WA" }, { "text": "WV", "value": "WV" }, { "text": "WI", "value": "WI" }, { "text": "WY", "value": "WY" }]; +var canadaRegions = exports.canadaRegions = [{ "text": "AB", "value": "AB" }, { "text": "BC", "value": "BC" }, { "text": "MB", "value": "MB" }, { "text": "NB", "value": "NB" }, { "text": "NL", "value": "NL" }, { "text": "NT", "value": "NT" }, { "text": "NS", "value": "NS" }, { "text": "NU", "value": "NU" }, { "text": "ON", "value": "ON" }, { "text": "PE", "value": "PE" }, { "text": "QC", "value": "QC" }, { "text": "SK", "value": "SK" }, { "text": "YT", "value": "YT" }]; +var japanRegions = exports.japanRegions = [{ "text": " 北海道", "value": " 北海道" }, { "text": " 青森県", "value": " 青森県" }, { "text": " 岩手県", "value": " 岩手県" }, { "text": " 宮城県", "value": " 宮城県" }, { "text": " 秋田県", "value": " 秋田県" }, { "text": " 山形県", "value": " 山形県" }, { "text": " 福島県", "value": " 福島県" }, { "text": " 茨城県", "value": " 茨城県" }, { "text": " 栃木県", "value": " 栃木県" }, { "text": " 群馬県", "value": " 群馬県" }, { "text": " 埼玉県", "value": " 埼玉県" }, { "text": " 千葉県", "value": " 千葉県" }, { "text": " 東京都", "value": " 東京都" }, { "text": " 神奈川県", "value": " 神奈川県" }, { "text": " 新潟県", "value": " 新潟県" }, { "text": " 富山県", "value": " 富山県" }, { "text": " 石川県", "value": " 石川県" }, { "text": " 福井県", "value": " 福井県" }, { "text": " 山梨県", "value": " 山梨県" }, { "text": " 長野県", "value": " 長野県" }, { "text": " 岐阜県", "value": " 岐阜県" }, { "text": " 静岡県", "value": " 静岡県" }, { "text": " 愛知県", "value": " 愛知県" }, { "text": " 三重県", "value": " 三重県" }, { "text": " 滋賀県", "value": " 滋賀県" }, { "text": " 京都府", "value": " 京都府" }, { "text": " 大阪府", "value": " 大阪府" }, { "text": " 兵庫県", "value": " 兵庫県" }, { "text": " 奈良県", "value": " 奈良県" }, { "text": " 和歌山県", "value": " 和歌山県" }, { "text": " 鳥取県", "value": " 鳥取県" }, { "text": " 島根県", "value": " 島根県" }, { "text": " 岡山県", "value": " 岡山県" }, { "text": " 広島県", "value": " 広島県" }, { "text": " 山口県", "value": " 山口県" }, { "text": " 徳島県", "value": " 徳島県" }, { "text": " 香川県", "value": " 香川県" }, { "text": " 愛媛県", "value": " 愛媛県" }, { "text": " 高知県", "value": " 高知県" }, { "text": " 福岡県", "value": " 福岡県" }, { "text": " 佐賀県", "value": " 佐賀県" }, { "text": " 長崎県", "value": " 長崎県" }, { "text": " 熊本県", "value": " 熊本県" }, { "text": " 大分県", "value": " 大分県" }, { "text": " 宮崎県", "value": " 宮崎県" }, { "text": " 鹿児島県", "value": " 鹿児島県" }, { "text": " 沖縄県", "value": " 沖縄県" }]; +var categories = exports.categories = ['accessories', 't-shirts', 'pants', 'shorts', 'sweatshirts', 'tops-sweaters', 'shirts', 'jackets', 'shoes', 'skate']; +var creditCards = exports.creditCards = [{ text: 'Visa', value: 'visa' }, { text: 'American Express', value: 'american_express' }, { text: 'Mastercard', value: 'master' }, { text: 'Solo', value: 'solo' }]; +var japanCreditCards = exports.japanCreditCards = creditCards.concat([{ text: 'JCB', value: 'jcb' }, { text: '代金引換', value: 'cod' }]).filter(function (x) { + return x.value !== 'solo'; +}); -function required(value) { - var empty = typeof value !== 'number' && !value; - return empty ? 'Required field' : undefined; -} +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { -function simpleText(value) { - return value && !value.match(/^[0-9a-zA-Z_]{1,64}$/) ? 'Only use characters (a-z, A-Z, 0-9, _)' : undefined; -} +"use strict"; -function number(value) { - return value && isNaN(Number(value)) ? 'This field must be a number' : undefined; -} -function minValue(min) { - return function (value) { - return value && value < min ? 'The value must be greater than ' + min : undefined; - }; -} +Object.defineProperty(exports, "__esModule", { + value: true +}); -function maxValue(max) { - return function (value) { - return value && value > max ? 'The value must be less than ' + max : undefined; +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tableRowColumn = context.muiTheme.tableRowColumn; + + + var styles = { + root: { + paddingLeft: tableRowColumn.spacing, + paddingRight: tableRowColumn.spacing, + height: tableRowColumn.height, + textAlign: 'left', + fontSize: 13, + overflow: 'hidden', + whiteSpace: 'nowrap', + textOverflow: 'ellipsis' + } }; -} -function fullName(value) { - return !value || value.split(' ').filter(function (x) { - return x !== ""; - }).length < 2 ? 'Please enter a valid full name (firstname + lastname)' : undefined; + if (_react2.default.Children.count(props.children) === 1 && !isNaN(props.children)) { + styles.textAlign = 'right'; + } + + return styles; } +var TableRowColumn = function (_Component) { + (0, _inherits3.default)(TableRowColumn, _Component); + + function TableRowColumn() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TableRowColumn); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableRowColumn.__proto__ || (0, _getPrototypeOf2.default)(TableRowColumn)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.onClick = function (event) { + if (_this.props.onClick) { + _this.props.onClick(event, _this.props.columnNumber); + } + }, _this.onMouseEnter = function (event) { + if (_this.props.hoverable) { + _this.setState({ hovered: true }); + if (_this.props.onHover) { + _this.props.onHover(event, _this.props.columnNumber); + } + } + }, _this.onMouseLeave = function (event) { + if (_this.props.hoverable) { + _this.setState({ hovered: false }); + if (_this.props.onHoverExit) { + _this.props.onHoverExit(event, _this.props.columnNumber); + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TableRowColumn, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + columnNumber = _props.columnNumber, + hoverable = _props.hoverable, + onClick = _props.onClick, + onHover = _props.onHover, + onHoverExit = _props.onHoverExit, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'columnNumber', 'hoverable', 'onClick', 'onHover', 'onHoverExit', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var handlers = { + onClick: this.onClick, + onMouseEnter: this.onMouseEnter, + onMouseLeave: this.onMouseLeave + }; + + return _react2.default.createElement( + 'td', + (0, _extends3.default)({ + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }, handlers, other), + children + ); + } + }]); + return TableRowColumn; +}(_react.Component); + +TableRowColumn.defaultProps = { + hoverable: false +}; +TableRowColumn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TableRowColumn.propTypes = { + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * @ignore + * Number to identify the header row. This property + * is automatically populated when used with TableHeader. + */ + columnNumber: _react.PropTypes.number, + /** + * @ignore + * If true, this column responds to hover events. + */ + hoverable: _react.PropTypes.bool, + /** @ignore */ + onClick: _react.PropTypes.func, + /** @ignore */ + onHover: _react.PropTypes.func, + /** + * @ignore + * Callback function for hover exit event. + */ + onHoverExit: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableRowColumn; + /***/ }), -/* 205 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -// 25.4.1.5 NewPromiseCapability(C) -var aFunction = __webpack_require__(99); -function PromiseCapability(C) { - var resolve, reject; - this.promise = new C(function ($$resolve, $$reject) { - if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); - resolve = $$resolve; - reject = $$reject; - }); - this.resolve = aFunction(resolve); - this.reject = aFunction(reject); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createProfile = createProfile; +exports.setProfileEnabled = setProfileEnabled; +exports.removeProfile = removeProfile; +exports.updateProfileSettings = updateProfileSettings; + +var _ActionTypes = __webpack_require__(49); + +var types = _interopRequireWildcard(_ActionTypes); + +var _notification = __webpack_require__(342); + +var _notification2 = _interopRequireDefault(_notification); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function createProfile(name, description) { + return function (dispatch) { + dispatch((0, _notification2.default)('Profile created')); + dispatch({ + type: types.PROFILE_CREATE, + name: name, + description: description + }); + }; } -module.exports.f = function (C) { - return new PromiseCapability(C); -}; +function setProfileEnabled(name) { + return function (dispatch) { + dispatch((0, _notification2.default)('Profile set to ' + name)); + dispatch({ + type: types.PROFILE_SET_ENABLED, + name: name + }); + }; +} + +function removeProfile(name) { + return function (dispatch) { + dispatch((0, _notification2.default)('Profile created')); + dispatch({ + type: types.PROFILE_REMOVE, + name: name + }); + }; +} +function updateProfileSettings(profileName, shop, key, value) { + return function (dispatch) { + dispatch((0, _notification2.default)('Settings saved')); + var obj = {}; + obj[key] = value; + dispatch({ + type: types.PROFILE_UPDATE_SETTINGS, + name: profileName, + value: obj, + shop: shop + }); + }; +} /***/ }), -/* 206 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = !__webpack_require__(44) && !__webpack_require__(63)(function () { - return Object.defineProperty(__webpack_require__(131)('div'), 'a', { get: function () { return 7; } }).a != 7; +module.exports = !__webpack_require__(43) && !__webpack_require__(69)(function(){ + return Object.defineProperty(__webpack_require__(137)('div'), 'a', {get: function(){ return 7; }}).a != 7; }); - /***/ }), -/* 207 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { -var has = __webpack_require__(51); -var toIObject = __webpack_require__(52); -var arrayIndexOf = __webpack_require__(339)(false); -var IE_PROTO = __webpack_require__(136)('IE_PROTO'); +var has = __webpack_require__(54) + , toIObject = __webpack_require__(55) + , arrayIndexOf = __webpack_require__(350)(false) + , IE_PROTO = __webpack_require__(142)('IE_PROTO'); -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); +module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { + while(names.length > i)if(has(O, key = names[i++])){ ~arrayIndexOf(result, key) || result.push(key); } return result; }; - /***/ }), -/* 208 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(83); -// eslint-disable-next-line no-prototype-builtins -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { +var cof = __webpack_require__(87); +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; - /***/ }), -/* 209 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15121,15 +16046,15 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { -var _prodInvariant = __webpack_require__(85), - _assign = __webpack_require__(15); +var _prodInvariant = __webpack_require__(71), + _assign = __webpack_require__(13); -var ReactNoopUpdateQueue = __webpack_require__(210); +var ReactNoopUpdateQueue = __webpack_require__(217); -var canDefineProperty = __webpack_require__(211); -var emptyObject = __webpack_require__(102); +var canDefineProperty = __webpack_require__(218); +var emptyObject = __webpack_require__(105); var invariant = __webpack_require__(9); -var lowPriorityWarning = __webpack_require__(341); +var lowPriorityWarning = __webpack_require__(352); /** * Base class helpers for the updating state of a component. @@ -15253,7 +16178,7 @@ module.exports = { }; /***/ }), -/* 210 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15269,7 +16194,7 @@ module.exports = { -var warning = __webpack_require__(12); +var warning = __webpack_require__(11); function warnNoop(publicInstance, callerName) { if (false) { @@ -15353,7 +16278,7 @@ var ReactNoopUpdateQueue = { module.exports = ReactNoopUpdateQueue; /***/ }), -/* 211 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15384,81 +16309,228 @@ if (false) { module.exports = canDefineProperty; /***/ }), -/* 212 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** - * Copyright 2014-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * */ -// The Symbol used to tag the ReactElement type. If there is no native Symbol -// nor polyfill, then a plain number is used for performance. +var PooledClass = __webpack_require__(353); +var ReactElement = __webpack_require__(57); -var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; +var emptyFunction = __webpack_require__(22); +var traverseAllChildren = __webpack_require__(221); -module.exports = REACT_ELEMENT_TYPE; +var twoArgumentPooler = PooledClass.twoArgumentPooler; +var fourArgumentPooler = PooledClass.fourArgumentPooler; -/***/ }), -/* 213 */ -/***/ (function(module, exports, __webpack_require__) { +var userProvidedKeyEscapeRegex = /\/+/g; +function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); +} -"use strict"; /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. + * PooledClass representing the bookkeeping associated with performing a child + * traversal. Allows avoiding binding callbacks. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * @constructor ForEachBookKeeping + * @param {!function} forEachFunction Function to perform traversal with. + * @param {?*} forEachContext Context to perform context with. */ +function ForEachBookKeeping(forEachFunction, forEachContext) { + this.func = forEachFunction; + this.context = forEachContext; + this.count = 0; +} +ForEachBookKeeping.prototype.destructor = function () { + this.func = null; + this.context = null; + this.count = 0; +}; +PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); +function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + func.call(context, child, bookKeeping.count++); +} -// React 15.5 references this module, and assumes PropTypes are still callable in production. -// Therefore we re-export development-only version with all the PropTypes checks here. -// However if one is migrating to the `prop-types` npm library, they will go through the -// `index.js` entry point, and it will branch depending on the environment. -var factory = __webpack_require__(349); -module.exports = function(isValidElement) { - // It is still allowed in 15.5. - var throwOnDirectAccess = false; - return factory(isValidElement, throwOnDirectAccess); +/** + * Iterates through children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ +function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + ForEachBookKeeping.release(traverseContext); +} + +/** + * PooledClass representing the bookkeeping associated with performing a child + * mapping. Allows avoiding binding callbacks. + * + * @constructor MapBookKeeping + * @param {!*} mapResult Object containing the ordered map of results. + * @param {!function} mapFunction Function to perform mapping with. + * @param {?*} mapContext Context to perform mapping with. + */ +function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { + this.result = mapResult; + this.keyPrefix = keyPrefix; + this.func = mapFunction; + this.context = mapContext; + this.count = 0; +} +MapBookKeeping.prototype.destructor = function () { + this.result = null; + this.keyPrefix = null; + this.func = null; + this.context = null; + this.count = 0; +}; +PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); + +function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; + + + var mappedChild = func.call(context, child, bookKeeping.count++); + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); + } else if (mappedChild != null) { + if (ReactElement.isValidElement(mappedChild)) { + mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); + } + result.push(mappedChild); + } +} + +function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + MapBookKeeping.release(traverseContext); +} + +/** + * Maps children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ +function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; +} + +function forEachSingleChildDummy(traverseContext, child, name) { + return null; +} + +/** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ +function countChildren(children, context) { + return traverseAllChildren(children, forEachSingleChildDummy, null); +} + +/** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray + */ +function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); + return result; +} + +var ReactChildren = { + forEach: forEachChildren, + map: mapChildren, + mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, + count: countChildren, + toArray: toArray }; +module.exports = ReactChildren; /***/ }), -/* 214 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** - * Copyright 2013-present, Facebook, Inc. + * Copyright 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. + * + * */ -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; +// The Symbol used to tag the ReactElement type. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. -module.exports = ReactPropTypesSecret; +var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; +module.exports = REACT_ELEMENT_TYPE; /***/ }), -/* 215 */ +/* 221 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15474,870 +16546,285 @@ module.exports = ReactPropTypesSecret; -var _assign = __webpack_require__(15); +var _prodInvariant = __webpack_require__(71); -var emptyObject = __webpack_require__(102); -var _invariant = __webpack_require__(9); +var ReactCurrentOwner = __webpack_require__(36); +var REACT_ELEMENT_TYPE = __webpack_require__(220); -if (false) { - var warning = require('fbjs/lib/warning'); -} +var getIteratorFn = __webpack_require__(354); +var invariant = __webpack_require__(9); +var KeyEscapeUtils = __webpack_require__(222); +var warning = __webpack_require__(11); -var MIXINS_KEY = 'mixins'; +var SEPARATOR = '.'; +var SUBSEPARATOR = ':'; -// Helper function to allow the creation of anonymous functions which do not -// have .name set to the name of the variable being assigned to. -function identity(fn) { - return fn; -} +/** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ -var ReactPropTypeLocationNames; -if (false) { - ReactPropTypeLocationNames = { - prop: 'prop', - context: 'context', - childContext: 'child context' - }; -} else { - ReactPropTypeLocationNames = {}; +/** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + +var didWarnAboutMaps = false; + +/** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ +function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); } -function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { - /** - * Policies that describe methods in `ReactClassInterface`. - */ +/** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; - var injectedMixins = []; + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } - /** - * Composite components are higher-level components that compose other composite - * or host components. - * - * To create a new type of `ReactClass`, pass a specification of - * your new class to `React.createClass`. The only requirement of your class - * specification is that you implement a `render` method. - * - * var MyComponent = React.createClass({ - * render: function() { - * return
Hello World
; - * } - * }); - * - * The class specification supports a specific protocol of methods that have - * special meaning (e.g. `render`). See `ReactClassInterface` for - * more the comprehensive protocol. Any other properties and methods in the - * class specification will be available on the prototype. - * - * @interface ReactClassInterface - * @internal - */ - var ReactClassInterface = { - /** - * An array of Mixin objects to include when defining your component. - * - * @type {array} - * @optional - */ - mixins: 'DEFINE_MANY', - - /** - * An object containing properties and methods that should be defined on - * the component's constructor instead of its prototype (static methods). - * - * @type {object} - * @optional - */ - statics: 'DEFINE_MANY', - - /** - * Definition of prop types for this component. - * - * @type {object} - * @optional - */ - propTypes: 'DEFINE_MANY', - - /** - * Definition of context types for this component. - * - * @type {object} - * @optional - */ - contextTypes: 'DEFINE_MANY', - - /** - * Definition of context types this component sets for its children. - * - * @type {object} - * @optional - */ - childContextTypes: 'DEFINE_MANY', - - // ==== Definition methods ==== - - /** - * Invoked when the component is mounted. Values in the mapping will be set on - * `this.props` if that prop is not specified (i.e. using an `in` check). - * - * This method is invoked before `getInitialState` and therefore cannot rely - * on `this.state` or use `this.setState`. - * - * @return {object} - * @optional - */ - getDefaultProps: 'DEFINE_MANY_MERGED', - - /** - * Invoked once before the component is mounted. The return value will be used - * as the initial value of `this.state`. - * - * getInitialState: function() { - * return { - * isOn: false, - * fooBaz: new BazFoo() - * } - * } - * - * @return {object} - * @optional - */ - getInitialState: 'DEFINE_MANY_MERGED', - - /** - * @return {object} - * @optional - */ - getChildContext: 'DEFINE_MANY_MERGED', - - /** - * Uses props from `this.props` and state from `this.state` to render the - * structure of the component. - * - * No guarantees are made about when or how often this method is invoked, so - * it must not have side effects. - * - * render: function() { - * var name = this.props.name; - * return
Hello, {name}!
; - * } - * - * @return {ReactComponent} - * @required - */ - render: 'DEFINE_ONCE', - - // ==== Delegate methods ==== - - /** - * Invoked when the component is initially created and about to be mounted. - * This may have side effects, but any external subscriptions or data created - * by this method must be cleaned up in `componentWillUnmount`. - * - * @optional - */ - componentWillMount: 'DEFINE_MANY', - - /** - * Invoked when the component has been mounted and has a DOM representation. - * However, there is no guarantee that the DOM node is in the document. - * - * Use this as an opportunity to operate on the DOM when the component has - * been mounted (initialized and rendered) for the first time. - * - * @param {DOMElement} rootNode DOM element representing the component. - * @optional - */ - componentDidMount: 'DEFINE_MANY', - - /** - * Invoked before the component receives new props. - * - * Use this as an opportunity to react to a prop transition by updating the - * state using `this.setState`. Current props are accessed via `this.props`. - * - * componentWillReceiveProps: function(nextProps, nextContext) { - * this.setState({ - * likesIncreasing: nextProps.likeCount > this.props.likeCount - * }); - * } - * - * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop - * transition may cause a state change, but the opposite is not true. If you - * need it, you are probably looking for `componentWillUpdate`. - * - * @param {object} nextProps - * @optional - */ - componentWillReceiveProps: 'DEFINE_MANY', - - /** - * Invoked while deciding if the component should be updated as a result of - * receiving new props, state and/or context. - * - * Use this as an opportunity to `return false` when you're certain that the - * transition to the new props/state/context will not require a component - * update. - * - * shouldComponentUpdate: function(nextProps, nextState, nextContext) { - * return !equal(nextProps, this.props) || - * !equal(nextState, this.state) || - * !equal(nextContext, this.context); - * } - * - * @param {object} nextProps - * @param {?object} nextState - * @param {?object} nextContext - * @return {boolean} True if the component should update. - * @optional - */ - shouldComponentUpdate: 'DEFINE_ONCE', - - /** - * Invoked when the component is about to update due to a transition from - * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` - * and `nextContext`. - * - * Use this as an opportunity to perform preparation before an update occurs. - * - * NOTE: You **cannot** use `this.setState()` in this method. - * - * @param {object} nextProps - * @param {?object} nextState - * @param {?object} nextContext - * @param {ReactReconcileTransaction} transaction - * @optional - */ - componentWillUpdate: 'DEFINE_MANY', - - /** - * Invoked when the component's DOM representation has been updated. - * - * Use this as an opportunity to operate on the DOM when the component has - * been updated. - * - * @param {object} prevProps - * @param {?object} prevState - * @param {?object} prevContext - * @param {DOMElement} rootNode DOM element representing the component. - * @optional - */ - componentDidUpdate: 'DEFINE_MANY', - - /** - * Invoked when the component is about to be removed from its parent and have - * its DOM representation destroyed. - * - * Use this as an opportunity to deallocate any external resources. - * - * NOTE: There is no `componentDidUnmount` since your component will have been - * destroyed by that point. - * - * @optional - */ - componentWillUnmount: 'DEFINE_MANY', - - // ==== Advanced methods ==== + if (children === null || type === 'string' || type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { + callback(traverseContext, children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); + return 1; + } - /** - * Updates the component's currently mounted DOM representation. - * - * By default, this implements React's rendering and reconciliation algorithm. - * Sophisticated clients may wish to override this. - * - * @param {ReactReconcileTransaction} transaction - * @internal - * @overridable - */ - updateComponent: 'OVERRIDE_BASE' - }; + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; - /** - * Mapping from class specification keys to special processing functions. - * - * Although these are declared like instance properties in the specification - * when defining classes using `React.createClass`, they are actually static - * and are accessible on the constructor instead of the prototype. Despite - * being static, they must be defined outside of the "statics" key under - * which all other static methods are defined. - */ - var RESERVED_SPEC_KEYS = { - displayName: function(Constructor, displayName) { - Constructor.displayName = displayName; - }, - mixins: function(Constructor, mixins) { - if (mixins) { - for (var i = 0; i < mixins.length; i++) { - mixSpecIntoComponent(Constructor, mixins[i]); + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); } - } - }, - childContextTypes: function(Constructor, childContextTypes) { - if (false) { - validateTypeDef(Constructor, childContextTypes, 'childContext'); - } - Constructor.childContextTypes = _assign( - {}, - Constructor.childContextTypes, - childContextTypes - ); - }, - contextTypes: function(Constructor, contextTypes) { - if (false) { - validateTypeDef(Constructor, contextTypes, 'context'); - } - Constructor.contextTypes = _assign( - {}, - Constructor.contextTypes, - contextTypes - ); - }, - /** - * Special case getDefaultProps which should move into statics but requires - * automatic merging. - */ - getDefaultProps: function(Constructor, getDefaultProps) { - if (Constructor.getDefaultProps) { - Constructor.getDefaultProps = createMergedResultFunction( - Constructor.getDefaultProps, - getDefaultProps - ); } else { - Constructor.getDefaultProps = getDefaultProps; - } - }, - propTypes: function(Constructor, propTypes) { - if (false) { - validateTypeDef(Constructor, propTypes, 'prop'); - } - Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); - }, - statics: function(Constructor, statics) { - mixStaticSpecIntoComponent(Constructor, statics); - }, - autobind: function() {} - }; - - function validateTypeDef(Constructor, typeDef, location) { - for (var propName in typeDef) { - if (typeDef.hasOwnProperty(propName)) { - // use a warning instead of an _invariant so components - // don't show up in prod but only in __DEV__ if (false) { - warning( - typeof typeDef[propName] === 'function', - '%s: %s type `%s` is invalid; it must be a function, usually from ' + - 'React.PropTypes.', - Constructor.displayName || 'ReactClass', - ReactPropTypeLocationNames[location], - propName - ); + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } } } - } - } - - function validateMethodOverride(isAlreadyDefined, name) { - var specPolicy = ReactClassInterface.hasOwnProperty(name) - ? ReactClassInterface[name] - : null; - - // Disallow overriding of base class methods unless explicitly allowed. - if (ReactClassMixin.hasOwnProperty(name)) { - _invariant( - specPolicy === 'OVERRIDE_BASE', - 'ReactClassInterface: You are attempting to override ' + - '`%s` from your class specification. Ensure that your method names ' + - 'do not overlap with React methods.', - name - ); - } - - // Disallow defining methods more than once unless explicitly allowed. - if (isAlreadyDefined) { - _invariant( - specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', - 'ReactClassInterface: You are attempting to define ' + - '`%s` on your component more than once. This conflict may be due ' + - 'to a mixin.', - name - ); - } - } - - /** - * Mixin helper which handles policy validation and reserved - * specification keys when building React classes. - */ - function mixSpecIntoComponent(Constructor, spec) { - if (!spec) { + } else if (type === 'object') { + var addendum = ''; if (false) { - var typeofSpec = typeof spec; - var isMixinValid = typeofSpec === 'object' && spec !== null; - - if (process.env.NODE_ENV !== 'production') { - warning( - isMixinValid, - "%s: You're attempting to include a mixin that is either null " + - 'or not an object. Check the mixins included by the component, ' + - 'as well as any mixins they include themselves. ' + - 'Expected object but got %s.', - Constructor.displayName || 'ReactClass', - spec === null ? null : typeofSpec - ); + addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; + if (children._isReactElement) { + addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.'; } - } - - return; - } - - _invariant( - typeof spec !== 'function', - "ReactClass: You're attempting to " + - 'use a component class or function as a mixin. Instead, just use a ' + - 'regular object.' - ); - _invariant( - !isValidElement(spec), - "ReactClass: You're attempting to " + - 'use a component as a mixin. Instead, just use a regular object.' - ); - - var proto = Constructor.prototype; - var autoBindPairs = proto.__reactAutoBindPairs; - - // By handling mixins before any other properties, we ensure the same - // chaining order is applied to methods with DEFINE_MANY policy, whether - // mixins are listed before or after these methods in the spec. - if (spec.hasOwnProperty(MIXINS_KEY)) { - RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); - } - - for (var name in spec) { - if (!spec.hasOwnProperty(name)) { - continue; - } - - if (name === MIXINS_KEY) { - // We have already handled mixins in a special case above. - continue; - } - - var property = spec[name]; - var isAlreadyDefined = proto.hasOwnProperty(name); - validateMethodOverride(isAlreadyDefined, name); - - if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { - RESERVED_SPEC_KEYS[name](Constructor, property); - } else { - // Setup methods on prototype: - // The following member methods should not be automatically bound: - // 1. Expected ReactClass methods (in the "interface"). - // 2. Overridden methods (that were mixed in). - var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); - var isFunction = typeof property === 'function'; - var shouldAutoBind = - isFunction && - !isReactClassMethod && - !isAlreadyDefined && - spec.autobind !== false; - - if (shouldAutoBind) { - autoBindPairs.push(name, property); - proto[name] = property; - } else { - if (isAlreadyDefined) { - var specPolicy = ReactClassInterface[name]; - - // These cases should already be caught by validateMethodOverride. - _invariant( - isReactClassMethod && - (specPolicy === 'DEFINE_MANY_MERGED' || - specPolicy === 'DEFINE_MANY'), - 'ReactClass: Unexpected spec policy %s for key %s ' + - 'when mixing in component specs.', - specPolicy, - name - ); - - // For methods which are defined more than once, call the existing - // methods before calling the new property, merging if appropriate. - if (specPolicy === 'DEFINE_MANY_MERGED') { - proto[name] = createMergedResultFunction(proto[name], property); - } else if (specPolicy === 'DEFINE_MANY') { - proto[name] = createChainedFunction(proto[name], property); - } - } else { - proto[name] = property; - if (false) { - // Add verbose displayName to the function, which helps when looking - // at profiling tools. - if (typeof property === 'function' && spec.displayName) { - proto[name].displayName = spec.displayName + '_' + name; - } - } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; } } } + var childrenString = String(children); + true ? false ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; } } - function mixStaticSpecIntoComponent(Constructor, statics) { - if (!statics) { - return; - } - for (var name in statics) { - var property = statics[name]; - if (!statics.hasOwnProperty(name)) { - continue; - } - - var isReserved = name in RESERVED_SPEC_KEYS; - _invariant( - !isReserved, - 'ReactClass: You are attempting to define a reserved ' + - 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + - 'as an instance property instead; it will still be accessible on the ' + - 'constructor.', - name - ); + return subtreeCount; +} - var isInherited = name in Constructor; - _invariant( - !isInherited, - 'ReactClass: You are attempting to define ' + - '`%s` on your component more than once. This conflict may be ' + - 'due to a mixin.', - name - ); - Constructor[name] = property; - } +/** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; } - /** - * Merge two objects, but throw if both contain the same key. - * - * @param {object} one The first object, which is mutated. - * @param {object} two The second object - * @return {object} one after it has been mutated to contain everything in two. - */ - function mergeIntoWithNoDuplicateKeys(one, two) { - _invariant( - one && two && typeof one === 'object' && typeof two === 'object', - 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' - ); - - for (var key in two) { - if (two.hasOwnProperty(key)) { - _invariant( - one[key] === undefined, - 'mergeIntoWithNoDuplicateKeys(): ' + - 'Tried to merge two objects with the same key: `%s`. This conflict ' + - 'may be due to a mixin; in particular, this may be caused by two ' + - 'getInitialState() or getDefaultProps() methods returning objects ' + - 'with clashing keys.', - key - ); - one[key] = two[key]; - } - } - return one; - } + return traverseAllChildrenImpl(children, '', callback, traverseContext); +} - /** - * Creates a function that invokes two functions and merges their return values. - * - * @param {function} one Function to invoke first. - * @param {function} two Function to invoke second. - * @return {function} Function that invokes the two argument functions. - * @private - */ - function createMergedResultFunction(one, two) { - return function mergedResult() { - var a = one.apply(this, arguments); - var b = two.apply(this, arguments); - if (a == null) { - return b; - } else if (b == null) { - return a; - } - var c = {}; - mergeIntoWithNoDuplicateKeys(c, a); - mergeIntoWithNoDuplicateKeys(c, b); - return c; - }; - } +module.exports = traverseAllChildren; - /** - * Creates a function that invokes two functions and ignores their return vales. - * - * @param {function} one Function to invoke first. - * @param {function} two Function to invoke second. - * @return {function} Function that invokes the two argument functions. - * @private - */ - function createChainedFunction(one, two) { - return function chainedFunction() { - one.apply(this, arguments); - two.apply(this, arguments); - }; - } +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Binds a method to the component. - * - * @param {object} component Component whose method is going to be bound. - * @param {function} method Method to be bound. - * @return {function} The bound method. - */ - function bindAutoBindMethod(component, method) { - var boundMethod = method.bind(component); - if (false) { - boundMethod.__reactBoundContext = component; - boundMethod.__reactBoundMethod = method; - boundMethod.__reactBoundArguments = null; - var componentName = component.constructor.displayName; - var _bind = boundMethod.bind; - boundMethod.bind = function(newThis) { - for ( - var _len = arguments.length, - args = Array(_len > 1 ? _len - 1 : 0), - _key = 1; - _key < _len; - _key++ - ) { - args[_key - 1] = arguments[_key]; - } +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ - // User is trying to bind() an autobound method; we effectively will - // ignore the value of "this" that the user is trying to use, so - // let's warn. - if (newThis !== component && newThis !== null) { - if (process.env.NODE_ENV !== 'production') { - warning( - false, - 'bind(): React component methods may only be bound to the ' + - 'component instance. See %s', - componentName - ); - } - } else if (!args.length) { - if (process.env.NODE_ENV !== 'production') { - warning( - false, - 'bind(): You are binding a component method to the component. ' + - 'React does this for you automatically in a high-performance ' + - 'way, so you can safely remove this call. See %s', - componentName - ); - } - return boundMethod; - } - var reboundMethod = _bind.apply(boundMethod, arguments); - reboundMethod.__reactBoundContext = component; - reboundMethod.__reactBoundMethod = method; - reboundMethod.__reactBoundArguments = args; - return reboundMethod; - }; - } - return boundMethod; - } - /** - * Binds all auto-bound methods in a component. - * - * @param {object} component Component whose method is going to be bound. - */ - function bindAutoBindMethods(component) { - var pairs = component.__reactAutoBindPairs; - for (var i = 0; i < pairs.length; i += 2) { - var autoBindKey = pairs[i]; - var method = pairs[i + 1]; - component[autoBindKey] = bindAutoBindMethod(component, method); - } - } - var IsMountedPreMixin = { - componentDidMount: function() { - this.__isMounted = true; - } - }; +/** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ - var IsMountedPostMixin = { - componentWillUnmount: function() { - this.__isMounted = false; - } +function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2' }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); - /** - * Add more to the ReactClass base class. These are all legacy features and - * therefore not already part of the modern ReactComponent. - */ - var ReactClassMixin = { - /** - * TODO: This will be deprecated because state should always keep a consistent - * type signature and the only use case for this, is to avoid that. - */ - replaceState: function(newState, callback) { - this.updater.enqueueReplaceState(this, newState, callback); - }, + return '$' + escapedString; +} - /** - * Checks whether or not this composite component is mounted. - * @return {boolean} True if mounted, false otherwise. - * @protected - * @final - */ - isMounted: function() { - if (false) { - warning( - this.__didWarnIsMounted, - '%s: isMounted is deprecated. Instead, make sure to clean up ' + - 'subscriptions and pending requests in componentWillUnmount to ' + - 'prevent memory leaks.', - (this.constructor && this.constructor.displayName) || - this.name || - 'Component' - ); - this.__didWarnIsMounted = true; - } - return !!this.__isMounted; - } +/** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ +function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':' }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); - var ReactClassComponent = function() {}; - _assign( - ReactClassComponent.prototype, - ReactComponent.prototype, - ReactClassMixin - ); - - /** - * Creates a composite component class given a class specification. - * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass - * - * @param {object} spec Class specification (which must define `render`). - * @return {function} Component constructor function. - * @public - */ - function createClass(spec) { - // To keep our warnings more understandable, we'll use a little hack here to - // ensure that Constructor.name !== 'Constructor'. This makes sure we don't - // unnecessarily identify a class without displayName as 'Constructor'. - var Constructor = identity(function(props, context, updater) { - // This constructor gets overridden by mocks. The argument is used - // by mocks to assert on what gets mounted. - - if (false) { - warning( - this instanceof Constructor, - 'Something is calling a React component directly. Use a factory or ' + - 'JSX instead. See: https://fb.me/react-legacyfactory' - ); - } - - // Wire up auto-binding - if (this.__reactAutoBindPairs.length) { - bindAutoBindMethods(this); - } - - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); +} - this.state = null; +var KeyEscapeUtils = { + escape: escape, + unescape: unescape +}; - // ReactClasses doesn't have constructors. Instead, they use the - // getInitialState and componentWillMount methods for initialization. +module.exports = KeyEscapeUtils; - var initialState = this.getInitialState ? this.getInitialState() : null; - if (false) { - // We allow auto-mocks to proceed as if they're returning null. - if ( - initialState === undefined && - this.getInitialState._isMockFunction - ) { - // This is probably bad practice. Consider warning here and - // deprecating this convenience. - initialState = null; - } - } - _invariant( - typeof initialState === 'object' && !Array.isArray(initialState), - '%s.getInitialState(): must return an object or null', - Constructor.displayName || 'ReactCompositeComponent' - ); +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { - this.state = initialState; - }); - Constructor.prototype = new ReactClassComponent(); - Constructor.prototype.constructor = Constructor; - Constructor.prototype.__reactAutoBindPairs = []; +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ - injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); - mixSpecIntoComponent(Constructor, IsMountedPreMixin); - mixSpecIntoComponent(Constructor, spec); - mixSpecIntoComponent(Constructor, IsMountedPostMixin); - // Initialize the defaultProps property after all mixins have been merged. - if (Constructor.getDefaultProps) { - Constructor.defaultProps = Constructor.getDefaultProps(); - } +// React 15.5 references this module, and assumes PropTypes are still callable in production. +// Therefore we re-export development-only version with all the PropTypes checks here. +// However if one is migrating to the `prop-types` npm library, they will go through the +// `index.js` entry point, and it will branch depending on the environment. +var factory = __webpack_require__(357); +module.exports = function(isValidElement) { + // It is still allowed in 15.5. + var throwOnDirectAccess = false; + return factory(isValidElement, throwOnDirectAccess); +}; - if (false) { - // This is a tag to indicate that the use of these method names is ok, - // since it's used with createClass. If it's not, then it's likely a - // mistake so we'll warn you to use the static property, property - // initializer or constructor respectively. - if (Constructor.getDefaultProps) { - Constructor.getDefaultProps.isReactClassApproved = {}; - } - if (Constructor.prototype.getInitialState) { - Constructor.prototype.getInitialState.isReactClassApproved = {}; - } - } - _invariant( - Constructor.prototype.render, - 'createClass(...): Class specification must implement a `render` method.' - ); +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { - if (false) { - warning( - !Constructor.prototype.componentShouldUpdate, - '%s has a method called ' + - 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + - 'The name is phrased as a question because the function is ' + - 'expected to return a value.', - spec.displayName || 'A component' - ); - warning( - !Constructor.prototype.componentWillRecieveProps, - '%s has a method called ' + - 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', - spec.displayName || 'A component' - ); - } +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ - // Reduce time spent doing lookups by setting these on the prototype. - for (var methodName in ReactClassInterface) { - if (!Constructor.prototype[methodName]) { - Constructor.prototype[methodName] = null; - } - } - return Constructor; - } - return createClass; -} +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; -module.exports = factory; +module.exports = ReactPropTypesSecret; /***/ }), -/* 216 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16360,7 +16847,7 @@ var ReactDOMComponentFlags = { module.exports = ReactDOMComponentFlags; /***/ }), -/* 217 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16377,7 +16864,7 @@ module.exports = ReactDOMComponentFlags; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); var invariant = __webpack_require__(9); @@ -16423,7 +16910,7 @@ function accumulateInto(current, next) { module.exports = accumulateInto; /***/ }), -/* 218 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16459,7 +16946,7 @@ function forEachAccumulated(arr, cb, scope) { module.exports = forEachAccumulated; /***/ }), -/* 219 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16475,7 +16962,7 @@ module.exports = forEachAccumulated; -var ExecutionEnvironment = __webpack_require__(21); +var ExecutionEnvironment = __webpack_require__(23); var contentKey = null; @@ -16497,7 +16984,7 @@ function getTextContentAccessor() { module.exports = getTextContentAccessor; /***/ }), -/* 220 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16514,11 +17001,11 @@ module.exports = getTextContentAccessor; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var PooledClass = __webpack_require__(53); +var PooledClass = __webpack_require__(58); var invariant = __webpack_require__(9); @@ -16621,7 +17108,7 @@ var CallbackQueue = function () { module.exports = PooledClass.addPoolingTo(CallbackQueue); /***/ }), -/* 221 */ +/* 230 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16648,135 +17135,7 @@ var ReactFeatureFlags = { module.exports = ReactFeatureFlags; /***/ }), -/* 222 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - - -var ReactDOMComponentTree = __webpack_require__(16); - -function isCheckable(elem) { - var type = elem.type; - var nodeName = elem.nodeName; - return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio'); -} - -function getTracker(inst) { - return inst._wrapperState.valueTracker; -} - -function attachTracker(inst, tracker) { - inst._wrapperState.valueTracker = tracker; -} - -function detachTracker(inst) { - delete inst._wrapperState.valueTracker; -} - -function getValueFromNode(node) { - var value; - if (node) { - value = isCheckable(node) ? '' + node.checked : node.value; - } - return value; -} - -var inputValueTracking = { - // exposed for testing - _getTrackerFromNode: function (node) { - return getTracker(ReactDOMComponentTree.getInstanceFromNode(node)); - }, - - - track: function (inst) { - if (getTracker(inst)) { - return; - } - - var node = ReactDOMComponentTree.getNodeFromInstance(inst); - var valueField = isCheckable(node) ? 'checked' : 'value'; - var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); - - var currentValue = '' + node[valueField]; - - // if someone has already defined a value or Safari, then bail - // and don't track value will cause over reporting of changes, - // but it's better then a hard failure - // (needed for certain tests that spyOn input values and Safari) - if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') { - return; - } - - Object.defineProperty(node, valueField, { - enumerable: descriptor.enumerable, - configurable: true, - get: function () { - return descriptor.get.call(this); - }, - set: function (value) { - currentValue = '' + value; - descriptor.set.call(this, value); - } - }); - - attachTracker(inst, { - getValue: function () { - return currentValue; - }, - setValue: function (value) { - currentValue = '' + value; - }, - stopTracking: function () { - detachTracker(inst); - delete node[valueField]; - } - }); - }, - - updateValueIfChanged: function (inst) { - if (!inst) { - return false; - } - var tracker = getTracker(inst); - - if (!tracker) { - inputValueTracking.track(inst); - return true; - } - - var lastValue = tracker.getValue(); - var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst)); - - if (nextValue !== lastValue) { - tracker.setValue(nextValue); - return true; - } - - return false; - }, - stopTracking: function (inst) { - var tracker = getTracker(inst); - if (tracker) { - tracker.stopTracking(); - } - } -}; - -module.exports = inputValueTracking; - -/***/ }), -/* 223 */ +/* 231 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16798,21 +17157,21 @@ module.exports = inputValueTracking; */ var supportedInputTypes = { - color: true, - date: true, - datetime: true, + 'color': true, + 'date': true, + 'datetime': true, 'datetime-local': true, - email: true, - month: true, - number: true, - password: true, - range: true, - search: true, - tel: true, - text: true, - time: true, - url: true, - week: true + 'email': true, + 'month': true, + 'number': true, + 'password': true, + 'range': true, + 'search': true, + 'tel': true, + 'text': true, + 'time': true, + 'url': true, + 'week': true }; function isTextInputElement(elem) { @@ -16832,7 +17191,7 @@ function isTextInputElement(elem) { module.exports = isTextInputElement; /***/ }), -/* 224 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16848,9 +17207,9 @@ module.exports = isTextInputElement; -var ExecutionEnvironment = __webpack_require__(21); -var escapeTextContentForBrowser = __webpack_require__(107); -var setInnerHTML = __webpack_require__(106); +var ExecutionEnvironment = __webpack_require__(23); +var escapeTextContentForBrowser = __webpack_require__(110); +var setInnerHTML = __webpack_require__(109); /** * Set the textContent property of a node, ensuring that whitespace is preserved @@ -16889,7 +17248,7 @@ if (ExecutionEnvironment.canUseDOM) { module.exports = setTextContent; /***/ }), -/* 225 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16921,7 +17280,7 @@ function focusNode(node) { module.exports = focusNode; /***/ }), -/* 226 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16957,13 +17316,7 @@ var isUnitlessNumber = { flexNegative: true, flexOrder: true, gridRow: true, - gridRowEnd: true, - gridRowSpan: true, - gridRowStart: true, gridColumn: true, - gridColumnEnd: true, - gridColumnSpan: true, - gridColumnStart: true, fontWeight: true, lineClamp: true, lineHeight: true, @@ -17080,7 +17433,7 @@ var CSSProperty = { module.exports = CSSProperty; /***/ }), -/* 227 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17096,12 +17449,12 @@ module.exports = CSSProperty; -var DOMProperty = __webpack_require__(67); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactInstrumentation = __webpack_require__(29); +var DOMProperty = __webpack_require__(72); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactInstrumentation = __webpack_require__(27); -var quoteAttributeValueForBrowser = __webpack_require__(382); -var warning = __webpack_require__(12); +var quoteAttributeValueForBrowser = __webpack_require__(391); +var warning = __webpack_require__(11); var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); var illegalAttributeNameCache = {}; @@ -17131,6 +17484,7 @@ function shouldIgnoreValue(propertyInfo, value) { * Operations for dealing with DOM properties. */ var DOMPropertyOperations = { + /** * Creates markup for the ID property. * @@ -17315,12 +17669,13 @@ var DOMPropertyOperations = { }); } } + }; module.exports = DOMPropertyOperations; /***/ }), -/* 228 */ +/* 236 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17336,13 +17691,13 @@ module.exports = DOMPropertyOperations; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var LinkedValueUtils = __webpack_require__(149); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactUpdates = __webpack_require__(31); +var LinkedValueUtils = __webpack_require__(155); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactUpdates = __webpack_require__(28); -var warning = __webpack_require__(12); +var warning = __webpack_require__(11); var didWarnValueLink = false; var didWarnValueDefaultValue = false; @@ -17525,197 +17880,7 @@ function _handleChange(event) { module.exports = ReactDOMSelect; /***/ }), -/* 229 */ -/***/ (function(module, exports) { - -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - - -/***/ }), -/* 230 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17731,21 +17896,24 @@ process.umask = function() { return 0; }; -var _prodInvariant = __webpack_require__(13), - _assign = __webpack_require__(15); +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); -var ReactCompositeComponent = __webpack_require__(391); -var ReactEmptyComponent = __webpack_require__(232); -var ReactHostComponent = __webpack_require__(233); +var ReactCompositeComponent = __webpack_require__(400); +var ReactEmptyComponent = __webpack_require__(239); +var ReactHostComponent = __webpack_require__(240); -var getNextDebugID = __webpack_require__(392); +var getNextDebugID = __webpack_require__(401); var invariant = __webpack_require__(9); -var warning = __webpack_require__(12); +var warning = __webpack_require__(11); // To avoid a cyclic dependency, we create the final class in this module var ReactCompositeComponentWrapper = function (element) { this.construct(element); }; +_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, { + _instantiateReactComponent: instantiateReactComponent +}); function getDeclarationErrorAddendum(owner) { if (owner) { @@ -17788,7 +17956,7 @@ function instantiateReactComponent(node, shouldHaveDebugID) { var info = ''; if (false) { if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + "it's defined in."; + info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.'; } } info += getDeclarationErrorAddendum(element._owner); @@ -17842,14 +18010,10 @@ function instantiateReactComponent(node, shouldHaveDebugID) { return instance; } -_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, { - _instantiateReactComponent: instantiateReactComponent -}); - module.exports = instantiateReactComponent; /***/ }), -/* 231 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17866,9 +18030,9 @@ module.exports = instantiateReactComponent; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); -var React = __webpack_require__(65); +var React = __webpack_require__(56); var invariant = __webpack_require__(9); @@ -17894,7 +18058,7 @@ var ReactNodeTypes = { module.exports = ReactNodeTypes; /***/ }), -/* 232 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17929,7 +18093,7 @@ ReactEmptyComponent.injection = ReactEmptyComponentInjection; module.exports = ReactEmptyComponent; /***/ }), -/* 233 */ +/* 240 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17945,7 +18109,7 @@ module.exports = ReactEmptyComponent; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); var invariant = __webpack_require__(9); @@ -18002,7 +18166,7 @@ var ReactHostComponent = { module.exports = ReactHostComponent; /***/ }), -/* 234 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18018,15 +18182,15 @@ module.exports = ReactHostComponent; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); -var ReactCurrentOwner = __webpack_require__(37); -var REACT_ELEMENT_TYPE = __webpack_require__(393); +var ReactCurrentOwner = __webpack_require__(36); +var REACT_ELEMENT_TYPE = __webpack_require__(402); -var getIteratorFn = __webpack_require__(394); +var getIteratorFn = __webpack_require__(403); var invariant = __webpack_require__(9); -var KeyEscapeUtils = __webpack_require__(152); -var warning = __webpack_require__(12); +var KeyEscapeUtils = __webpack_require__(158); +var warning = __webpack_require__(11); var SEPARATOR = '.'; var SUBSEPARATOR = ':'; @@ -18139,7 +18303,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) if (false) { addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; if (children._isReactElement) { - addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.'; + addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.'; } if (ReactCurrentOwner.current) { var name = ReactCurrentOwner.current.getName(); @@ -18183,391 +18347,7 @@ function traverseAllChildren(children, callback, traverseContext) { module.exports = traverseAllChildren; /***/ }), -/* 235 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - - -var _prodInvariant = __webpack_require__(85); - -var ReactCurrentOwner = __webpack_require__(37); - -var invariant = __webpack_require__(9); -var warning = __webpack_require__(12); - -function isNative(fn) { - // Based on isNative() from Lodash - var funcToString = Function.prototype.toString; - var hasOwnProperty = Object.prototype.hasOwnProperty; - var reIsNative = RegExp('^' + funcToString - // Take an example native function source for comparison - .call(hasOwnProperty - // Strip regex characters so we can use it for regex - ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&' - // Remove hasOwnProperty from the template to make it generic - ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); - try { - var source = funcToString.call(fn); - return reIsNative.test(source); - } catch (err) { - return false; - } -} - -var canUseCollections = -// Array.from -typeof Array.from === 'function' && -// Map -typeof Map === 'function' && isNative(Map) && -// Map.prototype.keys -Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) && -// Set -typeof Set === 'function' && isNative(Set) && -// Set.prototype.keys -Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys); - -var setItem; -var getItem; -var removeItem; -var getItemIDs; -var addRoot; -var removeRoot; -var getRootIDs; - -if (canUseCollections) { - var itemMap = new Map(); - var rootIDSet = new Set(); - - setItem = function (id, item) { - itemMap.set(id, item); - }; - getItem = function (id) { - return itemMap.get(id); - }; - removeItem = function (id) { - itemMap['delete'](id); - }; - getItemIDs = function () { - return Array.from(itemMap.keys()); - }; - - addRoot = function (id) { - rootIDSet.add(id); - }; - removeRoot = function (id) { - rootIDSet['delete'](id); - }; - getRootIDs = function () { - return Array.from(rootIDSet.keys()); - }; -} else { - var itemByKey = {}; - var rootByKey = {}; - - // Use non-numeric keys to prevent V8 performance issues: - // https://github.com/facebook/react/pull/7232 - var getKeyFromID = function (id) { - return '.' + id; - }; - var getIDFromKey = function (key) { - return parseInt(key.substr(1), 10); - }; - - setItem = function (id, item) { - var key = getKeyFromID(id); - itemByKey[key] = item; - }; - getItem = function (id) { - var key = getKeyFromID(id); - return itemByKey[key]; - }; - removeItem = function (id) { - var key = getKeyFromID(id); - delete itemByKey[key]; - }; - getItemIDs = function () { - return Object.keys(itemByKey).map(getIDFromKey); - }; - - addRoot = function (id) { - var key = getKeyFromID(id); - rootByKey[key] = true; - }; - removeRoot = function (id) { - var key = getKeyFromID(id); - delete rootByKey[key]; - }; - getRootIDs = function () { - return Object.keys(rootByKey).map(getIDFromKey); - }; -} - -var unmountedIDs = []; - -function purgeDeep(id) { - var item = getItem(id); - if (item) { - var childIDs = item.childIDs; - - removeItem(id); - childIDs.forEach(purgeDeep); - } -} - -function describeComponentFrame(name, source, ownerName) { - return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); -} - -function getDisplayName(element) { - if (element == null) { - return '#empty'; - } else if (typeof element === 'string' || typeof element === 'number') { - return '#text'; - } else if (typeof element.type === 'string') { - return element.type; - } else { - return element.type.displayName || element.type.name || 'Unknown'; - } -} - -function describeID(id) { - var name = ReactComponentTreeHook.getDisplayName(id); - var element = ReactComponentTreeHook.getElement(id); - var ownerID = ReactComponentTreeHook.getOwnerID(id); - var ownerName; - if (ownerID) { - ownerName = ReactComponentTreeHook.getDisplayName(ownerID); - } - false ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0; - return describeComponentFrame(name, element && element._source, ownerName); -} - -var ReactComponentTreeHook = { - onSetChildren: function (id, nextChildIDs) { - var item = getItem(id); - !item ? false ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; - item.childIDs = nextChildIDs; - - for (var i = 0; i < nextChildIDs.length; i++) { - var nextChildID = nextChildIDs[i]; - var nextChild = getItem(nextChildID); - !nextChild ? false ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0; - !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? false ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0; - !nextChild.isMounted ? false ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0; - if (nextChild.parentID == null) { - nextChild.parentID = id; - // TODO: This shouldn't be necessary but mounting a new root during in - // componentWillMount currently causes not-yet-mounted components to - // be purged from our tree data so their parent id is missing. - } - !(nextChild.parentID === id) ? false ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0; - } - }, - onBeforeMountComponent: function (id, element, parentID) { - var item = { - element: element, - parentID: parentID, - text: null, - childIDs: [], - isMounted: false, - updateCount: 0 - }; - setItem(id, item); - }, - onBeforeUpdateComponent: function (id, element) { - var item = getItem(id); - if (!item || !item.isMounted) { - // We may end up here as a result of setState() in componentWillUnmount(). - // In this case, ignore the element. - return; - } - item.element = element; - }, - onMountComponent: function (id) { - var item = getItem(id); - !item ? false ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; - item.isMounted = true; - var isRoot = item.parentID === 0; - if (isRoot) { - addRoot(id); - } - }, - onUpdateComponent: function (id) { - var item = getItem(id); - if (!item || !item.isMounted) { - // We may end up here as a result of setState() in componentWillUnmount(). - // In this case, ignore the element. - return; - } - item.updateCount++; - }, - onUnmountComponent: function (id) { - var item = getItem(id); - if (item) { - // We need to check if it exists. - // `item` might not exist if it is inside an error boundary, and a sibling - // error boundary child threw while mounting. Then this instance never - // got a chance to mount, but it still gets an unmounting event during - // the error boundary cleanup. - item.isMounted = false; - var isRoot = item.parentID === 0; - if (isRoot) { - removeRoot(id); - } - } - unmountedIDs.push(id); - }, - purgeUnmountedComponents: function () { - if (ReactComponentTreeHook._preventPurging) { - // Should only be used for testing. - return; - } - - for (var i = 0; i < unmountedIDs.length; i++) { - var id = unmountedIDs[i]; - purgeDeep(id); - } - unmountedIDs.length = 0; - }, - isMounted: function (id) { - var item = getItem(id); - return item ? item.isMounted : false; - }, - getCurrentStackAddendum: function (topElement) { - var info = ''; - if (topElement) { - var name = getDisplayName(topElement); - var owner = topElement._owner; - info += describeComponentFrame(name, topElement._source, owner && owner.getName()); - } - - var currentOwner = ReactCurrentOwner.current; - var id = currentOwner && currentOwner._debugID; - - info += ReactComponentTreeHook.getStackAddendumByID(id); - return info; - }, - getStackAddendumByID: function (id) { - var info = ''; - while (id) { - info += describeID(id); - id = ReactComponentTreeHook.getParentID(id); - } - return info; - }, - getChildIDs: function (id) { - var item = getItem(id); - return item ? item.childIDs : []; - }, - getDisplayName: function (id) { - var element = ReactComponentTreeHook.getElement(id); - if (!element) { - return null; - } - return getDisplayName(element); - }, - getElement: function (id) { - var item = getItem(id); - return item ? item.element : null; - }, - getOwnerID: function (id) { - var element = ReactComponentTreeHook.getElement(id); - if (!element || !element._owner) { - return null; - } - return element._owner._debugID; - }, - getParentID: function (id) { - var item = getItem(id); - return item ? item.parentID : null; - }, - getSource: function (id) { - var item = getItem(id); - var element = item ? item.element : null; - var source = element != null ? element._source : null; - return source; - }, - getText: function (id) { - var element = ReactComponentTreeHook.getElement(id); - if (typeof element === 'string') { - return element; - } else if (typeof element === 'number') { - return '' + element; - } else { - return null; - } - }, - getUpdateCount: function (id) { - var item = getItem(id); - return item ? item.updateCount : 0; - }, - - - getRootIDs: getRootIDs, - getRegisteredIDs: getItemIDs, - - pushNonStandardWarningStack: function (isCreatingElement, currentSource) { - if (typeof console.reactStack !== 'function') { - return; - } - - var stack = []; - var currentOwner = ReactCurrentOwner.current; - var id = currentOwner && currentOwner._debugID; - - try { - if (isCreatingElement) { - stack.push({ - name: id ? ReactComponentTreeHook.getDisplayName(id) : null, - fileName: currentSource ? currentSource.fileName : null, - lineNumber: currentSource ? currentSource.lineNumber : null - }); - } - - while (id) { - var element = ReactComponentTreeHook.getElement(id); - var parentID = ReactComponentTreeHook.getParentID(id); - var ownerID = ReactComponentTreeHook.getOwnerID(id); - var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null; - var source = element && element._source; - stack.push({ - name: ownerName, - fileName: source ? source.fileName : null, - lineNumber: source ? source.lineNumber : null - }); - id = parentID; - } - } catch (err) { - // Internal state is messed up. - // Stop building the stack (it's just a nice to have). - } - - console.reactStack(stack); - }, - popNonStandardWarningStack: function () { - if (typeof console.reactStackEnd !== 'function') { - return; - } - console.reactStackEnd(); - } -}; - -module.exports = ReactComponentTreeHook; - -/***/ }), -/* 236 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18575,16 +18355,23 @@ module.exports = ReactComponentTreeHook; /** * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * @typechecks */ -var emptyFunction = __webpack_require__(24); +var emptyFunction = __webpack_require__(22); /** * Upstream version of event listener. Does not take into account specific @@ -18649,7 +18436,7 @@ var EventListener = { module.exports = EventListener; /***/ }), -/* 237 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18665,11 +18452,11 @@ module.exports = EventListener; -var ReactDOMSelection = __webpack_require__(406); +var ReactDOMSelection = __webpack_require__(415); -var containsNode = __webpack_require__(408); -var focusNode = __webpack_require__(225); -var getActiveElement = __webpack_require__(238); +var containsNode = __webpack_require__(417); +var focusNode = __webpack_require__(233); +var getActiveElement = __webpack_require__(244); function isInDocument(node) { return containsNode(document.documentElement, node); @@ -18682,6 +18469,7 @@ function isInDocument(node) { * Input selection module for React. */ var ReactInputSelection = { + hasSelectionCapabilities: function (elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true'); @@ -18777,7 +18565,7 @@ var ReactInputSelection = { module.exports = ReactInputSelection; /***/ }), -/* 238 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18821,7 +18609,7 @@ function getActiveElement(doc) /*?DOMElement*/{ module.exports = getActiveElement; /***/ }), -/* 239 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18837,30 +18625,30 @@ module.exports = getActiveElement; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); -var DOMLazyTree = __webpack_require__(72); -var DOMProperty = __webpack_require__(67); -var React = __webpack_require__(65); -var ReactBrowserEventEmitter = __webpack_require__(108); -var ReactCurrentOwner = __webpack_require__(37); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactDOMContainerInfo = __webpack_require__(423); -var ReactDOMFeatureFlags = __webpack_require__(424); -var ReactFeatureFlags = __webpack_require__(221); -var ReactInstanceMap = __webpack_require__(86); -var ReactInstrumentation = __webpack_require__(29); -var ReactMarkupChecksum = __webpack_require__(425); -var ReactReconciler = __webpack_require__(70); -var ReactUpdateQueue = __webpack_require__(153); -var ReactUpdates = __webpack_require__(31); +var DOMLazyTree = __webpack_require__(77); +var DOMProperty = __webpack_require__(72); +var React = __webpack_require__(56); +var ReactBrowserEventEmitter = __webpack_require__(111); +var ReactCurrentOwner = __webpack_require__(36); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactDOMContainerInfo = __webpack_require__(432); +var ReactDOMFeatureFlags = __webpack_require__(433); +var ReactFeatureFlags = __webpack_require__(230); +var ReactInstanceMap = __webpack_require__(89); +var ReactInstrumentation = __webpack_require__(27); +var ReactMarkupChecksum = __webpack_require__(434); +var ReactReconciler = __webpack_require__(75); +var ReactUpdateQueue = __webpack_require__(160); +var ReactUpdates = __webpack_require__(28); -var emptyObject = __webpack_require__(102); -var instantiateReactComponent = __webpack_require__(230); +var emptyObject = __webpack_require__(105); +var instantiateReactComponent = __webpack_require__(237); var invariant = __webpack_require__(9); -var setInnerHTML = __webpack_require__(106); -var shouldUpdateReactComponent = __webpack_require__(151); -var warning = __webpack_require__(12); +var setInnerHTML = __webpack_require__(109); +var shouldUpdateReactComponent = __webpack_require__(157); +var warning = __webpack_require__(11); var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME; @@ -19083,6 +18871,7 @@ TopLevelWrapper.isReactTopLevelWrapper = true; * Inside of `container`, the first element rendered is the "reactRoot". */ var ReactMount = { + TopLevelWrapper: TopLevelWrapper, /** @@ -19171,14 +18960,13 @@ var ReactMount = { _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render'); - !React.isValidElement(nextElement) ? false ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or
." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or .' : // Check if it quacks like an element - nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or
." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or .' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0; + !React.isValidElement(nextElement) ? false ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or
.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or .' : + // Check if it quacks like an element + nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or
.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or .' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0; false ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0; - var nextWrappedElement = React.createElement(TopLevelWrapper, { - child: nextElement - }); + var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement }); var nextContext; if (parentComponent) { @@ -19267,7 +19055,7 @@ var ReactMount = { !isValidContainer(container) ? false ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0; if (false) { - process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0; } var prevComponent = getTopLevelWrapperInContainer(container); @@ -19280,7 +19068,7 @@ var ReactMount = { var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME); if (false) { - process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0; } return false; @@ -19364,7 +19152,7 @@ var ReactMount = { module.exports = ReactMount; /***/ }), -/* 240 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -19380,7 +19168,7 @@ module.exports = ReactMount; -var ReactNodeTypes = __webpack_require__(231); +var ReactNodeTypes = __webpack_require__(238); function getHostComponentFromComposite(inst) { var type; @@ -19399,17 +19187,17 @@ function getHostComponentFromComposite(inst) { module.exports = getHostComponentFromComposite; /***/ }), -/* 241 */ +/* 247 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = createTransitionManager; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(73); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(432); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(433); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(434); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(435); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(436); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(440); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(441); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(442); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(443); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(444); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -19428,19 +19216,12 @@ function hasAnyProperties(object) { function createTransitionManager(history, routes) { var state = {}; - var _getTransitionUtils = Object(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["a" /* default */])(), - runEnterHooks = _getTransitionUtils.runEnterHooks, - runChangeHooks = _getTransitionUtils.runChangeHooks, - runLeaveHooks = _getTransitionUtils.runLeaveHooks; - // Signature should be (location, indexOnly), but needs to support (path, // query, indexOnly) - - function isActive(location, indexOnly) { location = history.createLocation(location); - return Object(__WEBPACK_IMPORTED_MODULE_3__isActive__["a" /* default */])(location, indexOnly, state.location, state.routes, state.params); + return __WEBPACK_IMPORTED_MODULE_3__isActive__["a" /* default */](location, indexOnly, state.location, state.routes, state.params); } var partialNextState = void 0; @@ -19450,7 +19231,7 @@ function createTransitionManager(history, routes) { // Continue from where we left off. finishMatch(partialNextState, callback); } else { - Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */])(routes, location, function (error, nextState) { + __WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */](routes, location, function (error, nextState) { if (error) { callback(error); } else if (nextState) { @@ -19463,12 +19244,12 @@ function createTransitionManager(history, routes) { } function finishMatch(nextState, callback) { - var _computeChangedRoutes = Object(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */])(state, nextState), + var _computeChangedRoutes = __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */](state, nextState), leaveRoutes = _computeChangedRoutes.leaveRoutes, changeRoutes = _computeChangedRoutes.changeRoutes, enterRoutes = _computeChangedRoutes.enterRoutes; - runLeaveHooks(leaveRoutes, state); + __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["c" /* runLeaveHooks */](leaveRoutes, state); // Tear down confirmation hooks for left routes leaveRoutes.filter(function (route) { @@ -19476,17 +19257,17 @@ function createTransitionManager(history, routes) { }).forEach(removeListenBeforeHooksForRoute); // change and enter hooks are run in series - runChangeHooks(changeRoutes, state, nextState, function (error, redirectInfo) { + __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["a" /* runChangeHooks */](changeRoutes, state, nextState, function (error, redirectInfo) { if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); - runEnterHooks(enterRoutes, nextState, finishEnterHooks); + __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["b" /* runEnterHooks */](enterRoutes, nextState, finishEnterHooks); }); function finishEnterHooks(error, redirectInfo) { if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); // TODO: Fetch components after state is updated. - Object(__WEBPACK_IMPORTED_MODULE_4__getComponents__["a" /* default */])(nextState, function (error, components) { + __WEBPACK_IMPORTED_MODULE_4__getComponents__["a" /* default */](nextState, function (error, components) { if (error) { callback(error); } else { @@ -19521,7 +19302,7 @@ function createTransitionManager(history, routes) { } function transitionHook(location, callback) { - Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */])(routes, location, function (error, nextState) { + __WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */](routes, location, function (error, nextState) { if (nextState == null) { // TODO: We didn't actually match anything, but hang // onto error/nextState so we don't have to matchRoutes @@ -19534,7 +19315,7 @@ function createTransitionManager(history, routes) { // matchRoutes() again in the listen callback. partialNextState = _extends({}, nextState, { location: location }); - var hooks = getRouteHooksForRoutes(Object(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */])(state, partialNextState).leaveRoutes); + var hooks = getRouteHooksForRoutes(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */](state, partialNextState).leaveRoutes); var result = void 0; for (var i = 0, len = hooks.length; result == null && i < len; ++i) { @@ -19670,7 +19451,7 @@ function createTransitionManager(history, routes) { } /***/ }), -/* 242 */ +/* 248 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -19680,7 +19461,7 @@ function isPromise(obj) { } /***/ }), -/* 243 */ +/* 249 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -19710,20 +19491,16 @@ function assignRouterState(router, _ref) { } /***/ }), -/* 244 */ +/* 250 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(160); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(159); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PropTypes__ = __webpack_require__(167); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(166); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -19733,6 +19510,12 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob +var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes, + bool = _React$PropTypes.bool, + object = _React$PropTypes.object, + string = _React$PropTypes.string, + func = _React$PropTypes.func, + oneOfType = _React$PropTypes.oneOfType; function isLeftClickEvent(event) { @@ -19766,23 +19549,32 @@ function resolveToLocation(to, router) { * You could use the following component to link to that route: * * + * + * Links may pass along location state and/or query string parameters + * in the state/query props, respectively. + * + * */ -var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ +var Link = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ displayName: 'Link', - mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__["b" /* ContextSubscriber */])('router')], + + mixins: [__WEBPACK_IMPORTED_MODULE_3__ContextUtils__["b" /* ContextSubscriber */]('router')], contextTypes: { - router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__["b" /* routerShape */] + router: __WEBPACK_IMPORTED_MODULE_2__PropTypes__["b" /* routerShape */] }, propTypes: { - to: Object(__WEBPACK_IMPORTED_MODULE_2_prop_types__["oneOfType"])([__WEBPACK_IMPORTED_MODULE_2_prop_types__["string"], __WEBPACK_IMPORTED_MODULE_2_prop_types__["object"], __WEBPACK_IMPORTED_MODULE_2_prop_types__["func"]]), - activeStyle: __WEBPACK_IMPORTED_MODULE_2_prop_types__["object"], - activeClassName: __WEBPACK_IMPORTED_MODULE_2_prop_types__["string"], - onlyActiveOnIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types__["bool"].isRequired, - onClick: __WEBPACK_IMPORTED_MODULE_2_prop_types__["func"], - target: __WEBPACK_IMPORTED_MODULE_2_prop_types__["string"] + to: oneOfType([string, object, func]), + query: object, + hash: string, + state: object, + activeStyle: object, + activeClassName: string, + onlyActiveOnIndex: bool.isRequired, + onClick: func, + target: string }, getDefaultProps: function getDefaultProps() { @@ -19798,7 +19590,7 @@ var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ var router = this.context.router; - !router ? false ? invariant(false, 's rendered outside of a router context cannot navigate.') : __WEBPACK_IMPORTED_MODULE_3_invariant___default()(false) : void 0; + !router ? false ? invariant(false, 's rendered outside of a router context cannot navigate.') : __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(false) : void 0; if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; @@ -19855,25 +19647,26 @@ var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ /* harmony default export */ __webpack_exports__["a"] = (Link); /***/ }), -/* 245 */ +/* 251 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(45); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PatternUtils__ = __webpack_require__(74); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(88); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RouteUtils__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PatternUtils__ = __webpack_require__(79); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(91); +var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes, + string = _React$PropTypes.string, + object = _React$PropTypes.object; /** * A is used to declare another URL path a client should @@ -19883,12 +19676,14 @@ var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ * and are traversed in the same manner. */ /* eslint-disable react/require-render-return */ -var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + +var Redirect = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ displayName: 'Redirect', + statics: { createRouteFromReactElement: function createRouteFromReactElement(element) { - var route = Object(__WEBPACK_IMPORTED_MODULE_3__RouteUtils__["a" /* createRouteFromReactElement */])(element); + var route = __WEBPACK_IMPORTED_MODULE_2__RouteUtils__["a" /* createRouteFromReactElement */](element); if (route.from) route.path = route.from; @@ -19899,14 +19694,14 @@ var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ var pathname = void 0; if (route.to.charAt(0) === '/') { - pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__["a" /* formatPattern */])(route.to, params); + pathname = __WEBPACK_IMPORTED_MODULE_3__PatternUtils__["a" /* formatPattern */](route.to, params); } else if (!route.to) { pathname = location.pathname; } else { var routeIndex = nextState.routes.indexOf(route); var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); var pattern = parentPattern.replace(/\/*$/, '/') + route.to; - pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__["a" /* formatPattern */])(pattern, params); + pathname = __WEBPACK_IMPORTED_MODULE_3__PatternUtils__["a" /* formatPattern */](pattern, params); } replace({ @@ -19935,34 +19730,34 @@ var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ }, propTypes: { - path: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"], - from: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"], // Alias for path - to: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"].isRequired, - query: __WEBPACK_IMPORTED_MODULE_1_prop_types__["object"], - state: __WEBPACK_IMPORTED_MODULE_1_prop_types__["object"], - onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */], - children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */] + path: string, + from: string, // Alias for path + to: string.isRequired, + query: object, + state: object, + onEnter: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */] }, /* istanbul ignore next: sanity check */ render: function render() { - true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false) : void 0; + true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(false) : void 0; } }); /* harmony default export */ __webpack_exports__["a"] = (Redirect); /***/ }), -/* 246 */ +/* 252 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = createMemoryHistory; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(247); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(253); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(248); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(254); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = __webpack_require__(446); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = __webpack_require__(454); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__); @@ -19972,16 +19767,16 @@ function createMemoryHistory(options) { // signatures and type checking differ between `useQueries` and // `createMemoryHistory`, have to create `memoryHistory` first because // `useQueries` doesn't understand the signature - var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default()(options); + var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default.a(options); var createHistory = function createHistory() { return memoryHistory; }; - var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory))(options); + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default.a(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default.a(createHistory))(options); return history; } /***/ }), -/* 247 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -19991,15 +19786,15 @@ exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _queryString = __webpack_require__(444); +var _queryString = __webpack_require__(452); -var _runTransitionHook = __webpack_require__(162); +var _runTransitionHook = __webpack_require__(169); var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); -var _LocationUtils = __webpack_require__(75); +var _LocationUtils = __webpack_require__(80); -var _PathUtils = __webpack_require__(46); +var _PathUtils = __webpack_require__(45); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -20015,11 +19810,11 @@ var defaultParseQueryString = _queryString.parse; */ var useQueries = function useQueries(createHistory) { return function () { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var history = createHistory(options); - var stringifyQuery = options.stringifyQuery, - parseQueryString = options.parseQueryString; + var stringifyQuery = options.stringifyQuery; + var parseQueryString = options.parseQueryString; if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; @@ -20108,7 +19903,7 @@ var useQueries = function useQueries(createHistory) { exports.default = useQueries; /***/ }), -/* 248 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20118,17 +19913,17 @@ exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _runTransitionHook = __webpack_require__(162); +var _runTransitionHook = __webpack_require__(169); var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); -var _PathUtils = __webpack_require__(46); +var _PathUtils = __webpack_require__(45); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var useBasename = function useBasename(createHistory) { return function () { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var history = createHistory(options); var basename = options.basename; @@ -20138,7 +19933,7 @@ var useBasename = function useBasename(createHistory) { if (!location) return location; if (basename && location.basename == null) { - if (location.pathname.toLowerCase().indexOf(basename.toLowerCase()) === 0) { + if (location.pathname.indexOf(basename) === 0) { location.pathname = location.pathname.substring(basename.length); location.basename = basename; @@ -20223,27 +20018,27 @@ var useBasename = function useBasename(createHistory) { exports.default = useBasename; /***/ }), -/* 249 */ +/* 255 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = useRouterHistory; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(247); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(253); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(248); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(254); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); function useRouterHistory(createHistory) { return function (options) { - var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory))(options); + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default.a(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default.a(createHistory))(options); return history; }; } /***/ }), -/* 250 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20252,7 +20047,7 @@ function useRouterHistory(createHistory) { exports.__esModule = true; exports.readState = exports.saveState = undefined; -var _warning = __webpack_require__(17); +var _warning = __webpack_require__(15); var _warning2 = _interopRequireDefault(_warning); @@ -20334,31 +20129,30 @@ var readState = exports.readState = function readState(key) { }; /***/ }), -/* 251 */ +/* 257 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = createRouterHistory; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(249); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(255); var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); -function createRouterHistory(createHistory) { +/* harmony default export */ __webpack_exports__["a"] = (function (createHistory) { var history = void 0; - if (canUseDOM) history = Object(__WEBPACK_IMPORTED_MODULE_0__useRouterHistory__["a" /* default */])(createHistory)(); + if (canUseDOM) history = __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__["a" /* default */](createHistory)(); return history; -} +}); /***/ }), -/* 252 */ +/* 258 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionTypes; }); /* harmony export (immutable) */ __webpack_exports__["b"] = createStore; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(166); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(457); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(173); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(465); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__); @@ -20371,33 +20165,34 @@ function createRouterHistory(createHistory) { */ var ActionTypes = { INIT: '@@redux/INIT' +}; - /** - * Creates a Redux store that holds the state tree. - * The only way to change the data in the store is to call `dispatch()` on it. - * - * There should only be a single store in your app. To specify how different - * parts of the state tree respond to actions, you may combine several reducers - * into a single reducer function by using `combineReducers`. - * - * @param {Function} reducer A function that returns the next state tree, given - * the current state tree and the action to handle. - * - * @param {any} [preloadedState] The initial state. You may optionally specify it - * to hydrate the state from the server in universal apps, or to restore a - * previously serialized user session. - * If you use `combineReducers` to produce the root reducer function, this must be - * an object with the same shape as `combineReducers` keys. - * - * @param {Function} [enhancer] The store enhancer. You may optionally specify it - * to enhance the store with third-party capabilities such as middleware, - * time travel, persistence, etc. The only store enhancer that ships with Redux - * is `applyMiddleware()`. - * - * @returns {Store} A Redux store that lets you read the state, dispatch actions - * and subscribe to changes. - */ -};function createStore(reducer, preloadedState, enhancer) { +/** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} enhancer The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ +function createStore(reducer, preloadedState, enhancer) { var _ref2; if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { @@ -20510,7 +20305,7 @@ var ActionTypes = { * return something else (for example, a Promise you can await). */ function dispatch(action) { - if (!Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */])(action)) { + if (!__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */](action)) { throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); } @@ -20531,8 +20326,7 @@ var ActionTypes = { var listeners = currentListeners = nextListeners; for (var i = 0; i < listeners.length; i++) { - var listener = listeners[i]; - listener(); + listeners[i](); } return action; @@ -20553,383 +20347,992 @@ var ActionTypes = { throw new Error('Expected the nextReducer to be a function.'); } - currentReducer = nextReducer; - dispatch({ type: ActionTypes.INIT }); + currentReducer = nextReducer; + dispatch({ type: ActionTypes.INIT }); + } + + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/zenparsing/es-observable + */ + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return _ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object') { + throw new TypeError('Expected the observer to be an object.'); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { unsubscribe: unsubscribe }; + } + }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () { + return this; + }, _ref; + } + + // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + dispatch({ type: ActionTypes.INIT }); + + return _ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer + }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2; +} + +/***/ }), +/* 259 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/* harmony default export */ __webpack_exports__["a"] = (freeGlobal); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(46))) + +/***/ }), +/* 260 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(261); + + +/** Built-in value references. */ +var getPrototype = __WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */](Object.getPrototypeOf, Object); + +/* harmony default export */ __webpack_exports__["a"] = (getPrototype); + + +/***/ }), +/* 261 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (overArg); + + +/***/ }), +/* 262 */ +/***/ (function(module, exports) { + +module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), +/* 263 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export default */ +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ +} + +/***/ }), +/* 264 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = compose; +/** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ + +function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + var last = funcs[funcs.length - 1]; + var rest = funcs.slice(0, -1); + return function () { + return rest.reduceRight(function (composed, f) { + return f(composed); + }, last.apply(undefined, arguments)); + }; +} + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _react = __webpack_require__(0); + +exports["default"] = _react.PropTypes.shape({ + subscribe: _react.PropTypes.func.isRequired, + dispatch: _react.PropTypes.func.isRequired, + getState: _react.PropTypes.func.isRequired +}); + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = warning; +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ +} + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(477); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; + + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var repeat = exports.repeat = function repeat(str, times) { + return new Array(times + 1).join(str); +}; + +var pad = exports.pad = function pad(num, maxLength) { + return repeat("0", maxLength - num.toString().length) + num; +}; + +var formatTime = exports.formatTime = function formatTime(time) { + return pad(time.getHours(), 2) + ":" + pad(time.getMinutes(), 2) + ":" + pad(time.getSeconds(), 2) + "." + pad(time.getMilliseconds(), 3); +}; + +// Use performance API if it's available in order to get better precision +var timer = exports.timer = typeof performance !== "undefined" && performance !== null && typeof performance.now === "function" ? performance : Date; + +/***/ }), +/* 269 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +exports.routerReducer = routerReducer; +/** + * This action type will be dispatched when your history + * receives a location change. + */ +var LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE'; + +var initialState = { + locationBeforeTransitions: null +}; + +/** + * This reducer will update the state with the most recent location history + * has transitioned to. This may not be in sync with the router, particularly + * if you have asynchronously-loaded routes, so reading from and relying on + * this state is discouraged. + */ +function routerReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + type = _ref.type, + payload = _ref.payload; + + if (type === LOCATION_CHANGE) { + return _extends({}, state, { locationBeforeTransitions: payload }); + } + + return state; +} + +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** + * This action type will be dispatched by the history actions below. + * If you're writing a middleware to watch for navigation events, be sure to + * look for actions of this type. + */ +var CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; + +function updateLocation(method) { + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return { + type: CALL_HISTORY_METHOD, + payload: { method: method, args: args } + }; + }; +} + +/** + * These actions correspond to the history API. + * The associated routerMiddleware will capture these events before they get to + * your reducer and reissue them as the matching function on your history. + */ +var push = exports.push = updateLocation('push'); +var replace = exports.replace = updateLocation('replace'); +var go = exports.go = updateLocation('go'); +var goBack = exports.goBack = updateLocation('goBack'); +var goForward = exports.goForward = updateLocation('goForward'); + +var routerActions = exports.routerActions = { push: push, replace: replace, go: go, goBack: goBack, goForward: goForward }; + +/***/ }), +/* 271 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayMap); + + +/***/ }), +/* 272 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (copyArray); + + +/***/ }), +/* 273 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__ = __webpack_require__(501); + + +/** Used to match property names within property paths. */ +var reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__["a" /* default */](function(string) { + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ __webpack_exports__["a"] = (stringToPath); + + +/***/ }), +/* 274 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} } + return ''; +} - /** - * Interoperability point for observable/reactive libraries. - * @returns {observable} A minimal observable of state changes. - * For more information, see the observable proposal: - * https://github.com/tc39/proposal-observable - */ - function observable() { - var _ref; +/* harmony default export */ __webpack_exports__["a"] = (toSource); - var outerSubscribe = subscribe; - return _ref = { - /** - * The minimal observable subscription method. - * @param {Object} observer Any object that can be used as an observer. - * The observer object should have a `next` method. - * @returns {subscription} An object with an `unsubscribe` method that can - * be used to unsubscribe the observable from the store, and prevent further - * emission of values from the observable. - */ - subscribe: function subscribe(observer) { - if (typeof observer !== 'object') { - throw new TypeError('Expected the observer to be an object.'); - } - function observeState() { - if (observer.next) { - observer.next(getState()); - } - } +/***/ }), +/* 275 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - observeState(); - var unsubscribe = outerSubscribe(observeState); - return { unsubscribe: unsubscribe }; - } - }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () { - return this; - }, _ref; - } +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseToString_js__ = __webpack_require__(524); - // When a store is created, an "INIT" action is dispatched so that every - // reducer returns their initial state. This effectively populates - // the initial state tree. - dispatch({ type: ActionTypes.INIT }); - return _ref2 = { - dispatch: dispatch, - subscribe: subscribe, - getState: getState, - replaceReducer: replaceReducer - }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2; +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : __WEBPACK_IMPORTED_MODULE_0__baseToString_js__["a" /* default */](value); } +/* harmony default export */ __webpack_exports__["a"] = (toString); + + /***/ }), -/* 253 */ +/* 276 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(123); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(92); -/* harmony default export */ __webpack_exports__["a"] = (freeGlobal); -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(47))) + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */](object[key], value)) || + (value === undefined && !(key in object))) { + __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](object, key, value); + } +} + +/* harmony default export */ __webpack_exports__["a"] = (assignMergeValue); + /***/ }), -/* 254 */ +/* 277 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(255); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); -/** Built-in value references. */ -var getPrototype = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.getPrototypeOf, Object); +var defineProperty = (function() { + try { + var func = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); -/* harmony default export */ __webpack_exports__["a"] = (getPrototype); +/* harmony default export */ __webpack_exports__["a"] = (defineProperty); /***/ }), -/* 255 */ +/* 278 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__ = __webpack_require__(533); + + /** - * Creates a unary function that invokes `func` with its argument transformed. + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} +var baseFor = __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__["a" /* default */](); -/* harmony default export */ __webpack_exports__["a"] = (overArg); +/* harmony default export */ __webpack_exports__["a"] = (baseFor); /***/ }), -/* 256 */ -/***/ (function(module, exports) { +/* 279 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29); + + +/** Built-in value references. */ +var Uint8Array = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Uint8Array; + +/* harmony default export */ __webpack_exports__["a"] = (Uint8Array); /***/ }), -/* 257 */ +/* 280 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* unused harmony export default */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(281); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__ = __webpack_require__(550); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(124); + + + + /** - * Prints a warning in the console if it exists. + * Creates an array of the own and inherited enumerable property names of `object`. * - * @param {String} message The warning message. - * @returns {void} + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ -function warning(message) { - /* eslint-disable no-console */ - if (typeof console !== 'undefined' && typeof console.error === 'function') { - console.error(message); - } - /* eslint-enable no-console */ - try { - // This error was thrown as a convenience so that if you enable - // "break on all exceptions" in your console, - // it would pause the execution at this line. - throw new Error(message); - /* eslint-disable no-empty */ - } catch (e) {} - /* eslint-enable no-empty */ +function keysIn(object) { + return __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */](object) ? __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */](object, true) : __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__["a" /* default */](object); } +/* harmony default export */ __webpack_exports__["a"] = (keysIn); + + /***/ }), -/* 258 */ +/* 281 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = compose; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__ = __webpack_require__(549); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(181); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isIndex_js__ = __webpack_require__(185); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__ = __webpack_require__(184); + + + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + /** - * Composes single-argument functions from right to left. The rightmost - * function can take multiple arguments as it provides the signature for - * the resulting composite function. + * Creates an array of the enumerable property names of the array-like `value`. * - * @param {...Function} funcs The functions to compose. - * @returns {Function} A function obtained by composing the argument functions - * from right to left. For example, compose(f, g, h) is identical to doing - * (...args) => f(g(h(...args))). + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. */ +function arrayLikeKeys(value, inherited) { + var isArr = __WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value), + isArg = !isArr && __WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */](value), + isBuff = !isArr && !isArg && __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__["a" /* default */](value), + isType = !isArr && !isArg && !isBuff && __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__["a" /* default */](value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__["a" /* default */](value.length, String) : [], + length = result.length; -function compose() { - for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { - funcs[_key] = arguments[_key]; - } - - if (funcs.length === 0) { - return function (arg) { - return arg; - }; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + __WEBPACK_IMPORTED_MODULE_4__isIndex_js__["a" /* default */](key, length) + ))) { + result.push(key); + } } + return result; +} - if (funcs.length === 1) { - return funcs[0]; - } +/* harmony default export */ __webpack_exports__["a"] = (arrayLikeKeys); - return funcs.reduce(function (a, b) { - return function () { - return a(b.apply(undefined, arguments)); - }; - }); -} /***/ }), -/* 259 */ -/***/ (function(module, exports, __webpack_require__) { +/* 282 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(123); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__ = __webpack_require__(561); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(564); -exports.__esModule = true; -var _propTypes = __webpack_require__(14); -var _propTypes2 = _interopRequireDefault(_propTypes); +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */](iteratee, 3); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__["a" /* default */](object, function(value, key, object) { + __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapValues); -exports["default"] = _propTypes2["default"].shape({ - subscribe: _propTypes2["default"].func.isRequired, - dispatch: _propTypes2["default"].func.isRequired, - getState: _propTypes2["default"].func.isRequired -}); /***/ }), -/* 260 */ -/***/ (function(module, exports, __webpack_require__) { +/* 283 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SetCache_js__ = __webpack_require__(568); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arraySome_js__ = __webpack_require__(571); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cacheHas_js__ = __webpack_require__(572); -exports.__esModule = true; -exports["default"] = warning; + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + /** - * Prints a warning in the console if it exists. + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. * - * @param {String} message The warning message. - * @returns {void} + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ -function warning(message) { - /* eslint-disable no-console */ - if (typeof console !== 'undefined' && typeof console.error === 'function') { - console.error(message); +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; } - /* eslint-enable no-console */ - try { - // This error was thrown as a convenience so that if you enable - // "break on all exceptions" in your console, - // it would pause the execution at this line. - throw new Error(message); - /* eslint-disable no-empty */ - } catch (e) {} - /* eslint-enable no-empty */ -} + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new __WEBPACK_IMPORTED_MODULE_0__SetCache_js__["a" /* default */] : undefined; -/***/ }), -/* 261 */ -/***/ (function(module, exports, __webpack_require__) { + stack.set(array, other); + stack.set(other, array); -var root = __webpack_require__(469); + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; -/** Built-in value references. */ -var Symbol = root.Symbol; + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!__WEBPACK_IMPORTED_MODULE_1__arraySome_js__["a" /* default */](other, function(othValue, othIndex) { + if (!__WEBPACK_IMPORTED_MODULE_2__cacheHas_js__["a" /* default */](seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} -module.exports = Symbol; +/* harmony default export */ __webpack_exports__["a"] = (equalArrays); /***/ }), -/* 262 */ -/***/ (function(module, exports, __webpack_require__) { +/* 284 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(47); -Object.defineProperty(exports, "__esModule", { - value: true -}); -var repeat = exports.repeat = function repeat(str, times) { - return new Array(times + 1).join(str); -}; - -var pad = exports.pad = function pad(num, maxLength) { - return repeat("0", maxLength - num.toString().length) + num; -}; +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](value); +} -var formatTime = exports.formatTime = function formatTime(time) { - return pad(time.getHours(), 2) + ":" + pad(time.getMinutes(), 2) + ":" + pad(time.getSeconds(), 2) + "." + pad(time.getMilliseconds(), 3); -}; +/* harmony default export */ __webpack_exports__["a"] = (isStrictComparable); -// Use performance API if it's available in order to get better precision -var timer = exports.timer = typeof performance !== "undefined" && performance !== null && typeof performance.now === "function" ? performance : Date; /***/ }), -/* 263 */ -/***/ (function(module, exports, __webpack_require__) { +/* 285 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} +/* harmony default export */ __webpack_exports__["a"] = (matchesStrictComparable); -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -exports.routerReducer = routerReducer; -/** - * This action type will be dispatched when your history - * receives a location change. - */ -var LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE'; +/***/ }), +/* 286 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(287); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toKey_js__ = __webpack_require__(93); + -var initialState = { - locationBeforeTransitions: null -}; /** - * This reducer will update the state with the most recent location history - * has transitioned to. This may not be in sync with the router, particularly - * if you have asynchronously-loaded routes, so reading from and relying on - * this state is discouraged. + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. */ -function routerReducer() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; +function baseGet(object, path) { + path = __WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */](path, object); - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - type = _ref.type, - payload = _ref.payload; + var index = 0, + length = path.length; - if (type === LOCATION_CHANGE) { - return _extends({}, state, { locationBeforeTransitions: payload }); + while (object != null && index < length) { + object = object[__WEBPACK_IMPORTED_MODULE_1__toKey_js__["a" /* default */](path[index++])]; } - - return state; + return (index && index == length) ? object : undefined; } +/* harmony default export */ __webpack_exports__["a"] = (baseGet); + + /***/ }), -/* 264 */ -/***/ (function(module, exports, __webpack_require__) { +/* 287 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isKey_js__ = __webpack_require__(189); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__ = __webpack_require__(273); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(275); -Object.defineProperty(exports, "__esModule", { - value: true -}); -/** - * This action type will be dispatched by the history actions below. - * If you're writing a middleware to watch for navigation events, be sure to - * look for actions of this type. - */ -var CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; -function updateLocation(method) { - return function () { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - return { - type: CALL_HISTORY_METHOD, - payload: { method: method, args: args } - }; - }; -} /** - * These actions correspond to the history API. - * The associated routerMiddleware will capture these events before they get to - * your reducer and reissue them as the matching function on your history. + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. */ -var push = exports.push = updateLocation('push'); -var replace = exports.replace = updateLocation('replace'); -var go = exports.go = updateLocation('go'); -var goBack = exports.goBack = updateLocation('goBack'); -var goForward = exports.goForward = updateLocation('goForward'); +function castPath(value, object) { + if (__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */](value)) { + return value; + } + return __WEBPACK_IMPORTED_MODULE_1__isKey_js__["a" /* default */](value, object) ? [value] : __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */](value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (castPath); -var routerActions = exports.routerActions = { push: push, replace: replace, go: go, goBack: goBack, goForward: goForward }; /***/ }), -/* 265 */ +/* 288 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -20948,7 +21351,6 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmit", function() { return clearSubmit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmitErrors", function() { return clearSubmitErrors; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearAsyncError", function() { return clearAsyncError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); @@ -20967,60 +21369,37 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncErrors", function() { return updateSyncErrors; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncWarnings", function() { return updateSyncWarnings; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(167); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(174); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var arrayInsert = function arrayInsert(form, field, index, value) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], - meta: { form: form, field: field, index: index }, - payload: value - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], meta: { form: form, field: field, index: index }, payload: value }; }; var arrayMove = function arrayMove(form, field, from, to) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], - meta: { form: form, field: field, from: from, to: to } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], meta: { form: form, field: field, from: from, to: to } }; }; var arrayPop = function arrayPop(form, field) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], - meta: { form: form, field: field } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], meta: { form: form, field: field } }; }; var arrayPush = function arrayPush(form, field, value) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], - meta: { form: form, field: field }, - payload: value - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], meta: { form: form, field: field }, payload: value }; }; var arrayRemove = function arrayRemove(form, field, index) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], - meta: { form: form, field: field, index: index } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], meta: { form: form, field: field, index: index } }; }; var arrayRemoveAll = function arrayRemoveAll(form, field) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], - meta: { form: form, field: field } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], meta: { form: form, field: field } }; }; var arrayShift = function arrayShift(form, field) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], - meta: { form: form, field: field } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], meta: { form: form, field: field } }; }; var arraySplice = function arraySplice(form, field, index, removeNum, value) { @@ -21045,53 +21424,27 @@ var arraySwap = function arraySwap(form, field, indexA, indexB) { }; var arrayUnshift = function arrayUnshift(form, field, value) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], - meta: { form: form, field: field }, - payload: value - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], meta: { form: form, field: field }, payload: value }; }; var autofill = function autofill(form, field, value) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], - meta: { form: form, field: field }, - payload: value - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], meta: { form: form, field: field }, payload: value }; }; var blur = function blur(form, field, value, touch) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], - meta: { form: form, field: field, touch: touch }, - payload: value - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], meta: { form: form, field: field, touch: touch }, payload: value }; }; var change = function change(form, field, value, touch, persistentSubmitErrors) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], - meta: { form: form, field: field, touch: touch, persistentSubmitErrors: persistentSubmitErrors }, - payload: value - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], meta: { form: form, field: field, touch: touch, persistentSubmitErrors: persistentSubmitErrors }, payload: value }; }; var clearSubmit = function clearSubmit(form) { return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], meta: { form: form } }; }; -var clearSubmitErrors = function clearSubmitErrors(form) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT_ERRORS"], - meta: { form: form } - }; -}; - var clearAsyncError = function clearAsyncError(form, field) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], - meta: { form: form, field: field } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], meta: { form: form, field: field } }; }; var destroy = function destroy() { @@ -21113,19 +21466,11 @@ var initialize = function initialize(form, values, keepDirty) { otherMeta = keepDirty; keepDirty = false; } - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], - meta: _extends({ form: form, keepDirty: keepDirty }, otherMeta), - payload: values - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], meta: _extends({ form: form, keepDirty: keepDirty }, otherMeta), payload: values }; }; var registerField = function registerField(form, name, type) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], - meta: { form: form }, - payload: { name: name, type: type } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], meta: { form: form }, payload: { name: name, type: type } }; }; var reset = function reset(form) { @@ -21133,10 +21478,7 @@ var reset = function reset(form) { }; var startAsyncValidation = function startAsyncValidation(form, field) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], - meta: { form: form, field: field } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], meta: { form: form, field: field } }; }; var startSubmit = function startSubmit(form) { @@ -21176,11 +21518,7 @@ var setSubmitFailed = function setSubmitFailed(form) { fields[_key2 - 1] = arguments[_key2]; } - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], - meta: { form: form, fields: fields }, - error: true - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], meta: { form: form, fields: fields }, error: true }; }; var setSubmitSucceeded = function setSubmitSucceeded(form) { @@ -21188,11 +21526,7 @@ var setSubmitSucceeded = function setSubmitSucceeded(form) { fields[_key3 - 1] = arguments[_key3]; } - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], - meta: { form: form, fields: fields }, - error: false - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], meta: { form: form, fields: fields }, error: false }; }; var touch = function touch(form) { @@ -21200,19 +21534,12 @@ var touch = function touch(form) { fields[_key4 - 1] = arguments[_key4]; } - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], - meta: { form: form, fields: fields } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], meta: { form: form, fields: fields } }; }; var unregisterField = function unregisterField(form, name) { var destroyOnUnmount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], - meta: { form: form }, - payload: { name: name, destroyOnUnmount: destroyOnUnmount } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], meta: { form: form }, payload: { name: name, destroyOnUnmount: destroyOnUnmount } }; }; var untouch = function untouch(form) { @@ -21220,116 +21547,163 @@ var untouch = function untouch(form) { fields[_key5 - 1] = arguments[_key5]; } - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], - meta: { form: form, fields: fields } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], meta: { form: form, fields: fields } }; }; var updateSyncErrors = function updateSyncErrors(form) { var syncErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var error = arguments[2]; - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], - meta: { form: form }, - payload: { syncErrors: syncErrors, error: error } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], meta: { form: form }, payload: { syncErrors: syncErrors, error: error } }; }; var updateSyncWarnings = function updateSyncWarnings(form) { var syncWarnings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var warning = arguments[2]; - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], - meta: { form: form }, - payload: { syncWarnings: syncWarnings, warning: warning } - }; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], meta: { form: form }, payload: { syncWarnings: syncWarnings, warning: warning } }; }; /***/ }), -/* 266 */ +/* 289 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var defaultShouldAsyncValidate = function defaultShouldAsyncValidate(_ref) { - var initialized = _ref.initialized, - trigger = _ref.trigger, - pristine = _ref.pristine, - syncValidationPasses = _ref.syncValidationPasses; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error__ = __webpack_require__(599); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_es6_error__); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - if (!syncValidationPasses) { - return false; - } - switch (trigger) { - case 'blur': - // blurring - return true; - case 'submit': - // submitting, so only async validate if form is dirty or was never initialized - // conversely, DON'T async validate if the form is pristine just as it was initialized - return !pristine || !initialized; - default: - return false; +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + +var SubmissionError = function (_ExtendableError) { + _inherits(SubmissionError, _ExtendableError); + + function SubmissionError(errors) { + _classCallCheck(this, SubmissionError); + + var _this = _possibleConstructorReturn(this, (SubmissionError.__proto__ || Object.getPrototypeOf(SubmissionError)).call(this, 'Submit Validation Failed')); + + _this.errors = errors; + return _this; } -}; -/* harmony default export */ __webpack_exports__["a"] = (defaultShouldAsyncValidate); + return SubmissionError; +}(__WEBPACK_IMPORTED_MODULE_0_es6_error___default.a); + +/* harmony default export */ __webpack_exports__["a"] = (SubmissionError); /***/ }), -/* 267 */ +/* 290 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var defaultShouldValidate = function defaultShouldValidate(_ref) { - var values = _ref.values, - nextProps = _ref.nextProps, - initialRender = _ref.initialRender, - lastFieldValidatorKeys = _ref.lastFieldValidatorKeys, - fieldValidatorKeys = _ref.fieldValidatorKeys, - structure = _ref.structure; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(291); - if (initialRender) { - return true; + +var silenceEvent = function silenceEvent(event) { + var is = __WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */](event); + if (is) { + event.preventDefault(); } - return !structure.deepEqual(values, nextProps.values) || !structure.deepEqual(lastFieldValidatorKeys, fieldValidatorKeys); + return is; }; -/* harmony default export */ __webpack_exports__["a"] = (defaultShouldValidate); +/* harmony default export */ __webpack_exports__["a"] = (silenceEvent); /***/ }), -/* 268 */ +/* 291 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error__ = __webpack_require__(492); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_es6_error__); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +var isEvent = function isEvent(candidate) { + return !!(candidate && candidate.stopPropagation && candidate.preventDefault); +}; -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +/* harmony default export */ __webpack_exports__["a"] = (isEvent); -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +/***/ }), +/* 292 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(117); -var SubmissionError = function (_ExtendableError) { - _inherits(SubmissionError, _ExtendableError); - function SubmissionError(errors) { - _classCallCheck(this, SubmissionError); +var getIn = function getIn(state, field) { + if (!state) { + return state; + } - var _this = _possibleConstructorReturn(this, (SubmissionError.__proto__ || Object.getPrototypeOf(SubmissionError)).call(this, 'Submit Validation Failed')); + var path = __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field); + var length = path.length; + if (!length) { + return undefined; + } - _this.errors = errors; - return _this; + var result = state; + for (var i = 0; i < length && !!result; ++i) { + result = result[path[i]]; } - return SubmissionError; -}(__WEBPACK_IMPORTED_MODULE_0_es6_error___default.a); + return result; +}; -/* harmony default export */ __webpack_exports__["a"] = (SubmissionError); +/* harmony default export */ __webpack_exports__["a"] = (getIn); /***/ }), -/* 269 */ +/* 293 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(188); + + +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */](value, other, undefined, customizer) : !!result; +} + +/* harmony default export */ __webpack_exports__["a"] = (isEqualWith); + + +/***/ }), +/* 294 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -21379,7 +21753,6 @@ var createFieldProps = function createFieldProps(_ref2, name, _ref) { onFocus = _ref.onFocus, form = _ref.form, format = _ref.format, - initial = _ref.initial, parse = _ref.parse, pristine = _ref.pristine, props = _ref.props, @@ -21393,7 +21766,7 @@ var createFieldProps = function createFieldProps(_ref2, name, _ref) { value = _ref.value, _value = _ref._value, warn = _ref.warn, - custom = _objectWithoutProperties(_ref, ['asyncError', 'asyncValidating', 'onBlur', 'onChange', 'onDrop', 'onDragStart', 'dirty', 'dispatch', 'onFocus', 'form', 'format', 'initial', 'parse', 'pristine', 'props', 'state', 'submitError', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'validate', 'value', '_value', 'warn']); + custom = _objectWithoutProperties(_ref, ['asyncError', 'asyncValidating', 'onBlur', 'onChange', 'onDrop', 'onDragStart', 'dirty', 'dispatch', 'onFocus', 'form', 'format', 'parse', 'pristine', 'props', 'state', 'submitError', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'validate', 'value', '_value', 'warn']); var error = syncError || asyncError || submitError; var warning = syncWarning; @@ -21426,7 +21799,6 @@ var createFieldProps = function createFieldProps(_ref2, name, _ref) { dispatch: dispatch, error: error, form: form, - initial: initial, warning: warning, invalid: !!error, pristine: pristine, @@ -21443,12 +21815,12 @@ var createFieldProps = function createFieldProps(_ref2, name, _ref) { /* harmony default export */ __webpack_exports__["a"] = (createFieldProps); /***/ }), -/* 270 */ +/* 295 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getValue__ = __webpack_require__(497); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isReactNative__ = __webpack_require__(498); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getValue__ = __webpack_require__(613); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isReactNative__ = __webpack_require__(614); @@ -21458,10 +21830,10 @@ var onChangeValue = function onChangeValue(event, _ref) { normalize = _ref.normalize; // read value from input - var value = Object(__WEBPACK_IMPORTED_MODULE_0__getValue__["a" /* default */])(event, __WEBPACK_IMPORTED_MODULE_1__isReactNative__["a" /* default */] + var value = __WEBPACK_IMPORTED_MODULE_0__getValue__["a" /* default */](event, __WEBPACK_IMPORTED_MODULE_1__isReactNative__["a" /* default */]); // parse value if we have a parser - );if (parse) { + if (parse) { value = parse(value, name); } @@ -21476,915 +21848,1245 @@ var onChangeValue = function onChangeValue(event, _ref) { /* harmony default export */ __webpack_exports__["a"] = (onChangeValue); /***/ }), -/* 271 */ +/* 296 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var isEvent = function isEvent(candidate) { - return !!(candidate && candidate.stopPropagation && candidate.preventDefault); +var createIsPristine = function createIsPristine(_ref) { + var deepEqual = _ref.deepEqual, + empty = _ref.empty, + getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + var initial = getIn(formState, form + '.initial') || empty; + var values = getIn(formState, form + '.values') || initial; + return deepEqual(initial, values); + }; + }; }; -/* harmony default export */ __webpack_exports__["a"] = (isEvent); +/* harmony default export */ __webpack_exports__["a"] = (createIsPristine); /***/ }), -/* 272 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - while (++index < length) { - result[index] = iteratee(array[index], index, array); +var LIBRARY = __webpack_require__(126) + , $export = __webpack_require__(33) + , redefine = __webpack_require__(298) + , hide = __webpack_require__(53) + , has = __webpack_require__(54) + , Iterators = __webpack_require__(83) + , $iterCreate = __webpack_require__(644) + , setToStringTag = __webpack_require__(127) + , getPrototypeOf = __webpack_require__(300) + , ITERATOR = __webpack_require__(24)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + +var returnThis = function(){ return this; }; + +module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; + // Fix native + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + } } - return result; -} + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; -/* harmony default export */ __webpack_exports__["a"] = (arrayMap); +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { +module.exports = __webpack_require__(53); /***/ }), -/* 273 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; +module.exports = __webpack_require__(25).document && document.documentElement; - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony default export */ __webpack_exports__["a"] = (copyArray); +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(54) + , toObject = __webpack_require__(88) + , IE_PROTO = __webpack_require__(142)('IE_PROTO') + , ObjectProto = Object.prototype; +module.exports = Object.getPrototypeOf || function(O){ + O = toObject(O); + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(typeof O.constructor == 'function' && O instanceof O.constructor){ + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; /***/ }), -/* 274 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 301 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__ = __webpack_require__(502); +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(214) + , hiddenKeys = __webpack_require__(144).concat('length', 'prototype'); +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ + return $keys(O, hiddenKeys); +}; -/** Used to match property names within property paths. */ -var reLeadingDot = /^\./, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; +var pIE = __webpack_require__(104) + , createDesc = __webpack_require__(86) + , toIObject = __webpack_require__(55) + , toPrimitive = __webpack_require__(138) + , has = __webpack_require__(54) + , IE8_DOM_DEFINE = __webpack_require__(213) + , gOPD = Object.getOwnPropertyDescriptor; -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = Object(__WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__["a" /* default */])(function(string) { - var result = []; - if (reLeadingDot.test(string)) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); +exports.f = __webpack_require__(43) ? gOPD : function getOwnPropertyDescriptor(O, P){ + O = toIObject(O); + P = toPrimitive(P, true); + if(IE8_DOM_DEFINE)try { + return gOPD(O, P); + } catch(e){ /* empty */ } + if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); +}; + +/***/ }), +/* 303 */ +/***/ (function(module, exports) { -/* harmony default export */ __webpack_exports__["a"] = (stringToPath); /***/ }), -/* 275 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(33) + , core = __webpack_require__(18) + , fails = __webpack_require__(69); +module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); +}; + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/** Used for built-in method references. */ -var funcProto = Function.prototype; -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _getMuiTheme = __webpack_require__(129); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MuiThemeProvider = function (_Component) { + (0, _inherits3.default)(MuiThemeProvider, _Component); + + function MuiThemeProvider() { + (0, _classCallCheck3.default)(this, MuiThemeProvider); + return (0, _possibleConstructorReturn3.default)(this, (MuiThemeProvider.__proto__ || (0, _getPrototypeOf2.default)(MuiThemeProvider)).apply(this, arguments)); } - return ''; -} -/* harmony default export */ __webpack_exports__["a"] = (toSource); + (0, _createClass3.default)(MuiThemeProvider, [{ + key: 'getChildContext', + value: function getChildContext() { + return { + muiTheme: this.props.muiTheme || (0, _getMuiTheme2.default)() + }; + } + }, { + key: 'render', + value: function render() { + return this.props.children; + } + }]); + return MuiThemeProvider; +}(_react.Component); + +MuiThemeProvider.childContextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? MuiThemeProvider.propTypes = { + children: _react.PropTypes.element, + muiTheme: _react.PropTypes.object +} : void 0; +exports.default = MuiThemeProvider; + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { +module.exports = { "default": __webpack_require__(673), __esModule: true }; /***/ }), -/* 276 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseToString_js__ = __webpack_require__(525); +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(35); +module.exports = function(iterator, fn, value, entries){ + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch(e){ + var ret = iterator['return']; + if(ret !== undefined)anObject(ret.call(iterator)); + throw e; + } +}; -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - return value == null ? '' : Object(__WEBPACK_IMPORTED_MODULE_0__baseToString_js__["a" /* default */])(value); -} +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony default export */ __webpack_exports__["a"] = (toString); +// check on default Array iterator +var Iterators = __webpack_require__(83) + , ITERATOR = __webpack_require__(24)('iterator') + , ArrayProto = Array.prototype; +module.exports = function(it){ + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; /***/ }), -/* 277 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(171); - +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * This method is like `_.isEqual` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with up to - * six arguments: (objValue, othValue [, index|key, object, other, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } - * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqualWith(array, other, customizer); - * // => true - */ -function isEqualWith(value, other, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */])(value, other, undefined, customizer) : !!result; -} +var ITERATOR = __webpack_require__(24)('iterator') + , SAFE_CLOSING = false; -/* harmony default export */ __webpack_exports__["a"] = (isEqualWith); +try { + var riter = [7][ITERATOR](); + riter['return'] = function(){ SAFE_CLOSING = true; }; + Array.from(riter, function(){ throw 2; }); +} catch(e){ /* empty */ } +module.exports = function(exec, skipClosing){ + if(!skipClosing && !SAFE_CLOSING)return false; + var safe = false; + try { + var arr = [7] + , iter = arr[ITERATOR](); + iter.next = function(){ return {done: safe = true}; }; + arr[ITERATOR] = function(){ return iter; }; + exec(arr); + } catch(e){ /* empty */ } + return safe; +}; /***/ }), -/* 278 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SetCache_js__ = __webpack_require__(534); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arraySome_js__ = __webpack_require__(537); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cacheHas_js__ = __webpack_require__(538); +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _colors = __webpack_require__(31); + +var _colorManipulator = __webpack_require__(50); +var _spacing = __webpack_require__(199); -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; +var _spacing2 = _interopRequireDefault(_spacing); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + * Light Theme is the default theme used in material-ui. It is guaranteed to + * have all theme variables needed for every component. Variables not defined + * in a custom theme will default to these values. */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; +exports.default = { + spacing: _spacing2.default, + fontFamily: 'Roboto, sans-serif', + palette: { + primary1Color: _colors.cyan500, + primary2Color: _colors.cyan700, + primary3Color: _colors.grey400, + accent1Color: _colors.pinkA200, + accent2Color: _colors.grey100, + accent3Color: _colors.grey500, + textColor: _colors.darkBlack, + secondaryTextColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.54), + alternateTextColor: _colors.white, + canvasColor: _colors.white, + borderColor: _colors.grey300, + disabledColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.3), + pickerHeaderColor: _colors.cyan500, + clockCircleColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.07), + shadowColor: _colors.fullBlack } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new __WEBPACK_IMPORTED_MODULE_0__SetCache_js__["a" /* default */] : undefined; - - stack.set(array, other); - stack.set(other, array); +}; /** + * NB: If you update this file, please also update `docs/src/app/customization/Themes.js` + */ - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!Object(__WEBPACK_IMPORTED_MODULE_1__arraySome_js__["a" /* default */])(other, function(othValue, othIndex) { - if (!Object(__WEBPACK_IMPORTED_MODULE_2__cacheHas_js__["a" /* default */])(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} +"use strict"; -/* harmony default export */ __webpack_exports__["a"] = (equalArrays); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + menu: 1000, + appBar: 1100, + drawerOverlay: 1200, + drawer: 1300, + dialogOverlay: 1400, + dialog: 1500, + layer: 2000, + popover: 2100, + snackbar: 2900, + tooltip: 3000 +}; /***/ }), -/* 279 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32); - -/** Built-in value references. */ -var Uint8Array = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Uint8Array; - -/* harmony default export */ __webpack_exports__["a"] = (Uint8Array); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { "Webkit": { "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "backfaceVisibility": true, "perspective": true, "perspectiveOrigin": true, "transformStyle": true, "transformOriginZ": true, "animation": true, "animationDelay": true, "animationDirection": true, "animationFillMode": true, "animationDuration": true, "animationIterationCount": true, "animationName": true, "animationPlayState": true, "animationTimingFunction": true, "appearance": true, "userSelect": true, "fontKerning": true, "textEmphasisPosition": true, "textEmphasis": true, "textEmphasisStyle": true, "textEmphasisColor": true, "boxDecorationBreak": true, "clipPath": true, "maskImage": true, "maskMode": true, "maskRepeat": true, "maskPosition": true, "maskClip": true, "maskOrigin": true, "maskSize": true, "maskComposite": true, "mask": true, "maskBorderSource": true, "maskBorderMode": true, "maskBorderSlice": true, "maskBorderWidth": true, "maskBorderOutset": true, "maskBorderRepeat": true, "maskBorder": true, "maskType": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "filter": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true, "flex": true, "flexBasis": true, "flexDirection": true, "flexGrow": true, "flexFlow": true, "flexShrink": true, "flexWrap": true, "alignContent": true, "alignItems": true, "alignSelf": true, "justifyContent": true, "order": true, "transition": true, "transitionDelay": true, "transitionDuration": true, "transitionProperty": true, "transitionTimingFunction": true, "backdropFilter": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "shapeImageThreshold": true, "shapeImageMargin": true, "shapeImageOutside": true, "hyphens": true, "flowInto": true, "flowFrom": true, "regionFragment": true, "textSizeAdjust": true }, "Moz": { "appearance": true, "userSelect": true, "boxSizing": true, "textAlignLast": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "tabSize": true, "hyphens": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true }, "ms": { "flex": true, "flexBasis": false, "flexDirection": true, "flexGrow": false, "flexFlow": true, "flexShrink": false, "flexWrap": true, "alignContent": false, "alignItems": false, "alignSelf": false, "justifyContent": false, "order": false, "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "userSelect": true, "wrapFlow": true, "wrapThrough": true, "wrapMargin": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "touchAction": true, "hyphens": true, "flowInto": true, "flowFrom": true, "breakBefore": true, "breakAfter": true, "breakInside": true, "regionFragment": true, "gridTemplateColumns": true, "gridTemplateRows": true, "gridTemplateAreas": true, "gridTemplate": true, "gridAutoColumns": true, "gridAutoRows": true, "gridAutoFlow": true, "grid": true, "gridRowStart": true, "gridColumnStart": true, "gridRowEnd": true, "gridRow": true, "gridColumn": true, "gridColumnEnd": true, "gridColumnGap": true, "gridRowGap": true, "gridArea": true, "gridGap": true, "textSizeAdjust": true } }; +module.exports = exports["default"]; /***/ }), -/* 280 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__ = __webpack_require__(549); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(174); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__ = __webpack_require__(175); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isIndex_js__ = __webpack_require__(177); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__ = __webpack_require__(178); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sortPrefixedStyle; + +var _isPrefixedProperty = __webpack_require__(680); +var _isPrefixedProperty2 = _interopRequireDefault(_isPrefixedProperty); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function sortPrefixedStyle(style) { + return Object.keys(style).sort(function (left, right) { + if ((0, _isPrefixedProperty2.default)(left) && !(0, _isPrefixedProperty2.default)(right)) { + return -1; + } else if (!(0, _isPrefixedProperty2.default)(left) && (0, _isPrefixedProperty2.default)(right)) { + return 1; + } + return 0; + }).reduce(function (sortedStyle, prop) { + sortedStyle[prop] = style[prop]; + return sortedStyle; + }, {}); +} +module.exports = exports['default']; +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used for built-in method references. */ -var objectProto = Object.prototype; +"use strict"; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - var isArr = Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value), - isArg = !isArr && Object(__WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */])(value), - isBuff = !isArr && !isArg && Object(__WEBPACK_IMPORTED_MODULE_3__isBuffer_js__["a" /* default */])(value), - isType = !isArr && !isArg && !isBuff && Object(__WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__["a" /* default */])(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? Object(__WEBPACK_IMPORTED_MODULE_0__baseTimes_js__["a" /* default */])(value.length, String) : [], - length = result.length; +var uppercasePattern = /[A-Z]/g; +var msPattern = /^ms-/; +var cache = {}; - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - Object(__WEBPACK_IMPORTED_MODULE_4__isIndex_js__["a" /* default */])(key, length) - ))) { - result.push(key); - } - } - return result; +function hyphenateStyleName(string) { + return string in cache + ? cache[string] + : cache[string] = string + .replace(uppercasePattern, '-$&') + .toLowerCase() + .replace(msPattern, '-ms-'); } -/* harmony default export */ __webpack_exports__["a"] = (arrayLikeKeys); +module.exports = hyphenateStyleName; /***/ }), -/* 281 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(277); +Object.defineProperty(exports, "__esModule", { + value: true +}); -var customizer = function customizer(objectValue, otherValue, indexOrkey, object, other, stack) { - // https://lodash.com/docs/4.17.4#isEqualWith - if (stack) { - // Shallow compares - // For 1st level, stack === undefined. - // -> Do nothing (and implicitly return undefined so that it goes to compare 2nd level) - // For 2nd level and up, stack !== undefined. - // -> Compare by === operator - return objectValue === otherValue; - } -}; +var _classCallCheck2 = __webpack_require__(1); -var shallowCompare = function shallowCompare(instance, nextProps, nextState) { - return !Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */])(instance.props, nextProps, customizer) || !Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */])(instance.state, nextState, customizer); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _colors = __webpack_require__(31); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Typography = function Typography() { + (0, _classCallCheck3.default)(this, Typography); + + // text colors + this.textFullBlack = _colors.fullBlack; + this.textDarkBlack = _colors.darkBlack; + this.textLightBlack = _colors.lightBlack; + this.textMinBlack = _colors.minBlack; + this.textFullWhite = _colors.fullWhite; + this.textDarkWhite = _colors.darkWhite; + this.textLightWhite = _colors.lightWhite; + + // font weight + this.fontWeightLight = 300; + this.fontWeightNormal = 400; + this.fontWeightMedium = 500; + + this.fontStyleButtonFontSize = 14; }; -/* harmony default export */ __webpack_exports__["a"] = (shallowCompare); +exports.default = new Typography(); /***/ }), -/* 282 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(121); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__ = __webpack_require__(570); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(572); - +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(iteratee, 3); +var _Subheader = __webpack_require__(713); - Object(__WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__["a" /* default */])(object, function(value, key, object) { - Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(result, key, iteratee(value, key, object)); - }); - return result; -} +var _Subheader2 = _interopRequireDefault(_Subheader); -/* harmony default export */ __webpack_exports__["a"] = (mapValues); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +exports.default = _Subheader2.default; /***/ }), -/* 283 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); -var defineProperty = (function() { - try { - var func = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); +Object.defineProperty(exports, "__esModule", { + value: true +}); -/* harmony default export */ __webpack_exports__["a"] = (defineProperty); +var _objectWithoutProperties2 = __webpack_require__(8); +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -/***/ }), -/* 284 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _extends2 = __webpack_require__(7); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__ = __webpack_require__(571); +var _extends3 = _interopRequireDefault(_extends2); +var _getPrototypeOf = __webpack_require__(3); -/** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = Object(__WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__["a" /* default */])(); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -/* harmony default export */ __webpack_exports__["a"] = (baseFor); +var _classCallCheck2 = __webpack_require__(1); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -/***/ }), -/* 285 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _createClass2 = __webpack_require__(2); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(48); +var _createClass3 = _interopRequireDefault(_createClass2); +var _possibleConstructorReturn2 = __webpack_require__(4); -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(value); -} +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -/* harmony default export */ __webpack_exports__["a"] = (isStrictComparable); +var _inherits2 = __webpack_require__(5); +var _inherits3 = _interopRequireDefault(_inherits2); -/***/ }), -/* 286 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _simpleAssign = __webpack_require__(6); -"use strict"; -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -/* harmony default export */ __webpack_exports__["a"] = (matchesStrictComparable); +var _react = __webpack_require__(0); +var _react2 = _interopRequireDefault(_react); -/***/ }), -/* 287 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _reactDom = __webpack_require__(16); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(288); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toKey_js__ = __webpack_require__(91); +var _reactDom2 = _interopRequireDefault(_reactDom); +var _shallowEqual = __webpack_require__(63); +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = Object(__WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */])(path, object); +var _colorManipulator = __webpack_require__(50); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); - var index = 0, - length = path.length; +var _EnhancedButton = __webpack_require__(51); - while (object != null && index < length) { - object = object[Object(__WEBPACK_IMPORTED_MODULE_1__toKey_js__["a" /* default */])(path[index++])]; - } - return (index && index == length) ? object : undefined; -} +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); -/* harmony default export */ __webpack_exports__["a"] = (baseGet); +var _IconButton = __webpack_require__(64); +var _IconButton2 = _interopRequireDefault(_IconButton); -/***/ }), -/* 288 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _expandLess = __webpack_require__(724); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isKey_js__ = __webpack_require__(181); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__ = __webpack_require__(274); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(276); +var _expandLess2 = _interopRequireDefault(_expandLess); +var _expandMore = __webpack_require__(731); +var _expandMore2 = _interopRequireDefault(_expandMore); +var _NestedList = __webpack_require__(732); +var _NestedList2 = _interopRequireDefault(_NestedList); -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */])(value)) { - return value; - } - return Object(__WEBPACK_IMPORTED_MODULE_1__isKey_js__["a" /* default */])(value, object) ? [value] : Object(__WEBPACK_IMPORTED_MODULE_2__stringToPath_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(value)); -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/* harmony default export */ __webpack_exports__["a"] = (castPath); +function getStyles(props, context, state) { + var insetChildren = props.insetChildren, + leftAvatar = props.leftAvatar, + leftCheckbox = props.leftCheckbox, + leftIcon = props.leftIcon, + nestedLevel = props.nestedLevel, + rightAvatar = props.rightAvatar, + rightIcon = props.rightIcon, + rightIconButton = props.rightIconButton, + rightToggle = props.rightToggle, + secondaryText = props.secondaryText, + secondaryTextLines = props.secondaryTextLines; + var muiTheme = context.muiTheme; + var listItem = muiTheme.listItem; -/***/ }), -/* 289 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var textColor = muiTheme.baseTheme.palette.textColor; + var hoverColor = props.hoverColor || (0, _colorManipulator.fade)(textColor, 0.1); + var singleAvatar = !secondaryText && (leftAvatar || rightAvatar); + var singleNoAvatar = !secondaryText && !(leftAvatar || rightAvatar); + var twoLine = secondaryText && secondaryTextLines === 1; + var threeLine = secondaryText && secondaryTextLines > 1; -"use strict"; -var createIsPristine = function createIsPristine(_ref) { - var deepEqual = _ref.deepEqual, - empty = _ref.empty, - getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - var formState = getFormState(state); - var initial = getIn(formState, form + '.initial') || empty; - var values = getIn(formState, form + '.values') || initial; - return deepEqual(initial, values); - }; - }; -}; + var styles = { + root: { + backgroundColor: (state.isKeyboardFocused || state.hovered) && !state.rightIconButtonHovered && !state.rightIconButtonKeyboardFocused ? hoverColor : null, + color: textColor, + display: 'block', + fontSize: 16, + lineHeight: '16px', + position: 'relative', + transition: _transitions2.default.easeOut() + }, -/* harmony default export */ __webpack_exports__["a"] = (createIsPristine); + // This inner div is needed so that ripples will span the entire container + innerDiv: { + marginLeft: nestedLevel * listItem.nestedLevelDepth, + paddingLeft: leftIcon || leftAvatar || leftCheckbox || insetChildren ? 72 : 16, + paddingRight: rightIcon || rightAvatar || rightIconButton ? 56 : rightToggle ? 72 : 16, + paddingBottom: singleAvatar ? 20 : 16, + paddingTop: singleNoAvatar || threeLine ? 16 : 20, + position: 'relative' + }, -/***/ }), -/* 290 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + icons: { + height: 24, + width: 24, + display: 'block', + position: 'absolute', + top: twoLine ? 12 : singleAvatar ? 4 : 0, + margin: 12 + }, -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(121); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(90); + leftIcon: { + left: 4 + }, + rightIcon: { + right: 4 + }, + avatars: { + position: 'absolute', + top: singleAvatar ? 8 : 16 + }, -/** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignMergeValue(object, key, value) { - if ((value !== undefined && !Object(__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */])(object[key], value)) || - (value === undefined && !(key in object))) { - Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(object, key, value); - } -} + label: { + cursor: 'pointer' + }, -/* harmony default export */ __webpack_exports__["a"] = (assignMergeValue); + leftAvatar: { + left: 16 + }, + rightAvatar: { + right: 16 + }, -/***/ }), -/* 291 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + leftCheckbox: { + position: 'absolute', + display: 'block', + width: 24, + top: twoLine ? 24 : singleAvatar ? 16 : 12, + left: 16 + }, -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(280); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__ = __webpack_require__(632); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(120); + primaryText: {}, + rightIconButton: { + position: 'absolute', + display: 'block', + top: twoLine ? 12 : singleAvatar ? 4 : 0, + right: 4 + }, + rightToggle: { + position: 'absolute', + display: 'block', + width: 54, + top: twoLine ? 25 : singleAvatar ? 17 : 13, + right: 8 + }, + secondaryText: { + fontSize: 14, + lineHeight: threeLine ? '18px' : '16px', + height: threeLine ? 36 : 16, + margin: 0, + marginTop: 4, + color: listItem.secondaryTextColor, -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return Object(__WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */])(object) ? Object(__WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */])(object, true) : Object(__WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__["a" /* default */])(object); + // needed for 2 and 3 line ellipsis + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: threeLine ? null : 'nowrap', + display: threeLine ? '-webkit-box' : null, + WebkitLineClamp: threeLine ? 2 : null, + WebkitBoxOrient: threeLine ? 'vertical' : null + } + }; + + return styles; } -/* harmony default export */ __webpack_exports__["a"] = (keysIn); +var ListItem = function (_Component) { + (0, _inherits3.default)(ListItem, _Component); + function ListItem() { + var _ref; -/***/ }), -/* 292 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var _temp, _this, _ret; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(271); + (0, _classCallCheck3.default)(this, ListItem); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -var silenceEvent = function silenceEvent(event) { - var is = Object(__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */])(event); - if (is) { - event.preventDefault(); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ListItem.__proto__ || (0, _getPrototypeOf2.default)(ListItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + open: false, + rightIconButtonHovered: false, + rightIconButtonKeyboardFocused: false, + touch: false + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + _this.props.onKeyboardFocus(event, isKeyboardFocused); + }, _this.handleMouseEnter = function (event) { + if (!_this.state.touch) _this.setState({ hovered: true }); + _this.props.onMouseEnter(event); + }, _this.handleMouseLeave = function (event) { + _this.setState({ hovered: false }); + _this.props.onMouseLeave(event); + }, _this.handleNestedListToggle = function (event) { + event.stopPropagation(); + + if (_this.props.open === null) { + _this.setState({ open: !_this.state.open }, function () { + _this.props.onNestedListToggle(_this); + }); + } else { + // Exposing `this` in the callback is quite a bad API. + // I'm doing a one level deep clone to expose a fake state.open. + _this.props.onNestedListToggle((0, _extends3.default)({}, _this, { + state: { + open: !_this.state.open + } + })); + } + }, _this.handleRightIconButtonKeyboardFocus = function (event, isKeyboardFocused) { + if (isKeyboardFocused) { + _this.setState({ + isKeyboardFocused: false, + rightIconButtonKeyboardFocused: isKeyboardFocused + }); + } + + var iconButton = _this.props.rightIconButton; + + if (iconButton && iconButton.props.onKeyboardFocus) iconButton.props.onKeyboardFocus(event, isKeyboardFocused); + }, _this.handleRightIconButtonMouseLeave = function (event) { + var iconButton = _this.props.rightIconButton; + _this.setState({ rightIconButtonHovered: false }); + if (iconButton && iconButton.props.onMouseLeave) iconButton.props.onMouseLeave(event); + }, _this.handleRightIconButtonMouseEnter = function (event) { + var iconButton = _this.props.rightIconButton; + _this.setState({ rightIconButtonHovered: true }); + if (iconButton && iconButton.props.onMouseEnter) iconButton.props.onMouseEnter(event); + }, _this.handleRightIconButtonMouseUp = function (event) { + var iconButton = _this.props.rightIconButton; + event.stopPropagation(); + if (iconButton && iconButton.props.onMouseUp) iconButton.props.onMouseUp(event); + }, _this.handleRightIconButtonTouchTap = function (event) { + var iconButton = _this.props.rightIconButton; + + // Stop the event from bubbling up to the list-item + event.stopPropagation(); + if (iconButton && iconButton.props.onTouchTap) iconButton.props.onTouchTap(event); + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); + _this.props.onTouchStart(event); + }, _this.handleTouchEnd = function (event) { + _this.setState({ touch: true }); + _this.props.onTouchEnd(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - return is; -}; -/* harmony default export */ __webpack_exports__["a"] = (silenceEvent); + (0, _createClass3.default)(ListItem, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + open: this.props.open === null ? this.props.initiallyOpen === true : this.props.open + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + // update the state when the component is controlled. + if (nextProps.open !== null) this.setState({ open: nextProps.open }); + if (nextProps.disabled && this.state.hovered) this.setState({ hovered: false }); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } -/***/ }), -/* 293 */ -/***/ (function(module, exports, __webpack_require__) { + // This method is needed by the `MenuItem` component. -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(51); -var toObject = __webpack_require__(84); -var IE_PROTO = __webpack_require__(136)('IE_PROTO'); -var ObjectProto = Object.prototype; + }, { + key: 'applyFocusState', + value: function applyFocusState(focusState) { + var button = this.refs.enhancedButton; -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; + if (button) { + var buttonEl = _reactDom2.default.findDOMNode(button); + switch (focusState) { + case 'none': + buttonEl.blur(); + break; + case 'focused': + buttonEl.focus(); + break; + case 'keyboard-focused': + button.setKeyboardFocus(); + buttonEl.focus(); + break; + } + } + } + }, { + key: 'createDisabledElement', + value: function createDisabledElement(styles, contentChildren, additionalProps) { + var _props = this.props, + innerDivStyle = _props.innerDivStyle, + style = _props.style; -/***/ }), -/* 294 */ -/***/ (function(module, exports, __webpack_require__) { -// most Object methods by ES6 should accept primitives -var $export = __webpack_require__(28); -var core = __webpack_require__(18); -var fails = __webpack_require__(63); -module.exports = function (KEY, exec) { - var fn = (core.Object || {})[KEY] || Object[KEY]; - var exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); -}; + var mergedDivStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, style); + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, additionalProps, { + style: this.context.muiTheme.prepareStyles(mergedDivStyles) + }), + contentChildren + ); + } + }, { + key: 'createLabelElement', + value: function createLabelElement(styles, contentChildren, additionalProps) { + var _props2 = this.props, + innerDivStyle = _props2.innerDivStyle, + style = _props2.style; -/***/ }), -/* 295 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; + var mergedLabelStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, styles.label, style); -var LIBRARY = __webpack_require__(122); -var $export = __webpack_require__(28); -var redefine = __webpack_require__(296); -var hide = __webpack_require__(50); -var has = __webpack_require__(51); -var Iterators = __webpack_require__(78); -var $iterCreate = __webpack_require__(667); -var setToStringTag = __webpack_require__(123); -var getPrototypeOf = __webpack_require__(293); -var ITERATOR = __webpack_require__(22)('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; + return _react2.default.createElement( + 'label', + (0, _extends3.default)({}, additionalProps, { + style: this.context.muiTheme.prepareStyles(mergedLabelStyles) + }), + contentChildren + ); + } + }, { + key: 'createTextElement', + value: function createTextElement(styles, data, key) { + var prepareStyles = this.context.muiTheme.prepareStyles; -var returnThis = function () { return this; }; + if (_react2.default.isValidElement(data)) { + var style = (0, _simpleAssign2.default)({}, styles, data.props.style); + if (typeof data.type === 'string') { + // if element is a native dom node + style = prepareStyles(style); + } + return _react2.default.cloneElement(data, { + key: key, + style: style + }); + } -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - // Fix native - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // fix for some old engines - if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); + return _react2.default.createElement( + 'div', + { key: key, style: prepareStyles(styles) }, + data + ); } - } - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { return $native.call(this); }; - } - // Define iterator - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -}; + }, { + key: 'pushElement', + value: function pushElement(children, element, baseStyles, additionalProps) { + if (element) { + var styles = (0, _simpleAssign2.default)({}, baseStyles, element.props.style); + children.push(_react2.default.cloneElement(element, (0, _extends3.default)({ + key: children.length, + style: styles + }, additionalProps))); + } + } + }, { + key: 'render', + value: function render() { + var _props3 = this.props, + autoGenerateNestedIndicator = _props3.autoGenerateNestedIndicator, + children = _props3.children, + disabled = _props3.disabled, + disableKeyboardFocus = _props3.disableKeyboardFocus, + hoverColor = _props3.hoverColor, + initiallyOpen = _props3.initiallyOpen, + innerDivStyle = _props3.innerDivStyle, + insetChildren = _props3.insetChildren, + leftAvatar = _props3.leftAvatar, + leftCheckbox = _props3.leftCheckbox, + leftIcon = _props3.leftIcon, + nestedItems = _props3.nestedItems, + nestedLevel = _props3.nestedLevel, + nestedListStyle = _props3.nestedListStyle, + onKeyboardFocus = _props3.onKeyboardFocus, + onMouseEnter = _props3.onMouseEnter, + onMouseLeave = _props3.onMouseLeave, + onNestedListToggle = _props3.onNestedListToggle, + onTouchStart = _props3.onTouchStart, + onTouchTap = _props3.onTouchTap, + rightAvatar = _props3.rightAvatar, + rightIcon = _props3.rightIcon, + rightIconButton = _props3.rightIconButton, + rightToggle = _props3.rightToggle, + primaryText = _props3.primaryText, + primaryTogglesNestedList = _props3.primaryTogglesNestedList, + secondaryText = _props3.secondaryText, + secondaryTextLines = _props3.secondaryTextLines, + style = _props3.style, + other = (0, _objectWithoutProperties3.default)(_props3, ['autoGenerateNestedIndicator', 'children', 'disabled', 'disableKeyboardFocus', 'hoverColor', 'initiallyOpen', 'innerDivStyle', 'insetChildren', 'leftAvatar', 'leftCheckbox', 'leftIcon', 'nestedItems', 'nestedLevel', 'nestedListStyle', 'onKeyboardFocus', 'onMouseEnter', 'onMouseLeave', 'onNestedListToggle', 'onTouchStart', 'onTouchTap', 'rightAvatar', 'rightIcon', 'rightIconButton', 'rightToggle', 'primaryText', 'primaryTogglesNestedList', 'secondaryText', 'secondaryTextLines', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + var styles = getStyles(this.props, this.context, this.state); + var contentChildren = [children]; -/***/ }), -/* 296 */ -/***/ (function(module, exports, __webpack_require__) { + if (leftIcon) { + var additionalProps = { + color: leftIcon.props.color || this.context.muiTheme.listItem.leftIconColor + }; + this.pushElement(contentChildren, leftIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.leftIcon), additionalProps); + } + + if (rightIcon) { + var _additionalProps = { + color: rightIcon.props.color || this.context.muiTheme.listItem.rightIconColor + }; + this.pushElement(contentChildren, rightIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.rightIcon), _additionalProps); + } -module.exports = __webpack_require__(50); + if (leftAvatar) { + this.pushElement(contentChildren, leftAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.leftAvatar)); + } + if (rightAvatar) { + this.pushElement(contentChildren, rightAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.rightAvatar)); + } -/***/ }), -/* 297 */ -/***/ (function(module, exports, __webpack_require__) { + if (leftCheckbox) { + this.pushElement(contentChildren, leftCheckbox, (0, _simpleAssign2.default)({}, styles.leftCheckbox)); + } + + // RightIconButtonElement + var hasNestListItems = nestedItems.length; + var hasRightElement = rightAvatar || rightIcon || rightIconButton || rightToggle; + var needsNestedIndicator = hasNestListItems && autoGenerateNestedIndicator && !hasRightElement; + + if (rightIconButton || needsNestedIndicator) { + var rightIconButtonElement = rightIconButton; + var rightIconButtonHandlers = { + onKeyboardFocus: this.handleRightIconButtonKeyboardFocus, + onMouseEnter: this.handleRightIconButtonMouseEnter, + onMouseLeave: this.handleRightIconButtonMouseLeave, + onTouchTap: this.handleRightIconButtonTouchTap, + onMouseDown: this.handleRightIconButtonMouseUp, + onMouseUp: this.handleRightIconButtonMouseUp + }; -var document = __webpack_require__(23).document; -module.exports = document && document.documentElement; + // Create a nested list indicator icon if we don't have an icon on the right + if (needsNestedIndicator) { + rightIconButtonElement = this.state.open ? _react2.default.createElement( + _IconButton2.default, + null, + _react2.default.createElement(_expandLess2.default, null) + ) : _react2.default.createElement( + _IconButton2.default, + null, + _react2.default.createElement(_expandMore2.default, null) + ); + rightIconButtonHandlers.onTouchTap = this.handleNestedListToggle; + } + this.pushElement(contentChildren, rightIconButtonElement, (0, _simpleAssign2.default)({}, styles.rightIconButton), rightIconButtonHandlers); + } -/***/ }), -/* 298 */ -/***/ (function(module, exports, __webpack_require__) { + if (rightToggle) { + this.pushElement(contentChildren, rightToggle, (0, _simpleAssign2.default)({}, styles.rightToggle)); + } -// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) -var $keys = __webpack_require__(207); -var hiddenKeys = __webpack_require__(138).concat('length', 'prototype'); + if (primaryText) { + var primaryTextElement = this.createTextElement(styles.primaryText, primaryText, 'primaryText'); + contentChildren.push(primaryTextElement); + } -exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return $keys(O, hiddenKeys); -}; + if (secondaryText) { + var secondaryTextElement = this.createTextElement(styles.secondaryText, secondaryText, 'secondaryText'); + contentChildren.push(secondaryTextElement); + } + var nestedList = nestedItems.length ? _react2.default.createElement( + _NestedList2.default, + { nestedLevel: nestedLevel, open: this.state.open, style: nestedListStyle }, + nestedItems + ) : undefined; -/***/ }), -/* 299 */ -/***/ (function(module, exports, __webpack_require__) { + var simpleLabel = !primaryTogglesNestedList && (leftCheckbox || rightToggle); -var pIE = __webpack_require__(101); -var createDesc = __webpack_require__(82); -var toIObject = __webpack_require__(52); -var toPrimitive = __webpack_require__(132); -var has = __webpack_require__(51); -var IE8_DOM_DEFINE = __webpack_require__(206); -var gOPD = Object.getOwnPropertyDescriptor; + return _react2.default.createElement( + 'div', + null, + simpleLabel ? this.createLabelElement(styles, contentChildren, other) : disabled ? this.createDisabledElement(styles, contentChildren, other) : _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({ + containerElement: 'span' + }, other, { + disableKeyboardFocus: disableKeyboardFocus || this.state.rightIconButtonKeyboardFocused, + onKeyboardFocus: this.handleKeyboardFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd, + onTouchTap: primaryTogglesNestedList ? this.handleNestedListToggle : onTouchTap, + ref: 'enhancedButton', + style: (0, _simpleAssign2.default)({}, styles.root, style) + }), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.innerDiv, innerDivStyle)) }, + contentChildren + ) + ), + nestedList + ); + } + }]); + return ListItem; +}(_react.Component); -exports.f = __webpack_require__(44) ? gOPD : function getOwnPropertyDescriptor(O, P) { - O = toIObject(O); - P = toPrimitive(P, true); - if (IE8_DOM_DEFINE) try { - return gOPD(O, P); - } catch (e) { /* empty */ } - if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +ListItem.muiName = 'ListItem'; +ListItem.defaultProps = { + autoGenerateNestedIndicator: true, + disableKeyboardFocus: false, + disabled: false, + initiallyOpen: false, + insetChildren: false, + nestedItems: [], + nestedLevel: 0, + onKeyboardFocus: function onKeyboardFocus() {}, + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + onNestedListToggle: function onNestedListToggle() {}, + onTouchEnd: function onTouchEnd() {}, + onTouchStart: function onTouchStart() {}, + open: null, + primaryTogglesNestedList: false, + secondaryTextLines: 1 }; - - -/***/ }), -/* 300 */ -/***/ (function(module, exports) { - - +ListItem.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ListItem.propTypes = { + /** + * If true, generate a nested-list-indicator icon when nested list + * items are detected. Note that an indicator will not be created + * if a `rightIcon` or `rightIconButton` has been provided to + * the element. + */ + autoGenerateNestedIndicator: _react.PropTypes.bool, + /** + * Children passed into the `ListItem`. + */ + children: _react.PropTypes.node, + /** + * If true, the element will not be able to be focused by the keyboard. + */ + disableKeyboardFocus: _react.PropTypes.bool, + /** + * If true, the element will not be clickable + * and will not display hover effects. + * This is automatically disabled if either `leftCheckbox` + * or `rightToggle` is set. + */ + disabled: _react.PropTypes.bool, + /** + * Override the hover background color. + */ + hoverColor: _react.PropTypes.string, + /** + * If true, the nested `ListItem`s are initially displayed. + */ + initiallyOpen: _react.PropTypes.bool, + /** + * Override the inline-styles of the inner div element. + */ + innerDivStyle: _react.PropTypes.object, + /** + * If true, the children will be indented by 72px. + * This is useful if there is no left avatar or left icon. + */ + insetChildren: _react.PropTypes.bool, + /** + * This is the `Avatar` element to be displayed on the left side. + */ + leftAvatar: _react.PropTypes.element, + /** + * This is the `Checkbox` element to be displayed on the left side. + */ + leftCheckbox: _react.PropTypes.element, + /** + * This is the `SvgIcon` or `FontIcon` to be displayed on the left side. + */ + leftIcon: _react.PropTypes.element, + /** + * An array of `ListItem`s to nest underneath the current `ListItem`. + */ + nestedItems: _react.PropTypes.arrayOf(_react.PropTypes.element), + /** + * Controls how deep a `ListItem` appears. + * This property is automatically managed, so modify at your own risk. + */ + nestedLevel: _react.PropTypes.number, + /** + * Override the inline-styles of the nested items' `NestedList`. + */ + nestedListStyle: _react.PropTypes.object, + /** + * Callback function fired when the `ListItem` is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the `ListItem`. + * @param {boolean} isKeyboardFocused If true, the `ListItem` is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Callbak function fired when the `ListItem` toggles its nested list. + * + * @param {object} listItem The `ListItem`. + */ + onNestedListToggle: _react.PropTypes.func, + /** @ignore */ + onTouchEnd: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** @ignore */ + onTouchTap: _react.PropTypes.func, + /** + * Control toggle state of nested list. + */ + open: _react.PropTypes.bool, + /** + * This is the block element that contains the primary text. + * If a string is passed in, a div tag will be rendered. + */ + primaryText: _react.PropTypes.node, + /** + * If true, clicking or tapping the primary text of the `ListItem` + * toggles the nested list. + */ + primaryTogglesNestedList: _react.PropTypes.bool, + /** + * This is the `Avatar` element to be displayed on the right side. + */ + rightAvatar: _react.PropTypes.element, + /** + * This is the `SvgIcon` or `FontIcon` to be displayed on the right side. + */ + rightIcon: _react.PropTypes.element, + /** + * This is the `IconButton` to be displayed on the right side. + * Hovering over this button will remove the `ListItem` hover. + * Also, clicking on this button will not trigger a + * ripple on the `ListItem`; the event will be stopped and prevented + * from bubbling up to cause a `ListItem` click. + */ + rightIconButton: _react.PropTypes.element, + /** + * This is the `Toggle` element to display on the right side. + */ + rightToggle: _react.PropTypes.element, + /** + * This is the block element that contains the secondary text. + * If a string is passed in, a div tag will be rendered. + */ + secondaryText: _react.PropTypes.node, + /** + * Can be 1 or 2. This is the number of secondary + * text lines before ellipsis will show. + */ + secondaryTextLines: _react.PropTypes.oneOf([1, 2]), + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = ListItem; /***/ }), -/* 301 */ +/* 318 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22394,6 +23096,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); +var _toConsumableArray2 = __webpack_require__(95); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -22414,257 +23120,304 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _react = __webpack_require__(0); +var _toArray2 = __webpack_require__(319); -var _getMuiTheme = __webpack_require__(125); +var _toArray3 = _interopRequireDefault(_toArray2); -var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); +var _simpleAssign = __webpack_require__(6); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -var MuiThemeProvider = function (_Component) { - (0, _inherits3.default)(MuiThemeProvider, _Component); +var _react = __webpack_require__(0); - function MuiThemeProvider() { - (0, _classCallCheck3.default)(this, MuiThemeProvider); - return (0, _possibleConstructorReturn3.default)(this, (MuiThemeProvider.__proto__ || (0, _getPrototypeOf2.default)(MuiThemeProvider)).apply(this, arguments)); - } +var _react2 = _interopRequireDefault(_react); - (0, _createClass3.default)(MuiThemeProvider, [{ - key: 'getChildContext', - value: function getChildContext() { - return { - muiTheme: this.props.muiTheme || (0, _getMuiTheme2.default)() - }; - } - }, { - key: 'render', - value: function render() { - return this.props.children; - } - }]); - return MuiThemeProvider; -}(_react.Component); +var _reactDom = __webpack_require__(16); -MuiThemeProvider.childContextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? MuiThemeProvider.propTypes = { - children: _react.PropTypes.element, - muiTheme: _react.PropTypes.object -} : void 0; -exports.default = MuiThemeProvider; +var _reactDom2 = _interopRequireDefault(_reactDom); -/***/ }), -/* 302 */ -/***/ (function(module, exports, __webpack_require__) { +var _reactAddonsTransitionGroup = __webpack_require__(132); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); -module.exports = { "default": __webpack_require__(689), __esModule: true }; +var _dom = __webpack_require__(320); -/***/ }), -/* 303 */ -/***/ (function(module, exports, __webpack_require__) { +var _dom2 = _interopRequireDefault(_dom); -// call something on iterator step with safe closing on error -var anObject = __webpack_require__(36); -module.exports = function (iterator, fn, value, entries) { - try { - return entries ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (e) { - var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); - throw e; - } -}; +var _CircleRipple = __webpack_require__(721); +var _CircleRipple2 = _interopRequireDefault(_CircleRipple); -/***/ }), -/* 304 */ -/***/ (function(module, exports, __webpack_require__) { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -// check on default Array iterator -var Iterators = __webpack_require__(78); -var ITERATOR = __webpack_require__(22)('iterator'); -var ArrayProto = Array.prototype; +// Remove the first element of the array +var shift = function shift(_ref) { + var _ref2 = (0, _toArray3.default)(_ref), + newArray = _ref2.slice(1); -module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + return newArray; }; +var TouchRipple = function (_Component) { + (0, _inherits3.default)(TouchRipple, _Component); -/***/ }), -/* 305 */ -/***/ (function(module, exports, __webpack_require__) { + function TouchRipple(props, context) { + (0, _classCallCheck3.default)(this, TouchRipple); -var ITERATOR = __webpack_require__(22)('iterator'); -var SAFE_CLOSING = false; + // Touch start produces a mouse down event for compat reasons. To avoid + // showing ripples twice we skip showing a ripple for the first mouse down + // after a touch start. Note we don't store ignoreNextMouseDown in this.state + // to avoid re-rendering when we change it. + var _this = (0, _possibleConstructorReturn3.default)(this, (TouchRipple.__proto__ || (0, _getPrototypeOf2.default)(TouchRipple)).call(this, props, context)); -try { - var riter = [7][ITERATOR](); - riter['return'] = function () { SAFE_CLOSING = true; }; - // eslint-disable-next-line no-throw-literal - Array.from(riter, function () { throw 2; }); -} catch (e) { /* empty */ } + _this.handleMouseDown = function (event) { + // only listen to left clicks + if (event.button === 0) { + _this.start(event, false); + } + }; -module.exports = function (exec, skipClosing) { - if (!skipClosing && !SAFE_CLOSING) return false; - var safe = false; - try { - var arr = [7]; - var iter = arr[ITERATOR](); - iter.next = function () { return { done: safe = true }; }; - arr[ITERATOR] = function () { return iter; }; - exec(arr); - } catch (e) { /* empty */ } - return safe; -}; + _this.handleMouseUp = function () { + _this.end(); + }; + _this.handleMouseLeave = function () { + _this.end(); + }; -/***/ }), -/* 306 */ -/***/ (function(module, exports, __webpack_require__) { + _this.handleTouchStart = function (event) { + event.stopPropagation(); + // If the user is swiping (not just tapping), save the position so we can + // abort ripples if the user appears to be scrolling. + if (_this.props.abortOnScroll && event.touches) { + _this.startListeningForScrollAbort(event); + _this.startTime = Date.now(); + } + _this.start(event, true); + }; -"use strict"; + _this.handleTouchEnd = function () { + _this.end(); + }; + _this.handleTouchMove = function (event) { + // Stop trying to abort if we're already 300ms into the animation + var timeSinceStart = Math.abs(Date.now() - _this.startTime); + if (timeSinceStart > 300) { + _this.stopListeningForScrollAbort(); + return; + } -Object.defineProperty(exports, "__esModule", { - value: true -}); + // If the user is scrolling... + var deltaY = Math.abs(event.touches[0].clientY - _this.firstTouchY); + var deltaX = Math.abs(event.touches[0].clientX - _this.firstTouchX); + // Call it a scroll after an arbitrary 6px (feels reasonable in testing) + if (deltaY > 6 || deltaX > 6) { + var currentRipples = _this.state.ripples; + var ripple = currentRipples[0]; + // This clone will replace the ripple in ReactTransitionGroup with a + // version that will disappear immediately when removed from the DOM + var abortedRipple = _react2.default.cloneElement(ripple, { aborted: true }); + // Remove the old ripple and replace it with the new updated one + currentRipples = shift(currentRipples); + currentRipples = [].concat((0, _toConsumableArray3.default)(currentRipples), [abortedRipple]); + _this.setState({ ripples: currentRipples }, function () { + // Call end after we've set the ripple to abort otherwise the setState + // in end() merges with this and the ripple abort fails + _this.end(); + }); + } + }; -var _colors = __webpack_require__(57); + _this.ignoreNextMouseDown = false; -var _colorManipulator = __webpack_require__(56); + _this.state = { + // This prop allows us to only render the ReactTransitionGroup + // on the first click of the component, making the inital render faster. + hasRipples: false, + nextKey: 0, + ripples: [] + }; + return _this; + } -var _spacing = __webpack_require__(192); + (0, _createClass3.default)(TouchRipple, [{ + key: 'start', + value: function start(event, isRippleTouchGenerated) { + var theme = this.context.muiTheme.ripple; -var _spacing2 = _interopRequireDefault(_spacing); + if (this.ignoreNextMouseDown && !isRippleTouchGenerated) { + this.ignoreNextMouseDown = false; + return; + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var ripples = this.state.ripples; -/** - * Light Theme is the default theme used in material-ui. It is guaranteed to - * have all theme variables needed for every component. Variables not defined - * in a custom theme will default to these values. - */ -exports.default = { - spacing: _spacing2.default, - fontFamily: 'Roboto, sans-serif', - palette: { - primary1Color: _colors.cyan500, - primary2Color: _colors.cyan700, - primary3Color: _colors.grey400, - accent1Color: _colors.pinkA200, - accent2Color: _colors.grey100, - accent3Color: _colors.grey500, - textColor: _colors.darkBlack, - secondaryTextColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.54), - alternateTextColor: _colors.white, - canvasColor: _colors.white, - borderColor: _colors.grey300, - disabledColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.3), - pickerHeaderColor: _colors.cyan500, - clockCircleColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.07), - shadowColor: _colors.fullBlack - } -}; /** - * NB: If you update this file, please also update `docs/src/app/customization/Themes.js` - */ + // Add a ripple to the ripples array + ripples = [].concat((0, _toConsumableArray3.default)(ripples), [_react2.default.createElement(_CircleRipple2.default, { + key: this.state.nextKey, + style: !this.props.centerRipple ? this.getRippleStyle(event) : {}, + color: this.props.color || theme.color, + opacity: this.props.opacity, + touchGenerated: isRippleTouchGenerated + })]); -/***/ }), -/* 307 */ -/***/ (function(module, exports, __webpack_require__) { + this.ignoreNextMouseDown = isRippleTouchGenerated; + this.setState({ + hasRipples: true, + nextKey: this.state.nextKey + 1, + ripples: ripples + }); + } + }, { + key: 'end', + value: function end() { + var currentRipples = this.state.ripples; + this.setState({ + ripples: shift(currentRipples) + }); + if (this.props.abortOnScroll) { + this.stopListeningForScrollAbort(); + } + } -"use strict"; + // Check if the user seems to be scrolling and abort the animation if so + + }, { + key: 'startListeningForScrollAbort', + value: function startListeningForScrollAbort(event) { + this.firstTouchY = event.touches[0].clientY; + this.firstTouchX = event.touches[0].clientX; + // Note that when scolling Chrome throttles this event to every 200ms + // Also note we don't listen for scroll events directly as there's no general + // way to cover cases like scrolling within containers on the page + document.body.addEventListener('touchmove', this.handleTouchMove); + } + }, { + key: 'stopListeningForScrollAbort', + value: function stopListeningForScrollAbort() { + document.body.removeEventListener('touchmove', this.handleTouchMove); + } + }, { + key: 'getRippleStyle', + value: function getRippleStyle(event) { + var el = _reactDom2.default.findDOMNode(this); + var elHeight = el.offsetHeight; + var elWidth = el.offsetWidth; + var offset = _dom2.default.offset(el); + var isTouchEvent = event.touches && event.touches.length; + var pageX = isTouchEvent ? event.touches[0].pageX : event.pageX; + var pageY = isTouchEvent ? event.touches[0].pageY : event.pageY; + var pointerX = pageX - offset.left; + var pointerY = pageY - offset.top; + var topLeftDiag = this.calcDiag(pointerX, pointerY); + var topRightDiag = this.calcDiag(elWidth - pointerX, pointerY); + var botRightDiag = this.calcDiag(elWidth - pointerX, elHeight - pointerY); + var botLeftDiag = this.calcDiag(pointerX, elHeight - pointerY); + var rippleRadius = Math.max(topLeftDiag, topRightDiag, botRightDiag, botLeftDiag); + var rippleSize = rippleRadius * 2; + var left = pointerX - rippleRadius; + var top = pointerY - rippleRadius; + + return { + directionInvariant: true, + height: rippleSize, + width: rippleSize, + top: top, + left: left + }; + } + }, { + key: 'calcDiag', + value: function calcDiag(a, b) { + return Math.sqrt(a * a + b * b); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + style = _props.style; + var _state = this.state, + hasRipples = _state.hasRipples, + ripples = _state.ripples; + var prepareStyles = this.context.muiTheme.prepareStyles; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = { - menu: 1000, - appBar: 1100, - drawerOverlay: 1200, - drawer: 1300, - dialogOverlay: 1400, - dialog: 1500, - layer: 2000, - popover: 2100, - snackbar: 2900, - tooltip: 3000 -}; + var rippleGroup = void 0; -/***/ }), -/* 308 */ -/***/ (function(module, exports, __webpack_require__) { + if (hasRipples) { + var mergedStyles = (0, _simpleAssign2.default)({ + height: '100%', + width: '100%', + position: 'absolute', + top: 0, + left: 0, + overflow: 'hidden', + pointerEvents: 'none' + }, style); -"use strict"; + rippleGroup = _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + { style: prepareStyles(mergedStyles) }, + ripples + ); + } + return _react2.default.createElement( + 'div', + { + onMouseUp: this.handleMouseUp, + onMouseDown: this.handleMouseDown, + onMouseLeave: this.handleMouseLeave, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd + }, + rippleGroup, + children + ); + } + }]); + return TouchRipple; +}(_react.Component); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = { "Webkit": { "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "backfaceVisibility": true, "perspective": true, "perspectiveOrigin": true, "transformStyle": true, "transformOriginZ": true, "animation": true, "animationDelay": true, "animationDirection": true, "animationFillMode": true, "animationDuration": true, "animationIterationCount": true, "animationName": true, "animationPlayState": true, "animationTimingFunction": true, "appearance": true, "userSelect": true, "fontKerning": true, "textEmphasisPosition": true, "textEmphasis": true, "textEmphasisStyle": true, "textEmphasisColor": true, "boxDecorationBreak": true, "clipPath": true, "maskImage": true, "maskMode": true, "maskRepeat": true, "maskPosition": true, "maskClip": true, "maskOrigin": true, "maskSize": true, "maskComposite": true, "mask": true, "maskBorderSource": true, "maskBorderMode": true, "maskBorderSlice": true, "maskBorderWidth": true, "maskBorderOutset": true, "maskBorderRepeat": true, "maskBorder": true, "maskType": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "filter": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true, "flex": true, "flexBasis": true, "flexDirection": true, "flexGrow": true, "flexFlow": true, "flexShrink": true, "flexWrap": true, "alignContent": true, "alignItems": true, "alignSelf": true, "justifyContent": true, "order": true, "transition": true, "transitionDelay": true, "transitionDuration": true, "transitionProperty": true, "transitionTimingFunction": true, "backdropFilter": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "shapeImageThreshold": true, "shapeImageMargin": true, "shapeImageOutside": true, "hyphens": true, "flowInto": true, "flowFrom": true, "regionFragment": true, "textSizeAdjust": true }, "Moz": { "appearance": true, "userSelect": true, "boxSizing": true, "textAlignLast": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "tabSize": true, "hyphens": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true }, "ms": { "flex": true, "flexBasis": false, "flexDirection": true, "flexGrow": false, "flexFlow": true, "flexShrink": false, "flexWrap": true, "alignContent": false, "alignItems": false, "alignSelf": false, "justifyContent": false, "order": false, "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "userSelect": true, "wrapFlow": true, "wrapThrough": true, "wrapMargin": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "touchAction": true, "hyphens": true, "flowInto": true, "flowFrom": true, "breakBefore": true, "breakAfter": true, "breakInside": true, "regionFragment": true, "gridTemplateColumns": true, "gridTemplateRows": true, "gridTemplateAreas": true, "gridTemplate": true, "gridAutoColumns": true, "gridAutoRows": true, "gridAutoFlow": true, "grid": true, "gridRowStart": true, "gridColumnStart": true, "gridRowEnd": true, "gridRow": true, "gridColumn": true, "gridColumnEnd": true, "gridColumnGap": true, "gridRowGap": true, "gridArea": true, "gridGap": true, "textSizeAdjust": true } }; -module.exports = exports["default"]; +TouchRipple.defaultProps = { + abortOnScroll: true +}; +TouchRipple.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TouchRipple.propTypes = { + abortOnScroll: _react.PropTypes.bool, + centerRipple: _react.PropTypes.bool, + children: _react.PropTypes.node, + color: _react.PropTypes.string, + opacity: _react.PropTypes.number, + style: _react.PropTypes.object +} : void 0; +exports.default = TouchRipple; /***/ }), -/* 309 */ +/* 319 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = sortPrefixedStyle; +exports.__esModule = true; -var _isPrefixedProperty = __webpack_require__(696); +var _from = __webpack_require__(306); -var _isPrefixedProperty2 = _interopRequireDefault(_isPrefixedProperty); +var _from2 = _interopRequireDefault(_from); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function sortPrefixedStyle(style) { - return Object.keys(style).sort(function (left, right) { - if ((0, _isPrefixedProperty2.default)(left) && !(0, _isPrefixedProperty2.default)(right)) { - return -1; - } else if (!(0, _isPrefixedProperty2.default)(left) && (0, _isPrefixedProperty2.default)(right)) { - return 1; - } - return 0; - }).reduce(function (sortedStyle, prop) { - sortedStyle[prop] = style[prop]; - return sortedStyle; - }, {}); -} -module.exports = exports['default']; - -/***/ }), -/* 310 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var uppercasePattern = /[A-Z]/g; -var msPattern = /^ms-/; -var cache = {}; - -function hyphenateStyleName(string) { - return string in cache - ? cache[string] - : cache[string] = string - .replace(uppercasePattern, '-$&') - .toLowerCase() - .replace(msPattern, '-ms-'); -} - -module.exports = hyphenateStyleName; - +exports.default = function (arr) { + return Array.isArray(arr) ? arr : (0, _from2.default)(arr); +}; /***/ }), -/* 311 */ +/* 320 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22673,39 +23426,28 @@ module.exports = hyphenateStyleName; Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = { + isDescendant: function isDescendant(parent, child) { + var node = child.parentNode; -var _classCallCheck2 = __webpack_require__(1); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _colors = __webpack_require__(57); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var Typography = function Typography() { - (0, _classCallCheck3.default)(this, Typography); - - // text colors - this.textFullBlack = _colors.fullBlack; - this.textDarkBlack = _colors.darkBlack; - this.textLightBlack = _colors.lightBlack; - this.textMinBlack = _colors.minBlack; - this.textFullWhite = _colors.fullWhite; - this.textDarkWhite = _colors.darkWhite; - this.textLightWhite = _colors.lightWhite; - - // font weight - this.fontWeightLight = 300; - this.fontWeightNormal = 400; - this.fontWeightMedium = 500; + while (node !== null) { + if (node === parent) return true; + node = node.parentNode; + } - this.fontStyleButtonFontSize = 14; + return false; + }, + offset: function offset(el) { + var rect = el.getBoundingClientRect(); + return { + top: rect.top + document.body.scrollTop, + left: rect.left + document.body.scrollLeft + }; + } }; -exports.default = new Typography(); - /***/ }), -/* 312 */ +/* 321 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22716,16 +23458,16 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _Subheader = __webpack_require__(729); +var _FontIcon = __webpack_require__(723); -var _Subheader2 = _interopRequireDefault(_Subheader); +var _FontIcon2 = _interopRequireDefault(_FontIcon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = _Subheader2.default; +exports.default = _FontIcon2.default; /***/ }), -/* 313 */ +/* 322 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -22735,14 +23477,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _extends2 = __webpack_require__(7); var _extends3 = _interopRequireDefault(_extends2); +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -22771,678 +23513,387 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); - -var _reactDom2 = _interopRequireDefault(_reactDom); - -var _shallowEqual = __webpack_require__(58); - -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); - -var _colorManipulator = __webpack_require__(56); - var _transitions = __webpack_require__(10); var _transitions2 = _interopRequireDefault(_transitions); -var _EnhancedButton = __webpack_require__(59); - -var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); - -var _IconButton = __webpack_require__(95); - -var _IconButton2 = _interopRequireDefault(_IconButton); - -var _expandLess = __webpack_require__(740); - -var _expandLess2 = _interopRequireDefault(_expandLess); - -var _expandMore = __webpack_require__(747); - -var _expandMore2 = _interopRequireDefault(_expandMore); - -var _NestedList = __webpack_require__(748); - -var _NestedList2 = _interopRequireDefault(_NestedList); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function getStyles(props, context, state) { - var insetChildren = props.insetChildren, - leftAvatar = props.leftAvatar, - leftCheckbox = props.leftCheckbox, - leftIcon = props.leftIcon, - nestedLevel = props.nestedLevel, - rightAvatar = props.rightAvatar, - rightIcon = props.rightIcon, - rightIconButton = props.rightIconButton, - rightToggle = props.rightToggle, - secondaryText = props.secondaryText, - secondaryTextLines = props.secondaryTextLines; - var muiTheme = context.muiTheme; - var listItem = muiTheme.listItem; + var verticalPosition = props.verticalPosition; + var horizontalPosition = props.horizontalPosition; + var touchMarginOffset = props.touch ? 10 : 0; + var touchOffsetTop = props.touch ? -20 : -10; + var offset = verticalPosition === 'bottom' ? 14 + touchMarginOffset : -14 - touchMarginOffset; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + zIndex = _context$muiTheme.zIndex, + tooltip = _context$muiTheme.tooltip; - var textColor = muiTheme.baseTheme.palette.textColor; - var hoverColor = props.hoverColor || (0, _colorManipulator.fade)(textColor, 0.1); - var singleAvatar = !secondaryText && (leftAvatar || rightAvatar); - var singleNoAvatar = !secondaryText && !(leftAvatar || rightAvatar); - var twoLine = secondaryText && secondaryTextLines === 1; - var threeLine = secondaryText && secondaryTextLines > 1; var styles = { root: { - backgroundColor: (state.isKeyboardFocused || state.hovered) && !state.rightIconButtonHovered && !state.rightIconButtonKeyboardFocused ? hoverColor : null, - color: textColor, - display: 'block', - fontSize: 16, - lineHeight: '16px', - position: 'relative', - transition: _transitions2.default.easeOut() - }, - - // This inner div is needed so that ripples will span the entire container - innerDiv: { - marginLeft: nestedLevel * listItem.nestedLevelDepth, - paddingLeft: leftIcon || leftAvatar || leftCheckbox || insetChildren ? 72 : 16, - paddingRight: rightIcon || rightAvatar || rightIconButton ? 56 : rightToggle ? 72 : 16, - paddingBottom: singleAvatar ? 20 : 16, - paddingTop: singleNoAvatar || threeLine ? 16 : 20, - position: 'relative' - }, - - icons: { - height: 24, - width: 24, - display: 'block', - position: 'absolute', - top: twoLine ? 12 : singleAvatar ? 4 : 0, - margin: 12 - }, - - leftIcon: { - left: 4 - }, - - rightIcon: { - right: 4 - }, - - avatars: { position: 'absolute', - top: singleAvatar ? 8 : 16 + fontFamily: baseTheme.fontFamily, + fontSize: '10px', + lineHeight: '22px', + padding: '0 8px', + zIndex: zIndex.tooltip, + color: tooltip.color, + overflow: 'hidden', + top: -10000, + borderRadius: 2, + userSelect: 'none', + opacity: 0, + right: horizontalPosition === 'left' ? 12 : null, + left: horizontalPosition === 'center' ? (state.offsetWidth - 48) / 2 * -1 : null, + transition: _transitions2.default.easeOut('0ms', 'top', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') }, - label: { - cursor: 'pointer' - }, - - leftAvatar: { - left: 16 - }, - - rightAvatar: { - right: 16 + position: 'relative', + whiteSpace: 'nowrap' }, - - leftCheckbox: { + ripple: { position: 'absolute', - display: 'block', - width: 24, - top: twoLine ? 24 : singleAvatar ? 16 : 12, - left: 16 + left: horizontalPosition === 'center' ? '50%' : horizontalPosition === 'left' ? '100%' : '0%', + top: verticalPosition === 'bottom' ? 0 : '100%', + transform: 'translate(-50%, -50%)', + borderRadius: '50%', + backgroundColor: 'transparent', + transition: _transitions2.default.easeOut('0ms', 'width', '450ms') + ', ' + _transitions2.default.easeOut('0ms', 'height', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') }, - - primaryText: {}, - - rightIconButton: { - position: 'absolute', - display: 'block', - top: twoLine ? 12 : singleAvatar ? 4 : 0, - right: 4 + rootWhenShown: { + top: verticalPosition === 'top' ? touchOffsetTop : 36, + opacity: 0.9, + transform: 'translate(0px, ' + offset + 'px)', + transition: _transitions2.default.easeOut('0ms', 'top', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') }, - - rightToggle: { - position: 'absolute', - display: 'block', - width: 54, - top: twoLine ? 25 : singleAvatar ? 17 : 13, - right: 8 + rootWhenTouched: { + fontSize: '14px', + lineHeight: '32px', + padding: '0 16px' }, - - secondaryText: { - fontSize: 14, - lineHeight: threeLine ? '18px' : '16px', - height: threeLine ? 36 : 16, - margin: 0, - marginTop: 4, - color: listItem.secondaryTextColor, - - // needed for 2 and 3 line ellipsis - overflow: 'hidden', - textOverflow: 'ellipsis', - whiteSpace: threeLine ? null : 'nowrap', - display: threeLine ? '-webkit-box' : null, - WebkitLineClamp: threeLine ? 2 : null, - WebkitBoxOrient: threeLine ? 'vertical' : null + rippleWhenShown: { + backgroundColor: tooltip.rippleBackgroundColor, + transition: _transitions2.default.easeOut('450ms', 'width', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'height', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') } }; return styles; } -var ListItem = function (_Component) { - (0, _inherits3.default)(ListItem, _Component); +var Tooltip = function (_Component) { + (0, _inherits3.default)(Tooltip, _Component); - function ListItem() { + function Tooltip() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, ListItem); + (0, _classCallCheck3.default)(this, Tooltip); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ListItem.__proto__ || (0, _getPrototypeOf2.default)(ListItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - hovered: false, - isKeyboardFocused: false, - open: false, - rightIconButtonHovered: false, - rightIconButtonKeyboardFocused: false, - touch: false - }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { - _this.setState({ isKeyboardFocused: isKeyboardFocused }); - _this.props.onKeyboardFocus(event, isKeyboardFocused); - }, _this.handleMouseEnter = function (event) { - if (!_this.state.touch) _this.setState({ hovered: true }); - _this.props.onMouseEnter(event); - }, _this.handleMouseLeave = function (event) { - _this.setState({ hovered: false }); - _this.props.onMouseLeave(event); - }, _this.handleNestedListToggle = function (event) { - event.stopPropagation(); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tooltip.__proto__ || (0, _getPrototypeOf2.default)(Tooltip)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + offsetWidth: null + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } - if (_this.props.open === null) { - _this.setState({ open: !_this.state.open }, function () { - _this.props.onNestedListToggle(_this); - }); + (0, _createClass3.default)(Tooltip, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setRippleSize(); + this.setTooltipPosition(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps() { + this.setTooltipPosition(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.setRippleSize(); + } + }, { + key: 'setRippleSize', + value: function setRippleSize() { + var ripple = this.refs.ripple; + var tooltip = this.refs.tooltip; + var tooltipWidth = parseInt(tooltip.offsetWidth, 10) / (this.props.horizontalPosition === 'center' ? 2 : 1); + var tooltipHeight = parseInt(tooltip.offsetHeight, 10); + + var rippleDiameter = Math.ceil(Math.sqrt(Math.pow(tooltipHeight, 2) + Math.pow(tooltipWidth, 2)) * 2); + if (this.props.show) { + ripple.style.height = rippleDiameter + 'px'; + ripple.style.width = rippleDiameter + 'px'; } else { - // Exposing `this` in the callback is quite a bad API. - // I'm doing a one level deep clone to expose a fake state.open. - _this.props.onNestedListToggle((0, _extends3.default)({}, _this, { - state: { - open: !_this.state.open + ripple.style.width = '0px'; + ripple.style.height = '0px'; + } + } + }, { + key: 'setTooltipPosition', + value: function setTooltipPosition() { + this.setState({ offsetWidth: this.refs.tooltip.offsetWidth }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + horizontalPosition = _props.horizontalPosition, + label = _props.label, + show = _props.show, + touch = _props.touch, + verticalPosition = _props.verticalPosition, + other = (0, _objectWithoutProperties3.default)(_props, ['horizontalPosition', 'label', 'show', 'touch', 'verticalPosition']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { + ref: 'tooltip', + style: prepareStyles((0, _simpleAssign2.default)(styles.root, this.props.show && styles.rootWhenShown, this.props.touch && styles.rootWhenTouched, this.props.style)) + }), + _react2.default.createElement('div', { + ref: 'ripple', + style: prepareStyles((0, _simpleAssign2.default)(styles.ripple, this.props.show && styles.rippleWhenShown)) + }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + label + ) + ); + } + }]); + return Tooltip; +}(_react.Component); + +Tooltip.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Tooltip.propTypes = { + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + horizontalPosition: _react.PropTypes.oneOf(['left', 'right', 'center']), + label: _react.PropTypes.node.isRequired, + show: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + touch: _react.PropTypes.bool, + verticalPosition: _react.PropTypes.oneOf(['top', 'bottom']) +} : void 0; +exports.default = Tooltip; + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var createHelper = function createHelper(func, helperName) { + var setDisplayName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var noArgs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + if (false) { + var _ret = function () { + /* eslint-disable global-require */ + var wrapDisplayName = require('./wrapDisplayName').default; + /* eslint-enable global-require */ + + if (noArgs) { + return { + v: function v(BaseComponent) { + var Component = func(BaseComponent); + Component.displayName = wrapDisplayName(BaseComponent, helperName); + return Component; } - })); - } - }, _this.handleRightIconButtonKeyboardFocus = function (event, isKeyboardFocused) { - if (isKeyboardFocused) { - _this.setState({ - isKeyboardFocused: false, - rightIconButtonKeyboardFocused: isKeyboardFocused - }); + }; } - var iconButton = _this.props.rightIconButton; + return { + v: function v() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - if (iconButton && iconButton.props.onKeyboardFocus) iconButton.props.onKeyboardFocus(event, isKeyboardFocused); - }, _this.handleRightIconButtonMouseLeave = function (event) { - var iconButton = _this.props.rightIconButton; - _this.setState({ rightIconButtonHovered: false }); - if (iconButton && iconButton.props.onMouseLeave) iconButton.props.onMouseLeave(event); - }, _this.handleRightIconButtonMouseEnter = function (event) { - var iconButton = _this.props.rightIconButton; - _this.setState({ rightIconButtonHovered: true }); - if (iconButton && iconButton.props.onMouseEnter) iconButton.props.onMouseEnter(event); - }, _this.handleRightIconButtonMouseUp = function (event) { - var iconButton = _this.props.rightIconButton; - event.stopPropagation(); - if (iconButton && iconButton.props.onMouseUp) iconButton.props.onMouseUp(event); - }, _this.handleRightIconButtonTouchTap = function (event) { - var iconButton = _this.props.rightIconButton; + return function (BaseComponent) { + var Component = func.apply(undefined, args)(BaseComponent); + Component.displayName = wrapDisplayName(BaseComponent, helperName); + return Component; + }; + } + }; + }(); - // Stop the event from bubbling up to the list-item - event.stopPropagation(); - if (iconButton && iconButton.props.onTouchTap) iconButton.props.onTouchTap(event); - }, _this.handleTouchStart = function (event) { - _this.setState({ touch: true }); - _this.props.onTouchStart(event); - }, _this.handleTouchEnd = function (event) { - _this.setState({ touch: true }); - _this.props.onTouchEnd(event); - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + if (typeof _ret === "object") return _ret.v; } - (0, _createClass3.default)(ListItem, [{ - key: 'componentWillMount', - value: function componentWillMount() { - this.setState({ - open: this.props.open === null ? this.props.initiallyOpen === true : this.props.open - }); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - // update the state when the component is controlled. - if (nextProps.open !== null) this.setState({ open: nextProps.open }); - if (nextProps.disabled && this.state.hovered) this.setState({ hovered: false }); - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState, nextContext) { - return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); - } + return func; +}; - // This method is needed by the `MenuItem` component. +exports.default = createHelper; - }, { - key: 'applyFocusState', - value: function applyFocusState(focusState) { - var button = this.refs.enhancedButton; +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { - if (button) { - var buttonEl = _reactDom2.default.findDOMNode(button); +"use strict"; - switch (focusState) { - case 'none': - buttonEl.blur(); - break; - case 'focused': - buttonEl.focus(); - break; - case 'keyboard-focused': - button.setKeyboardFocus(); - buttonEl.focus(); - break; - } - } - } - }, { - key: 'createDisabledElement', - value: function createDisabledElement(styles, contentChildren, additionalProps) { - var _props = this.props, - innerDivStyle = _props.innerDivStyle, - style = _props.style; +Object.defineProperty(exports, "__esModule", { + value: true +}); - var mergedDivStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, style); +var _extends2 = __webpack_require__(7); - return _react2.default.createElement( - 'div', - (0, _extends3.default)({}, additionalProps, { - style: this.context.muiTheme.prepareStyles(mergedDivStyles) - }), - contentChildren - ); - } - }, { - key: 'createLabelElement', - value: function createLabelElement(styles, contentChildren, additionalProps) { - var _props2 = this.props, - innerDivStyle = _props2.innerDivStyle, - style = _props2.style; +var _extends3 = _interopRequireDefault(_extends2); +var _objectWithoutProperties2 = __webpack_require__(8); - var mergedLabelStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, styles.label, style); +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - return _react2.default.createElement( - 'label', - (0, _extends3.default)({}, additionalProps, { - style: this.context.muiTheme.prepareStyles(mergedLabelStyles) - }), - contentChildren - ); - } - }, { - key: 'createTextElement', - value: function createTextElement(styles, data, key) { - var prepareStyles = this.context.muiTheme.prepareStyles; +var _getPrototypeOf = __webpack_require__(3); - if (_react2.default.isValidElement(data)) { - var style = (0, _simpleAssign2.default)({}, styles, data.props.style); - if (typeof data.type === 'string') { - // if element is a native dom node - style = prepareStyles(style); - } - return _react2.default.cloneElement(data, { - key: key, - style: style - }); - } +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - return _react2.default.createElement( - 'div', - { key: key, style: prepareStyles(styles) }, - data - ); - } - }, { - key: 'pushElement', - value: function pushElement(children, element, baseStyles, additionalProps) { - if (element) { - var styles = (0, _simpleAssign2.default)({}, baseStyles, element.props.style); - children.push(_react2.default.cloneElement(element, (0, _extends3.default)({ - key: children.length, - style: styles - }, additionalProps))); - } - } - }, { - key: 'render', - value: function render() { - var _props3 = this.props, - autoGenerateNestedIndicator = _props3.autoGenerateNestedIndicator, - children = _props3.children, - disabled = _props3.disabled, - disableKeyboardFocus = _props3.disableKeyboardFocus, - hoverColor = _props3.hoverColor, - initiallyOpen = _props3.initiallyOpen, - innerDivStyle = _props3.innerDivStyle, - insetChildren = _props3.insetChildren, - leftAvatar = _props3.leftAvatar, - leftCheckbox = _props3.leftCheckbox, - leftIcon = _props3.leftIcon, - nestedItems = _props3.nestedItems, - nestedLevel = _props3.nestedLevel, - nestedListStyle = _props3.nestedListStyle, - onKeyboardFocus = _props3.onKeyboardFocus, - onMouseEnter = _props3.onMouseEnter, - onMouseLeave = _props3.onMouseLeave, - onNestedListToggle = _props3.onNestedListToggle, - onTouchStart = _props3.onTouchStart, - onTouchTap = _props3.onTouchTap, - rightAvatar = _props3.rightAvatar, - rightIcon = _props3.rightIcon, - rightIconButton = _props3.rightIconButton, - rightToggle = _props3.rightToggle, - primaryText = _props3.primaryText, - primaryTogglesNestedList = _props3.primaryTogglesNestedList, - secondaryText = _props3.secondaryText, - secondaryTextLines = _props3.secondaryTextLines, - style = _props3.style, - other = (0, _objectWithoutProperties3.default)(_props3, ['autoGenerateNestedIndicator', 'children', 'disabled', 'disableKeyboardFocus', 'hoverColor', 'initiallyOpen', 'innerDivStyle', 'insetChildren', 'leftAvatar', 'leftCheckbox', 'leftIcon', 'nestedItems', 'nestedLevel', 'nestedListStyle', 'onKeyboardFocus', 'onMouseEnter', 'onMouseLeave', 'onNestedListToggle', 'onTouchStart', 'onTouchTap', 'rightAvatar', 'rightIcon', 'rightIconButton', 'rightToggle', 'primaryText', 'primaryTogglesNestedList', 'secondaryText', 'secondaryTextLines', 'style']); - var prepareStyles = this.context.muiTheme.prepareStyles; +var _classCallCheck2 = __webpack_require__(1); - var styles = getStyles(this.props, this.context, this.state); - var contentChildren = [children]; +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - if (leftIcon) { - var additionalProps = { - color: leftIcon.props.color || this.context.muiTheme.listItem.leftIconColor - }; - this.pushElement(contentChildren, leftIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.leftIcon), additionalProps); - } +var _createClass2 = __webpack_require__(2); - if (rightIcon) { - var _additionalProps = { - color: rightIcon.props.color || this.context.muiTheme.listItem.rightIconColor - }; - this.pushElement(contentChildren, rightIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.rightIcon), _additionalProps); - } +var _createClass3 = _interopRequireDefault(_createClass2); - if (leftAvatar) { - this.pushElement(contentChildren, leftAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.leftAvatar)); - } +var _possibleConstructorReturn2 = __webpack_require__(4); - if (rightAvatar) { - this.pushElement(contentChildren, rightAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.rightAvatar)); - } +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - if (leftCheckbox) { - this.pushElement(contentChildren, leftCheckbox, (0, _simpleAssign2.default)({}, styles.leftCheckbox)); - } +var _inherits2 = __webpack_require__(5); - // RightIconButtonElement - var hasNestListItems = nestedItems.length; - var hasRightElement = rightAvatar || rightIcon || rightIconButton || rightToggle; - var needsNestedIndicator = hasNestListItems && autoGenerateNestedIndicator && !hasRightElement; +var _inherits3 = _interopRequireDefault(_inherits2); - if (rightIconButton || needsNestedIndicator) { - var rightIconButtonElement = rightIconButton; - var rightIconButtonHandlers = { - onKeyboardFocus: this.handleRightIconButtonKeyboardFocus, - onMouseEnter: this.handleRightIconButtonMouseEnter, - onMouseLeave: this.handleRightIconButtonMouseLeave, - onTouchTap: this.handleRightIconButtonTouchTap, - onMouseDown: this.handleRightIconButtonMouseUp, - onMouseUp: this.handleRightIconButtonMouseUp - }; +var _simpleAssign = __webpack_require__(6); - // Create a nested list indicator icon if we don't have an icon on the right - if (needsNestedIndicator) { - rightIconButtonElement = this.state.open ? _react2.default.createElement( - _IconButton2.default, - null, - _react2.default.createElement(_expandLess2.default, null) - ) : _react2.default.createElement( - _IconButton2.default, - null, - _react2.default.createElement(_expandMore2.default, null) - ); - rightIconButtonHandlers.onTouchTap = this.handleNestedListToggle; - } +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - this.pushElement(contentChildren, rightIconButtonElement, (0, _simpleAssign2.default)({}, styles.rightIconButton), rightIconButtonHandlers); - } +var _react = __webpack_require__(0); - if (rightToggle) { - this.pushElement(contentChildren, rightToggle, (0, _simpleAssign2.default)({}, styles.rightToggle)); - } +var _react2 = _interopRequireDefault(_react); - if (primaryText) { - var primaryTextElement = this.createTextElement(styles.primaryText, primaryText, 'primaryText'); - contentChildren.push(primaryTextElement); - } +var _transitions = __webpack_require__(10); - if (secondaryText) { - var secondaryTextElement = this.createTextElement(styles.secondaryText, secondaryText, 'secondaryText'); - contentChildren.push(secondaryTextElement); - } +var _transitions2 = _interopRequireDefault(_transitions); - var nestedList = nestedItems.length ? _react2.default.createElement( - _NestedList2.default, - { nestedLevel: nestedLevel, open: this.state.open, style: nestedListStyle }, - nestedItems - ) : undefined; +var _AutoLockScrolling = __webpack_require__(740); - var simpleLabel = !primaryTogglesNestedList && (leftCheckbox || rightToggle); +var _AutoLockScrolling2 = _interopRequireDefault(_AutoLockScrolling); - return _react2.default.createElement( - 'div', - null, - simpleLabel ? this.createLabelElement(styles, contentChildren, other) : disabled ? this.createDisabledElement(styles, contentChildren, other) : _react2.default.createElement( - _EnhancedButton2.default, - (0, _extends3.default)({ - containerElement: 'span' - }, other, { - disableKeyboardFocus: disableKeyboardFocus || this.state.rightIconButtonKeyboardFocused, - onKeyboardFocus: this.handleKeyboardFocus, - onMouseLeave: this.handleMouseLeave, - onMouseEnter: this.handleMouseEnter, - onTouchStart: this.handleTouchStart, - onTouchEnd: this.handleTouchEnd, - onTouchTap: primaryTogglesNestedList ? this.handleNestedListToggle : onTouchTap, - ref: 'enhancedButton', - style: (0, _simpleAssign2.default)({}, styles.root, style) - }), - _react2.default.createElement( - 'div', - { style: prepareStyles((0, _simpleAssign2.default)(styles.innerDiv, innerDivStyle)) }, - contentChildren - ) - ), - nestedList - ); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var overlay = context.muiTheme.overlay; + + + var style = { + root: { + position: 'fixed', + height: '100%', + width: '100%', + top: 0, + left: '-100%', + opacity: 0, + backgroundColor: overlay.backgroundColor, + WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)', // Remove mobile color flashing (deprecated) + + // Two ways to promote overlay to its own render layer + willChange: 'opacity', + transform: 'translateZ(0)', + + transition: props.transitionEnabled && _transitions2.default.easeOut('0ms', 'left', '400ms') + ', ' + _transitions2.default.easeOut('400ms', 'opacity') } - }]); - return ListItem; -}(_react.Component); + }; -ListItem.muiName = 'ListItem'; -ListItem.defaultProps = { - autoGenerateNestedIndicator: true, - disableKeyboardFocus: false, - disabled: false, - initiallyOpen: false, - insetChildren: false, - nestedItems: [], - nestedLevel: 0, - onKeyboardFocus: function onKeyboardFocus() {}, - onMouseEnter: function onMouseEnter() {}, - onMouseLeave: function onMouseLeave() {}, - onNestedListToggle: function onNestedListToggle() {}, - onTouchEnd: function onTouchEnd() {}, - onTouchStart: function onTouchStart() {}, - open: null, - primaryTogglesNestedList: false, - secondaryTextLines: 1 -}; -ListItem.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? ListItem.propTypes = { - /** - * If true, generate a nested-list-indicator icon when nested list - * items are detected. Note that an indicator will not be created - * if a `rightIcon` or `rightIconButton` has been provided to - * the element. - */ - autoGenerateNestedIndicator: _react.PropTypes.bool, - /** - * Children passed into the `ListItem`. - */ - children: _react.PropTypes.node, - /** - * If true, the element will not be able to be focused by the keyboard. - */ - disableKeyboardFocus: _react.PropTypes.bool, - /** - * If true, the element will not be clickable - * and will not display hover effects. - * This is automatically disabled if either `leftCheckbox` - * or `rightToggle` is set. - */ - disabled: _react.PropTypes.bool, - /** - * Override the hover background color. - */ - hoverColor: _react.PropTypes.string, - /** - * If true, the nested `ListItem`s are initially displayed. - */ - initiallyOpen: _react.PropTypes.bool, - /** - * Override the inline-styles of the inner div element. - */ - innerDivStyle: _react.PropTypes.object, - /** - * If true, the children will be indented by 72px. - * This is useful if there is no left avatar or left icon. - */ - insetChildren: _react.PropTypes.bool, - /** - * This is the `Avatar` element to be displayed on the left side. - */ - leftAvatar: _react.PropTypes.element, - /** - * This is the `Checkbox` element to be displayed on the left side. - */ - leftCheckbox: _react.PropTypes.element, - /** - * This is the `SvgIcon` or `FontIcon` to be displayed on the left side. - */ - leftIcon: _react.PropTypes.element, - /** - * An array of `ListItem`s to nest underneath the current `ListItem`. - */ - nestedItems: _react.PropTypes.arrayOf(_react.PropTypes.element), - /** - * Controls how deep a `ListItem` appears. - * This property is automatically managed, so modify at your own risk. - */ - nestedLevel: _react.PropTypes.number, - /** - * Override the inline-styles of the nested items' `NestedList`. - */ - nestedListStyle: _react.PropTypes.object, - /** - * Callback function fired when the `ListItem` is focused or blurred by the keyboard. - * - * @param {object} event `focus` or `blur` event targeting the `ListItem`. - * @param {boolean} isKeyboardFocused If true, the `ListItem` is focused. - */ - onKeyboardFocus: _react.PropTypes.func, - /** @ignore */ - onMouseEnter: _react.PropTypes.func, - /** @ignore */ - onMouseLeave: _react.PropTypes.func, - /** - * Callbak function fired when the `ListItem` toggles its nested list. - * - * @param {object} listItem The `ListItem`. - */ - onNestedListToggle: _react.PropTypes.func, - /** @ignore */ - onTouchEnd: _react.PropTypes.func, - /** @ignore */ - onTouchStart: _react.PropTypes.func, - /** @ignore */ - onTouchTap: _react.PropTypes.func, - /** - * Control toggle state of nested list. - */ - open: _react.PropTypes.bool, - /** - * This is the block element that contains the primary text. - * If a string is passed in, a div tag will be rendered. - */ - primaryText: _react.PropTypes.node, - /** - * If true, clicking or tapping the primary text of the `ListItem` - * toggles the nested list. - */ - primaryTogglesNestedList: _react.PropTypes.bool, - /** - * This is the `Avatar` element to be displayed on the right side. - */ - rightAvatar: _react.PropTypes.element, - /** - * This is the `SvgIcon` or `FontIcon` to be displayed on the right side. - */ - rightIcon: _react.PropTypes.element, - /** - * This is the `IconButton` to be displayed on the right side. - * Hovering over this button will remove the `ListItem` hover. - * Also, clicking on this button will not trigger a - * ripple on the `ListItem`; the event will be stopped and prevented - * from bubbling up to cause a `ListItem` click. - */ - rightIconButton: _react.PropTypes.element, - /** - * This is the `Toggle` element to display on the right side. - */ - rightToggle: _react.PropTypes.element, - /** - * This is the block element that contains the secondary text. - * If a string is passed in, a div tag will be rendered. - */ - secondaryText: _react.PropTypes.node, - /** - * Can be 1 or 2. This is the number of secondary - * text lines before ellipsis will show. - */ - secondaryTextLines: _react.PropTypes.oneOf([1, 2]), + if (props.show) { + (0, _simpleAssign2.default)(style.root, { + left: 0, + opacity: 1, + transition: _transitions2.default.easeOut('0ms', 'left') + ', ' + _transitions2.default.easeOut('400ms', 'opacity') + }); + } + + return style; +} + +var Overlay = function (_Component) { + (0, _inherits3.default)(Overlay, _Component); + + function Overlay() { + (0, _classCallCheck3.default)(this, Overlay); + return (0, _possibleConstructorReturn3.default)(this, (Overlay.__proto__ || (0, _getPrototypeOf2.default)(Overlay)).apply(this, arguments)); + } + + (0, _createClass3.default)(Overlay, [{ + key: 'setOpacity', + value: function setOpacity(opacity) { + this.refs.overlay.style.opacity = opacity; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + autoLockScrolling = _props.autoLockScrolling, + show = _props.show, + style = _props.style, + transitionEnabled = _props.transitionEnabled, + other = (0, _objectWithoutProperties3.default)(_props, ['autoLockScrolling', 'show', 'style', 'transitionEnabled']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { ref: 'overlay', style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + autoLockScrolling && _react2.default.createElement(_AutoLockScrolling2.default, { lock: show }) + ); + } + }]); + return Overlay; +}(_react.Component); + +Overlay.defaultProps = { + autoLockScrolling: true, + style: {}, + transitionEnabled: true +}; +Overlay.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Overlay.propTypes = { + autoLockScrolling: _react.PropTypes.bool, + show: _react.PropTypes.bool.isRequired, /** * Override the inline-styles of the root element. */ - style: _react.PropTypes.object + style: _react.PropTypes.object, + transitionEnabled: _react.PropTypes.bool } : void 0; -exports.default = ListItem; +exports.default = Overlay; /***/ }), -/* 314 */ +/* 325 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23451,10 +23902,11 @@ exports.default = ListItem; Object.defineProperty(exports, "__esModule", { value: true }); +exports.SHOP_NAME = undefined; -var _toConsumableArray2 = __webpack_require__(189); +var _keys = __webpack_require__(62); -var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); +var _keys2 = _interopRequireDefault(_keys); var _getPrototypeOf = __webpack_require__(3); @@ -23476,405 +23928,252 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _toArray2 = __webpack_require__(315); - -var _toArray3 = _interopRequireDefault(_toArray2); +var _react = __webpack_require__(0); -var _simpleAssign = __webpack_require__(6); +var _react2 = _interopRequireDefault(_react); -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var _Tab = __webpack_require__(749); -var _react = __webpack_require__(0); +var _Tab2 = _interopRequireDefault(_Tab); -var _react2 = _interopRequireDefault(_react); +var _reactRedux = __webpack_require__(19); -var _reactDom = __webpack_require__(19); +var _FontIcon = __webpack_require__(321); -var _reactDom2 = _interopRequireDefault(_reactDom); +var _FontIcon2 = _interopRequireDefault(_FontIcon); -var _reactAddonsTransitionGroup = __webpack_require__(128); +var _IconButton = __webpack_require__(64); -var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); +var _IconButton2 = _interopRequireDefault(_IconButton); -var _dom = __webpack_require__(316); +var _colors = __webpack_require__(31); -var _dom2 = _interopRequireDefault(_dom); +var _Menus = __webpack_require__(84); -var _CircleRipple = __webpack_require__(736); +var menus = _interopRequireWildcard(_Menus); -var _CircleRipple2 = _interopRequireDefault(_CircleRipple); +var _Billing = __webpack_require__(750); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _Billing2 = _interopRequireDefault(_Billing); -// Remove the first element of the array -var shift = function shift(_ref) { - var _ref2 = (0, _toArray3.default)(_ref), - newArray = _ref2.slice(1); +var _Options = __webpack_require__(820); - return newArray; -}; +var _Options2 = _interopRequireDefault(_Options); -var TouchRipple = function (_Component) { - (0, _inherits3.default)(TouchRipple, _Component); +var _Sizes = __webpack_require__(821); - function TouchRipple(props, context) { - (0, _classCallCheck3.default)(this, TouchRipple); +var _Sizes2 = _interopRequireDefault(_Sizes); - // Touch start produces a mouse down event for compat reasons. To avoid - // showing ripples twice we skip showing a ripple for the first mouse down - // after a touch start. Note we don't store ignoreNextMouseDown in this.state - // to avoid re-rendering when we change it. - var _this = (0, _possibleConstructorReturn3.default)(this, (TouchRipple.__proto__ || (0, _getPrototypeOf2.default)(TouchRipple)).call(this, props, context)); +var _Atc = __webpack_require__(822); - _this.handleMouseDown = function (event) { - // only listen to left clicks - if (event.button === 0) { - _this.start(event, false); - } - }; +var _Atc2 = _interopRequireDefault(_Atc); - _this.handleMouseUp = function () { - _this.end(); - }; +var _Layout = __webpack_require__(343); - _this.handleMouseLeave = function () { - _this.end(); - }; +var _Layout2 = _interopRequireDefault(_Layout); - _this.handleTouchStart = function (event) { - event.stopPropagation(); - // If the user is swiping (not just tapping), save the position so we can - // abort ripples if the user appears to be scrolling. - if (_this.props.abortOnScroll && event.touches) { - _this.startListeningForScrollAbort(event); - _this.startTime = Date.now(); - } - _this.start(event, true); - }; +var _Badge = __webpack_require__(842); - _this.handleTouchEnd = function () { - _this.end(); - }; +var _Badge2 = _interopRequireDefault(_Badge); - _this.handleTouchMove = function (event) { - // Stop trying to abort if we're already 300ms into the animation - var timeSinceStart = Math.abs(Date.now() - _this.startTime); - if (timeSinceStart > 300) { - _this.stopListeningForScrollAbort(); - return; - } +var _menu = __webpack_require__(844); - // If the user is scrolling... - var deltaY = Math.abs(event.touches[0].clientY - _this.firstTouchY); - var deltaX = Math.abs(event.touches[0].clientX - _this.firstTouchX); - // Call it a scroll after an arbitrary 6px (feels reasonable in testing) - if (deltaY > 6 || deltaX > 6) { - var currentRipples = _this.state.ripples; - var ripple = currentRipples[0]; - // This clone will replace the ripple in ReactTransitionGroup with a - // version that will disappear immediately when removed from the DOM - var abortedRipple = _react2.default.cloneElement(ripple, { aborted: true }); - // Remove the old ripple and replace it with the new updated one - currentRipples = shift(currentRipples); - currentRipples = [].concat((0, _toConsumableArray3.default)(currentRipples), [abortedRipple]); - _this.setState({ ripples: currentRipples }, function () { - // Call end after we've set the ripple to abort otherwise the setState - // in end() merges with this and the ripple abort fails - _this.end(); - }); - } - }; +var _profiles = __webpack_require__(212); - _this.ignoreNextMouseDown = false; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - _this.state = { - // This prop allows us to only render the ReactTransitionGroup - // on the first click of the component, making the inital render faster. - hasRipples: false, - nextKey: 0, - ripples: [] - }; - return _this; - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - (0, _createClass3.default)(TouchRipple, [{ - key: 'start', - value: function start(event, isRippleTouchGenerated) { - var theme = this.context.muiTheme.ripple; +var SHOP_NAME = exports.SHOP_NAME = 'Supreme'; - if (this.ignoreNextMouseDown && !isRippleTouchGenerated) { - this.ignoreNextMouseDown = false; - return; - } +var Supreme = function (_Component) { + (0, _inherits3.default)(Supreme, _Component); - var ripples = this.state.ripples; + function Supreme() { + (0, _classCallCheck3.default)(this, Supreme); + return (0, _possibleConstructorReturn3.default)(this, (Supreme.__proto__ || (0, _getPrototypeOf2.default)(Supreme)).apply(this, arguments)); + } - // Add a ripple to the ripples array - ripples = [].concat((0, _toConsumableArray3.default)(ripples), [_react2.default.createElement(_CircleRipple2.default, { - key: this.state.nextKey, - style: !this.props.centerRipple ? this.getRippleStyle(event) : {}, - color: this.props.color || theme.color, - opacity: this.props.opacity, - touchGenerated: isRippleTouchGenerated - })]); + (0, _createClass3.default)(Supreme, [{ + key: 'getContainerForMenu', + value: function getContainerForMenu(menu) { + var _this2 = this; - this.ignoreNextMouseDown = isRippleTouchGenerated; - this.setState({ - hasRipples: true, - nextKey: this.state.nextKey + 1, - ripples: ripples - }); - } - }, { - key: 'end', - value: function end() { - var currentRipples = this.state.ripples; - this.setState({ - ripples: shift(currentRipples) - }); - if (this.props.abortOnScroll) { - this.stopListeningForScrollAbort(); + switch (menu) { + case menus.MENU_BILLING: + return _react2.default.createElement(_Billing2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + case menus.MENU_OPTIONS: + return _react2.default.createElement(_Options2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + case menus.MENU_SIZES: + return _react2.default.createElement(_Sizes2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + case menus.MENU_ATC: + return _react2.default.createElement(_Atc2.default, { shop: SHOP_NAME }); + default: + return null; } } - - // Check if the user seems to be scrolling and abort the animation if so - }, { - key: 'startListeningForScrollAbort', - value: function startListeningForScrollAbort(event) { - this.firstTouchY = event.touches[0].clientY; - this.firstTouchX = event.touches[0].clientX; - // Note that when scolling Chrome throttles this event to every 200ms - // Also note we don't listen for scroll events directly as there's no general - // way to cover cases like scrolling within containers on the page - document.body.addEventListener('touchmove', this.handleTouchMove); + key: 'strToNumberReducer', + value: function strToNumberReducer(menu, key, value) { + // Don't process values for billing + if (typeof value === 'string' && !isNaN(value) && menu !== menus.MENU_BILLING) { + return +value; + } + return value; } }, { - key: 'stopListeningForScrollAbort', - value: function stopListeningForScrollAbort() { - document.body.removeEventListener('touchmove', this.handleTouchMove); + key: 'transform', + value: function transform(menu, obj, reducer) { + var keys = (0, _keys2.default)(obj); + var newObj = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = obj[key]; + newObj[key] = reducer(menu, key, value); + } + return newObj; } }, { - key: 'getRippleStyle', - value: function getRippleStyle(event) { - var el = _reactDom2.default.findDOMNode(this); - var elHeight = el.offsetHeight; - var elWidth = el.offsetWidth; - var offset = _dom2.default.offset(el); - var isTouchEvent = event.touches && event.touches.length; - var pageX = isTouchEvent ? event.touches[0].pageX : event.pageX; - var pageY = isTouchEvent ? event.touches[0].pageY : event.pageY; - var pointerX = pageX - offset.left; - var pointerY = pageY - offset.top; - var topLeftDiag = this.calcDiag(pointerX, pointerY); - var topRightDiag = this.calcDiag(elWidth - pointerX, pointerY); - var botRightDiag = this.calcDiag(elWidth - pointerX, elHeight - pointerY); - var botLeftDiag = this.calcDiag(pointerX, elHeight - pointerY); - var rippleRadius = Math.max(topLeftDiag, topRightDiag, botRightDiag, botLeftDiag); - var rippleSize = rippleRadius * 2; - var left = pointerX - rippleRadius; - var top = pointerY - rippleRadius; - - return { - directionInvariant: true, - height: rippleSize, - width: rippleSize, - top: top, - left: left - }; + key: 'onSubmit', + value: function onSubmit(menu, data) { + var newObj = this.transform(menu, data, this.strToNumberReducer); + this.props.updateSettings(this.props.currentProfile, SHOP_NAME, menu, newObj); } }, { - key: 'calcDiag', - value: function calcDiag(a, b) { - return Math.sqrt(a * a + b * b); + key: 'componentWillMount', + value: function componentWillMount() { + if (this.props.menu == null) { + this.props.changeMenu(Supreme.getDefaultMenu()); + } } }, { - key: 'render', - value: function render() { - var _props = this.props, - children = _props.children, - style = _props.style; - var _state = this.state, - hasRipples = _state.hasRipples, - ripples = _state.ripples; - var prepareStyles = this.context.muiTheme.prepareStyles; - - - var rippleGroup = void 0; - - if (hasRipples) { - var mergedStyles = (0, _simpleAssign2.default)({ - height: '100%', - width: '100%', - position: 'absolute', - top: 0, - left: 0, - overflow: 'hidden', - pointerEvents: 'none' - }, style); - - rippleGroup = _react2.default.createElement( - _reactAddonsTransitionGroup2.default, - { style: prepareStyles(mergedStyles) }, - ripples + key: 'getIconForTabMenu', + value: function getIconForTabMenu(menu) { + if (menu === menus.MENU_ATC) { + return _react2.default.createElement( + _IconButton2.default, + { iconStyle: { color: 'white' }, style: { padding: 0 }, tooltipPosition: 'top-center', tooltipStyles: { color: 'white' } }, + _react2.default.createElement( + _Badge2.default, + { + badgeStyle: { top: -24, right: 12 }, + badgeContent: this.props.atcProducts.length, + primary: true + }, + _react2.default.createElement( + _FontIcon2.default, + { style: { color: 'white', top: -24, right: 12 }, className: 'material-icons' }, + 'done' + ) + ) ); } - + var isIncomplete = !this.props.settings[SHOP_NAME] || !this.props.settings[SHOP_NAME][menu]; + var color = isIncomplete ? _colors.red300 : 'white'; + var tip = isIncomplete ? 'This tab hasn\'t been configured yet' : ''; return _react2.default.createElement( - 'div', - { - onMouseUp: this.handleMouseUp, - onMouseDown: this.handleMouseDown, - onMouseLeave: this.handleMouseLeave, - onTouchStart: this.handleTouchStart, - onTouchEnd: this.handleTouchEnd - }, - rippleGroup, - children + _IconButton2.default, + { iconStyle: { color: color }, tooltip: tip, tooltipPosition: 'top-center', tooltipStyles: { color: 'white' } }, + _react2.default.createElement( + _FontIcon2.default, + { style: { color: color }, className: 'material-icons' }, + isIncomplete ? 'error' : 'done' + ) ); } - }]); - return TouchRipple; -}(_react.Component); - -TouchRipple.defaultProps = { - abortOnScroll: true -}; -TouchRipple.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? TouchRipple.propTypes = { - abortOnScroll: _react.PropTypes.bool, - centerRipple: _react.PropTypes.bool, - children: _react.PropTypes.node, - color: _react.PropTypes.string, - opacity: _react.PropTypes.number, - style: _react.PropTypes.object -} : void 0; -exports.default = TouchRipple; - -/***/ }), -/* 315 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _from = __webpack_require__(302); - -var _from2 = _interopRequireDefault(_from); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (arr) { - return Array.isArray(arr) ? arr : (0, _from2.default)(arr); -}; - -/***/ }), -/* 316 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = { - isDescendant: function isDescendant(parent, child) { - var node = child.parentNode; - - while (node !== null) { - if (node === parent) return true; - node = node.parentNode; - } - - return false; - }, - offset: function offset(el) { - var rect = el.getBoundingClientRect(); - return { - top: rect.top + document.body.scrollTop, - left: rect.left + document.body.scrollLeft - }; - } -}; - -/***/ }), -/* 317 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; - -var _FontIcon = __webpack_require__(738); - -var _FontIcon2 = _interopRequireDefault(_FontIcon); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _FontIcon2.default; - -/***/ }), -/* 318 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; -var createHelper = function createHelper(func, helperName) { - var setDisplayName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - var noArgs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - - if (false) { - var _ret = function () { - /* eslint-disable global-require */ - var wrapDisplayName = require('./wrapDisplayName').default; - /* eslint-enable global-require */ - - if (noArgs) { - return { - v: function v(BaseComponent) { - var Component = func(BaseComponent); - Component.displayName = wrapDisplayName(BaseComponent, helperName); - return Component; - } - }; - } - - return { - v: function v() { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + }, { + key: 'getTabs', + value: function getTabs() { + var _this3 = this; - return function (BaseComponent) { - var Component = func.apply(undefined, args)(BaseComponent); - Component.displayName = wrapDisplayName(BaseComponent, helperName); - return Component; - }; + return [_react2.default.createElement(_Tab2.default, { + label: 'Billing', + key: 1, + icon: this.getIconForTabMenu(menus.MENU_BILLING), + value: menus.MENU_BILLING, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_BILLING); } - }; - }(); + }), _react2.default.createElement(_Tab2.default, { + label: 'Options', + key: 2, + icon: this.getIconForTabMenu(menus.MENU_OPTIONS), + value: menus.MENU_OPTIONS, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_OPTIONS); + } + }), _react2.default.createElement(_Tab2.default, { + label: 'Sizes', + key: 3, + icon: this.getIconForTabMenu(menus.MENU_SIZES), + value: menus.MENU_SIZES, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_SIZES); + } + }), _react2.default.createElement(_Tab2.default, { + label: 'AutoCop', + key: 4, + icon: this.getIconForTabMenu(menus.MENU_ATC), + value: menus.MENU_ATC, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_ATC); + } + })]; + } + }, { + key: 'render', + value: function render() { + var menu = this.props.menu; - if (typeof _ret === "object") return _ret.v; - } + return _react2.default.createElement( + _Layout2.default, + { title: menu || 'Loading...', tabs: this.getTabs(), currentTab: menu }, + this.getContainerForMenu(menu) + ); + } + }], [{ + key: 'getDefaultMenu', + value: function getDefaultMenu() { + return menus.MENU_BILLING; + } + }]); + return Supreme; +}(_react.Component); - return func; -}; +function mapStateToProps(state) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + menu: state.menu.currentMenu, + settings: settings, + atcProducts: state.atc.atcProducts, + currentProfile: currentProfile + }; +} -exports.default = createHelper; +function mapDispatchToProps(dispatch) { + return { + changeMenu: function changeMenu(menu) { + return dispatch((0, _menu.changeMenu)(menu)); + }, + updateSettings: function updateSettings(currentProfile, shop, key, value) { + return dispatch((0, _profiles.updateProfileSettings)(currentProfile, shop, key, value)); + } + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Supreme); /***/ }), -/* 319 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23920,107 +24219,343 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(10); +var _reactDom = __webpack_require__(16); -var _transitions2 = _interopRequireDefault(_transitions); +var _reactDom2 = _interopRequireDefault(_reactDom); -var _AutoLockScrolling = __webpack_require__(754); +var _shallowEqual = __webpack_require__(63); -var _AutoLockScrolling2 = _interopRequireDefault(_AutoLockScrolling); +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _Popover = __webpack_require__(133); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _check = __webpack_require__(754); + +var _check2 = _interopRequireDefault(_check); + +var _ListItem = __webpack_require__(317); + +var _ListItem2 = _interopRequireDefault(_ListItem); + +var _Menu = __webpack_require__(205); + +var _Menu2 = _interopRequireDefault(_Menu); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props, context) { - var overlay = context.muiTheme.overlay; +var nestedMenuStyle = { + position: 'relative' +}; +function getStyles(props, context) { + var disabledColor = context.muiTheme.baseTheme.palette.disabledColor; + var textColor = context.muiTheme.baseTheme.palette.textColor; + var indent = props.desktop ? 64 : 72; + var sidePadding = props.desktop ? 24 : 16; - var style = { + var styles = { root: { - position: 'fixed', - height: '100%', - width: '100%', - top: 0, - left: '-100%', - opacity: 0, - backgroundColor: overlay.backgroundColor, - WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)', // Remove mobile color flashing (deprecated) + color: props.disabled ? disabledColor : textColor, + cursor: props.disabled ? 'not-allowed' : 'pointer', + minHeight: props.desktop ? '32px' : '48px', + lineHeight: props.desktop ? '32px' : '48px', + fontSize: props.desktop ? 15 : 16, + whiteSpace: 'nowrap' + }, - // Two ways to promote overlay to its own render layer - willChange: 'opacity', - transform: 'translateZ(0)', + innerDivStyle: { + paddingLeft: props.leftIcon || props.insetChildren || props.checked ? indent : sidePadding, + paddingRight: props.rightIcon ? indent : sidePadding, + paddingBottom: 0, + paddingTop: 0 + }, - transition: props.transitionEnabled && _transitions2.default.easeOut('0ms', 'left', '400ms') + ', ' + _transitions2.default.easeOut('400ms', 'opacity') + secondaryText: { + float: 'right' + }, + + leftIconDesktop: { + margin: 0, + left: 24, + top: 4 + }, + + rightIconDesktop: { + margin: 0, + right: 24, + top: 4, + fill: context.muiTheme.menuItem.rightIconDesktopFill } }; - if (props.show) { - (0, _simpleAssign2.default)(style.root, { - left: 0, - opacity: 1, - transition: _transitions2.default.easeOut('0ms', 'left') + ', ' + _transitions2.default.easeOut('400ms', 'opacity') - }); - } - - return style; + return styles; } -var Overlay = function (_Component) { - (0, _inherits3.default)(Overlay, _Component); +var MenuItem = function (_Component) { + (0, _inherits3.default)(MenuItem, _Component); - function Overlay() { - (0, _classCallCheck3.default)(this, Overlay); - return (0, _possibleConstructorReturn3.default)(this, (Overlay.__proto__ || (0, _getPrototypeOf2.default)(Overlay)).apply(this, arguments)); + function MenuItem() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, MenuItem); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuItem.__proto__ || (0, _getPrototypeOf2.default)(MenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.cloneMenuItem = function (item) { + return _react2.default.cloneElement(item, { + onTouchTap: function onTouchTap(event) { + if (!item.props.menuItems) { + _this.handleRequestClose(); + } + + if (item.props.onTouchTap) { + item.props.onTouchTap(event); + } + } + }); + }, _this.handleTouchTap = function (event) { + event.preventDefault(); + + _this.setState({ + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this) + }); + + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + }, _this.handleRequestClose = function () { + _this.setState({ + open: false, + anchorEl: null + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(Overlay, [{ - key: 'setOpacity', - value: function setOpacity(opacity) { - this.refs.overlay.style.opacity = opacity; + (0, _createClass3.default)(MenuItem, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.applyFocusState(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.state.open && nextProps.focusState === 'none') { + this.handleRequestClose(); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.applyFocusState(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + if (this.state.open) { + this.setState({ + open: false + }); + } + } + }, { + key: 'applyFocusState', + value: function applyFocusState() { + this.refs.listItem.applyFocusState(this.props.focusState); } }, { key: 'render', value: function render() { var _props = this.props, - autoLockScrolling = _props.autoLockScrolling, - show = _props.show, + checked = _props.checked, + children = _props.children, + desktop = _props.desktop, + disabled = _props.disabled, + focusState = _props.focusState, + innerDivStyle = _props.innerDivStyle, + insetChildren = _props.insetChildren, + leftIcon = _props.leftIcon, + menuItems = _props.menuItems, + rightIcon = _props.rightIcon, + secondaryText = _props.secondaryText, style = _props.style, - transitionEnabled = _props.transitionEnabled, - other = (0, _objectWithoutProperties3.default)(_props, ['autoLockScrolling', 'show', 'style', 'transitionEnabled']); + animation = _props.animation, + value = _props.value, + other = (0, _objectWithoutProperties3.default)(_props, ['checked', 'children', 'desktop', 'disabled', 'focusState', 'innerDivStyle', 'insetChildren', 'leftIcon', 'menuItems', 'rightIcon', 'secondaryText', 'style', 'animation', 'value']); var prepareStyles = this.context.muiTheme.prepareStyles; var styles = getStyles(this.props, this.context); + var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style); + var mergedInnerDivStyles = (0, _simpleAssign2.default)(styles.innerDivStyle, innerDivStyle); + + // Left Icon + var leftIconElement = leftIcon ? leftIcon : checked ? _react2.default.createElement(_check2.default, null) : null; + if (leftIconElement) { + var mergedLeftIconStyles = desktop ? (0, _simpleAssign2.default)(styles.leftIconDesktop, leftIconElement.props.style) : leftIconElement.props.style; + leftIconElement = _react2.default.cloneElement(leftIconElement, { style: mergedLeftIconStyles }); + } + + // Right Icon + var rightIconElement = void 0; + if (rightIcon) { + var mergedRightIconStyles = desktop ? (0, _simpleAssign2.default)(styles.rightIconDesktop, rightIcon.props.style) : rightIcon.props.style; + rightIconElement = _react2.default.cloneElement(rightIcon, { style: mergedRightIconStyles }); + } + + // Secondary Text + var secondaryTextElement = void 0; + if (secondaryText) { + var secondaryTextIsAnElement = _react2.default.isValidElement(secondaryText); + var mergedSecondaryTextStyles = secondaryTextIsAnElement ? (0, _simpleAssign2.default)(styles.secondaryText, secondaryText.props.style) : null; + + secondaryTextElement = secondaryTextIsAnElement ? _react2.default.cloneElement(secondaryText, { style: mergedSecondaryTextStyles }) : _react2.default.createElement( + 'div', + { style: prepareStyles(styles.secondaryText) }, + secondaryText + ); + } + var childMenuPopover = void 0; + if (menuItems) { + childMenuPopover = _react2.default.createElement( + _Popover2.default, + { + animation: animation, + anchorOrigin: { horizontal: 'right', vertical: 'top' }, + anchorEl: this.state.anchorEl, + open: this.state.open, + useLayerForClickAway: false, + onRequestClose: this.handleRequestClose + }, + _react2.default.createElement( + _Menu2.default, + { desktop: desktop, disabled: disabled, style: nestedMenuStyle }, + _react2.default.Children.map(menuItems, this.cloneMenuItem) + ) + ); + other.onTouchTap = this.handleTouchTap; + } return _react2.default.createElement( - 'div', - (0, _extends3.default)({}, other, { ref: 'overlay', style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), - autoLockScrolling && _react2.default.createElement(_AutoLockScrolling2.default, { lock: show }) + _ListItem2.default, + (0, _extends3.default)({}, other, { + disabled: disabled, + hoverColor: this.context.muiTheme.menuItem.hoverColor, + innerDivStyle: mergedInnerDivStyles, + insetChildren: insetChildren, + leftIcon: leftIconElement, + ref: 'listItem', + rightIcon: rightIconElement, + style: mergedRootStyles + }), + children, + secondaryTextElement, + childMenuPopover ); } }]); - return Overlay; + return MenuItem; }(_react.Component); -Overlay.defaultProps = { - autoLockScrolling: true, - style: {}, - transitionEnabled: true +MenuItem.muiName = 'MenuItem'; +MenuItem.defaultProps = { + checked: false, + desktop: false, + disabled: false, + focusState: 'none', + insetChildren: false }; -Overlay.contextTypes = { +MenuItem.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? Overlay.propTypes = { - autoLockScrolling: _react.PropTypes.bool, - show: _react.PropTypes.bool.isRequired, + false ? MenuItem.propTypes = { + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * If true, a left check mark will be rendered. + */ + checked: _react.PropTypes.bool, + /** + * Elements passed as children to the underlying `ListItem`. + */ + children: _react.PropTypes.node, + /** + * @ignore + * If true, the menu item will render with compact desktop + * styles. + */ + desktop: _react.PropTypes.bool, + /** + * If true, the menu item will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * The focus state of the menu item. This prop is used to set the focus + * state of the underlying `ListItem`. + */ + focusState: _react.PropTypes.oneOf(['none', 'focused', 'keyboard-focused']), + /** + * Override the inline-styles of the inner div. + */ + innerDivStyle: _react.PropTypes.object, + /** + * If true, the children will be indented. + * This is only needed when there is no `leftIcon`. + */ + insetChildren: _react.PropTypes.bool, + /** + * The `SvgIcon` or `FontIcon` to be displayed on the left side. + */ + leftIcon: _react.PropTypes.element, + /** + * `MenuItem` elements to nest within the menu item. + */ + menuItems: _react.PropTypes.node, + /** + * Callback function fired when the menu item is touch-tapped. + * + * @param {object} event TouchTap event targeting the menu item. + */ + onTouchTap: _react.PropTypes.func, + /** + * Can be used to render primary text within the menu item. + */ + primaryText: _react.PropTypes.node, + /** + * The `SvgIcon` or `FontIcon` to be displayed on the right side. + */ + rightIcon: _react.PropTypes.element, + /** + * Can be used to render secondary text within the menu item. + */ + secondaryText: _react.PropTypes.node, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, - transitionEnabled: _react.PropTypes.bool + /** + * The value of the menu item. + */ + value: _react.PropTypes.any } : void 0; -exports.default = Overlay; +exports.default = MenuItem; /***/ }), -/* 320 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24052,106 +24587,160 @@ var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(0); -var _reactDom = __webpack_require__(19); - -var _reactDom2 = _interopRequireDefault(_reactDom); +var _reactDom = __webpack_require__(16); -var _events = __webpack_require__(196); +var _dom = __webpack_require__(320); -var _events2 = _interopRequireDefault(_events); +var _dom2 = _interopRequireDefault(_dom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var isDescendant = function isDescendant(el, target) { - if (target !== null) { - return el === target || isDescendant(el, target.parentNode); - } - return false; -}; - -var clickAwayEvents = ['mouseup', 'touchend']; -var bind = function bind(callback) { - return clickAwayEvents.forEach(function (event) { - return _events2.default.on(document, event, callback); - }); -}; -var unbind = function unbind(callback) { - return clickAwayEvents.forEach(function (event) { - return _events2.default.off(document, event, callback); - }); -}; - -var ClickAwayListener = function (_Component) { - (0, _inherits3.default)(ClickAwayListener, _Component); +// heavily inspired by https://github.com/Khan/react-components/blob/master/js/layered-component-mixin.jsx +var RenderToLayer = function (_Component) { + (0, _inherits3.default)(RenderToLayer, _Component); - function ClickAwayListener() { + function RenderToLayer() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, ClickAwayListener); + (0, _classCallCheck3.default)(this, RenderToLayer); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClickAwayListener.__proto__ || (0, _getPrototypeOf2.default)(ClickAwayListener)).call.apply(_ref, [this].concat(args))), _this), _this.handleClickAway = function (event) { + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RenderToLayer.__proto__ || (0, _getPrototypeOf2.default)(RenderToLayer)).call.apply(_ref, [this].concat(args))), _this), _this.onClickAway = function (event) { if (event.defaultPrevented) { return; } - // IE11 support, which trigger the handleClickAway even after the unbind - if (_this.isCurrentlyMounted) { - var el = _reactDom2.default.findDOMNode(_this); + if (!_this.props.componentClickAway) { + return; + } - if (document.documentElement.contains(event.target) && !isDescendant(el, event.target)) { - _this.props.onClickAway(event); - } + if (!_this.props.open) { + return; + } + + var el = _this.layer; + if (event.target !== el && event.target === window || document.documentElement.contains(event.target) && !_dom2.default.isDescendant(el, event.target)) { + _this.props.componentClickAway(event); } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(ClickAwayListener, [{ + (0, _createClass3.default)(RenderToLayer, [{ key: 'componentDidMount', value: function componentDidMount() { - this.isCurrentlyMounted = true; - if (this.props.onClickAway) { - bind(this.handleClickAway); - } + this.renderLayer(); } }, { key: 'componentDidUpdate', - value: function componentDidUpdate(prevProps) { - if (prevProps.onClickAway !== this.props.onClickAway) { - unbind(this.handleClickAway); - if (this.props.onClickAway) { - bind(this.handleClickAway); - } - } + value: function componentDidUpdate() { + this.renderLayer(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { - this.isCurrentlyMounted = false; - unbind(this.handleClickAway); + this.unrenderLayer(); + } + }, { + key: 'getLayer', + value: function getLayer() { + return this.layer; + } + }, { + key: 'unrenderLayer', + value: function unrenderLayer() { + if (!this.layer) { + return; + } + + if (this.props.useLayerForClickAway) { + this.layer.style.position = 'relative'; + this.layer.removeEventListener('touchstart', this.onClickAway); + this.layer.removeEventListener('click', this.onClickAway); + } else { + window.removeEventListener('touchstart', this.onClickAway); + window.removeEventListener('click', this.onClickAway); + } + + (0, _reactDom.unmountComponentAtNode)(this.layer); + document.body.removeChild(this.layer); + this.layer = null; + } + + /** + * By calling this method in componentDidMount() and + * componentDidUpdate(), you're effectively creating a "wormhole" that + * funnels React's hierarchical updates through to a DOM node on an + * entirely different part of the page. + */ + + }, { + key: 'renderLayer', + value: function renderLayer() { + var _this2 = this; + + var _props = this.props, + open = _props.open, + render = _props.render; + + + if (open) { + if (!this.layer) { + this.layer = document.createElement('div'); + document.body.appendChild(this.layer); + + if (this.props.useLayerForClickAway) { + this.layer.addEventListener('touchstart', this.onClickAway); + this.layer.addEventListener('click', this.onClickAway); + this.layer.style.position = 'fixed'; + this.layer.style.top = 0; + this.layer.style.bottom = 0; + this.layer.style.left = 0; + this.layer.style.right = 0; + this.layer.style.zIndex = this.context.muiTheme.zIndex.layer; + } else { + setTimeout(function () { + window.addEventListener('touchstart', _this2.onClickAway); + window.addEventListener('click', _this2.onClickAway); + }, 0); + } + } + + var layerElement = render(); + this.layerElement = (0, _reactDom.unstable_renderSubtreeIntoContainer)(this, layerElement, this.layer); + } else { + this.unrenderLayer(); + } } }, { key: 'render', value: function render() { - return this.props.children; + return null; } }]); - return ClickAwayListener; + return RenderToLayer; }(_react.Component); - false ? ClickAwayListener.propTypes = { - children: _react.PropTypes.element, - onClickAway: _react.PropTypes.func +RenderToLayer.defaultProps = { + useLayerForClickAway: true +}; +RenderToLayer.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? RenderToLayer.propTypes = { + componentClickAway: _react.PropTypes.func, + open: _react.PropTypes.bool.isRequired, + render: _react.PropTypes.func.isRequired, + useLayerForClickAway: _react.PropTypes.bool } : void 0; -exports.default = ClickAwayListener; +exports.default = RenderToLayer; /***/ }), -/* 321 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24165,6 +24754,10 @@ var _extends2 = __webpack_require__(7); var _extends3 = _interopRequireDefault(_extends2); +var _typeof2 = __webpack_require__(61); + +var _typeof3 = _interopRequireDefault(_typeof2); + var _objectWithoutProperties2 = __webpack_require__(8); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); @@ -24197,343 +24790,640 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); +var _reactDom = __webpack_require__(16); var _reactDom2 = _interopRequireDefault(_reactDom); -var _shallowEqual = __webpack_require__(58); +var _keycode = __webpack_require__(26); -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); +var _keycode2 = _interopRequireDefault(_keycode); -var _Popover = __webpack_require__(130); +var _TextField = __webpack_require__(99); -var _Popover2 = _interopRequireDefault(_Popover); +var _TextField2 = _interopRequireDefault(_TextField); -var _check = __webpack_require__(774); +var _Menu = __webpack_require__(761); -var _check2 = _interopRequireDefault(_check); +var _Menu2 = _interopRequireDefault(_Menu); -var _ListItem = __webpack_require__(313); +var _MenuItem = __webpack_require__(97); -var _ListItem2 = _interopRequireDefault(_ListItem); +var _MenuItem2 = _interopRequireDefault(_MenuItem); -var _Menu = __webpack_require__(199); +var _Divider = __webpack_require__(762); -var _Menu2 = _interopRequireDefault(_Menu); +var _Divider2 = _interopRequireDefault(_Divider); + +var _Popover = __webpack_require__(133); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _propTypes = __webpack_require__(39); + +var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var nestedMenuStyle = { - position: 'relative' -}; +function getStyles(props, context, state) { + var anchorEl = state.anchorEl; + var fullWidth = props.fullWidth; -function getStyles(props, context) { - var disabledColor = context.muiTheme.baseTheme.palette.disabledColor; - var textColor = context.muiTheme.baseTheme.palette.textColor; - var indent = props.desktop ? 64 : 72; - var sidePadding = props.desktop ? 24 : 16; var styles = { root: { - color: props.disabled ? disabledColor : textColor, - cursor: props.disabled ? 'not-allowed' : 'pointer', - minHeight: props.desktop ? '32px' : '48px', - lineHeight: props.desktop ? '32px' : '48px', - fontSize: props.desktop ? 15 : 16, - whiteSpace: 'nowrap' - }, - - innerDivStyle: { - paddingLeft: props.leftIcon || props.insetChildren || props.checked ? indent : sidePadding, - paddingRight: props.rightIcon ? indent : sidePadding, - paddingBottom: 0, - paddingTop: 0 + display: 'inline-block', + position: 'relative', + width: fullWidth ? '100%' : 256 }, - - secondaryText: { - float: 'right' + menu: { + width: '100%' }, - - leftIconDesktop: { - margin: 0, - left: 24, - top: 4 + list: { + display: 'block', + width: fullWidth ? '100%' : 256 }, - - rightIconDesktop: { - margin: 0, - right: 24, - top: 4, - fill: context.muiTheme.menuItem.rightIconDesktopFill + innerDiv: { + overflow: 'hidden' } }; + if (anchorEl && fullWidth) { + styles.popover = { + width: anchorEl.clientWidth + }; + } + return styles; } -var MenuItem = function (_Component) { - (0, _inherits3.default)(MenuItem, _Component); +var AutoComplete = function (_Component) { + (0, _inherits3.default)(AutoComplete, _Component); - function MenuItem() { + function AutoComplete() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, MenuItem); + (0, _classCallCheck3.default)(this, AutoComplete); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuItem.__proto__ || (0, _getPrototypeOf2.default)(MenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - open: false - }, _this.cloneMenuItem = function (item) { - return _react2.default.cloneElement(item, { - onTouchTap: function onTouchTap(event) { - if (!item.props.menuItems) { - _this.handleRequestClose(); - } + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoComplete.__proto__ || (0, _getPrototypeOf2.default)(AutoComplete)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + anchorEl: null, + focusTextField: true, + open: false, + searchText: undefined + }, _this.handleRequestClose = function () { + // Only take into account the Popover clickAway when we are + // not focusing the TextField. + if (!_this.state.focusTextField) { + _this.close(); + } + }, _this.handleMouseDown = function (event) { + // Keep the TextField focused + event.preventDefault(); + }, _this.handleItemTouchTap = function (event, child) { + var dataSource = _this.props.dataSource; - if (item.props.onTouchTap) { - item.props.onTouchTap(event); - } - } + var index = parseInt(child.key, 10); + var chosenRequest = dataSource[index]; + var searchText = _this.chosenRequestText(chosenRequest); + + _this.setState({ + searchText: searchText + }, function () { + _this.props.onUpdateInput(searchText, _this.props.dataSource, { + source: 'touchTap' + }); + + _this.timerTouchTapCloseId = setTimeout(function () { + _this.timerTouchTapCloseId = null; + _this.close(); + _this.props.onNewRequest(chosenRequest, index); + }, _this.props.menuCloseDelay); }); - }, _this.handleTouchTap = function (event) { - event.preventDefault(); + }, _this.chosenRequestText = function (chosenRequest) { + if (typeof chosenRequest === 'string') { + return chosenRequest; + } else { + return chosenRequest[_this.props.dataSourceConfig.text]; + } + }, _this.handleEscKeyDown = function () { + _this.close(); + }, _this.handleKeyDown = function (event) { + if (_this.props.onKeyDown) _this.props.onKeyDown(event); + + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.close(); + var searchText = _this.state.searchText; + if (searchText !== '') { + _this.props.onNewRequest(searchText, -1); + } + break; + + case 'esc': + _this.close(); + break; + + case 'down': + event.preventDefault(); + _this.setState({ + open: true, + focusTextField: false, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }); + break; + + default: + break; + } + }, _this.handleChange = function (event) { + var searchText = event.target.value; + + // Make sure that we have a new searchText. + // Fix an issue with a Cordova Webview + if (searchText === _this.state.searchText) { + return; + } _this.setState({ + searchText: searchText, open: true, - anchorEl: _reactDom2.default.findDOMNode(_this) + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }, function () { + _this.props.onUpdateInput(searchText, _this.props.dataSource, { + source: 'change' + }); }); + }, _this.handleBlur = function (event) { + if (_this.state.focusTextField && _this.timerTouchTapCloseId === null) { + _this.timerBlurClose = setTimeout(function () { + _this.close(); + }, 0); + } - if (_this.props.onTouchTap) { - _this.props.onTouchTap(event); + if (_this.props.onBlur) { + _this.props.onBlur(event); } - }, _this.handleRequestClose = function () { + }, _this.handleFocus = function (event) { + if (!_this.state.open && _this.props.openOnFocus) { + _this.setState({ + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }); + } + _this.setState({ - open: false, - anchorEl: null + focusTextField: true }); + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(MenuItem, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.applyFocusState(); + (0, _createClass3.default)(AutoComplete, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.requestsList = []; + this.setState({ + open: this.props.open, + searchText: this.props.searchText + }); + this.timerTouchTapCloseId = null; } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { - if (this.state.open && nextProps.focusState === 'none') { - this.handleRequestClose(); + if (this.props.searchText !== nextProps.searchText) { + this.setState({ + searchText: nextProps.searchText + }); } } }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState, nextContext) { - return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.timerTouchTapCloseId); + clearTimeout(this.timerBlurClose); } }, { - key: 'componentDidUpdate', - value: function componentDidUpdate() { - this.applyFocusState(); + key: 'close', + value: function close() { + this.setState({ + open: false, + anchorEl: null + }); + + if (this.props.onClose) { + this.props.onClose(); + } } }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - if (this.state.open) { - this.setState({ - open: false - }); - } + key: 'blur', + value: function blur() { + this.refs.searchTextField.blur(); } }, { - key: 'applyFocusState', - value: function applyFocusState() { - this.refs.listItem.applyFocusState(this.props.focusState); + key: 'focus', + value: function focus() { + this.refs.searchTextField.focus(); } }, { key: 'render', value: function render() { + var _this2 = this; + var _props = this.props, - checked = _props.checked, - children = _props.children, - desktop = _props.desktop, - disabled = _props.disabled, - focusState = _props.focusState, - innerDivStyle = _props.innerDivStyle, - insetChildren = _props.insetChildren, - leftIcon = _props.leftIcon, - menuItems = _props.menuItems, - rightIcon = _props.rightIcon, - secondaryText = _props.secondaryText, - style = _props.style, + anchorOrigin = _props.anchorOrigin, + animated = _props.animated, animation = _props.animation, - value = _props.value, - other = (0, _objectWithoutProperties3.default)(_props, ['checked', 'children', 'desktop', 'disabled', 'focusState', 'innerDivStyle', 'insetChildren', 'leftIcon', 'menuItems', 'rightIcon', 'secondaryText', 'style', 'animation', 'value']); + dataSource = _props.dataSource, + dataSourceConfig = _props.dataSourceConfig, + disableFocusRipple = _props.disableFocusRipple, + errorStyle = _props.errorStyle, + floatingLabelText = _props.floatingLabelText, + filter = _props.filter, + fullWidth = _props.fullWidth, + style = _props.style, + hintText = _props.hintText, + maxSearchResults = _props.maxSearchResults, + menuCloseDelay = _props.menuCloseDelay, + textFieldStyle = _props.textFieldStyle, + menuStyle = _props.menuStyle, + menuProps = _props.menuProps, + listStyle = _props.listStyle, + targetOrigin = _props.targetOrigin, + onClose = _props.onClose, + onNewRequest = _props.onNewRequest, + onUpdateInput = _props.onUpdateInput, + openOnFocus = _props.openOnFocus, + popoverProps = _props.popoverProps, + searchTextProp = _props.searchText, + other = (0, _objectWithoutProperties3.default)(_props, ['anchorOrigin', 'animated', 'animation', 'dataSource', 'dataSourceConfig', 'disableFocusRipple', 'errorStyle', 'floatingLabelText', 'filter', 'fullWidth', 'style', 'hintText', 'maxSearchResults', 'menuCloseDelay', 'textFieldStyle', 'menuStyle', 'menuProps', 'listStyle', 'targetOrigin', 'onClose', 'onNewRequest', 'onUpdateInput', 'openOnFocus', 'popoverProps', 'searchText']); + + var _ref2 = popoverProps || {}, + popoverStyle = _ref2.style, + popoverOther = (0, _objectWithoutProperties3.default)(_ref2, ['style']); + + var _state = this.state, + open = _state.open, + anchorEl = _state.anchorEl, + searchText = _state.searchText, + focusTextField = _state.focusTextField; var prepareStyles = this.context.muiTheme.prepareStyles; - var styles = getStyles(this.props, this.context); - var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style); - var mergedInnerDivStyles = (0, _simpleAssign2.default)(styles.innerDivStyle, innerDivStyle); + var styles = getStyles(this.props, this.context, this.state); - // Left Icon - var leftIconElement = leftIcon ? leftIcon : checked ? _react2.default.createElement(_check2.default, null) : null; - if (leftIconElement) { - var mergedLeftIconStyles = desktop ? (0, _simpleAssign2.default)(styles.leftIconDesktop, leftIconElement.props.style) : leftIconElement.props.style; - leftIconElement = _react2.default.cloneElement(leftIconElement, { style: mergedLeftIconStyles }); - } + var requestsList = []; - // Right Icon - var rightIconElement = void 0; - if (rightIcon) { - var mergedRightIconStyles = desktop ? (0, _simpleAssign2.default)(styles.rightIconDesktop, rightIcon.props.style) : rightIcon.props.style; - rightIconElement = _react2.default.cloneElement(rightIcon, { style: mergedRightIconStyles }); - } + dataSource.every(function (item, index) { + switch (typeof item === 'undefined' ? 'undefined' : (0, _typeof3.default)(item)) { + case 'string': + if (filter(searchText, item, item)) { + requestsList.push({ + text: item, + value: _react2.default.createElement(_MenuItem2.default, { + innerDivStyle: styles.innerDiv, + value: item, + primaryText: item, + disableFocusRipple: disableFocusRipple, + key: index + }) + }); + } + break; - // Secondary Text - var secondaryTextElement = void 0; - if (secondaryText) { - var secondaryTextIsAnElement = _react2.default.isValidElement(secondaryText); - var mergedSecondaryTextStyles = secondaryTextIsAnElement ? (0, _simpleAssign2.default)(styles.secondaryText, secondaryText.props.style) : null; + case 'object': + if (item && typeof item[_this2.props.dataSourceConfig.text] === 'string') { + var itemText = item[_this2.props.dataSourceConfig.text]; + if (!_this2.props.filter(searchText, itemText, item)) break; - secondaryTextElement = secondaryTextIsAnElement ? _react2.default.cloneElement(secondaryText, { style: mergedSecondaryTextStyles }) : _react2.default.createElement( - 'div', - { style: prepareStyles(styles.secondaryText) }, - secondaryText - ); - } - var childMenuPopover = void 0; - if (menuItems) { - childMenuPopover = _react2.default.createElement( - _Popover2.default, - { - animation: animation, - anchorOrigin: { horizontal: 'right', vertical: 'top' }, - anchorEl: this.state.anchorEl, - open: this.state.open, - useLayerForClickAway: false, - onRequestClose: this.handleRequestClose - }, - _react2.default.createElement( - _Menu2.default, - { desktop: desktop, disabled: disabled, style: nestedMenuStyle }, - _react2.default.Children.map(menuItems, this.cloneMenuItem) - ) - ); - other.onTouchTap = this.handleTouchTap; - } + var itemValue = item[_this2.props.dataSourceConfig.value]; + if (itemValue.type && (itemValue.type.muiName === _MenuItem2.default.muiName || itemValue.type.muiName === _Divider2.default.muiName)) { + requestsList.push({ + text: itemText, + value: _react2.default.cloneElement(itemValue, { + key: index, + disableFocusRipple: disableFocusRipple + }) + }); + } else { + requestsList.push({ + text: itemText, + value: _react2.default.createElement(_MenuItem2.default, { + innerDivStyle: styles.innerDiv, + primaryText: itemText, + disableFocusRipple: disableFocusRipple, + key: index + }) + }); + } + } + break; - return _react2.default.createElement( - _ListItem2.default, - (0, _extends3.default)({}, other, { - disabled: disabled, - hoverColor: this.context.muiTheme.menuItem.hoverColor, - innerDivStyle: mergedInnerDivStyles, - insetChildren: insetChildren, - leftIcon: leftIconElement, - ref: 'listItem', - rightIcon: rightIconElement, - style: mergedRootStyles + default: + // Do nothing + } + + return !(maxSearchResults && maxSearchResults > 0 && requestsList.length === maxSearchResults); + }); + + this.requestsList = requestsList; + + var menu = open && requestsList.length > 0 && _react2.default.createElement( + _Menu2.default, + (0, _extends3.default)({}, menuProps, { + ref: 'menu', + autoWidth: false, + disableAutoFocus: focusTextField, + onEscKeyDown: this.handleEscKeyDown, + initiallyKeyboardFocused: true, + onItemTouchTap: this.handleItemTouchTap, + onMouseDown: this.handleMouseDown, + style: (0, _simpleAssign2.default)(styles.menu, menuStyle), + listStyle: (0, _simpleAssign2.default)(styles.list, listStyle) }), - children, - secondaryTextElement, - childMenuPopover + requestsList.map(function (i) { + return i.value; + }) ); - } - }]); - return MenuItem; -}(_react.Component); -MenuItem.muiName = 'MenuItem'; -MenuItem.defaultProps = { - checked: false, - desktop: false, - disabled: false, - focusState: 'none', - insetChildren: false + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + ref: 'searchTextField', + autoComplete: 'off', + value: searchText, + onChange: this.handleChange, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onKeyDown: this.handleKeyDown, + floatingLabelText: floatingLabelText, + hintText: hintText, + fullWidth: fullWidth, + multiLine: false, + errorStyle: errorStyle, + style: textFieldStyle + })), + _react2.default.createElement( + _Popover2.default, + (0, _extends3.default)({ + style: (0, _simpleAssign2.default)({}, styles.popover, popoverStyle), + canAutoPosition: false, + anchorOrigin: anchorOrigin, + targetOrigin: targetOrigin, + open: open, + anchorEl: anchorEl, + useLayerForClickAway: false, + onRequestClose: this.handleRequestClose, + animated: animated, + animation: animation + }, popoverOther), + menu + ) + ); + } + }]); + return AutoComplete; +}(_react.Component); + +AutoComplete.defaultProps = { + anchorOrigin: { + vertical: 'bottom', + horizontal: 'left' + }, + animated: true, + dataSourceConfig: { + text: 'text', + value: 'value' + }, + disableFocusRipple: true, + filter: function filter(searchText, key) { + return searchText !== '' && key.indexOf(searchText) !== -1; + }, + fullWidth: false, + open: false, + openOnFocus: false, + onUpdateInput: function onUpdateInput() {}, + onNewRequest: function onNewRequest() {}, + searchText: '', + menuCloseDelay: 300, + targetOrigin: { + vertical: 'top', + horizontal: 'left' + } }; -MenuItem.contextTypes = { +AutoComplete.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? MenuItem.propTypes = { + false ? AutoComplete.propTypes = { + /** + * Location of the anchor for the auto complete. + */ + anchorOrigin: _propTypes2.default.origin, + /** + * If true, the auto complete is animated as it is toggled. + */ + animated: _react.PropTypes.bool, /** * Override the default animation component used. */ animation: _react.PropTypes.func, /** - * If true, a left check mark will be rendered. + * Array of strings or nodes used to populate the list. */ - checked: _react.PropTypes.bool, + dataSource: _react.PropTypes.array.isRequired, /** - * Elements passed as children to the underlying `ListItem`. + * Config for objects list dataSource. + * + * @typedef {Object} dataSourceConfig + * + * @property {string} text `dataSource` element key used to find a string to be matched for search + * and shown as a `TextField` input value after choosing the result. + * @property {string} value `dataSource` element key used to find a string to be shown in search results. */ - children: _react.PropTypes.node, + dataSourceConfig: _react.PropTypes.object, /** - * @ignore - * If true, the menu item will render with compact desktop - * styles. + * Disables focus ripple when true. */ - desktop: _react.PropTypes.bool, + disableFocusRipple: _react.PropTypes.bool, /** - * If true, the menu item will be disabled. + * Override style prop for error. */ - disabled: _react.PropTypes.bool, + errorStyle: _react.PropTypes.object, /** - * The focus state of the menu item. This prop is used to set the focus - * state of the underlying `ListItem`. + * The error content to display. */ - focusState: _react.PropTypes.oneOf(['none', 'focused', 'keyboard-focused']), + errorText: _react.PropTypes.node, /** - * Override the inline-styles of the inner div. + * Callback function used to filter the auto complete. + * + * @param {string} searchText The text to search for within `dataSource`. + * @param {string} key `dataSource` element, or `text` property on that element if it's not a string. + * @returns {boolean} `true` indicates the auto complete list will include `key` when the input is `searchText`. */ - innerDivStyle: _react.PropTypes.object, + filter: _react.PropTypes.func, /** - * If true, the children will be indented. - * This is only needed when there is no `leftIcon`. + * The content to use for adding floating label element. */ - insetChildren: _react.PropTypes.bool, + floatingLabelText: _react.PropTypes.node, /** - * The `SvgIcon` or `FontIcon` to be displayed on the left side. + * If true, the field receives the property `width: 100%`. */ - leftIcon: _react.PropTypes.element, + fullWidth: _react.PropTypes.bool, /** - * `MenuItem` elements to nest within the menu item. + * The hint content to display. */ - menuItems: _react.PropTypes.node, + hintText: _react.PropTypes.node, /** - * Callback function fired when the menu item is touch-tapped. + * Override style for list. + */ + listStyle: _react.PropTypes.object, + /** + * The max number of search results to be shown. + * By default it shows all the items which matches filter. + */ + maxSearchResults: _react.PropTypes.number, + /** + * Delay for closing time of the menu. + */ + menuCloseDelay: _react.PropTypes.number, + /** + * Props to be passed to menu. + */ + menuProps: _react.PropTypes.object, + /** + * Override style for menu. + */ + menuStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function fired when the menu is closed. + */ + onClose: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** @ignore */ + onKeyDown: _react.PropTypes.func, + /** + * Callback function that is fired when a list item is selected, or enter is pressed in the `TextField`. * - * @param {object} event TouchTap event targeting the menu item. + * @param {string} chosenRequest Either the `TextField` input value, if enter is pressed in the `TextField`, + * or the text value of the corresponding list item that was selected. + * @param {number} index The index in `dataSource` of the list item selected, or `-1` if enter is pressed in the + * `TextField`. */ - onTouchTap: _react.PropTypes.func, + onNewRequest: _react.PropTypes.func, /** - * Can be used to render primary text within the menu item. + * Callback function that is fired when the user updates the `TextField`. + * + * @param {string} searchText The auto-complete's `searchText` value. + * @param {array} dataSource The auto-complete's `dataSource` array. + * @param {object} params Additional information linked the update. */ - primaryText: _react.PropTypes.node, + onUpdateInput: _react.PropTypes.func, /** - * The `SvgIcon` or `FontIcon` to be displayed on the right side. + * Auto complete menu is open if true. */ - rightIcon: _react.PropTypes.element, + open: _react.PropTypes.bool, /** - * Can be used to render secondary text within the menu item. + * If true, the list item is showed when a focus event triggers. */ - secondaryText: _react.PropTypes.node, + openOnFocus: _react.PropTypes.bool, + /** + * Props to be passed to popover. + */ + popoverProps: _react.PropTypes.object, + /** + * Text being input to auto complete. + */ + searchText: _react.PropTypes.string, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, /** - * The value of the menu item. + * Origin for location of target. */ - value: _react.PropTypes.any + targetOrigin: _propTypes2.default.origin, + /** + * Override the inline-styles of AutoComplete's TextField element. + */ + textFieldStyle: _react.PropTypes.object } : void 0; -exports.default = MenuItem; + + +AutoComplete.levenshteinDistance = function (searchText, key) { + var current = []; + var prev = void 0; + var value = void 0; + + for (var i = 0; i <= key.length; i++) { + for (var j = 0; j <= searchText.length; j++) { + if (i && j) { + if (searchText.charAt(j - 1) === key.charAt(i - 1)) value = prev;else value = Math.min(current[j], current[j - 1], prev) + 1; + } else { + value = i + j; + } + prev = current[j]; + current[j] = value; + } + } + return current.pop(); +}; + +AutoComplete.noFilter = function () { + return true; +}; + +AutoComplete.defaultFilter = AutoComplete.caseSensitiveFilter = function (searchText, key) { + return searchText !== '' && key.indexOf(searchText) !== -1; +}; + +AutoComplete.caseInsensitiveFilter = function (searchText, key) { + return key.toLowerCase().indexOf(searchText.toLowerCase()) !== -1; +}; + +AutoComplete.levenshteinDistanceFilter = function (distanceLessThan) { + if (distanceLessThan === undefined) { + return AutoComplete.levenshteinDistance; + } else if (typeof distanceLessThan !== 'number') { + throw 'Error: AutoComplete.levenshteinDistanceFilter is a filter generator, not a filter!'; + } + + return function (s, k) { + return AutoComplete.levenshteinDistance(s, k) < distanceLessThan; + }; +}; + +AutoComplete.fuzzyFilter = function (searchText, key) { + var compareString = key.toLowerCase(); + searchText = searchText.toLowerCase(); + + var searchTextIndex = 0; + for (var index = 0; index < key.length; index++) { + if (compareString[index] === searchText[searchTextIndex]) { + searchTextIndex += 1; + } + } + + return searchTextIndex === searchText.length; +}; + +AutoComplete.Item = _MenuItem2.default; +AutoComplete.Divider = _Divider2.default; + +exports.default = AutoComplete; /***/ }), -/* 322 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24543,182 +25433,198 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _getPrototypeOf = __webpack_require__(3); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _simpleAssign = __webpack_require__(6); -var _classCallCheck2 = __webpack_require__(1); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var _react = __webpack_require__(0); -var _createClass2 = __webpack_require__(2); +var _react2 = _interopRequireDefault(_react); -var _createClass3 = _interopRequireDefault(_createClass2); +var _transitions = __webpack_require__(10); -var _possibleConstructorReturn2 = __webpack_require__(4); +var _transitions2 = _interopRequireDefault(_transitions); -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _inherits2 = __webpack_require__(5); +function getStyles(props) { + var hintColor = props.muiTheme.textField.hintColor, + show = props.show; -var _inherits3 = _interopRequireDefault(_inherits2); -var _react = __webpack_require__(0); + return { + root: { + position: 'absolute', + opacity: show ? 1 : 0, + color: hintColor, + transition: _transitions2.default.easeOut(), + bottom: 12 + } + }; +} -var _reactDom = __webpack_require__(19); +var TextFieldHint = function TextFieldHint(props) { + var prepareStyles = props.muiTheme.prepareStyles, + style = props.style, + text = props.text; -var _dom = __webpack_require__(316); -var _dom2 = _interopRequireDefault(_dom); + var styles = getStyles(props); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + text + ); +}; -// heavily inspired by https://github.com/Khan/react-components/blob/master/js/layered-component-mixin.jsx -var RenderToLayer = function (_Component) { - (0, _inherits3.default)(RenderToLayer, _Component); + false ? TextFieldHint.propTypes = { + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * True if the hint text should be visible. + */ + show: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The hint text displayed. + */ + text: _react.PropTypes.node +} : void 0; - function RenderToLayer() { - var _ref; +TextFieldHint.defaultProps = { + show: true +}; - var _temp, _this, _ret; +exports.default = TextFieldHint; - (0, _classCallCheck3.default)(this, RenderToLayer); +/***/ }), +/* 330 */ +/***/ (function(module, exports, __webpack_require__) { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +"use strict"; - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RenderToLayer.__proto__ || (0, _getPrototypeOf2.default)(RenderToLayer)).call.apply(_ref, [this].concat(args))), _this), _this.onClickAway = function (event) { - if (event.defaultPrevented) { - return; - } - if (!_this.props.componentClickAway) { - return; - } +Object.defineProperty(exports, "__esModule", { + value: true +}); - if (!_this.props.open) { - return; - } +var _simpleAssign = __webpack_require__(6); - var el = _this.layer; - if (event.target !== el && event.target === window || document.documentElement.contains(event.target) && !_dom2.default.isDescendant(el, event.target)) { - _this.props.componentClickAway(event); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - (0, _createClass3.default)(RenderToLayer, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.renderLayer(); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate() { - this.renderLayer(); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.unrenderLayer(); - } - }, { - key: 'getLayer', - value: function getLayer() { - return this.layer; - } - }, { - key: 'unrenderLayer', - value: function unrenderLayer() { - if (!this.layer) { - return; - } +var _react = __webpack_require__(0); - if (this.props.useLayerForClickAway) { - this.layer.style.position = 'relative'; - this.layer.removeEventListener('touchstart', this.onClickAway); - this.layer.removeEventListener('click', this.onClickAway); - } else { - window.removeEventListener('touchstart', this.onClickAway); - window.removeEventListener('click', this.onClickAway); - } +var _react2 = _interopRequireDefault(_react); - (0, _reactDom.unmountComponentAtNode)(this.layer); - document.body.removeChild(this.layer); - this.layer = null; - } +var _transitions = __webpack_require__(10); - /** - * By calling this method in componentDidMount() and - * componentDidUpdate(), you're effectively creating a "wormhole" that - * funnels React's hierarchical updates through to a DOM node on an - * entirely different part of the page. - */ +var _transitions2 = _interopRequireDefault(_transitions); - }, { - key: 'renderLayer', - value: function renderLayer() { - var _this2 = this; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var _props = this.props, - open = _props.open, - render = _props.render; +function getStyles(props) { + var defaultStyles = { + position: 'absolute', + lineHeight: '22px', + top: 38, + transition: _transitions2.default.easeOut(), + zIndex: 1, // Needed to display label above Chrome's autocomplete field background + transform: 'scale(1) translate(0, 0)', + transformOrigin: 'left top', + pointerEvents: 'auto', + userSelect: 'none' + }; + var shrinkStyles = props.shrink ? (0, _simpleAssign2.default)({ + transform: 'scale(0.75) translate(0, -28px)', + pointerEvents: 'none' + }, props.shrinkStyle) : null; - if (open) { - if (!this.layer) { - this.layer = document.createElement('div'); - document.body.appendChild(this.layer); + return { + root: (0, _simpleAssign2.default)(defaultStyles, props.style, shrinkStyles) + }; +} - if (this.props.useLayerForClickAway) { - this.layer.addEventListener('touchstart', this.onClickAway); - this.layer.addEventListener('click', this.onClickAway); - this.layer.style.position = 'fixed'; - this.layer.style.top = 0; - this.layer.style.bottom = 0; - this.layer.style.left = 0; - this.layer.style.right = 0; - this.layer.style.zIndex = this.context.muiTheme.zIndex.layer; - } else { - setTimeout(function () { - window.addEventListener('touchstart', _this2.onClickAway); - window.addEventListener('click', _this2.onClickAway); - }, 0); - } - } +var TextFieldLabel = function TextFieldLabel(props) { + var muiTheme = props.muiTheme, + className = props.className, + children = props.children, + htmlFor = props.htmlFor, + onTouchTap = props.onTouchTap; + var prepareStyles = muiTheme.prepareStyles; - var layerElement = render(); - this.layerElement = (0, _reactDom.unstable_renderSubtreeIntoContainer)(this, layerElement, this.layer); - } else { - this.unrenderLayer(); - } - } - }, { - key: 'render', - value: function render() { - return null; - } - }]); - return RenderToLayer; -}(_react.Component); + var styles = getStyles(props); -RenderToLayer.defaultProps = { - useLayerForClickAway: true -}; -RenderToLayer.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired + return _react2.default.createElement( + 'label', + { + className: className, + style: prepareStyles(styles.root), + htmlFor: htmlFor, + onTouchTap: onTouchTap + }, + children + ); }; - false ? RenderToLayer.propTypes = { - componentClickAway: _react.PropTypes.func, - open: _react.PropTypes.bool.isRequired, - render: _react.PropTypes.func.isRequired, - useLayerForClickAway: _react.PropTypes.bool + + false ? TextFieldLabel.propTypes = { + /** + * The label contents. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Disables the label if set to true. + */ + disabled: _react.PropTypes.bool, + /** + * The id of the target element that this label should refer to. + */ + htmlFor: _react.PropTypes.string, + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * Callback function for when the label is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the text field label. + */ + onTouchTap: _react.PropTypes.func, + /** + * True if the floating label should shrink. + */ + shrink: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element when shrunk. + */ + shrinkStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object } : void 0; -exports.default = RenderToLayer; + +TextFieldLabel.defaultProps = { + disabled: false, + shrink: false +}; + +exports.default = TextFieldLabel; /***/ }), -/* 323 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24727,18 +25633,136 @@ exports.default = RenderToLayer; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = undefined; -var _Dialog = __webpack_require__(808); +var _simpleAssign = __webpack_require__(6); -var _Dialog2 = _interopRequireDefault(_Dialog); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = _Dialog2.default; +var propTypes = { + /** + * True if the parent `TextField` is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` is disabled. + */ + disabledStyle: _react.PropTypes.object, + /** + * True if the parent `TextField` has an error. + */ + error: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` has an error. + */ + errorStyle: _react.PropTypes.object, + /** + * True if the parent `TextField` is focused. + */ + focus: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` is focused. + */ + focusStyle: _react.PropTypes.object, + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +}; + +var defaultProps = { + disabled: false, + disabledStyle: {}, + error: false, + errorStyle: {}, + focus: false, + focusStyle: {}, + style: {} +}; + +var TextFieldUnderline = function TextFieldUnderline(props) { + var disabled = props.disabled, + disabledStyle = props.disabledStyle, + error = props.error, + errorStyle = props.errorStyle, + focus = props.focus, + focusStyle = props.focusStyle, + muiTheme = props.muiTheme, + style = props.style; + var errorStyleColor = errorStyle.color; + var prepareStyles = muiTheme.prepareStyles, + _muiTheme$textField = muiTheme.textField, + borderColor = _muiTheme$textField.borderColor, + disabledTextColor = _muiTheme$textField.disabledTextColor, + errorColor = _muiTheme$textField.errorColor, + focusColor = _muiTheme$textField.focusColor; + + + var styles = { + root: { + borderTop: 'none', + borderLeft: 'none', + borderRight: 'none', + borderBottom: 'solid 1px', + borderColor: borderColor, + bottom: 8, + boxSizing: 'content-box', + margin: 0, + position: 'absolute', + width: '100%' + }, + disabled: { + borderBottom: 'dotted 2px', + borderColor: disabledTextColor + }, + focus: { + borderBottom: 'solid 2px', + borderColor: focusColor, + transform: 'scaleX(0)', + transition: _transitions2.default.easeOut() + }, + error: { + borderColor: errorStyleColor ? errorStyleColor : errorColor, + transform: 'scaleX(1)' + } + }; + + var underline = (0, _simpleAssign2.default)({}, styles.root, style); + var focusedUnderline = (0, _simpleAssign2.default)({}, underline, styles.focus, focusStyle); + + if (disabled) underline = (0, _simpleAssign2.default)({}, underline, styles.disabled, disabledStyle); + if (focus) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, { transform: 'scaleX(1)' }); + if (error) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, styles.error); + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement('hr', { style: prepareStyles(underline) }), + _react2.default.createElement('hr', { style: prepareStyles(focusedUnderline) }) + ); +}; + + false ? TextFieldUnderline.propTypes = propTypes : void 0; +TextFieldUnderline.defaultProps = defaultProps; + +exports.default = TextFieldUnderline; /***/ }), -/* 324 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24776,7 +25800,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _Paper = __webpack_require__(34); +var _Paper = __webpack_require__(32); var _Paper2 = _interopRequireDefault(_Paper); @@ -24784,7 +25808,7 @@ var _transitions = __webpack_require__(10); var _transitions2 = _interopRequireDefault(_transitions); -var _propTypes = __webpack_require__(41); +var _propTypes = __webpack_require__(39); var _propTypes2 = _interopRequireDefault(_propTypes); @@ -24887,7 +25911,7 @@ PopoverAnimationVertical.contextTypes = { exports.default = PopoverAnimationVertical; /***/ }), -/* 325 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24898,11 +25922,11 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = exports.RadioButtonGroup = exports.RadioButton = undefined; -var _RadioButton2 = __webpack_require__(810); +var _RadioButton2 = __webpack_require__(787); var _RadioButton3 = _interopRequireDefault(_RadioButton2); -var _RadioButtonGroup2 = __webpack_require__(813); +var _RadioButtonGroup2 = __webpack_require__(790); var _RadioButtonGroup3 = _interopRequireDefault(_RadioButtonGroup2); @@ -24913,7 +25937,7 @@ exports.RadioButtonGroup = _RadioButtonGroup3.default; exports.default = _RadioButton3.default; /***/ }), -/* 326 */ +/* 334 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24921,11 +25945,11 @@ exports.default = _RadioButton3.default; exports.__esModule = true; -var _isIterable2 = __webpack_require__(834); +var _isIterable2 = __webpack_require__(811); var _isIterable3 = _interopRequireDefault(_isIterable2); -var _getIterator2 = __webpack_require__(837); +var _getIterator2 = __webpack_require__(335); var _getIterator3 = _interopRequireDefault(_getIterator2); @@ -24970,7 +25994,13 @@ exports.default = function () { }(); /***/ }), -/* 327 */ +/* 335 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(814), __esModule: true }; + +/***/ }), +/* 336 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -25000,7 +26030,7 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _slicedToArray2 = __webpack_require__(326); +var _slicedToArray2 = __webpack_require__(334); var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); @@ -25008,7 +26038,7 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _timeUtils = __webpack_require__(98); +var _timeUtils = __webpack_require__(101); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -25111,10 +26141,491 @@ ClockNumber.contextTypes = { type: _react.PropTypes.oneOf(['hour', 'minute']), value: _react.PropTypes.number } : void 0; -exports.default = ClockNumber; +exports.default = ClockNumber; + +/***/ }), +/* 337 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _timeUtils = __webpack_require__(101); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function calcAngle(value, base) { + value %= base; + var angle = 360 / base * value; + return angle; +} + +function getStyles(props, context, state) { + var hasSelected = props.hasSelected, + type = props.type, + value = props.value; + var inner = state.inner; + var timePicker = context.muiTheme.timePicker; + + var angle = type === 'hour' ? calcAngle(value, 12) : calcAngle(value, 60); + + var styles = { + root: { + height: inner ? '30%' : '40%', + background: timePicker.accentColor, + width: 2, + left: 'calc(50% - 1px)', + position: 'absolute', + bottom: '50%', + transformOrigin: 'bottom', + pointerEvents: 'none', + transform: 'rotateZ(' + angle + 'deg)' + }, + mark: { + boxSizing: 'content-box', + background: timePicker.selectTextColor, + border: '4px solid ' + timePicker.accentColor, + display: hasSelected && 'none', + width: 7, + height: 7, + position: 'absolute', + top: -5, + left: -6, + borderRadius: '100%' + } + }; + + return styles; +} + +var ClockPointer = function (_Component) { + (0, _inherits3.default)(ClockPointer, _Component); + + function ClockPointer() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClockPointer); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockPointer.__proto__ || (0, _getPrototypeOf2.default)(ClockPointer)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + inner: false + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClockPointer, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + inner: (0, _timeUtils.isInner)(this.props) + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + inner: (0, _timeUtils.isInner)(nextProps) + }); + } + }, { + key: 'render', + value: function render() { + if (this.props.value === null) { + return _react2.default.createElement('span', null); + } + + var styles = getStyles(this.props, this.context, this.state); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement('div', { style: prepareStyles(styles.mark) }) + ); + } + }]); + return ClockPointer; +}(_react.Component); + +ClockPointer.defaultProps = { + hasSelected: false, + value: null, + type: 'minute' +}; +ClockPointer.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ClockPointer.propTypes = { + hasSelected: _react.PropTypes.bool, + type: _react.PropTypes.oneOf(['hour', 'minute']), + value: _react.PropTypes.number +} : void 0; +exports.default = ClockPointer; + +/***/ }), +/* 338 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(62); + +var _keys2 = _interopRequireDefault(_keys); + +exports.isObjectEmpty = isObjectEmpty; +exports.getQueryStringValue = getQueryStringValue; +exports.pageHasNodeOfClass = pageHasNodeOfClass; +exports.hasStringInPath = hasStringInPath; +exports.pathCount = pathCount; +exports.setTimeForToday = setTimeForToday; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isObjectEmpty(obj) { + return (0, _keys2.default)(obj).length === 0 && obj.constructor === Object; +} + +function getQueryStringValue(key) { + var urlParams = new URLSearchParams(window.location.search); + return urlParams.get(key); +} + +function pageHasNodeOfClass(className) { + return document.getElementsByClassName(className).length > 0; +} + +function hasStringInPath(value) { + return location.pathname.substring(1).split('/').filter(function (x) { + return !!x && x === value; + }).length > 0; +} + +function pathCount() { + return location.pathname.substring(1).split('/').length; +} + +function setTimeForToday(time) { + var d = new Date(); + var split = time.split(':'); + if (!split.length || split.length > 3) { + return null; + } + var hour = +split[0]; + var minute = +split[1]; + var seconds = +split[2]; + if (isNaN(hour) || hour > 24) { + return null; + } + + if (isNaN(minute) || minute > 60 || hour === 24 && minute > 0) { + return null; + } + + if (isNaN(seconds) || seconds > 60) { + return null; + } + if (hour < 0 || minute < 0 || seconds < 0) return null; + d.setHours(hour); + d.setMinutes(minute); + d.setSeconds(seconds); + return d; +} + +/***/ }), +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.TableRowColumn = exports.TableRow = exports.TableHeaderColumn = exports.TableHeader = exports.TableFooter = exports.TableBody = exports.Table = undefined; + +var _Table2 = __webpack_require__(823); + +var _Table3 = _interopRequireDefault(_Table2); + +var _TableBody2 = __webpack_require__(824); + +var _TableBody3 = _interopRequireDefault(_TableBody2); + +var _TableFooter2 = __webpack_require__(825); + +var _TableFooter3 = _interopRequireDefault(_TableFooter2); + +var _TableHeader2 = __webpack_require__(826); + +var _TableHeader3 = _interopRequireDefault(_TableHeader2); + +var _TableHeaderColumn2 = __webpack_require__(340); + +var _TableHeaderColumn3 = _interopRequireDefault(_TableHeaderColumn2); + +var _TableRow2 = __webpack_require__(827); + +var _TableRow3 = _interopRequireDefault(_TableRow2); + +var _TableRowColumn2 = __webpack_require__(211); + +var _TableRowColumn3 = _interopRequireDefault(_TableRowColumn2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.Table = _Table3.default; +exports.TableBody = _TableBody3.default; +exports.TableFooter = _TableFooter3.default; +exports.TableHeader = _TableHeader3.default; +exports.TableHeaderColumn = _TableHeaderColumn3.default; +exports.TableRow = _TableRow3.default; +exports.TableRowColumn = _TableRowColumn3.default; +exports.default = _Table3.default; + +/***/ }), +/* 340 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _Tooltip = __webpack_require__(322); + +var _Tooltip2 = _interopRequireDefault(_Tooltip); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tableHeaderColumn = context.muiTheme.tableHeaderColumn; + + + return { + root: { + fontWeight: 'normal', + fontSize: 12, + paddingLeft: tableHeaderColumn.spacing, + paddingRight: tableHeaderColumn.spacing, + height: tableHeaderColumn.height, + textAlign: 'left', + whiteSpace: 'nowrap', + textOverflow: 'ellipsis', + color: tableHeaderColumn.textColor, + position: 'relative' + }, + tooltip: { + boxSizing: 'border-box', + marginTop: tableHeaderColumn.height / 2 + } + }; +} + +var TableHeaderColumn = function (_Component) { + (0, _inherits3.default)(TableHeaderColumn, _Component); + + function TableHeaderColumn() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TableHeaderColumn); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableHeaderColumn.__proto__ || (0, _getPrototypeOf2.default)(TableHeaderColumn)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.onMouseEnter = function () { + if (_this.props.tooltip !== undefined) { + _this.setState({ hovered: true }); + } + }, _this.onMouseLeave = function () { + if (_this.props.tooltip !== undefined) { + _this.setState({ hovered: false }); + } + }, _this.onClick = function (event) { + if (_this.props.onClick) { + _this.props.onClick(event, _this.props.columnNumber); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TableHeaderColumn, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + columnNumber = _props.columnNumber, + hoverable = _props.hoverable, + onClick = _props.onClick, + onHover = _props.onHover, + onHoverExit = _props.onHoverExit, + style = _props.style, + tooltip = _props.tooltip, + tooltipStyle = _props.tooltipStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'columnNumber', 'hoverable', 'onClick', 'onHover', 'onHoverExit', 'style', 'tooltip', 'tooltipStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var handlers = { + onMouseEnter: this.onMouseEnter, + onMouseLeave: this.onMouseLeave, + onClick: this.onClick + }; + + var tooltipNode = void 0; + + if (tooltip !== undefined) { + tooltipNode = _react2.default.createElement(_Tooltip2.default, { + label: tooltip, + show: this.state.hovered, + style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyle) + }); + } + + return _react2.default.createElement( + 'th', + (0, _extends3.default)({ + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }, handlers, other), + tooltipNode, + children + ); + } + }]); + return TableHeaderColumn; +}(_react.Component); + +TableHeaderColumn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TableHeaderColumn.propTypes = { + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Number to identify the header row. This property + * is automatically populated when used with TableHeader. + */ + columnNumber: _react.PropTypes.number, + /** + * @ignore + * Not used here but we need to remove it from the root element. + */ + hoverable: _react.PropTypes.bool, + /** @ignore */ + onClick: _react.PropTypes.func, + /** + * @ignore + * Not used here but we need to remove it from the root element. + */ + onHover: _react.PropTypes.func, + /** + * @ignore + * Not used here but we need to remove it from the root element. + */ + onHoverExit: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The string to supply to the tooltip. If not + * string is supplied no tooltip will be shown. + */ + tooltip: _react.PropTypes.string, + /** + * Additional styling that can be applied to the tooltip. + */ + tooltipStyle: _react.PropTypes.object +} : void 0; +exports.default = TableHeaderColumn; /***/ }), -/* 328 */ +/* 341 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -25124,311 +26635,245 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _getPrototypeOf = __webpack_require__(3); +var _react = __webpack_require__(0); -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _react2 = _interopRequireDefault(_react); -var _classCallCheck2 = __webpack_require__(1); +var _pure = __webpack_require__(20); -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var _pure2 = _interopRequireDefault(_pure); -var _createClass2 = __webpack_require__(2); +var _SvgIcon = __webpack_require__(21); -var _createClass3 = _interopRequireDefault(_createClass2); +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); -var _possibleConstructorReturn2 = __webpack_require__(4); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); +var ActionDelete = function ActionDelete(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z' }) + ); +}; +ActionDelete = (0, _pure2.default)(ActionDelete); +ActionDelete.displayName = 'ActionDelete'; +ActionDelete.muiName = 'SvgIcon'; -var _inherits2 = __webpack_require__(5); +exports.default = ActionDelete; -var _inherits3 = _interopRequireDefault(_inherits2); +/***/ }), +/* 342 */ +/***/ (function(module, exports, __webpack_require__) { -var _react = __webpack_require__(0); +"use strict"; -var _react2 = _interopRequireDefault(_react); -var _timeUtils = __webpack_require__(98); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = addNotification; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _ActionTypes = __webpack_require__(49); -function calcAngle(value, base) { - value %= base; - var angle = 360 / base * value; - return angle; +var types = _interopRequireWildcard(_ActionTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function addNotification(message) { + return { + type: types.NOTIFICATION_ADD, + message: message + }; } -function getStyles(props, context, state) { - var hasSelected = props.hasSelected, - type = props.type, - value = props.value; - var inner = state.inner; - var timePicker = context.muiTheme.timePicker; +/***/ }), +/* 343 */ +/***/ (function(module, exports, __webpack_require__) { - var angle = type === 'hour' ? calcAngle(value, 12) : calcAngle(value, 60); +"use strict"; - var styles = { - root: { - height: inner ? '30%' : '40%', - background: timePicker.accentColor, - width: 2, - left: 'calc(50% - 1px)', - position: 'absolute', - bottom: '50%', - transformOrigin: 'bottom', - pointerEvents: 'none', - transform: 'rotateZ(' + angle + 'deg)' - }, - mark: { - boxSizing: 'content-box', - background: timePicker.selectTextColor, - border: '4px solid ' + timePicker.accentColor, - display: hasSelected && 'none', - width: 7, - height: 7, - position: 'absolute', - top: -5, - left: -6, - borderRadius: '100%' - } - }; - return styles; -} +Object.defineProperty(exports, "__esModule", { + value: true +}); -var ClockPointer = function (_Component) { - (0, _inherits3.default)(ClockPointer, _Component); +var _assign = __webpack_require__(42); - function ClockPointer() { - var _ref; +var _assign2 = _interopRequireDefault(_assign); - var _temp, _this, _ret; +exports.default = Layout; - (0, _classCallCheck3.default)(this, ClockPointer); +var _react = __webpack_require__(0); - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +var _react2 = _interopRequireDefault(_react); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockPointer.__proto__ || (0, _getPrototypeOf2.default)(ClockPointer)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - inner: false - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } +var _AppBar = __webpack_require__(836); - (0, _createClass3.default)(ClockPointer, [{ - key: 'componentWillMount', - value: function componentWillMount() { - this.setState({ - inner: (0, _timeUtils.isInner)(this.props) - }); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - this.setState({ - inner: (0, _timeUtils.isInner)(nextProps) - }); - } - }, { - key: 'render', - value: function render() { - if (this.props.value === null) { - return _react2.default.createElement('span', null); - } +var _AppBar2 = _interopRequireDefault(_AppBar); - var styles = getStyles(this.props, this.context, this.state); - var prepareStyles = this.context.muiTheme.prepareStyles; +var _Tabs = __webpack_require__(839); +var _Tabs2 = _interopRequireDefault(_Tabs); - return _react2.default.createElement( - 'div', - { style: prepareStyles(styles.root) }, - _react2.default.createElement('div', { style: prepareStyles(styles.mark) }) - ); - } - }]); - return ClockPointer; -}(_react.Component); +var _Paper = __webpack_require__(32); -ClockPointer.defaultProps = { - hasSelected: false, - value: null, - type: 'minute' -}; -ClockPointer.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? ClockPointer.propTypes = { - hasSelected: _react.PropTypes.bool, - type: _react.PropTypes.oneOf(['hour', 'minute']), - value: _react.PropTypes.number -} : void 0; -exports.default = ClockPointer; +var _Paper2 = _interopRequireDefault(_Paper); -/***/ }), -/* 329 */ -/***/ (function(module, exports, __webpack_require__) { +var _Styles = __webpack_require__(52); -"use strict"; +var _Styles2 = _interopRequireDefault(_Styles); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -Object.defineProperty(exports, "__esModule", { - value: true -}); -var countries = exports.countries = [{ "text": "USA", "value": "USA" }, { "text": "CANADA", "value": "CANADA" }, { "text": "JAPAN", "value": "JAPAN" }, { "text": "UK", "value": "GB" }, { "text": "UK (N. IRELAND)", "value": "NB" }, { "text": "AUSTRIA", "value": "AT" }, { "text": "BELARUS", "value": "BY" }, { "text": "BELGIUM", "value": "BE" }, { "text": "BULGARIA", "value": "BG" }, { "text": "CROATIA", "value": "HR" }, { "text": "CZECH REPUBLIC", "value": "CZ" }, { "text": "DENMARK", "value": "DK" }, { "text": "ESTONIA", "value": "EE" }, { "text": "FINLAND", "value": "FI" }, { "text": "FRANCE", "value": "FR" }, { "text": "GERMANY", "value": "DE" }, { "text": "GREECE", "value": "GR" }, { "text": "HUNGARY", "value": "HU" }, { "text": "ICELAND", "value": "IS" }, { "text": "IRELAND", "value": "IE" }, { "text": "ITALY", "value": "IT" }, { "text": "LATVIA", "value": "LV" }, { "text": "LITHUANIA", "value": "LT" }, { "text": "LUXEMBOURG", "value": "LU" }, { "text": "MONACO", "value": "MC" }, { "text": "NETHERLANDS", "value": "NL" }, { "text": "NORWAY", "value": "NO" }, { "text": "POLAND", "value": "PL" }, { "text": "PORTUGAL", "value": "PT" }, { "text": "ROMANIA", "value": "RO" }, { "text": "RUSSIA", "value": "RU" }, { "text": "SLOVAKIA", "value": "SK" }, { "text": "SLOVENIA", "value": "SI" }, { "text": "SPAIN", "value": "ES" }, { "text": "SWEDEN", "value": "SE" }, { "text": "SWITZERLAND", "value": "CH" }, { "text": "TURKEY", "value": "TR" }]; -var sizes = exports.sizes = ["Small", "Medium", "Large", "XLarge"]; -var sizesPants = exports.sizesPants = [28, 30, 32, 34, 36, 38, 40]; -var shoeSizes = exports.shoeSizes = [4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5]; -var usaRegions = exports.usaRegions = [{ "text": "AL", "value": "AL" }, { "text": "AK", "value": "AK" }, { "text": "AS", "value": "AS" }, { "text": "AZ", "value": "AZ" }, { "text": "AR", "value": "AR" }, { "text": "CA", "value": "CA" }, { "text": "CO", "value": "CO" }, { "text": "CT", "value": "CT" }, { "text": "DE", "value": "DE" }, { "text": "DC", "value": "DC" }, { "text": "FM", "value": "FM" }, { "text": "FL", "value": "FL" }, { "text": "GA", "value": "GA" }, { "text": "GU", "value": "GU" }, { "text": "HI", "value": "HI" }, { "text": "ID", "value": "ID" }, { "text": "IL", "value": "IL" }, { "text": "IN", "value": "IN" }, { "text": "IA", "value": "IA" }, { "text": "KS", "value": "KS" }, { "text": "KY", "value": "KY" }, { "text": "LA", "value": "LA" }, { "text": "ME", "value": "ME" }, { "text": "MH", "value": "MH" }, { "text": "MD", "value": "MD" }, { "text": "MA", "value": "MA" }, { "text": "MI", "value": "MI" }, { "text": "MN", "value": "MN" }, { "text": "MS", "value": "MS" }, { "text": "MO", "value": "MO" }, { "text": "MT", "value": "MT" }, { "text": "NE", "value": "NE" }, { "text": "NV", "value": "NV" }, { "text": "NH", "value": "NH" }, { "text": "NJ", "value": "NJ" }, { "text": "NM", "value": "NM" }, { "text": "NY", "value": "NY" }, { "text": "NC", "value": "NC" }, { "text": "ND", "value": "ND" }, { "text": "MP", "value": "MP" }, { "text": "OH", "value": "OH" }, { "text": "OK", "value": "OK" }, { "text": "OR", "value": "OR" }, { "text": "PW", "value": "PW" }, { "text": "PA", "value": "PA" }, { "text": "PR", "value": "PR" }, { "text": "RI", "value": "RI" }, { "text": "SC", "value": "SC" }, { "text": "SD", "value": "SD" }, { "text": "TN", "value": "TN" }, { "text": "TX", "value": "TX" }, { "text": "UT", "value": "UT" }, { "text": "VT", "value": "VT" }, { "text": "VI", "value": "VI" }, { "text": "VA", "value": "VA" }, { "text": "WA", "value": "WA" }, { "text": "WV", "value": "WV" }, { "text": "WI", "value": "WI" }, { "text": "WY", "value": "WY" }]; -var canadaRegions = exports.canadaRegions = [{ "text": "AB", "value": "AB" }, { "text": "BC", "value": "BC" }, { "text": "MB", "value": "MB" }, { "text": "NB", "value": "NB" }, { "text": "NL", "value": "NL" }, { "text": "NT", "value": "NT" }, { "text": "NS", "value": "NS" }, { "text": "NU", "value": "NU" }, { "text": "ON", "value": "ON" }, { "text": "PE", "value": "PE" }, { "text": "QC", "value": "QC" }, { "text": "SK", "value": "SK" }, { "text": "YT", "value": "YT" }]; -var japanRegions = exports.japanRegions = [{ "text": " 北海道", "value": " 北海道" }, { "text": " 青森県", "value": " 青森県" }, { "text": " 岩手県", "value": " 岩手県" }, { "text": " 宮城県", "value": " 宮城県" }, { "text": " 秋田県", "value": " 秋田県" }, { "text": " 山形県", "value": " 山形県" }, { "text": " 福島県", "value": " 福島県" }, { "text": " 茨城県", "value": " 茨城県" }, { "text": " 栃木県", "value": " 栃木県" }, { "text": " 群馬県", "value": " 群馬県" }, { "text": " 埼玉県", "value": " 埼玉県" }, { "text": " 千葉県", "value": " 千葉県" }, { "text": " 東京都", "value": " 東京都" }, { "text": " 神奈川県", "value": " 神奈川県" }, { "text": " 新潟県", "value": " 新潟県" }, { "text": " 富山県", "value": " 富山県" }, { "text": " 石川県", "value": " 石川県" }, { "text": " 福井県", "value": " 福井県" }, { "text": " 山梨県", "value": " 山梨県" }, { "text": " 長野県", "value": " 長野県" }, { "text": " 岐阜県", "value": " 岐阜県" }, { "text": " 静岡県", "value": " 静岡県" }, { "text": " 愛知県", "value": " 愛知県" }, { "text": " 三重県", "value": " 三重県" }, { "text": " 滋賀県", "value": " 滋賀県" }, { "text": " 京都府", "value": " 京都府" }, { "text": " 大阪府", "value": " 大阪府" }, { "text": " 兵庫県", "value": " 兵庫県" }, { "text": " 奈良県", "value": " 奈良県" }, { "text": " 和歌山県", "value": " 和歌山県" }, { "text": " 鳥取県", "value": " 鳥取県" }, { "text": " 島根県", "value": " 島根県" }, { "text": " 岡山県", "value": " 岡山県" }, { "text": " 広島県", "value": " 広島県" }, { "text": " 山口県", "value": " 山口県" }, { "text": " 徳島県", "value": " 徳島県" }, { "text": " 香川県", "value": " 香川県" }, { "text": " 愛媛県", "value": " 愛媛県" }, { "text": " 高知県", "value": " 高知県" }, { "text": " 福岡県", "value": " 福岡県" }, { "text": " 佐賀県", "value": " 佐賀県" }, { "text": " 長崎県", "value": " 長崎県" }, { "text": " 熊本県", "value": " 熊本県" }, { "text": " 大分県", "value": " 大分県" }, { "text": " 宮崎県", "value": " 宮崎県" }, { "text": " 鹿児島県", "value": " 鹿児島県" }, { "text": " 沖縄県", "value": " 沖縄県" }]; +function Layout(props) { + var children = props.children, + title = props.title, + contentStyle = props.contentStyle, + tabs = props.tabs, + currentTab = props.currentTab; -/***/ }), -/* 330 */ -/***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(862), __esModule: true }; + var appBarStyles = (0, _assign2.default)({}, _Styles2.default.appBar); -/***/ }), -/* 331 */ -/***/ (function(module, exports, __webpack_require__) { + if (tabs) { + appBarStyles.marginBottom = 64; + } -// 7.3.20 SpeciesConstructor(O, defaultConstructor) -var anObject = __webpack_require__(36); -var aFunction = __webpack_require__(99); -var SPECIES = __webpack_require__(22)('species'); -module.exports = function (O, D) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); + return _react2.default.createElement( + 'div', + { style: _Styles2.default.container }, + _react2.default.createElement( + _AppBar2.default, + { title: title, showMenuIconButton: false, style: appBarStyles }, + tabs && _react2.default.createElement( + 'div', + { style: { width: '100%' } }, + _react2.default.createElement( + _Tabs2.default, + { style: _Styles2.default.tabs, value: currentTab }, + tabs + ) + ) + ), + _react2.default.createElement( + 'div', + { style: { width: '100%' } }, + _react2.default.createElement( + 'div', + { style: (0, _assign2.default)({}, _Styles2.default.content, contentStyle) }, + _react2.default.createElement( + _Paper2.default, + { style: _Styles2.default.paper }, + children + ) + ) + ) + ); +} + +Layout.propTypes = { + children: _react.PropTypes.node, + title: _react.PropTypes.string.isRequired, + contentStyle: _react.PropTypes.object, + tabs: _react.PropTypes.arrayOf(_react.PropTypes.node), + currentTab: _react.PropTypes.any }; +/***/ }), +/* 344 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(858), __esModule: true }; /***/ }), -/* 332 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(61); -var invoke = __webpack_require__(866); -var html = __webpack_require__(297); -var cel = __webpack_require__(131); -var global = __webpack_require__(23); -var process = global.process; -var setTask = global.setImmediate; -var clearTask = global.clearImmediate; -var MessageChannel = global.MessageChannel; -var Dispatch = global.Dispatch; -var counter = 0; -var queue = {}; -var ONREADYSTATECHANGE = 'onreadystatechange'; -var defer, channel, port; -var run = function () { +var ctx = __webpack_require__(67) + , invoke = __webpack_require__(863) + , html = __webpack_require__(299) + , cel = __webpack_require__(137) + , global = __webpack_require__(25) + , process = global.process + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; +var run = function(){ var id = +this; - // eslint-disable-next-line no-prototype-builtins - if (queue.hasOwnProperty(id)) { + if(queue.hasOwnProperty(id)){ var fn = queue[id]; delete queue[id]; fn(); } }; -var listener = function (event) { +var listener = function(event){ run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: -if (!setTask || !clearTask) { - setTask = function setImmediate(fn) { - var args = []; - var i = 1; - while (arguments.length > i) args.push(arguments[i++]); - queue[++counter] = function () { - // eslint-disable-next-line no-new-func +if(!setTask || !clearTask){ + setTask = function setImmediate(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; - clearTask = function clearImmediate(id) { + clearTask = function clearImmediate(id){ delete queue[id]; }; // Node.js 0.8- - if (__webpack_require__(83)(process) == 'process') { - defer = function (id) { + if(__webpack_require__(87)(process) == 'process'){ + defer = function(id){ process.nextTick(ctx(run, id, 1)); }; - // Sphere (JS game engine) Dispatch API - } else if (Dispatch && Dispatch.now) { - defer = function (id) { - Dispatch.now(ctx(run, id, 1)); - }; // Browsers with MessageChannel, includes WebWorkers - } else if (MessageChannel) { - channel = new MessageChannel(); - port = channel.port2; + } else if(MessageChannel){ + channel = new MessageChannel; + port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' - } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { - defer = function (id) { + } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ + defer = function(id){ global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- - } else if (ONREADYSTATECHANGE in cel('script')) { - defer = function (id) { - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + } else if(ONREADYSTATECHANGE in cel('script')){ + defer = function(id){ + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { - defer = function (id) { + defer = function(id){ setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { - set: setTask, + set: setTask, clear: clearTask }; - -/***/ }), -/* 333 */ -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return { e: false, v: exec() }; - } catch (e) { - return { e: true, v: e }; - } -}; - - -/***/ }), -/* 334 */ -/***/ (function(module, exports, __webpack_require__) { - -var newPromiseCapability = __webpack_require__(205); - -module.exports = function (C, x) { - var promiseCapability = newPromiseCapability.f(C); - var resolve = promiseCapability.resolve; - resolve(x); - return promiseCapability.promise; -}; - - /***/ }), -/* 335 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _assign = __webpack_require__(49); +var _assign = __webpack_require__(42); var _assign2 = _interopRequireDefault(_assign); @@ -25436,41 +26881,41 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); +var _reactDom = __webpack_require__(16); var _reactDom2 = _interopRequireDefault(_reactDom); -var _reactRouter = __webpack_require__(156); +var _reactRouter = __webpack_require__(163); -var _redux = __webpack_require__(111); +var _redux = __webpack_require__(115); -var _reactRedux = __webpack_require__(27); +var _reactRedux = __webpack_require__(19); -var _reduxLogger = __webpack_require__(476); +var _reduxLogger = __webpack_require__(484); var _reduxLogger2 = _interopRequireDefault(_reduxLogger); -var _reactRouterRedux = __webpack_require__(481); +var _reactRouterRedux = __webpack_require__(489); -var _reactTapEventPlugin = __webpack_require__(484); +var _reactTapEventPlugin = __webpack_require__(492); var _reactTapEventPlugin2 = _interopRequireDefault(_reactTapEventPlugin); -var _reduxForm = __webpack_require__(113); +var _reduxForm = __webpack_require__(82); -var _reduxThunk = __webpack_require__(653); +var _reduxThunk = __webpack_require__(636); var _reduxThunk2 = _interopRequireDefault(_reduxThunk); -var _reducers = __webpack_require__(654); +var _reducers = __webpack_require__(637); var reducers = _interopRequireWildcard(_reducers); -var _routes = __webpack_require__(658); +var _routes = __webpack_require__(660); var _routes2 = _interopRequireDefault(_routes); -var _StorageManager = __webpack_require__(857); +var _StorageManager = __webpack_require__(853); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -25486,19 +26931,34 @@ if (false) { } var savedState = (0, _StorageManager.loadSavedState)(VERSION); -var store = (0, _redux.createStore)((0, _redux.combineReducers)((0, _assign2.default)({}, reducers, { +var appReducer = (0, _redux.combineReducers)((0, _assign2.default)({}, reducers, { routing: _reactRouterRedux.routerReducer, form: _reduxForm.reducer -})), savedState, _redux.applyMiddleware.apply(undefined, middleware)); +})); + +var rootReducer = function rootReducer(state, action) { + if (action.type === 'PROFILE_CHANGE') { + return appReducer(undefined, action); + } + return appReducer(state, action); +}; +var store = (0, _redux.createStore)(rootReducer, savedState, _redux.applyMiddleware.apply(undefined, middleware)); // Save state in localStorage automatically store.subscribe(function () { var state = store.getState(); if (state) { - (0, _StorageManager.saveState)({ menu: state.menu, settings: state.settings }, VERSION); - if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined') { - (0, _StorageManager.saveToChromeStorage)('settings', state.settings.values || {}); - } + (function () { + (0, _StorageManager.saveState)({ menu: state.menu, profiles: state.profiles, atc: state.atc }, VERSION); + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined') { + (0, _StorageManager.saveToChromeStorage)('settings', settings || {}); + (0, _StorageManager.saveToChromeStorage)('atc', state.atc || {}); + } + })(); } }); @@ -25515,374 +26975,170 @@ _reactDom2.default.render(_react2.default.createElement( ), document.getElementById('app')); /***/ }), -/* 336 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(337); +__webpack_require__(348); module.exports = __webpack_require__(18).Object.assign; - /***/ }), -/* 337 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) -var $export = __webpack_require__(28); - -$export($export.S + $export.F, 'Object', { assign: __webpack_require__(338) }); +var $export = __webpack_require__(33); +$export($export.S + $export.F, 'Object', {assign: __webpack_require__(349)}); /***/ }), -/* 338 */ +/* 349 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 19.1.2.1 Object.assign(target, source, ...) -var getKeys = __webpack_require__(64); -var gOPS = __webpack_require__(139); -var pIE = __webpack_require__(101); -var toObject = __webpack_require__(84); -var IObject = __webpack_require__(208); -var $assign = Object.assign; +var getKeys = __webpack_require__(70) + , gOPS = __webpack_require__(145) + , pIE = __webpack_require__(104) + , toObject = __webpack_require__(88) + , IObject = __webpack_require__(215) + , $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) -module.exports = !$assign || __webpack_require__(63)(function () { - var A = {}; - var B = {}; - // eslint-disable-next-line no-undef - var S = Symbol(); - var K = 'abcdefghijklmnopqrst'; +module.exports = !$assign || __webpack_require__(69)(function(){ + var A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; A[S] = 7; - K.split('').forEach(function (k) { B[k] = k; }); + K.split('').forEach(function(k){ B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; -}) ? function assign(target, source) { // eslint-disable-line no-unused-vars - var T = toObject(target); - var aLen = arguments.length; - var index = 1; - var getSymbols = gOPS.f; - var isEnum = pIE.f; - while (aLen > index) { - var S = IObject(arguments[index++]); - var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; +}) ? function assign(target, source){ // eslint-disable-line no-unused-vars + var T = toObject(target) + , aLen = arguments.length + , index = 1 + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) + , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; } return T; } : $assign; - /***/ }), -/* 339 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes -var toIObject = __webpack_require__(52); -var toLength = __webpack_require__(134); -var toAbsoluteIndex = __webpack_require__(340); -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; +var toIObject = __webpack_require__(55) + , toLength = __webpack_require__(140) + , toIndex = __webpack_require__(351); +module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { + if(IS_INCLUDES && el != el)while(length > index){ value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; - -/***/ }), -/* 340 */ -/***/ (function(module, exports, __webpack_require__) { - -var toInteger = __webpack_require__(135); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; - - -/***/ }), -/* 341 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2014-2015, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - - -/** - * Forked from fbjs/warning: - * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js - * - * Only change is we use console.warn instead of console.error, - * and do nothing when 'console' is not supported. - * This really simplifies the code. - * --- - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - -var lowPriorityWarning = function () {}; - -if (false) { - var printWarning = function (format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.warn(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; - - lowPriorityWarning = function (condition, format) { - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); - } - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; - } - - printWarning.apply(undefined, [format].concat(args)); - } - }; -} - -module.exports = lowPriorityWarning; - /***/ }), -/* 342 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - - -var PooledClass = __webpack_require__(343); -var ReactElement = __webpack_require__(66); - -var emptyFunction = __webpack_require__(24); -var traverseAllChildren = __webpack_require__(344); - -var twoArgumentPooler = PooledClass.twoArgumentPooler; -var fourArgumentPooler = PooledClass.fourArgumentPooler; - -var userProvidedKeyEscapeRegex = /\/+/g; -function escapeUserProvidedKey(text) { - return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); -} - -/** - * PooledClass representing the bookkeeping associated with performing a child - * traversal. Allows avoiding binding callbacks. - * - * @constructor ForEachBookKeeping - * @param {!function} forEachFunction Function to perform traversal with. - * @param {?*} forEachContext Context to perform context with. - */ -function ForEachBookKeeping(forEachFunction, forEachContext) { - this.func = forEachFunction; - this.context = forEachContext; - this.count = 0; -} -ForEachBookKeeping.prototype.destructor = function () { - this.func = null; - this.context = null; - this.count = 0; -}; -PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); - -function forEachSingleChild(bookKeeping, child, name) { - var func = bookKeeping.func, - context = bookKeeping.context; - - func.call(context, child, bookKeeping.count++); -} - -/** - * Iterates through children that are typically specified as `props.children`. - * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach - * - * The provided forEachFunc(child, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} forEachFunc - * @param {*} forEachContext Context for forEachContext. - */ -function forEachChildren(children, forEachFunc, forEachContext) { - if (children == null) { - return children; - } - var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); - traverseAllChildren(children, forEachSingleChild, traverseContext); - ForEachBookKeeping.release(traverseContext); -} - -/** - * PooledClass representing the bookkeeping associated with performing a child - * mapping. Allows avoiding binding callbacks. - * - * @constructor MapBookKeeping - * @param {!*} mapResult Object containing the ordered map of results. - * @param {!function} mapFunction Function to perform mapping with. - * @param {?*} mapContext Context to perform mapping with. - */ -function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { - this.result = mapResult; - this.keyPrefix = keyPrefix; - this.func = mapFunction; - this.context = mapContext; - this.count = 0; -} -MapBookKeeping.prototype.destructor = function () { - this.result = null; - this.keyPrefix = null; - this.func = null; - this.context = null; - this.count = 0; -}; -PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); - -function mapSingleChildIntoContext(bookKeeping, child, childKey) { - var result = bookKeeping.result, - keyPrefix = bookKeeping.keyPrefix, - func = bookKeeping.func, - context = bookKeeping.context; - - - var mappedChild = func.call(context, child, bookKeeping.count++); - if (Array.isArray(mappedChild)) { - mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); - } else if (mappedChild != null) { - if (ReactElement.isValidElement(mappedChild)) { - mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, - // Keep both the (mapped) and old keys if they differ, just as - // traverseAllChildren used to do for objects as children - keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); - } - result.push(mappedChild); - } -} - -function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { - var escapedPrefix = ''; - if (prefix != null) { - escapedPrefix = escapeUserProvidedKey(prefix) + '/'; - } - var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); - traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); - MapBookKeeping.release(traverseContext); -} - -/** - * Maps children that are typically specified as `props.children`. - * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map - * - * The provided mapFunction(child, key, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} func The map function. - * @param {*} context Context for mapFunction. - * @return {object} Object containing the ordered map of results. - */ -function mapChildren(children, func, context) { - if (children == null) { - return children; - } - var result = []; - mapIntoWithKeyPrefixInternal(children, result, null, func, context); - return result; -} +/* 351 */ +/***/ (function(module, exports, __webpack_require__) { -function forEachSingleChildDummy(traverseContext, child, name) { - return null; -} +var toInteger = __webpack_require__(141) + , max = Math.max + , min = Math.min; +module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + +/***/ }), +/* 352 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; /** - * Count the number of children that are typically specified as - * `props.children`. + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @param {?*} children Children tree container. - * @return {number} The number of children. */ -function countChildren(children, context) { - return traverseAllChildren(children, forEachSingleChildDummy, null); -} + + /** - * Flatten a children object (typically specified as `props.children`) and - * return an array with appropriately re-keyed children. + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. */ -function toArray(children) { - var result = []; - mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); - return result; -} -var ReactChildren = { - forEach: forEachChildren, - map: mapChildren, - mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, - count: countChildren, - toArray: toArray -}; +var lowPriorityWarning = function () {}; -module.exports = ReactChildren; +if (false) { + var printWarning = function (format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.warn(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarning = function (condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; +} + +module.exports = lowPriorityWarning; /***/ }), -/* 343 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -25899,7 +27155,7 @@ module.exports = ReactChildren; -var _prodInvariant = __webpack_require__(85); +var _prodInvariant = __webpack_require__(71); var invariant = __webpack_require__(9); @@ -25999,7 +27255,227 @@ var PooledClass = { module.exports = PooledClass; /***/ }), -/* 344 */ +/* 354 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/* global Symbol */ + +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + +/** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ +function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } +} + +module.exports = getIteratorFn; + +/***/ }), +/* 355 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactElement = __webpack_require__(57); + +/** + * Create a factory that creates HTML tag elements. + * + * @private + */ +var createDOMFactory = ReactElement.createFactory; +if (false) { + var ReactElementValidator = require('./ReactElementValidator'); + createDOMFactory = ReactElementValidator.createFactory; +} + +/** + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. + * + * @public + */ +var ReactDOMFactories = { + a: createDOMFactory('a'), + abbr: createDOMFactory('abbr'), + address: createDOMFactory('address'), + area: createDOMFactory('area'), + article: createDOMFactory('article'), + aside: createDOMFactory('aside'), + audio: createDOMFactory('audio'), + b: createDOMFactory('b'), + base: createDOMFactory('base'), + bdi: createDOMFactory('bdi'), + bdo: createDOMFactory('bdo'), + big: createDOMFactory('big'), + blockquote: createDOMFactory('blockquote'), + body: createDOMFactory('body'), + br: createDOMFactory('br'), + button: createDOMFactory('button'), + canvas: createDOMFactory('canvas'), + caption: createDOMFactory('caption'), + cite: createDOMFactory('cite'), + code: createDOMFactory('code'), + col: createDOMFactory('col'), + colgroup: createDOMFactory('colgroup'), + data: createDOMFactory('data'), + datalist: createDOMFactory('datalist'), + dd: createDOMFactory('dd'), + del: createDOMFactory('del'), + details: createDOMFactory('details'), + dfn: createDOMFactory('dfn'), + dialog: createDOMFactory('dialog'), + div: createDOMFactory('div'), + dl: createDOMFactory('dl'), + dt: createDOMFactory('dt'), + em: createDOMFactory('em'), + embed: createDOMFactory('embed'), + fieldset: createDOMFactory('fieldset'), + figcaption: createDOMFactory('figcaption'), + figure: createDOMFactory('figure'), + footer: createDOMFactory('footer'), + form: createDOMFactory('form'), + h1: createDOMFactory('h1'), + h2: createDOMFactory('h2'), + h3: createDOMFactory('h3'), + h4: createDOMFactory('h4'), + h5: createDOMFactory('h5'), + h6: createDOMFactory('h6'), + head: createDOMFactory('head'), + header: createDOMFactory('header'), + hgroup: createDOMFactory('hgroup'), + hr: createDOMFactory('hr'), + html: createDOMFactory('html'), + i: createDOMFactory('i'), + iframe: createDOMFactory('iframe'), + img: createDOMFactory('img'), + input: createDOMFactory('input'), + ins: createDOMFactory('ins'), + kbd: createDOMFactory('kbd'), + keygen: createDOMFactory('keygen'), + label: createDOMFactory('label'), + legend: createDOMFactory('legend'), + li: createDOMFactory('li'), + link: createDOMFactory('link'), + main: createDOMFactory('main'), + map: createDOMFactory('map'), + mark: createDOMFactory('mark'), + menu: createDOMFactory('menu'), + menuitem: createDOMFactory('menuitem'), + meta: createDOMFactory('meta'), + meter: createDOMFactory('meter'), + nav: createDOMFactory('nav'), + noscript: createDOMFactory('noscript'), + object: createDOMFactory('object'), + ol: createDOMFactory('ol'), + optgroup: createDOMFactory('optgroup'), + option: createDOMFactory('option'), + output: createDOMFactory('output'), + p: createDOMFactory('p'), + param: createDOMFactory('param'), + picture: createDOMFactory('picture'), + pre: createDOMFactory('pre'), + progress: createDOMFactory('progress'), + q: createDOMFactory('q'), + rp: createDOMFactory('rp'), + rt: createDOMFactory('rt'), + ruby: createDOMFactory('ruby'), + s: createDOMFactory('s'), + samp: createDOMFactory('samp'), + script: createDOMFactory('script'), + section: createDOMFactory('section'), + select: createDOMFactory('select'), + small: createDOMFactory('small'), + source: createDOMFactory('source'), + span: createDOMFactory('span'), + strong: createDOMFactory('strong'), + style: createDOMFactory('style'), + sub: createDOMFactory('sub'), + summary: createDOMFactory('summary'), + sup: createDOMFactory('sup'), + table: createDOMFactory('table'), + tbody: createDOMFactory('tbody'), + td: createDOMFactory('td'), + textarea: createDOMFactory('textarea'), + tfoot: createDOMFactory('tfoot'), + th: createDOMFactory('th'), + thead: createDOMFactory('thead'), + time: createDOMFactory('time'), + title: createDOMFactory('title'), + tr: createDOMFactory('tr'), + track: createDOMFactory('track'), + u: createDOMFactory('u'), + ul: createDOMFactory('ul'), + 'var': createDOMFactory('var'), + video: createDOMFactory('video'), + wbr: createDOMFactory('wbr'), + + // SVG + circle: createDOMFactory('circle'), + clipPath: createDOMFactory('clipPath'), + defs: createDOMFactory('defs'), + ellipse: createDOMFactory('ellipse'), + g: createDOMFactory('g'), + image: createDOMFactory('image'), + line: createDOMFactory('line'), + linearGradient: createDOMFactory('linearGradient'), + mask: createDOMFactory('mask'), + path: createDOMFactory('path'), + pattern: createDOMFactory('pattern'), + polygon: createDOMFactory('polygon'), + polyline: createDOMFactory('polyline'), + radialGradient: createDOMFactory('radialGradient'), + rect: createDOMFactory('rect'), + stop: createDOMFactory('stop'), + svg: createDOMFactory('svg'), + text: createDOMFactory('text'), + tspan: createDOMFactory('tspan') +}; + +module.exports = ReactDOMFactories; + +/***/ }), +/* 356 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26015,218 +27491,534 @@ module.exports = PooledClass; -var _prodInvariant = __webpack_require__(85); +var _require = __webpack_require__(57), + isValidElement = _require.isValidElement; + +var factory = __webpack_require__(223); + +module.exports = factory(isValidElement); + +/***/ }), +/* 357 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +var emptyFunction = __webpack_require__(22); +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); + +var ReactPropTypesSecret = __webpack_require__(224); +var checkPropTypes = __webpack_require__(358); + +module.exports = function(isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (false) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + } else if (false) { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', + propFullName, + componentName + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); + } + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); -var ReactCurrentOwner = __webpack_require__(37); -var REACT_ELEMENT_TYPE = __webpack_require__(212); + return chainedCheckType; + } -var getIteratorFn = __webpack_require__(345); -var invariant = __webpack_require__(9); -var KeyEscapeUtils = __webpack_require__(346); -var warning = __webpack_require__(12); + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); -var SEPARATOR = '.'; -var SUBSEPARATOR = ':'; + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } -/** - * This is inlined from ReactElement since this file is shared between - * isomorphic and renderers. We could extract this to a - * - */ + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturnsNull); + } -/** - * TODO: Test that a single child and an array with one item have the same key - * pattern. - */ + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } -var didWarnAboutMaps = false; + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); + } + return null; + } + return createChainableTypeChecker(validate); + } -/** - * Generate a key string that identifies a component within a set. - * - * @param {*} component A component that could contain a manual key. - * @param {number} index Index that is used if a manual key is not provided. - * @return {string} - */ -function getComponentKey(component, index) { - // Do some typechecking here since we call this blindly. We want to ensure - // that we don't block potential future ES APIs. - if (component && typeof component === 'object' && component.key != null) { - // Explicit key - return KeyEscapeUtils.escape(component.key); + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); } - // Implicit key determined by the index in the set - return index.toString(36); -} -/** - * @param {?*} children Children tree container. - * @param {!string} nameSoFar Name of the key path so far. - * @param {!function} callback Callback to invoke with each child found. - * @param {?*} traverseContext Used to pass information throughout the traversal - * process. - * @return {!number} The number of children in this subtree. - */ -function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { - var type = typeof children; + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + false ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } - if (type === 'undefined' || type === 'boolean') { - // All of the above are perceived as null. - children = null; + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + } + return createChainableTypeChecker(validate); } - if (children === null || type === 'string' || type === 'number' || - // The following is inlined from ReactElement. This means we can optimize - // some checks. React Fiber also inlines this logic for similar purposes. - type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { - callback(traverseContext, children, - // If it's the only child, treat the name as if it was wrapped in an array - // so that it's consistent if the number of children grows. - nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); - return 1; + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); } - var child; - var nextName; - var subtreeCount = 0; // Count of children found in the current subtree. - var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + false ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - child = children[i]; - nextName = nextNamePrefix + getComponentKey(child, i); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (typeof checker !== 'function') { + warning( + false, + 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + + 'received %s at index %s.', + getPostfixForTypeWarning(checker), + i + ); + return emptyFunction.thatReturnsNull; + } } - } else { - var iteratorFn = getIteratorFn(children); - if (iteratorFn) { - var iterator = iteratorFn.call(children); - var step; - if (iteratorFn !== children.entries) { - var ii = 0; - while (!(step = iterator.next()).done) { - child = step.value; - nextName = nextNamePrefix + getComponentKey(child, ii++); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); - } - } else { - if (false) { - var mapsAsChildrenAddendum = ''; - if (ReactCurrentOwner.current) { - var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); - if (mapsAsChildrenOwnerName) { - mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; - } - } - process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; - didWarnAboutMaps = true; - } - // Iterator will provide entry [k,v] tuples rather than values. - while (!(step = iterator.next()).done) { - var entry = step.value; - if (entry) { - child = entry[1]; - nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); - } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { + return null; } } - } else if (type === 'object') { - var addendum = ''; - if (false) { - addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; - if (children._isReactElement) { - addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.'; + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; } - if (ReactCurrentOwner.current) { - var name = ReactCurrentOwner.current.getName(); - if (name) { - addendum += ' Check the render method of `' + name + '`.'; - } + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error) { + return error; } } - var childrenString = String(children); - true ? false ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; + return null; } + return createChainableTypeChecker(validate); } - return subtreeCount; -} + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } -/** - * Traverses children that are typically specified as `props.children`, but - * might also be specified through attributes: - * - * - `traverseAllChildren(this.props.children, ...)` - * - `traverseAllChildren(this.props.leftPanelChildren, ...)` - * - * The `traverseContext` is an optional argument that is passed through the - * entire traversal. It can be used to store accumulations or anything else that - * the callback might find relevant. - * - * @param {?*} children Children tree object. - * @param {!function} callback To invoke upon traversing each child. - * @param {?*} traverseContext Context for traversal. - * @return {!number} The number of children in this subtree. - */ -function traverseAllChildren(children, callback, traverseContext) { - if (children == null) { - return 0; - } + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } - return traverseAllChildrenImpl(children, '', callback, traverseContext); -} + return true; + default: + return false; + } + } -module.exports = traverseAllChildren; + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } -/***/ }), -/* 345 */ -/***/ (function(module, exports, __webpack_require__) { + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + return false; + } + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } -/* global Symbol */ + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } -var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; -var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + default: + return type; + } + } -/** - * Returns the iterator method function contained on the iterable object. - * - * Be sure to invoke the function with the iterable as context: - * - * var iteratorFn = getIteratorFn(myIterable); - * if (iteratorFn) { - * var iterator = iteratorFn.call(myIterable); - * ... - * } - * - * @param {?object} maybeIterable - * @return {?function} - */ -function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; } -} -module.exports = getIteratorFn; + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + /***/ }), -/* 346 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26237,60 +28029,64 @@ module.exports = getIteratorFn; * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. - * - * */ -/** - * Escape and wrap key so it is safe to use as a reactid - * - * @param {string} key to be escaped. - * @return {string} the escaped key. - */ - -function escape(key) { - var escapeRegex = /[=:]/g; - var escaperLookup = { - '=': '=0', - ':': '=2' - }; - var escapedString = ('' + key).replace(escapeRegex, function (match) { - return escaperLookup[match]; - }); - - return '$' + escapedString; +if (false) { + var invariant = require('fbjs/lib/invariant'); + var warning = require('fbjs/lib/warning'); + var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret'); + var loggedTypeFailures = {}; } /** - * Unescape and unwrap key for human-readable display + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. * - * @param {string} key to unescape. - * @return {string} the unescaped key. + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private */ -function unescape(key) { - var unescapeRegex = /(=0|=2)/g; - var unescaperLookup = { - '=0': '=', - '=2': ':' - }; - var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); +function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (false) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; - return ('' + keySubstring).replace(unescapeRegex, function (match) { - return unescaperLookup[match]; - }); + var stack = getStack ? getStack() : ''; + + warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + } + } + } + } } -var KeyEscapeUtils = { - escape: escape, - unescape: unescape -}; +module.exports = checkPropTypes; -module.exports = KeyEscapeUtils; /***/ }), -/* 347 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26306,165 +28102,10 @@ module.exports = KeyEscapeUtils; -var ReactElement = __webpack_require__(66); - -/** - * Create a factory that creates HTML tag elements. - * - * @private - */ -var createDOMFactory = ReactElement.createFactory; -if (false) { - var ReactElementValidator = require('./ReactElementValidator'); - createDOMFactory = ReactElementValidator.createFactory; -} - -/** - * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. - * - * @public - */ -var ReactDOMFactories = { - a: createDOMFactory('a'), - abbr: createDOMFactory('abbr'), - address: createDOMFactory('address'), - area: createDOMFactory('area'), - article: createDOMFactory('article'), - aside: createDOMFactory('aside'), - audio: createDOMFactory('audio'), - b: createDOMFactory('b'), - base: createDOMFactory('base'), - bdi: createDOMFactory('bdi'), - bdo: createDOMFactory('bdo'), - big: createDOMFactory('big'), - blockquote: createDOMFactory('blockquote'), - body: createDOMFactory('body'), - br: createDOMFactory('br'), - button: createDOMFactory('button'), - canvas: createDOMFactory('canvas'), - caption: createDOMFactory('caption'), - cite: createDOMFactory('cite'), - code: createDOMFactory('code'), - col: createDOMFactory('col'), - colgroup: createDOMFactory('colgroup'), - data: createDOMFactory('data'), - datalist: createDOMFactory('datalist'), - dd: createDOMFactory('dd'), - del: createDOMFactory('del'), - details: createDOMFactory('details'), - dfn: createDOMFactory('dfn'), - dialog: createDOMFactory('dialog'), - div: createDOMFactory('div'), - dl: createDOMFactory('dl'), - dt: createDOMFactory('dt'), - em: createDOMFactory('em'), - embed: createDOMFactory('embed'), - fieldset: createDOMFactory('fieldset'), - figcaption: createDOMFactory('figcaption'), - figure: createDOMFactory('figure'), - footer: createDOMFactory('footer'), - form: createDOMFactory('form'), - h1: createDOMFactory('h1'), - h2: createDOMFactory('h2'), - h3: createDOMFactory('h3'), - h4: createDOMFactory('h4'), - h5: createDOMFactory('h5'), - h6: createDOMFactory('h6'), - head: createDOMFactory('head'), - header: createDOMFactory('header'), - hgroup: createDOMFactory('hgroup'), - hr: createDOMFactory('hr'), - html: createDOMFactory('html'), - i: createDOMFactory('i'), - iframe: createDOMFactory('iframe'), - img: createDOMFactory('img'), - input: createDOMFactory('input'), - ins: createDOMFactory('ins'), - kbd: createDOMFactory('kbd'), - keygen: createDOMFactory('keygen'), - label: createDOMFactory('label'), - legend: createDOMFactory('legend'), - li: createDOMFactory('li'), - link: createDOMFactory('link'), - main: createDOMFactory('main'), - map: createDOMFactory('map'), - mark: createDOMFactory('mark'), - menu: createDOMFactory('menu'), - menuitem: createDOMFactory('menuitem'), - meta: createDOMFactory('meta'), - meter: createDOMFactory('meter'), - nav: createDOMFactory('nav'), - noscript: createDOMFactory('noscript'), - object: createDOMFactory('object'), - ol: createDOMFactory('ol'), - optgroup: createDOMFactory('optgroup'), - option: createDOMFactory('option'), - output: createDOMFactory('output'), - p: createDOMFactory('p'), - param: createDOMFactory('param'), - picture: createDOMFactory('picture'), - pre: createDOMFactory('pre'), - progress: createDOMFactory('progress'), - q: createDOMFactory('q'), - rp: createDOMFactory('rp'), - rt: createDOMFactory('rt'), - ruby: createDOMFactory('ruby'), - s: createDOMFactory('s'), - samp: createDOMFactory('samp'), - script: createDOMFactory('script'), - section: createDOMFactory('section'), - select: createDOMFactory('select'), - small: createDOMFactory('small'), - source: createDOMFactory('source'), - span: createDOMFactory('span'), - strong: createDOMFactory('strong'), - style: createDOMFactory('style'), - sub: createDOMFactory('sub'), - summary: createDOMFactory('summary'), - sup: createDOMFactory('sup'), - table: createDOMFactory('table'), - tbody: createDOMFactory('tbody'), - td: createDOMFactory('td'), - textarea: createDOMFactory('textarea'), - tfoot: createDOMFactory('tfoot'), - th: createDOMFactory('th'), - thead: createDOMFactory('thead'), - time: createDOMFactory('time'), - title: createDOMFactory('title'), - tr: createDOMFactory('tr'), - track: createDOMFactory('track'), - u: createDOMFactory('u'), - ul: createDOMFactory('ul'), - 'var': createDOMFactory('var'), - video: createDOMFactory('video'), - wbr: createDOMFactory('wbr'), - - // SVG - circle: createDOMFactory('circle'), - clipPath: createDOMFactory('clipPath'), - defs: createDOMFactory('defs'), - ellipse: createDOMFactory('ellipse'), - g: createDOMFactory('g'), - image: createDOMFactory('image'), - line: createDOMFactory('line'), - linearGradient: createDOMFactory('linearGradient'), - mask: createDOMFactory('mask'), - path: createDOMFactory('path'), - pattern: createDOMFactory('pattern'), - polygon: createDOMFactory('polygon'), - polyline: createDOMFactory('polyline'), - radialGradient: createDOMFactory('radialGradient'), - rect: createDOMFactory('rect'), - stop: createDOMFactory('stop'), - svg: createDOMFactory('svg'), - text: createDOMFactory('text'), - tspan: createDOMFactory('tspan') -}; - -module.exports = ReactDOMFactories; +module.exports = '15.6.1'; /***/ }), -/* 348 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26480,15 +28121,19 @@ module.exports = ReactDOMFactories; -var _require = __webpack_require__(66), - isValidElement = _require.isValidElement; +var _require = __webpack_require__(216), + Component = _require.Component; + +var _require2 = __webpack_require__(57), + isValidElement = _require2.isValidElement; -var factory = __webpack_require__(213); +var ReactNoopUpdateQueue = __webpack_require__(217); +var factory = __webpack_require__(361); -module.exports = factory(isValidElement); +module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue); /***/ }), -/* 349 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -26499,630 +28144,875 @@ module.exports = factory(isValidElement); * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. + * */ -var emptyFunction = __webpack_require__(24); -var invariant = __webpack_require__(9); -var warning = __webpack_require__(12); +var _assign = __webpack_require__(13); + +var emptyObject = __webpack_require__(105); +var _invariant = __webpack_require__(9); -var ReactPropTypesSecret = __webpack_require__(214); -var checkPropTypes = __webpack_require__(350); +if (false) { + var warning = require('fbjs/lib/warning'); +} -module.exports = function(isValidElement, throwOnDirectAccess) { - /* global Symbol */ - var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. +var MIXINS_KEY = 'mixins'; + +// Helper function to allow the creation of anonymous functions which do not +// have .name set to the name of the variable being assigned to. +function identity(fn) { + return fn; +} + +var ReactPropTypeLocationNames; +if (false) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; +} else { + ReactPropTypeLocationNames = {}; +} +function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { /** - * Returns the iterator method function contained on the iterable object. - * - * Be sure to invoke the function with the iterable as context: - * - * var iteratorFn = getIteratorFn(myIterable); - * if (iteratorFn) { - * var iterator = iteratorFn.call(myIterable); - * ... - * } - * - * @param {?object} maybeIterable - * @return {?function} + * Policies that describe methods in `ReactClassInterface`. */ - function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; - } - } + + var injectedMixins = []; /** - * Collection of methods that allow declaration and validation of props that are - * supplied to React components. Example usage: - * - * var Props = require('ReactPropTypes'); - * var MyArticle = React.createClass({ - * propTypes: { - * // An optional string prop named "description". - * description: Props.string, + * Composite components are higher-level components that compose other composite + * or host components. * - * // A required enum prop named "category". - * category: Props.oneOf(['News','Photos']).isRequired, + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. * - * // A prop named "dialog" that requires an instance of Dialog. - * dialog: Props.instanceOf(Dialog).isRequired - * }, - * render: function() { ... } + * var MyComponent = React.createClass({ + * render: function() { + * return
Hello World
; + * } * }); * - * A more formal specification of how these methods are used: - * - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) - * decl := ReactPropTypes.{type}(.isRequired)? - * - * Each and every declaration produces a function with the same signature. This - * allows the creation of custom validation functions. For example: - * - * var MyLink = React.createClass({ - * propTypes: { - * // An optional string or URI prop named "href". - * href: function(props, propName, componentName) { - * var propValue = props[propName]; - * if (propValue != null && typeof propValue !== 'string' && - * !(propValue instanceof URI)) { - * return new Error( - * 'Expected a string or an URI for ' + propName + ' in ' + - * componentName - * ); - * } - * } - * }, - * render: function() {...} - * }); + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. * + * @interface ReactClassInterface * @internal */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', - var ANONYMOUS = '<>'; + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', - // Important! - // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. - var ReactPropTypes = { - array: createPrimitiveTypeChecker('array'), - bool: createPrimitiveTypeChecker('boolean'), - func: createPrimitiveTypeChecker('function'), - number: createPrimitiveTypeChecker('number'), - object: createPrimitiveTypeChecker('object'), - string: createPrimitiveTypeChecker('string'), - symbol: createPrimitiveTypeChecker('symbol'), + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', - any: createAnyTypeChecker(), - arrayOf: createArrayOfTypeChecker, - element: createElementTypeChecker(), - instanceOf: createInstanceTypeChecker, - node: createNodeChecker(), - objectOf: createObjectOfTypeChecker, - oneOf: createEnumTypeChecker, - oneOfType: createUnionTypeChecker, - shape: createShapeTypeChecker - }; + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return
Hello, {name}!
; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', - /** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - */ - /*eslint-disable no-self-compare*/ - function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return x !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } - } - /*eslint-enable no-self-compare*/ + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE' + }; /** - * We use an Error-like object for backward compatibility as people may call - * PropTypes directly and inspect their output. However, we don't use real - * Errors anymore. We don't inspect their stack anyway, and creating them - * is prohibitively expensive if they are created too often, such as what - * happens in oneOfType() for any type before the one that matched. + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. */ - function PropTypeError(message) { - this.message = message; - this.stack = ''; - } - // Make `instanceof Error` still work for returned errors. - PropTypeError.prototype = Error.prototype; - - function createChainableTypeChecker(validate) { - if (false) { - var manualPropTypeCallCache = {}; - var manualPropTypeWarningCount = 0; - } - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { - componentName = componentName || ANONYMOUS; - propFullName = propFullName || propName; - - if (secret !== ReactPropTypesSecret) { - if (throwOnDirectAccess) { - // New behavior only for users of `prop-types` package - invariant( - false, - 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + - 'Use `PropTypes.checkPropTypes()` to call them. ' + - 'Read more at http://fb.me/use-check-prop-types' - ); - } else if (false) { - // Old behavior for people using React.PropTypes - var cacheKey = componentName + ':' + propName; - if ( - !manualPropTypeCallCache[cacheKey] && - // Avoid spamming the console because they are often not actionable except for lib authors - manualPropTypeWarningCount < 3 - ) { - warning( - false, - 'You are manually calling a React.PropTypes validation ' + - 'function for the `%s` prop on `%s`. This is deprecated ' + - 'and will throw in the standalone `prop-types` package. ' + - 'You may be seeing this warning due to a third-party PropTypes ' + - 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', - propFullName, - componentName - ); - manualPropTypeCallCache[cacheKey] = true; - manualPropTypeWarningCount++; - } + var RESERVED_SPEC_KEYS = { + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function(Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); } } - if (props[propName] == null) { - if (isRequired) { - if (props[propName] === null) { - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); - } - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); - } - return null; - } else { - return validate(props, propName, componentName, location, propFullName); + }, + childContextTypes: function(Constructor, childContextTypes) { + if (false) { + validateTypeDef(Constructor, childContextTypes, 'childContext'); } - } - - var chainedCheckType = checkType.bind(null, false); - chainedCheckType.isRequired = checkType.bind(null, true); - - return chainedCheckType; - } - - function createPrimitiveTypeChecker(expectedType) { - function validate(props, propName, componentName, location, propFullName, secret) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== expectedType) { - // `propValue` being instance of, say, date/regexp, pass the 'object' - // check, but we can offer a more precise error message here rather than - // 'of type `object`'. - var preciseType = getPreciseType(propValue); - - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + Constructor.childContextTypes = _assign( + {}, + Constructor.childContextTypes, + childContextTypes + ); + }, + contextTypes: function(Constructor, contextTypes) { + if (false) { + validateTypeDef(Constructor, contextTypes, 'context'); } - return null; - } - return createChainableTypeChecker(validate); - } - - function createAnyTypeChecker() { - return createChainableTypeChecker(emptyFunction.thatReturnsNull); - } - - function createArrayOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); + Constructor.contextTypes = _assign( + {}, + Constructor.contextTypes, + contextTypes + ); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function(Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps + ); + } else { + Constructor.getDefaultProps = getDefaultProps; } - var propValue = props[propName]; - if (!Array.isArray(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); + }, + propTypes: function(Constructor, propTypes) { + if (false) { + validateTypeDef(Constructor, propTypes, 'prop'); } - for (var i = 0; i < propValue.length; i++) { - var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); - if (error instanceof Error) { - return error; + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function() {} + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + if (false) { + warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName + ); } } - return null; } - return createChainableTypeChecker(validate); } - function createElementTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - if (!isValidElement(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); - } - return null; + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) + ? ReactClassInterface[name] + : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name + ); } - return createChainableTypeChecker(validate); - } - function createInstanceTypeChecker(expectedClass) { - function validate(props, propName, componentName, location, propFullName) { - if (!(props[propName] instanceof expectedClass)) { - var expectedClassName = expectedClass.name || ANONYMOUS; - var actualClassName = getClassName(props[propName]); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); - } - return null; + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name + ); } - return createChainableTypeChecker(validate); } - function createEnumTypeChecker(expectedValues) { - if (!Array.isArray(expectedValues)) { - false ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; - return emptyFunction.thatReturnsNull; - } + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (false) { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - for (var i = 0; i < expectedValues.length; i++) { - if (is(propValue, expectedValues[i])) { - return null; + if (process.env.NODE_ENV !== 'production') { + warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec + ); } } - var valuesString = JSON.stringify(expectedValues); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + return; } - return createChainableTypeChecker(validate); - } - function createObjectOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.' + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.' + ); + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; } - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; } - for (var key in propValue) { - if (propValue.hasOwnProperty(key)) { - var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error instanceof Error) { - return error; + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && + !isReactClassMethod && + !isAlreadyDefined && + spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || + specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + + 'when mixing in component specs.', + specPolicy, + name + ); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (false) { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } } } } - return null; } - return createChainableTypeChecker(validate); } - function createUnionTypeChecker(arrayOfTypeCheckers) { - if (!Array.isArray(arrayOfTypeCheckers)) { - false ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; - return emptyFunction.thatReturnsNull; + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; } - - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - if (typeof checker !== 'function') { - warning( - false, - 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + - 'received %s at index %s.', - getPostfixForTypeWarning(checker), - i - ); - return emptyFunction.thatReturnsNull; + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; } - } - function validate(props, propName, componentName, location, propFullName) { - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { - return null; - } - } + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name + ); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); + var isInherited = name in Constructor; + _invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name + ); + Constructor[name] = property; } - return createChainableTypeChecker(validate); } - function createNodeChecker() { - function validate(props, propName, componentName, location, propFullName) { - if (!isNode(props[propName])) { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key + ); + one[key] = two[key]; } - return null; } - return createChainableTypeChecker(validate); + return one; } - function createShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); - } - for (var key in shapeTypes) { - var checker = shapeTypes[key]; - if (!checker) { - continue; - } - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error) { - return error; - } + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; } - return null; - } - return createChainableTypeChecker(validate); + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; } - function isNode(propValue) { - switch (typeof propValue) { - case 'number': - case 'string': - case 'undefined': - return true; - case 'boolean': - return !propValue; - case 'object': - if (Array.isArray(propValue)) { - return propValue.every(isNode); - } - if (propValue === null || isValidElement(propValue)) { - return true; + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (false) { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function(newThis) { + for ( + var _len = arguments.length, + args = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; } - var iteratorFn = getIteratorFn(propValue); - if (iteratorFn) { - var iterator = iteratorFn.call(propValue); - var step; - if (iteratorFn !== propValue.entries) { - while (!(step = iterator.next()).done) { - if (!isNode(step.value)) { - return false; - } - } - } else { - // Iterator will provide entry [k,v] tuples rather than values. - while (!(step = iterator.next()).done) { - var entry = step.value; - if (entry) { - if (!isNode(entry[1])) { - return false; - } - } - } + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + if (process.env.NODE_ENV !== 'production') { + warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName + ); } - } else { - return false; + } else if (!args.length) { + if (process.env.NODE_ENV !== 'production') { + warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName + ); + } + return boundMethod; } - - return true; - default: - return false; + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; } + return boundMethod; } - function isSymbol(propType, propValue) { - // Native Symbol. - if (propType === 'symbol') { - return true; - } - - // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' - if (propValue['@@toStringTag'] === 'Symbol') { - return true; - } - - // Fallback for non-spec compliant Symbols which are polyfilled. - if (typeof Symbol === 'function' && propValue instanceof Symbol) { - return true; + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); } - - return false; } - // Equivalent of `typeof` but with special handling for array and regexp. - function getPropType(propValue) { - var propType = typeof propValue; - if (Array.isArray(propValue)) { - return 'array'; - } - if (propValue instanceof RegExp) { - // Old webkits (at least until Android 4.0) return 'function' rather than - // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ - // passes PropTypes.object. - return 'object'; - } - if (isSymbol(propType, propValue)) { - return 'symbol'; + var IsMountedPreMixin = { + componentDidMount: function() { + this.__isMounted = true; } - return propType; - } + }; - // This handles more types than `getPropType`. Only used for error messages. - // See `createPrimitiveTypeChecker`. - function getPreciseType(propValue) { - if (typeof propValue === 'undefined' || propValue === null) { - return '' + propValue; - } - var propType = getPropType(propValue); - if (propType === 'object') { - if (propValue instanceof Date) { - return 'date'; - } else if (propValue instanceof RegExp) { - return 'regexp'; - } + var IsMountedPostMixin = { + componentWillUnmount: function() { + this.__isMounted = false; } - return propType; - } + }; - // Returns a string that is postfixed to a warning about an invalid type. - // For example, "undefined" or "of type array" - function getPostfixForTypeWarning(value) { - var type = getPreciseType(value); - switch (type) { - case 'array': - case 'object': - return 'an ' + type; - case 'boolean': - case 'date': - case 'regexp': - return 'a ' + type; - default: - return type; - } - } + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function(newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, - // Returns class name of the object, if any. - function getClassName(propValue) { - if (!propValue.constructor || !propValue.constructor.name) { - return ANONYMOUS; + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function() { + if (false) { + warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || + this.name || + 'Component' + ); + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; } - return propValue.constructor.name; - } - - ReactPropTypes.checkPropTypes = checkPropTypes; - ReactPropTypes.PropTypes = ReactPropTypes; - - return ReactPropTypes; -}; - + }; -/***/ }), -/* 350 */ -/***/ (function(module, exports, __webpack_require__) { + var ReactClassComponent = function() {}; + _assign( + ReactClassComponent.prototype, + ReactComponent.prototype, + ReactClassMixin + ); -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function(props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + if (false) { + warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory' + ); + } + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } -if (false) { - var invariant = require('fbjs/lib/invariant'); - var warning = require('fbjs/lib/warning'); - var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret'); - var loggedTypeFailures = {}; -} + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; -/** - * Assert that the values match with the type specs. - * Error messages are memorized and will only be shown once. - * - * @param {object} typeSpecs Map of name to a ReactPropType - * @param {object} values Runtime values that need to be type-checked - * @param {string} location e.g. "prop", "context", "child context" - * @param {string} componentName Name of the component for error messages. - * @param {?Function} getStack Returns the component stack. - * @private - */ -function checkPropTypes(typeSpecs, values, location, componentName, getStack) { - if (false) { - for (var typeSpecName in typeSpecs) { - if (typeSpecs.hasOwnProperty(typeSpecName)) { - var error; - // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); - } catch (ex) { - error = ex; - } - warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; + this.state = null; - var stack = getStack ? getStack() : ''; + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. - warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + var initialState = this.getInitialState ? this.getInitialState() : null; + if (false) { + // We allow auto-mocks to proceed as if they're returning null. + if ( + initialState === undefined && + this.getInitialState._isMockFunction + ) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; } } - } - } -} - -module.exports = checkPropTypes; - - -/***/ }), -/* 351 */ -/***/ (function(module, exports, __webpack_require__) { + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent' + ); -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + mixSpecIntoComponent(Constructor, IsMountedPreMixin); + mixSpecIntoComponent(Constructor, spec); + mixSpecIntoComponent(Constructor, IsMountedPostMixin); -module.exports = '15.6.1'; + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } -/***/ }), -/* 352 */ -/***/ (function(module, exports, __webpack_require__) { + if (false) { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.' + ); + if (false) { + warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component' + ); + warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component' + ); + } + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } -var _require = __webpack_require__(209), - Component = _require.Component; + return Constructor; + } -var _require2 = __webpack_require__(66), - isValidElement = _require2.isValidElement; + return createClass; +} -var ReactNoopUpdateQueue = __webpack_require__(210); -var factory = __webpack_require__(215); +module.exports = factory; -module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue); /***/ }), -/* 353 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27137,9 +29027,9 @@ module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue); */ -var _prodInvariant = __webpack_require__(85); +var _prodInvariant = __webpack_require__(71); -var ReactElement = __webpack_require__(66); +var ReactElement = __webpack_require__(57); var invariant = __webpack_require__(9); @@ -27165,7 +29055,7 @@ function onlyChild(children) { module.exports = onlyChild; /***/ }), -/* 354 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27183,17 +29073,17 @@ module.exports = onlyChild; -var ReactDOMComponentTree = __webpack_require__(16); -var ReactDefaultInjection = __webpack_require__(355); -var ReactMount = __webpack_require__(239); -var ReactReconciler = __webpack_require__(70); -var ReactUpdates = __webpack_require__(31); -var ReactVersion = __webpack_require__(427); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactDefaultInjection = __webpack_require__(364); +var ReactMount = __webpack_require__(245); +var ReactReconciler = __webpack_require__(75); +var ReactUpdates = __webpack_require__(28); +var ReactVersion = __webpack_require__(436); -var findDOMNode = __webpack_require__(428); -var getHostComponentFromComposite = __webpack_require__(240); -var renderSubtreeIntoContainer = __webpack_require__(429); -var warning = __webpack_require__(12); +var findDOMNode = __webpack_require__(437); +var getHostComponentFromComposite = __webpack_require__(246); +var renderSubtreeIntoContainer = __webpack_require__(438); +var warning = __webpack_require__(11); ReactDefaultInjection.inject(); @@ -27206,7 +29096,6 @@ var ReactDOM = { /* eslint-disable camelcase */ unstable_batchedUpdates: ReactUpdates.batchedUpdates, unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer - /* eslint-enable camelcase */ }; // Inject the runtime into a devtools global hook regardless of browser. @@ -27235,6 +29124,7 @@ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVT if (false) { var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment'); if (ExecutionEnvironment.canUseDOM && window.top === window.self) { + // First check if devtools is not installed if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { // If we're in Chrome or Firefox, provide a download link if not installed. @@ -27246,7 +29136,7 @@ if (false) { } var testFunc = function testFn() {}; - process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, "It looks like you're using a minified copy of the development build " + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0; + process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0; // If we're in IE8, check to see if we are in compatibility mode and provide // information on preventing compatibility mode @@ -27281,7 +29171,7 @@ if (false) { module.exports = ReactDOM; /***/ }), -/* 355 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27297,25 +29187,25 @@ module.exports = ReactDOM; -var ARIADOMPropertyConfig = __webpack_require__(356); -var BeforeInputEventPlugin = __webpack_require__(357); -var ChangeEventPlugin = __webpack_require__(361); -var DefaultEventPluginOrder = __webpack_require__(364); -var EnterLeaveEventPlugin = __webpack_require__(365); -var HTMLDOMPropertyConfig = __webpack_require__(366); -var ReactComponentBrowserEnvironment = __webpack_require__(367); -var ReactDOMComponent = __webpack_require__(373); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactDOMEmptyComponent = __webpack_require__(398); -var ReactDOMTreeTraversal = __webpack_require__(399); -var ReactDOMTextComponent = __webpack_require__(400); -var ReactDefaultBatchingStrategy = __webpack_require__(401); -var ReactEventListener = __webpack_require__(402); -var ReactInjection = __webpack_require__(404); -var ReactReconcileTransaction = __webpack_require__(405); -var SVGDOMPropertyConfig = __webpack_require__(411); -var SelectEventPlugin = __webpack_require__(412); -var SimpleEventPlugin = __webpack_require__(413); +var ARIADOMPropertyConfig = __webpack_require__(365); +var BeforeInputEventPlugin = __webpack_require__(366); +var ChangeEventPlugin = __webpack_require__(370); +var DefaultEventPluginOrder = __webpack_require__(373); +var EnterLeaveEventPlugin = __webpack_require__(374); +var HTMLDOMPropertyConfig = __webpack_require__(375); +var ReactComponentBrowserEnvironment = __webpack_require__(376); +var ReactDOMComponent = __webpack_require__(382); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactDOMEmptyComponent = __webpack_require__(407); +var ReactDOMTreeTraversal = __webpack_require__(408); +var ReactDOMTextComponent = __webpack_require__(409); +var ReactDefaultBatchingStrategy = __webpack_require__(410); +var ReactEventListener = __webpack_require__(411); +var ReactInjection = __webpack_require__(413); +var ReactReconcileTransaction = __webpack_require__(414); +var SVGDOMPropertyConfig = __webpack_require__(420); +var SelectEventPlugin = __webpack_require__(421); +var SimpleEventPlugin = __webpack_require__(422); var alreadyInjected = false; @@ -27372,7 +29262,7 @@ module.exports = { }; /***/ }), -/* 356 */ +/* 365 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27451,7 +29341,7 @@ var ARIADOMPropertyConfig = { module.exports = ARIADOMPropertyConfig; /***/ }), -/* 357 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27467,11 +29357,11 @@ module.exports = ARIADOMPropertyConfig; -var EventPropagators = __webpack_require__(68); -var ExecutionEnvironment = __webpack_require__(21); -var FallbackCompositionState = __webpack_require__(358); -var SyntheticCompositionEvent = __webpack_require__(359); -var SyntheticInputEvent = __webpack_require__(360); +var EventPropagators = __webpack_require__(73); +var ExecutionEnvironment = __webpack_require__(23); +var FallbackCompositionState = __webpack_require__(367); +var SyntheticCompositionEvent = __webpack_require__(368); +var SyntheticInputEvent = __webpack_require__(369); var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space var START_KEYCODE = 229; @@ -27830,6 +29720,7 @@ function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEv * `composition` event types. */ var BeforeInputEventPlugin = { + eventTypes: eventTypes, extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { @@ -27840,7 +29731,7 @@ var BeforeInputEventPlugin = { module.exports = BeforeInputEventPlugin; /***/ }), -/* 358 */ +/* 367 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27856,11 +29747,11 @@ module.exports = BeforeInputEventPlugin; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var PooledClass = __webpack_require__(53); +var PooledClass = __webpack_require__(58); -var getTextContentAccessor = __webpack_require__(219); +var getTextContentAccessor = __webpack_require__(228); /** * This helper class stores information about text content of a target node, @@ -27940,7 +29831,7 @@ PooledClass.addPoolingTo(FallbackCompositionState); module.exports = FallbackCompositionState; /***/ }), -/* 359 */ +/* 368 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27956,7 +29847,7 @@ module.exports = FallbackCompositionState; -var SyntheticEvent = __webpack_require__(38); +var SyntheticEvent = __webpack_require__(37); /** * @interface Event @@ -27981,7 +29872,7 @@ SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface module.exports = SyntheticCompositionEvent; /***/ }), -/* 360 */ +/* 369 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27997,7 +29888,7 @@ module.exports = SyntheticCompositionEvent; -var SyntheticEvent = __webpack_require__(38); +var SyntheticEvent = __webpack_require__(37); /** * @interface Event @@ -28023,7 +29914,7 @@ SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface); module.exports = SyntheticInputEvent; /***/ }), -/* 361 */ +/* 370 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28039,17 +29930,16 @@ module.exports = SyntheticInputEvent; -var EventPluginHub = __webpack_require__(69); -var EventPropagators = __webpack_require__(68); -var ExecutionEnvironment = __webpack_require__(21); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactUpdates = __webpack_require__(31); -var SyntheticEvent = __webpack_require__(38); +var EventPluginHub = __webpack_require__(74); +var EventPropagators = __webpack_require__(73); +var ExecutionEnvironment = __webpack_require__(23); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactUpdates = __webpack_require__(28); +var SyntheticEvent = __webpack_require__(37); -var inputValueTracking = __webpack_require__(222); -var getEventTarget = __webpack_require__(142); -var isEventSupported = __webpack_require__(143); -var isTextInputElement = __webpack_require__(223); +var getEventTarget = __webpack_require__(148); +var isEventSupported = __webpack_require__(149); +var isTextInputElement = __webpack_require__(231); var eventTypes = { change: { @@ -28061,17 +29951,13 @@ var eventTypes = { } }; -function createAndAccumulateChangeEvent(inst, nativeEvent, target) { - var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target); - event.type = 'change'; - EventPropagators.accumulateTwoPhaseDispatches(event); - return event; -} /** * For IE shims */ var activeElement = null; var activeElementInst = null; +var activeElementValue = null; +var activeElementValueProp = null; /** * SECTION: handle `change` event @@ -28088,7 +29974,8 @@ if (ExecutionEnvironment.canUseDOM) { } function manualDispatchChangeEvent(nativeEvent) { - var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); + var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); + EventPropagators.accumulateTwoPhaseDispatches(event); // If change and propertychange bubbled, we'd just bind to it like all the // other events and have it go through ReactBrowserEventEmitter. Since it @@ -28124,21 +30011,11 @@ function stopWatchingForChangeEventIE8() { activeElementInst = null; } -function getInstIfValueChanged(targetInst, nativeEvent) { - var updated = inputValueTracking.updateValueIfChanged(targetInst); - var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough; - - if (updated || simulated) { - return targetInst; - } -} - function getTargetInstForChangeEvent(topLevelType, targetInst) { if (topLevelType === 'topChange') { return targetInst; } } - function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { if (topLevelType === 'topFocus') { // stopWatching() should be a noop here but we call it just in case we @@ -28157,54 +30034,105 @@ var isInputEventSupported = false; if (ExecutionEnvironment.canUseDOM) { // IE9 claims to support the input event but fails to trigger it when // deleting text, so we ignore its input events. - - isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 9); + // IE10+ fire input events to often, such when a placeholder + // changes or when an input with a placeholder is focused. + isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11); } /** - * (For IE <=9) Starts tracking propertychange events on the passed-in element + * (For IE <=11) Replacement getter/setter for the `value` property that gets + * set on the active element. + */ +var newValueProp = { + get: function () { + return activeElementValueProp.get.call(this); + }, + set: function (val) { + // Cast to a string so we can do equality checks. + activeElementValue = '' + val; + activeElementValueProp.set.call(this, val); + } +}; + +/** + * (For IE <=11) Starts tracking propertychange events on the passed-in element * and override the value property so that we can distinguish user events from * value changes in JS. */ function startWatchingForValueChange(target, targetInst) { activeElement = target; activeElementInst = targetInst; - activeElement.attachEvent('onpropertychange', handlePropertyChange); + activeElementValue = target.value; + activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value'); + + // Not guarded in a canDefineProperty check: IE8 supports defineProperty only + // on DOM elements + Object.defineProperty(activeElement, 'value', newValueProp); + if (activeElement.attachEvent) { + activeElement.attachEvent('onpropertychange', handlePropertyChange); + } else { + activeElement.addEventListener('propertychange', handlePropertyChange, false); + } } /** - * (For IE <=9) Removes the event listeners from the currently-tracked element, + * (For IE <=11) Removes the event listeners from the currently-tracked element, * if any exists. */ function stopWatchingForValueChange() { if (!activeElement) { return; } - activeElement.detachEvent('onpropertychange', handlePropertyChange); + + // delete restores the original property definition + delete activeElement.value; + + if (activeElement.detachEvent) { + activeElement.detachEvent('onpropertychange', handlePropertyChange); + } else { + activeElement.removeEventListener('propertychange', handlePropertyChange, false); + } activeElement = null; activeElementInst = null; + activeElementValue = null; + activeElementValueProp = null; } /** - * (For IE <=9) Handles a propertychange event, sending a `change` event if + * (For IE <=11) Handles a propertychange event, sending a `change` event if * the value of the active element has changed. */ function handlePropertyChange(nativeEvent) { if (nativeEvent.propertyName !== 'value') { return; } - if (getInstIfValueChanged(activeElementInst, nativeEvent)) { - manualDispatchChangeEvent(nativeEvent); + var value = nativeEvent.srcElement.value; + if (value === activeElementValue) { + return; + } + activeElementValue = value; + + manualDispatchChangeEvent(nativeEvent); +} + +/** + * If a `change` event should be fired, returns the target's ID. + */ +function getTargetInstForInputEvent(topLevelType, targetInst) { + if (topLevelType === 'topInput') { + // In modern browsers (i.e., not IE8 or IE9), the input event is exactly + // what we want so fall through here and trigger an abstract event + return targetInst; } } -function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { +function handleEventsForInputEventIE(topLevelType, target, targetInst) { if (topLevelType === 'topFocus') { // In IE8, we can capture almost all .value changes by adding a // propertychange handler and looking for events with propertyName // equal to 'value' - // In IE9, propertychange fires for most input events but is buggy and + // In IE9-11, propertychange fires for most input events but is buggy and // doesn't fire when text is deleted, but conveniently, selectionchange // appears to fire in all of the remaining cases so we catch those and // forward the event if the value has changed @@ -28222,7 +30150,7 @@ function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { } // For IE8 and IE9. -function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) { +function getTargetInstForInputEventIE(topLevelType, targetInst) { if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { // On the selectionchange event, the target is just document which isn't // helpful for us so just check activeElement instead. @@ -28234,7 +30162,10 @@ function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEven // keystroke if user does a key repeat (it'll be a little delayed: right // before the second keystroke). Other input methods (e.g., paste) seem to // fire selectionchange normally. - return getInstIfValueChanged(activeElementInst, nativeEvent); + if (activeElement && activeElement.value !== activeElementValue) { + activeElementValue = activeElement.value; + return activeElementInst; + } } } @@ -28245,39 +30176,12 @@ function shouldUseClickEvent(elem) { // Use the `click` event to detect changes to checkbox and radio inputs. // This approach works across all browsers, whereas `change` does not fire // until `blur` in IE8. - var nodeName = elem.nodeName; - return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); + return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); } -function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) { +function getTargetInstForClickEvent(topLevelType, targetInst) { if (topLevelType === 'topClick') { - return getInstIfValueChanged(targetInst, nativeEvent); - } -} - -function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) { - if (topLevelType === 'topInput' || topLevelType === 'topChange') { - return getInstIfValueChanged(targetInst, nativeEvent); - } -} - -function handleControlledInputBlur(inst, node) { - // TODO: In IE, inst is occasionally null. Why? - if (inst == null) { - return; - } - - // Fiber and ReactDOM keep wrapper state in separate places - var state = inst._wrapperState || node._wrapperState; - - if (!state || !state.controlled || node.type !== 'number') { - return; - } - - // If controlled, assign the value attribute to the current value on blur - var value = '' + node.value; - if (node.getAttribute('value') !== value) { - node.setAttribute('value', value); + return targetInst; } } @@ -28292,10 +30196,8 @@ function handleControlledInputBlur(inst, node) { * - select */ var ChangeEventPlugin = { - eventTypes: eventTypes, - _allowSimulatedPassThrough: true, - _isInputEventSupported: isInputEventSupported, + eventTypes: eventTypes, extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; @@ -28309,19 +30211,21 @@ var ChangeEventPlugin = { } } else if (isTextInputElement(targetNode)) { if (isInputEventSupported) { - getTargetInstFunc = getTargetInstForInputOrChangeEvent; + getTargetInstFunc = getTargetInstForInputEvent; } else { - getTargetInstFunc = getTargetInstForInputEventPolyfill; - handleEventFunc = handleEventsForInputEventPolyfill; + getTargetInstFunc = getTargetInstForInputEventIE; + handleEventFunc = handleEventsForInputEventIE; } } else if (shouldUseClickEvent(targetNode)) { getTargetInstFunc = getTargetInstForClickEvent; } if (getTargetInstFunc) { - var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent); + var inst = getTargetInstFunc(topLevelType, targetInst); if (inst) { - var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget); + var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget); + event.type = 'change'; + EventPropagators.accumulateTwoPhaseDispatches(event); return event; } } @@ -28329,18 +30233,14 @@ var ChangeEventPlugin = { if (handleEventFunc) { handleEventFunc(topLevelType, targetNode, targetInst); } - - // When blurring, set the value attribute for number inputs - if (topLevelType === 'topBlur') { - handleControlledInputBlur(targetInst, targetNode); - } } + }; module.exports = ChangeEventPlugin; /***/ }), -/* 362 */ +/* 371 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28357,7 +30257,7 @@ module.exports = ChangeEventPlugin; -var ReactOwner = __webpack_require__(363); +var ReactOwner = __webpack_require__(372); var ReactRef = {}; @@ -28434,7 +30334,7 @@ ReactRef.detachRefs = function (instance, element) { module.exports = ReactRef; /***/ }), -/* 363 */ +/* 372 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28451,7 +30351,7 @@ module.exports = ReactRef; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); var invariant = __webpack_require__(9); @@ -28527,12 +30427,13 @@ var ReactOwner = { owner.detachRef(ref); } } + }; module.exports = ReactOwner; /***/ }), -/* 364 */ +/* 373 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28563,7 +30464,7 @@ var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'Tap module.exports = DefaultEventPluginOrder; /***/ }), -/* 365 */ +/* 374 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28579,9 +30480,9 @@ module.exports = DefaultEventPluginOrder; -var EventPropagators = __webpack_require__(68); -var ReactDOMComponentTree = __webpack_require__(16); -var SyntheticMouseEvent = __webpack_require__(105); +var EventPropagators = __webpack_require__(73); +var ReactDOMComponentTree = __webpack_require__(14); +var SyntheticMouseEvent = __webpack_require__(108); var eventTypes = { mouseEnter: { @@ -28595,6 +30496,7 @@ var eventTypes = { }; var EnterLeaveEventPlugin = { + eventTypes: eventTypes, /** @@ -28661,12 +30563,13 @@ var EnterLeaveEventPlugin = { return [leave, enter]; } + }; module.exports = EnterLeaveEventPlugin; /***/ }), -/* 366 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28682,7 +30585,7 @@ module.exports = EnterLeaveEventPlugin; -var DOMProperty = __webpack_require__(67); +var DOMProperty = __webpack_require__(72); var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; @@ -28877,37 +30780,13 @@ var HTMLDOMPropertyConfig = { htmlFor: 'for', httpEquiv: 'http-equiv' }, - DOMPropertyNames: {}, - DOMMutationMethods: { - value: function (node, value) { - if (value == null) { - return node.removeAttribute('value'); - } - - // Number inputs get special treatment due to some edge cases in - // Chrome. Let everything else assign the value attribute as normal. - // https://github.com/facebook/react/issues/7253#issuecomment-236074326 - if (node.type !== 'number' || node.hasAttribute('value') === false) { - node.setAttribute('value', '' + value); - } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) { - // Don't assign an attribute if validation reports bad - // input. Chrome will clear the value. Additionally, don't - // operate on inputs that have focus, otherwise Chrome might - // strip off trailing decimal places and cause the user's - // cursor position to jump to the beginning of the input. - // - // In ReactDOMInput, we have an onBlur event that will trigger - // this function again when focus is lost. - node.setAttribute('value', '' + value); - } - } - } + DOMPropertyNames: {} }; module.exports = HTMLDOMPropertyConfig; /***/ }), -/* 367 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28923,8 +30802,8 @@ module.exports = HTMLDOMPropertyConfig; -var DOMChildrenOperations = __webpack_require__(146); -var ReactDOMIDOperations = __webpack_require__(372); +var DOMChildrenOperations = __webpack_require__(152); +var ReactDOMIDOperations = __webpack_require__(381); /** * Abstracts away all functionality of the reconciler that requires knowledge of @@ -28932,15 +30811,17 @@ var ReactDOMIDOperations = __webpack_require__(372); * need for this injection. */ var ReactComponentBrowserEnvironment = { + processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup + }; module.exports = ReactComponentBrowserEnvironment; /***/ }), -/* 368 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28956,16 +30837,17 @@ module.exports = ReactComponentBrowserEnvironment; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); -var DOMLazyTree = __webpack_require__(72); -var ExecutionEnvironment = __webpack_require__(21); +var DOMLazyTree = __webpack_require__(77); +var ExecutionEnvironment = __webpack_require__(23); -var createNodesFromMarkup = __webpack_require__(369); -var emptyFunction = __webpack_require__(24); +var createNodesFromMarkup = __webpack_require__(378); +var emptyFunction = __webpack_require__(22); var invariant = __webpack_require__(9); var Danger = { + /** * Replaces a node with a string of markup at its current position within its * parent. The markup must render into a single root node. @@ -28986,12 +30868,13 @@ var Danger = { DOMLazyTree.replaceChildWithTree(oldChild, markup); } } + }; module.exports = Danger; /***/ }), -/* 369 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29010,10 +30893,10 @@ module.exports = Danger; /*eslint-disable fb-www/unsafe-html*/ -var ExecutionEnvironment = __webpack_require__(21); +var ExecutionEnvironment = __webpack_require__(23); -var createArrayFromMixed = __webpack_require__(370); -var getMarkupWrap = __webpack_require__(371); +var createArrayFromMixed = __webpack_require__(379); +var getMarkupWrap = __webpack_require__(380); var invariant = __webpack_require__(9); /** @@ -29080,7 +30963,7 @@ function createNodesFromMarkup(markup, handleScript) { module.exports = createNodesFromMarkup; /***/ }), -/* 370 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29212,7 +31095,7 @@ function createArrayFromMixed(obj) { module.exports = createArrayFromMixed; /***/ }), -/* 371 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29230,7 +31113,7 @@ module.exports = createArrayFromMixed; /*eslint-disable fb-www/unsafe-html */ -var ExecutionEnvironment = __webpack_require__(21); +var ExecutionEnvironment = __webpack_require__(23); var invariant = __webpack_require__(9); @@ -29312,7 +31195,7 @@ function getMarkupWrap(nodeName) { module.exports = getMarkupWrap; /***/ }), -/* 372 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29328,13 +31211,14 @@ module.exports = getMarkupWrap; -var DOMChildrenOperations = __webpack_require__(146); -var ReactDOMComponentTree = __webpack_require__(16); +var DOMChildrenOperations = __webpack_require__(152); +var ReactDOMComponentTree = __webpack_require__(14); /** * Operations used to process updates to DOM nodes. */ var ReactDOMIDOperations = { + /** * Updates a component's children by processing a series of updates. * @@ -29350,7 +31234,7 @@ var ReactDOMIDOperations = { module.exports = ReactDOMIDOperations; /***/ }), -/* 373 */ +/* 382 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29368,36 +31252,35 @@ module.exports = ReactDOMIDOperations; -var _prodInvariant = __webpack_require__(13), - _assign = __webpack_require__(15); - -var AutoFocusUtils = __webpack_require__(374); -var CSSPropertyOperations = __webpack_require__(375); -var DOMLazyTree = __webpack_require__(72); -var DOMNamespaces = __webpack_require__(147); -var DOMProperty = __webpack_require__(67); -var DOMPropertyOperations = __webpack_require__(227); -var EventPluginHub = __webpack_require__(69); -var EventPluginRegistry = __webpack_require__(140); -var ReactBrowserEventEmitter = __webpack_require__(108); -var ReactDOMComponentFlags = __webpack_require__(216); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactDOMInput = __webpack_require__(385); -var ReactDOMOption = __webpack_require__(387); -var ReactDOMSelect = __webpack_require__(228); -var ReactDOMTextarea = __webpack_require__(388); -var ReactInstrumentation = __webpack_require__(29); -var ReactMultiChild = __webpack_require__(389); -var ReactServerRenderingTransaction = __webpack_require__(396); - -var emptyFunction = __webpack_require__(24); -var escapeTextContentForBrowser = __webpack_require__(107); +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); + +var AutoFocusUtils = __webpack_require__(383); +var CSSPropertyOperations = __webpack_require__(384); +var DOMLazyTree = __webpack_require__(77); +var DOMNamespaces = __webpack_require__(153); +var DOMProperty = __webpack_require__(72); +var DOMPropertyOperations = __webpack_require__(235); +var EventPluginHub = __webpack_require__(74); +var EventPluginRegistry = __webpack_require__(146); +var ReactBrowserEventEmitter = __webpack_require__(111); +var ReactDOMComponentFlags = __webpack_require__(225); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactDOMInput = __webpack_require__(394); +var ReactDOMOption = __webpack_require__(396); +var ReactDOMSelect = __webpack_require__(236); +var ReactDOMTextarea = __webpack_require__(397); +var ReactInstrumentation = __webpack_require__(27); +var ReactMultiChild = __webpack_require__(398); +var ReactServerRenderingTransaction = __webpack_require__(405); + +var emptyFunction = __webpack_require__(22); +var escapeTextContentForBrowser = __webpack_require__(110); var invariant = __webpack_require__(9); -var isEventSupported = __webpack_require__(143); -var shallowEqual = __webpack_require__(87); -var inputValueTracking = __webpack_require__(222); -var validateDOMNesting = __webpack_require__(154); -var warning = __webpack_require__(12); +var isEventSupported = __webpack_require__(149); +var shallowEqual = __webpack_require__(90); +var validateDOMNesting = __webpack_require__(161); +var warning = __webpack_require__(11); var Flags = ReactDOMComponentFlags; var deleteListener = EventPluginHub.deleteListener; @@ -29406,7 +31289,7 @@ var listenTo = ReactBrowserEventEmitter.listenTo; var registrationNameModules = EventPluginRegistry.registrationNameModules; // For quickly matching children type, to test if can be treated as content. -var CONTENT_TYPES = { string: true, number: true }; +var CONTENT_TYPES = { 'string': true, 'number': true }; var STYLE = 'style'; var HTML = '__html'; @@ -29515,7 +31398,7 @@ function enqueuePutListener(inst, registrationName, listener, transaction) { if (false) { // IE8 has no API for event capturing and the `onScroll` event doesn't // bubble. - process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : void 0; + process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0; } var containerInfo = inst._hostContainerInfo; var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE; @@ -29605,10 +31488,6 @@ var mediaEvents = { topWaiting: 'waiting' }; -function trackInputValue() { - inputValueTracking.track(this); -} - function trapBubbledEventsLocal() { var inst = this; // If a component renders to null or if another component fatals and causes @@ -29624,6 +31503,7 @@ function trapBubbledEventsLocal() { break; case 'video': case 'audio': + inst._wrapperState.listeners = []; // Create listener for each media event for (var event in mediaEvents) { @@ -29657,35 +31537,34 @@ function postUpdateSelectWrapper() { // those special-case tags. var omittedCloseTags = { - area: true, - base: true, - br: true, - col: true, - embed: true, - hr: true, - img: true, - input: true, - keygen: true, - link: true, - meta: true, - param: true, - source: true, - track: true, - wbr: true - // NOTE: menuitem's close tag should be omitted, but that causes problems. + 'area': true, + 'base': true, + 'br': true, + 'col': true, + 'embed': true, + 'hr': true, + 'img': true, + 'input': true, + 'keygen': true, + 'link': true, + 'meta': true, + 'param': true, + 'source': true, + 'track': true, + 'wbr': true }; var newlineEatingTags = { - listing: true, - pre: true, - textarea: true + 'listing': true, + 'pre': true, + 'textarea': true }; // For HTML, certain tags cannot have children. This has the same purpose as // `omittedCloseTags` except that `menuitem` should still have its closing tag. var voidElementTags = _assign({ - menuitem: true + 'menuitem': true }, omittedCloseTags); // We accept any tag to be rendered but since this gets injected into arbitrary @@ -29749,6 +31628,7 @@ function ReactDOMComponent(element) { ReactDOMComponent.displayName = 'ReactDOMComponent'; ReactDOMComponent.Mixin = { + /** * Generates root tag markup then recurses. This method has side effects and * is not idempotent. @@ -29785,7 +31665,6 @@ ReactDOMComponent.Mixin = { case 'input': ReactDOMInput.mountWrapper(this, props, hostParent); props = ReactDOMInput.getHostProps(this, props); - transaction.getReactMountReady().enqueue(trackInputValue, this); transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); break; case 'option': @@ -29800,7 +31679,6 @@ ReactDOMComponent.Mixin = { case 'textarea': ReactDOMTextarea.mountWrapper(this, props, hostParent); props = ReactDOMTextarea.getHostProps(this, props); - transaction.getReactMountReady().enqueue(trackInputValue, this); transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); break; } @@ -30326,10 +32204,6 @@ ReactDOMComponent.Mixin = { } } break; - case 'input': - case 'textarea': - inputValueTracking.stopTracking(this); - break; case 'html': case 'head': case 'body': @@ -30358,6 +32232,7 @@ ReactDOMComponent.Mixin = { getPublicInstance: function () { return getNode(this); } + }; _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin); @@ -30365,7 +32240,7 @@ _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mi module.exports = ReactDOMComponent; /***/ }), -/* 374 */ +/* 383 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30381,9 +32256,9 @@ module.exports = ReactDOMComponent; -var ReactDOMComponentTree = __webpack_require__(16); +var ReactDOMComponentTree = __webpack_require__(14); -var focusNode = __webpack_require__(225); +var focusNode = __webpack_require__(233); var AutoFocusUtils = { focusDOMComponent: function () { @@ -30394,7 +32269,7 @@ var AutoFocusUtils = { module.exports = AutoFocusUtils; /***/ }), -/* 375 */ +/* 384 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30410,15 +32285,15 @@ module.exports = AutoFocusUtils; -var CSSProperty = __webpack_require__(226); -var ExecutionEnvironment = __webpack_require__(21); -var ReactInstrumentation = __webpack_require__(29); +var CSSProperty = __webpack_require__(234); +var ExecutionEnvironment = __webpack_require__(23); +var ReactInstrumentation = __webpack_require__(27); -var camelizeStyleName = __webpack_require__(376); -var dangerousStyleValue = __webpack_require__(378); -var hyphenateStyleName = __webpack_require__(379); -var memoizeStringOnly = __webpack_require__(381); -var warning = __webpack_require__(12); +var camelizeStyleName = __webpack_require__(385); +var dangerousStyleValue = __webpack_require__(387); +var hyphenateStyleName = __webpack_require__(388); +var memoizeStringOnly = __webpack_require__(390); +var warning = __webpack_require__(11); var processStyleName = memoizeStringOnly(function (styleName) { return hyphenateStyleName(styleName); @@ -30475,7 +32350,7 @@ if (false) { } warnedStyleValues[value] = true; - process.env.NODE_ENV !== 'production' ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0; + process.env.NODE_ENV !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0; }; var warnStyleValueIsNaN = function (name, value, owner) { @@ -30525,6 +32400,7 @@ if (false) { * Operations for dealing with CSS properties. */ var CSSPropertyOperations = { + /** * Serializes a mapping of style properties for use as inline styles: * @@ -30544,16 +32420,13 @@ var CSSPropertyOperations = { if (!styles.hasOwnProperty(styleName)) { continue; } - var isCustomProperty = styleName.indexOf('--') === 0; var styleValue = styles[styleName]; if (false) { - if (!isCustomProperty) { - warnValidStyle(styleName, styleValue, component); - } + warnValidStyle(styleName, styleValue, component); } if (styleValue != null) { serialized += processStyleName(styleName) + ':'; - serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';'; + serialized += dangerousStyleValue(styleName, styleValue, component) + ';'; } } return serialized || null; @@ -30581,19 +32454,14 @@ var CSSPropertyOperations = { if (!styles.hasOwnProperty(styleName)) { continue; } - var isCustomProperty = styleName.indexOf('--') === 0; if (false) { - if (!isCustomProperty) { - warnValidStyle(styleName, styles[styleName], component); - } + warnValidStyle(styleName, styles[styleName], component); } - var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty); + var styleValue = dangerousStyleValue(styleName, styles[styleName], component); if (styleName === 'float' || styleName === 'cssFloat') { styleName = styleFloatAccessor; } - if (isCustomProperty) { - style.setProperty(styleName, styleValue); - } else if (styleValue) { + if (styleValue) { style[styleName] = styleValue; } else { var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; @@ -30609,12 +32477,13 @@ var CSSPropertyOperations = { } } } + }; module.exports = CSSPropertyOperations; /***/ }), -/* 376 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30631,7 +32500,7 @@ module.exports = CSSPropertyOperations; -var camelize = __webpack_require__(377); +var camelize = __webpack_require__(386); var msPattern = /^-ms-/; @@ -30659,7 +32528,7 @@ function camelizeStyleName(string) { module.exports = camelizeStyleName; /***/ }), -/* 377 */ +/* 386 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30696,7 +32565,7 @@ function camelize(string) { module.exports = camelize; /***/ }), -/* 378 */ +/* 387 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30712,8 +32581,8 @@ module.exports = camelize; -var CSSProperty = __webpack_require__(226); -var warning = __webpack_require__(12); +var CSSProperty = __webpack_require__(234); +var warning = __webpack_require__(11); var isUnitlessNumber = CSSProperty.isUnitlessNumber; var styleWarnings = {}; @@ -30728,7 +32597,7 @@ var styleWarnings = {}; * @param {ReactDOMComponent} component * @return {string} Normalized style value with dimensions applied. */ -function dangerousStyleValue(name, value, component, isCustomProperty) { +function dangerousStyleValue(name, value, component) { // Note that we've removed escapeTextForBrowser() calls here since the // whole string will be escaped when the attribute is injected into // the markup. If you provide unsafe user data here they can inject @@ -30745,7 +32614,7 @@ function dangerousStyleValue(name, value, component, isCustomProperty) { } var isNonNumeric = isNaN(value); - if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { + if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { return '' + value; // cast to string } @@ -30780,7 +32649,7 @@ function dangerousStyleValue(name, value, component, isCustomProperty) { module.exports = dangerousStyleValue; /***/ }), -/* 379 */ +/* 388 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30797,7 +32666,7 @@ module.exports = dangerousStyleValue; -var hyphenate = __webpack_require__(380); +var hyphenate = __webpack_require__(389); var msPattern = /^ms-/; @@ -30824,7 +32693,7 @@ function hyphenateStyleName(string) { module.exports = hyphenateStyleName; /***/ }), -/* 380 */ +/* 389 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30862,7 +32731,7 @@ function hyphenate(string) { module.exports = hyphenate; /***/ }), -/* 381 */ +/* 390 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30897,7 +32766,7 @@ function memoizeStringOnly(callback) { module.exports = memoizeStringOnly; /***/ }), -/* 382 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30913,7 +32782,7 @@ module.exports = memoizeStringOnly; -var escapeTextContentForBrowser = __webpack_require__(107); +var escapeTextContentForBrowser = __webpack_require__(110); /** * Escapes attribute value to prevent scripting attacks. @@ -30928,7 +32797,7 @@ function quoteAttributeValueForBrowser(value) { module.exports = quoteAttributeValueForBrowser; /***/ }), -/* 383 */ +/* 392 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30944,7 +32813,7 @@ module.exports = quoteAttributeValueForBrowser; -var EventPluginHub = __webpack_require__(69); +var EventPluginHub = __webpack_require__(74); function runEventQueueInBatch(events) { EventPluginHub.enqueueEvents(events); @@ -30952,6 +32821,7 @@ function runEventQueueInBatch(events) { } var ReactEventEmitterMixin = { + /** * Streams a fired top-level event to `EventPluginHub` where plugins have the * opportunity to create `ReactEvent`s to be dispatched. @@ -30965,7 +32835,7 @@ var ReactEventEmitterMixin = { module.exports = ReactEventEmitterMixin; /***/ }), -/* 384 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30981,7 +32851,7 @@ module.exports = ReactEventEmitterMixin; -var ExecutionEnvironment = __webpack_require__(21); +var ExecutionEnvironment = __webpack_require__(23); /** * Generate a mapping of standard vendor prefixes using the defined style property and event name. @@ -31071,7 +32941,7 @@ function getVendorPrefixedEventName(eventName) { module.exports = getVendorPrefixedEventName; /***/ }), -/* 385 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31087,16 +32957,16 @@ module.exports = getVendorPrefixedEventName; -var _prodInvariant = __webpack_require__(13), - _assign = __webpack_require__(15); +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); -var DOMPropertyOperations = __webpack_require__(227); -var LinkedValueUtils = __webpack_require__(149); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactUpdates = __webpack_require__(31); +var DOMPropertyOperations = __webpack_require__(235); +var LinkedValueUtils = __webpack_require__(155); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactUpdates = __webpack_require__(28); var invariant = __webpack_require__(9); -var warning = __webpack_require__(12); +var warning = __webpack_require__(11); var didWarnValueLink = false; var didWarnCheckedLink = false; @@ -31189,9 +33059,12 @@ var ReactDOMInput = { initialChecked: props.checked != null ? props.checked : props.defaultChecked, initialValue: props.value != null ? props.value : defaultValue, listeners: null, - onChange: _handleChange.bind(inst), - controlled: isControlled(props) + onChange: _handleChange.bind(inst) }; + + if (false) { + inst._wrapperState.controlled = isControlled(props); + } }, updateWrapper: function (inst) { @@ -31220,26 +33093,14 @@ var ReactDOMInput = { var node = ReactDOMComponentTree.getNodeFromInstance(inst); var value = LinkedValueUtils.getValue(props); if (value != null) { - if (value === 0 && node.value === '') { - node.value = '0'; - // Note: IE9 reports a number inputs as 'text', so check props instead. - } else if (props.type === 'number') { - // Simulate `input.valueAsNumber`. IE9 does not support it - var valueAsNumber = parseFloat(node.value, 10) || 0; - if ( - // eslint-disable-next-line - value != valueAsNumber || - // eslint-disable-next-line - value == valueAsNumber && node.value != value) { - // Cast `value` to a string to ensure the value is set correctly. While - // browsers typically do this as necessary, jsdom doesn't. - node.value = '' + value; - } - } else if (node.value !== '' + value) { - // Cast `value` to a string to ensure the value is set correctly. While - // browsers typically do this as necessary, jsdom doesn't. - node.value = '' + value; + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = '' + value; + + // To avoid side effects (such as losing text selection), only set value if changed + if (newValue !== node.value) { + node.value = newValue; } } else { if (props.value == null && props.defaultValue != null) { @@ -31363,7 +33224,7 @@ function _handleChange(event) { module.exports = ReactDOMInput; /***/ }), -/* 386 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31385,7 +33246,7 @@ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), -/* 387 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31401,13 +33262,13 @@ module.exports = ReactPropTypesSecret; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var React = __webpack_require__(65); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactDOMSelect = __webpack_require__(228); +var React = __webpack_require__(56); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactDOMSelect = __webpack_require__(236); -var warning = __webpack_require__(12); +var warning = __webpack_require__(11); var didWarnInvalidOptionChildren = false; function flattenChildren(children) { @@ -31507,12 +33368,13 @@ var ReactDOMOption = { return hostProps; } + }; module.exports = ReactDOMOption; /***/ }), -/* 388 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31528,15 +33390,15 @@ module.exports = ReactDOMOption; -var _prodInvariant = __webpack_require__(13), - _assign = __webpack_require__(15); +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); -var LinkedValueUtils = __webpack_require__(149); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactUpdates = __webpack_require__(31); +var LinkedValueUtils = __webpack_require__(155); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactUpdates = __webpack_require__(28); var invariant = __webpack_require__(9); -var warning = __webpack_require__(12); +var warning = __webpack_require__(11); var didWarnValueLink = false; var didWarnValDefaultVal = false; @@ -31677,7 +33539,7 @@ function _handleChange(event) { module.exports = ReactDOMTextarea; /***/ }), -/* 389 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31693,18 +33555,18 @@ module.exports = ReactDOMTextarea; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); -var ReactComponentEnvironment = __webpack_require__(150); -var ReactInstanceMap = __webpack_require__(86); -var ReactInstrumentation = __webpack_require__(29); +var ReactComponentEnvironment = __webpack_require__(156); +var ReactInstanceMap = __webpack_require__(89); +var ReactInstrumentation = __webpack_require__(27); -var ReactCurrentOwner = __webpack_require__(37); -var ReactReconciler = __webpack_require__(70); -var ReactChildReconciler = __webpack_require__(390); +var ReactCurrentOwner = __webpack_require__(36); +var ReactReconciler = __webpack_require__(75); +var ReactChildReconciler = __webpack_require__(399); -var emptyFunction = __webpack_require__(24); -var flattenChildren = __webpack_require__(395); +var emptyFunction = __webpack_require__(22); +var flattenChildren = __webpack_require__(404); var invariant = __webpack_require__(9); /** @@ -31851,6 +33713,7 @@ if (false) { * @internal */ var ReactMultiChild = { + /** * Provides common functionality for components that must reconcile multiple * children. This is used by `ReactDOMComponent` to mount, update, and @@ -31859,6 +33722,7 @@ var ReactMultiChild = { * @lends {ReactMultiChild.prototype} */ Mixin: { + _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) { if (false) { var selfDebugID = getDebugID(this); @@ -32122,13 +33986,15 @@ var ReactMultiChild = { child._mountIndex = null; return update; } + } + }; module.exports = ReactMultiChild; /***/ }), -/* 390 */ +/* 399 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -32144,13 +34010,13 @@ module.exports = ReactMultiChild; -var ReactReconciler = __webpack_require__(70); +var ReactReconciler = __webpack_require__(75); -var instantiateReactComponent = __webpack_require__(230); -var KeyEscapeUtils = __webpack_require__(152); -var shouldUpdateReactComponent = __webpack_require__(151); -var traverseAllChildren = __webpack_require__(234); -var warning = __webpack_require__(12); +var instantiateReactComponent = __webpack_require__(237); +var KeyEscapeUtils = __webpack_require__(158); +var shouldUpdateReactComponent = __webpack_require__(157); +var traverseAllChildren = __webpack_require__(241); +var warning = __webpack_require__(11); var ReactComponentTreeHook; @@ -32160,7 +34026,7 @@ if (typeof process !== 'undefined' && Object({"NODE_ENV":'production'}) && 'prod // https://github.com/facebook/react/issues/7240 // Remove the inline requires when we don't need them anymore: // https://github.com/facebook/react/pull/7178 - ReactComponentTreeHook = __webpack_require__(235); + ReactComponentTreeHook = __webpack_require__(159); } function instantiateChild(childInstances, child, name, selfDebugID) { @@ -32193,8 +34059,8 @@ var ReactChildReconciler = { * @return {?object} A set of child instances. * @internal */ - instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots - { + instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots + ) { if (nestedChildNodes == null) { return null; } @@ -32220,8 +34086,8 @@ var ReactChildReconciler = { * @return {?object} A new set of child instances. * @internal */ - updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots - { + updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots + ) { // We currently don't have a way to track moves here but if we use iterators // instead of for..in we can zip the iterators and check if an item has // moved. @@ -32281,13 +34147,14 @@ var ReactChildReconciler = { } } } + }; module.exports = ReactChildReconciler; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(229))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(112))) /***/ }), -/* 391 */ +/* 400 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -32303,27 +34170,27 @@ module.exports = ReactChildReconciler; -var _prodInvariant = __webpack_require__(13), - _assign = __webpack_require__(15); +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); -var React = __webpack_require__(65); -var ReactComponentEnvironment = __webpack_require__(150); -var ReactCurrentOwner = __webpack_require__(37); -var ReactErrorUtils = __webpack_require__(141); -var ReactInstanceMap = __webpack_require__(86); -var ReactInstrumentation = __webpack_require__(29); -var ReactNodeTypes = __webpack_require__(231); -var ReactReconciler = __webpack_require__(70); +var React = __webpack_require__(56); +var ReactComponentEnvironment = __webpack_require__(156); +var ReactCurrentOwner = __webpack_require__(36); +var ReactErrorUtils = __webpack_require__(147); +var ReactInstanceMap = __webpack_require__(89); +var ReactInstrumentation = __webpack_require__(27); +var ReactNodeTypes = __webpack_require__(238); +var ReactReconciler = __webpack_require__(75); if (false) { var checkReactTypeSpec = require('./checkReactTypeSpec'); } -var emptyObject = __webpack_require__(102); +var emptyObject = __webpack_require__(105); var invariant = __webpack_require__(9); -var shallowEqual = __webpack_require__(87); -var shouldUpdateReactComponent = __webpack_require__(151); -var warning = __webpack_require__(12); +var shallowEqual = __webpack_require__(90); +var shouldUpdateReactComponent = __webpack_require__(157); +var warning = __webpack_require__(11); var CompositeTypes = { ImpureClass: 0, @@ -32410,6 +34277,7 @@ var nextMountID = 1; * @lends {ReactCompositeComponent.prototype} */ var ReactCompositeComponent = { + /** * Base constructor for all composite component. * @@ -32505,7 +34373,7 @@ var ReactCompositeComponent = { var propsMutated = inst.props !== publicProps; var componentName = Component.displayName || Component.name || 'Component'; - process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", componentName, componentName) : void 0; + process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName) : void 0; } // These should be set up in the constructor, but as a convenience for @@ -32806,7 +34674,7 @@ var ReactCompositeComponent = { if (childContext) { !(typeof Component.childContextTypes === 'object') ? false ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0; if (false) { - this._checkContextTypes(Component.childContextTypes, childContext, 'child context'); + this._checkContextTypes(Component.childContextTypes, childContext, 'childContext'); } for (var name in childContext) { !(name in Component.childContextTypes) ? false ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0; @@ -33187,12 +35055,13 @@ var ReactCompositeComponent = { // Stub _instantiateReactComponent: null + }; module.exports = ReactCompositeComponent; /***/ }), -/* 392 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33218,7 +35087,7 @@ function getNextDebugID() { module.exports = getNextDebugID; /***/ }), -/* 393 */ +/* 402 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33243,7 +35112,7 @@ var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol module.exports = REACT_ELEMENT_TYPE; /***/ }), -/* 394 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33289,7 +35158,7 @@ function getIteratorFn(maybeIterable) { module.exports = getIteratorFn; /***/ }), -/* 395 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33306,9 +35175,9 @@ module.exports = getIteratorFn; -var KeyEscapeUtils = __webpack_require__(152); -var traverseAllChildren = __webpack_require__(234); -var warning = __webpack_require__(12); +var KeyEscapeUtils = __webpack_require__(158); +var traverseAllChildren = __webpack_require__(241); +var warning = __webpack_require__(11); var ReactComponentTreeHook; @@ -33318,7 +35187,7 @@ if (typeof process !== 'undefined' && Object({"NODE_ENV":'production'}) && 'prod // https://github.com/facebook/react/issues/7240 // Remove the inline requires when we don't need them anymore: // https://github.com/facebook/react/pull/7178 - ReactComponentTreeHook = __webpack_require__(235); + ReactComponentTreeHook = __webpack_require__(159); } /** @@ -33368,10 +35237,10 @@ function flattenChildren(children, selfDebugID) { } module.exports = flattenChildren; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(229))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(112))) /***/ }), -/* 396 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33387,12 +35256,12 @@ module.exports = flattenChildren; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var PooledClass = __webpack_require__(53); -var Transaction = __webpack_require__(104); -var ReactInstrumentation = __webpack_require__(29); -var ReactServerUpdateQueue = __webpack_require__(397); +var PooledClass = __webpack_require__(58); +var Transaction = __webpack_require__(107); +var ReactInstrumentation = __webpack_require__(27); +var ReactServerUpdateQueue = __webpack_require__(406); /** * Executed within the scope of the `Transaction` instance. Consider these as @@ -33466,7 +35335,7 @@ PooledClass.addPoolingTo(ReactServerRenderingTransaction); module.exports = ReactServerRenderingTransaction; /***/ }), -/* 397 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33485,9 +35354,9 @@ module.exports = ReactServerRenderingTransaction; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var ReactUpdateQueue = __webpack_require__(153); +var ReactUpdateQueue = __webpack_require__(160); -var warning = __webpack_require__(12); +var warning = __webpack_require__(11); function warnNoop(publicInstance, callerName) { if (false) { @@ -33610,7 +35479,7 @@ var ReactServerUpdateQueue = function () { module.exports = ReactServerUpdateQueue; /***/ }), -/* 398 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33626,10 +35495,10 @@ module.exports = ReactServerUpdateQueue; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var DOMLazyTree = __webpack_require__(72); -var ReactDOMComponentTree = __webpack_require__(16); +var DOMLazyTree = __webpack_require__(77); +var ReactDOMComponentTree = __webpack_require__(14); var ReactDOMEmptyComponent = function (instantiate) { // ReactCompositeComponent uses this: @@ -33675,7 +35544,7 @@ _assign(ReactDOMEmptyComponent.prototype, { module.exports = ReactDOMEmptyComponent; /***/ }), -/* 399 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33691,7 +35560,7 @@ module.exports = ReactDOMEmptyComponent; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); var invariant = __webpack_require__(9); @@ -33816,7 +35685,7 @@ module.exports = { }; /***/ }), -/* 400 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33832,16 +35701,16 @@ module.exports = { -var _prodInvariant = __webpack_require__(13), - _assign = __webpack_require__(15); +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); -var DOMChildrenOperations = __webpack_require__(146); -var DOMLazyTree = __webpack_require__(72); -var ReactDOMComponentTree = __webpack_require__(16); +var DOMChildrenOperations = __webpack_require__(152); +var DOMLazyTree = __webpack_require__(77); +var ReactDOMComponentTree = __webpack_require__(14); -var escapeTextContentForBrowser = __webpack_require__(107); +var escapeTextContentForBrowser = __webpack_require__(110); var invariant = __webpack_require__(9); -var validateDOMNesting = __webpack_require__(154); +var validateDOMNesting = __webpack_require__(161); /** * Text nodes violate a couple assumptions that React makes about components: @@ -33874,6 +35743,7 @@ var ReactDOMTextComponent = function (text) { }; _assign(ReactDOMTextComponent.prototype, { + /** * Creates the markup for this text node. This node is not intended to have * any features besides containing text content. @@ -33978,12 +35848,13 @@ _assign(ReactDOMTextComponent.prototype, { this._commentNodes = null; ReactDOMComponentTree.uncacheNode(this); } + }); module.exports = ReactDOMTextComponent; /***/ }), -/* 401 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33999,12 +35870,12 @@ module.exports = ReactDOMTextComponent; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var ReactUpdates = __webpack_require__(31); -var Transaction = __webpack_require__(104); +var ReactUpdates = __webpack_require__(28); +var Transaction = __webpack_require__(107); -var emptyFunction = __webpack_require__(24); +var emptyFunction = __webpack_require__(22); var RESET_BATCHED_UPDATES = { initialize: emptyFunction, @@ -34056,7 +35927,7 @@ var ReactDefaultBatchingStrategy = { module.exports = ReactDefaultBatchingStrategy; /***/ }), -/* 402 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34072,16 +35943,16 @@ module.exports = ReactDefaultBatchingStrategy; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var EventListener = __webpack_require__(236); -var ExecutionEnvironment = __webpack_require__(21); -var PooledClass = __webpack_require__(53); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactUpdates = __webpack_require__(31); +var EventListener = __webpack_require__(242); +var ExecutionEnvironment = __webpack_require__(23); +var PooledClass = __webpack_require__(58); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactUpdates = __webpack_require__(28); -var getEventTarget = __webpack_require__(142); -var getUnboundedScrollPosition = __webpack_require__(403); +var getEventTarget = __webpack_require__(148); +var getUnboundedScrollPosition = __webpack_require__(412); /** * Find the deepest React component completely containing the root of the @@ -34216,7 +36087,7 @@ var ReactEventListener = { module.exports = ReactEventListener; /***/ }), -/* 403 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34260,7 +36131,7 @@ function getUnboundedScrollPosition(scrollable) { module.exports = getUnboundedScrollPosition; /***/ }), -/* 404 */ +/* 413 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34276,14 +36147,14 @@ module.exports = getUnboundedScrollPosition; -var DOMProperty = __webpack_require__(67); -var EventPluginHub = __webpack_require__(69); -var EventPluginUtils = __webpack_require__(103); -var ReactComponentEnvironment = __webpack_require__(150); -var ReactEmptyComponent = __webpack_require__(232); -var ReactBrowserEventEmitter = __webpack_require__(108); -var ReactHostComponent = __webpack_require__(233); -var ReactUpdates = __webpack_require__(31); +var DOMProperty = __webpack_require__(72); +var EventPluginHub = __webpack_require__(74); +var EventPluginUtils = __webpack_require__(106); +var ReactComponentEnvironment = __webpack_require__(156); +var ReactEmptyComponent = __webpack_require__(239); +var ReactBrowserEventEmitter = __webpack_require__(111); +var ReactHostComponent = __webpack_require__(240); +var ReactUpdates = __webpack_require__(28); var ReactInjection = { Component: ReactComponentEnvironment.injection, @@ -34299,7 +36170,7 @@ var ReactInjection = { module.exports = ReactInjection; /***/ }), -/* 405 */ +/* 414 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34315,15 +36186,15 @@ module.exports = ReactInjection; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(13); -var CallbackQueue = __webpack_require__(220); -var PooledClass = __webpack_require__(53); -var ReactBrowserEventEmitter = __webpack_require__(108); -var ReactInputSelection = __webpack_require__(237); -var ReactInstrumentation = __webpack_require__(29); -var Transaction = __webpack_require__(104); -var ReactUpdateQueue = __webpack_require__(153); +var CallbackQueue = __webpack_require__(229); +var PooledClass = __webpack_require__(58); +var ReactBrowserEventEmitter = __webpack_require__(111); +var ReactInputSelection = __webpack_require__(243); +var ReactInstrumentation = __webpack_require__(27); +var Transaction = __webpack_require__(107); +var ReactUpdateQueue = __webpack_require__(160); /** * Ensures that, when possible, the selection range (currently selected text @@ -34482,7 +36353,7 @@ PooledClass.addPoolingTo(ReactReconcileTransaction); module.exports = ReactReconcileTransaction; /***/ }), -/* 406 */ +/* 415 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34498,10 +36369,10 @@ module.exports = ReactReconcileTransaction; -var ExecutionEnvironment = __webpack_require__(21); +var ExecutionEnvironment = __webpack_require__(23); -var getNodeForCharacterOffset = __webpack_require__(407); -var getTextContentAccessor = __webpack_require__(219); +var getNodeForCharacterOffset = __webpack_require__(416); +var getTextContentAccessor = __webpack_require__(228); /** * While `isCollapsed` is available on the Selection object and `collapsed` @@ -34699,7 +36570,7 @@ var ReactDOMSelection = { module.exports = ReactDOMSelection; /***/ }), -/* 407 */ +/* 416 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34778,7 +36649,7 @@ function getNodeForCharacterOffset(root, offset) { module.exports = getNodeForCharacterOffset; /***/ }), -/* 408 */ +/* 417 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34795,7 +36666,7 @@ module.exports = getNodeForCharacterOffset; * */ -var isTextNode = __webpack_require__(409); +var isTextNode = __webpack_require__(418); /*eslint-disable no-bitwise */ @@ -34823,7 +36694,7 @@ function containsNode(outerNode, innerNode) { module.exports = containsNode; /***/ }), -/* 409 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34840,7 +36711,7 @@ module.exports = containsNode; * @typechecks */ -var isNode = __webpack_require__(410); +var isNode = __webpack_require__(419); /** * @param {*} object The object to check. @@ -34853,7 +36724,7 @@ function isTextNode(object) { module.exports = isTextNode; /***/ }), -/* 410 */ +/* 419 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34883,7 +36754,7 @@ function isNode(object) { module.exports = isNode; /***/ }), -/* 411 */ +/* 420 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35190,7 +37061,7 @@ Object.keys(ATTRS).forEach(function (key) { module.exports = SVGDOMPropertyConfig; /***/ }), -/* 412 */ +/* 421 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35206,15 +37077,15 @@ module.exports = SVGDOMPropertyConfig; -var EventPropagators = __webpack_require__(68); -var ExecutionEnvironment = __webpack_require__(21); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactInputSelection = __webpack_require__(237); -var SyntheticEvent = __webpack_require__(38); +var EventPropagators = __webpack_require__(73); +var ExecutionEnvironment = __webpack_require__(23); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactInputSelection = __webpack_require__(243); +var SyntheticEvent = __webpack_require__(37); -var getActiveElement = __webpack_require__(238); -var isTextInputElement = __webpack_require__(223); -var shallowEqual = __webpack_require__(87); +var getActiveElement = __webpack_require__(244); +var isTextInputElement = __webpack_require__(231); +var shallowEqual = __webpack_require__(90); var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; @@ -35319,6 +37190,7 @@ function constructSelectEvent(nativeEvent, nativeEventTarget) { * - Fires after user input. */ var SelectEventPlugin = { + eventTypes: eventTypes, extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { @@ -35342,6 +37214,7 @@ var SelectEventPlugin = { activeElementInst = null; lastSelection = null; break; + // Don't fire the event while the user is dragging. This matches the // semantics of the native select event. case 'topMouseDown': @@ -35351,6 +37224,7 @@ var SelectEventPlugin = { case 'topMouseUp': mouseDown = false; return constructSelectEvent(nativeEvent, nativeEventTarget); + // Chrome and IE fire non-standard event when selection is changed (and // sometimes when it hasn't). IE's event fires out of order with respect // to key and input events on deletion, so we discard it. @@ -35383,7 +37257,7 @@ var SelectEventPlugin = { module.exports = SelectEventPlugin; /***/ }), -/* 413 */ +/* 422 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35400,25 +37274,25 @@ module.exports = SelectEventPlugin; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); -var EventListener = __webpack_require__(236); -var EventPropagators = __webpack_require__(68); -var ReactDOMComponentTree = __webpack_require__(16); -var SyntheticAnimationEvent = __webpack_require__(414); -var SyntheticClipboardEvent = __webpack_require__(415); -var SyntheticEvent = __webpack_require__(38); -var SyntheticFocusEvent = __webpack_require__(416); -var SyntheticKeyboardEvent = __webpack_require__(417); -var SyntheticMouseEvent = __webpack_require__(105); -var SyntheticDragEvent = __webpack_require__(419); -var SyntheticTouchEvent = __webpack_require__(420); -var SyntheticTransitionEvent = __webpack_require__(421); -var SyntheticUIEvent = __webpack_require__(71); -var SyntheticWheelEvent = __webpack_require__(422); +var EventListener = __webpack_require__(242); +var EventPropagators = __webpack_require__(73); +var ReactDOMComponentTree = __webpack_require__(14); +var SyntheticAnimationEvent = __webpack_require__(423); +var SyntheticClipboardEvent = __webpack_require__(424); +var SyntheticEvent = __webpack_require__(37); +var SyntheticFocusEvent = __webpack_require__(425); +var SyntheticKeyboardEvent = __webpack_require__(426); +var SyntheticMouseEvent = __webpack_require__(108); +var SyntheticDragEvent = __webpack_require__(428); +var SyntheticTouchEvent = __webpack_require__(429); +var SyntheticTransitionEvent = __webpack_require__(430); +var SyntheticUIEvent = __webpack_require__(76); +var SyntheticWheelEvent = __webpack_require__(431); -var emptyFunction = __webpack_require__(24); -var getEventCharCode = __webpack_require__(155); +var emptyFunction = __webpack_require__(22); +var getEventCharCode = __webpack_require__(162); var invariant = __webpack_require__(9); /** @@ -35470,6 +37344,7 @@ function isInteractive(tag) { } var SimpleEventPlugin = { + eventTypes: eventTypes, extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { @@ -35609,12 +37484,13 @@ var SimpleEventPlugin = { delete onClickListeners[key]; } } + }; module.exports = SimpleEventPlugin; /***/ }), -/* 414 */ +/* 423 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35630,7 +37506,7 @@ module.exports = SimpleEventPlugin; -var SyntheticEvent = __webpack_require__(38); +var SyntheticEvent = __webpack_require__(37); /** * @interface Event @@ -35658,7 +37534,7 @@ SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface); module.exports = SyntheticAnimationEvent; /***/ }), -/* 415 */ +/* 424 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35674,7 +37550,7 @@ module.exports = SyntheticAnimationEvent; -var SyntheticEvent = __webpack_require__(38); +var SyntheticEvent = __webpack_require__(37); /** * @interface Event @@ -35701,7 +37577,7 @@ SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); module.exports = SyntheticClipboardEvent; /***/ }), -/* 416 */ +/* 425 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35717,7 +37593,7 @@ module.exports = SyntheticClipboardEvent; -var SyntheticUIEvent = __webpack_require__(71); +var SyntheticUIEvent = __webpack_require__(76); /** * @interface FocusEvent @@ -35742,7 +37618,7 @@ SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); module.exports = SyntheticFocusEvent; /***/ }), -/* 417 */ +/* 426 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35758,11 +37634,11 @@ module.exports = SyntheticFocusEvent; -var SyntheticUIEvent = __webpack_require__(71); +var SyntheticUIEvent = __webpack_require__(76); -var getEventCharCode = __webpack_require__(155); -var getEventKey = __webpack_require__(418); -var getEventModifierState = __webpack_require__(145); +var getEventCharCode = __webpack_require__(162); +var getEventKey = __webpack_require__(427); +var getEventModifierState = __webpack_require__(151); /** * @interface KeyboardEvent @@ -35831,7 +37707,7 @@ SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); module.exports = SyntheticKeyboardEvent; /***/ }), -/* 418 */ +/* 427 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35847,25 +37723,25 @@ module.exports = SyntheticKeyboardEvent; -var getEventCharCode = __webpack_require__(155); +var getEventCharCode = __webpack_require__(162); /** * Normalization of deprecated HTML5 `key` values * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names */ var normalizeKey = { - Esc: 'Escape', - Spacebar: ' ', - Left: 'ArrowLeft', - Up: 'ArrowUp', - Right: 'ArrowRight', - Down: 'ArrowDown', - Del: 'Delete', - Win: 'OS', - Menu: 'ContextMenu', - Apps: 'ContextMenu', - Scroll: 'ScrollLock', - MozPrintableKey: 'Unidentified' + 'Esc': 'Escape', + 'Spacebar': ' ', + 'Left': 'ArrowLeft', + 'Up': 'ArrowUp', + 'Right': 'ArrowRight', + 'Down': 'ArrowDown', + 'Del': 'Delete', + 'Win': 'OS', + 'Menu': 'ContextMenu', + 'Apps': 'ContextMenu', + 'Scroll': 'ScrollLock', + 'MozPrintableKey': 'Unidentified' }; /** @@ -35895,18 +37771,8 @@ var translateToKey = { 40: 'ArrowDown', 45: 'Insert', 46: 'Delete', - 112: 'F1', - 113: 'F2', - 114: 'F3', - 115: 'F4', - 116: 'F5', - 117: 'F6', - 118: 'F7', - 119: 'F8', - 120: 'F9', - 121: 'F10', - 122: 'F11', - 123: 'F12', + 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6', + 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12', 144: 'NumLock', 145: 'ScrollLock', 224: 'Meta' @@ -35948,7 +37814,7 @@ function getEventKey(nativeEvent) { module.exports = getEventKey; /***/ }), -/* 419 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35964,7 +37830,7 @@ module.exports = getEventKey; -var SyntheticMouseEvent = __webpack_require__(105); +var SyntheticMouseEvent = __webpack_require__(108); /** * @interface DragEvent @@ -35989,7 +37855,7 @@ SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); module.exports = SyntheticDragEvent; /***/ }), -/* 420 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36005,9 +37871,9 @@ module.exports = SyntheticDragEvent; -var SyntheticUIEvent = __webpack_require__(71); +var SyntheticUIEvent = __webpack_require__(76); -var getEventModifierState = __webpack_require__(145); +var getEventModifierState = __webpack_require__(151); /** * @interface TouchEvent @@ -36039,7 +37905,7 @@ SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); module.exports = SyntheticTouchEvent; /***/ }), -/* 421 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36055,7 +37921,7 @@ module.exports = SyntheticTouchEvent; -var SyntheticEvent = __webpack_require__(38); +var SyntheticEvent = __webpack_require__(37); /** * @interface Event @@ -36083,7 +37949,7 @@ SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface); module.exports = SyntheticTransitionEvent; /***/ }), -/* 422 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36099,7 +37965,7 @@ module.exports = SyntheticTransitionEvent; -var SyntheticMouseEvent = __webpack_require__(105); +var SyntheticMouseEvent = __webpack_require__(108); /** * @interface WheelEvent @@ -36107,12 +37973,15 @@ var SyntheticMouseEvent = __webpack_require__(105); */ var WheelEventInterface = { deltaX: function (event) { - return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + return 'deltaX' in event ? event.deltaX : + // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). 'wheelDeltaX' in event ? -event.wheelDeltaX : 0; }, deltaY: function (event) { - return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). - 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + return 'deltaY' in event ? event.deltaY : + // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + 'wheelDeltaY' in event ? -event.wheelDeltaY : + // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). 'wheelDelta' in event ? -event.wheelDelta : 0; }, deltaZ: null, @@ -36139,7 +38008,7 @@ SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); module.exports = SyntheticWheelEvent; /***/ }), -/* 423 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36155,7 +38024,7 @@ module.exports = SyntheticWheelEvent; -var validateDOMNesting = __webpack_require__(154); +var validateDOMNesting = __webpack_require__(161); var DOC_NODE_TYPE = 9; @@ -36177,7 +38046,7 @@ function ReactDOMContainerInfo(topLevelWrapper, node) { module.exports = ReactDOMContainerInfo; /***/ }), -/* 424 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36201,7 +38070,7 @@ var ReactDOMFeatureFlags = { module.exports = ReactDOMFeatureFlags; /***/ }), -/* 425 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36217,7 +38086,7 @@ module.exports = ReactDOMFeatureFlags; -var adler32 = __webpack_require__(426); +var adler32 = __webpack_require__(435); var TAG_END = /\/?>/; var COMMENT_START = /^<\!\-\-/; @@ -36256,7 +38125,7 @@ var ReactMarkupChecksum = { module.exports = ReactMarkupChecksum; /***/ }), -/* 426 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36305,7 +38174,7 @@ function adler32(data) { module.exports = adler32; /***/ }), -/* 427 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36321,10 +38190,10 @@ module.exports = adler32; -module.exports = '15.6.1'; +module.exports = '15.4.2'; /***/ }), -/* 428 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36340,15 +38209,15 @@ module.exports = '15.6.1'; -var _prodInvariant = __webpack_require__(13); +var _prodInvariant = __webpack_require__(12); -var ReactCurrentOwner = __webpack_require__(37); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactInstanceMap = __webpack_require__(86); +var ReactCurrentOwner = __webpack_require__(36); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactInstanceMap = __webpack_require__(89); -var getHostComponentFromComposite = __webpack_require__(240); +var getHostComponentFromComposite = __webpack_require__(246); var invariant = __webpack_require__(9); -var warning = __webpack_require__(12); +var warning = __webpack_require__(11); /** * Returns the DOM node rendered by this element. @@ -36389,7 +38258,7 @@ function findDOMNode(componentOrElement) { module.exports = findDOMNode; /***/ }), -/* 429 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36405,29 +38274,25 @@ module.exports = findDOMNode; -var ReactMount = __webpack_require__(239); +var ReactMount = __webpack_require__(245); module.exports = ReactMount.renderSubtreeIntoContainer; /***/ }), -/* 430 */ +/* 439 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(241); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(88); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterContext__ = __webpack_require__(158); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RouteUtils__ = __webpack_require__(45); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouterUtils__ = __webpack_require__(243); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__routerWarning__ = __webpack_require__(73); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createTransitionManager__ = __webpack_require__(247); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__ = __webpack_require__(91); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouterContext__ = __webpack_require__(165); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouteUtils__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterUtils__ = __webpack_require__(249); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__routerWarning__ = __webpack_require__(78); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -36442,35 +38307,37 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob - - -var propTypes = { - history: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"], - children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["d" /* routes */], - routes: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["d" /* routes */], // alias for children - render: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"], - createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"], - onError: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"], - onUpdate: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"], - - // PRIVATE: For client-side rehydration of server match. - matchContext: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"] -}; +var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_1_react___default.a.PropTypes, + func = _React$PropTypes.func, + object = _React$PropTypes.object; /** * A is a high-level API for automatically setting up * a router that renders a with all the props * it needs each time the URL changes. */ -var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + +var Router = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({ displayName: 'Router', - propTypes: propTypes, + + propTypes: { + history: object, + children: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["d" /* routes */], + routes: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["d" /* routes */], // alias for children + render: func, + createElement: func, + onError: func, + onUpdate: func, + + // PRIVATE: For client-side rehydration of server match. + matchContext: object + }, getDefaultProps: function getDefaultProps() { return { render: function render(props) { - return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__RouterContext__["a" /* default */], props); + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__RouterContext__["a" /* default */], props); } }; }, @@ -36499,7 +38366,7 @@ var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ var history = this.props.history; - return Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__["b" /* createRouterObject */])(history, this.transitionManager, state); + return __WEBPACK_IMPORTED_MODULE_6__RouterUtils__["b" /* createRouterObject */](history, this.transitionManager, state); }, createTransitionManager: function createTransitionManager() { var matchContext = this.props.matchContext; @@ -36514,9 +38381,9 @@ var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ children = _props.children; - !history.getCurrentLocation ? false ? invariant(false, 'You have provided a history object created with history v4.x or v2.x ' + 'and earlier. This version of React Router is only compatible with v3 ' + 'history objects. Please change to history v3.x.') : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + !history.getCurrentLocation ? false ? invariant(false, 'You have provided a history object created with history v4.x or v2.x ' + 'and earlier. This version of React Router is only compatible with v3 ' + 'history objects. Please change to history v3.x.') : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; - return Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__["a" /* default */])(history, Object(__WEBPACK_IMPORTED_MODULE_7__RouteUtils__["b" /* createRoutes */])(routes || children)); + return __WEBPACK_IMPORTED_MODULE_2__createTransitionManager__["a" /* default */](history, __WEBPACK_IMPORTED_MODULE_5__RouteUtils__["b" /* createRoutes */](routes || children)); }, componentWillMount: function componentWillMount() { var _this = this; @@ -36530,7 +38397,7 @@ var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ } else { // Keep the identity of this.router because of a caveat in ContextUtils: // they only work if the object identity is preserved. - Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__["a" /* assignRouterState */])(_this.router, state); + __WEBPACK_IMPORTED_MODULE_6__RouterUtils__["a" /* assignRouterState */](_this.router, state); _this.setState(state, _this.props.onUpdate); } }); @@ -36562,7 +38429,7 @@ var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ // Only forward non-Router-specific props to routing context, as those are // the only ones that might be custom routing context props. - Object.keys(propTypes).forEach(function (propType) { + Object.keys(Router.propTypes).forEach(function (propType) { return delete props[propType]; }); @@ -36580,83 +38447,17 @@ var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ /* harmony default export */ __webpack_exports__["a"] = (Router); /***/ }), -/* 431 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - - -var emptyFunction = __webpack_require__(24); -var invariant = __webpack_require__(9); -var ReactPropTypesSecret = __webpack_require__(214); - -module.exports = function() { - function shim(props, propName, componentName, location, propFullName, secret) { - if (secret === ReactPropTypesSecret) { - // It is still safe when called from React. - return; - } - invariant( - false, - 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + - 'Use PropTypes.checkPropTypes() to call them. ' + - 'Read more at http://fb.me/use-check-prop-types' - ); - }; - shim.isRequired = shim; - function getShim() { - return shim; - }; - // Important! - // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. - var ReactPropTypes = { - array: shim, - bool: shim, - func: shim, - number: shim, - object: shim, - string: shim, - symbol: shim, - - any: shim, - arrayOf: getShim, - element: shim, - instanceOf: getShim, - node: shim, - objectOf: getShim, - oneOf: getShim, - oneOfType: getShim, - shape: getShim - }; - - ReactPropTypes.checkPropTypes = emptyFunction; - ReactPropTypes.PropTypes = ReactPropTypes; - - return ReactPropTypes; -}; - - -/***/ }), -/* 432 */ +/* 440 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(74); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(79); function routeParamsChanged(route, prevState, nextState) { if (!route.path) return false; - var paramNames = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__["b" /* getParamNames */])(route.path); + var paramNames = __WEBPACK_IMPORTED_MODULE_0__PatternUtils__["b" /* getParamNames */](route.path); return paramNames.some(function (paramName) { return prevState.params[paramName] !== nextState.params[paramName]; @@ -36684,29 +38485,31 @@ function computeChangedRoutes(prevState, nextState) { changeRoutes = void 0, enterRoutes = void 0; if (prevRoutes) { - var parentIsLeaving = false; - leaveRoutes = prevRoutes.filter(function (route) { - if (parentIsLeaving) { - return true; - } else { - var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); - if (isLeaving) parentIsLeaving = true; - return isLeaving; - } - }); + (function () { + var parentIsLeaving = false; + leaveRoutes = prevRoutes.filter(function (route) { + if (parentIsLeaving) { + return true; + } else { + var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); + if (isLeaving) parentIsLeaving = true; + return isLeaving; + } + }); - // onLeave hooks start at the leaf route. - leaveRoutes.reverse(); + // onLeave hooks start at the leaf route. + leaveRoutes.reverse(); - enterRoutes = []; - changeRoutes = []; + enterRoutes = []; + changeRoutes = []; - nextRoutes.forEach(function (route) { - var isNew = prevRoutes.indexOf(route) === -1; - var paramsChanged = leaveRoutes.indexOf(route) !== -1; + nextRoutes.forEach(function (route) { + var isNew = prevRoutes.indexOf(route) === -1; + var paramsChanged = leaveRoutes.indexOf(route) !== -1; - if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route); - }); + if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route); + }); + })(); } else { leaveRoutes = []; changeRoutes = []; @@ -36723,12 +38526,14 @@ function computeChangedRoutes(prevState, nextState) { /* harmony default export */ __webpack_exports__["a"] = (computeChangedRoutes); /***/ }), -/* 433 */ +/* 441 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = getTransitionUtils; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(157); +/* harmony export (immutable) */ __webpack_exports__["b"] = runEnterHooks; +/* harmony export (immutable) */ __webpack_exports__["a"] = runChangeHooks; +/* harmony export (immutable) */ __webpack_exports__["c"] = runLeaveHooks; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(164); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -36759,140 +38564,132 @@ var PendingHooks = function PendingHooks() { }; }; -function getTransitionUtils() { - var enterHooks = new PendingHooks(); - var changeHooks = new PendingHooks(); +var enterHooks = new PendingHooks(); +var changeHooks = new PendingHooks(); - function createTransitionHook(hook, route, asyncArity, pendingHooks) { - var isSync = hook.length < asyncArity; - - var transitionHook = function transitionHook() { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +function createTransitionHook(hook, route, asyncArity, pendingHooks) { + var isSync = hook.length < asyncArity; - hook.apply(route, args); - - if (isSync) { - var callback = args[args.length - 1]; - // Assume hook executes synchronously and - // automatically call the callback. - callback(); - } - }; + var transitionHook = function transitionHook() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - pendingHooks.add(transitionHook); + hook.apply(route, args); - return transitionHook; - } + if (isSync) { + var callback = args[args.length - 1]; + // Assume hook executes synchronously and + // automatically call the callback. + callback(); + } + }; - function getEnterHooks(routes) { - return routes.reduce(function (hooks, route) { - if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks)); - return hooks; - }, []); - } + pendingHooks.add(transitionHook); - function getChangeHooks(routes) { - return routes.reduce(function (hooks, route) { - if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks)); - return hooks; - }, []); - } + return transitionHook; +} - function runTransitionHooks(length, iter, callback) { - if (!length) { - callback(); - return; - } +function getEnterHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks)); + return hooks; + }, []); +} - var redirectInfo = void 0; - function replace(location) { - redirectInfo = location; - } +function getChangeHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks)); + return hooks; + }, []); +} - Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */])(length, function (index, next, done) { - iter(index, replace, function (error) { - if (error || redirectInfo) { - done(error, redirectInfo); // No need to continue. - } else { - next(); - } - }); - }, callback); +function runTransitionHooks(length, iter, callback) { + if (!length) { + callback(); + return; } - /** - * Runs all onEnter hooks in the given array of routes in order - * with onEnter(nextState, replace, callback) and calls - * callback(error, redirectInfo) when finished. The first hook - * to use replace short-circuits the loop. - * - * If a hook needs to run asynchronously, it may use the callback - * function. However, doing so will cause the transition to pause, - * which could lead to a non-responsive UI if the hook is slow. - */ - function runEnterHooks(routes, nextState, callback) { - enterHooks.clear(); - var hooks = getEnterHooks(routes); - return runTransitionHooks(hooks.length, function (index, replace, next) { - var wrappedNext = function wrappedNext() { - if (enterHooks.has(hooks[index])) { - next.apply(undefined, arguments); - enterHooks.remove(hooks[index]); - } - }; - hooks[index](nextState, replace, wrappedNext); - }, callback); + var redirectInfo = void 0; + function replace(location) { + redirectInfo = location; } - /** - * Runs all onChange hooks in the given array of routes in order - * with onChange(prevState, nextState, replace, callback) and calls - * callback(error, redirectInfo) when finished. The first hook - * to use replace short-circuits the loop. - * - * If a hook needs to run asynchronously, it may use the callback - * function. However, doing so will cause the transition to pause, - * which could lead to a non-responsive UI if the hook is slow. - */ - function runChangeHooks(routes, state, nextState, callback) { - changeHooks.clear(); - var hooks = getChangeHooks(routes); - return runTransitionHooks(hooks.length, function (index, replace, next) { - var wrappedNext = function wrappedNext() { - if (changeHooks.has(hooks[index])) { - next.apply(undefined, arguments); - changeHooks.remove(hooks[index]); - } - }; - hooks[index](state, nextState, replace, wrappedNext); - }, callback); - } + __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */](length, function (index, next, done) { + iter(index, replace, function (error) { + if (error || redirectInfo) { + done(error, redirectInfo); // No need to continue. + } else { + next(); + } + }); + }, callback); +} - /** - * Runs all onLeave hooks in the given array of routes in order. - */ - function runLeaveHooks(routes, prevState) { - for (var i = 0, len = routes.length; i < len; ++i) { - if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState); - } - } +/** + * Runs all onEnter hooks in the given array of routes in order + * with onEnter(nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ +function runEnterHooks(routes, nextState, callback) { + enterHooks.clear(); + var hooks = getEnterHooks(routes); + return runTransitionHooks(hooks.length, function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (enterHooks.has(hooks[index])) { + next.apply(undefined, arguments); + enterHooks.remove(hooks[index]); + } + }; + hooks[index](nextState, replace, wrappedNext); + }, callback); +} - return { - runEnterHooks: runEnterHooks, - runChangeHooks: runChangeHooks, - runLeaveHooks: runLeaveHooks - }; +/** + * Runs all onChange hooks in the given array of routes in order + * with onChange(prevState, nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ +function runChangeHooks(routes, state, nextState, callback) { + changeHooks.clear(); + var hooks = getChangeHooks(routes); + return runTransitionHooks(hooks.length, function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (changeHooks.has(hooks[index])) { + next.apply(undefined, arguments); + changeHooks.remove(hooks[index]); + } + }; + hooks[index](state, nextState, replace, wrappedNext); + }, callback); +} + +/** + * Runs all onLeave hooks in the given array of routes in order. + */ +function runLeaveHooks(routes, prevState) { + for (var i = 0, len = routes.length; i < len; ++i) { + if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState); + } } /***/ }), -/* 434 */ +/* 442 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = isActive; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(74); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(79); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; @@ -36976,7 +38773,7 @@ function routeIsActive(pathname, routes, params) { } if (remainingPathname !== null && pattern) { - var matched = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__["c" /* matchPattern */])(pattern, remainingPathname); + var matched = __WEBPACK_IMPORTED_MODULE_0__PatternUtils__["c" /* matchPattern */](pattern, remainingPathname); if (matched) { remainingPathname = matched.remainingPathname; paramNames = [].concat(paramNames, matched.paramNames); @@ -37040,12 +38837,12 @@ function isActive(_ref, indexOnly, currentLocation, routes, params) { } /***/ }), -/* 435 */ +/* 443 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(157); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(242); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(164); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(248); @@ -37058,7 +38855,7 @@ function getComponentsForRoute(nextState, route, callback) { var getComponent = route.getComponent || route.getComponents; if (getComponent) { var componentReturn = getComponent.call(route, nextState, callback); - if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */])(componentReturn)) componentReturn.then(function (component) { + if (__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */](componentReturn)) componentReturn.then(function (component) { return callback(null, component); }, callback); } else { @@ -37074,7 +38871,7 @@ function getComponentsForRoute(nextState, route, callback) { * asynchronous getComponents method. */ function getComponents(nextState, callback) { - Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["b" /* mapAsync */])(nextState.routes, function (route, index, callback) { + __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["b" /* mapAsync */](nextState.routes, function (route, index, callback) { getComponentsForRoute(nextState, route, callback); }, callback); } @@ -37082,18 +38879,20 @@ function getComponents(nextState, callback) { /* harmony default export */ __webpack_exports__["a"] = (getComponents); /***/ }), -/* 436 */ +/* 444 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = matchRoutes; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(157); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(242); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(74); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(73); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(164); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(248); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(79); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(44); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + @@ -37117,7 +38916,7 @@ function getChildRoutes(route, location, paramNames, paramValues, callback) { }; var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) { - childRoutes = !error && Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(childRoutes); + childRoutes = !error && __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](childRoutes); if (sync) { result = [error, childRoutes]; return; @@ -37126,8 +38925,8 @@ function getChildRoutes(route, location, paramNames, paramValues, callback) { callback(error, childRoutes); }); - if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */])(childRoutesReturn)) childRoutesReturn.then(function (childRoutes) { - return callback(null, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(childRoutes)); + if (__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */](childRoutesReturn)) childRoutesReturn.then(function (childRoutes) { + return callback(null, __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](childRoutes)); }, callback); sync = false; @@ -37144,11 +38943,11 @@ function getIndexRoute(route, location, paramNames, paramValues, callback) { }; var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) { - callback(error, !error && Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(indexRoute)[0]); + callback(error, !error && __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](indexRoute)[0]); }); - if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */])(indexRoutesReturn)) indexRoutesReturn.then(function (indexRoute) { - return callback(null, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(indexRoute)[0]); + if (__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */](indexRoutesReturn)) indexRoutesReturn.then(function (indexRoute) { + return callback(null, __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](indexRoute)[0]); }, callback); } else if (route.childRoutes || route.getChildRoutes) { var onChildRoutes = function onChildRoutes(error, childRoutes) { @@ -37161,7 +38960,7 @@ function getIndexRoute(route, location, paramNames, paramValues, callback) { return !childRoute.path; }); - Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */])(pathless.length, function (index, next, done) { + __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */](pathless.length, function (index, next, done) { getIndexRoute(pathless[index], location, paramNames, paramValues, function (error, indexRoute) { if (error || indexRoute) { var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]); @@ -37217,7 +39016,7 @@ function matchRouteDeep(route, location, remainingPathname, paramNames, paramVal // we're not just searching for potential nested absolute paths. if (remainingPathname !== null && pattern) { try { - var matched = Object(__WEBPACK_IMPORTED_MODULE_2__PatternUtils__["c" /* matchPattern */])(pattern, remainingPathname); + var matched = __WEBPACK_IMPORTED_MODULE_2__PatternUtils__["c" /* matchPattern */](pattern, remainingPathname); if (matched) { remainingPathname = matched.remainingPathname; paramNames = [].concat(paramNames, matched.paramNames); @@ -37232,32 +39031,38 @@ function matchRouteDeep(route, location, remainingPathname, paramNames, paramVal // By assumption, pattern is non-empty here, which is the prerequisite for // actually terminating a match. if (remainingPathname === '') { - var match = { - routes: [route], - params: createParams(paramNames, paramValues) - }; + var _ret = function () { + var match = { + routes: [route], + params: createParams(paramNames, paramValues) + }; - getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) { - if (error) { - callback(error); - } else { - if (Array.isArray(indexRoute)) { - var _match$routes; - - false ? warning(indexRoute.every(function (route) { - return !route.path; - }), 'Index routes should not have paths') : void 0; - (_match$routes = match.routes).push.apply(_match$routes, indexRoute); - } else if (indexRoute) { - false ? warning(!indexRoute.path, 'Index routes should not have paths') : void 0; - match.routes.push(indexRoute); + getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) { + if (error) { + callback(error); + } else { + if (Array.isArray(indexRoute)) { + var _match$routes; + + false ? warning(indexRoute.every(function (route) { + return !route.path; + }), 'Index routes should not have paths') : void 0; + (_match$routes = match.routes).push.apply(_match$routes, indexRoute); + } else if (indexRoute) { + false ? warning(!indexRoute.path, 'Index routes should not have paths') : void 0; + match.routes.push(indexRoute); + } + + callback(null, match); } + }); - callback(null, match); - } - }); + return { + v: void 0 + }; + }(); - return; + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; } } @@ -37322,7 +39127,7 @@ function matchRoutes(routes, location, callback, remainingPathname) { remainingPathname = location.pathname; } - Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */])(routes.length, function (index, next, done) { + __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */](routes.length, function (index, next, done) { matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) { if (error || match) { done(error, match); @@ -37334,11 +39139,11 @@ function matchRoutes(routes, location, callback, remainingPathname) { } /***/ }), -/* 437 */ +/* 445 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(74); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(79); /** @@ -37350,7 +39155,7 @@ function getRouteParams(route, params) { if (!route.path) return routeParams; - Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__["b" /* getParamNames */])(route.path).forEach(function (p) { + __WEBPACK_IMPORTED_MODULE_0__PatternUtils__["b" /* getParamNames */](route.path).forEach(function (p) { if (Object.prototype.hasOwnProperty.call(params, p)) { routeParams[p] = params[p]; } @@ -37362,50 +39167,44 @@ function getRouteParams(route, params) { /* harmony default export */ __webpack_exports__["a"] = (getRouteParams); /***/ }), -/* 438 */ +/* 446 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(244); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(250); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - /** * An is used to link to an . */ -var IndexLink = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ +var IndexLink = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ displayName: 'IndexLink', - render: function render() { - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Link__["a" /* default */], _extends({}, this.props, { onlyActiveOnIndex: true })); + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__Link__["a" /* default */], _extends({}, this.props, { onlyActiveOnIndex: true })); } }); /* harmony default export */ __webpack_exports__["a"] = (IndexLink); /***/ }), -/* 439 */ +/* 447 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = withRouter; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = __webpack_require__(161); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ContextUtils__ = __webpack_require__(159); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PropTypes__ = __webpack_require__(160); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(168); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(167); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -37414,7 +39213,6 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument - function getDisplayName(WrappedComponent) { return WrappedComponent.displayName || WrappedComponent.name || 'Component'; } @@ -37422,16 +39220,16 @@ function getDisplayName(WrappedComponent) { function withRouter(WrappedComponent, options) { var withRef = options && options.withRef; - var WithRouter = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + var WithRouter = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({ displayName: 'WithRouter', - mixins: [Object(__WEBPACK_IMPORTED_MODULE_4__ContextUtils__["b" /* ContextSubscriber */])('router')], + mixins: [__WEBPACK_IMPORTED_MODULE_3__ContextUtils__["b" /* ContextSubscriber */]('router')], - contextTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__["b" /* routerShape */] }, - propTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__["b" /* routerShape */] }, + contextTypes: { router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__["b" /* routerShape */] }, + propTypes: { router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__["b" /* routerShape */] }, getWrappedInstance: function getWrappedInstance() { - !withRef ? false ? invariant(false, 'To access the wrapped instance, you need to specify ' + '`{ withRef: true }` as the second argument of the withRouter() call.') : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + !withRef ? false ? invariant(false, 'To access the wrapped instance, you need to specify ' + '`{ withRef: true }` as the second argument of the withRouter() call.') : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; return this.wrappedInstance; }, @@ -37462,42 +39260,45 @@ function withRouter(WrappedComponent, options) { WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')'; WithRouter.WrappedComponent = WrappedComponent; - return __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default()(WithRouter, WrappedComponent); + return __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default.a(WithRouter, WrappedComponent); } /***/ }), -/* 440 */ +/* 448 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(73); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Redirect__ = __webpack_require__(245); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(88); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__routerWarning__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Redirect__ = __webpack_require__(251); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(91); +var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes, + string = _React$PropTypes.string, + object = _React$PropTypes.object; /** * An is used to redirect from an indexRoute. */ /* eslint-disable react/require-render-return */ -var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + +var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ displayName: 'IndexRedirect', + statics: { createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { /* istanbul ignore else: sanity check */ if (parentRoute) { - parentRoute.indexRoute = __WEBPACK_IMPORTED_MODULE_4__Redirect__["a" /* default */].createRouteFromReactElement(element); + parentRoute.indexRoute = __WEBPACK_IMPORTED_MODULE_3__Redirect__["a" /* default */].createRouteFromReactElement(element); } else { false ? warning(false, 'An does not make sense at the root of your route config') : void 0; } @@ -37505,55 +39306,56 @@ var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ }, propTypes: { - to: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"].isRequired, - query: __WEBPACK_IMPORTED_MODULE_1_prop_types__["object"], - state: __WEBPACK_IMPORTED_MODULE_1_prop_types__["object"], - onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */], - children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */] + to: string.isRequired, + query: object, + state: object, + onEnter: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */] }, /* istanbul ignore next: sanity check */ render: function render() { - true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_3_invariant___default()(false) : void 0; + true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_2_invariant___default.a(false) : void 0; } }); /* harmony default export */ __webpack_exports__["a"] = (IndexRedirect); /***/ }), -/* 441 */ +/* 449 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(73); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(45); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(88); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__routerWarning__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(91); +var func = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes.func; /** * An is used to specify its parent's in * a JSX route config. */ /* eslint-disable react/require-render-return */ -var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + +var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ displayName: 'IndexRoute', + statics: { createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { /* istanbul ignore else: sanity check */ if (parentRoute) { - parentRoute.indexRoute = Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["a" /* createRouteFromReactElement */])(element); + parentRoute.indexRoute = __WEBPACK_IMPORTED_MODULE_3__RouteUtils__["a" /* createRouteFromReactElement */](element); } else { false ? warning(false, 'An does not make sense at the root of your route config') : void 0; } @@ -37561,39 +39363,40 @@ var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ }, propTypes: { - path: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */], - component: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["a" /* component */], - components: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["b" /* components */], - getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__["func"], - getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__["func"] + path: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */], + component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["a" /* component */], + components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["b" /* components */], + getComponent: func, + getComponents: func }, /* istanbul ignore next: sanity check */ render: function render() { - true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_3_invariant___default()(false) : void 0; + true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_2_invariant___default.a(false) : void 0; } }); /* harmony default export */ __webpack_exports__["a"] = (IndexRoute); /***/ }), -/* 442 */ +/* 450 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(45); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(88); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RouteUtils__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__ = __webpack_require__(91); +var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes, + string = _React$PropTypes.string, + func = _React$PropTypes.func; /** * A is used to declare which components are rendered to the @@ -37606,42 +39409,44 @@ var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ * rendered into the DOM, nested in the same order as in the tree. */ /* eslint-disable react/require-render-return */ -var Route = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + +var Route = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ displayName: 'Route', + statics: { - createRouteFromReactElement: __WEBPACK_IMPORTED_MODULE_3__RouteUtils__["a" /* createRouteFromReactElement */] + createRouteFromReactElement: __WEBPACK_IMPORTED_MODULE_2__RouteUtils__["a" /* createRouteFromReactElement */] }, propTypes: { - path: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"], - component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["a" /* component */], - components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["b" /* components */], - getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__["func"], - getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__["func"] + path: string, + component: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["a" /* component */], + components: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["b" /* components */], + getComponent: func, + getComponents: func }, /* istanbul ignore next: sanity check */ render: function render() { - true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false) : void 0; + true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(false) : void 0; } }); /* harmony default export */ __webpack_exports__["a"] = (Route); /***/ }), -/* 443 */ +/* 451 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(109); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(113); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(246); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(241); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(45); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(243); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(252); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(247); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(249); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -37669,10 +39474,10 @@ function match(_ref, callback) { location = _ref.location, options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']); - !(history || location) ? false ? invariant(false, 'match needs a history or a location') : __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false) : void 0; + !(history || location) ? false ? invariant(false, 'match needs a history or a location') : __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(false) : void 0; - history = history ? history : Object(__WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__["a" /* default */])(options); - var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_3__createTransitionManager__["a" /* default */])(history, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(routes)); + history = history ? history : __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__["a" /* default */](options); + var transitionManager = __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__["a" /* default */](history, __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](routes)); if (location) { // Allow match({ location: '/the/path', ... }) @@ -37685,7 +39490,7 @@ function match(_ref, callback) { var renderProps = void 0; if (nextState) { - var router = Object(__WEBPACK_IMPORTED_MODULE_5__RouterUtils__["b" /* createRouterObject */])(history, transitionManager, nextState); + var router = __WEBPACK_IMPORTED_MODULE_5__RouterUtils__["b" /* createRouterObject */](history, transitionManager, nextState); renderProps = _extends({}, nextState, { router: router, matchContext: { transitionManager: transitionManager, router: router } @@ -37699,13 +39504,13 @@ function match(_ref, callback) { /* harmony default export */ __webpack_exports__["a"] = (match); /***/ }), -/* 444 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var strictUriEncode = __webpack_require__(445); -var objectAssign = __webpack_require__(15); +var strictUriEncode = __webpack_require__(453); +var objectAssign = __webpack_require__(13); function encoderForArrayFormat(opts) { switch (opts.arrayFormat) { @@ -37751,9 +39556,9 @@ function parserForArrayFormat(opts) { switch (opts.arrayFormat) { case 'index': return function (key, value, accumulator) { - result = /\[(\d*)\]$/.exec(key); + result = /\[(\d*)]$/.exec(key); - key = key.replace(/\[\d*\]$/, ''); + key = key.replace(/\[\d*]$/, ''); if (!result) { accumulator[key] = value; @@ -37769,15 +39574,13 @@ function parserForArrayFormat(opts) { case 'bracket': return function (key, value, accumulator) { - result = /(\[\])$/.exec(key); - key = key.replace(/\[\]$/, ''); + result = /(\[])$/.exec(key); - if (!result) { + key = key.replace(/\[]$/, ''); + + if (!result || accumulator[key] === undefined) { accumulator[key] = value; return; - } else if (accumulator[key] === undefined) { - accumulator[key] = [value]; - return; } accumulator[key] = [].concat(accumulator[key], value); @@ -37911,7 +39714,7 @@ exports.stringify = function (obj, opts) { /***/ }), -/* 445 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37924,7 +39727,7 @@ module.exports = function (str) { /***/ }), -/* 446 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37934,23 +39737,23 @@ exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _warning = __webpack_require__(17); +var _warning = __webpack_require__(15); var _warning2 = _interopRequireDefault(_warning); -var _invariant = __webpack_require__(20); +var _invariant = __webpack_require__(17); var _invariant2 = _interopRequireDefault(_invariant); -var _LocationUtils = __webpack_require__(75); +var _LocationUtils = __webpack_require__(80); -var _PathUtils = __webpack_require__(46); +var _PathUtils = __webpack_require__(45); -var _createHistory = __webpack_require__(163); +var _createHistory = __webpack_require__(170); var _createHistory2 = _interopRequireDefault(_createHistory); -var _Actions = __webpack_require__(109); +var _Actions = __webpack_require__(113); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -37964,7 +39767,7 @@ var createStateStorage = function createStateStorage(entries) { }; var createMemoryHistory = function createMemoryHistory() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; if (Array.isArray(options)) { options = { entries: options }; @@ -38031,9 +39834,9 @@ var createMemoryHistory = function createMemoryHistory() { go: go })); - var _options = options, - entries = _options.entries, - current = _options.current; + var _options = options; + var entries = _options.entries; + var current = _options.current; if (typeof entries === 'string') { @@ -38070,7 +39873,7 @@ var createMemoryHistory = function createMemoryHistory() { exports.default = createMemoryHistory; /***/ }), -/* 447 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38132,14 +39935,14 @@ var loopAsync = exports.loopAsync = function loopAsync(turns, work, callback) { }; /***/ }), -/* 448 */ +/* 456 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(158); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(73); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(165); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(78); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -38183,19 +39986,19 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument }); /***/ }), -/* 449 */ +/* 457 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = __webpack_require__(450); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = __webpack_require__(458); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(251); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(257); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a)); +/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a)); /***/ }), -/* 450 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38205,23 +40008,23 @@ exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _invariant = __webpack_require__(20); +var _invariant = __webpack_require__(17); var _invariant2 = _interopRequireDefault(_invariant); -var _ExecutionEnvironment = __webpack_require__(164); +var _ExecutionEnvironment = __webpack_require__(171); -var _BrowserProtocol = __webpack_require__(165); +var _BrowserProtocol = __webpack_require__(172); var BrowserProtocol = _interopRequireWildcard(_BrowserProtocol); -var _RefreshProtocol = __webpack_require__(451); +var _RefreshProtocol = __webpack_require__(459); var RefreshProtocol = _interopRequireWildcard(_RefreshProtocol); -var _DOMUtils = __webpack_require__(110); +var _DOMUtils = __webpack_require__(114); -var _createHistory = __webpack_require__(163); +var _createHistory = __webpack_require__(170); var _createHistory2 = _interopRequireDefault(_createHistory); @@ -38240,18 +40043,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * behavior using { forceRefresh: true } in options. */ var createBrowserHistory = function createBrowserHistory() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; !_ExecutionEnvironment.canUseDOM ? false ? (0, _invariant2.default)(false, 'Browser history needs a DOM') : (0, _invariant2.default)(false) : void 0; var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)(); var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol; - var getUserConfirmation = Protocol.getUserConfirmation, - getCurrentLocation = Protocol.getCurrentLocation, - pushLocation = Protocol.pushLocation, - replaceLocation = Protocol.replaceLocation, - go = Protocol.go; + var getUserConfirmation = Protocol.getUserConfirmation; + var getCurrentLocation = Protocol.getCurrentLocation; + var pushLocation = Protocol.pushLocation; + var replaceLocation = Protocol.replaceLocation; + var go = Protocol.go; var history = (0, _createHistory2.default)(_extends({ @@ -38294,7 +40097,7 @@ var createBrowserHistory = function createBrowserHistory() { exports.default = createBrowserHistory; /***/ }), -/* 451 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38303,7 +40106,7 @@ exports.default = createBrowserHistory; exports.__esModule = true; exports.replaceLocation = exports.pushLocation = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined; -var _BrowserProtocol = __webpack_require__(165); +var _BrowserProtocol = __webpack_require__(172); Object.defineProperty(exports, 'getUserConfirmation', { enumerable: true, @@ -38318,9 +40121,9 @@ Object.defineProperty(exports, 'go', { } }); -var _LocationUtils = __webpack_require__(75); +var _LocationUtils = __webpack_require__(80); -var _PathUtils = __webpack_require__(46); +var _PathUtils = __webpack_require__(45); var getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() { return (0, _LocationUtils.createLocation)(window.location); @@ -38337,19 +40140,19 @@ var replaceLocation = exports.replaceLocation = function replaceLocation(locatio }; /***/ }), -/* 452 */ +/* 460 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = __webpack_require__(453); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = __webpack_require__(461); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(251); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(257); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a)); +/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a)); /***/ }), -/* 453 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38359,23 +40162,23 @@ exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _warning = __webpack_require__(17); +var _warning = __webpack_require__(15); var _warning2 = _interopRequireDefault(_warning); -var _invariant = __webpack_require__(20); +var _invariant = __webpack_require__(17); var _invariant2 = _interopRequireDefault(_invariant); -var _ExecutionEnvironment = __webpack_require__(164); +var _ExecutionEnvironment = __webpack_require__(171); -var _DOMUtils = __webpack_require__(110); +var _DOMUtils = __webpack_require__(114); -var _HashProtocol = __webpack_require__(454); +var _HashProtocol = __webpack_require__(462); var HashProtocol = _interopRequireWildcard(_HashProtocol); -var _createHistory = __webpack_require__(163); +var _createHistory = __webpack_require__(170); var _createHistory2 = _interopRequireDefault(_createHistory); @@ -38411,12 +40214,12 @@ var HashPathCoders = { }; var createHashHistory = function createHashHistory() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; !_ExecutionEnvironment.canUseDOM ? false ? (0, _invariant2.default)(false, 'Hash history needs a DOM') : (0, _invariant2.default)(false) : void 0; - var queryKey = options.queryKey, - hashType = options.hashType; + var queryKey = options.queryKey; + var hashType = options.hashType; false ? (0, _warning2.default)(queryKey !== false, 'Using { queryKey: false } no longer works. Instead, just don\'t ' + 'use location state if you don\'t want a key in your URL query string') : void 0; @@ -38502,7 +40305,7 @@ var createHashHistory = function createHashHistory() { exports.default = createHashHistory; /***/ }), -/* 454 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38511,7 +40314,7 @@ exports.default = createHashHistory; exports.__esModule = true; exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined; -var _BrowserProtocol = __webpack_require__(165); +var _BrowserProtocol = __webpack_require__(172); Object.defineProperty(exports, 'getUserConfirmation', { enumerable: true, @@ -38526,17 +40329,17 @@ Object.defineProperty(exports, 'go', { } }); -var _warning = __webpack_require__(17); +var _warning = __webpack_require__(15); var _warning2 = _interopRequireDefault(_warning); -var _LocationUtils = __webpack_require__(75); +var _LocationUtils = __webpack_require__(80); -var _DOMUtils = __webpack_require__(110); +var _DOMUtils = __webpack_require__(114); -var _DOMStateStorage = __webpack_require__(250); +var _DOMStateStorage = __webpack_require__(256); -var _PathUtils = __webpack_require__(46); +var _PathUtils = __webpack_require__(45); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -38611,8 +40414,8 @@ var startListener = exports.startListener = function startListener(listener, pat }; var updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) { - var state = location.state, - key = location.key; + var state = location.state; + var key = location.key; var path = pathCoder.encodePath((0, _PathUtils.createPath)(location)); @@ -38644,11 +40447,11 @@ var replaceLocation = exports.replaceLocation = function replaceLocation(locatio }; /***/ }), -/* 455 */ +/* 463 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(116); /** Used for built-in method references. */ @@ -38698,7 +40501,7 @@ function getRawTag(value) { /***/ }), -/* 456 */ +/* 464 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -38727,14 +40530,14 @@ function objectToString(value) { /***/ }), -/* 457 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(458); +module.exports = __webpack_require__(466); /***/ }), -/* 458 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38744,7 +40547,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _ponyfill = __webpack_require__(459); +var _ponyfill = __webpack_require__(467); var _ponyfill2 = _interopRequireDefault(_ponyfill); @@ -38767,10 +40570,10 @@ if (typeof self !== 'undefined') { var result = (0, _ponyfill2['default'])(root); exports['default'] = result; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47), __webpack_require__(256)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46), __webpack_require__(262)(module))) /***/ }), -/* 459 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38799,14 +40602,14 @@ function symbolObservablePonyfill(root) { }; /***/ }), -/* 460 */ +/* 468 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = combineReducers; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(252); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(166); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(257); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(258); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(173); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(263); @@ -38815,7 +40618,7 @@ function getUndefinedStateErrorMessage(key, action) { var actionType = action && action.type; var actionName = actionType && '"' + actionType.toString() + '"' || 'an action'; - return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.'; + return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.'; } function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { @@ -38826,7 +40629,7 @@ function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, une return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; } - if (!Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */])(inputState)) { + if (!__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */](inputState)) { return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"'); } @@ -38843,18 +40646,18 @@ function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, une } } -function assertReducerShape(reducers) { +function assertReducerSanity(reducers) { Object.keys(reducers).forEach(function (key) { var reducer = reducers[key]; var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT }); if (typeof initialState === 'undefined') { - throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.'); + throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.'); } var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); if (typeof reducer(undefined, { type: type }) === 'undefined') { - throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.'); + throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.'); } }); } @@ -38893,24 +40696,23 @@ function combineReducers(reducers) { } var finalReducerKeys = Object.keys(finalReducers); - var unexpectedKeyCache = void 0; if (false) { - unexpectedKeyCache = {}; + var unexpectedKeyCache = {}; } - var shapeAssertionError = void 0; + var sanityError; try { - assertReducerShape(finalReducers); + assertReducerSanity(finalReducers); } catch (e) { - shapeAssertionError = e; + sanityError = e; } return function combination() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var action = arguments[1]; - if (shapeAssertionError) { - throw shapeAssertionError; + if (sanityError) { + throw sanityError; } if (false) { @@ -38922,16 +40724,16 @@ function combineReducers(reducers) { var hasChanged = false; var nextState = {}; - for (var _i = 0; _i < finalReducerKeys.length; _i++) { - var _key = finalReducerKeys[_i]; - var reducer = finalReducers[_key]; - var previousStateForKey = state[_key]; + for (var i = 0; i < finalReducerKeys.length; i++) { + var key = finalReducerKeys[i]; + var reducer = finalReducers[key]; + var previousStateForKey = state[key]; var nextStateForKey = reducer(previousStateForKey, action); if (typeof nextStateForKey === 'undefined') { - var errorMessage = getUndefinedStateErrorMessage(_key, action); + var errorMessage = getUndefinedStateErrorMessage(key, action); throw new Error(errorMessage); } - nextState[_key] = nextStateForKey; + nextState[key] = nextStateForKey; hasChanged = hasChanged || nextStateForKey !== previousStateForKey; } return hasChanged ? nextState : state; @@ -38939,7 +40741,7 @@ function combineReducers(reducers) { } /***/ }), -/* 461 */ +/* 469 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -38993,12 +40795,12 @@ function bindActionCreators(actionCreators, dispatch) { } /***/ }), -/* 462 */ +/* 470 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(258); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(264); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -39049,7 +40851,7 @@ function applyMiddleware() { } /***/ }), -/* 463 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -39060,15 +40862,11 @@ exports["default"] = undefined; var _react = __webpack_require__(0); -var _propTypes = __webpack_require__(14); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _storeShape = __webpack_require__(259); +var _storeShape = __webpack_require__(265); var _storeShape2 = _interopRequireDefault(_storeShape); -var _warning = __webpack_require__(260); +var _warning = __webpack_require__(266); var _warning2 = _interopRequireDefault(_warning); @@ -39130,14 +40928,14 @@ if (false) { Provider.propTypes = { store: _storeShape2["default"].isRequired, - children: _propTypes2["default"].element.isRequired + children: _react.PropTypes.element.isRequired }; Provider.childContextTypes = { store: _storeShape2["default"].isRequired }; /***/ }), -/* 464 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -39151,31 +40949,31 @@ exports["default"] = connect; var _react = __webpack_require__(0); -var _storeShape = __webpack_require__(259); +var _storeShape = __webpack_require__(265); var _storeShape2 = _interopRequireDefault(_storeShape); -var _shallowEqual = __webpack_require__(465); +var _shallowEqual = __webpack_require__(473); var _shallowEqual2 = _interopRequireDefault(_shallowEqual); -var _wrapActionCreators = __webpack_require__(466); +var _wrapActionCreators = __webpack_require__(474); var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators); -var _warning = __webpack_require__(260); +var _warning = __webpack_require__(266); var _warning2 = _interopRequireDefault(_warning); -var _isPlainObject = __webpack_require__(467); +var _isPlainObject = __webpack_require__(475); var _isPlainObject2 = _interopRequireDefault(_isPlainObject); -var _hoistNonReactStatics = __webpack_require__(161); +var _hoistNonReactStatics = __webpack_require__(168); var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); -var _invariant = __webpack_require__(20); +var _invariant = __webpack_require__(17); var _invariant2 = _interopRequireDefault(_invariant); @@ -39538,7 +41336,7 @@ function connect(mapStateToProps, mapDispatchToProps, mergeProps) { } /***/ }), -/* 465 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -39570,7 +41368,7 @@ function shallowEqual(objA, objB) { } /***/ }), -/* 466 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -39579,7 +41377,7 @@ function shallowEqual(objA, objB) { exports.__esModule = true; exports["default"] = wrapActionCreators; -var _redux = __webpack_require__(111); +var _redux = __webpack_require__(115); function wrapActionCreators(actionCreators) { return function (dispatch) { @@ -39588,12 +41386,12 @@ function wrapActionCreators(actionCreators) { } /***/ }), -/* 467 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { -var baseGetTag = __webpack_require__(468), - getPrototype = __webpack_require__(473), - isObjectLike = __webpack_require__(475); +var baseGetTag = __webpack_require__(476), + getPrototype = __webpack_require__(481), + isObjectLike = __webpack_require__(483); /** `Object#toString` result references. */ var objectTag = '[object Object]'; @@ -39656,12 +41454,12 @@ module.exports = isPlainObject; /***/ }), -/* 468 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { -var Symbol = __webpack_require__(261), - getRawTag = __webpack_require__(471), - objectToString = __webpack_require__(472); +var Symbol = __webpack_require__(267), + getRawTag = __webpack_require__(479), + objectToString = __webpack_require__(480); /** `Object#toString` result references. */ var nullTag = '[object Null]', @@ -39690,10 +41488,10 @@ module.exports = baseGetTag; /***/ }), -/* 469 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { -var freeGlobal = __webpack_require__(470); +var freeGlobal = __webpack_require__(478); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; @@ -39705,7 +41503,7 @@ module.exports = root; /***/ }), -/* 470 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ @@ -39713,13 +41511,13 @@ var freeGlobal = typeof global == 'object' && global && global.Object === Object module.exports = freeGlobal; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46))) /***/ }), -/* 471 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { -var Symbol = __webpack_require__(261); +var Symbol = __webpack_require__(267); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -39768,7 +41566,7 @@ module.exports = getRawTag; /***/ }), -/* 472 */ +/* 480 */ /***/ (function(module, exports) { /** Used for built-in method references. */ @@ -39796,10 +41594,10 @@ module.exports = objectToString; /***/ }), -/* 473 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { -var overArg = __webpack_require__(474); +var overArg = __webpack_require__(482); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); @@ -39808,7 +41606,7 @@ module.exports = getPrototype; /***/ }), -/* 474 */ +/* 482 */ /***/ (function(module, exports) { /** @@ -39829,7 +41627,7 @@ module.exports = overArg; /***/ }), -/* 475 */ +/* 483 */ /***/ (function(module, exports) { /** @@ -39864,24 +41662,23 @@ module.exports = isObjectLike; /***/ }), -/* 476 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + Object.defineProperty(exports, "__esModule", { value: true }); -exports.logger = exports.defaults = undefined; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _core = __webpack_require__(477); +var _core = __webpack_require__(485); -var _helpers = __webpack_require__(262); +var _helpers = __webpack_require__(268); -var _defaults = __webpack_require__(480); +var _defaults = __webpack_require__(488); var _defaults2 = _interopRequireDefault(_defaults); @@ -39907,17 +41704,17 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @returns {function} logger middleware */ function createLogger() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var loggerOptions = _extends({}, _defaults2.default, options); - var logger = loggerOptions.logger, - transformer = loggerOptions.transformer, - stateTransformer = loggerOptions.stateTransformer, - errorTransformer = loggerOptions.errorTransformer, - predicate = loggerOptions.predicate, - logErrors = loggerOptions.logErrors, - diffPredicate = loggerOptions.diffPredicate; + var logger = loggerOptions.logger; + var transformer = loggerOptions.transformer; + var stateTransformer = loggerOptions.stateTransformer; + var errorTransformer = loggerOptions.errorTransformer; + var predicate = loggerOptions.predicate; + var logErrors = loggerOptions.logErrors; + var diffPredicate = loggerOptions.diffPredicate; // Return if 'console' object is not defined @@ -39935,20 +41732,6 @@ function createLogger() { console.error('Option \'transformer\' is deprecated, use \'stateTransformer\' instead!'); // eslint-disable-line no-console } - // Detect if 'createLogger' was passed directly to 'applyMiddleware'. - if (options.getState && options.dispatch) { - // eslint-disable-next-line no-console - console.error('[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n\n// Logger with default options\nimport { logger } from \'redux-logger\'\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n\n\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from \'redux-logger\'\n\nconst logger = createLogger({\n // ...options\n});\n\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n'); - - return function () { - return function (next) { - return function (action) { - return next(action); - }; - }; - }; - } - var logBuffer = []; return function (_ref) { @@ -39968,7 +41751,7 @@ function createLogger() { logEntry.prevState = stateTransformer(getState()); logEntry.action = action; - var returnedValue = void 0; + var returnedValue = undefined; if (logErrors) { try { returnedValue = next(action); @@ -39994,16 +41777,11 @@ function createLogger() { }; } -var defaultLogger = createLogger(); - -exports.defaults = _defaults2.default; -exports.logger = defaultLogger; exports.default = createLogger; module.exports = exports['default']; - /***/ }), -/* 477 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40012,14 +41790,11 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - exports.printBuffer = printBuffer; -var _helpers = __webpack_require__(262); +var _helpers = __webpack_require__(268); -var _diff = __webpack_require__(478); +var _diff = __webpack_require__(486); var _diff2 = _interopRequireDefault(_diff); @@ -40027,6 +41802,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } +function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } + /** * Get log level string based on supplied params * @@ -40049,40 +41826,40 @@ function getLogLevel(level, action, payload, type) { } function defaultTitleFormatter(options) { - var timestamp = options.timestamp, - duration = options.duration; - + var timestamp = options.timestamp; + var duration = options.duration; return function (action, time, took) { var parts = ['action']; - - parts.push('%c' + String(action.type)); - if (timestamp) parts.push('%c@ ' + time); - if (duration) parts.push('%c(in ' + took.toFixed(2) + ' ms)'); - + if (timestamp) { + parts.push('@ ' + time); + } + parts.push(action.type); + if (duration) { + parts.push('(in ' + took.toFixed(2) + ' ms)'); + } return parts.join(' '); }; } function printBuffer(buffer, options) { - var logger = options.logger, - actionTransformer = options.actionTransformer, - _options$titleFormatt = options.titleFormatter, - titleFormatter = _options$titleFormatt === undefined ? defaultTitleFormatter(options) : _options$titleFormatt, - collapsed = options.collapsed, - colors = options.colors, - level = options.level, - diff = options.diff; - + var logger = options.logger; + var actionTransformer = options.actionTransformer; + var _options$titleFormatt = options.titleFormatter; + var titleFormatter = _options$titleFormatt === undefined ? defaultTitleFormatter(options) : _options$titleFormatt; + var collapsed = options.collapsed; + var colors = options.colors; + var level = options.level; + var diff = options.diff; buffer.forEach(function (logEntry, key) { - var started = logEntry.started, - startedTime = logEntry.startedTime, - action = logEntry.action, - prevState = logEntry.prevState, - error = logEntry.error; - var took = logEntry.took, - nextState = logEntry.nextState; + var started = logEntry.started; + var startedTime = logEntry.startedTime; + var action = logEntry.action; + var prevState = logEntry.prevState; + var error = logEntry.error; + var took = logEntry.took; + var nextState = logEntry.nextState; var nextEntry = buffer[key + 1]; @@ -40095,22 +41872,18 @@ function printBuffer(buffer, options) { var formattedAction = actionTransformer(action); var isCollapsed = typeof collapsed === 'function' ? collapsed(function () { return nextState; - }, action, logEntry) : collapsed; + }, action) : collapsed; var formattedTime = (0, _helpers.formatTime)(startedTime); - var titleCSS = colors.title ? 'color: ' + colors.title(formattedAction) + ';' : ''; - var headerCSS = ['color: gray; font-weight: lighter;']; - headerCSS.push(titleCSS); - if (options.timestamp) headerCSS.push('color: gray; font-weight: lighter;'); - if (options.duration) headerCSS.push('color: gray; font-weight: lighter;'); + var titleCSS = colors.title ? 'color: ' + colors.title(formattedAction) + ';' : null; var title = titleFormatter(formattedAction, formattedTime, took); // Render try { if (isCollapsed) { - if (colors.title) logger.groupCollapsed.apply(logger, ['%c ' + title].concat(headerCSS));else logger.groupCollapsed(title); + if (colors.title) logger.groupCollapsed('%c ' + title, titleCSS);else logger.groupCollapsed(title); } else { - if (colors.title) logger.group.apply(logger, ['%c ' + title].concat(headerCSS));else logger.group(title); + if (colors.title) logger.group('%c ' + title, titleCSS);else logger.group(title); } } catch (e) { logger.log(title); @@ -40126,11 +41899,11 @@ function printBuffer(buffer, options) { } if (actionLevel) { - if (colors.action) logger[actionLevel]('%c action ', 'color: ' + colors.action(formattedAction) + '; font-weight: bold', formattedAction);else logger[actionLevel]('action ', formattedAction); + if (colors.action) logger[actionLevel]('%c action', 'color: ' + colors.action(formattedAction) + '; font-weight: bold', formattedAction);else logger[actionLevel]('action', formattedAction); } if (error && errorLevel) { - if (colors.error) logger[errorLevel]('%c error ', 'color: ' + colors.error(error, prevState) + '; font-weight: bold;', error);else logger[errorLevel]('error ', error); + if (colors.error) logger[errorLevel]('%c error', 'color: ' + colors.error(error, prevState) + '; font-weight: bold', error);else logger[errorLevel]('error', error); } if (nextStateLevel) { @@ -40144,13 +41917,13 @@ function printBuffer(buffer, options) { try { logger.groupEnd(); } catch (e) { - logger.log('\u2014\u2014 log end \u2014\u2014'); + logger.log('—— log end ——'); } }); } /***/ }), -/* 478 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40161,14 +41934,12 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = diffLogger; -var _deepDiff = __webpack_require__(479); +var _deepDiff = __webpack_require__(487); var _deepDiff2 = _interopRequireDefault(_deepDiff); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - // https://github.com/flitbit/diff#differences var dictionary = { 'E': { @@ -40194,25 +41965,24 @@ function style(kind) { } function render(diff) { - var kind = diff.kind, - path = diff.path, - lhs = diff.lhs, - rhs = diff.rhs, - index = diff.index, - item = diff.item; - + var kind = diff.kind; + var path = diff.path; + var lhs = diff.lhs; + var rhs = diff.rhs; + var index = diff.index; + var item = diff.item; switch (kind) { case 'E': - return [path.join('.'), lhs, '\u2192', rhs]; + return path.join('.') + ' ' + lhs + ' → ' + rhs; case 'N': - return [path.join('.'), rhs]; + return path.join('.') + ' ' + rhs; case 'D': - return [path.join('.')]; + return '' + path.join('.'); case 'A': return [path.join('.') + '[' + index + ']', item]; default: - return []; + return null; } } @@ -40235,22 +42005,22 @@ function diffLogger(prevState, newState, logger, isCollapsed) { var output = render(elem); - logger.log.apply(logger, ['%c ' + dictionary[kind].text, style(kind)].concat(_toConsumableArray(output))); + logger.log('%c ' + dictionary[kind].text, style(kind), output); }); } else { - logger.log('\u2014\u2014 no diff \u2014\u2014'); + logger.log('—— no diff ——'); } try { logger.groupEnd(); } catch (e) { - logger.log('\u2014\u2014 diff end \u2014\u2014 '); + logger.log('—— diff end —— '); } } module.exports = exports['default']; /***/ }), -/* 479 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @@ -40677,10 +42447,10 @@ module.exports = exports['default']; return accumulateDiff; })); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46))) /***/ }), -/* 480 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40729,10 +42499,10 @@ exports.default = { // Deprecated options transformer: undefined }; -module.exports = exports["default"]; +module.exports = exports['default']; /***/ }), -/* 481 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40743,7 +42513,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.routerMiddleware = exports.routerActions = exports.goForward = exports.goBack = exports.go = exports.replace = exports.push = exports.CALL_HISTORY_METHOD = exports.routerReducer = exports.LOCATION_CHANGE = exports.syncHistoryWithStore = undefined; -var _reducer = __webpack_require__(263); +var _reducer = __webpack_require__(269); Object.defineProperty(exports, 'LOCATION_CHANGE', { enumerable: true, @@ -40758,7 +42528,7 @@ Object.defineProperty(exports, 'routerReducer', { } }); -var _actions = __webpack_require__(264); +var _actions = __webpack_require__(270); Object.defineProperty(exports, 'CALL_HISTORY_METHOD', { enumerable: true, @@ -40803,11 +42573,11 @@ Object.defineProperty(exports, 'routerActions', { } }); -var _sync = __webpack_require__(482); +var _sync = __webpack_require__(490); var _sync2 = _interopRequireDefault(_sync); -var _middleware = __webpack_require__(483); +var _middleware = __webpack_require__(491); var _middleware2 = _interopRequireDefault(_middleware); @@ -40817,7 +42587,7 @@ exports.syncHistoryWithStore = _sync2['default']; exports.routerMiddleware = _middleware2['default']; /***/ }), -/* 482 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40831,7 +42601,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument exports['default'] = syncHistoryWithStore; -var _reducer = __webpack_require__(263); +var _reducer = __webpack_require__(269); var defaultSelectLocationState = function defaultSelectLocationState(state) { return state.routing; @@ -40926,7 +42696,7 @@ function syncHistoryWithStore(history, store) { }; unsubscribeFromHistory = history.listen(handleLocationChange); - // History 3.x doesn't call listen synchronously, so fire the initial location change ourselves + // support history 3.x if (history.getCurrentLocation) { handleLocationChange(history.getCurrentLocation()); } @@ -40952,12 +42722,10 @@ function syncHistoryWithStore(history, store) { } }); - // History 2.x listeners expect a synchronous call. Make the first call to the + // History listeners expect a synchronous call. Make the first call to the // listener after subscribing to the store, in case the listener causes a // location change (e.g. when it redirects) - if (!history.getCurrentLocation) { - listener(lastPublishedLocation); - } + listener(lastPublishedLocation); // Let user unsubscribe later return function () { @@ -40978,7 +42746,7 @@ function syncHistoryWithStore(history, store) { } /***/ }), -/* 483 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40989,7 +42757,7 @@ Object.defineProperty(exports, "__esModule", { }); exports['default'] = routerMiddleware; -var _actions = __webpack_require__(264); +var _actions = __webpack_require__(270); function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } @@ -41017,11 +42785,11 @@ function routerMiddleware(history) { } /***/ }), -/* 484 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { var invariant = __webpack_require__(9); -var defaultClickRejectionStrategy = __webpack_require__(485); +var defaultClickRejectionStrategy = __webpack_require__(493); var alreadyInjected = false; @@ -41042,14 +42810,14 @@ should be injected by the application.' alreadyInjected = true; - __webpack_require__(69).injection.injectEventPluginsByName({ - 'TapEventPlugin': __webpack_require__(486)(shouldRejectClick) + __webpack_require__(74).injection.injectEventPluginsByName({ + 'TapEventPlugin': __webpack_require__(494)(shouldRejectClick) }); }; /***/ }), -/* 485 */ +/* 493 */ /***/ (function(module, exports) { module.exports = function(lastTouchEvent, clickTimestamp) { @@ -41060,7 +42828,7 @@ module.exports = function(lastTouchEvent, clickTimestamp) { /***/ }), -/* 486 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -41085,14 +42853,14 @@ module.exports = function(lastTouchEvent, clickTimestamp) { -var EventConstants = __webpack_require__(487); -var EventPluginUtils = __webpack_require__(103); -var EventPropagators = __webpack_require__(68); -var SyntheticUIEvent = __webpack_require__(71); -var TouchEventUtils = __webpack_require__(488); -var ViewportMetrics = __webpack_require__(144); +var EventConstants = __webpack_require__(495); +var EventPluginUtils = __webpack_require__(106); +var EventPropagators = __webpack_require__(73); +var SyntheticUIEvent = __webpack_require__(76); +var TouchEventUtils = __webpack_require__(496); +var ViewportMetrics = __webpack_require__(150); -var keyOf = __webpack_require__(489); +var keyOf = __webpack_require__(497); var topLevelTypes = EventConstants.topLevelTypes; var isStartish = EventPluginUtils.isStartish; @@ -41238,7 +43006,7 @@ module.exports = createTapEventPlugin; /***/ }), -/* 487 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -41335,7 +43103,7 @@ var EventConstants = { module.exports = EventConstants; /***/ }), -/* 488 */ +/* 496 */ /***/ (function(module, exports) { /** @@ -41383,7 +43151,7 @@ module.exports = TouchEventUtils; /***/ }), -/* 489 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -41423,1020 +43191,649 @@ var keyOf = function keyOf(oneKeyObj) { module.exports = keyOf; /***/ }), -/* 490 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - - - -var Form = function (_Component) { - _inherits(Form, _Component); - - function Form(props, context) { - _classCallCheck(this, Form); - - var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props, context)); - - if (!context._reduxForm) { - throw new Error('Form must be inside a component decorated with reduxForm()'); - } - return _this; - } - - _createClass(Form, [{ - key: 'componentWillMount', - value: function componentWillMount() { - this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit); - } - }, { - key: 'render', - value: function render() { - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('form', this.props); - } - }]); - - return Form; -}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); - -Form.propTypes = { - onSubmit: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired -}; -Form.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object -}; - -/* harmony default export */ __webpack_exports__["a"] = (Form); - -/***/ }), -/* 491 */ +/* 498 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_prefixName__ = __webpack_require__(89); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reducer__ = __webpack_require__(499); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__reduxForm__ = __webpack_require__(525); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Field__ = __webpack_require__(611); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Fields__ = __webpack_require__(616); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__FieldArray__ = __webpack_require__(618); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__formValueSelector__ = __webpack_require__(621); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__values__ = __webpack_require__(622); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__selectors_getFormValues__ = __webpack_require__(623); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__selectors_getFormInitialValues__ = __webpack_require__(624); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__selectors_getFormSyncErrors__ = __webpack_require__(625); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__selectors_getFormAsyncErrors__ = __webpack_require__(626); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__selectors_getFormSubmitErrors__ = __webpack_require__(627); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__selectors_isDirty__ = __webpack_require__(628); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__selectors_isInvalid__ = __webpack_require__(629); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__selectors_isPristine__ = __webpack_require__(296); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__selectors_isValid__ = __webpack_require__(191); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__selectors_isSubmitting__ = __webpack_require__(630); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__selectors_hasSubmitSucceeded__ = __webpack_require__(631); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__selectors_hasSubmitFailed__ = __webpack_require__(632); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__Form__ = __webpack_require__(633); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__FormSection__ = __webpack_require__(634); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__SubmissionError__ = __webpack_require__(289); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__propTypes__ = __webpack_require__(635); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__actions__ = __webpack_require__(288); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__actionTypes__ = __webpack_require__(174); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var FormSection = function (_Component) { - _inherits(FormSection, _Component); - function FormSection(props, context) { - _classCallCheck(this, FormSection); - var _this = _possibleConstructorReturn(this, (FormSection.__proto__ || Object.getPrototypeOf(FormSection)).call(this, props, context)); - if (!context._reduxForm) { - throw new Error('FormSection must be inside a component decorated with reduxForm()'); - } - return _this; - } - _createClass(FormSection, [{ - key: 'getChildContext', - value: function getChildContext() { - var context = this.context, - name = this.props.name; - return { - _reduxForm: _extends({}, context._reduxForm, { - sectionPrefix: Object(__WEBPACK_IMPORTED_MODULE_2__util_prefixName__["a" /* default */])(context, name) - }) - }; - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - children = _props.children, - name = _props.name, - component = _props.component, - rest = _objectWithoutProperties(_props, ['children', 'name', 'component']); - if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(children)) { - return children; - } - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, rest, { - children: children - })); - } - }]); - return FormSection; -}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); -FormSection.propTypes = { - name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired, - component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]) -}; -FormSection.defaultProps = { - component: 'div' -}; -FormSection.childContextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired -}; -FormSection.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object -}; -/* harmony default export */ __webpack_exports__["a"] = (FormSection); -/***/ }), -/* 492 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -function _extendableBuiltin(cls) { - function ExtendableBuiltin() { - cls.apply(this, arguments); - } - ExtendableBuiltin.prototype = Object.create(cls.prototype, { - constructor: { - value: cls, - enumerable: false, - writable: true, - configurable: true - } +var createAll = function createAll(structure) { + return _extends({ + // separate out field actions + actionTypes: __WEBPACK_IMPORTED_MODULE_24__actionTypes__ + }, __WEBPACK_IMPORTED_MODULE_23__actions__, { + Field: __WEBPACK_IMPORTED_MODULE_2__Field__["a" /* default */](structure), + Fields: __WEBPACK_IMPORTED_MODULE_3__Fields__["a" /* default */](structure), + FieldArray: __WEBPACK_IMPORTED_MODULE_4__FieldArray__["a" /* default */](structure), + Form: __WEBPACK_IMPORTED_MODULE_19__Form__["a" /* default */], + FormSection: __WEBPACK_IMPORTED_MODULE_20__FormSection__["a" /* default */], + formValueSelector: __WEBPACK_IMPORTED_MODULE_5__formValueSelector__["a" /* default */](structure), + getFormValues: __WEBPACK_IMPORTED_MODULE_7__selectors_getFormValues__["a" /* default */](structure), + getFormInitialValues: __WEBPACK_IMPORTED_MODULE_8__selectors_getFormInitialValues__["a" /* default */](structure), + getFormSyncErrors: __WEBPACK_IMPORTED_MODULE_9__selectors_getFormSyncErrors__["a" /* default */](structure), + getFormAsyncErrors: __WEBPACK_IMPORTED_MODULE_10__selectors_getFormAsyncErrors__["a" /* default */](structure), + getFormSubmitErrors: __WEBPACK_IMPORTED_MODULE_11__selectors_getFormSubmitErrors__["a" /* default */](structure), + isDirty: __WEBPACK_IMPORTED_MODULE_12__selectors_isDirty__["a" /* default */](structure), + isInvalid: __WEBPACK_IMPORTED_MODULE_13__selectors_isInvalid__["a" /* default */](structure), + isPristine: __WEBPACK_IMPORTED_MODULE_14__selectors_isPristine__["a" /* default */](structure), + isValid: __WEBPACK_IMPORTED_MODULE_15__selectors_isValid__["a" /* default */](structure), + isSubmitting: __WEBPACK_IMPORTED_MODULE_16__selectors_isSubmitting__["a" /* default */](structure), + hasSubmitSucceeded: __WEBPACK_IMPORTED_MODULE_17__selectors_hasSubmitSucceeded__["a" /* default */](structure), + hasSubmitFailed: __WEBPACK_IMPORTED_MODULE_18__selectors_hasSubmitFailed__["a" /* default */](structure), + propTypes: __WEBPACK_IMPORTED_MODULE_22__propTypes__["a" /* default */], + reduxForm: __WEBPACK_IMPORTED_MODULE_1__reduxForm__["a" /* default */](structure), + reducer: __WEBPACK_IMPORTED_MODULE_0__reducer__["a" /* default */](structure), + SubmissionError: __WEBPACK_IMPORTED_MODULE_21__SubmissionError__["a" /* default */], + values: __WEBPACK_IMPORTED_MODULE_6__values__["a" /* default */](structure) }); - - if (Object.setPrototypeOf) { - Object.setPrototypeOf(ExtendableBuiltin, cls); - } else { - ExtendableBuiltin.__proto__ = cls; - } - - return ExtendableBuiltin; -} - -var ExtendableError = function (_extendableBuiltin2) { - _inherits(ExtendableError, _extendableBuiltin2); - - function ExtendableError() { - var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; - - _classCallCheck(this, ExtendableError); - - // extending Error is weird and does not propagate `message` - var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message)); - - Object.defineProperty(_this, 'message', { - configurable: true, - enumerable: false, - value: message, - writable: true - }); - - Object.defineProperty(_this, 'name', { - configurable: true, - enumerable: false, - value: _this.constructor.name, - writable: true - }); - - if (Error.hasOwnProperty('captureStackTrace')) { - Error.captureStackTrace(_this, _this.constructor); - return _possibleConstructorReturn(_this); - } - - Object.defineProperty(_this, 'stack', { - configurable: true, - enumerable: false, - value: new Error(message).stack, - writable: true - }); - return _this; - } - - return ExtendableError; -}(_extendableBuiltin(Error)); - -exports.default = ExtendableError; -module.exports = exports['default']; - - -/***/ }), -/* 493 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return formPropTypes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return fieldInputPropTypes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return fieldMetaPropTypes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return fieldPropTypes; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); - - -var any = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any, - bool = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool, - func = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func, - shape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape, - string = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, - oneOfType = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType, - object = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object; - - -var formPropTypes = { - // State: - anyTouched: bool.isRequired, // true if any of the fields have been marked as touched - asyncValidating: oneOfType([bool, string]).isRequired, // true if async validation is running, a string if a field triggered async validation - dirty: bool.isRequired, // true if any values are different from initialValues - error: any, // form-wide error from '_error' key in validation result - form: string.isRequired, // the name of the form - invalid: bool.isRequired, // true if there are any validation errors - initialized: bool.isRequired, // true if the form has been initialized - initialValues: object, // the initialValues object passed to reduxForm - pristine: bool.isRequired, // true if the values are the same as initialValues - pure: bool.isRequired, // if true, implements shouldComponentUpdate - submitting: bool.isRequired, // true if the form is in the process of being submitted - submitFailed: bool.isRequired, // true if the form was submitted and failed for any reason - submitSucceeded: bool.isRequired, // true if the form was successfully submitted - valid: bool.isRequired, // true if there are no validation errors - warning: any, // form-wide warning from '_warning' key in validation result - // Actions: - array: shape({ - insert: func.isRequired, // function to insert a value into an array field - move: func.isRequired, // function to move a value within an array field - pop: func.isRequired, // function to pop a value off of an array field - push: func.isRequired, // function to push a value onto an array field - remove: func.isRequired, // function to remove a value from an array field - removeAll: func.isRequired, // function to remove all the values from an array field - shift: func.isRequired, // function to shift a value out of an array field - splice: func.isRequired, // function to splice a value into an array field - swap: func.isRequired, // function to swap values in an array field - unshift: func.isRequired // function to unshift a value into an array field - }), - asyncValidate: func.isRequired, // function to trigger async validation - autofill: func.isRequired, // action to set a value of a field and mark it as autofilled - blur: func.isRequired, // action to mark a field as blurred - change: func.isRequired, // action to change the value of a field - clearAsyncError: func.isRequired, // action to clear the async error of a field - destroy: func.isRequired, // action to destroy the form's data in Redux - dispatch: func.isRequired, // the Redux dispatch action - handleSubmit: func.isRequired, // function to submit the form - initialize: func.isRequired, // action to initialize form data - reset: func.isRequired, // action to reset the form data to previously initialized values - touch: func.isRequired, // action to mark fields as touched - submit: func.isRequired, // action to trigger a submission of the specified form - untouch: func.isRequired, // action to mark fields as untouched - - // triggerSubmit - triggerSubmit: bool, // if true, submits the form on componentWillReceiveProps - clearSubmit: func.isRequired // called before a triggered submit, by default clears triggerSubmit }; -var fieldInputPropTypes = { - checked: bool, - name: string.isRequired, - onBlur: func.isRequired, - onChange: func.isRequired, - onDragStart: func.isRequired, - onDrop: func.isRequired, - onFocus: func.isRequired, - value: any -}; - -var fieldMetaPropTypes = { - active: bool.isRequired, - asyncValidating: bool.isRequired, - autofilled: bool.isRequired, - dirty: bool.isRequired, - dispatch: func.isRequired, - error: string, - form: string.isRequired, - invalid: bool.isRequired, - pristine: bool.isRequired, - submitting: bool.isRequired, - submitFailed: bool.isRequired, - touched: bool.isRequired, - valid: bool.isRequired, - visited: bool.isRequired, - warning: string -}; - -var fieldPropTypes = { - input: shape(fieldInputPropTypes).isRequired, - meta: shape(fieldMetaPropTypes).isRequired, - custom: object.isRequired -}; - -/* harmony default export */ __webpack_exports__["a"] = (formPropTypes); - -/***/ }), -/* 494 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createField__ = __webpack_require__(495); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); - - - -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createField__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +/* harmony default export */ __webpack_exports__["a"] = (createAll); /***/ }), -/* 495 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConnectedField__ = __webpack_require__(496); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__ = __webpack_require__(281); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_prefixName__ = __webpack_require__(89); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - - - - - - - -var createField = function createField(_ref) { - var deepEqual = _ref.deepEqual, - getIn = _ref.getIn, - setIn = _ref.setIn, - toJS = _ref.toJS; - - var ConnectedField = Object(__WEBPACK_IMPORTED_MODULE_3__ConnectedField__["a" /* default */])({ - deepEqual: deepEqual, - getIn: getIn, - toJS: toJS - }); - - var Field = function (_Component) { - _inherits(Field, _Component); - - function Field(props, context) { - _classCallCheck(this, Field); - - var _this = _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).call(this, props, context)); - - if (!context._reduxForm) { - throw new Error('Field must be inside a component decorated with reduxForm()'); - } - - _this.normalize = _this.normalize.bind(_this); - return _this; - } - - _createClass(Field, [{ - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return Object(__WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__["a" /* default */])(this, nextProps, nextState); - } - }, { - key: 'componentWillMount', - value: function componentWillMount() { - var _this2 = this; - - this.context._reduxForm.register(this.name, 'Field', function () { - return _this2.props.validate; - }, function () { - return _this2.props.warn; - }); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (this.props.name !== nextProps.name) { - // unregister old name - this.context._reduxForm.unregister(this.name - // register new name - );this.context._reduxForm.register(Object(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */])(this.context, nextProps.name), 'Field'); - } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.context._reduxForm.unregister(this.name); - } - }, { - key: 'getRenderedComponent', - value: function getRenderedComponent() { - __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Field'); - return this.refs.connected.getWrappedInstance().getRenderedComponent(); - } - }, { - key: 'normalize', - value: function normalize(name, value) { - var normalize = this.props.normalize; - - if (!normalize) { - return value; - } - var previousValues = this.context._reduxForm.getValues(); - var previousValue = this.value; - var nextValues = setIn(previousValues, name, value); - return normalize(value, previousValue, nextValues, previousValues); - } - }, { - key: 'render', - value: function render() { - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(ConnectedField, _extends({}, this.props, { - name: this.name, - normalize: this.normalize, - _reduxForm: this.context._reduxForm, - ref: 'connected' - })); - } - }, { - key: 'name', - get: function get() { - return Object(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */])(this.context, this.props.name); - } - }, { - key: 'dirty', - get: function get() { - return !this.pristine; - } - }, { - key: 'pristine', - get: function get() { - return this.refs.connected.getWrappedInstance().isPristine(); - } - }, { - key: 'value', - get: function get() { - return this.refs.connected && this.refs.connected.getWrappedInstance().getValue(); - } - }]); - - return Field; - }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); - - Field.propTypes = { - name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired, - component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired, - format: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - normalize: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - onBlur: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - onChange: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - onFocus: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - onDragStart: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - onDrop: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - parse: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, - validate: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]), - warn: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]), - withRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool - }; - Field.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object - }; - - return Field; -}; - -/* harmony default export */ __webpack_exports__["a"] = (createField); - -/***/ }), -/* 496 */ +/* 499 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(27); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createFieldProps__ = __webpack_require__(269); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(270); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__ = __webpack_require__(499); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__structure_plain__ = __webpack_require__(11); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__ = __webpack_require__(500); +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - - - - - - - -var propsToNotUpdateFor = ['_reduxForm']; - -var isObject = function isObject(entity) { - return entity && (typeof entity === 'undefined' ? 'undefined' : _typeof(entity)) === 'object'; -}; - -var isFunction = function isFunction(entity) { - return entity && typeof entity === 'function'; -}; -var eventPreventDefault = function eventPreventDefault(event) { - if (isObject(event) && isFunction(event.preventDefault)) { - event.preventDefault(); - } -}; -var eventDataTransferGetData = function eventDataTransferGetData(event, key) { - if (isObject(event) && isObject(event.dataTransfer) && isFunction(event.dataTransfer.getData)) { - return event.dataTransfer.getData(key); - } -}; - -var eventDataTransferSetData = function eventDataTransferSetData(event, key, value) { - if (isObject(event) && isObject(event.dataTransfer) && isFunction(event.dataTransfer.setData)) { - event.dataTransfer.setData(key, value); - } -}; +var createReducer = function createReducer(structure) { + var _behaviors; -var createConnectedField = function createConnectedField(_ref) { - var deepEqual = _ref.deepEqual, - getIn = _ref.getIn, - toJS = _ref.toJS; + var deepEqual = structure.deepEqual, + empty = structure.empty, + getIn = structure.getIn, + setIn = structure.setIn, + deleteIn = structure.deleteIn, + fromJS = structure.fromJS, + keys = structure.keys, + size = structure.size, + splice = structure.splice; - var getSyncError = function getSyncError(syncErrors, name) { - var error = __WEBPACK_IMPORTED_MODULE_6__structure_plain__["a" /* default */].getIn(syncErrors, name - // Because the error for this field might not be at a level in the error structure where - // it can be set directly, it might need to be unwrapped from the _error property - );return error && error._error ? error._error : error; + var deleteInWithCleanUp = __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__["a" /* default */](structure); + var doSplice = function doSplice(state, key, field, index, removeNum, value, force) { + var existing = getIn(state, key + '.' + field); + return existing || force ? setIn(state, key + '.' + field, splice(existing, index, removeNum, value)) : state; }; - - var getSyncWarning = function getSyncWarning(syncWarnings, name) { - var warning = getIn(syncWarnings, name - // Because the warning for this field might not be at a level in the warning structure where - // it can be set directly, it might need to be unwrapped from the _warning property - );return warning && warning._warning ? warning._warning : warning; + var rootKeys = ['values', 'fields', 'submitErrors', 'asyncErrors']; + var arraySplice = function arraySplice(state, field, index, removeNum, value) { + var result = state; + var nonValuesValue = value != null ? empty : undefined; + result = doSplice(result, 'values', field, index, removeNum, value, true); + result = doSplice(result, 'fields', field, index, removeNum, nonValuesValue); + result = doSplice(result, 'submitErrors', field, index, removeNum, nonValuesValue); + result = doSplice(result, 'asyncErrors', field, index, removeNum, nonValuesValue); + return result; }; - var ConnectedField = function (_Component) { - _inherits(ConnectedField, _Component); - - function ConnectedField(props) { - _classCallCheck(this, ConnectedField); + var behaviors = (_behaviors = {}, _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], function (state, _ref) { + var _ref$meta = _ref.meta, + field = _ref$meta.field, + index = _ref$meta.index, + payload = _ref.payload; - var _this = _possibleConstructorReturn(this, (ConnectedField.__proto__ || Object.getPrototypeOf(ConnectedField)).call(this, props)); + return arraySplice(state, field, index, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], function (state, _ref2) { + var _ref2$meta = _ref2.meta, + field = _ref2$meta.field, + from = _ref2$meta.from, + to = _ref2$meta.to; - _this.handleChange = _this.handleChange.bind(_this); - _this.handleFocus = _this.handleFocus.bind(_this); - _this.handleBlur = _this.handleBlur.bind(_this); - _this.handleDragStart = _this.handleDragStart.bind(_this); - _this.handleDrop = _this.handleDrop.bind(_this); - return _this; + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + var result = state; + if (length) { + rootKeys.forEach(function (key) { + var path = key + '.' + field; + if (getIn(result, path)) { + var value = getIn(result, path + '[' + from + ']'); + result = setIn(result, path, splice(getIn(result, path), from, 1)); // remove + result = setIn(result, path, splice(getIn(result, path), to, 0, value)); // insert + } + }); } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], function (state, _ref3) { + var field = _ref3.meta.field; - _createClass(ConnectedField, [{ - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps) { - var _this2 = this; + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return length ? arraySplice(state, field, length - 1, 1) : state; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], function (state, _ref4) { + var field = _ref4.meta.field, + payload = _ref4.payload; - var nextPropsKeys = Object.keys(nextProps); - var thisPropsKeys = Object.keys(this.props); - return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { - return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); - }); - } - }, { - key: 'isPristine', - value: function isPristine() { - return this.props.pristine; - } - }, { - key: 'getValue', - value: function getValue() { - return this.props.value; - } - }, { - key: 'getRenderedComponent', - value: function getRenderedComponent() { - return this.refs.renderedComponent; - } - }, { - key: 'handleChange', - value: function handleChange(event) { - var _props = this.props, - name = _props.name, - dispatch = _props.dispatch, - parse = _props.parse, - normalize = _props.normalize, - onChange = _props.onChange, - _reduxForm = _props._reduxForm, - previousValue = _props.value; + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return arraySplice(state, field, length, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], function (state, _ref5) { + var _ref5$meta = _ref5.meta, + field = _ref5$meta.field, + index = _ref5$meta.index; - var newValue = Object(__WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize }); + return arraySplice(state, field, index, 1); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], function (state, _ref6) { + var field = _ref6.meta.field; - var defaultPrevented = false; - if (onChange) { - onChange(_extends({}, event, { - preventDefault: function preventDefault() { - defaultPrevented = true; - return eventPreventDefault(event); - } - }), newValue, previousValue); - } - if (!defaultPrevented) { - // dispatch change action - dispatch(_reduxForm.change(name, newValue)); - } - } - }, { - key: 'handleFocus', - value: function handleFocus(event) { - var _props2 = this.props, - name = _props2.name, - dispatch = _props2.dispatch, - onFocus = _props2.onFocus, - _reduxForm = _props2._reduxForm; + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return length ? arraySplice(state, field, 0, length) : state; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], function (state, _ref7) { + var field = _ref7.meta.field; + return arraySplice(state, field, 0, 1); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], function (state, _ref8) { + var _ref8$meta = _ref8.meta, + field = _ref8$meta.field, + index = _ref8$meta.index, + removeNum = _ref8$meta.removeNum, + payload = _ref8.payload; - var defaultPrevented = false; - if (onFocus) { - onFocus(_extends({}, event, { - preventDefault: function preventDefault() { - defaultPrevented = true; - return eventPreventDefault(event); - } - })); - } + return arraySplice(state, field, index, removeNum, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], function (state, _ref9) { + var _ref9$meta = _ref9.meta, + field = _ref9$meta.field, + indexA = _ref9$meta.indexA, + indexB = _ref9$meta.indexB; - if (!defaultPrevented) { - dispatch(_reduxForm.focus(name)); - } + var result = state; + rootKeys.forEach(function (key) { + var valueA = getIn(result, key + '.' + field + '[' + indexA + ']'); + var valueB = getIn(result, key + '.' + field + '[' + indexB + ']'); + if (valueA !== undefined || valueB !== undefined) { + result = setIn(result, key + '.' + field + '[' + indexA + ']', valueB); + result = setIn(result, key + '.' + field + '[' + indexB + ']', valueA); } - }, { - key: 'handleBlur', - value: function handleBlur(event) { - var _props3 = this.props, - name = _props3.name, - dispatch = _props3.dispatch, - parse = _props3.parse, - normalize = _props3.normalize, - onBlur = _props3.onBlur, - _reduxForm = _props3._reduxForm, - _value = _props3._value, - previousValue = _props3.value; - - var newValue = Object(__WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize } - - // for checkbox and radio, if the value property of checkbox or radio equals - // the value passed by blur event, then fire blur action with previousValue. - );if (newValue === _value && _value !== undefined) { - newValue = previousValue; - } + }); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], function (state, _ref10) { + var field = _ref10.meta.field, + payload = _ref10.payload; - var defaultPrevented = false; - if (onBlur) { - onBlur(_extends({}, event, { - preventDefault: function preventDefault() { - defaultPrevented = true; - return eventPreventDefault(event); - } - }), newValue, previousValue); - } + return arraySplice(state, field, 0, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], function (state, _ref11) { + var field = _ref11.meta.field, + payload = _ref11.payload; - if (!defaultPrevented) { - // dispatch blur action - dispatch(_reduxForm.blur(name, newValue) + var result = state; + result = deleteInWithCleanUp(result, 'asyncErrors.' + field); + result = deleteInWithCleanUp(result, 'submitErrors.' + field); + result = setIn(result, 'fields.' + field + '.autofilled', true); + result = setIn(result, 'values.' + field, payload); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], function (state, _ref12) { + var _ref12$meta = _ref12.meta, + field = _ref12$meta.field, + touch = _ref12$meta.touch, + payload = _ref12.payload; - // call post-blur callback - );if (_reduxForm.asyncValidate) { - _reduxForm.asyncValidate(name, newValue); - } - } - } - }, { - key: 'handleDragStart', - value: function handleDragStart(event) { - var _props4 = this.props, - onDragStart = _props4.onDragStart, - value = _props4.value; + var result = state; + var initial = getIn(result, 'initial.' + field); + if (initial === undefined && payload === '') { + result = deleteInWithCleanUp(result, 'values.' + field); + } else if (payload !== undefined) { + result = setIn(result, 'values.' + field, payload); + } + if (field === getIn(result, 'active')) { + result = deleteIn(result, 'active'); + } + result = deleteIn(result, 'fields.' + field + '.active'); + if (touch) { + result = setIn(result, 'fields.' + field + '.touched', true); + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], function (state, _ref13) { + var _ref13$meta = _ref13.meta, + field = _ref13$meta.field, + touch = _ref13$meta.touch, + persistentSubmitErrors = _ref13$meta.persistentSubmitErrors, + payload = _ref13.payload; - eventDataTransferSetData(event, __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */], value == null ? '' : value); + var result = state; + var initial = getIn(result, 'initial.' + field); + if (initial === undefined && payload === '') { + result = deleteInWithCleanUp(result, 'values.' + field); + } else if (payload !== undefined) { + result = setIn(result, 'values.' + field, payload); + } + result = deleteInWithCleanUp(result, 'asyncErrors.' + field); + if (!persistentSubmitErrors) { + result = deleteInWithCleanUp(result, 'submitErrors.' + field); + } + result = deleteInWithCleanUp(result, 'fields.' + field + '.autofilled'); + if (touch) { + result = setIn(result, 'fields.' + field + '.touched', true); + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], function (state) { + return deleteIn(state, 'triggerSubmit'); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], function (state, _ref14) { + var field = _ref14.meta.field; - if (onDragStart) { - onDragStart(event); - } - } - }, { - key: 'handleDrop', - value: function handleDrop(event) { - var _props5 = this.props, - name = _props5.name, - dispatch = _props5.dispatch, - onDrop = _props5.onDrop, - _reduxForm = _props5._reduxForm, - previousValue = _props5.value; + return deleteIn(state, 'asyncErrors.' + field); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], function (state, _ref15) { + var field = _ref15.meta.field; - var newValue = eventDataTransferGetData(event, __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */]); + var result = state; + var previouslyActive = getIn(state, 'active'); + result = deleteIn(result, 'fields.' + previouslyActive + '.active'); + result = setIn(result, 'fields.' + field + '.visited', true); + result = setIn(result, 'fields.' + field + '.active', true); + result = setIn(result, 'active', field); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], function (state, _ref16) { + var payload = _ref16.payload, + _ref16$meta = _ref16.meta, + keepDirty = _ref16$meta.keepDirty, + keepSubmitSucceeded = _ref16$meta.keepSubmitSucceeded; - var defaultPrevented = false; - if (onDrop) { - onDrop(_extends({}, event, { - preventDefault: function preventDefault() { - defaultPrevented = true; - return eventPreventDefault(event); - } - }), newValue, previousValue); - } + var mapData = fromJS(payload); + var result = empty; // clean all field state - if (!defaultPrevented) { - // dispatch change action - dispatch(_reduxForm.change(name, newValue)); - eventPreventDefault(event); - } - } - }, { - key: 'render', - value: function render() { - var _props6 = this.props, - component = _props6.component, - withRef = _props6.withRef, - name = _props6.name, - _reduxForm = _props6._reduxForm, - normalize = _props6.normalize, - onBlur = _props6.onBlur, - onChange = _props6.onChange, - onFocus = _props6.onFocus, - onDragStart = _props6.onDragStart, - onDrop = _props6.onDrop, - rest = _objectWithoutProperties(_props6, ['component', 'withRef', 'name', '_reduxForm', 'normalize', 'onBlur', 'onChange', 'onFocus', 'onDragStart', 'onDrop']); + // persist old warnings, they will get recalculated if the new form values are different from the old values + var warning = getIn(state, 'warning'); + if (warning) { + result = setIn(result, 'warning', warning); + } + var syncWarnings = getIn(state, 'syncWarnings'); + if (syncWarnings) { + result = setIn(result, 'syncWarnings', syncWarnings); + } - var _createFieldProps = Object(__WEBPACK_IMPORTED_MODULE_3__createFieldProps__["a" /* default */])({ getIn: getIn, toJS: toJS }, name, _extends({}, rest, { - form: _reduxForm.form, - onBlur: this.handleBlur, - onChange: this.handleChange, - onDrop: this.handleDrop, - onDragStart: this.handleDragStart, - onFocus: this.handleFocus - })), - custom = _createFieldProps.custom, - props = _objectWithoutProperties(_createFieldProps, ['custom']); + // persist old errors, they will get recalculated if the new form values are different from the old values + var error = getIn(state, 'error'); + if (error) { + result = setIn(result, 'error', error); + } + var syncErrors = getIn(state, 'syncErrors'); + if (syncErrors) { + result = setIn(result, 'syncErrors', syncErrors); + } - if (withRef) { - custom.ref = 'renderedComponent'; - } - if (typeof component === 'string') { - var input = props.input, - meta = props.meta; // eslint-disable-line no-unused-vars - // flatten input into other props + var registeredFields = getIn(state, 'registeredFields'); + if (registeredFields) { + result = setIn(result, 'registeredFields', registeredFields); + } + var newValues = mapData; + if (keepDirty && registeredFields) { + (function () { + // + // Keep the value of dirty fields while updating the value of + // pristine fields. This way, apps can reinitialize forms while + // avoiding stomping on user edits. + // + // Note 1: The initialize action replaces all initial values + // regardless of keepDirty. + // + // Note 2: When a field is dirty, keepDirty is enabled, and the field + // value is the same as the new initial value for the field, the + // initialize action causes the field to become pristine. That effect + // is what we want. + // + var previousValues = getIn(state, 'values'); + var previousInitialValues = getIn(state, 'initial'); + keys(registeredFields).forEach(function (name) { + var previousInitialValue = getIn(previousInitialValues, name); + var previousValue = getIn(previousValues, name); + if (!deepEqual(previousValue, previousInitialValue)) { + // This field was dirty. Restore the dirty value. + newValues = setIn(newValues, name, previousValue); + } + }); + })(); + } + if (keepSubmitSucceeded && getIn(state, 'submitSucceeded')) { + result = setIn(result, 'submitSucceeded', true); + } + result = setIn(result, 'values', newValues); + result = setIn(result, 'initial', mapData); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], function (state, _ref17) { + var _ref17$payload = _ref17.payload, + name = _ref17$payload.name, + type = _ref17$payload.type; - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, input, custom)); - } else { - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, props, custom)); - } - } - }]); + var key = 'registeredFields[\'' + name + '\']'; + var field = getIn(state, key); + if (field) { + var count = getIn(field, 'count') + 1; + field = setIn(field, 'count', count); + } else { + field = fromJS({ name: name, type: type, count: 1 }); + } + return setIn(state, key, field); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], function (state) { + var result = empty; + var registeredFields = getIn(state, 'registeredFields'); + if (registeredFields) { + result = setIn(result, 'registeredFields', registeredFields); + } + var values = getIn(state, 'initial'); + if (values) { + result = setIn(result, 'values', values); + result = setIn(result, 'initial', values); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], function (state) { + return setIn(state, 'triggerSubmit', true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], function (state, _ref18) { + var field = _ref18.meta.field; - return ConnectedField; - }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + return setIn(state, 'asyncValidating', field || true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], function (state) { + return setIn(state, 'submitting', true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], function (state, _ref19) { + var payload = _ref19.payload; - ConnectedField.propTypes = { - component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired, - props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object - }; + var result = state; + result = deleteIn(result, 'asyncValidating'); + if (payload && Object.keys(payload).length) { + var _error = payload._error, + fieldErrors = _objectWithoutProperties(payload, ['_error']); - var connector = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(function (state, ownProps) { - var name = ownProps.name, - _ownProps$_reduxForm = ownProps._reduxForm, - initialValues = _ownProps$_reduxForm.initialValues, - getFormState = _ownProps$_reduxForm.getFormState; + if (_error) { + result = setIn(result, 'error', _error); + } + if (Object.keys(fieldErrors).length) { + result = setIn(result, 'asyncErrors', fromJS(fieldErrors)); + } else { + result = deleteIn(result, 'asyncErrors'); + } + } else { + result = deleteIn(result, 'error'); + result = deleteIn(result, 'asyncErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], function (state, _ref20) { + var payload = _ref20.payload; - var formState = getFormState(state); - var initialState = getIn(formState, 'initial.' + name); - var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); - var value = getIn(formState, 'values.' + name); - var submitting = getIn(formState, 'submitting'); - var syncError = getSyncError(getIn(formState, 'syncErrors'), name); - var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); - var pristine = deepEqual(value, initial); - return { - asyncError: getIn(formState, 'asyncErrors.' + name), - asyncValidating: getIn(formState, 'asyncValidating') === name, - dirty: !pristine, - pristine: pristine, - state: getIn(formState, 'fields.' + name), - submitError: getIn(formState, 'submitErrors.' + name), - submitFailed: getIn(formState, 'submitFailed'), - submitting: submitting, - syncError: syncError, - syncWarning: syncWarning, - initial: initial, - value: value, - _value: ownProps.value // save value passed in (for checkboxes) - }; - }, undefined, undefined, { withRef: true }); - return connector(ConnectedField); -}; + var result = state; + result = deleteIn(result, 'submitting'); + result = deleteIn(result, 'submitFailed'); + result = deleteIn(result, 'submitSucceeded'); + if (payload && Object.keys(payload).length) { + var _error = payload._error, + fieldErrors = _objectWithoutProperties(payload, ['_error']); -/* harmony default export */ __webpack_exports__["a"] = (createConnectedField); + if (_error) { + result = setIn(result, 'error', _error); + } else { + result = deleteIn(result, 'error'); + } + if (Object.keys(fieldErrors).length) { + result = setIn(result, 'submitErrors', fromJS(fieldErrors)); + } else { + result = deleteIn(result, 'submitErrors'); + } + result = setIn(result, 'submitFailed', true); + } else { + result = setIn(result, 'submitSucceeded', true); + result = deleteIn(result, 'error'); + result = deleteIn(result, 'submitErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], function (state, _ref21) { + var fields = _ref21.meta.fields; -/***/ }), -/* 497 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var result = state; + result = setIn(result, 'submitFailed', true); + result = deleteIn(result, 'submitSucceeded'); + result = deleteIn(result, 'submitting'); + fields.forEach(function (field) { + return result = setIn(result, 'fields.' + field + '.touched', true); + }); + if (fields.length) { + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], function (state) { + var result = state; + result = deleteIn(result, 'submitFailed'); + result = setIn(result, 'submitSucceeded', true); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], function (state, _ref22) { + var fields = _ref22.meta.fields; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(271); + var result = state; + fields.forEach(function (field) { + return result = setIn(result, 'fields.' + field + '.touched', true); + }); + result = setIn(result, 'anyTouched', true); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], function (state, _ref23) { + var _ref23$payload = _ref23.payload, + name = _ref23$payload.name, + destroyOnUnmount = _ref23$payload.destroyOnUnmount; + var result = state; + var key = 'registeredFields[\'' + name + '\']'; + var field = getIn(result, key); + if (!field) { + return result; + } -var getSelectedValues = function getSelectedValues(options) { - var result = []; - if (options) { - for (var index = 0; index < options.length; index++) { - var option = options[index]; - if (option.selected) { - result.push(option.value); + var count = getIn(field, 'count') - 1; + if (count <= 0 && destroyOnUnmount) { + result = deleteIn(result, key); + if (deepEqual(getIn(result, 'registeredFields'), empty)) { + result = deleteIn(result, 'registeredFields'); } + } else { + field = setIn(field, 'count', count); + result = setIn(result, key, field); } - } - return result; -}; + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], function (state, _ref24) { + var fields = _ref24.meta.fields; -var getValue = function getValue(event, isReactNative) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */])(event)) { - if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) { - return event.nativeEvent.text; + var result = state; + fields.forEach(function (field) { + return result = deleteIn(result, 'fields.' + field + '.touched'); + }); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], function (state, _ref25) { + var _ref25$payload = _ref25.payload, + syncErrors = _ref25$payload.syncErrors, + error = _ref25$payload.error; + + var result = state; + if (error) { + result = setIn(result, 'error', error); + result = setIn(result, 'syncError', true); + } else { + result = deleteIn(result, 'error'); + result = deleteIn(result, 'syncError'); } - if (isReactNative && event.nativeEvent !== undefined) { - return event.nativeEvent.text; + if (Object.keys(syncErrors).length) { + result = setIn(result, 'syncErrors', syncErrors); + } else { + result = deleteIn(result, 'syncErrors'); } - var _event$target = event.target, - type = _event$target.type, - value = _event$target.value, - checked = _event$target.checked, - files = _event$target.files, - dataTransfer = event.dataTransfer; + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], function (state, _ref26) { + var _ref26$payload = _ref26.payload, + syncWarnings = _ref26$payload.syncWarnings, + warning = _ref26$payload.warning; - if (type === 'checkbox') { - return checked || ''; - } - if (type === 'file') { - return files || dataTransfer && dataTransfer.files; + var result = state; + if (warning) { + result = setIn(result, 'warning', warning); + } else { + result = deleteIn(result, 'warning'); } - if (type === 'select-multiple') { - return getSelectedValues(event.target.options); + if (Object.keys(syncWarnings).length) { + result = setIn(result, 'syncWarnings', syncWarnings); + } else { + result = deleteIn(result, 'syncWarnings'); } - return value; - } - return event; -}; - -/* harmony default export */ __webpack_exports__["a"] = (getValue); - -/***/ }), -/* 498 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var isReactNative = typeof window !== 'undefined' && window.navigator && window.navigator.product && window.navigator.product === 'ReactNative'; + return result; + }), _behaviors); -/* harmony default export */ __webpack_exports__["a"] = (isReactNative); + var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments[1]; -/***/ }), -/* 499 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var behavior = behaviors[action.type]; + return behavior ? behavior(state, action) : state; + }; -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dataKey; }); -var dataKey = 'text'; + var byForm = function byForm(reducer) { + return function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -/***/ }), -/* 500 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var form = action && action.meta && action.meta.form; + if (!form) { + return state; + } + if (action.type === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"]) { + return action.meta.form.reduce(function (result, form) { + return deleteInWithCleanUp(result, form); + }, state); + } + var formState = getIn(state, form); + var result = reducer(formState, action); + return result === formState ? state : setIn(state, form, result); + }; + }; -"use strict"; -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + /** + * Adds additional functionality to the reducer + */ + function decorate(target) { + target.plugin = function plugin(reducers) { + var _this = this; -var splice = function splice(array, index, removeNum, value) { - array = array || []; + // use 'function' keyword to enable 'this' + return decorate(function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return Object.keys(reducers).reduce(function (accumulator, key) { + var previousState = getIn(accumulator, key); + var nextState = reducers[key](previousState, action, getIn(state, key)); + return nextState === previousState ? accumulator : setIn(accumulator, key, nextState); + }, _this(state, action)); + }); + }; - if (index < array.length) { - if (value === undefined && !removeNum) { - // inserting undefined - var _copy2 = [].concat(_toConsumableArray(array)); - _copy2.splice(index, 0, null); - _copy2[index] = undefined; - return _copy2; - } - if (value != null) { - var _copy3 = [].concat(_toConsumableArray(array)); - _copy3.splice(index, removeNum, value // removing and adding - );return _copy3; - } - var _copy = [].concat(_toConsumableArray(array)); - _copy.splice(index, removeNum // removing - );return _copy; - } - if (removeNum) { - // trying to remove non-existant item: return original array - return array; + return target; } - // trying to add outside of range: just set value - var copy = [].concat(_toConsumableArray(array)); - copy[index] = value; - return copy; + + return decorate(byForm(reducer)); }; -/* harmony default export */ __webpack_exports__["a"] = (splice); +/* harmony default export */ __webpack_exports__["a"] = (createReducer); /***/ }), -/* 501 */ +/* 500 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(114); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(117); -var getIn = function getIn(state, field) { - if (!state) { - return state; - } +var createDeleteInWithCleanUp = function createDeleteInWithCleanUp(_ref) { + var deepEqual = _ref.deepEqual, + empty = _ref.empty, + getIn = _ref.getIn, + deleteIn = _ref.deleteIn, + setIn = _ref.setIn; - var path = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(field); - var length = path.length; - if (!length) { - return undefined; - } - var result = state; - for (var i = 0; i < length && !!result; ++i) { - result = result[path[i]]; - } + var deleteInWithCleanUp = function deleteInWithCleanUp(state, path) { + if (path[path.length - 1] === ']') { + // array path + var pathTokens = __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](path); + pathTokens.pop(); + var parent = getIn(state, pathTokens.join('.')); + return parent ? setIn(state, path, undefined) : state; + } + var result = deleteIn(state, path); + var dotIndex = path.lastIndexOf('.'); + if (dotIndex > 0) { + var parentPath = path.substring(0, dotIndex); + if (parentPath[parentPath.length - 1] !== ']') { + var _parent = getIn(result, parentPath); + if (deepEqual(_parent, empty)) { + return deleteInWithCleanUp(result, parentPath); + } + } + } + return result; + }; - return result; + return deleteInWithCleanUp; }; -/* harmony default export */ __webpack_exports__["a"] = (getIn); +/* harmony default export */ __webpack_exports__["a"] = (createDeleteInWithCleanUp); /***/ }), -/* 502 */ +/* 501 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoize_js__ = __webpack_require__(503); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoize_js__ = __webpack_require__(502); /** Used as the maximum memoize cache size. */ @@ -42451,7 +43848,7 @@ var MAX_MEMOIZE_SIZE = 500; * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { - var result = Object(__WEBPACK_IMPORTED_MODULE_0__memoize_js__["a" /* default */])(func, function(key) { + var result = __WEBPACK_IMPORTED_MODULE_0__memoize_js__["a" /* default */](func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } @@ -42466,11 +43863,11 @@ function memoizeCapped(func) { /***/ }), -/* 503 */ +/* 502 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(168); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(175); /** Error message constants. */ @@ -42547,13 +43944,13 @@ memoize.Cache = __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; /***/ }), -/* 504 */ +/* 503 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Hash_js__ = __webpack_require__(505); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ListCache_js__ = __webpack_require__(117); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Map_js__ = __webpack_require__(170); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Hash_js__ = __webpack_require__(504); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ListCache_js__ = __webpack_require__(120); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Map_js__ = __webpack_require__(177); @@ -42578,15 +43975,15 @@ function mapCacheClear() { /***/ }), -/* 505 */ +/* 504 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hashClear_js__ = __webpack_require__(506); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__ = __webpack_require__(511); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hashGet_js__ = __webpack_require__(512); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__hashHas_js__ = __webpack_require__(513); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__hashSet_js__ = __webpack_require__(514); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hashClear_js__ = __webpack_require__(505); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__ = __webpack_require__(510); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hashGet_js__ = __webpack_require__(511); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__hashHas_js__ = __webpack_require__(512); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__hashSet_js__ = __webpack_require__(513); @@ -42622,11 +44019,11 @@ Hash.prototype.set = __WEBPACK_IMPORTED_MODULE_4__hashSet_js__["a" /* default */ /***/ }), -/* 506 */ +/* 505 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(116); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(119); /** @@ -42637,7 +44034,7 @@ Hash.prototype.set = __WEBPACK_IMPORTED_MODULE_4__hashSet_js__["a" /* default */ * @memberOf Hash */ function hashClear() { - this.__data__ = __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? Object(__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */])(null) : {}; + this.__data__ = __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */](null) : {}; this.size = 0; } @@ -42645,14 +44042,14 @@ function hashClear() { /***/ }), -/* 507 */ +/* 506 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(169); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isMasked_js__ = __webpack_require__(508); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(48); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toSource_js__ = __webpack_require__(275); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isMasked_js__ = __webpack_require__(507); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toSource_js__ = __webpack_require__(274); @@ -42692,22 +44089,22 @@ var reIsNative = RegExp('^' + * else `false`. */ function baseIsNative(value) { - if (!Object(__WEBPACK_IMPORTED_MODULE_2__isObject_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_1__isMasked_js__["a" /* default */])(value)) { + if (!__WEBPACK_IMPORTED_MODULE_2__isObject_js__["a" /* default */](value) || __WEBPACK_IMPORTED_MODULE_1__isMasked_js__["a" /* default */](value)) { return false; } - var pattern = Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(value) ? reIsNative : reIsHostCtor; - return pattern.test(Object(__WEBPACK_IMPORTED_MODULE_3__toSource_js__["a" /* default */])(value)); + var pattern = __WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */](value) ? reIsNative : reIsHostCtor; + return pattern.test(__WEBPACK_IMPORTED_MODULE_3__toSource_js__["a" /* default */](value)); } /* harmony default export */ __webpack_exports__["a"] = (baseIsNative); /***/ }), -/* 508 */ +/* 507 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__ = __webpack_require__(509); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__ = __webpack_require__(508); /** Used to detect methods masquerading as native. */ @@ -42731,11 +44128,11 @@ function isMasked(func) { /***/ }), -/* 509 */ +/* 508 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29); /** Used to detect overreaching core-js shims. */ @@ -42745,7 +44142,7 @@ var coreJsData = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */]['__co /***/ }), -/* 510 */ +/* 509 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -42765,7 +44162,7 @@ function getValue(object, key) { /***/ }), -/* 511 */ +/* 510 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -42789,11 +44186,11 @@ function hashDelete(key) { /***/ }), -/* 512 */ +/* 511 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(116); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(119); /** Used to stand-in for `undefined` hash values. */ @@ -42827,557 +44224,1340 @@ function hashGet(key) { /***/ }), -/* 513 */ +/* 512 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(119); + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +/* harmony default export */ __webpack_exports__["a"] = (hashHas); + + +/***/ }), +/* 513 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(119); + + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashSet); + + +/***/ }), +/* 514 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheClear); + + +/***/ }), +/* 515 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(121); + + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheDelete); + + +/***/ }), +/* 516 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(121); + + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheGet); + + +/***/ }), +/* 517 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(121); + + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](this.__data__, key) > -1; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheHas); + + +/***/ }), +/* 518 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(121); + + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheSet); + + +/***/ }), +/* 519 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(122); + + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheDelete); + + +/***/ }), +/* 520 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/* harmony default export */ __webpack_exports__["a"] = (isKeyable); + + +/***/ }), +/* 521 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(122); + + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key).get(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheGet); + + +/***/ }), +/* 522 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(116); - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(122); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; /** - * Checks if a hash value for `key` exists. + * Checks if a map value for `key` exists. * * @private * @name has - * @memberOf Hash + * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function hashHas(key) { - var data = this.__data__; - return __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +function mapCacheHas(key) { + return __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key).has(key); } -/* harmony default export */ __webpack_exports__["a"] = (hashHas); +/* harmony default export */ __webpack_exports__["a"] = (mapCacheHas); /***/ }), -/* 514 */ +/* 523 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(116); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(122); -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - /** - * Sets the hash `key` to `value`. + * Sets the map `key` to `value`. * * @private * @name set - * @memberOf Hash + * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. + * @returns {Object} Returns the map cache instance. */ -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] && value === undefined) ? HASH_UNDEFINED : value; +function mapCacheSet(key, value) { + var data = __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; return this; } -/* harmony default export */ __webpack_exports__["a"] = (hashSet); +/* harmony default export */ __webpack_exports__["a"] = (mapCacheSet); /***/ }), -/* 515 */ +/* 524 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; - this.size = 0; -} - -/* harmony default export */ __webpack_exports__["a"] = (listCacheClear); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(116); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(271); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(118); -/***/ }), -/* 516 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(118); -/** Used for built-in method references. */ -var arrayProto = Array.prototype; +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; -/** Built-in value references. */ -var splice = arrayProto.splice; +/** Used to convert symbols to primitives and strings. */ +var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; /** - * Removes `key` and its value from the list cache. + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. * * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * @param {*} value The value to process. + * @returns {string} Returns the string. */ -function listCacheDelete(key) { - var data = this.__data__, - index = Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(data, key); - - if (index < 0) { - return false; +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); + if (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value)) { + // Recursively convert values (susceptible to call stack limits). + return __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */](value, baseToString) + ''; } - --this.size; - return true; + if (__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */](value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } -/* harmony default export */ __webpack_exports__["a"] = (listCacheDelete); +/* harmony default export */ __webpack_exports__["a"] = (baseToString); /***/ }), -/* 517 */ +/* 525 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(118); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__ = __webpack_require__(526); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__ = __webpack_require__(282); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = __webpack_require__(168); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux__ = __webpack_require__(19); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_redux__ = __webpack_require__(115); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_is_promise__ = __webpack_require__(190); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_is_promise__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util_getDisplayName__ = __webpack_require__(597); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__actions__ = __webpack_require__(288); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__handleSubmit__ = __webpack_require__(598); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__events_silenceEvent__ = __webpack_require__(290); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__events_silenceEvents__ = __webpack_require__(600); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__asyncValidation__ = __webpack_require__(601); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__defaultShouldAsyncValidate__ = __webpack_require__(602); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__defaultShouldValidate__ = __webpack_require__(603); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__structure_plain__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__generateValidator__ = __webpack_require__(609); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__selectors_isValid__ = __webpack_require__(191); -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(data, key); - return index < 0 ? undefined : data[index][1]; -} +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -/* harmony default export */ __webpack_exports__["a"] = (listCacheGet); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/***/ }), -/* 518 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(118); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(this.__data__, key) > -1; -} +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } -/* harmony default export */ __webpack_exports__["a"] = (listCacheHas); +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -/***/ }), -/* 519 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(118); + + + + + + + + + + + + + + +var isClassComponent = function isClassComponent(Component) { + return Boolean(Component && Component.prototype && _typeof(Component.prototype.isReactComponent) === 'object'); +}; + +// extract field-specific actions + +var arrayInsert = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayInsert"], + arrayMove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayMove"], + arrayPop = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPop"], + arrayPush = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPush"], + arrayRemove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemove"], + arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemoveAll"], + arrayShift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayShift"], + arraySplice = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySplice"], + arraySwap = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySwap"], + arrayUnshift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayUnshift"], + blur = __WEBPACK_IMPORTED_MODULE_8__actions__["blur"], + change = __WEBPACK_IMPORTED_MODULE_8__actions__["change"], + focus = __WEBPACK_IMPORTED_MODULE_8__actions__["focus"], + formActions = _objectWithoutProperties(__WEBPACK_IMPORTED_MODULE_8__actions__, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'blur', 'change', 'focus']); + +var arrayActions = { + arrayInsert: arrayInsert, + arrayMove: arrayMove, + arrayPop: arrayPop, + arrayPush: arrayPush, + arrayRemove: arrayRemove, + arrayRemoveAll: arrayRemoveAll, + arrayShift: arrayShift, + arraySplice: arraySplice, + arraySwap: arraySwap, + arrayUnshift: arrayUnshift +}; + +var propsToNotUpdateFor = [].concat(_toConsumableArray(Object.keys(__WEBPACK_IMPORTED_MODULE_8__actions__)), ['array', 'asyncErrors', 'initialized', 'initialValues', 'syncErrors', 'syncWarnings', 'values', 'registeredFields']); + +var checkSubmit = function checkSubmit(submit) { + if (!submit || typeof submit !== 'function') { + throw new Error('You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop'); + } + return submit; +}; + /** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. + * The decorator that is the main API to redux-form */ -function listCacheSet(key, value) { - var data = this.__data__, - index = Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(data, key); +var createReduxForm = function createReduxForm(structure) { + var deepEqual = structure.deepEqual, + empty = structure.empty, + getIn = structure.getIn, + setIn = structure.setIn, + keys = structure.keys, + fromJS = structure.fromJS; - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} + var isValid = __WEBPACK_IMPORTED_MODULE_17__selectors_isValid__["a" /* default */](structure); + return function (initialConfig) { + var config = _extends({ + touchOnBlur: true, + touchOnChange: false, + persistentSubmitErrors: false, + destroyOnUnmount: true, + shouldAsyncValidate: __WEBPACK_IMPORTED_MODULE_13__defaultShouldAsyncValidate__["a" /* default */], + shouldValidate: __WEBPACK_IMPORTED_MODULE_14__defaultShouldValidate__["a" /* default */], + enableReinitialize: false, + keepDirtyOnReinitialize: false, + getFormState: function getFormState(state) { + return getIn(state, 'form'); + }, + pure: true, + forceUnregisterOnUnmount: false + }, initialConfig); -/* harmony default export */ __webpack_exports__["a"] = (listCacheSet); + return function (WrappedComponent) { + var Form = function (_Component) { + _inherits(Form, _Component); + + function Form(props) { + _classCallCheck(this, Form); + + var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props)); + + _this.submit = _this.submit.bind(_this); + _this.reset = _this.reset.bind(_this); + _this.asyncValidate = _this.asyncValidate.bind(_this); + _this.getValues = _this.getValues.bind(_this); + _this.register = _this.register.bind(_this); + _this.unregister = _this.unregister.bind(_this); + _this.submitCompleted = _this.submitCompleted.bind(_this); + _this.submitFailed = _this.submitFailed.bind(_this); + _this.fieldValidators = {}; + _this.lastFieldValidatorKeys = []; + _this.fieldWarners = {}; + _this.lastFieldWarnerKeys = []; + return _this; + } + + _createClass(Form, [{ + key: 'getChildContext', + value: function getChildContext() { + var _this2 = this; + + return { + _reduxForm: _extends({}, this.props, { + getFormState: function getFormState(state) { + return getIn(_this2.props.getFormState(state), _this2.props.form); + }, + asyncValidate: this.asyncValidate, + getValues: this.getValues, + sectionPrefix: undefined, + register: this.register, + unregister: this.unregister, + registerInnerOnSubmit: function registerInnerOnSubmit(innerOnSubmit) { + return _this2.innerOnSubmit = innerOnSubmit; + } + }) + }; + } + }, { + key: 'initIfNeeded', + value: function initIfNeeded(nextProps) { + var enableReinitialize = this.props.enableReinitialize; + + if (nextProps) { + if ((enableReinitialize || !nextProps.initialized) && !deepEqual(this.props.initialValues, nextProps.initialValues)) { + var keepDirty = nextProps.initialized && this.props.keepDirtyOnReinitialize; + this.props.initialize(nextProps.initialValues, keepDirty); + } + } else if (this.props.initialValues && (!this.props.initialized || enableReinitialize)) { + this.props.initialize(this.props.initialValues, this.props.keepDirtyOnReinitialize); + } + } + }, { + key: 'updateSyncErrorsIfNeeded', + value: function updateSyncErrorsIfNeeded(nextSyncErrors, nextError) { + var _props = this.props, + error = _props.error, + syncErrors = _props.syncErrors, + updateSyncErrors = _props.updateSyncErrors; + + var noErrors = (!syncErrors || !Object.keys(syncErrors).length) && !error; + var nextNoErrors = (!nextSyncErrors || !Object.keys(nextSyncErrors).length) && !nextError; + if (!(noErrors && nextNoErrors) && (!__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(syncErrors, nextSyncErrors) || !__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(error, nextError))) { + updateSyncErrors(nextSyncErrors, nextError); + } + } + }, { + key: 'submitIfNeeded', + value: function submitIfNeeded(nextProps) { + var _props2 = this.props, + clearSubmit = _props2.clearSubmit, + triggerSubmit = _props2.triggerSubmit; + + if (!triggerSubmit && nextProps.triggerSubmit) { + clearSubmit(); + this.submit(); + } + } + }, { + key: 'validateIfNeeded', + value: function validateIfNeeded(nextProps) { + var _props3 = this.props, + shouldValidate = _props3.shouldValidate, + validate = _props3.validate, + values = _props3.values; + + var fieldLevelValidate = this.generateValidator(); + if (validate || fieldLevelValidate) { + var initialRender = nextProps === undefined; + var fieldValidatorKeys = Object.keys(this.fieldValidators); + var shouldValidateResult = shouldValidate({ + values: values, + nextProps: nextProps, + props: this.props, + initialRender: initialRender, + lastFieldValidatorKeys: this.lastFieldValidatorKeys, + fieldValidatorKeys: fieldValidatorKeys, + structure: structure + }); + + if (shouldValidateResult) { + var propsToValidate = initialRender ? this.props : nextProps; + + var _merge2 = __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */](validate ? validate(propsToValidate.values, propsToValidate) || {} : {}, fieldLevelValidate ? fieldLevelValidate(propsToValidate.values, propsToValidate) || {} : {}), + _error = _merge2._error, + nextSyncErrors = _objectWithoutProperties(_merge2, ['_error']); + + this.lastFieldValidatorKeys = fieldValidatorKeys; + this.updateSyncErrorsIfNeeded(nextSyncErrors, _error); + } + } + } + }, { + key: 'updateSyncWarningsIfNeeded', + value: function updateSyncWarningsIfNeeded(nextSyncWarnings, nextWarning) { + var _props4 = this.props, + warning = _props4.warning, + syncWarnings = _props4.syncWarnings, + updateSyncWarnings = _props4.updateSyncWarnings; + + var noWarnings = (!syncWarnings || !Object.keys(syncWarnings).length) && !warning; + var nextNoWarnings = (!nextSyncWarnings || !Object.keys(nextSyncWarnings).length) && !nextWarning; + if (!(noWarnings && nextNoWarnings) && (!__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(syncWarnings, nextSyncWarnings) || !__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(warning, nextWarning))) { + updateSyncWarnings(nextSyncWarnings, nextWarning); + } + } + }, { + key: 'warnIfNeeded', + value: function warnIfNeeded(nextProps) { + var _props5 = this.props, + shouldValidate = _props5.shouldValidate, + warn = _props5.warn, + values = _props5.values; + + var fieldLevelWarn = this.generateWarner(); + if (warn || fieldLevelWarn) { + var initialRender = nextProps === undefined; + var fieldWarnerKeys = Object.keys(this.fieldWarners); + var shouldWarnResult = shouldValidate({ + values: values, + nextProps: nextProps, + props: this.props, + initialRender: initialRender, + lastFieldValidatorKeys: this.lastFieldWarnerKeys, + fieldValidatorKeys: fieldWarnerKeys, + structure: structure + }); + + if (shouldWarnResult) { + var propsToWarn = initialRender ? this.props : nextProps; + + var _merge3 = __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */](warn ? warn(propsToWarn.values, propsToWarn) : {}, fieldLevelWarn ? fieldLevelWarn(propsToWarn.values, propsToWarn) : {}), + _warning = _merge3._warning, + nextSyncWarnings = _objectWithoutProperties(_merge3, ['_warning']); + + this.lastFieldWarnerKeys = fieldWarnerKeys; + this.updateSyncWarningsIfNeeded(nextSyncWarnings, _warning); + } + } + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + this.initIfNeeded(); + this.validateIfNeeded(); + this.warnIfNeeded(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.initIfNeeded(nextProps); + this.validateIfNeeded(nextProps); + this.warnIfNeeded(nextProps); + this.submitIfNeeded(nextProps); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this3 = this; + + if (!config.pure) return true; + return Object.keys(nextProps).some(function (prop) { + // useful to debug rerenders + // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { + // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) + // } + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); + }); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + var _props6 = this.props, + destroyOnUnmount = _props6.destroyOnUnmount, + destroy = _props6.destroy; + + if (destroyOnUnmount) { + this.destroyed = true; + destroy(); + } + } + }, { + key: 'getValues', + value: function getValues() { + return this.props.values; + } + }, { + key: 'isValid', + value: function isValid() { + return this.props.valid; + } + }, { + key: 'isPristine', + value: function isPristine() { + return this.props.pristine; + } + }, { + key: 'register', + value: function register(name, type, getValidator, getWarner) { + this.props.registerField(name, type); + if (getValidator) { + this.fieldValidators[name] = getValidator; + } + if (getWarner) { + this.fieldWarners[name] = getWarner; + } + } + }, { + key: 'unregister', + value: function unregister(name) { + if (!this.destroyed) { + if (this.props.destroyOnUnmount || this.props.forceUnregisterOnUnmount) { + this.props.unregisterField(name); + delete this.fieldValidators[name]; + delete this.fieldWarners[name]; + } else { + this.props.unregisterField(name, false); + } + } + } + }, { + key: 'getFieldList', + value: function getFieldList(options) { + var registeredFields = this.props.registeredFields; + var list = []; + if (!registeredFields) { + return list; + } + var keySeq = keys(registeredFields); + if (options && options.excludeFieldArray) { + keySeq = keySeq.filter(function (name) { + return getIn(registeredFields, '[\'' + name + '\'].type') !== 'FieldArray'; + }); + } + return fromJS(keySeq.reduce(function (acc, key) { + acc.push(key); + return acc; + }, list)); + } + }, { + key: 'generateValidator', + value: function generateValidator() { + var _this4 = this; + + var validators = {}; + Object.keys(this.fieldValidators).forEach(function (name) { + var validator = _this4.fieldValidators[name](); + if (validator) { + validators[name] = validator; + } + }); + return Object.keys(validators).length ? __WEBPACK_IMPORTED_MODULE_16__generateValidator__["a" /* default */](validators, structure) : undefined; + } + }, { + key: 'generateWarner', + value: function generateWarner() { + var _this5 = this; + var warners = {}; + Object.keys(this.fieldWarners).forEach(function (name) { + var warner = _this5.fieldWarners[name](); + if (warner) { + warners[name] = warner; + } + }); + return Object.keys(warners).length ? __WEBPACK_IMPORTED_MODULE_16__generateValidator__["a" /* default */](warners, structure) : undefined; + } + }, { + key: 'asyncValidate', + value: function asyncValidate(name, value) { + var _this6 = this; -/***/ }), -/* 520 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var _props7 = this.props, + asyncBlurFields = _props7.asyncBlurFields, + asyncErrors = _props7.asyncErrors, + asyncValidate = _props7.asyncValidate, + dispatch = _props7.dispatch, + initialized = _props7.initialized, + pristine = _props7.pristine, + shouldAsyncValidate = _props7.shouldAsyncValidate, + startAsyncValidation = _props7.startAsyncValidation, + stopAsyncValidation = _props7.stopAsyncValidation, + syncErrors = _props7.syncErrors, + values = _props7.values; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(119); + var submitting = !name; + if (asyncValidate) { + var _ret = function () { + var valuesToValidate = submitting ? values : setIn(values, name, value); + var syncValidationPasses = submitting || !getIn(syncErrors, name); + var isBlurredField = !submitting && (!asyncBlurFields || ~asyncBlurFields.indexOf(name.replace(/\[[0-9]+\]/g, '[]'))); + if ((isBlurredField || submitting) && shouldAsyncValidate({ + asyncErrors: asyncErrors, + initialized: initialized, + trigger: submitting ? 'submit' : 'blur', + blurredField: name, + pristine: pristine, + syncValidationPasses: syncValidationPasses + })) { + return { + v: __WEBPACK_IMPORTED_MODULE_12__asyncValidation__["a" /* default */](function () { + return asyncValidate(valuesToValidate, dispatch, _this6.props, name); + }, startAsyncValidation, stopAsyncValidation, name) + }; + } + }(); + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } + } + }, { + key: 'submitCompleted', + value: function submitCompleted(result) { + delete this.submitPromise; + return result; + } + }, { + key: 'submitFailed', + value: function submitFailed(error) { + delete this.submitPromise; + throw error; + } + }, { + key: 'listenToSubmit', + value: function listenToSubmit(promise) { + if (!__WEBPACK_IMPORTED_MODULE_6_is_promise___default.a(promise)) { + return promise; + } + this.submitPromise = promise; + return promise.then(this.submitCompleted, this.submitFailed); + } + }, { + key: 'submit', + value: function submit(submitOrEvent) { + var _this7 = this; -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - var result = Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; -} + var onSubmit = this.props.onSubmit; -/* harmony default export */ __webpack_exports__["a"] = (mapCacheDelete); + if (!submitOrEvent || __WEBPACK_IMPORTED_MODULE_10__events_silenceEvent__["a" /* default */](submitOrEvent)) { + // submitOrEvent is an event: fire submit if not already submitting + if (!this.submitPromise) { + if (this.innerOnSubmit) { + // will call "submitOrEvent is the submit function" block below + return this.innerOnSubmit(); + } else { + return this.listenToSubmit(__WEBPACK_IMPORTED_MODULE_9__handleSubmit__["a" /* default */](checkSubmit(onSubmit), this.props, this.props.validExceptSubmit, this.asyncValidate, this.getFieldList({ excludeFieldArray: true }))); + } + } + } else { + // submitOrEvent is the submit function: return deferred submit thunk + return __WEBPACK_IMPORTED_MODULE_11__events_silenceEvents__["a" /* default */](function () { + return !_this7.submitPromise && _this7.listenToSubmit(__WEBPACK_IMPORTED_MODULE_9__handleSubmit__["a" /* default */](checkSubmit(submitOrEvent), _this7.props, _this7.props.validExceptSubmit, _this7.asyncValidate, _this7.getFieldList({ excludeFieldArray: true }))); + }); + } + } + }, { + key: 'reset', + value: function reset() { + this.props.reset(); + } + }, { + key: 'render', + value: function render() { + // remove some redux-form config-only props + /* eslint-disable no-unused-vars */ + var _props8 = this.props, + anyTouched = _props8.anyTouched, + arrayInsert = _props8.arrayInsert, + arrayMove = _props8.arrayMove, + arrayPop = _props8.arrayPop, + arrayPush = _props8.arrayPush, + arrayRemove = _props8.arrayRemove, + arrayRemoveAll = _props8.arrayRemoveAll, + arrayShift = _props8.arrayShift, + arraySplice = _props8.arraySplice, + arraySwap = _props8.arraySwap, + arrayUnshift = _props8.arrayUnshift, + asyncErrors = _props8.asyncErrors, + asyncValidate = _props8.asyncValidate, + asyncValidating = _props8.asyncValidating, + blur = _props8.blur, + change = _props8.change, + destroy = _props8.destroy, + destroyOnUnmount = _props8.destroyOnUnmount, + forceUnregisterOnUnmount = _props8.forceUnregisterOnUnmount, + dirty = _props8.dirty, + dispatch = _props8.dispatch, + enableReinitialize = _props8.enableReinitialize, + error = _props8.error, + focus = _props8.focus, + form = _props8.form, + getFormState = _props8.getFormState, + initialize = _props8.initialize, + initialized = _props8.initialized, + initialValues = _props8.initialValues, + invalid = _props8.invalid, + keepDirtyOnReinitialize = _props8.keepDirtyOnReinitialize, + pristine = _props8.pristine, + propNamespace = _props8.propNamespace, + registeredFields = _props8.registeredFields, + registerField = _props8.registerField, + reset = _props8.reset, + setSubmitFailed = _props8.setSubmitFailed, + setSubmitSucceeded = _props8.setSubmitSucceeded, + shouldAsyncValidate = _props8.shouldAsyncValidate, + shouldValidate = _props8.shouldValidate, + startAsyncValidation = _props8.startAsyncValidation, + startSubmit = _props8.startSubmit, + stopAsyncValidation = _props8.stopAsyncValidation, + stopSubmit = _props8.stopSubmit, + submitting = _props8.submitting, + submitFailed = _props8.submitFailed, + submitSucceeded = _props8.submitSucceeded, + touch = _props8.touch, + touchOnBlur = _props8.touchOnBlur, + touchOnChange = _props8.touchOnChange, + persistentSubmitErrors = _props8.persistentSubmitErrors, + syncErrors = _props8.syncErrors, + syncWarnings = _props8.syncWarnings, + unregisterField = _props8.unregisterField, + untouch = _props8.untouch, + updateSyncErrors = _props8.updateSyncErrors, + updateSyncWarnings = _props8.updateSyncWarnings, + valid = _props8.valid, + validExceptSubmit = _props8.validExceptSubmit, + values = _props8.values, + warning = _props8.warning, + rest = _objectWithoutProperties(_props8, ['anyTouched', 'arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'blur', 'change', 'destroy', 'destroyOnUnmount', 'forceUnregisterOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'focus', 'form', 'getFormState', 'initialize', 'initialized', 'initialValues', 'invalid', 'keepDirtyOnReinitialize', 'pristine', 'propNamespace', 'registeredFields', 'registerField', 'reset', 'setSubmitFailed', 'setSubmitSucceeded', 'shouldAsyncValidate', 'shouldValidate', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitting', 'submitFailed', 'submitSucceeded', 'touch', 'touchOnBlur', 'touchOnChange', 'persistentSubmitErrors', 'syncErrors', 'syncWarnings', 'unregisterField', 'untouch', 'updateSyncErrors', 'updateSyncWarnings', 'valid', 'validExceptSubmit', 'values', 'warning']); + /* eslint-enable no-unused-vars */ -/***/ }), -/* 521 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} + var reduxFormProps = _extends({ + anyTouched: anyTouched, + asyncValidate: this.asyncValidate, + asyncValidating: asyncValidating + }, __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"]({ blur: blur, change: change }, dispatch), { + destroy: destroy, + dirty: dirty, + dispatch: dispatch, + error: error, + form: form, + handleSubmit: this.submit, + initialize: initialize, + initialized: initialized, + initialValues: initialValues, + invalid: invalid, + pristine: pristine, + reset: reset, + submitting: submitting, + submitFailed: submitFailed, + submitSucceeded: submitSucceeded, + touch: touch, + untouch: untouch, + valid: valid, + warning: warning + }); + var propsToPass = _extends({}, propNamespace ? _defineProperty({}, propNamespace, reduxFormProps) : reduxFormProps, rest); + if (isClassComponent(WrappedComponent)) { + propsToPass.ref = 'wrapped'; + } + return __WEBPACK_IMPORTED_MODULE_2_react__["createElement"](WrappedComponent, propsToPass); + } + }]); -/* harmony default export */ __webpack_exports__["a"] = (isKeyable); + return Form; + }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); + Form.displayName = 'Form(' + __WEBPACK_IMPORTED_MODULE_7__util_getDisplayName__["a" /* default */](WrappedComponent) + ')'; + Form.WrappedComponent = WrappedComponent; + Form.childContextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].object.isRequired + }; + Form.propTypes = { + destroyOnUnmount: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + forceUnregisterOnUnmount: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + form: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].string.isRequired, + initialValues: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].object, + getFormState: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + onSubmitFail: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + onSubmitSuccess: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + propNameSpace: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].string, + validate: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + warn: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + touchOnBlur: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + touchOnChange: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + triggerSubmit: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + persistentSubmitErrors: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + registeredFields: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].any + }; -/***/ }), -/* 522 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var connector = __WEBPACK_IMPORTED_MODULE_4_react_redux__["connect"](function (state, props) { + var form = props.form, + getFormState = props.getFormState, + initialValues = props.initialValues, + enableReinitialize = props.enableReinitialize, + keepDirtyOnReinitialize = props.keepDirtyOnReinitialize; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(119); + var formState = getIn(getFormState(state) || empty, form) || empty; + var stateInitial = getIn(formState, 'initial'); + var initialized = !!stateInitial; + var shouldUpdateInitialValues = enableReinitialize && initialized && !deepEqual(initialValues, stateInitial); + var shouldResetValues = shouldUpdateInitialValues && !keepDirtyOnReinitialize; -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key).get(key); -} + var initial = initialValues || stateInitial || empty; -/* harmony default export */ __webpack_exports__["a"] = (mapCacheGet); + if (shouldUpdateInitialValues) { + initial = stateInitial || empty; + } + var values = getIn(formState, 'values') || initial; -/***/ }), -/* 523 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (shouldResetValues) { + values = initial; + } -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(119); + var pristine = shouldResetValues || deepEqual(initial, values); + var asyncErrors = getIn(formState, 'asyncErrors'); + var syncErrors = getIn(formState, 'syncErrors') || {}; + var syncWarnings = getIn(formState, 'syncWarnings') || {}; + var registeredFields = getIn(formState, 'registeredFields'); + var valid = isValid(form, getFormState, false)(state); + var validExceptSubmit = isValid(form, getFormState, true)(state); + var anyTouched = !!getIn(formState, 'anyTouched'); + var submitting = !!getIn(formState, 'submitting'); + var submitFailed = !!getIn(formState, 'submitFailed'); + var submitSucceeded = !!getIn(formState, 'submitSucceeded'); + var error = getIn(formState, 'error'); + var warning = getIn(formState, 'warning'); + var triggerSubmit = getIn(formState, 'triggerSubmit'); + return { + anyTouched: anyTouched, + asyncErrors: asyncErrors, + asyncValidating: getIn(formState, 'asyncValidating') || false, + dirty: !pristine, + error: error, + initialized: initialized, + invalid: !valid, + pristine: pristine, + registeredFields: registeredFields, + submitting: submitting, + submitFailed: submitFailed, + submitSucceeded: submitSucceeded, + syncErrors: syncErrors, + syncWarnings: syncWarnings, + triggerSubmit: triggerSubmit, + values: values, + valid: valid, + validExceptSubmit: validExceptSubmit, + warning: warning + }; + }, function (dispatch, initialProps) { + var bindForm = function bindForm(actionCreator) { + return actionCreator.bind(null, initialProps.form); + }; + // Bind the first parameter on `props.form` + var boundFormACs = __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */](formActions, bindForm); + var boundArrayACs = __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */](arrayActions, bindForm); + var boundBlur = function boundBlur(field, value) { + return blur(initialProps.form, field, value, !!initialProps.touchOnBlur); + }; + var boundChange = function boundChange(field, value) { + return change(initialProps.form, field, value, !!initialProps.touchOnChange, !!initialProps.persistentSubmitErrors); + }; + var boundFocus = bindForm(focus); -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key).has(key); -} + // Wrap action creators with `dispatch` + var connectedFormACs = __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundFormACs, dispatch); + var connectedArrayACs = { + insert: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayInsert, dispatch), + move: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayMove, dispatch), + pop: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayPop, dispatch), + push: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayPush, dispatch), + remove: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayRemove, dispatch), + removeAll: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayRemoveAll, dispatch), + shift: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayShift, dispatch), + splice: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arraySplice, dispatch), + swap: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arraySwap, dispatch), + unshift: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayUnshift, dispatch) + }; -/* harmony default export */ __webpack_exports__["a"] = (mapCacheHas); + var computedActions = _extends({}, connectedFormACs, boundArrayACs, { + blur: boundBlur, + change: boundChange, + array: connectedArrayACs, + focus: boundFocus, + dispatch: dispatch + }); + return function () { + return computedActions; + }; + }, undefined, { withRef: true }); + var ConnectedForm = __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default.a(connector(Form), WrappedComponent); + ConnectedForm.defaultProps = config; -/***/ }), -/* 524 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // build outer component to expose instance api + return function (_Component2) { + _inherits(ReduxForm, _Component2); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(119); + function ReduxForm() { + _classCallCheck(this, ReduxForm); + return _possibleConstructorReturn(this, (ReduxForm.__proto__ || Object.getPrototypeOf(ReduxForm)).apply(this, arguments)); + } -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - var data = Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key), - size = data.size; + _createClass(ReduxForm, [{ + key: 'submit', + value: function submit() { + return this.refs.wrapped.getWrappedInstance().submit(); + } + }, { + key: 'reset', + value: function reset() { + return this.refs.wrapped.getWrappedInstance().reset(); + } + }, { + key: 'render', + value: function render() { + var _props9 = this.props, + initialValues = _props9.initialValues, + rest = _objectWithoutProperties(_props9, ['initialValues']); - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; -} + return __WEBPACK_IMPORTED_MODULE_2_react__["createElement"](ConnectedForm, _extends({}, rest, { + ref: 'wrapped', + // convert initialValues if need to + initialValues: fromJS(initialValues) + })); + } + }, { + key: 'valid', + get: function get() { + return this.refs.wrapped.getWrappedInstance().isValid(); + } + }, { + key: 'invalid', + get: function get() { + return !this.valid; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.wrapped.getWrappedInstance().isPristine(); + } + }, { + key: 'dirty', + get: function get() { + return !this.pristine; + } + }, { + key: 'values', + get: function get() { + return this.refs.wrapped.getWrappedInstance().getValues(); + } + }, { + key: 'fieldList', + get: function get() { + // mainly provided for testing + return this.refs.wrapped.getWrappedInstance().getFieldList(); + } + }, { + key: 'wrappedInstance', + get: function get() { + // for testine + return this.refs.wrapped.getWrappedInstance().refs.wrapped; + } + }]); -/* harmony default export */ __webpack_exports__["a"] = (mapCacheSet); + return ReduxForm; + }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); + }; + }; +}; +/* harmony default export */ __webpack_exports__["a"] = (createReduxForm); /***/ }), -/* 525 */ +/* 526 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(272); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(115); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__ = __webpack_require__(527); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(552); - - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value)) { - // Recursively convert values (susceptible to call stack limits). - return Object(__WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */])(value, baseToString) + ''; - } - if (Object(__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */])(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/* harmony default export */ __webpack_exports__["a"] = (baseToString); - - -/***/ }), -/* 526 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(114); - - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -var setInWithPath = function setInWithPath(state, value, path, pathIndex) { - if (pathIndex >= path.length) { - return value; - } - - var first = path[pathIndex]; - var next = setInWithPath(state && state[first], value, path, pathIndex + 1); - - if (!state) { - var initialized = isNaN(first) ? {} : []; - initialized[first] = next; - return initialized; - } - - if (Array.isArray(state)) { - var copy = [].concat(state); - copy[first] = next; - return copy; - } - - return _extends({}, state, _defineProperty({}, first, next)); -}; +var merge = __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */](function(object, source, srcIndex) { + __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__["a" /* default */](object, source, srcIndex); +}); -var setIn = function setIn(state, field, value) { - return setInWithPath(state, value, Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(field), 0); -}; +/* harmony default export */ __webpack_exports__["a"] = (merge); -/* harmony default export */ __webpack_exports__["a"] = (setIn); /***/ }), /* 527 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(277); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__ = __webpack_require__(276); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseFor_js__ = __webpack_require__(278); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__ = __webpack_require__(534); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isObject_js__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keysIn_js__ = __webpack_require__(280); + + -var customizer = function customizer(obj, other) { - if (obj === other) return true; - if ((obj == null || obj === '' || obj === false) && (other == null || other === '' || other === false)) return true; - - if (obj && other && obj._error !== other._error) return false; - if (obj && other && obj._warning !== other._warning) return false; -}; - -var deepEqual = function deepEqual(a, b) { - return Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */])(a, b, customizer); -}; - -/* harmony default export */ __webpack_exports__["a"] = (deepEqual); - -/***/ }), -/* 528 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(172); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__ = __webpack_require__(278); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__ = __webpack_require__(539); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__ = __webpack_require__(542); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getTag_js__ = __webpack_require__(557); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArray_js__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__ = __webpack_require__(175); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__ = __webpack_require__(178); - - - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = Object(__WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */])(object), - othIsArr = Object(__WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */])(other), - objTag = objIsArr ? arrayTag : Object(__WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */])(object), - othTag = othIsArr ? arrayTag : Object(__WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */])(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && Object(__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */])(object)) { - if (!Object(__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */])(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); - return (objIsArr || Object(__WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__["a" /* default */])(object)) - ? Object(__WEBPACK_IMPORTED_MODULE_1__equalArrays_js__["a" /* default */])(object, other, bitmask, customizer, equalFunc, stack) - : Object(__WEBPACK_IMPORTED_MODULE_2__equalByTag_js__["a" /* default */])(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + __WEBPACK_IMPORTED_MODULE_2__baseFor_js__["a" /* default */](source, function(srcValue, key) { + if (__WEBPACK_IMPORTED_MODULE_4__isObject_js__["a" /* default */](srcValue)) { stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__["a" /* default */](object, source, key, srcIndex, baseMerge, customizer, stack); } - } - if (!isSameTag) { - return false; - } - stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); - return Object(__WEBPACK_IMPORTED_MODULE_3__equalObjects_js__["a" /* default */])(object, other, bitmask, customizer, equalFunc, stack); + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__["a" /* default */](object, key, newValue); + } + }, __WEBPACK_IMPORTED_MODULE_5__keysIn_js__["a" /* default */]); } -/* harmony default export */ __webpack_exports__["a"] = (baseIsEqualDeep); +/* harmony default export */ __webpack_exports__["a"] = (baseMerge); /***/ }), -/* 529 */ +/* 528 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(117); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(120); /** @@ -43396,7 +45576,7 @@ function stackClear() { /***/ }), -/* 530 */ +/* 529 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -43421,7 +45601,7 @@ function stackDelete(key) { /***/ }), -/* 531 */ +/* 530 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -43442,7 +45622,7 @@ function stackGet(key) { /***/ }), -/* 532 */ +/* 531 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -43463,13 +45643,13 @@ function stackHas(key) { /***/ }), -/* 533 */ +/* 532 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(117); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(170); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MapCache_js__ = __webpack_require__(168); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(120); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(177); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MapCache_js__ = __webpack_require__(175); @@ -43506,41 +45686,150 @@ function stackSet(key, value) { /* harmony default export */ __webpack_exports__["a"] = (stackSet); +/***/ }), +/* 533 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (createBaseFor); + + /***/ }), /* 534 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(168); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__ = __webpack_require__(535); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__ = __webpack_require__(536); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__ = __webpack_require__(276); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__ = __webpack_require__(535); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__ = __webpack_require__(536); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__copyArray_js__ = __webpack_require__(272); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__ = __webpack_require__(538); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArguments_js__ = __webpack_require__(181); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__ = __webpack_require__(541); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__isFunction_js__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__isObject_js__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__ = __webpack_require__(173); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__ = __webpack_require__(184); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__ = __webpack_require__(546); + + + + + + + + + + + /** - * - * Creates an array cache object to store unique values. + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. * * @private - * @constructor - * @param {Array} [values] The values to cache. + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); - this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; - while (++index < length) { - this.add(values[index]); + if (stacked) { + __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */](object, key, stacked); + return; } -} + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__["a" /* default */]; -SetCache.prototype.has = __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__["a" /* default */]; + var isCommon = newValue === undefined; -/* harmony default export */ __webpack_exports__["a"] = (SetCache); + if (isCommon) { + var isArr = __WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */](srcValue), + isBuff = !isArr && __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__["a" /* default */](srcValue), + isTyped = !isArr && !isBuff && __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__["a" /* default */](srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */](objValue)) { + newValue = objValue; + } + else if (__WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__["a" /* default */](objValue)) { + newValue = __WEBPACK_IMPORTED_MODULE_3__copyArray_js__["a" /* default */](objValue); + } + else if (isBuff) { + isCommon = false; + newValue = __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__["a" /* default */](srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__["a" /* default */](srcValue, true); + } + else { + newValue = []; + } + } + else if (__WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__["a" /* default */](srcValue) || __WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */](srcValue)) { + newValue = objValue; + if (__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */](objValue)) { + newValue = __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__["a" /* default */](objValue); + } + else if (!__WEBPACK_IMPORTED_MODULE_10__isObject_js__["a" /* default */](objValue) || (srcIndex && __WEBPACK_IMPORTED_MODULE_9__isFunction_js__["a" /* default */](objValue))) { + newValue = __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__["a" /* default */](srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */](object, key, newValue); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMergeDeep); /***/ }), @@ -43548,46 +45837,67 @@ SetCache.prototype.has = __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__["a" /* de /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29); + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** - * Adds `value` to the array cache. + * Creates a clone of `buffer`. * * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; } -/* harmony default export */ __webpack_exports__["a"] = (setCacheAdd); +/* harmony default export */ __webpack_exports__["a"] = (cloneBuffer); +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(179)(module))) /***/ }), /* 536 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__ = __webpack_require__(537); + + /** - * Checks if `value` is in the array cache. + * Creates a clone of `typedArray`. * * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. */ -function setCacheHas(value) { - return this.__data__.has(value); +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__["a" /* default */](typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } -/* harmony default export */ __webpack_exports__["a"] = (setCacheHas); +/* harmony default export */ __webpack_exports__["a"] = (cloneTypedArray); /***/ }), @@ -43595,236 +45905,472 @@ function setCacheHas(value) { /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__ = __webpack_require__(279); + + /** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. + * Creates a clone of `arrayBuffer`. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](result).set(new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](arrayBuffer)); + return result; +} - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; +/* harmony default export */ __webpack_exports__["a"] = (cloneArrayBuffer); + + +/***/ }), +/* 538 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(539); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(260); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isPrototype_js__ = __webpack_require__(180); + + + + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !__WEBPACK_IMPORTED_MODULE_2__isPrototype_js__["a" /* default */](object)) + ? __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */](object)) + : {}; +} + +/* harmony default export */ __webpack_exports__["a"] = (initCloneObject); + + +/***/ }), +/* 539 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(47); + + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](proto)) { + return {}; } - } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +/* harmony default export */ __webpack_exports__["a"] = (baseCreate); + + +/***/ }), +/* 540 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(81); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59); + + + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) == argsTag; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsArguments); + + +/***/ }), +/* 541 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(124); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59); + + + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isArrayLikeObject); + + +/***/ }), +/* 542 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { return false; } -/* harmony default export */ __webpack_exports__["a"] = (arraySome); +/* harmony default export */ __webpack_exports__["a"] = (stubFalse); + + +/***/ }), +/* 543 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(81); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(182); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(59); + + + + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */](value) && + __WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */](value.length) && !!typedArrayTags[__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value)]; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsTypedArray); + + +/***/ }), +/* 544 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseUnary); + + +/***/ }), +/* 545 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(259); + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */].process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* harmony default export */ __webpack_exports__["a"] = (nodeUtil); +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(179)(module))) /***/ }), -/* 538 */ +/* 546 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(547); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keysIn_js__ = __webpack_require__(280); + + + /** - * Checks if a `cache` value for `key` exists. + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } */ -function cacheHas(cache, key) { - return cache.has(key); +function toPlainObject(value) { + return __WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */](value, __WEBPACK_IMPORTED_MODULE_1__keysIn_js__["a" /* default */](value)); } -/* harmony default export */ __webpack_exports__["a"] = (cacheHas); +/* harmony default export */ __webpack_exports__["a"] = (toPlainObject); /***/ }), -/* 539 */ +/* 547 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__ = __webpack_require__(279); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__eq_js__ = __webpack_require__(90); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__ = __webpack_require__(278); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__ = __webpack_require__(540); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__setToArray_js__ = __webpack_require__(541); - - - - - - - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignValue_js__ = __webpack_require__(548); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__ = __webpack_require__(123); -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; -/** Used to convert symbols to primitives and strings. */ -var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * Copies properties of `source` to `object`. * * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](object), new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return Object(__WEBPACK_IMPORTED_MODULE_2__eq_js__["a" /* default */])(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__["a" /* default */]; +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = __WEBPACK_IMPORTED_MODULE_5__setToArray_js__["a" /* default */]); + var index = -1, + length = props.length; - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; + while (++index < length) { + var key = props[index]; - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = Object(__WEBPACK_IMPORTED_MODULE_3__equalArrays_js__["a" /* default */])(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__["a" /* default */](object, key, newValue); + } else { + __WEBPACK_IMPORTED_MODULE_0__assignValue_js__["a" /* default */](object, key, newValue); + } } - return false; + return object; } -/* harmony default export */ __webpack_exports__["a"] = (equalByTag); +/* harmony default export */ __webpack_exports__["a"] = (copyObject); /***/ }), -/* 540 */ +/* 548 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(123); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(92); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + /** - * Converts `map` to its key-value pairs. + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. * * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && __WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */](objValue, value)) || + (value === undefined && !(key in object))) { + __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](object, key, value); + } } -/* harmony default export */ __webpack_exports__["a"] = (mapToArray); +/* harmony default export */ __webpack_exports__["a"] = (assignValue); /***/ }), -/* 541 */ +/* 549 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** - * Converts `set` to an array of its values. + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. * * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. */ -function setToArray(set) { +function baseTimes(n, iteratee) { var index = -1, - result = Array(set.size); + result = Array(n); - set.forEach(function(value) { - result[++index] = value; - }); + while (++index < n) { + result[index] = iteratee(index); + } return result; } -/* harmony default export */ __webpack_exports__["a"] = (setToArray); +/* harmony default export */ __webpack_exports__["a"] = (baseTimes); /***/ }), -/* 542 */ +/* 550 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__ = __webpack_require__(543); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__ = __webpack_require__(180); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__ = __webpack_require__(551); + -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -43833,476 +46379,407 @@ var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = Object(__WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */])(object), - objLength = objProps.length, - othProps = Object(__WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */])(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); +function baseKeysIn(object) { + if (!__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](object)) { + return __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__["a" /* default */](object); } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; + var isProto = __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__["a" /* default */](object), + result = []; - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); } } - stack['delete'](object); - stack['delete'](other); return result; } -/* harmony default export */ __webpack_exports__["a"] = (equalObjects); +/* harmony default export */ __webpack_exports__["a"] = (baseKeysIn); /***/ }), -/* 543 */ +/* 551 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__ = __webpack_require__(544); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__ = __webpack_require__(546); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(173); - - - - /** - * Creates an array of own enumerable property names and symbols of `object`. + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. + * @returns {Array} Returns the array of property names. */ -function getAllKeys(object) { - return Object(__WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__["a" /* default */])(object, __WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__["a" /* default */]); +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; } -/* harmony default export */ __webpack_exports__["a"] = (getAllKeys); +/* harmony default export */ __webpack_exports__["a"] = (nativeKeysIn); /***/ }), -/* 544 */ +/* 552 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__ = __webpack_require__(545); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(553); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(560); /** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. + * Creates a function like `_.assign`. * * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */])(object) ? result : Object(__WEBPACK_IMPORTED_MODULE_0__arrayPush_js__["a" /* default */])(result, symbolsFunc(object)); +function createAssigner(assigner) { + return __WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */](function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */](sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); } -/* harmony default export */ __webpack_exports__["a"] = (baseGetAllKeys); +/* harmony default export */ __webpack_exports__["a"] = (createAssigner); /***/ }), -/* 545 */ +/* 553 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(186); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__overRest_js__ = __webpack_require__(554); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setToString_js__ = __webpack_require__(556); + + + + /** - * Appends the elements of `values` to `array`. + * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; +function baseRest(func, start) { + return __WEBPACK_IMPORTED_MODULE_2__setToString_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__overRest_js__["a" /* default */](func, start, __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */]), func + ''); } -/* harmony default export */ __webpack_exports__["a"] = (arrayPush); +/* harmony default export */ __webpack_exports__["a"] = (baseRest); /***/ }), -/* 546 */ +/* 554 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(547); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubArray_js__ = __webpack_require__(548); - - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(555); -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; +var nativeMax = Math.max; /** - * Creates an array of the own enumerable symbols of `object`. + * A specialized version of `baseRest` which transforms the rest array. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. */ -var getSymbols = !nativeGetSymbols ? __WEBPACK_IMPORTED_MODULE_1__stubArray_js__["a" /* default */] : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return Object(__WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */])(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); -/* harmony default export */ __webpack_exports__["a"] = (getSymbols); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return __WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */](func, this, otherArgs); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (overRest); /***/ }), -/* 547 */ +/* 555 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); } - return result; + return func.apply(thisArg, args); } -/* harmony default export */ __webpack_exports__["a"] = (arrayFilter); +/* harmony default export */ __webpack_exports__["a"] = (apply); /***/ }), -/* 548 */ +/* 556 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/* harmony default export */ __webpack_exports__["a"] = (stubArray); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__ = __webpack_require__(557); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shortOut_js__ = __webpack_require__(559); -/***/ }), -/* 549 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. + * Sets the `toString` method of `func` to return `string`. * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = __WEBPACK_IMPORTED_MODULE_1__shortOut_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__["a" /* default */]); -/* harmony default export */ __webpack_exports__["a"] = (baseTimes); +/* harmony default export */ __webpack_exports__["a"] = (setToString); /***/ }), -/* 550 */ +/* 557 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(558); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__ = __webpack_require__(277); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(186); -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; /** - * The base implementation of `_.isArguments`. + * The base implementation of `setToString` without support for hot loop shorting. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ -function baseIsArguments(value) { - return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == argsTag; -} +var baseSetToString = !__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */] : function(func, string) { + return __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */](func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': __WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */](string), + 'writable': true + }); +}; -/* harmony default export */ __webpack_exports__["a"] = (baseIsArguments); +/* harmony default export */ __webpack_exports__["a"] = (baseSetToString); /***/ }), -/* 551 */ +/* 558 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** - * This method returns `false`. + * Creates a function that returns `value`. * * @static * @memberOf _ - * @since 4.13.0 + * @since 2.4.0 * @category Util - * @returns {boolean} Returns `false`. + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. * @example * - * _.times(2, _.stubFalse); - * // => [false, false] + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true */ -function stubFalse() { - return false; +function constant(value) { + return function() { + return value; + }; } -/* harmony default export */ __webpack_exports__["a"] = (stubFalse); +/* harmony default export */ __webpack_exports__["a"] = (constant); /***/ }), -/* 552 */ +/* 559 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(179); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(54); - - - - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; /** - * The base implementation of `_.isTypedArray` without Node.js optimizations. + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. */ -function baseIsTypedArray(value) { - return Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) && - Object(__WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */])(value.length) && !!typedArrayTags[Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value)]; +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; } -/* harmony default export */ __webpack_exports__["a"] = (baseIsTypedArray); +/* harmony default export */ __webpack_exports__["a"] = (shortOut); /***/ }), -/* 553 */ +/* 560 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(92); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(124); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isIndex_js__ = __webpack_require__(185); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isObject_js__ = __webpack_require__(47); + + + + + /** - * The base implementation of `_.unary` without support for storing metadata. + * Checks if the given arguments are from an iteratee call. * * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. */ -function baseUnary(func) { - return function(value) { - return func(value); - }; +function isIterateeCall(value, index, object) { + if (!__WEBPACK_IMPORTED_MODULE_3__isObject_js__["a" /* default */](object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */](object) && __WEBPACK_IMPORTED_MODULE_2__isIndex_js__["a" /* default */](index, object.length)) + : (type == 'string' && index in object) + ) { + return __WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */](object[index], value); + } + return false; } -/* harmony default export */ __webpack_exports__["a"] = (baseUnary); +/* harmony default export */ __webpack_exports__["a"] = (isIterateeCall); /***/ }), -/* 554 */ +/* 561 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(253); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFor_js__ = __webpack_require__(278); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(187); -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */].process; -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} -}()); +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && __WEBPACK_IMPORTED_MODULE_0__baseFor_js__["a" /* default */](object, iteratee, __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]); +} -/* harmony default export */ __webpack_exports__["a"] = (nodeUtil); +/* harmony default export */ __webpack_exports__["a"] = (baseForOwn); -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(176)(module))) /***/ }), -/* 555 */ +/* 562 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPrototype_js__ = __webpack_require__(180); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__ = __webpack_require__(556); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__ = __webpack_require__(563); @@ -44320,8 +46797,8 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @returns {Array} Returns the array of property names. */ function baseKeys(object) { - if (!Object(__WEBPACK_IMPORTED_MODULE_0__isPrototype_js__["a" /* default */])(object)) { - return Object(__WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__["a" /* default */])(object); + if (!__WEBPACK_IMPORTED_MODULE_0__isPrototype_js__["a" /* default */](object)) { + return __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__["a" /* default */](object); } var result = []; for (var key in Object(object)) { @@ -44336,758 +46813,865 @@ function baseKeys(object) { /***/ }), -/* 556 */ +/* 563 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(255); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(261); /* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.keys, Object); +var nativeKeys = __WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */](Object.keys, Object); /* harmony default export */ __webpack_exports__["a"] = (nativeKeys); /***/ }), -/* 557 */ +/* 564 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DataView_js__ = __webpack_require__(558); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(170); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Promise_js__ = __webpack_require__(559); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Set_js__ = __webpack_require__(560); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__ = __webpack_require__(561); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__ = __webpack_require__(76); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toSource_js__ = __webpack_require__(275); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__ = __webpack_require__(565); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__ = __webpack_require__(589); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(186); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__property_js__ = __webpack_require__(594); +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */]; + } + if (typeof value == 'object') { + return __WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */](value) + ? __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__["a" /* default */](value[0], value[1]) + : __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__["a" /* default */](value); + } + return __WEBPACK_IMPORTED_MODULE_4__property_js__["a" /* default */](value); +} +/* harmony default export */ __webpack_exports__["a"] = (baseIteratee); + + +/***/ }), +/* 565 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__ = __webpack_require__(566); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__ = __webpack_require__(588); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__ = __webpack_require__(285); -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - setTag = '[object Set]', - weakMapTag = '[object WeakMap]'; -var dataViewTag = '[object DataView]'; -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */]), - mapCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]), - promiseCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */]), - setCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]), - weakMapCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]); /** - * Gets the `toStringTag` of `value`. + * The base implementation of `_.matches` which doesn't clone `source`. * * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. */ -var getTag = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */]; - -// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. -if ((__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */](new ArrayBuffer(1))) != dataViewTag) || - (__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]) != mapTag) || - (__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */] && getTag(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */].resolve()) != promiseTag) || - (__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]) != setTag) || - (__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]) != weakMapTag)) { - getTag = function(value) { - var result = Object(__WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */])(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(Ctor) : ''; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; +function baseMatches(source) { + var matchData = __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__["a" /* default */](source); + if (matchData.length == 1 && matchData[0][2]) { + return __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__["a" /* default */](matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__["a" /* default */](object, source, matchData); }; } -/* harmony default export */ __webpack_exports__["a"] = (getTag); +/* harmony default export */ __webpack_exports__["a"] = (baseMatches); /***/ }), -/* 558 */ +/* 566 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__ = __webpack_require__(188); -/* Built-in method references that are verified to be native. */ -var DataView = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'DataView'); +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; -/* harmony default export */ __webpack_exports__["a"] = (DataView); +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__["a" /* default */](srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsMatch); /***/ }), -/* 559 */ +/* 567 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__ = __webpack_require__(283); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__ = __webpack_require__(573); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__ = __webpack_require__(576); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getTag_js__ = __webpack_require__(583); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__ = __webpack_require__(184); -/* Built-in method references that are verified to be native. */ -var Promise = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Promise'); -/* harmony default export */ __webpack_exports__["a"] = (Promise); -/***/ }), -/* 560 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32); +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; -/* Built-in method references that are verified to be native. */ -var Set = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Set'); +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; -/* harmony default export */ __webpack_exports__["a"] = (Set); +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = __WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */](object), + othIsArr = __WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */](other), + objTag = objIsArr ? arrayTag : __WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */](object), + othTag = othIsArr ? arrayTag : __WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */](other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */](object)) { + if (!__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */](other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return (objIsArr || __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__["a" /* default */](object)) + ? __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__["a" /* default */](object, other, bitmask, customizer, equalFunc, stack) + : __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__["a" /* default */](object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__["a" /* default */](object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsEqualDeep); /***/ }), -/* 561 */ +/* 568 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(175); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__ = __webpack_require__(569); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__ = __webpack_require__(570); -/* Built-in method references that are verified to be native. */ -var WeakMap = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'WeakMap'); -/* harmony default export */ __webpack_exports__["a"] = (WeakMap); +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__["a" /* default */]; +SetCache.prototype.has = __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (SetCache); /***/ }), -/* 562 */ +/* 569 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(114); - +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +/* harmony default export */ __webpack_exports__["a"] = (setCacheAdd); -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } -var deleteInWithPath = function deleteInWithPath(state, first) { - for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - rest[_key - 2] = arguments[_key]; - } +/***/ }), +/* 570 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (state === undefined || first === undefined) { - return state; - } - if (rest.length) { - if (Array.isArray(state)) { - if (first < state.length) { - var result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); - if (result !== state[first]) { - var copy = [].concat(_toConsumableArray(state)); - copy[first] = result; - return copy; - } - } - return state; - } - if (first in state) { - var _result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); - return state[first] === _result ? state : _extends({}, state, _defineProperty({}, first, _result)); - } - return state; - } - if (Array.isArray(state)) { - if (isNaN(first)) { - throw new Error('Cannot delete non-numerical index from an array'); - } - if (first < state.length) { - var _copy = [].concat(_toConsumableArray(state)); - _copy.splice(first, 1); - return _copy; - } - return state; - } - if (first in state) { - var _copy2 = _extends({}, state); - delete _copy2[first]; - return _copy2; - } - return state; -}; +"use strict"; +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} -var deleteIn = function deleteIn(state, field) { - return deleteInWithPath.apply(undefined, [state].concat(_toConsumableArray(Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(field)))); -}; +/* harmony default export */ __webpack_exports__["a"] = (setCacheHas); -/* harmony default export */ __webpack_exports__["a"] = (deleteIn); /***/ }), -/* 563 */ +/* 571 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var keys = function keys(value) { - if (!value) { - return []; - } +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; - if (Array.isArray(value)) { - return value.map(function (i) { - return i.name; - }); + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } } + return false; +} - return Object.keys(value); -}; +/* harmony default export */ __webpack_exports__["a"] = (arraySome); -/* harmony default export */ __webpack_exports__["a"] = (keys); /***/ }), -/* 564 */ +/* 572 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFields__ = __webpack_require__(565); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); - +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} +/* harmony default export */ __webpack_exports__["a"] = (cacheHas); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFields__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); /***/ }), -/* 565 */ +/* 573 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConnectedFields__ = __webpack_require__(566); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__ = __webpack_require__(281); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__structure_plain__ = __webpack_require__(11); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_prefixName__ = __webpack_require__(89); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - - - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(116); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__ = __webpack_require__(279); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__eq_js__ = __webpack_require__(92); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__ = __webpack_require__(283); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__ = __webpack_require__(574); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__setToArray_js__ = __webpack_require__(575); -var validateNameProp = function validateNameProp(prop) { - if (!prop) { - return new Error('No "names" prop was specified '); - } - if (!Array.isArray(prop) && !prop._isFieldArray) { - return new Error('Invalid prop "names" supplied to . Must be either an array of strings or the fields array generated by FieldArray.'); - } -}; -var createFields = function createFields(_ref) { - var deepEqual = _ref.deepEqual, - getIn = _ref.getIn, - toJS = _ref.toJS, - size = _ref.size; - var ConnectedFields = Object(__WEBPACK_IMPORTED_MODULE_3__ConnectedFields__["a" /* default */])({ - deepEqual: deepEqual, - getIn: getIn, - toJS: toJS, - size: size - }); +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; - var Fields = function (_Component) { - _inherits(Fields, _Component); +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; - function Fields(props, context) { - _classCallCheck(this, Fields); +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; - var _this = _possibleConstructorReturn(this, (Fields.__proto__ || Object.getPrototypeOf(Fields)).call(this, props, context)); +/** Used to convert symbols to primitives and strings. */ +var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - if (!context._reduxForm) { - throw new Error('Fields must be inside a component decorated with reduxForm()'); +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; } - return _this; - } + object = object.buffer; + other = other.buffer; - _createClass(Fields, [{ - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return Object(__WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__["a" /* default */])(this, nextProps, nextState); + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](object), new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](other))) { + return false; } - }, { - key: 'componentWillMount', - value: function componentWillMount() { - var error = validateNameProp(this.props.names); - if (error) { - throw error; - } - var context = this.context; - var register = context._reduxForm.register; + return true; - this.names.forEach(function (name) { - return register(name, 'Field'); - }); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (!__WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].deepEqual(this.props.names, nextProps.names)) { - var context = this.context; - var _context$_reduxForm = context._reduxForm, - register = _context$_reduxForm.register, - unregister = _context$_reduxForm.unregister; - // unregister old name + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return __WEBPACK_IMPORTED_MODULE_2__eq_js__["a" /* default */](+object, +other); - this.props.names.forEach(function (name) { - return unregister(Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name)); - } - // register new name - );nextProps.names.forEach(function (name) { - return register(Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name), 'Field'); - }); - } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - var context = this.context; - var unregister = context._reduxForm.unregister; + case errorTag: + return object.name == other.name && object.message == other.message; - this.props.names.forEach(function (name) { - return unregister(Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name)); - }); - } - }, { - key: 'getRenderedComponent', - value: function getRenderedComponent() { - __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Fields'); - return this.refs.connected.getWrappedInstance().getRenderedComponent(); - } - }, { - key: 'render', - value: function render() { - var context = this.context; + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(ConnectedFields, _extends({}, this.props, { - names: this.props.names.map(function (name) { - return Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name); - }), - _reduxForm: this.context._reduxForm, - ref: 'connected' - })); - } - }, { - key: 'names', - get: function get() { - var context = this.context; + case mapTag: + var convert = __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__["a" /* default */]; - return this.props.names.map(function (name) { - return Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name); - }); - } - }, { - key: 'dirty', - get: function get() { - return this.refs.connected.getWrappedInstance().isDirty(); - } - }, { - key: 'pristine', - get: function get() { - return !this.dirty; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = __WEBPACK_IMPORTED_MODULE_5__setToArray_js__["a" /* default */]); + + if (object.size != other.size && !isPartial) { + return false; } - }, { - key: 'values', - get: function get() { - return this.refs.connected && this.refs.connected.getWrappedInstance().getValues(); + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; } - }]); + bitmask |= COMPARE_UNORDERED_FLAG; - return Fields; - }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__["a" /* default */](convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; - Fields.propTypes = { - names: function names(props, propName) { - return validateNameProp(props[propName]); - }, - component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired, - format: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - parse: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, - withRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool - }; - Fields.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object - }; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} - return Fields; -}; +/* harmony default export */ __webpack_exports__["a"] = (equalByTag); -/* harmony default export */ __webpack_exports__["a"] = (createFields); /***/ }), -/* 566 */ +/* 574 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(27); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createFieldProps__ = __webpack_require__(269); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__structure_plain__ = __webpack_require__(11); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__events_onChangeValue__ = __webpack_require__(270); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} +/* harmony default export */ __webpack_exports__["a"] = (mapToArray); +/***/ }), +/* 575 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} +/* harmony default export */ __webpack_exports__["a"] = (setToArray); -var propsToNotUpdateFor = ['_reduxForm']; +/***/ }), +/* 576 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var createConnectedFields = function createConnectedFields(_ref) { - var deepEqual = _ref.deepEqual, - getIn = _ref.getIn, - toJS = _ref.toJS, - size = _ref.size; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__ = __webpack_require__(577); - var getSyncError = function getSyncError(syncErrors, name) { - // Because the error for this field might not be at a level in the error structure where - // it can be set directly, it might need to be unwrapped from the _error property - return __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error') || __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].getIn(syncErrors, name); - }; - var getSyncWarning = function getSyncWarning(syncWarnings, name) { - var warning = getIn(syncWarnings, name - // Because the warning for this field might not be at a level in the warning structure where - // it can be set directly, it might need to be unwrapped from the _warning property - );return warning && warning._warning ? warning._warning : warning; - }; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; - var ConnectedFields = function (_Component) { - _inherits(ConnectedFields, _Component); +/** Used for built-in method references. */ +var objectProto = Object.prototype; - function ConnectedFields(props) { - _classCallCheck(this, ConnectedFields); +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; - var _this = _possibleConstructorReturn(this, (ConnectedFields.__proto__ || Object.getPrototypeOf(ConnectedFields)).call(this, props)); +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */](object), + objLength = objProps.length, + othProps = __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */](other), + othLength = othProps.length; - _this.handleChange = _this.handleChange.bind(_this); - _this.handleFocus = _this.handleFocus.bind(_this); - _this.handleBlur = _this.handleBlur.bind(_this); + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); - _this.onChangeFns = props.names.reduce(function (acc, name) { - acc[name] = function (event) { - return _this.handleChange(name, event); - }; - return acc; - }, {}); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; - _this.onFocusFns = props.names.reduce(function (acc, name) { - acc[name] = function () { - return _this.handleFocus(name); - }; - return acc; - }, {}); + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; - _this.onBlurFns = props.names.reduce(function (acc, name) { - acc[name] = function (event) { - return _this.handleBlur(name, event); - }; - return acc; - }, {}); - return _this; + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; } + } + stack['delete'](object); + stack['delete'](other); + return result; +} - _createClass(ConnectedFields, [{ - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - var _this2 = this; +/* harmony default export */ __webpack_exports__["a"] = (equalObjects); - if (this.props.names !== nextProps.names && (size(this.props.names) !== size(nextProps.names) || nextProps.names.some(function (nextName) { - return !_this2.props._fields[nextName]; - }))) { - // names is changed. The cached event handlers need to be updated - this.onChangeFns = nextProps.names.reduce(function (acc, name) { - acc[name] = function (event) { - return _this2.handleChange(name, event); - }; - return acc; - }, {}); - this.onFocusFns = nextProps.names.reduce(function (acc, name) { - acc[name] = function () { - return _this2.handleFocus(name); - }; - return acc; - }, {}); +/***/ }), +/* 577 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - this.onBlurFns = nextProps.names.reduce(function (acc, name) { - acc[name] = function (event) { - return _this2.handleBlur(name, event); - }; - return acc; - }, {}); - } - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps) { - var _this3 = this; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__ = __webpack_require__(578); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__ = __webpack_require__(580); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(187); - var nextPropsKeys = Object.keys(nextProps); - var thisPropsKeys = Object.keys(this.props); - return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { - return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); - }); - } - }, { - key: 'isDirty', - value: function isDirty() { - var _fields = this.props._fields; - return Object.keys(_fields).some(function (name) { - return _fields[name].dirty; - }); - } - }, { - key: 'getValues', - value: function getValues() { - var _fields = this.props._fields; - return Object.keys(_fields).reduce(function (accumulator, name) { - return __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].setIn(accumulator, name, _fields[name].value); - }, {}); - } - }, { - key: 'getRenderedComponent', - value: function getRenderedComponent() { - return this.refs.renderedComponent; - } - }, { - key: 'handleChange', - value: function handleChange(name, event) { - var _props = this.props, - dispatch = _props.dispatch, - parse = _props.parse, - normalize = _props.normalize, - _reduxForm = _props._reduxForm; - var value = Object(__WEBPACK_IMPORTED_MODULE_5__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize }); +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__["a" /* default */](object, __WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (getAllKeys); - dispatch(_reduxForm.change(name, value)); - } - }, { - key: 'handleFocus', - value: function handleFocus(name) { - var _props2 = this.props, - dispatch = _props2.dispatch, - _reduxForm = _props2._reduxForm; - dispatch(_reduxForm.focus(name)); - } - }, { - key: 'handleBlur', - value: function handleBlur(name, event) { - var _props3 = this.props, - dispatch = _props3.dispatch, - parse = _props3.parse, - normalize = _props3.normalize, - _reduxForm = _props3._reduxForm; +/***/ }), +/* 578 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var value = Object(__WEBPACK_IMPORTED_MODULE_5__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize } +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__ = __webpack_require__(579); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(30); - // dispatch blur action - );dispatch(_reduxForm.blur(name, value) - // call post-blur callback - );if (_reduxForm.asyncValidate) { - _reduxForm.asyncValidate(name, value); - } - } - }, { - key: 'render', - value: function render() { - var _this4 = this; - var _props4 = this.props, - component = _props4.component, - withRef = _props4.withRef, - _fields = _props4._fields, - _reduxForm = _props4._reduxForm, - rest = _objectWithoutProperties(_props4, ['component', 'withRef', '_fields', '_reduxForm']); +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return __WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */](object) ? result : __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__["a" /* default */](result, symbolsFunc(object)); +} - var sectionPrefix = _reduxForm.sectionPrefix, - form = _reduxForm.form; +/* harmony default export */ __webpack_exports__["a"] = (baseGetAllKeys); - var _Object$keys$reduce = Object.keys(_fields).reduce(function (accumulator, name) { - var connectedProps = _fields[name]; - var _createFieldProps = Object(__WEBPACK_IMPORTED_MODULE_3__createFieldProps__["a" /* default */])({ getIn: getIn, toJS: toJS }, name, _extends({}, connectedProps, rest, { - form: form, - onBlur: _this4.onBlurFns[name], - onChange: _this4.onChangeFns[name], - onFocus: _this4.onFocusFns[name] - })), - custom = _createFieldProps.custom, - fieldProps = _objectWithoutProperties(_createFieldProps, ['custom']); +/***/ }), +/* 579 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - accumulator.custom = custom; - var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; - return __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].setIn(accumulator, fieldName, fieldProps); - }, {}), - custom = _Object$keys$reduce.custom, - props = _objectWithoutProperties(_Object$keys$reduce, ['custom']); +"use strict"; +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; - if (withRef) { - props.ref = 'renderedComponent'; - } + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, props, custom)); - } - }]); +/* harmony default export */ __webpack_exports__["a"] = (arrayPush); - return ConnectedFields; - }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); - ConnectedFields.propTypes = { - component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired, - _fields: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired, - props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object - }; +/***/ }), +/* 580 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var connector = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(function (state, ownProps) { - var names = ownProps.names, - _ownProps$_reduxForm = ownProps._reduxForm, - initialValues = _ownProps$_reduxForm.initialValues, - getFormState = _ownProps$_reduxForm.getFormState; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(581); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubArray_js__ = __webpack_require__(582); - var formState = getFormState(state); - return { - _fields: names.reduce(function (accumulator, name) { - var initialState = getIn(formState, 'initial.' + name); - var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); - var value = getIn(formState, 'values.' + name); - var syncError = getSyncError(getIn(formState, 'syncErrors'), name); - var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); - var submitting = getIn(formState, 'submitting'); - var pristine = value === initial; - accumulator[name] = { - asyncError: getIn(formState, 'asyncErrors.' + name), - asyncValidating: getIn(formState, 'asyncValidating') === name, - dirty: !pristine, - pristine: pristine, - state: getIn(formState, 'fields.' + name), - submitError: getIn(formState, 'submitErrors.' + name), - submitFailed: getIn(formState, 'submitFailed'), - submitting: submitting, - syncError: syncError, - syncWarning: syncWarning, - value: value, - _value: ownProps.value // save value passed in (for checkboxes) - }; - return accumulator; - }, {}) - }; - }, undefined, undefined, { withRef: true }); - return connector(ConnectedFields); + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? __WEBPACK_IMPORTED_MODULE_1__stubArray_js__["a" /* default */] : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */](nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); }; -/* harmony default export */ __webpack_exports__["a"] = (createConnectedFields); +/* harmony default export */ __webpack_exports__["a"] = (getSymbols); + /***/ }), -/* 567 */ +/* 581 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFieldArray__ = __webpack_require__(568); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} +/* harmony default export */ __webpack_exports__["a"] = (arrayFilter); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFieldArray__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); /***/ }), -/* 568 */ +/* 582 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConnectedFieldArray__ = __webpack_require__(569); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(89); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +/* harmony default export */ __webpack_exports__["a"] = (stubArray); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +/***/ }), +/* 583 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DataView_js__ = __webpack_require__(584); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(177); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Promise_js__ = __webpack_require__(585); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Set_js__ = __webpack_require__(586); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__ = __webpack_require__(587); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__ = __webpack_require__(81); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toSource_js__ = __webpack_require__(274); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } @@ -45095,419 +47679,318 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope -var toArray = function toArray(value) { - return Array.isArray(value) ? value : [value]; -}; +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; -var wrapError = function wrapError(fn, key) { - return fn && function () { - var validators = toArray(fn); - for (var i = 0; i < validators.length; i++) { - var result = validators[i].apply(validators, arguments); - if (result) { - return _defineProperty({}, key, result); +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */]), + mapCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]), + promiseCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */]), + setCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]), + weakMapCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */]; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */](new ArrayBuffer(1))) != dataViewTag) || + (__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]) != mapTag) || + (__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */] && getTag(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */].resolve()) != promiseTag) || + (__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]) != setTag) || + (__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]) != weakMapTag)) { + getTag = function(value) { + var result = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */](value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; } } + return result; }; -}; +} -var createFieldArray = function createFieldArray(_ref2) { - var deepEqual = _ref2.deepEqual, - getIn = _ref2.getIn, - size = _ref2.size; +/* harmony default export */ __webpack_exports__["a"] = (getTag); - var ConnectedFieldArray = Object(__WEBPACK_IMPORTED_MODULE_3__ConnectedFieldArray__["a" /* default */])({ - deepEqual: deepEqual, - getIn: getIn, - size: size - }); - var FieldArray = function (_Component) { - _inherits(FieldArray, _Component); +/***/ }), +/* 584 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - function FieldArray(props, context) { - _classCallCheck(this, FieldArray); +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29); - var _this = _possibleConstructorReturn(this, (FieldArray.__proto__ || Object.getPrototypeOf(FieldArray)).call(this, props, context)); - if (!context._reduxForm) { - throw new Error('FieldArray must be inside a component decorated with reduxForm()'); - } - return _this; - } - _createClass(FieldArray, [{ - key: 'componentWillMount', - value: function componentWillMount() { - var _this2 = this; +/* Built-in method references that are verified to be native. */ +var DataView = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'DataView'); - this.context._reduxForm.register(this.name, 'FieldArray', function () { - return wrapError(_this2.props.validate, '_error'); - }, function () { - return wrapError(_this2.props.warn, '_warning'); - }); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (this.props.name !== nextProps.name) { - // unregister old name - this.context._reduxForm.unregister(this.name - // register new name - );this.context._reduxForm.register(Object(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */])(this.context, nextProps.name), 'FieldArray'); - } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.context._reduxForm.unregister(this.name); - } - }, { - key: 'getRenderedComponent', - value: function getRenderedComponent() { - __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to FieldArray'); - return this.refs.connected.getWrappedInstance().getRenderedComponent(); - } - }, { - key: 'render', - value: function render() { - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(ConnectedFieldArray, _extends({}, this.props, { - name: this.name, - syncError: this.syncError, - syncWarning: this.syncWarning, - _reduxForm: this.context._reduxForm, - ref: 'connected' - })); - } - }, { - key: 'name', - get: function get() { - return Object(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */])(this.context, this.props.name); - } - }, { - key: 'dirty', - get: function get() { - return this.refs.connected.getWrappedInstance().dirty; - } - }, { - key: 'pristine', - get: function get() { - return this.refs.connected.getWrappedInstance().pristine; - } - }, { - key: 'value', - get: function get() { - return this.refs.connected.getWrappedInstance().value; - } - }]); +/* harmony default export */ __webpack_exports__["a"] = (DataView); - return FieldArray; - }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); - FieldArray.propTypes = { - name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired, - component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired, - props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, - validate: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]), - warn: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]), - withRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool - }; - FieldArray.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object - }; +/***/ }), +/* 585 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return FieldArray; -}; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29); + + + +/* Built-in method references that are verified to be native. */ +var Promise = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Promise'); + +/* harmony default export */ __webpack_exports__["a"] = (Promise); -/* harmony default export */ __webpack_exports__["a"] = (createFieldArray); /***/ }), -/* 569 */ +/* 586 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__ = __webpack_require__(282); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_redux__ = __webpack_require__(27); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_redux__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_redux__ = __webpack_require__(111); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__createFieldArrayProps__ = __webpack_require__(584); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__structure_plain__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } +/* Built-in method references that are verified to be native. */ +var Set = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Set'); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +/* harmony default export */ __webpack_exports__["a"] = (Set); -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +/***/ }), +/* 587 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29); +/* Built-in method references that are verified to be native. */ +var WeakMap = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'WeakMap'); +/* harmony default export */ __webpack_exports__["a"] = (WeakMap); +/***/ }), +/* 588 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__ = __webpack_require__(284); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(187); -var propsToNotUpdateFor = ['_reduxForm', 'value']; -var createConnectedFieldArray = function createConnectedFieldArray(_ref) { - var deepEqual = _ref.deepEqual, - getIn = _ref.getIn, - size = _ref.size; - var getSyncError = function getSyncError(syncErrors, name) { - // For an array, the error can _ONLY_ be under _error. - // This is why this getSyncError is not the same as the - // one in Field. - return __WEBPACK_IMPORTED_MODULE_6__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error'); - }; +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */](object), + length = result.length; - var getSyncWarning = function getSyncWarning(syncWarnings, name) { - // For an array, the warning can _ONLY_ be under _warning. - // This is why this getSyncError is not the same as the - // one in Field. - return getIn(syncWarnings, name + '._warning'); - }; + while (length--) { + var key = result[length], + value = object[key]; - var ConnectedFieldArray = function (_Component) { - _inherits(ConnectedFieldArray, _Component); + result[length] = [key, value, __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__["a" /* default */](value)]; + } + return result; +} - function ConnectedFieldArray() { - _classCallCheck(this, ConnectedFieldArray); +/* harmony default export */ __webpack_exports__["a"] = (getMatchData); - var _this = _possibleConstructorReturn(this, (ConnectedFieldArray.__proto__ || Object.getPrototypeOf(ConnectedFieldArray)).call(this)); - _this.getValue = _this.getValue.bind(_this); - return _this; - } +/***/ }), +/* 589 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - _createClass(ConnectedFieldArray, [{ - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps) { - var _this2 = this; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(188); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__get_js__ = __webpack_require__(590); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hasIn_js__ = __webpack_require__(591); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isKey_js__ = __webpack_require__(189); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__ = __webpack_require__(284); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__ = __webpack_require__(285); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toKey_js__ = __webpack_require__(93); - // Update if the elements of the value array was updated. - var thisValue = this.props.value; - var nextValue = nextProps.value; - if (thisValue && nextValue) { - if (thisValue.length !== nextValue.length || nextProps.rerenderOnEveryChange && thisValue.some(function (val) { - return nextValue.every(function (next) { - return !deepEqual(val, next); - }); - })) { - return true; - } - } - var nextPropsKeys = Object.keys(nextProps); - var thisPropsKeys = Object.keys(this.props); - return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { - // useful to debug rerenders - // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { - // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) - // } - return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); - }); - } - }, { - key: 'getRenderedComponent', - value: function getRenderedComponent() { - return this.refs.renderedComponent; - } - }, { - key: 'getValue', - value: function getValue(index) { - return this.props.value && getIn(this.props.value, index); - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - component = _props.component, - withRef = _props.withRef, - name = _props.name, - _reduxForm = _props._reduxForm, - validate = _props.validate, - warn = _props.warn, - rerenderOnEveryChange = _props.rerenderOnEveryChange, - rest = _objectWithoutProperties(_props, ['component', 'withRef', 'name', '_reduxForm', 'validate', 'warn', 'rerenderOnEveryChange']); - var props = Object(__WEBPACK_IMPORTED_MODULE_5__createFieldArrayProps__["a" /* default */])(getIn, name, _reduxForm.form, _reduxForm.sectionPrefix, this.getValue, rest); - if (withRef) { - props.ref = 'renderedComponent'; - } - return Object(__WEBPACK_IMPORTED_MODULE_1_react__["createElement"])(component, props); - } - }, { - key: 'dirty', - get: function get() { - return this.props.dirty; - } - }, { - key: 'pristine', - get: function get() { - return this.props.pristine; - } - }, { - key: 'value', - get: function get() { - return this.props.value; - } - }]); - return ConnectedFieldArray; - }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); - ConnectedFieldArray.propTypes = { - component: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string]).isRequired, - props: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object, - rerenderOnEveryChange: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool - }; - ConnectedFieldArray.defaultProps = { - rerenderOnEveryChange: false - }; - ConnectedFieldArray.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object - }; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (__WEBPACK_IMPORTED_MODULE_3__isKey_js__["a" /* default */](path) && __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__["a" /* default */](srcValue)) { + return __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_6__toKey_js__["a" /* default */](path), srcValue); + } + return function(object) { + var objValue = __WEBPACK_IMPORTED_MODULE_1__get_js__["a" /* default */](object, path); + return (objValue === undefined && objValue === srcValue) + ? __WEBPACK_IMPORTED_MODULE_2__hasIn_js__["a" /* default */](object, path) + : __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */](srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMatchesProperty); + + +/***/ }), +/* 590 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(286); - var connector = Object(__WEBPACK_IMPORTED_MODULE_3_react_redux__["connect"])(function (state, ownProps) { - var name = ownProps.name, - _ownProps$_reduxForm = ownProps._reduxForm, - initialValues = _ownProps$_reduxForm.initialValues, - getFormState = _ownProps$_reduxForm.getFormState; - var formState = getFormState(state); - var initial = getIn(formState, 'initial.' + name) || initialValues && getIn(initialValues, name); - var value = getIn(formState, 'values.' + name); - var submitting = getIn(formState, 'submitting'); - var syncError = getSyncError(getIn(formState, 'syncErrors'), name); - var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); - var pristine = deepEqual(value, initial); - return { - asyncError: getIn(formState, 'asyncErrors.' + name + '._error'), - dirty: !pristine, - pristine: pristine, - state: getIn(formState, 'fields.' + name), - submitError: getIn(formState, 'submitErrors.' + name + '._error'), - submitFailed: getIn(formState, 'submitFailed'), - submitting: submitting, - syncError: syncError, - syncWarning: syncWarning, - value: value, - length: size(value) - }; - }, function (dispatch, ownProps) { - var name = ownProps.name, - _reduxForm = ownProps._reduxForm; - var arrayInsert = _reduxForm.arrayInsert, - arrayMove = _reduxForm.arrayMove, - arrayPop = _reduxForm.arrayPop, - arrayPush = _reduxForm.arrayPush, - arrayRemove = _reduxForm.arrayRemove, - arrayRemoveAll = _reduxForm.arrayRemoveAll, - arrayShift = _reduxForm.arrayShift, - arraySplice = _reduxForm.arraySplice, - arraySwap = _reduxForm.arraySwap, - arrayUnshift = _reduxForm.arrayUnshift; +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : __WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */](object, path); + return result === undefined ? defaultValue : result; +} - return Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__["a" /* default */])({ - arrayInsert: arrayInsert, - arrayMove: arrayMove, - arrayPop: arrayPop, - arrayPush: arrayPush, - arrayRemove: arrayRemove, - arrayRemoveAll: arrayRemoveAll, - arrayShift: arrayShift, - arraySplice: arraySplice, - arraySwap: arraySwap, - arrayUnshift: arrayUnshift - }, function (actionCreator) { - return Object(__WEBPACK_IMPORTED_MODULE_4_redux__["bindActionCreators"])(actionCreator.bind(null, name), dispatch); - }); - }, undefined, { withRef: true }); - return connector(ConnectedFieldArray); -}; +/* harmony default export */ __webpack_exports__["a"] = (get); -/* harmony default export */ __webpack_exports__["a"] = (createConnectedFieldArray); /***/ }), -/* 570 */ +/* 591 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFor_js__ = __webpack_require__(284); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(173); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__ = __webpack_require__(592); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasPath_js__ = __webpack_require__(593); /** - * The base implementation of `_.forOwn` without support for iteratee shorthands. + * Checks if `path` is a direct or inherited property of `object`. * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false */ -function baseForOwn(object, iteratee) { - return object && Object(__WEBPACK_IMPORTED_MODULE_0__baseFor_js__["a" /* default */])(object, iteratee, __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]); +function hasIn(object, path) { + return object != null && __WEBPACK_IMPORTED_MODULE_1__hasPath_js__["a" /* default */](object, path, __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__["a" /* default */]); } -/* harmony default export */ __webpack_exports__["a"] = (baseForOwn); +/* harmony default export */ __webpack_exports__["a"] = (hasIn); /***/ }), -/* 571 */ +/* 592 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * The base implementation of `_.hasIn` without support for deep paths. * * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; +function baseHasIn(object, key) { + return object != null && key in Object(object); } -/* harmony default export */ __webpack_exports__["a"] = (createBaseFor); +/* harmony default export */ __webpack_exports__["a"] = (baseHasIn); /***/ }), -/* 572 */ +/* 593 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__ = __webpack_require__(573); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__ = __webpack_require__(576); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(182); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__property_js__ = __webpack_require__(581); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(287); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(181); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isIndex_js__ = __webpack_require__(185); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isLength_js__ = __webpack_require__(182); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(93); + @@ -45515,628 +47998,902 @@ function createBaseFor(fromRight) { /** - * The base implementation of `_.iteratee`. + * Checks if `path` exists on `object`. * * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */]; +function hasPath(object, path, hasFunc) { + path = __WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */](path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */](path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; } - if (typeof value == 'object') { - return Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(value) - ? Object(__WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__["a" /* default */])(value[0], value[1]) - : Object(__WEBPACK_IMPORTED_MODULE_0__baseMatches_js__["a" /* default */])(value); + if (result || ++index != length) { + return result; } - return Object(__WEBPACK_IMPORTED_MODULE_4__property_js__["a" /* default */])(value); + length = object == null ? 0 : object.length; + return !!length && __WEBPACK_IMPORTED_MODULE_4__isLength_js__["a" /* default */](length) && __WEBPACK_IMPORTED_MODULE_3__isIndex_js__["a" /* default */](key, length) && + (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](object) || __WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */](object)); } -/* harmony default export */ __webpack_exports__["a"] = (baseIteratee); +/* harmony default export */ __webpack_exports__["a"] = (hasPath); /***/ }), -/* 573 */ +/* 594 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__ = __webpack_require__(574); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__ = __webpack_require__(575); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__ = __webpack_require__(286); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__ = __webpack_require__(595); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__ = __webpack_require__(596); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isKey_js__ = __webpack_require__(189); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toKey_js__ = __webpack_require__(93); + /** - * The base implementation of `_.matches` which doesn't clone `source`. + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return __WEBPACK_IMPORTED_MODULE_2__isKey_js__["a" /* default */](path) ? __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__toKey_js__["a" /* default */](path)) : __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__["a" /* default */](path); +} + +/* harmony default export */ __webpack_exports__["a"] = (property); + + +/***/ }), +/* 595 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.property` without support for deep paths. * * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. */ -function baseMatches(source) { - var matchData = Object(__WEBPACK_IMPORTED_MODULE_1__getMatchData_js__["a" /* default */])(source); - if (matchData.length == 1 && matchData[0][2]) { - return Object(__WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__["a" /* default */])(matchData[0][0], matchData[0][1]); - } +function baseProperty(key) { return function(object) { - return object === source || Object(__WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__["a" /* default */])(object, source, matchData); + return object == null ? undefined : object[key]; }; } -/* harmony default export */ __webpack_exports__["a"] = (baseMatches); +/* harmony default export */ __webpack_exports__["a"] = (baseProperty); /***/ }), -/* 574 */ +/* 596 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(172); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(286); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - /** - * The base implementation of `_.isMatch` without support for iteratee shorthands. + * A specialized version of `baseProperty` which supports deep paths. * * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; +function basePropertyDeep(path) { + return function(object) { + return __WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */](object, path); + }; +} - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; +/* harmony default export */ __webpack_exports__["a"] = (basePropertyDeep); + + +/***/ }), +/* 597 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var getDisplayName = function getDisplayName(Comp) { + return Comp.displayName || Comp.name || 'Component'; +}; + +/* harmony default export */ __webpack_exports__["a"] = (getDisplayName); + +/***/ }), +/* 598 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(190); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubmissionError__ = __webpack_require__(289); +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + + + + +var handleSubmit = function handleSubmit(submit, props, valid, asyncValidate, fields) { + var dispatch = props.dispatch, + onSubmitFail = props.onSubmitFail, + onSubmitSuccess = props.onSubmitSuccess, + startSubmit = props.startSubmit, + stopSubmit = props.stopSubmit, + setSubmitFailed = props.setSubmitFailed, + setSubmitSucceeded = props.setSubmitSucceeded, + syncErrors = props.syncErrors, + touch = props.touch, + values = props.values, + persistentSubmitErrors = props.persistentSubmitErrors; + + + touch.apply(undefined, _toConsumableArray(fields)); // mark all fields as touched + + if (valid || persistentSubmitErrors) { + var _ret = function () { + var doSubmit = function doSubmit() { + var result = void 0; + try { + result = submit(values, dispatch, props); + } catch (submitError) { + var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; + stopSubmit(error); + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(error, dispatch, submitError, props); + } + if (error || onSubmitFail) { + // if you've provided an onSubmitFail callback, don't re-throw the error + return error; + } else { + throw submitError; + } + } + if (__WEBPACK_IMPORTED_MODULE_0_is_promise___default.a(result)) { + startSubmit(); + return result.then(function (submitResult) { + stopSubmit(); + setSubmitSucceeded(); + if (onSubmitSuccess) { + onSubmitSuccess(submitResult, dispatch, props); + } + return submitResult; + }, function (submitError) { + var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; + stopSubmit(error); + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(error, dispatch, submitError, props); + } + if (error || onSubmitFail) { + // if you've provided an onSubmitFail callback, don't re-throw the error + return error; + } else { + throw submitError; + } + }); + } else { + setSubmitSucceeded(); + if (onSubmitSuccess) { + onSubmitSuccess(result, dispatch, props); + } + } + return result; + }; + + var asyncValidateResult = asyncValidate && asyncValidate(); + if (asyncValidateResult) { + return { + v: asyncValidateResult.then(function (asyncErrors) { + if (asyncErrors) { + throw asyncErrors; + } + return doSubmit(); + }).catch(function (asyncErrors) { + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(asyncErrors, dispatch, null, props); + } + return Promise.reject(asyncErrors); + }) + }; + } else { + return { + v: doSubmit() + }; + } + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } else { + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(syncErrors, dispatch, null, props); } + return syncErrors; } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; +}; - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? Object(__WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__["a" /* default */])(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } +/* harmony default export */ __webpack_exports__["a"] = (handleSubmit); + +/***/ }), +/* 599 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +function _extendableBuiltin(cls) { + function ExtendableBuiltin() { + cls.apply(this, arguments); + } + + ExtendableBuiltin.prototype = Object.create(cls.prototype, { + constructor: { + value: cls, + enumerable: false, + writable: true, + configurable: true } + }); + + if (Object.setPrototypeOf) { + Object.setPrototypeOf(ExtendableBuiltin, cls); + } else { + ExtendableBuiltin.__proto__ = cls; } - return true; + + return ExtendableBuiltin; } -/* harmony default export */ __webpack_exports__["a"] = (baseIsMatch); +var ExtendableError = function (_extendableBuiltin2) { + _inherits(ExtendableError, _extendableBuiltin2); + + function ExtendableError() { + var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + + _classCallCheck(this, ExtendableError); + + // extending Error is weird and does not propagate `message` + var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message)); + + Object.defineProperty(_this, 'message', { + configurable: true, + enumerable: false, + value: message, + writable: true + }); + + Object.defineProperty(_this, 'name', { + configurable: true, + enumerable: false, + value: _this.constructor.name, + writable: true + }); + + if (Error.hasOwnProperty('captureStackTrace')) { + Error.captureStackTrace(_this, _this.constructor); + return _possibleConstructorReturn(_this); + } + + Object.defineProperty(_this, 'stack', { + configurable: true, + enumerable: false, + value: new Error(message).stack, + writable: true + }); + return _this; + } + + return ExtendableError; +}(_extendableBuiltin(Error)); + +exports.default = ExtendableError; +module.exports = exports['default']; + + +/***/ }), +/* 600 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__silenceEvent__ = __webpack_require__(290); + + +var silenceEvents = function silenceEvents(fn) { + return function (event) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return __WEBPACK_IMPORTED_MODULE_0__silenceEvent__["a" /* default */](event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args)); + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (silenceEvents); + +/***/ }), +/* 601 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(190); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); + + +var asyncValidation = function asyncValidation(fn, start, stop, field) { + start(field); + var promise = fn(); + if (!__WEBPACK_IMPORTED_MODULE_0_is_promise___default.a(promise)) { + throw new Error('asyncValidate function passed to reduxForm must return a promise'); + } + var handleErrors = function handleErrors(rejected) { + return function (errors) { + if (errors && Object.keys(errors).length) { + stop(errors); + return errors; + } else if (rejected) { + stop(); + throw new Error('Asynchronous validation promise was rejected without errors.'); + } + stop(); + return Promise.resolve(); + }; + }; + return promise.then(handleErrors(false), handleErrors(true)); +}; +/* harmony default export */ __webpack_exports__["a"] = (asyncValidation); /***/ }), -/* 575 */ +/* 602 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__ = __webpack_require__(285); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(173); +var defaultShouldAsyncValidate = function defaultShouldAsyncValidate(_ref) { + var initialized = _ref.initialized, + trigger = _ref.trigger, + pristine = _ref.pristine, + syncValidationPasses = _ref.syncValidationPasses; + if (!syncValidationPasses) { + return false; + } + switch (trigger) { + case 'blur': + // blurring + return true; + case 'submit': + // submitting, so only async validate if form is dirty or was never initialized + // conversely, DON'T async validate if the form is pristine just as it was initialized + return !pristine || !initialized; + default: + return false; + } +}; +/* harmony default export */ __webpack_exports__["a"] = (defaultShouldAsyncValidate); -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */])(object), - length = result.length; +/***/ }), +/* 603 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - while (length--) { - var key = result[length], - value = object[key]; +"use strict"; +var defaultShouldValidate = function defaultShouldValidate(_ref) { + var values = _ref.values, + nextProps = _ref.nextProps, + initialRender = _ref.initialRender, + lastFieldValidatorKeys = _ref.lastFieldValidatorKeys, + fieldValidatorKeys = _ref.fieldValidatorKeys, + structure = _ref.structure; - result[length] = [key, value, Object(__WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__["a" /* default */])(value)]; + if (initialRender) { + return true; } - return result; -} - -/* harmony default export */ __webpack_exports__["a"] = (getMatchData); + return !structure.deepEqual(values, nextProps.values) || !structure.deepEqual(lastFieldValidatorKeys, fieldValidatorKeys); +}; +/* harmony default export */ __webpack_exports__["a"] = (defaultShouldValidate); /***/ }), -/* 576 */ +/* 604 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(171); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__get_js__ = __webpack_require__(577); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hasIn_js__ = __webpack_require__(578); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isKey_js__ = __webpack_require__(181); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__ = __webpack_require__(285); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__ = __webpack_require__(286); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toKey_js__ = __webpack_require__(91); +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } +var splice = function splice(array, index, removeNum, value) { + array = array || []; + if (index < array.length) { + if (value === undefined && !removeNum) { + // inserting undefined + var _copy2 = [].concat(_toConsumableArray(array)); + _copy2.splice(index, 0, null); + _copy2[index] = undefined; + return _copy2; + } + if (value != null) { + var _copy3 = [].concat(_toConsumableArray(array)); + _copy3.splice(index, removeNum, value); // removing and adding + return _copy3; + } + var _copy = [].concat(_toConsumableArray(array)); + _copy.splice(index, removeNum); // removing + return _copy; + } + if (removeNum) { + // trying to remove non-existant item: return original array + return array; + } + // trying to add outside of range: just set value + var copy = [].concat(_toConsumableArray(array)); + copy[index] = value; + return copy; +}; +/* harmony default export */ __webpack_exports__["a"] = (splice); +/***/ }), +/* 605 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(117); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if (Object(__WEBPACK_IMPORTED_MODULE_3__isKey_js__["a" /* default */])(path) && Object(__WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__["a" /* default */])(srcValue)) { - return Object(__WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_6__toKey_js__["a" /* default */])(path), srcValue); +var setInWithPath = function setInWithPath(state, value, path, pathIndex) { + if (pathIndex >= path.length) { + return value; } - return function(object) { - var objValue = Object(__WEBPACK_IMPORTED_MODULE_1__get_js__["a" /* default */])(object, path); - return (objValue === undefined && objValue === srcValue) - ? Object(__WEBPACK_IMPORTED_MODULE_2__hasIn_js__["a" /* default */])(object, path) - : Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */])(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; -} - -/* harmony default export */ __webpack_exports__["a"] = (baseMatchesProperty); - -/***/ }), -/* 577 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var first = path[pathIndex]; + var next = setInWithPath(state && state[first], value, path, pathIndex + 1); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(287); + if (!state) { + var initialized = isNaN(first) ? {} : []; + initialized[first] = next; + return initialized; + } + if (Array.isArray(state)) { + var copy = [].concat(state); + copy[first] = next; + return copy; + } -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : Object(__WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */])(object, path); - return result === undefined ? defaultValue : result; -} + return _extends({}, state, _defineProperty({}, first, next)); +}; -/* harmony default export */ __webpack_exports__["a"] = (get); +var setIn = function setIn(state, field, value) { + return setInWithPath(state, value, __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field), 0); +}; +/* harmony default export */ __webpack_exports__["a"] = (setIn); /***/ }), -/* 578 */ +/* 606 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__ = __webpack_require__(579); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasPath_js__ = __webpack_require__(580); - - - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && Object(__WEBPACK_IMPORTED_MODULE_1__hasPath_js__["a" /* default */])(object, path, __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__["a" /* default */]); -} +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(293); -/* harmony default export */ __webpack_exports__["a"] = (hasIn); -/***/ }), -/* 579 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var customizer = function customizer(obj, other) { + if (obj === other) return true; + if ((obj == null || obj === '' || obj === false) && (other == null || other === '' || other === false)) return true; -"use strict"; -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} + if (obj && other && obj._error !== other._error) return false; + if (obj && other && obj._warning !== other._warning) return false; +}; -/* harmony default export */ __webpack_exports__["a"] = (baseHasIn); +var deepEqual = function deepEqual(a, b) { + return __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](a, b, customizer); +}; +/* harmony default export */ __webpack_exports__["a"] = (deepEqual); /***/ }), -/* 580 */ +/* 607 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(288); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(174); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isIndex_js__ = __webpack_require__(177); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isLength_js__ = __webpack_require__(179); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(91); - - - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(117); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = Object(__WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */])(path, object); +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - var index = -1, - length = path.length, - result = false; +var deleteInWithPath = function deleteInWithPath(state, first) { + for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + rest[_key - 2] = arguments[_key]; + } - while (++index < length) { - var key = Object(__WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */])(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; + if (state === undefined || first === undefined) { + return state; + } + if (rest.length) { + if (Array.isArray(state)) { + if (first < state.length) { + var result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); + if (result !== state[first]) { + var copy = [].concat(_toConsumableArray(state)); + copy[first] = result; + return copy; + } + } + return state; } - object = object[key]; + if (first in state) { + var _result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); + return state[first] === _result ? state : _extends({}, state, _defineProperty({}, first, _result)); + } + return state; } - if (result || ++index != length) { - return result; + if (Array.isArray(state)) { + if (isNaN(first)) { + throw new Error('Cannot delete non-numerical index from an array'); + } + if (first < state.length) { + var _copy = [].concat(_toConsumableArray(state)); + _copy.splice(first, 1); + return _copy; + } + return state; } - length = object == null ? 0 : object.length; - return !!length && Object(__WEBPACK_IMPORTED_MODULE_4__isLength_js__["a" /* default */])(length) && Object(__WEBPACK_IMPORTED_MODULE_3__isIndex_js__["a" /* default */])(key, length) && - (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(object) || Object(__WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */])(object)); -} + if (first in state) { + var _copy2 = _extends({}, state); + delete _copy2[first]; + return _copy2; + } + return state; +}; -/* harmony default export */ __webpack_exports__["a"] = (hasPath); +var deleteIn = function deleteIn(state, field) { + return deleteInWithPath.apply(undefined, [state].concat(_toConsumableArray(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field)))); +}; +/* harmony default export */ __webpack_exports__["a"] = (deleteIn); /***/ }), -/* 581 */ +/* 608 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__ = __webpack_require__(582); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__ = __webpack_require__(583); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isKey_js__ = __webpack_require__(181); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toKey_js__ = __webpack_require__(91); +var keys = function keys(value) { + return value ? Object.keys(value) : []; +}; +/* harmony default export */ __webpack_exports__["a"] = (keys); +/***/ }), +/* 609 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain__ = __webpack_require__(48); -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return Object(__WEBPACK_IMPORTED_MODULE_2__isKey_js__["a" /* default */])(path) ? Object(__WEBPACK_IMPORTED_MODULE_0__baseProperty_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__toKey_js__["a" /* default */])(path)) : Object(__WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__["a" /* default */])(path); -} +var toArray = function toArray(value) { + return Array.isArray(value) ? value : [value]; +}; -/* harmony default export */ __webpack_exports__["a"] = (property); +var getError = function getError(value, values, props, validators) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + try { + for (var _iterator = toArray(validators)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var validator = _step.value; -/***/ }), -/* 582 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var error = validator(value, values, props); + if (error) { + return error; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } +}; -"use strict"; -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; +var generateValidator = function generateValidator(validators, _ref) { + var getIn = _ref.getIn; + return function (values, props) { + var errors = {}; + Object.keys(validators).forEach(function (name) { + var value = getIn(values, name); + var error = getError(value, values, props, validators[name]); + if (error) { + errors = __WEBPACK_IMPORTED_MODULE_0__structure_plain__["a" /* default */].setIn(errors, name, error); + } + }); + return errors; }; -} - -/* harmony default export */ __webpack_exports__["a"] = (baseProperty); +}; +/* harmony default export */ __webpack_exports__["a"] = (generateValidator); /***/ }), -/* 583 */ +/* 610 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(287); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain_getIn__ = __webpack_require__(292); -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return Object(__WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */])(object, path); - }; -} +var getErrorKeys = function getErrorKeys(name, type) { + switch (type) { + case 'Field': + return [name, name + '._error']; + case 'FieldArray': + return [name + '._error']; + } +}; -/* harmony default export */ __webpack_exports__["a"] = (basePropertyDeep); +var createHasError = function createHasError(_ref) { + var getIn = _ref.getIn; + + var hasError = function hasError(field, syncErrors, asyncErrors, submitErrors) { + if (!syncErrors && !asyncErrors && !submitErrors) { + return false; + } + + var name = getIn(field, 'name'); + var type = getIn(field, 'type'); + return getErrorKeys(name, type).some(function (key) { + return __WEBPACK_IMPORTED_MODULE_0__structure_plain_getIn__["a" /* default */](syncErrors, key) || getIn(asyncErrors, key) || getIn(submitErrors, key); + }); + }; + return hasError; +}; +/* harmony default export */ __webpack_exports__["a"] = (createHasError); /***/ }), -/* 584 */ +/* 611 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedField__ = __webpack_require__(612); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(192); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(125); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -var createFieldArrayProps = function createFieldArrayProps(getIn, name, form, sectionPrefix, getValue, _ref) { - var arrayInsert = _ref.arrayInsert, - arrayMove = _ref.arrayMove, - arrayPop = _ref.arrayPop, - arrayPush = _ref.arrayPush, - arrayRemove = _ref.arrayRemove, - arrayRemoveAll = _ref.arrayRemoveAll, - arrayShift = _ref.arrayShift, - arraySplice = _ref.arraySplice, - arraySwap = _ref.arraySwap, - arrayUnshift = _ref.arrayUnshift, - asyncError = _ref.asyncError, - dirty = _ref.dirty, - length = _ref.length, - pristine = _ref.pristine, - submitError = _ref.submitError, - state = _ref.state, - submitFailed = _ref.submitFailed, - submitting = _ref.submitting, - syncError = _ref.syncError, - syncWarning = _ref.syncWarning, - value = _ref.value, - props = _ref.props, - rest = _objectWithoutProperties(_ref, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncError', 'dirty', 'length', 'pristine', 'submitError', 'state', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'value', 'props']); - - var error = syncError || asyncError || submitError; - var warning = syncWarning; - var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; - var finalProps = _extends({ - fields: { - _isFieldArray: true, - forEach: function forEach(callback) { - return (value || []).forEach(function (item, index) { - return callback(fieldName + '[' + index + ']', index, finalProps.fields); - }); - }, - get: getValue, - getAll: function getAll() { - return value; - }, - insert: arrayInsert, - length: length, - map: function map(callback) { - return (value || []).map(function (item, index) { - return callback(fieldName + '[' + index + ']', index, finalProps.fields); - }); - }, - move: arrayMove, - name: name, - pop: function pop() { - arrayPop(); - return getIn(value, length - 1); - }, - push: arrayPush, - reduce: function reduce(callback, initial) { - return (value || []).reduce(function (accumulator, item, index) { - return callback(accumulator, fieldName + '[' + index + ']', index, finalProps.fields); - }, initial); - }, - remove: arrayRemove, - removeAll: arrayRemoveAll, - shift: function shift() { - arrayShift(); - return getIn(value, 0); - }, - swap: arraySwap, - unshift: arrayUnshift - }, - meta: { - dirty: dirty, - error: error, - form: form, - warning: warning, - invalid: !!error, - pristine: pristine, - submitting: submitting, - submitFailed: submitFailed, - valid: !error - } - }, props, rest); - return finalProps; -}; - -/* harmony default export */ __webpack_exports__["a"] = (createFieldArrayProps); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -/***/ }), -/* 585 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFormValueSelector__ = __webpack_require__(586); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFormValueSelector__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); -/***/ }), -/* 586 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); -var createFormValueSelector = function createFormValueSelector(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; +var createField = function createField(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + setIn = _ref.setIn, + toJS = _ref.toJS; - __WEBPACK_IMPORTED_MODULE_0_invariant___default()(form, 'Form value must be specified'); - return function (state) { - for (var _len = arguments.length, fields = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - fields[_key - 1] = arguments[_key]; + + var ConnectedField = __WEBPACK_IMPORTED_MODULE_2__ConnectedField__["a" /* default */]({ + deepEqual: deepEqual, + getIn: getIn, + toJS: toJS + }); + + var Field = function (_Component) { + _inherits(Field, _Component); + + function Field(props, context) { + _classCallCheck(this, Field); + + var _this = _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Field must be inside a component decorated with reduxForm()'); } - __WEBPACK_IMPORTED_MODULE_0_invariant___default()(fields.length, 'No fields specified'); - return fields.length === 1 ? // only selecting one field, so return its value - getIn(getFormState(state), form + '.values.' + fields[0]) : // selecting many fields, so return an object of field values - fields.reduce(function (accumulator, field) { - var value = getIn(getFormState(state), form + '.values.' + field); - return value === undefined ? accumulator : __WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */].setIn(accumulator, field, value); - }, {}); - }; - }; -}; + _this.normalize = _this.normalize.bind(_this); + return _this; + } -/* harmony default export */ __webpack_exports__["a"] = (createFormValueSelector); + _createClass(Field, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; -/***/ }), -/* 587 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + this.context._reduxForm.register(this.name, 'Field', function () { + return _this2.props.validate; + }, function () { + return _this2.props.warn; + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.name !== nextProps.name) { + // unregister old name + this.context._reduxForm.unregister(this.name); + // register new name + this.context._reduxForm.register(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, nextProps.name), 'Field'); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context._reduxForm.unregister(this.name); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Field'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'normalize', + value: function normalize(name, value) { + var normalize = this.props.normalize; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFormValues__ = __webpack_require__(588); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + if (!normalize) { + return value; + } + var previousValues = this.context._reduxForm.getValues(); + var previousValue = this.value; + var nextValues = setIn(previousValues, name, value); + return normalize(value, previousValue, nextValues, previousValues); + } + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedField, _extends({}, this.props, { + name: this.name, + normalize: this.normalize, + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'name', + get: function get() { + return __WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, this.props.name); + } + }, { + key: 'dirty', + get: function get() { + return !this.pristine; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.connected.getWrappedInstance().isPristine(); + } + }, { + key: 'value', + get: function get() { + return this.refs.connected && this.refs.connected.getWrappedInstance().getValue(); + } + }]); + return Field; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + Field.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + format: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + normalize: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onBlur: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onChange: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onFocus: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onDragStart: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onDrop: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + parse: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + Field.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + return Field; +}; -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFormValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +/* harmony default export */ __webpack_exports__["a"] = (createField); /***/ }), -/* 588 */ +/* 612 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(27); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_prefixName__ = __webpack_require__(89); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(19); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createFieldProps__ = __webpack_require__(294); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__structure_plain__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(295); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__ = __webpack_require__(615); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } @@ -46148,603 +48905,1021 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" -var createValues = function createValues(_ref) { - var getIn = _ref.getIn; - return function () { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - var valuesMap = void 0; - if (typeof args[0] === 'string') { - valuesMap = args.map(function (k) { - return { prop: k, path: k }; - }); - } else { - var config = args[0]; - valuesMap = Object.keys(config).map(function (k) { - return { - prop: k, - path: config[k] - }; - }); - } - if (!valuesMap.length) { - throw new Error('formValues(): You must specify values to get as formValues(name1, name2, ...) or formValues({propName1: propPath1, ...})'); - } +var propsToNotUpdateFor = ['_reduxForm']; - // create a class that reads current form name and creates a selector - // return - return function (Component) { - var FormValues = function (_React$Component) { - _inherits(FormValues, _React$Component); +var createConnectedField = function createConnectedField(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS; - function FormValues(props, context) { - _classCallCheck(this, FormValues); - var _this = _possibleConstructorReturn(this, (FormValues.__proto__ || Object.getPrototypeOf(FormValues)).call(this, props, context)); + var getSyncError = function getSyncError(syncErrors, name) { + var error = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncErrors, name); + // Because the error for this field might not be at a level in the error structure where + // it can be set directly, it might need to be unwrapped from the _error property + return error && error._error ? error._error : error; + }; - if (!context._reduxForm) { - throw new Error('formValues() must be used inside a React tree decorated with reduxForm()'); - } - var getValues = context._reduxForm.getValues; - - var formValuesSelector = function formValuesSelector(_) { - // Yes, we're only using connect() for listening to updates - var props = {}; - var values = getValues(); - valuesMap.forEach(function (_ref2) { - var prop = _ref2.prop, - path = _ref2.path; - return props[prop] = getIn(values, Object(__WEBPACK_IMPORTED_MODULE_3__util_prefixName__["a" /* default */])(context, path)); - }); - return props; - }; - _this.Component = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(formValuesSelector, function () { - return {}; - } // ignore dispatch - )(Component); - return _this; - } + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + var warning = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncWarnings, name); + // Because the warning for this field might not be at a level in the warning structure where + // it can be set directly, it might need to be unwrapped from the _warning property + return warning && warning._warning ? warning._warning : warning; + }; - _createClass(FormValues, [{ - key: 'render', - value: function render() { - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(this.Component, this.props); - } - }]); + var ConnectedField = function (_Component) { + _inherits(ConnectedField, _Component); - return FormValues; - }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component); + function ConnectedField(props) { + _classCallCheck(this, ConnectedField); - FormValues.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object - }; - return FormValues; - }; - }; -}; + var _this = _possibleConstructorReturn(this, (ConnectedField.__proto__ || Object.getPrototypeOf(ConnectedField)).call(this, props)); -/* harmony default export */ __webpack_exports__["a"] = (createValues); + _this.handleChange = _this.handleChange.bind(_this); + _this.handleFocus = _this.handleFocus.bind(_this); + _this.handleBlur = _this.handleBlur.bind(_this); + _this.handleDragStart = _this.handleDragStart.bind(_this); + _this.handleDrop = _this.handleDrop.bind(_this); + return _this; + } -/***/ }), -/* 589 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + _createClass(ConnectedField, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this2 = this; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormNames__ = __webpack_require__(590); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); + }); + } + }, { + key: 'isPristine', + value: function isPristine() { + return this.props.pristine; + } + }, { + key: 'getValue', + value: function getValue() { + return this.props.value; + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'handleChange', + value: function handleChange(event) { + var _props = this.props, + name = _props.name, + dispatch = _props.dispatch, + parse = _props.parse, + normalize = _props.normalize, + onChange = _props.onChange, + _reduxForm = _props._reduxForm, + previousValue = _props.value; + + var newValue = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); + var defaultPrevented = false; + if (onChange) { + onChange(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + }), newValue, previousValue); + } + if (!defaultPrevented) { + // dispatch change action + dispatch(_reduxForm.change(name, newValue)); + } + } + }, { + key: 'handleFocus', + value: function handleFocus(event) { + var _props2 = this.props, + name = _props2.name, + dispatch = _props2.dispatch, + onFocus = _props2.onFocus, + _reduxForm = _props2._reduxForm; -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormNames__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + var defaultPrevented = false; + if (onFocus) { + onFocus(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + })); + } -/***/ }), -/* 590 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (!defaultPrevented) { + dispatch(_reduxForm.focus(name)); + } + } + }, { + key: 'handleBlur', + value: function handleBlur(event) { + var _props3 = this.props, + name = _props3.name, + dispatch = _props3.dispatch, + parse = _props3.parse, + normalize = _props3.normalize, + onBlur = _props3.onBlur, + _reduxForm = _props3._reduxForm, + _value = _props3._value, + previousValue = _props3.value; -"use strict"; -var createGetFormNames = function createGetFormNames(_ref) { - var getIn = _ref.getIn, - keys = _ref.keys; - return function () { - var getFormState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return keys(getFormState(state)); - }; - }; -}; + var newValue = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); -/* harmony default export */ __webpack_exports__["a"] = (createGetFormNames); + // for checkbox and radio, if the value property of checkbox or radio equals + // the value passed by blur event, then fire blur action with previousValue. + if (newValue === _value && _value !== undefined) { + newValue = previousValue; + } -/***/ }), -/* 591 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var defaultPrevented = false; + if (onBlur) { + onBlur(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + }), newValue, previousValue); + } -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormValues__ = __webpack_require__(592); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + if (!defaultPrevented) { + // dispatch blur action + dispatch(_reduxForm.blur(name, newValue)); + // call post-blur callback + if (_reduxForm.asyncValidate) { + _reduxForm.asyncValidate(name, newValue); + } + } + } + }, { + key: 'handleDragStart', + value: function handleDragStart(event) { + var _props4 = this.props, + onDragStart = _props4.onDragStart, + value = _props4.value; + event.dataTransfer.setData(__WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */], value == null ? '' : value); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + if (onDragStart) { + onDragStart(event); + } + } + }, { + key: 'handleDrop', + value: function handleDrop(event) { + var _props5 = this.props, + name = _props5.name, + dispatch = _props5.dispatch, + onDrop = _props5.onDrop, + _reduxForm = _props5._reduxForm, + previousValue = _props5.value; -/***/ }), -/* 592 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var newValue = event.dataTransfer.getData(__WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */]); -"use strict"; -var createGetFormValues = function createGetFormValues(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.values'); - }; - }; -}; + var defaultPrevented = false; + if (onDrop) { + onDrop(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + }), newValue, previousValue); + } -/* harmony default export */ __webpack_exports__["a"] = (createGetFormValues); + if (!defaultPrevented) { + // dispatch change action + dispatch(_reduxForm.change(name, newValue)); + event.preventDefault(); + } + } + }, { + key: 'render', + value: function render() { + var _props6 = this.props, + component = _props6.component, + withRef = _props6.withRef, + name = _props6.name, + _reduxForm = _props6._reduxForm, + normalize = _props6.normalize, + onBlur = _props6.onBlur, + onChange = _props6.onChange, + onFocus = _props6.onFocus, + onDragStart = _props6.onDragStart, + onDrop = _props6.onDrop, + rest = _objectWithoutProperties(_props6, ['component', 'withRef', 'name', '_reduxForm', 'normalize', 'onBlur', 'onChange', 'onFocus', 'onDragStart', 'onDrop']); -/***/ }), -/* 593 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var _createFieldProps = __WEBPACK_IMPORTED_MODULE_2__createFieldProps__["a" /* default */]({ getIn: getIn, toJS: toJS }, name, _extends({}, rest, { + form: _reduxForm.form, + onBlur: this.handleBlur, + onChange: this.handleChange, + onDrop: this.handleDrop, + onDragStart: this.handleDragStart, + onFocus: this.handleFocus + })), + custom = _createFieldProps.custom, + props = _objectWithoutProperties(_createFieldProps, ['custom']); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormInitialValues__ = __webpack_require__(594); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + if (withRef) { + custom.ref = 'renderedComponent'; + } + if (typeof component === 'string') { + var input = props.input, + meta = props.meta; // eslint-disable-line no-unused-vars + // flatten input into other props + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, input, custom)); + } else { + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, props, custom)); + } + } + }]); + return ConnectedField; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormInitialValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + ConnectedField.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; -/***/ }), -/* 594 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var connector = __WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"](function (state, ownProps) { + var name = ownProps.name, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; -"use strict"; -var createGetFormInitialValues = function createGetFormInitialValues(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.initial'); + var formState = getFormState(state); + var initialState = getIn(formState, 'initial.' + name); + var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var submitting = getIn(formState, 'submitting'); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var pristine = value === initial; + return { + asyncError: getIn(formState, 'asyncErrors.' + name), + asyncValidating: getIn(formState, 'asyncValidating') === name, + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name), + submitFailed: getIn(formState, 'submitFailed'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + _value: ownProps.value // save value passed in (for checkboxes) }; - }; + }, undefined, undefined, { withRef: true }); + return connector(ConnectedField); }; -/* harmony default export */ __webpack_exports__["a"] = (createGetFormInitialValues); +/* harmony default export */ __webpack_exports__["a"] = (createConnectedField); /***/ }), -/* 595 */ +/* 613 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncErrors__ = __webpack_require__(596); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(291); + + +var getSelectedValues = function getSelectedValues(options) { + var result = []; + if (options) { + for (var index = 0; index < options.length; index++) { + var option = options[index]; + if (option.selected) { + result.push(option.value); + } + } + } + return result; +}; +var getValue = function getValue(event, isReactNative) { + if (__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */](event)) { + if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) { + return event.nativeEvent.text; + } + if (isReactNative && event.nativeEvent !== undefined) { + return event.nativeEvent.text; + } + var _event$target = event.target, + type = _event$target.type, + value = _event$target.value, + checked = _event$target.checked, + files = _event$target.files, + dataTransfer = event.dataTransfer; + if (type === 'checkbox') { + return checked; + } + if (type === 'file') { + return files || dataTransfer && dataTransfer.files; + } + if (type === 'select-multiple') { + return getSelectedValues(event.target.options); + } + return value; + } + return event; +}; -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncErrors__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +/* harmony default export */ __webpack_exports__["a"] = (getValue); /***/ }), -/* 596 */ +/* 614 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var createGetFormSyncErrors = function createGetFormSyncErrors(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.syncErrors'); - }; - }; -}; +var isReactNative = typeof window !== 'undefined' && window.navigator && window.navigator.product && window.navigator.product === 'ReactNative'; -/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncErrors); +/* harmony default export */ __webpack_exports__["a"] = (isReactNative); /***/ }), -/* 597 */ +/* 615 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormMeta__ = __webpack_require__(598); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); - - - -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormMeta__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dataKey; }); +var dataKey = 'text'; /***/ }), -/* 598 */ +/* 616 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var createGetFormMeta = function createGetFormMeta(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.fields'); - }; - }; -}; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedFields__ = __webpack_require__(617); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(192); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__structure_plain__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_prefixName__ = __webpack_require__(125); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -/* harmony default export */ __webpack_exports__["a"] = (createGetFormMeta); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -/***/ }), -/* 599 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormAsyncErrors__ = __webpack_require__(600); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormAsyncErrors__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); -/***/ }), -/* 600 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -var createGetFormAsyncErrors = function createGetFormAsyncErrors(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.asyncErrors'); - }; - }; + + + + +var validateNameProp = function validateNameProp(prop) { + if (!prop) { + return new Error('No "names" prop was specified '); + } + if (!Array.isArray(prop) && !prop._isFieldArray) { + return new Error('Invalid prop "names" supplied to . Must be either an array of strings or the fields array generated by FieldArray.'); + } }; -/* harmony default export */ __webpack_exports__["a"] = (createGetFormAsyncErrors); +var createFields = function createFields(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS, + size = _ref.size; -/***/ }), -/* 601 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncWarnings__ = __webpack_require__(602); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + var ConnectedFields = __WEBPACK_IMPORTED_MODULE_2__ConnectedFields__["a" /* default */]({ + deepEqual: deepEqual, + getIn: getIn, + toJS: toJS, + size: size + }); + var Fields = function (_Component) { + _inherits(Fields, _Component); + function Fields(props, context) { + _classCallCheck(this, Fields); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncWarnings__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + var _this = _possibleConstructorReturn(this, (Fields.__proto__ || Object.getPrototypeOf(Fields)).call(this, props, context)); -/***/ }), -/* 602 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (!context._reduxForm) { + throw new Error('Fields must be inside a component decorated with reduxForm()'); + } + return _this; + } -"use strict"; -var createGetFormSyncWarnings = function createGetFormSyncWarnings(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.syncWarnings'); - }; - }; -}; + _createClass(Fields, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var error = validateNameProp(this.props.names); + if (error) { + throw error; + } + var context = this.context; + var register = context._reduxForm.register; -/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncWarnings); + this.names.forEach(function (name) { + return register(name, 'Field'); + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; -/***/ }), -/* 603 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (!__WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].deepEqual(this.props.names, nextProps.names)) { + (function () { + var context = _this2.context; + var _context$_reduxForm = context._reduxForm, + register = _context$_reduxForm.register, + unregister = _context$_reduxForm.unregister; + // unregister old name -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormSubmitErrors__ = __webpack_require__(604); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + _this2.props.names.forEach(function (name) { + return unregister(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name)); + }); + // register new name + nextProps.names.forEach(function (name) { + return register(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name), 'Field'); + }); + })(); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + var context = this.context; + var unregister = context._reduxForm.unregister; + this.props.names.forEach(function (name) { + return unregister(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name)); + }); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Fields'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'render', + value: function render() { + var context = this.context; + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedFields, _extends({}, this.props, { + names: this.props.names.map(function (name) { + return __WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name); + }), + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'names', + get: function get() { + var context = this.context; -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormSubmitErrors__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + return this.props.names.map(function (name) { + return __WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name); + }); + } + }, { + key: 'dirty', + get: function get() { + return this.refs.connected.getWrappedInstance().isDirty(); + } + }, { + key: 'pristine', + get: function get() { + return !this.dirty; + } + }, { + key: 'values', + get: function get() { + return this.refs.connected && this.refs.connected.getWrappedInstance().getValues(); + } + }]); -/***/ }), -/* 604 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + return Fields; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); -"use strict"; -var createGetFormSubmitErrors = function createGetFormSubmitErrors(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.submitErrors'); - }; + Fields.propTypes = { + names: function names(props, propName) { + return validateNameProp(props[propName]); + }, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + format: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + parse: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + Fields.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object }; + + return Fields; }; -/* harmony default export */ __webpack_exports__["a"] = (createGetFormSubmitErrors); +/* harmony default export */ __webpack_exports__["a"] = (createFields); /***/ }), -/* 605 */ +/* 617 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isDirty__ = __webpack_require__(606); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(19); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createFieldProps__ = __webpack_require__(294); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__structure_plain__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(295); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isDirty__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -/***/ }), -/* 606 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPristine__ = __webpack_require__(289); +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -var createIsDirty = function createIsDirty(structure) { - return function (form, getFormState) { - var isPristine = Object(__WEBPACK_IMPORTED_MODULE_0__isPristine__["a" /* default */])(structure)(form, getFormState); - return function (state) { - return !isPristine(state); - }; - }; -}; -/* harmony default export */ __webpack_exports__["a"] = (createIsDirty); -/***/ }), -/* 607 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isInvalid__ = __webpack_require__(608); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isInvalid__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +var propsToNotUpdateFor = ['_reduxForm']; -/***/ }), -/* 608 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var createConnectedFields = function createConnectedFields(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS, + size = _ref.size; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isValid__ = __webpack_require__(183); + var getSyncError = function getSyncError(syncErrors, name) { + var error = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncErrors, name); + // Because the error for this field might not be at a level in the error structure where + // it can be set directly, it might need to be unwrapped from the _error property + return error && error._error ? error._error : error; + }; -var createIsInvalid = function createIsInvalid(structure) { - return function (form, getFormState) { - var isValid = Object(__WEBPACK_IMPORTED_MODULE_0__isValid__["a" /* default */])(structure)(form, getFormState); - return function (state) { - return !isValid(state); - }; + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + var warning = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncWarnings, name); + // Because the warning for this field might not be at a level in the warning structure where + // it can be set directly, it might need to be unwrapped from the _warning property + return warning && warning._warning ? warning._warning : warning; }; -}; -/* harmony default export */ __webpack_exports__["a"] = (createIsInvalid); + var ConnectedFields = function (_Component) { + _inherits(ConnectedFields, _Component); -/***/ }), -/* 609 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function ConnectedFields(props) { + _classCallCheck(this, ConnectedFields); -"use strict"; -var getErrorKeys = function getErrorKeys(name, type) { - switch (type) { - case 'Field': - return [name, name + '._error']; - case 'FieldArray': - return [name + '._error']; - default: - throw new Error('Unknown field type'); - } -}; + var _this = _possibleConstructorReturn(this, (ConnectedFields.__proto__ || Object.getPrototypeOf(ConnectedFields)).call(this, props)); -var createHasError = function createHasError(_ref) { - var getIn = _ref.getIn; + _this.handleChange = _this.handleChange.bind(_this); + _this.handleFocus = _this.handleFocus.bind(_this); + _this.handleBlur = _this.handleBlur.bind(_this); - var hasError = function hasError(field, syncErrors, asyncErrors, submitErrors) { - if (!syncErrors && !asyncErrors && !submitErrors) { - return false; + _this.onChangeFns = props.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this.handleChange(name, event); + }; + return acc; + }, {}); + + _this.onFocusFns = props.names.reduce(function (acc, name) { + acc[name] = function () { + return _this.handleFocus(name); + }; + return acc; + }, {}); + + _this.onBlurFns = props.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this.handleBlur(name, event); + }; + return acc; + }, {}); + return _this; } - var name = getIn(field, 'name'); - var type = getIn(field, 'type'); - return getErrorKeys(name, type).some(function (key) { - return getIn(syncErrors, key) || getIn(asyncErrors, key) || getIn(submitErrors, key); - }); - }; - return hasError; -}; + _createClass(ConnectedFields, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; -/* harmony default export */ __webpack_exports__["a"] = (createHasError); + if (this.props.names !== nextProps.names && (size(this.props.names) !== size(nextProps.names) || nextProps.names.some(function (nextName) { + return !_this2.props._fields[nextName]; + }))) { -/***/ }), -/* 610 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // names is changed. The cached event handlers need to be updated + this.onChangeFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this2.handleChange(name, event); + }; + return acc; + }, {}); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isPristine__ = __webpack_require__(289); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + this.onFocusFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function () { + return _this2.handleFocus(name); + }; + return acc; + }, {}); + + this.onBlurFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this2.handleBlur(name, event); + }; + return acc; + }, {}); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this3 = this; + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); + }); + } + }, { + key: 'isDirty', + value: function isDirty() { + var _fields = this.props._fields; + + return Object.keys(_fields).some(function (name) { + return _fields[name].dirty; + }); + } + }, { + key: 'getValues', + value: function getValues() { + var _fields = this.props._fields; + return Object.keys(_fields).reduce(function (accumulator, name) { + return __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].setIn(accumulator, name, _fields[name].value); + }, {}); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'handleChange', + value: function handleChange(name, event) { + var _props = this.props, + dispatch = _props.dispatch, + parse = _props.parse, + normalize = _props.normalize, + _reduxForm = _props._reduxForm; -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isPristine__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + var value = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); -/***/ }), -/* 611 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + dispatch(_reduxForm.change(name, value)); + } + }, { + key: 'handleFocus', + value: function handleFocus(name) { + var _props2 = this.props, + dispatch = _props2.dispatch, + _reduxForm = _props2._reduxForm; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isValid__ = __webpack_require__(183); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + dispatch(_reduxForm.focus(name)); + } + }, { + key: 'handleBlur', + value: function handleBlur(name, event) { + var _props3 = this.props, + dispatch = _props3.dispatch, + parse = _props3.parse, + normalize = _props3.normalize, + _reduxForm = _props3._reduxForm; + + var value = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); + + // dispatch blur action + dispatch(_reduxForm.blur(name, value)); + // call post-blur callback + if (_reduxForm.asyncValidate) { + _reduxForm.asyncValidate(name, value); + } + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + var _props4 = this.props, + component = _props4.component, + withRef = _props4.withRef, + _fields = _props4._fields, + _reduxForm = _props4._reduxForm, + rest = _objectWithoutProperties(_props4, ['component', 'withRef', '_fields', '_reduxForm']); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isValid__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + var sectionPrefix = _reduxForm.sectionPrefix; -/***/ }), -/* 612 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var _Object$keys$reduce = Object.keys(_fields).reduce(function (accumulator, name) { + var connectedProps = _fields[name]; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isSubmitting__ = __webpack_require__(613); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + var _createFieldProps = __WEBPACK_IMPORTED_MODULE_2__createFieldProps__["a" /* default */]({ getIn: getIn, toJS: toJS }, name, _extends({}, connectedProps, rest, { + onBlur: _this4.onBlurFns[name], + onChange: _this4.onChangeFns[name], + onFocus: _this4.onFocusFns[name] + })), + custom = _createFieldProps.custom, + fieldProps = _objectWithoutProperties(_createFieldProps, ['custom']); + accumulator.custom = custom; + var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; + return __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].setIn(accumulator, fieldName, fieldProps); + }, {}), + custom = _Object$keys$reduce.custom, + props = _objectWithoutProperties(_Object$keys$reduce, ['custom']); + if (withRef) { + props.ref = 'renderedComponent'; + } -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isSubmitting__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, props, custom)); + } + }]); -/***/ }), -/* 613 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + return ConnectedFields; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); -"use strict"; -var createIsSubmitting = function createIsSubmitting(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - var formState = getFormState(state); - return getIn(formState, form + '.submitting') || false; - }; + ConnectedFields.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + _fields: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object.isRequired, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object }; + + var connector = __WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"](function (state, ownProps) { + var names = ownProps.names, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; + + var formState = getFormState(state); + return { + _fields: names.reduce(function (accumulator, name) { + var initialState = getIn(formState, 'initial.' + name); + var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var submitting = getIn(formState, 'submitting'); + var pristine = value === initial; + accumulator[name] = { + asyncError: getIn(formState, 'asyncErrors.' + name), + asyncValidating: getIn(formState, 'asyncValidating') === name, + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name), + submitFailed: getIn(formState, 'submitFailed'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + _value: ownProps.value // save value passed in (for checkboxes) + }; + return accumulator; + }, {}) + }; + }, undefined, undefined, { withRef: true }); + return connector(ConnectedFields); }; -/* harmony default export */ __webpack_exports__["a"] = (createIsSubmitting); +/* harmony default export */ __webpack_exports__["a"] = (createConnectedFields); /***/ }), -/* 614 */ +/* 618 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitSucceeded__ = __webpack_require__(615); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedFieldArray__ = __webpack_require__(619); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(192); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(125); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitSucceeded__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -/***/ }), -/* 615 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -"use strict"; -var createHasSubmitSucceeded = function createHasSubmitSucceeded(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - var formState = getFormState(state); - return getIn(formState, form + '.submitSucceeded') || false; - }; - }; -}; +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitSucceeded); -/***/ }), -/* 616 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitFailed__ = __webpack_require__(617); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitFailed__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); -/***/ }), -/* 617 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var toArray = function toArray(value) { + return Array.isArray(value) ? value : [value]; +}; -"use strict"; -var createHasSubmitFailed = function createHasSubmitFailed(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - var formState = getFormState(state); - return getIn(formState, form + '.submitFailed') || false; - }; +var wrapError = function wrapError(fn, key) { + return fn && function () { + var validators = toArray(fn); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = validators[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var validator = _step.value; + + var result = validator.apply(undefined, arguments); + if (result) { + return _defineProperty({}, key, result); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } }; }; -/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitFailed); +var createFieldArray = function createFieldArray(_ref2) { + var deepEqual = _ref2.deepEqual, + getIn = _ref2.getIn, + size = _ref2.size; -/***/ }), -/* 618 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createReduxForm__ = __webpack_require__(619); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + var ConnectedFieldArray = __WEBPACK_IMPORTED_MODULE_2__ConnectedFieldArray__["a" /* default */]({ deepEqual: deepEqual, getIn: getIn, size: size }); + + var FieldArray = function (_Component) { + _inherits(FieldArray, _Component); + + function FieldArray(props, context) { + _classCallCheck(this, FieldArray); + + var _this = _possibleConstructorReturn(this, (FieldArray.__proto__ || Object.getPrototypeOf(FieldArray)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('FieldArray must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(FieldArray, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; + + this.context._reduxForm.register(this.name, 'FieldArray', function () { + return wrapError(_this2.props.validate, '_error'); + }, function () { + return wrapError(_this2.props.warn, '_warning'); + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.name !== nextProps.name) { + // unregister old name + this.context._reduxForm.unregister(this.name); + // register new name + this.context._reduxForm.register(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, nextProps.name), 'FieldArray'); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context._reduxForm.unregister(this.name); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to FieldArray'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedFieldArray, _extends({}, this.props, { + name: this.name, + syncError: this.syncError, + syncWarning: this.syncWarning, + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'name', + get: function get() { + return __WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, this.props.name); + } + }, { + key: 'dirty', + get: function get() { + return this.refs.connected.getWrappedInstance().dirty; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.connected.getWrappedInstance().pristine; + } + }, { + key: 'value', + get: function get() { + return this.refs.connected.getWrappedInstance().value; + } + }]); + + return FieldArray; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + FieldArray.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + FieldArray.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + return FieldArray; +}; -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createReduxForm__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +/* harmony default export */ __webpack_exports__["a"] = (createFieldArray); /***/ }), /* 619 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__ = __webpack_require__(620); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__ = __webpack_require__(282); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(161); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_is_promise__ = __webpack_require__(184); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_is_promise__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_redux__ = __webpack_require__(27); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_redux__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_redux__ = __webpack_require__(111); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__actions__ = __webpack_require__(265); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__asyncValidation__ = __webpack_require__(643); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__defaultShouldAsyncValidate__ = __webpack_require__(266); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__defaultShouldValidate__ = __webpack_require__(267); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__events_silenceEvent__ = __webpack_require__(292); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__events_silenceEvents__ = __webpack_require__(644); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__generateValidator__ = __webpack_require__(645); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__handleSubmit__ = __webpack_require__(646); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__selectors_isValid__ = __webpack_require__(183); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__structure_plain__ = __webpack_require__(11); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__util_getDisplayName__ = __webpack_require__(647); - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__ = __webpack_require__(282); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(19); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux__ = __webpack_require__(115); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createFieldArrayProps__ = __webpack_require__(620); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__structure_plain__ = __webpack_require__(48); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -46752,9 +49927,6 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } @@ -46762,5883 +49934,5825 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob +var propsToNotUpdateFor = ['_reduxForm', 'value']; +var createConnectedFieldArray = function createConnectedFieldArray(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + size = _ref.size; + var getSyncError = function getSyncError(syncErrors, name) { + // For an array, the error can _ONLY_ be under _error. + // This is why this getSyncError is not the same as the + // one in Field. + return __WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error'); + }; + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + // For an array, the warning can _ONLY_ be under _warning. + // This is why this getSyncError is not the same as the + // one in Field. + return __WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].getIn(syncWarnings, name + '._warning'); + }; + var ConnectedFieldArray = function (_Component) { + _inherits(ConnectedFieldArray, _Component); + function ConnectedFieldArray() { + _classCallCheck(this, ConnectedFieldArray); + var _this = _possibleConstructorReturn(this, (ConnectedFieldArray.__proto__ || Object.getPrototypeOf(ConnectedFieldArray)).call(this)); + _this.getValue = _this.getValue.bind(_this); + return _this; + } + _createClass(ConnectedFieldArray, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this2 = this; + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + // useful to debug rerenders + // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { + // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) + // } + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); + }); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'getValue', + value: function getValue(index) { + return this.props.value && getIn(this.props.value, index); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + component = _props.component, + withRef = _props.withRef, + name = _props.name, + _reduxForm = _props._reduxForm, + validate = _props.validate, + warn = _props.warn, + rest = _objectWithoutProperties(_props, ['component', 'withRef', 'name', '_reduxForm', 'validate', 'warn']); + var props = __WEBPACK_IMPORTED_MODULE_4__createFieldArrayProps__["a" /* default */](getIn, name, _reduxForm.sectionPrefix, this.getValue, rest); + if (withRef) { + props.ref = 'renderedComponent'; + } + return __WEBPACK_IMPORTED_MODULE_1_react__["createElement"](component, props); + } + }, { + key: 'dirty', + get: function get() { + return this.props.dirty; + } + }, { + key: 'pristine', + get: function get() { + return this.props.pristine; + } + }, { + key: 'value', + get: function get() { + return this.props.value; + } + }]); + return ConnectedFieldArray; + }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); -var isClassComponent = function isClassComponent(Component) { - return Boolean(Component && Component.prototype && _typeof(Component.prototype.isReactComponent) === 'object' + ConnectedFieldArray.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].string]).isRequired, + props: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].object + }; - // extract field-specific actions - ); -}; -var arrayInsert = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayInsert"], - arrayMove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayMove"], - arrayPop = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPop"], - arrayPush = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPush"], - arrayRemove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemove"], - arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemoveAll"], - arrayShift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayShift"], - arraySplice = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySplice"], - arraySwap = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySwap"], - arrayUnshift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayUnshift"], - blur = __WEBPACK_IMPORTED_MODULE_8__actions__["blur"], - change = __WEBPACK_IMPORTED_MODULE_8__actions__["change"], - focus = __WEBPACK_IMPORTED_MODULE_8__actions__["focus"], - formActions = _objectWithoutProperties(__WEBPACK_IMPORTED_MODULE_8__actions__, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'blur', 'change', 'focus']); + ConnectedFieldArray.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].object + }; -var arrayActions = { - arrayInsert: arrayInsert, - arrayMove: arrayMove, - arrayPop: arrayPop, - arrayPush: arrayPush, - arrayRemove: arrayRemove, - arrayRemoveAll: arrayRemoveAll, - arrayShift: arrayShift, - arraySplice: arraySplice, - arraySwap: arraySwap, - arrayUnshift: arrayUnshift -}; + var connector = __WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"](function (state, ownProps) { + var name = ownProps.name, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; -var propsToNotUpdateFor = [].concat(_toConsumableArray(Object.keys(__WEBPACK_IMPORTED_MODULE_8__actions__)), ['array', 'asyncErrors', 'initialValues', 'syncErrors', 'syncWarnings', 'values', 'registeredFields']); + var formState = getFormState(state); + var initial = getIn(formState, 'initial.' + name) || initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var submitting = getIn(formState, 'submitting'); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var pristine = deepEqual(value, initial); + return { + asyncError: getIn(formState, 'asyncErrors.' + name + '._error'), + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name + '._error'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + length: size(value) + }; + }, function (dispatch, ownProps) { + var name = ownProps.name, + _reduxForm = ownProps._reduxForm; + var arrayInsert = _reduxForm.arrayInsert, + arrayMove = _reduxForm.arrayMove, + arrayPop = _reduxForm.arrayPop, + arrayPush = _reduxForm.arrayPush, + arrayRemove = _reduxForm.arrayRemove, + arrayRemoveAll = _reduxForm.arrayRemoveAll, + arrayShift = _reduxForm.arrayShift, + arraySplice = _reduxForm.arraySplice, + arraySwap = _reduxForm.arraySwap, + arrayUnshift = _reduxForm.arrayUnshift; -var checkSubmit = function checkSubmit(submit) { - if (!submit || typeof submit !== 'function') { - throw new Error('You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop'); - } - return submit; + return __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__["a" /* default */]({ + arrayInsert: arrayInsert, + arrayMove: arrayMove, + arrayPop: arrayPop, + arrayPush: arrayPush, + arrayRemove: arrayRemove, + arrayRemoveAll: arrayRemoveAll, + arrayShift: arrayShift, + arraySplice: arraySplice, + arraySwap: arraySwap, + arrayUnshift: arrayUnshift + }, function (actionCreator) { + return __WEBPACK_IMPORTED_MODULE_3_redux__["bindActionCreators"](actionCreator.bind(null, name), dispatch); + }); + }, undefined, { withRef: true }); + return connector(ConnectedFieldArray); }; -/** - * The decorator that is the main API to redux-form - */ -var createReduxForm = function createReduxForm(structure) { - var deepEqual = structure.deepEqual, - empty = structure.empty, - getIn = structure.getIn, - setIn = structure.setIn, - keys = structure.keys, - fromJS = structure.fromJS; - - var isValid = Object(__WEBPACK_IMPORTED_MODULE_16__selectors_isValid__["a" /* default */])(structure); - return function (initialConfig) { - var config = _extends({ - touchOnBlur: true, - touchOnChange: false, - persistentSubmitErrors: false, - destroyOnUnmount: true, - shouldAsyncValidate: __WEBPACK_IMPORTED_MODULE_10__defaultShouldAsyncValidate__["a" /* default */], - shouldValidate: __WEBPACK_IMPORTED_MODULE_11__defaultShouldValidate__["a" /* default */], - enableReinitialize: false, - keepDirtyOnReinitialize: false, - getFormState: function getFormState(state) { - return getIn(state, 'form'); - }, - pure: true, - forceUnregisterOnUnmount: false - }, initialConfig); - - return function (WrappedComponent) { - var Form = function (_Component) { - _inherits(Form, _Component); - - function Form(props) { - _classCallCheck(this, Form); - - var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props)); - - _this.submit = _this.submit.bind(_this); - _this.reset = _this.reset.bind(_this); - _this.asyncValidate = _this.asyncValidate.bind(_this); - _this.getValues = _this.getValues.bind(_this); - _this.register = _this.register.bind(_this); - _this.unregister = _this.unregister.bind(_this); - _this.submitCompleted = _this.submitCompleted.bind(_this); - _this.submitFailed = _this.submitFailed.bind(_this); - _this.fieldValidators = {}; - _this.lastFieldValidatorKeys = []; - _this.fieldWarners = {}; - _this.lastFieldWarnerKeys = []; - return _this; - } - - _createClass(Form, [{ - key: 'getChildContext', - value: function getChildContext() { - var _this2 = this; +/* harmony default export */ __webpack_exports__["a"] = (createConnectedFieldArray); - return { - _reduxForm: _extends({}, this.props, { - getFormState: function getFormState(state) { - return getIn(_this2.props.getFormState(state), _this2.props.form); - }, - asyncValidate: this.asyncValidate, - getValues: this.getValues, - sectionPrefix: undefined, - register: this.register, - unregister: this.unregister, - registerInnerOnSubmit: function registerInnerOnSubmit(innerOnSubmit) { - return _this2.innerOnSubmit = innerOnSubmit; - } - }) - }; - } - }, { - key: 'initIfNeeded', - value: function initIfNeeded(nextProps) { - var enableReinitialize = this.props.enableReinitialize; +/***/ }), +/* 620 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (nextProps) { - if ((enableReinitialize || !nextProps.initialized) && !deepEqual(this.props.initialValues, nextProps.initialValues)) { - var keepDirty = nextProps.initialized && this.props.keepDirtyOnReinitialize; - this.props.initialize(nextProps.initialValues, keepDirty, { - lastInitialValues: this.props.initialValues - }); - } - } else if (this.props.initialValues && (!this.props.initialized || enableReinitialize)) { - this.props.initialize(this.props.initialValues, this.props.keepDirtyOnReinitialize); - } - } - }, { - key: 'updateSyncErrorsIfNeeded', - value: function updateSyncErrorsIfNeeded(nextSyncErrors, nextError, lastSyncErrors) { - var _props = this.props, - error = _props.error, - updateSyncErrors = _props.updateSyncErrors; +"use strict"; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - var noErrors = (!lastSyncErrors || !Object.keys(lastSyncErrors).length) && !error; - var nextNoErrors = (!nextSyncErrors || !Object.keys(nextSyncErrors).length) && !nextError; - if (!(noErrors && nextNoErrors) && (!__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(lastSyncErrors, nextSyncErrors) || !__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(error, nextError))) { - updateSyncErrors(nextSyncErrors, nextError); - } - } - }, { - key: 'clearSubmitPromiseIfNeeded', - value: function clearSubmitPromiseIfNeeded(nextProps) { - var submitting = this.props.submitting; +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - if (this.submitPromise && submitting && !nextProps.submitting) { - delete this.submitPromise; - } - } - }, { - key: 'submitIfNeeded', - value: function submitIfNeeded(nextProps) { - var _props2 = this.props, - clearSubmit = _props2.clearSubmit, - triggerSubmit = _props2.triggerSubmit; +var createFieldArrayProps = function createFieldArrayProps(getIn, name, sectionPrefix, getValue, _ref) { + var arrayInsert = _ref.arrayInsert, + arrayMove = _ref.arrayMove, + arrayPop = _ref.arrayPop, + arrayPush = _ref.arrayPush, + arrayRemove = _ref.arrayRemove, + arrayRemoveAll = _ref.arrayRemoveAll, + arrayShift = _ref.arrayShift, + arraySplice = _ref.arraySplice, + arraySwap = _ref.arraySwap, + arrayUnshift = _ref.arrayUnshift, + asyncError = _ref.asyncError, + dirty = _ref.dirty, + length = _ref.length, + pristine = _ref.pristine, + submitError = _ref.submitError, + state = _ref.state, + submitFailed = _ref.submitFailed, + submitting = _ref.submitting, + syncError = _ref.syncError, + syncWarning = _ref.syncWarning, + value = _ref.value, + props = _ref.props, + rest = _objectWithoutProperties(_ref, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncError', 'dirty', 'length', 'pristine', 'submitError', 'state', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'value', 'props']); - if (!triggerSubmit && nextProps.triggerSubmit) { - clearSubmit(); - this.submit(); - } - } - }, { - key: 'validateIfNeeded', - value: function validateIfNeeded(nextProps) { - var _props3 = this.props, - shouldValidate = _props3.shouldValidate, - validate = _props3.validate, - values = _props3.values; + var error = syncError || asyncError || submitError; + var warning = syncWarning; + var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; + var finalProps = _extends({ + fields: { + _isFieldArray: true, + forEach: function forEach(callback) { + return (value || []).forEach(function (item, index) { + return callback(fieldName + '[' + index + ']', index, finalProps.fields); + }); + }, + get: getValue, + getAll: function getAll() { + return value; + }, + insert: arrayInsert, + length: length, + map: function map(callback) { + return (value || []).map(function (item, index) { + return callback(fieldName + '[' + index + ']', index, finalProps.fields); + }); + }, + move: arrayMove, + name: name, + pop: function pop() { + arrayPop(); + return getIn(value, length - 1); + }, + push: arrayPush, + reduce: function reduce(callback, initial) { + return (value || []).reduce(function (accumulator, item, index) { + return callback(accumulator, fieldName + '[' + index + ']', index, finalProps.fields); + }, initial); + }, + remove: arrayRemove, + removeAll: arrayRemoveAll, + shift: function shift() { + arrayShift(); + return getIn(value, 0); + }, + swap: arraySwap, + unshift: arrayUnshift + }, + meta: { + dirty: dirty, + error: error, + warning: warning, + invalid: !!error, + pristine: pristine, + submitting: submitting, + touched: !!(state && getIn(state, 'touched')), + valid: !error + } + }, props, rest); + return finalProps; +}; - var fieldLevelValidate = this.generateValidator(); - if (validate || fieldLevelValidate) { - var initialRender = nextProps === undefined; - var fieldValidatorKeys = Object.keys(this.getValidators()); - var shouldValidateResult = shouldValidate({ - values: values, - nextProps: nextProps, - props: this.props, - initialRender: initialRender, - lastFieldValidatorKeys: this.lastFieldValidatorKeys, - fieldValidatorKeys: fieldValidatorKeys, - structure: structure - }); +/* harmony default export */ __webpack_exports__["a"] = (createFieldArrayProps); - if (shouldValidateResult) { - var propsToValidate = initialRender ? this.props : nextProps; +/***/ }), +/* 621 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var _merge2 = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */])(validate ? validate(propsToValidate.values, propsToValidate) || {} : {}, fieldLevelValidate ? fieldLevelValidate(propsToValidate.values, propsToValidate) || {} : {}), - _error = _merge2._error, - nextSyncErrors = _objectWithoutProperties(_merge2, ['_error']); +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(48); - this.lastFieldValidatorKeys = fieldValidatorKeys; - this.updateSyncErrorsIfNeeded(nextSyncErrors, _error, propsToValidate.syncErrors); - } - } - } - }, { - key: 'updateSyncWarningsIfNeeded', - value: function updateSyncWarningsIfNeeded(nextSyncWarnings, nextWarning, lastSyncWarnings) { - var _props4 = this.props, - warning = _props4.warning, - syncWarnings = _props4.syncWarnings, - updateSyncWarnings = _props4.updateSyncWarnings; - var noWarnings = (!syncWarnings || !Object.keys(syncWarnings).length) && !warning; - var nextNoWarnings = (!nextSyncWarnings || !Object.keys(nextSyncWarnings).length) && !nextWarning; - if (!(noWarnings && nextNoWarnings) && (!__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(lastSyncWarnings, nextSyncWarnings) || !__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(warning, nextWarning))) { - updateSyncWarnings(nextSyncWarnings, nextWarning); - } - } - }, { - key: 'warnIfNeeded', - value: function warnIfNeeded(nextProps) { - var _props5 = this.props, - shouldValidate = _props5.shouldValidate, - warn = _props5.warn, - values = _props5.values; - var fieldLevelWarn = this.generateWarner(); - if (warn || fieldLevelWarn) { - var initialRender = nextProps === undefined; - var fieldWarnerKeys = Object.keys(this.getWarners()); - var shouldWarnResult = shouldValidate({ - values: values, - nextProps: nextProps, - props: this.props, - initialRender: initialRender, - lastFieldValidatorKeys: this.lastFieldWarnerKeys, - fieldValidatorKeys: fieldWarnerKeys, - structure: structure - }); +var createFormValueSelector = function createFormValueSelector(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; - if (shouldWarnResult) { - var propsToWarn = initialRender ? this.props : nextProps; + __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(form, 'Form value must be specified'); + return function (state) { + for (var _len = arguments.length, fields = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + fields[_key - 1] = arguments[_key]; + } - var _merge3 = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */])(warn ? warn(propsToWarn.values, propsToWarn) : {}, fieldLevelWarn ? fieldLevelWarn(propsToWarn.values, propsToWarn) : {}), - _warning = _merge3._warning, - nextSyncWarnings = _objectWithoutProperties(_merge3, ['_warning']); + __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(fields.length, 'No fields specified'); + return fields.length === 1 ? + // only selecting one field, so return its value + getIn(getFormState(state), form + '.values.' + fields[0]) : + // selecting many fields, so return an object of field values + fields.reduce(function (accumulator, field) { + var value = getIn(getFormState(state), form + '.values.' + field); + return value === undefined ? accumulator : __WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */].setIn(accumulator, field, value); + }, {}); + }; + }; +}; - this.lastFieldWarnerKeys = fieldWarnerKeys; - this.updateSyncWarningsIfNeeded(nextSyncWarnings, _warning, propsToWarn.syncWarnings); - } - } - } - }, { - key: 'componentWillMount', - value: function componentWillMount() { - this.initIfNeeded(); - this.validateIfNeeded(); - this.warnIfNeeded(); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - this.initIfNeeded(nextProps); - this.validateIfNeeded(nextProps); - this.warnIfNeeded(nextProps); - this.clearSubmitPromiseIfNeeded(nextProps); - this.submitIfNeeded(nextProps); - if (nextProps.onChange) { - if (!deepEqual(nextProps.values, this.props.values)) { - nextProps.onChange(nextProps.values, nextProps.dispatch, nextProps); - } - } - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps) { - var _this3 = this; +/* harmony default export */ __webpack_exports__["a"] = (createFormValueSelector); - if (!this.props.pure) return true; - var _initialConfig$immuta = initialConfig.immutableProps, - immutableProps = _initialConfig$immuta === undefined ? [] : _initialConfig$immuta; +/***/ }), +/* 622 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return Object.keys(nextProps).some(function (prop) { - // useful to debug rerenders - // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { - // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) - // } - if (~immutableProps.indexOf(prop)) { - return _this3.props[prop] !== nextProps[prop]; - } - return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); - }); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - var _props6 = this.props, - destroyOnUnmount = _props6.destroyOnUnmount, - destroy = _props6.destroy; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(19); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_redux__); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - if (destroyOnUnmount) { - this.destroyed = true; - destroy(); - } - } - }, { - key: 'getValues', - value: function getValues() { - return this.props.values; - } - }, { - key: 'isValid', - value: function isValid() { - return this.props.valid; - } - }, { - key: 'isPristine', - value: function isPristine() { - return this.props.pristine; - } - }, { - key: 'register', - value: function register(name, type, getValidator, getWarner) { - this.props.registerField(name, type); - if (getValidator) { - this.fieldValidators[name] = getValidator; - } - if (getWarner) { - this.fieldWarners[name] = getWarner; - } - } - }, { - key: 'unregister', - value: function unregister(name) { - if (!this.destroyed) { - if (this.props.destroyOnUnmount || this.props.forceUnregisterOnUnmount) { - this.props.unregisterField(name); - delete this.fieldValidators[name]; - delete this.fieldWarners[name]; - } else { - this.props.unregisterField(name, false); - } - } - } - }, { - key: 'getFieldList', - value: function getFieldList(options) { - var registeredFields = this.props.registeredFields; - var list = []; - if (!registeredFields) { - return list; - } - var keySeq = keys(registeredFields); - if (options && options.excludeFieldArray) { - keySeq = keySeq.filter(function (name) { - return getIn(registeredFields, '[\'' + name + '\'].type') !== 'FieldArray'; - }); - } - return fromJS(keySeq.reduce(function (acc, key) { - acc.push(key); - return acc; - }, list)); - } - }, { - key: 'getValidators', - value: function getValidators() { - var _this4 = this; +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - var validators = {}; - Object.keys(this.fieldValidators).forEach(function (name) { - var validator = _this4.fieldValidators[name](); - if (validator) { - validators[name] = validator; - } - }); - return validators; - } - }, { - key: 'generateValidator', - value: function generateValidator() { - var validators = this.getValidators(); - return Object.keys(validators).length ? Object(__WEBPACK_IMPORTED_MODULE_14__generateValidator__["a" /* default */])(validators, structure) : undefined; - } - }, { - key: 'getWarners', - value: function getWarners() { - var _this5 = this; - var warners = {}; - Object.keys(this.fieldWarners).forEach(function (name) { - var warner = _this5.fieldWarners[name](); - if (warner) { - warners[name] = warner; - } - }); - return warners; - } - }, { - key: 'generateWarner', - value: function generateWarner() { - var warners = this.getWarners(); - return Object.keys(warners).length ? Object(__WEBPACK_IMPORTED_MODULE_14__generateValidator__["a" /* default */])(warners, structure) : undefined; - } - }, { - key: 'asyncValidate', - value: function asyncValidate(name, value) { - var _this6 = this; - var _props7 = this.props, - asyncBlurFields = _props7.asyncBlurFields, - asyncErrors = _props7.asyncErrors, - asyncValidate = _props7.asyncValidate, - dispatch = _props7.dispatch, - initialized = _props7.initialized, - pristine = _props7.pristine, - shouldAsyncValidate = _props7.shouldAsyncValidate, - startAsyncValidation = _props7.startAsyncValidation, - stopAsyncValidation = _props7.stopAsyncValidation, - syncErrors = _props7.syncErrors, - values = _props7.values; +var createValues = function createValues(_ref) { + var getIn = _ref.getIn; + return function (config) { + var _prop$getFormState$co = _extends({ + prop: 'values', + getFormState: function getFormState(state) { + return getIn(state, 'form'); + } + }, config), + form = _prop$getFormState$co.form, + prop = _prop$getFormState$co.prop, + getFormState = _prop$getFormState$co.getFormState; - var submitting = !name; - if (asyncValidate) { - var valuesToValidate = submitting ? values : setIn(values, name, value); - var syncValidationPasses = submitting || !getIn(syncErrors, name); - var isBlurredField = !submitting && (!asyncBlurFields || ~asyncBlurFields.indexOf(name.replace(/\[[0-9]+\]/g, '[]'))); - if ((isBlurredField || submitting) && shouldAsyncValidate({ - asyncErrors: asyncErrors, - initialized: initialized, - trigger: submitting ? 'submit' : 'blur', - blurredField: name, - pristine: pristine, - syncValidationPasses: syncValidationPasses - })) { - return Object(__WEBPACK_IMPORTED_MODULE_9__asyncValidation__["a" /* default */])(function () { - return asyncValidate(valuesToValidate, dispatch, _this6.props, name); - }, startAsyncValidation, stopAsyncValidation, name); - } - } - } - }, { - key: 'submitCompleted', - value: function submitCompleted(result) { - delete this.submitPromise; - return result; - } - }, { - key: 'submitFailed', - value: function submitFailed(error) { - delete this.submitPromise; - throw error; - } - }, { - key: 'listenToSubmit', - value: function listenToSubmit(promise) { - if (!__WEBPACK_IMPORTED_MODULE_3_is_promise___default()(promise)) { - return promise; - } - this.submitPromise = promise; - return promise.then(this.submitCompleted, this.submitFailed); - } - }, { - key: 'submit', - value: function submit(submitOrEvent) { - var _this7 = this; + return __WEBPACK_IMPORTED_MODULE_0_react_redux__["connect"](function (state) { + return _defineProperty({}, prop, getIn(getFormState(state), form + '.values')); + }, function () { + return {}; + } // ignore dispatch + ); + }; +}; - var _props8 = this.props, - onSubmit = _props8.onSubmit, - blur = _props8.blur, - change = _props8.change, - dispatch = _props8.dispatch; +/* harmony default export */ __webpack_exports__["a"] = (createValues); +/***/ }), +/* 623 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (!submitOrEvent || Object(__WEBPACK_IMPORTED_MODULE_12__events_silenceEvent__["a" /* default */])(submitOrEvent)) { - // submitOrEvent is an event: fire submit if not already submitting - if (!this.submitPromise) { - // avoid recursive stack trace if use Form with onSubmit as handleSubmit - if (this.innerOnSubmit && this.innerOnSubmit !== this.submit) { - // will call "submitOrEvent is the submit function" block below - return this.innerOnSubmit(); - } else { - return this.listenToSubmit(Object(__WEBPACK_IMPORTED_MODULE_15__handleSubmit__["a" /* default */])(checkSubmit(onSubmit), _extends({}, this.props, Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])({ blur: blur, change: change }, dispatch)), this.props.validExceptSubmit, this.asyncValidate, this.getFieldList({ excludeFieldArray: true }))); - } - } - } else { - // submitOrEvent is the submit function: return deferred submit thunk - return Object(__WEBPACK_IMPORTED_MODULE_13__events_silenceEvents__["a" /* default */])(function () { - return !_this7.submitPromise && _this7.listenToSubmit(Object(__WEBPACK_IMPORTED_MODULE_15__handleSubmit__["a" /* default */])(checkSubmit(submitOrEvent), _extends({}, _this7.props, Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])({ blur: blur, change: change }, dispatch)), _this7.props.validExceptSubmit, _this7.asyncValidate, _this7.getFieldList({ excludeFieldArray: true }))); - }); - } - } - }, { - key: 'reset', - value: function reset() { - this.props.reset(); - } - }, { - key: 'render', - value: function render() { - // remove some redux-form config-only props - /* eslint-disable no-unused-vars */ - var _props9 = this.props, - anyTouched = _props9.anyTouched, - arrayInsert = _props9.arrayInsert, - arrayMove = _props9.arrayMove, - arrayPop = _props9.arrayPop, - arrayPush = _props9.arrayPush, - arrayRemove = _props9.arrayRemove, - arrayRemoveAll = _props9.arrayRemoveAll, - arrayShift = _props9.arrayShift, - arraySplice = _props9.arraySplice, - arraySwap = _props9.arraySwap, - arrayUnshift = _props9.arrayUnshift, - asyncErrors = _props9.asyncErrors, - asyncValidate = _props9.asyncValidate, - asyncValidating = _props9.asyncValidating, - blur = _props9.blur, - change = _props9.change, - destroy = _props9.destroy, - destroyOnUnmount = _props9.destroyOnUnmount, - forceUnregisterOnUnmount = _props9.forceUnregisterOnUnmount, - dirty = _props9.dirty, - dispatch = _props9.dispatch, - enableReinitialize = _props9.enableReinitialize, - error = _props9.error, - focus = _props9.focus, - form = _props9.form, - getFormState = _props9.getFormState, - initialize = _props9.initialize, - initialized = _props9.initialized, - initialValues = _props9.initialValues, - invalid = _props9.invalid, - keepDirtyOnReinitialize = _props9.keepDirtyOnReinitialize, - pristine = _props9.pristine, - propNamespace = _props9.propNamespace, - registeredFields = _props9.registeredFields, - registerField = _props9.registerField, - reset = _props9.reset, - setSubmitFailed = _props9.setSubmitFailed, - setSubmitSucceeded = _props9.setSubmitSucceeded, - shouldAsyncValidate = _props9.shouldAsyncValidate, - shouldValidate = _props9.shouldValidate, - startAsyncValidation = _props9.startAsyncValidation, - startSubmit = _props9.startSubmit, - stopAsyncValidation = _props9.stopAsyncValidation, - stopSubmit = _props9.stopSubmit, - submitting = _props9.submitting, - submitFailed = _props9.submitFailed, - submitSucceeded = _props9.submitSucceeded, - touch = _props9.touch, - touchOnBlur = _props9.touchOnBlur, - touchOnChange = _props9.touchOnChange, - persistentSubmitErrors = _props9.persistentSubmitErrors, - syncErrors = _props9.syncErrors, - syncWarnings = _props9.syncWarnings, - unregisterField = _props9.unregisterField, - untouch = _props9.untouch, - updateSyncErrors = _props9.updateSyncErrors, - updateSyncWarnings = _props9.updateSyncWarnings, - valid = _props9.valid, - validExceptSubmit = _props9.validExceptSubmit, - values = _props9.values, - warning = _props9.warning, - rest = _objectWithoutProperties(_props9, ['anyTouched', 'arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'blur', 'change', 'destroy', 'destroyOnUnmount', 'forceUnregisterOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'focus', 'form', 'getFormState', 'initialize', 'initialized', 'initialValues', 'invalid', 'keepDirtyOnReinitialize', 'pristine', 'propNamespace', 'registeredFields', 'registerField', 'reset', 'setSubmitFailed', 'setSubmitSucceeded', 'shouldAsyncValidate', 'shouldValidate', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitting', 'submitFailed', 'submitSucceeded', 'touch', 'touchOnBlur', 'touchOnChange', 'persistentSubmitErrors', 'syncErrors', 'syncWarnings', 'unregisterField', 'untouch', 'updateSyncErrors', 'updateSyncWarnings', 'valid', 'validExceptSubmit', 'values', 'warning']); - /* eslint-enable no-unused-vars */ +"use strict"; +var createGetFormValues = function createGetFormValues(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.values'); + }; + }; +}; +/* harmony default export */ __webpack_exports__["a"] = (createGetFormValues); - var reduxFormProps = _extends({ - anyTouched: anyTouched, - asyncValidate: this.asyncValidate, - asyncValidating: asyncValidating - }, Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])({ blur: blur, change: change }, dispatch), { - destroy: destroy, - dirty: dirty, - dispatch: dispatch, - error: error, - form: form, - handleSubmit: this.submit, - initialize: initialize, - initialized: initialized, - initialValues: initialValues, - invalid: invalid, - pristine: pristine, - reset: reset, - submitting: submitting, - submitFailed: submitFailed, - submitSucceeded: submitSucceeded, - touch: touch, - untouch: untouch, - valid: valid, - warning: warning - }); - var propsToPass = _extends({}, propNamespace ? _defineProperty({}, propNamespace, reduxFormProps) : reduxFormProps, rest); - if (isClassComponent(WrappedComponent)) { - propsToPass.ref = 'wrapped'; - } - return Object(__WEBPACK_IMPORTED_MODULE_5_react__["createElement"])(WrappedComponent, propsToPass); - } - }]); +/***/ }), +/* 624 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return Form; - }(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]); +"use strict"; +var createGetFormInitialValues = function createGetFormInitialValues(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.initial'); + }; + }; +}; - Form.displayName = 'Form(' + Object(__WEBPACK_IMPORTED_MODULE_18__util_getDisplayName__["a" /* default */])(WrappedComponent) + ')'; - Form.WrappedComponent = WrappedComponent; - Form.childContextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object.isRequired - }; - Form.propTypes = { - destroyOnUnmount: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, - forceUnregisterOnUnmount: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, - form: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string.isRequired, - initialValues: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.array, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object]), - getFormState: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, - onSubmitFail: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, - onSubmitSuccess: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, - propNameSpace: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, - validate: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, - warn: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, - touchOnBlur: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, - touchOnChange: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, - triggerSubmit: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, - persistentSubmitErrors: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, - registeredFields: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any - }; +/* harmony default export */ __webpack_exports__["a"] = (createGetFormInitialValues); - var connector = Object(__WEBPACK_IMPORTED_MODULE_6_react_redux__["connect"])(function (state, props) { - var form = props.form, - getFormState = props.getFormState, - initialValues = props.initialValues, - enableReinitialize = props.enableReinitialize, - keepDirtyOnReinitialize = props.keepDirtyOnReinitialize; +/***/ }), +/* 625 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var formState = getIn(getFormState(state) || empty, form) || empty; - var stateInitial = getIn(formState, 'initial'); - var initialized = !!stateInitial; +"use strict"; +var createGetFormSyncErrors = function createGetFormSyncErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.syncErrors'); + }; + }; +}; - var shouldUpdateInitialValues = enableReinitialize && initialized && !deepEqual(initialValues, stateInitial); - var shouldResetValues = shouldUpdateInitialValues && !keepDirtyOnReinitialize; +/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncErrors); - var initial = initialValues || stateInitial || empty; +/***/ }), +/* 626 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (shouldUpdateInitialValues) { - initial = stateInitial || empty; - } +"use strict"; +var createGetFormAsyncErrors = function createGetFormAsyncErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.asyncErrors'); + }; + }; +}; - var values = getIn(formState, 'values') || initial; +/* harmony default export */ __webpack_exports__["a"] = (createGetFormAsyncErrors); - if (shouldResetValues) { - values = initial; - } +/***/ }), +/* 627 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var pristine = shouldResetValues || deepEqual(initial, values); - var asyncErrors = getIn(formState, 'asyncErrors'); - var syncErrors = getIn(formState, 'syncErrors') || {}; - var syncWarnings = getIn(formState, 'syncWarnings') || {}; - var registeredFields = getIn(formState, 'registeredFields'); - var valid = isValid(form, getFormState, false)(state); - var validExceptSubmit = isValid(form, getFormState, true)(state); - var anyTouched = !!getIn(formState, 'anyTouched'); - var submitting = !!getIn(formState, 'submitting'); - var submitFailed = !!getIn(formState, 'submitFailed'); - var submitSucceeded = !!getIn(formState, 'submitSucceeded'); - var error = getIn(formState, 'error'); - var warning = getIn(formState, 'warning'); - var triggerSubmit = getIn(formState, 'triggerSubmit'); - return { - anyTouched: anyTouched, - asyncErrors: asyncErrors, - asyncValidating: getIn(formState, 'asyncValidating') || false, - dirty: !pristine, - error: error, - initialized: initialized, - invalid: !valid, - pristine: pristine, - registeredFields: registeredFields, - submitting: submitting, - submitFailed: submitFailed, - submitSucceeded: submitSucceeded, - syncErrors: syncErrors, - syncWarnings: syncWarnings, - triggerSubmit: triggerSubmit, - values: values, - valid: valid, - validExceptSubmit: validExceptSubmit, - warning: warning - }; - }, function (dispatch, initialProps) { - var bindForm = function bindForm(actionCreator) { - return actionCreator.bind(null, initialProps.form +"use strict"; +var createGetFormSubmitErrors = function createGetFormSubmitErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.submitErrors'); + }; + }; +}; - // Bind the first parameter on `props.form` - ); - };var boundFormACs = Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */])(formActions, bindForm); - var boundArrayACs = Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */])(arrayActions, bindForm); - var boundBlur = function boundBlur(field, value) { - return blur(initialProps.form, field, value, !!initialProps.touchOnBlur); - }; - var boundChange = function boundChange(field, value) { - return change(initialProps.form, field, value, !!initialProps.touchOnChange, !!initialProps.persistentSubmitErrors); - }; - var boundFocus = bindForm(focus +/* harmony default export */ __webpack_exports__["a"] = (createGetFormSubmitErrors); - // Wrap action creators with `dispatch` - );var connectedFormACs = Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundFormACs, dispatch); - var connectedArrayACs = { - insert: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayInsert, dispatch), - move: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayMove, dispatch), - pop: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayPop, dispatch), - push: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayPush, dispatch), - remove: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayRemove, dispatch), - removeAll: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayRemoveAll, dispatch), - shift: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayShift, dispatch), - splice: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arraySplice, dispatch), - swap: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arraySwap, dispatch), - unshift: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayUnshift, dispatch) - }; +/***/ }), +/* 628 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var computedActions = _extends({}, connectedFormACs, boundArrayACs, { - blur: boundBlur, - change: boundChange, - array: connectedArrayACs, - focus: boundFocus, - dispatch: dispatch - }); +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPristine__ = __webpack_require__(296); - return function () { - return computedActions; - }; - }, undefined, { withRef: true }); - var ConnectedForm = __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(connector(Form), WrappedComponent); - ConnectedForm.defaultProps = config; - // build outer component to expose instance api - return function (_Component2) { - _inherits(ReduxForm, _Component2); +var createIsDirty = function createIsDirty(structure) { + return function (form, getFormState) { + var isPristine = __WEBPACK_IMPORTED_MODULE_0__isPristine__["a" /* default */](structure)(form, getFormState); + return function (state) { + return !isPristine(state); + }; + }; +}; - function ReduxForm() { - _classCallCheck(this, ReduxForm); +/* harmony default export */ __webpack_exports__["a"] = (createIsDirty); - return _possibleConstructorReturn(this, (ReduxForm.__proto__ || Object.getPrototypeOf(ReduxForm)).apply(this, arguments)); - } +/***/ }), +/* 629 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - _createClass(ReduxForm, [{ - key: 'submit', - value: function submit() { - return this.refs.wrapped.getWrappedInstance().submit(); - } - }, { - key: 'reset', - value: function reset() { - return this.refs.wrapped.getWrappedInstance().reset(); - } - }, { - key: 'render', - value: function render() { - var _props10 = this.props, - initialValues = _props10.initialValues, - rest = _objectWithoutProperties(_props10, ['initialValues']); +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isValid__ = __webpack_require__(191); - return Object(__WEBPACK_IMPORTED_MODULE_5_react__["createElement"])(ConnectedForm, _extends({}, rest, { - ref: 'wrapped', - // convert initialValues if need to - initialValues: fromJS(initialValues) - })); - } - }, { - key: 'valid', - get: function get() { - return this.refs.wrapped.getWrappedInstance().isValid(); - } - }, { - key: 'invalid', - get: function get() { - return !this.valid; - } - }, { - key: 'pristine', - get: function get() { - return this.refs.wrapped.getWrappedInstance().isPristine(); - } - }, { - key: 'dirty', - get: function get() { - return !this.pristine; - } - }, { - key: 'values', - get: function get() { - return this.refs.wrapped.getWrappedInstance().getValues(); - } - }, { - key: 'fieldList', - get: function get() { - // mainly provided for testing - return this.refs.wrapped.getWrappedInstance().getFieldList(); - } - }, { - key: 'wrappedInstance', - get: function get() { - // for testing - return this.refs.wrapped.getWrappedInstance().refs.wrapped; - } - }]); - return ReduxForm; - }(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]); +var createIsInvalid = function createIsInvalid(structure) { + return function (form, getFormState) { + var isValid = __WEBPACK_IMPORTED_MODULE_0__isValid__["a" /* default */](structure)(form, getFormState); + return function (state) { + return !isValid(state); }; }; }; -/* harmony default export */ __webpack_exports__["a"] = (createReduxForm); +/* harmony default export */ __webpack_exports__["a"] = (createIsInvalid); /***/ }), -/* 620 */ +/* 630 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__ = __webpack_require__(621); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(634); +var createIsSubmitting = function createIsSubmitting(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitting') || false; + }; + }; +}; +/* harmony default export */ __webpack_exports__["a"] = (createIsSubmitting); +/***/ }), +/* 631 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/** - * This method is like `_.assign` except that it recursively merges own and - * inherited enumerable string keyed properties of source objects into the - * destination object. Source properties that resolve to `undefined` are - * skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * var object = { - * 'a': [{ 'b': 2 }, { 'd': 4 }] - * }; - * - * var other = { - * 'a': [{ 'c': 3 }, { 'e': 5 }] - * }; - * - * _.merge(object, other); - * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } - */ -var merge = Object(__WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */])(function(object, source, srcIndex) { - Object(__WEBPACK_IMPORTED_MODULE_0__baseMerge_js__["a" /* default */])(object, source, srcIndex); -}); +"use strict"; +var createHasSubmitSucceeded = function createHasSubmitSucceeded(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitSucceeded') || false; + }; + }; +}; -/* harmony default export */ __webpack_exports__["a"] = (merge); +/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitSucceeded); + +/***/ }), +/* 632 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createHasSubmitFailed = function createHasSubmitFailed(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitFailed') || false; + }; + }; +}; +/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitFailed); /***/ }), -/* 621 */ +/* 633 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(172); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__ = __webpack_require__(290); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseFor_js__ = __webpack_require__(284); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__ = __webpack_require__(622); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isObject_js__ = __webpack_require__(48); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keysIn_js__ = __webpack_require__(291); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +var Form = function (_Component) { + _inherits(Form, _Component); -/** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - Object(__WEBPACK_IMPORTED_MODULE_2__baseFor_js__["a" /* default */])(source, function(srcValue, key) { - if (Object(__WEBPACK_IMPORTED_MODULE_4__isObject_js__["a" /* default */])(srcValue)) { - stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); - Object(__WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__["a" /* default */])(object, source, key, srcIndex, baseMerge, customizer, stack); + function Form(props, context) { + _classCallCheck(this, Form); + + var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Form must be inside a component decorated with reduxForm()'); } - else { - var newValue = customizer - ? customizer(object[key], srcValue, (key + ''), object, source, stack) - : undefined; + return _this; + } - if (newValue === undefined) { - newValue = srcValue; - } - Object(__WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__["a" /* default */])(object, key, newValue); + _createClass(Form, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit); } - }, __WEBPACK_IMPORTED_MODULE_5__keysIn_js__["a" /* default */]); -} + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('form', this.props); + } + }]); -/* harmony default export */ __webpack_exports__["a"] = (baseMerge); + return Form; +}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + +Form.propTypes = { + onSubmit: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired +}; +Form.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object +}; +/* harmony default export */ __webpack_exports__["a"] = (Form); /***/ }), -/* 622 */ +/* 634 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__ = __webpack_require__(290); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__ = __webpack_require__(623); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__ = __webpack_require__(624); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__copyArray_js__ = __webpack_require__(273); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__ = __webpack_require__(626); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArguments_js__ = __webpack_require__(174); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isArray_js__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__ = __webpack_require__(628); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__ = __webpack_require__(175); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__isFunction_js__ = __webpack_require__(169); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__isObject_js__ = __webpack_require__(48); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__ = __webpack_require__(166); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__ = __webpack_require__(178); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__ = __webpack_require__(629); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_prefixName__ = __webpack_require__(125); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +var FormSection = function (_Component) { + _inherits(FormSection, _Component); + function FormSection(props, context) { + _classCallCheck(this, FormSection); + var _this = _possibleConstructorReturn(this, (FormSection.__proto__ || Object.getPrototypeOf(FormSection)).call(this, props, context)); + if (!context._reduxForm) { + throw new Error('FormSection must be inside a component decorated with reduxForm()'); + } + return _this; + } + _createClass(FormSection, [{ + key: 'getChildContext', + value: function getChildContext() { + var context = this.context, + name = this.props.name; + return { + _reduxForm: _extends({}, context._reduxForm, { + sectionPrefix: __WEBPACK_IMPORTED_MODULE_1__util_prefixName__["a" /* default */](context, name) + }) + }; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + name = _props.name, + component = _props.component, + rest = _objectWithoutProperties(_props, ['children', 'name', 'component']); + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(children)) { + return children; + } -/** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = object[key], - srcValue = source[key], - stacked = stack.get(srcValue); + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, rest, { + children: children + })); + } + }]); - if (stacked) { - Object(__WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */])(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; + return FormSection; +}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); - var isCommon = newValue === undefined; +FormSection.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]) +}; - if (isCommon) { - var isArr = Object(__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */])(srcValue), - isBuff = !isArr && Object(__WEBPACK_IMPORTED_MODULE_8__isBuffer_js__["a" /* default */])(srcValue), - isTyped = !isArr && !isBuff && Object(__WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__["a" /* default */])(srcValue); +FormSection.defaultProps = { + component: 'div' +}; - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (Object(__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */])(objValue)) { - newValue = objValue; - } - else if (Object(__WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__["a" /* default */])(objValue)) { - newValue = Object(__WEBPACK_IMPORTED_MODULE_3__copyArray_js__["a" /* default */])(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = Object(__WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__["a" /* default */])(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = Object(__WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__["a" /* default */])(srcValue, true); - } - else { - newValue = []; - } - } - else if (Object(__WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__["a" /* default */])(srcValue) || Object(__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */])(srcValue)) { - newValue = objValue; - if (Object(__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */])(objValue)) { - newValue = Object(__WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__["a" /* default */])(objValue); - } - else if (!Object(__WEBPACK_IMPORTED_MODULE_10__isObject_js__["a" /* default */])(objValue) || (srcIndex && Object(__WEBPACK_IMPORTED_MODULE_9__isFunction_js__["a" /* default */])(objValue))) { - newValue = Object(__WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__["a" /* default */])(srcValue); - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - Object(__WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */])(object, key, newValue); -} +FormSection.childContextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object.isRequired +}; -/* harmony default export */ __webpack_exports__["a"] = (baseMergeDeep); +FormSection.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object +}; +/* harmony default export */ __webpack_exports__["a"] = (FormSection); /***/ }), -/* 623 */ +/* 635 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +var any = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].any, + bool = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].bool, + func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape; -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; +var propTypes = { + // State: + asyncValidating: bool.isRequired, // true if async validation is running + dirty: bool.isRequired, // true if any values are different from initialValues + error: any, // form-wide error from '_error' key in validation result + warning: any, // form-wide warning from '_warning' key in validation result + invalid: bool.isRequired, // true if there are any validation errors + initialized: bool.isRequired, // true if the form has been initialized + pristine: bool.isRequired, // true if the values are the same as initialValues + submitting: bool.isRequired, // true if the form is in the process of being submitted + submitFailed: bool.isRequired, // true if the form was submitted and failed for any reason + submitSucceeded: bool.isRequired, // true if the form was successfully submitted + valid: bool.isRequired, // true if there are no validation errors + // Actions: + array: shape({ + insert: func.isRequired, // function to insert a value into an array field + move: func.isRequired, // function to move a value within an array field + pop: func.isRequired, // function to pop a value off of an array field + push: func.isRequired, // function to push a value onto an array field + remove: func.isRequired, // function to remove a value from an array field + removeAll: func.isRequired, // function to remove all the values from an array field + shift: func.isRequired, // function to shift a value out of an array field + splice: func.isRequired, // function to splice a value into an array field + swap: func.isRequired, // function to swap values in an array field + unshift: func.isRequired // function to unshift a value into an array field + }), + asyncValidate: func.isRequired, // function to trigger async validation + blur: func.isRequired, // action to mark a field as blurred + change: func.isRequired, // action to change the value of a field + destroy: func.isRequired, // action to destroy the form's data in Redux + dispatch: func.isRequired, // the Redux dispatch action + handleSubmit: func.isRequired, // function to submit the form + initialize: func.isRequired, // action to initialize form data + reset: func.isRequired, // action to reset the form data to previously initialized values + touch: func.isRequired, // action to mark fields as touched + untouch: func.isRequired // action to mark fields as untouched +}; -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; +/* harmony default export */ __webpack_exports__["a"] = (propTypes); -/** Built-in value references. */ -var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; +/***/ }), +/* 636 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); +"use strict"; - buffer.copy(result); - return result; + +exports.__esModule = true; +function createThunkMiddleware(extraArgument) { + return function (_ref) { + var dispatch = _ref.dispatch, + getState = _ref.getState; + return function (next) { + return function (action) { + if (typeof action === 'function') { + return action(dispatch, getState, extraArgument); + } + + return next(action); + }; + }; + }; } -/* harmony default export */ __webpack_exports__["a"] = (cloneBuffer); +var thunk = createThunkMiddleware(); +thunk.withExtraArgument = createThunkMiddleware; -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(176)(module))) +exports['default'] = thunk; /***/ }), -/* 624 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 637 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__ = __webpack_require__(625); -/** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? Object(__WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__["a" /* default */])(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} +Object.defineProperty(exports, "__esModule", { + value: true +}); -/* harmony default export */ __webpack_exports__["a"] = (cloneTypedArray); +var _menu = __webpack_require__(638); +Object.defineProperty(exports, 'menu', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_menu).default; + } +}); -/***/ }), -/* 625 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _notification = __webpack_require__(639); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__ = __webpack_require__(279); +Object.defineProperty(exports, 'notification', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_notification).default; + } +}); +var _profiles = __webpack_require__(640); -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](result).set(new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](arrayBuffer)); - return result; -} +Object.defineProperty(exports, 'profiles', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_profiles).default; + } +}); -/* harmony default export */ __webpack_exports__["a"] = (cloneArrayBuffer); +var _atc = __webpack_require__(659); + +Object.defineProperty(exports, 'atc', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_atc).default; + } +}); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/* 626 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 638 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(627); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(254); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isPrototype_js__ = __webpack_require__(180); - +Object.defineProperty(exports, "__esModule", { + value: true +}); -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !Object(__WEBPACK_IMPORTED_MODULE_2__isPrototype_js__["a" /* default */])(object)) - ? Object(__WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(object)) - : {}; -} +var _assign = __webpack_require__(42); -/* harmony default export */ __webpack_exports__["a"] = (initCloneObject); +var _assign2 = _interopRequireDefault(_assign); +exports.default = menu; -/***/ }), -/* 627 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _ActionTypes = __webpack_require__(49); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(48); +var types = _interopRequireWildcard(_ActionTypes); +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -/** Built-in value references. */ -var objectCreate = Object.create; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ -var baseCreate = (function() { - function object() {} - return function(proto) { - if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; +function menu() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + currentMenu: null }; -}()); - -/* harmony default export */ __webpack_exports__["a"] = (baseCreate); + var action = arguments[1]; + switch (action.type) { + case types.CHANGE_MENU: + return (0, _assign2.default)({}, state, { + currentMenu: action.menu + }); + default: + return state; + } +} /***/ }), -/* 628 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 639 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(120); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = notification; -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(value); -} +var _ActionTypes = __webpack_require__(49); -/* harmony default export */ __webpack_exports__["a"] = (isArrayLikeObject); +var types = _interopRequireWildcard(_ActionTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function notification() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + message: null + }; + var action = arguments[1]; + switch (action.type) { + case types.NOTIFICATION_ADD: + return { message: action.message }; + default: + return state; + } +} /***/ }), -/* 629 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 640 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(630); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keysIn_js__ = __webpack_require__(291); +Object.defineProperty(exports, "__esModule", { + value: true +}); -/** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ -function toPlainObject(value) { - return Object(__WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */])(value, Object(__WEBPACK_IMPORTED_MODULE_1__keysIn_js__["a" /* default */])(value)); -} - -/* harmony default export */ __webpack_exports__["a"] = (toPlainObject); +var _typeof2 = __webpack_require__(61); +var _typeof3 = _interopRequireDefault(_typeof2); -/***/ }), -/* 630 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _assign = __webpack_require__(42); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignValue_js__ = __webpack_require__(631); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__ = __webpack_require__(121); +var _assign2 = _interopRequireDefault(_assign); +exports.default = profiles; +var _ActionTypes = __webpack_require__(49); -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); +var types = _interopRequireWildcard(_ActionTypes); - var index = -1, - length = props.length; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - while (++index < length) { - var key = props[index]; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; +function profiles() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + currentProfile: 'default', + profiles: [{ + name: 'default', + description: 'Default profile', + settings: {} + }] + }; + var action = arguments[1]; - if (newValue === undefined) { - newValue = source[key]; + if (action.type === types.PROFILE_CREATE) { + var list = state.profiles.map(function (x) { + return (0, _assign2.default)({}, x); + }); + list.push({ + name: action.name, + description: action.description, + settings: {} + }); + return (0, _assign2.default)({}, state, { profiles: list }); + } else if (action.type === types.PROFILE_SET_ENABLED) { + if (!state.profiles.filter(function (x) { + return x.name === action.name; + })) { + return state; } - if (isNew) { - Object(__WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__["a" /* default */])(object, key, newValue); - } else { - Object(__WEBPACK_IMPORTED_MODULE_0__assignValue_js__["a" /* default */])(object, key, newValue); + return (0, _assign2.default)({}, state, { currentProfile: action.name }); + } else if (action.type === types.PROFILE_REMOVE) { + if (action.name === 'default') { + return state; } + return (0, _assign2.default)({}, state, { + profiles: state.profiles.filter(function (x) { + return x.name !== action.name; + }), + currentProfile: state.currentProfile === action.name ? 'default' : state.currentProfile + }); + } else if (action.type === types.PROFILE_UPDATE_SETTINGS) { + var _ret = function () { + var profile = state.profiles.filter(function (x) { + return x.name === action.name; + })[0]; + if (!profile) { + return { + v: state + }; + } + + var settingsObj = (0, _assign2.default)({}, profile.settings); + settingsObj[action.shop] = (0, _assign2.default)({}, profile.settings[action.shop], action.value); + var profileList = state.profiles.map(function (x) { + if (x.name === action.name) { + return (0, _assign2.default)({}, x, { settings: settingsObj }); + } + return x; + }); + return { + v: (0, _assign2.default)({}, state, { profiles: profileList }) + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; } - return object; + return state; } -/* harmony default export */ __webpack_exports__["a"] = (copyObject); +/***/ }), +/* 641 */ +/***/ (function(module, exports, __webpack_require__) { +module.exports = { "default": __webpack_require__(642), __esModule: true }; /***/ }), -/* 631 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 642 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(121); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(90); +__webpack_require__(94); +__webpack_require__(128); +module.exports = __webpack_require__(194).f('iterator'); +/***/ }), +/* 643 */ +/***/ (function(module, exports, __webpack_require__) { +var toInteger = __webpack_require__(141) + , defined = __webpack_require__(139); +// true -> String#at +// false -> String#codePointAt +module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; -/** Used for built-in method references. */ -var objectProto = Object.prototype; +/***/ }), +/* 644 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +"use strict"; -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && Object(__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */])(objValue, value)) || - (value === undefined && !(key in object))) { - Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(object, key, value); - } -} +var create = __webpack_require__(193) + , descriptor = __webpack_require__(86) + , setToStringTag = __webpack_require__(127) + , IteratorPrototype = {}; -/* harmony default export */ __webpack_exports__["a"] = (assignValue); +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(53)(IteratorPrototype, __webpack_require__(24)('iterator'), function(){ return this; }); +module.exports = function(Constructor, NAME, next){ + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); +}; /***/ }), -/* 632 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(48); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__ = __webpack_require__(180); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__ = __webpack_require__(633); +/* 645 */ +/***/ (function(module, exports, __webpack_require__) { +var dP = __webpack_require__(34) + , anObject = __webpack_require__(35) + , getKeys = __webpack_require__(70); +module.exports = __webpack_require__(43) ? Object.defineProperties : function defineProperties(O, Properties){ + anObject(O); + var keys = getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)dP.f(O, P = keys[i++], Properties[P]); + return O; +}; +/***/ }), +/* 646 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used for built-in method references. */ -var objectProto = Object.prototype; +"use strict"; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +var addToUnscopables = __webpack_require__(647) + , step = __webpack_require__(648) + , Iterators = __webpack_require__(83) + , toIObject = __webpack_require__(55); -/** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeysIn(object) { - if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(object)) { - return Object(__WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__["a" /* default */])(object); +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(297)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); } - var isProto = Object(__WEBPACK_IMPORTED_MODULE_1__isPrototype_js__["a" /* default */])(object), - result = []; + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; -/* harmony default export */ __webpack_exports__["a"] = (baseKeysIn); +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + +/***/ }), +/* 647 */ +/***/ (function(module, exports) { +module.exports = function(){ /* empty */ }; /***/ }), -/* 633 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 648 */ +/***/ (function(module, exports) { -"use strict"; -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; -} +module.exports = function(done, value){ + return {value: value, done: !!done}; +}; -/* harmony default export */ __webpack_exports__["a"] = (nativeKeysIn); +/***/ }), +/* 649 */ +/***/ (function(module, exports, __webpack_require__) { +module.exports = { "default": __webpack_require__(650), __esModule: true }; /***/ }), -/* 634 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 650 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(651); +__webpack_require__(303); +__webpack_require__(657); +__webpack_require__(658); +module.exports = __webpack_require__(18).Symbol; + +/***/ }), +/* 651 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(635); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(642); +// ECMAScript 6 symbols shim +var global = __webpack_require__(25) + , has = __webpack_require__(54) + , DESCRIPTORS = __webpack_require__(43) + , $export = __webpack_require__(33) + , redefine = __webpack_require__(298) + , META = __webpack_require__(652).KEY + , $fails = __webpack_require__(69) + , shared = __webpack_require__(143) + , setToStringTag = __webpack_require__(127) + , uid = __webpack_require__(103) + , wks = __webpack_require__(24) + , wksExt = __webpack_require__(194) + , wksDefine = __webpack_require__(195) + , keyOf = __webpack_require__(653) + , enumKeys = __webpack_require__(654) + , isArray = __webpack_require__(655) + , anObject = __webpack_require__(35) + , toIObject = __webpack_require__(55) + , toPrimitive = __webpack_require__(138) + , createDesc = __webpack_require__(86) + , _create = __webpack_require__(193) + , gOPNExt = __webpack_require__(656) + , $GOPD = __webpack_require__(302) + , $DP = __webpack_require__(34) + , $keys = __webpack_require__(70) + , gOPD = $GOPD.f + , dP = $DP.f + , gOPN = gOPNExt.f + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , PROTOTYPE = 'prototype' + , HIDDEN = wks('_hidden') + , TO_PRIMITIVE = wks('toPrimitive') + , isEnum = {}.propertyIsEnumerable + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , OPSymbols = shared('op-symbols') + , ObjectProto = Object[PROTOTYPE] + , USE_NATIVE = typeof $Symbol == 'function' + , QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(dP({}, 'a', { + get: function(){ return dP(this, 'a', {value: 7}).a; } + })).a != 7; +}) ? function(it, key, D){ + var protoDesc = gOPD(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + dP(it, key, D); + if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); +} : dP; -/** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return Object(__WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */])(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; +var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ + return typeof it == 'symbol'; +} : function(it){ + return it instanceof $Symbol; +}; - if (guard && Object(__WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */])(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; +var $defineProperty = function defineProperty(it, key, D){ + if(it === ObjectProto)$defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if(has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key = toPrimitive(key, true)); + if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + it = toIObject(it); + key = toPrimitive(key, true); + if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; + var D = gOPD(it, key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = gOPN(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var IS_OP = it === ObjectProto + , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if(!USE_NATIVE){ + $Symbol = function Symbol(){ + if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function(value){ + if(this === ObjectProto)$set.call(OPSymbols, value); + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString(){ + return this._k; }); -} -/* harmony default export */ __webpack_exports__["a"] = (createAssigner); + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(301).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(104).f = $propertyIsEnumerable; + __webpack_require__(145).f = $getOwnPropertySymbols; + if(DESCRIPTORS && !__webpack_require__(126)){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } -/***/ }), -/* 635 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + wksExt.f = function(name){ + return wrap(wks(name)); + } +} -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(182); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__overRest_js__ = __webpack_require__(636); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setToString_js__ = __webpack_require__(638); +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); +for(var symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); +for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + if(isSymbol(key))return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } +}); -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - return Object(__WEBPACK_IMPORTED_MODULE_2__setToString_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__overRest_js__["a" /* default */])(func, start, __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */]), func + ''); -} +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); -/* harmony default export */ __webpack_exports__["a"] = (baseRest); +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , replacer, $replacer; + while(arguments.length > i)args.push(arguments[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(53)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); /***/ }), -/* 636 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 652 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(637); +var META = __webpack_require__(103)('meta') + , isObject = __webpack_require__(68) + , has = __webpack_require__(54) + , setDesc = __webpack_require__(34).f + , id = 0; +var isExtensible = Object.isExtensible || function(){ + return true; +}; +var FREEZE = !__webpack_require__(69)(function(){ + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function(it){ + setDesc(it, META, {value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + }}); +}; +var fastKey = function(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add metadata + if(!create)return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function(it, create){ + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return true; + // not necessary to add metadata + if(!create)return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function(it){ + if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + +/***/ }), +/* 653 */ +/***/ (function(module, exports, __webpack_require__) { + +var getKeys = __webpack_require__(70) + , toIObject = __webpack_require__(55); +module.exports = function(object, el){ + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; +}; +/***/ }), +/* 654 */ +/***/ (function(module, exports, __webpack_require__) { -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(70) + , gOPS = __webpack_require__(145) + , pIE = __webpack_require__(104); +module.exports = function(it){ + var result = getKeys(it) + , getSymbols = gOPS.f; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = pIE.f + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); + } return result; +}; -/** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); +/***/ }), +/* 655 */ +/***/ (function(module, exports, __webpack_require__) { - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(func, this, otherArgs); - }; -} +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(87); +module.exports = Array.isArray || function isArray(arg){ + return cof(arg) == 'Array'; +}; -/* harmony default export */ __webpack_exports__["a"] = (overRest); +/***/ }), +/* 656 */ +/***/ (function(module, exports, __webpack_require__) { +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(55) + , gOPN = __webpack_require__(301).f + , toString = {}.toString; -/***/ }), -/* 637 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; -"use strict"; -/** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); +var getWindowNames = function(it){ + try { + return gOPN(it); + } catch(e){ + return windowNames.slice(); } - return func.apply(thisArg, args); -} +}; -/* harmony default export */ __webpack_exports__["a"] = (apply); +module.exports.f = function getOwnPropertyNames(it){ + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; /***/ }), -/* 638 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__ = __webpack_require__(639); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shortOut_js__ = __webpack_require__(641); - - +/* 657 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var setToString = Object(__WEBPACK_IMPORTED_MODULE_1__shortOut_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__["a" /* default */]); +__webpack_require__(195)('asyncIterator'); -/* harmony default export */ __webpack_exports__["a"] = (setToString); +/***/ }), +/* 658 */ +/***/ (function(module, exports, __webpack_require__) { +__webpack_require__(195)('observable'); /***/ }), -/* 639 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 659 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(640); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__ = __webpack_require__(283); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(182); +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _assign = __webpack_require__(42); -/** - * The base implementation of `setToString` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var baseSetToString = !__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */] : function(func, string) { - return Object(__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */])(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(string), - 'writable': true - }); -}; +var _assign2 = _interopRequireDefault(_assign); -/* harmony default export */ __webpack_exports__["a"] = (baseSetToString); +exports.default = atc; +var _ActionTypes = __webpack_require__(49); -/***/ }), -/* 640 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var types = _interopRequireWildcard(_ActionTypes); -"use strict"; -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant(value) { - return function() { - return value; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function atc() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + atcProducts: [] }; -} + var action = arguments[1]; -/* harmony default export */ __webpack_exports__["a"] = (constant); + if (action.type === types.ATC_PRODUCT_ADD) { + if (!action.data.name || state.atcProducts.filter(function (x) { + return x.name === action.data.name; + }).length) { + return state; + } + var atcList = state.atcProducts.map(function (x) { + return (0, _assign2.default)({}, x); + }); + atcList.push(action.data); + return { atcProducts: atcList }; + } else if (action.type === types.ATC_PRODUCT_REMOVE) { + if (!action.name) { + return state; + } + return { + atcProducts: state.atcProducts.map(function (x) { + return (0, _assign2.default)({}, x); + }).filter(function (x) { + return x.name !== action.name; + }) + }; + } else if (action.type === types.ATC_SET_PRODUCT_ENABLED) { + var atcProduct = state.atcProducts.filter(function (x) { + return x.name === action.name; + })[0]; + if (!atcProduct) return state; + var newList = state.atcProducts.map(function (x) { + if (x.name === action.name) { + return (0, _assign2.default)({}, x, { enabled: action.enabled }); + } + return (0, _assign2.default)({}, x); + }); + return { + atcProducts: newList + }; + } + return state; +} /***/ }), -/* 641 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 660 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/** Used to detect hot functions by number of calls within a span of milliseconds. */ -var HOT_COUNT = 800, - HOT_SPAN = 16; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeNow = Date.now; - -/** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ -function shortOut(func) { - var count = 0, - lastCalled = 0; - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(undefined, arguments); - }; -} +Object.defineProperty(exports, "__esModule", { + value: true +}); -/* harmony default export */ __webpack_exports__["a"] = (shortOut); +var _react = __webpack_require__(0); +var _react2 = _interopRequireDefault(_react); -/***/ }), -/* 642 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _reactRouter = __webpack_require__(163); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(90); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(120); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isIndex_js__ = __webpack_require__(177); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isObject_js__ = __webpack_require__(48); +var _App = __webpack_require__(661); +var _App2 = _interopRequireDefault(_App); +var _Supreme = __webpack_require__(325); +var _Supreme2 = _interopRequireDefault(_Supreme); +var _Profile = __webpack_require__(850); -/** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ -function isIterateeCall(value, index, object) { - if (!Object(__WEBPACK_IMPORTED_MODULE_3__isObject_js__["a" /* default */])(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */])(object) && Object(__WEBPACK_IMPORTED_MODULE_2__isIndex_js__["a" /* default */])(index, object.length)) - : (type == 'string' && index in object) - ) { - return Object(__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */])(object[index], value); - } - return false; -} +var _Profile2 = _interopRequireDefault(_Profile); -/* harmony default export */ __webpack_exports__["a"] = (isIterateeCall); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +exports.default = function () { + return _react2.default.createElement( + _reactRouter.Route, + { component: _App2.default }, + _react2.default.createElement(_reactRouter.Route, { path: 'supreme/', component: _Supreme2.default }), + _react2.default.createElement(_reactRouter.Route, { path: 'profiles/', component: _Profile2.default }), + _react2.default.createElement(_reactRouter.Redirect, { from: '/', to: 'supreme/' }) + ); +}; /***/ }), -/* 643 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 661 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(184); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); -var asyncValidation = function asyncValidation(fn, start, stop, field) { - start(field); - var promise = fn(); - if (!__WEBPACK_IMPORTED_MODULE_0_is_promise___default()(promise)) { - throw new Error('asyncValidate function passed to reduxForm must return a promise'); - } - var handleErrors = function handleErrors(rejected) { - return function (errors) { - if (errors && Object.keys(errors).length) { - stop(errors); - return errors; - } else if (rejected) { - stop(); - throw new Error('Asynchronous validation promise was rejected without errors.'); - } - stop(); - return Promise.resolve(); - }; - }; - return promise.then(handleErrors(false), handleErrors(true)); -}; +Object.defineProperty(exports, "__esModule", { + value: true +}); -/* harmony default export */ __webpack_exports__["a"] = (asyncValidation); +var _getPrototypeOf = __webpack_require__(3); -/***/ }), -/* 644 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__silenceEvent__ = __webpack_require__(292); +var _classCallCheck2 = __webpack_require__(1); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var silenceEvents = function silenceEvents(fn) { - return function (event) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } +var _createClass2 = __webpack_require__(2); - return Object(__WEBPACK_IMPORTED_MODULE_0__silenceEvent__["a" /* default */])(event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args)); - }; -}; +var _createClass3 = _interopRequireDefault(_createClass2); -/* harmony default export */ __webpack_exports__["a"] = (silenceEvents); +var _possibleConstructorReturn2 = __webpack_require__(4); -/***/ }), -/* 645 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain__ = __webpack_require__(11); +var _inherits2 = __webpack_require__(5); +var _inherits3 = _interopRequireDefault(_inherits2); -var toArray = function toArray(value) { - return Array.isArray(value) ? value : [value]; -}; +var _react = __webpack_require__(0); -var getError = function getError(value, values, props, validators) { - var array = toArray(validators); - for (var i = 0; i < array.length; i++) { - var error = array[i](value, values, props); - if (error) { - return error; - } - } -}; +var _react2 = _interopRequireDefault(_react); -var generateValidator = function generateValidator(validators, _ref) { - var getIn = _ref.getIn; - return function (values, props) { - var errors = {}; - Object.keys(validators).forEach(function (name) { - var value = getIn(values, name); - var error = getError(value, values, props, validators[name]); - if (error) { - errors = __WEBPACK_IMPORTED_MODULE_0__structure_plain__["a" /* default */].setIn(errors, name, error); - } - }); - return errors; - }; -}; +var _MuiThemeProvider = __webpack_require__(305); -/* harmony default export */ __webpack_exports__["a"] = (generateValidator); +var _MuiThemeProvider2 = _interopRequireDefault(_MuiThemeProvider); -/***/ }), -/* 646 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _AppDrawer = __webpack_require__(711); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(184); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubmissionError__ = __webpack_require__(268); -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } +var _AppDrawer2 = _interopRequireDefault(_AppDrawer); +var _NotificationBar = __webpack_require__(845); +var _NotificationBar2 = _interopRequireDefault(_NotificationBar); +var _Styles = __webpack_require__(52); -var handleSubmit = function handleSubmit(submit, props, valid, asyncValidate, fields) { - var dispatch = props.dispatch, - onSubmitFail = props.onSubmitFail, - onSubmitSuccess = props.onSubmitSuccess, - startSubmit = props.startSubmit, - stopSubmit = props.stopSubmit, - setSubmitFailed = props.setSubmitFailed, - setSubmitSucceeded = props.setSubmitSucceeded, - syncErrors = props.syncErrors, - touch = props.touch, - values = props.values, - persistentSubmitErrors = props.persistentSubmitErrors; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var App = function (_Component) { + (0, _inherits3.default)(App, _Component); - touch.apply(undefined, _toConsumableArray(fields)); // mark all fields as touched + function App() { + (0, _classCallCheck3.default)(this, App); + return (0, _possibleConstructorReturn3.default)(this, (App.__proto__ || (0, _getPrototypeOf2.default)(App)).apply(this, arguments)); + } - if (valid || persistentSubmitErrors) { - var doSubmit = function doSubmit() { - var result = void 0; - try { - result = submit(values, dispatch, props); - } catch (submitError) { - var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; - stopSubmit(error); - setSubmitFailed.apply(undefined, _toConsumableArray(fields)); - if (onSubmitFail) { - onSubmitFail(error, dispatch, submitError, props); - } - if (error || onSubmitFail) { - // if you've provided an onSubmitFail callback, don't re-throw the error - return error; - } else { - throw submitError; - } - } - if (__WEBPACK_IMPORTED_MODULE_0_is_promise___default()(result)) { - startSubmit(); - return result.then(function (submitResult) { - stopSubmit(); - setSubmitSucceeded(); - if (onSubmitSuccess) { - onSubmitSuccess(submitResult, dispatch, props); - } - return submitResult; - }, function (submitError) { - var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; - stopSubmit(error); - setSubmitFailed.apply(undefined, _toConsumableArray(fields)); - if (onSubmitFail) { - onSubmitFail(error, dispatch, submitError, props); - } - if (error || onSubmitFail) { - // if you've provided an onSubmitFail callback, don't re-throw the error - return error; - } else { - throw submitError; - } - }); - } else { - setSubmitSucceeded(); - if (onSubmitSuccess) { - onSubmitSuccess(result, dispatch, props); - } - } - return result; - }; + (0, _createClass3.default)(App, [{ + key: 'render', + value: function render() { + var children = this.props.children; - var asyncValidateResult = asyncValidate && asyncValidate(); - if (asyncValidateResult) { - return asyncValidateResult.then(function (asyncErrors) { - if (asyncErrors) { - throw asyncErrors; - } - return doSubmit(); - }).catch(function (asyncErrors) { - setSubmitFailed.apply(undefined, _toConsumableArray(fields)); - if (onSubmitFail) { - onSubmitFail(asyncErrors, dispatch, null, props); - } - return Promise.reject(asyncErrors); - }); - } else { - return doSubmit(); - } - } else { - setSubmitFailed.apply(undefined, _toConsumableArray(fields)); - if (onSubmitFail) { - onSubmitFail(syncErrors, dispatch, null, props); + return _react2.default.createElement( + _MuiThemeProvider2.default, + { muiTheme: (0, _Styles.getTheme)() }, + _react2.default.createElement( + 'div', + { style: { height: '100%' } }, + _react2.default.createElement(_AppDrawer2.default, this.props), + _react2.default.createElement( + 'div', + { style: { paddingLeft: 256, height: '100%' } }, + children + ), + _react2.default.createElement(_NotificationBar2.default, null) + ) + ); } - return syncErrors; - } + }]); + return App; +}(_react.Component); + +App.propTypes = { + children: _react.PropTypes.element }; -/* harmony default export */ __webpack_exports__["a"] = (handleSubmit); +exports.default = App; /***/ }), -/* 647 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var getDisplayName = function getDisplayName(Comp) { - return Comp.displayName || Comp.name || 'Component'; -}; +/* 662 */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony default export */ __webpack_exports__["a"] = (getDisplayName); +__webpack_require__(663); +module.exports = __webpack_require__(18).Object.getPrototypeOf; /***/ }), -/* 648 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 663 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createReducer__ = __webpack_require__(649); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(88) + , $getPrototypeOf = __webpack_require__(300); +__webpack_require__(304)('getPrototypeOf', function(){ + return function getPrototypeOf(it){ + return $getPrototypeOf(toObject(it)); + }; +}); +/***/ }), +/* 664 */ +/***/ (function(module, exports, __webpack_require__) { -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createReducer__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +__webpack_require__(665); +var $Object = __webpack_require__(18).Object; +module.exports = function defineProperty(it, key, desc){ + return $Object.defineProperty(it, key, desc); +}; /***/ }), -/* 649 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(167); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__ = __webpack_require__(650); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__structure_plain__ = __webpack_require__(11); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +/* 665 */ +/***/ (function(module, exports, __webpack_require__) { -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } +var $export = __webpack_require__(33); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(43), 'Object', {defineProperty: __webpack_require__(34).f}); +/***/ }), +/* 666 */ +/***/ (function(module, exports, __webpack_require__) { +module.exports = { "default": __webpack_require__(667), __esModule: true }; +/***/ }), +/* 667 */ +/***/ (function(module, exports, __webpack_require__) { +__webpack_require__(668); +module.exports = __webpack_require__(18).Object.setPrototypeOf; -var isReduxFormAction = function isReduxFormAction(action) { - return action && action.type && action.type.length > __WEBPACK_IMPORTED_MODULE_0__actionTypes__["prefix"].length && action.type.substring(0, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["prefix"].length) === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["prefix"]; -}; +/***/ }), +/* 668 */ +/***/ (function(module, exports, __webpack_require__) { -var createReducer = function createReducer(structure) { - var _behaviors; +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(33); +$export($export.S, 'Object', {setPrototypeOf: __webpack_require__(669).set}); - var deepEqual = structure.deepEqual, - empty = structure.empty, - getIn = structure.getIn, - setIn = structure.setIn, - deleteIn = structure.deleteIn, - fromJS = structure.fromJS, - keys = structure.keys, - size = structure.size, - splice = structure.splice; +/***/ }), +/* 669 */ +/***/ (function(module, exports, __webpack_require__) { - var deleteInWithCleanUp = Object(__WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__["a" /* default */])(structure); - var doSplice = function doSplice(state, key, field, index, removeNum, value, force) { - var existing = getIn(state, key + '.' + field); - return existing || force ? setIn(state, key + '.' + field, splice(existing, index, removeNum, value)) : state; - }; - var doPlainSplice = function doPlainSplice(state, key, field, index, removeNum, value, force) { - var slice = getIn(state, key); - var existing = __WEBPACK_IMPORTED_MODULE_2__structure_plain__["a" /* default */].getIn(slice, field); - return existing || force ? setIn(state, key, __WEBPACK_IMPORTED_MODULE_2__structure_plain__["a" /* default */].setIn(slice, field, __WEBPACK_IMPORTED_MODULE_2__structure_plain__["a" /* default */].splice(existing, index, removeNum, value))) : state; - }; - var rootKeys = ['values', 'fields', 'submitErrors', 'asyncErrors']; - var arraySplice = function arraySplice(state, field, index, removeNum, value) { - var result = state; - var nonValuesValue = value != null ? empty : undefined; - result = doSplice(result, 'values', field, index, removeNum, value, true); - result = doSplice(result, 'fields', field, index, removeNum, nonValuesValue); - result = doPlainSplice(result, 'syncErrors', field, index, removeNum, undefined); - result = doPlainSplice(result, 'syncWarnings', field, index, removeNum, undefined); - result = doSplice(result, 'submitErrors', field, index, removeNum, undefined); - result = doSplice(result, 'asyncErrors', field, index, removeNum, undefined); - return result; - }; +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(68) + , anObject = __webpack_require__(35); +var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = __webpack_require__(67)(Function.call, __webpack_require__(302).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; - var behaviors = (_behaviors = {}, _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], function (state, _ref) { - var _ref$meta = _ref.meta, - field = _ref$meta.field, - index = _ref$meta.index, - payload = _ref.payload; +/***/ }), +/* 670 */ +/***/ (function(module, exports, __webpack_require__) { - return arraySplice(state, field, index, 0, payload); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], function (state, _ref2) { - var _ref2$meta = _ref2.meta, - field = _ref2$meta.field, - from = _ref2$meta.from, - to = _ref2$meta.to; +module.exports = { "default": __webpack_require__(671), __esModule: true }; - var array = getIn(state, 'values.' + field); - var length = array ? size(array) : 0; - var result = state; - if (length) { - rootKeys.forEach(function (key) { - var path = key + '.' + field; - if (getIn(result, path)) { - var value = getIn(result, path + '[' + from + ']'); - result = setIn(result, path, splice(getIn(result, path), from, 1) // remove - );result = setIn(result, path, splice(getIn(result, path), to, 0, value) // insert - ); - } - }); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], function (state, _ref3) { - var field = _ref3.meta.field; +/***/ }), +/* 671 */ +/***/ (function(module, exports, __webpack_require__) { - var array = getIn(state, 'values.' + field); - var length = array ? size(array) : 0; - return length ? arraySplice(state, field, length - 1, 1) : state; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], function (state, _ref4) { - var field = _ref4.meta.field, - payload = _ref4.payload; +__webpack_require__(672); +var $Object = __webpack_require__(18).Object; +module.exports = function create(P, D){ + return $Object.create(P, D); +}; - var array = getIn(state, 'values.' + field); - var length = array ? size(array) : 0; - return arraySplice(state, field, length, 0, payload); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], function (state, _ref5) { - var _ref5$meta = _ref5.meta, - field = _ref5$meta.field, - index = _ref5$meta.index; +/***/ }), +/* 672 */ +/***/ (function(module, exports, __webpack_require__) { - return arraySplice(state, field, index, 1); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], function (state, _ref6) { - var field = _ref6.meta.field; +var $export = __webpack_require__(33) +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', {create: __webpack_require__(193)}); - var array = getIn(state, 'values.' + field); - var length = array ? size(array) : 0; - return length ? arraySplice(state, field, 0, length) : state; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], function (state, _ref7) { - var field = _ref7.meta.field; +/***/ }), +/* 673 */ +/***/ (function(module, exports, __webpack_require__) { - return arraySplice(state, field, 0, 1); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], function (state, _ref8) { - var _ref8$meta = _ref8.meta, - field = _ref8$meta.field, - index = _ref8$meta.index, - removeNum = _ref8$meta.removeNum, - payload = _ref8.payload; +__webpack_require__(94); +__webpack_require__(674); +module.exports = __webpack_require__(18).Array.from; - return arraySplice(state, field, index, removeNum, payload); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], function (state, _ref9) { - var _ref9$meta = _ref9.meta, - field = _ref9$meta.field, - indexA = _ref9$meta.indexA, - indexB = _ref9$meta.indexB; +/***/ }), +/* 674 */ +/***/ (function(module, exports, __webpack_require__) { - var result = state; - rootKeys.forEach(function (key) { - var valueA = getIn(result, key + '.' + field + '[' + indexA + ']'); - var valueB = getIn(result, key + '.' + field + '[' + indexB + ']'); - if (valueA !== undefined || valueB !== undefined) { - result = setIn(result, key + '.' + field + '[' + indexA + ']', valueB); - result = setIn(result, key + '.' + field + '[' + indexB + ']', valueA); +"use strict"; + +var ctx = __webpack_require__(67) + , $export = __webpack_require__(33) + , toObject = __webpack_require__(88) + , call = __webpack_require__(307) + , isArrayIter = __webpack_require__(308) + , toLength = __webpack_require__(140) + , createProperty = __webpack_require__(675) + , getIterFn = __webpack_require__(197); + +$export($export.S + $export.F * !__webpack_require__(309)(function(iter){ Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ + var O = toObject(arrayLike) + , C = typeof this == 'function' ? this : Array + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , index = 0 + , iterFn = getIterFn(O) + , length, result, step, iterator; + if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ + for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } - }); + } else { + length = toLength(O.length); + for(result = new C(length); length > index; index++){ + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], function (state, _ref10) { - var field = _ref10.meta.field, - payload = _ref10.payload; + } +}); - return arraySplice(state, field, 0, 0, payload); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], function (state, _ref11) { - var field = _ref11.meta.field, - payload = _ref11.payload; - var result = state; - result = deleteInWithCleanUp(result, 'asyncErrors.' + field); - result = deleteInWithCleanUp(result, 'submitErrors.' + field); - result = setIn(result, 'fields.' + field + '.autofilled', true); - result = setIn(result, 'values.' + field, payload); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], function (state, _ref12) { - var _ref12$meta = _ref12.meta, - field = _ref12$meta.field, - touch = _ref12$meta.touch, - payload = _ref12.payload; +/***/ }), +/* 675 */ +/***/ (function(module, exports, __webpack_require__) { - var result = state; - var initial = getIn(result, 'initial.' + field); - if (initial === undefined && payload === '') { - result = deleteInWithCleanUp(result, 'values.' + field); - } else if (payload !== undefined) { - result = setIn(result, 'values.' + field, payload); - } - if (field === getIn(result, 'active')) { - result = deleteIn(result, 'active'); - } - result = deleteIn(result, 'fields.' + field + '.active'); - if (touch) { - result = setIn(result, 'fields.' + field + '.touched', true); - result = setIn(result, 'anyTouched', true); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], function (state, _ref13) { - var _ref13$meta = _ref13.meta, - field = _ref13$meta.field, - touch = _ref13$meta.touch, - persistentSubmitErrors = _ref13$meta.persistentSubmitErrors, - payload = _ref13.payload; +"use strict"; - var result = state; - var initial = getIn(result, 'initial.' + field); - if (initial === undefined && payload === '') { - result = deleteInWithCleanUp(result, 'values.' + field); - } else if (payload !== undefined) { - result = setIn(result, 'values.' + field, payload); - } - result = deleteInWithCleanUp(result, 'asyncErrors.' + field); - if (!persistentSubmitErrors) { - result = deleteInWithCleanUp(result, 'submitErrors.' + field); - } - result = deleteInWithCleanUp(result, 'fields.' + field + '.autofilled'); - if (touch) { - result = setIn(result, 'fields.' + field + '.touched', true); - result = setIn(result, 'anyTouched', true); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], function (state) { - return deleteIn(state, 'triggerSubmit'); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT_ERRORS"], function (state) { - return deleteInWithCleanUp(state, 'submitErrors'); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], function (state, _ref14) { - var field = _ref14.meta.field; +var $defineProperty = __webpack_require__(34) + , createDesc = __webpack_require__(86); - return deleteIn(state, 'asyncErrors.' + field); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], function (state, _ref15) { - var field = _ref15.meta.field; +module.exports = function(object, index, value){ + if(index in object)$defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; - var result = state; - var previouslyActive = getIn(state, 'active'); - result = deleteIn(result, 'fields.' + previouslyActive + '.active'); - result = setIn(result, 'fields.' + field + '.visited', true); - result = setIn(result, 'fields.' + field + '.active', true); - result = setIn(result, 'active', field); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], function (state, _ref16) { - var payload = _ref16.payload, - _ref16$meta = _ref16.meta, - keepDirty = _ref16$meta.keepDirty, - keepSubmitSucceeded = _ref16$meta.keepSubmitSucceeded; +/***/ }), +/* 676 */ +/***/ (function(module, exports, __webpack_require__) { - var mapData = fromJS(payload); - var result = empty; // clean all field state +/* WEBPACK VAR INJECTION */(function(global, module) {/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ - // persist old warnings, they will get recalculated if the new form values are different from the old values - var warning = getIn(state, 'warning'); - if (warning) { - result = setIn(result, 'warning', warning); - } - var syncWarnings = getIn(state, 'syncWarnings'); - if (syncWarnings) { - result = setIn(result, 'syncWarnings', syncWarnings); - } +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; - // persist old errors, they will get recalculated if the new form values are different from the old values - var error = getIn(state, 'error'); - if (error) { - result = setIn(result, 'error', error); - } - var syncErrors = getIn(state, 'syncErrors'); - if (syncErrors) { - result = setIn(result, 'syncErrors', syncErrors); - } +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; - var registeredFields = getIn(state, 'registeredFields'); - if (registeredFields) { - result = setIn(result, 'registeredFields', registeredFields); - } +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; - var previousValues = getIn(state, 'values'); - var previousInitialValues = getIn(state, 'initial'); - var newInitialValues = mapData; +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - var newValues = previousValues; +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; - if (keepDirty && registeredFields) { - if (!deepEqual(newInitialValues, previousInitialValues)) { - // - // Keep the value of dirty fields while updating the value of - // pristine fields. This way, apps can reinitialize forms while - // avoiding stomping on user edits. - // - // Note 1: The initialize action replaces all initial values - // regardless of keepDirty. - // - // Note 2: When a field is dirty, keepDirty is enabled, and the field - // value is the same as the new initial value for the field, the - // initialize action causes the field to become pristine. That effect - // is what we want. - // - keys(registeredFields).forEach(function (name) { - var previousInitialValue = getIn(previousInitialValues, name); - var previousValue = getIn(previousValues, name); +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; - if (deepEqual(previousValue, previousInitialValue)) { - // Overwrite the old pristine value with the new pristine value - var newInitialValue = getIn(newInitialValues, name); - newValues = setIn(newValues, name, newInitialValue); - } - }); +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; - keys(newInitialValues).forEach(function (name) { - var previousInitialValue = getIn(previousInitialValues, name); - if (typeof previousInitialValue === 'undefined') { - // Add new values at the root level. - var newInitialValue = getIn(newInitialValues, name); - newValues = setIn(newValues, name, newInitialValue); - } - }); - } - } else { - newValues = newInitialValues; - } +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; - if (keepSubmitSucceeded && getIn(state, 'submitSucceeded')) { - result = setIn(result, 'submitSucceeded', true); - } - result = setIn(result, 'values', newValues); - result = setIn(result, 'initial', newInitialValues); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], function (state, _ref17) { - var _ref17$payload = _ref17.payload, - name = _ref17$payload.name, - type = _ref17$payload.type; +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; - var key = 'registeredFields[\'' + name + '\']'; - var field = getIn(state, key); - if (field) { - var count = getIn(field, 'count') + 1; - field = setIn(field, 'count', count); - } else { - field = fromJS({ name: name, type: type, count: 1 }); - } - return setIn(state, key, field); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], function (state) { - var result = empty; - var registeredFields = getIn(state, 'registeredFields'); - if (registeredFields) { - result = setIn(result, 'registeredFields', registeredFields); - } - var values = getIn(state, 'initial'); - if (values) { - result = setIn(result, 'values', values); - result = setIn(result, 'initial', values); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], function (state) { - return setIn(state, 'triggerSubmit', true); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], function (state, _ref18) { - var field = _ref18.meta.field; +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - return setIn(state, 'asyncValidating', field || true); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], function (state) { - return setIn(state, 'submitting', true); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], function (state, _ref19) { - var payload = _ref19.payload; +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - var result = state; - result = deleteIn(result, 'asyncValidating'); - if (payload && Object.keys(payload).length) { - var _error = payload._error, - fieldErrors = _objectWithoutProperties(payload, ['_error']); +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); - if (_error) { - result = setIn(result, 'error', _error); - } - if (Object.keys(fieldErrors).length) { - result = setIn(result, 'asyncErrors', fromJS(fieldErrors)); - } else { - result = deleteIn(result, 'asyncErrors'); - } - } else { - result = deleteIn(result, 'error'); - result = deleteIn(result, 'asyncErrors'); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], function (state, _ref20) { - var payload = _ref20.payload; +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - var result = state; - result = deleteIn(result, 'submitting'); - result = deleteIn(result, 'submitFailed'); - result = deleteIn(result, 'submitSucceeded'); - if (payload && Object.keys(payload).length) { - var _error = payload._error, - fieldErrors = _objectWithoutProperties(payload, ['_error']); +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - if (_error) { - result = setIn(result, 'error', _error); - } else { - result = deleteIn(result, 'error'); - } - if (Object.keys(fieldErrors).length) { - result = setIn(result, 'submitErrors', fromJS(fieldErrors)); - } else { - result = deleteIn(result, 'submitErrors'); - } - result = setIn(result, 'submitFailed', true); - } else { - result = setIn(result, 'submitSucceeded', true); - result = deleteIn(result, 'error'); - result = deleteIn(result, 'submitErrors'); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], function (state, _ref21) { - var fields = _ref21.meta.fields; +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; - var result = state; - result = setIn(result, 'submitFailed', true); - result = deleteIn(result, 'submitSucceeded'); - result = deleteIn(result, 'submitting'); - fields.forEach(function (field) { - return result = setIn(result, 'fields.' + field + '.touched', true); - }); - if (fields.length) { - result = setIn(result, 'anyTouched', true); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], function (state) { - var result = state; - result = deleteIn(result, 'submitFailed'); - result = setIn(result, 'submitSucceeded', true); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], function (state, _ref22) { - var fields = _ref22.meta.fields; +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; - var result = state; - fields.forEach(function (field) { - return result = setIn(result, 'fields.' + field + '.touched', true); - }); - result = setIn(result, 'anyTouched', true); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], function (state, _ref23) { - var _ref23$payload = _ref23.payload, - name = _ref23$payload.name, - destroyOnUnmount = _ref23$payload.destroyOnUnmount; +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) {} +}()); - var result = state; - var key = 'registeredFields[\'' + name + '\']'; - var field = getIn(result, key); - if (!field) { - return result; - } +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ +function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; +} + +/** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ +function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; +} + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} - var count = getIn(field, 'count') - 1; - if (count <= 0 && destroyOnUnmount) { - // Note: Cannot use deleteWithCleanUp here because of the flat nature of registeredFields - result = deleteIn(result, key); - if (deepEqual(getIn(result, 'registeredFields'), empty)) { - result = deleteIn(result, 'registeredFields'); - } - } else { - field = setIn(field, 'count', count); - result = setIn(result, key, field); - } - if (destroyOnUnmount) { - result = deleteInWithCleanUp(result, 'syncErrors.' + name); - result = deleteInWithCleanUp(result, 'submitErrors.' + name); - result = deleteInWithCleanUp(result, 'asyncErrors.' + name); - result = deleteInWithCleanUp(result, 'syncWarnings.' + name); +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], function (state, _ref24) { - var fields = _ref24.meta.fields; + } + return array; +} - var result = state; - fields.forEach(function (field) { - return result = deleteIn(result, 'fields.' + field + '.touched'); - }); - var anyTouched = keys(getIn(result, 'registeredFields')).some(function (key) { - return getIn(result, 'fields.' + key + '.touched'); - }); - result = anyTouched ? setIn(result, 'anyTouched', true) : deleteIn(result, 'anyTouched'); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], function (state, _ref25) { - var _ref25$payload = _ref25.payload, - syncErrors = _ref25$payload.syncErrors, - error = _ref25$payload.error; +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; - var result = state; - if (error) { - result = setIn(result, 'error', error); - result = setIn(result, 'syncError', true); - } else { - result = deleteIn(result, 'error'); - result = deleteIn(result, 'syncError'); - } - if (Object.keys(syncErrors).length) { - result = setIn(result, 'syncErrors', syncErrors); - } else { - result = deleteIn(result, 'syncErrors'); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], function (state, _ref26) { - var _ref26$payload = _ref26.payload, - syncWarnings = _ref26$payload.syncWarnings, - warning = _ref26$payload.warning; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} - var result = state; - if (warning) { - result = setIn(result, 'warning', warning); - } else { - result = deleteIn(result, 'warning'); - } - if (Object.keys(syncWarnings).length) { - result = setIn(result, 'syncWarnings', syncWarnings); - } else { - result = deleteIn(result, 'syncWarnings'); - } - return result; - }), _behaviors); +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array ? array.length : 0; - var reducer = function reducer() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; - var action = arguments[1]; + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} - var behavior = behaviors[action.type]; - return behavior ? behavior(state, action) : state; - }; +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); - var byForm = function byForm(reducer) { - return function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; - var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} - var form = action && action.meta && action.meta.form; - if (!form || !isReduxFormAction(action)) { - return state; - } - if (action.type === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"]) { - return action.meta.form.reduce(function (result, form) { - return deleteInWithCleanUp(result, form); - }, state); - } - var formState = getIn(state, form); - var result = reducer(formState, action); - return result === formState ? state : setIn(state, form, result); - }; +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); }; +} - /** - * Adds additional functionality to the reducer - */ - function decorate(target) { - target.plugin = function plugin(reducers) { - var _this = this; - - // use 'function' keyword to enable 'this' - return decorate(function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; - var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - return Object.keys(reducers).reduce(function (accumulator, key) { - var previousState = getIn(accumulator, key); - var nextState = reducers[key](previousState, action, getIn(state, key)); - return nextState === previousState ? accumulator : setIn(accumulator, key, nextState); - }, _this(state, action)); - }); - }; +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} - return target; +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} } + return result; +} - return decorate(byForm(reducer)); -}; +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); -/* harmony default export */ __webpack_exports__["a"] = (createReducer); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} -/***/ }), -/* 650 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(114); +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; -var createDeleteInWithCleanUp = function createDeleteInWithCleanUp(_ref) { - var deepEqual = _ref.deepEqual, - empty = _ref.empty, - getIn = _ref.getIn, - deleteIn = _ref.deleteIn, - setIn = _ref.setIn; +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; - var deleteInWithCleanUp = function deleteInWithCleanUp(state, path) { - if (path[path.length - 1] === ']') { - // array path - var pathTokens = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(path); - pathTokens.pop(); - var parent = getIn(state, pathTokens.join('.')); - return parent ? setIn(state, path, undefined) : state; - } +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); - var result = state; - if (getIn(state, path) !== undefined) { - result = deleteIn(state, path); - } +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; - var dotIndex = path.lastIndexOf('.'); - if (dotIndex > 0) { - var parentPath = path.substring(0, dotIndex); - if (parentPath[parentPath.length - 1] !== ']') { - var _parent = getIn(result, parentPath); - if (deepEqual(_parent, empty)) { - return deleteInWithCleanUp(result, parentPath); - } - } - } - return result; - }; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; - return deleteInWithCleanUp; -}; +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); -/* harmony default export */ __webpack_exports__["a"] = (createDeleteInWithCleanUp); +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; -/***/ }), -/* 651 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createValues__ = __webpack_require__(652); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); -/***/ }), -/* 652 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(27); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_redux__); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} -var createValues = function createValues(_ref) { - var getIn = _ref.getIn; - return function (config) { - var _prop$getFormState$co = _extends({ - prop: 'values', - getFormState: function getFormState(state) { - return getIn(state, 'form'); - } - }, config), - form = _prop$getFormState$co.form, - prop = _prop$getFormState$co.prop, - getFormState = _prop$getFormState$co.getFormState; +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} - return Object(__WEBPACK_IMPORTED_MODULE_0_react_redux__["connect"])(function (state) { - return _defineProperty({}, prop, getIn(getFormState(state), form + '.values')); - }, function () { - return {}; - } // ignore dispatch - ); - }; -}; +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} -/* harmony default export */ __webpack_exports__["a"] = (createValues); +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} -/***/ }), -/* 653 */ -/***/ (function(module, exports, __webpack_require__) { +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; -"use strict"; +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} -exports.__esModule = true; -function createThunkMiddleware(extraArgument) { - return function (_ref) { - var dispatch = _ref.dispatch, - getState = _ref.getState; - return function (next) { - return function (action) { - if (typeof action === 'function') { - return action(dispatch, getState, extraArgument); - } +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} - return next(action); - }; - }; - }; +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; } -var thunk = createThunkMiddleware(); -thunk.withExtraArgument = createThunkMiddleware; +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); -exports['default'] = thunk; + return index < 0 ? undefined : data[index][1]; +} -/***/ }), -/* 654 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} -"use strict"; +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} -Object.defineProperty(exports, "__esModule", { - value: true -}); +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; -var _menu = __webpack_require__(655); +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; -Object.defineProperty(exports, 'menu', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_menu).default; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); } -}); +} -var _settings = __webpack_require__(656); +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} -Object.defineProperty(exports, 'settings', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_settings).default; - } -}); +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} -var _notification = __webpack_require__(657); +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} -Object.defineProperty(exports, 'notification', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_notification).default; - } -}); +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} -/***/ }), -/* 655 */ -/***/ (function(module, exports, __webpack_require__) { +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; -"use strict"; +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + this.__data__ = new ListCache(entries); +} +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; +} -Object.defineProperty(exports, "__esModule", { - value: true -}); +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + return this.__data__['delete'](key); +} -var _assign = __webpack_require__(49); +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} -var _assign2 = _interopRequireDefault(_assign); +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} -exports.default = menu; +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; +} -var _ActionTypes = __webpack_require__(77); +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; -var types = _interopRequireWildcard(_ActionTypes); +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + var length = result.length, + skipIndexes = !!length; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; +} -function menu() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { - currentMenu: null - }; - var action = arguments[1]; +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (typeof key == 'number' && value === undefined && !(key in object))) { + object[key] = value; + } +} - switch (action.type) { - case types.CHANGE_MENU: - return (0, _assign2.default)({}, state, { - currentMenu: action.menu - }); - default: - return state; +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; } } -/***/ }), -/* 656 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} -"use strict"; +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, isDeep, isFull, customizer, key, object, stack) { + var result; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; -Object.defineProperty(exports, "__esModule", { - value: true -}); + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + if (isHostObject(value)) { + return object ? value : {}; + } + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); -var _assign = __webpack_require__(49); + if (!isArr) { + var props = isFull ? getAllKeys(value) : keys(value); + } + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + }); + return result; +} -var _assign2 = _interopRequireDefault(_assign); +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +function baseCreate(proto) { + return isObject(proto) ? objectCreate(proto) : {}; +} -exports.default = settings; +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} -var _ActionTypes = __webpack_require__(77); +/** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + return objectToString.call(value); +} -var types = _interopRequireWildcard(_ActionTypes); +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} -function settings() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { - values: {} - }; - var action = arguments[1]; +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; - switch (action.type) { - case types.UPDATE_SETTINGS: - var data = (0, _assign2.default)({}, state.values); - data[action.shop] = (0, _assign2.default)({}, state.values[action.shop], action.value); - return (0, _assign2.default)({}, state, { values: data }); - default: - return state; + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } } + return result; } -/***/ }), -/* 657 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + if (!(isArray(source) || isTypedArray(source))) { + var props = baseKeysIn(source); + } + arrayEach(props || source, function(srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; + } + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; -"use strict"; + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }); +} +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = notification; + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; -var _ActionTypes = __webpack_require__(77); + var isCommon = newValue === undefined; -var types = _interopRequireWildcard(_ActionTypes); + if (isCommon) { + newValue = srcValue; + if (isArray(srcValue) || isTypedArray(srcValue)) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else { + isCommon = false; + newValue = baseClone(srcValue, true); + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + isCommon = false; + newValue = baseClone(srcValue, true); + } + else { + newValue = objValue; + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); -function notification() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { - message: null + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); }; - var action = arguments[1]; +} - switch (action.type) { - case types.NOTIFICATION_ADD: - return { message: action.message }; - default: - return state; +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); } + var result = new buffer.constructor(buffer.length); + buffer.copy(result); + return result; } -/***/ }), -/* 658 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} -"use strict"; +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} +/** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ +function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); +} -Object.defineProperty(exports, "__esModule", { - value: true -}); +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} -var _react = __webpack_require__(0); +/** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ +function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); +} -var _react2 = _interopRequireDefault(_react); +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} -var _reactRouter = __webpack_require__(156); +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} -var _App = __webpack_require__(659); +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; -var _App2 = _interopRequireDefault(_App); + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} -var _Supreme = __webpack_require__(768); +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + object || (object = {}); -var _Supreme2 = _interopRequireDefault(_Supreme); + var index = -1, + length = props.length; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + while (++index < length) { + var key = props[index]; -exports.default = function () { - return _react2.default.createElement( - _reactRouter.Route, - { component: _App2.default }, - _react2.default.createElement(_reactRouter.Route, { path: 'supreme/', component: _Supreme2.default }), - _react2.default.createElement(_reactRouter.Redirect, { from: '/', to: 'supreme/' }) - ); -}; + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; -/***/ }), -/* 659 */ -/***/ (function(module, exports, __webpack_require__) { + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; +} -"use strict"; +/** + * Copies own symbol properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; -Object.defineProperty(exports, "__esModule", { - value: true -}); + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; -var _getPrototypeOf = __webpack_require__(3); + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} -var _classCallCheck2 = __webpack_require__(1); +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} -var _createClass2 = __webpack_require__(2); +/** + * Creates an array of the own enumerable symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; -var _createClass3 = _interopRequireDefault(_createClass2); +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; -var _possibleConstructorReturn2 = __webpack_require__(4); +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge < 14, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} -var _inherits2 = __webpack_require__(5); +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); -var _inherits3 = _interopRequireDefault(_inherits2); + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} -var _react = __webpack_require__(0); +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} -var _react2 = _interopRequireDefault(_react); +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); -var _MuiThemeProvider = __webpack_require__(301); + case boolTag: + case dateTag: + return new Ctor(+object); -var _MuiThemeProvider2 = _interopRequireDefault(_MuiThemeProvider); + case dataViewTag: + return cloneDataView(object, isDeep); -var _AppDrawer = __webpack_require__(727); + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); -var _AppDrawer2 = _interopRequireDefault(_AppDrawer); + case mapTag: + return cloneMap(object, isDeep, cloneFunc); -var _NotificationBar = __webpack_require__(761); + case numberTag: + case stringTag: + return new Ctor(object); -var _NotificationBar2 = _interopRequireDefault(_NotificationBar); + case regexpTag: + return cloneRegExp(object); -var _Styles = __webpack_require__(80); + case setTag: + return cloneSet(object, isDeep, cloneFunc); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + case symbolTag: + return cloneSymbol(object); + } +} -var App = function (_Component) { - (0, _inherits3.default)(App, _Component); +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} - function App() { - (0, _classCallCheck3.default)(this, App); - return (0, _possibleConstructorReturn3.default)(this, (App.__proto__ || (0, _getPrototypeOf2.default)(App)).apply(this, arguments)); +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); } + return false; +} - (0, _createClass3.default)(App, [{ - key: 'render', - value: function render() { - var children = this.props.children; +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} - return _react2.default.createElement( - _MuiThemeProvider2.default, - { muiTheme: (0, _Styles.getTheme)() }, - _react2.default.createElement( - 'div', - { style: { height: '100%' } }, - _react2.default.createElement(_AppDrawer2.default, this.props), - _react2.default.createElement( - 'div', - { style: { paddingLeft: 256, height: '100%' } }, - children - ), - _react2.default.createElement(_NotificationBar2.default, null) - ) - ); - } - }]); - return App; -}(_react.Component); +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} -App.propTypes = { - children: _react.PropTypes.element -}; +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; -exports.default = App; + return value === proto; +} -/***/ }), -/* 660 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} -__webpack_require__(661); -module.exports = __webpack_require__(18).Object.getPrototypeOf; +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} -/***/ }), -/* 661 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} -// 19.1.2.9 Object.getPrototypeOf(O) -var toObject = __webpack_require__(84); -var $getPrototypeOf = __webpack_require__(293); +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; -__webpack_require__(294)('getPrototypeOf', function () { - return function getPrototypeOf(it) { - return $getPrototypeOf(toObject(it)); - }; -}); +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} -/***/ }), -/* 662 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; -__webpack_require__(663); -var $Object = __webpack_require__(18).Object; -module.exports = function defineProperty(it, key, desc) { - return $Object.defineProperty(it, key, desc); -}; +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} -/***/ }), -/* 663 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} -var $export = __webpack_require__(28); -// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) -$export($export.S + $export.F * !__webpack_require__(44), 'Object', { defineProperty: __webpack_require__(35).f }); +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || + objectToString.call(value) != objectTag || isHostObject(value)) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return (typeof Ctor == 'function' && + Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); +} +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; -/***/ }), -/* 664 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return copyObject(value, keysIn(value)); +} -module.exports = { "default": __webpack_require__(665), __esModule: true }; +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} -/***/ }), -/* 665 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} -__webpack_require__(93); -__webpack_require__(124); -module.exports = __webpack_require__(187).f('iterator'); +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); +}); +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} -/***/ }), -/* 666 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} -var toInteger = __webpack_require__(135); -var defined = __webpack_require__(133); -// true -> String#at -// false -> String#codePointAt -module.exports = function (TO_STRING) { - return function (that, pos) { - var s = String(defined(that)); - var i = toInteger(pos); - var l = s.length; - var a, b; - if (i < 0 || i >= l) return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; -}; +module.exports = merge; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46), __webpack_require__(262)(module))) /***/ }), -/* 667 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var create = __webpack_require__(186); -var descriptor = __webpack_require__(82); -var setToStringTag = __webpack_require__(123); -var IteratorPrototype = {}; - -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__(50)(IteratorPrototype, __webpack_require__(22)('iterator'), function () { return this; }); - -module.exports = function (Constructor, NAME, next) { - Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); - setToStringTag(Constructor, NAME + ' Iterator'); -}; - - -/***/ }), -/* 668 */ -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__(35); -var anObject = __webpack_require__(36); -var getKeys = __webpack_require__(64); - -module.exports = __webpack_require__(44) ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = getKeys(Properties); - var length = keys.length; - var i = 0; - var P; - while (length > i) dP.f(O, P = keys[i++], Properties[P]); - return O; -}; +Object.defineProperty(exports, "__esModule", { + value: true +}); -/***/ }), -/* 669 */ -/***/ (function(module, exports, __webpack_require__) { +var _typeof2 = __webpack_require__(61); -"use strict"; +var _typeof3 = _interopRequireDefault(_typeof2); -var addToUnscopables = __webpack_require__(670); -var step = __webpack_require__(671); -var Iterators = __webpack_require__(78); -var toIObject = __webpack_require__(52); +exports.default = function (muiTheme) { + var isClient = typeof navigator !== 'undefined'; + var userAgent = muiTheme.userAgent; -// 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() -module.exports = __webpack_require__(295)(Array, 'Array', function (iterated, kind) { - this._t = toIObject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind -// 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function () { - var O = this._t; - var kind = this._k; - var index = this._i++; - if (!O || index >= O.length) { - this._t = undefined; - return step(1); + if (userAgent === undefined && isClient) { + userAgent = navigator.userAgent; } - if (kind == 'keys') return step(0, index); - if (kind == 'values') return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'values'); - -// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) -Iterators.Arguments = Iterators.Array; -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); + if (userAgent === undefined && !hasWarnedAboutUserAgent) { + false ? (0, _warning2.default)(false, 'Material-UI: userAgent should be supplied in the muiTheme context\n for server-side rendering.') : void 0; + hasWarnedAboutUserAgent = true; + } -/***/ }), -/* 670 */ -/***/ (function(module, exports) { + if (userAgent === false) { + // Disabled autoprefixer + return null; + } else if (userAgent === 'all' || userAgent === undefined) { + // Prefix for all user agent + return function (style) { + var isFlex = ['flex', 'inline-flex'].indexOf(style.display) !== -1; + var stylePrefixed = _inlineStylePrefixer2.default.prefixAll(style); -module.exports = function () { /* empty */ }; + if (isFlex) { + var display = stylePrefixed.display; + if (isClient) { + // We can't apply this join with react-dom: + // #https://github.com/facebook/react/issues/6467 + stylePrefixed.display = display[display.length - 1]; + } else { + stylePrefixed.display = display.join('; display: '); + } + } + return stylePrefixed; + }; + } else { + var _ret = function () { + var prefixer = new _inlineStylePrefixer2.default({ + userAgent: userAgent + }); -/***/ }), -/* 671 */ -/***/ (function(module, exports) { + return { + v: function v(style) { + return prefixer.prefix(style); + } + }; + }(); -module.exports = function (done, value) { - return { value: value, done: !!done }; + if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + } }; +var _inlineStylePrefixer = __webpack_require__(678); -/***/ }), -/* 672 */ -/***/ (function(module, exports, __webpack_require__) { +var _inlineStylePrefixer2 = _interopRequireDefault(_inlineStylePrefixer); -module.exports = { "default": __webpack_require__(673), __esModule: true }; +var _warning = __webpack_require__(15); -/***/ }), -/* 673 */ -/***/ (function(module, exports, __webpack_require__) { +var _warning2 = _interopRequireDefault(_warning); -__webpack_require__(674); -__webpack_require__(300); -__webpack_require__(680); -__webpack_require__(681); -module.exports = __webpack_require__(18).Symbol; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var hasWarnedAboutUserAgent = false; /***/ }), -/* 674 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -// ECMAScript 6 symbols shim -var global = __webpack_require__(23); -var has = __webpack_require__(51); -var DESCRIPTORS = __webpack_require__(44); -var $export = __webpack_require__(28); -var redefine = __webpack_require__(296); -var META = __webpack_require__(675).KEY; -var $fails = __webpack_require__(63); -var shared = __webpack_require__(137); -var setToStringTag = __webpack_require__(123); -var uid = __webpack_require__(100); -var wks = __webpack_require__(22); -var wksExt = __webpack_require__(187); -var wksDefine = __webpack_require__(188); -var keyOf = __webpack_require__(676); -var enumKeys = __webpack_require__(677); -var isArray = __webpack_require__(678); -var anObject = __webpack_require__(36); -var toIObject = __webpack_require__(52); -var toPrimitive = __webpack_require__(132); -var createDesc = __webpack_require__(82); -var _create = __webpack_require__(186); -var gOPNExt = __webpack_require__(679); -var $GOPD = __webpack_require__(299); -var $DP = __webpack_require__(35); -var $keys = __webpack_require__(64); -var gOPD = $GOPD.f; -var dP = $DP.f; -var gOPN = gOPNExt.f; -var $Symbol = global.Symbol; -var $JSON = global.JSON; -var _stringify = $JSON && $JSON.stringify; -var PROTOTYPE = 'prototype'; -var HIDDEN = wks('_hidden'); -var TO_PRIMITIVE = wks('toPrimitive'); -var isEnum = {}.propertyIsEnumerable; -var SymbolRegistry = shared('symbol-registry'); -var AllSymbols = shared('symbols'); -var OPSymbols = shared('op-symbols'); -var ObjectProto = Object[PROTOTYPE]; -var USE_NATIVE = typeof $Symbol == 'function'; -var QObject = global.QObject; -// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 -var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; - -// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 -var setSymbolDesc = DESCRIPTORS && $fails(function () { - return _create(dP({}, 'a', { - get: function () { return dP(this, 'a', { value: 7 }).a; } - })).a != 7; -}) ? function (it, key, D) { - var protoDesc = gOPD(ObjectProto, key); - if (protoDesc) delete ObjectProto[key]; - dP(it, key, D); - if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); -} : dP; - -var wrap = function (tag) { - var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); - sym._k = tag; - return sym; -}; - -var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { - return typeof it == 'symbol'; -} : function (it) { - return it instanceof $Symbol; -}; - -var $defineProperty = function defineProperty(it, key, D) { - if (it === ObjectProto) $defineProperty(OPSymbols, key, D); - anObject(it); - key = toPrimitive(key, true); - anObject(D); - if (has(AllSymbols, key)) { - if (!D.enumerable) { - if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); - it[HIDDEN][key] = true; - } else { - if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; - D = _create(D, { enumerable: createDesc(0, false) }); - } return setSymbolDesc(it, key, D); - } return dP(it, key, D); -}; -var $defineProperties = function defineProperties(it, P) { - anObject(it); - var keys = enumKeys(P = toIObject(P)); - var i = 0; - var l = keys.length; - var key; - while (l > i) $defineProperty(it, key = keys[i++], P[key]); - return it; -}; -var $create = function create(it, P) { - return P === undefined ? _create(it) : $defineProperties(_create(it), P); -}; -var $propertyIsEnumerable = function propertyIsEnumerable(key) { - var E = isEnum.call(this, key = toPrimitive(key, true)); - if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; - return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; -}; -var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { - it = toIObject(it); - key = toPrimitive(key, true); - if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; - var D = gOPD(it, key); - if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; - return D; -}; -var $getOwnPropertyNames = function getOwnPropertyNames(it) { - var names = gOPN(toIObject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); - } return result; -}; -var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { - var IS_OP = it === ObjectProto; - var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); - } return result; -}; - -// 19.4.1.1 Symbol([description]) -if (!USE_NATIVE) { - $Symbol = function Symbol() { - if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); - var tag = uid(arguments.length > 0 ? arguments[0] : undefined); - var $set = function (value) { - if (this === ObjectProto) $set.call(OPSymbols, value); - if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; - setSymbolDesc(this, tag, createDesc(1, value)); - }; - if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); - return wrap(tag); - }; - redefine($Symbol[PROTOTYPE], 'toString', function toString() { - return this._k; - }); - - $GOPD.f = $getOwnPropertyDescriptor; - $DP.f = $defineProperty; - __webpack_require__(298).f = gOPNExt.f = $getOwnPropertyNames; - __webpack_require__(101).f = $propertyIsEnumerable; - __webpack_require__(139).f = $getOwnPropertySymbols; - - if (DESCRIPTORS && !__webpack_require__(122)) { - redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); - } - - wksExt.f = function (name) { - return wrap(wks(name)); - }; -} - -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); - -for (var es6Symbols = ( - // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 - 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' -).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); - -for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); - -$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { - // 19.4.2.1 Symbol.for(key) - 'for': function (key) { - return has(SymbolRegistry, key += '') - ? SymbolRegistry[key] - : SymbolRegistry[key] = $Symbol(key); - }, - // 19.4.2.5 Symbol.keyFor(sym) - keyFor: function keyFor(key) { - if (isSymbol(key)) return keyOf(SymbolRegistry, key); - throw TypeError(key + ' is not a symbol!'); - }, - useSetter: function () { setter = true; }, - useSimple: function () { setter = false; } -}); - -$export($export.S + $export.F * !USE_NATIVE, 'Object', { - // 19.1.2.2 Object.create(O [, Properties]) - create: $create, - // 19.1.2.4 Object.defineProperty(O, P, Attributes) - defineProperty: $defineProperty, - // 19.1.2.3 Object.defineProperties(O, Properties) - defineProperties: $defineProperties, - // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) - getOwnPropertyDescriptor: $getOwnPropertyDescriptor, - // 19.1.2.7 Object.getOwnPropertyNames(O) - getOwnPropertyNames: $getOwnPropertyNames, - // 19.1.2.8 Object.getOwnPropertySymbols(O) - getOwnPropertySymbols: $getOwnPropertySymbols -}); -// 24.3.2 JSON.stringify(value [, replacer [, space]]) -$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { - var S = $Symbol(); - // MS Edge converts symbol values to JSON as {} - // WebKit converts symbol values to JSON as null - // V8 throws on boxed symbols - return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; -})), 'JSON', { - stringify: function stringify(it) { - if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined - var args = [it]; - var i = 1; - var replacer, $replacer; - while (arguments.length > i) args.push(arguments[i++]); - replacer = args[1]; - if (typeof replacer == 'function') $replacer = replacer; - if ($replacer || !isArray(replacer)) replacer = function (key, value) { - if ($replacer) value = $replacer.call(this, key, value); - if (!isSymbol(value)) return value; - }; - args[1] = replacer; - return _stringify.apply($JSON, args); - } +Object.defineProperty(exports, "__esModule", { + value: true }); -// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) -$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(50)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); -// 19.4.3.5 Symbol.prototype[@@toStringTag] -setToStringTag($Symbol, 'Symbol'); -// 20.2.1.9 Math[@@toStringTag] -setToStringTag(Math, 'Math', true); -// 24.3.3 JSON[@@toStringTag] -setToStringTag(global.JSON, 'JSON', true); - - -/***/ }), -/* 675 */ -/***/ (function(module, exports, __webpack_require__) { +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +// special flexbox specifications -var META = __webpack_require__(100)('meta'); -var isObject = __webpack_require__(62); -var has = __webpack_require__(51); -var setDesc = __webpack_require__(35).f; -var id = 0; -var isExtensible = Object.isExtensible || function () { - return true; -}; -var FREEZE = !__webpack_require__(63)(function () { - return isExtensible(Object.preventExtensions({})); -}); -var setMeta = function (it) { - setDesc(it, META, { value: { - i: 'O' + ++id, // object ID - w: {} // weak collections IDs - } }); -}; -var fastKey = function (it, create) { - // return primitive with prefix - if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return 'F'; - // not necessary to add metadata - if (!create) return 'E'; - // add missing metadata - setMeta(it); - // return object ID - } return it[META].i; -}; -var getWeak = function (it, create) { - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return true; - // not necessary to add metadata - if (!create) return false; - // add missing metadata - setMeta(it); - // return hash weak collections IDs - } return it[META].w; -}; -// add metadata on freeze-family methods calling -var onFreeze = function (it) { - if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); - return it; -}; -var meta = module.exports = { - KEY: META, - NEED: false, - fastKey: fastKey, - getWeak: getWeak, - onFreeze: onFreeze -}; +var _prefixAll2 = __webpack_require__(679); -/***/ }), -/* 676 */ -/***/ (function(module, exports, __webpack_require__) { +var _prefixAll3 = _interopRequireDefault(_prefixAll2); -var getKeys = __webpack_require__(64); -var toIObject = __webpack_require__(52); -module.exports = function (object, el) { - var O = toIObject(object); - var keys = getKeys(O); - var length = keys.length; - var index = 0; - var key; - while (length > index) if (O[key = keys[index++]] === el) return key; -}; +var _getBrowserInformation = __webpack_require__(690); +var _getBrowserInformation2 = _interopRequireDefault(_getBrowserInformation); -/***/ }), -/* 677 */ -/***/ (function(module, exports, __webpack_require__) { +var _getPrefixedKeyframes = __webpack_require__(693); -// all enumerable object keys, includes symbols -var getKeys = __webpack_require__(64); -var gOPS = __webpack_require__(139); -var pIE = __webpack_require__(101); -module.exports = function (it) { - var result = getKeys(it); - var getSymbols = gOPS.f; - if (getSymbols) { - var symbols = getSymbols(it); - var isEnum = pIE.f; - var i = 0; - var key; - while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); - } return result; -}; +var _getPrefixedKeyframes2 = _interopRequireDefault(_getPrefixedKeyframes); +var _capitalizeString = __webpack_require__(200); -/***/ }), -/* 678 */ -/***/ (function(module, exports, __webpack_require__) { +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); -// 7.2.2 IsArray(argument) -var cof = __webpack_require__(83); -module.exports = Array.isArray || function isArray(arg) { - return cof(arg) == 'Array'; -}; +var _sortPrefixedStyle = __webpack_require__(313); +var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); -/***/ }), -/* 679 */ -/***/ (function(module, exports, __webpack_require__) { +var _prefixProps = __webpack_require__(694); -// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window -var toIObject = __webpack_require__(52); -var gOPN = __webpack_require__(298).f; -var toString = {}.toString; +var _prefixProps2 = _interopRequireDefault(_prefixProps); -var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames - ? Object.getOwnPropertyNames(window) : []; +var _position = __webpack_require__(695); -var getWindowNames = function (it) { - try { - return gOPN(it); - } catch (e) { - return windowNames.slice(); - } -}; +var _position2 = _interopRequireDefault(_position); -module.exports.f = function getOwnPropertyNames(it) { - return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); -}; +var _calc = __webpack_require__(696); +var _calc2 = _interopRequireDefault(_calc); -/***/ }), -/* 680 */ -/***/ (function(module, exports, __webpack_require__) { +var _zoomCursor = __webpack_require__(697); -__webpack_require__(188)('asyncIterator'); +var _zoomCursor2 = _interopRequireDefault(_zoomCursor); +var _grabCursor = __webpack_require__(698); -/***/ }), -/* 681 */ -/***/ (function(module, exports, __webpack_require__) { +var _grabCursor2 = _interopRequireDefault(_grabCursor); -__webpack_require__(188)('observable'); +var _flex = __webpack_require__(699); +var _flex2 = _interopRequireDefault(_flex); -/***/ }), -/* 682 */ -/***/ (function(module, exports, __webpack_require__) { +var _sizing = __webpack_require__(700); -module.exports = { "default": __webpack_require__(683), __esModule: true }; +var _sizing2 = _interopRequireDefault(_sizing); -/***/ }), -/* 683 */ -/***/ (function(module, exports, __webpack_require__) { +var _gradient = __webpack_require__(701); -__webpack_require__(684); -module.exports = __webpack_require__(18).Object.setPrototypeOf; +var _gradient2 = _interopRequireDefault(_gradient); +var _transition = __webpack_require__(702); -/***/ }), -/* 684 */ -/***/ (function(module, exports, __webpack_require__) { +var _transition2 = _interopRequireDefault(_transition); -// 19.1.3.19 Object.setPrototypeOf(O, proto) -var $export = __webpack_require__(28); -$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(685).set }); +var _flexboxIE = __webpack_require__(704); +var _flexboxIE2 = _interopRequireDefault(_flexboxIE); -/***/ }), -/* 685 */ -/***/ (function(module, exports, __webpack_require__) { +var _flexboxOld = __webpack_require__(705); -// Works with __proto__ only. Old v8 can't work with null proto objects. -/* eslint-disable no-proto */ -var isObject = __webpack_require__(62); -var anObject = __webpack_require__(36); -var check = function (O, proto) { - anObject(O); - if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); -}; -module.exports = { - set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line - function (test, buggy, set) { - try { - set = __webpack_require__(61)(Function.call, __webpack_require__(299).f(Object.prototype, '__proto__').set, 2); - set(test, []); - buggy = !(test instanceof Array); - } catch (e) { buggy = true; } - return function setPrototypeOf(O, proto) { - check(O, proto); - if (buggy) O.__proto__ = proto; - else set(O, proto); - return O; - }; - }({}, false) : undefined), - check: check -}; +var _flexboxOld2 = _interopRequireDefault(_flexboxOld); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/***/ }), -/* 686 */ -/***/ (function(module, exports, __webpack_require__) { +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -module.exports = { "default": __webpack_require__(687), __esModule: true }; +var plugins = [_position2.default, _calc2.default, _zoomCursor2.default, _grabCursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, +// this must be run AFTER the flexbox specs +_flex2.default]; -/***/ }), -/* 687 */ -/***/ (function(module, exports, __webpack_require__) { +var Prefixer = function () { + /** + * Instantiante a new prefixer + * @param {string} userAgent - userAgent to gather prefix information according to caniuse.com + * @param {string} keepUnprefixed - keeps unprefixed properties and values + */ -__webpack_require__(688); -var $Object = __webpack_require__(18).Object; -module.exports = function create(P, D) { - return $Object.create(P, D); -}; + function Prefixer() { + var _this = this; + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; -/***/ }), -/* 688 */ -/***/ (function(module, exports, __webpack_require__) { + _classCallCheck(this, Prefixer); -var $export = __webpack_require__(28); -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -$export($export.S, 'Object', { create: __webpack_require__(186) }); + var defaultUserAgent = typeof navigator !== 'undefined' ? navigator.userAgent : undefined; + this._userAgent = options.userAgent || defaultUserAgent; + this._keepUnprefixed = options.keepUnprefixed || false; -/***/ }), -/* 689 */ -/***/ (function(module, exports, __webpack_require__) { + this._browserInfo = (0, _getBrowserInformation2.default)(this._userAgent); -__webpack_require__(93); -__webpack_require__(690); -module.exports = __webpack_require__(18).Array.from; + // Checks if the userAgent was resolved correctly + if (this._browserInfo && this._browserInfo.prefix) { + // set additional prefix information + this.cssPrefix = this._browserInfo.prefix.css; + this.jsPrefix = this._browserInfo.prefix.inline; + this.prefixedKeyframes = (0, _getPrefixedKeyframes2.default)(this._browserInfo); + } else { + this._usePrefixAllFallback = true; + return false; + } + var data = this._browserInfo.browser && _prefixProps2.default[this._browserInfo.browser]; + if (data) { + this._requiresPrefix = Object.keys(data).filter(function (key) { + return data[key] >= _this._browserInfo.version; + }).reduce(function (result, name) { + result[name] = true; + return result; + }, {}); + this._hasPropsRequiringPrefix = Object.keys(this._requiresPrefix).length > 0; + } else { + this._usePrefixAllFallback = true; + } + } -/***/ }), -/* 690 */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Returns a prefixed version of the style object + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ -"use strict"; -var ctx = __webpack_require__(61); -var $export = __webpack_require__(28); -var toObject = __webpack_require__(84); -var call = __webpack_require__(303); -var isArrayIter = __webpack_require__(304); -var toLength = __webpack_require__(134); -var createProperty = __webpack_require__(691); -var getIterFn = __webpack_require__(190); + _createClass(Prefixer, [{ + key: 'prefix', + value: function prefix(styles) { + var _this2 = this; -$export($export.S + $export.F * !__webpack_require__(305)(function (iter) { Array.from(iter); }), 'Array', { - // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) - from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { - var O = toObject(arrayLike); - var C = typeof this == 'function' ? this : Array; - var aLen = arguments.length; - var mapfn = aLen > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var index = 0; - var iterFn = getIterFn(O); - var length, result, step, iterator; - if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); - // if object isn't iterable or it's array with default iterator - use simple case - if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { - for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { - createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + // use prefixAll as fallback if userAgent can not be resolved + if (this._usePrefixAllFallback) { + return (0, _prefixAll3.default)(styles); } - } else { - length = toLength(O.length); - for (result = new C(length); length > index; index++) { - createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + + // only add prefixes if needed + if (!this._hasPropsRequiringPrefix) { + return styles; } - } - result.length = index; - return result; - } -}); + Object.keys(styles).forEach(function (property) { + var value = styles[property]; + if (value instanceof Object && !Array.isArray(value)) { + // recurse through nested style objects + styles[property] = _this2.prefix(value); + } else { + // add prefixes if needed + if (_this2._requiresPrefix[property]) { + styles[_this2.jsPrefix + (0, _capitalizeString2.default)(property)] = value; + if (!_this2._keepUnprefixed) { + delete styles[property]; + } + } + } + }); -/***/ }), -/* 691 */ -/***/ (function(module, exports, __webpack_require__) { + Object.keys(styles).forEach(function (property) { + [].concat(styles[property]).forEach(function (value) { + // resolve plugins + plugins.forEach(function (plugin) { + // generates a new plugin interface with current data + assignStyles(styles, plugin({ + property: property, + value: value, + styles: styles, + browserInfo: _this2._browserInfo, + prefix: { + js: _this2.jsPrefix, + css: _this2.cssPrefix, + keyframes: _this2.prefixedKeyframes + }, + keepUnprefixed: _this2._keepUnprefixed, + requiresPrefix: _this2._requiresPrefix + }), value, _this2._keepUnprefixed); + }); + }); + }); -"use strict"; + return (0, _sortPrefixedStyle2.default)(styles); + } -var $defineProperty = __webpack_require__(35); -var createDesc = __webpack_require__(82); + /** + * Returns a prefixed version of the style object using all vendor prefixes + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ -module.exports = function (object, index, value) { - if (index in object) $defineProperty.f(object, index, createDesc(0, value)); - else object[index] = value; -}; + }], [{ + key: 'prefixAll', + value: function prefixAll(styles) { + return (0, _prefixAll3.default)(styles); + } + }]); + return Prefixer; +}(); -/***/ }), -/* 692 */ -/***/ (function(module, exports, __webpack_require__) { +exports.default = Prefixer; -/* WEBPACK VAR INJECTION */(function(global, module) {/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; +function assignStyles(base) { + var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var value = arguments[2]; + var keepUnprefixed = arguments[3]; -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; + Object.keys(extend).forEach(function (property) { + var baseValue = base[property]; + if (Array.isArray(baseValue)) { + [].concat(extend[property]).forEach(function (val) { + if (base[property].indexOf(val) === -1) { + base[property].splice(baseValue.indexOf(value), keepUnprefixed ? 0 : 1, val); + } + }); + } else { + base[property] = extend[property]; + } + }); +} +module.exports = exports['default']; -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; +/***/ }), +/* 679 */ +/***/ (function(module, exports, __webpack_require__) { -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; +"use strict"; -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = prefixAll; -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; +var _prefixProps = __webpack_require__(312); -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; +var _prefixProps2 = _interopRequireDefault(_prefixProps); -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; +var _capitalizeString = __webpack_require__(200); -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = -cloneableTags[boolTag] = cloneableTags[dateTag] = -cloneableTags[float32Tag] = cloneableTags[float64Tag] = -cloneableTags[int8Tag] = cloneableTags[int16Tag] = -cloneableTags[int32Tag] = cloneableTags[mapTag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[setTag] = -cloneableTags[stringTag] = cloneableTags[symbolTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; +var _sortPrefixedStyle = __webpack_require__(313); -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; +var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; +var _position = __webpack_require__(681); -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); +var _position2 = _interopRequireDefault(_position); -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; +var _calc = __webpack_require__(682); -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; +var _calc2 = _interopRequireDefault(_calc); -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; +var _cursor = __webpack_require__(683); -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; +var _cursor2 = _interopRequireDefault(_cursor); -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - return freeProcess && freeProcess.binding('util'); - } catch (e) {} -}()); +var _flex = __webpack_require__(684); -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; +var _flex2 = _interopRequireDefault(_flex); -/** - * Adds the key-value `pair` to `map`. - * - * @private - * @param {Object} map The map to modify. - * @param {Array} pair The key-value pair to add. - * @returns {Object} Returns `map`. - */ -function addMapEntry(map, pair) { - // Don't return `map.set` because it's not chainable in IE 11. - map.set(pair[0], pair[1]); - return map; -} +var _sizing = __webpack_require__(685); -/** - * Adds `value` to `set`. - * - * @private - * @param {Object} set The set to modify. - * @param {*} value The value to add. - * @returns {Object} Returns `set`. - */ -function addSetEntry(set, value) { - // Don't return `set.add` because it's not chainable in IE 11. - set.add(value); - return set; -} +var _sizing2 = _interopRequireDefault(_sizing); -/** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); -} +var _gradient = __webpack_require__(686); -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array ? array.length : 0; +var _gradient2 = _interopRequireDefault(_gradient); - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} +var _transition = __webpack_require__(687); -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; +var _transition2 = _interopRequireDefault(_transition); - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} +var _flexboxIE = __webpack_require__(688); -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array ? array.length : 0; +var _flexboxIE2 = _interopRequireDefault(_flexboxIE); - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} +var _flexboxOld = __webpack_require__(689); -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); +var _flexboxOld2 = _interopRequireDefault(_flexboxOld); - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function(value) { - return func(value); - }; -} +// special flexbox specifications -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} +var plugins = [_position2.default, _calc2.default, _cursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, _flex2.default]; /** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. + * Returns a prefixed version of the style object using all vendor prefixes + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); +function prefixAll(styles) { + Object.keys(styles).forEach(function (property) { + var value = styles[property]; + if (value instanceof Object && !Array.isArray(value)) { + // recurse through nested style objects + styles[property] = prefixAll(value); + } else { + Object.keys(_prefixProps2.default).forEach(function (prefix) { + var properties = _prefixProps2.default[prefix]; + // add prefixes if needed + if (properties[property]) { + styles[prefix + (0, _capitalizeString2.default)(property)] = value; + } + }); + } + }); - map.forEach(function(value, key) { - result[++index] = [key, value]; + Object.keys(styles).forEach(function (property) { + [].concat(styles[property]).forEach(function (value, index) { + // resolve every special plugins + plugins.forEach(function (plugin) { + return assignStyles(styles, plugin(property, value)); + }); + }); }); - return result; -} -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; + return (0, _sortPrefixedStyle2.default)(styles); } -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); +function assignStyles(base) { + var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - set.forEach(function(value) { - result[++index] = value; + Object.keys(extend).forEach(function (property) { + var baseValue = base[property]; + if (Array.isArray(baseValue)) { + [].concat(extend[property]).forEach(function (value) { + var valueIndex = baseValue.indexOf(value); + if (valueIndex > -1) { + base[property].splice(valueIndex, 1); + } + base[property].push(value); + }); + } else { + base[property] = extend[property]; + } }); - return result; } +module.exports = exports['default']; -/** Used for built-in method references. */ -var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; +/***/ }), +/* 680 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; +"use strict"; -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; +Object.defineProperty(exports, "__esModule", { + value: true +}); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +exports.default = function (property) { + return property.match(/^(Webkit|Moz|O|ms)/) !== null; +}; -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); +module.exports = exports["default"]; -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; +/***/ }), +/* 681 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); +"use strict"; -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - getPrototype = overArg(Object.getPrototypeOf, Object), - objectCreate = Object.create, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeKeys = overArg(Object.keys, Object), - nativeMax = Math.max; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = position; +function position(property, value) { + if (property === 'position' && value === 'sticky') { + return { position: ['-webkit-sticky', 'sticky'] }; + } +} +module.exports = exports['default']; -/* Built-in method references that are verified to be native. */ -var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); +/***/ }), +/* 682 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); +"use strict"; -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = calc; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} +var _joinPrefixedValue = __webpack_require__(130); -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; -} +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; -} +var _isPrefixedValue = __webpack_require__(201); -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function calc(property, value) { + if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('calc(') > -1) { + return (0, _joinPrefixedValue2.default)(property, value, function (prefix, value) { + return value.replace(/calc\(/g, prefix + 'calc('); + }); } - return hasOwnProperty.call(data, key) ? data[key] : undefined; } +module.exports = exports['default']; -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); -} +/***/ }), +/* 683 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} +"use strict"; -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cursor; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} +var _joinPrefixedValue = __webpack_require__(130); -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; -} +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); +var values = { + 'zoom-in': true, + 'zoom-out': true, + grab: true, + grabbing: true +}; + +function cursor(property, value) { + if (property === 'cursor' && values[value]) { + return (0, _joinPrefixedValue2.default)(property, value); } - return true; } +module.exports = exports['default']; -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); +/***/ }), +/* 684 */ +/***/ (function(module, exports, __webpack_require__) { - return index < 0 ? undefined : data[index][1]; -} +"use strict"; -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flex; +var values = { flex: true, 'inline-flex': true }; - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; +function flex(property, value) { + if (property === 'display' && values[value]) { + return { + display: ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value] + }; } - return this; } +module.exports = exports['default']; -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; +/***/ }), +/* 685 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; +"use strict"; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sizing; -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - return getMapData(this, key)['delete'](key); -} +var _joinPrefixedValue = __webpack_require__(130); -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); - return this; +var properties = { + maxHeight: true, + maxWidth: true, + width: true, + height: true, + columnWidth: true, + minWidth: true, + minHeight: true +}; +var values = { + 'min-content': true, + 'max-content': true, + 'fill-available': true, + 'fit-content': true, + 'contain-floats': true +}; + +function sizing(property, value) { + if (properties[property] && values[value]) { + return (0, _joinPrefixedValue2.default)(property, value); + } } +module.exports = exports['default']; + +/***/ }), +/* 686 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; -/** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Stack(entries) { - this.__data__ = new ListCache(entries); -} +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gradient; -/** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ -function stackClear() { - this.__data__ = new ListCache; -} +var _joinPrefixedValue = __webpack_require__(130); -/** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function stackDelete(key) { - return this.__data__['delete'](key); -} +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); -/** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function stackGet(key) { - return this.__data__.get(key); -} +var _isPrefixedValue = __webpack_require__(201); -/** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function stackHas(key) { - return this.__data__.has(key); -} +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); -/** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ -function stackSet(key, value) { - var cache = this.__data__; - if (cache instanceof ListCache) { - var pairs = cache.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - return this; - } - cache = this.__data__ = new MapCache(pairs); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; + +function gradient(property, value) { + if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.match(values) !== null) { + return (0, _joinPrefixedValue2.default)(property, value); } - cache.set(key, value); - return this; } +module.exports = exports['default']; -// Add methods to `Stack`. -Stack.prototype.clear = stackClear; -Stack.prototype['delete'] = stackDelete; -Stack.prototype.get = stackGet; -Stack.prototype.has = stackHas; -Stack.prototype.set = stackSet; +/***/ }), +/* 687 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - // Safari 9 makes `arguments.length` enumerable in strict mode. - var result = (isArray(value) || isArguments(value)) - ? baseTimes(value.length, String) - : []; +"use strict"; - var length = result.length, - skipIndexes = !!length; - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && (key == 'length' || isIndex(key, length)))) { - result.push(key); - } - } - return result; -} +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = transition; -/** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (typeof key == 'number' && value === undefined && !(key in object))) { - object[key] = value; - } -} +var _hyphenateStyleName = __webpack_require__(314); -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - object[key] = value; - } -} +var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; +var _capitalizeString = __webpack_require__(200); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _isPrefixedValue = __webpack_require__(201); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +var _prefixProps = __webpack_require__(312); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { + transition: true, + transitionProperty: true, + WebkitTransition: true, + WebkitTransitionProperty: true +}; + +function transition(property, value) { + // also check for already prefixed transitions + if (typeof value === 'string' && properties[property]) { + var _ref2; + + var outputValue = prefixValue(value); + var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (value) { + return value.match(/-moz-|-ms-/) === null; + }).join(','); + + // if the property is already prefixed + if (property.indexOf('Webkit') > -1) { + return _defineProperty({}, property, webkitOutput); } - } - return -1; -} -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); + return _ref2 = {}, _defineProperty(_ref2, 'Webkit' + (0, _capitalizeString2.default)(property), webkitOutput), _defineProperty(_ref2, property, outputValue), _ref2; + } } -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {boolean} [isFull] Specify a clone including symbols. - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, isDeep, isFull, customizer, key, object, stack) { - var result; - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { +function prefixValue(value) { + if ((0, _isPrefixedValue2.default)(value)) { return value; } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - if (isHostObject(value)) { - return object ? value : {}; - } - result = initCloneObject(isFunc ? {} : value); - if (!isDeep) { - return copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, baseClone, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); + // only split multi values, not cubic beziers + var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); - if (!isArr) { - var props = isFull ? getAllKeys(value) : keys(value); - } - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + // iterate each single value and check for transitioned properties + // that need to be prefixed as well + multipleValues.forEach(function (val, index) { + multipleValues[index] = Object.keys(_prefixProps2.default).reduce(function (out, prefix) { + var dashCasePrefix = '-' + prefix.toLowerCase() + '-'; + + Object.keys(_prefixProps2.default[prefix]).forEach(function (prop) { + var dashCaseProperty = (0, _hyphenateStyleName2.default)(prop); + + if (val.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') { + // join all prefixes and create a new value + out = val.replace(dashCaseProperty, dashCasePrefix + dashCaseProperty) + ',' + out; + } + }); + return out; + }, val); }); - return result; -} -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ -function baseCreate(proto) { - return isObject(proto) ? objectCreate(proto) : {}; + return multipleValues.join(','); } +module.exports = exports['default']; -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); -} +/***/ }), +/* 688 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * The base implementation of `getTag`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - return objectToString.call(value); -} +"use strict"; -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxIE; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'distribute', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end' +}; +var alternativeProps = { + alignContent: 'msFlexLinePack', + alignSelf: 'msFlexItemAlign', + alignItems: 'msFlexAlign', + justifyContent: 'msFlexPack', + order: 'msFlexOrder', + flexGrow: 'msFlexPositive', + flexShrink: 'msFlexNegative', + flexBasis: 'msPreferredSize' +}; + +function flexboxIE(property, value) { + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); } +module.exports = exports['default']; -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; -} +/***/ }), +/* 689 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxOld; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'justify', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + 'wrap-reverse': 'multiple', + wrap: 'multiple' +}; + +var alternativeProps = { + alignItems: 'WebkitBoxAlign', + justifyContent: 'WebkitBoxPack', + flexWrap: 'WebkitBoxLines' +}; + +function flexboxOld(property, value) { + if (property === 'flexDirection' && typeof value === 'string') { + return { + WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', + WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' + }; } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); } - return result; } +module.exports = exports['default']; + +/***/ }), +/* 690 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _bowser = __webpack_require__(691); + +var _bowser2 = _interopRequireDefault(_bowser); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var vendorPrefixes = { + Webkit: ['chrome', 'safari', 'ios', 'android', 'phantom', 'opera', 'webos', 'blackberry', 'bada', 'tizen', 'chromium', 'vivaldi'], + Moz: ['firefox', 'seamonkey', 'sailfish'], + ms: ['msie', 'msedge'] +}; +var browsers = { + chrome: [['chrome'], ['chromium']], + safari: [['safari']], + firefox: [['firefox']], + edge: [['msedge']], + opera: [['opera'], ['vivaldi']], + ios_saf: [['ios', 'mobile'], ['ios', 'tablet']], + ie: [['msie']], + op_mini: [['opera', 'mobile'], ['opera', 'tablet']], + and_uc: [['android', 'mobile'], ['android', 'tablet']], + android: [['android', 'mobile'], ['android', 'tablet']] +}; + +var browserByInfo = function browserByInfo(info) { + if (info.firefox) { + return 'firefox'; + } + var name = ''; + + Object.keys(browsers).forEach(function (browser) { + browsers[browser].forEach(function (condition) { + var match = 0; + condition.forEach(function (single) { + if (info[single]) { + match += 1; + } + }); + if (condition.length === match) { + name = browser; + } + }); + }); + + return name; +}; /** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * Uses bowser to get default browser information such as version and name + * Evaluates bowser info and adds vendorPrefix information + * @param {string} userAgent - userAgent that gets evaluated */ -function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); + +exports.default = function (userAgent) { + if (!userAgent) { + return false; } - var isProto = isPrototype(object), - result = []; + var info = _bowser2.default._detect(userAgent); - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } + Object.keys(vendorPrefixes).forEach(function (prefix) { + vendorPrefixes[prefix].forEach(function (browser) { + if (info[browser]) { + info.prefix = { + inline: prefix, + css: '-' + prefix.toLowerCase() + '-' + }; + } + }); + }); + + info.browser = browserByInfo(info); + + // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN + info.version = info.version ? parseFloat(info.version) : parseInt(parseFloat(info.osversion), 10); + info.osversion = parseFloat(info.osversion); + + // iOS forces all browsers to use Safari under the hood + // as the Safari version seems to match the iOS version + // we just explicitely use the osversion instead + // https://github.com/rofrischmann/inline-style-prefixer/issues/72 + if (info.browser === 'ios_saf' && info.version > info.osversion) { + info.version = info.osversion; + info.safari = true; } - return result; -} -/** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; + // seperate native android chrome + // https://github.com/rofrischmann/inline-style-prefixer/issues/45 + if (info.browser === 'android' && info.chrome && info.version > 37) { + info.browser = 'and_chr'; } - if (!(isArray(source) || isTypedArray(source))) { - var props = baseKeysIn(source); + + // For android < 4.4 we want to check the osversion + // not the chrome version, see issue #26 + // https://github.com/rofrischmann/inline-style-prefixer/issues/26 + if (info.browser === 'android' && info.osversion < 5) { + info.version = info.osversion; } - arrayEach(props || source, function(srcValue, key) { - if (props) { - key = srcValue; - srcValue = source[key]; - } - if (isObject(srcValue)) { - stack || (stack = new Stack); - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(object[key], srcValue, (key + ''), object, source, stack) - : undefined; - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }); -} + return info; +}; -/** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. +module.exports = exports['default']; + +/***/ }), +/* 691 */ +/***/ (function(module, exports, __webpack_require__) { + +/*! + * Bowser - a browser detector + * https://github.com/ded/bowser + * MIT License | (c) Dustin Diaz 2015 */ -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = object[key], - srcValue = source[key], - stacked = stack.get(srcValue); - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; +!function (root, name, definition) { + if (typeof module != 'undefined' && module.exports) module.exports = definition() + else if (true) __webpack_require__(692)(name, definition) + else root[name] = definition() +}(this, 'bowser', function () { + /** + * See useragents.js for examples of navigator.userAgent + */ - var isCommon = newValue === undefined; + var t = true - if (isCommon) { - newValue = srcValue; - if (isArray(srcValue) || isTypedArray(srcValue)) { - if (isArray(objValue)) { - newValue = objValue; + function detect(ua) { + + function getFirstMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[1]) || ''; + } + + function getSecondMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[2]) || ''; + } + + var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase() + , likeAndroid = /like android/i.test(ua) + , android = !likeAndroid && /android/i.test(ua) + , nexusMobile = /nexus\s*[0-6]\s*/i.test(ua) + , nexusTablet = !nexusMobile && /nexus\s*[0-9]+/i.test(ua) + , chromeos = /CrOS/.test(ua) + , silk = /silk/i.test(ua) + , sailfish = /sailfish/i.test(ua) + , tizen = /tizen/i.test(ua) + , webos = /(web|hpw)os/i.test(ua) + , windowsphone = /windows phone/i.test(ua) + , samsungBrowser = /SamsungBrowser/i.test(ua) + , windows = !windowsphone && /windows/i.test(ua) + , mac = !iosdevice && !silk && /macintosh/i.test(ua) + , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua) + , edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i) + , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i) + , tablet = /tablet/i.test(ua) + , mobile = !tablet && /[^-]mobi/i.test(ua) + , xbox = /xbox/i.test(ua) + , result + + if (/opera/i.test(ua)) { + // an old Opera + result = { + name: 'Opera' + , opera: t + , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i) } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); + } else if (/opr|opios/i.test(ua)) { + // a new Opera + result = { + name: 'Opera' + , opera: t + , version: getFirstMatch(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i) || versionIdentifier } - else { - isCommon = false; - newValue = baseClone(srcValue, true); + } + else if (/SamsungBrowser/i.test(ua)) { + result = { + name: 'Samsung Internet for Android' + , samsungBrowser: t + , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i) } } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); + else if (/coast/i.test(ua)) { + result = { + name: 'Opera Coast' + , coast: t + , version: versionIdentifier || getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i) } - else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { - isCommon = false; - newValue = baseClone(srcValue, true); + } + else if (/yabrowser/i.test(ua)) { + result = { + name: 'Yandex Browser' + , yandexbrowser: t + , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/ucbrowser/i.test(ua)) { + result = { + name: 'UC Browser' + , ucbrowser: t + , version: getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/mxios/i.test(ua)) { + result = { + name: 'Maxthon' + , maxthon: t + , version: getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/epiphany/i.test(ua)) { + result = { + name: 'Epiphany' + , epiphany: t + , version: getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/puffin/i.test(ua)) { + result = { + name: 'Puffin' + , puffin: t + , version: getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i) + } + } + else if (/sleipnir/i.test(ua)) { + result = { + name: 'Sleipnir' + , sleipnir: t + , version: getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/k-meleon/i.test(ua)) { + result = { + name: 'K-Meleon' + , kMeleon: t + , version: getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (windowsphone) { + result = { + name: 'Windows Phone' + , windowsphone: t + } + if (edgeVersion) { + result.msedge = t + result.version = edgeVersion } else { - newValue = objValue; + result.msie = t + result.version = getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i) } } - else { - isCommon = false; + else if (/msie|trident/i.test(ua)) { + result = { + name: 'Internet Explorer' + , msie: t + , version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i) + } + } else if (chromeos) { + result = { + name: 'Chrome' + , chromeos: t + , chromeBook: t + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } else if (/chrome.+? edge/i.test(ua)) { + result = { + name: 'Microsoft Edge' + , msedge: t + , version: edgeVersion + } } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); -} - -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; + else if (/vivaldi/i.test(ua)) { + result = { + name: 'Vivaldi' + , vivaldi: t + , version: getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i) || versionIdentifier + } } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; + else if (sailfish) { + result = { + name: 'Sailfish' + , sailfish: t + , version: getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i) + } } - otherArgs[start] = array; - return apply(func, this, otherArgs); - }; -} - -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var result = new buffer.constructor(buffer.length); - buffer.copy(result); - return result; -} - -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; -} - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/** - * Creates a clone of `map`. - * - * @private - * @param {Object} map The map to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned map. - */ -function cloneMap(map, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); - return arrayReduce(array, addMapEntry, new map.constructor); -} + else if (/seamonkey\//i.test(ua)) { + result = { + name: 'SeaMonkey' + , seamonkey: t + , version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i) + } + } + else if (/firefox|iceweasel|fxios/i.test(ua)) { + result = { + name: 'Firefox' + , firefox: t + , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i) + } + if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) { + result.firefoxos = t + } + } + else if (silk) { + result = { + name: 'Amazon Silk' + , silk: t + , version : getFirstMatch(/silk\/(\d+(\.\d+)?)/i) + } + } + else if (/phantom/i.test(ua)) { + result = { + name: 'PhantomJS' + , phantom: t + , version: getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i) + } + } + else if (/slimerjs/i.test(ua)) { + result = { + name: 'SlimerJS' + , slimer: t + , version: getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i) + } + } + else if (/blackberry|\bbb\d+/i.test(ua) || /rim\stablet/i.test(ua)) { + result = { + name: 'BlackBerry' + , blackberry: t + , version: versionIdentifier || getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i) + } + } + else if (webos) { + result = { + name: 'WebOS' + , webos: t + , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i) + }; + /touchpad\//i.test(ua) && (result.touchpad = t) + } + else if (/bada/i.test(ua)) { + result = { + name: 'Bada' + , bada: t + , version: getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i) + }; + } + else if (tizen) { + result = { + name: 'Tizen' + , tizen: t + , version: getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || versionIdentifier + }; + } + else if (/qupzilla/i.test(ua)) { + result = { + name: 'QupZilla' + , qupzilla: t + , version: getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || versionIdentifier + } + } + else if (/chromium/i.test(ua)) { + result = { + name: 'Chromium' + , chromium: t + , version: getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || versionIdentifier + } + } + else if (/chrome|crios|crmo/i.test(ua)) { + result = { + name: 'Chrome' + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } + else if (android) { + result = { + name: 'Android' + , version: versionIdentifier + } + } + else if (/safari|applewebkit/i.test(ua)) { + result = { + name: 'Safari' + , safari: t + } + if (versionIdentifier) { + result.version = versionIdentifier + } + } + else if (iosdevice) { + result = { + name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod' + } + // WTF: version is not part of user agent in web apps + if (versionIdentifier) { + result.version = versionIdentifier + } + } + else if(/googlebot/i.test(ua)) { + result = { + name: 'Googlebot' + , googlebot: t + , version: getFirstMatch(/googlebot\/(\d+(\.\d+))/i) || versionIdentifier + } + } + else { + result = { + name: getFirstMatch(/^(.*)\/(.*) /), + version: getSecondMatch(/^(.*)\/(.*) /) + }; + } -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} + // set webkit or gecko flag for browsers based on these engines + if (!result.msedge && /(apple)?webkit/i.test(ua)) { + if (/(apple)?webkit\/537\.36/i.test(ua)) { + result.name = result.name || "Blink" + result.blink = t + } else { + result.name = result.name || "Webkit" + result.webkit = t + } + if (!result.version && versionIdentifier) { + result.version = versionIdentifier + } + } else if (!result.opera && /gecko\//i.test(ua)) { + result.name = result.name || "Gecko" + result.gecko = t + result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i) + } -/** - * Creates a clone of `set`. - * - * @private - * @param {Object} set The set to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned set. - */ -function cloneSet(set, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); - return arrayReduce(array, addSetEntry, new set.constructor); -} + // set OS flags for platforms that have multiple browsers + if (!result.windowsphone && !result.msedge && (android || result.silk)) { + result.android = t + } else if (!result.windowsphone && !result.msedge && iosdevice) { + result[iosdevice] = t + result.ios = t + } else if (mac) { + result.mac = t + } else if (xbox) { + result.xbox = t + } else if (windows) { + result.windows = t + } else if (linux) { + result.linux = t + } -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} + // OS version extraction + var osVersion = ''; + if (result.windowsphone) { + osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i); + } else if (iosdevice) { + osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i); + osVersion = osVersion.replace(/[_\s]/g, '.'); + } else if (android) { + osVersion = getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i); + } else if (result.webos) { + osVersion = getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i); + } else if (result.blackberry) { + osVersion = getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i); + } else if (result.bada) { + osVersion = getFirstMatch(/bada\/(\d+(\.\d+)*)/i); + } else if (result.tizen) { + osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i); + } + if (osVersion) { + result.osversion = osVersion; + } -/** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} + // device type extraction + var osMajorVersion = osVersion.split('.')[0]; + if ( + tablet + || nexusTablet + || iosdevice == 'ipad' + || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile))) + || result.silk + ) { + result.tablet = t + } else if ( + mobile + || iosdevice == 'iphone' + || iosdevice == 'ipod' + || android + || nexusMobile + || result.blackberry + || result.webos + || result.bada + ) { + result.mobile = t + } -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; + // Graded Browser Support + // http://developer.yahoo.com/yui/articles/gbs + if (result.msedge || + (result.msie && result.version >= 10) || + (result.yandexbrowser && result.version >= 15) || + (result.vivaldi && result.version >= 1.0) || + (result.chrome && result.version >= 20) || + (result.samsungBrowser && result.version >= 4) || + (result.firefox && result.version >= 20.0) || + (result.safari && result.version >= 6) || + (result.opera && result.version >= 10.0) || + (result.ios && result.osversion && result.osversion.split(".")[0] >= 6) || + (result.blackberry && result.version >= 10.1) + || (result.chromium && result.version >= 20) + ) { + result.a = t; + } + else if ((result.msie && result.version < 10) || + (result.chrome && result.version < 20) || + (result.firefox && result.version < 20.0) || + (result.safari && result.version < 6) || + (result.opera && result.version < 10.0) || + (result.ios && result.osversion && result.osversion.split(".")[0] < 6) + || (result.chromium && result.version < 20) + ) { + result.c = t + } else result.x = t - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; + return result } - return array; -} - -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - object || (object = {}); - var index = -1, - length = props.length; + var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '') - while (++index < length) { - var key = props[index]; + bowser.test = function (browserList) { + for (var i = 0; i < browserList.length; ++i) { + var browserItem = browserList[i]; + if (typeof browserItem=== 'string') { + if (browserItem in bowser) { + return true; + } + } + } + return false; + } - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; + /** + * Get version precisions count + * + * @example + * getVersionPrecision("1.10.3") // 3 + * + * @param {string} version + * @return {number} + */ + function getVersionPrecision(version) { + return version.split(".").length; + } - assignValue(object, key, newValue === undefined ? source[key] : newValue); + /** + * Array::map polyfill + * + * @param {Array} arr + * @param {Function} iterator + * @return {Array} + */ + function map(arr, iterator) { + var result = [], i; + if (Array.prototype.map) { + return Array.prototype.map.call(arr, iterator); + } + for (i = 0; i < arr.length; i++) { + result.push(iterator(arr[i])); + } + return result; } - return object; -} -/** - * Copies own symbol properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); -} + /** + * Calculate browser version weight + * + * @example + * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1 + * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1 + * compareVersions(['1.10.2.1', '1.10.2.1']); // 0 + * compareVersions(['1.10.2.1', '1.0800.2']); // -1 + * + * @param {Array} versions versions to compare + * @return {Number} comparison result + */ + function compareVersions(versions) { + // 1) get common precision for both versions, for example for "10.0" and "9" it should be 2 + var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1])); + var chunks = map(versions, function (version) { + var delta = precision - getVersionPrecision(version); -/** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; + // 2) "9" -> "9.0" (for precision = 2) + version = version + new Array(delta + 1).join(".0"); - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; + // 3) "9.0" -> ["000000000"", "000000009"] + return map(version.split("."), function (chunk) { + return new Array(20 - chunk.length).join("0") + chunk; + }).reverse(); + }); - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); + // iterate in reverse order by reversed chunks array + while (--precision >= 0) { + // 4) compare: "000000009" > "000000010" = false (but "9" > "10" = true) + if (chunks[0][precision] > chunks[1][precision]) { + return 1; + } + else if (chunks[0][precision] === chunks[1][precision]) { + if (precision === 0) { + // all version chunks are same + return 0; + } + } + else { + return -1; } } - return object; - }); -} - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); -} - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} + } -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} + /** + * Check if browser is unsupported + * + * @example + * bowser.isUnsupportedBrowser({ + * msie: "10", + * firefox: "23", + * chrome: "29", + * safari: "5.1", + * opera: "16", + * phantom: "534" + * }); + * + * @param {Object} minVersions map of minimal version to browser + * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map + * @param {String} [ua] user agent string + * @return {Boolean} + */ + function isUnsupportedBrowser(minVersions, strictMode, ua) { + var _bowser = bowser; -/** - * Creates an array of the own enumerable symbol properties of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; + // make strictMode param optional with ua param usage + if (typeof strictMode === 'string') { + ua = strictMode; + strictMode = void(0); + } -/** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -var getTag = baseGetTag; + if (strictMode === void(0)) { + strictMode = false; + } + if (ua) { + _bowser = detect(ua); + } -// Fallback for data views, maps, sets, and weak maps in IE 11, -// for data views in Edge < 14, and promises in Node.js. -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = objectToString.call(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : undefined; + var version = "" + _bowser.version; + for (var browser in minVersions) { + if (minVersions.hasOwnProperty(browser)) { + if (_bowser[browser]) { + if (typeof minVersions[browser] !== 'string') { + throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions)); + } - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; + // browser version and min supported version. + return compareVersions([version, minVersions[browser]]) < 0; + } } } - return result; - }; -} -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = array.constructor(length); + return strictMode; // not found + } - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; + /** + * Check if browser is supported + * + * @param {Object} minVersions map of minimal version to browser + * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map + * @param {String} [ua] user agent string + * @return {Boolean} + */ + function check(minVersions, strictMode, ua) { + return !isUnsupportedBrowser(minVersions, strictMode, ua); } - return result; -} -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; -} + bowser.isUnsupportedBrowser = isUnsupportedBrowser; + bowser.compareVersions = compareVersions; + bowser.check = check; -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, cloneFunc, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); + /* + * Set our detect method to the main bowser object so we can + * reuse it to test other user agents. + * This is needed to implement future tests. + */ + bowser._detect = detect; - case boolTag: - case dateTag: - return new Ctor(+object); + return bowser +}); - case dataViewTag: - return cloneDataView(object, isDeep); - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); +/***/ }), +/* 692 */ +/***/ (function(module, exports) { - case mapTag: - return cloneMap(object, isDeep, cloneFunc); +module.exports = function() { + throw new Error("define cannot be used indirect"); +}; - case numberTag: - case stringTag: - return new Ctor(object); - case regexpTag: - return cloneRegExp(object); +/***/ }), +/* 693 */ +/***/ (function(module, exports, __webpack_require__) { - case setTag: - return cloneSet(object, isDeep, cloneFunc); +"use strict"; - case symbolTag: - return cloneSymbol(object); - } -} -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} +Object.defineProperty(exports, "__esModule", { + value: true +}); -/** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); +exports.default = function (_ref) { + var browser = _ref.browser; + var version = _ref.version; + var prefix = _ref.prefix; + + var prefixedKeyframes = 'keyframes'; + + if (browser === 'chrome' && version < 43 || (browser === 'safari' || browser === 'ios_saf') && version < 9 || browser === 'opera' && version < 30 || browser === 'android' && version <= 4.4 || browser === 'and_uc') { + prefixedKeyframes = prefix.css + prefixedKeyframes; } - return false; -} + return prefixedKeyframes; +}; -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} +module.exports = exports['default']; -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} +/***/ }), +/* 694 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; +"use strict"; - return value === proto; -} -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; -} +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { "chrome": { "transform": 35, "transformOrigin": 35, "transformOriginX": 35, "transformOriginY": 35, "backfaceVisibility": 35, "perspective": 35, "perspectiveOrigin": 35, "transformStyle": 35, "transformOriginZ": 35, "animation": 42, "animationDelay": 42, "animationDirection": 42, "animationFillMode": 42, "animationDuration": 42, "animationIterationCount": 42, "animationName": 42, "animationPlayState": 42, "animationTimingFunction": 42, "appearance": 55, "userSelect": 55, "fontKerning": 32, "textEmphasisPosition": 55, "textEmphasis": 55, "textEmphasisStyle": 55, "textEmphasisColor": 55, "boxDecorationBreak": 55, "clipPath": 55, "maskImage": 55, "maskMode": 55, "maskRepeat": 55, "maskPosition": 55, "maskClip": 55, "maskOrigin": 55, "maskSize": 55, "maskComposite": 55, "mask": 55, "maskBorderSource": 55, "maskBorderMode": 55, "maskBorderSlice": 55, "maskBorderWidth": 55, "maskBorderOutset": 55, "maskBorderRepeat": 55, "maskBorder": 55, "maskType": 55, "textDecorationStyle": 55, "textDecorationSkip": 55, "textDecorationLine": 55, "textDecorationColor": 55, "filter": 52, "fontFeatureSettings": 47, "breakAfter": 49, "breakBefore": 49, "breakInside": 49, "columnCount": 49, "columnFill": 49, "columnGap": 49, "columnRule": 49, "columnRuleColor": 49, "columnRuleStyle": 49, "columnRuleWidth": 49, "columns": 49, "columnSpan": 49, "columnWidth": 49 }, "safari": { "flex": 8, "flexBasis": 8, "flexDirection": 8, "flexGrow": 8, "flexFlow": 8, "flexShrink": 8, "flexWrap": 8, "alignContent": 8, "alignItems": 8, "alignSelf": 8, "justifyContent": 8, "order": 8, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8, "transformOrigin": 8, "transformOriginX": 8, "transformOriginY": 8, "backfaceVisibility": 8, "perspective": 8, "perspectiveOrigin": 8, "transformStyle": 8, "transformOriginZ": 8, "animation": 8, "animationDelay": 8, "animationDirection": 8, "animationFillMode": 8, "animationDuration": 8, "animationIterationCount": 8, "animationName": 8, "animationPlayState": 8, "animationTimingFunction": 8, "appearance": 10, "userSelect": 10, "backdropFilter": 10, "fontKerning": 9, "scrollSnapType": 10, "scrollSnapPointsX": 10, "scrollSnapPointsY": 10, "scrollSnapDestination": 10, "scrollSnapCoordinate": 10, "textEmphasisPosition": 7, "textEmphasis": 7, "textEmphasisStyle": 7, "textEmphasisColor": 7, "boxDecorationBreak": 10, "clipPath": 10, "maskImage": 10, "maskMode": 10, "maskRepeat": 10, "maskPosition": 10, "maskClip": 10, "maskOrigin": 10, "maskSize": 10, "maskComposite": 10, "mask": 10, "maskBorderSource": 10, "maskBorderMode": 10, "maskBorderSlice": 10, "maskBorderWidth": 10, "maskBorderOutset": 10, "maskBorderRepeat": 10, "maskBorder": 10, "maskType": 10, "textDecorationStyle": 10, "textDecorationSkip": 10, "textDecorationLine": 10, "textDecorationColor": 10, "shapeImageThreshold": 10, "shapeImageMargin": 10, "shapeImageOutside": 10, "filter": 9, "hyphens": 10, "flowInto": 10, "flowFrom": 10, "breakBefore": 8, "breakAfter": 8, "breakInside": 8, "regionFragment": 10, "columnCount": 8, "columnFill": 8, "columnGap": 8, "columnRule": 8, "columnRuleColor": 8, "columnRuleStyle": 8, "columnRuleWidth": 8, "columns": 8, "columnSpan": 8, "columnWidth": 8 }, "firefox": { "appearance": 51, "userSelect": 51, "boxSizing": 28, "textAlignLast": 48, "textDecorationStyle": 35, "textDecorationSkip": 35, "textDecorationLine": 35, "textDecorationColor": 35, "tabSize": 51, "hyphens": 42, "fontFeatureSettings": 33, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "opera": { "flex": 16, "flexBasis": 16, "flexDirection": 16, "flexGrow": 16, "flexFlow": 16, "flexShrink": 16, "flexWrap": 16, "alignContent": 16, "alignItems": 16, "alignSelf": 16, "justifyContent": 16, "order": 16, "transform": 22, "transformOrigin": 22, "transformOriginX": 22, "transformOriginY": 22, "backfaceVisibility": 22, "perspective": 22, "perspectiveOrigin": 22, "transformStyle": 22, "transformOriginZ": 22, "animation": 29, "animationDelay": 29, "animationDirection": 29, "animationFillMode": 29, "animationDuration": 29, "animationIterationCount": 29, "animationName": 29, "animationPlayState": 29, "animationTimingFunction": 29, "appearance": 41, "userSelect": 41, "fontKerning": 19, "textEmphasisPosition": 41, "textEmphasis": 41, "textEmphasisStyle": 41, "textEmphasisColor": 41, "boxDecorationBreak": 41, "clipPath": 41, "maskImage": 41, "maskMode": 41, "maskRepeat": 41, "maskPosition": 41, "maskClip": 41, "maskOrigin": 41, "maskSize": 41, "maskComposite": 41, "mask": 41, "maskBorderSource": 41, "maskBorderMode": 41, "maskBorderSlice": 41, "maskBorderWidth": 41, "maskBorderOutset": 41, "maskBorderRepeat": 41, "maskBorder": 41, "maskType": 41, "textDecorationStyle": 41, "textDecorationSkip": 41, "textDecorationLine": 41, "textDecorationColor": 41, "filter": 39, "fontFeatureSettings": 34, "breakAfter": 36, "breakBefore": 36, "breakInside": 36, "columnCount": 36, "columnFill": 36, "columnGap": 36, "columnRule": 36, "columnRuleColor": 36, "columnRuleStyle": 36, "columnRuleWidth": 36, "columns": 36, "columnSpan": 36, "columnWidth": 36 }, "ie": { "flex": 10, "flexDirection": 10, "flexFlow": 10, "flexWrap": 10, "transform": 9, "transformOrigin": 9, "transformOriginX": 9, "transformOriginY": 9, "userSelect": 11, "wrapFlow": 11, "wrapThrough": 11, "wrapMargin": 11, "scrollSnapType": 11, "scrollSnapPointsX": 11, "scrollSnapPointsY": 11, "scrollSnapDestination": 11, "scrollSnapCoordinate": 11, "touchAction": 10, "hyphens": 11, "flowInto": 11, "flowFrom": 11, "breakBefore": 11, "breakAfter": 11, "breakInside": 11, "regionFragment": 11, "gridTemplateColumns": 11, "gridTemplateRows": 11, "gridTemplateAreas": 11, "gridTemplate": 11, "gridAutoColumns": 11, "gridAutoRows": 11, "gridAutoFlow": 11, "grid": 11, "gridRowStart": 11, "gridColumnStart": 11, "gridRowEnd": 11, "gridRow": 11, "gridColumn": 11, "gridColumnEnd": 11, "gridColumnGap": 11, "gridRowGap": 11, "gridArea": 11, "gridGap": 11, "textSizeAdjust": 11 }, "edge": { "userSelect": 14, "wrapFlow": 14, "wrapThrough": 14, "wrapMargin": 14, "scrollSnapType": 14, "scrollSnapPointsX": 14, "scrollSnapPointsY": 14, "scrollSnapDestination": 14, "scrollSnapCoordinate": 14, "hyphens": 14, "flowInto": 14, "flowFrom": 14, "breakBefore": 14, "breakAfter": 14, "breakInside": 14, "regionFragment": 14, "gridTemplateColumns": 14, "gridTemplateRows": 14, "gridTemplateAreas": 14, "gridTemplate": 14, "gridAutoColumns": 14, "gridAutoRows": 14, "gridAutoFlow": 14, "grid": 14, "gridRowStart": 14, "gridColumnStart": 14, "gridRowEnd": 14, "gridRow": 14, "gridColumn": 14, "gridColumnEnd": 14, "gridColumnGap": 14, "gridRowGap": 14, "gridArea": 14, "gridGap": 14 }, "ios_saf": { "flex": 8.1, "flexBasis": 8.1, "flexDirection": 8.1, "flexGrow": 8.1, "flexFlow": 8.1, "flexShrink": 8.1, "flexWrap": 8.1, "alignContent": 8.1, "alignItems": 8.1, "alignSelf": 8.1, "justifyContent": 8.1, "order": 8.1, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8.1, "transformOrigin": 8.1, "transformOriginX": 8.1, "transformOriginY": 8.1, "backfaceVisibility": 8.1, "perspective": 8.1, "perspectiveOrigin": 8.1, "transformStyle": 8.1, "transformOriginZ": 8.1, "animation": 8.1, "animationDelay": 8.1, "animationDirection": 8.1, "animationFillMode": 8.1, "animationDuration": 8.1, "animationIterationCount": 8.1, "animationName": 8.1, "animationPlayState": 8.1, "animationTimingFunction": 8.1, "appearance": 9.3, "userSelect": 9.3, "backdropFilter": 9.3, "fontKerning": 9.3, "scrollSnapType": 9.3, "scrollSnapPointsX": 9.3, "scrollSnapPointsY": 9.3, "scrollSnapDestination": 9.3, "scrollSnapCoordinate": 9.3, "boxDecorationBreak": 9.3, "clipPath": 9.3, "maskImage": 9.3, "maskMode": 9.3, "maskRepeat": 9.3, "maskPosition": 9.3, "maskClip": 9.3, "maskOrigin": 9.3, "maskSize": 9.3, "maskComposite": 9.3, "mask": 9.3, "maskBorderSource": 9.3, "maskBorderMode": 9.3, "maskBorderSlice": 9.3, "maskBorderWidth": 9.3, "maskBorderOutset": 9.3, "maskBorderRepeat": 9.3, "maskBorder": 9.3, "maskType": 9.3, "textSizeAdjust": 9.3, "textDecorationStyle": 9.3, "textDecorationSkip": 9.3, "textDecorationLine": 9.3, "textDecorationColor": 9.3, "shapeImageThreshold": 9.3, "shapeImageMargin": 9.3, "shapeImageOutside": 9.3, "filter": 9, "hyphens": 9.3, "flowInto": 9.3, "flowFrom": 9.3, "breakBefore": 8.1, "breakAfter": 8.1, "breakInside": 8.1, "regionFragment": 9.3, "columnCount": 8.1, "columnFill": 8.1, "columnGap": 8.1, "columnRule": 8.1, "columnRuleColor": 8.1, "columnRuleStyle": 8.1, "columnRuleWidth": 8.1, "columns": 8.1, "columnSpan": 8.1, "columnWidth": 8.1 }, "android": { "flex": 4.2, "flexBasis": 4.2, "flexDirection": 4.2, "flexGrow": 4.2, "flexFlow": 4.2, "flexShrink": 4.2, "flexWrap": 4.2, "alignContent": 4.2, "alignItems": 4.2, "alignSelf": 4.2, "justifyContent": 4.2, "order": 4.2, "transition": 4.2, "transitionDelay": 4.2, "transitionDuration": 4.2, "transitionProperty": 4.2, "transitionTimingFunction": 4.2, "transform": 4.4, "transformOrigin": 4.4, "transformOriginX": 4.4, "transformOriginY": 4.4, "backfaceVisibility": 4.4, "perspective": 4.4, "perspectiveOrigin": 4.4, "transformStyle": 4.4, "transformOriginZ": 4.4, "animation": 4.4, "animationDelay": 4.4, "animationDirection": 4.4, "animationFillMode": 4.4, "animationDuration": 4.4, "animationIterationCount": 4.4, "animationName": 4.4, "animationPlayState": 4.4, "animationTimingFunction": 4.4, "appearance": 51, "userSelect": 51, "fontKerning": 4.4, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "filter": 51, "fontFeatureSettings": 4.4, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "and_chr": { "appearance": 51, "userSelect": 51, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "textDecorationStyle": 51, "textDecorationSkip": 51, "textDecorationLine": 51, "textDecorationColor": 51, "filter": 51 }, "and_uc": { "flex": 9.9, "flexBasis": 9.9, "flexDirection": 9.9, "flexGrow": 9.9, "flexFlow": 9.9, "flexShrink": 9.9, "flexWrap": 9.9, "alignContent": 9.9, "alignItems": 9.9, "alignSelf": 9.9, "justifyContent": 9.9, "order": 9.9, "transition": 9.9, "transitionDelay": 9.9, "transitionDuration": 9.9, "transitionProperty": 9.9, "transitionTimingFunction": 9.9, "transform": 9.9, "transformOrigin": 9.9, "transformOriginX": 9.9, "transformOriginY": 9.9, "backfaceVisibility": 9.9, "perspective": 9.9, "perspectiveOrigin": 9.9, "transformStyle": 9.9, "transformOriginZ": 9.9, "animation": 9.9, "animationDelay": 9.9, "animationDirection": 9.9, "animationFillMode": 9.9, "animationDuration": 9.9, "animationIterationCount": 9.9, "animationName": 9.9, "animationPlayState": 9.9, "animationTimingFunction": 9.9, "appearance": 9.9, "userSelect": 9.9, "fontKerning": 9.9, "textEmphasisPosition": 9.9, "textEmphasis": 9.9, "textEmphasisStyle": 9.9, "textEmphasisColor": 9.9, "maskImage": 9.9, "maskMode": 9.9, "maskRepeat": 9.9, "maskPosition": 9.9, "maskClip": 9.9, "maskOrigin": 9.9, "maskSize": 9.9, "maskComposite": 9.9, "mask": 9.9, "maskBorderSource": 9.9, "maskBorderMode": 9.9, "maskBorderSlice": 9.9, "maskBorderWidth": 9.9, "maskBorderOutset": 9.9, "maskBorderRepeat": 9.9, "maskBorder": 9.9, "maskType": 9.9, "textSizeAdjust": 9.9, "filter": 9.9, "hyphens": 9.9, "flowInto": 9.9, "flowFrom": 9.9, "breakBefore": 9.9, "breakAfter": 9.9, "breakInside": 9.9, "regionFragment": 9.9, "fontFeatureSettings": 9.9, "columnCount": 9.9, "columnFill": 9.9, "columnGap": 9.9, "columnRule": 9.9, "columnRuleColor": 9.9, "columnRuleStyle": 9.9, "columnRuleWidth": 9.9, "columns": 9.9, "columnSpan": 9.9, "columnWidth": 9.9 }, "op_mini": {} }; +module.exports = exports["default"]; -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to process. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} +/***/ }), +/* 695 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} +"use strict"; -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = position; -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} +var _getPrefixedValue = __webpack_require__(38); -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} +function position(_ref) { + var property = _ref.property; + var value = _ref.value; + var browser = _ref.browserInfo.browser; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); + if (property === 'position' && value === 'sticky' && (browser === 'safari' || browser === 'ios_saf')) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } } +module.exports = exports['default']; -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} +/***/ }), +/* 696 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || - objectToString.call(value) != objectTag || isHostObject(value)) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = calc; + +var _getPrefixedValue = __webpack_require__(38); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function calc(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (typeof value === 'string' && value.indexOf('calc(') > -1 && (browser === 'firefox' && version < 15 || browser === 'chrome' && version < 25 || browser === 'safari' && version < 6.1 || browser === 'ios_saf' && version < 7)) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(value.replace(/calc\(/g, css + 'calc('), value, keepUnprefixed)); } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return (typeof Ctor == 'function' && - Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); } +module.exports = exports['default']; -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; +/***/ }), +/* 697 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ -function toPlainObject(value) { - return copyObject(value, keysIn(value)); -} +"use strict"; -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = zoomCursor; + +var _getPrefixedValue = __webpack_require__(38); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { 'zoom-in': true, 'zoom-out': true }; + +function zoomCursor(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'cursor' && values[value] && (browser === 'firefox' && version < 24 || browser === 'chrome' && version < 37 || browser === 'safari' && version < 9 || browser === 'opera' && version < 24)) { + return { + cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } } +module.exports = exports['default']; -/** - * This method is like `_.assign` except that it recursively merges own and - * inherited enumerable string keyed properties of source objects into the - * destination object. Source properties that resolve to `undefined` are - * skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * var object = { - * 'a': [{ 'b': 2 }, { 'd': 4 }] - * }; - * - * var other = { - * 'a': [{ 'c': 3 }, { 'e': 5 }] - * }; - * - * _.merge(object, other); - * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } - */ -var merge = createAssigner(function(object, source, srcIndex) { - baseMerge(object, source, srcIndex); +/***/ }), +/* 698 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true }); +exports.default = grabCursor; -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} +var _getPrefixedValue = __webpack_require__(38); -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { grab: true, grabbing: true }; + +function grabCursor(_ref) { + var property = _ref.property; + var value = _ref.value; + var browser = _ref.browserInfo.browser; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + // adds prefixes for firefox, chrome, safari, and opera regardless of version until a reliable brwoser support info can be found (see: https://github.com/rofrischmann/inline-style-prefixer/issues/79) + if (property === 'cursor' && values[value] && (browser === 'firefox' || browser === 'chrome' || browser === 'safari' || browser === 'opera')) { + return { + cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } } +module.exports = exports['default']; -module.exports = merge; +/***/ }), +/* 699 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flex; + +var _getPrefixedValue = __webpack_require__(38); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { flex: true, 'inline-flex': true }; + +function flex(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47), __webpack_require__(256)(module))) + if (property === 'display' && values[value] && (browser === 'chrome' && version < 29 && version > 20 || (browser === 'safari' || browser === 'ios_saf') && version < 9 && version > 6 || browser === 'opera' && (version == 15 || version == 16))) { + return { + display: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; /***/ }), -/* 693 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52647,78 +55761,236 @@ module.exports = merge; Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = sizing; -var _typeof2 = __webpack_require__(92); +var _getPrefixedValue = __webpack_require__(38); -var _typeof3 = _interopRequireDefault(_typeof2); +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); -exports.default = function (muiTheme) { - var isClient = typeof navigator !== 'undefined'; - var userAgent = muiTheme.userAgent; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (userAgent === undefined && isClient) { - userAgent = navigator.userAgent; +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { + maxHeight: true, + maxWidth: true, + width: true, + height: true, + columnWidth: true, + minWidth: true, + minHeight: true +}; +var values = { + 'min-content': true, + 'max-content': true, + 'fill-available': true, + 'fit-content': true, + 'contain-floats': true +}; + +function sizing(_ref) { + var property = _ref.property; + var value = _ref.value; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + // This might change in the future + // Keep an eye on it + if (properties[property] && values[value]) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); } +} +module.exports = exports['default']; - if (userAgent === undefined && !hasWarnedAboutUserAgent) { - false ? (0, _warning2.default)(false, 'Material-UI: userAgent should be supplied in the muiTheme context\n for server-side rendering.') : void 0; +/***/ }), +/* 701 */ +/***/ (function(module, exports, __webpack_require__) { - hasWarnedAboutUserAgent = true; +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gradient; + +var _getPrefixedValue = __webpack_require__(38); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; + +function gradient(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (typeof value === 'string' && value.match(values) !== null && (browser === 'firefox' && version < 16 || browser === 'chrome' && version < 26 || (browser === 'safari' || browser === 'ios_saf') && version < 7 || (browser === 'opera' || browser === 'op_mini') && version < 12.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); } +} +module.exports = exports['default']; - if (userAgent === false) { - // Disabled autoprefixer - return null; - } else if (userAgent === 'all' || userAgent === undefined) { - // Prefix for all user agent - return function (style) { - var isFlex = ['flex', 'inline-flex'].indexOf(style.display) !== -1; - var stylePrefixed = _inlineStylePrefixer2.default.prefixAll(style); +/***/ }), +/* 702 */ +/***/ (function(module, exports, __webpack_require__) { - if (isFlex) { - var display = stylePrefixed.display; - if (isClient) { - // We can't apply this join with react-dom: - // #https://github.com/facebook/react/issues/6467 - stylePrefixed.display = display[display.length - 1]; - } else { - stylePrefixed.display = display.join('; display: '); - } - } +"use strict"; - return stylePrefixed; - }; - } else { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + +exports.default = transition; + +var _hyphenateStyleName = __webpack_require__(314); + +var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); + +var _unprefixProperty = __webpack_require__(703); + +var _unprefixProperty2 = _interopRequireDefault(_unprefixProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { transition: true, transitionProperty: true }; + +function transition(_ref) { + var property = _ref.property; + var value = _ref.value; + var css = _ref.prefix.css; + var requiresPrefix = _ref.requiresPrefix; + var keepUnprefixed = _ref.keepUnprefixed; + + // also check for already prefixed transitions + var unprefixedProperty = (0, _unprefixProperty2.default)(property); + + if (typeof value === 'string' && properties[unprefixedProperty]) { var _ret = function () { - var prefixer = new _inlineStylePrefixer2.default({ - userAgent: userAgent + // TODO: memoize this array + var requiresPrefixDashCased = Object.keys(requiresPrefix).map(function (prop) { + return (0, _hyphenateStyleName2.default)(prop); + }); + + // only split multi values, not cubic beziers + var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); + + requiresPrefixDashCased.forEach(function (prop) { + multipleValues.forEach(function (val, index) { + if (val.indexOf(prop) > -1 && prop !== 'order') { + multipleValues[index] = val.replace(prop, css + prop) + (keepUnprefixed ? ',' + val : ''); + } + }); }); return { - v: function v(style) { - return prefixer.prefix(style); - } + v: _defineProperty({}, property, multipleValues.join(',')) }; }(); - if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } +} +module.exports = exports['default']; + +/***/ }), +/* 703 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (property) { + var unprefixed = property.replace(/^(ms|Webkit|Moz|O)/, ''); + return unprefixed.charAt(0).toLowerCase() + unprefixed.slice(1); +}; + +module.exports = exports['default']; + +/***/ }), +/* 704 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxIE; + +var _getPrefixedValue = __webpack_require__(38); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'distribute', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + flex: 'flexbox', + 'inline-flex': 'inline-flexbox' +}; +var alternativeProps = { + alignContent: 'msFlexLinePack', + alignSelf: 'msFlexItemAlign', + alignItems: 'msFlexAlign', + justifyContent: 'msFlexPack', + order: 'msFlexOrder', + flexGrow: 'msFlexPositive', + flexShrink: 'msFlexNegative', + flexBasis: 'msPreferredSize' +}; + +function flexboxIE(_ref) { + var property = _ref.property; + var value = _ref.value; + var styles = _ref.styles; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if ((alternativeProps[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'ie_mob' || browser === 'ie') && version == 10) { + if (!keepUnprefixed && !Array.isArray(styles[property])) { + delete styles[property]; + } + if (property === 'display' && alternativeValues[value]) { + return { + display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } } -}; - -var _inlineStylePrefixer = __webpack_require__(694); - -var _inlineStylePrefixer2 = _interopRequireDefault(_inlineStylePrefixer); - -var _warning = __webpack_require__(17); - -var _warning2 = _interopRequireDefault(_warning); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var hasWarnedAboutUserAgent = false; +} +module.exports = exports['default']; /***/ }), -/* 694 */ +/* 705 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52727,233 +55999,257 @@ var hasWarnedAboutUserAgent = false; Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = flexboxOld; -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -// special flexbox specifications - - -var _prefixAll2 = __webpack_require__(695); - -var _prefixAll3 = _interopRequireDefault(_prefixAll2); - -var _getBrowserInformation = __webpack_require__(706); - -var _getBrowserInformation2 = _interopRequireDefault(_getBrowserInformation); - -var _getPrefixedKeyframes = __webpack_require__(709); - -var _getPrefixedKeyframes2 = _interopRequireDefault(_getPrefixedKeyframes); - -var _capitalizeString = __webpack_require__(193); - -var _capitalizeString2 = _interopRequireDefault(_capitalizeString); +var _getPrefixedValue = __webpack_require__(38); -var _sortPrefixedStyle = __webpack_require__(309); +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); -var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _prefixProps = __webpack_require__(710); +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -var _prefixProps2 = _interopRequireDefault(_prefixProps); +var alternativeValues = { + 'space-around': 'justify', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + 'wrap-reverse': 'multiple', + wrap: 'multiple', + flex: 'box', + 'inline-flex': 'inline-box' +}; -var _position = __webpack_require__(711); +var alternativeProps = { + alignItems: 'WebkitBoxAlign', + justifyContent: 'WebkitBoxPack', + flexWrap: 'WebkitBoxLines' +}; -var _position2 = _interopRequireDefault(_position); +var otherProps = ['alignContent', 'alignSelf', 'order', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection']; +var properties = Object.keys(alternativeProps).concat(otherProps); -var _calc = __webpack_require__(712); +function flexboxOld(_ref) { + var property = _ref.property; + var value = _ref.value; + var styles = _ref.styles; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; -var _calc2 = _interopRequireDefault(_calc); + if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'firefox' && version < 22 || browser === 'chrome' && version < 21 || (browser === 'safari' || browser === 'ios_saf') && version <= 6.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { + if (!keepUnprefixed && !Array.isArray(styles[property])) { + delete styles[property]; + } + if (property === 'flexDirection' && typeof value === 'string') { + return { + WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', + WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' + }; + } + if (property === 'display' && alternativeValues[value]) { + return { + display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } + } +} +module.exports = exports['default']; -var _zoomCursor = __webpack_require__(713); +/***/ }), +/* 706 */ +/***/ (function(module, exports, __webpack_require__) { -var _zoomCursor2 = _interopRequireDefault(_zoomCursor); +"use strict"; -var _grabCursor = __webpack_require__(714); -var _grabCursor2 = _interopRequireDefault(_grabCursor); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = callOnce; -var _flex = __webpack_require__(715); +var _warning = __webpack_require__(15); -var _flex2 = _interopRequireDefault(_flex); +var _warning2 = _interopRequireDefault(_warning); -var _sizing = __webpack_require__(716); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _sizing2 = _interopRequireDefault(_sizing); +var CALLED_ONCE = 'muiPrepared'; -var _gradient = __webpack_require__(717); +function callOnce() { + if (false) { + return function (style) { + if (style[CALLED_ONCE]) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: You cannot call prepareStyles() on the same style object more than once.') : void 0; + } + style[CALLED_ONCE] = true; + return style; + }; + } +} -var _gradient2 = _interopRequireDefault(_gradient); +/***/ }), +/* 707 */ +/***/ (function(module, exports, __webpack_require__) { -var _transition = __webpack_require__(718); +"use strict"; -var _transition2 = _interopRequireDefault(_transition); -var _flexboxIE = __webpack_require__(720); +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _flexboxIE2 = _interopRequireDefault(_flexboxIE); +var _keys = __webpack_require__(62); -var _flexboxOld = __webpack_require__(721); +var _keys2 = _interopRequireDefault(_keys); -var _flexboxOld2 = _interopRequireDefault(_flexboxOld); +exports.default = rtl; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var plugins = [_position2.default, _calc2.default, _zoomCursor2.default, _grabCursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, -// this must be run AFTER the flexbox specs -_flex2.default]; - -var Prefixer = function () { - /** - * Instantiante a new prefixer - * @param {string} userAgent - userAgent to gather prefix information according to caniuse.com - * @param {string} keepUnprefixed - keeps unprefixed properties and values - */ +var reTranslate = /((^|\s)translate(3d|X)?\()(\-?[\d]+)/; +var reSkew = /((^|\s)skew(x|y)?\()\s*(\-?[\d]+)(deg|rad|grad)(,\s*(\-?[\d]+)(deg|rad|grad))?/; - function Prefixer() { - var _this = this; +/** + * This function ensures that `style` supports both ltr and rtl directions by + * checking `styleConstants` in `muiTheme` and replacing attribute keys if + * necessary. + */ +function rtl(muiTheme) { + if (muiTheme.isRtl) { + return function (style) { + if (style.directionInvariant === true) { + return style; + } - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var flippedAttributes = { + // Keys and their replacements. + right: 'left', + left: 'right', + marginRight: 'marginLeft', + marginLeft: 'marginRight', + paddingRight: 'paddingLeft', + paddingLeft: 'paddingRight', + borderRight: 'borderLeft', + borderLeft: 'borderRight' + }; - _classCallCheck(this, Prefixer); + var newStyle = {}; - var defaultUserAgent = typeof navigator !== 'undefined' ? navigator.userAgent : undefined; + (0, _keys2.default)(style).forEach(function (attribute) { + var value = style[attribute]; + var key = attribute; - this._userAgent = options.userAgent || defaultUserAgent; - this._keepUnprefixed = options.keepUnprefixed || false; + if (flippedAttributes.hasOwnProperty(attribute)) { + key = flippedAttributes[attribute]; + } - this._browserInfo = (0, _getBrowserInformation2.default)(this._userAgent); + switch (attribute) { + case 'float': + case 'textAlign': + if (value === 'right') { + value = 'left'; + } else if (value === 'left') { + value = 'right'; + } + break; - // Checks if the userAgent was resolved correctly - if (this._browserInfo && this._browserInfo.prefix) { - // set additional prefix information - this.cssPrefix = this._browserInfo.prefix.css; - this.jsPrefix = this._browserInfo.prefix.inline; - this.prefixedKeyframes = (0, _getPrefixedKeyframes2.default)(this._browserInfo); - } else { - this._usePrefixAllFallback = true; - return false; - } + case 'direction': + if (value === 'ltr') { + value = 'rtl'; + } else if (value === 'rtl') { + value = 'ltr'; + } + break; - var data = this._browserInfo.browser && _prefixProps2.default[this._browserInfo.browser]; - if (data) { - this._requiresPrefix = Object.keys(data).filter(function (key) { - return data[key] >= _this._browserInfo.version; - }).reduce(function (result, name) { - result[name] = true; - return result; - }, {}); - this._hasPropsRequiringPrefix = Object.keys(this._requiresPrefix).length > 0; - } else { - this._usePrefixAllFallback = true; - } - } + case 'transform': + if (!value) break; + var matches = void 0; + if (matches = value.match(reTranslate)) { + value = value.replace(matches[0], matches[1] + -parseFloat(matches[4])); + } + if (matches = value.match(reSkew)) { + value = value.replace(matches[0], matches[1] + -parseFloat(matches[4]) + matches[5] + matches[6] ? ', ' + (-parseFloat(matches[7]) + matches[8]) : ''); + } + break; - /** - * Returns a prefixed version of the style object - * @param {Object} styles - Style object that gets prefixed properties added - * @returns {Object} - Style object with prefixed properties and values - */ + case 'transformOrigin': + if (!value) break; + if (value.indexOf('right') > -1) { + value = value.replace('right', 'left'); + } else if (value.indexOf('left') > -1) { + value = value.replace('left', 'right'); + } + break; + } + newStyle[key] = value; + }); - _createClass(Prefixer, [{ - key: 'prefix', - value: function prefix(styles) { - var _this2 = this; + return newStyle; + }; + } +} - // use prefixAll as fallback if userAgent can not be resolved - if (this._usePrefixAllFallback) { - return (0, _prefixAll3.default)(styles); - } +/***/ }), +/* 708 */ +/***/ (function(module, exports, __webpack_require__) { - // only add prefixes if needed - if (!this._hasPropsRequiringPrefix) { - return styles; - } +__webpack_require__(709); +module.exports = __webpack_require__(18).Object.keys; - Object.keys(styles).forEach(function (property) { - var value = styles[property]; - if (value instanceof Object && !Array.isArray(value)) { - // recurse through nested style objects - styles[property] = _this2.prefix(value); - } else { - // add prefixes if needed - if (_this2._requiresPrefix[property]) { - styles[_this2.jsPrefix + (0, _capitalizeString2.default)(property)] = value; - if (!_this2._keepUnprefixed) { - delete styles[property]; - } - } - } - }); +/***/ }), +/* 709 */ +/***/ (function(module, exports, __webpack_require__) { - Object.keys(styles).forEach(function (property) { - [].concat(styles[property]).forEach(function (value) { - // resolve plugins - plugins.forEach(function (plugin) { - // generates a new plugin interface with current data - assignStyles(styles, plugin({ - property: property, - value: value, - styles: styles, - browserInfo: _this2._browserInfo, - prefix: { - js: _this2.jsPrefix, - css: _this2.cssPrefix, - keyframes: _this2.prefixedKeyframes - }, - keepUnprefixed: _this2._keepUnprefixed, - requiresPrefix: _this2._requiresPrefix - }), value, _this2._keepUnprefixed); - }); - }); - }); +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(88) + , $keys = __webpack_require__(70); - return (0, _sortPrefixedStyle2.default)(styles); - } +__webpack_require__(304)('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; +}); - /** - * Returns a prefixed version of the style object using all vendor prefixes - * @param {Object} styles - Style object that gets prefixed properties added - * @returns {Object} - Style object with prefixed properties and values - */ +/***/ }), +/* 710 */ +/***/ (function(module, exports, __webpack_require__) { - }], [{ - key: 'prefixAll', - value: function prefixAll(styles) { - return (0, _prefixAll3.default)(styles); - } - }]); +"use strict"; - return Prefixer; -}(); -exports.default = Prefixer; +exports.__esModule = true; +exports.default = compose; +function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } -function assignStyles(base) { - var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var value = arguments[2]; - var keepUnprefixed = arguments[3]; + if (funcs.length === 1) { + return funcs[0]; + } - Object.keys(extend).forEach(function (property) { - var baseValue = base[property]; - if (Array.isArray(baseValue)) { - [].concat(extend[property]).forEach(function (val) { - if (base[property].indexOf(val) === -1) { - base[property].splice(baseValue.indexOf(value), keepUnprefixed ? 0 : 1, val); - } - }); - } else { - base[property] = extend[property]; - } + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(undefined, arguments)); + }; }); } -module.exports = exports['default']; /***/ }), -/* 695 */ +/* 711 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52962,154 +56258,159 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = prefixAll; -var _prefixProps = __webpack_require__(308); +var _keys = __webpack_require__(62); -var _prefixProps2 = _interopRequireDefault(_prefixProps); +var _keys2 = _interopRequireDefault(_keys); -var _capitalizeString = __webpack_require__(193); +var _react = __webpack_require__(0); -var _capitalizeString2 = _interopRequireDefault(_capitalizeString); +var _react2 = _interopRequireDefault(_react); -var _sortPrefixedStyle = __webpack_require__(309); +var _reactRedux = __webpack_require__(19); -var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); +var _reactRouter = __webpack_require__(163); -var _position = __webpack_require__(697); +var _List = __webpack_require__(712); -var _position2 = _interopRequireDefault(_position); +var _Drawer = __webpack_require__(734); -var _calc = __webpack_require__(698); +var _Drawer2 = _interopRequireDefault(_Drawer); -var _calc2 = _interopRequireDefault(_calc); +var _Subheader = __webpack_require__(316); -var _cursor = __webpack_require__(699); +var _Subheader2 = _interopRequireDefault(_Subheader); -var _cursor2 = _interopRequireDefault(_cursor); +var _code = __webpack_require__(742); -var _flex = __webpack_require__(700); +var _code2 = _interopRequireDefault(_code); -var _flex2 = _interopRequireDefault(_flex); +var _shop = __webpack_require__(743); -var _sizing = __webpack_require__(701); +var _shop2 = _interopRequireDefault(_shop); -var _sizing2 = _interopRequireDefault(_sizing); +var _accountCircle = __webpack_require__(744); -var _gradient = __webpack_require__(702); +var _accountCircle2 = _interopRequireDefault(_accountCircle); -var _gradient2 = _interopRequireDefault(_gradient); +var _error = __webpack_require__(745); -var _transition = __webpack_require__(703); +var _error2 = _interopRequireDefault(_error); -var _transition2 = _interopRequireDefault(_transition); +var _Styles = __webpack_require__(52); -var _flexboxIE = __webpack_require__(704); +var _Styles2 = _interopRequireDefault(_Styles); -var _flexboxIE2 = _interopRequireDefault(_flexboxIE); +var _Supreme = __webpack_require__(325); -var _flexboxOld = __webpack_require__(705); +var _Menus = __webpack_require__(84); -var _flexboxOld2 = _interopRequireDefault(_flexboxOld); +var Menus = _interopRequireWildcard(_Menus); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -// special flexbox specifications +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var SelectableList = (0, _List.makeSelectable)(_List.List); -var plugins = [_position2.default, _calc2.default, _cursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, _flex2.default]; +function openUrlInNewTab(url) { + var win = window.open(url, '_blank'); + win.focus(); +} -/** - * Returns a prefixed version of the style object using all vendor prefixes - * @param {Object} styles - Style object that gets prefixed properties added - * @returns {Object} - Style object with prefixed properties and values - */ -function prefixAll(styles) { - Object.keys(styles).forEach(function (property) { - var value = styles[property]; - if (value instanceof Object && !Array.isArray(value)) { - // recurse through nested style objects - styles[property] = prefixAll(value); - } else { - Object.keys(_prefixProps2.default).forEach(function (prefix) { - var properties = _prefixProps2.default[prefix]; - // add prefixes if needed - if (properties[property]) { - styles[prefix + (0, _capitalizeString2.default)(property)] = value; - } - }); - } +function getIconForShop(settings, shopName) { + var menus = (0, _keys2.default)(Menus).map(function (x) { + return Menus[x]; }); - - Object.keys(styles).forEach(function (property) { - [].concat(styles[property]).forEach(function (value, index) { - // resolve every special plugins - plugins.forEach(function (plugin) { - return assignStyles(styles, plugin(property, value)); - }); - }); + var isIncomplete = !settings[shopName] || menus.some(function (x) { + return !settings[shopName][x]; }); - - return (0, _sortPrefixedStyle2.default)(styles); + if (isIncomplete) { + return _react2.default.createElement(_error2.default, null); + } + return _react2.default.createElement(_shop2.default, null); } -function assignStyles(base) { - var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; +function AppDrawer(props) { + var location = props.location, + currentProfile = props.currentProfile, + settings = props.settings; - Object.keys(extend).forEach(function (property) { - var baseValue = base[property]; - if (Array.isArray(baseValue)) { - [].concat(extend[property]).forEach(function (value) { - var valueIndex = baseValue.indexOf(value); - if (valueIndex > -1) { - base[property].splice(valueIndex, 1); - } - base[property].push(value); - }); - } else { - base[property] = extend[property]; - } + var paths = location.pathname.split('/').filter(function (x) { + return !!x; }); + var currentPage = paths[0]; + return _react2.default.createElement( + _Drawer2.default, + { open: true }, + _react2.default.createElement( + 'div', + { style: _Styles2.default.logo }, + 'Supreme Auto Checkout' + ), + _react2.default.createElement( + SelectableList, + { value: currentPage }, + _react2.default.createElement( + _Subheader2.default, + null, + 'Shops' + ), + _react2.default.createElement(_List.ListItem, { + value: 'supreme', + primaryText: 'Supreme', + containerElement: _react2.default.createElement(_reactRouter.Link, { to: '/supreme/' }), + leftIcon: getIconForShop(settings, _Supreme.SHOP_NAME) + }), + _react2.default.createElement( + _Subheader2.default, + null, + 'Settings' + ), + _react2.default.createElement(_List.ListItem, { + value: 'profiles', + primaryText: 'Profiles (' + currentProfile + ')', + containerElement: _react2.default.createElement(_reactRouter.Link, { to: '/profiles/' }), + leftIcon: _react2.default.createElement(_accountCircle2.default, null) + }), + _react2.default.createElement( + _Subheader2.default, + null, + 'Other' + ), + _react2.default.createElement(_List.ListItem, { + value: 'about', + primaryText: 'Github', + onTouchTap: function onTouchTap() { + return openUrlInNewTab('https://github.com/val92130/Supreme-Auto-Checkout'); + }, + leftIcon: _react2.default.createElement(_code2.default, null) + }) + ) + ); } -module.exports = exports['default']; - -/***/ }), -/* 696 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (property) { - return property.match(/^(Webkit|Moz|O|ms)/) !== null; -}; - -module.exports = exports["default"]; - -/***/ }), -/* 697 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +AppDrawer.propTypes = { + location: _react.PropTypes.shape({ + pathname: _react.PropTypes.string.isRequired + }), + currentProfile: _react.PropTypes.string +}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = position; -function position(property, value) { - if (property === 'position' && value === 'sticky') { - return { position: ['-webkit-sticky', 'sticky'] }; - } +function mapStateToProps(state) { + var currentProfile = state.profiles.currentProfile; + return { + settings: state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings, + currentProfile: currentProfile + }; } -module.exports = exports['default']; + +exports.default = (0, _reactRedux.connect)(mapStateToProps)(AppDrawer); /***/ }), -/* 698 */ +/* 712 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53118,29 +56419,29 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = calc; +exports.default = exports.makeSelectable = exports.ListItem = exports.List = undefined; -var _joinPrefixedValue = __webpack_require__(126); +var _List2 = __webpack_require__(202); -var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); +var _List3 = _interopRequireDefault(_List2); -var _isPrefixedValue = __webpack_require__(194); +var _ListItem2 = __webpack_require__(317); -var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); +var _ListItem3 = _interopRequireDefault(_ListItem2); + +var _makeSelectable2 = __webpack_require__(733); + +var _makeSelectable3 = _interopRequireDefault(_makeSelectable2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function calc(property, value) { - if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('calc(') > -1) { - return (0, _joinPrefixedValue2.default)(property, value, function (prefix, value) { - return value.replace(/calc\(/g, prefix + 'calc('); - }); - } -} -module.exports = exports['default']; +exports.List = _List3.default; +exports.ListItem = _ListItem3.default; +exports.makeSelectable = _makeSelectable3.default; +exports.default = _List3.default; /***/ }), -/* 699 */ +/* 713 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53149,125 +56450,163 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = cursor; -var _joinPrefixedValue = __webpack_require__(126); - -var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _extends2 = __webpack_require__(7); -var values = { - 'zoom-in': true, - 'zoom-out': true, - grab: true, - grabbing: true -}; +var _extends3 = _interopRequireDefault(_extends2); -function cursor(property, value) { - if (property === 'cursor' && values[value]) { - return (0, _joinPrefixedValue2.default)(property, value); - } -} -module.exports = exports['default']; +var _objectWithoutProperties2 = __webpack_require__(8); -/***/ }), -/* 700 */ -/***/ (function(module, exports, __webpack_require__) { +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -"use strict"; +var _simpleAssign = __webpack_require__(6); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = flex; -var values = { flex: true, 'inline-flex': true }; +var _react = __webpack_require__(0); -function flex(property, value) { - if (property === 'display' && values[value]) { - return { - display: ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value] - }; - } -} -module.exports = exports['default']; +var _react2 = _interopRequireDefault(_react); -/***/ }), -/* 701 */ -/***/ (function(module, exports, __webpack_require__) { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -"use strict"; +var Subheader = function Subheader(props, context) { + var children = props.children, + inset = props.inset, + style = props.style, + other = (0, _objectWithoutProperties3.default)(props, ['children', 'inset', 'style']); + var _context$muiTheme = context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + subheader = _context$muiTheme.subheader; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = sizing; + var styles = { + root: { + boxSizing: 'border-box', + color: subheader.color, + fontSize: 14, + fontWeight: subheader.fontWeight, + lineHeight: '48px', + paddingLeft: inset ? 72 : 16, + width: '100%' + } + }; -var _joinPrefixedValue = __webpack_require__(126); + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + children + ); +}; -var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); +Subheader.muiName = 'Subheader'; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + false ? Subheader.propTypes = { + /** + * Node that will be placed inside the `Subheader`. + */ + children: _react.PropTypes.node, + /** + * If true, the `Subheader` will be indented. + */ + inset: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; -var properties = { - maxHeight: true, - maxWidth: true, - width: true, - height: true, - columnWidth: true, - minWidth: true, - minHeight: true +Subheader.defaultProps = { + inset: false }; -var values = { - 'min-content': true, - 'max-content': true, - 'fill-available': true, - 'fit-content': true, - 'contain-floats': true + +Subheader.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired }; -function sizing(property, value) { - if (properties[property] && values[value]) { - return (0, _joinPrefixedValue2.default)(property, value); - } -} -module.exports = exports['default']; +exports.default = Subheader; /***/ }), -/* 702 */ +/* 714 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(715).create; + +/***/ }), +/* 715 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = gradient; -var _joinPrefixedValue = __webpack_require__(126); +var _prodInvariant = __webpack_require__(71); -var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); +var ReactChildren = __webpack_require__(219); +var ReactElement = __webpack_require__(57); -var _isPrefixedValue = __webpack_require__(194); +var emptyFunction = __webpack_require__(22); +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); -var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); +/** + * We used to allow keyed objects to serve as a collection of ReactElements, + * or nested sets. This allowed us a way to explicitly key a set or fragment of + * components. This is now being replaced with an opaque data structure. + * The upgrade path is to call React.addons.createFragment({ key: value }) to + * create a keyed fragment. The resulting data structure is an array. + */ -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var numericPropertyRegex = /^\d+$/; -var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; +var warnedAboutNumeric = false; -function gradient(property, value) { - if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.match(values) !== null) { - return (0, _joinPrefixedValue2.default)(property, value); +var ReactFragment = { + /** + * Wrap a keyed object in an opaque proxy that warns you if you access any + * of its properties. + * See https://facebook.github.io/react/docs/create-fragment.html + */ + create: function (object) { + if (typeof object !== 'object' || !object || Array.isArray(object)) { + false ? warning(false, 'React.addons.createFragment only accepts a single object. Got: %s', object) : void 0; + return object; + } + if (ReactElement.isValidElement(object)) { + false ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : void 0; + return object; + } + + !(object.nodeType !== 1) ? false ? invariant(false, 'React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.') : _prodInvariant('0') : void 0; + + var result = []; + + for (var key in object) { + if (false) { + if (!warnedAboutNumeric && numericPropertyRegex.test(key)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment(...): Child objects should have ' + 'non-numeric keys so ordering is preserved.') : void 0; + warnedAboutNumeric = true; + } + } + ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument); + } + + return result; } -} -module.exports = exports['default']; +}; + +module.exports = ReactFragment; /***/ }), -/* 703 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53276,896 +56615,905 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = transition; - -var _hyphenateStyleName = __webpack_require__(310); -var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); - -var _capitalizeString = __webpack_require__(193); - -var _capitalizeString2 = _interopRequireDefault(_capitalizeString); +var _extends2 = __webpack_require__(7); -var _isPrefixedValue = __webpack_require__(194); +var _extends3 = _interopRequireDefault(_extends2); -var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); +var _objectWithoutProperties2 = __webpack_require__(8); -var _prefixProps = __webpack_require__(308); +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var _prefixProps2 = _interopRequireDefault(_prefixProps); +var _getPrototypeOf = __webpack_require__(3); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var _classCallCheck2 = __webpack_require__(1); -var properties = { - transition: true, - transitionProperty: true, - WebkitTransition: true, - WebkitTransitionProperty: true -}; +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -function transition(property, value) { - // also check for already prefixed transitions - if (typeof value === 'string' && properties[property]) { - var _ref2; +var _createClass2 = __webpack_require__(2); - var outputValue = prefixValue(value); - var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (value) { - return value.match(/-moz-|-ms-/) === null; - }).join(','); +var _createClass3 = _interopRequireDefault(_createClass2); - // if the property is already prefixed - if (property.indexOf('Webkit') > -1) { - return _defineProperty({}, property, webkitOutput); - } +var _possibleConstructorReturn2 = __webpack_require__(4); - return _ref2 = {}, _defineProperty(_ref2, 'Webkit' + (0, _capitalizeString2.default)(property), webkitOutput), _defineProperty(_ref2, property, outputValue), _ref2; - } -} +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -function prefixValue(value) { - if ((0, _isPrefixedValue2.default)(value)) { - return value; - } +var _inherits2 = __webpack_require__(5); - // only split multi values, not cubic beziers - var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); +var _inherits3 = _interopRequireDefault(_inherits2); - // iterate each single value and check for transitioned properties - // that need to be prefixed as well - multipleValues.forEach(function (val, index) { - multipleValues[index] = Object.keys(_prefixProps2.default).reduce(function (out, prefix) { - var dashCasePrefix = '-' + prefix.toLowerCase() + '-'; +var _simpleAssign = __webpack_require__(6); - Object.keys(_prefixProps2.default[prefix]).forEach(function (prop) { - var dashCaseProperty = (0, _hyphenateStyleName2.default)(prop); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - if (val.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') { - // join all prefixes and create a new value - out = val.replace(dashCaseProperty, dashCasePrefix + dashCaseProperty) + ',' + out; - } - }); - return out; - }, val); - }); +var _react = __webpack_require__(0); - return multipleValues.join(','); -} -module.exports = exports['default']; +var _react2 = _interopRequireDefault(_react); -/***/ }), -/* 704 */ -/***/ (function(module, exports, __webpack_require__) { +var _reactAddonsTransitionGroup = __webpack_require__(132); -"use strict"; +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); +var _ScaleInChild = __webpack_require__(720); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = flexboxIE; +var _ScaleInChild2 = _interopRequireDefault(_ScaleInChild); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var alternativeValues = { - 'space-around': 'distribute', - 'space-between': 'justify', - 'flex-start': 'start', - 'flex-end': 'end' -}; -var alternativeProps = { - alignContent: 'msFlexLinePack', - alignSelf: 'msFlexItemAlign', - alignItems: 'msFlexAlign', - justifyContent: 'msFlexPack', - order: 'msFlexOrder', - flexGrow: 'msFlexPositive', - flexShrink: 'msFlexNegative', - flexBasis: 'msPreferredSize' -}; +var ScaleIn = function (_Component) { + (0, _inherits3.default)(ScaleIn, _Component); -function flexboxIE(property, value) { - if (alternativeProps[property]) { - return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + function ScaleIn() { + (0, _classCallCheck3.default)(this, ScaleIn); + return (0, _possibleConstructorReturn3.default)(this, (ScaleIn.__proto__ || (0, _getPrototypeOf2.default)(ScaleIn)).apply(this, arguments)); } -} -module.exports = exports['default']; -/***/ }), -/* 705 */ -/***/ (function(module, exports, __webpack_require__) { + (0, _createClass3.default)(ScaleIn, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + childStyle = _props.childStyle, + enterDelay = _props.enterDelay, + maxScale = _props.maxScale, + minScale = _props.minScale, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'childStyle', 'enterDelay', 'maxScale', 'minScale', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; -"use strict"; + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'relative', + overflow: 'hidden', + height: '100%' + }, style); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = flexboxOld; + var newChildren = _react2.default.Children.map(children, function (child) { + return _react2.default.createElement( + _ScaleInChild2.default, + { + key: child.key, + enterDelay: enterDelay, + maxScale: maxScale, + minScale: minScale, + style: childStyle + }, + child + ); + }); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + return _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + (0, _extends3.default)({}, other, { + style: prepareStyles(mergedRootStyles), + component: 'div' + }), + newChildren + ); + } + }]); + return ScaleIn; +}(_react.Component); -var alternativeValues = { - 'space-around': 'justify', - 'space-between': 'justify', - 'flex-start': 'start', - 'flex-end': 'end', - 'wrap-reverse': 'multiple', - wrap: 'multiple' +ScaleIn.defaultProps = { + enterDelay: 0 }; - -var alternativeProps = { - alignItems: 'WebkitBoxAlign', - justifyContent: 'WebkitBoxPack', - flexWrap: 'WebkitBoxLines' +ScaleIn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired }; - -function flexboxOld(property, value) { - if (property === 'flexDirection' && typeof value === 'string') { - return { - WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', - WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' - }; - } - if (alternativeProps[property]) { - return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); - } -} -module.exports = exports['default']; + false ? ScaleIn.propTypes = { + childStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + enterDelay: _react.PropTypes.number, + maxScale: _react.PropTypes.number, + minScale: _react.PropTypes.number, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = ScaleIn; /***/ }), -/* 706 */ +/* 717 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _bowser = __webpack_require__(707); - -var _bowser2 = _interopRequireDefault(_bowser); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var vendorPrefixes = { - Webkit: ['chrome', 'safari', 'ios', 'android', 'phantom', 'opera', 'webos', 'blackberry', 'bada', 'tizen', 'chromium', 'vivaldi'], - Moz: ['firefox', 'seamonkey', 'sailfish'], - ms: ['msie', 'msedge'] -}; -var browsers = { - chrome: [['chrome'], ['chromium']], - safari: [['safari']], - firefox: [['firefox']], - edge: [['msedge']], - opera: [['opera'], ['vivaldi']], - ios_saf: [['ios', 'mobile'], ['ios', 'tablet']], - ie: [['msie']], - op_mini: [['opera', 'mobile'], ['opera', 'tablet']], - and_uc: [['android', 'mobile'], ['android', 'tablet']], - android: [['android', 'mobile'], ['android', 'tablet']] -}; - -var browserByInfo = function browserByInfo(info) { - if (info.firefox) { - return 'firefox'; - } - var name = ''; - - Object.keys(browsers).forEach(function (browser) { - browsers[browser].forEach(function (condition) { - var match = 0; - condition.forEach(function (single) { - if (info[single]) { - match += 1; - } - }); - if (condition.length === match) { - name = browser; - } - }); - }); - - return name; -}; - /** - * Uses bowser to get default browser information such as version and name - * Evaluates bowser info and adds vendorPrefix information - * @param {string} userAgent - userAgent that gets evaluated + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * */ -exports.default = function (userAgent) { - if (!userAgent) { - return false; - } - var info = _bowser2.default._detect(userAgent); - - Object.keys(vendorPrefixes).forEach(function (prefix) { - vendorPrefixes[prefix].forEach(function (browser) { - if (info[browser]) { - info.prefix = { - inline: prefix, - css: '-' + prefix.toLowerCase() + '-' - }; - } - }); - }); - info.browser = browserByInfo(info); - // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN - info.version = info.version ? parseFloat(info.version) : parseInt(parseFloat(info.osversion), 10); - info.osversion = parseFloat(info.osversion); +var _assign = __webpack_require__(13); - // iOS forces all browsers to use Safari under the hood - // as the Safari version seems to match the iOS version - // we just explicitely use the osversion instead - // https://github.com/rofrischmann/inline-style-prefixer/issues/72 - if (info.browser === 'ios_saf' && info.version > info.osversion) { - info.version = info.osversion; - info.safari = true; - } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - // seperate native android chrome - // https://github.com/rofrischmann/inline-style-prefixer/issues/45 - if (info.browser === 'android' && info.chrome && info.version > 37) { - info.browser = 'and_chr'; - } +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - // For android < 4.4 we want to check the osversion - // not the chrome version, see issue #26 - // https://github.com/rofrischmann/inline-style-prefixer/issues/26 - if (info.browser === 'android' && info.osversion < 5) { - info.version = info.osversion; - } +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - return info; -}; +var React = __webpack_require__(56); +var ReactTransitionChildMapping = __webpack_require__(718); -module.exports = exports['default']; +var propTypesFactory = __webpack_require__(223); +var PropTypes = propTypesFactory(React.isValidElement); -/***/ }), -/* 707 */ -/***/ (function(module, exports, __webpack_require__) { +var emptyFunction = __webpack_require__(22); -/*! - * Bowser - a browser detector - * https://github.com/ded/bowser - * MIT License | (c) Dustin Diaz 2015 +/** + * A basis for animations. When children are declaratively added or removed, + * special lifecycle hooks are called. + * See https://facebook.github.io/react/docs/animation.html#low-level-api-reacttransitiongroup */ -!function (root, name, definition) { - if (typeof module != 'undefined' && module.exports) module.exports = definition() - else if (true) __webpack_require__(708)(name, definition) - else root[name] = definition() -}(this, 'bowser', function () { - /** - * See useragents.js for examples of navigator.userAgent - */ +var ReactTransitionGroup = function (_React$Component) { + _inherits(ReactTransitionGroup, _React$Component); - var t = true + function ReactTransitionGroup() { + var _temp, _this, _ret; - function detect(ua) { + _classCallCheck(this, ReactTransitionGroup); - function getFirstMatch(regex) { - var match = ua.match(regex); - return (match && match.length > 1 && match[1]) || ''; + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; } - function getSecondMatch(regex) { - var match = ua.match(regex); - return (match && match.length > 1 && match[2]) || ''; - } + return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { + // TODO: can we get useful debug information to show at this point? + children: ReactTransitionChildMapping.getChildMapping(_this.props.children) + }, _this.performAppear = function (key) { + _this.currentlyTransitioningKeys[key] = true; - var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase() - , likeAndroid = /like android/i.test(ua) - , android = !likeAndroid && /android/i.test(ua) - , nexusMobile = /nexus\s*[0-6]\s*/i.test(ua) - , nexusTablet = !nexusMobile && /nexus\s*[0-9]+/i.test(ua) - , chromeos = /CrOS/.test(ua) - , silk = /silk/i.test(ua) - , sailfish = /sailfish/i.test(ua) - , tizen = /tizen/i.test(ua) - , webos = /(web|hpw)os/i.test(ua) - , windowsphone = /windows phone/i.test(ua) - , samsungBrowser = /SamsungBrowser/i.test(ua) - , windows = !windowsphone && /windows/i.test(ua) - , mac = !iosdevice && !silk && /macintosh/i.test(ua) - , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua) - , edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i) - , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i) - , tablet = /tablet/i.test(ua) && !/tablet pc/i.test(ua) - , mobile = !tablet && /[^-]mobi/i.test(ua) - , xbox = /xbox/i.test(ua) - , result + var component = _this.refs[key]; - if (/opera/i.test(ua)) { - // an old Opera - result = { - name: 'Opera' - , opera: t - , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i) - } - } else if (/opr|opios/i.test(ua)) { - // a new Opera - result = { - name: 'Opera' - , opera: t - , version: getFirstMatch(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i) || versionIdentifier - } - } - else if (/SamsungBrowser/i.test(ua)) { - result = { - name: 'Samsung Internet for Android' - , samsungBrowser: t - , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i) - } - } - else if (/coast/i.test(ua)) { - result = { - name: 'Opera Coast' - , coast: t - , version: versionIdentifier || getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i) - } - } - else if (/yabrowser/i.test(ua)) { - result = { - name: 'Yandex Browser' - , yandexbrowser: t - , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i) - } - } - else if (/ucbrowser/i.test(ua)) { - result = { - name: 'UC Browser' - , ucbrowser: t - , version: getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i) - } - } - else if (/mxios/i.test(ua)) { - result = { - name: 'Maxthon' - , maxthon: t - , version: getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i) - } - } - else if (/epiphany/i.test(ua)) { - result = { - name: 'Epiphany' - , epiphany: t - , version: getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i) - } - } - else if (/puffin/i.test(ua)) { - result = { - name: 'Puffin' - , puffin: t - , version: getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i) - } - } - else if (/sleipnir/i.test(ua)) { - result = { - name: 'Sleipnir' - , sleipnir: t - , version: getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i) - } - } - else if (/k-meleon/i.test(ua)) { - result = { - name: 'K-Meleon' - , kMeleon: t - , version: getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i) - } - } - else if (windowsphone) { - result = { - name: 'Windows Phone' - , windowsphone: t - } - if (edgeVersion) { - result.msedge = t - result.version = edgeVersion - } - else { - result.msie = t - result.version = getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i) - } - } - else if (/msie|trident/i.test(ua)) { - result = { - name: 'Internet Explorer' - , msie: t - , version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i) - } - } else if (chromeos) { - result = { - name: 'Chrome' - , chromeos: t - , chromeBook: t - , chrome: t - , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) - } - } else if (/chrome.+? edge/i.test(ua)) { - result = { - name: 'Microsoft Edge' - , msedge: t - , version: edgeVersion - } - } - else if (/vivaldi/i.test(ua)) { - result = { - name: 'Vivaldi' - , vivaldi: t - , version: getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i) || versionIdentifier - } - } - else if (sailfish) { - result = { - name: 'Sailfish' - , sailfish: t - , version: getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i) - } - } - else if (/seamonkey\//i.test(ua)) { - result = { - name: 'SeaMonkey' - , seamonkey: t - , version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i) - } - } - else if (/firefox|iceweasel|fxios/i.test(ua)) { - result = { - name: 'Firefox' - , firefox: t - , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i) - } - if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) { - result.firefoxos = t - } - } - else if (silk) { - result = { - name: 'Amazon Silk' - , silk: t - , version : getFirstMatch(/silk\/(\d+(\.\d+)?)/i) - } - } - else if (/phantom/i.test(ua)) { - result = { - name: 'PhantomJS' - , phantom: t - , version: getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i) - } - } - else if (/slimerjs/i.test(ua)) { - result = { - name: 'SlimerJS' - , slimer: t - , version: getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i) + if (component.componentWillAppear) { + component.componentWillAppear(_this._handleDoneAppearing.bind(_this, key)); + } else { + _this._handleDoneAppearing(key); } - } - else if (/blackberry|\bbb\d+/i.test(ua) || /rim\stablet/i.test(ua)) { - result = { - name: 'BlackBerry' - , blackberry: t - , version: versionIdentifier || getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i) + }, _this._handleDoneAppearing = function (key) { + var component = _this.refs[key]; + if (component.componentDidAppear) { + component.componentDidAppear(); } - } - else if (webos) { - result = { - name: 'WebOS' - , webos: t - , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i) - }; - /touchpad\//i.test(ua) && (result.touchpad = t) - } - else if (/bada/i.test(ua)) { - result = { - name: 'Bada' - , bada: t - , version: getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i) - }; - } - else if (tizen) { - result = { - name: 'Tizen' - , tizen: t - , version: getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || versionIdentifier - }; - } - else if (/qupzilla/i.test(ua)) { - result = { - name: 'QupZilla' - , qupzilla: t - , version: getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || versionIdentifier + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully appeared. Remove it. + _this.performLeave(key); } - } - else if (/chromium/i.test(ua)) { - result = { - name: 'Chromium' - , chromium: t - , version: getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || versionIdentifier + }, _this.performEnter = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + + if (component.componentWillEnter) { + component.componentWillEnter(_this._handleDoneEntering.bind(_this, key)); + } else { + _this._handleDoneEntering(key); } - } - else if (/chrome|crios|crmo/i.test(ua)) { - result = { - name: 'Chrome' - , chrome: t - , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + }, _this._handleDoneEntering = function (key) { + var component = _this.refs[key]; + if (component.componentDidEnter) { + component.componentDidEnter(); } - } - else if (android) { - result = { - name: 'Android' - , version: versionIdentifier + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully entered. Remove it. + _this.performLeave(key); } - } - else if (/safari|applewebkit/i.test(ua)) { - result = { - name: 'Safari' - , safari: t + }, _this.performLeave = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + if (component.componentWillLeave) { + component.componentWillLeave(_this._handleDoneLeaving.bind(_this, key)); + } else { + // Note that this is somewhat dangerous b/c it calls setState() + // again, effectively mutating the component before all the work + // is done. + _this._handleDoneLeaving(key); } - if (versionIdentifier) { - result.version = versionIdentifier + }, _this._handleDoneLeaving = function (key) { + var component = _this.refs[key]; + + if (component.componentDidLeave) { + component.componentDidLeave(); } - } - else if (iosdevice) { - result = { - name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod' + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) { + // This entered again before it fully left. Add it again. + _this.performEnter(key); + } else { + _this.setState(function (state) { + var newChildren = _assign({}, state.children); + delete newChildren[key]; + return { children: newChildren }; + }); } - // WTF: version is not part of user agent in web apps - if (versionIdentifier) { - result.version = versionIdentifier + }, _temp), _possibleConstructorReturn(_this, _ret); + } + + ReactTransitionGroup.prototype.componentWillMount = function componentWillMount() { + this.currentlyTransitioningKeys = {}; + this.keysToEnter = []; + this.keysToLeave = []; + }; + + ReactTransitionGroup.prototype.componentDidMount = function componentDidMount() { + var initialChildMapping = this.state.children; + for (var key in initialChildMapping) { + if (initialChildMapping[key]) { + this.performAppear(key); } } - else if(/googlebot/i.test(ua)) { - result = { - name: 'Googlebot' - , googlebot: t - , version: getFirstMatch(/googlebot\/(\d+(\.\d+))/i) || versionIdentifier + }; + + ReactTransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + var nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children); + var prevChildMapping = this.state.children; + + this.setState({ + children: ReactTransitionChildMapping.mergeChildMappings(prevChildMapping, nextChildMapping) + }); + + var key; + + for (key in nextChildMapping) { + var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); + if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) { + this.keysToEnter.push(key); } } - else { - result = { - name: getFirstMatch(/^(.*)\/(.*) /), - version: getSecondMatch(/^(.*)\/(.*) /) - }; - } - // set webkit or gecko flag for browsers based on these engines - if (!result.msedge && /(apple)?webkit/i.test(ua)) { - if (/(apple)?webkit\/537\.36/i.test(ua)) { - result.name = result.name || "Blink" - result.blink = t - } else { - result.name = result.name || "Webkit" - result.webkit = t + for (key in prevChildMapping) { + var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key); + if (prevChildMapping[key] && !hasNext && !this.currentlyTransitioningKeys[key]) { + this.keysToLeave.push(key); } - if (!result.version && versionIdentifier) { - result.version = versionIdentifier - } - } else if (!result.opera && /gecko\//i.test(ua)) { - result.name = result.name || "Gecko" - result.gecko = t - result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i) } - // set OS flags for platforms that have multiple browsers - if (!result.windowsphone && !result.msedge && (android || result.silk)) { - result.android = t - } else if (!result.windowsphone && !result.msedge && iosdevice) { - result[iosdevice] = t - result.ios = t - } else if (mac) { - result.mac = t - } else if (xbox) { - result.xbox = t - } else if (windows) { - result.windows = t - } else if (linux) { - result.linux = t - } + // If we want to someday check for reordering, we could do it here. + }; + + ReactTransitionGroup.prototype.componentDidUpdate = function componentDidUpdate() { + var keysToEnter = this.keysToEnter; + this.keysToEnter = []; + keysToEnter.forEach(this.performEnter); + + var keysToLeave = this.keysToLeave; + this.keysToLeave = []; + keysToLeave.forEach(this.performLeave); + }; - function getWindowsVersion (s) { - switch (s) { - case 'NT': return 'NT' - case 'XP': return 'XP' - case 'NT 5.0': return '2000' - case 'NT 5.1': return 'XP' - case 'NT 5.2': return '2003' - case 'NT 6.0': return 'Vista' - case 'NT 6.1': return '7' - case 'NT 6.2': return '8' - case 'NT 6.3': return '8.1' - case 'NT 10.0': return '10' - default: return undefined + ReactTransitionGroup.prototype.render = function render() { + // TODO: we could get rid of the need for the wrapper node + // by cloning a single child + var childrenToRender = []; + for (var key in this.state.children) { + var child = this.state.children[key]; + if (child) { + // You may need to apply reactive updates to a child as it is leaving. + // The normal React way to do it won't work since the child will have + // already been removed. In case you need this behavior you can provide + // a childFactory function to wrap every child, even the ones that are + // leaving. + childrenToRender.push(React.cloneElement(this.props.childFactory(child), { + ref: key, + key: key + })); } } - - // OS version extraction - var osVersion = ''; - if (result.windows) { - osVersion = getWindowsVersion(getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i)) - } else if (result.windowsphone) { - osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i); - } else if (result.mac) { - osVersion = getFirstMatch(/Mac OS X (\d+([_\.\s]\d+)*)/i); - osVersion = osVersion.replace(/[_\s]/g, '.'); - } else if (iosdevice) { - osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i); - osVersion = osVersion.replace(/[_\s]/g, '.'); - } else if (android) { - osVersion = getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i); - } else if (result.webos) { - osVersion = getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i); - } else if (result.blackberry) { - osVersion = getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i); - } else if (result.bada) { - osVersion = getFirstMatch(/bada\/(\d+(\.\d+)*)/i); - } else if (result.tizen) { - osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i); - } - if (osVersion) { - result.osversion = osVersion; - } - // device type extraction - var osMajorVersion = !result.windows && osVersion.split('.')[0]; - if ( - tablet - || nexusTablet - || iosdevice == 'ipad' - || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile))) - || result.silk - ) { - result.tablet = t - } else if ( - mobile - || iosdevice == 'iphone' - || iosdevice == 'ipod' - || android - || nexusMobile - || result.blackberry - || result.webos - || result.bada - ) { - result.mobile = t - } + // Do not forward ReactTransitionGroup props to primitive DOM nodes + var props = _assign({}, this.props); + delete props.transitionLeave; + delete props.transitionName; + delete props.transitionAppear; + delete props.transitionEnter; + delete props.childFactory; + delete props.transitionLeaveTimeout; + delete props.transitionEnterTimeout; + delete props.transitionAppearTimeout; + delete props.component; - // Graded Browser Support - // http://developer.yahoo.com/yui/articles/gbs - if (result.msedge || - (result.msie && result.version >= 10) || - (result.yandexbrowser && result.version >= 15) || - (result.vivaldi && result.version >= 1.0) || - (result.chrome && result.version >= 20) || - (result.samsungBrowser && result.version >= 4) || - (result.firefox && result.version >= 20.0) || - (result.safari && result.version >= 6) || - (result.opera && result.version >= 10.0) || - (result.ios && result.osversion && result.osversion.split(".")[0] >= 6) || - (result.blackberry && result.version >= 10.1) - || (result.chromium && result.version >= 20) - ) { - result.a = t; - } - else if ((result.msie && result.version < 10) || - (result.chrome && result.version < 20) || - (result.firefox && result.version < 20.0) || - (result.safari && result.version < 6) || - (result.opera && result.version < 10.0) || - (result.ios && result.osversion && result.osversion.split(".")[0] < 6) - || (result.chromium && result.version < 20) - ) { - result.c = t - } else result.x = t + return React.createElement(this.props.component, props, childrenToRender); + }; + + return ReactTransitionGroup; +}(React.Component); + +ReactTransitionGroup.displayName = 'ReactTransitionGroup'; +ReactTransitionGroup.propTypes = { + component: PropTypes.any, + childFactory: PropTypes.func +}; +ReactTransitionGroup.defaultProps = { + component: 'span', + childFactory: emptyFunction.thatReturnsArgument +}; + + +module.exports = ReactTransitionGroup; + +/***/ }), +/* 718 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - return result - } - var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '') - bowser.test = function (browserList) { - for (var i = 0; i < browserList.length; ++i) { - var browserItem = browserList[i]; - if (typeof browserItem=== 'string') { - if (browserItem in bowser) { - return true; - } - } - } - return false; - } +var flattenChildren = __webpack_require__(719); +var ReactTransitionChildMapping = { /** - * Get version precisions count - * - * @example - * getVersionPrecision("1.10.3") // 3 + * Given `this.props.children`, return an object mapping key to child. Just + * simple syntactic sugar around flattenChildren(). * - * @param {string} version - * @return {number} + * @param {*} children `this.props.children` + * @param {number=} selfDebugID Optional debugID of the current internal instance. + * @return {object} Mapping of key to child */ - function getVersionPrecision(version) { - return version.split(".").length; - } + getChildMapping: function (children, selfDebugID) { + if (!children) { + return children; + } + + if (false) { + return flattenChildren(children, selfDebugID); + } + + return flattenChildren(children); + }, /** - * Array::map polyfill + * When you're adding or removing children some may be added or removed in the + * same render pass. We want to show *both* since we want to simultaneously + * animate elements in and out. This function takes a previous set of keys + * and a new set of keys and merges them with its best guess of the correct + * ordering. In the future we may expose some of the utilities in + * ReactMultiChild to make this easy, but for now React itself does not + * directly have this concept of the union of prevChildren and nextChildren + * so we implement it here. * - * @param {Array} arr - * @param {Function} iterator - * @return {Array} - */ - function map(arr, iterator) { - var result = [], i; - if (Array.prototype.map) { - return Array.prototype.map.call(arr, iterator); + * @param {object} prev prev children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @param {object} next next children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @return {object} a key set that contains all keys in `prev` and all keys + * in `next` in a reasonable order. + */ + mergeChildMappings: function (prev, next) { + prev = prev || {}; + next = next || {}; + + function getValueForKey(key) { + if (next.hasOwnProperty(key)) { + return next[key]; + } else { + return prev[key]; + } } - for (i = 0; i < arr.length; i++) { - result.push(iterator(arr[i])); + + // For each key of `next`, the list of keys to insert before that key in + // the combined list + var nextKeysPending = {}; + + var pendingKeys = []; + for (var prevKey in prev) { + if (next.hasOwnProperty(prevKey)) { + if (pendingKeys.length) { + nextKeysPending[prevKey] = pendingKeys; + pendingKeys = []; + } + } else { + pendingKeys.push(prevKey); + } } - return result; + + var i; + var childMapping = {}; + for (var nextKey in next) { + if (nextKeysPending.hasOwnProperty(nextKey)) { + for (i = 0; i < nextKeysPending[nextKey].length; i++) { + var pendingNextKey = nextKeysPending[nextKey][i]; + childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); + } + } + childMapping[nextKey] = getValueForKey(nextKey); + } + + // Finally, add the keys which didn't appear before any key in `next` + for (i = 0; i < pendingKeys.length; i++) { + childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + } + + return childMapping; } +}; - /** - * Calculate browser version weight - * - * @example - * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1 - * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1 - * compareVersions(['1.10.2.1', '1.10.2.1']); // 0 - * compareVersions(['1.10.2.1', '1.0800.2']); // -1 - * - * @param {Array} versions versions to compare - * @return {Number} comparison result - */ - function compareVersions(versions) { - // 1) get common precision for both versions, for example for "10.0" and "9" it should be 2 - var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1])); - var chunks = map(versions, function (version) { - var delta = precision - getVersionPrecision(version); +module.exports = ReactTransitionChildMapping; - // 2) "9" -> "9.0" (for precision = 2) - version = version + new Array(delta + 1).join(".0"); +/***/ }), +/* 719 */ +/***/ (function(module, exports, __webpack_require__) { - // 3) "9.0" -> ["000000000"", "000000009"] - return map(version.split("."), function (chunk) { - return new Array(20 - chunk.length).join("0") + chunk; - }).reverse(); - }); +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ - // iterate in reverse order by reversed chunks array - while (--precision >= 0) { - // 4) compare: "000000009" > "000000010" = false (but "9" > "10" = true) - if (chunks[0][precision] > chunks[1][precision]) { - return 1; - } - else if (chunks[0][precision] === chunks[1][precision]) { - if (precision === 0) { - // all version chunks are same - return 0; - } + + +var KeyEscapeUtils = __webpack_require__(222); +var traverseAllChildren = __webpack_require__(221); +var warning = __webpack_require__(11); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && Object({"NODE_ENV":'production'}) && 'production' === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(159); +} + +/** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + * @param {number=} selfDebugID Optional debugID of the current internal instance. + */ +function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + // We found a component instance. + if (traverseContext && typeof traverseContext === 'object') { + var result = traverseContext; + var keyUnique = result[name] === undefined; + if (false) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = require('./ReactComponentTreeHook'); } - else { - return -1; + if (!keyUnique) { + process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; } } + if (keyUnique && child != null) { + result[name] = child; + } } +} - /** - * Check if browser is unsupported - * - * @example - * bowser.isUnsupportedBrowser({ - * msie: "10", - * firefox: "23", - * chrome: "29", - * safari: "5.1", - * opera: "16", - * phantom: "534" - * }); - * - * @param {Object} minVersions map of minimal version to browser - * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map - * @param {String} [ua] user agent string - * @return {Boolean} - */ - function isUnsupportedBrowser(minVersions, strictMode, ua) { - var _bowser = bowser; +/** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ +function flattenChildren(children, selfDebugID) { + if (children == null) { + return children; + } + var result = {}; - // make strictMode param optional with ua param usage - if (typeof strictMode === 'string') { - ua = strictMode; - strictMode = void(0); + if (false) { + traverseAllChildren(children, function (traverseContext, child, name) { + return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); + }, result); + } else { + traverseAllChildren(children, flattenSingleChildIntoContext, result); + } + return result; +} + +module.exports = flattenChildren; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(112))) + +/***/ }), +/* 720 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _autoPrefix = __webpack_require__(96); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ScaleInChild = function (_Component) { + (0, _inherits3.default)(ScaleInChild, _Component); + + function ScaleInChild() { + (0, _classCallCheck3.default)(this, ScaleInChild); + return (0, _possibleConstructorReturn3.default)(this, (ScaleInChild.__proto__ || (0, _getPrototypeOf2.default)(ScaleInChild)).apply(this, arguments)); + } + + (0, _createClass3.default)(ScaleInChild, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentDidAppear', + value: function componentDidAppear() { + this.animate(); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + this.animate(); } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; - if (strictMode === void(0)) { - strictMode = false; + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.minScale + ')'); + + this.leaveTimer = setTimeout(callback, 450); } - if (ua) { - _bowser = detect(ua); + }, { + key: 'animate', + value: function animate() { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '1'; + _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.maxScale + ')'); } + }, { + key: 'initializeAnimation', + value: function initializeAnimation(callback) { + var style = _reactDom2.default.findDOMNode(this).style; - var version = "" + _bowser.version; - for (var browser in minVersions) { - if (minVersions.hasOwnProperty(browser)) { - if (_bowser[browser]) { - if (typeof minVersions[browser] !== 'string') { - throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions)); - } + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'scale(0)'); - // browser version and min supported version. - return compareVersions([version, minVersions[browser]]) < 0; - } - } + this.enterTimer = setTimeout(callback, this.props.enterDelay); } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + enterDelay = _props.enterDelay, + maxScale = _props.maxScale, + minScale = _props.minScale, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'maxScale', 'minScale', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; - return strictMode; // not found - } - /** - * Check if browser is supported - * - * @param {Object} minVersions map of minimal version to browser - * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map - * @param {String} [ua] user agent string - * @return {Boolean} - */ - function check(minVersions, strictMode, ua) { - return !isUnsupportedBrowser(minVersions, strictMode, ua); - } + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'absolute', + height: '100%', + width: '100%', + top: 0, + left: 0, + transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) + }, style); - bowser.isUnsupportedBrowser = isUnsupportedBrowser; - bowser.compareVersions = compareVersions; - bowser.check = check; + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }), + children + ); + } + }]); + return ScaleInChild; +}(_react.Component); - /* - * Set our detect method to the main bowser object so we can - * reuse it to test other user agents. - * This is needed to implement future tests. - */ - bowser._detect = detect; +ScaleInChild.defaultProps = { + enterDelay: 0, + maxScale: 1, + minScale: 0 +}; +ScaleInChild.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ScaleInChild.propTypes = { + children: _react.PropTypes.node, + enterDelay: _react.PropTypes.number, + maxScale: _react.PropTypes.number, + minScale: _react.PropTypes.number, + style: _react.PropTypes.object +} : void 0; +exports.default = ScaleInChild; - return bowser +/***/ }), +/* 721 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true }); +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(63); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _autoPrefix = __webpack_require__(96); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CircleRipple = function (_Component) { + (0, _inherits3.default)(CircleRipple, _Component); + + function CircleRipple() { + (0, _classCallCheck3.default)(this, CircleRipple); + return (0, _possibleConstructorReturn3.default)(this, (CircleRipple.__proto__ || (0, _getPrototypeOf2.default)(CircleRipple)).apply(this, arguments)); + } + + (0, _createClass3.default)(CircleRipple, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + return !(0, _shallowEqual2.default)(this.props, nextProps); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentDidAppear', + value: function componentDidAppear() { + this.animate(); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + this.animate(); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = 0; + // If the animation is aborted, remove from the DOM immediately + var removeAfter = this.props.aborted ? 0 : 2000; + this.enterTimer = setTimeout(callback, removeAfter); + } + }, { + key: 'animate', + value: function animate() { + var style = _reactDom2.default.findDOMNode(this).style; + var transitionValue = _transitions2.default.easeOut('2s', 'opacity') + ', ' + _transitions2.default.easeOut('1s', 'transform'); + _autoPrefix2.default.set(style, 'transition', transitionValue); + _autoPrefix2.default.set(style, 'transform', 'scale(1)'); + } + }, { + key: 'initializeAnimation', + value: function initializeAnimation(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = this.props.opacity; + _autoPrefix2.default.set(style, 'transform', 'scale(0)'); + this.leaveTimer = setTimeout(callback, 0); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + aborted = _props.aborted, + color = _props.color, + opacity = _props.opacity, + style = _props.style, + touchGenerated = _props.touchGenerated, + other = (0, _objectWithoutProperties3.default)(_props, ['aborted', 'color', 'opacity', 'style', 'touchGenerated']); + var prepareStyles = this.context.muiTheme.prepareStyles; + -/***/ }), -/* 708 */ -/***/ (function(module, exports) { + var mergedStyles = (0, _simpleAssign2.default)({ + position: 'absolute', + top: 0, + left: 0, + height: '100%', + width: '100%', + borderRadius: '50%', + backgroundColor: color + }, style); -module.exports = function() { - throw new Error("define cannot be used indirect"); -}; + return _react2.default.createElement('div', (0, _extends3.default)({}, other, { style: prepareStyles(mergedStyles) })); + } + }]); + return CircleRipple; +}(_react.Component); +CircleRipple.defaultProps = { + opacity: 0.1, + aborted: false +}; +CircleRipple.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? CircleRipple.propTypes = { + aborted: _react.PropTypes.bool, + color: _react.PropTypes.string, + opacity: _react.PropTypes.number, + style: _react.PropTypes.object, + touchGenerated: _react.PropTypes.bool +} : void 0; +exports.default = CircleRipple; /***/ }), -/* 709 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54175,265 +57523,377 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = function (_ref) { - var browser = _ref.browser; - var version = _ref.version; - var prefix = _ref.prefix; - - var prefixedKeyframes = 'keyframes'; - - if (browser === 'chrome' && version < 43 || (browser === 'safari' || browser === 'ios_saf') && version < 9 || browser === 'opera' && version < 30 || browser === 'android' && version <= 4.4 || browser === 'and_uc') { - prefixedKeyframes = prefix.css + prefixedKeyframes; - } - return prefixedKeyframes; -}; - -module.exports = exports['default']; - -/***/ }), -/* 710 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +var _extends2 = __webpack_require__(7); +var _extends3 = _interopRequireDefault(_extends2); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = { "chrome": { "transform": 35, "transformOrigin": 35, "transformOriginX": 35, "transformOriginY": 35, "backfaceVisibility": 35, "perspective": 35, "perspectiveOrigin": 35, "transformStyle": 35, "transformOriginZ": 35, "animation": 42, "animationDelay": 42, "animationDirection": 42, "animationFillMode": 42, "animationDuration": 42, "animationIterationCount": 42, "animationName": 42, "animationPlayState": 42, "animationTimingFunction": 42, "appearance": 55, "userSelect": 55, "fontKerning": 32, "textEmphasisPosition": 55, "textEmphasis": 55, "textEmphasisStyle": 55, "textEmphasisColor": 55, "boxDecorationBreak": 55, "clipPath": 55, "maskImage": 55, "maskMode": 55, "maskRepeat": 55, "maskPosition": 55, "maskClip": 55, "maskOrigin": 55, "maskSize": 55, "maskComposite": 55, "mask": 55, "maskBorderSource": 55, "maskBorderMode": 55, "maskBorderSlice": 55, "maskBorderWidth": 55, "maskBorderOutset": 55, "maskBorderRepeat": 55, "maskBorder": 55, "maskType": 55, "textDecorationStyle": 55, "textDecorationSkip": 55, "textDecorationLine": 55, "textDecorationColor": 55, "filter": 52, "fontFeatureSettings": 47, "breakAfter": 49, "breakBefore": 49, "breakInside": 49, "columnCount": 49, "columnFill": 49, "columnGap": 49, "columnRule": 49, "columnRuleColor": 49, "columnRuleStyle": 49, "columnRuleWidth": 49, "columns": 49, "columnSpan": 49, "columnWidth": 49 }, "safari": { "flex": 8, "flexBasis": 8, "flexDirection": 8, "flexGrow": 8, "flexFlow": 8, "flexShrink": 8, "flexWrap": 8, "alignContent": 8, "alignItems": 8, "alignSelf": 8, "justifyContent": 8, "order": 8, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8, "transformOrigin": 8, "transformOriginX": 8, "transformOriginY": 8, "backfaceVisibility": 8, "perspective": 8, "perspectiveOrigin": 8, "transformStyle": 8, "transformOriginZ": 8, "animation": 8, "animationDelay": 8, "animationDirection": 8, "animationFillMode": 8, "animationDuration": 8, "animationIterationCount": 8, "animationName": 8, "animationPlayState": 8, "animationTimingFunction": 8, "appearance": 10, "userSelect": 10, "backdropFilter": 10, "fontKerning": 9, "scrollSnapType": 10, "scrollSnapPointsX": 10, "scrollSnapPointsY": 10, "scrollSnapDestination": 10, "scrollSnapCoordinate": 10, "textEmphasisPosition": 7, "textEmphasis": 7, "textEmphasisStyle": 7, "textEmphasisColor": 7, "boxDecorationBreak": 10, "clipPath": 10, "maskImage": 10, "maskMode": 10, "maskRepeat": 10, "maskPosition": 10, "maskClip": 10, "maskOrigin": 10, "maskSize": 10, "maskComposite": 10, "mask": 10, "maskBorderSource": 10, "maskBorderMode": 10, "maskBorderSlice": 10, "maskBorderWidth": 10, "maskBorderOutset": 10, "maskBorderRepeat": 10, "maskBorder": 10, "maskType": 10, "textDecorationStyle": 10, "textDecorationSkip": 10, "textDecorationLine": 10, "textDecorationColor": 10, "shapeImageThreshold": 10, "shapeImageMargin": 10, "shapeImageOutside": 10, "filter": 9, "hyphens": 10, "flowInto": 10, "flowFrom": 10, "breakBefore": 8, "breakAfter": 8, "breakInside": 8, "regionFragment": 10, "columnCount": 8, "columnFill": 8, "columnGap": 8, "columnRule": 8, "columnRuleColor": 8, "columnRuleStyle": 8, "columnRuleWidth": 8, "columns": 8, "columnSpan": 8, "columnWidth": 8 }, "firefox": { "appearance": 51, "userSelect": 51, "boxSizing": 28, "textAlignLast": 48, "textDecorationStyle": 35, "textDecorationSkip": 35, "textDecorationLine": 35, "textDecorationColor": 35, "tabSize": 51, "hyphens": 42, "fontFeatureSettings": 33, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "opera": { "flex": 16, "flexBasis": 16, "flexDirection": 16, "flexGrow": 16, "flexFlow": 16, "flexShrink": 16, "flexWrap": 16, "alignContent": 16, "alignItems": 16, "alignSelf": 16, "justifyContent": 16, "order": 16, "transform": 22, "transformOrigin": 22, "transformOriginX": 22, "transformOriginY": 22, "backfaceVisibility": 22, "perspective": 22, "perspectiveOrigin": 22, "transformStyle": 22, "transformOriginZ": 22, "animation": 29, "animationDelay": 29, "animationDirection": 29, "animationFillMode": 29, "animationDuration": 29, "animationIterationCount": 29, "animationName": 29, "animationPlayState": 29, "animationTimingFunction": 29, "appearance": 41, "userSelect": 41, "fontKerning": 19, "textEmphasisPosition": 41, "textEmphasis": 41, "textEmphasisStyle": 41, "textEmphasisColor": 41, "boxDecorationBreak": 41, "clipPath": 41, "maskImage": 41, "maskMode": 41, "maskRepeat": 41, "maskPosition": 41, "maskClip": 41, "maskOrigin": 41, "maskSize": 41, "maskComposite": 41, "mask": 41, "maskBorderSource": 41, "maskBorderMode": 41, "maskBorderSlice": 41, "maskBorderWidth": 41, "maskBorderOutset": 41, "maskBorderRepeat": 41, "maskBorder": 41, "maskType": 41, "textDecorationStyle": 41, "textDecorationSkip": 41, "textDecorationLine": 41, "textDecorationColor": 41, "filter": 39, "fontFeatureSettings": 34, "breakAfter": 36, "breakBefore": 36, "breakInside": 36, "columnCount": 36, "columnFill": 36, "columnGap": 36, "columnRule": 36, "columnRuleColor": 36, "columnRuleStyle": 36, "columnRuleWidth": 36, "columns": 36, "columnSpan": 36, "columnWidth": 36 }, "ie": { "flex": 10, "flexDirection": 10, "flexFlow": 10, "flexWrap": 10, "transform": 9, "transformOrigin": 9, "transformOriginX": 9, "transformOriginY": 9, "userSelect": 11, "wrapFlow": 11, "wrapThrough": 11, "wrapMargin": 11, "scrollSnapType": 11, "scrollSnapPointsX": 11, "scrollSnapPointsY": 11, "scrollSnapDestination": 11, "scrollSnapCoordinate": 11, "touchAction": 10, "hyphens": 11, "flowInto": 11, "flowFrom": 11, "breakBefore": 11, "breakAfter": 11, "breakInside": 11, "regionFragment": 11, "gridTemplateColumns": 11, "gridTemplateRows": 11, "gridTemplateAreas": 11, "gridTemplate": 11, "gridAutoColumns": 11, "gridAutoRows": 11, "gridAutoFlow": 11, "grid": 11, "gridRowStart": 11, "gridColumnStart": 11, "gridRowEnd": 11, "gridRow": 11, "gridColumn": 11, "gridColumnEnd": 11, "gridColumnGap": 11, "gridRowGap": 11, "gridArea": 11, "gridGap": 11, "textSizeAdjust": 11 }, "edge": { "userSelect": 14, "wrapFlow": 14, "wrapThrough": 14, "wrapMargin": 14, "scrollSnapType": 14, "scrollSnapPointsX": 14, "scrollSnapPointsY": 14, "scrollSnapDestination": 14, "scrollSnapCoordinate": 14, "hyphens": 14, "flowInto": 14, "flowFrom": 14, "breakBefore": 14, "breakAfter": 14, "breakInside": 14, "regionFragment": 14, "gridTemplateColumns": 14, "gridTemplateRows": 14, "gridTemplateAreas": 14, "gridTemplate": 14, "gridAutoColumns": 14, "gridAutoRows": 14, "gridAutoFlow": 14, "grid": 14, "gridRowStart": 14, "gridColumnStart": 14, "gridRowEnd": 14, "gridRow": 14, "gridColumn": 14, "gridColumnEnd": 14, "gridColumnGap": 14, "gridRowGap": 14, "gridArea": 14, "gridGap": 14 }, "ios_saf": { "flex": 8.1, "flexBasis": 8.1, "flexDirection": 8.1, "flexGrow": 8.1, "flexFlow": 8.1, "flexShrink": 8.1, "flexWrap": 8.1, "alignContent": 8.1, "alignItems": 8.1, "alignSelf": 8.1, "justifyContent": 8.1, "order": 8.1, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8.1, "transformOrigin": 8.1, "transformOriginX": 8.1, "transformOriginY": 8.1, "backfaceVisibility": 8.1, "perspective": 8.1, "perspectiveOrigin": 8.1, "transformStyle": 8.1, "transformOriginZ": 8.1, "animation": 8.1, "animationDelay": 8.1, "animationDirection": 8.1, "animationFillMode": 8.1, "animationDuration": 8.1, "animationIterationCount": 8.1, "animationName": 8.1, "animationPlayState": 8.1, "animationTimingFunction": 8.1, "appearance": 9.3, "userSelect": 9.3, "backdropFilter": 9.3, "fontKerning": 9.3, "scrollSnapType": 9.3, "scrollSnapPointsX": 9.3, "scrollSnapPointsY": 9.3, "scrollSnapDestination": 9.3, "scrollSnapCoordinate": 9.3, "boxDecorationBreak": 9.3, "clipPath": 9.3, "maskImage": 9.3, "maskMode": 9.3, "maskRepeat": 9.3, "maskPosition": 9.3, "maskClip": 9.3, "maskOrigin": 9.3, "maskSize": 9.3, "maskComposite": 9.3, "mask": 9.3, "maskBorderSource": 9.3, "maskBorderMode": 9.3, "maskBorderSlice": 9.3, "maskBorderWidth": 9.3, "maskBorderOutset": 9.3, "maskBorderRepeat": 9.3, "maskBorder": 9.3, "maskType": 9.3, "textSizeAdjust": 9.3, "textDecorationStyle": 9.3, "textDecorationSkip": 9.3, "textDecorationLine": 9.3, "textDecorationColor": 9.3, "shapeImageThreshold": 9.3, "shapeImageMargin": 9.3, "shapeImageOutside": 9.3, "filter": 9, "hyphens": 9.3, "flowInto": 9.3, "flowFrom": 9.3, "breakBefore": 8.1, "breakAfter": 8.1, "breakInside": 8.1, "regionFragment": 9.3, "columnCount": 8.1, "columnFill": 8.1, "columnGap": 8.1, "columnRule": 8.1, "columnRuleColor": 8.1, "columnRuleStyle": 8.1, "columnRuleWidth": 8.1, "columns": 8.1, "columnSpan": 8.1, "columnWidth": 8.1 }, "android": { "flex": 4.2, "flexBasis": 4.2, "flexDirection": 4.2, "flexGrow": 4.2, "flexFlow": 4.2, "flexShrink": 4.2, "flexWrap": 4.2, "alignContent": 4.2, "alignItems": 4.2, "alignSelf": 4.2, "justifyContent": 4.2, "order": 4.2, "transition": 4.2, "transitionDelay": 4.2, "transitionDuration": 4.2, "transitionProperty": 4.2, "transitionTimingFunction": 4.2, "transform": 4.4, "transformOrigin": 4.4, "transformOriginX": 4.4, "transformOriginY": 4.4, "backfaceVisibility": 4.4, "perspective": 4.4, "perspectiveOrigin": 4.4, "transformStyle": 4.4, "transformOriginZ": 4.4, "animation": 4.4, "animationDelay": 4.4, "animationDirection": 4.4, "animationFillMode": 4.4, "animationDuration": 4.4, "animationIterationCount": 4.4, "animationName": 4.4, "animationPlayState": 4.4, "animationTimingFunction": 4.4, "appearance": 51, "userSelect": 51, "fontKerning": 4.4, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "filter": 51, "fontFeatureSettings": 4.4, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "and_chr": { "appearance": 51, "userSelect": 51, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "textDecorationStyle": 51, "textDecorationSkip": 51, "textDecorationLine": 51, "textDecorationColor": 51, "filter": 51 }, "and_uc": { "flex": 9.9, "flexBasis": 9.9, "flexDirection": 9.9, "flexGrow": 9.9, "flexFlow": 9.9, "flexShrink": 9.9, "flexWrap": 9.9, "alignContent": 9.9, "alignItems": 9.9, "alignSelf": 9.9, "justifyContent": 9.9, "order": 9.9, "transition": 9.9, "transitionDelay": 9.9, "transitionDuration": 9.9, "transitionProperty": 9.9, "transitionTimingFunction": 9.9, "transform": 9.9, "transformOrigin": 9.9, "transformOriginX": 9.9, "transformOriginY": 9.9, "backfaceVisibility": 9.9, "perspective": 9.9, "perspectiveOrigin": 9.9, "transformStyle": 9.9, "transformOriginZ": 9.9, "animation": 9.9, "animationDelay": 9.9, "animationDirection": 9.9, "animationFillMode": 9.9, "animationDuration": 9.9, "animationIterationCount": 9.9, "animationName": 9.9, "animationPlayState": 9.9, "animationTimingFunction": 9.9, "appearance": 9.9, "userSelect": 9.9, "fontKerning": 9.9, "textEmphasisPosition": 9.9, "textEmphasis": 9.9, "textEmphasisStyle": 9.9, "textEmphasisColor": 9.9, "maskImage": 9.9, "maskMode": 9.9, "maskRepeat": 9.9, "maskPosition": 9.9, "maskClip": 9.9, "maskOrigin": 9.9, "maskSize": 9.9, "maskComposite": 9.9, "mask": 9.9, "maskBorderSource": 9.9, "maskBorderMode": 9.9, "maskBorderSlice": 9.9, "maskBorderWidth": 9.9, "maskBorderOutset": 9.9, "maskBorderRepeat": 9.9, "maskBorder": 9.9, "maskType": 9.9, "textSizeAdjust": 9.9, "filter": 9.9, "hyphens": 9.9, "flowInto": 9.9, "flowFrom": 9.9, "breakBefore": 9.9, "breakAfter": 9.9, "breakInside": 9.9, "regionFragment": 9.9, "fontFeatureSettings": 9.9, "columnCount": 9.9, "columnFill": 9.9, "columnGap": 9.9, "columnRule": 9.9, "columnRuleColor": 9.9, "columnRuleStyle": 9.9, "columnRuleWidth": 9.9, "columns": 9.9, "columnSpan": 9.9, "columnWidth": 9.9 }, "op_mini": {} }; -module.exports = exports["default"]; +var _objectWithoutProperties2 = __webpack_require__(8); -/***/ }), -/* 711 */ -/***/ (function(module, exports, __webpack_require__) { +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -"use strict"; +var _getPrototypeOf = __webpack_require__(3); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = position; +var _classCallCheck2 = __webpack_require__(1); -var _getPrefixedValue = __webpack_require__(40); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); +var _createClass2 = __webpack_require__(2); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _createClass3 = _interopRequireDefault(_createClass2); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var _possibleConstructorReturn2 = __webpack_require__(4); -function position(_ref) { - var property = _ref.property; - var value = _ref.value; - var browser = _ref.browserInfo.browser; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - if (property === 'position' && value === 'sticky' && (browser === 'safari' || browser === 'ios_saf')) { - return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); - } -} -module.exports = exports['default']; +var _inherits2 = __webpack_require__(5); -/***/ }), -/* 712 */ -/***/ (function(module, exports, __webpack_require__) { +var _inherits3 = _interopRequireDefault(_inherits2); -"use strict"; +var _simpleAssign = __webpack_require__(6); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = calc; +var _react = __webpack_require__(0); -var _getPrefixedValue = __webpack_require__(40); +var _react2 = _interopRequireDefault(_react); -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); +var _transitions = __webpack_require__(10); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _transitions2 = _interopRequireDefault(_transitions); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var _propTypes = __webpack_require__(39); -function calc(_ref) { - var property = _ref.property; - var value = _ref.value; - var _ref$browserInfo = _ref.browserInfo; - var browser = _ref$browserInfo.browser; - var version = _ref$browserInfo.version; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; +var _propTypes2 = _interopRequireDefault(_propTypes); - if (typeof value === 'string' && value.indexOf('calc(') > -1 && (browser === 'firefox' && version < 15 || browser === 'chrome' && version < 25 || browser === 'safari' && version < 6.1 || browser === 'ios_saf' && version < 7)) { - return _defineProperty({}, property, (0, _getPrefixedValue2.default)(value.replace(/calc\(/g, css + 'calc('), value, keepUnprefixed)); - } -} -module.exports = exports['default']; +var _EnhancedButton = __webpack_require__(51); -/***/ }), -/* 713 */ -/***/ (function(module, exports, __webpack_require__) { +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); -"use strict"; +var _FontIcon = __webpack_require__(321); +var _FontIcon2 = _interopRequireDefault(_FontIcon); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = zoomCursor; +var _Tooltip = __webpack_require__(322); -var _getPrefixedValue = __webpack_require__(40); +var _Tooltip2 = _interopRequireDefault(_Tooltip); -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); +var _childUtils = __webpack_require__(131); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var values = { 'zoom-in': true, 'zoom-out': true }; +function getStyles(props, context) { + var baseTheme = context.muiTheme.baseTheme; -function zoomCursor(_ref) { - var property = _ref.property; - var value = _ref.value; - var _ref$browserInfo = _ref.browserInfo; - var browser = _ref$browserInfo.browser; - var version = _ref$browserInfo.version; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; - if (property === 'cursor' && values[value] && (browser === 'firefox' && version < 24 || browser === 'chrome' && version < 37 || browser === 'safari' && version < 9 || browser === 'opera' && version < 24)) { - return { - cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) - }; - } + return { + root: { + boxSizing: 'border-box', + overflow: 'visible', + transition: _transitions2.default.easeOut(), + padding: baseTheme.spacing.iconSize / 2, + width: baseTheme.spacing.iconSize * 2, + height: baseTheme.spacing.iconSize * 2, + fontSize: 0 + }, + tooltip: { + boxSizing: 'border-box' + }, + disabled: { + color: baseTheme.palette.disabledColor, + fill: baseTheme.palette.disabledColor, + cursor: 'not-allowed' + } + }; } -module.exports = exports['default']; -/***/ }), -/* 714 */ -/***/ (function(module, exports, __webpack_require__) { +var IconButton = function (_Component) { + (0, _inherits3.default)(IconButton, _Component); -"use strict"; + function IconButton() { + var _ref; + var _temp, _this, _ret; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = grabCursor; + (0, _classCallCheck3.default)(this, IconButton); -var _getPrefixedValue = __webpack_require__(40); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = IconButton.__proto__ || (0, _getPrototypeOf2.default)(IconButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + // Not to be confonded with the touch property. + // This state is to determined if it's a mobile device. + touch: false, + tooltipShown: false + }, _this.handleBlur = function (event) { + _this.hideTooltip(); + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleFocus = function (event) { + _this.showTooltip(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleMouseLeave = function (event) { + if (!_this.button.isKeyboardFocused()) { + _this.hideTooltip(); + } + _this.setState({ hovered: false }); + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseOut = function (event) { + if (_this.props.disabled) _this.hideTooltip(); + if (_this.props.onMouseOut) _this.props.onMouseOut(event); + }, _this.handleMouseEnter = function (event) { + _this.showTooltip(); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // Cancel hover styles for touch devices + if (!_this.state.touch) { + _this.setState({ hovered: true }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); -var values = { grab: true, grabbing: true }; + if (_this.props.onTouchStart) { + _this.props.onTouchStart(event); + } + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + var _this$props = _this.props, + disabled = _this$props.disabled, + onFocus = _this$props.onFocus, + onBlur = _this$props.onBlur, + onKeyboardFocus = _this$props.onKeyboardFocus; -function grabCursor(_ref) { - var property = _ref.property; - var value = _ref.value; - var browser = _ref.browserInfo.browser; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; + if (isKeyboardFocused && !disabled) { + _this.showTooltip(); + if (onFocus) { + onFocus(event); + } + } else { + _this.hideTooltip(); + if (onBlur) { + onBlur(event); + } + } - // adds prefixes for firefox, chrome, safari, and opera regardless of version until a reliable brwoser support info can be found (see: https://github.com/rofrischmann/inline-style-prefixer/issues/79) - if (property === 'cursor' && values[value] && (browser === 'firefox' || browser === 'chrome' || browser === 'safari' || browser === 'opera')) { - return { - cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) - }; + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + if (onKeyboardFocus) { + onKeyboardFocus(event, isKeyboardFocused); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } -} -module.exports = exports['default']; - -/***/ }), -/* 715 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; + (0, _createClass3.default)(IconButton, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.disabled) { + this.setState({ hovered: false }); + } + } + }, { + key: 'setKeyboardFocus', + value: function setKeyboardFocus() { + this.button.setKeyboardFocus(); + } + }, { + key: 'showTooltip', + value: function showTooltip() { + if (this.props.tooltip) { + this.setState({ tooltipShown: true }); + } + } + }, { + key: 'hideTooltip', + value: function hideTooltip() { + if (this.props.tooltip) this.setState({ tooltipShown: false }); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = flex; - -var _getPrefixedValue = __webpack_require__(40); - -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var values = { flex: true, 'inline-flex': true }; + var _props = this.props, + disabled = _props.disabled, + hoveredStyle = _props.hoveredStyle, + disableTouchRipple = _props.disableTouchRipple, + children = _props.children, + iconClassName = _props.iconClassName, + style = _props.style, + tooltip = _props.tooltip, + tooltipPositionProp = _props.tooltipPosition, + tooltipStyles = _props.tooltipStyles, + touch = _props.touch, + iconStyle = _props.iconStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['disabled', 'hoveredStyle', 'disableTouchRipple', 'children', 'iconClassName', 'style', 'tooltip', 'tooltipPosition', 'tooltipStyles', 'touch', 'iconStyle']); -function flex(_ref) { - var property = _ref.property; - var value = _ref.value; - var _ref$browserInfo = _ref.browserInfo; - var browser = _ref$browserInfo.browser; - var version = _ref$browserInfo.version; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; + var fonticon = void 0; - if (property === 'display' && values[value] && (browser === 'chrome' && version < 29 && version > 20 || (browser === 'safari' || browser === 'ios_saf') && version < 9 && version > 6 || browser === 'opera' && (version == 15 || version == 16))) { - return { - display: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) - }; - } -} -module.exports = exports['default']; + var styles = getStyles(this.props, this.context); + var tooltipPosition = tooltipPositionProp.split('-'); -/***/ }), -/* 716 */ -/***/ (function(module, exports, __webpack_require__) { + var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled; -"use strict"; + var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style, hovered ? hoveredStyle : {}); + var tooltipElement = tooltip ? _react2.default.createElement(_Tooltip2.default, { + label: tooltip, + show: this.state.tooltipShown, + touch: touch, + style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyles), + verticalPosition: tooltipPosition[0], + horizontalPosition: tooltipPosition[1] + }) : null; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = sizing; + if (iconClassName) { + var iconHoverColor = iconStyle.iconHoverColor, + iconStyleFontIcon = (0, _objectWithoutProperties3.default)(iconStyle, ['iconHoverColor']); -var _getPrefixedValue = __webpack_require__(40); -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + fonticon = _react2.default.createElement( + _FontIcon2.default, + { + className: iconClassName, + hoverColor: disabled ? null : iconHoverColor, + style: (0, _simpleAssign2.default)({}, disabled && styles.disabled, iconStyleFontIcon), + color: this.context.muiTheme.baseTheme.palette.textColor + }, + children + ); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var childrenStyle = disabled ? (0, _simpleAssign2.default)({}, iconStyle, styles.disabled) : iconStyle; -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({ + ref: function ref(_ref2) { + return _this2.button = _ref2; + } + }, other, { + centerRipple: true, + disabled: disabled, + onTouchStart: this.handleTouchStart, + style: mergedRootStyles, + disableTouchRipple: disableTouchRipple, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onMouseOut: this.handleMouseOut, + onKeyboardFocus: this.handleKeyboardFocus + }), + tooltipElement, + fonticon, + (0, _childUtils.extendChildren)(children, { + style: childrenStyle + }) + ); + } + }]); + return IconButton; +}(_react.Component); -var properties = { - maxHeight: true, - maxWidth: true, - width: true, - height: true, - columnWidth: true, - minWidth: true, - minHeight: true +IconButton.muiName = 'IconButton'; +IconButton.defaultProps = { + disabled: false, + disableTouchRipple: false, + iconStyle: {}, + tooltipPosition: 'bottom-center', + touch: false }; -var values = { - 'min-content': true, - 'max-content': true, - 'fill-available': true, - 'fit-content': true, - 'contain-floats': true +IconButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired }; - -function sizing(_ref) { - var property = _ref.property; - var value = _ref.value; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; - - // This might change in the future - // Keep an eye on it - if (properties[property] && values[value]) { - return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); - } -} -module.exports = exports['default']; + false ? IconButton.propTypes = { + /** + * Can be used to pass a `FontIcon` element as the icon for the button. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the element's ripple effect will be disabled. + */ + disableTouchRipple: _react.PropTypes.bool, + /** + * If true, the element will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element when the component is hovered. + */ + hoveredStyle: _react.PropTypes.object, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * The CSS class name of the icon. Used for setting the icon with a stylesheet. + */ + iconClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the icon element. + * Note: you can specify iconHoverColor as a String inside this object. + */ + iconStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Callback function fired when the element is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the element. + * @param {boolean} keyboardFocused Indicates whether the element is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onMouseOut: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The text to supply to the element's tooltip. + */ + tooltip: _react.PropTypes.node, + /** + * The vertical and horizontal positions, respectively, of the element's tooltip. + * Possible values are: "bottom-center", "top-center", "bottom-right", "top-right", + * "bottom-left", and "top-left". + */ + tooltipPosition: _propTypes2.default.cornersAndCenter, + /** + * Override the inline-styles of the tooltip element. + */ + tooltipStyles: _react.PropTypes.object, + /** + * If true, increase the tooltip element's size. Useful for increasing tooltip + * readability on mobile devices. + */ + touch: _react.PropTypes.bool +} : void 0; +exports.default = IconButton; /***/ }), -/* 717 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54442,185 +57902,158 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = gradient; - -var _getPrefixedValue = __webpack_require__(40); - -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var _extends2 = __webpack_require__(7); -var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; +var _extends3 = _interopRequireDefault(_extends2); -function gradient(_ref) { - var property = _ref.property; - var value = _ref.value; - var _ref$browserInfo = _ref.browserInfo; - var browser = _ref$browserInfo.browser; - var version = _ref$browserInfo.version; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; +var _objectWithoutProperties2 = __webpack_require__(8); - if (typeof value === 'string' && value.match(values) !== null && (browser === 'firefox' && version < 16 || browser === 'chrome' && version < 26 || (browser === 'safari' || browser === 'ios_saf') && version < 7 || (browser === 'opera' || browser === 'op_mini') && version < 12.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { - return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); - } -} -module.exports = exports['default']; +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -/***/ }), -/* 718 */ -/***/ (function(module, exports, __webpack_require__) { +var _getPrototypeOf = __webpack_require__(3); -"use strict"; +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _classCallCheck2 = __webpack_require__(1); -Object.defineProperty(exports, "__esModule", { - value: true -}); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; +var _createClass2 = __webpack_require__(2); -exports.default = transition; +var _createClass3 = _interopRequireDefault(_createClass2); -var _hyphenateStyleName = __webpack_require__(310); +var _possibleConstructorReturn2 = __webpack_require__(4); -var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var _unprefixProperty = __webpack_require__(719); +var _inherits2 = __webpack_require__(5); -var _unprefixProperty2 = _interopRequireDefault(_unprefixProperty); +var _inherits3 = _interopRequireDefault(_inherits2); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _simpleAssign = __webpack_require__(6); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -var properties = { transition: true, transitionProperty: true }; +var _react = __webpack_require__(0); -function transition(_ref) { - var property = _ref.property; - var value = _ref.value; - var css = _ref.prefix.css; - var requiresPrefix = _ref.requiresPrefix; - var keepUnprefixed = _ref.keepUnprefixed; +var _react2 = _interopRequireDefault(_react); - // also check for already prefixed transitions - var unprefixedProperty = (0, _unprefixProperty2.default)(property); +var _transitions = __webpack_require__(10); - if (typeof value === 'string' && properties[unprefixedProperty]) { - var _ret = function () { - // TODO: memoize this array - var requiresPrefixDashCased = Object.keys(requiresPrefix).map(function (prop) { - return (0, _hyphenateStyleName2.default)(prop); - }); +var _transitions2 = _interopRequireDefault(_transitions); - // only split multi values, not cubic beziers - var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - requiresPrefixDashCased.forEach(function (prop) { - multipleValues.forEach(function (val, index) { - if (val.indexOf(prop) > -1 && prop !== 'order') { - multipleValues[index] = val.replace(prop, css + prop) + (keepUnprefixed ? ',' + val : ''); - } - }); - }); +function getStyles(props, context, state) { + var color = props.color, + hoverColor = props.hoverColor; + var baseTheme = context.muiTheme.baseTheme; - return { - v: _defineProperty({}, property, multipleValues.join(',')) - }; - }(); + var offColor = color || baseTheme.palette.textColor; + var onColor = hoverColor || offColor; - if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; - } + return { + root: { + color: state.hovered ? onColor : offColor, + position: 'relative', + fontSize: baseTheme.spacing.iconSize, + display: 'inline-block', + userSelect: 'none', + transition: _transitions2.default.easeOut() + } + }; } -module.exports = exports['default']; - -/***/ }), -/* 719 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = function (property) { - var unprefixed = property.replace(/^(ms|Webkit|Moz|O)/, ''); - return unprefixed.charAt(0).toLowerCase() + unprefixed.slice(1); -}; -module.exports = exports['default']; +var FontIcon = function (_Component) { + (0, _inherits3.default)(FontIcon, _Component); -/***/ }), -/* 720 */ -/***/ (function(module, exports, __webpack_require__) { + function FontIcon() { + var _ref; -"use strict"; + var _temp, _this, _ret; + (0, _classCallCheck3.default)(this, FontIcon); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = flexboxIE; + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -var _getPrefixedValue = __webpack_require__(40); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FontIcon.__proto__ || (0, _getPrototypeOf2.default)(FontIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.handleMouseLeave = function (event) { + // hover is needed only when a hoverColor is defined + if (_this.props.hoverColor !== undefined) { + _this.setState({ hovered: false }); + } + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseEnter = function (event) { + // hover is needed only when a hoverColor is defined + if (_this.props.hoverColor !== undefined) { + _this.setState({ hovered: true }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + (0, _createClass3.default)(FontIcon, [{ + key: 'render', + value: function render() { + var _props = this.props, + hoverColor = _props.hoverColor, + onMouseLeave = _props.onMouseLeave, + onMouseEnter = _props.onMouseEnter, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['hoverColor', 'onMouseLeave', 'onMouseEnter', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var styles = getStyles(this.props, this.context, this.state); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + return _react2.default.createElement('span', (0, _extends3.default)({}, other, { + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + })); + } + }]); + return FontIcon; +}(_react.Component); -var alternativeValues = { - 'space-around': 'distribute', - 'space-between': 'justify', - 'flex-start': 'start', - 'flex-end': 'end', - flex: 'flexbox', - 'inline-flex': 'inline-flexbox' +FontIcon.muiName = 'FontIcon'; +FontIcon.defaultProps = { + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {} }; -var alternativeProps = { - alignContent: 'msFlexLinePack', - alignSelf: 'msFlexItemAlign', - alignItems: 'msFlexAlign', - justifyContent: 'msFlexPack', - order: 'msFlexOrder', - flexGrow: 'msFlexPositive', - flexShrink: 'msFlexNegative', - flexBasis: 'msPreferredSize' +FontIcon.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired }; - -function flexboxIE(_ref) { - var property = _ref.property; - var value = _ref.value; - var styles = _ref.styles; - var _ref$browserInfo = _ref.browserInfo; - var browser = _ref$browserInfo.browser; - var version = _ref$browserInfo.version; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; - - if ((alternativeProps[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'ie_mob' || browser === 'ie') && version == 10) { - if (!keepUnprefixed && !Array.isArray(styles[property])) { - delete styles[property]; - } - if (property === 'display' && alternativeValues[value]) { - return { - display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) - }; - } - if (alternativeProps[property]) { - return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); - } - } -} -module.exports = exports['default']; + false ? FontIcon.propTypes = { + /** + * This is the font color of the font icon. If not specified, + * this component will default to muiTheme.palette.textColor. + */ + color: _react.PropTypes.string, + /** + * This is the icon color when the mouse hovers over the icon. + */ + hoverColor: _react.PropTypes.string, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = FontIcon; /***/ }), -/* 721 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54629,358 +58062,156 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = flexboxOld; -var _getPrefixedValue = __webpack_require__(40); +var _react = __webpack_require__(0); -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); +var _react2 = _interopRequireDefault(_react); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _pure = __webpack_require__(20); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var _pure2 = _interopRequireDefault(_pure); -var alternativeValues = { - 'space-around': 'justify', - 'space-between': 'justify', - 'flex-start': 'start', - 'flex-end': 'end', - 'wrap-reverse': 'multiple', - wrap: 'multiple', - flex: 'box', - 'inline-flex': 'inline-box' -}; +var _SvgIcon = __webpack_require__(21); -var alternativeProps = { - alignItems: 'WebkitBoxAlign', - justifyContent: 'WebkitBoxPack', - flexWrap: 'WebkitBoxLines' -}; +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); -var otherProps = ['alignContent', 'alignSelf', 'order', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection']; -var properties = Object.keys(alternativeProps).concat(otherProps); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function flexboxOld(_ref) { - var property = _ref.property; - var value = _ref.value; - var styles = _ref.styles; - var _ref$browserInfo = _ref.browserInfo; - var browser = _ref$browserInfo.browser; - var version = _ref$browserInfo.version; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; +var NavigationExpandLess = function NavigationExpandLess(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z' }) + ); +}; +NavigationExpandLess = (0, _pure2.default)(NavigationExpandLess); +NavigationExpandLess.displayName = 'NavigationExpandLess'; +NavigationExpandLess.muiName = 'SvgIcon'; - if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'firefox' && version < 22 || browser === 'chrome' && version < 21 || (browser === 'safari' || browser === 'ios_saf') && version <= 6.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { - if (!keepUnprefixed && !Array.isArray(styles[property])) { - delete styles[property]; - } - if (property === 'flexDirection' && typeof value === 'string') { - return { - WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', - WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' - }; - } - if (property === 'display' && alternativeValues[value]) { - return { - display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) - }; - } - if (alternativeProps[property]) { - return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); - } - } -} -module.exports = exports['default']; +exports.default = NavigationExpandLess; /***/ }), -/* 722 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = callOnce; - -var _warning = __webpack_require__(17); - -var _warning2 = _interopRequireDefault(_warning); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +exports.__esModule = true; -var CALLED_ONCE = 'muiPrepared'; +var _react = __webpack_require__(0); -function callOnce() { - if (false) { - return function (style) { - if (style[CALLED_ONCE]) { - process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: You cannot call prepareStyles() on the same style object more than once.') : void 0; - } - style[CALLED_ONCE] = true; - return style; - }; - } -} +var _createHelper = __webpack_require__(323); -/***/ }), -/* 723 */ -/***/ (function(module, exports, __webpack_require__) { +var _createHelper2 = _interopRequireDefault(_createHelper); -"use strict"; +var _createEagerFactory = __webpack_require__(726); +var _createEagerFactory2 = _interopRequireDefault(_createEagerFactory); -Object.defineProperty(exports, "__esModule", { - value: true -}); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _keys = __webpack_require__(79); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var _keys2 = _interopRequireDefault(_keys); +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -exports.default = rtl; +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var shouldUpdate = function shouldUpdate(test) { + return function (BaseComponent) { + var factory = (0, _createEagerFactory2.default)(BaseComponent); + return function (_Component) { + _inherits(_class, _Component); -var reTranslate = /((^|\s)translate(3d|X)?\()(\-?[\d]+)/; -var reSkew = /((^|\s)skew(x|y)?\()\s*(\-?[\d]+)(deg|rad|grad)(,\s*(\-?[\d]+)(deg|rad|grad))?/; + function _class() { + _classCallCheck(this, _class); -/** - * This function ensures that `style` supports both ltr and rtl directions by - * checking `styleConstants` in `muiTheme` and replacing attribute keys if - * necessary. - */ -function rtl(muiTheme) { - if (muiTheme.isRtl) { - return function (style) { - if (style.directionInvariant === true) { - return style; + return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } - var flippedAttributes = { - // Keys and their replacements. - right: 'left', - left: 'right', - marginRight: 'marginLeft', - marginLeft: 'marginRight', - paddingRight: 'paddingLeft', - paddingLeft: 'paddingRight', - borderRight: 'borderLeft', - borderLeft: 'borderRight' + _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return test(this.props, nextProps); }; - var newStyle = {}; - - (0, _keys2.default)(style).forEach(function (attribute) { - var value = style[attribute]; - var key = attribute; - - if (flippedAttributes.hasOwnProperty(attribute)) { - key = flippedAttributes[attribute]; - } - - switch (attribute) { - case 'float': - case 'textAlign': - if (value === 'right') { - value = 'left'; - } else if (value === 'left') { - value = 'right'; - } - break; - - case 'direction': - if (value === 'ltr') { - value = 'rtl'; - } else if (value === 'rtl') { - value = 'ltr'; - } - break; - - case 'transform': - if (!value) break; - var matches = void 0; - if (matches = value.match(reTranslate)) { - value = value.replace(matches[0], matches[1] + -parseFloat(matches[4])); - } - if (matches = value.match(reSkew)) { - value = value.replace(matches[0], matches[1] + -parseFloat(matches[4]) + matches[5] + matches[6] ? ', ' + (-parseFloat(matches[7]) + matches[8]) : ''); - } - break; - - case 'transformOrigin': - if (!value) break; - if (value.indexOf('right') > -1) { - value = value.replace('right', 'left'); - } else if (value.indexOf('left') > -1) { - value = value.replace('left', 'right'); - } - break; - } - - newStyle[key] = value; - }); - - return newStyle; - }; - } -} - -/***/ }), -/* 724 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(725); -module.exports = __webpack_require__(18).Object.keys; - - -/***/ }), -/* 725 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.14 Object.keys(O) -var toObject = __webpack_require__(84); -var $keys = __webpack_require__(64); - -__webpack_require__(294)('keys', function () { - return function keys(it) { - return $keys(toObject(it)); - }; -}); - - -/***/ }), -/* 726 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; -exports.default = compose; -function compose() { - for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { - funcs[_key] = arguments[_key]; - } - - if (funcs.length === 0) { - return function (arg) { - return arg; - }; - } + _class.prototype.render = function render() { + return factory(this.props); + }; - if (funcs.length === 1) { - return funcs[0]; - } + return _class; + }(_react.Component); + }; +}; - return funcs.reduce(function (a, b) { - return function () { - return a(b.apply(undefined, arguments)); - }; - }); -} +exports.default = (0, _createHelper2.default)(shouldUpdate, 'shouldUpdate'); /***/ }), -/* 727 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = AppDrawer; +exports.__esModule = true; -var _react = __webpack_require__(0); +var _createEagerElementUtil = __webpack_require__(727); -var _react2 = _interopRequireDefault(_react); +var _createEagerElementUtil2 = _interopRequireDefault(_createEagerElementUtil); -var _reactRouter = __webpack_require__(156); +var _isReferentiallyTransparentFunctionComponent = __webpack_require__(728); -var _List = __webpack_require__(728); +var _isReferentiallyTransparentFunctionComponent2 = _interopRequireDefault(_isReferentiallyTransparentFunctionComponent); -var _Drawer = __webpack_require__(750); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _Drawer2 = _interopRequireDefault(_Drawer); +var createFactory = function createFactory(type) { + var isReferentiallyTransparent = (0, _isReferentiallyTransparentFunctionComponent2.default)(type); + return function (p, c) { + return (0, _createEagerElementUtil2.default)(false, isReferentiallyTransparent, type, p, c); + }; +}; -var _Subheader = __webpack_require__(312); +exports.default = createFactory; -var _Subheader2 = _interopRequireDefault(_Subheader); +/***/ }), +/* 727 */ +/***/ (function(module, exports, __webpack_require__) { -var _code = __webpack_require__(756); +"use strict"; -var _code2 = _interopRequireDefault(_code); -var _shop = __webpack_require__(757); +exports.__esModule = true; -var _shop2 = _interopRequireDefault(_shop); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _Styles = __webpack_require__(80); +var _react = __webpack_require__(0); -var _Styles2 = _interopRequireDefault(_Styles); +var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var SelectableList = (0, _List.makeSelectable)(_List.List); - -function openUrlInNewTab(url) { - var win = window.open(url, '_blank'); - win.focus(); -} +var createEagerElementUtil = function createEagerElementUtil(hasKey, isReferentiallyTransparent, type, props, children) { + if (!hasKey && isReferentiallyTransparent) { + if (children) { + return type(_extends({}, props, { children: children })); + } + return type(props); + } -function AppDrawer(props) { - var location = props.location; + var Component = type; - var paths = location.pathname.split('/').filter(function (x) { - return !!x; - }); - var currentPage = paths[0]; - return _react2.default.createElement( - _Drawer2.default, - { open: true }, - _react2.default.createElement( - 'div', - { style: _Styles2.default.logo }, - 'Supreme Auto Checkout' - ), - _react2.default.createElement( - SelectableList, - { value: currentPage }, - _react2.default.createElement( - _Subheader2.default, - null, - 'Shops' - ), - _react2.default.createElement(_List.ListItem, { - value: 'supreme', - primaryText: 'Supreme', - containerElement: _react2.default.createElement(_reactRouter.Link, { to: '/supreme/' }), - leftIcon: _react2.default.createElement(_shop2.default, null) - }), - _react2.default.createElement( - _Subheader2.default, - null, - 'Other' - ), - _react2.default.createElement(_List.ListItem, { - value: 'about', - primaryText: 'Github', - onTouchTap: function onTouchTap() { - return openUrlInNewTab('https://github.com/val92130/Supreme-Auto-Checkout'); - }, - leftIcon: _react2.default.createElement(_code2.default, null) - }) - ) - ); -} + if (children) { + return _react2.default.createElement( + Component, + props, + children + ); + } -AppDrawer.propTypes = { - location: _react.PropTypes.shape({ - pathname: _react.PropTypes.string.isRequired - }) + return _react2.default.createElement(Component, props); }; +exports.default = createEagerElementUtil; + /***/ }), /* 728 */ /***/ (function(module, exports, __webpack_require__) { @@ -54988,32 +58219,36 @@ AppDrawer.propTypes = { "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = exports.makeSelectable = exports.ListItem = exports.List = undefined; +exports.__esModule = true; -var _List2 = __webpack_require__(195); +var _isClassComponent = __webpack_require__(729); -var _List3 = _interopRequireDefault(_List2); +var _isClassComponent2 = _interopRequireDefault(_isClassComponent); -var _ListItem2 = __webpack_require__(313); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _ListItem3 = _interopRequireDefault(_ListItem2); +var isReferentiallyTransparentFunctionComponent = function isReferentiallyTransparentFunctionComponent(Component) { + return Boolean(typeof Component === 'function' && !(0, _isClassComponent2.default)(Component) && !Component.defaultProps && !Component.contextTypes && ('production' === 'production' || !Component.propTypes)); +}; -var _makeSelectable2 = __webpack_require__(749); +exports.default = isReferentiallyTransparentFunctionComponent; -var _makeSelectable3 = _interopRequireDefault(_makeSelectable2); +/***/ }), +/* 729 */ +/***/ (function(module, exports, __webpack_require__) { -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +"use strict"; -exports.List = _List3.default; -exports.ListItem = _ListItem3.default; -exports.makeSelectable = _makeSelectable3.default; -exports.default = _List3.default; + +exports.__esModule = true; +var isClassComponent = function isClassComponent(Component) { + return Boolean(Component && Component.prototype && typeof Component.prototype.isReactComponent === 'object'); +}; + +exports.default = isClassComponent; /***/ }), -/* 729 */ +/* 730 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55031,429 +58266,249 @@ var _objectWithoutProperties2 = __webpack_require__(8); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - -var _react = __webpack_require__(0); +var _getPrototypeOf = __webpack_require__(3); -var _react2 = _interopRequireDefault(_react); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _classCallCheck2 = __webpack_require__(1); -var Subheader = function Subheader(props, context) { - var children = props.children, - inset = props.inset, - style = props.style, - other = (0, _objectWithoutProperties3.default)(props, ['children', 'inset', 'style']); - var _context$muiTheme = context.muiTheme, - prepareStyles = _context$muiTheme.prepareStyles, - subheader = _context$muiTheme.subheader; +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var _createClass2 = __webpack_require__(2); - var styles = { - root: { - boxSizing: 'border-box', - color: subheader.color, - fontSize: 14, - fontWeight: subheader.fontWeight, - lineHeight: '48px', - paddingLeft: inset ? 72 : 16, - width: '100%' - } - }; +var _createClass3 = _interopRequireDefault(_createClass2); - return _react2.default.createElement( - 'div', - (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), - children - ); -}; +var _possibleConstructorReturn2 = __webpack_require__(4); -Subheader.muiName = 'Subheader'; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - false ? Subheader.propTypes = { - /** - * Node that will be placed inside the `Subheader`. - */ - children: _react.PropTypes.node, - /** - * If true, the `Subheader` will be indented. - */ - inset: _react.PropTypes.bool, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object -} : void 0; +var _inherits2 = __webpack_require__(5); -Subheader.defaultProps = { - inset: false -}; +var _inherits3 = _interopRequireDefault(_inherits2); -Subheader.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; +var _simpleAssign = __webpack_require__(6); -exports.default = Subheader; +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -/***/ }), -/* 730 */ -/***/ (function(module, exports, __webpack_require__) { +var _react = __webpack_require__(0); -"use strict"; -/** - * Copyright 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ +var _react2 = _interopRequireDefault(_react); +var _transitions = __webpack_require__(10); +var _transitions2 = _interopRequireDefault(_transitions); -var React = __webpack_require__(0); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var REACT_ELEMENT_TYPE = - (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || - 0xeac7; +var SvgIcon = function (_Component) { + (0, _inherits3.default)(SvgIcon, _Component); -var emptyFunction = __webpack_require__(24); -var invariant = __webpack_require__(9); -var warning = __webpack_require__(12); + function SvgIcon() { + var _ref; -var SEPARATOR = '.'; -var SUBSEPARATOR = ':'; + var _temp, _this, _ret; -var didWarnAboutMaps = false; + (0, _classCallCheck3.default)(this, SvgIcon); -var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; -var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -function getIteratorFn(maybeIterable) { - var iteratorFn = - maybeIterable && - ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || - maybeIterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = SvgIcon.__proto__ || (0, _getPrototypeOf2.default)(SvgIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.handleMouseLeave = function (event) { + _this.setState({ hovered: false }); + _this.props.onMouseLeave(event); + }, _this.handleMouseEnter = function (event) { + _this.setState({ hovered: true }); + _this.props.onMouseEnter(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } -} -function escape(key) { - var escapeRegex = /[=:]/g; - var escaperLookup = { - '=': '=0', - ':': '=2' - }; - var escapedString = ('' + key).replace(escapeRegex, function(match) { - return escaperLookup[match]; - }); + (0, _createClass3.default)(SvgIcon, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + color = _props.color, + hoverColor = _props.hoverColor, + onMouseEnter = _props.onMouseEnter, + onMouseLeave = _props.onMouseLeave, + style = _props.style, + viewBox = _props.viewBox, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'color', 'hoverColor', 'onMouseEnter', 'onMouseLeave', 'style', 'viewBox']); + var _context$muiTheme = this.context.muiTheme, + svgIcon = _context$muiTheme.svgIcon, + prepareStyles = _context$muiTheme.prepareStyles; - return '$' + escapedString; -} -function getComponentKey(component, index) { - // Do some typechecking here since we call this blindly. We want to ensure - // that we don't block potential future ES APIs. - if (component && typeof component === 'object' && component.key != null) { - // Explicit key - return escape(component.key); - } - // Implicit key determined by the index in the set - return index.toString(36); -} + var offColor = color ? color : 'currentColor'; + var onColor = hoverColor ? hoverColor : offColor; -function traverseAllChildrenImpl( - children, - nameSoFar, - callback, - traverseContext -) { - var type = typeof children; + var mergedStyles = (0, _simpleAssign2.default)({ + display: 'inline-block', + color: svgIcon.color, + fill: this.state.hovered ? onColor : offColor, + height: 24, + width: 24, + userSelect: 'none', + transition: _transitions2.default.easeOut() + }, style); - if (type === 'undefined' || type === 'boolean') { - // All of the above are perceived as null. - children = null; - } + return _react2.default.createElement( + 'svg', + (0, _extends3.default)({}, other, { + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + style: prepareStyles(mergedStyles), + viewBox: viewBox + }), + children + ); + } + }]); + return SvgIcon; +}(_react.Component); - if ( - children === null || - type === 'string' || - type === 'number' || - // The following is inlined from ReactElement. This means we can optimize - // some checks. React Fiber also inlines this logic for similar purposes. - (type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) - ) { - callback( - traverseContext, - children, - // If it's the only child, treat the name as if it was wrapped in an array - // so that it's consistent if the number of children grows. - nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar - ); - return 1; - } +SvgIcon.muiName = 'SvgIcon'; +SvgIcon.defaultProps = { + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + viewBox: '0 0 24 24' +}; +SvgIcon.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? SvgIcon.propTypes = { + /** + * Elements passed into the SVG Icon. + */ + children: _react.PropTypes.node, + /** + * This is the fill color of the svg icon. + * If not specified, this component will default + * to muiTheme.palette.textColor. + */ + color: _react.PropTypes.string, + /** + * This is the icon color when the mouse hovers over the icon. + */ + hoverColor: _react.PropTypes.string, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Allows you to redefine what the coordinates + * without units mean inside an svg element. For example, + * if the SVG element is 500 (width) by 200 (height), and you + * pass viewBox="0 0 50 20", this means that the coordinates inside + * the svg will go from the top left corner (0,0) to bottom right (50,20) + * and each unit will be worth 10px. + */ + viewBox: _react.PropTypes.string +} : void 0; +exports.default = SvgIcon; - var child; - var nextName; - var subtreeCount = 0; // Count of children found in the current subtree. - var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; +/***/ }), +/* 731 */ +/***/ (function(module, exports, __webpack_require__) { - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - child = children[i]; - nextName = nextNamePrefix + getComponentKey(child, i); - subtreeCount += traverseAllChildrenImpl( - child, - nextName, - callback, - traverseContext - ); - } - } else { - var iteratorFn = getIteratorFn(children); - if (iteratorFn) { - if (false) { - // Warn about using Maps as children - if (iteratorFn === children.entries) { - warning( - didWarnAboutMaps, - 'Using Maps as children is unsupported and will likely yield ' + - 'unexpected results. Convert it to a sequence/iterable of keyed ' + - 'ReactElements instead.' - ); - didWarnAboutMaps = true; - } - } +"use strict"; - var iterator = iteratorFn.call(children); - var step; - var ii = 0; - while (!(step = iterator.next()).done) { - child = step.value; - nextName = nextNamePrefix + getComponentKey(child, ii++); - subtreeCount += traverseAllChildrenImpl( - child, - nextName, - callback, - traverseContext - ); - } - } else if (type === 'object') { - var addendum = ''; - if (false) { - addendum = - ' If you meant to render a collection of children, use an array ' + - 'instead or wrap the object using createFragment(object) from the ' + - 'React add-ons.'; - } - var childrenString = '' + children; - invariant( - false, - 'Objects are not valid as a React child (found: %s).%s', - childrenString === '[object Object]' - ? 'object with keys {' + Object.keys(children).join(', ') + '}' - : childrenString, - addendum - ); - } - } - return subtreeCount; -} +Object.defineProperty(exports, "__esModule", { + value: true +}); -function traverseAllChildren(children, callback, traverseContext) { - if (children == null) { - return 0; - } +var _react = __webpack_require__(0); - return traverseAllChildrenImpl(children, '', callback, traverseContext); -} +var _react2 = _interopRequireDefault(_react); -var userProvidedKeyEscapeRegex = /\/+/g; -function escapeUserProvidedKey(text) { - return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); -} +var _pure = __webpack_require__(20); -function cloneAndReplaceKey(oldElement, newKey) { - return React.cloneElement( - oldElement, - {key: newKey}, - oldElement.props !== undefined ? oldElement.props.children : undefined - ); -} +var _pure2 = _interopRequireDefault(_pure); -var DEFAULT_POOL_SIZE = 10; -var DEFAULT_POOLER = oneArgumentPooler; +var _SvgIcon = __webpack_require__(21); -var oneArgumentPooler = function(copyFieldsFrom) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, copyFieldsFrom); - return instance; - } else { - return new Klass(copyFieldsFrom); - } -}; +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); -var addPoolingTo = function addPoolingTo(CopyConstructor, pooler) { - // Casting as any so that flow ignores the actual implementation and trusts - // it to match the type we declared - var NewKlass = CopyConstructor; - NewKlass.instancePool = []; - NewKlass.getPooled = pooler || DEFAULT_POOLER; - if (!NewKlass.poolSize) { - NewKlass.poolSize = DEFAULT_POOL_SIZE; - } - NewKlass.release = standardReleaser; - return NewKlass; -}; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var standardReleaser = function standardReleaser(instance) { - var Klass = this; - invariant( - instance instanceof Klass, - 'Trying to release an instance into a pool of a different type.' +var NavigationExpandMore = function NavigationExpandMore(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z' }) ); - instance.destructor(); - if (Klass.instancePool.length < Klass.poolSize) { - Klass.instancePool.push(instance); - } }; +NavigationExpandMore = (0, _pure2.default)(NavigationExpandMore); +NavigationExpandMore.displayName = 'NavigationExpandMore'; +NavigationExpandMore.muiName = 'SvgIcon'; -var fourArgumentPooler = function fourArgumentPooler(a1, a2, a3, a4) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3, a4); - return instance; - } else { - return new Klass(a1, a2, a3, a4); - } -}; +exports.default = NavigationExpandMore; -function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { - this.result = mapResult; - this.keyPrefix = keyPrefix; - this.func = mapFunction; - this.context = mapContext; - this.count = 0; -} -MapBookKeeping.prototype.destructor = function() { - this.result = null; - this.keyPrefix = null; - this.func = null; - this.context = null; - this.count = 0; -}; -addPoolingTo(MapBookKeeping, fourArgumentPooler); +/***/ }), +/* 732 */ +/***/ (function(module, exports, __webpack_require__) { -function mapSingleChildIntoContext(bookKeeping, child, childKey) { - var result = bookKeeping.result; - var keyPrefix = bookKeeping.keyPrefix; - var func = bookKeeping.func; - var context = bookKeeping.context; +"use strict"; - var mappedChild = func.call(context, child, bookKeeping.count++); - if (Array.isArray(mappedChild)) { - mapIntoWithKeyPrefixInternal( - mappedChild, - result, - childKey, - emptyFunction.thatReturnsArgument - ); - } else if (mappedChild != null) { - if (React.isValidElement(mappedChild)) { - mappedChild = cloneAndReplaceKey( - mappedChild, - // Keep both the (mapped) and old keys if they differ, just as - // traverseAllChildren used to do for objects as children - keyPrefix + - (mappedChild.key && (!child || child.key !== mappedChild.key) - ? escapeUserProvidedKey(mappedChild.key) + '/' - : '') + - childKey - ); - } - result.push(mappedChild); - } -} -function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { - var escapedPrefix = ''; - if (prefix != null) { - escapedPrefix = escapeUserProvidedKey(prefix) + '/'; - } - var traverseContext = MapBookKeeping.getPooled( - array, - escapedPrefix, - func, - context - ); - traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); - MapBookKeeping.release(traverseContext); -} +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); -var numericPropertyRegex = /^\d+$/; +var _react2 = _interopRequireDefault(_react); -var warnedAboutNumeric = false; +var _List = __webpack_require__(202); -function createReactFragment(object) { - if (typeof object !== 'object' || !object || Array.isArray(object)) { - warning( - false, - 'React.addons.createFragment only accepts a single object. Got: %s', - object - ); - return object; - } - if (React.isValidElement(object)) { - warning( - false, - 'React.addons.createFragment does not accept a ReactElement ' + - 'without a wrapper object.' - ); - return object; - } +var _List2 = _interopRequireDefault(_List); - invariant( - object.nodeType !== 1, - 'React.addons.createFragment(...): Encountered an invalid child; DOM ' + - 'elements are not valid children of React components.' - ); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var result = []; +var NestedList = function NestedList(props) { + var children = props.children, + open = props.open, + nestedLevel = props.nestedLevel, + style = props.style; - for (var key in object) { - if (false) { - if (!warnedAboutNumeric && numericPropertyRegex.test(key)) { - warning( - false, - 'React.addons.createFragment(...): Child objects should have ' + - 'non-numeric keys so ordering is preserved.' - ); - warnedAboutNumeric = true; - } - } - mapIntoWithKeyPrefixInternal( - object[key], - result, - key, - emptyFunction.thatReturnsArgument - ); + + if (!open) { + return null; } - return result; -} + return _react2.default.createElement( + _List2.default, + { style: style }, + _react.Children.map(children, function (child) { + return (0, _react.isValidElement)(child) ? (0, _react.cloneElement)(child, { + nestedLevel: nestedLevel + 1 + }) : child; + }) + ); +}; -module.exports = createReactFragment; + false ? NestedList.propTypes = { + children: _react.PropTypes.node, + nestedLevel: _react.PropTypes.number.isRequired, + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = NestedList; /***/ }), -/* 731 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55462,6 +58517,7 @@ module.exports = createReactFragment; Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeSelectable = undefined; var _extends2 = __webpack_require__(7); @@ -55499,490 +58555,655 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactAddonsTransitionGroup = __webpack_require__(128); +var _colorManipulator = __webpack_require__(50); -var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _ScaleInChild = __webpack_require__(735); +var makeSelectable = exports.makeSelectable = function makeSelectable(MyComponent) { + var _class, _temp2; -var _ScaleInChild2 = _interopRequireDefault(_ScaleInChild); + return _temp2 = _class = function (_Component) { + (0, _inherits3.default)(_class, _Component); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function _class() { + var _ref; -var ScaleIn = function (_Component) { - (0, _inherits3.default)(ScaleIn, _Component); + var _temp, _this, _ret; - function ScaleIn() { - (0, _classCallCheck3.default)(this, ScaleIn); - return (0, _possibleConstructorReturn3.default)(this, (ScaleIn.__proto__ || (0, _getPrototypeOf2.default)(ScaleIn)).apply(this, arguments)); - } + (0, _classCallCheck3.default)(this, _class); - (0, _createClass3.default)(ScaleIn, [{ - key: 'render', - value: function render() { - var _props = this.props, - children = _props.children, - childStyle = _props.childStyle, - enterDelay = _props.enterDelay, - maxScale = _props.maxScale, - minScale = _props.minScale, - style = _props.style, - other = (0, _objectWithoutProperties3.default)(_props, ['children', 'childStyle', 'enterDelay', 'maxScale', 'minScale', 'style']); - var prepareStyles = this.context.muiTheme.prepareStyles; + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = _class.__proto__ || (0, _getPrototypeOf2.default)(_class)).call.apply(_ref, [this].concat(args))), _this), _this.hasSelectedDescendant = function (previousValue, child) { + if (_react2.default.isValidElement(child) && child.props.nestedItems && child.props.nestedItems.length > 0) { + return child.props.nestedItems.reduce(_this.hasSelectedDescendant, previousValue); + } + return previousValue || _this.isChildSelected(child, _this.props); + }, _this.handleItemTouchTap = function (event, item) { + var itemValue = item.props.value; + if (itemValue !== _this.props.value) { + if (_this.props.onChange) { + _this.props.onChange(event, itemValue); + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } - var mergedRootStyles = (0, _simpleAssign2.default)({}, { - position: 'relative', - overflow: 'hidden', - height: '100%' - }, style); + (0, _createClass3.default)(_class, [{ + key: 'extendChild', + value: function extendChild(child, styles, selectedItemStyle) { + var _this2 = this; + + if (child && child.type && child.type.muiName === 'ListItem') { + var selected = this.isChildSelected(child, this.props); + var selectedChildrenStyles = void 0; + if (selected) { + selectedChildrenStyles = (0, _simpleAssign2.default)({}, styles, selectedItemStyle); + } + + var mergedChildrenStyles = (0, _simpleAssign2.default)({}, child.props.style, selectedChildrenStyles); + + this.keyIndex += 1; + + return _react2.default.cloneElement(child, { + onTouchTap: function onTouchTap(event) { + _this2.handleItemTouchTap(event, child); + if (child.props.onTouchTap) { + child.props.onTouchTap(event); + } + }, + key: this.keyIndex, + style: mergedChildrenStyles, + nestedItems: child.props.nestedItems.map(function (child) { + return _this2.extendChild(child, styles, selectedItemStyle); + }), + initiallyOpen: this.isInitiallyOpen(child) + }); + } else { + return child; + } + } + }, { + key: 'isInitiallyOpen', + value: function isInitiallyOpen(child) { + if (child.props.initiallyOpen) { + return child.props.initiallyOpen; + } + return this.hasSelectedDescendant(false, child); + } + }, { + key: 'isChildSelected', + value: function isChildSelected(child, props) { + return props.value === child.props.value; + } + }, { + key: 'render', + value: function render() { + var _this3 = this; + + var _props = this.props, + children = _props.children, + selectedItemStyle = _props.selectedItemStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'selectedItemStyle']); + + + this.keyIndex = 0; + var styles = {}; + + if (!selectedItemStyle) { + var textColor = this.context.muiTheme.baseTheme.palette.textColor; + styles.backgroundColor = (0, _colorManipulator.fade)(textColor, 0.2); + } - var newChildren = _react2.default.Children.map(children, function (child) { return _react2.default.createElement( - _ScaleInChild2.default, - { - key: child.key, - enterDelay: enterDelay, - maxScale: maxScale, - minScale: minScale, - style: childStyle - }, - child + MyComponent, + (0, _extends3.default)({}, other, this.state), + _react.Children.map(children, function (child) { + return _this3.extendChild(child, styles, selectedItemStyle); + }) ); - }); + } + }]); + return _class; + }(_react.Component), _class.propTypes = { + children: _react.PropTypes.node, + onChange: _react.PropTypes.func, + selectedItemStyle: _react.PropTypes.object, + value: _react.PropTypes.any + }, _class.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired + }, _temp2; +}; - return _react2.default.createElement( - _reactAddonsTransitionGroup2.default, - (0, _extends3.default)({}, other, { - style: prepareStyles(mergedRootStyles), - component: 'div' - }), - newChildren - ); - } - }]); - return ScaleIn; -}(_react.Component); +exports.default = makeSelectable; -ScaleIn.defaultProps = { - enterDelay: 0 -}; -ScaleIn.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? ScaleIn.propTypes = { - childStyle: _react.PropTypes.object, - children: _react.PropTypes.node, - enterDelay: _react.PropTypes.number, - maxScale: _react.PropTypes.number, - minScale: _react.PropTypes.number, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object -} : void 0; -exports.default = ScaleIn; +/***/ }), +/* 734 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Drawer = __webpack_require__(735); + +var _Drawer2 = _interopRequireDefault(_Drawer); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Drawer2.default; /***/ }), -/* 732 */ +/* 735 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); -var _chainFunction = __webpack_require__(733); +var _simpleAssign = __webpack_require__(6); -var _chainFunction2 = _interopRequireDefault(_chainFunction); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _propTypes = __webpack_require__(14); +var _reactDom = __webpack_require__(16); -var _propTypes2 = _interopRequireDefault(_propTypes); +var _reactDom2 = _interopRequireDefault(_reactDom); -var _warning = __webpack_require__(17); +var _reactEventListener = __webpack_require__(40); -var _warning2 = _interopRequireDefault(_warning); +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -var _ChildMapping = __webpack_require__(734); +var _keycode = __webpack_require__(26); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _keycode2 = _interopRequireDefault(_keycode); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +var _autoPrefix = __webpack_require__(96); -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +var _transitions = __webpack_require__(10); -var propTypes = { - component: _propTypes2.default.any, - childFactory: _propTypes2.default.func, - children: _propTypes2.default.node -}; +var _transitions2 = _interopRequireDefault(_transitions); -var defaultProps = { - component: 'span', - childFactory: function childFactory(child) { - return child; - } -}; +var _Overlay = __webpack_require__(324); -var TransitionGroup = function (_React$Component) { - _inherits(TransitionGroup, _React$Component); +var _Overlay2 = _interopRequireDefault(_Overlay); - function TransitionGroup(props, context) { - _classCallCheck(this, TransitionGroup); +var _Paper = __webpack_require__(32); - var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); +var _Paper2 = _interopRequireDefault(_Paper); - _this.performAppear = function (key, component) { - _this.currentlyTransitioningKeys[key] = true; +var _propTypes = __webpack_require__(39); - if (component.componentWillAppear) { - component.componentWillAppear(_this._handleDoneAppearing.bind(_this, key, component)); - } else { - _this._handleDoneAppearing(key, component); - } - }; +var _propTypes2 = _interopRequireDefault(_propTypes); - _this._handleDoneAppearing = function (key, component) { - if (component.componentDidAppear) { - component.componentDidAppear(); - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - delete _this.currentlyTransitioningKeys[key]; +var openNavEventHandler = null; - var currentChildMapping = (0, _ChildMapping.getChildMapping)(_this.props.children); +var Drawer = function (_Component) { + (0, _inherits3.default)(Drawer, _Component); - if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { - // This was removed before it had fully appeared. Remove it. - _this.performLeave(key, component); + function Drawer() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Drawer); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Drawer.__proto__ || (0, _getPrototypeOf2.default)(Drawer)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapOverlay = function (event) { + event.preventDefault(); + _this.close('clickaway'); + }, _this.handleKeyUp = function (event) { + if (_this.state.open && !_this.props.docked && (0, _keycode2.default)(event) === 'esc') { + _this.close('escape'); } - }; + }, _this.onBodyTouchStart = function (event) { + var swipeAreaWidth = _this.props.swipeAreaWidth; - _this.performEnter = function (key, component) { - _this.currentlyTransitioningKeys[key] = true; + var touchStartX = event.touches[0].pageX; + var touchStartY = event.touches[0].pageY; - if (component.componentWillEnter) { - component.componentWillEnter(_this._handleDoneEntering.bind(_this, key, component)); - } else { - _this._handleDoneEntering(key, component); + // Open only if swiping from far left (or right) while closed + if (swipeAreaWidth !== null && !_this.state.open) { + if (_this.props.openSecondary) { + // If openSecondary is true calculate from the far right + if (touchStartX < document.body.offsetWidth - swipeAreaWidth) return; + } else { + // If openSecondary is false calculate from the far left + if (touchStartX > swipeAreaWidth) return; + } } - }; - _this._handleDoneEntering = function (key, component) { - if (component.componentDidEnter) { - component.componentDidEnter(); + if (!_this.state.open && (openNavEventHandler !== _this.onBodyTouchStart || _this.props.disableSwipeToOpen)) { + return; } - delete _this.currentlyTransitioningKeys[key]; + _this.maybeSwiping = true; + _this.touchStartX = touchStartX; + _this.touchStartY = touchStartY; - var currentChildMapping = (0, _ChildMapping.getChildMapping)(_this.props.children); + document.body.addEventListener('touchmove', _this.onBodyTouchMove); + document.body.addEventListener('touchend', _this.onBodyTouchEnd); + document.body.addEventListener('touchcancel', _this.onBodyTouchEnd); + }, _this.onBodyTouchMove = function (event) { + var currentX = event.touches[0].pageX; + var currentY = event.touches[0].pageY; - if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { - // This was removed before it had fully entered. Remove it. - _this.performLeave(key, component); + if (_this.state.swiping) { + event.preventDefault(); + _this.setPosition(_this.getTranslateX(currentX)); + } else if (_this.maybeSwiping) { + var dXAbs = Math.abs(currentX - _this.touchStartX); + var dYAbs = Math.abs(currentY - _this.touchStartY); + // If the user has moved his thumb ten pixels in either direction, + // we can safely make an assumption about whether he was intending + // to swipe or scroll. + var threshold = 10; + + if (dXAbs > threshold && dYAbs <= threshold) { + _this.swipeStartX = currentX; + _this.setState({ + swiping: _this.state.open ? 'closing' : 'opening' + }); + _this.setPosition(_this.getTranslateX(currentX)); + } else if (dXAbs <= threshold && dYAbs > threshold) { + _this.onBodyTouchEnd(); + } } - }; + }, _this.onBodyTouchEnd = function (event) { + if (_this.state.swiping) { + var currentX = event.changedTouches[0].pageX; + var translateRatio = _this.getTranslateX(currentX) / _this.getMaxTranslateX(); - _this.performLeave = function (key, component) { - _this.currentlyTransitioningKeys[key] = true; + _this.maybeSwiping = false; + var swiping = _this.state.swiping; + _this.setState({ + swiping: null + }); - if (component.componentWillLeave) { - component.componentWillLeave(_this._handleDoneLeaving.bind(_this, key, component)); + // We have to open or close after setting swiping to null, + // because only then CSS transition is enabled. + if (translateRatio > 0.5) { + if (swiping === 'opening') { + _this.setPosition(_this.getMaxTranslateX()); + } else { + _this.close('swipe'); + } + } else { + if (swiping === 'opening') { + _this.open('swipe'); + } else { + _this.setPosition(0); + } + } } else { - // Note that this is somewhat dangerous b/c it calls setState() - // again, effectively mutating the component before all the work - // is done. - _this._handleDoneLeaving(key, component); - } - }; - - _this._handleDoneLeaving = function (key, component) { - if (component.componentDidLeave) { - component.componentDidLeave(); + _this.maybeSwiping = false; } - delete _this.currentlyTransitioningKeys[key]; + document.body.removeEventListener('touchmove', _this.onBodyTouchMove); + document.body.removeEventListener('touchend', _this.onBodyTouchEnd); + document.body.removeEventListener('touchcancel', _this.onBodyTouchEnd); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } - var currentChildMapping = (0, _ChildMapping.getChildMapping)(_this.props.children); + (0, _createClass3.default)(Drawer, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.maybeSwiping = false; + this.touchStartX = null; + this.touchStartY = null; + this.swipeStartX = null; - if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) { - // This entered again before it fully left. Add it again. - _this.keysToEnter.push(key); - } else { - _this.setState(function (state) { - var newChildren = _extends({}, state.children); - delete newChildren[key]; - return { children: newChildren }; + this.setState({ + open: this.props.open !== null ? this.props.open : this.props.docked, + swiping: null + }); + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + this.enableSwipeHandling(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + // If controlled then the open prop takes precedence. + if (nextProps.open !== null) { + this.setState({ + open: nextProps.open + }); + // Otherwise, if docked is changed, change the open state for when uncontrolled. + } else if (this.props.docked !== nextProps.docked) { + this.setState({ + open: nextProps.docked }); } - }; - - _this.childRefs = Object.create(null); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.enableSwipeHandling(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.disableSwipeHandling(); + } + }, { + key: 'getStyles', + value: function getStyles() { + var muiTheme = this.context.muiTheme; + var theme = muiTheme.drawer; - _this.state = { - children: (0, _ChildMapping.getChildMapping)(props.children) - }; - return _this; - } + var x = this.getTranslateMultiplier() * (this.state.open ? 0 : this.getMaxTranslateX()); - TransitionGroup.prototype.componentWillMount = function componentWillMount() { - this.currentlyTransitioningKeys = {}; - this.keysToEnter = []; - this.keysToLeave = []; - }; + var styles = { + root: { + height: '100%', + width: this.props.width || theme.width, + position: 'fixed', + zIndex: muiTheme.zIndex.drawer, + left: 0, + top: 0, + transform: 'translate(' + x + 'px, 0)', + transition: !this.state.swiping && _transitions2.default.easeOut(null, 'transform', null), + backgroundColor: theme.color, + overflow: 'auto', + WebkitOverflowScrolling: 'touch' }, + overlay: { + zIndex: muiTheme.zIndex.drawerOverlay, + pointerEvents: this.state.open ? 'auto' : 'none' }, + rootWhenOpenRight: { + left: 'auto', + right: 0 + } + }; - TransitionGroup.prototype.componentDidMount = function componentDidMount() { - var initialChildMapping = this.state.children; - for (var key in initialChildMapping) { - if (initialChildMapping[key]) { - this.performAppear(key, this.childRefs[key]); - } + return styles; } - }; - - TransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { - var nextChildMapping = (0, _ChildMapping.getChildMapping)(nextProps.children); - var prevChildMapping = this.state.children; - - this.setState({ - children: (0, _ChildMapping.mergeChildMappings)(prevChildMapping, nextChildMapping) - }); - - for (var key in nextChildMapping) { - var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); - if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) { - this.keysToEnter.push(key); + }, { + key: 'shouldShow', + value: function shouldShow() { + return this.state.open || !!this.state.swiping; // component is swiping + } + }, { + key: 'close', + value: function close(reason) { + if (this.props.open === null) this.setState({ open: false }); + if (this.props.onRequestChange) this.props.onRequestChange(false, reason); + return this; + } + }, { + key: 'open', + value: function open(reason) { + if (this.props.open === null) this.setState({ open: true }); + if (this.props.onRequestChange) this.props.onRequestChange(true, reason); + return this; + } + }, { + key: 'getMaxTranslateX', + value: function getMaxTranslateX() { + var width = this.props.width || this.context.muiTheme.drawer.width; + return width + 10; + } + }, { + key: 'getTranslateMultiplier', + value: function getTranslateMultiplier() { + return this.props.openSecondary ? 1 : -1; + } + }, { + key: 'enableSwipeHandling', + value: function enableSwipeHandling() { + if (!this.props.docked) { + document.body.addEventListener('touchstart', this.onBodyTouchStart); + if (!openNavEventHandler) { + openNavEventHandler = this.onBodyTouchStart; + } + } else { + this.disableSwipeHandling(); } } - - for (var _key in prevChildMapping) { - var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(_key); - if (prevChildMapping[_key] && !hasNext && !this.currentlyTransitioningKeys[_key]) { - this.keysToLeave.push(_key); + }, { + key: 'disableSwipeHandling', + value: function disableSwipeHandling() { + document.body.removeEventListener('touchstart', this.onBodyTouchStart); + if (openNavEventHandler === this.onBodyTouchStart) { + openNavEventHandler = null; } } + }, { + key: 'setPosition', + value: function setPosition(translateX) { + var drawer = _reactDom2.default.findDOMNode(this.refs.clickAwayableElement); + var transformCSS = 'translate(' + this.getTranslateMultiplier() * translateX + 'px, 0)'; + this.refs.overlay.setOpacity(1 - translateX / this.getMaxTranslateX()); + _autoPrefix2.default.set(drawer.style, 'transform', transformCSS); + } + }, { + key: 'getTranslateX', + value: function getTranslateX(currentX) { + return Math.min(Math.max(this.state.swiping === 'closing' ? this.getTranslateMultiplier() * (currentX - this.swipeStartX) : this.getMaxTranslateX() - this.getTranslateMultiplier() * (this.swipeStartX - currentX), 0), this.getMaxTranslateX()); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + containerClassName = _props.containerClassName, + containerStyle = _props.containerStyle, + docked = _props.docked, + openSecondary = _props.openSecondary, + overlayClassName = _props.overlayClassName, + overlayStyle = _props.overlayStyle, + style = _props.style, + zDepth = _props.zDepth; - // If we want to someday check for reordering, we could do it here. - }; - - TransitionGroup.prototype.componentDidUpdate = function componentDidUpdate() { - var _this2 = this; - - var keysToEnter = this.keysToEnter; - this.keysToEnter = []; - keysToEnter.forEach(function (key) { - return _this2.performEnter(key, _this2.childRefs[key]); - }); - - var keysToLeave = this.keysToLeave; - this.keysToLeave = []; - keysToLeave.forEach(function (key) { - return _this2.performLeave(key, _this2.childRefs[key]); - }); - }; - - TransitionGroup.prototype.render = function render() { - var _this3 = this; - - // TODO: we could get rid of the need for the wrapper node - // by cloning a single child - var childrenToRender = []; - - var _loop = function _loop(key) { - var child = _this3.state.children[key]; - if (child) { - var isCallbackRef = typeof child.ref !== 'string'; - var factoryChild = _this3.props.childFactory(child); - var ref = function ref(r) { - _this3.childRefs[key] = r; - }; - - false ? (0, _warning2.default)(isCallbackRef, 'string refs are not supported on children of TransitionGroup and will be ignored. ' + 'Please use a callback ref instead: https://facebook.github.io/react/docs/refs-and-the-dom.html#the-ref-callback-attribute') : void 0; - // Always chaining the refs leads to problems when the childFactory - // wraps the child. The child ref callback gets called twice with the - // wrapper and the child. So we only need to chain the ref if the - // factoryChild is not different from child. - if (factoryChild === child && isCallbackRef) { - ref = (0, _chainFunction2.default)(child.ref, ref); - } + var styles = this.getStyles(); - // You may need to apply reactive updates to a child as it is leaving. - // The normal React way to do it won't work since the child will have - // already been removed. In case you need this behavior you can provide - // a childFactory function to wrap every child, even the ones that are - // leaving. - childrenToRender.push(_react2.default.cloneElement(factoryChild, { - key: key, - ref: ref - })); + var overlay = void 0; + if (!docked) { + overlay = _react2.default.createElement(_Overlay2.default, { + ref: 'overlay', + show: this.shouldShow(), + className: overlayClassName, + style: (0, _simpleAssign2.default)(styles.overlay, overlayStyle), + transitionEnabled: !this.state.swiping, + onTouchTap: this.handleTouchTapOverlay + }); } - }; - for (var key in this.state.children) { - _loop(key); + return _react2.default.createElement( + 'div', + { + className: className, + style: style + }, + _react2.default.createElement(_reactEventListener2.default, { target: 'window', onKeyUp: this.handleKeyUp }), + overlay, + _react2.default.createElement( + _Paper2.default, + { + ref: 'clickAwayableElement', + zDepth: zDepth, + rounded: false, + transitionEnabled: !this.state.swiping, + className: containerClassName, + style: (0, _simpleAssign2.default)(styles.root, openSecondary && styles.rootWhenOpenRight, containerStyle) + }, + children + ) + ); } + }]); + return Drawer; +}(_react.Component); - // Do not forward TransitionGroup props to primitive DOM nodes - var props = _extends({}, this.props); - delete props.transitionLeave; - delete props.transitionName; - delete props.transitionAppear; - delete props.transitionEnter; - delete props.childFactory; - delete props.transitionLeaveTimeout; - delete props.transitionEnterTimeout; - delete props.transitionAppearTimeout; - delete props.component; - - return _react2.default.createElement(this.props.component, props, childrenToRender); - }; - - return TransitionGroup; -}(_react2.default.Component); - -TransitionGroup.displayName = 'TransitionGroup'; - - -TransitionGroup.propTypes = false ? propTypes : {}; -TransitionGroup.defaultProps = defaultProps; +Drawer.defaultProps = { + disableSwipeToOpen: false, + docked: true, + open: null, + openSecondary: false, + swipeAreaWidth: 30, + width: null, + zDepth: 2 +}; +Drawer.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Drawer.propTypes = { + /** + * The contents of the `Drawer` + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The CSS class name of the container element. + */ + containerClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the container element. + */ + containerStyle: _react.PropTypes.object, + /** + * If true, swiping sideways when the `Drawer` is closed will not open it. + */ + disableSwipeToOpen: _react.PropTypes.bool, + /** + * If true, the `Drawer` will be docked. In this state, the overlay won't show and + * clicking on a menu item will not close the `Drawer`. + */ + docked: _react.PropTypes.bool, + /** + * Callback function fired when the `open` state of the `Drawer` is requested to be changed. + * + * @param {boolean} open If true, the `Drawer` was requested to be opened. + * @param {string} reason The reason for the open or close request. Possible values are + * 'swipe' for open requests; 'clickaway' (on overlay clicks), + * 'escape' (on escape key press), and 'swipe' for close requests. + */ + onRequestChange: _react.PropTypes.func, + /** + * If true, the `Drawer` is opened. Providing a value will turn the `Drawer` + * into a controlled component. + */ + open: _react.PropTypes.bool, + /** + * If true, the `Drawer` is positioned to open from the opposite side. + */ + openSecondary: _react.PropTypes.bool, + /** + * The CSS class name to add to the `Overlay` component that is rendered behind the `Drawer`. + */ + overlayClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the `Overlay` component that is rendered behind the `Drawer`. + */ + overlayStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The width of the left most (or right most) area in pixels where the `Drawer` can be + * swiped open from. Setting this to `null` spans that area to the entire page + * (**CAUTION!** Setting this property to `null` might cause issues with sliders and + * swipeable `Tabs`: use at your own risk). + */ + swipeAreaWidth: _react.PropTypes.number, + /** + * The width of the `Drawer` in pixels. Defaults to using the values from theme. + */ + width: _react.PropTypes.number, + /** + * The zDepth of the `Drawer`. + */ + zDepth: _propTypes2.default.zDepth -exports.default = TransitionGroup; -module.exports = exports['default']; +} : void 0; +exports.default = Drawer; /***/ }), -/* 733 */ -/***/ (function(module, exports) { - - -module.exports = function chain(){ - var len = arguments.length - var args = []; - - for (var i = 0; i < len; i++) - args[i] = arguments[i] - - args = args.filter(function(fn){ return fn != null }) - - if (args.length === 0) return undefined - if (args.length === 1) return args[0] - - return args.reduce(function(current, next){ - return function chainedFunction() { - current.apply(this, arguments); - next.apply(this, arguments); - }; - }) -} +/* 736 */ +/***/ (function(module, exports, __webpack_require__) { +module.exports = __webpack_require__(737); /***/ }), -/* 734 */ +/* 737 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - - -exports.__esModule = true; -exports.getChildMapping = getChildMapping; -exports.mergeChildMappings = mergeChildMappings; - -var _react = __webpack_require__(0); - /** - * Given `this.props.children`, return an object mapping key to child. + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. * - * @param {*} children `this.props.children` - * @return {object} Mapping of key to child - */ -function getChildMapping(children) { - if (!children) { - return children; - } - var result = {}; - _react.Children.map(children, function (child) { - return child; - }).forEach(function (child) { - result[child.key] = child; - }); - return result; -} - -/** - * When you're adding or removing children some may be added or removed in the - * same render pass. We want to show *both* since we want to simultaneously - * animate elements in and out. This function takes a previous set of keys - * and a new set of keys and merges them with its best guess of the correct - * ordering. In the future we may expose some of the utilities in - * ReactMultiChild to make this easy, but for now React itself does not - * directly have this concept of the union of prevChildren and nextChildren - * so we implement it here. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @param {object} prev prev children as returned from - * `ReactTransitionChildMapping.getChildMapping()`. - * @param {object} next next children as returned from - * `ReactTransitionChildMapping.getChildMapping()`. - * @return {object} a key set that contains all keys in `prev` and all keys - * in `next` in a reasonable order. */ -function mergeChildMappings(prev, next) { - prev = prev || {}; - next = next || {}; - - function getValueForKey(key) { - if (next.hasOwnProperty(key)) { - return next[key]; - } - - return prev[key]; - } - // For each key of `next`, the list of keys to insert before that key in - // the combined list - var nextKeysPending = {}; - var pendingKeys = []; - for (var prevKey in prev) { - if (next.hasOwnProperty(prevKey)) { - if (pendingKeys.length) { - nextKeysPending[prevKey] = pendingKeys; - pendingKeys = []; - } - } else { - pendingKeys.push(prevKey); - } - } - - var i = void 0; - var childMapping = {}; - for (var nextKey in next) { - if (nextKeysPending.hasOwnProperty(nextKey)) { - for (i = 0; i < nextKeysPending[nextKey].length; i++) { - var pendingNextKey = nextKeysPending[nextKey][i]; - childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); - } - } - childMapping[nextKey] = getValueForKey(nextKey); - } - // Finally, add the keys which didn't appear before any key in `next` - for (i = 0; i < pendingKeys.length; i++) { - childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); - } +var shallowEqual = __webpack_require__(90); - return childMapping; +/** + * Does a shallow comparison for props and state. + * See ReactComponentWithPureRenderMixin + * See also https://facebook.github.io/react/docs/shallow-compare.html + */ +function shallowCompare(instance, nextProps, nextState) { + return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState); } +module.exports = shallowCompare; + /***/ }), -/* 735 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55991,170 +59212,77 @@ function mergeChildMappings(prev, next) { Object.defineProperty(exports, "__esModule", { value: true }); +exports.passiveOption = exports.detachEvent = exports.attachEvent = exports.removeEventListener = exports.addEventListener = exports.canUseDOM = undefined; -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - -var _getPrototypeOf = __webpack_require__(3); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _defineProperty = __webpack_require__(739); -var _classCallCheck2 = __webpack_require__(1); +var _defineProperty2 = _interopRequireDefault(_defineProperty); -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _createClass2 = __webpack_require__(2); +// Inspired by https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/ExecutionEnvironment.js +var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); -var _createClass3 = _interopRequireDefault(_createClass2); +var addEventListener = exports.addEventListener = canUseDOM && 'addEventListener' in window; +var removeEventListener = exports.removeEventListener = canUseDOM && 'removeEventListener' in window; -var _possibleConstructorReturn2 = __webpack_require__(4); +// IE8+ Support +var attachEvent = exports.attachEvent = canUseDOM && 'attachEvent' in window; +var detachEvent = exports.detachEvent = canUseDOM && 'detachEvent' in window; -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); +// Passive options +// Inspired by https://github.com/Modernizr/Modernizr/blob/master/feature-detects/dom/passiveeventlisteners.js +var passiveOption = exports.passiveOption = function () { + var cache = null; -var _inherits2 = __webpack_require__(5); + return function () { + if (cache !== null) { + return cache; + } -var _inherits3 = _interopRequireDefault(_inherits2); + var supportsPassiveOption = false; -var _simpleAssign = __webpack_require__(6); + try { + window.addEventListener('test', null, (0, _defineProperty2.default)({}, 'passive', { + get: function get() { + supportsPassiveOption = true; + } + })); + } catch (e) {} // eslint-disable-line no-empty -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + cache = supportsPassiveOption; -var _react = __webpack_require__(0); + return supportsPassiveOption; + }(); +}(); -var _react2 = _interopRequireDefault(_react); +/***/ }), +/* 739 */ +/***/ (function(module, exports, __webpack_require__) { -var _reactDom = __webpack_require__(19); +"use strict"; -var _reactDom2 = _interopRequireDefault(_reactDom); -var _autoPrefix = __webpack_require__(94); +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _autoPrefix2 = _interopRequireDefault(_autoPrefix); +var _defineProperty = __webpack_require__(196); -var _transitions = __webpack_require__(10); +var _defineProperty2 = _interopRequireDefault(_defineProperty); -var _transitions2 = _interopRequireDefault(_transitions); +exports.default = defineProperty; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var ScaleInChild = function (_Component) { - (0, _inherits3.default)(ScaleInChild, _Component); - - function ScaleInChild() { - (0, _classCallCheck3.default)(this, ScaleInChild); - return (0, _possibleConstructorReturn3.default)(this, (ScaleInChild.__proto__ || (0, _getPrototypeOf2.default)(ScaleInChild)).apply(this, arguments)); - } - - (0, _createClass3.default)(ScaleInChild, [{ - key: 'componentWillUnmount', - value: function componentWillUnmount() { - clearTimeout(this.enterTimer); - clearTimeout(this.leaveTimer); - } - }, { - key: 'componentWillAppear', - value: function componentWillAppear(callback) { - this.initializeAnimation(callback); - } - }, { - key: 'componentWillEnter', - value: function componentWillEnter(callback) { - this.initializeAnimation(callback); - } - }, { - key: 'componentDidAppear', - value: function componentDidAppear() { - this.animate(); - } - }, { - key: 'componentDidEnter', - value: function componentDidEnter() { - this.animate(); - } - }, { - key: 'componentWillLeave', - value: function componentWillLeave(callback) { - var style = _reactDom2.default.findDOMNode(this).style; - - style.opacity = '0'; - _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.minScale + ')'); - - this.leaveTimer = setTimeout(callback, 450); - } - }, { - key: 'animate', - value: function animate() { - var style = _reactDom2.default.findDOMNode(this).style; - - style.opacity = '1'; - _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.maxScale + ')'); - } - }, { - key: 'initializeAnimation', - value: function initializeAnimation(callback) { - var style = _reactDom2.default.findDOMNode(this).style; - - style.opacity = '0'; - _autoPrefix2.default.set(style, 'transform', 'scale(0)'); - - this.enterTimer = setTimeout(callback, this.props.enterDelay); - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - children = _props.children, - enterDelay = _props.enterDelay, - maxScale = _props.maxScale, - minScale = _props.minScale, - style = _props.style, - other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'maxScale', 'minScale', 'style']); - var prepareStyles = this.context.muiTheme.prepareStyles; - - - var mergedRootStyles = (0, _simpleAssign2.default)({}, { - position: 'absolute', - height: '100%', - width: '100%', - top: 0, - left: 0, - transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) - }, style); - - return _react2.default.createElement( - 'div', - (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }), - children - ); - } - }]); - return ScaleInChild; -}(_react.Component); +// weak -ScaleInChild.defaultProps = { - enterDelay: 0, - maxScale: 1, - minScale: 0 -}; -ScaleInChild.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? ScaleInChild.propTypes = { - children: _react.PropTypes.node, - enterDelay: _react.PropTypes.number, - maxScale: _react.PropTypes.number, - minScale: _react.PropTypes.number, - style: _react.PropTypes.object -} : void 0; -exports.default = ScaleInChild; +function defineProperty(o, p, attr) { + return (0, _defineProperty2.default)(o, p, attr); +} /***/ }), -/* 736 */ +/* 740 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56164,14 +59292,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -56186,149 +59306,109 @@ var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(4); -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(5); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var _reactDom = __webpack_require__(19); +var _inherits2 = __webpack_require__(5); -var _reactDom2 = _interopRequireDefault(_reactDom); +var _inherits3 = _interopRequireDefault(_inherits2); -var _shallowEqual = __webpack_require__(58); +var _react = __webpack_require__(0); -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _autoPrefix = __webpack_require__(94); +var originalBodyOverflow = null; +var lockingCounter = 0; -var _autoPrefix2 = _interopRequireDefault(_autoPrefix); +var AutoLockScrolling = function (_Component) { + (0, _inherits3.default)(AutoLockScrolling, _Component); -var _transitions = __webpack_require__(10); + function AutoLockScrolling() { + var _ref; -var _transitions2 = _interopRequireDefault(_transitions); + var _temp, _this, _ret; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + (0, _classCallCheck3.default)(this, AutoLockScrolling); -var CircleRipple = function (_Component) { - (0, _inherits3.default)(CircleRipple, _Component); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - function CircleRipple() { - (0, _classCallCheck3.default)(this, CircleRipple); - return (0, _possibleConstructorReturn3.default)(this, (CircleRipple.__proto__ || (0, _getPrototypeOf2.default)(CircleRipple)).apply(this, arguments)); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoLockScrolling.__proto__ || (0, _getPrototypeOf2.default)(AutoLockScrolling)).call.apply(_ref, [this].concat(args))), _this), _this.locked = false, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(CircleRipple, [{ - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps) { - return !(0, _shallowEqual2.default)(this.props, nextProps); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - clearTimeout(this.enterTimer); - clearTimeout(this.leaveTimer); - } - }, { - key: 'componentWillAppear', - value: function componentWillAppear(callback) { - this.initializeAnimation(callback); - } - }, { - key: 'componentWillEnter', - value: function componentWillEnter(callback) { - this.initializeAnimation(callback); - } - }, { - key: 'componentDidAppear', - value: function componentDidAppear() { - this.animate(); + (0, _createClass3.default)(AutoLockScrolling, [{ + key: 'componentDidMount', + value: function componentDidMount() { + if (this.props.lock === true) { + this.preventScrolling(); + } } }, { - key: 'componentDidEnter', - value: function componentDidEnter() { - this.animate(); + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.lock !== nextProps.lock) { + if (nextProps.lock) { + this.preventScrolling(); + } else { + this.allowScrolling(); + } + } } }, { - key: 'componentWillLeave', - value: function componentWillLeave(callback) { - var style = _reactDom2.default.findDOMNode(this).style; - style.opacity = 0; - // If the animation is aborted, remove from the DOM immediately - var removeAfter = this.props.aborted ? 0 : 2000; - this.enterTimer = setTimeout(callback, removeAfter); + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.allowScrolling(); } + + // force to only lock/unlock once + }, { - key: 'animate', - value: function animate() { - var style = _reactDom2.default.findDOMNode(this).style; - var transitionValue = _transitions2.default.easeOut('2s', 'opacity') + ', ' + _transitions2.default.easeOut('1s', 'transform'); - _autoPrefix2.default.set(style, 'transition', transitionValue); - _autoPrefix2.default.set(style, 'transform', 'scale(1)'); + key: 'preventScrolling', + value: function preventScrolling() { + if (this.locked === true) { + return; + } + + lockingCounter = lockingCounter + 1; + this.locked = true; + + // only lock the first time the component is mounted. + if (lockingCounter === 1) { + var body = document.getElementsByTagName('body')[0]; + originalBodyOverflow = body.style.overflow; + body.style.overflow = 'hidden'; + } } }, { - key: 'initializeAnimation', - value: function initializeAnimation(callback) { - var style = _reactDom2.default.findDOMNode(this).style; - style.opacity = this.props.opacity; - _autoPrefix2.default.set(style, 'transform', 'scale(0)'); - this.leaveTimer = setTimeout(callback, 0); + key: 'allowScrolling', + value: function allowScrolling() { + if (this.locked === true) { + lockingCounter = lockingCounter - 1; + this.locked = false; + } + + if (lockingCounter === 0 && originalBodyOverflow !== null) { + var body = document.getElementsByTagName('body')[0]; + body.style.overflow = originalBodyOverflow || ''; + originalBodyOverflow = null; + } } }, { key: 'render', value: function render() { - var _props = this.props, - aborted = _props.aborted, - color = _props.color, - opacity = _props.opacity, - style = _props.style, - touchGenerated = _props.touchGenerated, - other = (0, _objectWithoutProperties3.default)(_props, ['aborted', 'color', 'opacity', 'style', 'touchGenerated']); - var prepareStyles = this.context.muiTheme.prepareStyles; - - - var mergedStyles = (0, _simpleAssign2.default)({ - position: 'absolute', - top: 0, - left: 0, - height: '100%', - width: '100%', - borderRadius: '50%', - backgroundColor: color - }, style); - - return _react2.default.createElement('div', (0, _extends3.default)({}, other, { style: prepareStyles(mergedStyles) })); + return null; } }]); - return CircleRipple; + return AutoLockScrolling; }(_react.Component); -CircleRipple.defaultProps = { - opacity: 0.1, - aborted: false -}; -CircleRipple.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? CircleRipple.propTypes = { - aborted: _react.PropTypes.bool, - color: _react.PropTypes.string, - opacity: _react.PropTypes.number, - style: _react.PropTypes.object, - touchGenerated: _react.PropTypes.bool + false ? AutoLockScrolling.propTypes = { + lock: _react.PropTypes.bool.isRequired } : void 0; -exports.default = CircleRipple; +exports.default = AutoLockScrolling; /***/ }), -/* 737 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56374,341 +59454,151 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(10); - -var _transitions2 = _interopRequireDefault(_transitions); - -var _propTypes = __webpack_require__(41); +var _propTypes = __webpack_require__(39); var _propTypes2 = _interopRequireDefault(_propTypes); -var _EnhancedButton = __webpack_require__(59); - -var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); - -var _FontIcon = __webpack_require__(317); - -var _FontIcon2 = _interopRequireDefault(_FontIcon); - -var _Tooltip = __webpack_require__(739); - -var _Tooltip2 = _interopRequireDefault(_Tooltip); +var _transitions = __webpack_require__(10); -var _childUtils = __webpack_require__(127); +var _transitions2 = _interopRequireDefault(_transitions); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function getStyles(props, context) { - var baseTheme = context.muiTheme.baseTheme; + var rounded = props.rounded, + circle = props.circle, + transitionEnabled = props.transitionEnabled, + zDepth = props.zDepth; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + paper = _context$muiTheme.paper; return { root: { + color: paper.color, + backgroundColor: paper.backgroundColor, + transition: transitionEnabled && _transitions2.default.easeOut(), boxSizing: 'border-box', - overflow: 'visible', - transition: _transitions2.default.easeOut(), - padding: baseTheme.spacing.iconSize / 2, - width: baseTheme.spacing.iconSize * 2, - height: baseTheme.spacing.iconSize * 2, - fontSize: 0 - }, - tooltip: { - boxSizing: 'border-box' - }, - disabled: { - color: baseTheme.palette.disabledColor, - fill: baseTheme.palette.disabledColor, - cursor: 'not-allowed' + fontFamily: baseTheme.fontFamily, + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + boxShadow: paper.zDepthShadows[zDepth - 1], // No shadow for 0 depth papers + borderRadius: circle ? '50%' : rounded ? '2px' : '0px' } }; } -var IconButton = function (_Component) { - (0, _inherits3.default)(IconButton, _Component); - - function IconButton() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, IconButton); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = IconButton.__proto__ || (0, _getPrototypeOf2.default)(IconButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - hovered: false, - isKeyboardFocused: false, - // Not to be confonded with the touch property. - // This state is to determined if it's a mobile device. - touch: false, - tooltipShown: false - }, _this.handleBlur = function (event) { - _this.hideTooltip(); - if (_this.props.onBlur) { - _this.props.onBlur(event); - } - }, _this.handleFocus = function (event) { - _this.showTooltip(); - if (_this.props.onFocus) { - _this.props.onFocus(event); - } - }, _this.handleMouseLeave = function (event) { - if (!_this.button.isKeyboardFocused()) { - _this.hideTooltip(); - } - _this.setState({ hovered: false }); - if (_this.props.onMouseLeave) { - _this.props.onMouseLeave(event); - } - }, _this.handleMouseOut = function (event) { - if (_this.props.disabled) _this.hideTooltip(); - if (_this.props.onMouseOut) _this.props.onMouseOut(event); - }, _this.handleMouseEnter = function (event) { - _this.showTooltip(); - - // Cancel hover styles for touch devices - if (!_this.state.touch) { - _this.setState({ hovered: true }); - } - if (_this.props.onMouseEnter) { - _this.props.onMouseEnter(event); - } - }, _this.handleTouchStart = function (event) { - _this.setState({ touch: true }); - - if (_this.props.onTouchStart) { - _this.props.onTouchStart(event); - } - }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { - var _this$props = _this.props, - disabled = _this$props.disabled, - onFocus = _this$props.onFocus, - onBlur = _this$props.onBlur, - onKeyboardFocus = _this$props.onKeyboardFocus; - - if (isKeyboardFocused && !disabled) { - _this.showTooltip(); - if (onFocus) { - onFocus(event); - } - } else { - _this.hideTooltip(); - if (onBlur) { - onBlur(event); - } - } +var Paper = function (_Component) { + (0, _inherits3.default)(Paper, _Component); - _this.setState({ isKeyboardFocused: isKeyboardFocused }); - if (onKeyboardFocus) { - onKeyboardFocus(event, isKeyboardFocused); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + function Paper() { + (0, _classCallCheck3.default)(this, Paper); + return (0, _possibleConstructorReturn3.default)(this, (Paper.__proto__ || (0, _getPrototypeOf2.default)(Paper)).apply(this, arguments)); } - (0, _createClass3.default)(IconButton, [{ - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (nextProps.disabled) { - this.setState({ hovered: false }); - } - } - }, { - key: 'setKeyboardFocus', - value: function setKeyboardFocus() { - this.button.setKeyboardFocus(); - } - }, { - key: 'showTooltip', - value: function showTooltip() { - if (this.props.tooltip) { - this.setState({ tooltipShown: true }); - } - } - }, { - key: 'hideTooltip', - value: function hideTooltip() { - if (this.props.tooltip) this.setState({ tooltipShown: false }); - } - }, { + (0, _createClass3.default)(Paper, [{ key: 'render', value: function render() { - var _this2 = this; - var _props = this.props, - disabled = _props.disabled, - hoveredStyle = _props.hoveredStyle, - disableTouchRipple = _props.disableTouchRipple, children = _props.children, - iconClassName = _props.iconClassName, + circle = _props.circle, + rounded = _props.rounded, style = _props.style, - tooltip = _props.tooltip, - tooltipPositionProp = _props.tooltipPosition, - tooltipStyles = _props.tooltipStyles, - touch = _props.touch, - iconStyle = _props.iconStyle, - other = (0, _objectWithoutProperties3.default)(_props, ['disabled', 'hoveredStyle', 'disableTouchRipple', 'children', 'iconClassName', 'style', 'tooltip', 'tooltipPosition', 'tooltipStyles', 'touch', 'iconStyle']); - - var fonticon = void 0; + transitionEnabled = _props.transitionEnabled, + zDepth = _props.zDepth, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'circle', 'rounded', 'style', 'transitionEnabled', 'zDepth']); + var prepareStyles = this.context.muiTheme.prepareStyles; var styles = getStyles(this.props, this.context); - var tooltipPosition = tooltipPositionProp.split('-'); - - var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled; - - var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style, hovered ? hoveredStyle : {}); - - var tooltipElement = tooltip ? _react2.default.createElement(_Tooltip2.default, { - label: tooltip, - show: this.state.tooltipShown, - touch: touch, - style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyles), - verticalPosition: tooltipPosition[0], - horizontalPosition: tooltipPosition[1] - }) : null; - - if (iconClassName) { - var iconHoverColor = iconStyle.iconHoverColor, - iconStyleFontIcon = (0, _objectWithoutProperties3.default)(iconStyle, ['iconHoverColor']); - - - fonticon = _react2.default.createElement( - _FontIcon2.default, - { - className: iconClassName, - hoverColor: disabled ? null : iconHoverColor, - style: (0, _simpleAssign2.default)({}, disabled && styles.disabled, iconStyleFontIcon), - color: this.context.muiTheme.baseTheme.palette.textColor - }, - children - ); - } - - var childrenStyle = disabled ? (0, _simpleAssign2.default)({}, iconStyle, styles.disabled) : iconStyle; return _react2.default.createElement( - _EnhancedButton2.default, - (0, _extends3.default)({ - ref: function ref(_ref2) { - return _this2.button = _ref2; - } - }, other, { - centerRipple: true, - disabled: disabled, - onTouchStart: this.handleTouchStart, - style: mergedRootStyles, - disableTouchRipple: disableTouchRipple, - onBlur: this.handleBlur, - onFocus: this.handleFocus, - onMouseLeave: this.handleMouseLeave, - onMouseEnter: this.handleMouseEnter, - onMouseOut: this.handleMouseOut, - onKeyboardFocus: this.handleKeyboardFocus - }), - tooltipElement, - fonticon, - (0, _childUtils.extendChildren)(children, { - style: childrenStyle - }) + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + children ); } }]); - return IconButton; + return Paper; }(_react.Component); -IconButton.muiName = 'IconButton'; -IconButton.defaultProps = { - disabled: false, - disableTouchRipple: false, - iconStyle: {}, - tooltipPosition: 'bottom-center', - touch: false +Paper.defaultProps = { + circle: false, + rounded: true, + transitionEnabled: true, + zDepth: 1 }; -IconButton.contextTypes = { +Paper.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? IconButton.propTypes = { + false ? Paper.propTypes = { /** - * Can be used to pass a `FontIcon` element as the icon for the button. + * Children passed into the paper element. */ children: _react.PropTypes.node, /** - * The CSS class name of the root element. - */ - className: _react.PropTypes.string, - /** - * If true, the element's ripple effect will be disabled. - */ - disableTouchRipple: _react.PropTypes.bool, - /** - * If true, the element will be disabled. - */ - disabled: _react.PropTypes.bool, - /** - * Override the inline-styles of the root element when the component is hovered. - */ - hoveredStyle: _react.PropTypes.object, - /** - * The URL to link to when the button is clicked. - */ - href: _react.PropTypes.string, - /** - * The CSS class name of the icon. Used for setting the icon with a stylesheet. - */ - iconClassName: _react.PropTypes.string, - /** - * Override the inline-styles of the icon element. - * Note: you can specify iconHoverColor as a String inside this object. + * Set to true to generate a circlular paper container. */ - iconStyle: _react.PropTypes.object, - /** @ignore */ - onBlur: _react.PropTypes.func, - /** @ignore */ - onFocus: _react.PropTypes.func, + circle: _react.PropTypes.bool, /** - * Callback function fired when the element is focused or blurred by the keyboard. - * - * @param {object} event `focus` or `blur` event targeting the element. - * @param {boolean} keyboardFocused Indicates whether the element is focused. + * By default, the paper container will have a border radius. + * Set this to false to generate a container with sharp corners. */ - onKeyboardFocus: _react.PropTypes.func, - /** @ignore */ - onMouseEnter: _react.PropTypes.func, - /** @ignore */ - onMouseLeave: _react.PropTypes.func, - /** @ignore */ - onMouseOut: _react.PropTypes.func, - /** @ignore */ - onTouchStart: _react.PropTypes.func, + rounded: _react.PropTypes.bool, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, /** - * The text to supply to the element's tooltip. - */ - tooltip: _react.PropTypes.node, - /** - * The vertical and horizontal positions, respectively, of the element's tooltip. - * Possible values are: "bottom-center", "top-center", "bottom-right", "top-right", - * "bottom-left", and "top-left". - */ - tooltipPosition: _propTypes2.default.cornersAndCenter, - /** - * Override the inline-styles of the tooltip element. + * Set to false to disable CSS transitions for the paper element. */ - tooltipStyles: _react.PropTypes.object, + transitionEnabled: _react.PropTypes.bool, /** - * If true, increase the tooltip element's size. Useful for increasing tooltip - * readability on mobile devices. + * This number represents the zDepth of the paper shadow. */ - touch: _react.PropTypes.bool + zDepth: _propTypes2.default.zDepth } : void 0; -exports.default = IconButton; +exports.default = Paper; + +/***/ }), +/* 742 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(20); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(21); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ActionCode = function ActionCode(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z' }) + ); +}; +ActionCode = (0, _pure2.default)(ActionCode); +ActionCode.displayName = 'ActionCode'; +ActionCode.muiName = 'SvgIcon'; + +exports.default = ActionCode; /***/ }), -/* 738 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56718,157 +59608,276 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(7); +var _react = __webpack_require__(0); -var _extends3 = _interopRequireDefault(_extends2); +var _react2 = _interopRequireDefault(_react); -var _objectWithoutProperties2 = __webpack_require__(8); +var _pure = __webpack_require__(20); -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); +var _pure2 = _interopRequireDefault(_pure); -var _getPrototypeOf = __webpack_require__(3); +var _SvgIcon = __webpack_require__(21); -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); -var _classCallCheck2 = __webpack_require__(1); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var ActionShop = function ActionShop(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M16 6V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H2v13c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6h-6zm-6-2h4v2h-4V4zM9 18V9l7.5 4L9 18z' }) + ); +}; +ActionShop = (0, _pure2.default)(ActionShop); +ActionShop.displayName = 'ActionShop'; +ActionShop.muiName = 'SvgIcon'; -var _createClass2 = __webpack_require__(2); +exports.default = ActionShop; -var _createClass3 = _interopRequireDefault(_createClass2); +/***/ }), +/* 744 */ +/***/ (function(module, exports, __webpack_require__) { -var _possibleConstructorReturn2 = __webpack_require__(4); +"use strict"; -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var _inherits2 = __webpack_require__(5); +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _inherits3 = _interopRequireDefault(_inherits2); +var _react = __webpack_require__(0); -var _simpleAssign = __webpack_require__(6); +var _react2 = _interopRequireDefault(_react); -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var _pure = __webpack_require__(20); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(21); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ActionAccountCircle = function ActionAccountCircle(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z' }) + ); +}; +ActionAccountCircle = (0, _pure2.default)(ActionAccountCircle); +ActionAccountCircle.displayName = 'ActionAccountCircle'; +ActionAccountCircle.muiName = 'SvgIcon'; + +exports.default = ActionAccountCircle; + +/***/ }), +/* 745 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(10); +var _pure = __webpack_require__(20); -var _transitions2 = _interopRequireDefault(_transitions); +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(21); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props, context, state) { - var color = props.color, - hoverColor = props.hoverColor; - var baseTheme = context.muiTheme.baseTheme; +var AlertError = function AlertError(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z' }) + ); +}; +AlertError = (0, _pure2.default)(AlertError); +AlertError.displayName = 'AlertError'; +AlertError.muiName = 'SvgIcon'; - var offColor = color || baseTheme.palette.textColor; - var onColor = hoverColor || offColor; +exports.default = AlertError; - return { - root: { - color: state.hovered ? onColor : offColor, - position: 'relative', - fontSize: baseTheme.spacing.iconSize, - display: 'inline-block', - userSelect: 'none', - transition: _transitions2.default.easeOut() - } - }; -} +/***/ }), +/* 746 */ +/***/ (function(module, exports, __webpack_require__) { -var FontIcon = function (_Component) { - (0, _inherits3.default)(FontIcon, _Component); +"use strict"; - function FontIcon() { - var _ref; - var _temp, _this, _ret; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zIndex = exports.typography = exports.transitions = exports.spacing = exports.muiThemeable = exports.getMuiTheme = exports.LightRawTheme = exports.lightBaseTheme = exports.DarkRawTheme = exports.darkBaseTheme = exports.colors = exports.MuiThemeProvider = undefined; - (0, _classCallCheck3.default)(this, FontIcon); +var _MuiThemeProvider2 = __webpack_require__(305); - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +var _MuiThemeProvider3 = _interopRequireDefault(_MuiThemeProvider2); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FontIcon.__proto__ || (0, _getPrototypeOf2.default)(FontIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - hovered: false - }, _this.handleMouseLeave = function (event) { - // hover is needed only when a hoverColor is defined - if (_this.props.hoverColor !== undefined) { - _this.setState({ hovered: false }); - } - if (_this.props.onMouseLeave) { - _this.props.onMouseLeave(event); - } - }, _this.handleMouseEnter = function (event) { - // hover is needed only when a hoverColor is defined - if (_this.props.hoverColor !== undefined) { - _this.setState({ hovered: true }); - } - if (_this.props.onMouseEnter) { - _this.props.onMouseEnter(event); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } +var _colors2 = __webpack_require__(31); - (0, _createClass3.default)(FontIcon, [{ - key: 'render', - value: function render() { - var _props = this.props, - hoverColor = _props.hoverColor, - onMouseLeave = _props.onMouseLeave, - onMouseEnter = _props.onMouseEnter, - style = _props.style, - other = (0, _objectWithoutProperties3.default)(_props, ['hoverColor', 'onMouseLeave', 'onMouseEnter', 'style']); - var prepareStyles = this.context.muiTheme.prepareStyles; +var _colors = _interopRequireWildcard(_colors2); - var styles = getStyles(this.props, this.context, this.state); +var _darkBaseTheme2 = __webpack_require__(747); - return _react2.default.createElement('span', (0, _extends3.default)({}, other, { - onMouseLeave: this.handleMouseLeave, - onMouseEnter: this.handleMouseEnter, - style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) - })); - } - }]); - return FontIcon; -}(_react.Component); +var _darkBaseTheme3 = _interopRequireDefault(_darkBaseTheme2); -FontIcon.muiName = 'FontIcon'; -FontIcon.defaultProps = { - onMouseEnter: function onMouseEnter() {}, - onMouseLeave: function onMouseLeave() {} -}; -FontIcon.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired +var _lightBaseTheme2 = __webpack_require__(310); + +var _lightBaseTheme3 = _interopRequireDefault(_lightBaseTheme2); + +var _getMuiTheme2 = __webpack_require__(129); + +var _getMuiTheme3 = _interopRequireDefault(_getMuiTheme2); + +var _muiThemeable2 = __webpack_require__(748); + +var _muiThemeable3 = _interopRequireDefault(_muiThemeable2); + +var _spacing2 = __webpack_require__(199); + +var _spacing3 = _interopRequireDefault(_spacing2); + +var _transitions2 = __webpack_require__(10); + +var _transitions3 = _interopRequireDefault(_transitions2); + +var _typography2 = __webpack_require__(315); + +var _typography3 = _interopRequireDefault(_typography2); + +var _zIndex2 = __webpack_require__(311); + +var _zIndex3 = _interopRequireDefault(_zIndex2); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.MuiThemeProvider = _MuiThemeProvider3.default; +exports.colors = _colors; +exports.darkBaseTheme = _darkBaseTheme3.default; +exports.DarkRawTheme = _darkBaseTheme3.default; +exports.lightBaseTheme = _lightBaseTheme3.default; +exports.LightRawTheme = _lightBaseTheme3.default; +exports.getMuiTheme = _getMuiTheme3.default; +exports.muiThemeable = _muiThemeable3.default; +exports.spacing = _spacing3.default; +exports.transitions = _transitions3.default; +exports.typography = _typography3.default; +exports.zIndex = _zIndex3.default; + +/***/ }), +/* 747 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _colors = __webpack_require__(31); + +var _colorManipulator = __webpack_require__(50); + +var _spacing = __webpack_require__(199); + +var _spacing2 = _interopRequireDefault(_spacing); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = { + spacing: _spacing2.default, + fontFamily: 'Roboto, sans-serif', + palette: { + primary1Color: _colors.cyan700, + primary2Color: _colors.cyan700, + primary3Color: _colors.grey600, + accent1Color: _colors.pinkA200, + accent2Color: _colors.pinkA400, + accent3Color: _colors.pinkA100, + textColor: _colors.fullWhite, + secondaryTextColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.7), + alternateTextColor: '#303030', + canvasColor: '#303030', + borderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), + disabledColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), + pickerHeaderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12), + clockCircleColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12) + } }; - false ? FontIcon.propTypes = { - /** - * This is the font color of the font icon. If not specified, - * this component will default to muiTheme.palette.textColor. - */ - color: _react.PropTypes.string, - /** - * This is the icon color when the mouse hovers over the icon. - */ - hoverColor: _react.PropTypes.string, - /** @ignore */ - onMouseEnter: _react.PropTypes.func, - /** @ignore */ - onMouseLeave: _react.PropTypes.func, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object -} : void 0; -exports.default = FontIcon; /***/ }), -/* 739 */ +/* 748 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +exports.default = muiThemeable; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _getMuiTheme = __webpack_require__(129); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DEFAULT_THEME = void 0; + +function getDefaultTheme() { + if (!DEFAULT_THEME) { + DEFAULT_THEME = (0, _getMuiTheme2.default)(); + } + return DEFAULT_THEME; +} + +function muiThemeable() { + return function (Component) { + var MuiComponent = function MuiComponent(props, context) { + var _context$muiTheme = context.muiTheme, + muiTheme = _context$muiTheme === undefined ? getDefaultTheme() : _context$muiTheme; + + + return _react2.default.createElement(Component, (0, _extends3.default)({ muiTheme: muiTheme }, props)); + }; + + MuiComponent.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired + }; + + return MuiComponent; + }; +} + +/***/ }), +/* 749 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56914,190 +59923,178 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(10); +var _EnhancedButton = __webpack_require__(51); -var _transitions2 = _interopRequireDefault(_transitions); +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props, context, state) { - var verticalPosition = props.verticalPosition; - var horizontalPosition = props.horizontalPosition; - var touchMarginOffset = props.touch ? 10 : 0; - var touchOffsetTop = props.touch ? -20 : -10; - var offset = verticalPosition === 'bottom' ? 14 + touchMarginOffset : -14 - touchMarginOffset; - - var _context$muiTheme = context.muiTheme, - baseTheme = _context$muiTheme.baseTheme, - zIndex = _context$muiTheme.zIndex, - tooltip = _context$muiTheme.tooltip; +function getStyles(props, context) { + var tabs = context.muiTheme.tabs; - var styles = { + return { root: { - position: 'absolute', - fontFamily: baseTheme.fontFamily, - fontSize: '10px', - lineHeight: '22px', - padding: '0 8px', - zIndex: zIndex.tooltip, - color: tooltip.color, - overflow: 'hidden', - top: -10000, - borderRadius: 2, - userSelect: 'none', - opacity: 0, - right: horizontalPosition === 'left' ? 12 : null, - left: horizontalPosition === 'center' ? (state.offsetWidth - 48) / 2 * -1 : null, - transition: _transitions2.default.easeOut('0ms', 'top', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') - }, - label: { - position: 'relative', - whiteSpace: 'nowrap' - }, - ripple: { - position: 'absolute', - left: horizontalPosition === 'center' ? '50%' : horizontalPosition === 'left' ? '100%' : '0%', - top: verticalPosition === 'bottom' ? 0 : '100%', - transform: 'translate(-50%, -50%)', - borderRadius: '50%', - backgroundColor: 'transparent', - transition: _transitions2.default.easeOut('0ms', 'width', '450ms') + ', ' + _transitions2.default.easeOut('0ms', 'height', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') - }, - rootWhenShown: { - top: verticalPosition === 'top' ? touchOffsetTop : 36, - opacity: 0.9, - transform: 'translate(0px, ' + offset + 'px)', - transition: _transitions2.default.easeOut('0ms', 'top', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') - }, - rootWhenTouched: { - fontSize: '14px', - lineHeight: '32px', - padding: '0 16px' + color: props.selected ? tabs.selectedTextColor : tabs.textColor, + fontWeight: 500, + fontSize: 14, + width: props.width, + textTransform: 'uppercase', + padding: 0 }, - rippleWhenShown: { - backgroundColor: tooltip.rippleBackgroundColor, - transition: _transitions2.default.easeOut('450ms', 'width', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'height', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') + button: { + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + justifyContent: 'center', + height: props.label && props.icon ? 72 : 48 } }; - - return styles; } -var Tooltip = function (_Component) { - (0, _inherits3.default)(Tooltip, _Component); +var Tab = function (_Component) { + (0, _inherits3.default)(Tab, _Component); - function Tooltip() { + function Tab() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, Tooltip); + (0, _classCallCheck3.default)(this, Tab); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tooltip.__proto__ || (0, _getPrototypeOf2.default)(Tooltip)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - offsetWidth: null + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tab.__proto__ || (0, _getPrototypeOf2.default)(Tab)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(_this.props.value, event, _this); + } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(Tooltip, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.setRippleSize(); - this.setTooltipPosition(); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps() { - this.setTooltipPosition(); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate() { - this.setRippleSize(); - } - }, { - key: 'setRippleSize', - value: function setRippleSize() { - var ripple = this.refs.ripple; - var tooltip = this.refs.tooltip; - var tooltipWidth = parseInt(tooltip.offsetWidth, 10) / (this.props.horizontalPosition === 'center' ? 2 : 1); - var tooltipHeight = parseInt(tooltip.offsetHeight, 10); - - var rippleDiameter = Math.ceil(Math.sqrt(Math.pow(tooltipHeight, 2) + Math.pow(tooltipWidth, 2)) * 2); - if (this.props.show) { - ripple.style.height = rippleDiameter + 'px'; - ripple.style.width = rippleDiameter + 'px'; - } else { - ripple.style.width = '0px'; - ripple.style.height = '0px'; - } - } - }, { - key: 'setTooltipPosition', - value: function setTooltipPosition() { - this.setState({ offsetWidth: this.refs.tooltip.offsetWidth }); - } - }, { + (0, _createClass3.default)(Tab, [{ key: 'render', value: function render() { var _props = this.props, - horizontalPosition = _props.horizontalPosition, + icon = _props.icon, + index = _props.index, + onActive = _props.onActive, + onTouchTap = _props.onTouchTap, + selected = _props.selected, label = _props.label, - show = _props.show, - touch = _props.touch, - verticalPosition = _props.verticalPosition, - other = (0, _objectWithoutProperties3.default)(_props, ['horizontalPosition', 'label', 'show', 'touch', 'verticalPosition']); - var prepareStyles = this.context.muiTheme.prepareStyles; + buttonStyle = _props.buttonStyle, + style = _props.style, + value = _props.value, + width = _props.width, + other = (0, _objectWithoutProperties3.default)(_props, ['icon', 'index', 'onActive', 'onTouchTap', 'selected', 'label', 'buttonStyle', 'style', 'value', 'width']); - var styles = getStyles(this.props, this.context, this.state); + + var styles = getStyles(this.props, this.context); + + var iconElement = void 0; + if (icon && _react2.default.isValidElement(icon)) { + var iconProps = { + style: { + fontSize: 24, + color: styles.root.color, + marginBottom: label ? 5 : 0 + } + }; + // If it's svg icon set color via props + if (icon.type.muiName !== 'FontIcon') { + iconProps.color = styles.root.color; + } + iconElement = _react2.default.cloneElement(icon, iconProps); + } + + var rippleOpacity = 0.3; + var rippleColor = this.context.muiTheme.tabs.selectedTextColor; return _react2.default.createElement( - 'div', + _EnhancedButton2.default, (0, _extends3.default)({}, other, { - ref: 'tooltip', - style: prepareStyles((0, _simpleAssign2.default)(styles.root, this.props.show && styles.rootWhenShown, this.props.touch && styles.rootWhenTouched, this.props.style)) - }), - _react2.default.createElement('div', { - ref: 'ripple', - style: prepareStyles((0, _simpleAssign2.default)(styles.ripple, this.props.show && styles.rippleWhenShown)) + style: (0, _simpleAssign2.default)(styles.root, style), + focusRippleColor: rippleColor, + touchRippleColor: rippleColor, + focusRippleOpacity: rippleOpacity, + touchRippleOpacity: rippleOpacity, + onTouchTap: this.handleTouchTap }), _react2.default.createElement( - 'span', - { style: prepareStyles(styles.label) }, + 'div', + { style: (0, _simpleAssign2.default)(styles.button, buttonStyle) }, + iconElement, label ) ); } }]); - return Tooltip; + return Tab; }(_react.Component); -Tooltip.contextTypes = { +Tab.muiName = 'Tab'; +Tab.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? Tooltip.propTypes = { + false ? Tab.propTypes = { + /** + * Override the inline-styles of the button element. + */ + buttonStyle: _react.PropTypes.object, /** * The css class name of the root element. */ className: _react.PropTypes.string, - horizontalPosition: _react.PropTypes.oneOf(['left', 'right', 'center']), - label: _react.PropTypes.node.isRequired, - show: _react.PropTypes.bool, + /** + * Sets the icon of the tab, you can pass `FontIcon` or `SvgIcon` elements. + */ + icon: _react.PropTypes.node, + /** + * @ignore + */ + index: _react.PropTypes.any, + /** + * Sets the text value of the tab item to the string specified. + */ + label: _react.PropTypes.node, + /** + * Fired when the active tab changes by touch or tap. + * Use this event to specify any functionality when an active tab changes. + * For example - we are using this to route to home when the third tab becomes active. + * This function will always recieve the active tab as it\'s first argument. + */ + onActive: _react.PropTypes.func, + /** + * @ignore + * This property is overriden by the Tabs component. + */ + onTouchTap: _react.PropTypes.func, + /** + * @ignore + * Defines if the current tab is selected or not. + * The Tabs component is responsible for setting this property. + */ + selected: _react.PropTypes.bool, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, - touch: _react.PropTypes.bool, - verticalPosition: _react.PropTypes.oneOf(['top', 'bottom']) + /** + * If value prop passed to Tabs component, this value prop is also required. + * It assigns a value to the tab so that it can be selected by the Tabs. + */ + value: _react.PropTypes.any, + /** + * @ignore + * This property is overriden by the Tabs component. + */ + width: _react.PropTypes.string } : void 0; -exports.default = Tooltip; +exports.default = Tab; /***/ }), -/* 740 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57111,188 +60108,725 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(25); +var _reduxForm = __webpack_require__(82); -var _pure2 = _interopRequireDefault(_pure); +var _reactRedux = __webpack_require__(19); -var _SvgIcon = __webpack_require__(26); +var _MenuItem = __webpack_require__(97); -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); +var _MenuItem2 = _interopRequireDefault(_MenuItem); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _RaisedButton = __webpack_require__(65); -var NavigationExpandLess = function NavigationExpandLess(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z' }) - ); -}; -NavigationExpandLess = (0, _pure2.default)(NavigationExpandLess); -NavigationExpandLess.displayName = 'NavigationExpandLess'; -NavigationExpandLess.muiName = 'SvgIcon'; +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); -exports.default = NavigationExpandLess; +var _reduxFormMaterialUi = __webpack_require__(98); -/***/ }), -/* 741 */ -/***/ (function(module, exports, __webpack_require__) { +var _Styles = __webpack_require__(52); -"use strict"; +var _Styles2 = _interopRequireDefault(_Styles); +var _Utils = __webpack_require__(210); -exports.__esModule = true; +var Utils = _interopRequireWildcard(_Utils); -var _react = __webpack_require__(0); +var _FormValidators = __webpack_require__(102); -var _createHelper = __webpack_require__(318); +var Validators = _interopRequireWildcard(_FormValidators); -var _createHelper2 = _interopRequireDefault(_createHelper); +var _Menus = __webpack_require__(84); -var _createEagerFactory = __webpack_require__(742); +var menus = _interopRequireWildcard(_Menus); -var _createEagerFactory2 = _interopRequireDefault(_createEagerFactory); +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var shouldUpdate = function shouldUpdate(test) { - return function (BaseComponent) { - var factory = (0, _createEagerFactory2.default)(BaseComponent); - return function (_Component) { - _inherits(_class, _Component); +function getStatesForCountry(country) { + switch (country) { + case 'USA': + return Utils.usaRegions; + case 'JAPAN': + return Utils.japanRegions; + case 'CANADA': + return Utils.canadaRegions; + default: + return []; + } +} - function _class() { - _classCallCheck(this, _class); +var Billing = function Billing(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting, + country = props.country; - return _possibleConstructorReturn(this, _Component.apply(this, arguments)); - } + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'biling-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_name', + validate: Validators.fullName, + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Firstname and Lastname', + hintText: 'Firstname and Lastname', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_email', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Email', + hintText: 'Email', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.email] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_tel', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Phone number', + hintText: 'Phone number', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'bo', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Address', + hintText: 'Address', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_city', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'City', + hintText: 'City', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'order_billing_country', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Country', + hintText: 'Country', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.countries.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); + }) + ) + ), + ['JAPAN', 'USA', 'CANADA'].indexOf(country) !== -1 && _react2.default.createElement( + _reduxForm.Field, + { + name: 'order_billing_state', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'State', + hintText: 'State', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + getStatesForCountry(country).map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_zip', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Zip', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_type', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Credit card type', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + (country === 'JAPAN' ? Utils.japanCreditCards : Utils.creditCards).map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { value: x.value, primaryText: x.text, key: x.value }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'cnb', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Credit Card Number', + hintText: 'Credit Card Number', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_month', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Expiry month', + hintText: 'Expiry month', + validate: [Validators.required], + style: _Styles2.default.fields.text + }, + Array.apply(null, new Array(12)).map(function (x, i) { + var month = ++i < 10 ? '0' + i : i; + return _react2.default.createElement(_MenuItem2.default, { key: month, value: month, primaryText: month }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_year', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Expiry year', + hintText: 'Expiry year', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Array.apply(null, new Array(5)).map(function (x, i) { + var year = new Date().getFullYear() + i; + return _react2.default.createElement(_MenuItem2.default, { key: year, value: year, primaryText: year }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'vval', + component: _reduxFormMaterialUi.TextField, + hintText: 'CCV', + floatingLabelText: 'CCV', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; - _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { - return test(this.props, nextProps); - }; +var BillingForm = (0, _reduxForm.reduxForm)({ + form: 'billing' +})(Billing); - _class.prototype.render = function render() { - return factory(this.props); - }; +Billing.propTypes = { + shop: _react.PropTypes.string.isRequired +}; +var selector = (0, _reduxForm.formValueSelector)('billing'); - return _class; - }(_react.Component); +function mapStateToProps(state, ownProps) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + initialValues: (settings[ownProps.shop] || {})[menus.MENU_BILLING] || {}, + country: selector(state, 'order_billing_country') }; -}; +} -exports.default = (0, _createHelper2.default)(shouldUpdate, 'shouldUpdate'); +exports.default = (0, _reactRedux.connect)(mapStateToProps)(BillingForm); /***/ }), -/* 742 */ +/* 751 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; -exports.__esModule = true; +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; -var _createEagerElementUtil = __webpack_require__(743); +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; -var _createEagerElementUtil2 = _interopRequireDefault(_createEagerElementUtil); +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; -var _isReferentiallyTransparentFunctionComponent = __webpack_require__(744); +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; -var _isReferentiallyTransparentFunctionComponent2 = _interopRequireDefault(_isReferentiallyTransparentFunctionComponent); +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; -var createFactory = function createFactory(type) { - var isReferentiallyTransparent = (0, _isReferentiallyTransparentFunctionComponent2.default)(type); - return function (p, c) { - return (0, _createEagerElementUtil2.default)(false, isReferentiallyTransparent, type, p, c); - }; +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); }; -exports.default = createFactory; +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; -/***/ }), -/* 743 */ -/***/ (function(module, exports, __webpack_require__) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } -"use strict"; + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } -exports.__esModule = true; + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; -var _react = __webpack_require__(0); + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } -var _react2 = _interopRequireDefault(_react); + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } -var createEagerElementUtil = function createEagerElementUtil(hasKey, isReferentiallyTransparent, type, props, children) { - if (!hasKey && isReferentiallyTransparent) { - if (children) { - return type(_extends({}, props, { children: children })); + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); } - return type(props); + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); } - var Component = type; + function trailingEdge(time) { + timerId = undefined; - if (children) { - return _react2.default.createElement( - Component, - props, - children - ); + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; } - return _react2.default.createElement(Component, props); -}; - -exports.default = createEagerElementUtil; - -/***/ }), -/* 744 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } -exports.__esModule = true; + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); -var _isClassComponent = __webpack_require__(745); + lastArgs = arguments; + lastThis = this; + lastCallTime = time; -var _isClassComponent2 = _interopRequireDefault(_isClassComponent); + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; -var isReferentiallyTransparentFunctionComponent = function isReferentiallyTransparentFunctionComponent(Component) { - return Boolean(typeof Component === 'function' && !(0, _isClassComponent2.default)(Component) && !Component.defaultProps && !Component.contextTypes && ('production' === 'production' || !Component.propTypes)); -}; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); +} -exports.default = isReferentiallyTransparentFunctionComponent; +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} -/***/ }), -/* 745 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} -"use strict"; +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} -exports.__esModule = true; -var isClassComponent = function isClassComponent(Component) { - return Boolean(Component && Component.prototype && typeof Component.prototype.isReactComponent === 'object'); -}; +module.exports = throttle; -exports.default = isClassComponent; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46))) /***/ }), -/* 746 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57302,14 +60836,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -57334,132 +60860,180 @@ var _simpleAssign = __webpack_require__(6); var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(10); +var _propTypes = __webpack_require__(39); -var _transitions2 = _interopRequireDefault(_transitions); +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _Paper = __webpack_require__(32); + +var _Paper2 = _interopRequireDefault(_Paper); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var SvgIcon = function (_Component) { - (0, _inherits3.default)(SvgIcon, _Component); +function getStyles(props, context, state) { + var targetOrigin = props.targetOrigin; + var open = state.open; + var muiTheme = context.muiTheme; - function SvgIcon() { + var horizontal = targetOrigin.horizontal.replace('middle', 'vertical'); + + return { + root: { + position: 'fixed', + zIndex: muiTheme.zIndex.popover, + opacity: open ? 1 : 0, + transform: open ? 'scale(1, 1)' : 'scale(0, 0)', + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity']), + maxHeight: '100%' + }, + horizontal: { + maxHeight: '100%', + overflowY: 'auto', + transform: open ? 'scaleX(1)' : 'scaleX(0)', + opacity: open ? 1 : 0, + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity']) + }, + vertical: { + opacity: open ? 1 : 0, + transform: open ? 'scaleY(1)' : 'scaleY(0)', + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('500ms', ['transform', 'opacity']) + } + }; +} + +var PopoverAnimationDefault = function (_Component) { + (0, _inherits3.default)(PopoverAnimationDefault, _Component); + + function PopoverAnimationDefault() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, SvgIcon); + (0, _classCallCheck3.default)(this, PopoverAnimationDefault); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = SvgIcon.__proto__ || (0, _getPrototypeOf2.default)(SvgIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - hovered: false - }, _this.handleMouseLeave = function (event) { - _this.setState({ hovered: false }); - _this.props.onMouseLeave(event); - }, _this.handleMouseEnter = function (event) { - _this.setState({ hovered: true }); - _this.props.onMouseEnter(event); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PopoverAnimationDefault.__proto__ || (0, _getPrototypeOf2.default)(PopoverAnimationDefault)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(SvgIcon, [{ + (0, _createClass3.default)(PopoverAnimationDefault, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setState({ open: true }); // eslint-disable-line react/no-did-mount-set-state + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + open: nextProps.open + }); + } + }, { key: 'render', value: function render() { var _props = this.props, - children = _props.children, - color = _props.color, - hoverColor = _props.hoverColor, - onMouseEnter = _props.onMouseEnter, - onMouseLeave = _props.onMouseLeave, + className = _props.className, style = _props.style, - viewBox = _props.viewBox, - other = (0, _objectWithoutProperties3.default)(_props, ['children', 'color', 'hoverColor', 'onMouseEnter', 'onMouseLeave', 'style', 'viewBox']); - var _context$muiTheme = this.context.muiTheme, - svgIcon = _context$muiTheme.svgIcon, - prepareStyles = _context$muiTheme.prepareStyles; - - - var offColor = color ? color : 'currentColor'; - var onColor = hoverColor ? hoverColor : offColor; + zDepth = _props.zDepth; + var prepareStyles = this.context.muiTheme.prepareStyles; - var mergedStyles = (0, _simpleAssign2.default)({ - display: 'inline-block', - color: svgIcon.color, - fill: this.state.hovered ? onColor : offColor, - height: 24, - width: 24, - userSelect: 'none', - transition: _transitions2.default.easeOut() - }, style); + var styles = getStyles(this.props, this.context, this.state); return _react2.default.createElement( - 'svg', - (0, _extends3.default)({}, other, { - onMouseEnter: this.handleMouseEnter, - onMouseLeave: this.handleMouseLeave, - style: prepareStyles(mergedStyles), - viewBox: viewBox - }), - children + _Paper2.default, + { + style: (0, _simpleAssign2.default)(styles.root, style), + zDepth: zDepth, + className: className + }, + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.horizontal) }, + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.vertical) }, + this.props.children + ) + ) ); } }]); - return SvgIcon; + return PopoverAnimationDefault; }(_react.Component); -SvgIcon.muiName = 'SvgIcon'; -SvgIcon.defaultProps = { - onMouseEnter: function onMouseEnter() {}, - onMouseLeave: function onMouseLeave() {}, - viewBox: '0 0 24 24' +PopoverAnimationDefault.defaultProps = { + style: {}, + zDepth: 1 }; -SvgIcon.contextTypes = { +PopoverAnimationDefault.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? SvgIcon.propTypes = { - /** - * Elements passed into the SVG Icon. - */ + false ? PopoverAnimationDefault.propTypes = { children: _react.PropTypes.node, /** - * This is the fill color of the svg icon. - * If not specified, this component will default - * to muiTheme.palette.textColor. - */ - color: _react.PropTypes.string, - /** - * This is the icon color when the mouse hovers over the icon. + * The css class name of the root element. */ - hoverColor: _react.PropTypes.string, - /** @ignore */ - onMouseEnter: _react.PropTypes.func, - /** @ignore */ - onMouseLeave: _react.PropTypes.func, + className: _react.PropTypes.string, + open: _react.PropTypes.bool.isRequired, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, - /** - * Allows you to redefine what the coordinates - * without units mean inside an svg element. For example, - * if the SVG element is 500 (width) by 200 (height), and you - * pass viewBox="0 0 50 20", this means that the coordinates inside - * the svg will go from the top left corner (0,0) to bottom right (50,20) - * and each unit will be worth 10px. - */ - viewBox: _react.PropTypes.string + targetOrigin: _propTypes2.default.origin.isRequired, + zDepth: _propTypes2.default.zDepth } : void 0; -exports.default = SvgIcon; +exports.default = PopoverAnimationDefault; /***/ }), -/* 747 */ +/* 753 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** +* Returns a number of pixels from the top of the screen for given dom element. +* +* @param {object} dom element +* @returns {number} A position from the top of the screen in pixels +*/ +var getOffsetTop = exports.getOffsetTop = function getOffsetTop(elem) { + var yPos = elem.offsetTop; + var tempEl = elem.offsetParent; + + while (tempEl != null) { + yPos += tempEl.offsetTop; + tempEl = tempEl.offsetParent; + } + + return yPos; +}; + +var isIOS = exports.isIOS = function isIOS() { + return (/iPad|iPhone|iPod/.test(window.navigator.userAgent) && !window.MSStream + ); +}; + +/***/ }), +/* 754 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57473,31 +61047,31 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(25); +var _pure = __webpack_require__(20); var _pure2 = _interopRequireDefault(_pure); -var _SvgIcon = __webpack_require__(26); +var _SvgIcon = __webpack_require__(21); var _SvgIcon2 = _interopRequireDefault(_SvgIcon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var NavigationExpandMore = function NavigationExpandMore(props) { +var NavigationCheck = function NavigationCheck(props) { return _react2.default.createElement( _SvgIcon2.default, props, - _react2.default.createElement('path', { d: 'M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z' }) + _react2.default.createElement('path', { d: 'M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' }) ); }; -NavigationExpandMore = (0, _pure2.default)(NavigationExpandMore); -NavigationExpandMore.displayName = 'NavigationExpandMore'; -NavigationExpandMore.muiName = 'SvgIcon'; +NavigationCheck = (0, _pure2.default)(NavigationCheck); +NavigationCheck.displayName = 'NavigationCheck'; +NavigationCheck.muiName = 'SvgIcon'; -exports.default = NavigationExpandMore; +exports.default = NavigationCheck; /***/ }), -/* 748 */ +/* 755 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57506,53 +61080,43 @@ exports.default = NavigationExpandMore; Object.defineProperty(exports, "__esModule", { value: true }); +exports.HotKeyHolder = undefined; -var _react = __webpack_require__(0); +var _classCallCheck2 = __webpack_require__(1); -var _react2 = _interopRequireDefault(_react); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _List = __webpack_require__(195); +var _createClass2 = __webpack_require__(2); -var _List2 = _interopRequireDefault(_List); +var _createClass3 = _interopRequireDefault(_createClass2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var NestedList = function NestedList(props) { - var children = props.children, - open = props.open, - nestedLevel = props.nestedLevel, - style = props.style; +var HotKeyHolder = exports.HotKeyHolder = function () { + function HotKeyHolder() { + var _this = this; + (0, _classCallCheck3.default)(this, HotKeyHolder); - if (!open) { - return null; + this.clear = function () { + _this.timerId = null; + _this.lastKeys = null; + }; } - return _react2.default.createElement( - _List2.default, - { style: style }, - _react.Children.map(children, function (child) { - return (0, _react.isValidElement)(child) ? (0, _react.cloneElement)(child, { - nestedLevel: nestedLevel + 1 - }) : child; - }) - ); -}; - - false ? NestedList.propTypes = { - children: _react.PropTypes.node, - nestedLevel: _react.PropTypes.number.isRequired, - open: _react.PropTypes.bool.isRequired, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object -} : void 0; - -exports.default = NestedList; + (0, _createClass3.default)(HotKeyHolder, [{ + key: 'append', + value: function append(key) { + clearTimeout(this.timerId); + this.timerId = setTimeout(this.clear, 500); + return this.lastKeys = (this.lastKeys || '') + key; + } + }]); + return HotKeyHolder; +}(); /***/ }), -/* 749 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57561,7 +61125,6 @@ exports.default = NestedList; Object.defineProperty(exports, "__esModule", { value: true }); -exports.makeSelectable = undefined; var _extends2 = __webpack_require__(7); @@ -57599,133 +61162,497 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _colorManipulator = __webpack_require__(56); +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _colorManipulator = __webpack_require__(50); + +var _childUtils = __webpack_require__(131); + +var _EnhancedButton = __webpack_require__(51); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _Paper = __webpack_require__(32); + +var _Paper2 = _interopRequireDefault(_Paper); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var makeSelectable = exports.makeSelectable = function makeSelectable(MyComponent) { - var _class, _temp2; +function validateLabel(props, propName, componentName) { + if (false) { + if (!props.children && props.label !== 0 && !props.label && !props.icon) { + return new Error('Required prop label or children or icon was not specified in ' + componentName + '.'); + } + } +} - return _temp2 = _class = function (_Component) { - (0, _inherits3.default)(_class, _Component); +function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + button = _context$muiTheme.button, + raisedButton = _context$muiTheme.raisedButton; + var disabled = props.disabled, + disabledBackgroundColor = props.disabledBackgroundColor, + disabledLabelColor = props.disabledLabelColor, + fullWidth = props.fullWidth, + icon = props.icon, + label = props.label, + labelPosition = props.labelPosition, + primary = props.primary, + secondary = props.secondary, + style = props.style; - function _class() { - var _ref; - var _temp, _this, _ret; + var amount = primary || secondary ? 0.4 : 0.08; - (0, _classCallCheck3.default)(this, _class); + var backgroundColor = raisedButton.color; + var labelColor = raisedButton.textColor; - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; + if (disabled) { + backgroundColor = disabledBackgroundColor || raisedButton.disabledColor; + labelColor = disabledLabelColor || raisedButton.disabledTextColor; + } else if (primary) { + backgroundColor = raisedButton.primaryColor; + labelColor = raisedButton.primaryTextColor; + } else if (secondary) { + backgroundColor = raisedButton.secondaryColor; + labelColor = raisedButton.secondaryTextColor; + } else { + if (props.backgroundColor) { + backgroundColor = props.backgroundColor; + } + if (props.labelColor) { + labelColor = props.labelColor; + } + } + + var buttonHeight = style && style.height || button.height; + var borderRadius = 2; + + return { + root: { + display: 'inline-block', + transition: _transitions2.default.easeOut(), + minWidth: fullWidth ? '100%' : button.minWidth + }, + button: { + height: buttonHeight, + lineHeight: buttonHeight + 'px', + width: '100%', + padding: 0, + borderRadius: borderRadius, + transition: _transitions2.default.easeOut(), + backgroundColor: backgroundColor, + // That's the default value for a button but not a link + textAlign: 'center' + }, + label: { + position: 'relative', + opacity: 1, + fontSize: raisedButton.fontSize, + letterSpacing: 0, + textTransform: raisedButton.textTransform || button.textTransform || 'uppercase', + fontWeight: raisedButton.fontWeight, + margin: 0, + userSelect: 'none', + paddingLeft: icon && labelPosition !== 'before' ? 8 : baseTheme.spacing.desktopGutterLess, + paddingRight: icon && labelPosition === 'before' ? 8 : baseTheme.spacing.desktopGutterLess, + color: labelColor + }, + icon: { + verticalAlign: 'middle', + marginLeft: label && labelPosition !== 'before' ? 12 : 0, + marginRight: label && labelPosition === 'before' ? 12 : 0 + }, + overlay: { + height: buttonHeight, + borderRadius: borderRadius, + backgroundColor: (state.keyboardFocused || state.hovered) && !disabled && (0, _colorManipulator.fade)(labelColor, amount), + transition: _transitions2.default.easeOut(), + top: 0 + }, + ripple: { + color: labelColor, + opacity: !(primary || secondary) ? 0.1 : 0.16 + } + }; +} + +var RaisedButton = function (_Component) { + (0, _inherits3.default)(RaisedButton, _Component); + + function RaisedButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RaisedButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RaisedButton.__proto__ || (0, _getPrototypeOf2.default)(RaisedButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + keyboardFocused: false, + touched: false, + initialZDepth: 0, + zDepth: 0 + }, _this.handleMouseDown = function (event) { + // only listen to left clicks + if (event.button === 0) { + _this.setState({ + zDepth: _this.state.initialZDepth + 1 + }); + } + if (_this.props.onMouseDown) { + _this.props.onMouseDown(event); + } + }, _this.handleMouseUp = function (event) { + _this.setState({ + zDepth: _this.state.initialZDepth + }); + if (_this.props.onMouseUp) { + _this.props.onMouseUp(event); + } + }, _this.handleMouseLeave = function (event) { + if (!_this.state.keyboardFocused) { + _this.setState({ + zDepth: _this.state.initialZDepth, + hovered: false + }); + } + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseEnter = function (event) { + if (!_this.state.keyboardFocused && !_this.state.touched) { + _this.setState({ + hovered: true + }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _this.handleTouchStart = function (event) { + _this.setState({ + touched: true, + zDepth: _this.state.initialZDepth + 1 + }); + + if (_this.props.onTouchStart) { + _this.props.onTouchStart(event); } + }, _this.handleTouchEnd = function (event) { + _this.setState({ + touched: true, + zDepth: _this.state.initialZDepth + }); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = _class.__proto__ || (0, _getPrototypeOf2.default)(_class)).call.apply(_ref, [this].concat(args))), _this), _this.hasSelectedDescendant = function (previousValue, child) { - if (_react2.default.isValidElement(child) && child.props.nestedItems && child.props.nestedItems.length > 0) { - return child.props.nestedItems.reduce(_this.hasSelectedDescendant, previousValue); - } - return previousValue || _this.isChildSelected(child, _this.props); - }, _this.handleItemTouchTap = function (event, item) { - var itemValue = item.props.value; + if (_this.props.onTouchEnd) { + _this.props.onTouchEnd(event); + } + }, _this.handleKeyboardFocus = function (event, keyboardFocused) { + var zDepth = keyboardFocused && !_this.props.disabled ? _this.state.initialZDepth + 1 : _this.state.initialZDepth; + + _this.setState({ + zDepth: zDepth, + keyboardFocused: keyboardFocused + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(RaisedButton, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var zDepth = this.props.disabled ? 0 : 1; + this.setState({ + zDepth: zDepth, + initialZDepth: zDepth + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var zDepth = nextProps.disabled ? 0 : 1; + var nextState = { + zDepth: zDepth, + initialZDepth: zDepth + }; + + if (nextProps.disabled) { + nextState.hovered = false; + } + + this.setState(nextState); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + backgroundColor = _props.backgroundColor, + buttonStyle = _props.buttonStyle, + children = _props.children, + className = _props.className, + disabled = _props.disabled, + disabledBackgroundColor = _props.disabledBackgroundColor, + disabledLabelColor = _props.disabledLabelColor, + fullWidth = _props.fullWidth, + icon = _props.icon, + label = _props.label, + labelColor = _props.labelColor, + labelPosition = _props.labelPosition, + labelStyle = _props.labelStyle, + overlayStyle = _props.overlayStyle, + primary = _props.primary, + rippleStyle = _props.rippleStyle, + secondary = _props.secondary, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['backgroundColor', 'buttonStyle', 'children', 'className', 'disabled', 'disabledBackgroundColor', 'disabledLabelColor', 'fullWidth', 'icon', 'label', 'labelColor', 'labelPosition', 'labelStyle', 'overlayStyle', 'primary', 'rippleStyle', 'secondary', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var mergedRippleStyles = (0, _simpleAssign2.default)({}, styles.ripple, rippleStyle); + + var buttonEventHandlers = disabled ? {} : { + onMouseDown: this.handleMouseDown, + onMouseUp: this.handleMouseUp, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd, + onKeyboardFocus: this.handleKeyboardFocus + }; + + var labelElement = label && _react2.default.createElement( + 'span', + { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) }, + label + ); + + var iconCloned = icon && (0, _react.cloneElement)(icon, { + color: icon.props.color || styles.label.color, + style: (0, _simpleAssign2.default)(styles.icon, icon.props.style) + }); + + // Place label before or after children. + var childrenFragment = labelPosition === 'before' ? { + labelElement: labelElement, + iconCloned: iconCloned, + children: children + } : { + children: children, + iconCloned: iconCloned, + labelElement: labelElement + }; + + var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment); + + return _react2.default.createElement( + _Paper2.default, + { + className: className, + style: (0, _simpleAssign2.default)(styles.root, style), + zDepth: this.state.zDepth + }, + _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, buttonEventHandlers, { + ref: 'container', + disabled: disabled, + style: (0, _simpleAssign2.default)(styles.button, buttonStyle), + focusRippleColor: mergedRippleStyles.color, + touchRippleColor: mergedRippleStyles.color, + focusRippleOpacity: mergedRippleStyles.opacity, + touchRippleOpacity: mergedRippleStyles.opacity + }), + _react2.default.createElement( + 'div', + { + ref: 'overlay', + style: prepareStyles((0, _simpleAssign2.default)(styles.overlay, overlayStyle)) + }, + enhancedButtonChildren + ) + ) + ); + } + }]); + return RaisedButton; +}(_react.Component); + +RaisedButton.muiName = 'RaisedButton'; +RaisedButton.defaultProps = { + disabled: false, + labelPosition: 'after', + fullWidth: false, + primary: false, + secondary: false +}; +RaisedButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? RaisedButton.propTypes = { + /** + * Override the default background color for the button, + * but not the default disabled background color + * (use `disabledBackgroundColor` for this). + */ + backgroundColor: _react.PropTypes.string, + /** + * Override the inline-styles of the button element. + */ + buttonStyle: _react.PropTypes.object, + /** + * The content of the button. + * If a label is provided via the `label` prop, the text within the label + * will be displayed in addition to the content provided here. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the button will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the default background color for the button + * when it is disabled. + */ + disabledBackgroundColor: _react.PropTypes.string, + /** + * The color of the button's label when the button is disabled. + */ + disabledLabelColor: _react.PropTypes.string, + /** + * If true, the button will take up the full width of its container. + */ + fullWidth: _react.PropTypes.bool, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * An icon to be displayed within the button. + */ + icon: _react.PropTypes.node, + /** + * The label to be displayed within the button. + * If content is provided via the `children` prop, that content will be + * displayed in addition to the label provided here. + */ + label: validateLabel, + /** + * The color of the button's label. + */ + labelColor: _react.PropTypes.string, + /** + * The position of the button's label relative to the button's `children`. + */ + labelPosition: _react.PropTypes.oneOf(['before', 'after']), + /** + * Override the inline-styles of the button's label element. + */ + labelStyle: _react.PropTypes.object, + /** @ignore */ + onMouseDown: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onMouseUp: _react.PropTypes.func, + /** @ignore */ + onTouchEnd: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * Override the inline style of the button overlay. + */ + overlayStyle: _react.PropTypes.object, + /** + * If true, the button will use the theme's primary color. + */ + primary: _react.PropTypes.bool, + /** + * Override the inline style of the ripple element. + */ + rippleStyle: _react.PropTypes.object, + /** + * If true, the button will use the theme's secondary color. + * If both `secondary` and `primary` are true, the button will use + * the theme's primary color. + */ + secondary: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = RaisedButton; + +/***/ }), +/* 757 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - if (itemValue !== _this.props.value) { - if (_this.props.onChange) { - _this.props.onChange(event, itemValue); - } - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - (0, _createClass3.default)(_class, [{ - key: 'extendChild', - value: function extendChild(child, styles, selectedItemStyle) { - var _this2 = this; +var _AutoComplete = __webpack_require__(758); - if (child && child.type && child.type.muiName === 'ListItem') { - var selected = this.isChildSelected(child, this.props); - var selectedChildrenStyles = void 0; - if (selected) { - selectedChildrenStyles = (0, _simpleAssign2.default)({}, styles, selectedItemStyle); - } +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); - var mergedChildrenStyles = (0, _simpleAssign2.default)({}, child.props.style, selectedChildrenStyles); +var _createComponent = __webpack_require__(41); - this.keyIndex += 1; +var _createComponent2 = _interopRequireDefault(_createComponent); - return _react2.default.cloneElement(child, { - onTouchTap: function onTouchTap(event) { - _this2.handleItemTouchTap(event, child); - if (child.props.onTouchTap) { - child.props.onTouchTap(event); - } - }, - key: this.keyIndex, - style: mergedChildrenStyles, - nestedItems: child.props.nestedItems.map(function (child) { - return _this2.extendChild(child, styles, selectedItemStyle); - }), - initiallyOpen: this.isInitiallyOpen(child) - }); - } else { - return child; - } - } - }, { - key: 'isInitiallyOpen', - value: function isInitiallyOpen(child) { - if (child.props.initiallyOpen) { - return child.props.initiallyOpen; - } - return this.hasSelectedDescendant(false, child); - } - }, { - key: 'isChildSelected', - value: function isChildSelected(child, props) { - return props.value === child.props.value; - } - }, { - key: 'render', - value: function render() { - var _this3 = this; +var _mapError = __webpack_require__(66); - var _props = this.props, - children = _props.children, - selectedItemStyle = _props.selectedItemStyle, - other = (0, _objectWithoutProperties3.default)(_props, ['children', 'selectedItemStyle']); +var _mapError2 = _interopRequireDefault(_mapError); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - this.keyIndex = 0; - var styles = {}; +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - if (!selectedItemStyle) { - var textColor = this.context.muiTheme.baseTheme.palette.textColor; - styles.backgroundColor = (0, _colorManipulator.fade)(textColor, 0.2); - } +exports.default = (0, _createComponent2.default)(_AutoComplete2.default, function (_ref) { + var _ref$input = _ref.input, + onChange = _ref$input.onChange, + value = _ref$input.value, + _onNewRequest = _ref.onNewRequest, + dataSourceConfig = _ref.dataSourceConfig, + props = _objectWithoutProperties(_ref, ['input', 'onNewRequest', 'dataSourceConfig']); - return _react2.default.createElement( - MyComponent, - (0, _extends3.default)({}, other, this.state), - _react.Children.map(children, function (child) { - return _this3.extendChild(child, styles, selectedItemStyle); - }) - ); + return _extends({}, (0, _mapError2.default)(props), { + dataSourceConfig: dataSourceConfig, + searchText: dataSourceConfig ? value[dataSourceConfig.text] : value, + onNewRequest: function onNewRequest(value) { + onChange((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && dataSourceConfig ? value[dataSourceConfig.value] : value); + if (_onNewRequest) { + _onNewRequest(value); } - }]); - return _class; - }(_react.Component), _class.propTypes = { - children: _react.PropTypes.node, - onChange: _react.PropTypes.func, - selectedItemStyle: _react.PropTypes.object, - value: _react.PropTypes.any - }, _class.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired - }, _temp2; -}; - -exports.default = makeSelectable; + }, + onUpdateInput: function onUpdateInput(value) { + if (!dataSourceConfig) { + onChange(value); + } + } + }); +}); /***/ }), -/* 750 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57736,16 +61663,16 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _Drawer = __webpack_require__(751); +var _AutoComplete = __webpack_require__(328); -var _Drawer2 = _interopRequireDefault(_Drawer); +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = _Drawer2.default; +exports.default = _AutoComplete2.default; /***/ }), -/* 751 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57755,6 +61682,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -57783,640 +61718,542 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); +var _reactDom = __webpack_require__(16); var _reactDom2 = _interopRequireDefault(_reactDom); -var _reactEventListener = __webpack_require__(42); +var _shallowEqual = __webpack_require__(63); -var _reactEventListener2 = _interopRequireDefault(_reactEventListener); +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); -var _keycode = __webpack_require__(30); +var _transitions = __webpack_require__(10); -var _keycode2 = _interopRequireDefault(_keycode); +var _transitions2 = _interopRequireDefault(_transitions); -var _autoPrefix = __webpack_require__(94); +var _EnhancedTextarea = __webpack_require__(760); -var _autoPrefix2 = _interopRequireDefault(_autoPrefix); +var _EnhancedTextarea2 = _interopRequireDefault(_EnhancedTextarea); -var _transitions = __webpack_require__(10); +var _TextFieldHint = __webpack_require__(329); -var _transitions2 = _interopRequireDefault(_transitions); +var _TextFieldHint2 = _interopRequireDefault(_TextFieldHint); -var _Overlay = __webpack_require__(319); +var _TextFieldLabel = __webpack_require__(330); -var _Overlay2 = _interopRequireDefault(_Overlay); +var _TextFieldLabel2 = _interopRequireDefault(_TextFieldLabel); -var _Paper = __webpack_require__(34); +var _TextFieldUnderline = __webpack_require__(331); -var _Paper2 = _interopRequireDefault(_Paper); +var _TextFieldUnderline2 = _interopRequireDefault(_TextFieldUnderline); -var _propTypes = __webpack_require__(41); +var _warning = __webpack_require__(15); -var _propTypes2 = _interopRequireDefault(_propTypes); +var _warning2 = _interopRequireDefault(_warning); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var openNavEventHandler = null; +var getStyles = function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + _context$muiTheme$tex = _context$muiTheme.textField, + floatingLabelColor = _context$muiTheme$tex.floatingLabelColor, + focusColor = _context$muiTheme$tex.focusColor, + textColor = _context$muiTheme$tex.textColor, + disabledTextColor = _context$muiTheme$tex.disabledTextColor, + backgroundColor = _context$muiTheme$tex.backgroundColor, + errorColor = _context$muiTheme$tex.errorColor; -var Drawer = function (_Component) { - (0, _inherits3.default)(Drawer, _Component); - function Drawer() { - var _ref; + var styles = { + root: { + fontSize: 16, + lineHeight: '24px', + width: props.fullWidth ? '100%' : 256, + height: (props.rows - 1) * 24 + (props.floatingLabelText ? 72 : 48), + display: 'inline-block', + position: 'relative', + backgroundColor: backgroundColor, + fontFamily: baseTheme.fontFamily, + transition: _transitions2.default.easeOut('200ms', 'height'), + cursor: props.disabled ? 'not-allowed' : 'auto' + }, + error: { + position: 'relative', + bottom: 2, + fontSize: 12, + lineHeight: '12px', + color: errorColor, + transition: _transitions2.default.easeOut() + }, + floatingLabel: { + color: props.disabled ? disabledTextColor : floatingLabelColor, + pointerEvents: 'none' + }, + input: { + padding: 0, + position: 'relative', + width: '100%', + border: 'none', + outline: 'none', + backgroundColor: 'rgba(0,0,0,0)', + color: props.disabled ? disabledTextColor : textColor, + cursor: 'inherit', + font: 'inherit', + WebkitTapHighlightColor: 'rgba(0,0,0,0)' }, + inputNative: { + appearance: 'textfield' } + }; - var _temp, _this, _ret; + styles.textarea = (0, _simpleAssign2.default)({}, styles.input, { + marginTop: props.floatingLabelText ? 36 : 12, + marginBottom: props.floatingLabelText ? -36 : -12, + boxSizing: 'border-box', + font: 'inherit' + }); - (0, _classCallCheck3.default)(this, Drawer); + // Do not assign a height to the textarea as he handles it on his own. + styles.input.height = '100%'; - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; + if (state.isFocused) { + styles.floatingLabel.color = focusColor; + } + + if (props.floatingLabelText) { + styles.input.boxSizing = 'border-box'; + + if (!props.multiLine) { + styles.input.marginTop = 14; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Drawer.__proto__ || (0, _getPrototypeOf2.default)(Drawer)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapOverlay = function (event) { - event.preventDefault(); - _this.close('clickaway'); - }, _this.handleKeyUp = function (event) { - if (_this.state.open && !_this.props.docked && (0, _keycode2.default)(event) === 'esc') { - _this.close('escape'); - } - }, _this.onBodyTouchStart = function (event) { - var swipeAreaWidth = _this.props.swipeAreaWidth; + if (state.errorText) { + styles.error.bottom = !props.multiLine ? styles.error.fontSize + 3 : 3; + } + } - var touchStartX = event.touches[0].pageX; - var touchStartY = event.touches[0].pageY; + if (state.errorText) { + if (state.isFocused) { + styles.floatingLabel.color = styles.error.color; + } + } - // Open only if swiping from far left (or right) while closed - if (swipeAreaWidth !== null && !_this.state.open) { - if (_this.props.openSecondary) { - // If openSecondary is true calculate from the far right - if (touchStartX < document.body.offsetWidth - swipeAreaWidth) return; - } else { - // If openSecondary is false calculate from the far left - if (touchStartX > swipeAreaWidth) return; - } - } + return styles; +}; - if (!_this.state.open && (openNavEventHandler !== _this.onBodyTouchStart || _this.props.disableSwipeToOpen)) { - return; - } +/** + * Check if a value is valid to be displayed inside an input. + * + * @param The value to check. + * @returns True if the string provided is valid, false otherwise. + */ +function isValid(value) { + return value !== '' && value !== undefined && value !== null; +} - _this.maybeSwiping = true; - _this.touchStartX = touchStartX; - _this.touchStartY = touchStartY; +var TextField = function (_Component) { + (0, _inherits3.default)(TextField, _Component); - document.body.addEventListener('touchmove', _this.onBodyTouchMove); - document.body.addEventListener('touchend', _this.onBodyTouchEnd); - document.body.addEventListener('touchcancel', _this.onBodyTouchEnd); - }, _this.onBodyTouchMove = function (event) { - var currentX = event.touches[0].pageX; - var currentY = event.touches[0].pageY; + function TextField() { + var _ref; - if (_this.state.swiping) { - event.preventDefault(); - _this.setPosition(_this.getTranslateX(currentX)); - } else if (_this.maybeSwiping) { - var dXAbs = Math.abs(currentX - _this.touchStartX); - var dYAbs = Math.abs(currentY - _this.touchStartY); - // If the user has moved his thumb ten pixels in either direction, - // we can safely make an assumption about whether he was intending - // to swipe or scroll. - var threshold = 10; + var _temp, _this, _ret; - if (dXAbs > threshold && dYAbs <= threshold) { - _this.swipeStartX = currentX; - _this.setState({ - swiping: _this.state.open ? 'closing' : 'opening' - }); - _this.setPosition(_this.getTranslateX(currentX)); - } else if (dXAbs <= threshold && dYAbs > threshold) { - _this.onBodyTouchEnd(); - } - } - }, _this.onBodyTouchEnd = function (event) { - if (_this.state.swiping) { - var currentX = event.changedTouches[0].pageX; - var translateRatio = _this.getTranslateX(currentX) / _this.getMaxTranslateX(); + (0, _classCallCheck3.default)(this, TextField); - _this.maybeSwiping = false; - var swiping = _this.state.swiping; - _this.setState({ - swiping: null - }); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - // We have to open or close after setting swiping to null, - // because only then CSS transition is enabled. - if (translateRatio > 0.5) { - if (swiping === 'opening') { - _this.setPosition(_this.getMaxTranslateX()); - } else { - _this.close('swipe'); - } - } else { - if (swiping === 'opening') { - _this.open('swipe'); - } else { - _this.setPosition(0); - } - } - } else { - _this.maybeSwiping = false; + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TextField.__proto__ || (0, _getPrototypeOf2.default)(TextField)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + isFocused: false, + errorText: undefined, + hasValue: false + }, _this.handleInputBlur = function (event) { + _this.setState({ isFocused: false }); + if (_this.props.onBlur) { + _this.props.onBlur(event); } - - document.body.removeEventListener('touchmove', _this.onBodyTouchMove); - document.body.removeEventListener('touchend', _this.onBodyTouchEnd); - document.body.removeEventListener('touchcancel', _this.onBodyTouchEnd); + }, _this.handleInputChange = function (event) { + _this.setState({ hasValue: isValid(event.target.value) }); + if (_this.props.onChange) { + _this.props.onChange(event, event.target.value); + } + }, _this.handleInputFocus = function (event) { + if (_this.props.disabled) { + return; + } + _this.setState({ isFocused: true }); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleHeightChange = function (event, height) { + var newHeight = height + 24; + if (_this.props.floatingLabelText) { + newHeight += 24; + } + _reactDom2.default.findDOMNode(_this).style.height = newHeight + 'px'; }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(Drawer, [{ + (0, _createClass3.default)(TextField, [{ key: 'componentWillMount', value: function componentWillMount() { - this.maybeSwiping = false; - this.touchStartX = null; - this.touchStartY = null; - this.swipeStartX = null; + var _props = this.props, + children = _props.children, + name = _props.name, + hintText = _props.hintText, + floatingLabelText = _props.floatingLabelText, + id = _props.id; + + + var propsLeaf = children ? children.props : this.props; this.setState({ - open: this.props.open !== null ? this.props.open : this.props.docked, - swiping: null + errorText: this.props.errorText, + hasValue: isValid(propsLeaf.value) || isValid(propsLeaf.defaultValue) }); - } - }, { - key: 'componentDidMount', - value: function componentDidMount() { - this.enableSwipeHandling(); + + false ? (0, _warning2.default)(name || hintText || floatingLabelText || id, 'Material-UI: We don\'t have enough information\n to build a robust unique id for the TextField component. Please provide an id or a name.') : void 0; + + var uniqueId = name + '-' + hintText + '-' + floatingLabelText + '-' + Math.floor(Math.random() * 0xFFFF); + this.uniqueId = uniqueId.replace(/[^A-Za-z0-9-]/gi, ''); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { - // If controlled then the open prop takes precedence. - if (nextProps.open !== null) { - this.setState({ - open: nextProps.open - }); - // Otherwise, if docked is changed, change the open state for when uncontrolled. - } else if (this.props.docked !== nextProps.docked) { + if (nextProps.errorText !== this.props.errorText) { this.setState({ - open: nextProps.docked + errorText: nextProps.errorText }); } - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate() { - this.enableSwipeHandling(); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.disableSwipeHandling(); - } - }, { - key: 'getStyles', - value: function getStyles() { - var muiTheme = this.context.muiTheme; - var theme = muiTheme.drawer; - var x = this.getTranslateMultiplier() * (this.state.open ? 0 : this.getMaxTranslateX()); + if (nextProps.children && nextProps.children.props) { + nextProps = nextProps.children.props; + } - var styles = { - root: { - height: '100%', - width: this.props.width || theme.width, - position: 'fixed', - zIndex: muiTheme.zIndex.drawer, - left: 0, - top: 0, - transform: 'translate(' + x + 'px, 0)', - transition: !this.state.swiping && _transitions2.default.easeOut(null, 'transform', null), - backgroundColor: theme.color, - overflow: 'auto', - WebkitOverflowScrolling: 'touch' }, - overlay: { - zIndex: muiTheme.zIndex.drawerOverlay, - pointerEvents: this.state.open ? 'auto' : 'none' }, - rootWhenOpenRight: { - left: 'auto', - right: 0 - } - }; + if (nextProps.hasOwnProperty('value')) { + var hasValue = isValid(nextProps.value); - return styles; - } - }, { - key: 'shouldShow', - value: function shouldShow() { - return this.state.open || !!this.state.swiping; // component is swiping - } - }, { - key: 'close', - value: function close(reason) { - if (this.props.open === null) this.setState({ open: false }); - if (this.props.onRequestChange) this.props.onRequestChange(false, reason); - return this; + this.setState({ + hasValue: hasValue + }); + } } }, { - key: 'open', - value: function open(reason) { - if (this.props.open === null) this.setState({ open: true }); - if (this.props.onRequestChange) this.props.onRequestChange(true, reason); - return this; + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); } }, { - key: 'getMaxTranslateX', - value: function getMaxTranslateX() { - var width = this.props.width || this.context.muiTheme.drawer.width; - return width + 10; + key: 'blur', + value: function blur() { + if (this.input) { + this.getInputNode().blur(); + } } }, { - key: 'getTranslateMultiplier', - value: function getTranslateMultiplier() { - return this.props.openSecondary ? 1 : -1; + key: 'focus', + value: function focus() { + if (this.input) { + this.getInputNode().focus(); + } } }, { - key: 'enableSwipeHandling', - value: function enableSwipeHandling() { - if (!this.props.docked) { - document.body.addEventListener('touchstart', this.onBodyTouchStart); - if (!openNavEventHandler) { - openNavEventHandler = this.onBodyTouchStart; - } - } else { - this.disableSwipeHandling(); + key: 'select', + value: function select() { + if (this.input) { + this.getInputNode().select(); } } }, { - key: 'disableSwipeHandling', - value: function disableSwipeHandling() { - document.body.removeEventListener('touchstart', this.onBodyTouchStart); - if (openNavEventHandler === this.onBodyTouchStart) { - openNavEventHandler = null; - } + key: 'getValue', + value: function getValue() { + return this.input ? this.getInputNode().value : undefined; } }, { - key: 'setPosition', - value: function setPosition(translateX) { - var drawer = _reactDom2.default.findDOMNode(this.refs.clickAwayableElement); - var transformCSS = 'translate(' + this.getTranslateMultiplier() * translateX + 'px, 0)'; - this.refs.overlay.setOpacity(1 - translateX / this.getMaxTranslateX()); - _autoPrefix2.default.set(drawer.style, 'transform', transformCSS); + key: 'getInputNode', + value: function getInputNode() { + return this.props.children || this.props.multiLine ? this.input.getInputNode() : _reactDom2.default.findDOMNode(this.input); } }, { - key: 'getTranslateX', - value: function getTranslateX(currentX) { - return Math.min(Math.max(this.state.swiping === 'closing' ? this.getTranslateMultiplier() * (currentX - this.swipeStartX) : this.getMaxTranslateX() - this.getTranslateMultiplier() * (this.swipeStartX - currentX), 0), this.getMaxTranslateX()); + key: '_isControlled', + value: function _isControlled() { + return this.props.hasOwnProperty('value'); } }, { key: 'render', value: function render() { - var _props = this.props, - children = _props.children, - className = _props.className, - containerClassName = _props.containerClassName, - containerStyle = _props.containerStyle, - docked = _props.docked, - openSecondary = _props.openSecondary, - overlayClassName = _props.overlayClassName, - overlayStyle = _props.overlayStyle, - style = _props.style, - zDepth = _props.zDepth; + var _this2 = this; + var _props2 = this.props, + children = _props2.children, + className = _props2.className, + disabled = _props2.disabled, + errorStyle = _props2.errorStyle, + errorText = _props2.errorText, + floatingLabelFixed = _props2.floatingLabelFixed, + floatingLabelFocusStyle = _props2.floatingLabelFocusStyle, + floatingLabelShrinkStyle = _props2.floatingLabelShrinkStyle, + floatingLabelStyle = _props2.floatingLabelStyle, + floatingLabelText = _props2.floatingLabelText, + fullWidth = _props2.fullWidth, + hintText = _props2.hintText, + hintStyle = _props2.hintStyle, + id = _props2.id, + inputStyle = _props2.inputStyle, + multiLine = _props2.multiLine, + onBlur = _props2.onBlur, + onChange = _props2.onChange, + onFocus = _props2.onFocus, + style = _props2.style, + type = _props2.type, + underlineDisabledStyle = _props2.underlineDisabledStyle, + underlineFocusStyle = _props2.underlineFocusStyle, + underlineShow = _props2.underlineShow, + underlineStyle = _props2.underlineStyle, + rows = _props2.rows, + rowsMax = _props2.rowsMax, + textareaStyle = _props2.textareaStyle, + other = (0, _objectWithoutProperties3.default)(_props2, ['children', 'className', 'disabled', 'errorStyle', 'errorText', 'floatingLabelFixed', 'floatingLabelFocusStyle', 'floatingLabelShrinkStyle', 'floatingLabelStyle', 'floatingLabelText', 'fullWidth', 'hintText', 'hintStyle', 'id', 'inputStyle', 'multiLine', 'onBlur', 'onChange', 'onFocus', 'style', 'type', 'underlineDisabledStyle', 'underlineFocusStyle', 'underlineShow', 'underlineStyle', 'rows', 'rowsMax', 'textareaStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; - var styles = this.getStyles(); + var styles = getStyles(this.props, this.context, this.state); + var inputId = id || this.uniqueId; - var overlay = void 0; - if (!docked) { - overlay = _react2.default.createElement(_Overlay2.default, { - ref: 'overlay', - show: this.shouldShow(), - className: overlayClassName, - style: (0, _simpleAssign2.default)(styles.overlay, overlayStyle), - transitionEnabled: !this.state.swiping, - onTouchTap: this.handleTouchTapOverlay - }); + var errorTextElement = this.state.errorText && _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.error, errorStyle)) }, + this.state.errorText + ); + + var floatingLabelTextElement = floatingLabelText && _react2.default.createElement( + _TextFieldLabel2.default, + { + muiTheme: this.context.muiTheme, + style: (0, _simpleAssign2.default)(styles.floatingLabel, floatingLabelStyle, this.state.isFocused ? floatingLabelFocusStyle : null), + shrinkStyle: floatingLabelShrinkStyle, + htmlFor: inputId, + shrink: this.state.hasValue || this.state.isFocused || floatingLabelFixed, + disabled: disabled + }, + floatingLabelText + ); + + var inputProps = { + id: inputId, + ref: function ref(elem) { + return _this2.input = elem; + }, + disabled: this.props.disabled, + onBlur: this.handleInputBlur, + onChange: this.handleInputChange, + onFocus: this.handleInputFocus + }; + + var childStyleMerged = (0, _simpleAssign2.default)(styles.input, inputStyle); + + var inputElement = void 0; + if (children) { + inputElement = _react2.default.cloneElement(children, (0, _extends3.default)({}, inputProps, children.props, { + style: (0, _simpleAssign2.default)(childStyleMerged, children.props.style) + })); + } else { + inputElement = multiLine ? _react2.default.createElement(_EnhancedTextarea2.default, (0, _extends3.default)({ + style: childStyleMerged, + textareaStyle: (0, _simpleAssign2.default)(styles.textarea, styles.inputNative, textareaStyle), + rows: rows, + rowsMax: rowsMax + }, other, inputProps, { + onHeightChange: this.handleHeightChange + })) : _react2.default.createElement('input', (0, _extends3.default)({ + type: type, + style: prepareStyles((0, _simpleAssign2.default)(styles.inputNative, childStyleMerged)) + }, other, inputProps)); + } + + var rootProps = {}; + + if (children) { + rootProps = other; } return _react2.default.createElement( 'div', - { + (0, _extends3.default)({}, rootProps, { className: className, - style: style - }, - _react2.default.createElement(_reactEventListener2.default, { target: 'window', onKeyUp: this.handleKeyUp }), - overlay, - _react2.default.createElement( - _Paper2.default, - { - ref: 'clickAwayableElement', - zDepth: zDepth, - rounded: false, - transitionEnabled: !this.state.swiping, - className: containerClassName, - style: (0, _simpleAssign2.default)(styles.root, openSecondary && styles.rootWhenOpenRight, containerStyle) - }, - children - ) + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }), + floatingLabelTextElement, + hintText ? _react2.default.createElement(_TextFieldHint2.default, { + muiTheme: this.context.muiTheme, + show: !(this.state.hasValue || floatingLabelText && !this.state.isFocused) || !this.state.hasValue && floatingLabelText && floatingLabelFixed && !this.state.isFocused, + style: hintStyle, + text: hintText + }) : null, + inputElement, + underlineShow ? _react2.default.createElement(_TextFieldUnderline2.default, { + disabled: disabled, + disabledStyle: underlineDisabledStyle, + error: !!this.state.errorText, + errorStyle: errorStyle, + focus: this.state.isFocused, + focusStyle: underlineFocusStyle, + muiTheme: this.context.muiTheme, + style: underlineStyle + }) : null, + errorTextElement ); } }]); - return Drawer; + return TextField; }(_react.Component); -Drawer.defaultProps = { - disableSwipeToOpen: false, - docked: true, - open: null, - openSecondary: false, - swipeAreaWidth: 30, - width: null, - zDepth: 2 +TextField.defaultProps = { + disabled: false, + floatingLabelFixed: false, + multiLine: false, + fullWidth: false, + type: 'text', + underlineShow: true, + rows: 1 }; -Drawer.contextTypes = { +TextField.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? Drawer.propTypes = { - /** - * The contents of the `Drawer` - */ + false ? TextField.propTypes = { children: _react.PropTypes.node, /** - * The CSS class name of the root element. + * The css class name of the root element. */ className: _react.PropTypes.string, /** - * The CSS class name of the container element. + * The text string to use for the default value. */ - containerClassName: _react.PropTypes.string, + defaultValue: _react.PropTypes.any, /** - * Override the inline-styles of the container element. + * Disables the text field if set to true. */ - containerStyle: _react.PropTypes.object, + disabled: _react.PropTypes.bool, /** - * If true, swiping sideways when the `Drawer` is closed will not open it. + * The style object to use to override error styles. */ - disableSwipeToOpen: _react.PropTypes.bool, + errorStyle: _react.PropTypes.object, /** - * If true, the `Drawer` will be docked. In this state, the overlay won't show and - * clicking on a menu item will not close the `Drawer`. + * The error content to display. */ - docked: _react.PropTypes.bool, + errorText: _react.PropTypes.node, /** - * Callback function fired when the `open` state of the `Drawer` is requested to be changed. - * - * @param {boolean} open If true, the `Drawer` was requested to be opened. - * @param {string} reason The reason for the open or close request. Possible values are - * 'swipe' for open requests; 'clickaway' (on overlay clicks), - * 'escape' (on escape key press), and 'swipe' for close requests. + * If true, the floating label will float even when there is no value. */ - onRequestChange: _react.PropTypes.func, + floatingLabelFixed: _react.PropTypes.bool, /** - * If true, the `Drawer` is opened. Providing a value will turn the `Drawer` - * into a controlled component. + * The style object to use to override floating label styles when focused. */ - open: _react.PropTypes.bool, + floatingLabelFocusStyle: _react.PropTypes.object, /** - * If true, the `Drawer` is positioned to open from the opposite side. + * The style object to use to override floating label styles when shrunk. */ - openSecondary: _react.PropTypes.bool, + floatingLabelShrinkStyle: _react.PropTypes.object, /** - * The CSS class name to add to the `Overlay` component that is rendered behind the `Drawer`. + * The style object to use to override floating label styles. */ - overlayClassName: _react.PropTypes.string, + floatingLabelStyle: _react.PropTypes.object, /** - * Override the inline-styles of the `Overlay` component that is rendered behind the `Drawer`. + * The content to use for the floating label element. */ - overlayStyle: _react.PropTypes.object, + floatingLabelText: _react.PropTypes.node, + /** + * If true, the field receives the property width 100%. + */ + fullWidth: _react.PropTypes.bool, + /** + * Override the inline-styles of the TextField's hint text element. + */ + hintStyle: _react.PropTypes.object, + /** + * The hint content to display. + */ + hintText: _react.PropTypes.node, + /** + * The id prop for the text field. + */ + id: _react.PropTypes.string, + /** + * Override the inline-styles of the TextField's input element. + * When multiLine is false: define the style of the input element. + * When multiLine is true: define the style of the container of the textarea. + */ + inputStyle: _react.PropTypes.object, + /** + * If true, a textarea element will be rendered. + * The textarea also grows and shrinks according to the number of lines. + */ + multiLine: _react.PropTypes.bool, + /** + * Name applied to the input. + */ + name: _react.PropTypes.string, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function that is fired when the textfield's value changes. + * + * @param {object} event Change event targeting the text field. + * @param {string} newValue The new value of the text field. + */ + onChange: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Number of rows to display when multiLine option is set to true. + */ + rows: _react.PropTypes.number, + /** + * Maximum number of rows to display when + * multiLine option is set to true. + */ + rowsMax: _react.PropTypes.number, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, /** - * The width of the left most (or right most) area in pixels where the `Drawer` can be - * swiped open from. Setting this to `null` spans that area to the entire page - * (**CAUTION!** Setting this property to `null` might cause issues with sliders and - * swipeable `Tabs`: use at your own risk). + * Override the inline-styles of the TextField's textarea element. + * The TextField use either a textarea or an input, + * this property has effects only when multiLine is true. */ - swipeAreaWidth: _react.PropTypes.number, + textareaStyle: _react.PropTypes.object, /** - * The width of the `Drawer` in pixels. Defaults to using the values from theme. + * Specifies the type of input to display + * such as "password" or "text". */ - width: _react.PropTypes.number, + type: _react.PropTypes.string, /** - * The zDepth of the `Drawer`. + * Override the inline-styles of the + * TextField's underline element when disabled. */ - zDepth: _propTypes2.default.zDepth - -} : void 0; -exports.default = Drawer; - -/***/ }), -/* 752 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.passiveOption = exports.detachEvent = exports.attachEvent = exports.removeEventListener = exports.addEventListener = exports.canUseDOM = undefined; - -var _defineProperty = __webpack_require__(753); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// Inspired by https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/ExecutionEnvironment.js -var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); - -var addEventListener = exports.addEventListener = canUseDOM && 'addEventListener' in window; -var removeEventListener = exports.removeEventListener = canUseDOM && 'removeEventListener' in window; - -// IE8+ Support -var attachEvent = exports.attachEvent = canUseDOM && 'attachEvent' in window; -var detachEvent = exports.detachEvent = canUseDOM && 'detachEvent' in window; - -// Passive options -// Inspired by https://github.com/Modernizr/Modernizr/blob/master/feature-detects/dom/passiveeventlisteners.js -var passiveOption = exports.passiveOption = function () { - var cache = null; - - return function () { - if (cache !== null) { - return cache; - } - - var supportsPassiveOption = false; - - try { - window.addEventListener('test', null, (0, _defineProperty2.default)({}, 'passive', { - get: function get() { - supportsPassiveOption = true; - } - })); - } catch (e) {} // eslint-disable-line no-empty - - cache = supportsPassiveOption; - - return supportsPassiveOption; - }(); -}(); - -/***/ }), -/* 753 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _defineProperty = __webpack_require__(185); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -exports.default = defineProperty; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// weak - -function defineProperty(o, p, attr) { - return (0, _defineProperty2.default)(o, p, attr); -} - -/***/ }), -/* 754 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _getPrototypeOf = __webpack_require__(3); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(1); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(2); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(4); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(5); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _react = __webpack_require__(0); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var originalBodyOverflow = null; -var lockingCounter = 0; - -var AutoLockScrolling = function (_Component) { - (0, _inherits3.default)(AutoLockScrolling, _Component); - - function AutoLockScrolling() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, AutoLockScrolling); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoLockScrolling.__proto__ || (0, _getPrototypeOf2.default)(AutoLockScrolling)).call.apply(_ref, [this].concat(args))), _this), _this.locked = false, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - - (0, _createClass3.default)(AutoLockScrolling, [{ - key: 'componentDidMount', - value: function componentDidMount() { - if (this.props.lock === true) { - this.preventScrolling(); - } - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (this.props.lock !== nextProps.lock) { - if (nextProps.lock) { - this.preventScrolling(); - } else { - this.allowScrolling(); - } - } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.allowScrolling(); - } - - // force to only lock/unlock once - - }, { - key: 'preventScrolling', - value: function preventScrolling() { - if (this.locked === true) { - return; - } - - lockingCounter = lockingCounter + 1; - this.locked = true; - - // only lock the first time the component is mounted. - if (lockingCounter === 1) { - var body = document.getElementsByTagName('body')[0]; - originalBodyOverflow = body.style.overflow; - body.style.overflow = 'hidden'; - } - } - }, { - key: 'allowScrolling', - value: function allowScrolling() { - if (this.locked === true) { - lockingCounter = lockingCounter - 1; - this.locked = false; - } - - if (lockingCounter === 0 && originalBodyOverflow !== null) { - var body = document.getElementsByTagName('body')[0]; - body.style.overflow = originalBodyOverflow || ''; - originalBodyOverflow = null; - } - } - }, { - key: 'render', - value: function render() { - return null; - } - }]); - return AutoLockScrolling; -}(_react.Component); - - false ? AutoLockScrolling.propTypes = { - lock: _react.PropTypes.bool.isRequired + underlineDisabledStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the TextField's + * underline element when focussed. + */ + underlineFocusStyle: _react.PropTypes.object, + /** + * If true, shows the underline for the text field. + */ + underlineShow: _react.PropTypes.bool, + /** + * Override the inline-styles of the TextField's underline element. + */ + underlineStyle: _react.PropTypes.object, + /** + * The value of the text field. + */ + value: _react.PropTypes.any } : void 0; -exports.default = AutoLockScrolling; +exports.default = TextField; /***/ }), -/* 755 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58462,151 +62299,207 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _propTypes = __webpack_require__(41); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _transitions = __webpack_require__(10); +var _reactEventListener = __webpack_require__(40); -var _transitions2 = _interopRequireDefault(_transitions); +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props, context) { - var rounded = props.rounded, - circle = props.circle, - transitionEnabled = props.transitionEnabled, - zDepth = props.zDepth; - var _context$muiTheme = context.muiTheme, - baseTheme = _context$muiTheme.baseTheme, - paper = _context$muiTheme.paper; - +var rowsHeight = 24; +function getStyles(props, context, state) { return { root: { - color: paper.color, - backgroundColor: paper.backgroundColor, - transition: transitionEnabled && _transitions2.default.easeOut(), - boxSizing: 'border-box', - fontFamily: baseTheme.fontFamily, - WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) - boxShadow: paper.zDepthShadows[zDepth - 1], // No shadow for 0 depth papers - borderRadius: circle ? '50%' : rounded ? '2px' : '0px' + position: 'relative' }, + textarea: { + height: state.height, + width: '100%', + resize: 'none', + font: 'inherit', + padding: 0, + cursor: 'inherit' + }, + shadow: { + resize: 'none', + // Overflow also needed to here to remove the extra row + // added to textareas in Firefox. + overflow: 'hidden', + // Visibility needed to hide the extra text area on ipads + visibility: 'hidden', + position: 'absolute', + height: 'initial' } }; } -var Paper = function (_Component) { - (0, _inherits3.default)(Paper, _Component); +var EnhancedTextarea = function (_Component) { + (0, _inherits3.default)(EnhancedTextarea, _Component); - function Paper() { - (0, _classCallCheck3.default)(this, Paper); - return (0, _possibleConstructorReturn3.default)(this, (Paper.__proto__ || (0, _getPrototypeOf2.default)(Paper)).apply(this, arguments)); + function EnhancedTextarea() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, EnhancedTextarea); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedTextarea.__proto__ || (0, _getPrototypeOf2.default)(EnhancedTextarea)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + height: null + }, _this.handleResize = function (event) { + _this.syncHeightWithShadow(undefined, event); + }, _this.handleChange = function (event) { + _this.syncHeightWithShadow(event.target.value); + + if (_this.props.hasOwnProperty('valueLink')) { + _this.props.valueLink.requestChange(event.target.value); + } + + if (_this.props.onChange) { + _this.props.onChange(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(Paper, [{ + (0, _createClass3.default)(EnhancedTextarea, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + height: this.props.rows * rowsHeight + }); + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + this.syncHeightWithShadow(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== this.props.value) { + this.syncHeightWithShadow(nextProps.value); + } + } + }, { + key: 'getInputNode', + value: function getInputNode() { + return this.refs.input; + } + }, { + key: 'setValue', + value: function setValue(value) { + this.getInputNode().value = value; + this.syncHeightWithShadow(value); + } + }, { + key: 'syncHeightWithShadow', + value: function syncHeightWithShadow(newValue, event) { + var shadow = this.refs.shadow; + + if (newValue !== undefined) { + shadow.value = newValue; + } + + var newHeight = shadow.scrollHeight; + + // Guarding for jsdom, where scrollHeight isn't present. + // See https://github.com/tmpvar/jsdom/issues/1013 + if (newHeight === undefined) return; + + if (this.props.rowsMax >= this.props.rows) { + newHeight = Math.min(this.props.rowsMax * rowsHeight, newHeight); + } + + newHeight = Math.max(newHeight, rowsHeight); + + if (this.state.height !== newHeight) { + this.setState({ + height: newHeight + }); + + if (this.props.onHeightChange) { + this.props.onHeightChange(event, newHeight); + } + } + } + }, { key: 'render', value: function render() { var _props = this.props, - children = _props.children, - circle = _props.circle, - rounded = _props.rounded, + onChange = _props.onChange, + onHeightChange = _props.onHeightChange, + rows = _props.rows, + rowsMax = _props.rowsMax, + shadowStyle = _props.shadowStyle, style = _props.style, - transitionEnabled = _props.transitionEnabled, - zDepth = _props.zDepth, - other = (0, _objectWithoutProperties3.default)(_props, ['children', 'circle', 'rounded', 'style', 'transitionEnabled', 'zDepth']); + textareaStyle = _props.textareaStyle, + valueLink = _props.valueLink, + other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'onHeightChange', 'rows', 'rowsMax', 'shadowStyle', 'style', 'textareaStyle', 'valueLink']); var prepareStyles = this.context.muiTheme.prepareStyles; - var styles = getStyles(this.props, this.context); + var styles = getStyles(this.props, this.context, this.state); + var rootStyles = (0, _simpleAssign2.default)(styles.root, style); + var textareaStyles = (0, _simpleAssign2.default)(styles.textarea, textareaStyle); + var shadowStyles = (0, _simpleAssign2.default)({}, textareaStyles, styles.shadow, shadowStyle); + + if (this.props.hasOwnProperty('valueLink')) { + other.value = this.props.valueLink.value; + } return _react2.default.createElement( 'div', - (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), - children + { style: prepareStyles(rootStyles) }, + _react2.default.createElement(_reactEventListener2.default, { target: 'window', onResize: this.handleResize }), + _react2.default.createElement('textarea', { + ref: 'shadow', + style: prepareStyles(shadowStyles), + tabIndex: '-1', + rows: this.props.rows, + defaultValue: this.props.defaultValue, + readOnly: true, + value: this.props.value, + valueLink: this.props.valueLink + }), + _react2.default.createElement('textarea', (0, _extends3.default)({}, other, { + ref: 'input', + rows: this.props.rows, + style: prepareStyles(textareaStyles), + onChange: this.handleChange + })) ); } }]); - return Paper; + return EnhancedTextarea; }(_react.Component); -Paper.defaultProps = { - circle: false, - rounded: true, - transitionEnabled: true, - zDepth: 1 +EnhancedTextarea.defaultProps = { + rows: 1 }; -Paper.contextTypes = { +EnhancedTextarea.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? Paper.propTypes = { - /** - * Children passed into the paper element. - */ - children: _react.PropTypes.node, - /** - * Set to true to generate a circlular paper container. - */ - circle: _react.PropTypes.bool, - /** - * By default, the paper container will have a border radius. - * Set this to false to generate a container with sharp corners. - */ - rounded: _react.PropTypes.bool, + false ? EnhancedTextarea.propTypes = { + defaultValue: _react.PropTypes.any, + disabled: _react.PropTypes.bool, + onChange: _react.PropTypes.func, + onHeightChange: _react.PropTypes.func, + rows: _react.PropTypes.number, + rowsMax: _react.PropTypes.number, + shadowStyle: _react.PropTypes.object, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, - /** - * Set to false to disable CSS transitions for the paper element. - */ - transitionEnabled: _react.PropTypes.bool, - /** - * This number represents the zDepth of the paper shadow. - */ - zDepth: _propTypes2.default.zDepth + textareaStyle: _react.PropTypes.object, + value: _react.PropTypes.string, + valueLink: _react.PropTypes.object } : void 0; -exports.default = Paper; - -/***/ }), -/* 756 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _pure = __webpack_require__(25); - -var _pure2 = _interopRequireDefault(_pure); - -var _SvgIcon = __webpack_require__(26); - -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var ActionCode = function ActionCode(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z' }) - ); -}; -ActionCode = (0, _pure2.default)(ActionCode); -ActionCode.displayName = 'ActionCode'; -ActionCode.muiName = 'SvgIcon'; - -exports.default = ActionCode; +exports.default = EnhancedTextarea; /***/ }), -/* 757 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58615,36 +62508,24 @@ exports.default = ActionCode; Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = exports.MenuItem = exports.Menu = undefined; -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _pure = __webpack_require__(25); +var _Menu2 = __webpack_require__(205); -var _pure2 = _interopRequireDefault(_pure); +var _Menu3 = _interopRequireDefault(_Menu2); -var _SvgIcon = __webpack_require__(26); +var _MenuItem2 = __webpack_require__(97); -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); +var _MenuItem3 = _interopRequireDefault(_MenuItem2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var ActionShop = function ActionShop(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M16 6V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H2v13c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6h-6zm-6-2h4v2h-4V4zM9 18V9l7.5 4L9 18z' }) - ); -}; -ActionShop = (0, _pure2.default)(ActionShop); -ActionShop.displayName = 'ActionShop'; -ActionShop.muiName = 'SvgIcon'; - -exports.default = ActionShop; +exports.Menu = _Menu3.default; +exports.MenuItem = _MenuItem3.default; +exports.default = _Menu3.default; /***/ }), -/* 758 */ +/* 762 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58653,67 +62534,18 @@ exports.default = ActionShop; Object.defineProperty(exports, "__esModule", { value: true }); -exports.zIndex = exports.typography = exports.transitions = exports.spacing = exports.muiThemeable = exports.getMuiTheme = exports.LightRawTheme = exports.lightBaseTheme = exports.DarkRawTheme = exports.darkBaseTheme = exports.colors = exports.MuiThemeProvider = undefined; - -var _MuiThemeProvider2 = __webpack_require__(301); - -var _MuiThemeProvider3 = _interopRequireDefault(_MuiThemeProvider2); - -var _colors2 = __webpack_require__(57); - -var _colors = _interopRequireWildcard(_colors2); - -var _darkBaseTheme2 = __webpack_require__(759); - -var _darkBaseTheme3 = _interopRequireDefault(_darkBaseTheme2); - -var _lightBaseTheme2 = __webpack_require__(306); - -var _lightBaseTheme3 = _interopRequireDefault(_lightBaseTheme2); - -var _getMuiTheme2 = __webpack_require__(125); - -var _getMuiTheme3 = _interopRequireDefault(_getMuiTheme2); - -var _muiThemeable2 = __webpack_require__(760); - -var _muiThemeable3 = _interopRequireDefault(_muiThemeable2); - -var _spacing2 = __webpack_require__(192); - -var _spacing3 = _interopRequireDefault(_spacing2); - -var _transitions2 = __webpack_require__(10); - -var _transitions3 = _interopRequireDefault(_transitions2); - -var _typography2 = __webpack_require__(311); - -var _typography3 = _interopRequireDefault(_typography2); - -var _zIndex2 = __webpack_require__(307); +exports.default = undefined; -var _zIndex3 = _interopRequireDefault(_zIndex2); +var _Divider = __webpack_require__(763); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +var _Divider2 = _interopRequireDefault(_Divider); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.MuiThemeProvider = _MuiThemeProvider3.default; -exports.colors = _colors; -exports.darkBaseTheme = _darkBaseTheme3.default; -exports.DarkRawTheme = _darkBaseTheme3.default; -exports.lightBaseTheme = _lightBaseTheme3.default; -exports.LightRawTheme = _lightBaseTheme3.default; -exports.getMuiTheme = _getMuiTheme3.default; -exports.muiThemeable = _muiThemeable3.default; -exports.spacing = _spacing3.default; -exports.transitions = _transitions3.default; -exports.typography = _typography3.default; -exports.zIndex = _zIndex3.default; +exports.default = _Divider2.default; /***/ }), -/* 759 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58723,93 +62555,72 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _colors = __webpack_require__(57); - -var _colorManipulator = __webpack_require__(56); - -var _spacing = __webpack_require__(192); - -var _spacing2 = _interopRequireDefault(_spacing); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = { - spacing: _spacing2.default, - fontFamily: 'Roboto, sans-serif', - palette: { - primary1Color: _colors.cyan700, - primary2Color: _colors.cyan700, - primary3Color: _colors.grey600, - accent1Color: _colors.pinkA200, - accent2Color: _colors.pinkA400, - accent3Color: _colors.pinkA100, - textColor: _colors.fullWhite, - secondaryTextColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.7), - alternateTextColor: '#303030', - canvasColor: '#303030', - borderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), - disabledColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), - pickerHeaderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12), - clockCircleColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12) - } -}; - -/***/ }), -/* 760 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +var _extends2 = __webpack_require__(7); +var _extends3 = _interopRequireDefault(_extends2); -Object.defineProperty(exports, "__esModule", { - value: true -}); +var _objectWithoutProperties2 = __webpack_require__(8); -var _extends2 = __webpack_require__(7); +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var _extends3 = _interopRequireDefault(_extends2); +var _simpleAssign = __webpack_require__(6); -exports.default = muiThemeable; +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _getMuiTheme = __webpack_require__(125); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); +var Divider = function Divider(props, context) { + var inset = props.inset, + style = props.style, + other = (0, _objectWithoutProperties3.default)(props, ['inset', 'style']); + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + prepareStyles = _context$muiTheme.prepareStyles; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var DEFAULT_THEME = void 0; + var styles = { + root: { + margin: 0, + marginTop: -1, + marginLeft: inset ? 72 : 0, + height: 1, + border: 'none', + backgroundColor: baseTheme.palette.borderColor + } + }; -function getDefaultTheme() { - if (!DEFAULT_THEME) { - DEFAULT_THEME = (0, _getMuiTheme2.default)(); - } - return DEFAULT_THEME; -} + return _react2.default.createElement('hr', (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) })); +}; -function muiThemeable() { - return function (Component) { - var MuiComponent = function MuiComponent(props, context) { - var _context$muiTheme = context.muiTheme, - muiTheme = _context$muiTheme === undefined ? getDefaultTheme() : _context$muiTheme; +Divider.muiName = 'Divider'; + false ? Divider.propTypes = { + /** + * If true, the `Divider` will be indented. + */ + inset: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; - return _react2.default.createElement(Component, (0, _extends3.default)({ muiTheme: muiTheme }, props)); - }; +Divider.defaultProps = { + inset: false +}; - MuiComponent.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired - }; +Divider.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; - return MuiComponent; - }; -} +exports.default = Divider; /***/ }), -/* 761 */ +/* 764 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58819,65 +62630,43 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _react = __webpack_require__(0); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _react2 = _interopRequireDefault(_react); +var _Checkbox = __webpack_require__(207); -var _reactRedux = __webpack_require__(27); +var _Checkbox2 = _interopRequireDefault(_Checkbox); -var _Snackbar = __webpack_require__(762); +var _createComponent = __webpack_require__(41); -var _Snackbar2 = _interopRequireDefault(_Snackbar); +var _createComponent2 = _interopRequireDefault(_createComponent); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function NotificationBar(props) { - var notification = props.notification; - - return _react2.default.createElement(_Snackbar2.default, { - open: notification.message !== null, - message: notification.message === null ? '...' : notification.message, - autoHideDuration: 4000, - bodyStyle: { height: 'auto', lineHeight: '20px', padding: 24, marginLeft: 256, whiteSpace: 'pre-line' } - }); -} - -NotificationBar.propTypes = { - notification: _react.PropTypes.shape({ - message: _react.PropTypes.string - }) -}; - -function mapStateToProps(state) { - return { - notification: state.notification - }; -} - -exports.default = (0, _reactRedux.connect)(mapStateToProps)(NotificationBar); - -/***/ }), -/* 762 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; - -var _Snackbar = __webpack_require__(763); - -var _Snackbar2 = _interopRequireDefault(_Snackbar); +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +exports.default = (0, _createComponent2.default)(_Checkbox2.default, function (_ref) { + var _ref$input = _ref.input, + onChange = _ref$input.onChange, + value = _ref$input.value, + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']), + meta = _ref.meta, + _onCheck = _ref.onCheck, + defaultChecked = _ref.defaultChecked, + props = _objectWithoutProperties(_ref, ['input', 'meta', 'onCheck', 'defaultChecked']); -exports.default = _Snackbar2.default; + return _extends({}, inputProps, props, { + checked: value ? true : false, + onCheck: function onCheck(event, isInputChecked) { + onChange(isInputChecked); + if (_onCheck) { + _onCheck(isInputChecked); + } + } + }); +}); /***/ }), -/* 763 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58923,446 +62712,257 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); +var _EnhancedSwitch = __webpack_require__(208); + +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + var _transitions = __webpack_require__(10); var _transitions2 = _interopRequireDefault(_transitions); -var _ClickAwayListener = __webpack_require__(320); +var _checkBoxOutlineBlank = __webpack_require__(766); -var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener); +var _checkBoxOutlineBlank2 = _interopRequireDefault(_checkBoxOutlineBlank); -var _SnackbarBody = __webpack_require__(764); +var _checkBox = __webpack_require__(767); -var _SnackbarBody2 = _interopRequireDefault(_SnackbarBody); +var _checkBox2 = _interopRequireDefault(_checkBox); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props, context, state) { - var _context$muiTheme = context.muiTheme, - desktopSubheaderHeight = _context$muiTheme.baseTheme.spacing.desktopSubheaderHeight, - zIndex = _context$muiTheme.zIndex; - var open = state.open; +function getStyles(props, context) { + var checkbox = context.muiTheme.checkbox; + var checkboxSize = 24; - var styles = { - root: { - position: 'fixed', - left: '50%', - display: 'flex', - bottom: 0, - zIndex: zIndex.snackbar, - visibility: open ? 'visible' : 'hidden', - transform: open ? 'translate(-50%, 0)' : 'translate(-50%, ' + desktopSubheaderHeight + 'px)', - transition: _transitions2.default.easeOut('400ms', 'transform') + ', ' + _transitions2.default.easeOut('400ms', 'visibility') + return { + icon: { + height: checkboxSize, + width: checkboxSize + }, + check: { + position: 'absolute', + opacity: 0, + transform: 'scale(0)', + transitionOrigin: '50% 50%', + transition: _transitions2.default.easeOut('450ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('0ms', 'transform', '450ms'), + fill: checkbox.checkedColor + }, + checkWhenSwitched: { + opacity: 1, + transform: 'scale(1)', + transition: _transitions2.default.easeOut('0ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('800ms', 'transform', '0ms') + }, + checkWhenDisabled: { + fill: checkbox.disabledColor + }, + box: { + position: 'absolute', + opacity: 1, + fill: checkbox.boxColor, + transition: _transitions2.default.easeOut('1000ms', 'opacity', '200ms') + }, + boxWhenSwitched: { + opacity: 0, + transition: _transitions2.default.easeOut('650ms', 'opacity', '150ms'), + fill: checkbox.checkedColor + }, + boxWhenDisabled: { + fill: props.checked ? 'transparent' : checkbox.disabledColor + }, + label: { + color: props.disabled ? checkbox.labelDisabledColor : checkbox.labelColor } }; - - return styles; } -var Snackbar = function (_Component) { - (0, _inherits3.default)(Snackbar, _Component); +var Checkbox = function (_Component) { + (0, _inherits3.default)(Checkbox, _Component); - function Snackbar() { + function Checkbox() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, Snackbar); + (0, _classCallCheck3.default)(this, Checkbox); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Snackbar.__proto__ || (0, _getPrototypeOf2.default)(Snackbar)).call.apply(_ref, [this].concat(args))), _this), _this.componentClickAway = function () { - if (_this.timerTransitionId) { - // If transitioning, don't close the snackbar. - return; - } - - if (_this.props.open !== null && _this.props.onRequestClose) { - _this.props.onRequestClose('clickaway'); - } else { - _this.setState({ open: false }); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Checkbox.__proto__ || (0, _getPrototypeOf2.default)(Checkbox)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + switched: false + }, _this.handleStateChange = function (newSwitched) { + _this.setState({ + switched: newSwitched + }); + }, _this.handleCheck = function (event, isInputChecked) { + if (_this.props.onCheck) { + _this.props.onCheck(event, isInputChecked); } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(Snackbar, [{ + (0, _createClass3.default)(Checkbox, [{ key: 'componentWillMount', value: function componentWillMount() { - this.setState({ - open: this.props.open, - message: this.props.message, - action: this.props.action - }); - } - }, { - key: 'componentDidMount', - value: function componentDidMount() { - if (this.state.open) { - this.setAutoHideTimer(); - this.setTransitionTimer(); + var _props = this.props, + checked = _props.checked, + defaultChecked = _props.defaultChecked, + valueLink = _props.valueLink; + + + if (checked || defaultChecked || valueLink && valueLink.value) { + this.setState({ + switched: true + }); } } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { - var _this2 = this; - - if (this.props.open && nextProps.open && (nextProps.message !== this.props.message || nextProps.action !== this.props.action)) { - this.setState({ - open: false - }); - - clearTimeout(this.timerOneAtTheTimeId); - this.timerOneAtTheTimeId = setTimeout(function () { - _this2.setState({ - message: nextProps.message, - action: nextProps.action, - open: true - }); - }, 400); - } else { - var open = nextProps.open; - + if (this.props.checked !== nextProps.checked) { this.setState({ - open: open !== null ? open : this.state.open, - message: nextProps.message, - action: nextProps.action + switched: nextProps.checked }); } } }, { - key: 'componentDidUpdate', - value: function componentDidUpdate(prevProps, prevState) { - if (prevState.open !== this.state.open) { - if (this.state.open) { - this.setAutoHideTimer(); - this.setTransitionTimer(); - } else { - clearTimeout(this.timerAutoHideId); - } - } + key: 'isChecked', + value: function isChecked() { + return this.refs.enhancedSwitch.isSwitched(); } }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - clearTimeout(this.timerAutoHideId); - clearTimeout(this.timerTransitionId); - clearTimeout(this.timerOneAtTheTimeId); + key: 'setChecked', + value: function setChecked(newCheckedValue) { + this.refs.enhancedSwitch.setSwitched(newCheckedValue); } }, { - key: 'setAutoHideTimer', - + key: 'render', + value: function render() { + var _props2 = this.props, + iconStyle = _props2.iconStyle, + onCheck = _props2.onCheck, + checkedIcon = _props2.checkedIcon, + uncheckedIcon = _props2.uncheckedIcon, + other = (0, _objectWithoutProperties3.default)(_props2, ['iconStyle', 'onCheck', 'checkedIcon', 'uncheckedIcon']); - // Timer that controls delay before snackbar auto hides - value: function setAutoHideTimer() { - var _this3 = this; + var styles = getStyles(this.props, this.context); + var boxStyles = (0, _simpleAssign2.default)(styles.box, this.state.switched && styles.boxWhenSwitched, iconStyle, this.props.disabled && styles.boxWhenDisabled); + var checkStyles = (0, _simpleAssign2.default)(styles.check, this.state.switched && styles.checkWhenSwitched, iconStyle, this.props.disabled && styles.checkWhenDisabled); - var autoHideDuration = this.props.autoHideDuration; + var checkedElement = checkedIcon ? _react2.default.cloneElement(checkedIcon, { + style: (0, _simpleAssign2.default)(checkStyles, checkedIcon.props.style) + }) : _react2.default.createElement(_checkBox2.default, { + style: checkStyles + }); - if (autoHideDuration > 0) { - clearTimeout(this.timerAutoHideId); - this.timerAutoHideId = setTimeout(function () { - if (_this3.props.open !== null && _this3.props.onRequestClose) { - _this3.props.onRequestClose('timeout'); - } else { - _this3.setState({ open: false }); - } - }, autoHideDuration); - } - } + var unCheckedElement = uncheckedIcon ? _react2.default.cloneElement(uncheckedIcon, { + style: (0, _simpleAssign2.default)(boxStyles, uncheckedIcon.props.style) + }) : _react2.default.createElement(_checkBoxOutlineBlank2.default, { + style: boxStyles + }); - // Timer that controls delay before click-away events are captured (based on when animation completes) + var checkboxElement = _react2.default.createElement( + 'div', + null, + unCheckedElement, + checkedElement + ); - }, { - key: 'setTransitionTimer', - value: function setTransitionTimer() { - var _this4 = this; + var rippleColor = this.state.switched ? checkStyles.fill : boxStyles.fill; + var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle); - this.timerTransitionId = setTimeout(function () { - _this4.timerTransitionId = undefined; - }, 400); - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - autoHideDuration = _props.autoHideDuration, - contentStyle = _props.contentStyle, - bodyStyle = _props.bodyStyle, - messageProp = _props.message, - onRequestClose = _props.onRequestClose, - onActionTouchTap = _props.onActionTouchTap, - style = _props.style, - other = (0, _objectWithoutProperties3.default)(_props, ['autoHideDuration', 'contentStyle', 'bodyStyle', 'message', 'onRequestClose', 'onActionTouchTap', 'style']); - var _state = this.state, - action = _state.action, - message = _state.message, - open = _state.open; - var prepareStyles = this.context.muiTheme.prepareStyles; + var labelStyle = (0, _simpleAssign2.default)(styles.label, this.props.labelStyle); - var styles = getStyles(this.props, this.context, this.state); + var enhancedSwitchProps = { + ref: 'enhancedSwitch', + inputType: 'checkbox', + switched: this.state.switched, + switchElement: checkboxElement, + rippleColor: rippleColor, + iconStyle: mergedIconStyle, + onSwitch: this.handleCheck, + labelStyle: labelStyle, + onParentShouldUpdate: this.handleStateChange, + labelPosition: this.props.labelPosition + }; - return _react2.default.createElement( - _ClickAwayListener2.default, - { onClickAway: open ? this.componentClickAway : null }, - _react2.default.createElement( - 'div', - (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), - _react2.default.createElement(_SnackbarBody2.default, { - action: action, - contentStyle: contentStyle, - message: message, - open: open, - onActionTouchTap: onActionTouchTap, - style: bodyStyle - }) - ) - ); + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps)); } }]); - return Snackbar; + return Checkbox; }(_react.Component); -Snackbar.contextTypes = { +Checkbox.defaultProps = { + labelPosition: 'right', + disabled: false +}; +Checkbox.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? Snackbar.propTypes = { - /** - * The label for the action on the snackbar. - */ - action: _react.PropTypes.node, - /** - * The number of milliseconds to wait before automatically dismissing. - * If no value is specified the snackbar will dismiss normally. - * If a value is provided the snackbar can still be dismissed normally. - * If a snackbar is dismissed before the timer expires, the timer will be cleared. - */ - autoHideDuration: _react.PropTypes.number, - /** - * Override the inline-styles of the body element. - */ - bodyStyle: _react.PropTypes.object, - /** - * The css class name of the root element. - */ - className: _react.PropTypes.string, - /** - * Override the inline-styles of the content element. - */ - contentStyle: _react.PropTypes.object, + false ? Checkbox.propTypes = { /** - * The message to be displayed. - * - * (Note: If the message is an element or array, and the `Snackbar` may re-render while it is still open, - * ensure that the same object remains as the `message` property if you want to avoid the `Snackbar` hiding and - * showing again) + * Checkbox is checked if true. */ - message: _react.PropTypes.node.isRequired, + checked: _react.PropTypes.bool, /** - * Fired when the action button is touchtapped. - * - * @param {object} event Action button event. + * The SvgIcon to use for the checked state. + * This is useful to create icon toggles. */ - onActionTouchTap: _react.PropTypes.func, + checkedIcon: _react.PropTypes.element, /** - * Fired when the `Snackbar` is requested to be closed by a click outside the `Snackbar`, or after the - * `autoHideDuration` timer expires. - * - * Typically `onRequestClose` is used to set state in the parent component, which is used to control the `Snackbar` - * `open` prop. - * - * The `reason` parameter can optionally be used to control the response to `onRequestClose`, - * for example ignoring `clickaway`. - * - * @param {string} reason Can be:`"timeout"` (`autoHideDuration` expired) or: `"clickaway"` + * The default state of our checkbox component. + * **Warning:** This cannot be used in conjunction with `checked`. + * Decide between using a controlled or uncontrolled input element and remove one of these props. + * More info: https://fb.me/react-controlled-components */ - onRequestClose: _react.PropTypes.func, + defaultChecked: _react.PropTypes.bool, /** - * Controls whether the `Snackbar` is opened or not. + * Disabled if true. */ - open: _react.PropTypes.bool.isRequired, + disabled: _react.PropTypes.bool, /** - * Override the inline-styles of the root element. + * Overrides the inline-styles of the icon element. */ - style: _react.PropTypes.object -} : void 0; -exports.default = Snackbar; - -/***/ }), -/* 764 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.SnackbarBody = undefined; - -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _transitions = __webpack_require__(10); - -var _transitions2 = _interopRequireDefault(_transitions); - -var _withWidth = __webpack_require__(765); - -var _withWidth2 = _interopRequireDefault(_withWidth); - -var _FlatButton = __webpack_require__(198); - -var _FlatButton2 = _interopRequireDefault(_FlatButton); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getStyles(props, context) { - var open = props.open, - width = props.width; - var _context$muiTheme = context.muiTheme, - _context$muiTheme$bas = _context$muiTheme.baseTheme, - _context$muiTheme$bas2 = _context$muiTheme$bas.spacing, - desktopGutter = _context$muiTheme$bas2.desktopGutter, - desktopSubheaderHeight = _context$muiTheme$bas2.desktopSubheaderHeight, - fontFamily = _context$muiTheme$bas.fontFamily, - _context$muiTheme$sna = _context$muiTheme.snackbar, - backgroundColor = _context$muiTheme$sna.backgroundColor, - textColor = _context$muiTheme$sna.textColor, - actionColor = _context$muiTheme$sna.actionColor; - - - var isSmall = width === _withWidth.SMALL; - - var styles = { - root: { - fontFamily: fontFamily, - backgroundColor: backgroundColor, - padding: '0 ' + desktopGutter + 'px', - height: desktopSubheaderHeight, - lineHeight: desktopSubheaderHeight + 'px', - borderRadius: isSmall ? 0 : 2, - maxWidth: isSmall ? 'inherit' : 568, - minWidth: isSmall ? 'inherit' : 288, - width: isSmall ? 'calc(100vw - ' + desktopGutter * 2 + 'px)' : 'auto', - flexGrow: isSmall ? 1 : 0 - }, - content: { - fontSize: 14, - color: textColor, - opacity: open ? 1 : 0, - transition: open ? _transitions2.default.easeOut('500ms', 'opacity', '100ms') : _transitions2.default.easeOut('400ms', 'opacity') - }, - action: { - color: actionColor, - float: 'right', - marginTop: 6, - marginRight: -16, - marginLeft: desktopGutter, - backgroundColor: 'transparent' - } - }; - - return styles; -} - -var SnackbarBody = exports.SnackbarBody = function SnackbarBody(props, context) { - var action = props.action, - contentStyle = props.contentStyle, - message = props.message, - open = props.open, - onActionTouchTap = props.onActionTouchTap, - style = props.style, - other = (0, _objectWithoutProperties3.default)(props, ['action', 'contentStyle', 'message', 'open', 'onActionTouchTap', 'style']); - var prepareStyles = context.muiTheme.prepareStyles; - - var styles = getStyles(props, context); - - var actionButton = action && _react2.default.createElement(_FlatButton2.default, { - style: styles.action, - label: action, - onTouchTap: onActionTouchTap - }); - - return _react2.default.createElement( - 'div', - (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), - _react2.default.createElement( - 'div', - { style: prepareStyles((0, _simpleAssign2.default)(styles.content, contentStyle)) }, - _react2.default.createElement( - 'span', - null, - message - ), - actionButton - ) - ); -}; - - false ? SnackbarBody.propTypes = { + iconStyle: _react.PropTypes.object, /** - * The label for the action on the snackbar. + * Overrides the inline-styles of the input element. */ - action: _react.PropTypes.node, + inputStyle: _react.PropTypes.object, /** - * Override the inline-styles of the content element. + * Where the label will be placed next to the checkbox. */ - contentStyle: _react.PropTypes.object, + labelPosition: _react.PropTypes.oneOf(['left', 'right']), /** - * The message to be displayed. - * - * (Note: If the message is an element or array, and the `Snackbar` may re-render while it is still open, - * ensure that the same object remains as the `message` property if you want to avoid the `Snackbar` hiding and - * showing again) + * Overrides the inline-styles of the Checkbox element label. */ - message: _react.PropTypes.node.isRequired, + labelStyle: _react.PropTypes.object, /** - * Fired when the action button is touchtapped. + * Callback function that is fired when the checkbox is checked. * - * @param {object} event Action button event. - */ - onActionTouchTap: _react.PropTypes.func, - /** - * @ignore - * Controls whether the `Snackbar` is opened or not. + * @param {object} event `change` event targeting the underlying checkbox `input`. + * @param {boolean} isInputChecked The `checked` value of the underlying checkbox `input`. */ - open: _react.PropTypes.bool.isRequired, + onCheck: _react.PropTypes.func, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, /** - * @ignore - * Width of the screen. + * The SvgIcon to use for the unchecked state. + * This is useful to create icon toggles. + */ + uncheckedIcon: _react.PropTypes.element, + /** + * ValueLink for when using controlled checkbox. */ - width: _react.PropTypes.number.isRequired + valueLink: _react.PropTypes.object } : void 0; - -SnackbarBody.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - -exports.default = (0, _withWidth2.default)()(SnackbarBody); +exports.default = Checkbox; /***/ }), -/* 765 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59371,149 +62971,141 @@ exports.default = (0, _withWidth2.default)()(SnackbarBody); Object.defineProperty(exports, "__esModule", { value: true }); -exports.LARGE = exports.MEDIUM = exports.SMALL = undefined; -var _extends2 = __webpack_require__(7); +var _react = __webpack_require__(0); -var _extends3 = _interopRequireDefault(_extends2); +var _react2 = _interopRequireDefault(_react); -var _getPrototypeOf = __webpack_require__(3); +var _pure = __webpack_require__(20); -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _pure2 = _interopRequireDefault(_pure); -var _classCallCheck2 = __webpack_require__(1); +var _SvgIcon = __webpack_require__(21); -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); -var _createClass2 = __webpack_require__(2); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _createClass3 = _interopRequireDefault(_createClass2); +var ToggleCheckBoxOutlineBlank = function ToggleCheckBoxOutlineBlank(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z' }) + ); +}; +ToggleCheckBoxOutlineBlank = (0, _pure2.default)(ToggleCheckBoxOutlineBlank); +ToggleCheckBoxOutlineBlank.displayName = 'ToggleCheckBoxOutlineBlank'; +ToggleCheckBoxOutlineBlank.muiName = 'SvgIcon'; -var _possibleConstructorReturn2 = __webpack_require__(4); +exports.default = ToggleCheckBoxOutlineBlank; -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); +/***/ }), +/* 767 */ +/***/ (function(module, exports, __webpack_require__) { -var _inherits2 = __webpack_require__(5); +"use strict"; -var _inherits3 = _interopRequireDefault(_inherits2); -exports.default = withWidth; +Object.defineProperty(exports, "__esModule", { + value: true +}); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactEventListener = __webpack_require__(42); +var _pure = __webpack_require__(20); -var _reactEventListener2 = _interopRequireDefault(_reactEventListener); +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(21); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var SMALL = exports.SMALL = 1; -var MEDIUM = exports.MEDIUM = 2; -var LARGE = exports.LARGE = 3; +var ToggleCheckBox = function ToggleCheckBox(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z' }) + ); +}; +ToggleCheckBox = (0, _pure2.default)(ToggleCheckBox); +ToggleCheckBox.displayName = 'ToggleCheckBox'; +ToggleCheckBox.muiName = 'SvgIcon'; -function withWidth() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var _options$largeWidth = options.largeWidth, - largeWidth = _options$largeWidth === undefined ? 992 : _options$largeWidth, - _options$mediumWidth = options.mediumWidth, - mediumWidth = _options$mediumWidth === undefined ? 768 : _options$mediumWidth, - _options$resizeInterv = options.resizeInterval, - resizeInterval = _options$resizeInterv === undefined ? 166 : _options$resizeInterv; +exports.default = ToggleCheckBox; +/***/ }), +/* 768 */ +/***/ (function(module, exports, __webpack_require__) { - return function (MyComponent) { - return function (_Component) { - (0, _inherits3.default)(WithWidth, _Component); +"use strict"; - function WithWidth() { - var _ref; - var _temp, _this, _ret; +Object.defineProperty(exports, "__esModule", { + value: true +}); - (0, _classCallCheck3.default)(this, WithWidth); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +var _DatePicker = __webpack_require__(769); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = WithWidth.__proto__ || (0, _getPrototypeOf2.default)(WithWidth)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - width: null - }, _this.handleResize = function () { - clearTimeout(_this.deferTimer); - _this.deferTimer = setTimeout(function () { - _this.updateWidth(); - }, resizeInterval); - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); +var _DatePicker2 = _interopRequireDefault(_DatePicker); + +var _createComponent = __webpack_require__(41); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(66); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_DatePicker2.default, function (_ref) { + var _ref$input = _ref.input, + onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onBlur']), + defaultDate = _ref.defaultDate, + _onChange = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'defaultDate', 'onChange']); + + return _extends({}, inputProps, (0, _mapError2.default)(props), { + onChange: function onChange(event, value) { + inputProps.onChange(value); + if (_onChange) { + _onChange(value); } + } + }); +}); - (0, _createClass3.default)(WithWidth, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.updateWidth(); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - clearTimeout(this.deferTimer); - } - }, { - key: 'updateWidth', - value: function updateWidth() { - var innerWidth = window.innerWidth; - var width = void 0; +/***/ }), +/* 769 */ +/***/ (function(module, exports, __webpack_require__) { - if (innerWidth >= largeWidth) { - width = LARGE; - } else if (innerWidth >= mediumWidth) { - width = MEDIUM; - } else { - // innerWidth < 768 - width = SMALL; - } +"use strict"; - if (width !== this.state.width) { - this.setState({ - width: width - }); - } - } - }, { - key: 'render', - value: function render() { - var width = this.state.width; - /** - * When rendering the component on the server, - * we have no idea about the screen width. - * In order to prevent blinks and help the reconciliation - * we are not rendering the component. - * - * A better alternative would be to send client hints. - * But the browser support of this API is low: - * http://caniuse.com/#search=client%20hint - */ - if (width === null) { - return null; - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; - return _react2.default.createElement( - _reactEventListener2.default, - { target: 'window', onResize: this.handleResize }, - _react2.default.createElement(MyComponent, (0, _extends3.default)({ - width: width - }, this.props)) - ); - } - }]); - return WithWidth; - }(_react.Component); - }; -} +var _DatePicker = __webpack_require__(770); + +var _DatePicker2 = _interopRequireDefault(_DatePicker); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _DatePicker2.default; /***/ }), -/* 766 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59559,291 +63151,355 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(10); - -var _transitions2 = _interopRequireDefault(_transitions); - -var _childUtils = __webpack_require__(127); +var _dateUtils = __webpack_require__(85); -var _colorManipulator = __webpack_require__(56); +var _DatePickerDialog = __webpack_require__(771); -var _EnhancedButton = __webpack_require__(59); - -var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); +var _DatePickerDialog2 = _interopRequireDefault(_DatePickerDialog); -var _FlatButtonLabel = __webpack_require__(767); +var _TextField = __webpack_require__(99); -var _FlatButtonLabel2 = _interopRequireDefault(_FlatButtonLabel); +var _TextField2 = _interopRequireDefault(_TextField); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function validateLabel(props, propName, componentName) { - if (false) { - if (!props.children && props.label !== 0 && !props.label && !props.icon) { - return new Error('Required prop label or children or icon was not specified in ' + componentName + '.'); - } - } -} - -var FlatButton = function (_Component) { - (0, _inherits3.default)(FlatButton, _Component); +var DatePicker = function (_Component) { + (0, _inherits3.default)(DatePicker, _Component); - function FlatButton() { + function DatePicker() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, FlatButton); + (0, _classCallCheck3.default)(this, DatePicker); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FlatButton.__proto__ || (0, _getPrototypeOf2.default)(FlatButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - hovered: false, - isKeyboardFocused: false, - touch: false - }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { - _this.setState({ isKeyboardFocused: isKeyboardFocused }); - _this.props.onKeyboardFocus(event, isKeyboardFocused); - }, _this.handleMouseEnter = function (event) { - // Cancel hover styles for touch devices - if (!_this.state.touch) _this.setState({ hovered: true }); - _this.props.onMouseEnter(event); - }, _this.handleMouseLeave = function (event) { - _this.setState({ hovered: false }); - _this.props.onMouseLeave(event); - }, _this.handleTouchStart = function (event) { - _this.setState({ touch: true }); - _this.props.onTouchStart(event); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePicker.__proto__ || (0, _getPrototypeOf2.default)(DatePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + date: undefined + }, _this.handleAccept = function (date) { + if (!_this.isControlled()) { + _this.setState({ + date: date + }); + } + if (_this.props.onChange) { + _this.props.onChange(null, date); + } + }, _this.handleFocus = function (event) { + event.target.blur(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + + if (!_this.props.disabled) { + setTimeout(function () { + _this.openDialog(); + }, 0); + } + }, _this.formatDate = function (date) { + if (_this.props.locale) { + var DateTimeFormat = _this.props.DateTimeFormat || _dateUtils.dateTimeFormat; + return new DateTimeFormat(_this.props.locale, { + day: 'numeric', + month: 'numeric', + year: 'numeric' + }).format(date); + } else { + return (0, _dateUtils.formatIso)(date); + } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(FlatButton, [{ + (0, _createClass3.default)(DatePicker, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + date: this.isControlled() ? this.getControlledDate() : this.props.defaultDate + }); + } + }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { - if (nextProps.disabled) { - this.setState({ - hovered: false - }); + if (this.isControlled()) { + var newDate = this.getControlledDate(nextProps); + if (!(0, _dateUtils.isEqualDate)(this.state.date, newDate)) { + this.setState({ + date: newDate + }); + } } } }, { - key: 'render', - value: function render() { - var _props = this.props, - children = _props.children, - disabled = _props.disabled, - hoverColor = _props.hoverColor, - backgroundColor = _props.backgroundColor, - icon = _props.icon, - label = _props.label, - labelStyle = _props.labelStyle, - labelPosition = _props.labelPosition, - primary = _props.primary, - rippleColor = _props.rippleColor, - secondary = _props.secondary, - style = _props.style, - other = (0, _objectWithoutProperties3.default)(_props, ['children', 'disabled', 'hoverColor', 'backgroundColor', 'icon', 'label', 'labelStyle', 'labelPosition', 'primary', 'rippleColor', 'secondary', 'style']); - var _context$muiTheme = this.context.muiTheme, - _context$muiTheme$but = _context$muiTheme.button, - buttonHeight = _context$muiTheme$but.height, - buttonMinWidth = _context$muiTheme$but.minWidth, - buttonTextTransform = _context$muiTheme$but.textTransform, - _context$muiTheme$fla = _context$muiTheme.flatButton, - buttonFilterColor = _context$muiTheme$fla.buttonFilterColor, - buttonColor = _context$muiTheme$fla.color, - disabledTextColor = _context$muiTheme$fla.disabledTextColor, - fontSize = _context$muiTheme$fla.fontSize, - fontWeight = _context$muiTheme$fla.fontWeight, - primaryTextColor = _context$muiTheme$fla.primaryTextColor, - secondaryTextColor = _context$muiTheme$fla.secondaryTextColor, - textColor = _context$muiTheme$fla.textColor, - _context$muiTheme$fla2 = _context$muiTheme$fla.textTransform, - textTransform = _context$muiTheme$fla2 === undefined ? buttonTextTransform || 'uppercase' : _context$muiTheme$fla2; - - var defaultTextColor = disabled ? disabledTextColor : primary ? primaryTextColor : secondary ? secondaryTextColor : textColor; - - var defaultHoverColor = (0, _colorManipulator.fade)(buttonFilterColor, 0.2); - var defaultRippleColor = buttonFilterColor; - var buttonHoverColor = hoverColor || defaultHoverColor; - var buttonRippleColor = rippleColor || defaultRippleColor; - var buttonBackgroundColor = backgroundColor || buttonColor; - var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled; - - var mergedRootStyles = (0, _simpleAssign2.default)({}, { - height: buttonHeight, - lineHeight: buttonHeight + 'px', - minWidth: buttonMinWidth, - color: defaultTextColor, - transition: _transitions2.default.easeOut(), - borderRadius: 2, - userSelect: 'none', - overflow: 'hidden', - backgroundColor: hovered ? buttonHoverColor : buttonBackgroundColor, - padding: 0, - margin: 0, - textAlign: 'center' - }, style); - - var iconCloned = void 0; - var labelStyleIcon = {}; + key: 'getDate', + value: function getDate() { + return this.state.date; + } - if (icon) { - var iconStyles = (0, _simpleAssign2.default)({ - verticalAlign: 'middle', - marginLeft: label && labelPosition !== 'before' ? 12 : 0, - marginRight: label && labelPosition === 'before' ? 12 : 0 - }, icon.props.style); - iconCloned = _react2.default.cloneElement(icon, { - color: icon.props.color || mergedRootStyles.color, - style: iconStyles - }); + /** + * Open the date-picker dialog programmatically from a parent. + */ - if (labelPosition === 'before') { - labelStyleIcon.paddingRight = 8; - } else { - labelStyleIcon.paddingLeft = 8; - } + }, { + key: 'openDialog', + value: function openDialog() { + /** + * if the date is not selected then set it to new date + * (get the current system date while doing so) + * else set it to the currently selected date + */ + if (this.state.date !== undefined) { + this.setState({ + dialogDate: this.getDate() + }, this.refs.dialogWindow.show); + } else { + this.setState({ + dialogDate: new Date() + }, this.refs.dialogWindow.show); } + } - var mergedLabelStyles = (0, _simpleAssign2.default)({ - letterSpacing: 0, - textTransform: textTransform, - fontWeight: fontWeight, - fontSize: fontSize - }, labelStyleIcon, labelStyle); + /** + * Alias for `openDialog()` for an api consistent with TextField. + */ - var labelElement = label ? _react2.default.createElement(_FlatButtonLabel2.default, { label: label, style: mergedLabelStyles }) : undefined; + }, { + key: 'focus', + value: function focus() { + this.openDialog(); + } + }, { + key: 'isControlled', + value: function isControlled() { + return this.props.hasOwnProperty('value'); + } + }, { + key: 'getControlledDate', + value: function getControlledDate() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; - // Place label before or after children. - var childrenFragment = labelPosition === 'before' ? { - labelElement: labelElement, - iconCloned: iconCloned, - children: children - } : { - children: children, - iconCloned: iconCloned, - labelElement: labelElement - }; + if (props.value instanceof Date) { + return props.value; + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + autoOk = _props.autoOk, + cancelLabel = _props.cancelLabel, + className = _props.className, + container = _props.container, + defaultDate = _props.defaultDate, + dialogContainerStyle = _props.dialogContainerStyle, + disableYearSelection = _props.disableYearSelection, + firstDayOfWeek = _props.firstDayOfWeek, + formatDateProp = _props.formatDate, + locale = _props.locale, + maxDate = _props.maxDate, + minDate = _props.minDate, + mode = _props.mode, + okLabel = _props.okLabel, + onDismiss = _props.onDismiss, + onFocus = _props.onFocus, + onShow = _props.onShow, + onTouchTap = _props.onTouchTap, + shouldDisableDate = _props.shouldDisableDate, + style = _props.style, + textFieldStyle = _props.textFieldStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'className', 'container', 'defaultDate', 'dialogContainerStyle', 'disableYearSelection', 'firstDayOfWeek', 'formatDate', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onDismiss', 'onFocus', 'onShow', 'onTouchTap', 'shouldDisableDate', 'style', 'textFieldStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; - var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment); + var formatDate = formatDateProp || this.formatDate; return _react2.default.createElement( - _EnhancedButton2.default, - (0, _extends3.default)({}, other, { - disabled: disabled, - focusRippleColor: buttonRippleColor, - focusRippleOpacity: 0.3, - onKeyboardFocus: this.handleKeyboardFocus, - onMouseLeave: this.handleMouseLeave, - onMouseEnter: this.handleMouseEnter, - onTouchStart: this.handleTouchStart, - style: mergedRootStyles, - touchRippleColor: buttonRippleColor, - touchRippleOpacity: 0.3 - }), - enhancedButtonChildren + 'div', + { className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + onFocus: this.handleFocus, + onTouchTap: this.handleTouchTap, + ref: 'input', + style: textFieldStyle, + value: this.state.date ? formatDate(this.state.date) : '' + })), + _react2.default.createElement(_DatePickerDialog2.default, { + DateTimeFormat: DateTimeFormat, + autoOk: autoOk, + cancelLabel: cancelLabel, + container: container, + containerStyle: dialogContainerStyle, + disableYearSelection: disableYearSelection, + firstDayOfWeek: firstDayOfWeek, + initialDate: this.state.dialogDate, + locale: locale, + maxDate: maxDate, + minDate: minDate, + mode: mode, + okLabel: okLabel, + onAccept: this.handleAccept, + onShow: onShow, + onDismiss: onDismiss, + ref: 'dialogWindow', + shouldDisableDate: shouldDisableDate + }) ); } }]); - return FlatButton; + return DatePicker; }(_react.Component); -FlatButton.muiName = 'FlatButton'; -FlatButton.defaultProps = { +DatePicker.defaultProps = { + autoOk: false, + container: 'dialog', disabled: false, - labelStyle: {}, - labelPosition: 'after', - onKeyboardFocus: function onKeyboardFocus() {}, - onMouseEnter: function onMouseEnter() {}, - onMouseLeave: function onMouseLeave() {}, - onTouchStart: function onTouchStart() {}, - primary: false, - secondary: false + disableYearSelection: false, + firstDayOfWeek: 1, + style: {} }; -FlatButton.contextTypes = { +DatePicker.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? FlatButton.propTypes = { + false ? DatePicker.propTypes = { /** - * Color of button when mouse is not hovering over it. + * Constructor for date formatting for the specified `locale`. + * The constructor must follow this specification: ECMAScript Internationalization API 1.0 (ECMA-402). + * `Intl.DateTimeFormat` is supported by most modern browsers, see http://caniuse.com/#search=intl, + * otherwise https://github.com/andyearnshaw/Intl.js is a good polyfill. + * + * By default, a built-in `DateTimeFormat` is used which supports the 'en-US' `locale`. */ - backgroundColor: _react.PropTypes.string, + DateTimeFormat: _react.PropTypes.func, /** - * This is what will be displayed inside the button. - * If a label is specified, the text within the label prop will - * be displayed. Otherwise, the component will expect children - * which will then be displayed. (In our example, - * we are nesting an `` and a `span` - * that acts as our label to be displayed.) This only - * applies to flat and raised buttons. + * If true, automatically accept and close the picker on select a date. */ - children: _react.PropTypes.node, + autoOk: _react.PropTypes.bool, /** - * Disables the button if set to true. + * Override the default text of the 'Cancel' button. + */ + cancelLabel: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Used to control how the Date Picker will be displayed when the input field is focused. + * `dialog` (default) displays the DatePicker as a dialog with a modal. + * `inline` displays the DatePicker below the input field (similar to auto complete). + */ + container: _react.PropTypes.oneOf(['dialog', 'inline']), + /** + * This is the initial date value of the component. + * If either `value` or `valueLink` is provided they will override this + * prop with `value` taking precedence. + */ + defaultDate: _react.PropTypes.object, + /** + * Override the inline-styles of DatePickerDialog's Container element. + */ + dialogContainerStyle: _react.PropTypes.object, + /** + * Disables the year selection in the date picker. + */ + disableYearSelection: _react.PropTypes.bool, + /** + * Disables the DatePicker. */ disabled: _react.PropTypes.bool, /** - * Color of button when mouse hovers over. + * Used to change the first day of week. It varies from + * Saturday to Monday between different locales. + * The allowed range is 0 (Sunday) to 6 (Saturday). + * The default is `1`, Monday, as per ISO 8601. */ - hoverColor: _react.PropTypes.string, + firstDayOfWeek: _react.PropTypes.number, /** - * The URL to link to when the button is clicked. + * This function is called to format the date displayed in the input field, and should return a string. + * By default if no `locale` and `DateTimeFormat` is provided date objects are formatted to ISO 8601 YYYY-MM-DD. + * + * @param {object} date Date object to be formatted. + * @returns {any} The formatted date. */ - href: _react.PropTypes.string, + formatDate: _react.PropTypes.func, /** - * Use this property to display an icon. + * Locale used for formatting the `DatePicker` date strings. Other than for 'en-US', you + * must provide a `DateTimeFormat` that supports the chosen `locale`. */ - icon: _react.PropTypes.node, + locale: _react.PropTypes.string, /** - * Label for the button. + * The ending of a range of valid dates. The range includes the endDate. + * The default value is current date + 100 years. */ - label: validateLabel, + maxDate: _react.PropTypes.object, /** - * Place label before or after the passed children. + * The beginning of a range of valid dates. The range includes the startDate. + * The default value is current date - 100 years. */ - labelPosition: _react.PropTypes.oneOf(['before', 'after']), + minDate: _react.PropTypes.object, /** - * Override the inline-styles of the button's label element. + * Tells the component to display the picker in portrait or landscape mode. */ - labelStyle: _react.PropTypes.object, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), /** - * Callback function fired when the element is focused or blurred by the keyboard. + * Override the default text of the 'OK' button. + */ + okLabel: _react.PropTypes.node, + /** + * Callback function that is fired when the date value changes. * - * @param {object} event `focus` or `blur` event targeting the element. - * @param {boolean} isKeyboardFocused Indicates whether the element is focused. + * @param {null} null Since there is no particular event associated with the change, + * the first argument will always be null. + * @param {object} date The new date. */ - onKeyboardFocus: _react.PropTypes.func, - /** @ignore */ - onMouseEnter: _react.PropTypes.func, - /** @ignore */ - onMouseLeave: _react.PropTypes.func, - /** @ignore */ - onTouchStart: _react.PropTypes.func, + onChange: _react.PropTypes.func, /** - * If true, colors button according to - * primaryTextColor from the Theme. + * Callback function that is fired when the Date Picker's dialog is dismissed. */ - primary: _react.PropTypes.bool, + onDismiss: _react.PropTypes.func, /** - * Color for the ripple after button is clicked. + * Callback function that is fired when the Date Picker's `TextField` gains focus. */ - rippleColor: _react.PropTypes.string, + onFocus: _react.PropTypes.func, /** - * If true, colors button according to secondaryTextColor from the theme. - * The primary prop has precendent if set to true. + * Callback function that is fired when the Date Picker's dialog is shown. */ - secondary: _react.PropTypes.bool, + onShow: _react.PropTypes.func, + /** + * Callback function that is fired when a touch tap event occurs on the Date Picker's `TextField`. + * + * @param {object} event TouchTap event targeting the `TextField`. + */ + onTouchTap: _react.PropTypes.func, + /** + * Callback function used to determine if a day's entry should be disabled on the calendar. + * + * @param {object} day Date object of a day. + * @returns {boolean} Indicates whether the day should be disabled. + */ + shouldDisableDate: _react.PropTypes.func, /** * Override the inline-styles of the root element. */ - style: _react.PropTypes.object + style: _react.PropTypes.object, + /** + * Override the inline-styles of DatePicker's TextField element. + */ + textFieldStyle: _react.PropTypes.object, + /** + * Sets the date for the Date Picker programmatically. + */ + value: _react.PropTypes.object } : void 0; -exports.default = FlatButton; +exports.default = DatePicker; /***/ }), -/* 767 */ +/* 771 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59853,102 +63509,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _getPrototypeOf = __webpack_require__(3); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(1); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(2); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(4); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(5); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getStyles(props, context) { - var baseTheme = context.muiTheme.baseTheme; - - - return { - root: { - position: 'relative', - paddingLeft: baseTheme.spacing.desktopGutterLess, - paddingRight: baseTheme.spacing.desktopGutterLess, - verticalAlign: 'middle' - } - }; -} - -var FlatButtonLabel = function (_Component) { - (0, _inherits3.default)(FlatButtonLabel, _Component); - - function FlatButtonLabel() { - (0, _classCallCheck3.default)(this, FlatButtonLabel); - return (0, _possibleConstructorReturn3.default)(this, (FlatButtonLabel.__proto__ || (0, _getPrototypeOf2.default)(FlatButtonLabel)).apply(this, arguments)); - } - - (0, _createClass3.default)(FlatButtonLabel, [{ - key: 'render', - value: function render() { - var _props = this.props, - label = _props.label, - style = _props.style; - var prepareStyles = this.context.muiTheme.prepareStyles; - - var styles = getStyles(this.props, this.context); - - return _react2.default.createElement( - 'span', - { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, - label - ); - } - }]); - return FlatButtonLabel; -}(_react.Component); - -FlatButtonLabel.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? FlatButtonLabel.propTypes = { - label: _react.PropTypes.node, - style: _react.PropTypes.object -} : void 0; -exports.default = FlatButtonLabel; - -/***/ }), -/* 768 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - +var _extends2 = __webpack_require__(7); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.SHOP_NAME = undefined; +var _extends3 = _interopRequireDefault(_extends2); -var _keys = __webpack_require__(79); +var _objectWithoutProperties2 = __webpack_require__(8); -var _keys2 = _interopRequireDefault(_keys); +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _getPrototypeOf = __webpack_require__(3); @@ -59970,209 +63537,221 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _Tab = __webpack_require__(769); - -var _Tab2 = _interopRequireDefault(_Tab); - -var _reactRedux = __webpack_require__(27); +var _simpleAssign = __webpack_require__(6); -var _FontIcon = __webpack_require__(317); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -var _FontIcon2 = _interopRequireDefault(_FontIcon); +var _react = __webpack_require__(0); -var _IconButton = __webpack_require__(95); +var _react2 = _interopRequireDefault(_react); -var _IconButton2 = _interopRequireDefault(_IconButton); +var _reactEventListener = __webpack_require__(40); -var _colors = __webpack_require__(57); +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -var _Menus = __webpack_require__(96); +var _keycode = __webpack_require__(26); -var menus = _interopRequireWildcard(_Menus); +var _keycode2 = _interopRequireDefault(_keycode); -var _Billing = __webpack_require__(770); +var _Calendar = __webpack_require__(772); -var _Billing2 = _interopRequireDefault(_Billing); +var _Calendar2 = _interopRequireDefault(_Calendar); -var _Options = __webpack_require__(845); +var _Dialog = __webpack_require__(134); -var _Options2 = _interopRequireDefault(_Options); +var _Dialog2 = _interopRequireDefault(_Dialog); -var _Sizes = __webpack_require__(846); +var _Popover = __webpack_require__(133); -var _Sizes2 = _interopRequireDefault(_Sizes); +var _Popover2 = _interopRequireDefault(_Popover); -var _Layout = __webpack_require__(847); +var _PopoverAnimationVertical = __webpack_require__(332); -var _Layout2 = _interopRequireDefault(_Layout); +var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical); -var _menu = __webpack_require__(854); +var _dateUtils = __webpack_require__(85); -var _settings = __webpack_require__(855); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +var DatePickerDialog = function (_Component) { + (0, _inherits3.default)(DatePickerDialog, _Component); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function DatePickerDialog() { + var _ref; -var SHOP_NAME = exports.SHOP_NAME = 'Supreme'; + var _temp, _this, _ret; -var Supreme = function (_Component) { - (0, _inherits3.default)(Supreme, _Component); + (0, _classCallCheck3.default)(this, DatePickerDialog); - function Supreme() { - (0, _classCallCheck3.default)(this, Supreme); - return (0, _possibleConstructorReturn3.default)(this, (Supreme.__proto__ || (0, _getPrototypeOf2.default)(Supreme)).apply(this, arguments)); - } + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - (0, _createClass3.default)(Supreme, [{ - key: 'getContainerForMenu', - value: function getContainerForMenu(menu) { - var _this2 = this; + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(DatePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.show = function () { + if (_this.props.onShow && !_this.state.open) { + _this.props.onShow(); + } - switch (menu) { - case menus.MENU_BILLING: - return _react2.default.createElement(_Billing2.default, { onSubmit: function onSubmit(data) { - return _this2.onSubmit(menu, data); - }, shop: SHOP_NAME }); - case menus.MENU_OPTIONS: - return _react2.default.createElement(_Options2.default, { onSubmit: function onSubmit(data) { - return _this2.onSubmit(menu, data); - }, shop: SHOP_NAME }); - case menus.MENU_SIZES: - return _react2.default.createElement(_Sizes2.default, { onSubmit: function onSubmit(data) { - return _this2.onSubmit(menu, data); - }, shop: SHOP_NAME }); - default: - return null; + _this.setState({ + open: true + }); + }, _this.dismiss = function () { + if (_this.props.onDismiss && _this.state.open) { + _this.props.onDismiss(); } - } - }, { - key: 'strToNumberReducer', - value: function strToNumberReducer(menu, key, value) { - // Don't process values for billing - if (typeof value === 'string' && !isNaN(value) && menu !== menus.MENU_BILLING) { - return +value; + + _this.setState({ + open: false + }); + }, _this.handleTouchTapDay = function () { + if (_this.props.autoOk) { + setTimeout(_this.handleTouchTapOk, 300); } - return value; - } - }, { - key: 'transform', - value: function transform(menu, obj, reducer) { - var keys = (0, _keys2.default)(obj); - var newObj = {}; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = obj[key]; - newObj[key] = reducer(menu, key, value); + }, _this.handleTouchTapCancel = function () { + _this.dismiss(); + }, _this.handleRequestClose = function () { + _this.dismiss(); + }, _this.handleTouchTapOk = function () { + if (_this.props.onAccept && !_this.refs.calendar.isSelectedDateDisabled()) { + _this.props.onAccept(_this.refs.calendar.getSelectedDate()); } - return newObj; - } - }, { - key: 'onSubmit', - value: function onSubmit(menu, data) { - var newObj = this.transform(menu, data, this.strToNumberReducer); - this.props.updateSettings(SHOP_NAME, menu, newObj); - } - }, { - key: 'componentWillMount', - value: function componentWillMount() { - if (this.props.menu == null) { - this.props.changeMenu(Supreme.getDefaultMenu()); + + _this.setState({ + open: false + }); + }, _this.handleWindowKeyUp = function (event) { + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.handleTouchTapOk(); + break; } - } - }, { - key: 'getIconForTabMenu', - value: function getIconForTabMenu(menu) { - var isIncomplete = !this.props.settings[SHOP_NAME] || !this.props.settings[SHOP_NAME][menu]; - var color = isIncomplete ? _colors.red300 : 'white'; - var tip = isIncomplete ? 'This tab hasn\'t been configured yet' : ''; - return _react2.default.createElement( - _IconButton2.default, - { iconStyle: { color: color }, tooltip: tip, tooltipPosition: 'top-center', tooltipStyles: { color: 'white' } }, - _react2.default.createElement( - _FontIcon2.default, - { style: { color: color }, className: 'material-icons' }, - isIncomplete ? 'error' : 'done' - ) - ); - } - }, { - key: 'getTabs', - value: function getTabs() { - var _this3 = this; + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } - return [_react2.default.createElement(_Tab2.default, { - label: 'Billing', - key: 1, - icon: this.getIconForTabMenu(menus.MENU_BILLING), - value: menus.MENU_BILLING, - onClick: function onClick() { - return _this3.props.changeMenu(menus.MENU_BILLING); - } - }), _react2.default.createElement(_Tab2.default, { - label: 'Options', - key: 2, - icon: this.getIconForTabMenu(menus.MENU_OPTIONS), - value: menus.MENU_OPTIONS, - onClick: function onClick() { - return _this3.props.changeMenu(menus.MENU_OPTIONS); - } - }), _react2.default.createElement(_Tab2.default, { - label: 'Sizes', - key: 3, - icon: this.getIconForTabMenu(menus.MENU_SIZES), - value: menus.MENU_SIZES, - onClick: function onClick() { - return _this3.props.changeMenu(menus.MENU_SIZES); - } - })]; - } - }, { + (0, _createClass3.default)(DatePickerDialog, [{ key: 'render', value: function render() { - var menu = this.props.menu; + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + autoOk = _props.autoOk, + cancelLabel = _props.cancelLabel, + container = _props.container, + containerStyle = _props.containerStyle, + disableYearSelection = _props.disableYearSelection, + initialDate = _props.initialDate, + firstDayOfWeek = _props.firstDayOfWeek, + locale = _props.locale, + maxDate = _props.maxDate, + minDate = _props.minDate, + mode = _props.mode, + okLabel = _props.okLabel, + onAccept = _props.onAccept, + onDismiss = _props.onDismiss, + onShow = _props.onShow, + shouldDisableDate = _props.shouldDisableDate, + style = _props.style, + animation = _props.animation, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'container', 'containerStyle', 'disableYearSelection', 'initialDate', 'firstDayOfWeek', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onAccept', 'onDismiss', 'onShow', 'shouldDisableDate', 'style', 'animation']); + var open = this.state.open; + + + var styles = { + dialogContent: { + width: mode === 'landscape' ? 479 : 310 + }, + dialogBodyContent: { + padding: 0, + minHeight: mode === 'landscape' ? 330 : 434, + minWidth: mode === 'landscape' ? 479 : 310 + } + }; + + var Container = container === 'inline' ? _Popover2.default : _Dialog2.default; return _react2.default.createElement( - _Layout2.default, - { title: menu || 'Loading...', tabs: this.getTabs(), currentTab: menu }, - this.getContainerForMenu(menu) + 'div', + (0, _extends3.default)({}, other, { ref: 'root' }), + _react2.default.createElement( + Container, + { + anchorEl: this.refs.root // For Popover + , animation: animation || _PopoverAnimationVertical2.default // For Popover + , bodyStyle: styles.dialogBodyContent, + contentStyle: styles.dialogContent, + ref: 'dialog', + repositionOnUpdate: true, + open: open, + onRequestClose: this.handleRequestClose, + style: (0, _simpleAssign2.default)(styles.dialogBodyContent, containerStyle) + }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyUp: this.handleWindowKeyUp + }), + _react2.default.createElement(_Calendar2.default, { + autoOk: autoOk, + DateTimeFormat: DateTimeFormat, + cancelLabel: cancelLabel, + disableYearSelection: disableYearSelection, + firstDayOfWeek: firstDayOfWeek, + initialDate: initialDate, + locale: locale, + onTouchTapDay: this.handleTouchTapDay, + maxDate: maxDate, + minDate: minDate, + mode: mode, + open: open, + ref: 'calendar', + onTouchTapCancel: this.handleTouchTapCancel, + onTouchTapOk: this.handleTouchTapOk, + okLabel: okLabel, + shouldDisableDate: shouldDisableDate + }) + ) ); } - }], [{ - key: 'getDefaultMenu', - value: function getDefaultMenu() { - return menus.MENU_BILLING; - } }]); - return Supreme; + return DatePickerDialog; }(_react.Component); -function mapStateToProps(state) { - return { - menu: state.menu.currentMenu, - settings: state.settings.values - }; -} - -function mapDispatchToProps(dispatch) { - return { - changeMenu: function changeMenu(menu) { - return dispatch((0, _menu.changeMenu)(menu)); - }, - updateSettings: function updateSettings(shop, key, value) { - return dispatch((0, _settings.updateSettings)(shop, key, value)); - } - }; -} - -exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Supreme); +DatePickerDialog.defaultProps = { + DateTimeFormat: _dateUtils.dateTimeFormat, + cancelLabel: 'Cancel', + container: 'dialog', + locale: 'en-US', + okLabel: 'OK' +}; +DatePickerDialog.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DatePickerDialog.propTypes = { + DateTimeFormat: _react.PropTypes.func, + animation: _react.PropTypes.func, + autoOk: _react.PropTypes.bool, + cancelLabel: _react.PropTypes.node, + container: _react.PropTypes.oneOf(['dialog', 'inline']), + containerStyle: _react.PropTypes.object, + disableYearSelection: _react.PropTypes.bool, + firstDayOfWeek: _react.PropTypes.number, + initialDate: _react.PropTypes.object, + locale: _react.PropTypes.string, + maxDate: _react.PropTypes.object, + minDate: _react.PropTypes.object, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + okLabel: _react.PropTypes.node, + onAccept: _react.PropTypes.func, + onDismiss: _react.PropTypes.func, + onShow: _react.PropTypes.func, + open: _react.PropTypes.bool, + shouldDisableDate: _react.PropTypes.func, + style: _react.PropTypes.object +} : void 0; +exports.default = DatePickerDialog; /***/ }), -/* 769 */ +/* 772 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60182,14 +63761,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -60210,186 +63781,431 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _simpleAssign = __webpack_require__(6); +var _toConsumableArray2 = __webpack_require__(95); -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _EnhancedButton = __webpack_require__(59); +var _reactEventListener = __webpack_require__(40); -var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _keycode = __webpack_require__(26); -function getStyles(props, context) { - var tabs = context.muiTheme.tabs; +var _keycode2 = _interopRequireDefault(_keycode); +var _transitions = __webpack_require__(10); - return { - root: { - color: props.selected ? tabs.selectedTextColor : tabs.textColor, - fontWeight: 500, - fontSize: 14, - width: props.width, - textTransform: 'uppercase', - padding: 0 - }, - button: { - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - justifyContent: 'center', - height: props.label && props.icon ? 72 : 48 - } - }; -} +var _transitions2 = _interopRequireDefault(_transitions); -var Tab = function (_Component) { - (0, _inherits3.default)(Tab, _Component); +var _CalendarActionButtons = __webpack_require__(773); - function Tab() { +var _CalendarActionButtons2 = _interopRequireDefault(_CalendarActionButtons); + +var _CalendarMonth = __webpack_require__(776); + +var _CalendarMonth2 = _interopRequireDefault(_CalendarMonth); + +var _CalendarYear = __webpack_require__(778); + +var _CalendarYear2 = _interopRequireDefault(_CalendarYear); + +var _CalendarToolbar = __webpack_require__(780); + +var _CalendarToolbar2 = _interopRequireDefault(_CalendarToolbar); + +var _DateDisplay = __webpack_require__(784); + +var _DateDisplay2 = _interopRequireDefault(_DateDisplay); + +var _SlideIn = __webpack_require__(209); + +var _SlideIn2 = _interopRequireDefault(_SlideIn); + +var _dateUtils = __webpack_require__(85); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var daysArray = [].concat((0, _toConsumableArray3.default)(Array(7))); + +var Calendar = function (_Component) { + (0, _inherits3.default)(Calendar, _Component); + + function Calendar() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, Tab); + (0, _classCallCheck3.default)(this, Calendar); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tab.__proto__ || (0, _getPrototypeOf2.default)(Tab)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTap = function (event) { - if (_this.props.onTouchTap) { - _this.props.onTouchTap(_this.props.value, event, _this); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Calendar.__proto__ || (0, _getPrototypeOf2.default)(Calendar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + displayDate: undefined, + displayMonthDay: true, + selectedDate: undefined, + transitionDirection: 'left', + transitionEnter: true + }, _this.handleTouchTapDay = function (event, date) { + _this.setSelectedDate(date); + if (_this.props.onTouchTapDay) _this.props.onTouchTapDay(event, date); + }, _this.handleMonthChange = function (months) { + _this.setState({ + transitionDirection: months >= 0 ? 'left' : 'right', + displayDate: (0, _dateUtils.addMonths)(_this.state.displayDate, months) + }); + }, _this.handleTouchTapYear = function (event, year) { + var date = (0, _dateUtils.cloneDate)(_this.state.selectedDate); + date.setFullYear(year); + _this.setSelectedDate(date, event); + _this.handleTouchTapDateDisplayMonthDay(); + }, _this.handleTouchTapDateDisplayMonthDay = function () { + _this.setState({ + displayMonthDay: true + }); + }, _this.handleTouchTapDateDisplayYear = function () { + _this.setState({ + displayMonthDay: false + }); + }, _this.handleWindowKeyDown = function (event) { + if (_this.props.open) { + switch ((0, _keycode2.default)(event)) { + case 'up': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(-1); + } else if (event.shiftKey) { + _this.addSelectedMonths(-1); + } else { + _this.addSelectedDays(-7); + } + break; + + case 'down': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(1); + } else if (event.shiftKey) { + _this.addSelectedMonths(1); + } else { + _this.addSelectedDays(7); + } + break; + + case 'right': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(1); + } else if (event.shiftKey) { + _this.addSelectedMonths(1); + } else { + _this.addSelectedDays(1); + } + break; + + case 'left': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(-1); + } else if (event.shiftKey) { + _this.addSelectedMonths(-1); + } else { + _this.addSelectedDays(-1); + } + break; + } } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(Tab, [{ + (0, _createClass3.default)(Calendar, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + displayDate: (0, _dateUtils.getFirstDayOfMonth)(this.props.initialDate), + selectedDate: this.props.initialDate + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.initialDate !== this.props.initialDate) { + var date = nextProps.initialDate || new Date(); + this.setState({ + displayDate: (0, _dateUtils.getFirstDayOfMonth)(date), + selectedDate: date + }); + } + } + }, { + key: 'getSelectedDate', + value: function getSelectedDate() { + return this.state.selectedDate; + } + }, { + key: 'isSelectedDateDisabled', + value: function isSelectedDateDisabled() { + if (!this.state.displayMonthDay) { + return false; + } + + return this.refs.calendar.isSelectedDateDisabled(); + } + }, { + key: 'addSelectedDays', + value: function addSelectedDays(days) { + this.setSelectedDate((0, _dateUtils.addDays)(this.state.selectedDate, days)); + } + }, { + key: 'addSelectedMonths', + value: function addSelectedMonths(months) { + this.setSelectedDate((0, _dateUtils.addMonths)(this.state.selectedDate, months)); + } + }, { + key: 'addSelectedYears', + value: function addSelectedYears(years) { + this.setSelectedDate((0, _dateUtils.addYears)(this.state.selectedDate, years)); + } + }, { + key: 'setDisplayDate', + value: function setDisplayDate(date, newSelectedDate) { + var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(date); + var direction = newDisplayDate > this.state.displayDate ? 'left' : 'right'; + + if (newDisplayDate !== this.state.displayDate) { + this.setState({ + displayDate: newDisplayDate, + transitionDirection: direction, + selectedDate: newSelectedDate || this.state.selectedDate + }); + } + } + }, { + key: 'setSelectedDate', + value: function setSelectedDate(date) { + var adjustedDate = date; + if ((0, _dateUtils.isBeforeDate)(date, this.props.minDate)) { + adjustedDate = this.props.minDate; + } else if ((0, _dateUtils.isAfterDate)(date, this.props.maxDate)) { + adjustedDate = this.props.maxDate; + } + + var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(adjustedDate); + if (newDisplayDate !== this.state.displayDate) { + this.setDisplayDate(newDisplayDate, adjustedDate); + } else { + this.setState({ + selectedDate: adjustedDate + }); + } + } + }, { + key: 'getToolbarInteractions', + value: function getToolbarInteractions() { + return { + prevMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.minDate) > 0, + nextMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.maxDate) < 0 + }; + } + }, { + key: 'yearSelector', + value: function yearSelector() { + if (!this.props.disableYearSelection) { + return _react2.default.createElement(_CalendarYear2.default, { + key: 'years', + DateTimeFormat: this.props.DateTimeFormat, + locale: this.props.locale, + onTouchTapYear: this.handleTouchTapYear, + selectedDate: this.state.selectedDate, + minDate: this.props.minDate, + maxDate: this.props.maxDate + }); + } + } + }, { key: 'render', value: function render() { - var _props = this.props, - icon = _props.icon, - index = _props.index, - onActive = _props.onActive, - onTouchTap = _props.onTouchTap, - selected = _props.selected, - label = _props.label, - buttonStyle = _props.buttonStyle, - style = _props.style, - value = _props.value, - width = _props.width, - other = (0, _objectWithoutProperties3.default)(_props, ['icon', 'index', 'onActive', 'onTouchTap', 'selected', 'label', 'buttonStyle', 'style', 'value', 'width']); + var prepareStyles = this.context.muiTheme.prepareStyles; + var toolbarInteractions = this.getToolbarInteractions(); + var isLandscape = this.props.mode === 'landscape'; + var calendarTextColor = this.context.muiTheme.datePicker.calendarTextColor; - var styles = getStyles(this.props, this.context); - var iconElement = void 0; - if (icon && _react2.default.isValidElement(icon)) { - var iconProps = { - style: { - fontSize: 24, - color: styles.root.color, - marginBottom: label ? 5 : 0 - } - }; - // If it's svg icon set color via props - if (icon.type.muiName !== 'FontIcon') { - iconProps.color = styles.root.color; + var styles = { + root: { + color: calendarTextColor, + userSelect: 'none', + width: isLandscape ? 479 : 310 + }, + calendar: { + display: 'flex', + flexDirection: 'column' + }, + calendarContainer: { + display: 'flex', + alignContent: 'space-between', + justifyContent: 'space-between', + flexDirection: 'column', + fontSize: 12, + fontWeight: 400, + padding: '0px 8px', + transition: _transitions2.default.easeOut() + }, + yearContainer: { + display: 'flex', + justifyContent: 'space-between', + flexDirection: 'column', + height: 272, + marginTop: 10, + overflow: 'hidden', + width: 310 + }, + weekTitle: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'space-between', + fontWeight: '500', + height: 20, + lineHeight: '15px', + opacity: '0.5', + textAlign: 'center' + }, + weekTitleDay: { + width: 42 + }, + transitionSlide: { + height: 214 } - iconElement = _react2.default.cloneElement(icon, iconProps); - } + }; + + var weekTitleDayStyle = prepareStyles(styles.weekTitleDay); + + var _props = this.props, + minDate = _props.minDate, + maxDate = _props.maxDate, + cancelLabel = _props.cancelLabel, + DateTimeFormat = _props.DateTimeFormat, + firstDayOfWeek = _props.firstDayOfWeek, + locale = _props.locale, + okLabel = _props.okLabel, + onTouchTapCancel = _props.onTouchTapCancel, + onTouchTapOk = _props.onTouchTapOk; - var rippleOpacity = 0.3; - var rippleColor = this.context.muiTheme.tabs.selectedTextColor; return _react2.default.createElement( - _EnhancedButton2.default, - (0, _extends3.default)({}, other, { - style: (0, _simpleAssign2.default)(styles.root, style), - focusRippleColor: rippleColor, - touchRippleColor: rippleColor, - focusRippleOpacity: rippleOpacity, - touchRippleOpacity: rippleOpacity, - onTouchTap: this.handleTouchTap + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyDown: this.handleWindowKeyDown + }), + _react2.default.createElement(_DateDisplay2.default, { + DateTimeFormat: DateTimeFormat, + disableYearSelection: this.props.disableYearSelection, + onTouchTapMonthDay: this.handleTouchTapDateDisplayMonthDay, + onTouchTapYear: this.handleTouchTapDateDisplayYear, + locale: locale, + monthDaySelected: this.state.displayMonthDay, + mode: this.props.mode, + selectedDate: this.state.selectedDate }), _react2.default.createElement( 'div', - { style: (0, _simpleAssign2.default)(styles.button, buttonStyle) }, - iconElement, - label - ) - ); - } - }]); - return Tab; -}(_react.Component); - -Tab.muiName = 'Tab'; -Tab.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? Tab.propTypes = { - /** - * Override the inline-styles of the button element. - */ - buttonStyle: _react.PropTypes.object, - /** - * The css class name of the root element. - */ - className: _react.PropTypes.string, - /** - * Sets the icon of the tab, you can pass `FontIcon` or `SvgIcon` elements. - */ - icon: _react.PropTypes.node, - /** - * @ignore - */ - index: _react.PropTypes.any, - /** - * Sets the text value of the tab item to the string specified. - */ - label: _react.PropTypes.node, - /** - * Fired when the active tab changes by touch or tap. - * Use this event to specify any functionality when an active tab changes. - * For example - we are using this to route to home when the third tab becomes active. - * This function will always recieve the active tab as it\'s first argument. - */ - onActive: _react.PropTypes.func, - /** - * @ignore - * This property is overriden by the Tabs component. - */ - onTouchTap: _react.PropTypes.func, - /** - * @ignore - * Defines if the current tab is selected or not. - * The Tabs component is responsible for setting this property. - */ - selected: _react.PropTypes.bool, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - /** - * If value prop passed to Tabs component, this value prop is also required. - * It assigns a value to the tab so that it can be selected by the Tabs. - */ - value: _react.PropTypes.any, - /** - * @ignore - * This property is overriden by the Tabs component. - */ - width: _react.PropTypes.string + { style: prepareStyles(styles.calendar) }, + this.state.displayMonthDay && _react2.default.createElement( + 'div', + { style: prepareStyles(styles.calendarContainer) }, + _react2.default.createElement(_CalendarToolbar2.default, { + DateTimeFormat: DateTimeFormat, + locale: locale, + displayDate: this.state.displayDate, + onMonthChange: this.handleMonthChange, + prevMonth: toolbarInteractions.prevMonth, + nextMonth: toolbarInteractions.nextMonth + }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.weekTitle) }, + daysArray.map(function (event, i) { + return _react2.default.createElement( + 'span', + { key: i, style: weekTitleDayStyle }, + (0, _dateUtils.localizedWeekday)(DateTimeFormat, locale, i, firstDayOfWeek) + ); + }) + ), + _react2.default.createElement( + _SlideIn2.default, + { direction: this.state.transitionDirection, style: styles.transitionSlide }, + _react2.default.createElement(_CalendarMonth2.default, { + DateTimeFormat: DateTimeFormat, + locale: locale, + displayDate: this.state.displayDate, + firstDayOfWeek: this.props.firstDayOfWeek, + key: this.state.displayDate.toDateString(), + minDate: minDate, + maxDate: maxDate, + onTouchTapDay: this.handleTouchTapDay, + ref: 'calendar', + selectedDate: this.state.selectedDate, + shouldDisableDate: this.props.shouldDisableDate + }) + ) + ), + !this.state.displayMonthDay && _react2.default.createElement( + 'div', + { style: prepareStyles(styles.yearContainer) }, + this.yearSelector() + ), + okLabel && _react2.default.createElement(_CalendarActionButtons2.default, { + autoOk: this.props.autoOk, + cancelLabel: cancelLabel, + okLabel: okLabel, + onTouchTapCancel: onTouchTapCancel, + onTouchTapOk: onTouchTapOk + }) + ) + ); + } + }]); + return Calendar; +}(_react.Component); + +Calendar.defaultProps = { + DateTimeFormat: _dateUtils.dateTimeFormat, + disableYearSelection: false, + initialDate: new Date(), + locale: 'en-US', + minDate: (0, _dateUtils.addYears)(new Date(), -100), + maxDate: (0, _dateUtils.addYears)(new Date(), 100) +}; +Calendar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Calendar.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + autoOk: _react.PropTypes.bool, + cancelLabel: _react.PropTypes.node, + disableYearSelection: _react.PropTypes.bool, + firstDayOfWeek: _react.PropTypes.number, + initialDate: _react.PropTypes.object, + locale: _react.PropTypes.string.isRequired, + maxDate: _react.PropTypes.object, + minDate: _react.PropTypes.object, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + okLabel: _react.PropTypes.node, + onTouchTapCancel: _react.PropTypes.func, + onTouchTapDay: _react.PropTypes.func, + onTouchTapOk: _react.PropTypes.func, + open: _react.PropTypes.bool, + shouldDisableDate: _react.PropTypes.func } : void 0; -exports.default = Tab; +exports.default = Calendar; /***/ }), -/* 770 */ +/* 773 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60399,726 +64215,433 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reduxForm = __webpack_require__(113); - -var _reactRedux = __webpack_require__(27); - -var _MenuItem = __webpack_require__(129); +var _getPrototypeOf = __webpack_require__(3); -var _MenuItem2 = _interopRequireDefault(_MenuItem); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -var _RaisedButton = __webpack_require__(200); +var _classCallCheck2 = __webpack_require__(1); -var _RaisedButton2 = _interopRequireDefault(_RaisedButton); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _reduxFormMaterialUi = __webpack_require__(201); +var _createClass2 = __webpack_require__(2); -var _Styles = __webpack_require__(80); +var _createClass3 = _interopRequireDefault(_createClass2); -var _Styles2 = _interopRequireDefault(_Styles); +var _possibleConstructorReturn2 = __webpack_require__(4); -var _Utils = __webpack_require__(329); +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var Utils = _interopRequireWildcard(_Utils); +var _inherits2 = __webpack_require__(5); -var _FormValidators = __webpack_require__(204); +var _inherits3 = _interopRequireDefault(_inherits2); -var Validators = _interopRequireWildcard(_FormValidators); +var _react = __webpack_require__(0); -var _Menus = __webpack_require__(96); +var _react2 = _interopRequireDefault(_react); -var menus = _interopRequireWildcard(_Menus); +var _FlatButton = __webpack_require__(100); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +var _FlatButton2 = _interopRequireDefault(_FlatButton); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStatesForCountry(country) { - switch (country) { - case 'USA': - return Utils.usaRegions; - case 'JAPAN': - return Utils.japanRegions; - case 'CANADA': - return Utils.canadaRegions; - default: - return []; - } -} - -var Billing = function Billing(props) { - var handleSubmit = props.handleSubmit, - pristine = props.pristine, - submitting = props.submitting, - country = props.country; - - return _react2.default.createElement( - 'form', - { onSubmit: handleSubmit, id: 'biling-form' }, - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'order_billing_name', - validate: Validators.fullName, - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Firstname and Lastname', - hintText: 'Firstname and Lastname', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'order_email', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Email', - hintText: 'Email', - style: _Styles2.default.fields.text, - validate: [Validators.required, Validators.email] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'order_tel', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Phone number', - hintText: 'Phone number', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'bo', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Address', - hintText: 'Address', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'order_billing_city', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'City', - hintText: 'City', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'order_billing_country', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Country', - hintText: 'Country', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.countries.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); - }) - ) - ), - ['JAPAN', 'USA', 'CANADA'].indexOf(country) !== -1 && _react2.default.createElement( - _reduxForm.Field, - { - name: 'order_billing_state', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'State', - hintText: 'State', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - getStatesForCountry(country).map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'order_billing_zip', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Zip', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'credit_card_type', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Credit card type', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - _react2.default.createElement(_MenuItem2.default, { value: 'visa', primaryText: 'Visa' }), - _react2.default.createElement(_MenuItem2.default, { value: 'american_express', primaryText: 'American Express' }), - _react2.default.createElement(_MenuItem2.default, { value: 'master', primaryText: 'Mastercard' }), - _react2.default.createElement(_MenuItem2.default, { value: 'solo', primaryText: 'Solo' }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'cnb', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Credit Card Number', - hintText: 'Credit Card Number', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'credit_card_month', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Expiry month', - hintText: 'Expiry month', - validate: [Validators.required], - style: _Styles2.default.fields.text - }, - Array.apply(null, new Array(12)).map(function (x, i) { - var month = ++i < 10 ? '0' + i : i; - return _react2.default.createElement(_MenuItem2.default, { key: month, value: month, primaryText: month }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'credit_card_year', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Expiry year', - hintText: 'Expiry year', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Array.apply(null, new Array(5)).map(function (x, i) { - var year = new Date().getFullYear() + i; - return _react2.default.createElement(_MenuItem2.default, { key: year, value: year, primaryText: year }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'vval', - component: _reduxFormMaterialUi.TextField, - hintText: 'CCV', - floatingLabelText: 'CCV', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_RaisedButton2.default, { - label: 'Save', - disabled: pristine || submitting, - type: 'submit' - }) - ) - ); -}; - -var BillingForm = (0, _reduxForm.reduxForm)({ - form: 'billing' -})(Billing); - -Billing.propTypes = { - shop: _react.PropTypes.string.isRequired -}; -var selector = (0, _reduxForm.formValueSelector)('billing'); - -function mapStateToProps(state, ownProps) { - return { - initialValues: (state.settings.values[ownProps.shop] || {})[menus.MENU_BILLING] || {}, - country: selector(state, 'order_billing_country') - }; -} - -exports.default = (0, _reactRedux.connect)(mapStateToProps)(BillingForm); - -/***/ }), -/* 771 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(global) {/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); +var CalendarActionButton = function (_Component) { + (0, _inherits3.default)(CalendarActionButton, _Component); -/** Used for built-in method references. */ -var objectProto = Object.prototype; + function CalendarActionButton() { + (0, _classCallCheck3.default)(this, CalendarActionButton); + return (0, _possibleConstructorReturn3.default)(this, (CalendarActionButton.__proto__ || (0, _getPrototypeOf2.default)(CalendarActionButton)).apply(this, arguments)); + } -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; + (0, _createClass3.default)(CalendarActionButton, [{ + key: 'render', + value: function render() { + var _props = this.props, + cancelLabel = _props.cancelLabel, + okLabel = _props.okLabel; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return root.Date.now(); -}; + var styles = { + root: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'flex-end', + margin: 0, + maxHeight: 48, + padding: 0 + }, + flatButtons: { + fontsize: 14, + margin: '4px 8px 8px 0px', + maxHeight: 36, + minWidth: 64, + padding: 0 + } + }; -/** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide `options` to indicate whether `func` should be invoked on the - * leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent - * calls to the debounced function return the result of the last `func` - * invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the debounced function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=false] - * Specify invoking on the leading edge of the timeout. - * @param {number} [options.maxWait] - * The maximum time `func` is allowed to be delayed before it's invoked. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // Avoid costly calculations while the window size is in flux. - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // Invoke `sendMail` when clicked, debouncing subsequent calls. - * jQuery(element).on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // Ensure `batchLog` is invoked once after 1 second of debounced calls. - * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); - * var source = new EventSource('/stream'); - * jQuery(source).on('message', debounced); - * - * // Cancel the trailing debounced invocation. - * jQuery(window).on('popstate', debounced.cancel); - */ -function debounce(func, wait, options) { - var lastArgs, - lastThis, - maxWait, - result, - timerId, - lastCallTime, - lastInvokeTime = 0, - leading = false, - maxing = false, - trailing = true; + return _react2.default.createElement( + 'div', + { style: styles.root }, + _react2.default.createElement(_FlatButton2.default, { + label: cancelLabel, + onTouchTap: this.props.onTouchTapCancel, + primary: true, + style: styles.flatButtons + }), + !this.props.autoOk && _react2.default.createElement(_FlatButton2.default, { + disabled: this.refs.calendar !== undefined && this.refs.calendar.isSelectedDateDisabled(), + label: okLabel, + onTouchTap: this.props.onTouchTapOk, + primary: true, + style: styles.flatButtons + }) + ); + } + }]); + return CalendarActionButton; +}(_react.Component); - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = toNumber(wait) || 0; - if (isObject(options)) { - leading = !!options.leading; - maxing = 'maxWait' in options; - maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } + false ? CalendarActionButton.propTypes = { + autoOk: _react.PropTypes.bool, + cancelLabel: _react.PropTypes.node, + okLabel: _react.PropTypes.node, + onTouchTapCancel: _react.PropTypes.func, + onTouchTapOk: _react.PropTypes.func +} : void 0; +exports.default = CalendarActionButton; - function invokeFunc(time) { - var args = lastArgs, - thisArg = lastThis; +/***/ }), +/* 774 */ +/***/ (function(module, exports, __webpack_require__) { - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result = func.apply(thisArg, args); - return result; - } +"use strict"; - function leadingEdge(time) { - // Reset any `maxWait` timer. - lastInvokeTime = time; - // Start the timer for the trailing edge. - timerId = setTimeout(timerExpired, wait); - // Invoke the leading edge. - return leading ? invokeFunc(time) : result; - } - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime, - result = wait - timeSinceLastCall; +Object.defineProperty(exports, "__esModule", { + value: true +}); - return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; - } +var _extends2 = __webpack_require__(7); - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime; +var _extends3 = _interopRequireDefault(_extends2); - // Either this is the first call, activity has stopped and we're at the - // trailing edge, the system time has gone backwards and we're treating - // it as the trailing edge, or we've hit the `maxWait` limit. - return (lastCallTime === undefined || (timeSinceLastCall >= wait) || - (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); - } +var _objectWithoutProperties2 = __webpack_require__(8); - function timerExpired() { - var time = now(); - if (shouldInvoke(time)) { - return trailingEdge(time); +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _childUtils = __webpack_require__(131); + +var _colorManipulator = __webpack_require__(50); + +var _EnhancedButton = __webpack_require__(51); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _FlatButtonLabel = __webpack_require__(775); + +var _FlatButtonLabel2 = _interopRequireDefault(_FlatButtonLabel); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validateLabel(props, propName, componentName) { + if (false) { + if (!props.children && props.label !== 0 && !props.label && !props.icon) { + return new Error('Required prop label or children or icon was not specified in ' + componentName + '.'); } - // Restart the timer. - timerId = setTimeout(timerExpired, remainingWait(time)); } +} - function trailingEdge(time) { - timerId = undefined; +var FlatButton = function (_Component) { + (0, _inherits3.default)(FlatButton, _Component); - // Only invoke if we have `lastArgs` which means `func` has been - // debounced at least once. - if (trailing && lastArgs) { - return invokeFunc(time); + function FlatButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, FlatButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; } - lastArgs = lastThis = undefined; - return result; + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FlatButton.__proto__ || (0, _getPrototypeOf2.default)(FlatButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + touch: false + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + _this.props.onKeyboardFocus(event, isKeyboardFocused); + }, _this.handleMouseEnter = function (event) { + // Cancel hover styles for touch devices + if (!_this.state.touch) _this.setState({ hovered: true }); + _this.props.onMouseEnter(event); + }, _this.handleMouseLeave = function (event) { + _this.setState({ hovered: false }); + _this.props.onMouseLeave(event); + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); + _this.props.onTouchStart(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); + (0, _createClass3.default)(FlatButton, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.disabled) { + this.setState({ + hovered: false + }); + } } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + disabled = _props.disabled, + hoverColor = _props.hoverColor, + backgroundColor = _props.backgroundColor, + icon = _props.icon, + label = _props.label, + labelStyle = _props.labelStyle, + labelPosition = _props.labelPosition, + primary = _props.primary, + rippleColor = _props.rippleColor, + secondary = _props.secondary, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'disabled', 'hoverColor', 'backgroundColor', 'icon', 'label', 'labelStyle', 'labelPosition', 'primary', 'rippleColor', 'secondary', 'style']); + var _context$muiTheme = this.context.muiTheme, + _context$muiTheme$but = _context$muiTheme.button, + buttonHeight = _context$muiTheme$but.height, + buttonMinWidth = _context$muiTheme$but.minWidth, + buttonTextTransform = _context$muiTheme$but.textTransform, + _context$muiTheme$fla = _context$muiTheme.flatButton, + buttonFilterColor = _context$muiTheme$fla.buttonFilterColor, + buttonColor = _context$muiTheme$fla.color, + disabledTextColor = _context$muiTheme$fla.disabledTextColor, + fontSize = _context$muiTheme$fla.fontSize, + fontWeight = _context$muiTheme$fla.fontWeight, + primaryTextColor = _context$muiTheme$fla.primaryTextColor, + secondaryTextColor = _context$muiTheme$fla.secondaryTextColor, + textColor = _context$muiTheme$fla.textColor, + _context$muiTheme$fla2 = _context$muiTheme$fla.textTransform, + textTransform = _context$muiTheme$fla2 === undefined ? buttonTextTransform || 'uppercase' : _context$muiTheme$fla2; - function flush() { - return timerId === undefined ? result : trailingEdge(now()); - } + var defaultTextColor = disabled ? disabledTextColor : primary ? primaryTextColor : secondary ? secondaryTextColor : textColor; - function debounced() { - var time = now(), - isInvoking = shouldInvoke(time); + var defaultHoverColor = (0, _colorManipulator.fade)(buttonFilterColor, 0.2); + var defaultRippleColor = buttonFilterColor; + var buttonHoverColor = hoverColor || defaultHoverColor; + var buttonRippleColor = rippleColor || defaultRippleColor; + var buttonBackgroundColor = backgroundColor || buttonColor; + var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled; - lastArgs = arguments; - lastThis = this; - lastCallTime = time; + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + height: buttonHeight, + lineHeight: buttonHeight + 'px', + minWidth: buttonMinWidth, + color: defaultTextColor, + transition: _transitions2.default.easeOut(), + borderRadius: 2, + userSelect: 'none', + overflow: 'hidden', + backgroundColor: hovered ? buttonHoverColor : buttonBackgroundColor, + padding: 0, + margin: 0, + textAlign: 'center' + }, style); - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - // Handle invocations in a tight loop. - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result; - } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; -} + var iconCloned = void 0; + var labelStyleIcon = {}; -/** - * Creates a throttled function that only invokes `func` at most once per - * every `wait` milliseconds. The throttled function comes with a `cancel` - * method to cancel delayed `func` invocations and a `flush` method to - * immediately invoke them. Provide `options` to indicate whether `func` - * should be invoked on the leading and/or trailing edge of the `wait` - * timeout. The `func` is invoked with the last arguments provided to the - * throttled function. Subsequent calls to the throttled function return the - * result of the last `func` invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the throttled function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.throttle` and `_.debounce`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to throttle. - * @param {number} [wait=0] The number of milliseconds to throttle invocations to. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=true] - * Specify invoking on the leading edge of the timeout. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new throttled function. - * @example - * - * // Avoid excessively updating the position while scrolling. - * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); - * - * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. - * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); - * jQuery(element).on('click', throttled); - * - * // Cancel the trailing throttled invocation. - * jQuery(window).on('popstate', throttled.cancel); - */ -function throttle(func, wait, options) { - var leading = true, - trailing = true; + if (icon) { + var iconStyles = (0, _simpleAssign2.default)({ + verticalAlign: 'middle', + marginLeft: label && labelPosition !== 'before' ? 12 : 0, + marginRight: label && labelPosition === 'before' ? 12 : 0 + }, icon.props.style); + iconCloned = _react2.default.cloneElement(icon, { + color: icon.props.color || mergedRootStyles.color, + style: iconStyles + }); - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (isObject(options)) { - leading = 'leading' in options ? !!options.leading : leading; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - return debounce(func, wait, { - 'leading': leading, - 'maxWait': wait, - 'trailing': trailing - }); -} + if (labelPosition === 'before') { + labelStyleIcon.paddingRight = 8; + } else { + labelStyleIcon.paddingLeft = 8; + } + } -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} + var mergedLabelStyles = (0, _simpleAssign2.default)({ + letterSpacing: 0, + textTransform: textTransform, + fontWeight: fontWeight, + fontSize: fontSize + }, labelStyleIcon, labelStyle); -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} + var labelElement = label ? _react2.default.createElement(_FlatButtonLabel2.default, { label: label, style: mergedLabelStyles }) : undefined; -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} + // Place label before or after children. + var childrenFragment = labelPosition === 'before' ? { + labelElement: labelElement, + iconCloned: iconCloned, + children: children + } : { + children: children, + iconCloned: iconCloned, + labelElement: labelElement + }; -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} + var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment); -module.exports = throttle; + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + disabled: disabled, + focusRippleColor: buttonRippleColor, + focusRippleOpacity: 0.3, + onKeyboardFocus: this.handleKeyboardFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onTouchStart: this.handleTouchStart, + style: mergedRootStyles, + touchRippleColor: buttonRippleColor, + touchRippleOpacity: 0.3 + }), + enhancedButtonChildren + ); + } + }]); + return FlatButton; +}(_react.Component); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47))) +FlatButton.muiName = 'FlatButton'; +FlatButton.defaultProps = { + disabled: false, + labelStyle: {}, + labelPosition: 'after', + onKeyboardFocus: function onKeyboardFocus() {}, + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + onTouchStart: function onTouchStart() {}, + primary: false, + secondary: false +}; +FlatButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? FlatButton.propTypes = { + /** + * Color of button when mouse is not hovering over it. + */ + backgroundColor: _react.PropTypes.string, + /** + * This is what will be displayed inside the button. + * If a label is specified, the text within the label prop will + * be displayed. Otherwise, the component will expect children + * which will then be displayed. (In our example, + * we are nesting an `` and a `span` + * that acts as our label to be displayed.) This only + * applies to flat and raised buttons. + */ + children: _react.PropTypes.node, + /** + * Disables the button if set to true. + */ + disabled: _react.PropTypes.bool, + /** + * Color of button when mouse hovers over. + */ + hoverColor: _react.PropTypes.string, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * Use this property to display an icon. + */ + icon: _react.PropTypes.node, + /** + * Label for the button. + */ + label: validateLabel, + /** + * Place label before or after the passed children. + */ + labelPosition: _react.PropTypes.oneOf(['before', 'after']), + /** + * Override the inline-styles of the button's label element. + */ + labelStyle: _react.PropTypes.object, + /** + * Callback function fired when the element is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the element. + * @param {boolean} isKeyboardFocused Indicates whether the element is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * If true, colors button according to + * primaryTextColor from the Theme. + */ + primary: _react.PropTypes.bool, + /** + * Color for the ripple after button is clicked. + */ + rippleColor: _react.PropTypes.string, + /** + * If true, colors button according to secondaryTextColor from the theme. + * The primary prop has precendent if set to true. + */ + secondary: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = FlatButton; /***/ }), -/* 772 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61152,147 +64675,65 @@ var _simpleAssign = __webpack_require__(6); var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -var _transitions = __webpack_require__(10); - -var _transitions2 = _interopRequireDefault(_transitions); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _propTypes = __webpack_require__(41); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _Paper = __webpack_require__(34); - -var _Paper2 = _interopRequireDefault(_Paper); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props, context, state) { - var targetOrigin = props.targetOrigin; - var open = state.open; - var muiTheme = context.muiTheme; +function getStyles(props, context) { + var baseTheme = context.muiTheme.baseTheme; - var horizontal = targetOrigin.horizontal.replace('middle', 'vertical'); return { root: { - position: 'fixed', - zIndex: muiTheme.zIndex.popover, - opacity: open ? 1 : 0, - transform: open ? 'scale(1, 1)' : 'scale(0, 0)', - transformOrigin: horizontal + ' ' + targetOrigin.vertical, - transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity']), - maxHeight: '100%' - }, - horizontal: { - maxHeight: '100%', - overflowY: 'auto', - transform: open ? 'scaleX(1)' : 'scaleX(0)', - opacity: open ? 1 : 0, - transformOrigin: horizontal + ' ' + targetOrigin.vertical, - transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity']) - }, - vertical: { - opacity: open ? 1 : 0, - transform: open ? 'scaleY(1)' : 'scaleY(0)', - transformOrigin: horizontal + ' ' + targetOrigin.vertical, - transition: _transitions2.default.easeOut('500ms', ['transform', 'opacity']) + position: 'relative', + paddingLeft: baseTheme.spacing.desktopGutterLess, + paddingRight: baseTheme.spacing.desktopGutterLess, + verticalAlign: 'middle' } }; } -var PopoverAnimationDefault = function (_Component) { - (0, _inherits3.default)(PopoverAnimationDefault, _Component); - - function PopoverAnimationDefault() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, PopoverAnimationDefault); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +var FlatButtonLabel = function (_Component) { + (0, _inherits3.default)(FlatButtonLabel, _Component); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PopoverAnimationDefault.__proto__ || (0, _getPrototypeOf2.default)(PopoverAnimationDefault)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - open: false - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + function FlatButtonLabel() { + (0, _classCallCheck3.default)(this, FlatButtonLabel); + return (0, _possibleConstructorReturn3.default)(this, (FlatButtonLabel.__proto__ || (0, _getPrototypeOf2.default)(FlatButtonLabel)).apply(this, arguments)); } - (0, _createClass3.default)(PopoverAnimationDefault, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.setState({ open: true }); // eslint-disable-line react/no-did-mount-set-state - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - this.setState({ - open: nextProps.open - }); - } - }, { + (0, _createClass3.default)(FlatButtonLabel, [{ key: 'render', value: function render() { var _props = this.props, - className = _props.className, - style = _props.style, - zDepth = _props.zDepth; + label = _props.label, + style = _props.style; var prepareStyles = this.context.muiTheme.prepareStyles; - var styles = getStyles(this.props, this.context, this.state); + var styles = getStyles(this.props, this.context); return _react2.default.createElement( - _Paper2.default, - { - style: (0, _simpleAssign2.default)(styles.root, style), - zDepth: zDepth, - className: className - }, - _react2.default.createElement( - 'div', - { style: prepareStyles(styles.horizontal) }, - _react2.default.createElement( - 'div', - { style: prepareStyles(styles.vertical) }, - this.props.children - ) - ) + 'span', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + label ); } }]); - return PopoverAnimationDefault; + return FlatButtonLabel; }(_react.Component); -PopoverAnimationDefault.defaultProps = { - style: {}, - zDepth: 1 -}; -PopoverAnimationDefault.contextTypes = { +FlatButtonLabel.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? PopoverAnimationDefault.propTypes = { - children: _react.PropTypes.node, - /** - * The css class name of the root element. - */ - className: _react.PropTypes.string, - open: _react.PropTypes.bool.isRequired, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - targetOrigin: _propTypes2.default.origin.isRequired, - zDepth: _propTypes2.default.zDepth + false ? FlatButtonLabel.propTypes = { + label: _react.PropTypes.node, + style: _react.PropTypes.object } : void 0; -exports.default = PopoverAnimationDefault; +exports.default = FlatButtonLabel; /***/ }), -/* 773 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61301,69 +64742,170 @@ exports.default = PopoverAnimationDefault; Object.defineProperty(exports, "__esModule", { value: true }); -/** -* Returns a number of pixels from the top of the screen for given dom element. -* -* @param {object} dom element -* @returns {number} A position from the top of the screen in pixels -*/ -var getOffsetTop = exports.getOffsetTop = function getOffsetTop(elem) { - var yPos = elem.offsetTop; - var tempEl = elem.offsetParent; - while (tempEl != null) { - yPos += tempEl.offsetTop; - tempEl = tempEl.offsetParent; - } +var _getPrototypeOf = __webpack_require__(3); - return yPos; -}; +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -var isIOS = exports.isIOS = function isIOS() { - return (/iPad|iPhone|iPod/.test(window.navigator.userAgent) && !window.MSStream - ); -}; +var _classCallCheck2 = __webpack_require__(1); -/***/ }), -/* 774 */ -/***/ (function(module, exports, __webpack_require__) { +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -"use strict"; +var _createClass2 = __webpack_require__(2); +var _createClass3 = _interopRequireDefault(_createClass2); -Object.defineProperty(exports, "__esModule", { - value: true -}); +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(25); +var _dateUtils = __webpack_require__(85); -var _pure2 = _interopRequireDefault(_pure); - -var _SvgIcon = __webpack_require__(26); +var _DayButton = __webpack_require__(777); -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); +var _DayButton2 = _interopRequireDefault(_DayButton); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var NavigationCheck = function NavigationCheck(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' }) - ); +var styles = { + root: { + display: 'flex', + flexDirection: 'column', + justifyContent: 'flex-start', + fontWeight: 400, + height: 228, + lineHeight: 2, + position: 'relative', + textAlign: 'center', + MozPaddingStart: 0 + }, + week: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'space-around', + height: 34, + marginBottom: 2 + } }; -NavigationCheck = (0, _pure2.default)(NavigationCheck); -NavigationCheck.displayName = 'NavigationCheck'; -NavigationCheck.muiName = 'SvgIcon'; -exports.default = NavigationCheck; +var CalendarMonth = function (_Component) { + (0, _inherits3.default)(CalendarMonth, _Component); + + function CalendarMonth() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, CalendarMonth); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarMonth.__proto__ || (0, _getPrototypeOf2.default)(CalendarMonth)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapDay = function (event, date) { + if (_this.props.onTouchTapDay) { + _this.props.onTouchTapDay(event, date); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(CalendarMonth, [{ + key: 'isSelectedDateDisabled', + value: function isSelectedDateDisabled() { + return this.selectedDateDisabled; + } + }, { + key: 'shouldDisableDate', + value: function shouldDisableDate(day) { + if (day === null) return false; + var disabled = !(0, _dateUtils.isBetweenDates)(day, this.props.minDate, this.props.maxDate); + if (!disabled && this.props.shouldDisableDate) disabled = this.props.shouldDisableDate(day); + + return disabled; + } + }, { + key: 'getWeekElements', + value: function getWeekElements() { + var _this2 = this; + + var weekArray = (0, _dateUtils.getWeekArray)(this.props.displayDate, this.props.firstDayOfWeek); + + return weekArray.map(function (week, i) { + return _react2.default.createElement( + 'div', + { key: i, style: styles.week }, + _this2.getDayElements(week, i) + ); + }, this); + } + }, { + key: 'getDayElements', + value: function getDayElements(week, i) { + var _this3 = this; + + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + locale = _props.locale, + selectedDate = _props.selectedDate; + + + return week.map(function (day, j) { + var isSameDate = (0, _dateUtils.isEqualDate)(selectedDate, day); + var disabled = _this3.shouldDisableDate(day); + var selected = !disabled && isSameDate; + + if (isSameDate) { + _this3.selectedDateDisabled = disabled; + } + + return _react2.default.createElement(_DayButton2.default, { + DateTimeFormat: DateTimeFormat, + locale: locale, + date: day, + disabled: disabled, + key: 'db' + (i + j), + onTouchTap: _this3.handleTouchTapDay, + selected: selected + }); + }, this); + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement( + 'div', + { style: styles.root }, + this.getWeekElements() + ); + } + }]); + return CalendarMonth; +}(_react.Component); + + false ? CalendarMonth.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + autoOk: _react.PropTypes.bool, + displayDate: _react.PropTypes.object.isRequired, + firstDayOfWeek: _react.PropTypes.number, + locale: _react.PropTypes.string.isRequired, + maxDate: _react.PropTypes.object, + minDate: _react.PropTypes.object, + onTouchTapDay: _react.PropTypes.func, + selectedDate: _react.PropTypes.object.isRequired, + shouldDisableDate: _react.PropTypes.func +} : void 0; +exports.default = CalendarMonth; /***/ }), -/* 775 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61372,7 +64914,18 @@ exports.default = NavigationCheck; Object.defineProperty(exports, "__esModule", { value: true }); -exports.HotKeyHolder = undefined; + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); var _classCallCheck2 = __webpack_require__(1); @@ -61382,33 +64935,178 @@ var _createClass2 = __webpack_require__(2); var _createClass3 = _interopRequireDefault(_createClass2); +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _dateUtils = __webpack_require__(85); + +var _EnhancedButton = __webpack_require__(51); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var HotKeyHolder = exports.HotKeyHolder = function () { - function HotKeyHolder() { - var _this = this; +function getStyles(props, context, state) { + var date = props.date, + disabled = props.disabled, + selected = props.selected; + var hover = state.hover; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + datePicker = _context$muiTheme.datePicker; - (0, _classCallCheck3.default)(this, HotKeyHolder); - this.clear = function () { - _this.timerId = null; - _this.lastKeys = null; - }; - } + var labelColor = baseTheme.palette.textColor; + var buttonStateOpacity = 0; + var buttonStateTransform = 'scale(0)'; + + if (hover || selected) { + labelColor = datePicker.selectTextColor; + buttonStateOpacity = selected ? 1 : 0.6; + buttonStateTransform = 'scale(1)'; + } else if ((0, _dateUtils.isEqualDate)(date, new Date())) { + labelColor = datePicker.color; + } + + return { + root: { + boxSizing: 'border-box', + fontWeight: '400', + opacity: disabled && '0.4', + padding: '4px 0px', + position: 'relative', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + width: 42 + }, + label: { + color: labelColor, + fontWeight: '400', + position: 'relative' + }, + buttonState: { + backgroundColor: datePicker.selectColor, + borderRadius: '50%', + height: 34, + left: 4, + opacity: buttonStateOpacity, + position: 'absolute', + top: 0, + transform: buttonStateTransform, + transition: _transitions2.default.easeOut(), + width: 34 + } + }; +} + +var DayButton = function (_Component) { + (0, _inherits3.default)(DayButton, _Component); + + function DayButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DayButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DayButton.__proto__ || (0, _getPrototypeOf2.default)(DayButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hover: false + }, _this.handleMouseEnter = function () { + if (!_this.props.disabled) { + _this.setState({ hover: true }); + } + }, _this.handleMouseLeave = function () { + if (!_this.props.disabled) { + _this.setState({ hover: false }); + } + }, _this.handleTouchTap = function (event) { + if (!_this.props.disabled && _this.props.onTouchTap) { + _this.props.onTouchTap(event, _this.props.date); + } + }, _this.handleKeyboardFocus = function (event, keyboardFocused) { + if (!_this.props.disabled && _this.props.onKeyboardFocus) { + _this.props.onKeyboardFocus(event, keyboardFocused, _this.props.date); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DayButton, [{ + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + date = _props.date, + disabled = _props.disabled, + locale = _props.locale, + onTouchTap = _props.onTouchTap, + selected = _props.selected, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'date', 'disabled', 'locale', 'onTouchTap', 'selected']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); - (0, _createClass3.default)(HotKeyHolder, [{ - key: 'append', - value: function append(key) { - clearTimeout(this.timerId); - this.timerId = setTimeout(this.clear, 500); - return this.lastKeys = (this.lastKeys || '') + key; + return date ? _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + disabled: disabled, + disableFocusRipple: true, + disableTouchRipple: true, + onKeyboardFocus: this.handleKeyboardFocus, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onTouchTap: this.handleTouchTap, + style: styles.root + }), + _react2.default.createElement('div', { style: prepareStyles(styles.buttonState) }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + new DateTimeFormat(locale, { + day: 'numeric' + }).format(date) + ) + ) : _react2.default.createElement('span', { style: prepareStyles(styles.root) }); } }]); - return HotKeyHolder; -}(); + return DayButton; +}(_react.Component); + +DayButton.defaultProps = { + selected: false, + disabled: false +}; +DayButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DayButton.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + date: _react.PropTypes.object, + disabled: _react.PropTypes.bool, + locale: _react.PropTypes.string.isRequired, + onKeyboardFocus: _react.PropTypes.func, + onTouchTap: _react.PropTypes.func, + selected: _react.PropTypes.bool +} : void 0; +exports.default = DayButton; /***/ }), -/* 776 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61422,10 +65120,6 @@ var _extends2 = __webpack_require__(7); var _extends3 = _interopRequireDefault(_extends2); -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -61446,449 +65140,168 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(10); - -var _transitions2 = _interopRequireDefault(_transitions); - -var _colorManipulator = __webpack_require__(56); +var _reactDom = __webpack_require__(16); -var _childUtils = __webpack_require__(127); - -var _EnhancedButton = __webpack_require__(59); +var _reactDom2 = _interopRequireDefault(_reactDom); -var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); +var _YearButton = __webpack_require__(779); -var _Paper = __webpack_require__(34); +var _YearButton2 = _interopRequireDefault(_YearButton); -var _Paper2 = _interopRequireDefault(_Paper); +var _dateUtils = __webpack_require__(85); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function validateLabel(props, propName, componentName) { - if (false) { - if (!props.children && props.label !== 0 && !props.label && !props.icon) { - return new Error('Required prop label or children or icon was not specified in ' + componentName + '.'); - } - } -} - -function getStyles(props, context, state) { - var _context$muiTheme = context.muiTheme, - baseTheme = _context$muiTheme.baseTheme, - button = _context$muiTheme.button, - raisedButton = _context$muiTheme.raisedButton; - var disabled = props.disabled, - disabledBackgroundColor = props.disabledBackgroundColor, - disabledLabelColor = props.disabledLabelColor, - fullWidth = props.fullWidth, - icon = props.icon, - label = props.label, - labelPosition = props.labelPosition, - primary = props.primary, - secondary = props.secondary, - style = props.style; - - - var amount = primary || secondary ? 0.4 : 0.08; - - var backgroundColor = raisedButton.color; - var labelColor = raisedButton.textColor; - - if (disabled) { - backgroundColor = disabledBackgroundColor || raisedButton.disabledColor; - labelColor = disabledLabelColor || raisedButton.disabledTextColor; - } else if (primary) { - backgroundColor = raisedButton.primaryColor; - labelColor = raisedButton.primaryTextColor; - } else if (secondary) { - backgroundColor = raisedButton.secondaryColor; - labelColor = raisedButton.secondaryTextColor; - } else { - if (props.backgroundColor) { - backgroundColor = props.backgroundColor; - } - if (props.labelColor) { - labelColor = props.labelColor; - } - } - - var buttonHeight = style && style.height || button.height; - var borderRadius = 2; - - return { - root: { - display: 'inline-block', - transition: _transitions2.default.easeOut(), - minWidth: fullWidth ? '100%' : button.minWidth - }, - button: { - height: buttonHeight, - lineHeight: buttonHeight + 'px', - width: '100%', - padding: 0, - borderRadius: borderRadius, - transition: _transitions2.default.easeOut(), - backgroundColor: backgroundColor, - // That's the default value for a button but not a link - textAlign: 'center' - }, - label: { - position: 'relative', - opacity: 1, - fontSize: raisedButton.fontSize, - letterSpacing: 0, - textTransform: raisedButton.textTransform || button.textTransform || 'uppercase', - fontWeight: raisedButton.fontWeight, - margin: 0, - userSelect: 'none', - paddingLeft: icon && labelPosition !== 'before' ? 8 : baseTheme.spacing.desktopGutterLess, - paddingRight: icon && labelPosition === 'before' ? 8 : baseTheme.spacing.desktopGutterLess, - color: labelColor - }, - icon: { - verticalAlign: 'middle', - marginLeft: label && labelPosition !== 'before' ? 12 : 0, - marginRight: label && labelPosition === 'before' ? 12 : 0 - }, - overlay: { - height: buttonHeight, - borderRadius: borderRadius, - backgroundColor: (state.keyboardFocused || state.hovered) && !disabled && (0, _colorManipulator.fade)(labelColor, amount), - transition: _transitions2.default.easeOut(), - top: 0 - }, - ripple: { - color: labelColor, - opacity: !(primary || secondary) ? 0.1 : 0.16 - } - }; -} - -var RaisedButton = function (_Component) { - (0, _inherits3.default)(RaisedButton, _Component); +var CalendarYear = function (_Component) { + (0, _inherits3.default)(CalendarYear, _Component); - function RaisedButton() { + function CalendarYear() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, RaisedButton); + (0, _classCallCheck3.default)(this, CalendarYear); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RaisedButton.__proto__ || (0, _getPrototypeOf2.default)(RaisedButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - hovered: false, - keyboardFocused: false, - touched: false, - initialZDepth: 0, - zDepth: 0 - }, _this.handleMouseDown = function (event) { - // only listen to left clicks - if (event.button === 0) { - _this.setState({ - zDepth: _this.state.initialZDepth + 1 - }); - } - if (_this.props.onMouseDown) { - _this.props.onMouseDown(event); - } - }, _this.handleMouseUp = function (event) { - _this.setState({ - zDepth: _this.state.initialZDepth - }); - if (_this.props.onMouseUp) { - _this.props.onMouseUp(event); - } - }, _this.handleMouseLeave = function (event) { - if (!_this.state.keyboardFocused) { - _this.setState({ - zDepth: _this.state.initialZDepth, - hovered: false - }); - } - if (_this.props.onMouseLeave) { - _this.props.onMouseLeave(event); - } - }, _this.handleMouseEnter = function (event) { - if (!_this.state.keyboardFocused && !_this.state.touched) { - _this.setState({ - hovered: true - }); - } - if (_this.props.onMouseEnter) { - _this.props.onMouseEnter(event); - } - }, _this.handleTouchStart = function (event) { - _this.setState({ - touched: true, - zDepth: _this.state.initialZDepth + 1 - }); - - if (_this.props.onTouchStart) { - _this.props.onTouchStart(event); - } - }, _this.handleTouchEnd = function (event) { - _this.setState({ - touched: true, - zDepth: _this.state.initialZDepth - }); - - if (_this.props.onTouchEnd) { - _this.props.onTouchEnd(event); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarYear.__proto__ || (0, _getPrototypeOf2.default)(CalendarYear)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapYear = function (event, year) { + if (_this.props.onTouchTapYear) { + _this.props.onTouchTapYear(event, year); } - }, _this.handleKeyboardFocus = function (event, keyboardFocused) { - var zDepth = keyboardFocused && !_this.props.disabled ? _this.state.initialZDepth + 1 : _this.state.initialZDepth; - - _this.setState({ - zDepth: zDepth, - keyboardFocused: keyboardFocused - }); }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(RaisedButton, [{ - key: 'componentWillMount', - value: function componentWillMount() { - var zDepth = this.props.disabled ? 0 : 1; - this.setState({ - zDepth: zDepth, - initialZDepth: zDepth - }); + (0, _createClass3.default)(CalendarYear, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.scrollToSelectedYear(); } }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - var zDepth = nextProps.disabled ? 0 : 1; - var nextState = { - zDepth: zDepth, - initialZDepth: zDepth - }; - - if (nextProps.disabled) { - nextState.hovered = false; - } - - this.setState(nextState); + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.scrollToSelectedYear(); } }, { - key: 'render', - value: function render() { + key: 'getYears', + value: function getYears() { var _props = this.props, - backgroundColor = _props.backgroundColor, - buttonStyle = _props.buttonStyle, - children = _props.children, - className = _props.className, - disabled = _props.disabled, - disabledBackgroundColor = _props.disabledBackgroundColor, - disabledLabelColor = _props.disabledLabelColor, - fullWidth = _props.fullWidth, - icon = _props.icon, - label = _props.label, - labelColor = _props.labelColor, - labelPosition = _props.labelPosition, - labelStyle = _props.labelStyle, - overlayStyle = _props.overlayStyle, - primary = _props.primary, - rippleStyle = _props.rippleStyle, - secondary = _props.secondary, - style = _props.style, - other = (0, _objectWithoutProperties3.default)(_props, ['backgroundColor', 'buttonStyle', 'children', 'className', 'disabled', 'disabledBackgroundColor', 'disabledLabelColor', 'fullWidth', 'icon', 'label', 'labelColor', 'labelPosition', 'labelStyle', 'overlayStyle', 'primary', 'rippleStyle', 'secondary', 'style']); - var prepareStyles = this.context.muiTheme.prepareStyles; + DateTimeFormat = _props.DateTimeFormat, + locale = _props.locale, + minDate = _props.minDate, + maxDate = _props.maxDate, + selectedDate = _props.selectedDate; - var styles = getStyles(this.props, this.context, this.state); - var mergedRippleStyles = (0, _simpleAssign2.default)({}, styles.ripple, rippleStyle); - var buttonEventHandlers = disabled ? {} : { - onMouseDown: this.handleMouseDown, - onMouseUp: this.handleMouseUp, - onMouseLeave: this.handleMouseLeave, - onMouseEnter: this.handleMouseEnter, - onTouchStart: this.handleTouchStart, - onTouchEnd: this.handleTouchEnd, - onKeyboardFocus: this.handleKeyboardFocus - }; + var minYear = minDate.getFullYear(); + var maxYear = maxDate.getFullYear(); + var years = []; + var dateCheck = (0, _dateUtils.cloneDate)(selectedDate); - var labelElement = label && _react2.default.createElement( - 'span', - { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) }, - label - ); + for (var year = minYear; year <= maxYear; year++) { + dateCheck.setFullYear(year); + var selected = selectedDate.getFullYear() === year; + var selectedProps = {}; + if (selected) { + selectedProps.ref = 'selectedYearButton'; + } - var iconCloned = icon && (0, _react.cloneElement)(icon, { - color: icon.props.color || styles.label.color, - style: (0, _simpleAssign2.default)(styles.icon, icon.props.style) - }); + var yearFormated = new DateTimeFormat(locale, { + year: 'numeric' + }).format(dateCheck); - // Place label before or after children. - var childrenFragment = labelPosition === 'before' ? { - labelElement: labelElement, - iconCloned: iconCloned, - children: children - } : { - children: children, - iconCloned: iconCloned, - labelElement: labelElement - }; + var yearButton = _react2.default.createElement( + _YearButton2.default, + (0, _extends3.default)({ + key: 'yb' + year, + onTouchTap: this.handleTouchTapYear, + selected: selected, + year: year + }, selectedProps), + yearFormated + ); - var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment); + years.push(yearButton); + } - return _react2.default.createElement( - _Paper2.default, - { - className: className, - style: (0, _simpleAssign2.default)(styles.root, style), - zDepth: this.state.zDepth - }, - _react2.default.createElement( - _EnhancedButton2.default, - (0, _extends3.default)({}, other, buttonEventHandlers, { - ref: 'container', - disabled: disabled, - style: (0, _simpleAssign2.default)(styles.button, buttonStyle), - focusRippleColor: mergedRippleStyles.color, - touchRippleColor: mergedRippleStyles.color, - focusRippleOpacity: mergedRippleStyles.opacity, - touchRippleOpacity: mergedRippleStyles.opacity - }), - _react2.default.createElement( - 'div', - { - ref: 'overlay', - style: prepareStyles((0, _simpleAssign2.default)(styles.overlay, overlayStyle)) - }, - enhancedButtonChildren - ) - ) - ); + return years; } - }]); - return RaisedButton; -}(_react.Component); - -RaisedButton.muiName = 'RaisedButton'; -RaisedButton.defaultProps = { - disabled: false, - labelPosition: 'after', - fullWidth: false, - primary: false, - secondary: false -}; -RaisedButton.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? RaisedButton.propTypes = { - /** - * Override the default background color for the button, - * but not the default disabled background color - * (use `disabledBackgroundColor` for this). - */ - backgroundColor: _react.PropTypes.string, - /** - * Override the inline-styles of the button element. - */ - buttonStyle: _react.PropTypes.object, - /** - * The content of the button. - * If a label is provided via the `label` prop, the text within the label - * will be displayed in addition to the content provided here. - */ - children: _react.PropTypes.node, - /** - * The CSS class name of the root element. - */ - className: _react.PropTypes.string, - /** - * If true, the button will be disabled. - */ - disabled: _react.PropTypes.bool, - /** - * Override the default background color for the button - * when it is disabled. - */ - disabledBackgroundColor: _react.PropTypes.string, - /** - * The color of the button's label when the button is disabled. - */ - disabledLabelColor: _react.PropTypes.string, - /** - * If true, the button will take up the full width of its container. - */ - fullWidth: _react.PropTypes.bool, - /** - * The URL to link to when the button is clicked. - */ - href: _react.PropTypes.string, - /** - * An icon to be displayed within the button. - */ - icon: _react.PropTypes.node, - /** - * The label to be displayed within the button. - * If content is provided via the `children` prop, that content will be - * displayed in addition to the label provided here. - */ - label: validateLabel, - /** - * The color of the button's label. - */ - labelColor: _react.PropTypes.string, - /** - * The position of the button's label relative to the button's `children`. - */ - labelPosition: _react.PropTypes.oneOf(['before', 'after']), - /** - * Override the inline-styles of the button's label element. - */ - labelStyle: _react.PropTypes.object, - /** @ignore */ - onMouseDown: _react.PropTypes.func, - /** @ignore */ - onMouseEnter: _react.PropTypes.func, - /** @ignore */ - onMouseLeave: _react.PropTypes.func, - /** @ignore */ - onMouseUp: _react.PropTypes.func, - /** @ignore */ - onTouchEnd: _react.PropTypes.func, - /** @ignore */ - onTouchStart: _react.PropTypes.func, - /** - * Override the inline style of the button overlay. - */ - overlayStyle: _react.PropTypes.object, - /** - * If true, the button will use the theme's primary color. - */ - primary: _react.PropTypes.bool, - /** - * Override the inline style of the ripple element. - */ - rippleStyle: _react.PropTypes.object, - /** - * If true, the button will use the theme's secondary color. - * If both `secondary` and `primary` are true, the button will use - * the theme's primary color. - */ - secondary: _react.PropTypes.bool, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object + }, { + key: 'scrollToSelectedYear', + value: function scrollToSelectedYear() { + if (this.refs.selectedYearButton === undefined) { + return; + } + + var container = _reactDom2.default.findDOMNode(this); + var yearButtonNode = _reactDom2.default.findDOMNode(this.refs.selectedYearButton); + + var containerHeight = container.clientHeight; + var yearButtonNodeHeight = yearButtonNode.clientHeight || 32; + + var scrollYOffset = yearButtonNode.offsetTop + yearButtonNodeHeight / 2 - containerHeight / 2; + container.scrollTop = scrollYOffset; + } + }, { + key: 'render', + value: function render() { + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + calendarYearBackgroundColor = _context$muiTheme.datePicker.calendarYearBackgroundColor; + + + var styles = { + root: { + backgroundColor: calendarYearBackgroundColor, + height: 'inherit', + lineHeight: '35px', + overflowX: 'hidden', + overflowY: 'scroll', + position: 'relative' + }, + child: { + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + minHeight: '100%' + } + }; + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.child) }, + this.getYears() + ) + ); + } + }]); + return CalendarYear; +}(_react.Component); + +CalendarYear.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? CalendarYear.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + locale: _react.PropTypes.string.isRequired, + maxDate: _react.PropTypes.object.isRequired, + minDate: _react.PropTypes.object.isRequired, + onTouchTapYear: _react.PropTypes.func, + selectedDate: _react.PropTypes.object.isRequired, + wordings: _react.PropTypes.object } : void 0; -exports.default = RaisedButton; +exports.default = CalendarYear; /***/ }), -/* 777 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61898,73 +65311,157 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; +var _extends2 = __webpack_require__(7); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends3 = _interopRequireDefault(_extends2); -var _AutoComplete = __webpack_require__(778); +var _objectWithoutProperties2 = __webpack_require__(8); -var _AutoComplete2 = _interopRequireDefault(_AutoComplete); +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var _createComponent = __webpack_require__(43); +var _getPrototypeOf = __webpack_require__(3); -var _createComponent2 = _interopRequireDefault(_createComponent); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -var _mapError = __webpack_require__(60); +var _classCallCheck2 = __webpack_require__(1); -var _mapError2 = _interopRequireDefault(_mapError); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _EnhancedButton = __webpack_require__(51); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } +function getStyles(props, context, state) { + var selected = props.selected, + year = props.year; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + datePicker = _context$muiTheme.datePicker; + var hover = state.hover; -exports.default = (0, _createComponent2.default)(_AutoComplete2.default, function (_ref) { - var _ref$input = _ref.input, - onChange = _ref$input.onChange, - value = _ref$input.value, - _onNewRequest = _ref.onNewRequest, - dataSourceConfig = _ref.dataSourceConfig, - props = _objectWithoutProperties(_ref, ['input', 'onNewRequest', 'dataSourceConfig']); - return _extends({}, (0, _mapError2.default)(props), { - dataSourceConfig: dataSourceConfig, - searchText: dataSourceConfig ? value[dataSourceConfig.text] : value, - onNewRequest: function onNewRequest(value) { - onChange((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && dataSourceConfig ? value[dataSourceConfig.value] : value); - if (_onNewRequest) { - _onNewRequest(value); - } - }, - onUpdateInput: function onUpdateInput(value) { - if (!dataSourceConfig) { - onChange(value); - } + return { + root: { + boxSizing: 'border-box', + color: year === new Date().getFullYear() && datePicker.color, + display: 'block', + fontSize: 14, + margin: '0 auto', + position: 'relative', + textAlign: 'center', + lineHeight: 'inherit', + WebkitTapHighlightColor: 'rgba(0,0,0,0)' }, + label: { + alignSelf: 'center', + color: hover || selected ? datePicker.color : baseTheme.palette.textColor, + fontSize: selected ? 26 : 17, + fontWeight: hover ? 450 : selected ? 500 : 400, + position: 'relative', + top: -1 } - }); -}); + }; +} -/***/ }), -/* 778 */ -/***/ (function(module, exports, __webpack_require__) { +var YearButton = function (_Component) { + (0, _inherits3.default)(YearButton, _Component); -"use strict"; + function YearButton() { + var _ref; + var _temp, _this, _ret; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; + (0, _classCallCheck3.default)(this, YearButton); -var _AutoComplete = __webpack_require__(779); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -var _AutoComplete2 = _interopRequireDefault(_AutoComplete); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = YearButton.__proto__ || (0, _getPrototypeOf2.default)(YearButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hover: false + }, _this.handleMouseEnter = function () { + _this.setState({ hover: true }); + }, _this.handleMouseLeave = function () { + _this.setState({ hover: false }); + }, _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event, _this.props.year); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + (0, _createClass3.default)(YearButton, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + onTouchTap = _props.onTouchTap, + selected = _props.selected, + year = _props.year, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'onTouchTap', 'selected', 'year']); + var prepareStyles = this.context.muiTheme.prepareStyles; -exports.default = _AutoComplete2.default; + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + disableFocusRipple: true, + disableTouchRipple: true, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onTouchTap: this.handleTouchTap, + style: styles.root + }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + children + ) + ); + } + }]); + return YearButton; +}(_react.Component); + +YearButton.defaultProps = { + selected: false +}; +YearButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? YearButton.propTypes = { + children: _react.PropTypes.node.isRequired, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + onTouchTap: _react.PropTypes.func, + selected: _react.PropTypes.bool, + year: _react.PropTypes.number.isRequired +} : void 0; +exports.default = YearButton; /***/ }), -/* 779 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61974,18 +65471,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _typeof2 = __webpack_require__(92); - -var _typeof3 = _interopRequireDefault(_typeof2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -62006,648 +65491,381 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); +var _IconButton = __webpack_require__(64); -var _reactDom2 = _interopRequireDefault(_reactDom); +var _IconButton2 = _interopRequireDefault(_IconButton); -var _keycode = __webpack_require__(30); +var _chevronLeft = __webpack_require__(781); -var _keycode2 = _interopRequireDefault(_keycode); +var _chevronLeft2 = _interopRequireDefault(_chevronLeft); -var _TextField = __webpack_require__(97); +var _chevronRight = __webpack_require__(782); -var _TextField2 = _interopRequireDefault(_TextField); +var _chevronRight2 = _interopRequireDefault(_chevronRight); -var _Menu = __webpack_require__(785); +var _SlideIn = __webpack_require__(209); -var _Menu2 = _interopRequireDefault(_Menu); +var _SlideIn2 = _interopRequireDefault(_SlideIn); -var _MenuItem = __webpack_require__(129); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _MenuItem2 = _interopRequireDefault(_MenuItem); +var styles = { + root: { + display: 'flex', + justifyContent: 'space-between', + backgroundColor: 'inherit', + height: 48 + }, + titleDiv: { + fontSize: 14, + fontWeight: '500', + textAlign: 'center', + width: '100%' + }, + titleText: { + height: 'inherit', + paddingTop: 12 + } +}; -var _Divider = __webpack_require__(786); +var CalendarToolbar = function (_Component) { + (0, _inherits3.default)(CalendarToolbar, _Component); -var _Divider2 = _interopRequireDefault(_Divider); + function CalendarToolbar() { + var _ref; -var _Popover = __webpack_require__(130); + var _temp, _this, _ret; -var _Popover2 = _interopRequireDefault(_Popover); + (0, _classCallCheck3.default)(this, CalendarToolbar); -var _propTypes = __webpack_require__(41); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -var _propTypes2 = _interopRequireDefault(_propTypes); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarToolbar.__proto__ || (0, _getPrototypeOf2.default)(CalendarToolbar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + transitionDirection: 'up' + }, _this.handleTouchTapPrevMonth = function () { + if (_this.props.onMonthChange) { + _this.props.onMonthChange(-1); + } + }, _this.handleTouchTapNextMonth = function () { + if (_this.props.onMonthChange) { + _this.props.onMonthChange(1); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + (0, _createClass3.default)(CalendarToolbar, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.displayDate !== this.props.displayDate) { + var direction = nextProps.displayDate > this.props.displayDate ? 'left' : 'right'; + this.setState({ + transitionDirection: direction + }); + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + locale = _props.locale, + displayDate = _props.displayDate; -function getStyles(props, context, state) { - var anchorEl = state.anchorEl; - var fullWidth = props.fullWidth; + var dateTimeFormatted = new DateTimeFormat(locale, { + month: 'long', + year: 'numeric' + }).format(displayDate); - var styles = { - root: { - display: 'inline-block', - position: 'relative', - width: fullWidth ? '100%' : 256 - }, - menu: { - width: '100%' - }, - list: { - display: 'block', - width: fullWidth ? '100%' : 256 - }, - innerDiv: { - overflow: 'hidden' + return _react2.default.createElement( + 'div', + { style: styles.root }, + _react2.default.createElement( + _IconButton2.default, + { + disabled: !this.props.prevMonth, + onTouchTap: this.handleTouchTapPrevMonth + }, + _react2.default.createElement(_chevronLeft2.default, null) + ), + _react2.default.createElement( + _SlideIn2.default, + { + direction: this.state.transitionDirection, + style: styles.titleDiv + }, + _react2.default.createElement( + 'div', + { key: dateTimeFormatted, style: styles.titleText }, + dateTimeFormatted + ) + ), + _react2.default.createElement( + _IconButton2.default, + { + disabled: !this.props.nextMonth, + onTouchTap: this.handleTouchTapNextMonth + }, + _react2.default.createElement(_chevronRight2.default, null) + ) + ); } - }; + }]); + return CalendarToolbar; +}(_react.Component); - if (anchorEl && fullWidth) { - styles.popover = { - width: anchorEl.clientWidth - }; - } +CalendarToolbar.defaultProps = { + nextMonth: true, + prevMonth: true +}; + false ? CalendarToolbar.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + displayDate: _react.PropTypes.object.isRequired, + locale: _react.PropTypes.string.isRequired, + nextMonth: _react.PropTypes.bool, + onMonthChange: _react.PropTypes.func, + prevMonth: _react.PropTypes.bool +} : void 0; +exports.default = CalendarToolbar; - return styles; -} +/***/ }), +/* 781 */ +/***/ (function(module, exports, __webpack_require__) { -var AutoComplete = function (_Component) { - (0, _inherits3.default)(AutoComplete, _Component); +"use strict"; - function AutoComplete() { - var _ref; - var _temp, _this, _ret; +Object.defineProperty(exports, "__esModule", { + value: true +}); - (0, _classCallCheck3.default)(this, AutoComplete); +var _react = __webpack_require__(0); - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +var _react2 = _interopRequireDefault(_react); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoComplete.__proto__ || (0, _getPrototypeOf2.default)(AutoComplete)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - anchorEl: null, - focusTextField: true, - open: false, - searchText: undefined - }, _this.handleRequestClose = function () { - // Only take into account the Popover clickAway when we are - // not focusing the TextField. - if (!_this.state.focusTextField) { - _this.close(); - } - }, _this.handleMouseDown = function (event) { - // Keep the TextField focused - event.preventDefault(); - }, _this.handleItemTouchTap = function (event, child) { - var dataSource = _this.props.dataSource; +var _pure = __webpack_require__(20); - var index = parseInt(child.key, 10); - var chosenRequest = dataSource[index]; - var searchText = _this.chosenRequestText(chosenRequest); +var _pure2 = _interopRequireDefault(_pure); - _this.setState({ - searchText: searchText - }, function () { - _this.props.onUpdateInput(searchText, _this.props.dataSource, { - source: 'touchTap' - }); +var _SvgIcon = __webpack_require__(21); - _this.timerTouchTapCloseId = setTimeout(function () { - _this.timerTouchTapCloseId = null; - _this.close(); - _this.props.onNewRequest(chosenRequest, index); - }, _this.props.menuCloseDelay); - }); - }, _this.chosenRequestText = function (chosenRequest) { - if (typeof chosenRequest === 'string') { - return chosenRequest; - } else { - return chosenRequest[_this.props.dataSourceConfig.text]; - } - }, _this.handleEscKeyDown = function () { - _this.close(); - }, _this.handleKeyDown = function (event) { - if (_this.props.onKeyDown) _this.props.onKeyDown(event); +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationChevronLeft = function NavigationChevronLeft(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z' }) + ); +}; +NavigationChevronLeft = (0, _pure2.default)(NavigationChevronLeft); +NavigationChevronLeft.displayName = 'NavigationChevronLeft'; +NavigationChevronLeft.muiName = 'SvgIcon'; + +exports.default = NavigationChevronLeft; + +/***/ }), +/* 782 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(20); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(21); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationChevronRight = function NavigationChevronRight(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z' }) + ); +}; +NavigationChevronRight = (0, _pure2.default)(NavigationChevronRight); +NavigationChevronRight.displayName = 'NavigationChevronRight'; +NavigationChevronRight.muiName = 'SvgIcon'; + +exports.default = NavigationChevronRight; - switch ((0, _keycode2.default)(event)) { - case 'enter': - _this.close(); - var searchText = _this.state.searchText; - if (searchText !== '') { - _this.props.onNewRequest(searchText, -1); - } - break; +/***/ }), +/* 783 */ +/***/ (function(module, exports, __webpack_require__) { - case 'esc': - _this.close(); - break; +"use strict"; - case 'down': - event.preventDefault(); - _this.setState({ - open: true, - focusTextField: false, - anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) - }); - break; - default: - break; - } - }, _this.handleChange = function (event) { - var searchText = event.target.value; +Object.defineProperty(exports, "__esModule", { + value: true +}); - // Make sure that we have a new searchText. - // Fix an issue with a Cordova Webview - if (searchText === _this.state.searchText) { - return; - } +var _extends2 = __webpack_require__(7); - _this.setState({ - searchText: searchText, - open: true, - anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) - }, function () { - _this.props.onUpdateInput(searchText, _this.props.dataSource, { - source: 'change' - }); - }); - }, _this.handleBlur = function (event) { - if (_this.state.focusTextField && _this.timerTouchTapCloseId === null) { - _this.timerBlurClose = setTimeout(function () { - _this.close(); - }, 0); - } +var _extends3 = _interopRequireDefault(_extends2); - if (_this.props.onBlur) { - _this.props.onBlur(event); - } - }, _this.handleFocus = function (event) { - if (!_this.state.open && _this.props.openOnFocus) { - _this.setState({ - open: true, - anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) - }); - } +var _objectWithoutProperties2 = __webpack_require__(8); - _this.setState({ - focusTextField: true - }); +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - if (_this.props.onFocus) { - _this.props.onFocus(event); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } +var _getPrototypeOf = __webpack_require__(3); - (0, _createClass3.default)(AutoComplete, [{ - key: 'componentWillMount', - value: function componentWillMount() { - this.requestsList = []; - this.setState({ - open: this.props.open, - searchText: this.props.searchText - }); - this.timerTouchTapCloseId = null; - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (this.props.searchText !== nextProps.searchText) { - this.setState({ - searchText: nextProps.searchText - }); - } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - clearTimeout(this.timerTouchTapCloseId); - clearTimeout(this.timerBlurClose); - } - }, { - key: 'close', - value: function close() { - this.setState({ - open: false, - anchorEl: null - }); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - if (this.props.onClose) { - this.props.onClose(); - } - } - }, { - key: 'blur', - value: function blur() { - this.refs.searchTextField.blur(); - } - }, { - key: 'focus', - value: function focus() { - this.refs.searchTextField.focus(); - } - }, { - key: 'render', - value: function render() { - var _this2 = this; +var _classCallCheck2 = __webpack_require__(1); - var _props = this.props, - anchorOrigin = _props.anchorOrigin, - animated = _props.animated, - animation = _props.animation, - dataSource = _props.dataSource, - dataSourceConfig = _props.dataSourceConfig, - disableFocusRipple = _props.disableFocusRipple, - errorStyle = _props.errorStyle, - floatingLabelText = _props.floatingLabelText, - filter = _props.filter, - fullWidth = _props.fullWidth, - style = _props.style, - hintText = _props.hintText, - maxSearchResults = _props.maxSearchResults, - menuCloseDelay = _props.menuCloseDelay, - textFieldStyle = _props.textFieldStyle, - menuStyle = _props.menuStyle, - menuProps = _props.menuProps, - listStyle = _props.listStyle, - targetOrigin = _props.targetOrigin, - onClose = _props.onClose, - onNewRequest = _props.onNewRequest, - onUpdateInput = _props.onUpdateInput, - openOnFocus = _props.openOnFocus, - popoverProps = _props.popoverProps, - searchTextProp = _props.searchText, - other = (0, _objectWithoutProperties3.default)(_props, ['anchorOrigin', 'animated', 'animation', 'dataSource', 'dataSourceConfig', 'disableFocusRipple', 'errorStyle', 'floatingLabelText', 'filter', 'fullWidth', 'style', 'hintText', 'maxSearchResults', 'menuCloseDelay', 'textFieldStyle', 'menuStyle', 'menuProps', 'listStyle', 'targetOrigin', 'onClose', 'onNewRequest', 'onUpdateInput', 'openOnFocus', 'popoverProps', 'searchText']); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - var _ref2 = popoverProps || {}, - popoverStyle = _ref2.style, - popoverOther = (0, _objectWithoutProperties3.default)(_ref2, ['style']); +var _createClass2 = __webpack_require__(2); - var _state = this.state, - open = _state.open, - anchorEl = _state.anchorEl, - searchText = _state.searchText, - focusTextField = _state.focusTextField; - var prepareStyles = this.context.muiTheme.prepareStyles; +var _createClass3 = _interopRequireDefault(_createClass2); - var styles = getStyles(this.props, this.context, this.state); +var _possibleConstructorReturn2 = __webpack_require__(4); - var requestsList = []; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - dataSource.every(function (item, index) { - switch (typeof item === 'undefined' ? 'undefined' : (0, _typeof3.default)(item)) { - case 'string': - if (filter(searchText, item, item)) { - requestsList.push({ - text: item, - value: _react2.default.createElement(_MenuItem2.default, { - innerDivStyle: styles.innerDiv, - value: item, - primaryText: item, - disableFocusRipple: disableFocusRipple, - key: index - }) - }); - } - break; +var _inherits2 = __webpack_require__(5); - case 'object': - if (item && typeof item[_this2.props.dataSourceConfig.text] === 'string') { - var itemText = item[_this2.props.dataSourceConfig.text]; - if (!_this2.props.filter(searchText, itemText, item)) break; +var _inherits3 = _interopRequireDefault(_inherits2); - var itemValue = item[_this2.props.dataSourceConfig.value]; - if (itemValue.type && (itemValue.type.muiName === _MenuItem2.default.muiName || itemValue.type.muiName === _Divider2.default.muiName)) { - requestsList.push({ - text: itemText, - value: _react2.default.cloneElement(itemValue, { - key: index, - disableFocusRipple: disableFocusRipple - }) - }); - } else { - requestsList.push({ - text: itemText, - value: _react2.default.createElement(_MenuItem2.default, { - innerDivStyle: styles.innerDiv, - primaryText: itemText, - disableFocusRipple: disableFocusRipple, - key: index - }) - }); - } - } - break; +var _simpleAssign = __webpack_require__(6); - default: - // Do nothing - } +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - return !(maxSearchResults && maxSearchResults > 0 && requestsList.length === maxSearchResults); - }); +var _react = __webpack_require__(0); - this.requestsList = requestsList; +var _react2 = _interopRequireDefault(_react); - var menu = open && requestsList.length > 0 && _react2.default.createElement( - _Menu2.default, - (0, _extends3.default)({}, menuProps, { - ref: 'menu', - autoWidth: false, - disableAutoFocus: focusTextField, - onEscKeyDown: this.handleEscKeyDown, - initiallyKeyboardFocused: true, - onItemTouchTap: this.handleItemTouchTap, - onMouseDown: this.handleMouseDown, - style: (0, _simpleAssign2.default)(styles.menu, menuStyle), - listStyle: (0, _simpleAssign2.default)(styles.list, listStyle) - }), - requestsList.map(function (i) { - return i.value; - }) - ); +var _reactDom = __webpack_require__(16); - return _react2.default.createElement( - 'div', - { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, - _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { - ref: 'searchTextField', - autoComplete: 'off', - value: searchText, - onChange: this.handleChange, - onBlur: this.handleBlur, - onFocus: this.handleFocus, - onKeyDown: this.handleKeyDown, - floatingLabelText: floatingLabelText, - hintText: hintText, - fullWidth: fullWidth, - multiLine: false, - errorStyle: errorStyle, - style: textFieldStyle - })), - _react2.default.createElement( - _Popover2.default, - (0, _extends3.default)({ - style: (0, _simpleAssign2.default)({}, styles.popover, popoverStyle), - canAutoPosition: false, - anchorOrigin: anchorOrigin, - targetOrigin: targetOrigin, - open: open, - anchorEl: anchorEl, - useLayerForClickAway: false, - onRequestClose: this.handleRequestClose, - animated: animated, - animation: animation - }, popoverOther), - menu - ) - ); - } - }]); - return AutoComplete; -}(_react.Component); +var _reactDom2 = _interopRequireDefault(_reactDom); -AutoComplete.defaultProps = { - anchorOrigin: { - vertical: 'bottom', - horizontal: 'left' - }, - animated: true, - dataSourceConfig: { - text: 'text', - value: 'value' - }, - disableFocusRipple: true, - filter: function filter(searchText, key) { - return searchText !== '' && key.indexOf(searchText) !== -1; - }, - fullWidth: false, - open: false, - openOnFocus: false, - onUpdateInput: function onUpdateInput() {}, - onNewRequest: function onNewRequest() {}, - searchText: '', - menuCloseDelay: 300, - targetOrigin: { - vertical: 'top', - horizontal: 'left' - } -}; -AutoComplete.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? AutoComplete.propTypes = { - /** - * Location of the anchor for the auto complete. - */ - anchorOrigin: _propTypes2.default.origin, - /** - * If true, the auto complete is animated as it is toggled. - */ - animated: _react.PropTypes.bool, - /** - * Override the default animation component used. - */ - animation: _react.PropTypes.func, - /** - * Array of strings or nodes used to populate the list. - */ - dataSource: _react.PropTypes.array.isRequired, - /** - * Config for objects list dataSource. - * - * @typedef {Object} dataSourceConfig - * - * @property {string} text `dataSource` element key used to find a string to be matched for search - * and shown as a `TextField` input value after choosing the result. - * @property {string} value `dataSource` element key used to find a string to be shown in search results. - */ - dataSourceConfig: _react.PropTypes.object, - /** - * Disables focus ripple when true. - */ - disableFocusRipple: _react.PropTypes.bool, - /** - * Override style prop for error. - */ - errorStyle: _react.PropTypes.object, - /** - * The error content to display. - */ - errorText: _react.PropTypes.node, - /** - * Callback function used to filter the auto complete. - * - * @param {string} searchText The text to search for within `dataSource`. - * @param {string} key `dataSource` element, or `text` property on that element if it's not a string. - * @returns {boolean} `true` indicates the auto complete list will include `key` when the input is `searchText`. - */ - filter: _react.PropTypes.func, - /** - * The content to use for adding floating label element. - */ - floatingLabelText: _react.PropTypes.node, - /** - * If true, the field receives the property `width: 100%`. - */ - fullWidth: _react.PropTypes.bool, - /** - * The hint content to display. - */ - hintText: _react.PropTypes.node, - /** - * Override style for list. - */ - listStyle: _react.PropTypes.object, - /** - * The max number of search results to be shown. - * By default it shows all the items which matches filter. - */ - maxSearchResults: _react.PropTypes.number, - /** - * Delay for closing time of the menu. - */ - menuCloseDelay: _react.PropTypes.number, - /** - * Props to be passed to menu. - */ - menuProps: _react.PropTypes.object, - /** - * Override style for menu. - */ - menuStyle: _react.PropTypes.object, - /** @ignore */ - onBlur: _react.PropTypes.func, - /** - * Callback function fired when the menu is closed. - */ - onClose: _react.PropTypes.func, - /** @ignore */ - onFocus: _react.PropTypes.func, - /** @ignore */ - onKeyDown: _react.PropTypes.func, - /** - * Callback function that is fired when a list item is selected, or enter is pressed in the `TextField`. - * - * @param {string} chosenRequest Either the `TextField` input value, if enter is pressed in the `TextField`, - * or the text value of the corresponding list item that was selected. - * @param {number} index The index in `dataSource` of the list item selected, or `-1` if enter is pressed in the - * `TextField`. - */ - onNewRequest: _react.PropTypes.func, - /** - * Callback function that is fired when the user updates the `TextField`. - * - * @param {string} searchText The auto-complete's `searchText` value. - * @param {array} dataSource The auto-complete's `dataSource` array. - * @param {object} params Additional information linked the update. - */ - onUpdateInput: _react.PropTypes.func, - /** - * Auto complete menu is open if true. - */ - open: _react.PropTypes.bool, - /** - * If true, the list item is showed when a focus event triggers. - */ - openOnFocus: _react.PropTypes.bool, - /** - * Props to be passed to popover. - */ - popoverProps: _react.PropTypes.object, - /** - * Text being input to auto complete. - */ - searchText: _react.PropTypes.string, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - /** - * Origin for location of target. - */ - targetOrigin: _propTypes2.default.origin, - /** - * Override the inline-styles of AutoComplete's TextField element. - */ - textFieldStyle: _react.PropTypes.object -} : void 0; +var _autoPrefix = __webpack_require__(96); +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); -AutoComplete.levenshteinDistance = function (searchText, key) { - var current = []; - var prev = void 0; - var value = void 0; +var _transitions = __webpack_require__(10); - for (var i = 0; i <= key.length; i++) { - for (var j = 0; j <= searchText.length; j++) { - if (i && j) { - if (searchText.charAt(j - 1) === key.charAt(i - 1)) value = prev;else value = Math.min(current[j], current[j - 1], prev) + 1; - } else { - value = i + j; - } - prev = current[j]; - current[j] = value; - } +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SlideInChild = function (_Component) { + (0, _inherits3.default)(SlideInChild, _Component); + + function SlideInChild() { + (0, _classCallCheck3.default)(this, SlideInChild); + return (0, _possibleConstructorReturn3.default)(this, (SlideInChild.__proto__ || (0, _getPrototypeOf2.default)(SlideInChild)).apply(this, arguments)); } - return current.pop(); -}; -AutoComplete.noFilter = function () { - return true; -}; + (0, _createClass3.default)(SlideInChild, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + var x = this.props.direction === 'left' ? '100%' : this.props.direction === 'right' ? '-100%' : '0'; + var y = this.props.direction === 'up' ? '100%' : this.props.direction === 'down' ? '-100%' : '0'; -AutoComplete.defaultFilter = AutoComplete.caseSensitiveFilter = function (searchText, key) { - return searchText !== '' && key.indexOf(searchText) !== -1; -}; + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'translate(' + x + ', ' + y + ')'); -AutoComplete.caseInsensitiveFilter = function (searchText, key) { - return key.toLowerCase().indexOf(searchText.toLowerCase()) !== -1; -}; + this.enterTimer = setTimeout(callback, this.props.enterDelay); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = '1'; + _autoPrefix2.default.set(style, 'transform', 'translate(0,0)'); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + var direction = this.props.getLeaveDirection(); + var x = direction === 'left' ? '-100%' : direction === 'right' ? '100%' : '0'; + var y = direction === 'up' ? '-100%' : direction === 'down' ? '100%' : '0'; -AutoComplete.levenshteinDistanceFilter = function (distanceLessThan) { - if (distanceLessThan === undefined) { - return AutoComplete.levenshteinDistance; - } else if (typeof distanceLessThan !== 'number') { - throw 'Error: AutoComplete.levenshteinDistanceFilter is a filter generator, not a filter!'; - } + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'translate(' + x + ', ' + y + ')'); - return function (s, k) { - return AutoComplete.levenshteinDistance(s, k) < distanceLessThan; - }; -}; + this.leaveTimer = setTimeout(callback, 450); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + enterDelay = _props.enterDelay, + getLeaveDirection = _props.getLeaveDirection, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'getLeaveDirection', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; -AutoComplete.fuzzyFilter = function (searchText, key) { - var compareString = key.toLowerCase(); - searchText = searchText.toLowerCase(); - var searchTextIndex = 0; - for (var index = 0; index < key.length; index++) { - if (compareString[index] === searchText[searchTextIndex]) { - searchTextIndex += 1; + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'absolute', + height: '100%', + width: '100%', + top: 0, + left: 0, + transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) + }, style); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }), + children + ); } - } + }]); + return SlideInChild; +}(_react.Component); - return searchTextIndex === searchText.length; +SlideInChild.defaultProps = { + enterDelay: 0 }; - -AutoComplete.Item = _MenuItem2.default; -AutoComplete.Divider = _Divider2.default; - -exports.default = AutoComplete; +SlideInChild.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? SlideInChild.propTypes = { + children: _react.PropTypes.node, + direction: _react.PropTypes.string, + enterDelay: _react.PropTypes.number, + // This callback is needed bacause the direction could change when leaving the DOM + getLeaveDirection: _react.PropTypes.func.isRequired, + style: _react.PropTypes.object +} : void 0; +exports.default = SlideInChild; /***/ }), -/* 780 */ +/* 784 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62685,550 +65903,212 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); - -var _reactDom2 = _interopRequireDefault(_reactDom); - -var _shallowEqual = __webpack_require__(58); - -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); - var _transitions = __webpack_require__(10); var _transitions2 = _interopRequireDefault(_transitions); -var _EnhancedTextarea = __webpack_require__(781); - -var _EnhancedTextarea2 = _interopRequireDefault(_EnhancedTextarea); - -var _TextFieldHint = __webpack_require__(782); - -var _TextFieldHint2 = _interopRequireDefault(_TextFieldHint); - -var _TextFieldLabel = __webpack_require__(783); - -var _TextFieldLabel2 = _interopRequireDefault(_TextFieldLabel); - -var _TextFieldUnderline = __webpack_require__(784); - -var _TextFieldUnderline2 = _interopRequireDefault(_TextFieldUnderline); +var _SlideIn = __webpack_require__(209); -var _warning = __webpack_require__(17); - -var _warning2 = _interopRequireDefault(_warning); +var _SlideIn2 = _interopRequireDefault(_SlideIn); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var getStyles = function getStyles(props, context, state) { - var _context$muiTheme = context.muiTheme, - baseTheme = _context$muiTheme.baseTheme, - _context$muiTheme$tex = _context$muiTheme.textField, - floatingLabelColor = _context$muiTheme$tex.floatingLabelColor, - focusColor = _context$muiTheme$tex.focusColor, - textColor = _context$muiTheme$tex.textColor, - disabledTextColor = _context$muiTheme$tex.disabledTextColor, - backgroundColor = _context$muiTheme$tex.backgroundColor, - errorColor = _context$muiTheme$tex.errorColor; +function getStyles(props, context, state) { + var datePicker = context.muiTheme.datePicker; + var selectedYear = state.selectedYear; + var isLandscape = props.mode === 'landscape'; var styles = { root: { - fontSize: 16, - lineHeight: '24px', - width: props.fullWidth ? '100%' : 256, - height: (props.rows - 1) * 24 + (props.floatingLabelText ? 72 : 48), + width: isLandscape ? 165 : '100%', + height: isLandscape ? 330 : 'auto', + float: isLandscape ? 'left' : 'none', + fontWeight: 700, display: 'inline-block', - position: 'relative', - backgroundColor: backgroundColor, - fontFamily: baseTheme.fontFamily, - transition: _transitions2.default.easeOut('200ms', 'height'), - cursor: props.disabled ? 'not-allowed' : 'auto' - }, - error: { - position: 'relative', - bottom: 2, - fontSize: 12, - lineHeight: '12px', - color: errorColor, - transition: _transitions2.default.easeOut() + backgroundColor: datePicker.selectColor, + borderTopLeftRadius: 2, + borderTopRightRadius: isLandscape ? 0 : 2, + borderBottomLeftRadius: isLandscape ? 2 : 0, + color: datePicker.textColor, + padding: 20, + boxSizing: 'border-box' }, - floatingLabel: { - color: props.disabled ? disabledTextColor : floatingLabelColor, - pointerEvents: 'none' + monthDay: { + display: 'block', + fontSize: 36, + lineHeight: '36px', + height: props.mode === 'landscape' ? '100%' : 38, + opacity: selectedYear ? 0.7 : 1, + transition: _transitions2.default.easeOut(), + width: '100%', + fontWeight: '500' }, - input: { - padding: 0, - position: 'relative', + monthDayTitle: { + cursor: !selectedYear ? 'default' : 'pointer', width: '100%', - border: 'none', - outline: 'none', - backgroundColor: 'rgba(0,0,0,0)', - color: props.disabled ? disabledTextColor : textColor, - cursor: 'inherit', - font: 'inherit', - WebkitTapHighlightColor: 'rgba(0,0,0,0)' }, - inputNative: { - appearance: 'textfield' } - }; - - styles.textarea = (0, _simpleAssign2.default)({}, styles.input, { - marginTop: props.floatingLabelText ? 36 : 12, - marginBottom: props.floatingLabelText ? -36 : -12, - boxSizing: 'border-box', - font: 'inherit' - }); - - // Do not assign a height to the textarea as he handles it on his own. - styles.input.height = '100%'; - - if (state.isFocused) { - styles.floatingLabel.color = focusColor; - } - - if (props.floatingLabelText) { - styles.input.boxSizing = 'border-box'; - - if (!props.multiLine) { - styles.input.marginTop = 14; - } - - if (state.errorText) { - styles.error.bottom = !props.multiLine ? styles.error.fontSize + 3 : 3; - } - } - - if (state.errorText) { - if (state.isFocused) { - styles.floatingLabel.color = styles.error.color; + display: 'block' + }, + year: { + margin: 0, + fontSize: 16, + fontWeight: '500', + lineHeight: '16px', + height: 16, + opacity: selectedYear ? 1 : 0.7, + transition: _transitions2.default.easeOut(), + marginBottom: 10 + }, + yearTitle: { + cursor: props.disableYearSelection ? 'not-allowed' : !selectedYear ? 'pointer' : 'default' } - } + }; return styles; -}; - -/** - * Check if a value is valid to be displayed inside an input. - * - * @param The value to check. - * @returns True if the string provided is valid, false otherwise. - */ -function isValid(value) { - return value !== '' && value !== undefined && value !== null; } -var TextField = function (_Component) { - (0, _inherits3.default)(TextField, _Component); +var DateDisplay = function (_Component) { + (0, _inherits3.default)(DateDisplay, _Component); - function TextField() { + function DateDisplay() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, TextField); + (0, _classCallCheck3.default)(this, DateDisplay); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TextField.__proto__ || (0, _getPrototypeOf2.default)(TextField)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - isFocused: false, - errorText: undefined, - hasValue: false - }, _this.handleInputBlur = function (event) { - _this.setState({ isFocused: false }); - if (_this.props.onBlur) { - _this.props.onBlur(event); - } - }, _this.handleInputChange = function (event) { - _this.setState({ hasValue: isValid(event.target.value) }); - if (_this.props.onChange) { - _this.props.onChange(event, event.target.value); - } - }, _this.handleInputFocus = function (event) { - if (_this.props.disabled) { - return; + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DateDisplay.__proto__ || (0, _getPrototypeOf2.default)(DateDisplay)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + selectedYear: false, + transitionDirection: 'up' + }, _this.handleTouchTapMonthDay = function () { + if (_this.props.onTouchTapMonthDay && _this.state.selectedYear) { + _this.props.onTouchTapMonthDay(); } - _this.setState({ isFocused: true }); - if (_this.props.onFocus) { - _this.props.onFocus(event); + + _this.setState({ selectedYear: false }); + }, _this.handleTouchTapYear = function () { + if (_this.props.onTouchTapYear && !_this.props.disableYearSelection && !_this.state.selectedYear) { + _this.props.onTouchTapYear(); } - }, _this.handleHeightChange = function (event, height) { - var newHeight = height + 24; - if (_this.props.floatingLabelText) { - newHeight += 24; + + if (!_this.props.disableYearSelection) { + _this.setState({ selectedYear: true }); } - _reactDom2.default.findDOMNode(_this).style.height = newHeight + 'px'; }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(TextField, [{ + (0, _createClass3.default)(DateDisplay, [{ key: 'componentWillMount', value: function componentWillMount() { - var _props = this.props, - children = _props.children, - name = _props.name, - hintText = _props.hintText, - floatingLabelText = _props.floatingLabelText, - id = _props.id; - - - var propsLeaf = children ? children.props : this.props; - - this.setState({ - errorText: this.props.errorText, - hasValue: isValid(propsLeaf.value) || isValid(propsLeaf.defaultValue) - }); - - false ? (0, _warning2.default)(name || hintText || floatingLabelText || id, 'Material-UI: We don\'t have enough information\n to build a robust unique id for the TextField component. Please provide an id or a name.') : void 0; - - var uniqueId = name + '-' + hintText + '-' + floatingLabelText + '-' + Math.floor(Math.random() * 0xFFFF); - this.uniqueId = uniqueId.replace(/[^A-Za-z0-9-]/gi, ''); + if (!this.props.monthDaySelected) { + this.setState({ selectedYear: true }); + } } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { - if (nextProps.errorText !== this.props.errorText) { + if (nextProps.selectedDate !== this.props.selectedDate) { + var direction = nextProps.selectedDate > this.props.selectedDate ? 'up' : 'down'; this.setState({ - errorText: nextProps.errorText + transitionDirection: direction }); } - if (nextProps.children && nextProps.children.props) { - nextProps = nextProps.children.props; - } - - if (nextProps.hasOwnProperty('value')) { - var hasValue = isValid(nextProps.value); - + if (nextProps.monthDaySelected !== undefined) { this.setState({ - hasValue: hasValue + selectedYear: !nextProps.monthDaySelected }); } } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState, nextContext) { - return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); - } - }, { - key: 'blur', - value: function blur() { - if (this.input) { - this.getInputNode().blur(); - } - } - }, { - key: 'focus', - value: function focus() { - if (this.input) { - this.getInputNode().focus(); - } - } - }, { - key: 'select', - value: function select() { - if (this.input) { - this.getInputNode().select(); - } - } - }, { - key: 'getValue', - value: function getValue() { - return this.input ? this.getInputNode().value : undefined; - } - }, { - key: 'getInputNode', - value: function getInputNode() { - return this.props.children || this.props.multiLine ? this.input.getInputNode() : _reactDom2.default.findDOMNode(this.input); - } - }, { - key: '_isControlled', - value: function _isControlled() { - return this.props.hasOwnProperty('value'); - } }, { key: 'render', value: function render() { - var _this2 = this; - - var _props2 = this.props, - children = _props2.children, - className = _props2.className, - disabled = _props2.disabled, - errorStyle = _props2.errorStyle, - errorText = _props2.errorText, - floatingLabelFixed = _props2.floatingLabelFixed, - floatingLabelFocusStyle = _props2.floatingLabelFocusStyle, - floatingLabelShrinkStyle = _props2.floatingLabelShrinkStyle, - floatingLabelStyle = _props2.floatingLabelStyle, - floatingLabelText = _props2.floatingLabelText, - fullWidth = _props2.fullWidth, - hintText = _props2.hintText, - hintStyle = _props2.hintStyle, - id = _props2.id, - inputStyle = _props2.inputStyle, - multiLine = _props2.multiLine, - onBlur = _props2.onBlur, - onChange = _props2.onChange, - onFocus = _props2.onFocus, - style = _props2.style, - type = _props2.type, - underlineDisabledStyle = _props2.underlineDisabledStyle, - underlineFocusStyle = _props2.underlineFocusStyle, - underlineShow = _props2.underlineShow, - underlineStyle = _props2.underlineStyle, - rows = _props2.rows, - rowsMax = _props2.rowsMax, - textareaStyle = _props2.textareaStyle, - other = (0, _objectWithoutProperties3.default)(_props2, ['children', 'className', 'disabled', 'errorStyle', 'errorText', 'floatingLabelFixed', 'floatingLabelFocusStyle', 'floatingLabelShrinkStyle', 'floatingLabelStyle', 'floatingLabelText', 'fullWidth', 'hintText', 'hintStyle', 'id', 'inputStyle', 'multiLine', 'onBlur', 'onChange', 'onFocus', 'style', 'type', 'underlineDisabledStyle', 'underlineFocusStyle', 'underlineShow', 'underlineStyle', 'rows', 'rowsMax', 'textareaStyle']); + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + disableYearSelection = _props.disableYearSelection, + locale = _props.locale, + mode = _props.mode, + monthDaySelected = _props.monthDaySelected, + onTouchTapMonthDay = _props.onTouchTapMonthDay, + onTouchTapYear = _props.onTouchTapYear, + selectedDate = _props.selectedDate, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'disableYearSelection', 'locale', 'mode', 'monthDaySelected', 'onTouchTapMonthDay', 'onTouchTapYear', 'selectedDate', 'style']); var prepareStyles = this.context.muiTheme.prepareStyles; var styles = getStyles(this.props, this.context, this.state); - var inputId = id || this.uniqueId; - - var errorTextElement = this.state.errorText && _react2.default.createElement( - 'div', - { style: prepareStyles((0, _simpleAssign2.default)(styles.error, errorStyle)) }, - this.state.errorText - ); - - var floatingLabelTextElement = floatingLabelText && _react2.default.createElement( - _TextFieldLabel2.default, - { - muiTheme: this.context.muiTheme, - style: (0, _simpleAssign2.default)(styles.floatingLabel, floatingLabelStyle, this.state.isFocused ? floatingLabelFocusStyle : null), - shrinkStyle: floatingLabelShrinkStyle, - htmlFor: inputId, - shrink: this.state.hasValue || this.state.isFocused || floatingLabelFixed, - disabled: disabled - }, - floatingLabelText - ); - - var inputProps = { - id: inputId, - ref: function ref(elem) { - return _this2.input = elem; - }, - disabled: this.props.disabled, - onBlur: this.handleInputBlur, - onChange: this.handleInputChange, - onFocus: this.handleInputFocus - }; - - var childStyleMerged = (0, _simpleAssign2.default)(styles.input, inputStyle); - - var inputElement = void 0; - if (children) { - inputElement = _react2.default.cloneElement(children, (0, _extends3.default)({}, inputProps, children.props, { - style: (0, _simpleAssign2.default)(childStyleMerged, children.props.style) - })); - } else { - inputElement = multiLine ? _react2.default.createElement(_EnhancedTextarea2.default, (0, _extends3.default)({ - style: childStyleMerged, - textareaStyle: (0, _simpleAssign2.default)(styles.textarea, styles.inputNative, textareaStyle), - rows: rows, - rowsMax: rowsMax - }, other, inputProps, { - onHeightChange: this.handleHeightChange - })) : _react2.default.createElement('input', (0, _extends3.default)({ - type: type, - style: prepareStyles((0, _simpleAssign2.default)(styles.inputNative, childStyleMerged)) - }, other, inputProps)); - } - var rootProps = {}; + var year = new DateTimeFormat(locale, { + year: 'numeric' + }).format(selectedDate); - if (children) { - rootProps = other; - } + var dateTime = new DateTimeFormat(locale, { + month: 'short', + weekday: 'short', + day: '2-digit' + }).format(selectedDate); return _react2.default.createElement( 'div', - (0, _extends3.default)({}, rootProps, { - className: className, - style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) - }), - floatingLabelTextElement, - hintText ? _react2.default.createElement(_TextFieldHint2.default, { - muiTheme: this.context.muiTheme, - show: !(this.state.hasValue || floatingLabelText && !this.state.isFocused) || !this.state.hasValue && floatingLabelText && floatingLabelFixed && !this.state.isFocused, - style: hintStyle, - text: hintText - }) : null, - inputElement, - underlineShow ? _react2.default.createElement(_TextFieldUnderline2.default, { - disabled: disabled, - disabledStyle: underlineDisabledStyle, - error: !!this.state.errorText, - errorStyle: errorStyle, - focus: this.state.isFocused, - focusStyle: underlineFocusStyle, - muiTheme: this.context.muiTheme, - style: underlineStyle - }) : null, - errorTextElement + (0, _extends3.default)({}, other, { style: prepareStyles(styles.root, style) }), + _react2.default.createElement( + _SlideIn2.default, + { style: styles.year, direction: this.state.transitionDirection }, + _react2.default.createElement( + 'div', + { key: year, style: styles.yearTitle, onTouchTap: this.handleTouchTapYear }, + year + ) + ), + _react2.default.createElement( + _SlideIn2.default, + { style: styles.monthDay, direction: this.state.transitionDirection }, + _react2.default.createElement( + 'div', + { + key: dateTime, + onTouchTap: this.handleTouchTapMonthDay, + style: styles.monthDayTitle + }, + dateTime + ) + ) ); } - }]); - return TextField; -}(_react.Component); - -TextField.defaultProps = { - disabled: false, - floatingLabelFixed: false, - multiLine: false, - fullWidth: false, - type: 'text', - underlineShow: true, - rows: 1 + }]); + return DateDisplay; +}(_react.Component); + +DateDisplay.defaultProps = { + disableYearSelection: false, + monthDaySelected: true }; -TextField.contextTypes = { +DateDisplay.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? TextField.propTypes = { - children: _react.PropTypes.node, - /** - * The css class name of the root element. - */ - className: _react.PropTypes.string, - /** - * The text string to use for the default value. - */ - defaultValue: _react.PropTypes.any, - /** - * Disables the text field if set to true. - */ - disabled: _react.PropTypes.bool, - /** - * The style object to use to override error styles. - */ - errorStyle: _react.PropTypes.object, - /** - * The error content to display. - */ - errorText: _react.PropTypes.node, - /** - * If true, the floating label will float even when there is no value. - */ - floatingLabelFixed: _react.PropTypes.bool, - /** - * The style object to use to override floating label styles when focused. - */ - floatingLabelFocusStyle: _react.PropTypes.object, - /** - * The style object to use to override floating label styles when shrunk. - */ - floatingLabelShrinkStyle: _react.PropTypes.object, - /** - * The style object to use to override floating label styles. - */ - floatingLabelStyle: _react.PropTypes.object, - /** - * The content to use for the floating label element. - */ - floatingLabelText: _react.PropTypes.node, - /** - * If true, the field receives the property width 100%. - */ - fullWidth: _react.PropTypes.bool, - /** - * Override the inline-styles of the TextField's hint text element. - */ - hintStyle: _react.PropTypes.object, - /** - * The hint content to display. - */ - hintText: _react.PropTypes.node, - /** - * The id prop for the text field. - */ - id: _react.PropTypes.string, - /** - * Override the inline-styles of the TextField's input element. - * When multiLine is false: define the style of the input element. - * When multiLine is true: define the style of the container of the textarea. - */ - inputStyle: _react.PropTypes.object, - /** - * If true, a textarea element will be rendered. - * The textarea also grows and shrinks according to the number of lines. - */ - multiLine: _react.PropTypes.bool, - /** - * Name applied to the input. - */ - name: _react.PropTypes.string, - /** @ignore */ - onBlur: _react.PropTypes.func, - /** - * Callback function that is fired when the textfield's value changes. - * - * @param {object} event Change event targeting the text field. - * @param {string} newValue The new value of the text field. - */ - onChange: _react.PropTypes.func, - /** @ignore */ - onFocus: _react.PropTypes.func, - /** - * Number of rows to display when multiLine option is set to true. - */ - rows: _react.PropTypes.number, - /** - * Maximum number of rows to display when - * multiLine option is set to true. - */ - rowsMax: _react.PropTypes.number, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - /** - * Override the inline-styles of the TextField's textarea element. - * The TextField use either a textarea or an input, - * this property has effects only when multiLine is true. - */ - textareaStyle: _react.PropTypes.object, - /** - * Specifies the type of input to display - * such as "password" or "text". - */ - type: _react.PropTypes.string, - /** - * Override the inline-styles of the - * TextField's underline element when disabled. - */ - underlineDisabledStyle: _react.PropTypes.object, - /** - * Override the inline-styles of the TextField's - * underline element when focussed. - */ - underlineFocusStyle: _react.PropTypes.object, - /** - * If true, shows the underline for the text field. - */ - underlineShow: _react.PropTypes.bool, - /** - * Override the inline-styles of the TextField's underline element. - */ - underlineStyle: _react.PropTypes.object, - /** - * The value of the text field. - */ - value: _react.PropTypes.any + false ? DateDisplay.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + disableYearSelection: _react.PropTypes.bool, + locale: _react.PropTypes.string.isRequired, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + monthDaySelected: _react.PropTypes.bool, + onTouchTapMonthDay: _react.PropTypes.func, + onTouchTapYear: _react.PropTypes.func, + selectedDate: _react.PropTypes.object.isRequired, + style: _react.PropTypes.object } : void 0; -exports.default = TextField; +exports.default = DateDisplay; /***/ }), -/* 781 */ +/* 785 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63274,546 +66154,554 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactEventListener = __webpack_require__(42); +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactEventListener = __webpack_require__(40); var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _keycode = __webpack_require__(26); -var rowsHeight = 24; +var _keycode2 = _interopRequireDefault(_keycode); -function getStyles(props, context, state) { - return { - root: { - position: 'relative' }, - textarea: { - height: state.height, - width: '100%', - resize: 'none', - font: 'inherit', - padding: 0, - cursor: 'inherit' - }, - shadow: { - resize: 'none', - // Overflow also needed to here to remove the extra row - // added to textareas in Firefox. - overflow: 'hidden', - // Visibility needed to hide the extra text area on ipads - visibility: 'hidden', - position: 'absolute', - height: 'initial' - } - }; -} +var _transitions = __webpack_require__(10); -var EnhancedTextarea = function (_Component) { - (0, _inherits3.default)(EnhancedTextarea, _Component); +var _transitions2 = _interopRequireDefault(_transitions); - function EnhancedTextarea() { +var _Overlay = __webpack_require__(324); + +var _Overlay2 = _interopRequireDefault(_Overlay); + +var _RenderToLayer = __webpack_require__(327); + +var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer); + +var _Paper = __webpack_require__(32); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _reactAddonsTransitionGroup = __webpack_require__(132); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TransitionItem = function (_Component) { + (0, _inherits3.default)(TransitionItem, _Component); + + function TransitionItem() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, EnhancedTextarea); + (0, _classCallCheck3.default)(this, TransitionItem); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedTextarea.__proto__ || (0, _getPrototypeOf2.default)(EnhancedTextarea)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - height: null - }, _this.handleResize = function (event) { - _this.syncHeightWithShadow(undefined, event); - }, _this.handleChange = function (event) { - _this.syncHeightWithShadow(event.target.value); - - if (_this.props.hasOwnProperty('valueLink')) { - _this.props.valueLink.requestChange(event.target.value); - } - - if (_this.props.onChange) { - _this.props.onChange(event); - } + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TransitionItem.__proto__ || (0, _getPrototypeOf2.default)(TransitionItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + style: {} }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(EnhancedTextarea, [{ - key: 'componentWillMount', - value: function componentWillMount() { + (0, _createClass3.default)(TransitionItem, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimeout); + clearTimeout(this.leaveTimeout); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.componentWillAppear(callback); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + var spacing = this.context.muiTheme.baseTheme.spacing; + this.setState({ - height: this.props.rows * rowsHeight + style: { + opacity: 1, + transform: 'translate(0, ' + spacing.desktopKeylineIncrement + 'px)' + } }); + + this.enterTimeout = setTimeout(callback, 450); // matches transition duration } }, { - key: 'componentDidMount', - value: function componentDidMount() { - this.syncHeightWithShadow(); + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + this.setState({ + style: { + opacity: 0, + transform: 'translate(0, 0)' + } + }); + + this.leaveTimeout = setTimeout(callback, 450); // matches transition duration } }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (nextProps.value !== this.props.value) { - this.syncHeightWithShadow(nextProps.value); - } + key: 'render', + value: function render() { + var _props = this.props, + style = _props.style, + children = _props.children, + other = (0, _objectWithoutProperties3.default)(_props, ['style', 'children']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, this.state.style, style)) }), + children + ); } - }, { - key: 'getInputNode', - value: function getInputNode() { - return this.refs.input; + }]); + return TransitionItem; +}(_react.Component); + +TransitionItem.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TransitionItem.propTypes = { + children: _react.PropTypes.node, + style: _react.PropTypes.object +} : void 0; + + +function getStyles(props, context) { + var autoScrollBodyContent = props.autoScrollBodyContent, + open = props.open; + var _context$muiTheme = context.muiTheme, + _context$muiTheme$bas = _context$muiTheme.baseTheme, + spacing = _context$muiTheme$bas.spacing, + palette = _context$muiTheme$bas.palette, + dialog = _context$muiTheme.dialog, + zIndex = _context$muiTheme.zIndex; + + + var gutter = spacing.desktopGutter; + var borderScroll = '1px solid ' + palette.borderColor; + + return { + root: { + position: 'fixed', + boxSizing: 'border-box', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + zIndex: zIndex.dialog, + top: 0, + left: open ? 0 : -10000, + width: '100%', + height: '100%', + transition: open ? _transitions2.default.easeOut('0ms', 'left', '0ms') : _transitions2.default.easeOut('0ms', 'left', '450ms') + }, + content: { + boxSizing: 'border-box', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + transition: _transitions2.default.easeOut(), + position: 'relative', + width: '75%', + maxWidth: spacing.desktopKeylineIncrement * 12, + margin: '0 auto', + zIndex: zIndex.dialog + }, + actionsContainer: { + boxSizing: 'border-box', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + padding: 8, + width: '100%', + textAlign: 'right', + marginTop: autoScrollBodyContent ? -1 : 0, + borderTop: autoScrollBodyContent ? borderScroll : 'none' + }, + overlay: { + zIndex: zIndex.dialogOverlay + }, + title: { + margin: 0, + padding: gutter + 'px ' + gutter + 'px 20px ' + gutter + 'px', + color: palette.textColor, + fontSize: dialog.titleFontSize, + lineHeight: '32px', + fontWeight: 400, + marginBottom: autoScrollBodyContent ? -1 : 0, + borderBottom: autoScrollBodyContent ? borderScroll : 'none' + }, + body: { + fontSize: dialog.bodyFontSize, + color: dialog.bodyColor, + padding: (props.title ? 0 : gutter) + 'px ' + gutter + 'px ' + gutter + 'px', + boxSizing: 'border-box', + overflowY: autoScrollBodyContent ? 'auto' : 'hidden' + } + }; +} + +var DialogInline = function (_Component2) { + (0, _inherits3.default)(DialogInline, _Component2); + + function DialogInline() { + var _ref2; + + var _temp2, _this2, _ret2; + + (0, _classCallCheck3.default)(this, DialogInline); + + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + return _ret2 = (_temp2 = (_this2 = (0, _possibleConstructorReturn3.default)(this, (_ref2 = DialogInline.__proto__ || (0, _getPrototypeOf2.default)(DialogInline)).call.apply(_ref2, [this].concat(args))), _this2), _this2.handleTouchTapOverlay = function () { + _this2.requestClose(false); + }, _this2.handleKeyUp = function (event) { + if ((0, _keycode2.default)(event) === 'esc') { + _this2.requestClose(false); + } + }, _this2.handleResize = function () { + _this2.positionDialog(); + }, _temp2), (0, _possibleConstructorReturn3.default)(_this2, _ret2); + } + + (0, _createClass3.default)(DialogInline, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.positionDialog(); } }, { - key: 'setValue', - value: function setValue(value) { - this.getInputNode().value = value; - this.syncHeightWithShadow(value); + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.positionDialog(); } }, { - key: 'syncHeightWithShadow', - value: function syncHeightWithShadow(newValue, event) { - var shadow = this.refs.shadow; + key: 'positionDialog', + value: function positionDialog() { + var _props2 = this.props, + actions = _props2.actions, + autoDetectWindowHeight = _props2.autoDetectWindowHeight, + autoScrollBodyContent = _props2.autoScrollBodyContent, + bodyStyle = _props2.bodyStyle, + open = _props2.open, + repositionOnUpdate = _props2.repositionOnUpdate, + title = _props2.title; - if (newValue !== undefined) { - shadow.value = newValue; + + if (!open) { + return; } - var newHeight = shadow.scrollHeight; + var clientHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; + var container = _reactDom2.default.findDOMNode(this); + var dialogWindow = _reactDom2.default.findDOMNode(this.refs.dialogWindow); + var dialogContent = _reactDom2.default.findDOMNode(this.refs.dialogContent); + var minPaddingTop = 16; - // Guarding for jsdom, where scrollHeight isn't present. - // See https://github.com/tmpvar/jsdom/issues/1013 - if (newHeight === undefined) return; + // Reset the height in case the window was resized. + dialogWindow.style.height = ''; + dialogContent.style.height = ''; - if (this.props.rowsMax >= this.props.rows) { - newHeight = Math.min(this.props.rowsMax * rowsHeight, newHeight); + var dialogWindowHeight = dialogWindow.offsetHeight; + var paddingTop = (clientHeight - dialogWindowHeight) / 2 - 64; + if (paddingTop < minPaddingTop) paddingTop = minPaddingTop; + + // Vertically center the dialog window, but make sure it doesn't + // transition to that position. + if (repositionOnUpdate || !container.style.paddingTop) { + container.style.paddingTop = paddingTop + 'px'; } - newHeight = Math.max(newHeight, rowsHeight); + // Force a height if the dialog is taller than clientHeight + if (autoDetectWindowHeight || autoScrollBodyContent) { + var styles = getStyles(this.props, this.context); + styles.body = (0, _simpleAssign2.default)(styles.body, bodyStyle); + var maxDialogContentHeight = clientHeight - 2 * 64; - if (this.state.height !== newHeight) { - this.setState({ - height: newHeight - }); + if (title) maxDialogContentHeight -= dialogContent.previousSibling.offsetHeight; - if (this.props.onHeightChange) { - this.props.onHeightChange(event, newHeight); + if (_react2.default.Children.count(actions)) { + maxDialogContentHeight -= dialogContent.nextSibling.offsetHeight; } + + dialogContent.style.maxHeight = maxDialogContentHeight + 'px'; + } + } + }, { + key: 'requestClose', + value: function requestClose(buttonClicked) { + if (!buttonClicked && this.props.modal) { + return; + } + + if (this.props.onRequestClose) { + this.props.onRequestClose(!!buttonClicked); } } }, { key: 'render', value: function render() { - var _props = this.props, - onChange = _props.onChange, - onHeightChange = _props.onHeightChange, - rows = _props.rows, - rowsMax = _props.rowsMax, - shadowStyle = _props.shadowStyle, - style = _props.style, - textareaStyle = _props.textareaStyle, - valueLink = _props.valueLink, - other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'onHeightChange', 'rows', 'rowsMax', 'shadowStyle', 'style', 'textareaStyle', 'valueLink']); + var _props3 = this.props, + actions = _props3.actions, + actionsContainerClassName = _props3.actionsContainerClassName, + actionsContainerStyle = _props3.actionsContainerStyle, + bodyClassName = _props3.bodyClassName, + bodyStyle = _props3.bodyStyle, + children = _props3.children, + className = _props3.className, + contentClassName = _props3.contentClassName, + contentStyle = _props3.contentStyle, + overlayClassName = _props3.overlayClassName, + overlayStyle = _props3.overlayStyle, + open = _props3.open, + titleClassName = _props3.titleClassName, + titleStyle = _props3.titleStyle, + title = _props3.title, + style = _props3.style; var prepareStyles = this.context.muiTheme.prepareStyles; - var styles = getStyles(this.props, this.context, this.state); - var rootStyles = (0, _simpleAssign2.default)(styles.root, style); - var textareaStyles = (0, _simpleAssign2.default)(styles.textarea, textareaStyle); - var shadowStyles = (0, _simpleAssign2.default)({}, textareaStyles, styles.shadow, shadowStyle); + var styles = getStyles(this.props, this.context); + + styles.root = (0, _simpleAssign2.default)(styles.root, style); + styles.content = (0, _simpleAssign2.default)(styles.content, contentStyle); + styles.body = (0, _simpleAssign2.default)(styles.body, bodyStyle); + styles.actionsContainer = (0, _simpleAssign2.default)(styles.actionsContainer, actionsContainerStyle); + styles.overlay = (0, _simpleAssign2.default)(styles.overlay, overlayStyle); + styles.title = (0, _simpleAssign2.default)(styles.title, titleStyle); + + var actionsContainer = _react2.default.Children.count(actions) > 0 && _react2.default.createElement( + 'div', + { className: actionsContainerClassName, style: prepareStyles(styles.actionsContainer) }, + _react2.default.Children.toArray(actions) + ); - if (this.props.hasOwnProperty('valueLink')) { - other.value = this.props.valueLink.value; + var titleElement = title; + if (_react2.default.isValidElement(title)) { + titleElement = _react2.default.cloneElement(title, { + className: title.props.className || titleClassName, + style: prepareStyles((0, _simpleAssign2.default)(styles.title, title.props.style)) + }); + } else if (typeof title === 'string') { + titleElement = _react2.default.createElement( + 'h3', + { className: titleClassName, style: prepareStyles(styles.title) }, + title + ); } return _react2.default.createElement( 'div', - { style: prepareStyles(rootStyles) }, - _react2.default.createElement(_reactEventListener2.default, { target: 'window', onResize: this.handleResize }), - _react2.default.createElement('textarea', { - ref: 'shadow', - style: prepareStyles(shadowStyles), - tabIndex: '-1', - rows: this.props.rows, - defaultValue: this.props.defaultValue, - readOnly: true, - value: this.props.value, - valueLink: this.props.valueLink + { className: className, style: prepareStyles(styles.root) }, + open && _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyUp: this.handleKeyUp, + onResize: this.handleResize }), - _react2.default.createElement('textarea', (0, _extends3.default)({}, other, { - ref: 'input', - rows: this.props.rows, - style: prepareStyles(textareaStyles), - onChange: this.handleChange - })) + _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + { + component: 'div', + ref: 'dialogWindow', + transitionAppear: true, + transitionAppearTimeout: 450, + transitionEnter: true, + transitionEnterTimeout: 450 + }, + open && _react2.default.createElement( + TransitionItem, + { + className: contentClassName, + style: styles.content + }, + _react2.default.createElement( + _Paper2.default, + { zDepth: 4 }, + titleElement, + _react2.default.createElement( + 'div', + { + ref: 'dialogContent', + className: bodyClassName, + style: prepareStyles(styles.body) + }, + children + ), + actionsContainer + ) + ) + ), + _react2.default.createElement(_Overlay2.default, { + show: open, + className: overlayClassName, + style: styles.overlay, + onTouchTap: this.handleTouchTapOverlay + }) ); } }]); - return EnhancedTextarea; + return DialogInline; }(_react.Component); -EnhancedTextarea.defaultProps = { - rows: 1 -}; -EnhancedTextarea.contextTypes = { +DialogInline.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? EnhancedTextarea.propTypes = { - defaultValue: _react.PropTypes.any, - disabled: _react.PropTypes.bool, - onChange: _react.PropTypes.func, - onHeightChange: _react.PropTypes.func, - rows: _react.PropTypes.number, - rowsMax: _react.PropTypes.number, - shadowStyle: _react.PropTypes.object, - /** - * Override the inline-styles of the root element. - */ + false ? DialogInline.propTypes = { + actions: _react.PropTypes.node, + actionsContainerClassName: _react.PropTypes.string, + actionsContainerStyle: _react.PropTypes.object, + autoDetectWindowHeight: _react.PropTypes.bool, + autoScrollBodyContent: _react.PropTypes.bool, + bodyClassName: _react.PropTypes.string, + bodyStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + className: _react.PropTypes.string, + contentClassName: _react.PropTypes.string, + contentStyle: _react.PropTypes.object, + modal: _react.PropTypes.bool, + onRequestClose: _react.PropTypes.func, + open: _react.PropTypes.bool.isRequired, + overlayClassName: _react.PropTypes.string, + overlayStyle: _react.PropTypes.object, + repositionOnUpdate: _react.PropTypes.bool, style: _react.PropTypes.object, - textareaStyle: _react.PropTypes.object, - value: _react.PropTypes.string, - valueLink: _react.PropTypes.object + title: _react.PropTypes.node, + titleClassName: _react.PropTypes.string, + titleStyle: _react.PropTypes.object } : void 0; -exports.default = EnhancedTextarea; - -/***/ }), -/* 782 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +var Dialog = function (_Component3) { + (0, _inherits3.default)(Dialog, _Component3); -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _transitions = __webpack_require__(10); - -var _transitions2 = _interopRequireDefault(_transitions); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function Dialog() { + var _ref3; -function getStyles(props) { - var hintColor = props.muiTheme.textField.hintColor, - show = props.show; + var _temp3, _this3, _ret3; + (0, _classCallCheck3.default)(this, Dialog); - return { - root: { - position: 'absolute', - opacity: show ? 1 : 0, - color: hintColor, - transition: _transitions2.default.easeOut(), - bottom: 12 + for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; } - }; -} - -var TextFieldHint = function TextFieldHint(props) { - var prepareStyles = props.muiTheme.prepareStyles, - style = props.style, - text = props.text; + return _ret3 = (_temp3 = (_this3 = (0, _possibleConstructorReturn3.default)(this, (_ref3 = Dialog.__proto__ || (0, _getPrototypeOf2.default)(Dialog)).call.apply(_ref3, [this].concat(args))), _this3), _this3.renderLayer = function () { + return _react2.default.createElement(DialogInline, _this3.props); + }, _temp3), (0, _possibleConstructorReturn3.default)(_this3, _ret3); + } - var styles = getStyles(props); + (0, _createClass3.default)(Dialog, [{ + key: 'render', + value: function render() { + return _react2.default.createElement(_RenderToLayer2.default, { render: this.renderLayer, open: true, useLayerForClickAway: false }); + } + }]); + return Dialog; +}(_react.Component); - return _react2.default.createElement( - 'div', - { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, - text - ); +Dialog.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired }; - - false ? TextFieldHint.propTypes = { +Dialog.defaultProps = { + autoDetectWindowHeight: true, + autoScrollBodyContent: false, + modal: false, + repositionOnUpdate: true +}; + false ? Dialog.propTypes = { /** - * @ignore - * The material-ui theme applied to this component. + * Action buttons to display below the Dialog content (`children`). + * This property accepts either a React element, or an array of React elements. */ - muiTheme: _react.PropTypes.object.isRequired, + actions: _react.PropTypes.node, /** - * True if the hint text should be visible. + * The `className` to add to the actions container's root element. */ - show: _react.PropTypes.bool, + actionsContainerClassName: _react.PropTypes.string, /** - * Override the inline-styles of the root element. + * Overrides the inline-styles of the actions container's root element. */ - style: _react.PropTypes.object, + actionsContainerStyle: _react.PropTypes.object, /** - * The hint text displayed. + * If set to true, the height of the `Dialog` will be auto detected. A max height + * will be enforced so that the content does not extend beyond the viewport. */ - text: _react.PropTypes.node -} : void 0; - -TextFieldHint.defaultProps = { - show: true -}; - -exports.default = TextFieldHint; - -/***/ }), -/* 783 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _transitions = __webpack_require__(10); - -var _transitions2 = _interopRequireDefault(_transitions); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getStyles(props) { - var defaultStyles = { - position: 'absolute', - lineHeight: '22px', - top: 38, - transition: _transitions2.default.easeOut(), - zIndex: 1, // Needed to display label above Chrome's autocomplete field background - transform: 'scale(1) translate(0, 0)', - transformOrigin: 'left top', - pointerEvents: 'auto', - userSelect: 'none' - }; - - var shrinkStyles = props.shrink ? (0, _simpleAssign2.default)({ - transform: 'scale(0.75) translate(0, -28px)', - pointerEvents: 'none' - }, props.shrinkStyle) : null; - - return { - root: (0, _simpleAssign2.default)(defaultStyles, props.style, shrinkStyles) - }; -} - -var TextFieldLabel = function TextFieldLabel(props) { - var muiTheme = props.muiTheme, - className = props.className, - children = props.children, - htmlFor = props.htmlFor, - onTouchTap = props.onTouchTap; - var prepareStyles = muiTheme.prepareStyles; - - var styles = getStyles(props); - - return _react2.default.createElement( - 'label', - { - className: className, - style: prepareStyles(styles.root), - htmlFor: htmlFor, - onTouchTap: onTouchTap - }, - children - ); -}; - - false ? TextFieldLabel.propTypes = { + autoDetectWindowHeight: _react.PropTypes.bool, /** - * The label contents. + * If set to true, the body content of the `Dialog` will be scrollable. */ - children: _react.PropTypes.node, + autoScrollBodyContent: _react.PropTypes.bool, /** - * The css class name of the root element. + * The `className` to add to the content's root element under the title. */ - className: _react.PropTypes.string, + bodyClassName: _react.PropTypes.string, /** - * Disables the label if set to true. + * Overrides the inline-styles of the content's root element under the title. */ - disabled: _react.PropTypes.bool, + bodyStyle: _react.PropTypes.object, /** - * The id of the target element that this label should refer to. + * The contents of the `Dialog`. */ - htmlFor: _react.PropTypes.string, + children: _react.PropTypes.node, /** - * @ignore - * The material-ui theme applied to this component. + * The css class name of the root element. */ - muiTheme: _react.PropTypes.object.isRequired, + className: _react.PropTypes.string, /** - * Callback function for when the label is selected via a touch tap. - * - * @param {object} event TouchTap event targeting the text field label. + * The `className` to add to the content container. */ - onTouchTap: _react.PropTypes.func, + contentClassName: _react.PropTypes.string, /** - * True if the floating label should shrink. + * Overrides the inline-styles of the content container. */ - shrink: _react.PropTypes.bool, + contentStyle: _react.PropTypes.object, /** - * Override the inline-styles of the root element when shrunk. + * Force the user to use one of the actions in the `Dialog`. + * Clicking outside the `Dialog` will not trigger the `onRequestClose`. */ - shrinkStyle: _react.PropTypes.object, + modal: _react.PropTypes.bool, /** - * Override the inline-styles of the root element. + * Fired when the `Dialog` is requested to be closed by a click outside the `Dialog` or on the buttons. + * + * @param {bool} buttonClicked Determines whether a button click triggered this request. */ - style: _react.PropTypes.object -} : void 0; - -TextFieldLabel.defaultProps = { - disabled: false, - shrink: false -}; - -exports.default = TextFieldLabel; - -/***/ }), -/* 784 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _transitions = __webpack_require__(10); - -var _transitions2 = _interopRequireDefault(_transitions); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var propTypes = { + onRequestClose: _react.PropTypes.func, /** - * True if the parent `TextField` is disabled. + * Controls whether the Dialog is opened or not. */ - disabled: _react.PropTypes.bool, + open: _react.PropTypes.bool.isRequired, /** - * Override the inline-styles of the underline when parent `TextField` is disabled. + * The `className` to add to the `Overlay` component that is rendered behind the `Dialog`. */ - disabledStyle: _react.PropTypes.object, + overlayClassName: _react.PropTypes.string, /** - * True if the parent `TextField` has an error. + * Overrides the inline-styles of the `Overlay` component that is rendered behind the `Dialog`. */ - error: _react.PropTypes.bool, + overlayStyle: _react.PropTypes.object, /** - * Override the inline-styles of the underline when parent `TextField` has an error. + * Determines whether the `Dialog` should be repositioned when it's contents are updated. */ - errorStyle: _react.PropTypes.object, + repositionOnUpdate: _react.PropTypes.bool, /** - * True if the parent `TextField` is focused. + * Override the inline-styles of the root element. */ - focus: _react.PropTypes.bool, + style: _react.PropTypes.object, /** - * Override the inline-styles of the underline when parent `TextField` is focused. + * The title to display on the `Dialog`. Could be number, string, element or an array containing these types. */ - focusStyle: _react.PropTypes.object, + title: _react.PropTypes.node, /** - * @ignore - * The material-ui theme applied to this component. + * The `className` to add to the title's root container element. */ - muiTheme: _react.PropTypes.object.isRequired, + titleClassName: _react.PropTypes.string, /** - * Override the inline-styles of the root element. + * Overrides the inline-styles of the title's root container element. */ - style: _react.PropTypes.object -}; - -var defaultProps = { - disabled: false, - disabledStyle: {}, - error: false, - errorStyle: {}, - focus: false, - focusStyle: {}, - style: {} -}; - -var TextFieldUnderline = function TextFieldUnderline(props) { - var disabled = props.disabled, - disabledStyle = props.disabledStyle, - error = props.error, - errorStyle = props.errorStyle, - focus = props.focus, - focusStyle = props.focusStyle, - muiTheme = props.muiTheme, - style = props.style; - var errorStyleColor = errorStyle.color; - var prepareStyles = muiTheme.prepareStyles, - _muiTheme$textField = muiTheme.textField, - borderColor = _muiTheme$textField.borderColor, - disabledTextColor = _muiTheme$textField.disabledTextColor, - errorColor = _muiTheme$textField.errorColor, - focusColor = _muiTheme$textField.focusColor; - - - var styles = { - root: { - borderTop: 'none', - borderLeft: 'none', - borderRight: 'none', - borderBottom: 'solid 1px', - borderColor: borderColor, - bottom: 8, - boxSizing: 'content-box', - margin: 0, - position: 'absolute', - width: '100%' - }, - disabled: { - borderBottom: 'dotted 2px', - borderColor: disabledTextColor - }, - focus: { - borderBottom: 'solid 2px', - borderColor: focusColor, - transform: 'scaleX(0)', - transition: _transitions2.default.easeOut() - }, - error: { - borderColor: errorStyleColor ? errorStyleColor : errorColor, - transform: 'scaleX(1)' - } - }; - - var underline = (0, _simpleAssign2.default)({}, styles.root, style); - var focusedUnderline = (0, _simpleAssign2.default)({}, underline, styles.focus, focusStyle); - - if (disabled) underline = (0, _simpleAssign2.default)({}, underline, styles.disabled, disabledStyle); - if (focus) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, { transform: 'scaleX(1)' }); - if (error) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, styles.error); - - return _react2.default.createElement( - 'div', - null, - _react2.default.createElement('hr', { style: prepareStyles(underline) }), - _react2.default.createElement('hr', { style: prepareStyles(focusedUnderline) }) - ); -}; - - false ? TextFieldUnderline.propTypes = propTypes : void 0; -TextFieldUnderline.defaultProps = defaultProps; - -exports.default = TextFieldUnderline; + titleStyle: _react.PropTypes.object +} : void 0; +exports.default = Dialog; /***/ }), -/* 785 */ +/* 786 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63822,41 +66710,33 @@ exports.default = TextFieldUnderline; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = exports.MenuItem = exports.Menu = undefined; - -var _Menu2 = __webpack_require__(199); - -var _Menu3 = _interopRequireDefault(_Menu2); - -var _MenuItem2 = __webpack_require__(129); - -var _MenuItem3 = _interopRequireDefault(_MenuItem2); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.Menu = _Menu3.default; -exports.MenuItem = _MenuItem3.default; -exports.default = _Menu3.default; - -/***/ }), -/* 786 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _RadioButton = __webpack_require__(333); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; +var _createComponent = __webpack_require__(41); -var _Divider = __webpack_require__(787); +var _createComponent2 = _interopRequireDefault(_createComponent); -var _Divider2 = _interopRequireDefault(_Divider); +var _mapError = __webpack_require__(66); + +var _mapError2 = _interopRequireDefault(_mapError); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = _Divider2.default; +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var mapValueToValueSelected = function mapValueToValueSelected(_ref, errorProp) { + var inputProps = _objectWithoutProperties(_ref.input, []), + props = _objectWithoutProperties(_ref, ['input']); + + return (0, _mapError2.default)(_extends({}, props, { + input: _extends({}, inputProps, { valueSelected: inputProps.value }) + }), errorProp); +}; + +exports.default = (0, _createComponent2.default)(_RadioButton.RadioButtonGroup, mapValueToValueSelected); /***/ }), /* 787 */ @@ -63877,6 +66757,26 @@ var _objectWithoutProperties2 = __webpack_require__(8); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + var _simpleAssign = __webpack_require__(6); var _simpleAssign2 = _interopRequireDefault(_simpleAssign); @@ -63885,53 +66785,235 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _EnhancedSwitch = __webpack_require__(208); + +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + +var _radioButtonUnchecked = __webpack_require__(788); + +var _radioButtonUnchecked2 = _interopRequireDefault(_radioButtonUnchecked); + +var _radioButtonChecked = __webpack_require__(789); + +var _radioButtonChecked2 = _interopRequireDefault(_radioButtonChecked); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var Divider = function Divider(props, context) { - var inset = props.inset, - style = props.style, - other = (0, _objectWithoutProperties3.default)(props, ['inset', 'style']); - var _context$muiTheme = context.muiTheme, - baseTheme = _context$muiTheme.baseTheme, - prepareStyles = _context$muiTheme.prepareStyles; +function getStyles(props, context) { + var radioButton = context.muiTheme.radioButton; - var styles = { - root: { - margin: 0, - marginTop: -1, - marginLeft: inset ? 72 : 0, - height: 1, - border: 'none', - backgroundColor: baseTheme.palette.borderColor + return { + icon: { + height: radioButton.size, + width: radioButton.size + }, + target: { + transition: _transitions2.default.easeOut(), + position: 'absolute', + opacity: 1, + transform: 'scale(1)', + fill: radioButton.borderColor + }, + fill: { + position: 'absolute', + opacity: 1, + transform: 'scale(0)', + transformOrigin: '50% 50%', + transition: _transitions2.default.easeOut(), + fill: radioButton.checkedColor + }, + targetWhenChecked: { + opacity: 0, + transform: 'scale(0)' + }, + fillWhenChecked: { + opacity: 1, + transform: 'scale(1)' + }, + targetWhenDisabled: { + fill: radioButton.disabledColor + }, + fillWhenDisabled: { + fill: radioButton.disabledColor + }, + label: { + color: props.disabled ? radioButton.labelDisabledColor : radioButton.labelColor + }, + ripple: { + color: props.checked ? radioButton.checkedColor : radioButton.borderColor } }; +} - return _react2.default.createElement('hr', (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) })); -}; +var RadioButton = function (_Component) { + (0, _inherits3.default)(RadioButton, _Component); -Divider.muiName = 'Divider'; + function RadioButton() { + var _ref; - false ? Divider.propTypes = { + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RadioButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RadioButton.__proto__ || (0, _getPrototypeOf2.default)(RadioButton)).call.apply(_ref, [this].concat(args))), _this), _this.handleSwitch = function (event) { + if (_this.props.onCheck) { + _this.props.onCheck(event, _this.props.value); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + // Only called when selected, not when unselected. + + + (0, _createClass3.default)(RadioButton, [{ + key: 'isChecked', + value: function isChecked() { + return this.refs.enhancedSwitch.isSwitched(); + } + + // Use RadioButtonGroup.setSelectedValue(newSelectionValue) to set a + // RadioButton's checked value. + + }, { + key: 'setChecked', + value: function setChecked(newCheckedValue) { + this.refs.enhancedSwitch.setSwitched(newCheckedValue); + } + }, { + key: 'getValue', + value: function getValue() { + return this.refs.enhancedSwitch.getValue(); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + checkedIcon = _props.checkedIcon, + checked = _props.checked, + iconStyle = _props.iconStyle, + labelStyle = _props.labelStyle, + labelPosition = _props.labelPosition, + onCheck = _props.onCheck, + uncheckedIcon = _props.uncheckedIcon, + disabled = _props.disabled, + other = (0, _objectWithoutProperties3.default)(_props, ['checkedIcon', 'checked', 'iconStyle', 'labelStyle', 'labelPosition', 'onCheck', 'uncheckedIcon', 'disabled']); + + + var styles = getStyles(this.props, this.context); + + var uncheckedStyles = (0, _simpleAssign2.default)(styles.target, checked && styles.targetWhenChecked, iconStyle, disabled && styles.targetWhenDisabled); + + var checkedStyles = (0, _simpleAssign2.default)(styles.fill, checked && styles.fillWhenChecked, iconStyle, disabled && styles.fillWhenDisabled); + + var uncheckedElement = _react2.default.isValidElement(uncheckedIcon) ? _react2.default.cloneElement(uncheckedIcon, { + style: (0, _simpleAssign2.default)(uncheckedStyles, uncheckedIcon.props.style) + }) : _react2.default.createElement(_radioButtonUnchecked2.default, { style: uncheckedStyles }); + + var checkedElement = _react2.default.isValidElement(checkedIcon) ? _react2.default.cloneElement(checkedIcon, { + style: (0, _simpleAssign2.default)(checkedStyles, checkedIcon.props.style) + }) : _react2.default.createElement(_radioButtonChecked2.default, { style: checkedStyles }); + + var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle); + var mergedLabelStyle = (0, _simpleAssign2.default)(styles.label, labelStyle); + + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, { + ref: 'enhancedSwitch', + inputType: 'radio', + checked: checked, + switched: checked, + disabled: disabled, + rippleColor: styles.ripple.color, + iconStyle: mergedIconStyle, + labelStyle: mergedLabelStyle, + labelPosition: labelPosition, + onSwitch: this.handleSwitch, + switchElement: _react2.default.createElement( + 'div', + null, + uncheckedElement, + checkedElement + ) + })); + } + }]); + return RadioButton; +}(_react.Component); + +RadioButton.defaultProps = { + checked: false, + disabled: false, + labelPosition: 'right' +}; +RadioButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? RadioButton.propTypes = { /** - * If true, the `Divider` will be indented. + * @ignore + * checked if true + * Used internally by `RadioButtonGroup`. */ - inset: _react.PropTypes.bool, + checked: _react.PropTypes.bool, + /** + * The icon element to show when the radio button is checked. + */ + checkedIcon: _react.PropTypes.element, + /** + * If true, the radio button is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the input element. + */ + inputStyle: _react.PropTypes.object, + /** + * @ignore + * Used internally by `RadioButtonGroup`. Use the `labelPosition` property of `RadioButtonGroup` instead. + * Where the label will be placed next to the radio button. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * Override the inline-styles of the label element. + */ + labelStyle: _react.PropTypes.object, + /** + * @ignore + * Callback function fired when the radio button is checked. Note that this + * function will not be called if the radio button is part of a + * radio button group: in this case, use the `onChange` property of + * `RadioButtonGroup`. + * + * @param {object} event `change` event targeting the element. + * @param {string} value The element's `value`. + */ + onCheck: _react.PropTypes.func, /** * Override the inline-styles of the root element. */ - style: _react.PropTypes.object + style: _react.PropTypes.object, + /** + * The icon element to show when the radio button is unchecked. + */ + uncheckedIcon: _react.PropTypes.element, + /** + * The value of the radio button. + */ + value: _react.PropTypes.any } : void 0; - -Divider.defaultProps = { - inset: false -}; - -Divider.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - -exports.default = Divider; +exports.default = RadioButton; /***/ }), /* 788 */ @@ -63944,40 +67026,32 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _react = __webpack_require__(0); -var _Checkbox = __webpack_require__(789); +var _react2 = _interopRequireDefault(_react); -var _Checkbox2 = _interopRequireDefault(_Checkbox); +var _pure = __webpack_require__(20); -var _createComponent = __webpack_require__(43); +var _pure2 = _interopRequireDefault(_pure); -var _createComponent2 = _interopRequireDefault(_createComponent); +var _SvgIcon = __webpack_require__(21); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = (0, _createComponent2.default)(_Checkbox2.default, function (_ref) { - var _ref$input = _ref.input, - onChange = _ref$input.onChange, - value = _ref$input.value, - inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']), - meta = _ref.meta, - _onCheck = _ref.onCheck, - defaultChecked = _ref.defaultChecked, - props = _objectWithoutProperties(_ref, ['input', 'meta', 'onCheck', 'defaultChecked']); +var ToggleRadioButtonUnchecked = function ToggleRadioButtonUnchecked(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z' }) + ); +}; +ToggleRadioButtonUnchecked = (0, _pure2.default)(ToggleRadioButtonUnchecked); +ToggleRadioButtonUnchecked.displayName = 'ToggleRadioButtonUnchecked'; +ToggleRadioButtonUnchecked.muiName = 'SvgIcon'; - return _extends({}, inputProps, props, { - checked: value ? true : false, - onCheck: function onCheck(event, isInputChecked) { - onChange(isInputChecked); - if (_onCheck) { - _onCheck(isInputChecked); - } - } - }); -}); +exports.default = ToggleRadioButtonUnchecked; /***/ }), /* 789 */ @@ -63989,15 +67063,33 @@ exports.default = (0, _createComponent2.default)(_Checkbox2.default, function (_ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = undefined; -var _Checkbox = __webpack_require__(790); +var _react = __webpack_require__(0); -var _Checkbox2 = _interopRequireDefault(_Checkbox); +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(20); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(21); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = _Checkbox2.default; +var ToggleRadioButtonChecked = function ToggleRadioButtonChecked(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z' }) + ); +}; +ToggleRadioButtonChecked = (0, _pure2.default)(ToggleRadioButtonChecked); +ToggleRadioButtonChecked.displayName = 'ToggleRadioButtonChecked'; +ToggleRadioButtonChecked.muiName = 'SvgIcon'; + +exports.default = ToggleRadioButtonChecked; /***/ }), /* 790 */ @@ -64046,254 +67138,199 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _EnhancedSwitch = __webpack_require__(202); - -var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); - -var _transitions = __webpack_require__(10); - -var _transitions2 = _interopRequireDefault(_transitions); - -var _checkBoxOutlineBlank = __webpack_require__(791); +var _RadioButton = __webpack_require__(333); -var _checkBoxOutlineBlank2 = _interopRequireDefault(_checkBoxOutlineBlank); +var _RadioButton2 = _interopRequireDefault(_RadioButton); -var _checkBox = __webpack_require__(792); +var _warning = __webpack_require__(15); -var _checkBox2 = _interopRequireDefault(_checkBox); +var _warning2 = _interopRequireDefault(_warning); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props, context) { - var checkbox = context.muiTheme.checkbox; - - var checkboxSize = 24; - - return { - icon: { - height: checkboxSize, - width: checkboxSize - }, - check: { - position: 'absolute', - opacity: 0, - transform: 'scale(0)', - transitionOrigin: '50% 50%', - transition: _transitions2.default.easeOut('450ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('0ms', 'transform', '450ms'), - fill: checkbox.checkedColor - }, - checkWhenSwitched: { - opacity: 1, - transform: 'scale(1)', - transition: _transitions2.default.easeOut('0ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('800ms', 'transform', '0ms') - }, - checkWhenDisabled: { - fill: checkbox.disabledColor - }, - box: { - position: 'absolute', - opacity: 1, - fill: checkbox.boxColor, - transition: _transitions2.default.easeOut('1000ms', 'opacity', '200ms') - }, - boxWhenSwitched: { - opacity: 0, - transition: _transitions2.default.easeOut('650ms', 'opacity', '150ms'), - fill: checkbox.checkedColor - }, - boxWhenDisabled: { - fill: props.checked ? 'transparent' : checkbox.disabledColor - }, - label: { - color: props.disabled ? checkbox.labelDisabledColor : checkbox.labelColor - } - }; -} - -var Checkbox = function (_Component) { - (0, _inherits3.default)(Checkbox, _Component); +var RadioButtonGroup = function (_Component) { + (0, _inherits3.default)(RadioButtonGroup, _Component); - function Checkbox() { + function RadioButtonGroup() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, Checkbox); + (0, _classCallCheck3.default)(this, RadioButtonGroup); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Checkbox.__proto__ || (0, _getPrototypeOf2.default)(Checkbox)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - switched: false - }, _this.handleStateChange = function (newSwitched) { - _this.setState({ - switched: newSwitched - }); - }, _this.handleCheck = function (event, isInputChecked) { - if (_this.props.onCheck) { - _this.props.onCheck(event, isInputChecked); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RadioButtonGroup.__proto__ || (0, _getPrototypeOf2.default)(RadioButtonGroup)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + numberCheckedRadioButtons: 0, + selected: '' + }, _this.handleChange = function (event, newSelection) { + _this.updateRadioButtons(newSelection); + + // Successful update + if (_this.state.numberCheckedRadioButtons === 0) { + if (_this.props.onChange) _this.props.onChange(event, newSelection); } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(Checkbox, [{ + (0, _createClass3.default)(RadioButtonGroup, [{ key: 'componentWillMount', value: function componentWillMount() { - var _props = this.props, - checked = _props.checked, - defaultChecked = _props.defaultChecked, - valueLink = _props.valueLink; + var _this2 = this; + var cnt = 0; + var selected = ''; + var _props = this.props, + valueSelected = _props.valueSelected, + defaultSelected = _props.defaultSelected; - if (checked || defaultChecked || valueLink && valueLink.value) { - this.setState({ - switched: true - }); + if (valueSelected !== undefined) { + selected = valueSelected; + } else if (defaultSelected !== undefined) { + selected = defaultSelected; } + + _react2.default.Children.forEach(this.props.children, function (option) { + if (_this2.hasCheckAttribute(option)) cnt++; + }, this); + + this.setState({ + numberCheckedRadioButtons: cnt, + selected: selected + }); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { - if (this.props.checked !== nextProps.checked) { + if (nextProps.hasOwnProperty('valueSelected')) { this.setState({ - switched: nextProps.checked + selected: nextProps.valueSelected }); } } }, { - key: 'isChecked', - value: function isChecked() { - return this.refs.enhancedSwitch.isSwitched(); + key: 'hasCheckAttribute', + value: function hasCheckAttribute(radioButton) { + return radioButton.props.hasOwnProperty('checked') && radioButton.props.checked; } }, { - key: 'setChecked', - value: function setChecked(newCheckedValue) { - this.refs.enhancedSwitch.setSwitched(newCheckedValue); + key: 'updateRadioButtons', + value: function updateRadioButtons(newSelection) { + if (this.state.numberCheckedRadioButtons === 0) { + this.setState({ selected: newSelection }); + } else { + false ? (0, _warning2.default)(false, 'Material-UI: Cannot select a different radio button while another radio button\n has the \'checked\' property set to true.') : void 0; + } + } + }, { + key: 'getSelectedValue', + value: function getSelectedValue() { + return this.state.selected; + } + }, { + key: 'setSelectedValue', + value: function setSelectedValue(newSelectionValue) { + this.updateRadioButtons(newSelectionValue); + } + }, { + key: 'clearValue', + value: function clearValue() { + this.setSelectedValue(''); } }, { key: 'render', value: function render() { - var _props2 = this.props, - iconStyle = _props2.iconStyle, - onCheck = _props2.onCheck, - checkedIcon = _props2.checkedIcon, - uncheckedIcon = _props2.uncheckedIcon, - other = (0, _objectWithoutProperties3.default)(_props2, ['iconStyle', 'onCheck', 'checkedIcon', 'uncheckedIcon']); - - var styles = getStyles(this.props, this.context); - var boxStyles = (0, _simpleAssign2.default)(styles.box, this.state.switched && styles.boxWhenSwitched, iconStyle, this.props.disabled && styles.boxWhenDisabled); - var checkStyles = (0, _simpleAssign2.default)(styles.check, this.state.switched && styles.checkWhenSwitched, iconStyle, this.props.disabled && styles.checkWhenDisabled); - - var checkedElement = checkedIcon ? _react2.default.cloneElement(checkedIcon, { - style: (0, _simpleAssign2.default)(checkStyles, checkedIcon.props.style) - }) : _react2.default.createElement(_checkBox2.default, { - style: checkStyles - }); - - var unCheckedElement = uncheckedIcon ? _react2.default.cloneElement(uncheckedIcon, { - style: (0, _simpleAssign2.default)(boxStyles, uncheckedIcon.props.style) - }) : _react2.default.createElement(_checkBoxOutlineBlank2.default, { - style: boxStyles - }); + var _this3 = this; - var checkboxElement = _react2.default.createElement( - 'div', - null, - unCheckedElement, - checkedElement - ); + var prepareStyles = this.context.muiTheme.prepareStyles; - var rippleColor = this.state.switched ? checkStyles.fill : boxStyles.fill; - var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle); - var labelStyle = (0, _simpleAssign2.default)(styles.label, this.props.labelStyle); + var options = _react2.default.Children.map(this.props.children, function (option) { + var _option$props = option.props, + name = _option$props.name, + value = _option$props.value, + label = _option$props.label, + onCheck = _option$props.onCheck, + other = (0, _objectWithoutProperties3.default)(_option$props, ['name', 'value', 'label', 'onCheck']); - var enhancedSwitchProps = { - ref: 'enhancedSwitch', - inputType: 'checkbox', - switched: this.state.switched, - switchElement: checkboxElement, - rippleColor: rippleColor, - iconStyle: mergedIconStyle, - onSwitch: this.handleCheck, - labelStyle: labelStyle, - onParentShouldUpdate: this.handleStateChange, - labelPosition: this.props.labelPosition - }; - return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps)); + return _react2.default.createElement(_RadioButton2.default, (0, _extends3.default)({}, other, { + ref: option.props.value, + name: _this3.props.name, + key: option.props.value, + value: option.props.value, + label: option.props.label, + labelPosition: _this3.props.labelPosition, + onCheck: _this3.handleChange, + checked: option.props.value === _this3.state.selected + })); + }, this); + + return _react2.default.createElement( + 'div', + { + style: prepareStyles((0, _simpleAssign2.default)({}, this.props.style)), + className: this.props.className + }, + options + ); } }]); - return Checkbox; + return RadioButtonGroup; }(_react.Component); -Checkbox.defaultProps = { - labelPosition: 'right', - disabled: false +RadioButtonGroup.defaultProps = { + style: {} }; -Checkbox.contextTypes = { +RadioButtonGroup.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? Checkbox.propTypes = { - /** - * Checkbox is checked if true. - */ - checked: _react.PropTypes.bool, - /** - * The SvgIcon to use for the checked state. - * This is useful to create icon toggles. - */ - checkedIcon: _react.PropTypes.element, - /** - * The default state of our checkbox component. - * **Warning:** This cannot be used in conjunction with `checked`. - * Decide between using a controlled or uncontrolled input element and remove one of these props. - * More info: https://fb.me/react-controlled-components - */ - defaultChecked: _react.PropTypes.bool, + false ? RadioButtonGroup.propTypes = { /** - * Disabled if true. + * Should be used to pass `RadioButton` components. */ - disabled: _react.PropTypes.bool, + children: _react.PropTypes.node, /** - * Overrides the inline-styles of the icon element. + * The CSS class name of the root element. */ - iconStyle: _react.PropTypes.object, + className: _react.PropTypes.string, /** - * Overrides the inline-styles of the input element. + * The `value` property of the radio button that will be + * selected by default. This takes precedence over the `checked` property + * of the `RadioButton` elements. */ - inputStyle: _react.PropTypes.object, + defaultSelected: _react.PropTypes.any, /** - * Where the label will be placed next to the checkbox. + * Where the label will be placed for all child radio buttons. + * This takes precedence over the `labelPosition` property of the + * `RadioButton` elements. */ labelPosition: _react.PropTypes.oneOf(['left', 'right']), /** - * Overrides the inline-styles of the Checkbox element label. + * The name that will be applied to all child radio buttons. */ - labelStyle: _react.PropTypes.object, + name: _react.PropTypes.string.isRequired, /** - * Callback function that is fired when the checkbox is checked. + * Callback function that is fired when a radio button has + * been checked. * - * @param {object} event `change` event targeting the underlying checkbox `input`. - * @param {boolean} isInputChecked The `checked` value of the underlying checkbox `input`. + * @param {object} event `change` event targeting the selected + * radio button. + * @param {*} value The `value` of the selected radio button. */ - onCheck: _react.PropTypes.func, + onChange: _react.PropTypes.func, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, /** - * The SvgIcon to use for the unchecked state. - * This is useful to create icon toggles. - */ - uncheckedIcon: _react.PropTypes.element, - /** - * ValueLink for when using controlled checkbox. + * The `value` of the currently selected radio button. */ - valueLink: _react.PropTypes.object + valueSelected: _react.PropTypes.any } : void 0; -exports.default = Checkbox; +exports.default = RadioButtonGroup; /***/ }), /* 791 */ @@ -64302,97 +67339,21 @@ exports.default = Checkbox; "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _pure = __webpack_require__(25); - -var _pure2 = _interopRequireDefault(_pure); - -var _SvgIcon = __webpack_require__(26); - -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var ToggleCheckBoxOutlineBlank = function ToggleCheckBoxOutlineBlank(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z' }) - ); -}; -ToggleCheckBoxOutlineBlank = (0, _pure2.default)(ToggleCheckBoxOutlineBlank); -ToggleCheckBoxOutlineBlank.displayName = 'ToggleCheckBoxOutlineBlank'; -ToggleCheckBoxOutlineBlank.muiName = 'SvgIcon'; - -exports.default = ToggleCheckBoxOutlineBlank; - -/***/ }), -/* 792 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _pure = __webpack_require__(25); - -var _pure2 = _interopRequireDefault(_pure); - -var _SvgIcon = __webpack_require__(26); - -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var ToggleCheckBox = function ToggleCheckBox(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z' }) - ); -}; -ToggleCheckBox = (0, _pure2.default)(ToggleCheckBox); -ToggleCheckBox.displayName = 'ToggleCheckBox'; -ToggleCheckBox.muiName = 'SvgIcon'; - -exports.default = ToggleCheckBox; - -/***/ }), -/* 793 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _DatePicker = __webpack_require__(794); +var _SelectField = __webpack_require__(792); -var _DatePicker2 = _interopRequireDefault(_DatePicker); +var _SelectField2 = _interopRequireDefault(_SelectField); -var _createComponent = __webpack_require__(43); +var _createComponent = __webpack_require__(41); var _createComponent2 = _interopRequireDefault(_createComponent); -var _mapError = __webpack_require__(60); +var _mapError = __webpack_require__(66); var _mapError2 = _interopRequireDefault(_mapError); @@ -64400,26 +67361,31 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -exports.default = (0, _createComponent2.default)(_DatePicker2.default, function (_ref) { +exports.default = (0, _createComponent2.default)(_SelectField2.default, function (_ref) { var _ref$input = _ref.input, - onBlur = _ref$input.onBlur, - inputProps = _objectWithoutProperties(_ref$input, ['onBlur']), - defaultDate = _ref.defaultDate, - _onChange = _ref.onChange, - props = _objectWithoutProperties(_ref, ['input', 'defaultDate', 'onChange']); + _onChange = _ref$input.onChange, + value = _ref$input.value, + _onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value', 'onBlur']), + onChangeFromField = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'onChange']); - return _extends({}, inputProps, (0, _mapError2.default)(props), { - onChange: function onChange(event, value) { - inputProps.onChange(value); - if (_onChange) { - _onChange(value); + return _extends({}, (0, _mapError2.default)(props), inputProps, { + value: value, + onChange: function onChange(event, index, value) { + _onChange(value); + if (onChangeFromField) { + onChangeFromField(value); } + }, + onBlur: function onBlur() { + return _onBlur(value); } }); }); /***/ }), -/* 794 */ +/* 792 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64430,16 +67396,16 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _DatePicker = __webpack_require__(795); +var _SelectField = __webpack_require__(793); -var _DatePicker2 = _interopRequireDefault(_DatePicker); +var _SelectField2 = _interopRequireDefault(_SelectField); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = _DatePicker2.default; +exports.default = _SelectField2.default; /***/ }), -/* 795 */ +/* 793 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64485,355 +67451,252 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _dateUtils = __webpack_require__(81); - -var _DatePickerDialog = __webpack_require__(796); - -var _DatePickerDialog2 = _interopRequireDefault(_DatePickerDialog); - -var _TextField = __webpack_require__(97); +var _TextField = __webpack_require__(99); var _TextField2 = _interopRequireDefault(_TextField); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var DatePicker = function (_Component) { - (0, _inherits3.default)(DatePicker, _Component); - - function DatePicker() { - var _ref; +var _DropDownMenu = __webpack_require__(794); - var _temp, _this, _ret; +var _DropDownMenu2 = _interopRequireDefault(_DropDownMenu); - (0, _classCallCheck3.default)(this, DatePicker); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; +function getStyles(props) { + return { + label: { + paddingLeft: 0, + top: props.floatingLabelText ? 6 : -4 + }, + icon: { + right: 0, + top: props.floatingLabelText ? 8 : 0 + }, + hideDropDownUnderline: { + borderTop: 'none' + }, + dropDownMenu: { + display: 'block' } + }; +} - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePicker.__proto__ || (0, _getPrototypeOf2.default)(DatePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - date: undefined - }, _this.handleAccept = function (date) { - if (!_this.isControlled()) { - _this.setState({ - date: date - }); - } - if (_this.props.onChange) { - _this.props.onChange(null, date); - } - }, _this.handleFocus = function (event) { - event.target.blur(); - if (_this.props.onFocus) { - _this.props.onFocus(event); - } - }, _this.handleTouchTap = function (event) { - if (_this.props.onTouchTap) { - _this.props.onTouchTap(event); - } +var SelectField = function (_Component) { + (0, _inherits3.default)(SelectField, _Component); - if (!_this.props.disabled) { - setTimeout(function () { - _this.openDialog(); - }, 0); - } - }, _this.formatDate = function (date) { - if (_this.props.locale) { - var DateTimeFormat = _this.props.DateTimeFormat || _dateUtils.dateTimeFormat; - return new DateTimeFormat(_this.props.locale, { - day: 'numeric', - month: 'numeric', - year: 'numeric' - }).format(date); - } else { - return (0, _dateUtils.formatIso)(date); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + function SelectField() { + (0, _classCallCheck3.default)(this, SelectField); + return (0, _possibleConstructorReturn3.default)(this, (SelectField.__proto__ || (0, _getPrototypeOf2.default)(SelectField)).apply(this, arguments)); } - (0, _createClass3.default)(DatePicker, [{ - key: 'componentWillMount', - value: function componentWillMount() { - this.setState({ - date: this.isControlled() ? this.getControlledDate() : this.props.defaultDate - }); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (this.isControlled()) { - var newDate = this.getControlledDate(nextProps); - if (!(0, _dateUtils.isEqualDate)(this.state.date, newDate)) { - this.setState({ - date: newDate - }); - } - } - } - }, { - key: 'getDate', - value: function getDate() { - return this.state.date; - } - - /** - * Open the date-picker dialog programmatically from a parent. - */ - - }, { - key: 'openDialog', - value: function openDialog() { - /** - * if the date is not selected then set it to new date - * (get the current system date while doing so) - * else set it to the currently selected date - */ - if (this.state.date !== undefined) { - this.setState({ - dialogDate: this.getDate() - }, this.refs.dialogWindow.show); - } else { - this.setState({ - dialogDate: new Date() - }, this.refs.dialogWindow.show); - } - } - - /** - * Alias for `openDialog()` for an api consistent with TextField. - */ - - }, { - key: 'focus', - value: function focus() { - this.openDialog(); - } - }, { - key: 'isControlled', - value: function isControlled() { - return this.props.hasOwnProperty('value'); - } - }, { - key: 'getControlledDate', - value: function getControlledDate() { - var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; - - if (props.value instanceof Date) { - return props.value; - } - } - }, { + (0, _createClass3.default)(SelectField, [{ key: 'render', value: function render() { var _props = this.props, - DateTimeFormat = _props.DateTimeFormat, - autoOk = _props.autoOk, - cancelLabel = _props.cancelLabel, - className = _props.className, - container = _props.container, - defaultDate = _props.defaultDate, - dialogContainerStyle = _props.dialogContainerStyle, - disableYearSelection = _props.disableYearSelection, - firstDayOfWeek = _props.firstDayOfWeek, - formatDateProp = _props.formatDate, - locale = _props.locale, - maxDate = _props.maxDate, - minDate = _props.minDate, - mode = _props.mode, - okLabel = _props.okLabel, - onDismiss = _props.onDismiss, - onFocus = _props.onFocus, - onShow = _props.onShow, - onTouchTap = _props.onTouchTap, - shouldDisableDate = _props.shouldDisableDate, + autoWidth = _props.autoWidth, + children = _props.children, style = _props.style, - textFieldStyle = _props.textFieldStyle, - other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'className', 'container', 'defaultDate', 'dialogContainerStyle', 'disableYearSelection', 'firstDayOfWeek', 'formatDate', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onDismiss', 'onFocus', 'onShow', 'onTouchTap', 'shouldDisableDate', 'style', 'textFieldStyle']); - var prepareStyles = this.context.muiTheme.prepareStyles; + labelStyle = _props.labelStyle, + iconStyle = _props.iconStyle, + id = _props.id, + underlineDisabledStyle = _props.underlineDisabledStyle, + underlineFocusStyle = _props.underlineFocusStyle, + menuItemStyle = _props.menuItemStyle, + selectedMenuItemStyle = _props.selectedMenuItemStyle, + underlineStyle = _props.underlineStyle, + errorStyle = _props.errorStyle, + disabled = _props.disabled, + floatingLabelFixed = _props.floatingLabelFixed, + floatingLabelText = _props.floatingLabelText, + floatingLabelStyle = _props.floatingLabelStyle, + hintStyle = _props.hintStyle, + hintText = _props.hintText, + fullWidth = _props.fullWidth, + errorText = _props.errorText, + listStyle = _props.listStyle, + maxHeight = _props.maxHeight, + menuStyle = _props.menuStyle, + onFocus = _props.onFocus, + onBlur = _props.onBlur, + onChange = _props.onChange, + value = _props.value, + other = (0, _objectWithoutProperties3.default)(_props, ['autoWidth', 'children', 'style', 'labelStyle', 'iconStyle', 'id', 'underlineDisabledStyle', 'underlineFocusStyle', 'menuItemStyle', 'selectedMenuItemStyle', 'underlineStyle', 'errorStyle', 'disabled', 'floatingLabelFixed', 'floatingLabelText', 'floatingLabelStyle', 'hintStyle', 'hintText', 'fullWidth', 'errorText', 'listStyle', 'maxHeight', 'menuStyle', 'onFocus', 'onBlur', 'onChange', 'value']); - var formatDate = formatDateProp || this.formatDate; + + var styles = getStyles(this.props, this.context); return _react2.default.createElement( - 'div', - { className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, - _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { - onFocus: this.handleFocus, - onTouchTap: this.handleTouchTap, - ref: 'input', - style: textFieldStyle, - value: this.state.date ? formatDate(this.state.date) : '' - })), - _react2.default.createElement(_DatePickerDialog2.default, { - DateTimeFormat: DateTimeFormat, - autoOk: autoOk, - cancelLabel: cancelLabel, - container: container, - containerStyle: dialogContainerStyle, - disableYearSelection: disableYearSelection, - firstDayOfWeek: firstDayOfWeek, - initialDate: this.state.dialogDate, - locale: locale, - maxDate: maxDate, - minDate: minDate, - mode: mode, - okLabel: okLabel, - onAccept: this.handleAccept, - onShow: onShow, - onDismiss: onDismiss, - ref: 'dialogWindow', - shouldDisableDate: shouldDisableDate - }) + _TextField2.default, + (0, _extends3.default)({}, other, { + style: style, + disabled: disabled, + floatingLabelFixed: floatingLabelFixed, + floatingLabelText: floatingLabelText, + floatingLabelStyle: floatingLabelStyle, + hintStyle: hintStyle, + hintText: !hintText && !floatingLabelText ? ' ' : hintText, + fullWidth: fullWidth, + errorText: errorText, + underlineStyle: underlineStyle, + errorStyle: errorStyle, + onFocus: onFocus, + onBlur: onBlur, + id: id, + underlineDisabledStyle: underlineDisabledStyle, + underlineFocusStyle: underlineFocusStyle + }), + _react2.default.createElement( + _DropDownMenu2.default, + { + disabled: disabled, + style: (0, _simpleAssign2.default)(styles.dropDownMenu, menuStyle), + labelStyle: (0, _simpleAssign2.default)(styles.label, labelStyle), + iconStyle: (0, _simpleAssign2.default)(styles.icon, iconStyle), + menuItemStyle: menuItemStyle, + selectedMenuItemStyle: selectedMenuItemStyle, + underlineStyle: styles.hideDropDownUnderline, + listStyle: listStyle, + autoWidth: autoWidth, + value: value, + onChange: onChange, + maxHeight: maxHeight + }, + children + ) ); } }]); - return DatePicker; + return SelectField; }(_react.Component); -DatePicker.defaultProps = { - autoOk: false, - container: 'dialog', +SelectField.defaultProps = { + autoWidth: false, disabled: false, - disableYearSelection: false, - firstDayOfWeek: 1, - style: {} + fullWidth: false }; -DatePicker.contextTypes = { +SelectField.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? DatePicker.propTypes = { + false ? SelectField.propTypes = { /** - * Constructor for date formatting for the specified `locale`. - * The constructor must follow this specification: ECMAScript Internationalization API 1.0 (ECMA-402). - * `Intl.DateTimeFormat` is supported by most modern browsers, see http://caniuse.com/#search=intl, - * otherwise https://github.com/andyearnshaw/Intl.js is a good polyfill. - * - * By default, a built-in `DateTimeFormat` is used which supports the 'en-US' `locale`. + * If true, the width will automatically be set according to the + * items inside the menu. + * To control the width in CSS instead, leave this prop set to `false`. */ - DateTimeFormat: _react.PropTypes.func, + autoWidth: _react.PropTypes.bool, /** - * If true, automatically accept and close the picker on select a date. + * The `MenuItem` elements to populate the select field with. + * If the menu items have a `label` prop, that value will + * represent the selected menu item in the rendered select field. */ - autoOk: _react.PropTypes.bool, + children: _react.PropTypes.node, /** - * Override the default text of the 'Cancel' button. + * If true, the select field will be disabled. */ - cancelLabel: _react.PropTypes.node, + disabled: _react.PropTypes.bool, /** - * The css class name of the root element. + * Override the inline-styles of the error element. */ - className: _react.PropTypes.string, + errorStyle: _react.PropTypes.object, /** - * Used to control how the Date Picker will be displayed when the input field is focused. - * `dialog` (default) displays the DatePicker as a dialog with a modal. - * `inline` displays the DatePicker below the input field (similar to auto complete). + * The error content to display. */ - container: _react.PropTypes.oneOf(['dialog', 'inline']), + errorText: _react.PropTypes.node, /** - * This is the initial date value of the component. - * If either `value` or `valueLink` is provided they will override this - * prop with `value` taking precedence. + * If true, the floating label will float even when no value is selected. */ - defaultDate: _react.PropTypes.object, + floatingLabelFixed: _react.PropTypes.bool, /** - * Override the inline-styles of DatePickerDialog's Container element. + * Override the inline-styles of the floating label. */ - dialogContainerStyle: _react.PropTypes.object, + floatingLabelStyle: _react.PropTypes.object, /** - * Disables the year selection in the date picker. + * The content of the floating label. */ - disableYearSelection: _react.PropTypes.bool, + floatingLabelText: _react.PropTypes.node, /** - * Disables the DatePicker. + * If true, the select field will take up the full width of its container. */ - disabled: _react.PropTypes.bool, + fullWidth: _react.PropTypes.bool, /** - * Used to change the first day of week. It varies from - * Saturday to Monday between different locales. - * The allowed range is 0 (Sunday) to 6 (Saturday). - * The default is `1`, Monday, as per ISO 8601. + * Override the inline-styles of the hint element. */ - firstDayOfWeek: _react.PropTypes.number, + hintStyle: _react.PropTypes.object, /** - * This function is called to format the date displayed in the input field, and should return a string. - * By default if no `locale` and `DateTimeFormat` is provided date objects are formatted to ISO 8601 YYYY-MM-DD. - * - * @param {object} date Date object to be formatted. - * @returns {any} The formatted date. + * The hint content to display. */ - formatDate: _react.PropTypes.func, + hintText: _react.PropTypes.node, /** - * Locale used for formatting the `DatePicker` date strings. Other than for 'en-US', you - * must provide a `DateTimeFormat` that supports the chosen `locale`. + * Override the inline-styles of the icon element. */ - locale: _react.PropTypes.string, + iconStyle: _react.PropTypes.object, /** - * The ending of a range of valid dates. The range includes the endDate. - * The default value is current date + 100 years. + * The id prop for the text field. */ - maxDate: _react.PropTypes.object, + id: _react.PropTypes.string, /** - * The beginning of a range of valid dates. The range includes the startDate. - * The default value is current date - 100 years. + * Override the label style when the select field is inactive. */ - minDate: _react.PropTypes.object, + labelStyle: _react.PropTypes.object, /** - * Tells the component to display the picker in portrait or landscape mode. + * Override the inline-styles of the underlying `List` element. */ - mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + listStyle: _react.PropTypes.object, /** - * Override the default text of the 'OK' button. + * Override the default max-height of the underlying `DropDownMenu` element. */ - okLabel: _react.PropTypes.node, + maxHeight: _react.PropTypes.number, /** - * Callback function that is fired when the date value changes. - * - * @param {null} null Since there is no particular event associated with the change, - * the first argument will always be null. - * @param {object} date The new date. + * Override the inline-styles of menu items. */ - onChange: _react.PropTypes.func, + menuItemStyle: _react.PropTypes.object, /** - * Callback function that is fired when the Date Picker's dialog is dismissed. + * Override the inline-styles of the underlying `DropDownMenu` element. */ - onDismiss: _react.PropTypes.func, + menuStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, /** - * Callback function that is fired when the Date Picker's `TextField` gains focus. + * Callback function fired when a menu item is selected. + * + * @param {object} event TouchTap event targeting the menu item + * that was selected. + * @param {number} key The index of the selected menu item. + * @param {any} payload The `value` prop of the selected menu item. */ + onChange: _react.PropTypes.func, + /** @ignore */ onFocus: _react.PropTypes.func, /** - * Callback function that is fired when the Date Picker's dialog is shown. + * Override the inline-styles of selected menu items. */ - onShow: _react.PropTypes.func, + selectedMenuItemStyle: _react.PropTypes.object, /** - * Callback function that is fired when a touch tap event occurs on the Date Picker's `TextField`. - * - * @param {object} event TouchTap event targeting the `TextField`. + * Override the inline-styles of the root element. */ - onTouchTap: _react.PropTypes.func, + style: _react.PropTypes.object, /** - * Callback function used to determine if a day's entry should be disabled on the calendar. - * - * @param {object} day Date object of a day. - * @returns {boolean} Indicates whether the day should be disabled. + * Override the inline-styles of the underline element when the select + * field is disabled. */ - shouldDisableDate: _react.PropTypes.func, + underlineDisabledStyle: _react.PropTypes.object, /** - * Override the inline-styles of the root element. + * Override the inline-styles of the underline element when the select field + * is focused. */ - style: _react.PropTypes.object, + underlineFocusStyle: _react.PropTypes.object, /** - * Override the inline-styles of DatePicker's TextField element. + * Override the inline-styles of the underline element. */ - textFieldStyle: _react.PropTypes.object, + underlineStyle: _react.PropTypes.object, /** - * Sets the date for the Date Picker programmatically. + * The value that is currently selected. */ - value: _react.PropTypes.object + value: _react.PropTypes.any } : void 0; -exports.default = DatePicker; +exports.default = SelectField; /***/ }), -/* 796 */ +/* 794 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64842,250 +67705,24 @@ exports.default = DatePicker; Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = exports.MenuItem = exports.DropDownMenu = undefined; -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - -var _getPrototypeOf = __webpack_require__(3); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(1); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(2); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(4); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(5); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reactEventListener = __webpack_require__(42); - -var _reactEventListener2 = _interopRequireDefault(_reactEventListener); - -var _keycode = __webpack_require__(30); - -var _keycode2 = _interopRequireDefault(_keycode); - -var _Calendar = __webpack_require__(797); - -var _Calendar2 = _interopRequireDefault(_Calendar); - -var _Dialog = __webpack_require__(323); - -var _Dialog2 = _interopRequireDefault(_Dialog); - -var _Popover = __webpack_require__(130); - -var _Popover2 = _interopRequireDefault(_Popover); +var _DropDownMenu2 = __webpack_require__(795); -var _PopoverAnimationVertical = __webpack_require__(324); +var _DropDownMenu3 = _interopRequireDefault(_DropDownMenu2); -var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical); +var _MenuItem2 = __webpack_require__(326); -var _dateUtils = __webpack_require__(81); +var _MenuItem3 = _interopRequireDefault(_MenuItem2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var DatePickerDialog = function (_Component) { - (0, _inherits3.default)(DatePickerDialog, _Component); - - function DatePickerDialog() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, DatePickerDialog); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(DatePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - open: false - }, _this.show = function () { - if (_this.props.onShow && !_this.state.open) { - _this.props.onShow(); - } - - _this.setState({ - open: true - }); - }, _this.dismiss = function () { - if (_this.props.onDismiss && _this.state.open) { - _this.props.onDismiss(); - } - - _this.setState({ - open: false - }); - }, _this.handleTouchTapDay = function () { - if (_this.props.autoOk) { - setTimeout(_this.handleTouchTapOk, 300); - } - }, _this.handleTouchTapCancel = function () { - _this.dismiss(); - }, _this.handleRequestClose = function () { - _this.dismiss(); - }, _this.handleTouchTapOk = function () { - if (_this.props.onAccept && !_this.refs.calendar.isSelectedDateDisabled()) { - _this.props.onAccept(_this.refs.calendar.getSelectedDate()); - } - - _this.setState({ - open: false - }); - }, _this.handleWindowKeyUp = function (event) { - switch ((0, _keycode2.default)(event)) { - case 'enter': - _this.handleTouchTapOk(); - break; - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - - (0, _createClass3.default)(DatePickerDialog, [{ - key: 'render', - value: function render() { - var _props = this.props, - DateTimeFormat = _props.DateTimeFormat, - autoOk = _props.autoOk, - cancelLabel = _props.cancelLabel, - container = _props.container, - containerStyle = _props.containerStyle, - disableYearSelection = _props.disableYearSelection, - initialDate = _props.initialDate, - firstDayOfWeek = _props.firstDayOfWeek, - locale = _props.locale, - maxDate = _props.maxDate, - minDate = _props.minDate, - mode = _props.mode, - okLabel = _props.okLabel, - onAccept = _props.onAccept, - onDismiss = _props.onDismiss, - onShow = _props.onShow, - shouldDisableDate = _props.shouldDisableDate, - style = _props.style, - animation = _props.animation, - other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'container', 'containerStyle', 'disableYearSelection', 'initialDate', 'firstDayOfWeek', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onAccept', 'onDismiss', 'onShow', 'shouldDisableDate', 'style', 'animation']); - var open = this.state.open; - - - var styles = { - dialogContent: { - width: mode === 'landscape' ? 479 : 310 - }, - dialogBodyContent: { - padding: 0, - minHeight: mode === 'landscape' ? 330 : 434, - minWidth: mode === 'landscape' ? 479 : 310 - } - }; - - var Container = container === 'inline' ? _Popover2.default : _Dialog2.default; - - return _react2.default.createElement( - 'div', - (0, _extends3.default)({}, other, { ref: 'root' }), - _react2.default.createElement( - Container, - { - anchorEl: this.refs.root // For Popover - , animation: animation || _PopoverAnimationVertical2.default // For Popover - , bodyStyle: styles.dialogBodyContent, - contentStyle: styles.dialogContent, - ref: 'dialog', - repositionOnUpdate: true, - open: open, - onRequestClose: this.handleRequestClose, - style: (0, _simpleAssign2.default)(styles.dialogBodyContent, containerStyle) - }, - _react2.default.createElement(_reactEventListener2.default, { - target: 'window', - onKeyUp: this.handleWindowKeyUp - }), - _react2.default.createElement(_Calendar2.default, { - autoOk: autoOk, - DateTimeFormat: DateTimeFormat, - cancelLabel: cancelLabel, - disableYearSelection: disableYearSelection, - firstDayOfWeek: firstDayOfWeek, - initialDate: initialDate, - locale: locale, - onTouchTapDay: this.handleTouchTapDay, - maxDate: maxDate, - minDate: minDate, - mode: mode, - open: open, - ref: 'calendar', - onTouchTapCancel: this.handleTouchTapCancel, - onTouchTapOk: this.handleTouchTapOk, - okLabel: okLabel, - shouldDisableDate: shouldDisableDate - }) - ) - ); - } - }]); - return DatePickerDialog; -}(_react.Component); - -DatePickerDialog.defaultProps = { - DateTimeFormat: _dateUtils.dateTimeFormat, - cancelLabel: 'Cancel', - container: 'dialog', - locale: 'en-US', - okLabel: 'OK' -}; -DatePickerDialog.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? DatePickerDialog.propTypes = { - DateTimeFormat: _react.PropTypes.func, - animation: _react.PropTypes.func, - autoOk: _react.PropTypes.bool, - cancelLabel: _react.PropTypes.node, - container: _react.PropTypes.oneOf(['dialog', 'inline']), - containerStyle: _react.PropTypes.object, - disableYearSelection: _react.PropTypes.bool, - firstDayOfWeek: _react.PropTypes.number, - initialDate: _react.PropTypes.object, - locale: _react.PropTypes.string, - maxDate: _react.PropTypes.object, - minDate: _react.PropTypes.object, - mode: _react.PropTypes.oneOf(['portrait', 'landscape']), - okLabel: _react.PropTypes.node, - onAccept: _react.PropTypes.func, - onDismiss: _react.PropTypes.func, - onShow: _react.PropTypes.func, - open: _react.PropTypes.bool, - shouldDisableDate: _react.PropTypes.func, - style: _react.PropTypes.object -} : void 0; -exports.default = DatePickerDialog; +exports.DropDownMenu = _DropDownMenu3.default; +exports.MenuItem = _MenuItem3.default; +exports.default = _DropDownMenu3.default; /***/ }), -/* 797 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65095,6 +67732,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -65115,431 +67760,469 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _toConsumableArray2 = __webpack_require__(189); +var _simpleAssign = __webpack_require__(6); -var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactEventListener = __webpack_require__(42); +var _reactDom = __webpack_require__(16); -var _reactEventListener2 = _interopRequireDefault(_reactEventListener); - -var _keycode = __webpack_require__(30); - -var _keycode2 = _interopRequireDefault(_keycode); +var _reactDom2 = _interopRequireDefault(_reactDom); var _transitions = __webpack_require__(10); var _transitions2 = _interopRequireDefault(_transitions); -var _CalendarActionButtons = __webpack_require__(798); +var _arrowDropDown = __webpack_require__(796); -var _CalendarActionButtons2 = _interopRequireDefault(_CalendarActionButtons); +var _arrowDropDown2 = _interopRequireDefault(_arrowDropDown); -var _CalendarMonth = __webpack_require__(799); +var _Menu = __webpack_require__(205); -var _CalendarMonth2 = _interopRequireDefault(_CalendarMonth); +var _Menu2 = _interopRequireDefault(_Menu); -var _CalendarYear = __webpack_require__(801); +var _ClearFix = __webpack_require__(797); -var _CalendarYear2 = _interopRequireDefault(_CalendarYear); +var _ClearFix2 = _interopRequireDefault(_ClearFix); -var _CalendarToolbar = __webpack_require__(803); +var _Popover = __webpack_require__(133); -var _CalendarToolbar2 = _interopRequireDefault(_CalendarToolbar); +var _Popover2 = _interopRequireDefault(_Popover); -var _DateDisplay = __webpack_require__(807); +var _PopoverAnimationVertical = __webpack_require__(332); -var _DateDisplay2 = _interopRequireDefault(_DateDisplay); +var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical); -var _SlideIn = __webpack_require__(203); +var _keycode = __webpack_require__(26); -var _SlideIn2 = _interopRequireDefault(_SlideIn); +var _keycode2 = _interopRequireDefault(_keycode); + +var _events = __webpack_require__(203); + +var _events2 = _interopRequireDefault(_events); -var _dateUtils = __webpack_require__(81); +var _IconButton = __webpack_require__(64); + +var _IconButton2 = _interopRequireDefault(_IconButton); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var daysArray = [].concat((0, _toConsumableArray3.default)(Array(7))); +var anchorOrigin = { + vertical: 'top', + horizontal: 'left' +}; -var Calendar = function (_Component) { - (0, _inherits3.default)(Calendar, _Component); +function getStyles(props, context) { + var disabled = props.disabled; - function Calendar() { + var spacing = context.muiTheme.baseTheme.spacing; + var palette = context.muiTheme.baseTheme.palette; + var accentColor = context.muiTheme.dropDownMenu.accentColor; + return { + control: { + cursor: disabled ? 'not-allowed' : 'pointer', + height: '100%', + position: 'relative', + width: '100%' + }, + icon: { + fill: accentColor, + position: 'absolute', + right: spacing.desktopGutterLess, + top: (spacing.iconSize - 24) / 2 + spacing.desktopGutterMini / 2 + }, + iconChildren: { + fill: 'inherit' + }, + label: { + color: disabled ? palette.disabledColor : palette.textColor, + lineHeight: spacing.desktopToolbarHeight + 'px', + overflow: 'hidden', + opacity: 1, + position: 'relative', + paddingLeft: spacing.desktopGutter, + paddingRight: spacing.iconSize * 2 + spacing.desktopGutterMini, + textOverflow: 'ellipsis', + top: 0, + whiteSpace: 'nowrap' + }, + labelWhenOpen: { + opacity: 0, + top: spacing.desktopToolbarHeight / 8 + }, + root: { + display: 'inline-block', + fontSize: spacing.desktopDropDownMenuFontSize, + height: spacing.desktopSubheaderHeight, + fontFamily: context.muiTheme.baseTheme.fontFamily, + outline: 'none', + position: 'relative', + transition: _transitions2.default.easeOut() + }, + rootWhenOpen: { + opacity: 1 + }, + underline: { + borderTop: 'solid 1px ' + accentColor, + bottom: 1, + left: 0, + margin: '-1px ' + spacing.desktopGutter + 'px', + right: 0, + position: 'absolute' + } + }; +} + +var DropDownMenu = function (_Component) { + (0, _inherits3.default)(DropDownMenu, _Component); + + function DropDownMenu() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, Calendar); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + (0, _classCallCheck3.default)(this, DropDownMenu); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Calendar.__proto__ || (0, _getPrototypeOf2.default)(Calendar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - displayDate: undefined, - displayMonthDay: true, - selectedDate: undefined, - transitionDirection: 'left', - transitionEnter: true - }, _this.handleTouchTapDay = function (event, date) { - _this.setSelectedDate(date); - if (_this.props.onTouchTapDay) _this.props.onTouchTapDay(event, date); - }, _this.handleMonthChange = function (months) { - _this.setState({ - transitionDirection: months >= 0 ? 'left' : 'right', - displayDate: (0, _dateUtils.addMonths)(_this.state.displayDate, months) - }); - }, _this.handleTouchTapYear = function (event, year) { - var date = (0, _dateUtils.cloneDate)(_this.state.selectedDate); - date.setFullYear(year); - _this.setSelectedDate(date, event); - _this.handleTouchTapDateDisplayMonthDay(); - }, _this.handleTouchTapDateDisplayMonthDay = function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DropDownMenu.__proto__ || (0, _getPrototypeOf2.default)(DropDownMenu)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.rootNode = undefined, _this.arrowNode = undefined, _this.handleTouchTapControl = function (event) { + event.preventDefault(); + if (!_this.props.disabled) { + _this.setState({ + open: !_this.state.open, + anchorEl: _this.rootNode + }); + } + }, _this.handleRequestCloseMenu = function () { + _this.close(false); + }, _this.handleEscKeyDownMenu = function () { + _this.close(true); + }, _this.handleKeyDown = function (event) { + switch ((0, _keycode2.default)(event)) { + case 'up': + case 'down': + case 'space': + case 'enter': + event.preventDefault(); + _this.setState({ + open: true, + anchorEl: _this.rootNode + }); + break; + } + }, _this.handleItemTouchTap = function (event, child, index) { + event.persist(); _this.setState({ - displayMonthDay: true + open: false + }, function () { + if (_this.props.onChange) { + _this.props.onChange(event, index, child.props.value); + } + + _this.close(_events2.default.isKeyboard(event)); }); - }, _this.handleTouchTapDateDisplayYear = function () { + }, _this.close = function (isKeyboard) { _this.setState({ - displayMonthDay: false - }); - }, _this.handleWindowKeyDown = function (event) { - if (_this.props.open) { - switch ((0, _keycode2.default)(event)) { - case 'up': - if (event.altKey && event.shiftKey) { - _this.addSelectedYears(-1); - } else if (event.shiftKey) { - _this.addSelectedMonths(-1); - } else { - _this.addSelectedDays(-7); - } - break; - - case 'down': - if (event.altKey && event.shiftKey) { - _this.addSelectedYears(1); - } else if (event.shiftKey) { - _this.addSelectedMonths(1); - } else { - _this.addSelectedDays(7); - } - break; - - case 'right': - if (event.altKey && event.shiftKey) { - _this.addSelectedYears(1); - } else if (event.shiftKey) { - _this.addSelectedMonths(1); - } else { - _this.addSelectedDays(1); - } - break; + open: false + }, function () { + if (_this.props.onClose) { + _this.props.onClose(); + } - case 'left': - if (event.altKey && event.shiftKey) { - _this.addSelectedYears(-1); - } else if (event.shiftKey) { - _this.addSelectedMonths(-1); - } else { - _this.addSelectedDays(-1); - } - break; + if (isKeyboard) { + var dropArrow = _this.arrowNode; + var dropNode = _reactDom2.default.findDOMNode(dropArrow); + dropNode.focus(); + dropArrow.setKeyboardFocus(true); } - } + }); }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(Calendar, [{ - key: 'componentWillMount', - value: function componentWillMount() { - this.setState({ - displayDate: (0, _dateUtils.getFirstDayOfMonth)(this.props.initialDate), - selectedDate: this.props.initialDate - }); + // The nested styles for drop-down-menu are modified by toolbar and possibly + // other user components, so it will give full access to its js styles rather + // than just the parent. + + + (0, _createClass3.default)(DropDownMenu, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var _this2 = this; + + if (this.props.autoWidth) { + this.setWidth(); + } + if (this.props.openImmediately) { + // TODO: Temporary fix to make openImmediately work with popover. + /* eslint-disable react/no-did-mount-set-state */ + setTimeout(function () { + return _this2.setState({ + open: true, + anchorEl: _this2.rootNode + }); + }, 0); + /* eslint-enable react/no-did-mount-set-state */ + } } }, { key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (nextProps.initialDate !== this.props.initialDate) { - var date = nextProps.initialDate || new Date(); - this.setState({ - displayDate: (0, _dateUtils.getFirstDayOfMonth)(date), - selectedDate: date - }); + value: function componentWillReceiveProps() { + if (this.props.autoWidth) { + this.setWidth(); } } }, { - key: 'getSelectedDate', - value: function getSelectedDate() { - return this.state.selectedDate; - } - }, { - key: 'isSelectedDateDisabled', - value: function isSelectedDateDisabled() { - if (!this.state.displayMonthDay) { - return false; - } + key: 'getInputNode', - return this.refs.calendar.isSelectedDateDisabled(); - } - }, { - key: 'addSelectedDays', - value: function addSelectedDays(days) { - this.setSelectedDate((0, _dateUtils.addDays)(this.state.selectedDate, days)); - } - }, { - key: 'addSelectedMonths', - value: function addSelectedMonths(months) { - this.setSelectedDate((0, _dateUtils.addMonths)(this.state.selectedDate, months)); - } - }, { - key: 'addSelectedYears', - value: function addSelectedYears(years) { - this.setSelectedDate((0, _dateUtils.addYears)(this.state.selectedDate, years)); - } - }, { - key: 'setDisplayDate', - value: function setDisplayDate(date, newSelectedDate) { - var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(date); - var direction = newDisplayDate > this.state.displayDate ? 'left' : 'right'; - if (newDisplayDate !== this.state.displayDate) { - this.setState({ - displayDate: newDisplayDate, - transitionDirection: direction, - selectedDate: newSelectedDate || this.state.selectedDate - }); - } - } - }, { - key: 'setSelectedDate', - value: function setSelectedDate(date) { - var adjustedDate = date; - if ((0, _dateUtils.isBeforeDate)(date, this.props.minDate)) { - adjustedDate = this.props.minDate; - } else if ((0, _dateUtils.isAfterDate)(date, this.props.maxDate)) { - adjustedDate = this.props.maxDate; - } + /** + * This method is deprecated but still here because the TextField + * need it in order to work. TODO: That will be addressed later. + */ + value: function getInputNode() { + var _this3 = this; - var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(adjustedDate); - if (newDisplayDate !== this.state.displayDate) { - this.setDisplayDate(newDisplayDate, adjustedDate); - } else { - this.setState({ - selectedDate: adjustedDate - }); - } - } - }, { - key: 'getToolbarInteractions', - value: function getToolbarInteractions() { - return { - prevMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.minDate) > 0, - nextMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.maxDate) < 0 + var rootNode = this.rootNode; + + rootNode.focus = function () { + if (!_this3.props.disabled) { + _this3.setState({ + open: !_this3.state.open, + anchorEl: _this3.rootNode + }); + } }; + + return rootNode; } }, { - key: 'yearSelector', - value: function yearSelector() { - if (!this.props.disableYearSelection) { - return _react2.default.createElement(_CalendarYear2.default, { - key: 'years', - DateTimeFormat: this.props.DateTimeFormat, - locale: this.props.locale, - onTouchTapYear: this.handleTouchTapYear, - selectedDate: this.state.selectedDate, - minDate: this.props.minDate, - maxDate: this.props.maxDate - }); + key: 'setWidth', + value: function setWidth() { + var el = this.rootNode; + if (!this.props.style || !this.props.style.hasOwnProperty('width')) { + el.style.width = 'auto'; } } }, { key: 'render', value: function render() { - var prepareStyles = this.context.muiTheme.prepareStyles; + var _this4 = this; - var toolbarInteractions = this.getToolbarInteractions(); - var isLandscape = this.props.mode === 'landscape'; - var calendarTextColor = this.context.muiTheme.datePicker.calendarTextColor; + var _props = this.props, + animated = _props.animated, + animation = _props.animation, + autoWidth = _props.autoWidth, + children = _props.children, + className = _props.className, + iconStyle = _props.iconStyle, + labelStyle = _props.labelStyle, + listStyle = _props.listStyle, + maxHeight = _props.maxHeight, + menuStyleProp = _props.menuStyle, + onClose = _props.onClose, + openImmediately = _props.openImmediately, + menuItemStyle = _props.menuItemStyle, + selectedMenuItemStyle = _props.selectedMenuItemStyle, + style = _props.style, + underlineStyle = _props.underlineStyle, + value = _props.value, + other = (0, _objectWithoutProperties3.default)(_props, ['animated', 'animation', 'autoWidth', 'children', 'className', 'iconStyle', 'labelStyle', 'listStyle', 'maxHeight', 'menuStyle', 'onClose', 'openImmediately', 'menuItemStyle', 'selectedMenuItemStyle', 'style', 'underlineStyle', 'value']); + var _state = this.state, + anchorEl = _state.anchorEl, + open = _state.open; + var prepareStyles = this.context.muiTheme.prepareStyles; + var styles = getStyles(this.props, this.context); - var styles = { - root: { - color: calendarTextColor, - userSelect: 'none', - width: isLandscape ? 479 : 310 - }, - calendar: { - display: 'flex', - flexDirection: 'column' - }, - calendarContainer: { - display: 'flex', - alignContent: 'space-between', - justifyContent: 'space-between', - flexDirection: 'column', - fontSize: 12, - fontWeight: 400, - padding: '0px 8px', - transition: _transitions2.default.easeOut() - }, - yearContainer: { - display: 'flex', - justifyContent: 'space-between', - flexDirection: 'column', - height: 272, - marginTop: 10, - overflow: 'hidden', - width: 310 - }, - weekTitle: { - display: 'flex', - flexDirection: 'row', - justifyContent: 'space-between', - fontWeight: '500', - height: 20, - lineHeight: '15px', - opacity: '0.5', - textAlign: 'center' - }, - weekTitleDay: { - width: 42 - }, - transitionSlide: { - height: 214 + var displayValue = ''; + _react2.default.Children.forEach(children, function (child) { + if (child && value === child.props.value) { + // This will need to be improved (in case primaryText is a node) + displayValue = child.props.label || child.props.primaryText; } - }; - - var weekTitleDayStyle = prepareStyles(styles.weekTitleDay); - - var _props = this.props, - minDate = _props.minDate, - maxDate = _props.maxDate, - cancelLabel = _props.cancelLabel, - DateTimeFormat = _props.DateTimeFormat, - firstDayOfWeek = _props.firstDayOfWeek, - locale = _props.locale, - okLabel = _props.okLabel, - onTouchTapCancel = _props.onTouchTapCancel, - onTouchTapOk = _props.onTouchTapOk; + }); + var menuStyle = void 0; + if (anchorEl && !autoWidth) { + menuStyle = (0, _simpleAssign2.default)({ + width: anchorEl.clientWidth + }, menuStyleProp); + } else { + menuStyle = menuStyleProp; + } return _react2.default.createElement( 'div', - { style: prepareStyles(styles.root) }, - _react2.default.createElement(_reactEventListener2.default, { - target: 'window', - onKeyDown: this.handleWindowKeyDown - }), - _react2.default.createElement(_DateDisplay2.default, { - DateTimeFormat: DateTimeFormat, - disableYearSelection: this.props.disableYearSelection, - onTouchTapMonthDay: this.handleTouchTapDateDisplayMonthDay, - onTouchTapYear: this.handleTouchTapDateDisplayYear, - locale: locale, - monthDaySelected: this.state.displayMonthDay, - mode: this.props.mode, - selectedDate: this.state.selectedDate + (0, _extends3.default)({}, other, { + ref: function ref(node) { + _this4.rootNode = node; + }, + className: className, + style: prepareStyles((0, _simpleAssign2.default)({}, styles.root, open && styles.rootWhenOpen, style)) }), _react2.default.createElement( - 'div', - { style: prepareStyles(styles.calendar) }, - this.state.displayMonthDay && _react2.default.createElement( + _ClearFix2.default, + { style: styles.control, onTouchTap: this.handleTouchTapControl }, + _react2.default.createElement( 'div', - { style: prepareStyles(styles.calendarContainer) }, - _react2.default.createElement(_CalendarToolbar2.default, { - DateTimeFormat: DateTimeFormat, - locale: locale, - displayDate: this.state.displayDate, - onMonthChange: this.handleMonthChange, - prevMonth: toolbarInteractions.prevMonth, - nextMonth: toolbarInteractions.nextMonth - }), - _react2.default.createElement( - 'div', - { style: prepareStyles(styles.weekTitle) }, - daysArray.map(function (event, i) { - return _react2.default.createElement( - 'span', - { key: i, style: weekTitleDayStyle }, - (0, _dateUtils.localizedWeekday)(DateTimeFormat, locale, i, firstDayOfWeek) - ); - }) - ), - _react2.default.createElement( - _SlideIn2.default, - { direction: this.state.transitionDirection, style: styles.transitionSlide }, - _react2.default.createElement(_CalendarMonth2.default, { - DateTimeFormat: DateTimeFormat, - locale: locale, - displayDate: this.state.displayDate, - firstDayOfWeek: this.props.firstDayOfWeek, - key: this.state.displayDate.toDateString(), - minDate: minDate, - maxDate: maxDate, - onTouchTapDay: this.handleTouchTapDay, - ref: 'calendar', - selectedDate: this.state.selectedDate, - shouldDisableDate: this.props.shouldDisableDate - }) - ) + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.label, open && styles.labelWhenOpen, labelStyle)) }, + displayValue ), - !this.state.displayMonthDay && _react2.default.createElement( - 'div', - { style: prepareStyles(styles.yearContainer) }, - this.yearSelector() + _react2.default.createElement( + _IconButton2.default, + { + tabIndex: this.props.disabled ? -1 : undefined, + onKeyDown: this.handleKeyDown, + ref: function ref(node) { + _this4.arrowNode = node; + }, + style: (0, _simpleAssign2.default)({}, styles.icon, iconStyle), + iconStyle: styles.iconChildren + }, + _react2.default.createElement(_arrowDropDown2.default, null) ), - okLabel && _react2.default.createElement(_CalendarActionButtons2.default, { - autoOk: this.props.autoOk, - cancelLabel: cancelLabel, - okLabel: okLabel, - onTouchTapCancel: onTouchTapCancel, - onTouchTapOk: onTouchTapOk - }) + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.underline, underlineStyle)) }) + ), + _react2.default.createElement( + _Popover2.default, + { + anchorOrigin: anchorOrigin, + anchorEl: anchorEl, + animation: animation || _PopoverAnimationVertical2.default, + open: open, + animated: animated, + onRequestClose: this.handleRequestCloseMenu + }, + _react2.default.createElement( + _Menu2.default, + { + maxHeight: maxHeight, + desktop: true, + value: value, + onEscKeyDown: this.handleEscKeyDownMenu, + style: menuStyle, + listStyle: listStyle, + onItemTouchTap: this.handleItemTouchTap, + menuItemStyle: menuItemStyle, + selectedMenuItemStyle: selectedMenuItemStyle + }, + children + ) ) ); } }]); - return Calendar; + return DropDownMenu; }(_react.Component); -Calendar.defaultProps = { - DateTimeFormat: _dateUtils.dateTimeFormat, - disableYearSelection: false, - initialDate: new Date(), - locale: 'en-US', - minDate: (0, _dateUtils.addYears)(new Date(), -100), - maxDate: (0, _dateUtils.addYears)(new Date(), 100) +DropDownMenu.muiName = 'DropDownMenu'; +DropDownMenu.defaultProps = { + animated: true, + autoWidth: true, + disabled: false, + openImmediately: false, + maxHeight: 500 }; -Calendar.contextTypes = { +DropDownMenu.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? Calendar.propTypes = { - DateTimeFormat: _react.PropTypes.func.isRequired, - autoOk: _react.PropTypes.bool, - cancelLabel: _react.PropTypes.node, - disableYearSelection: _react.PropTypes.bool, - firstDayOfWeek: _react.PropTypes.number, - initialDate: _react.PropTypes.object, - locale: _react.PropTypes.string.isRequired, - maxDate: _react.PropTypes.object, - minDate: _react.PropTypes.object, - mode: _react.PropTypes.oneOf(['portrait', 'landscape']), - okLabel: _react.PropTypes.node, - onTouchTapCancel: _react.PropTypes.func, - onTouchTapDay: _react.PropTypes.func, - onTouchTapOk: _react.PropTypes.func, - open: _react.PropTypes.bool, - shouldDisableDate: _react.PropTypes.func + false ? DropDownMenu.propTypes = { + /** + * If true, the popover will apply transitions when + * it gets added to the DOM. + */ + animated: _react.PropTypes.bool, + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * The width will automatically be set according to the items inside the menu. + * To control this width in css instead, set this prop to `false`. + */ + autoWidth: _react.PropTypes.bool, + /** + * The `MenuItem`s to populate the `Menu` with. If the `MenuItems` have the + * prop `label` that value will be used to render the representation of that + * item within the field. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Disables the menu. + */ + disabled: _react.PropTypes.bool, + /** + * Overrides the styles of icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Overrides the styles of label when the `DropDownMenu` is inactive. + */ + labelStyle: _react.PropTypes.object, + /** + * The style object to use to override underlying list style. + */ + listStyle: _react.PropTypes.object, + /** + * The maximum height of the `Menu` when it is displayed. + */ + maxHeight: _react.PropTypes.number, + /** + * Override the inline-styles of menu items. + */ + menuItemStyle: _react.PropTypes.object, + /** + * Overrides the styles of `Menu` when the `DropDownMenu` is displayed. + */ + menuStyle: _react.PropTypes.object, + /** + * Callback function fired when a menu item is clicked, other than the one currently selected. + * + * @param {object} event TouchTap event targeting the menu item that was clicked. + * @param {number} key The index of the clicked menu item in the `children` collection. + * @param {any} payload The `value` prop of the clicked menu item. + */ + onChange: _react.PropTypes.func, + /** + * Callback function fired when the menu is closed. + */ + onClose: _react.PropTypes.func, + /** + * Set to true to have the `DropDownMenu` automatically open on mount. + */ + openImmediately: _react.PropTypes.bool, + /** + * Override the inline-styles of selected menu items. + */ + selectedMenuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Overrides the inline-styles of the underline. + */ + underlineStyle: _react.PropTypes.object, + /** + * The value that is currently selected. + */ + value: _react.PropTypes.any } : void 0; -exports.default = Calendar; +exports.default = DropDownMenu; /***/ }), -/* 798 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65549,103 +68232,35 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _getPrototypeOf = __webpack_require__(3); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(1); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(2); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(4); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(5); - -var _inherits3 = _interopRequireDefault(_inherits2); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _FlatButton = __webpack_require__(198); - -var _FlatButton2 = _interopRequireDefault(_FlatButton); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var CalendarActionButton = function (_Component) { - (0, _inherits3.default)(CalendarActionButton, _Component); +var _pure = __webpack_require__(20); - function CalendarActionButton() { - (0, _classCallCheck3.default)(this, CalendarActionButton); - return (0, _possibleConstructorReturn3.default)(this, (CalendarActionButton.__proto__ || (0, _getPrototypeOf2.default)(CalendarActionButton)).apply(this, arguments)); - } +var _pure2 = _interopRequireDefault(_pure); - (0, _createClass3.default)(CalendarActionButton, [{ - key: 'render', - value: function render() { - var _props = this.props, - cancelLabel = _props.cancelLabel, - okLabel = _props.okLabel; +var _SvgIcon = __webpack_require__(21); +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); - var styles = { - root: { - display: 'flex', - flexDirection: 'row', - justifyContent: 'flex-end', - margin: 0, - maxHeight: 48, - padding: 0 - }, - flatButtons: { - fontsize: 14, - margin: '4px 8px 8px 0px', - maxHeight: 36, - minWidth: 64, - padding: 0 - } - }; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - return _react2.default.createElement( - 'div', - { style: styles.root }, - _react2.default.createElement(_FlatButton2.default, { - label: cancelLabel, - onTouchTap: this.props.onTouchTapCancel, - primary: true, - style: styles.flatButtons - }), - !this.props.autoOk && _react2.default.createElement(_FlatButton2.default, { - disabled: this.refs.calendar !== undefined && this.refs.calendar.isSelectedDateDisabled(), - label: okLabel, - onTouchTap: this.props.onTouchTapOk, - primary: true, - style: styles.flatButtons - }) - ); - } - }]); - return CalendarActionButton; -}(_react.Component); +var NavigationArrowDropDown = function NavigationArrowDropDown(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M7 10l5 5 5-5z' }) + ); +}; +NavigationArrowDropDown = (0, _pure2.default)(NavigationArrowDropDown); +NavigationArrowDropDown.displayName = 'NavigationArrowDropDown'; +NavigationArrowDropDown.muiName = 'SvgIcon'; - false ? CalendarActionButton.propTypes = { - autoOk: _react.PropTypes.bool, - cancelLabel: _react.PropTypes.node, - okLabel: _react.PropTypes.node, - onTouchTapCancel: _react.PropTypes.func, - onTouchTapOk: _react.PropTypes.func -} : void 0; -exports.default = CalendarActionButton; +exports.default = NavigationArrowDropDown; /***/ }), -/* 799 */ +/* 797 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65655,169 +68270,65 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _getPrototypeOf = __webpack_require__(3); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(1); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(2); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(4); +var _extends2 = __webpack_require__(7); -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); +var _extends3 = _interopRequireDefault(_extends2); -var _inherits2 = __webpack_require__(5); +var _objectWithoutProperties2 = __webpack_require__(8); -var _inherits3 = _interopRequireDefault(_inherits2); +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _dateUtils = __webpack_require__(81); - -var _DayButton = __webpack_require__(800); +var _BeforeAfterWrapper = __webpack_require__(798); -var _DayButton2 = _interopRequireDefault(_DayButton); +var _BeforeAfterWrapper2 = _interopRequireDefault(_BeforeAfterWrapper); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var styles = { - root: { - display: 'flex', - flexDirection: 'column', - justifyContent: 'flex-start', - fontWeight: 400, - height: 228, - lineHeight: 2, - position: 'relative', - textAlign: 'center', - MozPaddingStart: 0 + before: { + content: "' '", + display: 'table' }, - week: { - display: 'flex', - flexDirection: 'row', - justifyContent: 'space-around', - height: 34, - marginBottom: 2 + after: { + content: "' '", + clear: 'both', + display: 'table' } }; -var CalendarMonth = function (_Component) { - (0, _inherits3.default)(CalendarMonth, _Component); - - function CalendarMonth() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, CalendarMonth); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarMonth.__proto__ || (0, _getPrototypeOf2.default)(CalendarMonth)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapDay = function (event, date) { - if (_this.props.onTouchTapDay) { - _this.props.onTouchTapDay(event, date); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - - (0, _createClass3.default)(CalendarMonth, [{ - key: 'isSelectedDateDisabled', - value: function isSelectedDateDisabled() { - return this.selectedDateDisabled; - } - }, { - key: 'shouldDisableDate', - value: function shouldDisableDate(day) { - if (day === null) return false; - var disabled = !(0, _dateUtils.isBetweenDates)(day, this.props.minDate, this.props.maxDate); - if (!disabled && this.props.shouldDisableDate) disabled = this.props.shouldDisableDate(day); - - return disabled; - } - }, { - key: 'getWeekElements', - value: function getWeekElements() { - var _this2 = this; - - var weekArray = (0, _dateUtils.getWeekArray)(this.props.displayDate, this.props.firstDayOfWeek); - - return weekArray.map(function (week, i) { - return _react2.default.createElement( - 'div', - { key: i, style: styles.week }, - _this2.getDayElements(week, i) - ); - }, this); - } - }, { - key: 'getDayElements', - value: function getDayElements(week, i) { - var _this3 = this; - - var _props = this.props, - DateTimeFormat = _props.DateTimeFormat, - locale = _props.locale, - selectedDate = _props.selectedDate; - - - return week.map(function (day, j) { - var isSameDate = (0, _dateUtils.isEqualDate)(selectedDate, day); - var disabled = _this3.shouldDisableDate(day); - var selected = !disabled && isSameDate; - - if (isSameDate) { - _this3.selectedDateDisabled = disabled; - } +var ClearFix = function ClearFix(_ref) { + var style = _ref.style, + children = _ref.children, + other = (0, _objectWithoutProperties3.default)(_ref, ['style', 'children']); + return _react2.default.createElement( + _BeforeAfterWrapper2.default, + (0, _extends3.default)({}, other, { + beforeStyle: styles.before, + afterStyle: styles.after, + style: style + }), + children + ); +}; - return _react2.default.createElement(_DayButton2.default, { - DateTimeFormat: DateTimeFormat, - locale: locale, - date: day, - disabled: disabled, - key: 'db' + (i + j), - onTouchTap: _this3.handleTouchTapDay, - selected: selected - }); - }, this); - } - }, { - key: 'render', - value: function render() { - return _react2.default.createElement( - 'div', - { style: styles.root }, - this.getWeekElements() - ); - } - }]); - return CalendarMonth; -}(_react.Component); +ClearFix.muiName = 'ClearFix'; - false ? CalendarMonth.propTypes = { - DateTimeFormat: _react.PropTypes.func.isRequired, - autoOk: _react.PropTypes.bool, - displayDate: _react.PropTypes.object.isRequired, - firstDayOfWeek: _react.PropTypes.number, - locale: _react.PropTypes.string.isRequired, - maxDate: _react.PropTypes.object, - minDate: _react.PropTypes.object, - onTouchTapDay: _react.PropTypes.func, - selectedDate: _react.PropTypes.object.isRequired, - shouldDisableDate: _react.PropTypes.func + false ? ClearFix.propTypes = { + children: _react.PropTypes.node, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object } : void 0; -exports.default = CalendarMonth; + +exports.default = ClearFix; /***/ }), -/* 800 */ +/* 798 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65827,10 +68338,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - var _objectWithoutProperties2 = __webpack_require__(8); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); @@ -65855,167 +68362,194 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(10); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _transitions2 = _interopRequireDefault(_transitions); +/** + * BeforeAfterWrapper + * An alternative for the ::before and ::after css pseudo-elements for + * components whose styles are defined in javascript instead of css. + * + * Usage: For the element that we want to apply before and after elements to, + * wrap its children with BeforeAfterWrapper. For example: + * + * + *
// See notice + * renders
// before element + * [children of paper] ------> [children of paper] + *
// after element + *
+ * + * + * Notice: Notice that this div bundles together our elements. If the element + * that we want to apply before and after elements is a HTML tag (i.e. a + * div, p, or button tag), we can avoid this extra nesting by passing using + * the BeforeAfterWrapper in place of said tag like so: + * + *

+ * do this instead + * [children of p] ------> [children of p] + * + *

+ * + * BeforeAfterWrapper features spread functionality. This means that we can + * pass HTML tag properties directly into the BeforeAfterWrapper tag. + * + * When using BeforeAfterWrapper, ensure that the parent of the beforeElement + * and afterElement have a defined style position. + */ -var _dateUtils = __webpack_require__(81); +var styles = { + box: { + boxSizing: 'border-box' + } +}; -var _EnhancedButton = __webpack_require__(59); +var BeforeAfterWrapper = function (_Component) { + (0, _inherits3.default)(BeforeAfterWrapper, _Component); -var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + function BeforeAfterWrapper() { + (0, _classCallCheck3.default)(this, BeforeAfterWrapper); + return (0, _possibleConstructorReturn3.default)(this, (BeforeAfterWrapper.__proto__ || (0, _getPrototypeOf2.default)(BeforeAfterWrapper)).apply(this, arguments)); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + (0, _createClass3.default)(BeforeAfterWrapper, [{ + key: 'render', + value: function render() { + var _props = this.props, + beforeStyle = _props.beforeStyle, + afterStyle = _props.afterStyle, + beforeElementType = _props.beforeElementType, + afterElementType = _props.afterElementType, + elementType = _props.elementType, + other = (0, _objectWithoutProperties3.default)(_props, ['beforeStyle', 'afterStyle', 'beforeElementType', 'afterElementType', 'elementType']); + var prepareStyles = this.context.muiTheme.prepareStyles; -function getStyles(props, context, state) { - var date = props.date, - disabled = props.disabled, - selected = props.selected; - var hover = state.hover; - var _context$muiTheme = context.muiTheme, - baseTheme = _context$muiTheme.baseTheme, - datePicker = _context$muiTheme.datePicker; + var beforeElement = void 0; + var afterElement = void 0; - var labelColor = baseTheme.palette.textColor; - var buttonStateOpacity = 0; - var buttonStateTransform = 'scale(0)'; + if (beforeStyle) { + beforeElement = _react2.default.createElement(this.props.beforeElementType, { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.box, beforeStyle)), + key: '::before' + }); + } - if (hover || selected) { - labelColor = datePicker.selectTextColor; - buttonStateOpacity = selected ? 1 : 0.6; - buttonStateTransform = 'scale(1)'; - } else if ((0, _dateUtils.isEqualDate)(date, new Date())) { - labelColor = datePicker.color; - } + if (afterStyle) { + afterElement = _react2.default.createElement(this.props.afterElementType, { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.box, afterStyle)), + key: '::after' + }); + } - return { - root: { - boxSizing: 'border-box', - fontWeight: '400', - opacity: disabled && '0.4', - padding: '4px 0px', - position: 'relative', - WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) - width: 42 - }, - label: { - color: labelColor, - fontWeight: '400', - position: 'relative' - }, - buttonState: { - backgroundColor: datePicker.selectColor, - borderRadius: '50%', - height: 34, - left: 4, - opacity: buttonStateOpacity, - position: 'absolute', - top: 0, - transform: buttonStateTransform, - transition: _transitions2.default.easeOut(), - width: 34 + var children = [beforeElement, this.props.children, afterElement]; + + var props = other; + props.style = prepareStyles((0, _simpleAssign2.default)({}, this.props.style)); + + return _react2.default.createElement(this.props.elementType, props, children); } - }; -} + }]); + return BeforeAfterWrapper; +}(_react.Component); + +BeforeAfterWrapper.defaultProps = { + beforeElementType: 'div', + afterElementType: 'div', + elementType: 'div' +}; +BeforeAfterWrapper.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? BeforeAfterWrapper.propTypes = { + afterElementType: _react.PropTypes.string, + afterStyle: _react.PropTypes.object, + beforeElementType: _react.PropTypes.string, + beforeStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + elementType: _react.PropTypes.string, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = BeforeAfterWrapper; + +/***/ }), +/* 799 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var DayButton = function (_Component) { - (0, _inherits3.default)(DayButton, _Component); +var _Slider = __webpack_require__(800); - function DayButton() { - var _ref; +var _Slider2 = _interopRequireDefault(_Slider); - var _temp, _this, _ret; +var _createComponent = __webpack_require__(41); - (0, _classCallCheck3.default)(this, DayButton); +var _createComponent2 = _interopRequireDefault(_createComponent); - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +var _mapError = __webpack_require__(66); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DayButton.__proto__ || (0, _getPrototypeOf2.default)(DayButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - hover: false - }, _this.handleMouseEnter = function () { - if (!_this.props.disabled) { - _this.setState({ hover: true }); - } - }, _this.handleMouseLeave = function () { - if (!_this.props.disabled) { - _this.setState({ hover: false }); - } - }, _this.handleTouchTap = function (event) { - if (!_this.props.disabled && _this.props.onTouchTap) { - _this.props.onTouchTap(event, _this.props.date); - } - }, _this.handleKeyboardFocus = function (event, keyboardFocused) { - if (!_this.props.disabled && _this.props.onKeyboardFocus) { - _this.props.onKeyboardFocus(event, keyboardFocused, _this.props.date); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } +var _mapError2 = _interopRequireDefault(_mapError); - (0, _createClass3.default)(DayButton, [{ - key: 'render', - value: function render() { - var _props = this.props, - DateTimeFormat = _props.DateTimeFormat, - date = _props.date, - disabled = _props.disabled, - locale = _props.locale, - onTouchTap = _props.onTouchTap, - selected = _props.selected, - other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'date', 'disabled', 'locale', 'onTouchTap', 'selected']); - var prepareStyles = this.context.muiTheme.prepareStyles; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var styles = getStyles(this.props, this.context, this.state); +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - return date ? _react2.default.createElement( - _EnhancedButton2.default, - (0, _extends3.default)({}, other, { - disabled: disabled, - disableFocusRipple: true, - disableTouchRipple: true, - onKeyboardFocus: this.handleKeyboardFocus, - onMouseEnter: this.handleMouseEnter, - onMouseLeave: this.handleMouseLeave, - onTouchTap: this.handleTouchTap, - style: styles.root - }), - _react2.default.createElement('div', { style: prepareStyles(styles.buttonState) }), - _react2.default.createElement( - 'span', - { style: prepareStyles(styles.label) }, - new DateTimeFormat(locale, { - day: 'numeric' - }).format(date) - ) - ) : _react2.default.createElement('span', { style: prepareStyles(styles.root) }); +exports.default = (0, _createComponent2.default)(_Slider2.default, function (_ref) { + var _ref$input = _ref.input, + onDragStart = _ref$input.onDragStart, + _onChange = _ref$input.onChange, + inputProps = _objectWithoutProperties(_ref$input, ['onDragStart', 'onChange']), + onChangeFromField = _ref.onChange, + defaultValue = _ref.defaultValue, + props = _objectWithoutProperties(_ref, ['input', 'onChange', 'defaultValue']); + + return _extends({}, (0, _mapError2.default)(_extends({}, props, { input: inputProps }), 'error'), { + onChange: function onChange(event, value) { + _onChange(value); + if (onChangeFromField) { + onChangeFromField(value); + } } - }]); - return DayButton; -}(_react.Component); + }); +}); -DayButton.defaultProps = { - selected: false, - disabled: false -}; -DayButton.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? DayButton.propTypes = { - DateTimeFormat: _react.PropTypes.func.isRequired, - date: _react.PropTypes.object, - disabled: _react.PropTypes.bool, - locale: _react.PropTypes.string.isRequired, - onKeyboardFocus: _react.PropTypes.func, - onTouchTap: _react.PropTypes.func, - selected: _react.PropTypes.bool -} : void 0; -exports.default = DayButton; +/***/ }), +/* 800 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Slider = __webpack_require__(801); + +var _Slider2 = _interopRequireDefault(_Slider); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Slider2.default; /***/ }), /* 801 */ @@ -66032,6 +68566,10 @@ var _extends2 = __webpack_require__(7); var _extends3 = _interopRequireDefault(_extends2); +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -66052,502 +68590,931 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); +var _defineProperty2 = __webpack_require__(802); + +var _defineProperty3 = _interopRequireDefault(_defineProperty2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); +var _keycode = __webpack_require__(26); -var _reactDom2 = _interopRequireDefault(_reactDom); +var _keycode2 = _interopRequireDefault(_keycode); -var _YearButton = __webpack_require__(802); +var _warning = __webpack_require__(15); -var _YearButton2 = _interopRequireDefault(_YearButton); +var _warning2 = _interopRequireDefault(_warning); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _FocusRipple = __webpack_require__(204); + +var _FocusRipple2 = _interopRequireDefault(_FocusRipple); + +var _deprecatedPropType = __webpack_require__(803); -var _dateUtils = __webpack_require__(81); +var _deprecatedPropType2 = _interopRequireDefault(_deprecatedPropType); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var CalendarYear = function (_Component) { - (0, _inherits3.default)(CalendarYear, _Component); +/** + * Verifies min/max range. + * @param {Object} props Properties of the React component. + * @param {String} propName Name of the property to validate. + * @param {String} componentName Name of the component whose property is being validated. + * @returns {Object} Returns an Error if min >= max otherwise null. + */ +var minMaxPropType = function minMaxPropType(props, propName, componentName) { + for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { + rest[_key - 3] = arguments[_key]; + } - function CalendarYear() { - var _ref; + var error = _react.PropTypes.number.apply(_react.PropTypes, [props, propName, componentName].concat(rest)); + if (error !== null) { + return error; + } - var _temp, _this, _ret; + if (props.min >= props.max) { + var errorMsg = propName === 'min' ? 'min should be less than max' : 'max should be greater than min'; + return new Error(errorMsg); + } +}; - (0, _classCallCheck3.default)(this, CalendarYear); +/** + * Verifies value is within the min/max range. + * @param {Object} props Properties of the React component. + * @param {String} propName Name of the property to validate. + * @param {String} componentName Name of the component whose property is being validated. + * @returns {Object} Returns an Error if the value is not within the range otherwise null. + */ +var valueInRangePropType = function valueInRangePropType(props, propName, componentName) { + for (var _len2 = arguments.length, rest = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) { + rest[_key2 - 3] = arguments[_key2]; + } - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + var error = _react.PropTypes.number.apply(_react.PropTypes, [props, propName, componentName].concat(rest)); + if (error !== null) { + return error; + } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarYear.__proto__ || (0, _getPrototypeOf2.default)(CalendarYear)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapYear = function (event, year) { - if (_this.props.onTouchTapYear) { - _this.props.onTouchTapYear(event, year); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + var value = props[propName]; + if (value < props.min || props.max < value) { + return new Error(propName + ' should be within the range specified by min and max'); } +}; - (0, _createClass3.default)(CalendarYear, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.scrollToSelectedYear(); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate() { - this.scrollToSelectedYear(); - } - }, { - key: 'getYears', - value: function getYears() { - var _props = this.props, - DateTimeFormat = _props.DateTimeFormat, - locale = _props.locale, - minDate = _props.minDate, - maxDate = _props.maxDate, - selectedDate = _props.selectedDate; +var crossAxisProperty = { + x: 'height', + 'x-reverse': 'height', + y: 'width', + 'y-reverse': 'width' +}; +var crossAxisOffsetProperty = { + x: 'top', + 'x-reverse': 'top', + y: 'left', + 'y-reverse': 'left' +}; - var minYear = minDate.getFullYear(); - var maxYear = maxDate.getFullYear(); - var years = []; - var dateCheck = (0, _dateUtils.cloneDate)(selectedDate); +var mainAxisProperty = { + x: 'width', + 'x-reverse': 'width', + y: 'height', + 'y-reverse': 'height' +}; - for (var year = minYear; year <= maxYear; year++) { - dateCheck.setFullYear(year); - var selected = selectedDate.getFullYear() === year; - var selectedProps = {}; - if (selected) { - selectedProps.ref = 'selectedYearButton'; - } +var mainAxisMarginFromEnd = { + x: 'marginRight', + 'x-reverse': 'marginLeft', + y: 'marginTop', + 'y-reverse': 'marginBottom' +}; - var yearFormated = new DateTimeFormat(locale, { - year: 'numeric' - }).format(dateCheck); +var mainAxisMarginFromStart = { + x: 'marginLeft', + 'x-reverse': 'marginRight', + y: 'marginBottom', + 'y-reverse': 'marginTop' +}; - var yearButton = _react2.default.createElement( - _YearButton2.default, - (0, _extends3.default)({ - key: 'yb' + year, - onTouchTap: this.handleTouchTapYear, - selected: selected, - year: year - }, selectedProps), - yearFormated - ); +var mainAxisOffsetProperty = { + x: 'left', + 'x-reverse': 'right', + y: 'bottom', + 'y-reverse': 'top' +}; - years.push(yearButton); - } +var mainAxisClientProperty = { + x: 'clientWidth', + 'x-reverse': 'clientWidth', + y: 'clientHeight', + 'y-reverse': 'clientHeight' +}; - return years; +var mainAxisClientOffsetProperty = { + x: 'clientX', + 'x-reverse': 'clientX', + y: 'clientY', + 'y-reverse': 'clientY' +}; + +var reverseMainAxisOffsetProperty = { + x: 'right', + 'x-reverse': 'left', + y: 'top', + 'y-reverse': 'bottom' +}; + +var isMouseControlInverted = function isMouseControlInverted(axis) { + return axis === 'x-reverse' || axis === 'y'; +}; + +function getPercent(value, min, max) { + var percent = (value - min) / (max - min); + if (isNaN(percent)) { + percent = 0; + } + + return percent; +} + +var getStyles = function getStyles(props, context, state) { + var _slider, _track, _filledAndRemaining, _handle, _objectAssign2, _objectAssign3; + + var axis = props.axis, + disabled = props.disabled, + max = props.max, + min = props.min; + var _context$muiTheme$sli = context.muiTheme.slider, + handleColorZero = _context$muiTheme$sli.handleColorZero, + handleFillColor = _context$muiTheme$sli.handleFillColor, + handleSize = _context$muiTheme$sli.handleSize, + handleSizeDisabled = _context$muiTheme$sli.handleSizeDisabled, + handleSizeActive = _context$muiTheme$sli.handleSizeActive, + trackSize = _context$muiTheme$sli.trackSize, + trackColor = _context$muiTheme$sli.trackColor, + trackColorSelected = _context$muiTheme$sli.trackColorSelected, + rippleColor = _context$muiTheme$sli.rippleColor, + selectionColor = _context$muiTheme$sli.selectionColor; + + + var fillGutter = handleSize / 2; + var disabledGutter = trackSize + handleSizeDisabled / 2; + var calcDisabledSpacing = disabled ? ' - ' + disabledGutter + 'px' : ''; + var percent = getPercent(state.value, min, max); + + var styles = { + slider: (_slider = { + touchCallout: 'none', + userSelect: 'none', + cursor: 'default' + }, (0, _defineProperty3.default)(_slider, crossAxisProperty[axis], handleSizeActive), (0, _defineProperty3.default)(_slider, mainAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_slider, 'position', 'relative'), (0, _defineProperty3.default)(_slider, 'marginTop', 24), (0, _defineProperty3.default)(_slider, 'marginBottom', 48), _slider), + track: (_track = { + position: 'absolute' + }, (0, _defineProperty3.default)(_track, crossAxisOffsetProperty[axis], (handleSizeActive - trackSize) / 2), (0, _defineProperty3.default)(_track, mainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_track, mainAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_track, crossAxisProperty[axis], trackSize), _track), + filledAndRemaining: (_filledAndRemaining = { + position: 'absolute' + }, (0, _defineProperty3.default)(_filledAndRemaining, crossAxisOffsetProperty, 0), (0, _defineProperty3.default)(_filledAndRemaining, crossAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_filledAndRemaining, 'transition', _transitions2.default.easeOut(null, 'margin')), _filledAndRemaining), + handle: (_handle = { + boxSizing: 'border-box', + position: 'absolute', + cursor: 'pointer', + pointerEvents: 'inherit' + }, (0, _defineProperty3.default)(_handle, crossAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_handle, mainAxisOffsetProperty[axis], percent === 0 ? '0%' : percent * 100 + '%'), (0, _defineProperty3.default)(_handle, 'zIndex', 1), (0, _defineProperty3.default)(_handle, 'margin', { + x: trackSize / 2 + 'px 0 0 0', + 'x-reverse': trackSize / 2 + 'px 0 0 0', + y: '0 0 0 ' + trackSize / 2 + 'px', + 'y-reverse': '0 0 0 ' + trackSize / 2 + 'px' + }[axis]), (0, _defineProperty3.default)(_handle, 'width', handleSize), (0, _defineProperty3.default)(_handle, 'height', handleSize), (0, _defineProperty3.default)(_handle, 'backgroundColor', selectionColor), (0, _defineProperty3.default)(_handle, 'backgroundClip', 'padding-box'), (0, _defineProperty3.default)(_handle, 'border', '0px solid transparent'), (0, _defineProperty3.default)(_handle, 'borderRadius', '50%'), (0, _defineProperty3.default)(_handle, 'transform', { + x: 'translate(-50%, -50%)', + 'x-reverse': 'translate(50%, -50%)', + y: 'translate(-50%, 50%)', + 'y-reverse': 'translate(-50%, -50%)' + }[axis]), (0, _defineProperty3.default)(_handle, 'transition', _transitions2.default.easeOut('450ms', 'background') + ', ' + _transitions2.default.easeOut('450ms', 'border-color') + ', ' + _transitions2.default.easeOut('450ms', 'width') + ', ' + _transitions2.default.easeOut('450ms', 'height')), (0, _defineProperty3.default)(_handle, 'overflow', 'visible'), (0, _defineProperty3.default)(_handle, 'outline', 'none'), _handle), + handleWhenDisabled: { + boxSizing: 'content-box', + cursor: 'not-allowed', + backgroundColor: trackColor, + width: handleSizeDisabled, + height: handleSizeDisabled, + border: 'none' + }, + handleWhenPercentZero: { + border: trackSize + 'px solid ' + handleColorZero, + backgroundColor: handleFillColor, + boxShadow: 'none' + }, + handleWhenPercentZeroAndDisabled: { + cursor: 'not-allowed', + width: handleSizeDisabled, + height: handleSizeDisabled + }, + handleWhenPercentZeroAndFocused: { + border: trackSize + 'px solid ' + trackColorSelected + }, + handleWhenActive: { + width: handleSizeActive, + height: handleSizeActive + }, + ripple: { + height: handleSize, + width: handleSize, + overflow: 'visible' + }, + rippleWhenPercentZero: { + top: -trackSize, + left: -trackSize + }, + rippleInner: { + height: '300%', + width: '300%', + top: -handleSize, + left: -handleSize + }, + rippleColor: { + fill: percent === 0 ? handleColorZero : rippleColor } - }, { - key: 'scrollToSelectedYear', - value: function scrollToSelectedYear() { - if (this.refs.selectedYearButton === undefined) { - return; - } + }; + styles.filled = (0, _simpleAssign2.default)({}, styles.filledAndRemaining, (_objectAssign2 = {}, (0, _defineProperty3.default)(_objectAssign2, mainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_objectAssign2, 'backgroundColor', disabled ? trackColor : selectionColor), (0, _defineProperty3.default)(_objectAssign2, mainAxisMarginFromEnd[axis], fillGutter), (0, _defineProperty3.default)(_objectAssign2, mainAxisProperty[axis], 'calc(' + percent * 100 + '%' + calcDisabledSpacing + ')'), _objectAssign2)); + styles.remaining = (0, _simpleAssign2.default)({}, styles.filledAndRemaining, (_objectAssign3 = {}, (0, _defineProperty3.default)(_objectAssign3, reverseMainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_objectAssign3, 'backgroundColor', (state.hovered || state.focused) && !disabled ? trackColorSelected : trackColor), (0, _defineProperty3.default)(_objectAssign3, mainAxisMarginFromStart[axis], fillGutter), (0, _defineProperty3.default)(_objectAssign3, mainAxisProperty[axis], 'calc(' + (1 - percent) * 100 + '%' + calcDisabledSpacing + ')'), _objectAssign3)); - var container = _reactDom2.default.findDOMNode(this); - var yearButtonNode = _reactDom2.default.findDOMNode(this.refs.selectedYearButton); + return styles; +}; - var containerHeight = container.clientHeight; - var yearButtonNodeHeight = yearButtonNode.clientHeight || 32; +var Slider = function (_Component) { + (0, _inherits3.default)(Slider, _Component); - var scrollYOffset = yearButtonNode.offsetTop + yearButtonNodeHeight / 2 - containerHeight / 2; - container.scrollTop = scrollYOffset; + function Slider() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Slider); + + for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; } - }, { - key: 'render', - value: function render() { - var _context$muiTheme = this.context.muiTheme, - prepareStyles = _context$muiTheme.prepareStyles, - calendarYearBackgroundColor = _context$muiTheme.datePicker.calendarYearBackgroundColor; + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Slider.__proto__ || (0, _getPrototypeOf2.default)(Slider)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + active: false, + dragging: false, + focused: false, + hovered: false, + value: 0 + }, _this.track = null, _this.handle = null, _this.handleKeyDown = function (event) { + var _this$props = _this.props, + axis = _this$props.axis, + min = _this$props.min, + max = _this$props.max, + step = _this$props.step; + + + var action = void 0; + + switch ((0, _keycode2.default)(event)) { + case 'page down': + case 'down': + if (axis === 'y-reverse') { + action = 'increase'; + } else { + action = 'decrease'; + } + break; + case 'left': + if (axis === 'x-reverse') { + action = 'increase'; + } else { + action = 'decrease'; + } + break; + case 'page up': + case 'up': + if (axis === 'y-reverse') { + action = 'decrease'; + } else { + action = 'increase'; + } + break; + case 'right': + if (axis === 'x-reverse') { + action = 'decrease'; + } else { + action = 'increase'; + } + break; + case 'home': + action = 'min'; + break; + case 'end': + action = 'max'; + break; + } + + if (action) { + var newValue = void 0; + + // Cancel scroll + event.preventDefault(); + + switch (action) { + case 'decrease': + newValue = _this.state.value - step; + break; + case 'increase': + newValue = _this.state.value + step; + break; + case 'min': + newValue = min; + break; + case 'max': + newValue = max; + break; + } + + // We need to use toFixed() because of float point errors. + // For example, 0.01 + 0.06 = 0.06999999999999999 + newValue = parseFloat(newValue.toFixed(5)); - var styles = { - root: { - backgroundColor: calendarYearBackgroundColor, - height: 'inherit', - lineHeight: '35px', - overflowX: 'hidden', - overflowY: 'scroll', - position: 'relative' - }, - child: { - display: 'flex', - flexDirection: 'column', - justifyContent: 'center', - minHeight: '100%' + if (newValue > max) { + newValue = max; + } else if (newValue < min) { + newValue = min; } - }; - return _react2.default.createElement( - 'div', - { style: prepareStyles(styles.root) }, - _react2.default.createElement( - 'div', - { style: prepareStyles(styles.child) }, - this.getYears() - ) - ); - } - }]); - return CalendarYear; -}(_react.Component); + if (_this.state.value !== newValue) { + _this.setState({ + value: newValue + }); -CalendarYear.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? CalendarYear.propTypes = { - DateTimeFormat: _react.PropTypes.func.isRequired, - locale: _react.PropTypes.string.isRequired, - maxDate: _react.PropTypes.object.isRequired, - minDate: _react.PropTypes.object.isRequired, - onTouchTapYear: _react.PropTypes.func, - selectedDate: _react.PropTypes.object.isRequired, - wordings: _react.PropTypes.object -} : void 0; -exports.default = CalendarYear; + if (_this.props.onChange) { + _this.props.onChange(event, newValue); + } + } + } + }, _this.handleDragMouseMove = function (event) { + _this.onDragUpdate(event, 'mouse'); + }, _this.handleTouchMove = function (event) { + _this.onDragUpdate(event, 'touch'); + }, _this.handleMouseEnd = function (event) { + document.removeEventListener('mousemove', _this.handleDragMouseMove); + document.removeEventListener('mouseup', _this.handleMouseEnd); -/***/ }), -/* 802 */ -/***/ (function(module, exports, __webpack_require__) { + _this.onDragStop(event); + }, _this.handleTouchEnd = function (event) { + document.removeEventListener('touchmove', _this.handleTouchMove); + document.removeEventListener('touchup', _this.handleTouchEnd); + document.removeEventListener('touchend', _this.handleTouchEnd); + document.removeEventListener('touchcancel', _this.handleTouchEnd); -"use strict"; + _this.onDragStop(event); + }, _this.handleTouchStart = function (event) { + if (_this.props.disabled) { + return; + } + var position = void 0; + if (isMouseControlInverted(_this.props.axis)) { + position = _this.getTrackOffset() - event.touches[0][mainAxisClientOffsetProperty[_this.props.axis]]; + } else { + position = event.touches[0][mainAxisClientOffsetProperty[_this.props.axis]] - _this.getTrackOffset(); + } + _this.setValueFromPosition(event, position); -Object.defineProperty(exports, "__esModule", { - value: true -}); + document.addEventListener('touchmove', _this.handleTouchMove); + document.addEventListener('touchup', _this.handleTouchEnd); + document.addEventListener('touchend', _this.handleTouchEnd); + document.addEventListener('touchcancel', _this.handleTouchEnd); -var _extends2 = __webpack_require__(7); + _this.onDragStart(event); -var _extends3 = _interopRequireDefault(_extends2); + // Cancel scroll and context menu + event.preventDefault(); + }, _this.handleFocus = function (event) { + _this.setState({ + focused: true + }); -var _objectWithoutProperties2 = __webpack_require__(8); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleBlur = function (event) { + _this.setState({ + focused: false, + active: false + }); -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleMouseDown = function (event) { + if (_this.props.disabled) { + return; + } -var _getPrototypeOf = __webpack_require__(3); + var position = void 0; + if (isMouseControlInverted(_this.props.axis)) { + position = _this.getTrackOffset() - event[mainAxisClientOffsetProperty[_this.props.axis]]; + } else { + position = event[mainAxisClientOffsetProperty[_this.props.axis]] - _this.getTrackOffset(); + } + _this.setValueFromPosition(event, position); -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + document.addEventListener('mousemove', _this.handleDragMouseMove); + document.addEventListener('mouseup', _this.handleMouseEnd); -var _classCallCheck2 = __webpack_require__(1); + // Cancel text selection + event.preventDefault(); -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + // Set focus manually since we called preventDefault() + _this.handle.focus(); -var _createClass2 = __webpack_require__(2); + _this.onDragStart(event); + }, _this.handleMouseUp = function () { + if (!_this.props.disabled) { + _this.setState({ + active: false + }); + } + }, _this.handleMouseEnter = function () { + _this.setState({ + hovered: true + }); + }, _this.handleMouseLeave = function () { + _this.setState({ + hovered: false + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } -var _createClass3 = _interopRequireDefault(_createClass2); + (0, _createClass3.default)(Slider, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + valueProp = _props.value, + defaultValue = _props.defaultValue, + min = _props.min, + max = _props.max; -var _possibleConstructorReturn2 = __webpack_require__(4); -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + var value = valueProp; + if (value === undefined) { + value = defaultValue !== undefined ? defaultValue : min; + } -var _inherits2 = __webpack_require__(5); + if (value > max) { + value = max; + } else if (value < min) { + value = min; + } -var _inherits3 = _interopRequireDefault(_inherits2); + this.setState({ + value: value + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== undefined && !this.state.dragging) { + this.setState({ + value: nextProps.value + }); + } + } + }, { + key: 'getValue', + value: function getValue() { + false ? (0, _warning2.default)(false, 'Material-UI Slider: getValue() method is deprecated.\n Use the onChange callbacks instead.\n It will be removed with v0.17.0.') : void 0; -var _react = __webpack_require__(0); + return this.state.value; + } + }, { + key: 'clearValue', + value: function clearValue() { + false ? (0, _warning2.default)(false, 'Material-UI Slider: clearValue() method is deprecated.\n Use the value property to control the component instead.\n It will be removed with v0.17.0.') : void 0; -var _react2 = _interopRequireDefault(_react); + this.setState({ + value: this.props.min + }); + } + }, { + key: 'getTrackOffset', + value: function getTrackOffset() { + return this.track.getBoundingClientRect()[mainAxisOffsetProperty[this.props.axis]]; + } + }, { + key: 'onDragStart', + value: function onDragStart(event) { + this.setState({ + dragging: true, + active: true + }); -var _EnhancedButton = __webpack_require__(59); + if (this.props.onDragStart) { + this.props.onDragStart(event); + } + } + }, { + key: 'onDragUpdate', + value: function onDragUpdate(event, type) { + var _this2 = this; -var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + if (this.dragRunning) { + return; + } + this.dragRunning = true; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + requestAnimationFrame(function () { + _this2.dragRunning = false; -function getStyles(props, context, state) { - var selected = props.selected, - year = props.year; - var _context$muiTheme = context.muiTheme, - baseTheme = _context$muiTheme.baseTheme, - datePicker = _context$muiTheme.datePicker; - var hover = state.hover; + var source = type === 'touch' ? event.touches[0] : event; + var position = void 0; + if (isMouseControlInverted(_this2.props.axis)) { + position = _this2.getTrackOffset() - source[mainAxisClientOffsetProperty[_this2.props.axis]]; + } else { + position = source[mainAxisClientOffsetProperty[_this2.props.axis]] - _this2.getTrackOffset(); + } - return { - root: { - boxSizing: 'border-box', - color: year === new Date().getFullYear() && datePicker.color, - display: 'block', - fontSize: 14, - margin: '0 auto', - position: 'relative', - textAlign: 'center', - lineHeight: 'inherit', - WebkitTapHighlightColor: 'rgba(0,0,0,0)' }, - label: { - alignSelf: 'center', - color: hover || selected ? datePicker.color : baseTheme.palette.textColor, - fontSize: selected ? 26 : 17, - fontWeight: hover ? 450 : selected ? 500 : 400, - position: 'relative', - top: -1 + if (!_this2.props.disabled) { + _this2.setValueFromPosition(event, position); + } + }); } - }; -} - -var YearButton = function (_Component) { - (0, _inherits3.default)(YearButton, _Component); + }, { + key: 'onDragStop', + value: function onDragStop(event) { + this.setState({ + dragging: false, + active: false + }); - function YearButton() { - var _ref; + if (this.props.onDragStop) { + this.props.onDragStop(event); + } + } + }, { + key: 'setValueFromPosition', + value: function setValueFromPosition(event, position) { + var positionMax = this.track[mainAxisClientProperty[this.props.axis]]; + if (position < 0) { + position = 0; + } else if (position > positionMax) { + position = positionMax; + } - var _temp, _this, _ret; + var _props2 = this.props, + step = _props2.step, + min = _props2.min, + max = _props2.max; - (0, _classCallCheck3.default)(this, YearButton); - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + var value = void 0; + value = position / positionMax * (max - min); + value = Math.round(value / step) * step + min; + value = parseFloat(value.toFixed(5)); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = YearButton.__proto__ || (0, _getPrototypeOf2.default)(YearButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - hover: false - }, _this.handleMouseEnter = function () { - _this.setState({ hover: true }); - }, _this.handleMouseLeave = function () { - _this.setState({ hover: false }); - }, _this.handleTouchTap = function (event) { - if (_this.props.onTouchTap) { - _this.props.onTouchTap(event, _this.props.year); + if (value > max) { + value = max; + } else if (value < min) { + value = min; } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - (0, _createClass3.default)(YearButton, [{ + if (this.state.value !== value) { + this.setState({ + value: value + }); + + if (this.props.onChange) { + this.props.onChange(event, value); + } + } + } + }, { key: 'render', value: function render() { - var _props = this.props, - children = _props.children, - className = _props.className, - onTouchTap = _props.onTouchTap, - selected = _props.selected, - year = _props.year, - other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'onTouchTap', 'selected', 'year']); + var _this3 = this; + + var _props3 = this.props, + axis = _props3.axis, + description = _props3.description, + disabled = _props3.disabled, + disableFocusRipple = _props3.disableFocusRipple, + error = _props3.error, + max = _props3.max, + min = _props3.min, + name = _props3.name, + onBlur = _props3.onBlur, + onChange = _props3.onChange, + onDragStart = _props3.onDragStart, + onDragStop = _props3.onDragStop, + onFocus = _props3.onFocus, + required = _props3.required, + sliderStyle = _props3.sliderStyle, + step = _props3.step, + style = _props3.style, + other = (0, _objectWithoutProperties3.default)(_props3, ['axis', 'description', 'disabled', 'disableFocusRipple', 'error', 'max', 'min', 'name', 'onBlur', 'onChange', 'onDragStart', 'onDragStop', 'onFocus', 'required', 'sliderStyle', 'step', 'style']); + var _state = this.state, + active = _state.active, + focused = _state.focused, + hovered = _state.hovered, + value = _state.value; var prepareStyles = this.context.muiTheme.prepareStyles; var styles = getStyles(this.props, this.context, this.state); + var percent = getPercent(value, min, max); + + var handleStyles = {}; + if (percent === 0) { + handleStyles = (0, _simpleAssign2.default)({}, styles.handle, styles.handleWhenPercentZero, active && styles.handleWhenActive, (hovered || focused) && !disabled && styles.handleWhenPercentZeroAndFocused, disabled && styles.handleWhenPercentZeroAndDisabled); + } else { + handleStyles = (0, _simpleAssign2.default)({}, styles.handle, active && styles.handleWhenActive, disabled && styles.handleWhenDisabled); + } + + var rippleStyle = (0, _simpleAssign2.default)({}, styles.ripple, percent === 0 && styles.rippleWhenPercentZero); return _react2.default.createElement( - _EnhancedButton2.default, - (0, _extends3.default)({}, other, { - disableFocusRipple: true, - disableTouchRipple: true, - onMouseEnter: this.handleMouseEnter, - onMouseLeave: this.handleMouseLeave, - onTouchTap: this.handleTouchTap, - style: styles.root - }), + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, style)) }), _react2.default.createElement( 'span', - { style: prepareStyles(styles.label) }, - children - ) + null, + description + ), + _react2.default.createElement( + 'span', + null, + error + ), + _react2.default.createElement( + 'div', + { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.slider, sliderStyle)), + onFocus: this.handleFocus, + onBlur: this.handleBlur, + onMouseDown: this.handleMouseDown, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onMouseUp: this.handleMouseUp, + onTouchStart: this.handleTouchStart, + onKeyDown: !disabled && this.handleKeyDown + }, + _react2.default.createElement( + 'div', + { ref: function ref(node) { + return _this3.track = node; + }, style: prepareStyles(styles.track) }, + _react2.default.createElement('div', { style: prepareStyles(styles.filled) }), + _react2.default.createElement('div', { style: prepareStyles(styles.remaining) }), + _react2.default.createElement( + 'div', + { + ref: function ref(node) { + return _this3.handle = node; + }, + style: prepareStyles(handleStyles), + tabIndex: 0 + }, + !disabled && !disableFocusRipple && _react2.default.createElement(_FocusRipple2.default, { + style: rippleStyle, + innerStyle: styles.rippleInner, + show: (hovered || focused) && !active, + color: styles.rippleColor.fill + }) + ) + ) + ), + _react2.default.createElement('input', { + type: 'hidden', + name: name, + value: value, + required: required, + min: min, + max: max, + step: step + }) ); } }]); - return YearButton; + return Slider; }(_react.Component); -YearButton.defaultProps = { - selected: false +Slider.defaultProps = { + axis: 'x', + disabled: false, + disableFocusRipple: false, + max: 1, + min: 0, + required: true, + step: 0.01, + style: {} }; -YearButton.contextTypes = { +Slider.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? YearButton.propTypes = { - children: _react.PropTypes.node.isRequired, + false ? Slider.propTypes = { + /** + * The axis on which the slider will slide. + */ + axis: _react.PropTypes.oneOf(['x', 'x-reverse', 'y', 'y-reverse']), + /** + * The default value of the slider. + */ + defaultValue: valueInRangePropType, + /** + * Describe the slider. + */ + description: (0, _deprecatedPropType2.default)(_react.PropTypes.node, 'Use a sibling node element instead. It will be removed with v0.17.0.'), + /** + * Disables focus ripple if set to true. + */ + disableFocusRipple: _react.PropTypes.bool, + /** + * If true, the slider will not be interactable. + */ + disabled: _react.PropTypes.bool, + /** + * An error message for the slider. + */ + error: (0, _deprecatedPropType2.default)(_react.PropTypes.node, 'Use a sibling node element instead. It will be removed with v0.17.0.'), + /** + * The maximum value the slider can slide to on + * a scale from 0 to 1 inclusive. Cannot be equal to min. + */ + max: minMaxPropType, + /** + * The minimum value the slider can slide to on a scale + * from 0 to 1 inclusive. Cannot be equal to max. + */ + min: minMaxPropType, + /** + * The name of the slider. Behaves like the name attribute + * of an input element. + */ + name: _react.PropTypes.string, + /** @ignore */ + onBlur: _react.PropTypes.func, /** - * The css class name of the root element. + * Callback function that is fired when the slider's value changed. + * + * @param {object} event KeyDown event targeting the slider. + * @param {number} newValue The new value of the slider. */ - className: _react.PropTypes.string, - onTouchTap: _react.PropTypes.func, - selected: _react.PropTypes.bool, - year: _react.PropTypes.number.isRequired + onChange: _react.PropTypes.func, + /** + * Callback function that is fired when the slider has begun to move. + * + * @param {object} event MouseDown or TouchStart event targeting the slider. + */ + onDragStart: _react.PropTypes.func, + /** + * Callback function that is fired when the slide has stopped moving. + * + * @param {object} event MouseEnd or TouchEnd event targeting the slider. + */ + onDragStop: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Whether or not the slider is required in a form. + */ + required: _react.PropTypes.bool, + /** + * Override the inline-styles of the inner slider element. + */ + sliderStyle: _react.PropTypes.object, + /** + * The granularity the slider can step through values. + */ + step: _react.PropTypes.number, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The value of the slider. + */ + value: valueInRangePropType } : void 0; -exports.default = YearButton; +exports.default = Slider; /***/ }), -/* 803 */ +/* 802 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _getPrototypeOf = __webpack_require__(3); +exports.__esModule = true; -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _defineProperty = __webpack_require__(196); -var _classCallCheck2 = __webpack_require__(1); +var _defineProperty2 = _interopRequireDefault(_defineProperty); -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _createClass2 = __webpack_require__(2); +exports.default = function (obj, key, value) { + if (key in obj) { + (0, _defineProperty2.default)(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } -var _createClass3 = _interopRequireDefault(_createClass2); + return obj; +}; -var _possibleConstructorReturn2 = __webpack_require__(4); +/***/ }), +/* 803 */ +/***/ (function(module, exports, __webpack_require__) { -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); +"use strict"; -var _inherits2 = __webpack_require__(5); -var _inherits3 = _interopRequireDefault(_inherits2); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = deprecated; -var _react = __webpack_require__(0); +var _warning = __webpack_require__(15); -var _react2 = _interopRequireDefault(_react); +var _warning2 = _interopRequireDefault(_warning); -var _IconButton = __webpack_require__(95); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _IconButton2 = _interopRequireDefault(_IconButton); +var warned = {}; /** + * This module is taken from https://github.com/react-bootstrap/react-prop-types. + * It's not a dependency to reduce build size / install time. + * It should be pretty stable. + */ +function deprecated(validator, reason) { + return function validate(props, propName, componentName, location, propFullName) { + var componentNameSafe = componentName || '<>'; + var propFullNameSafe = propFullName || propName; -var _chevronLeft = __webpack_require__(804); + if (props[propName] != null) { + var messageKey = componentName + '.' + propName; -var _chevronLeft2 = _interopRequireDefault(_chevronLeft); + false ? (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason)) : void 0; -var _chevronRight = __webpack_require__(805); + warned[messageKey] = true; + } -var _chevronRight2 = _interopRequireDefault(_chevronRight); + for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { + args[_key - 5] = arguments[_key]; + } -var _SlideIn = __webpack_require__(203); + return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args)); + }; +} -var _SlideIn2 = _interopRequireDefault(_SlideIn); +/***/ }), +/* 804 */ +/***/ (function(module, exports, __webpack_require__) { -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +"use strict"; -var styles = { - root: { - display: 'flex', - justifyContent: 'space-between', - backgroundColor: 'inherit', - height: 48 - }, - titleDiv: { - fontSize: 14, - fontWeight: '500', - textAlign: 'center', - width: '100%' - }, - titleText: { - height: 'inherit', - paddingTop: 12 - } -}; -var CalendarToolbar = function (_Component) { - (0, _inherits3.default)(CalendarToolbar, _Component); +Object.defineProperty(exports, "__esModule", { + value: true +}); - function CalendarToolbar() { - var _ref; +var _TextField = __webpack_require__(99); - var _temp, _this, _ret; +var _TextField2 = _interopRequireDefault(_TextField); - (0, _classCallCheck3.default)(this, CalendarToolbar); +var _createComponent = __webpack_require__(41); - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +var _createComponent2 = _interopRequireDefault(_createComponent); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarToolbar.__proto__ || (0, _getPrototypeOf2.default)(CalendarToolbar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - transitionDirection: 'up' - }, _this.handleTouchTapPrevMonth = function () { - if (_this.props.onMonthChange) { - _this.props.onMonthChange(-1); - } - }, _this.handleTouchTapNextMonth = function () { - if (_this.props.onMonthChange) { - _this.props.onMonthChange(1); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } +var _mapError = __webpack_require__(66); - (0, _createClass3.default)(CalendarToolbar, [{ - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (nextProps.displayDate !== this.props.displayDate) { - var direction = nextProps.displayDate > this.props.displayDate ? 'left' : 'right'; - this.setState({ - transitionDirection: direction - }); - } - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - DateTimeFormat = _props.DateTimeFormat, - locale = _props.locale, - displayDate = _props.displayDate; +var _mapError2 = _interopRequireDefault(_mapError); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var dateTimeFormatted = new DateTimeFormat(locale, { - month: 'long', - year: 'numeric' - }).format(displayDate); +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - return _react2.default.createElement( - 'div', - { style: styles.root }, - _react2.default.createElement( - _IconButton2.default, - { - disabled: !this.props.prevMonth, - onTouchTap: this.handleTouchTapPrevMonth - }, - _react2.default.createElement(_chevronLeft2.default, null) - ), - _react2.default.createElement( - _SlideIn2.default, - { - direction: this.state.transitionDirection, - style: styles.titleDiv - }, - _react2.default.createElement( - 'div', - { key: dateTimeFormatted, style: styles.titleText }, - dateTimeFormatted - ) - ), - _react2.default.createElement( - _IconButton2.default, - { - disabled: !this.props.nextMonth, - onTouchTap: this.handleTouchTapNextMonth - }, - _react2.default.createElement(_chevronRight2.default, null) - ) - ); - } - }]); - return CalendarToolbar; -}(_react.Component); +exports.default = (0, _createComponent2.default)(_TextField2.default, function (_ref) { + var defaultValue = _ref.defaultValue, + props = _objectWithoutProperties(_ref, ['defaultValue']); -CalendarToolbar.defaultProps = { - nextMonth: true, - prevMonth: true -}; - false ? CalendarToolbar.propTypes = { - DateTimeFormat: _react.PropTypes.func.isRequired, - displayDate: _react.PropTypes.object.isRequired, - locale: _react.PropTypes.string.isRequired, - nextMonth: _react.PropTypes.bool, - onMonthChange: _react.PropTypes.func, - prevMonth: _react.PropTypes.bool -} : void 0; -exports.default = CalendarToolbar; + return (0, _mapError2.default)(props); +}); /***/ }), -/* 804 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -66557,35 +69524,44 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _react = __webpack_require__(0); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _react2 = _interopRequireDefault(_react); +var _TimePicker = __webpack_require__(806); + +var _TimePicker2 = _interopRequireDefault(_TimePicker); -var _pure = __webpack_require__(25); +var _createComponent = __webpack_require__(41); -var _pure2 = _interopRequireDefault(_pure); +var _createComponent2 = _interopRequireDefault(_createComponent); -var _SvgIcon = __webpack_require__(26); +var _mapError = __webpack_require__(66); -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); +var _mapError2 = _interopRequireDefault(_mapError); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var NavigationChevronLeft = function NavigationChevronLeft(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z' }) - ); -}; -NavigationChevronLeft = (0, _pure2.default)(NavigationChevronLeft); -NavigationChevronLeft.displayName = 'NavigationChevronLeft'; -NavigationChevronLeft.muiName = 'SvgIcon'; +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -exports.default = NavigationChevronLeft; +exports.default = (0, _createComponent2.default)(_TimePicker2.default, function (_ref) { + var _ref$input = _ref.input, + onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onBlur']), + defaultTime = _ref.defaultTime, + _onChange = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'defaultTime', 'onChange']); + + return _extends({}, inputProps, (0, _mapError2.default)(props), { + onChange: function onChange(event, value) { + inputProps.onChange(value); + if (_onChange) { + _onChange(value); + } + } + }); +}); /***/ }), -/* 805 */ +/* 806 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -66594,36 +69570,18 @@ exports.default = NavigationChevronLeft; Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = undefined; -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _pure = __webpack_require__(25); - -var _pure2 = _interopRequireDefault(_pure); - -var _SvgIcon = __webpack_require__(26); +var _TimePicker = __webpack_require__(807); -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); +var _TimePicker2 = _interopRequireDefault(_TimePicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var NavigationChevronRight = function NavigationChevronRight(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z' }) - ); -}; -NavigationChevronRight = (0, _pure2.default)(NavigationChevronRight); -NavigationChevronRight.displayName = 'NavigationChevronRight'; -NavigationChevronRight.muiName = 'SvgIcon'; - -exports.default = NavigationChevronRight; +exports.default = _TimePicker2.default; /***/ }), -/* 806 */ +/* 807 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -66669,115 +69627,260 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); - -var _reactDom2 = _interopRequireDefault(_reactDom); +var _TimePickerDialog = __webpack_require__(808); -var _autoPrefix = __webpack_require__(94); +var _TimePickerDialog2 = _interopRequireDefault(_TimePickerDialog); -var _autoPrefix2 = _interopRequireDefault(_autoPrefix); +var _TextField = __webpack_require__(99); -var _transitions = __webpack_require__(10); +var _TextField2 = _interopRequireDefault(_TextField); -var _transitions2 = _interopRequireDefault(_transitions); +var _timeUtils = __webpack_require__(101); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var SlideInChild = function (_Component) { - (0, _inherits3.default)(SlideInChild, _Component); +var emptyTime = new Date(); +emptyTime.setHours(0); +emptyTime.setMinutes(0); +emptyTime.setSeconds(0); +emptyTime.setMilliseconds(0); - function SlideInChild() { - (0, _classCallCheck3.default)(this, SlideInChild); - return (0, _possibleConstructorReturn3.default)(this, (SlideInChild.__proto__ || (0, _getPrototypeOf2.default)(SlideInChild)).apply(this, arguments)); +var TimePicker = function (_Component) { + (0, _inherits3.default)(TimePicker, _Component); + + function TimePicker() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TimePicker); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimePicker.__proto__ || (0, _getPrototypeOf2.default)(TimePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + time: null, + dialogTime: new Date() + }, _this.handleAcceptDialog = function (time) { + _this.setState({ + time: time + }); + if (_this.props.onChange) _this.props.onChange(null, time); + }, _this.handleFocusInput = function (event) { + event.target.blur(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleTouchTapInput = function (event) { + event.preventDefault(); + + if (!_this.props.disabled) { + _this.openDialog(); + } + + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(SlideInChild, [{ - key: 'componentWillUnmount', - value: function componentWillUnmount() { - clearTimeout(this.enterTimer); - clearTimeout(this.leaveTimer); + (0, _createClass3.default)(TimePicker, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + time: this.isControlled() ? this.getControlledTime() : this.props.defaultTime + }); } }, { - key: 'componentWillEnter', - value: function componentWillEnter(callback) { - var style = _reactDom2.default.findDOMNode(this).style; - var x = this.props.direction === 'left' ? '100%' : this.props.direction === 'right' ? '-100%' : '0'; - var y = this.props.direction === 'up' ? '100%' : this.props.direction === 'down' ? '-100%' : '0'; + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== this.props.value) { + this.setState({ + time: this.getControlledTime(nextProps) + }); + } + } - style.opacity = '0'; - _autoPrefix2.default.set(style, 'transform', 'translate(' + x + ', ' + y + ')'); + /** + * Alias for `openDialog()` for an api consistent with TextField. + */ - this.enterTimer = setTimeout(callback, this.props.enterDelay); + }, { + key: 'focus', + value: function focus() { + this.openDialog(); } }, { - key: 'componentDidEnter', - value: function componentDidEnter() { - var style = _reactDom2.default.findDOMNode(this).style; - style.opacity = '1'; - _autoPrefix2.default.set(style, 'transform', 'translate(0,0)'); + key: 'openDialog', + value: function openDialog() { + this.setState({ + dialogTime: this.state.time + }); + this.refs.dialogWindow.show(); } }, { - key: 'componentWillLeave', - value: function componentWillLeave(callback) { - var style = _reactDom2.default.findDOMNode(this).style; - var direction = this.props.getLeaveDirection(); - var x = direction === 'left' ? '-100%' : direction === 'right' ? '100%' : '0'; - var y = direction === 'up' ? '-100%' : direction === 'down' ? '100%' : '0'; - - style.opacity = '0'; - _autoPrefix2.default.set(style, 'transform', 'translate(' + x + ', ' + y + ')'); + key: 'isControlled', + value: function isControlled() { + return this.props.value !== null; + } + }, { + key: 'getControlledTime', + value: function getControlledTime() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; - this.leaveTimer = setTimeout(callback, 450); + var result = null; + if (props.value instanceof Date) { + result = props.value; + } + return result; } }, { key: 'render', value: function render() { var _props = this.props, - children = _props.children, - enterDelay = _props.enterDelay, - getLeaveDirection = _props.getLeaveDirection, + autoOk = _props.autoOk, + cancelLabel = _props.cancelLabel, + defaultTime = _props.defaultTime, + dialogBodyStyle = _props.dialogBodyStyle, + dialogStyle = _props.dialogStyle, + format = _props.format, + okLabel = _props.okLabel, + onFocus = _props.onFocus, + onTouchTap = _props.onTouchTap, + onShow = _props.onShow, + onDismiss = _props.onDismiss, + pedantic = _props.pedantic, style = _props.style, - other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'getLeaveDirection', 'style']); + textFieldStyle = _props.textFieldStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['autoOk', 'cancelLabel', 'defaultTime', 'dialogBodyStyle', 'dialogStyle', 'format', 'okLabel', 'onFocus', 'onTouchTap', 'onShow', 'onDismiss', 'pedantic', 'style', 'textFieldStyle']); var prepareStyles = this.context.muiTheme.prepareStyles; + var time = this.state.time; - var mergedRootStyles = (0, _simpleAssign2.default)({}, { - position: 'absolute', - height: '100%', - width: '100%', - top: 0, - left: 0, - transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) - }, style); - return _react2.default.createElement( 'div', - (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }), - children + { style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + style: textFieldStyle, + ref: 'input', + value: time === emptyTime ? null : (0, _timeUtils.formatTime)(time, format, pedantic), + onFocus: this.handleFocusInput, + onTouchTap: this.handleTouchTapInput + })), + _react2.default.createElement(_TimePickerDialog2.default, { + ref: 'dialogWindow', + bodyStyle: dialogBodyStyle, + initialTime: this.state.dialogTime, + onAccept: this.handleAcceptDialog, + onShow: onShow, + onDismiss: onDismiss, + format: format, + okLabel: okLabel, + cancelLabel: cancelLabel, + autoOk: autoOk, + style: dialogStyle + }) ); } }]); - return SlideInChild; + return TimePicker; }(_react.Component); -SlideInChild.defaultProps = { - enterDelay: 0 +TimePicker.defaultProps = { + autoOk: false, + cancelLabel: 'Cancel', + defaultTime: null, + disabled: false, + format: 'ampm', + okLabel: 'OK', + pedantic: false, + style: {}, + value: null }; -SlideInChild.contextTypes = { +TimePicker.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? SlideInChild.propTypes = { - children: _react.PropTypes.node, - direction: _react.PropTypes.string, - enterDelay: _react.PropTypes.number, - // This callback is needed bacause the direction could change when leaving the DOM - getLeaveDirection: _react.PropTypes.func.isRequired, - style: _react.PropTypes.object + false ? TimePicker.propTypes = { + /** + * If true, automatically accept and close the picker on set minutes. + */ + autoOk: _react.PropTypes.bool, + /** + * Override the label of the 'Cancel' button. + */ + cancelLabel: _react.PropTypes.node, + /** + * The initial time value of the TimePicker. + */ + defaultTime: _react.PropTypes.object, + /** + * Override the inline-styles of TimePickerDialog's body element. + */ + dialogBodyStyle: _react.PropTypes.object, + /** + * Override the inline-styles of TimePickerDialog's root element. + */ + dialogStyle: _react.PropTypes.object, + /** + * If true, the TimePicker is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Tells the component to display the picker in `ampm` (12hr) format or `24hr` format. + */ + format: _react.PropTypes.oneOf(['ampm', '24hr']), + /** + * Override the label of the 'OK' button. + */ + okLabel: _react.PropTypes.node, + /** + * Callback function that is fired when the time value changes. The time value is passed in a Date Object. + * Since there is no particular event associated with the change the first argument will always be null + * and the second argument will be the new Date instance. + */ + onChange: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker dialog is dismissed. + */ + onDismiss: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker `TextField` gains focus. + */ + onFocus: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker dialog is shown. + */ + onShow: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker is tapped or clicked. + */ + onTouchTap: _react.PropTypes.func, + /** + * If true, uses ("noon" / "midnight") instead of ("12 a.m." / "12 p.m."). + * + * It's technically more correct to refer to "12 noon" and "12 midnight" rather than "12 a.m." and "12 p.m." + * and it avoids confusion between different locales. By default (for compatibility reasons) TimePicker uses + * ("12 a.m." / "12 p.m."). + */ + pedantic: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of TimePicker's TextField element. + */ + textFieldStyle: _react.PropTypes.object, + /** + * Sets the time for the Time Picker programmatically. + */ + value: _react.PropTypes.object } : void 0; -exports.default = SlideInChild; +exports.default = TimePicker; /***/ }), -/* 807 */ +/* 808 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -66815,212 +69918,178 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(10); +var _reactEventListener = __webpack_require__(40); -var _transitions2 = _interopRequireDefault(_transitions); +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -var _SlideIn = __webpack_require__(203); +var _keycode = __webpack_require__(26); -var _SlideIn2 = _interopRequireDefault(_SlideIn); +var _keycode2 = _interopRequireDefault(_keycode); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _Clock = __webpack_require__(809); -function getStyles(props, context, state) { - var datePicker = context.muiTheme.datePicker; - var selectedYear = state.selectedYear; +var _Clock2 = _interopRequireDefault(_Clock); - var isLandscape = props.mode === 'landscape'; +var _Dialog = __webpack_require__(134); - var styles = { - root: { - width: isLandscape ? 165 : '100%', - height: isLandscape ? 330 : 'auto', - float: isLandscape ? 'left' : 'none', - fontWeight: 700, - display: 'inline-block', - backgroundColor: datePicker.selectColor, - borderTopLeftRadius: 2, - borderTopRightRadius: isLandscape ? 0 : 2, - borderBottomLeftRadius: isLandscape ? 2 : 0, - color: datePicker.textColor, - padding: 20, - boxSizing: 'border-box' - }, - monthDay: { - display: 'block', - fontSize: 36, - lineHeight: '36px', - height: props.mode === 'landscape' ? '100%' : 38, - opacity: selectedYear ? 0.7 : 1, - transition: _transitions2.default.easeOut(), - width: '100%', - fontWeight: '500' - }, - monthDayTitle: { - cursor: !selectedYear ? 'default' : 'pointer', - width: '100%', - display: 'block' - }, - year: { - margin: 0, - fontSize: 16, - fontWeight: '500', - lineHeight: '16px', - height: 16, - opacity: selectedYear ? 1 : 0.7, - transition: _transitions2.default.easeOut(), - marginBottom: 10 - }, - yearTitle: { - cursor: props.disableYearSelection ? 'not-allowed' : !selectedYear ? 'pointer' : 'default' - } - }; +var _Dialog2 = _interopRequireDefault(_Dialog); - return styles; -} +var _FlatButton = __webpack_require__(100); -var DateDisplay = function (_Component) { - (0, _inherits3.default)(DateDisplay, _Component); +var _FlatButton2 = _interopRequireDefault(_FlatButton); - function DateDisplay() { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TimePickerDialog = function (_Component) { + (0, _inherits3.default)(TimePickerDialog, _Component); + + function TimePickerDialog() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, DateDisplay); + (0, _classCallCheck3.default)(this, TimePickerDialog); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DateDisplay.__proto__ || (0, _getPrototypeOf2.default)(DateDisplay)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - selectedYear: false, - transitionDirection: 'up' - }, _this.handleTouchTapMonthDay = function () { - if (_this.props.onTouchTapMonthDay && _this.state.selectedYear) { - _this.props.onTouchTapMonthDay(); - } - - _this.setState({ selectedYear: false }); - }, _this.handleTouchTapYear = function () { - if (_this.props.onTouchTapYear && !_this.props.disableYearSelection && !_this.state.selectedYear) { - _this.props.onTouchTapYear(); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(TimePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.handleRequestClose = function () { + _this.dismiss(); + }, _this.handleTouchTapCancel = function () { + _this.dismiss(); + }, _this.handleTouchTapOK = function () { + if (_this.props.onAccept) { + _this.props.onAccept(_this.refs.clock.getSelectedTime()); } - - if (!_this.props.disableYearSelection) { - _this.setState({ selectedYear: true }); + _this.setState({ + open: false + }); + }, _this.handleKeyUp = function (event) { + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.handleTouchTapOK(); + break; } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(DateDisplay, [{ - key: 'componentWillMount', - value: function componentWillMount() { - if (!this.props.monthDaySelected) { - this.setState({ selectedYear: true }); - } + (0, _createClass3.default)(TimePickerDialog, [{ + key: 'show', + value: function show() { + if (this.props.onShow && !this.state.open) this.props.onShow(); + this.setState({ + open: true + }); } }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (nextProps.selectedDate !== this.props.selectedDate) { - var direction = nextProps.selectedDate > this.props.selectedDate ? 'up' : 'down'; - this.setState({ - transitionDirection: direction - }); - } - - if (nextProps.monthDaySelected !== undefined) { - this.setState({ - selectedYear: !nextProps.monthDaySelected - }); - } + key: 'dismiss', + value: function dismiss() { + if (this.props.onDismiss && this.state.open) this.props.onDismiss(); + this.setState({ + open: false + }); } }, { key: 'render', value: function render() { var _props = this.props, - DateTimeFormat = _props.DateTimeFormat, - disableYearSelection = _props.disableYearSelection, - locale = _props.locale, - mode = _props.mode, - monthDaySelected = _props.monthDaySelected, - onTouchTapMonthDay = _props.onTouchTapMonthDay, - onTouchTapYear = _props.onTouchTapYear, - selectedDate = _props.selectedDate, + bodyStyle = _props.bodyStyle, + initialTime = _props.initialTime, + onAccept = _props.onAccept, + format = _props.format, + autoOk = _props.autoOk, + okLabel = _props.okLabel, + cancelLabel = _props.cancelLabel, style = _props.style, - other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'disableYearSelection', 'locale', 'mode', 'monthDaySelected', 'onTouchTapMonthDay', 'onTouchTapYear', 'selectedDate', 'style']); - var prepareStyles = this.context.muiTheme.prepareStyles; + other = (0, _objectWithoutProperties3.default)(_props, ['bodyStyle', 'initialTime', 'onAccept', 'format', 'autoOk', 'okLabel', 'cancelLabel', 'style']); - var styles = getStyles(this.props, this.context, this.state); - var year = new DateTimeFormat(locale, { - year: 'numeric' - }).format(selectedDate); + var styles = { + root: { + fontSize: 14, + color: this.context.muiTheme.timePicker.clockColor + }, + dialogContent: { + width: 280 + }, + body: { + padding: 0 + } + }; - var dateTime = new DateTimeFormat(locale, { - month: 'short', - weekday: 'short', - day: '2-digit' - }).format(selectedDate); + var actions = [_react2.default.createElement(_FlatButton2.default, { + key: 0, + label: cancelLabel, + primary: true, + onTouchTap: this.handleTouchTapCancel + }), _react2.default.createElement(_FlatButton2.default, { + key: 1, + label: okLabel, + primary: true, + onTouchTap: this.handleTouchTapOK + })]; + + var onClockChangeMinutes = autoOk === true ? this.handleTouchTapOK : undefined; + var open = this.state.open; return _react2.default.createElement( - 'div', - (0, _extends3.default)({}, other, { style: prepareStyles(styles.root, style) }), - _react2.default.createElement( - _SlideIn2.default, - { style: styles.year, direction: this.state.transitionDirection }, - _react2.default.createElement( - 'div', - { key: year, style: styles.yearTitle, onTouchTap: this.handleTouchTapYear }, - year - ) - ), - _react2.default.createElement( - _SlideIn2.default, - { style: styles.monthDay, direction: this.state.transitionDirection }, - _react2.default.createElement( - 'div', - { - key: dateTime, - onTouchTap: this.handleTouchTapMonthDay, - style: styles.monthDayTitle - }, - dateTime - ) - ) + _Dialog2.default, + (0, _extends3.default)({}, other, { + style: (0, _simpleAssign2.default)(styles.root, style), + bodyStyle: (0, _simpleAssign2.default)(styles.body, bodyStyle), + actions: actions, + contentStyle: styles.dialogContent, + repositionOnUpdate: false, + open: open, + onRequestClose: this.handleRequestClose + }), + open && _react2.default.createElement(_reactEventListener2.default, { target: 'window', onKeyUp: this.handleKeyUp }), + open && _react2.default.createElement(_Clock2.default, { + ref: 'clock', + format: format, + initialTime: initialTime, + onChangeMinutes: onClockChangeMinutes + }) ); } }]); - return DateDisplay; + return TimePickerDialog; }(_react.Component); -DateDisplay.defaultProps = { - disableYearSelection: false, - monthDaySelected: true +TimePickerDialog.defaultProps = { + okLabel: 'OK', + cancelLabel: 'Cancel' }; -DateDisplay.contextTypes = { +TimePickerDialog.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? DateDisplay.propTypes = { - DateTimeFormat: _react.PropTypes.func.isRequired, - disableYearSelection: _react.PropTypes.bool, - locale: _react.PropTypes.string.isRequired, - mode: _react.PropTypes.oneOf(['portrait', 'landscape']), - monthDaySelected: _react.PropTypes.bool, - onTouchTapMonthDay: _react.PropTypes.func, - onTouchTapYear: _react.PropTypes.func, - selectedDate: _react.PropTypes.object.isRequired, + false ? TimePickerDialog.propTypes = { + autoOk: _react.PropTypes.bool, + bodyStyle: _react.PropTypes.object, + cancelLabel: _react.PropTypes.node, + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialTime: _react.PropTypes.object, + okLabel: _react.PropTypes.node, + onAccept: _react.PropTypes.func, + onDismiss: _react.PropTypes.func, + onShow: _react.PropTypes.func, style: _react.PropTypes.object } : void 0; -exports.default = DateDisplay; +exports.default = TimePickerDialog; /***/ }), -/* 808 */ +/* 809 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67030,14 +70099,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -67058,600 +70119,514 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); +var _TimeDisplay = __webpack_require__(810); -var _reactDom2 = _interopRequireDefault(_reactDom); +var _TimeDisplay2 = _interopRequireDefault(_TimeDisplay); -var _reactEventListener = __webpack_require__(42); +var _ClockHours = __webpack_require__(816); -var _reactEventListener2 = _interopRequireDefault(_reactEventListener); +var _ClockHours2 = _interopRequireDefault(_ClockHours); -var _keycode = __webpack_require__(30); +var _ClockMinutes = __webpack_require__(817); -var _keycode2 = _interopRequireDefault(_keycode); +var _ClockMinutes2 = _interopRequireDefault(_ClockMinutes); -var _transitions = __webpack_require__(10); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _transitions2 = _interopRequireDefault(_transitions); +var Clock = function (_Component) { + (0, _inherits3.default)(Clock, _Component); -var _Overlay = __webpack_require__(319); + function Clock() { + var _ref; -var _Overlay2 = _interopRequireDefault(_Overlay); + var _temp, _this, _ret; -var _RenderToLayer = __webpack_require__(322); + (0, _classCallCheck3.default)(this, Clock); -var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -var _Paper = __webpack_require__(34); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Clock.__proto__ || (0, _getPrototypeOf2.default)(Clock)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + selectedTime: null, + mode: 'hour' + }, _this.setMode = function (mode) { + setTimeout(function () { + _this.setState({ + mode: mode + }); + }, 100); + }, _this.handleSelectAffix = function (affix) { + if (affix === _this.getAffix()) return; -var _Paper2 = _interopRequireDefault(_Paper); + var hours = _this.state.selectedTime.getHours(); -var _reactAddonsTransitionGroup = __webpack_require__(128); + if (affix === 'am') { + _this.handleChangeHours(hours - 12, affix); + return; + } -var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + _this.handleChangeHours(hours + 12, affix); + }, _this.handleChangeHours = function (hours, finished) { + var time = new Date(_this.state.selectedTime); + var affix = void 0; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + if (typeof finished === 'string') { + affix = finished; + finished = undefined; + } + if (!affix) { + affix = _this.getAffix(); + } + if (affix === 'pm' && hours < 12) { + hours += 12; + } -var TransitionItem = function (_Component) { - (0, _inherits3.default)(TransitionItem, _Component); + time.setHours(hours); + _this.setState({ + selectedTime: time + }); - function TransitionItem() { - var _ref; + if (finished) { + setTimeout(function () { + _this.setState({ + mode: 'minute' + }); - var _temp, _this, _ret; + var onChangeHours = _this.props.onChangeHours; - (0, _classCallCheck3.default)(this, TransitionItem); + if (onChangeHours) { + onChangeHours(time); + } + }, 100); + } + }, _this.handleChangeMinutes = function (minutes, finished) { + var time = new Date(_this.state.selectedTime); + time.setMinutes(minutes); + _this.setState({ + selectedTime: time + }); - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + var onChangeMinutes = _this.props.onChangeMinutes; - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TransitionItem.__proto__ || (0, _getPrototypeOf2.default)(TransitionItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - style: {} + if (onChangeMinutes && finished) { + setTimeout(function () { + onChangeMinutes(time); + }, 0); + } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(TransitionItem, [{ - key: 'componentWillUnmount', - value: function componentWillUnmount() { - clearTimeout(this.enterTimeout); - clearTimeout(this.leaveTimeout); - } - }, { - key: 'componentWillEnter', - value: function componentWillEnter(callback) { - this.componentWillAppear(callback); + (0, _createClass3.default)(Clock, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + selectedTime: this.props.initialTime || new Date() + }); } }, { - key: 'componentWillAppear', - value: function componentWillAppear(callback) { - var spacing = this.context.muiTheme.baseTheme.spacing; + key: 'getAffix', + value: function getAffix() { + if (this.props.format !== 'ampm') return ''; - this.setState({ - style: { - opacity: 1, - transform: 'translate(0, ' + spacing.desktopKeylineIncrement + 'px)' - } - }); + var hours = this.state.selectedTime.getHours(); + if (hours < 12) { + return 'am'; + } - this.enterTimeout = setTimeout(callback, 450); // matches transition duration + return 'pm'; } }, { - key: 'componentWillLeave', - value: function componentWillLeave(callback) { - this.setState({ - style: { - opacity: 0, - transform: 'translate(0, 0)' + key: 'getSelectedTime', + value: function getSelectedTime() { + return this.state.selectedTime; + } + }, { + key: 'render', + value: function render() { + var clock = null; + + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + timePicker = _context$muiTheme.timePicker; + + + var styles = { + root: { + userSelect: 'none' + }, + container: { + height: 280, + padding: 10, + position: 'relative', + boxSizing: 'content-box' + }, + circle: { + position: 'absolute', + top: 20, + width: 260, + height: 260, + borderRadius: '100%', + backgroundColor: timePicker.clockCircleColor } - }); - - this.leaveTimeout = setTimeout(callback, 450); // matches transition duration - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - style = _props.style, - children = _props.children, - other = (0, _objectWithoutProperties3.default)(_props, ['style', 'children']); - var prepareStyles = this.context.muiTheme.prepareStyles; + }; + if (this.state.mode === 'hour') { + clock = _react2.default.createElement(_ClockHours2.default, { + key: 'hours', + format: this.props.format, + onChange: this.handleChangeHours, + initialHours: this.state.selectedTime.getHours() + }); + } else { + clock = _react2.default.createElement(_ClockMinutes2.default, { + key: 'minutes', + onChange: this.handleChangeMinutes, + initialMinutes: this.state.selectedTime.getMinutes() + }); + } return _react2.default.createElement( 'div', - (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, this.state.style, style)) }), - children + { style: prepareStyles(styles.root) }, + _react2.default.createElement(_TimeDisplay2.default, { + selectedTime: this.state.selectedTime, + mode: this.state.mode, + format: this.props.format, + affix: this.getAffix(), + onSelectAffix: this.handleSelectAffix, + onSelectHour: this.setMode.bind(this, 'hour'), + onSelectMin: this.setMode.bind(this, 'minute') + }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.container) }, + _react2.default.createElement('div', { style: prepareStyles(styles.circle) }), + clock + ) ); } }]); - return TransitionItem; + return Clock; }(_react.Component); -TransitionItem.contextTypes = { +Clock.defaultProps = { + initialTime: new Date() +}; +Clock.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? TransitionItem.propTypes = { - children: _react.PropTypes.node, - style: _react.PropTypes.object + false ? Clock.propTypes = { + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialTime: _react.PropTypes.object, + onChangeHours: _react.PropTypes.func, + onChangeMinutes: _react.PropTypes.func } : void 0; +exports.default = Clock; +/***/ }), +/* 810 */ +/***/ (function(module, exports, __webpack_require__) { -function getStyles(props, context) { - var autoScrollBodyContent = props.autoScrollBodyContent, - open = props.open; - var _context$muiTheme = context.muiTheme, - _context$muiTheme$bas = _context$muiTheme.baseTheme, - spacing = _context$muiTheme$bas.spacing, - palette = _context$muiTheme$bas.palette, - dialog = _context$muiTheme.dialog, - zIndex = _context$muiTheme.zIndex; +"use strict"; - var gutter = spacing.desktopGutter; - var borderScroll = '1px solid ' + palette.borderColor; +Object.defineProperty(exports, "__esModule", { + value: true +}); - return { - root: { - position: 'fixed', - boxSizing: 'border-box', - WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) - zIndex: zIndex.dialog, - top: 0, - left: open ? 0 : -10000, - width: '100%', - height: '100%', - transition: open ? _transitions2.default.easeOut('0ms', 'left', '0ms') : _transitions2.default.easeOut('0ms', 'left', '450ms') - }, - content: { - boxSizing: 'border-box', - WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) - transition: _transitions2.default.easeOut(), - position: 'relative', - width: '75%', - maxWidth: spacing.desktopKeylineIncrement * 12, - margin: '0 auto', - zIndex: zIndex.dialog - }, - actionsContainer: { - boxSizing: 'border-box', - WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) - padding: 8, - width: '100%', - textAlign: 'right', - marginTop: autoScrollBodyContent ? -1 : 0, - borderTop: autoScrollBodyContent ? borderScroll : 'none' - }, - overlay: { - zIndex: zIndex.dialogOverlay - }, - title: { - margin: 0, - padding: gutter + 'px ' + gutter + 'px 20px ' + gutter + 'px', - color: palette.textColor, - fontSize: dialog.titleFontSize, - lineHeight: '32px', - fontWeight: 400, - marginBottom: autoScrollBodyContent ? -1 : 0, - borderBottom: autoScrollBodyContent ? borderScroll : 'none' - }, - body: { - fontSize: dialog.bodyFontSize, - color: dialog.bodyColor, - padding: (props.title ? 0 : gutter) + 'px ' + gutter + 'px ' + gutter + 'px', - boxSizing: 'border-box', - overflowY: autoScrollBodyContent ? 'auto' : 'hidden' - } - }; -} +var _extends2 = __webpack_require__(7); -var DialogInline = function (_Component2) { - (0, _inherits3.default)(DialogInline, _Component2); +var _extends3 = _interopRequireDefault(_extends2); - function DialogInline() { - var _ref2; +var _slicedToArray2 = __webpack_require__(334); - var _temp2, _this2, _ret2; +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); - (0, _classCallCheck3.default)(this, DialogInline); +var _objectWithoutProperties2 = __webpack_require__(8); - for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - return _ret2 = (_temp2 = (_this2 = (0, _possibleConstructorReturn3.default)(this, (_ref2 = DialogInline.__proto__ || (0, _getPrototypeOf2.default)(DialogInline)).call.apply(_ref2, [this].concat(args))), _this2), _this2.handleTouchTapOverlay = function () { - _this2.requestClose(false); - }, _this2.handleKeyUp = function (event) { - if ((0, _keycode2.default)(event) === 'esc') { - _this2.requestClose(false); - } - }, _this2.handleResize = function () { - _this2.positionDialog(); - }, _temp2), (0, _possibleConstructorReturn3.default)(_this2, _ret2); - } +var _getPrototypeOf = __webpack_require__(3); - (0, _createClass3.default)(DialogInline, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.positionDialog(); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate() { - this.positionDialog(); - } - }, { - key: 'positionDialog', - value: function positionDialog() { - var _props2 = this.props, - actions = _props2.actions, - autoDetectWindowHeight = _props2.autoDetectWindowHeight, - autoScrollBodyContent = _props2.autoScrollBodyContent, - bodyStyle = _props2.bodyStyle, - open = _props2.open, - repositionOnUpdate = _props2.repositionOnUpdate, - title = _props2.title; +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _classCallCheck2 = __webpack_require__(1); - if (!open) { - return; - } +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - var clientHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; - var container = _reactDom2.default.findDOMNode(this); - var dialogWindow = _reactDom2.default.findDOMNode(this.refs.dialogWindow); - var dialogContent = _reactDom2.default.findDOMNode(this.refs.dialogContent); - var minPaddingTop = 16; +var _createClass2 = __webpack_require__(2); - // Reset the height in case the window was resized. - dialogWindow.style.height = ''; - dialogContent.style.height = ''; +var _createClass3 = _interopRequireDefault(_createClass2); - var dialogWindowHeight = dialogWindow.offsetHeight; - var paddingTop = (clientHeight - dialogWindowHeight) / 2 - 64; - if (paddingTop < minPaddingTop) paddingTop = minPaddingTop; +var _possibleConstructorReturn2 = __webpack_require__(4); - // Vertically center the dialog window, but make sure it doesn't - // transition to that position. - if (repositionOnUpdate || !container.style.paddingTop) { - container.style.paddingTop = paddingTop + 'px'; - } +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - // Force a height if the dialog is taller than clientHeight - if (autoDetectWindowHeight || autoScrollBodyContent) { - var styles = getStyles(this.props, this.context); - styles.body = (0, _simpleAssign2.default)(styles.body, bodyStyle); - var maxDialogContentHeight = clientHeight - 2 * 64; +var _inherits2 = __webpack_require__(5); - if (title) maxDialogContentHeight -= dialogContent.previousSibling.offsetHeight; +var _inherits3 = _interopRequireDefault(_inherits2); - if (_react2.default.Children.count(actions)) { - maxDialogContentHeight -= dialogContent.nextSibling.offsetHeight; - } +var _simpleAssign = __webpack_require__(6); - dialogContent.style.maxHeight = maxDialogContentHeight + 'px'; +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TimeDisplay = function (_Component) { + (0, _inherits3.default)(TimeDisplay, _Component); + + function TimeDisplay() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TimeDisplay); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimeDisplay.__proto__ || (0, _getPrototypeOf2.default)(TimeDisplay)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + transitionDirection: 'up' + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TimeDisplay, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.selectedTime !== this.props.selectedTime) { + var direction = nextProps.selectedTime > this.props.selectedTime ? 'up' : 'down'; + + this.setState({ + transitionDirection: direction + }); } } }, { - key: 'requestClose', - value: function requestClose(buttonClicked) { - if (!buttonClicked && this.props.modal) { - return; - } + key: 'sanitizeTime', + value: function sanitizeTime() { + var hour = this.props.selectedTime.getHours(); + var min = this.props.selectedTime.getMinutes().toString(); - if (this.props.onRequestClose) { - this.props.onRequestClose(!!buttonClicked); + if (this.props.format === 'ampm') { + hour %= 12; + hour = hour || 12; } + + hour = hour.toString(); + if (hour.length < 2) hour = '0' + hour; + if (min.length < 2) min = '0' + min; + + return [hour, min]; } }, { key: 'render', value: function render() { - var _props3 = this.props, - actions = _props3.actions, - actionsContainerClassName = _props3.actionsContainerClassName, - actionsContainerStyle = _props3.actionsContainerStyle, - bodyClassName = _props3.bodyClassName, - bodyStyle = _props3.bodyStyle, - children = _props3.children, - className = _props3.className, - contentClassName = _props3.contentClassName, - contentStyle = _props3.contentStyle, - overlayClassName = _props3.overlayClassName, - overlayStyle = _props3.overlayStyle, - open = _props3.open, - titleClassName = _props3.titleClassName, - titleStyle = _props3.titleStyle, - title = _props3.title, - style = _props3.style; - var prepareStyles = this.context.muiTheme.prepareStyles; + var _props = this.props, + affix = _props.affix, + format = _props.format, + mode = _props.mode, + onSelectAffix = _props.onSelectAffix, + onSelectHour = _props.onSelectHour, + onSelectMin = _props.onSelectMin, + selectedTime = _props.selectedTime, + other = (0, _objectWithoutProperties3.default)(_props, ['affix', 'format', 'mode', 'onSelectAffix', 'onSelectHour', 'onSelectMin', 'selectedTime']); + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + timePicker = _context$muiTheme.timePicker; - var styles = getStyles(this.props, this.context); - styles.root = (0, _simpleAssign2.default)(styles.root, style); - styles.content = (0, _simpleAssign2.default)(styles.content, contentStyle); - styles.body = (0, _simpleAssign2.default)(styles.body, bodyStyle); - styles.actionsContainer = (0, _simpleAssign2.default)(styles.actionsContainer, actionsContainerStyle); - styles.overlay = (0, _simpleAssign2.default)(styles.overlay, overlayStyle); - styles.title = (0, _simpleAssign2.default)(styles.title, titleStyle); + var styles = { + root: { + padding: '14px 0', + borderTopLeftRadius: 2, + borderTopRightRadius: 2, + backgroundColor: timePicker.headerColor, + color: timePicker.textColor + }, + text: { + margin: '6px 0', + lineHeight: '58px', + height: 58, + fontSize: 58, + display: 'flex', + justifyContent: 'center', + alignItems: 'baseline' + }, + time: { + margin: '0 10px' + }, + affix: { + flex: 1, + position: 'relative', + lineHeight: '17px', + height: 17, + fontSize: 17 + }, + affixTop: { + position: 'absolute', + top: -20, + left: 0 + }, + clickable: { + cursor: 'pointer' + }, + inactive: { + opacity: 0.7 + } + }; - var actionsContainer = _react2.default.Children.count(actions) > 0 && _react2.default.createElement( - 'div', - { className: actionsContainerClassName, style: prepareStyles(styles.actionsContainer) }, - _react2.default.Children.toArray(actions) - ); + var _sanitizeTime = this.sanitizeTime(), + _sanitizeTime2 = (0, _slicedToArray3.default)(_sanitizeTime, 2), + hour = _sanitizeTime2[0], + min = _sanitizeTime2[1]; - var titleElement = title; - if (_react2.default.isValidElement(title)) { - titleElement = _react2.default.cloneElement(title, { - className: title.props.className || titleClassName, - style: prepareStyles((0, _simpleAssign2.default)(styles.title, title.props.style)) - }); - } else if (typeof title === 'string') { - titleElement = _react2.default.createElement( - 'h3', - { className: titleClassName, style: prepareStyles(styles.title) }, - title - ); + var buttons = []; + if (format === 'ampm') { + buttons = [_react2.default.createElement( + 'div', + { + key: 'pm', + style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, affix === 'pm' ? {} : styles.inactive)), + onTouchTap: function onTouchTap() { + return onSelectAffix('pm'); + } + }, + 'PM' + ), _react2.default.createElement( + 'div', + { + key: 'am', + style: prepareStyles((0, _simpleAssign2.default)({}, styles.affixTop, styles.clickable, affix === 'am' ? {} : styles.inactive)), + onTouchTap: function onTouchTap() { + return onSelectAffix('am'); + } + }, + 'AM' + )]; } return _react2.default.createElement( 'div', - { className: className, style: prepareStyles(styles.root) }, - open && _react2.default.createElement(_reactEventListener2.default, { - target: 'window', - onKeyUp: this.handleKeyUp, - onResize: this.handleResize - }), + (0, _extends3.default)({}, other, { style: prepareStyles(styles.root) }), _react2.default.createElement( - _reactAddonsTransitionGroup2.default, - { - component: 'div', - ref: 'dialogWindow', - transitionAppear: true, - transitionAppearTimeout: 450, - transitionEnter: true, - transitionEnterTimeout: 450 - }, - open && _react2.default.createElement( - TransitionItem, - { - className: contentClassName, - style: styles.content - }, + 'div', + { style: prepareStyles(styles.text) }, + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.affix)) }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.time) }, _react2.default.createElement( - _Paper2.default, - { zDepth: 4 }, - titleElement, - _react2.default.createElement( - 'div', - { - ref: 'dialogContent', - className: bodyClassName, - style: prepareStyles(styles.body) - }, - children - ), - actionsContainer - ) - ) - ), - _react2.default.createElement(_Overlay2.default, { - show: open, - className: overlayClassName, - style: styles.overlay, - onTouchTap: this.handleTouchTapOverlay - }) - ); - } - }]); - return DialogInline; -}(_react.Component); - -DialogInline.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? DialogInline.propTypes = { - actions: _react.PropTypes.node, - actionsContainerClassName: _react.PropTypes.string, - actionsContainerStyle: _react.PropTypes.object, - autoDetectWindowHeight: _react.PropTypes.bool, - autoScrollBodyContent: _react.PropTypes.bool, - bodyClassName: _react.PropTypes.string, - bodyStyle: _react.PropTypes.object, - children: _react.PropTypes.node, - className: _react.PropTypes.string, - contentClassName: _react.PropTypes.string, - contentStyle: _react.PropTypes.object, - modal: _react.PropTypes.bool, - onRequestClose: _react.PropTypes.func, - open: _react.PropTypes.bool.isRequired, - overlayClassName: _react.PropTypes.string, - overlayStyle: _react.PropTypes.object, - repositionOnUpdate: _react.PropTypes.bool, - style: _react.PropTypes.object, - title: _react.PropTypes.node, - titleClassName: _react.PropTypes.string, - titleStyle: _react.PropTypes.object -} : void 0; - -var Dialog = function (_Component3) { - (0, _inherits3.default)(Dialog, _Component3); - - function Dialog() { - var _ref3; - - var _temp3, _this3, _ret3; - - (0, _classCallCheck3.default)(this, Dialog); - - for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - args[_key3] = arguments[_key3]; - } - - return _ret3 = (_temp3 = (_this3 = (0, _possibleConstructorReturn3.default)(this, (_ref3 = Dialog.__proto__ || (0, _getPrototypeOf2.default)(Dialog)).call.apply(_ref3, [this].concat(args))), _this3), _this3.renderLayer = function () { - return _react2.default.createElement(DialogInline, _this3.props); - }, _temp3), (0, _possibleConstructorReturn3.default)(_this3, _ret3); - } - - (0, _createClass3.default)(Dialog, [{ - key: 'render', - value: function render() { - return _react2.default.createElement(_RenderToLayer2.default, { render: this.renderLayer, open: true, useLayerForClickAway: false }); + 'span', + { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, mode === 'hour' ? {} : styles.inactive)), + onTouchTap: onSelectHour + }, + hour + ), + _react2.default.createElement( + 'span', + null, + ':' + ), + _react2.default.createElement( + 'span', + { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, mode === 'minute' ? {} : styles.inactive)), + onTouchTap: onSelectMin + }, + min + ) + ), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.affix)) }, + buttons + ) + ) + ); } }]); - return Dialog; + return TimeDisplay; }(_react.Component); -Dialog.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired +TimeDisplay.defaultProps = { + affix: '', + mode: 'hour' }; -Dialog.defaultProps = { - autoDetectWindowHeight: true, - autoScrollBodyContent: false, - modal: false, - repositionOnUpdate: true +TimeDisplay.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired }; - false ? Dialog.propTypes = { - /** - * Action buttons to display below the Dialog content (`children`). - * This property accepts either a React element, or an array of React elements. - */ - actions: _react.PropTypes.node, - /** - * The `className` to add to the actions container's root element. - */ - actionsContainerClassName: _react.PropTypes.string, - /** - * Overrides the inline-styles of the actions container's root element. - */ - actionsContainerStyle: _react.PropTypes.object, - /** - * If set to true, the height of the `Dialog` will be auto detected. A max height - * will be enforced so that the content does not extend beyond the viewport. - */ - autoDetectWindowHeight: _react.PropTypes.bool, - /** - * If set to true, the body content of the `Dialog` will be scrollable. - */ - autoScrollBodyContent: _react.PropTypes.bool, - /** - * The `className` to add to the content's root element under the title. - */ - bodyClassName: _react.PropTypes.string, - /** - * Overrides the inline-styles of the content's root element under the title. - */ - bodyStyle: _react.PropTypes.object, - /** - * The contents of the `Dialog`. - */ - children: _react.PropTypes.node, - /** - * The css class name of the root element. - */ - className: _react.PropTypes.string, - /** - * The `className` to add to the content container. - */ - contentClassName: _react.PropTypes.string, - /** - * Overrides the inline-styles of the content container. - */ - contentStyle: _react.PropTypes.object, - /** - * Force the user to use one of the actions in the `Dialog`. - * Clicking outside the `Dialog` will not trigger the `onRequestClose`. - */ - modal: _react.PropTypes.bool, - /** - * Fired when the `Dialog` is requested to be closed by a click outside the `Dialog` or on the buttons. - * - * @param {bool} buttonClicked Determines whether a button click triggered this request. - */ - onRequestClose: _react.PropTypes.func, - /** - * Controls whether the Dialog is opened or not. - */ - open: _react.PropTypes.bool.isRequired, - /** - * The `className` to add to the `Overlay` component that is rendered behind the `Dialog`. - */ - overlayClassName: _react.PropTypes.string, - /** - * Overrides the inline-styles of the `Overlay` component that is rendered behind the `Dialog`. - */ - overlayStyle: _react.PropTypes.object, - /** - * Determines whether the `Dialog` should be repositioned when it's contents are updated. - */ - repositionOnUpdate: _react.PropTypes.bool, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - /** - * The title to display on the `Dialog`. Could be number, string, element or an array containing these types. - */ - title: _react.PropTypes.node, - /** - * The `className` to add to the title's root container element. - */ - titleClassName: _react.PropTypes.string, - /** - * Overrides the inline-styles of the title's root container element. - */ - titleStyle: _react.PropTypes.object + false ? TimeDisplay.propTypes = { + affix: _react.PropTypes.oneOf(['', 'pm', 'am']), + format: _react.PropTypes.oneOf(['ampm', '24hr']), + mode: _react.PropTypes.oneOf(['hour', 'minute']), + onSelectAffix: _react.PropTypes.func, + onSelectHour: _react.PropTypes.func, + onSelectMin: _react.PropTypes.func, + selectedTime: _react.PropTypes.object.isRequired } : void 0; -exports.default = Dialog; +exports.default = TimeDisplay; /***/ }), -/* 809 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - +module.exports = { "default": __webpack_require__(812), __esModule: true }; -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _RadioButton = __webpack_require__(325); - -var _createComponent = __webpack_require__(43); +/***/ }), +/* 812 */ +/***/ (function(module, exports, __webpack_require__) { -var _createComponent2 = _interopRequireDefault(_createComponent); +__webpack_require__(128); +__webpack_require__(94); +module.exports = __webpack_require__(813); -var _mapError = __webpack_require__(60); +/***/ }), +/* 813 */ +/***/ (function(module, exports, __webpack_require__) { -var _mapError2 = _interopRequireDefault(_mapError); +var classof = __webpack_require__(198) + , ITERATOR = __webpack_require__(24)('iterator') + , Iterators = __webpack_require__(83); +module.exports = __webpack_require__(18).isIterable = function(it){ + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + || Iterators.hasOwnProperty(classof(O)); +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/***/ }), +/* 814 */ +/***/ (function(module, exports, __webpack_require__) { -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } +__webpack_require__(128); +__webpack_require__(94); +module.exports = __webpack_require__(815); -var mapValueToValueSelected = function mapValueToValueSelected(_ref, errorProp) { - var inputProps = _objectWithoutProperties(_ref.input, []), - props = _objectWithoutProperties(_ref, ['input']); +/***/ }), +/* 815 */ +/***/ (function(module, exports, __webpack_require__) { - return (0, _mapError2.default)(_extends({}, props, { - input: _extends({}, inputProps, { valueSelected: inputProps.value }) - }), errorProp); +var anObject = __webpack_require__(35) + , get = __webpack_require__(197); +module.exports = __webpack_require__(18).getIterator = function(it){ + var iterFn = get(it); + if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); }; -exports.default = (0, _createComponent2.default)(_RadioButton.RadioButtonGroup, mapValueToValueSelected); - /***/ }), -/* 810 */ +/* 816 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67661,14 +70636,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -67689,322 +70656,221 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(10); - -var _transitions2 = _interopRequireDefault(_transitions); +var _reactDom = __webpack_require__(16); -var _EnhancedSwitch = __webpack_require__(202); +var _reactDom2 = _interopRequireDefault(_reactDom); -var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); +var _ClockNumber = __webpack_require__(336); -var _radioButtonUnchecked = __webpack_require__(811); +var _ClockNumber2 = _interopRequireDefault(_ClockNumber); -var _radioButtonUnchecked2 = _interopRequireDefault(_radioButtonUnchecked); +var _ClockPointer = __webpack_require__(337); -var _radioButtonChecked = __webpack_require__(812); +var _ClockPointer2 = _interopRequireDefault(_ClockPointer); -var _radioButtonChecked2 = _interopRequireDefault(_radioButtonChecked); +var _timeUtils = __webpack_require__(101); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props, context) { - var radioButton = context.muiTheme.radioButton; - - - return { - icon: { - height: radioButton.size, - width: radioButton.size - }, - target: { - transition: _transitions2.default.easeOut(), - position: 'absolute', - opacity: 1, - transform: 'scale(1)', - fill: radioButton.borderColor - }, - fill: { - position: 'absolute', - opacity: 1, - transform: 'scale(0)', - transformOrigin: '50% 50%', - transition: _transitions2.default.easeOut(), - fill: radioButton.checkedColor - }, - targetWhenChecked: { - opacity: 0, - transform: 'scale(0)' - }, - fillWhenChecked: { - opacity: 1, - transform: 'scale(1)' - }, - targetWhenDisabled: { - fill: radioButton.disabledColor - }, - fillWhenDisabled: { - fill: radioButton.disabledColor - }, - label: { - color: props.disabled ? radioButton.labelDisabledColor : radioButton.labelColor - }, - ripple: { - color: props.checked ? radioButton.checkedColor : radioButton.borderColor - } - }; -} - -var RadioButton = function (_Component) { - (0, _inherits3.default)(RadioButton, _Component); +var ClockHours = function (_Component) { + (0, _inherits3.default)(ClockHours, _Component); - function RadioButton() { + function ClockHours() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, RadioButton); + (0, _classCallCheck3.default)(this, ClockHours); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RadioButton.__proto__ || (0, _getPrototypeOf2.default)(RadioButton)).call.apply(_ref, [this].concat(args))), _this), _this.handleSwitch = function (event) { - if (_this.props.onCheck) { - _this.props.onCheck(event, _this.props.value); - } + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockHours.__proto__ || (0, _getPrototypeOf2.default)(ClockHours)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) { + event.preventDefault(); + _this.setClock(event.nativeEvent, true); + }, _this.handleMove = function (event) { + event.preventDefault(); + if (_this.isMousePressed(event) !== 1) return; + _this.setClock(event.nativeEvent, false); + }, _this.handleTouchMove = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], false); + }, _this.handleTouchEnd = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], true); }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - // Only called when selected, not when unselected. - - - (0, _createClass3.default)(RadioButton, [{ - key: 'isChecked', - value: function isChecked() { - return this.refs.enhancedSwitch.isSwitched(); - } + (0, _createClass3.default)(ClockHours, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var clockElement = _reactDom2.default.findDOMNode(this.refs.mask); - // Use RadioButtonGroup.setSelectedValue(newSelectionValue) to set a - // RadioButton's checked value. + this.center = { + x: clockElement.offsetWidth / 2, + y: clockElement.offsetHeight / 2 + }; - }, { - key: 'setChecked', - value: function setChecked(newCheckedValue) { - this.refs.enhancedSwitch.setSwitched(newCheckedValue); + this.basePoint = { + x: this.center.x, + y: 0 + }; } }, { - key: 'getValue', - value: function getValue() { - return this.refs.enhancedSwitch.getValue(); + key: 'isMousePressed', + value: function isMousePressed(event) { + if (typeof event.buttons === 'undefined') { + return event.nativeEvent.which; + } + + return event.buttons; } }, { - key: 'render', - value: function render() { - var _props = this.props, - checkedIcon = _props.checkedIcon, - checked = _props.checked, - iconStyle = _props.iconStyle, - labelStyle = _props.labelStyle, - labelPosition = _props.labelPosition, - onCheck = _props.onCheck, - uncheckedIcon = _props.uncheckedIcon, - disabled = _props.disabled, - other = (0, _objectWithoutProperties3.default)(_props, ['checkedIcon', 'checked', 'iconStyle', 'labelStyle', 'labelPosition', 'onCheck', 'uncheckedIcon', 'disabled']); - - - var styles = getStyles(this.props, this.context); - - var uncheckedStyles = (0, _simpleAssign2.default)(styles.target, checked && styles.targetWhenChecked, iconStyle, disabled && styles.targetWhenDisabled); - - var checkedStyles = (0, _simpleAssign2.default)(styles.fill, checked && styles.fillWhenChecked, iconStyle, disabled && styles.fillWhenDisabled); - - var uncheckedElement = _react2.default.isValidElement(uncheckedIcon) ? _react2.default.cloneElement(uncheckedIcon, { - style: (0, _simpleAssign2.default)(uncheckedStyles, uncheckedIcon.props.style) - }) : _react2.default.createElement(_radioButtonUnchecked2.default, { style: uncheckedStyles }); + key: 'setClock', + value: function setClock(event, finish) { + if (typeof event.offsetX === 'undefined') { + var offset = (0, _timeUtils.getTouchEventOffsetValues)(event); - var checkedElement = _react2.default.isValidElement(checkedIcon) ? _react2.default.cloneElement(checkedIcon, { - style: (0, _simpleAssign2.default)(checkedStyles, checkedIcon.props.style) - }) : _react2.default.createElement(_radioButtonChecked2.default, { style: checkedStyles }); + event.offsetX = offset.offsetX; + event.offsetY = offset.offsetY; + } - var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle); - var mergedLabelStyle = (0, _simpleAssign2.default)(styles.label, labelStyle); + var hours = this.getHours(event.offsetX, event.offsetY); - return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, { - ref: 'enhancedSwitch', - inputType: 'radio', - checked: checked, - switched: checked, - disabled: disabled, - rippleColor: styles.ripple.color, - iconStyle: mergedIconStyle, - labelStyle: mergedLabelStyle, - labelPosition: labelPosition, - onSwitch: this.handleSwitch, - switchElement: _react2.default.createElement( - 'div', - null, - uncheckedElement, - checkedElement - ) - })); + this.props.onChange(hours, finish); } - }]); - return RadioButton; -}(_react.Component); - -RadioButton.defaultProps = { - checked: false, - disabled: false, - labelPosition: 'right' -}; -RadioButton.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? RadioButton.propTypes = { - /** - * @ignore - * checked if true - * Used internally by `RadioButtonGroup`. - */ - checked: _react.PropTypes.bool, - /** - * The icon element to show when the radio button is checked. - */ - checkedIcon: _react.PropTypes.element, - /** - * If true, the radio button is disabled. - */ - disabled: _react.PropTypes.bool, - /** - * Override the inline-styles of the icon element. - */ - iconStyle: _react.PropTypes.object, - /** - * Override the inline-styles of the input element. - */ - inputStyle: _react.PropTypes.object, - /** - * @ignore - * Used internally by `RadioButtonGroup`. Use the `labelPosition` property of `RadioButtonGroup` instead. - * Where the label will be placed next to the radio button. - */ - labelPosition: _react.PropTypes.oneOf(['left', 'right']), - /** - * Override the inline-styles of the label element. - */ - labelStyle: _react.PropTypes.object, - /** - * @ignore - * Callback function fired when the radio button is checked. Note that this - * function will not be called if the radio button is part of a - * radio button group: in this case, use the `onChange` property of - * `RadioButtonGroup`. - * - * @param {object} event `change` event targeting the element. - * @param {string} value The element's `value`. - */ - onCheck: _react.PropTypes.func, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - /** - * The icon element to show when the radio button is unchecked. - */ - uncheckedIcon: _react.PropTypes.element, - /** - * The value of the radio button. - */ - value: _react.PropTypes.any -} : void 0; -exports.default = RadioButton; - -/***/ }), -/* 811 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _pure = __webpack_require__(25); - -var _pure2 = _interopRequireDefault(_pure); - -var _SvgIcon = __webpack_require__(26); + }, { + key: 'getHours', + value: function getHours(offsetX, offsetY) { + var step = 30; + var x = offsetX - this.center.x; + var y = offsetY - this.center.y; + var cx = this.basePoint.x - this.center.x; + var cy = this.basePoint.y - this.center.y; -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + var atan = Math.atan2(cx, cy) - Math.atan2(x, y); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var deg = (0, _timeUtils.rad2deg)(atan); + deg = Math.round(deg / step) * step; + deg %= 360; -var ToggleRadioButtonUnchecked = function ToggleRadioButtonUnchecked(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z' }) - ); -}; -ToggleRadioButtonUnchecked = (0, _pure2.default)(ToggleRadioButtonUnchecked); -ToggleRadioButtonUnchecked.displayName = 'ToggleRadioButtonUnchecked'; -ToggleRadioButtonUnchecked.muiName = 'SvgIcon'; + var value = Math.floor(deg / step) || 0; -exports.default = ToggleRadioButtonUnchecked; + var delta = Math.pow(x, 2) + Math.pow(y, 2); + var distance = Math.sqrt(delta); -/***/ }), -/* 812 */ -/***/ (function(module, exports, __webpack_require__) { + value = value || 12; + if (this.props.format === '24hr') { + if (distance < 90) { + value += 12; + value %= 24; + } + } else { + value %= 12; + } -"use strict"; + return value; + } + }, { + key: 'getSelected', + value: function getSelected() { + var hour = this.props.initialHours; + if (this.props.format === 'ampm') { + hour %= 12; + hour = hour || 12; + } -Object.defineProperty(exports, "__esModule", { - value: true -}); + return hour; + } + }, { + key: 'getHourNumbers', + value: function getHourNumbers() { + var _this2 = this; -var _react = __webpack_require__(0); + var style = { + pointerEvents: 'none' + }; + var hourSize = this.props.format === 'ampm' ? 12 : 24; -var _react2 = _interopRequireDefault(_react); + var hours = []; + for (var i = 1; i <= hourSize; i++) { + hours.push(i % 24); + } -var _pure = __webpack_require__(25); + return hours.map(function (hour) { + var isSelected = _this2.getSelected() === hour; + return _react2.default.createElement(_ClockNumber2.default, { + key: hour, + style: style, + isSelected: isSelected, + type: 'hour', + value: hour + }); + }); + } + }, { + key: 'render', + value: function render() { + var styles = { + root: { + height: '100%', + width: '100%', + borderRadius: '100%', + position: 'relative', + pointerEvents: 'none', + boxSizing: 'border-box' + }, -var _pure2 = _interopRequireDefault(_pure); + hitMask: { + height: '100%', + width: '100%', + pointerEvents: 'auto' + } + }; -var _SvgIcon = __webpack_require__(26); + var prepareStyles = this.context.muiTheme.prepareStyles; -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + var hours = this.getSelected(); + var numbers = this.getHourNumbers(); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + return _react2.default.createElement( + 'div', + { ref: 'clock', style: prepareStyles(styles.root) }, + _react2.default.createElement(_ClockPointer2.default, { hasSelected: true, value: hours, type: 'hour' }), + numbers, + _react2.default.createElement('div', { + ref: 'mask', style: prepareStyles(styles.hitMask), onTouchMove: this.handleTouchMove, + onTouchEnd: this.handleTouchEnd, onMouseUp: this.handleUp, onMouseMove: this.handleMove + }) + ); + } + }]); + return ClockHours; +}(_react.Component); -var ToggleRadioButtonChecked = function ToggleRadioButtonChecked(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z' }) - ); +ClockHours.defaultProps = { + initialHours: new Date().getHours(), + onChange: function onChange() {}, + format: 'ampm' }; -ToggleRadioButtonChecked = (0, _pure2.default)(ToggleRadioButtonChecked); -ToggleRadioButtonChecked.displayName = 'ToggleRadioButtonChecked'; -ToggleRadioButtonChecked.muiName = 'SvgIcon'; - -exports.default = ToggleRadioButtonChecked; +ClockHours.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ClockHours.propTypes = { + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialHours: _react.PropTypes.number, + onChange: _react.PropTypes.func +} : void 0; +exports.default = ClockHours; /***/ }), -/* 813 */ +/* 817 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68014,14 +70880,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -68042,210 +70900,194 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _RadioButton = __webpack_require__(325); +var _ClockNumber = __webpack_require__(336); -var _RadioButton2 = _interopRequireDefault(_RadioButton); +var _ClockNumber2 = _interopRequireDefault(_ClockNumber); -var _warning = __webpack_require__(17); +var _ClockPointer = __webpack_require__(337); -var _warning2 = _interopRequireDefault(_warning); +var _ClockPointer2 = _interopRequireDefault(_ClockPointer); + +var _timeUtils = __webpack_require__(101); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var RadioButtonGroup = function (_Component) { - (0, _inherits3.default)(RadioButtonGroup, _Component); +var ClockMinutes = function (_Component) { + (0, _inherits3.default)(ClockMinutes, _Component); - function RadioButtonGroup() { + function ClockMinutes() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, RadioButtonGroup); + (0, _classCallCheck3.default)(this, ClockMinutes); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RadioButtonGroup.__proto__ || (0, _getPrototypeOf2.default)(RadioButtonGroup)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - numberCheckedRadioButtons: 0, - selected: '' - }, _this.handleChange = function (event, newSelection) { - _this.updateRadioButtons(newSelection); - - // Successful update - if (_this.state.numberCheckedRadioButtons === 0) { - if (_this.props.onChange) _this.props.onChange(event, newSelection); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockMinutes.__proto__ || (0, _getPrototypeOf2.default)(ClockMinutes)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) { + event.preventDefault(); + _this.setClock(event.nativeEvent, true); + }, _this.handleMove = function (event) { + event.preventDefault(); + if (_this.isMousePressed(event) !== 1) { + return; } + _this.setClock(event.nativeEvent, false); + }, _this.handleTouch = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], event.type === 'touchend'); }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(RadioButtonGroup, [{ - key: 'componentWillMount', - value: function componentWillMount() { - var _this2 = this; - - var cnt = 0; - var selected = ''; - var _props = this.props, - valueSelected = _props.valueSelected, - defaultSelected = _props.defaultSelected; - - if (valueSelected !== undefined) { - selected = valueSelected; - } else if (defaultSelected !== undefined) { - selected = defaultSelected; - } + (0, _createClass3.default)(ClockMinutes, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var clockElement = this.refs.mask; - _react2.default.Children.forEach(this.props.children, function (option) { - if (_this2.hasCheckAttribute(option)) cnt++; - }, this); + this.center = { + x: clockElement.offsetWidth / 2, + y: clockElement.offsetHeight / 2 + }; - this.setState({ - numberCheckedRadioButtons: cnt, - selected: selected - }); + this.basePoint = { + x: this.center.x, + y: 0 + }; } }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (nextProps.hasOwnProperty('valueSelected')) { - this.setState({ - selected: nextProps.valueSelected - }); + key: 'isMousePressed', + value: function isMousePressed(event) { + if (typeof event.buttons === 'undefined') { + return event.nativeEvent.which; } + return event.buttons; } }, { - key: 'hasCheckAttribute', - value: function hasCheckAttribute(radioButton) { - return radioButton.props.hasOwnProperty('checked') && radioButton.props.checked; - } - }, { - key: 'updateRadioButtons', - value: function updateRadioButtons(newSelection) { - if (this.state.numberCheckedRadioButtons === 0) { - this.setState({ selected: newSelection }); - } else { - false ? (0, _warning2.default)(false, 'Material-UI: Cannot select a different radio button while another radio button\n has the \'checked\' property set to true.') : void 0; + key: 'setClock', + value: function setClock(event, finish) { + if (typeof event.offsetX === 'undefined') { + var offset = (0, _timeUtils.getTouchEventOffsetValues)(event); + + event.offsetX = offset.offsetX; + event.offsetY = offset.offsetY; } + + var minutes = this.getMinutes(event.offsetX, event.offsetY); + + this.props.onChange(minutes, finish); } }, { - key: 'getSelectedValue', - value: function getSelectedValue() { - return this.state.selected; - } - }, { - key: 'setSelectedValue', - value: function setSelectedValue(newSelectionValue) { - this.updateRadioButtons(newSelectionValue); + key: 'getMinutes', + value: function getMinutes(offsetX, offsetY) { + var step = 6; + var x = offsetX - this.center.x; + var y = offsetY - this.center.y; + var cx = this.basePoint.x - this.center.x; + var cy = this.basePoint.y - this.center.y; + + var atan = Math.atan2(cx, cy) - Math.atan2(x, y); + + var deg = (0, _timeUtils.rad2deg)(atan); + deg = Math.round(deg / step) * step; + deg %= 360; + + var value = Math.floor(deg / step) || 0; + + return value; } }, { - key: 'clearValue', - value: function clearValue() { - this.setSelectedValue(''); + key: 'getMinuteNumbers', + value: function getMinuteNumbers() { + var minutes = []; + for (var i = 0; i < 12; i++) { + minutes.push(i * 5); + } + var selectedMinutes = this.props.initialMinutes; + var hasSelected = false; + + var numbers = minutes.map(function (minute) { + var isSelected = selectedMinutes === minute; + if (isSelected) { + hasSelected = true; + } + return _react2.default.createElement(_ClockNumber2.default, { + key: minute, + isSelected: isSelected, + type: 'minute', + value: minute + }); + }); + + return { + numbers: numbers, + hasSelected: hasSelected, + selected: selectedMinutes + }; } }, { key: 'render', value: function render() { - var _this3 = this; - - var prepareStyles = this.context.muiTheme.prepareStyles; - + var styles = { + root: { + height: '100%', + width: '100%', + borderRadius: '100%', + position: 'relative', + pointerEvents: 'none', + boxSizing: 'border-box' + }, - var options = _react2.default.Children.map(this.props.children, function (option) { - var _option$props = option.props, - name = _option$props.name, - value = _option$props.value, - label = _option$props.label, - onCheck = _option$props.onCheck, - other = (0, _objectWithoutProperties3.default)(_option$props, ['name', 'value', 'label', 'onCheck']); + hitMask: { + height: '100%', + width: '100%', + pointerEvents: 'auto' + } + }; + var prepareStyles = this.context.muiTheme.prepareStyles; - return _react2.default.createElement(_RadioButton2.default, (0, _extends3.default)({}, other, { - ref: option.props.value, - name: _this3.props.name, - key: option.props.value, - value: option.props.value, - label: option.props.label, - labelPosition: _this3.props.labelPosition, - onCheck: _this3.handleChange, - checked: option.props.value === _this3.state.selected - })); - }, this); + var minutes = this.getMinuteNumbers(); return _react2.default.createElement( 'div', - { - style: prepareStyles((0, _simpleAssign2.default)({}, this.props.style)), - className: this.props.className - }, - options + { ref: 'clock', style: prepareStyles(styles.root) }, + _react2.default.createElement(_ClockPointer2.default, { value: minutes.selected, type: 'minute', hasSelected: minutes.hasSelected }), + minutes.numbers, + _react2.default.createElement('div', { + ref: 'mask', + style: prepareStyles(styles.hitMask), + onTouchMove: this.handleTouch, + onTouchEnd: this.handleTouch, + onMouseUp: this.handleUp, + onMouseMove: this.handleMove + }) ); } }]); - return RadioButtonGroup; + return ClockMinutes; }(_react.Component); -RadioButtonGroup.defaultProps = { - style: {} +ClockMinutes.defaultProps = { + initialMinutes: new Date().getMinutes(), + onChange: function onChange() {} }; -RadioButtonGroup.contextTypes = { +ClockMinutes.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? RadioButtonGroup.propTypes = { - /** - * Should be used to pass `RadioButton` components. - */ - children: _react.PropTypes.node, - /** - * The CSS class name of the root element. - */ - className: _react.PropTypes.string, - /** - * The `value` property of the radio button that will be - * selected by default. This takes precedence over the `checked` property - * of the `RadioButton` elements. - */ - defaultSelected: _react.PropTypes.any, - /** - * Where the label will be placed for all child radio buttons. - * This takes precedence over the `labelPosition` property of the - * `RadioButton` elements. - */ - labelPosition: _react.PropTypes.oneOf(['left', 'right']), - /** - * The name that will be applied to all child radio buttons. - */ - name: _react.PropTypes.string.isRequired, - /** - * Callback function that is fired when a radio button has - * been checked. - * - * @param {object} event `change` event targeting the selected - * radio button. - * @param {*} value The `value` of the selected radio button. - */ - onChange: _react.PropTypes.func, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - /** - * The `value` of the currently selected radio button. - */ - valueSelected: _react.PropTypes.any + false ? ClockMinutes.propTypes = { + initialMinutes: _react.PropTypes.number, + onChange: _react.PropTypes.func } : void 0; -exports.default = RadioButtonGroup; +exports.default = ClockMinutes; /***/ }), -/* 814 */ +/* 818 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68257,47 +71099,35 @@ Object.defineProperty(exports, "__esModule", { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _SelectField = __webpack_require__(815); +var _Toggle = __webpack_require__(135); -var _SelectField2 = _interopRequireDefault(_SelectField); +var _Toggle2 = _interopRequireDefault(_Toggle); -var _createComponent = __webpack_require__(43); +var _createComponent = __webpack_require__(41); var _createComponent2 = _interopRequireDefault(_createComponent); -var _mapError = __webpack_require__(60); - -var _mapError2 = _interopRequireDefault(_mapError); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -exports.default = (0, _createComponent2.default)(_SelectField2.default, function (_ref) { +exports.default = (0, _createComponent2.default)(_Toggle2.default, function (_ref) { var _ref$input = _ref.input, - _onChange = _ref$input.onChange, + onChange = _ref$input.onChange, value = _ref$input.value, - _onBlur = _ref$input.onBlur, - inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value', 'onBlur']), - onChangeFromField = _ref.onChange, - props = _objectWithoutProperties(_ref, ['input', 'onChange']); + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']), + defaultToggled = _ref.defaultToggled, + meta = _ref.meta, + props = _objectWithoutProperties(_ref, ['input', 'defaultToggled', 'meta']); - return _extends({}, (0, _mapError2.default)(props), inputProps, { - value: value, - onChange: function onChange(event, index, value) { - _onChange(value); - if (onChangeFromField) { - onChangeFromField(value); - } - }, - onBlur: function onBlur() { - return _onBlur(value); - } + return _extends({}, inputProps, props, { + onToggle: onChange, + toggled: !!value }); }); /***/ }), -/* 815 */ +/* 819 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68306,309 +71136,330 @@ exports.default = (0, _createComponent2.default)(_SelectField2.default, function Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = undefined; -var _SelectField = __webpack_require__(816); +var _extends2 = __webpack_require__(7); -var _SelectField2 = _interopRequireDefault(_SelectField); +var _extends3 = _interopRequireDefault(_extends2); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _objectWithoutProperties2 = __webpack_require__(8); -exports.default = _SelectField2.default; +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -/***/ }), -/* 816 */ -/***/ (function(module, exports, __webpack_require__) { +var _getPrototypeOf = __webpack_require__(3); -"use strict"; +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _classCallCheck2 = __webpack_require__(1); -Object.defineProperty(exports, "__esModule", { - value: true -}); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _extends2 = __webpack_require__(7); +var _createClass2 = __webpack_require__(2); -var _extends3 = _interopRequireDefault(_extends2); +var _createClass3 = _interopRequireDefault(_createClass2); -var _objectWithoutProperties2 = __webpack_require__(8); +var _possibleConstructorReturn2 = __webpack_require__(4); -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var _getPrototypeOf = __webpack_require__(3); +var _inherits2 = __webpack_require__(5); -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _inherits3 = _interopRequireDefault(_inherits2); -var _classCallCheck2 = __webpack_require__(1); +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _Paper = __webpack_require__(32); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _EnhancedSwitch = __webpack_require__(208); + +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var disabled = props.disabled, + elementStyle = props.elementStyle, + trackSwitchedStyle = props.trackSwitchedStyle, + thumbSwitchedStyle = props.thumbSwitchedStyle, + trackStyle = props.trackStyle, + thumbStyle = props.thumbStyle, + iconStyle = props.iconStyle, + rippleStyle = props.rippleStyle, + labelStyle = props.labelStyle; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + toggle = _context$muiTheme.toggle; + + + var toggleSize = 20; + var toggleTrackWidth = 36; + var styles = { + icon: { + width: 36, + padding: '4px 0px 6px 2px' + }, + ripple: { + top: -10, + left: -10, + color: state.switched ? toggle.thumbOnColor : baseTheme.palette.textColor + }, + toggleElement: { + width: toggleTrackWidth + }, + track: { + transition: _transitions2.default.easeOut(), + width: '100%', + height: 14, + borderRadius: 30, + backgroundColor: toggle.trackOffColor + }, + thumb: { + transition: _transitions2.default.easeOut(), + position: 'absolute', + top: 1, + left: 0, + width: toggleSize, + height: toggleSize, + lineHeight: '24px', + borderRadius: '50%', + backgroundColor: toggle.thumbOffColor + }, + trackWhenSwitched: { + backgroundColor: toggle.trackOnColor + }, + thumbWhenSwitched: { + backgroundColor: toggle.thumbOnColor, + left: '100%' + }, + trackWhenDisabled: { + backgroundColor: toggle.trackDisabledColor + }, + thumbWhenDisabled: { + backgroundColor: toggle.thumbDisabledColor + }, + label: { + color: disabled ? toggle.labelDisabledColor : toggle.labelColor, + width: 'calc(100% - ' + (toggleTrackWidth + 10) + 'px)' + } + }; -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + (0, _simpleAssign2.default)(styles.track, trackStyle, state.switched && styles.trackWhenSwitched, state.switched && trackSwitchedStyle, disabled && styles.trackWhenDisabled); -var _createClass2 = __webpack_require__(2); + (0, _simpleAssign2.default)(styles.thumb, thumbStyle, state.switched && styles.thumbWhenSwitched, state.switched && thumbSwitchedStyle, disabled && styles.thumbWhenDisabled); -var _createClass3 = _interopRequireDefault(_createClass2); + if (state.switched) { + styles.thumb.marginLeft = 0 - styles.thumb.width; + } -var _possibleConstructorReturn2 = __webpack_require__(4); + (0, _simpleAssign2.default)(styles.icon, iconStyle); -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + (0, _simpleAssign2.default)(styles.ripple, rippleStyle); -var _inherits2 = __webpack_require__(5); + (0, _simpleAssign2.default)(styles.label, labelStyle); -var _inherits3 = _interopRequireDefault(_inherits2); + (0, _simpleAssign2.default)(styles.toggleElement, elementStyle); -var _simpleAssign = __webpack_require__(6); + return styles; +} -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var Toggle = function (_Component) { + (0, _inherits3.default)(Toggle, _Component); -var _react = __webpack_require__(0); + function Toggle() { + var _ref; -var _react2 = _interopRequireDefault(_react); + var _temp, _this, _ret; -var _TextField = __webpack_require__(97); + (0, _classCallCheck3.default)(this, Toggle); -var _TextField2 = _interopRequireDefault(_TextField); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -var _DropDownMenu = __webpack_require__(817); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Toggle.__proto__ || (0, _getPrototypeOf2.default)(Toggle)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + switched: false + }, _this.handleStateChange = function (newSwitched) { + _this.setState({ + switched: newSwitched + }); + }, _this.handleToggle = function (event, isInputChecked) { + if (_this.props.onToggle) { + _this.props.onToggle(event, isInputChecked); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } -var _DropDownMenu2 = _interopRequireDefault(_DropDownMenu); + (0, _createClass3.default)(Toggle, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + toggled = _props.toggled, + defaultToggled = _props.defaultToggled, + valueLink = _props.valueLink; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props) { - return { - label: { - paddingLeft: 0, - top: props.floatingLabelText ? 6 : -4 - }, - icon: { - right: 0, - top: props.floatingLabelText ? 8 : 0 - }, - hideDropDownUnderline: { - borderTop: 'none' - }, - dropDownMenu: { - display: 'block' + if (toggled || defaultToggled || valueLink && valueLink.value) { + this.setState({ + switched: true + }); + } } - }; -} - -var SelectField = function (_Component) { - (0, _inherits3.default)(SelectField, _Component); - - function SelectField() { - (0, _classCallCheck3.default)(this, SelectField); - return (0, _possibleConstructorReturn3.default)(this, (SelectField.__proto__ || (0, _getPrototypeOf2.default)(SelectField)).apply(this, arguments)); - } - - (0, _createClass3.default)(SelectField, [{ + }, { + key: 'isToggled', + value: function isToggled() { + return this.refs.enhancedSwitch.isSwitched(); + } + }, { + key: 'setToggled', + value: function setToggled(newToggledValue) { + this.refs.enhancedSwitch.setSwitched(newToggledValue); + } + }, { key: 'render', value: function render() { - var _props = this.props, - autoWidth = _props.autoWidth, - children = _props.children, - style = _props.style, - labelStyle = _props.labelStyle, - iconStyle = _props.iconStyle, - id = _props.id, - underlineDisabledStyle = _props.underlineDisabledStyle, - underlineFocusStyle = _props.underlineFocusStyle, - menuItemStyle = _props.menuItemStyle, - selectedMenuItemStyle = _props.selectedMenuItemStyle, - underlineStyle = _props.underlineStyle, - errorStyle = _props.errorStyle, - disabled = _props.disabled, - floatingLabelFixed = _props.floatingLabelFixed, - floatingLabelText = _props.floatingLabelText, - floatingLabelStyle = _props.floatingLabelStyle, - hintStyle = _props.hintStyle, - hintText = _props.hintText, - fullWidth = _props.fullWidth, - errorText = _props.errorText, - listStyle = _props.listStyle, - maxHeight = _props.maxHeight, - menuStyle = _props.menuStyle, - onFocus = _props.onFocus, - onBlur = _props.onBlur, - onChange = _props.onChange, - value = _props.value, - other = (0, _objectWithoutProperties3.default)(_props, ['autoWidth', 'children', 'style', 'labelStyle', 'iconStyle', 'id', 'underlineDisabledStyle', 'underlineFocusStyle', 'menuItemStyle', 'selectedMenuItemStyle', 'underlineStyle', 'errorStyle', 'disabled', 'floatingLabelFixed', 'floatingLabelText', 'floatingLabelStyle', 'hintStyle', 'hintText', 'fullWidth', 'errorText', 'listStyle', 'maxHeight', 'menuStyle', 'onFocus', 'onBlur', 'onChange', 'value']); - + var _props2 = this.props, + defaultToggled = _props2.defaultToggled, + elementStyle = _props2.elementStyle, + onToggle = _props2.onToggle, + trackSwitchedStyle = _props2.trackSwitchedStyle, + thumbSwitchedStyle = _props2.thumbSwitchedStyle, + toggled = _props2.toggled, + other = (0, _objectWithoutProperties3.default)(_props2, ['defaultToggled', 'elementStyle', 'onToggle', 'trackSwitchedStyle', 'thumbSwitchedStyle', 'toggled']); + var prepareStyles = this.context.muiTheme.prepareStyles; - var styles = getStyles(this.props, this.context); + var styles = getStyles(this.props, this.context, this.state); - return _react2.default.createElement( - _TextField2.default, - (0, _extends3.default)({}, other, { - style: style, - disabled: disabled, - floatingLabelFixed: floatingLabelFixed, - floatingLabelText: floatingLabelText, - floatingLabelStyle: floatingLabelStyle, - hintStyle: hintStyle, - hintText: !hintText && !floatingLabelText ? ' ' : hintText, - fullWidth: fullWidth, - errorText: errorText, - underlineStyle: underlineStyle, - errorStyle: errorStyle, - onFocus: onFocus, - onBlur: onBlur, - id: id, - underlineDisabledStyle: underlineDisabledStyle, - underlineFocusStyle: underlineFocusStyle - }), - _react2.default.createElement( - _DropDownMenu2.default, - { - disabled: disabled, - style: (0, _simpleAssign2.default)(styles.dropDownMenu, menuStyle), - labelStyle: (0, _simpleAssign2.default)(styles.label, labelStyle), - iconStyle: (0, _simpleAssign2.default)(styles.icon, iconStyle), - menuItemStyle: menuItemStyle, - selectedMenuItemStyle: selectedMenuItemStyle, - underlineStyle: styles.hideDropDownUnderline, - listStyle: listStyle, - autoWidth: autoWidth, - value: value, - onChange: onChange, - maxHeight: maxHeight - }, - children - ) + var toggleElement = _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.toggleElement)) }, + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.track)) }), + _react2.default.createElement(_Paper2.default, { style: styles.thumb, circle: true, zDepth: 1 }) ); + + var enhancedSwitchProps = { + ref: 'enhancedSwitch', + inputType: 'checkbox', + switchElement: toggleElement, + rippleStyle: styles.ripple, + rippleColor: styles.ripple.color, + iconStyle: styles.icon, + trackStyle: styles.track, + thumbStyle: styles.thumb, + labelStyle: styles.label, + switched: this.state.switched, + onSwitch: this.handleToggle, + onParentShouldUpdate: this.handleStateChange, + labelPosition: this.props.labelPosition + }; + + if (this.props.hasOwnProperty('toggled')) { + enhancedSwitchProps.checked = toggled; + } else if (this.props.hasOwnProperty('defaultToggled')) { + enhancedSwitchProps.defaultChecked = defaultToggled; + } + + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps)); } }]); - return SelectField; + return Toggle; }(_react.Component); -SelectField.defaultProps = { - autoWidth: false, +Toggle.defaultProps = { + defaultToggled: false, disabled: false, - fullWidth: false + labelPosition: 'left' }; -SelectField.contextTypes = { +Toggle.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? SelectField.propTypes = { - /** - * If true, the width will automatically be set according to the - * items inside the menu. - * To control the width in CSS instead, leave this prop set to `false`. - */ - autoWidth: _react.PropTypes.bool, + false ? Toggle.propTypes = { /** - * The `MenuItem` elements to populate the select field with. - * If the menu items have a `label` prop, that value will - * represent the selected menu item in the rendered select field. + * Determines whether the Toggle is initially turned on. + * **Warning:** This cannot be used in conjunction with `toggled`. + * Decide between using a controlled or uncontrolled input element and remove one of these props. + * More info: https://fb.me/react-controlled-components */ - children: _react.PropTypes.node, + defaultToggled: _react.PropTypes.bool, /** - * If true, the select field will be disabled. + * Will disable the toggle if true. */ disabled: _react.PropTypes.bool, /** - * Override the inline-styles of the error element. - */ - errorStyle: _react.PropTypes.object, - /** - * The error content to display. - */ - errorText: _react.PropTypes.node, - /** - * If true, the floating label will float even when no value is selected. - */ - floatingLabelFixed: _react.PropTypes.bool, - /** - * Override the inline-styles of the floating label. - */ - floatingLabelStyle: _react.PropTypes.object, - /** - * The content of the floating label. - */ - floatingLabelText: _react.PropTypes.node, - /** - * If true, the select field will take up the full width of its container. - */ - fullWidth: _react.PropTypes.bool, - /** - * Override the inline-styles of the hint element. - */ - hintStyle: _react.PropTypes.object, - /** - * The hint content to display. + * Overrides the inline-styles of the Toggle element. */ - hintText: _react.PropTypes.node, + elementStyle: _react.PropTypes.object, /** - * Override the inline-styles of the icon element. + * Overrides the inline-styles of the Icon element. */ iconStyle: _react.PropTypes.object, /** - * The id prop for the text field. - */ - id: _react.PropTypes.string, - /** - * Override the label style when the select field is inactive. - */ - labelStyle: _react.PropTypes.object, - /** - * Override the inline-styles of the underlying `List` element. + * Overrides the inline-styles of the input element. */ - listStyle: _react.PropTypes.object, + inputStyle: _react.PropTypes.object, /** - * Override the default max-height of the underlying `DropDownMenu` element. + * Label for toggle. */ - maxHeight: _react.PropTypes.number, + label: _react.PropTypes.node, /** - * Override the inline-styles of menu items. + * Where the label will be placed next to the toggle. */ - menuItemStyle: _react.PropTypes.object, + labelPosition: _react.PropTypes.oneOf(['left', 'right']), /** - * Override the inline-styles of the underlying `DropDownMenu` element. + * Overrides the inline-styles of the Toggle element label. */ - menuStyle: _react.PropTypes.object, - /** @ignore */ - onBlur: _react.PropTypes.func, + labelStyle: _react.PropTypes.object, /** - * Callback function fired when a menu item is selected. - * - * @param {object} event TouchTap event targeting the menu item - * that was selected. - * @param {number} key The index of the selected menu item. - * @param {any} payload The `value` prop of the selected menu item. + * Callback function that is fired when the toggle switch is toggled. */ - onChange: _react.PropTypes.func, - /** @ignore */ - onFocus: _react.PropTypes.func, + onToggle: _react.PropTypes.func, /** - * Override the inline-styles of selected menu items. + * Override style of ripple. */ - selectedMenuItemStyle: _react.PropTypes.object, + rippleStyle: _react.PropTypes.object, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, /** - * Override the inline-styles of the underline element when the select - * field is disabled. + * Override style for thumb. */ - underlineDisabledStyle: _react.PropTypes.object, + thumbStyle: _react.PropTypes.object, /** - * Override the inline-styles of the underline element when the select field - * is focused. + * Override the inline styles for thumb when the toggle switch is toggled on. + */ + thumbSwitchedStyle: _react.PropTypes.object, + /** + * Toggled if set to true. */ - underlineFocusStyle: _react.PropTypes.object, + toggled: _react.PropTypes.bool, /** - * Override the inline-styles of the underline element. + * Override style for track. */ - underlineStyle: _react.PropTypes.object, + trackStyle: _react.PropTypes.object, /** - * The value that is currently selected. + * Override the inline styles for track when the toggle switch is toggled on. + */ + trackSwitchedStyle: _react.PropTypes.object, + /** + * ValueLink prop for when using controlled toggle. */ - value: _react.PropTypes.any + valueLink: _react.PropTypes.object } : void 0; -exports.default = SelectField; +exports.default = Toggle; /***/ }), -/* 817 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68617,24 +71468,218 @@ exports.default = SelectField; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = exports.MenuItem = exports.DropDownMenu = undefined; -var _DropDownMenu2 = __webpack_require__(818); +var _assign = __webpack_require__(42); -var _DropDownMenu3 = _interopRequireDefault(_DropDownMenu2); +var _assign2 = _interopRequireDefault(_assign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); -var _MenuItem2 = __webpack_require__(321); +var _reduxForm = __webpack_require__(82); -var _MenuItem3 = _interopRequireDefault(_MenuItem2); +var _reactRedux = __webpack_require__(19); + +var _RaisedButton = __webpack_require__(65); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _reduxFormMaterialUi = __webpack_require__(98); + +var _Styles = __webpack_require__(52); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _FormValidators = __webpack_require__(102); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Menus = __webpack_require__(84); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var defaultValues = { + autoCheckout: false, + autoPay: false, + strictSize: true, + hideSoldOut: false, + captchaBypass: false, + addToCartDelay: 200, + checkoutDelay: 2000 +}; + +var Options = function Options(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting, + atcEnabled = props.atcEnabled; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'options-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'autoCheckout', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable auto checkout', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'autoPay', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable auto payment', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'strictSize', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable strict size checking', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'hideSoldOut', + component: _reduxFormMaterialUi.Toggle, + label: 'Hide sold out products', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'captchaBypass', + component: _reduxFormMaterialUi.Toggle, + label: 'Bypass captcha (beta)', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'atcEnabled', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable AutoCop (Autocheckout required)', + style: _Styles2.default.fields.text + }) + ), + atcEnabled && _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'atcStartTime', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'ATC Start time (hh:mm:ss) 24hour format', + hintText: 'ATC Start time', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.time24] + }), + _react2.default.createElement('br', null) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'addToCartDelay', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Add to cart delay (ms)', + hintText: 'Add to cart delay (ms)', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'checkoutDelay', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Checkout delay (ms)', + hintText: 'Checkout delay (ms)', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'maxPrice', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Maximum product price', + hintText: 'Maximum product price', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'minPrice', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Minimum product price', + hintText: 'Minimum product price', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; + +var OptionsForm = (0, _reduxForm.reduxForm)({ + form: 'options' +})(Options); + +var selector = (0, _reduxForm.formValueSelector)('options'); + +function mapStateToProps(state, ownProps) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + initialValues: (0, _assign2.default)({}, defaultValues, (settings[ownProps.shop] || {})[menus.MENU_OPTIONS] || {}), + atcEnabled: selector(state, 'atcEnabled') + }; +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +Options.propTypes = { + shop: _react.PropTypes.string.isRequired +}; -exports.DropDownMenu = _DropDownMenu3.default; -exports.MenuItem = _MenuItem3.default; -exports.default = _DropDownMenu3.default; +exports.default = (0, _reactRedux.connect)(mapStateToProps)(OptionsForm); /***/ }), -/* 818 */ +/* 821 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68644,497 +71689,264 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - -var _getPrototypeOf = __webpack_require__(3); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(1); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(2); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(4); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(5); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); - -var _reactDom2 = _interopRequireDefault(_reactDom); - -var _transitions = __webpack_require__(10); - -var _transitions2 = _interopRequireDefault(_transitions); - -var _arrowDropDown = __webpack_require__(819); +var _reduxForm = __webpack_require__(82); -var _arrowDropDown2 = _interopRequireDefault(_arrowDropDown); +var _reactRedux = __webpack_require__(19); -var _Menu = __webpack_require__(199); +var _MenuItem = __webpack_require__(97); -var _Menu2 = _interopRequireDefault(_Menu); +var _MenuItem2 = _interopRequireDefault(_MenuItem); -var _ClearFix = __webpack_require__(820); +var _RaisedButton = __webpack_require__(65); -var _ClearFix2 = _interopRequireDefault(_ClearFix); +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); -var _Popover = __webpack_require__(130); +var _reduxFormMaterialUi = __webpack_require__(98); -var _Popover2 = _interopRequireDefault(_Popover); +var _Styles = __webpack_require__(52); -var _PopoverAnimationVertical = __webpack_require__(324); +var _Styles2 = _interopRequireDefault(_Styles); -var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical); +var _Utils = __webpack_require__(210); -var _keycode = __webpack_require__(30); +var Utils = _interopRequireWildcard(_Utils); -var _keycode2 = _interopRequireDefault(_keycode); +var _FormValidators = __webpack_require__(102); -var _events = __webpack_require__(196); +var Validators = _interopRequireWildcard(_FormValidators); -var _events2 = _interopRequireDefault(_events); +var _Menus = __webpack_require__(84); -var _IconButton = __webpack_require__(95); +var menus = _interopRequireWildcard(_Menus); -var _IconButton2 = _interopRequireDefault(_IconButton); +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var anchorOrigin = { - vertical: 'top', - horizontal: 'left' -}; - -function getStyles(props, context) { - var disabled = props.disabled; - - var spacing = context.muiTheme.baseTheme.spacing; - var palette = context.muiTheme.baseTheme.palette; - var accentColor = context.muiTheme.dropDownMenu.accentColor; - return { - control: { - cursor: disabled ? 'not-allowed' : 'pointer', - height: '100%', - position: 'relative', - width: '100%' - }, - icon: { - fill: accentColor, - position: 'absolute', - right: spacing.desktopGutterLess, - top: (spacing.iconSize - 24) / 2 + spacing.desktopGutterMini / 2 - }, - iconChildren: { - fill: 'inherit' - }, - label: { - color: disabled ? palette.disabledColor : palette.textColor, - lineHeight: spacing.desktopToolbarHeight + 'px', - overflow: 'hidden', - opacity: 1, - position: 'relative', - paddingLeft: spacing.desktopGutter, - paddingRight: spacing.iconSize * 2 + spacing.desktopGutterMini, - textOverflow: 'ellipsis', - top: 0, - whiteSpace: 'nowrap' - }, - labelWhenOpen: { - opacity: 0, - top: spacing.desktopToolbarHeight / 8 - }, - root: { - display: 'inline-block', - fontSize: spacing.desktopDropDownMenuFontSize, - height: spacing.desktopSubheaderHeight, - fontFamily: context.muiTheme.baseTheme.fontFamily, - outline: 'none', - position: 'relative', - transition: _transitions2.default.easeOut() - }, - rootWhenOpen: { - opacity: 1 - }, - underline: { - borderTop: 'solid 1px ' + accentColor, - bottom: 1, - left: 0, - margin: '-1px ' + spacing.desktopGutter + 'px', - right: 0, - position: 'absolute' - } - }; -} - -var DropDownMenu = function (_Component) { - (0, _inherits3.default)(DropDownMenu, _Component); - - function DropDownMenu() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, DropDownMenu); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DropDownMenu.__proto__ || (0, _getPrototypeOf2.default)(DropDownMenu)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - open: false - }, _this.rootNode = undefined, _this.arrowNode = undefined, _this.handleTouchTapControl = function (event) { - event.preventDefault(); - if (!_this.props.disabled) { - _this.setState({ - open: !_this.state.open, - anchorEl: _this.rootNode - }); - } - }, _this.handleRequestCloseMenu = function () { - _this.close(false); - }, _this.handleEscKeyDownMenu = function () { - _this.close(true); - }, _this.handleKeyDown = function (event) { - switch ((0, _keycode2.default)(event)) { - case 'up': - case 'down': - case 'space': - case 'enter': - event.preventDefault(); - _this.setState({ - open: true, - anchorEl: _this.rootNode - }); - break; - } - }, _this.handleItemTouchTap = function (event, child, index) { - event.persist(); - _this.setState({ - open: false - }, function () { - if (_this.props.onChange) { - _this.props.onChange(event, index, child.props.value); - } - - _this.close(_events2.default.isKeyboard(event)); - }); - }, _this.close = function (isKeyboard) { - _this.setState({ - open: false - }, function () { - if (_this.props.onClose) { - _this.props.onClose(); - } - - if (isKeyboard) { - var dropArrow = _this.arrowNode; - var dropNode = _reactDom2.default.findDOMNode(dropArrow); - dropNode.focus(); - dropArrow.setKeyboardFocus(true); - } - }); - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - - // The nested styles for drop-down-menu are modified by toolbar and possibly - // other user components, so it will give full access to its js styles rather - // than just the parent. - - - (0, _createClass3.default)(DropDownMenu, [{ - key: 'componentDidMount', - value: function componentDidMount() { - var _this2 = this; - - if (this.props.autoWidth) { - this.setWidth(); - } - if (this.props.openImmediately) { - // TODO: Temporary fix to make openImmediately work with popover. - /* eslint-disable react/no-did-mount-set-state */ - setTimeout(function () { - return _this2.setState({ - open: true, - anchorEl: _this2.rootNode - }); - }, 0); - /* eslint-enable react/no-did-mount-set-state */ - } - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps() { - if (this.props.autoWidth) { - this.setWidth(); - } - } - }, { - key: 'getInputNode', - - - /** - * This method is deprecated but still here because the TextField - * need it in order to work. TODO: That will be addressed later. - */ - value: function getInputNode() { - var _this3 = this; - - var rootNode = this.rootNode; - - rootNode.focus = function () { - if (!_this3.props.disabled) { - _this3.setState({ - open: !_this3.state.open, - anchorEl: _this3.rootNode - }); - } - }; - - return rootNode; - } - }, { - key: 'setWidth', - value: function setWidth() { - var el = this.rootNode; - if (!this.props.style || !this.props.style.hasOwnProperty('width')) { - el.style.width = 'auto'; - } - } - }, { - key: 'render', - value: function render() { - var _this4 = this; - - var _props = this.props, - animated = _props.animated, - animation = _props.animation, - autoWidth = _props.autoWidth, - children = _props.children, - className = _props.className, - iconStyle = _props.iconStyle, - labelStyle = _props.labelStyle, - listStyle = _props.listStyle, - maxHeight = _props.maxHeight, - menuStyleProp = _props.menuStyle, - onClose = _props.onClose, - openImmediately = _props.openImmediately, - menuItemStyle = _props.menuItemStyle, - selectedMenuItemStyle = _props.selectedMenuItemStyle, - style = _props.style, - underlineStyle = _props.underlineStyle, - value = _props.value, - other = (0, _objectWithoutProperties3.default)(_props, ['animated', 'animation', 'autoWidth', 'children', 'className', 'iconStyle', 'labelStyle', 'listStyle', 'maxHeight', 'menuStyle', 'onClose', 'openImmediately', 'menuItemStyle', 'selectedMenuItemStyle', 'style', 'underlineStyle', 'value']); - var _state = this.state, - anchorEl = _state.anchorEl, - open = _state.open; - var prepareStyles = this.context.muiTheme.prepareStyles; - - var styles = getStyles(this.props, this.context); - - var displayValue = ''; - _react2.default.Children.forEach(children, function (child) { - if (child && value === child.props.value) { - // This will need to be improved (in case primaryText is a node) - displayValue = child.props.label || child.props.primaryText; - } - }); - - var menuStyle = void 0; - if (anchorEl && !autoWidth) { - menuStyle = (0, _simpleAssign2.default)({ - width: anchorEl.clientWidth - }, menuStyleProp); - } else { - menuStyle = menuStyleProp; - } - - return _react2.default.createElement( - 'div', - (0, _extends3.default)({}, other, { - ref: function ref(node) { - _this4.rootNode = node; - }, - className: className, - style: prepareStyles((0, _simpleAssign2.default)({}, styles.root, open && styles.rootWhenOpen, style)) - }), - _react2.default.createElement( - _ClearFix2.default, - { style: styles.control, onTouchTap: this.handleTouchTapControl }, - _react2.default.createElement( - 'div', - { style: prepareStyles((0, _simpleAssign2.default)({}, styles.label, open && styles.labelWhenOpen, labelStyle)) }, - displayValue - ), - _react2.default.createElement( - _IconButton2.default, - { - tabIndex: this.props.disabled ? -1 : undefined, - onKeyDown: this.handleKeyDown, - ref: function ref(node) { - _this4.arrowNode = node; - }, - style: (0, _simpleAssign2.default)({}, styles.icon, iconStyle), - iconStyle: styles.iconChildren - }, - _react2.default.createElement(_arrowDropDown2.default, null) - ), - _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.underline, underlineStyle)) }) - ), - _react2.default.createElement( - _Popover2.default, - { - anchorOrigin: anchorOrigin, - anchorEl: anchorEl, - animation: animation || _PopoverAnimationVertical2.default, - open: open, - animated: animated, - onRequestClose: this.handleRequestCloseMenu - }, - _react2.default.createElement( - _Menu2.default, - { - maxHeight: maxHeight, - desktop: true, - value: value, - onEscKeyDown: this.handleEscKeyDownMenu, - style: menuStyle, - listStyle: listStyle, - onItemTouchTap: this.handleItemTouchTap, - menuItemStyle: menuItemStyle, - selectedMenuItemStyle: selectedMenuItemStyle - }, - children - ) - ) - ); - } - }]); - return DropDownMenu; -}(_react.Component); +var Sizes = function Sizes(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting; -DropDownMenu.muiName = 'DropDownMenu'; -DropDownMenu.defaultProps = { - animated: true, - autoWidth: true, - disabled: false, - openImmediately: false, - maxHeight: 500 + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'biling-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'accessories', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Accessories', + hintText: 'Accessories', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 't-shirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'T-Shirts', + hintText: 'T-Shirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'pants', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Pants', + hintText: 'Pants', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizesPants.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shorts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shorts', + hintText: 'Shorts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizesPants.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'sweatshirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Sweatshirts', + hintText: 'Sweatshirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'tops-sweaters', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Tops/Sweaters', + hintText: 'Tops/Sweaters', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shirts', + hintText: 'Shirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'jackets', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Jackets', + hintText: 'Jackets', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shoes', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shoes', + hintText: 'Shoes', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.shoeSizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'skate', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Skate', + hintText: 'Skate', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.skateSizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); }; -DropDownMenu.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired + +Sizes.propTypes = { + shop: _react.PropTypes.string.isRequired }; - false ? DropDownMenu.propTypes = { - /** - * If true, the popover will apply transitions when - * it gets added to the DOM. - */ - animated: _react.PropTypes.bool, - /** - * Override the default animation component used. - */ - animation: _react.PropTypes.func, - /** - * The width will automatically be set according to the items inside the menu. - * To control this width in css instead, set this prop to `false`. - */ - autoWidth: _react.PropTypes.bool, - /** - * The `MenuItem`s to populate the `Menu` with. If the `MenuItems` have the - * prop `label` that value will be used to render the representation of that - * item within the field. - */ - children: _react.PropTypes.node, - /** - * The css class name of the root element. - */ - className: _react.PropTypes.string, - /** - * Disables the menu. - */ - disabled: _react.PropTypes.bool, - /** - * Overrides the styles of icon element. - */ - iconStyle: _react.PropTypes.object, - /** - * Overrides the styles of label when the `DropDownMenu` is inactive. - */ - labelStyle: _react.PropTypes.object, - /** - * The style object to use to override underlying list style. - */ - listStyle: _react.PropTypes.object, - /** - * The maximum height of the `Menu` when it is displayed. - */ - maxHeight: _react.PropTypes.number, - /** - * Override the inline-styles of menu items. - */ - menuItemStyle: _react.PropTypes.object, - /** - * Overrides the styles of `Menu` when the `DropDownMenu` is displayed. - */ - menuStyle: _react.PropTypes.object, - /** - * Callback function fired when a menu item is clicked, other than the one currently selected. - * - * @param {object} event TouchTap event targeting the menu item that was clicked. - * @param {number} key The index of the clicked menu item in the `children` collection. - * @param {any} payload The `value` prop of the clicked menu item. - */ - onChange: _react.PropTypes.func, - /** - * Callback function fired when the menu is closed. - */ - onClose: _react.PropTypes.func, - /** - * Set to true to have the `DropDownMenu` automatically open on mount. - */ - openImmediately: _react.PropTypes.bool, - /** - * Override the inline-styles of selected menu items. - */ - selectedMenuItemStyle: _react.PropTypes.object, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - /** - * Overrides the inline-styles of the underline. - */ - underlineStyle: _react.PropTypes.object, - /** - * The value that is currently selected. - */ - value: _react.PropTypes.any -} : void 0; -exports.default = DropDownMenu; + +function mapStateToProps(state, ownProps) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + initialValues: (settings[ownProps.shop] || {})[menus.MENU_SIZES] || {} + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({ + form: 'sizes' +})(Sizes)); /***/ }), -/* 819 */ +/* 822 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69144,103 +71956,258 @@ Object.defineProperty(exports, "__esModule", { value: true }); +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(25); +var _reactRedux = __webpack_require__(19); -var _pure2 = _interopRequireDefault(_pure); +var _Table = __webpack_require__(339); -var _SvgIcon = __webpack_require__(26); +var _colors = __webpack_require__(31); -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); +var _Dialog = __webpack_require__(134); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _Dialog2 = _interopRequireDefault(_Dialog); -var NavigationArrowDropDown = function NavigationArrowDropDown(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M7 10l5 5 5-5z' }) - ); -}; -NavigationArrowDropDown = (0, _pure2.default)(NavigationArrowDropDown); -NavigationArrowDropDown.displayName = 'NavigationArrowDropDown'; -NavigationArrowDropDown.muiName = 'SvgIcon'; +var _IconButton = __webpack_require__(64); -exports.default = NavigationArrowDropDown; +var _IconButton2 = _interopRequireDefault(_IconButton); -/***/ }), -/* 820 */ -/***/ (function(module, exports, __webpack_require__) { +var _delete = __webpack_require__(341); -"use strict"; +var _delete2 = _interopRequireDefault(_delete); +var _RaisedButton = __webpack_require__(65); -Object.defineProperty(exports, "__esModule", { - value: true -}); +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); -var _extends2 = __webpack_require__(7); +var _Toggle = __webpack_require__(135); -var _extends3 = _interopRequireDefault(_extends2); +var _Toggle2 = _interopRequireDefault(_Toggle); -var _objectWithoutProperties2 = __webpack_require__(8); +var _atc = __webpack_require__(828); -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); +var _AtcCreateForm = __webpack_require__(829); -var _react = __webpack_require__(0); +var _AtcCreateForm2 = _interopRequireDefault(_AtcCreateForm); -var _react2 = _interopRequireDefault(_react); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _BeforeAfterWrapper = __webpack_require__(821); +var Atc = function (_Component) { + (0, _inherits3.default)(Atc, _Component); -var _BeforeAfterWrapper2 = _interopRequireDefault(_BeforeAfterWrapper); + function Atc(props) { + (0, _classCallCheck3.default)(this, Atc); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var _this = (0, _possibleConstructorReturn3.default)(this, (Atc.__proto__ || (0, _getPrototypeOf2.default)(Atc)).call(this, props)); -var styles = { - before: { - content: "' '", - display: 'table' - }, - after: { - content: "' '", - clear: 'both', - display: 'table' + _this.state = { + createModalOpen: false + }; + return _this; } -}; -var ClearFix = function ClearFix(_ref) { - var style = _ref.style, - children = _ref.children, - other = (0, _objectWithoutProperties3.default)(_ref, ['style', 'children']); - return _react2.default.createElement( - _BeforeAfterWrapper2.default, - (0, _extends3.default)({}, other, { - beforeStyle: styles.before, - afterStyle: styles.after, - style: style - }), - children - ); -}; + (0, _createClass3.default)(Atc, [{ + key: 'requestCloseModal', + value: function requestCloseModal() { + this.setState({ + createModalOpen: false + }); + } + }, { + key: 'requestModalOpen', + value: function requestModalOpen() { + this.setState({ + createModalOpen: true + }); + } + }, { + key: 'onRequestDeleteAtc', + value: function onRequestDeleteAtc(atcName) { + this.props.removeAtcProduct(atcName); + } + }, { + key: 'handleSubmit', + value: function handleSubmit(data) { + this.requestCloseModal(); + this.props.addAtcProduct(data); + } + }, { + key: 'toggleAtc', + value: function toggleAtc(name, enabled) { + this.props.setAtcProductEnabled(name, enabled); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; -ClearFix.muiName = 'ClearFix'; + var atcProducts = this.props.atcProducts; - false ? ClearFix.propTypes = { - children: _react.PropTypes.node, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object -} : void 0; -exports.default = ClearFix; + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _Dialog2.default, + { + open: this.state.createModalOpen, + title: 'Add a new atc product', + modal: false, + onRequestClose: function onRequestClose() { + return _this2.requestCloseModal(); + } + }, + _react2.default.createElement(_AtcCreateForm2.default, { onRequestClose: function onRequestClose() { + return _this2.requestCloseModal(); + }, onSubmit: function onSubmit(data) { + return _this2.handleSubmit(data); + } }) + ), + _react2.default.createElement(_RaisedButton2.default, { label: 'Add new', onTouchTap: function onTouchTap() { + return _this2.requestModalOpen(); + }, primary: true }), + _react2.default.createElement( + _Table.Table, + { selectable: false }, + _react2.default.createElement( + _Table.TableHeader, + { displaySelectAll: false, adjustForCheckbox: false }, + _react2.default.createElement( + _Table.TableRow, + null, + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Name' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Keywords' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Color' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Category' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Enabled' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Delete' + ) + ) + ), + _react2.default.createElement( + _Table.TableBody, + { displayRowCheckbox: false, stripedRows: true }, + atcProducts.map(function (x) { + return _react2.default.createElement( + _Table.TableRow, + { key: x.name }, + _react2.default.createElement( + _Table.TableRowColumn, + null, + x.name + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + x.keywords.join(', ') + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + x.color || 'ANY' + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + x.category + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + _react2.default.createElement(_Toggle2.default, { toggled: x.enabled, onToggle: function onToggle() { + return _this2.toggleAtc(x.name, !x.enabled); + } }) + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + _react2.default.createElement( + _IconButton2.default, + { onTouchTap: function onTouchTap() { + return _this2.onRequestDeleteAtc(x.name); + } }, + _react2.default.createElement(_delete2.default, { color: _colors.red300 }) + ) + ) + ); + }) + ) + ) + ); + } + }]); + return Atc; +}(_react.Component); + +function mapStateToProps(state) { + return { + atcProducts: state.atc.atcProducts + }; +} + +function mapDispatchToProps(dispatch) { + return { + addAtcProduct: function addAtcProduct(data) { + return dispatch((0, _atc.addAtcProduct)(data)); + }, + removeAtcProduct: function removeAtcProduct(data) { + return dispatch((0, _atc.removeAtcProduct)(data)); + }, + setAtcProductEnabled: function setAtcProductEnabled(name, enabled) { + return dispatch((0, _atc.setAtcProductEnabled)(name, enabled)); + } + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Atc); /***/ }), -/* 821 */ +/* 823 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69250,10 +72217,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -69282,169 +72245,336 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * BeforeAfterWrapper - * An alternative for the ::before and ::after css pseudo-elements for - * components whose styles are defined in javascript instead of css. - * - * Usage: For the element that we want to apply before and after elements to, - * wrap its children with BeforeAfterWrapper. For example: - * - * - *
// See notice - * renders
// before element - * [children of paper] ------> [children of paper] - *
// after element - *
- * - * - * Notice: Notice that this div bundles together our elements. If the element - * that we want to apply before and after elements is a HTML tag (i.e. a - * div, p, or button tag), we can avoid this extra nesting by passing using - * the BeforeAfterWrapper in place of said tag like so: - * - *

- * do this instead - * [children of p] ------> [children of p] - * - *

- * - * BeforeAfterWrapper features spread functionality. This means that we can - * pass HTML tag properties directly into the BeforeAfterWrapper tag. - * - * When using BeforeAfterWrapper, ensure that the parent of the beforeElement - * and afterElement have a defined style position. - */ +function getStyles(props, context) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + table = _context$muiTheme.table; -var styles = { - box: { - boxSizing: 'border-box' - } -}; -var BeforeAfterWrapper = function (_Component) { - (0, _inherits3.default)(BeforeAfterWrapper, _Component); + return { + root: { + backgroundColor: table.backgroundColor, + width: '100%', + borderCollapse: 'collapse', + borderSpacing: 0, + tableLayout: 'fixed', + fontFamily: baseTheme.fontFamily + }, + bodyTable: { + height: props.fixedHeader || props.fixedFooter ? props.height : 'auto', + overflowX: 'hidden', + overflowY: 'auto' + }, + tableWrapper: { + height: props.fixedHeader || props.fixedFooter ? 'auto' : props.height, + overflow: 'auto' + } + }; +} - function BeforeAfterWrapper() { - (0, _classCallCheck3.default)(this, BeforeAfterWrapper); - return (0, _possibleConstructorReturn3.default)(this, (BeforeAfterWrapper.__proto__ || (0, _getPrototypeOf2.default)(BeforeAfterWrapper)).apply(this, arguments)); +var Table = function (_Component) { + (0, _inherits3.default)(Table, _Component); + + function Table() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Table); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Table.__proto__ || (0, _getPrototypeOf2.default)(Table)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + allRowsSelected: false + }, _this.onCellClick = function (rowNumber, columnNumber, event) { + if (_this.props.onCellClick) _this.props.onCellClick(rowNumber, columnNumber, event); + }, _this.onCellHover = function (rowNumber, columnNumber, event) { + if (_this.props.onCellHover) _this.props.onCellHover(rowNumber, columnNumber, event); + }, _this.onCellHoverExit = function (rowNumber, columnNumber, event) { + if (_this.props.onCellHoverExit) _this.props.onCellHoverExit(rowNumber, columnNumber, event); + }, _this.onRowHover = function (rowNumber) { + if (_this.props.onRowHover) _this.props.onRowHover(rowNumber); + }, _this.onRowHoverExit = function (rowNumber) { + if (_this.props.onRowHoverExit) _this.props.onRowHoverExit(rowNumber); + }, _this.onRowSelection = function (selectedRows) { + if (_this.state.allRowsSelected) _this.setState({ allRowsSelected: false }); + if (_this.props.onRowSelection) _this.props.onRowSelection(selectedRows); + }, _this.onSelectAll = function () { + if (_this.props.onRowSelection) { + if (!_this.state.allRowsSelected) { + _this.props.onRowSelection('all'); + } else { + _this.props.onRowSelection('none'); + } + } + + _this.setState({ allRowsSelected: !_this.state.allRowsSelected }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(BeforeAfterWrapper, [{ + (0, _createClass3.default)(Table, [{ + key: 'componentWillMount', + value: function componentWillMount() { + if (this.props.allRowsSelected) { + this.setState({ allRowsSelected: true }); + } + } + }, { + key: 'isScrollbarVisible', + value: function isScrollbarVisible() { + var tableDivHeight = this.refs.tableDiv.clientHeight; + var tableBodyHeight = this.refs.tableBody.clientHeight; + + return tableBodyHeight > tableDivHeight; + } + }, { + key: 'createTableHeader', + value: function createTableHeader(base) { + return _react2.default.cloneElement(base, { + enableSelectAll: base.props.enableSelectAll && this.props.selectable && this.props.multiSelectable, + onSelectAll: this.onSelectAll, + selectAllSelected: this.state.allRowsSelected + }); + } + }, { + key: 'createTableBody', + value: function createTableBody(base) { + return _react2.default.cloneElement(base, { + allRowsSelected: this.state.allRowsSelected, + multiSelectable: this.props.multiSelectable, + onCellClick: this.onCellClick, + onCellHover: this.onCellHover, + onCellHoverExit: this.onCellHoverExit, + onRowHover: this.onRowHover, + onRowHoverExit: this.onRowHoverExit, + onRowSelection: this.onRowSelection, + selectable: this.props.selectable, + style: (0, _simpleAssign2.default)({ height: this.props.height }, base.props.style) + }); + } + }, { + key: 'createTableFooter', + value: function createTableFooter(base) { + return base; + } + }, { key: 'render', value: function render() { + var _this2 = this; + var _props = this.props, - beforeStyle = _props.beforeStyle, - afterStyle = _props.afterStyle, - beforeElementType = _props.beforeElementType, - afterElementType = _props.afterElementType, - elementType = _props.elementType, - other = (0, _objectWithoutProperties3.default)(_props, ['beforeStyle', 'afterStyle', 'beforeElementType', 'afterElementType', 'elementType']); + children = _props.children, + className = _props.className, + fixedFooter = _props.fixedFooter, + fixedHeader = _props.fixedHeader, + style = _props.style, + wrapperStyle = _props.wrapperStyle, + headerStyle = _props.headerStyle, + bodyStyle = _props.bodyStyle, + footerStyle = _props.footerStyle; var prepareStyles = this.context.muiTheme.prepareStyles; + var styles = getStyles(this.props, this.context); - var beforeElement = void 0; - var afterElement = void 0; + var tHead = void 0; + var tFoot = void 0; + var tBody = void 0; - if (beforeStyle) { - beforeElement = _react2.default.createElement(this.props.beforeElementType, { - style: prepareStyles((0, _simpleAssign2.default)({}, styles.box, beforeStyle)), - key: '::before' - }); - } + _react2.default.Children.forEach(children, function (child) { + if (!_react2.default.isValidElement(child)) return; - if (afterStyle) { - afterElement = _react2.default.createElement(this.props.afterElementType, { - style: prepareStyles((0, _simpleAssign2.default)({}, styles.box, afterStyle)), - key: '::after' - }); - } + var muiName = child.type.muiName; - var children = [beforeElement, this.props.children, afterElement]; + if (muiName === 'TableBody') { + tBody = _this2.createTableBody(child); + } else if (muiName === 'TableHeader') { + tHead = _this2.createTableHeader(child); + } else if (muiName === 'TableFooter') { + tFoot = _this2.createTableFooter(child); + } else { + false ? (0, _warning2.default)(false, 'Material-UI: Children of the Table component must be TableBody or TableHeader or TableFooter.\n Nothing is rendered.') : void 0; + } + }); - var props = other; - props.style = prepareStyles((0, _simpleAssign2.default)({}, this.props.style)); + // If we could not find a table-header and a table-body, do not attempt to display anything. + if (!tBody && !tHead) return null; - return _react2.default.createElement(this.props.elementType, props, children); + var mergedTableStyle = (0, _simpleAssign2.default)(styles.root, style); + var headerTable = void 0; + var footerTable = void 0; + var inlineHeader = void 0; + var inlineFooter = void 0; + + if (fixedHeader) { + headerTable = _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, headerStyle)) }, + _react2.default.createElement( + 'table', + { className: className, style: mergedTableStyle }, + tHead + ) + ); + } else { + inlineHeader = tHead; + } + + if (tFoot !== undefined) { + if (fixedFooter) { + footerTable = _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, footerStyle)) }, + _react2.default.createElement( + 'table', + { className: className, style: prepareStyles(mergedTableStyle) }, + tFoot + ) + ); + } else { + inlineFooter = tFoot; + } + } + + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.tableWrapper, wrapperStyle)) }, + headerTable, + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.bodyTable, bodyStyle)), ref: 'tableDiv' }, + _react2.default.createElement( + 'table', + { className: className, style: mergedTableStyle, ref: 'tableBody' }, + inlineHeader, + inlineFooter, + tBody + ) + ), + footerTable + ); } }]); - return BeforeAfterWrapper; + return Table; }(_react.Component); -BeforeAfterWrapper.defaultProps = { - beforeElementType: 'div', - afterElementType: 'div', - elementType: 'div' +Table.defaultProps = { + allRowsSelected: false, + fixedFooter: true, + fixedHeader: true, + height: 'inherit', + multiSelectable: false, + selectable: true }; -BeforeAfterWrapper.contextTypes = { +Table.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? BeforeAfterWrapper.propTypes = { - afterElementType: _react.PropTypes.string, - afterStyle: _react.PropTypes.object, - beforeElementType: _react.PropTypes.string, - beforeStyle: _react.PropTypes.object, + false ? Table.propTypes = { + /** + * Set to true to indicate that all rows should be selected. + */ + allRowsSelected: _react.PropTypes.bool, + /** + * Override the inline-styles of the body's table element. + */ + bodyStyle: _react.PropTypes.object, + /** + * Children passed to table. + */ children: _react.PropTypes.node, - elementType: _react.PropTypes.string, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the footer will appear fixed below the table. + * The default value is true. + */ + fixedFooter: _react.PropTypes.bool, + /** + * If true, the header will appear fixed above the table. + * The default value is true. + */ + fixedHeader: _react.PropTypes.bool, + /** + * Override the inline-styles of the footer's table element. + */ + footerStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the header's table element. + */ + headerStyle: _react.PropTypes.object, + /** + * The height of the table. + */ + height: _react.PropTypes.string, + /** + * If true, multiple table rows can be selected. + * CTRL/CMD+Click and SHIFT+Click are valid actions. + * The default value is false. + */ + multiSelectable: _react.PropTypes.bool, + /** + * Called when a row cell is clicked. + * rowNumber is the row number and columnId is + * the column number or the column key. + */ + onCellClick: _react.PropTypes.func, + /** + * Called when a table cell is hovered. + * rowNumber is the row number of the hovered row + * and columnId is the column number or the column key of the cell. + */ + onCellHover: _react.PropTypes.func, + /** + * Called when a table cell is no longer hovered. + * rowNumber is the row number of the row and columnId + * is the column number or the column key of the cell. + */ + onCellHoverExit: _react.PropTypes.func, + /** + * Called when a table row is hovered. + * rowNumber is the row number of the hovered row. + */ + onRowHover: _react.PropTypes.func, + /** + * Called when a table row is no longer hovered. + * rowNumber is the row number of the row that is no longer hovered. + */ + onRowHoverExit: _react.PropTypes.func, + /** + * Called when a row is selected. + * selectedRows is an array of all row selections. + * IF all rows have been selected, the string "all" + * will be returned instead to indicate that all rows have been selected. + */ + onRowSelection: _react.PropTypes.func, + /** + * If true, table rows can be selected. + * If multiple row selection is desired, enable multiSelectable. + * The default value is true. + */ + selectable: _react.PropTypes.bool, /** * Override the inline-styles of the root element. */ - style: _react.PropTypes.object + style: _react.PropTypes.object, + /** + * Override the inline-styles of the table's wrapper element. + */ + wrapperStyle: _react.PropTypes.object } : void 0; -exports.default = BeforeAfterWrapper; - -/***/ }), -/* 822 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _Slider = __webpack_require__(823); - -var _Slider2 = _interopRequireDefault(_Slider); - -var _createComponent = __webpack_require__(43); - -var _createComponent2 = _interopRequireDefault(_createComponent); - -var _mapError = __webpack_require__(60); - -var _mapError2 = _interopRequireDefault(_mapError); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -exports.default = (0, _createComponent2.default)(_Slider2.default, function (_ref) { - var _ref$input = _ref.input, - onDragStart = _ref$input.onDragStart, - _onChange = _ref$input.onChange, - inputProps = _objectWithoutProperties(_ref$input, ['onDragStart', 'onChange']), - onChangeFromField = _ref.onChange, - defaultValue = _ref.defaultValue, - props = _objectWithoutProperties(_ref, ['input', 'onChange', 'defaultValue']); - - return _extends({}, (0, _mapError2.default)(_extends({}, props, { input: inputProps }), 'error'), { - onChange: function onChange(event, value) { - _onChange(value); - if (onChangeFromField) { - onChangeFromField(value); - } - } - }); -}); +exports.default = Table; /***/ }), -/* 823 */ +/* 824 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69453,35 +72583,23 @@ exports.default = (0, _createComponent2.default)(_Slider2.default, function (_re Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = undefined; - -var _Slider = __webpack_require__(824); -var _Slider2 = _interopRequireDefault(_Slider); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _getIterator2 = __webpack_require__(335); -exports.default = _Slider2.default; +var _getIterator3 = _interopRequireDefault(_getIterator2); -/***/ }), -/* 824 */ -/***/ (function(module, exports, __webpack_require__) { +var _toConsumableArray2 = __webpack_require__(95); -"use strict"; +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); +var _typeof2 = __webpack_require__(61); -Object.defineProperty(exports, "__esModule", { - value: true -}); +var _typeof3 = _interopRequireDefault(_typeof2); var _extends2 = __webpack_require__(7); var _extends3 = _interopRequireDefault(_extends2); -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -69502,10 +72620,6 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _defineProperty2 = __webpack_require__(825); - -var _defineProperty3 = _interopRequireDefault(_defineProperty2); - var _simpleAssign = __webpack_require__(6); var _simpleAssign2 = _interopRequireDefault(_simpleAssign); @@ -69514,808 +72628,482 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _keycode = __webpack_require__(30); - -var _keycode2 = _interopRequireDefault(_keycode); - -var _warning = __webpack_require__(17); - -var _warning2 = _interopRequireDefault(_warning); - -var _transitions = __webpack_require__(10); +var _Checkbox = __webpack_require__(207); -var _transitions2 = _interopRequireDefault(_transitions); +var _Checkbox2 = _interopRequireDefault(_Checkbox); -var _FocusRipple = __webpack_require__(197); +var _TableRowColumn = __webpack_require__(211); -var _FocusRipple2 = _interopRequireDefault(_FocusRipple); +var _TableRowColumn2 = _interopRequireDefault(_TableRowColumn); -var _deprecatedPropType = __webpack_require__(826); +var _ClickAwayListener = __webpack_require__(206); -var _deprecatedPropType2 = _interopRequireDefault(_deprecatedPropType); +var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * Verifies min/max range. - * @param {Object} props Properties of the React component. - * @param {String} propName Name of the property to validate. - * @param {String} componentName Name of the component whose property is being validated. - * @returns {Object} Returns an Error if min >= max otherwise null. - */ -var minMaxPropType = function minMaxPropType(props, propName, componentName) { - for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { - rest[_key - 3] = arguments[_key]; - } - - var error = _react.PropTypes.number.apply(_react.PropTypes, [props, propName, componentName].concat(rest)); - if (error !== null) { - return error; - } - - if (props.min >= props.max) { - var errorMsg = propName === 'min' ? 'min should be less than max' : 'max should be greater than min'; - return new Error(errorMsg); - } -}; - -/** - * Verifies value is within the min/max range. - * @param {Object} props Properties of the React component. - * @param {String} propName Name of the property to validate. - * @param {String} componentName Name of the component whose property is being validated. - * @returns {Object} Returns an Error if the value is not within the range otherwise null. - */ -var valueInRangePropType = function valueInRangePropType(props, propName, componentName) { - for (var _len2 = arguments.length, rest = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) { - rest[_key2 - 3] = arguments[_key2]; - } - - var error = _react.PropTypes.number.apply(_react.PropTypes, [props, propName, componentName].concat(rest)); - if (error !== null) { - return error; - } - - var value = props[propName]; - if (value < props.min || props.max < value) { - return new Error(propName + ' should be within the range specified by min and max'); - } -}; - -var crossAxisProperty = { - x: 'height', - 'x-reverse': 'height', - y: 'width', - 'y-reverse': 'width' -}; - -var crossAxisOffsetProperty = { - x: 'top', - 'x-reverse': 'top', - y: 'left', - 'y-reverse': 'left' -}; - -var mainAxisProperty = { - x: 'width', - 'x-reverse': 'width', - y: 'height', - 'y-reverse': 'height' -}; - -var mainAxisMarginFromEnd = { - x: 'marginRight', - 'x-reverse': 'marginLeft', - y: 'marginTop', - 'y-reverse': 'marginBottom' -}; - -var mainAxisMarginFromStart = { - x: 'marginLeft', - 'x-reverse': 'marginRight', - y: 'marginBottom', - 'y-reverse': 'marginTop' -}; - -var mainAxisOffsetProperty = { - x: 'left', - 'x-reverse': 'right', - y: 'bottom', - 'y-reverse': 'top' -}; - -var mainAxisClientProperty = { - x: 'clientWidth', - 'x-reverse': 'clientWidth', - y: 'clientHeight', - 'y-reverse': 'clientHeight' -}; - -var mainAxisClientOffsetProperty = { - x: 'clientX', - 'x-reverse': 'clientX', - y: 'clientY', - 'y-reverse': 'clientY' -}; - -var reverseMainAxisOffsetProperty = { - x: 'right', - 'x-reverse': 'left', - y: 'top', - 'y-reverse': 'bottom' -}; - -var isMouseControlInverted = function isMouseControlInverted(axis) { - return axis === 'x-reverse' || axis === 'y'; -}; - -function getPercent(value, min, max) { - var percent = (value - min) / (max - min); - if (isNaN(percent)) { - percent = 0; - } - - return percent; -} - -var getStyles = function getStyles(props, context, state) { - var _slider, _track, _filledAndRemaining, _handle, _objectAssign2, _objectAssign3; - - var axis = props.axis, - disabled = props.disabled, - max = props.max, - min = props.min; - var _context$muiTheme$sli = context.muiTheme.slider, - handleColorZero = _context$muiTheme$sli.handleColorZero, - handleFillColor = _context$muiTheme$sli.handleFillColor, - handleSize = _context$muiTheme$sli.handleSize, - handleSizeDisabled = _context$muiTheme$sli.handleSizeDisabled, - handleSizeActive = _context$muiTheme$sli.handleSizeActive, - trackSize = _context$muiTheme$sli.trackSize, - trackColor = _context$muiTheme$sli.trackColor, - trackColorSelected = _context$muiTheme$sli.trackColorSelected, - rippleColor = _context$muiTheme$sli.rippleColor, - selectionColor = _context$muiTheme$sli.selectionColor; - - - var fillGutter = handleSize / 2; - var disabledGutter = trackSize + handleSizeDisabled / 2; - var calcDisabledSpacing = disabled ? ' - ' + disabledGutter + 'px' : ''; - var percent = getPercent(state.value, min, max); - - var styles = { - slider: (_slider = { - touchCallout: 'none', - userSelect: 'none', - cursor: 'default' - }, (0, _defineProperty3.default)(_slider, crossAxisProperty[axis], handleSizeActive), (0, _defineProperty3.default)(_slider, mainAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_slider, 'position', 'relative'), (0, _defineProperty3.default)(_slider, 'marginTop', 24), (0, _defineProperty3.default)(_slider, 'marginBottom', 48), _slider), - track: (_track = { - position: 'absolute' - }, (0, _defineProperty3.default)(_track, crossAxisOffsetProperty[axis], (handleSizeActive - trackSize) / 2), (0, _defineProperty3.default)(_track, mainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_track, mainAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_track, crossAxisProperty[axis], trackSize), _track), - filledAndRemaining: (_filledAndRemaining = { - position: 'absolute' - }, (0, _defineProperty3.default)(_filledAndRemaining, crossAxisOffsetProperty, 0), (0, _defineProperty3.default)(_filledAndRemaining, crossAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_filledAndRemaining, 'transition', _transitions2.default.easeOut(null, 'margin')), _filledAndRemaining), - handle: (_handle = { - boxSizing: 'border-box', - position: 'absolute', - cursor: 'pointer', - pointerEvents: 'inherit' - }, (0, _defineProperty3.default)(_handle, crossAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_handle, mainAxisOffsetProperty[axis], percent === 0 ? '0%' : percent * 100 + '%'), (0, _defineProperty3.default)(_handle, 'zIndex', 1), (0, _defineProperty3.default)(_handle, 'margin', { - x: trackSize / 2 + 'px 0 0 0', - 'x-reverse': trackSize / 2 + 'px 0 0 0', - y: '0 0 0 ' + trackSize / 2 + 'px', - 'y-reverse': '0 0 0 ' + trackSize / 2 + 'px' - }[axis]), (0, _defineProperty3.default)(_handle, 'width', handleSize), (0, _defineProperty3.default)(_handle, 'height', handleSize), (0, _defineProperty3.default)(_handle, 'backgroundColor', selectionColor), (0, _defineProperty3.default)(_handle, 'backgroundClip', 'padding-box'), (0, _defineProperty3.default)(_handle, 'border', '0px solid transparent'), (0, _defineProperty3.default)(_handle, 'borderRadius', '50%'), (0, _defineProperty3.default)(_handle, 'transform', { - x: 'translate(-50%, -50%)', - 'x-reverse': 'translate(50%, -50%)', - y: 'translate(-50%, 50%)', - 'y-reverse': 'translate(-50%, -50%)' - }[axis]), (0, _defineProperty3.default)(_handle, 'transition', _transitions2.default.easeOut('450ms', 'background') + ', ' + _transitions2.default.easeOut('450ms', 'border-color') + ', ' + _transitions2.default.easeOut('450ms', 'width') + ', ' + _transitions2.default.easeOut('450ms', 'height')), (0, _defineProperty3.default)(_handle, 'overflow', 'visible'), (0, _defineProperty3.default)(_handle, 'outline', 'none'), _handle), - handleWhenDisabled: { - boxSizing: 'content-box', - cursor: 'not-allowed', - backgroundColor: trackColor, - width: handleSizeDisabled, - height: handleSizeDisabled, - border: 'none' - }, - handleWhenPercentZero: { - border: trackSize + 'px solid ' + handleColorZero, - backgroundColor: handleFillColor, - boxShadow: 'none' - }, - handleWhenPercentZeroAndDisabled: { - cursor: 'not-allowed', - width: handleSizeDisabled, - height: handleSizeDisabled - }, - handleWhenPercentZeroAndFocused: { - border: trackSize + 'px solid ' + trackColorSelected - }, - handleWhenActive: { - width: handleSizeActive, - height: handleSizeActive - }, - ripple: { - height: handleSize, - width: handleSize, - overflow: 'visible' - }, - rippleWhenPercentZero: { - top: -trackSize, - left: -trackSize - }, - rippleInner: { - height: '300%', - width: '300%', - top: -handleSize, - left: -handleSize - }, - rippleColor: { - fill: percent === 0 ? handleColorZero : rippleColor - } - }; - styles.filled = (0, _simpleAssign2.default)({}, styles.filledAndRemaining, (_objectAssign2 = {}, (0, _defineProperty3.default)(_objectAssign2, mainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_objectAssign2, 'backgroundColor', disabled ? trackColor : selectionColor), (0, _defineProperty3.default)(_objectAssign2, mainAxisMarginFromEnd[axis], fillGutter), (0, _defineProperty3.default)(_objectAssign2, mainAxisProperty[axis], 'calc(' + percent * 100 + '%' + calcDisabledSpacing + ')'), _objectAssign2)); - styles.remaining = (0, _simpleAssign2.default)({}, styles.filledAndRemaining, (_objectAssign3 = {}, (0, _defineProperty3.default)(_objectAssign3, reverseMainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_objectAssign3, 'backgroundColor', (state.hovered || state.focused) && !disabled ? trackColorSelected : trackColor), (0, _defineProperty3.default)(_objectAssign3, mainAxisMarginFromStart[axis], fillGutter), (0, _defineProperty3.default)(_objectAssign3, mainAxisProperty[axis], 'calc(' + (1 - percent) * 100 + '%' + calcDisabledSpacing + ')'), _objectAssign3)); - - return styles; -}; - -var Slider = function (_Component) { - (0, _inherits3.default)(Slider, _Component); +var TableBody = function (_Component) { + (0, _inherits3.default)(TableBody, _Component); - function Slider() { + function TableBody() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, Slider); - - for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - args[_key3] = arguments[_key3]; - } - - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Slider.__proto__ || (0, _getPrototypeOf2.default)(Slider)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - active: false, - dragging: false, - focused: false, - hovered: false, - value: 0 - }, _this.track = null, _this.handle = null, _this.handleKeyDown = function (event) { - var _this$props = _this.props, - axis = _this$props.axis, - min = _this$props.min, - max = _this$props.max, - step = _this$props.step; - - - var action = void 0; - - switch ((0, _keycode2.default)(event)) { - case 'page down': - case 'down': - if (axis === 'y-reverse') { - action = 'increase'; - } else { - action = 'decrease'; - } - break; - case 'left': - if (axis === 'x-reverse') { - action = 'increase'; - } else { - action = 'decrease'; - } - break; - case 'page up': - case 'up': - if (axis === 'y-reverse') { - action = 'decrease'; - } else { - action = 'increase'; - } - break; - case 'right': - if (axis === 'x-reverse') { - action = 'decrease'; - } else { - action = 'increase'; - } - break; - case 'home': - action = 'min'; - break; - case 'end': - action = 'max'; - break; - } - - if (action) { - var newValue = void 0; - - // Cancel scroll - event.preventDefault(); - - switch (action) { - case 'decrease': - newValue = _this.state.value - step; - break; - case 'increase': - newValue = _this.state.value + step; - break; - case 'min': - newValue = min; - break; - case 'max': - newValue = max; - break; - } - - // We need to use toFixed() because of float point errors. - // For example, 0.01 + 0.06 = 0.06999999999999999 - newValue = parseFloat(newValue.toFixed(5)); - - if (newValue > max) { - newValue = max; - } else if (newValue < min) { - newValue = min; - } - - if (_this.state.value !== newValue) { - _this.setState({ - value: newValue - }); - - if (_this.props.onChange) { - _this.props.onChange(event, newValue); - } - } - } - }, _this.handleDragMouseMove = function (event) { - _this.onDragUpdate(event, 'mouse'); - }, _this.handleTouchMove = function (event) { - _this.onDragUpdate(event, 'touch'); - }, _this.handleMouseEnd = function (event) { - document.removeEventListener('mousemove', _this.handleDragMouseMove); - document.removeEventListener('mouseup', _this.handleMouseEnd); - - _this.onDragStop(event); - }, _this.handleTouchEnd = function (event) { - document.removeEventListener('touchmove', _this.handleTouchMove); - document.removeEventListener('touchup', _this.handleTouchEnd); - document.removeEventListener('touchend', _this.handleTouchEnd); - document.removeEventListener('touchcancel', _this.handleTouchEnd); - - _this.onDragStop(event); - }, _this.handleTouchStart = function (event) { - if (_this.props.disabled) { - return; - } - - var position = void 0; - if (isMouseControlInverted(_this.props.axis)) { - position = _this.getTrackOffset() - event.touches[0][mainAxisClientOffsetProperty[_this.props.axis]]; - } else { - position = event.touches[0][mainAxisClientOffsetProperty[_this.props.axis]] - _this.getTrackOffset(); - } - _this.setValueFromPosition(event, position); - - document.addEventListener('touchmove', _this.handleTouchMove); - document.addEventListener('touchup', _this.handleTouchEnd); - document.addEventListener('touchend', _this.handleTouchEnd); - document.addEventListener('touchcancel', _this.handleTouchEnd); - - _this.onDragStart(event); - - // Cancel scroll and context menu - event.preventDefault(); - }, _this.handleFocus = function (event) { - _this.setState({ - focused: true - }); - - if (_this.props.onFocus) { - _this.props.onFocus(event); - } - }, _this.handleBlur = function (event) { - _this.setState({ - focused: false, - active: false - }); - - if (_this.props.onBlur) { - _this.props.onBlur(event); - } - }, _this.handleMouseDown = function (event) { - if (_this.props.disabled) { - return; - } - - var position = void 0; - if (isMouseControlInverted(_this.props.axis)) { - position = _this.getTrackOffset() - event[mainAxisClientOffsetProperty[_this.props.axis]]; - } else { - position = event[mainAxisClientOffsetProperty[_this.props.axis]] - _this.getTrackOffset(); - } - _this.setValueFromPosition(event, position); - - document.addEventListener('mousemove', _this.handleDragMouseMove); - document.addEventListener('mouseup', _this.handleMouseEnd); - - // Cancel text selection - event.preventDefault(); - - // Set focus manually since we called preventDefault() - _this.handle.focus(); + (0, _classCallCheck3.default)(this, TableBody); - _this.onDragStart(event); - }, _this.handleMouseUp = function () { - if (!_this.props.disabled) { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableBody.__proto__ || (0, _getPrototypeOf2.default)(TableBody)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + selectedRows: [] + }, _this.handleClickAway = function () { + if (_this.props.deselectOnClickaway && _this.state.selectedRows.length) { _this.setState({ - active: false + selectedRows: [] }); + if (_this.props.onRowSelection) { + _this.props.onRowSelection([]); + } + } + }, _this.onRowClick = function (event, rowNumber) { + event.stopPropagation(); + + if (_this.props.selectable) { + // Prevent text selection while selecting rows. + window.getSelection().removeAllRanges(); + _this.processRowSelection(event, rowNumber); + } + }, _this.onCellClick = function (event, rowNumber, columnNumber) { + event.stopPropagation(); + if (_this.props.onCellClick) { + _this.props.onCellClick(rowNumber, _this.getColumnId(columnNumber), event); + } + }, _this.onCellHover = function (event, rowNumber, columnNumber) { + if (_this.props.onCellHover) { + _this.props.onCellHover(rowNumber, _this.getColumnId(columnNumber), event); + } + _this.onRowHover(event, rowNumber); + }, _this.onCellHoverExit = function (event, rowNumber, columnNumber) { + if (_this.props.onCellHoverExit) { + _this.props.onCellHoverExit(rowNumber, _this.getColumnId(columnNumber), event); + } + _this.onRowHoverExit(event, rowNumber); + }, _this.onRowHover = function (event, rowNumber) { + if (_this.props.onRowHover) { + _this.props.onRowHover(rowNumber); + } + }, _this.onRowHoverExit = function (event, rowNumber) { + if (_this.props.onRowHoverExit) { + _this.props.onRowHoverExit(rowNumber); } - }, _this.handleMouseEnter = function () { - _this.setState({ - hovered: true - }); - }, _this.handleMouseLeave = function () { - _this.setState({ - hovered: false - }); }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(Slider, [{ + (0, _createClass3.default)(TableBody, [{ key: 'componentWillMount', value: function componentWillMount() { - var _props = this.props, - valueProp = _props.value, - defaultValue = _props.defaultValue, - min = _props.min, - max = _props.max; - - - var value = valueProp; - if (value === undefined) { - value = defaultValue !== undefined ? defaultValue : min; - } - - if (value > max) { - value = max; - } else if (value < min) { - value = min; - } - - this.setState({ - value: value - }); + this.setState({ selectedRows: this.calculatePreselectedRows(this.props) }); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { - if (nextProps.value !== undefined && !this.state.dragging) { - this.setState({ - value: nextProps.value - }); + if (this.props.allRowsSelected !== nextProps.allRowsSelected) { + if (!nextProps.allRowsSelected) { + this.setState({ + selectedRows: [] + }); + } else { + this.setState({ + selectedRows: this.calculatePreselectedRows(nextProps) + }); + } } } }, { - key: 'getValue', - value: function getValue() { - false ? (0, _warning2.default)(false, 'Material-UI Slider: getValue() method is deprecated.\n Use the onChange callbacks instead.\n It will be removed with v0.17.0.') : void 0; + key: 'createRows', + value: function createRows() { + var _this2 = this; - return this.state.value; + var numChildren = _react2.default.Children.count(this.props.children); + var rowNumber = 0; + var handlers = { + onCellClick: this.onCellClick, + onCellHover: this.onCellHover, + onCellHoverExit: this.onCellHoverExit, + onRowHover: this.onRowHover, + onRowHoverExit: this.onRowHoverExit, + onRowClick: this.onRowClick + }; + + return _react2.default.Children.map(this.props.children, function (child) { + if (_react2.default.isValidElement(child)) { + var _ret2 = function () { + var props = { + hoverable: _this2.props.showRowHover, + selected: _this2.isRowSelected(rowNumber), + striped: _this2.props.stripedRows && rowNumber % 2 === 0, + rowNumber: rowNumber++ + }; + + if (rowNumber === numChildren) { + props.displayBorder = false; + } + + var children = [_this2.createRowCheckboxColumn(props)]; + + _react2.default.Children.forEach(child.props.children, function (child) { + children.push(child); + }); + + return { + v: _react2.default.cloneElement(child, (0, _extends3.default)({}, props, handlers), children) + }; + }(); + + if ((typeof _ret2 === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret2)) === "object") return _ret2.v; + } + }); } }, { - key: 'clearValue', - value: function clearValue() { - false ? (0, _warning2.default)(false, 'Material-UI Slider: clearValue() method is deprecated.\n Use the value property to control the component instead.\n It will be removed with v0.17.0.') : void 0; + key: 'createRowCheckboxColumn', + value: function createRowCheckboxColumn(rowProps) { + if (!this.props.displayRowCheckbox) { + return null; + } - this.setState({ - value: this.props.min + var key = rowProps.rowNumber + '-cb'; + var disabled = !this.props.selectable; + var checkbox = _react2.default.createElement(_Checkbox2.default, { + ref: 'rowSelectCB', + name: key, + value: 'selected', + disabled: disabled, + checked: rowProps.selected }); + + return _react2.default.createElement( + _TableRowColumn2.default, + { + key: key, + columnNumber: 0, + style: { + width: 24, + cursor: disabled ? 'not-allowed' : 'inherit' + } + }, + checkbox + ); } }, { - key: 'getTrackOffset', - value: function getTrackOffset() { - return this.track.getBoundingClientRect()[mainAxisOffsetProperty[this.props.axis]]; + key: 'calculatePreselectedRows', + value: function calculatePreselectedRows(props) { + // Determine what rows are 'pre-selected'. + var preSelectedRows = []; + + if (props.selectable && props.preScanRows) { + (function () { + var index = 0; + _react2.default.Children.forEach(props.children, function (child) { + if (_react2.default.isValidElement(child)) { + if (child.props.selected && (preSelectedRows.length === 0 || props.multiSelectable)) { + preSelectedRows.push(index); + } + + index++; + } + }); + })(); + } + + return preSelectedRows; } }, { - key: 'onDragStart', - value: function onDragStart(event) { - this.setState({ - dragging: true, - active: true - }); + key: 'isRowSelected', + value: function isRowSelected(rowNumber) { + if (this.props.allRowsSelected) { + return true; + } - if (this.props.onDragStart) { - this.props.onDragStart(event); + for (var i = 0; i < this.state.selectedRows.length; i++) { + var selection = this.state.selectedRows[i]; + + if ((typeof selection === 'undefined' ? 'undefined' : (0, _typeof3.default)(selection)) === 'object') { + if (this.isValueInRange(rowNumber, selection)) return true; + } else { + if (selection === rowNumber) return true; + } } + + return false; } }, { - key: 'onDragUpdate', - value: function onDragUpdate(event, type) { - var _this2 = this; + key: 'isValueInRange', + value: function isValueInRange(value, range) { + if (!range) return false; - if (this.dragRunning) { - return; + if (range.start <= value && value <= range.end || range.end <= value && value <= range.start) { + return true; } - this.dragRunning = true; - requestAnimationFrame(function () { - _this2.dragRunning = false; + return false; + } + }, { + key: 'processRowSelection', + value: function processRowSelection(event, rowNumber) { + var selectedRows = this.state.selectedRows; - var source = type === 'touch' ? event.touches[0] : event; + if (event.shiftKey && this.props.multiSelectable && selectedRows.length) { + var lastIndex = selectedRows.length - 1; + var lastSelection = selectedRows[lastIndex]; - var position = void 0; - if (isMouseControlInverted(_this2.props.axis)) { - position = _this2.getTrackOffset() - source[mainAxisClientOffsetProperty[_this2.props.axis]]; + if ((typeof lastSelection === 'undefined' ? 'undefined' : (0, _typeof3.default)(lastSelection)) === 'object') { + lastSelection.end = rowNumber; } else { - position = source[mainAxisClientOffsetProperty[_this2.props.axis]] - _this2.getTrackOffset(); + selectedRows.splice(lastIndex, 1, { start: lastSelection, end: rowNumber }); } + } else if ((event.ctrlKey && !event.metaKey || event.metaKey && !event.ctrlKey) && this.props.multiSelectable) { + var idx = selectedRows.indexOf(rowNumber); + if (idx < 0) { + var foundRange = false; + for (var i = 0; i < selectedRows.length; i++) { + var range = selectedRows[i]; + if ((typeof range === 'undefined' ? 'undefined' : (0, _typeof3.default)(range)) !== 'object') continue; + + if (this.isValueInRange(rowNumber, range)) { + var _selectedRows; + + foundRange = true; + var values = this.splitRange(range, rowNumber); + (_selectedRows = selectedRows).splice.apply(_selectedRows, [i, 1].concat((0, _toConsumableArray3.default)(values))); + } + } - if (!_this2.props.disabled) { - _this2.setValueFromPosition(event, position); + if (!foundRange) selectedRows.push(rowNumber); + } else { + selectedRows.splice(idx, 1); } - }); + } else { + if (selectedRows.length === 1 && selectedRows[0] === rowNumber) { + selectedRows = []; + } else { + selectedRows = [rowNumber]; + } + } + + this.setState({ selectedRows: selectedRows }); + if (this.props.onRowSelection) this.props.onRowSelection(this.flattenRanges(selectedRows)); } }, { - key: 'onDragStop', - value: function onDragStop(event) { - this.setState({ - dragging: false, - active: false - }); + key: 'splitRange', + value: function splitRange(range, splitPoint) { + var splitValues = []; + var startOffset = range.start - splitPoint; + var endOffset = range.end - splitPoint; - if (this.props.onDragStop) { - this.props.onDragStop(event); - } + // Process start half + splitValues.push.apply(splitValues, (0, _toConsumableArray3.default)(this.genRangeOfValues(splitPoint, startOffset))); + + // Process end half + splitValues.push.apply(splitValues, (0, _toConsumableArray3.default)(this.genRangeOfValues(splitPoint, endOffset))); + + return splitValues; } }, { - key: 'setValueFromPosition', - value: function setValueFromPosition(event, position) { - var positionMax = this.track[mainAxisClientProperty[this.props.axis]]; - if (position < 0) { - position = 0; - } else if (position > positionMax) { - position = positionMax; + key: 'genRangeOfValues', + value: function genRangeOfValues(start, offset) { + var values = []; + var dir = offset > 0 ? -1 : 1; // This forces offset to approach 0 from either direction. + while (offset !== 0) { + values.push(start + offset); + offset += dir; } - var _props2 = this.props, - step = _props2.step, - min = _props2.min, - max = _props2.max; - + return values; + } + }, { + key: 'flattenRanges', + value: function flattenRanges(selectedRows) { + var rows = []; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; - var value = void 0; - value = position / positionMax * (max - min); - value = Math.round(value / step) * step + min; - value = parseFloat(value.toFixed(5)); + try { + for (var _iterator = (0, _getIterator3.default)(selectedRows), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var selection = _step.value; - if (value > max) { - value = max; - } else if (value < min) { - value = min; + if ((typeof selection === 'undefined' ? 'undefined' : (0, _typeof3.default)(selection)) === 'object') { + var values = this.genRangeOfValues(selection.end, selection.start - selection.end); + rows.push.apply(rows, [selection.end].concat((0, _toConsumableArray3.default)(values))); + } else { + rows.push(selection); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } } - if (this.state.value !== value) { - this.setState({ - value: value - }); - - if (this.props.onChange) { - this.props.onChange(event, value); - } + return rows.sort(); + } + }, { + key: 'getColumnId', + value: function getColumnId(columnNumber) { + var columnId = columnNumber; + if (this.props.displayRowCheckbox) { + columnId--; } + + return columnId; } }, { key: 'render', value: function render() { - var _this3 = this; - - var _props3 = this.props, - axis = _props3.axis, - description = _props3.description, - disabled = _props3.disabled, - disableFocusRipple = _props3.disableFocusRipple, - error = _props3.error, - max = _props3.max, - min = _props3.min, - name = _props3.name, - onBlur = _props3.onBlur, - onChange = _props3.onChange, - onDragStart = _props3.onDragStart, - onDragStop = _props3.onDragStop, - onFocus = _props3.onFocus, - required = _props3.required, - sliderStyle = _props3.sliderStyle, - step = _props3.step, - style = _props3.style, - other = (0, _objectWithoutProperties3.default)(_props3, ['axis', 'description', 'disabled', 'disableFocusRipple', 'error', 'max', 'min', 'name', 'onBlur', 'onChange', 'onDragStart', 'onDragStop', 'onFocus', 'required', 'sliderStyle', 'step', 'style']); - var _state = this.state, - active = _state.active, - focused = _state.focused, - hovered = _state.hovered, - value = _state.value; + var _props = this.props, + className = _props.className, + style = _props.style; var prepareStyles = this.context.muiTheme.prepareStyles; - var styles = getStyles(this.props, this.context, this.state); - var percent = getPercent(value, min, max); - - var handleStyles = {}; - if (percent === 0) { - handleStyles = (0, _simpleAssign2.default)({}, styles.handle, styles.handleWhenPercentZero, active && styles.handleWhenActive, (hovered || focused) && !disabled && styles.handleWhenPercentZeroAndFocused, disabled && styles.handleWhenPercentZeroAndDisabled); - } else { - handleStyles = (0, _simpleAssign2.default)({}, styles.handle, active && styles.handleWhenActive, disabled && styles.handleWhenDisabled); - } - - var rippleStyle = (0, _simpleAssign2.default)({}, styles.ripple, percent === 0 && styles.rippleWhenPercentZero); return _react2.default.createElement( - 'div', - (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, style)) }), - _react2.default.createElement( - 'span', - null, - description - ), - _react2.default.createElement( - 'span', - null, - error - ), + _ClickAwayListener2.default, + { onClickAway: this.handleClickAway }, _react2.default.createElement( - 'div', - { - style: prepareStyles((0, _simpleAssign2.default)({}, styles.slider, sliderStyle)), - onFocus: this.handleFocus, - onBlur: this.handleBlur, - onMouseDown: this.handleMouseDown, - onMouseEnter: this.handleMouseEnter, - onMouseLeave: this.handleMouseLeave, - onMouseUp: this.handleMouseUp, - onTouchStart: this.handleTouchStart, - onKeyDown: !disabled && this.handleKeyDown - }, - _react2.default.createElement( - 'div', - { ref: function ref(node) { - return _this3.track = node; - }, style: prepareStyles(styles.track) }, - _react2.default.createElement('div', { style: prepareStyles(styles.filled) }), - _react2.default.createElement('div', { style: prepareStyles(styles.remaining) }), - _react2.default.createElement( - 'div', - { - ref: function ref(node) { - return _this3.handle = node; - }, - style: prepareStyles(handleStyles), - tabIndex: 0 - }, - !disabled && !disableFocusRipple && _react2.default.createElement(_FocusRipple2.default, { - style: rippleStyle, - innerStyle: styles.rippleInner, - show: (hovered || focused) && !active, - color: styles.rippleColor.fill - }) - ) - ) - ), - _react2.default.createElement('input', { - type: 'hidden', - name: name, - value: value, - required: required, - min: min, - max: max, - step: step - }) + 'tbody', + { className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, + this.createRows() + ) ); } }]); - return Slider; + return TableBody; }(_react.Component); -Slider.defaultProps = { - axis: 'x', - disabled: false, - disableFocusRipple: false, - max: 1, - min: 0, - required: true, - step: 0.01, +TableBody.muiName = 'TableBody'; +TableBody.defaultProps = { + allRowsSelected: false, + deselectOnClickaway: true, + displayRowCheckbox: true, + multiSelectable: false, + preScanRows: true, + selectable: true, style: {} }; -Slider.contextTypes = { +TableBody.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? Slider.propTypes = { + false ? TableBody.propTypes = { /** - * The axis on which the slider will slide. + * @ignore + * Set to true to indicate that all rows should be selected. */ - axis: _react.PropTypes.oneOf(['x', 'x-reverse', 'y', 'y-reverse']), + allRowsSelected: _react.PropTypes.bool, /** - * The default value of the slider. + * Children passed to table body. */ - defaultValue: valueInRangePropType, + children: _react.PropTypes.node, /** - * Describe the slider. + * The css class name of the root element. */ - description: (0, _deprecatedPropType2.default)(_react.PropTypes.node, 'Use a sibling node element instead. It will be removed with v0.17.0.'), + className: _react.PropTypes.string, /** - * Disables focus ripple if set to true. + * Controls whether or not to deselect all selected + * rows after clicking outside the table. */ - disableFocusRipple: _react.PropTypes.bool, + deselectOnClickaway: _react.PropTypes.bool, /** - * If true, the slider will not be interactable. + * Controls the display of the row checkbox. The default value is true. */ - disabled: _react.PropTypes.bool, + displayRowCheckbox: _react.PropTypes.bool, /** - * An error message for the slider. + * @ignore + * If true, multiple table rows can be selected. + * CTRL/CMD+Click and SHIFT+Click are valid actions. + * The default value is false. */ - error: (0, _deprecatedPropType2.default)(_react.PropTypes.node, 'Use a sibling node element instead. It will be removed with v0.17.0.'), + multiSelectable: _react.PropTypes.bool, /** - * The maximum value the slider can slide to on - * a scale from 0 to 1 inclusive. Cannot be equal to min. + * @ignore + * Callback function for when a cell is clicked. */ - max: minMaxPropType, + onCellClick: _react.PropTypes.func, /** - * The minimum value the slider can slide to on a scale - * from 0 to 1 inclusive. Cannot be equal to max. + * @ignore + * Called when a table cell is hovered. rowNumber + * is the row number of the hovered row and columnId + * is the column number or the column key of the cell. */ - min: minMaxPropType, + onCellHover: _react.PropTypes.func, /** - * The name of the slider. Behaves like the name attribute - * of an input element. + * @ignore + * Called when a table cell is no longer hovered. + * rowNumber is the row number of the row and columnId + * is the column number or the column key of the cell. */ - name: _react.PropTypes.string, - /** @ignore */ - onBlur: _react.PropTypes.func, + onCellHoverExit: _react.PropTypes.func, /** - * Callback function that is fired when the slider's value changed. - * - * @param {object} event KeyDown event targeting the slider. - * @param {number} newValue The new value of the slider. + * @ignore + * Called when a table row is hovered. + * rowNumber is the row number of the hovered row. */ - onChange: _react.PropTypes.func, + onRowHover: _react.PropTypes.func, /** - * Callback function that is fired when the slider has begun to move. - * - * @param {object} event MouseDown or TouchStart event targeting the slider. + * @ignore + * Called when a table row is no longer + * hovered. rowNumber is the row number of the row + * that is no longer hovered. */ - onDragStart: _react.PropTypes.func, + onRowHoverExit: _react.PropTypes.func, /** - * Callback function that is fired when the slide has stopped moving. - * - * @param {object} event MouseEnd or TouchEnd event targeting the slider. + * @ignore + * Called when a row is selected. selectedRows is an + * array of all row selections. IF all rows have been selected, + * the string "all" will be returned instead to indicate that + * all rows have been selected. */ - onDragStop: _react.PropTypes.func, - /** @ignore */ - onFocus: _react.PropTypes.func, + onRowSelection: _react.PropTypes.func, /** - * Whether or not the slider is required in a form. + * Controls whether or not the rows are pre-scanned to determine + * initial state. If your table has a large number of rows and + * you are experiencing a delay in rendering, turn off this property. */ - required: _react.PropTypes.bool, + preScanRows: _react.PropTypes.bool, /** - * Override the inline-styles of the inner slider element. + * @ignore + * If true, table rows can be selected. If multiple + * row selection is desired, enable multiSelectable. + * The default value is true. */ - sliderStyle: _react.PropTypes.object, + selectable: _react.PropTypes.bool, /** - * The granularity the slider can step through values. + * If true, table rows will be highlighted when + * the cursor is hovering over the row. The default + * value is false. */ - step: _react.PropTypes.number, + showRowHover: _react.PropTypes.bool, /** - * Override the inline-styles of the root element. + * If true, every other table row starting + * with the first row will be striped. The default value is false. */ - style: _react.PropTypes.object, + stripedRows: _react.PropTypes.bool, /** - * The value of the slider. + * Override the inline-styles of the root element. */ - value: valueInRangePropType + style: _react.PropTypes.object } : void 0; -exports.default = Slider; +exports.default = TableBody; /***/ }), /* 825 */ @@ -70324,75 +73112,157 @@ exports.default = Slider; "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _defineProperty = __webpack_require__(185); +var _extends2 = __webpack_require__(7); -var _defineProperty2 = _interopRequireDefault(_defineProperty); +var _extends3 = _interopRequireDefault(_extends2); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _toConsumableArray2 = __webpack_require__(95); -exports.default = function (obj, key, value) { - if (key in obj) { - (0, _defineProperty2.default)(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); - return obj; -}; +var _objectWithoutProperties2 = __webpack_require__(8); -/***/ }), -/* 826 */ -/***/ (function(module, exports, __webpack_require__) { +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -"use strict"; +var _getPrototypeOf = __webpack_require__(3); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = deprecated; +var _classCallCheck2 = __webpack_require__(1); -var _warning = __webpack_require__(17); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _warning2 = _interopRequireDefault(_warning); +var _createClass2 = __webpack_require__(2); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _createClass3 = _interopRequireDefault(_createClass2); -var warned = {}; /** - * This module is taken from https://github.com/react-bootstrap/react-prop-types. - * It's not a dependency to reduce build size / install time. - * It should be pretty stable. - */ -function deprecated(validator, reason) { - return function validate(props, propName, componentName, location, propFullName) { - var componentNameSafe = componentName || '<>'; - var propFullNameSafe = propFullName || propName; +var _possibleConstructorReturn2 = __webpack_require__(4); - if (props[propName] != null) { - var messageKey = componentName + '.' + propName; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - false ? (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason)) : void 0; +var _inherits2 = __webpack_require__(5); - warned[messageKey] = true; - } +var _inherits3 = _interopRequireDefault(_inherits2); - for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { - args[_key - 5] = arguments[_key]; - } +var _simpleAssign = __webpack_require__(6); - return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args)); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _TableRowColumn = __webpack_require__(211); + +var _TableRowColumn2 = _interopRequireDefault(_TableRowColumn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tableFooter = context.muiTheme.tableFooter; + + + return { + cell: { + borderTop: '1px solid ' + tableFooter.borderColor, + verticalAlign: 'bottom', + padding: 20, + textAlign: 'left', + whiteSpace: 'nowrap' + } }; } +var TableFooter = function (_Component) { + (0, _inherits3.default)(TableFooter, _Component); + + function TableFooter() { + (0, _classCallCheck3.default)(this, TableFooter); + return (0, _possibleConstructorReturn3.default)(this, (TableFooter.__proto__ || (0, _getPrototypeOf2.default)(TableFooter)).apply(this, arguments)); + } + + (0, _createClass3.default)(TableFooter, [{ + key: 'render', + value: function render() { + var _props = this.props, + adjustForCheckbox = _props.adjustForCheckbox, + children = _props.children, + className = _props.className, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['adjustForCheckbox', 'children', 'className', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var footerRows = _react2.default.Children.map(children, function (child, rowNumber) { + var newChildProps = { + displayBorder: false, + key: 'f-' + rowNumber, + rowNumber: rowNumber, + style: (0, _simpleAssign2.default)({}, styles.cell, child.props.style) + }; + + var newDescendants = void 0; + + if (adjustForCheckbox) { + newDescendants = [_react2.default.createElement(_TableRowColumn2.default, { key: 'fpcb' + rowNumber, style: { width: 24 } })].concat((0, _toConsumableArray3.default)(_react2.default.Children.toArray(child.props.children))); + } else { + newDescendants = child.props.children; + } + + return _react2.default.cloneElement(child, newChildProps, newDescendants); + }); + + return _react2.default.createElement( + 'tfoot', + (0, _extends3.default)({ className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, other), + footerRows + ); + } + }]); + return TableFooter; +}(_react.Component); + +TableFooter.muiName = 'TableFooter'; +TableFooter.defaultProps = { + adjustForCheckbox: true, + style: {} +}; +TableFooter.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TableFooter.propTypes = { + /** + * @ignore + * Controls whether or not header rows should be adjusted + * for a checkbox column. If the select all checkbox is true, + * this property will not influence the number of columns. + * This is mainly useful for "super header" rows so that + * the checkbox column does not create an offset that needs + * to be accounted for manually. + */ + adjustForCheckbox: _react.PropTypes.bool, + /** + * Children passed to table footer. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableFooter; + /***/ }), -/* 827 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70402,98 +73272,251 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _TextField = __webpack_require__(97); +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var _TextField2 = _interopRequireDefault(_TextField); +var _inherits2 = __webpack_require__(5); -var _createComponent = __webpack_require__(43); +var _inherits3 = _interopRequireDefault(_inherits2); -var _createComponent2 = _interopRequireDefault(_createComponent); +var _simpleAssign = __webpack_require__(6); -var _mapError = __webpack_require__(60); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -var _mapError2 = _interopRequireDefault(_mapError); +var _react = __webpack_require__(0); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _react2 = _interopRequireDefault(_react); -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } +var _Checkbox = __webpack_require__(207); -exports.default = (0, _createComponent2.default)(_TextField2.default, function (_ref) { - var defaultValue = _ref.defaultValue, - props = _objectWithoutProperties(_ref, ['defaultValue']); +var _Checkbox2 = _interopRequireDefault(_Checkbox); - return (0, _mapError2.default)(props); -}); +var _TableHeaderColumn = __webpack_require__(340); -/***/ }), -/* 828 */ -/***/ (function(module, exports, __webpack_require__) { +var _TableHeaderColumn2 = _interopRequireDefault(_TableHeaderColumn); -"use strict"; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function getStyles(props, context) { + var tableHeader = context.muiTheme.tableHeader; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + return { + root: { + borderBottom: '1px solid ' + tableHeader.borderColor + } + }; +} -var _TimePicker = __webpack_require__(829); +var TableHeader = function (_Component) { + (0, _inherits3.default)(TableHeader, _Component); -var _TimePicker2 = _interopRequireDefault(_TimePicker); + function TableHeader() { + var _ref; -var _createComponent = __webpack_require__(43); + var _temp, _this, _ret; -var _createComponent2 = _interopRequireDefault(_createComponent); + (0, _classCallCheck3.default)(this, TableHeader); -var _mapError = __webpack_require__(60); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -var _mapError2 = _interopRequireDefault(_mapError); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableHeader.__proto__ || (0, _getPrototypeOf2.default)(TableHeader)).call.apply(_ref, [this].concat(args))), _this), _this.handleCheckAll = function (event, checked) { + if (_this.props.onSelectAll) { + _this.props.onSelectAll(checked); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + (0, _createClass3.default)(TableHeader, [{ + key: 'createSuperHeaderRows', + value: function createSuperHeaderRows() { + var numChildren = _react2.default.Children.count(this.props.children); + if (numChildren === 1) return undefined; -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + var superHeaders = []; + for (var index = 0; index < numChildren - 1; index++) { + var child = this.props.children[index]; -exports.default = (0, _createComponent2.default)(_TimePicker2.default, function (_ref) { - var _ref$input = _ref.input, - onBlur = _ref$input.onBlur, - inputProps = _objectWithoutProperties(_ref$input, ['onBlur']), - defaultTime = _ref.defaultTime, - _onChange = _ref.onChange, - props = _objectWithoutProperties(_ref, ['input', 'defaultTime', 'onChange']); + if (!_react2.default.isValidElement(child)) continue; - return _extends({}, inputProps, (0, _mapError2.default)(props), { - onChange: function onChange(event, value) { - inputProps.onChange(value); - if (_onChange) { - _onChange(value); + var props = { + key: 'sh' + index, + rowNumber: index + }; + superHeaders.push(this.createSuperHeaderRow(child, props)); } - } - }); -}); -/***/ }), -/* 829 */ -/***/ (function(module, exports, __webpack_require__) { + if (superHeaders.length) return superHeaders; + } + }, { + key: 'createSuperHeaderRow', + value: function createSuperHeaderRow(child, props) { + var children = []; + if (this.props.adjustForCheckbox) { + children.push(this.getCheckboxPlaceholder(props)); + } + _react2.default.Children.forEach(child.props.children, function (child) { + children.push(child); + }); -"use strict"; + return _react2.default.cloneElement(child, props, children); + } + }, { + key: 'createBaseHeaderRow', + value: function createBaseHeaderRow() { + var numChildren = _react2.default.Children.count(this.props.children); + var child = numChildren === 1 ? this.props.children : this.props.children[numChildren - 1]; + var props = { + key: 'h' + numChildren, + rowNumber: numChildren + }; + var children = [this.getSelectAllCheckboxColumn(props)]; + _react2.default.Children.forEach(child.props.children, function (child) { + children.push(child); + }); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; + return _react2.default.cloneElement(child, props, children); + } + }, { + key: 'getCheckboxPlaceholder', + value: function getCheckboxPlaceholder(props) { + if (!this.props.adjustForCheckbox) return null; + + var disabled = !this.props.enableSelectAll; + var key = 'hpcb' + props.rowNumber; + return _react2.default.createElement(_TableHeaderColumn2.default, { + key: key, + style: { + width: 24, + cursor: disabled ? 'not-allowed' : 'inherit' + } + }); + } + }, { + key: 'getSelectAllCheckboxColumn', + value: function getSelectAllCheckboxColumn(props) { + if (!this.props.displaySelectAll) return this.getCheckboxPlaceholder(props); + + var disabled = !this.props.enableSelectAll; + var checkbox = _react2.default.createElement(_Checkbox2.default, { + key: 'selectallcb', + name: 'selectallcb', + value: 'selected', + disabled: disabled, + checked: this.props.selectAllSelected, + onCheck: this.handleCheckAll + }); -var _TimePicker = __webpack_require__(830); + var key = 'hpcb' + props.rowNumber; + return _react2.default.createElement( + _TableHeaderColumn2.default, + { + key: key, + style: { + width: 24, + cursor: disabled ? 'not-allowed' : 'inherit' + } + }, + checkbox + ); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + className = _props.className, + style = _props.style; + var prepareStyles = this.context.muiTheme.prepareStyles; -var _TimePicker2 = _interopRequireDefault(_TimePicker); + var styles = getStyles(this.props, this.context); + var superHeaderRows = this.createSuperHeaderRows(); + var baseHeaderRow = this.createBaseHeaderRow(); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + return _react2.default.createElement( + 'thead', + { className: className, style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + superHeaderRows, + baseHeaderRow + ); + } + }]); + return TableHeader; +}(_react.Component); -exports.default = _TimePicker2.default; +TableHeader.muiName = 'TableHeader'; +TableHeader.defaultProps = { + adjustForCheckbox: true, + displaySelectAll: true, + enableSelectAll: true, + selectAllSelected: false +}; +TableHeader.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TableHeader.propTypes = { + /** + * Controls whether or not header rows should be + * adjusted for a checkbox column. If the select all + * checkbox is true, this property will not influence + * the number of columns. This is mainly useful for + * "super header" rows so that the checkbox column + * does not create an offset that needs to be accounted + * for manually. + */ + adjustForCheckbox: _react.PropTypes.bool, + /** + * Children passed to table header. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Controls whether or not the select all checkbox is displayed. + */ + displaySelectAll: _react.PropTypes.bool, + /** + * If set to true, the select all button will be interactable. + * If set to false, the button will not be interactable. + * To hide the checkbox, set displaySelectAll to false. + */ + enableSelectAll: _react.PropTypes.bool, + /** + * @ignore + * Callback when select all has been checked. + */ + onSelectAll: _react.PropTypes.func, + /** + * @ignore + * True when select all has been checked. + */ + selectAllSelected: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableHeader; /***/ }), -/* 830 */ +/* 827 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70539,260 +73562,541 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _TimePickerDialog = __webpack_require__(831); - -var _TimePickerDialog2 = _interopRequireDefault(_TimePickerDialog); - -var _TextField = __webpack_require__(97); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _TextField2 = _interopRequireDefault(_TextField); +function getStyles(props, context, state) { + var tableRow = context.muiTheme.tableRow; -var _timeUtils = __webpack_require__(98); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var cellBgColor = 'inherit'; + if (props.hovered || state.hovered) { + cellBgColor = tableRow.hoverColor; + } else if (props.selected) { + cellBgColor = tableRow.selectedColor; + } else if (props.striped) { + cellBgColor = tableRow.stripeColor; + } -var emptyTime = new Date(); -emptyTime.setHours(0); -emptyTime.setMinutes(0); -emptyTime.setSeconds(0); -emptyTime.setMilliseconds(0); + return { + root: { + borderBottom: props.displayBorder && '1px solid ' + tableRow.borderColor, + color: tableRow.textColor, + height: tableRow.height + }, + cell: { + backgroundColor: cellBgColor + } + }; +} -var TimePicker = function (_Component) { - (0, _inherits3.default)(TimePicker, _Component); +var TableRow = function (_Component) { + (0, _inherits3.default)(TableRow, _Component); - function TimePicker() { + function TableRow() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, TimePicker); + (0, _classCallCheck3.default)(this, TableRow); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimePicker.__proto__ || (0, _getPrototypeOf2.default)(TimePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - time: null, - dialogTime: new Date() - }, _this.handleAcceptDialog = function (time) { - _this.setState({ - time: time - }); - if (_this.props.onChange) _this.props.onChange(null, time); - }, _this.handleFocusInput = function (event) { - event.target.blur(); - if (_this.props.onFocus) { - _this.props.onFocus(event); - } - }, _this.handleTouchTapInput = function (event) { - event.preventDefault(); - - if (!_this.props.disabled) { - _this.openDialog(); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableRow.__proto__ || (0, _getPrototypeOf2.default)(TableRow)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.onCellClick = function (event, columnIndex) { + if (_this.props.selectable && _this.props.onCellClick) { + _this.props.onCellClick(event, _this.props.rowNumber, columnIndex); + } + event.ctrlKey = true; + _this.onRowClick(event); + }, _this.onCellHover = function (event, columnIndex) { + if (_this.props.hoverable) { + _this.setState({ hovered: true }); + if (_this.props.onCellHover) _this.props.onCellHover(event, _this.props.rowNumber, columnIndex); + _this.onRowHover(event); } - - if (_this.props.onTouchTap) { - _this.props.onTouchTap(event); + }, _this.onCellHoverExit = function (event, columnIndex) { + if (_this.props.hoverable) { + _this.setState({ hovered: false }); + if (_this.props.onCellHoverExit) _this.props.onCellHoverExit(event, _this.props.rowNumber, columnIndex); + _this.onRowHoverExit(event); } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(TimePicker, [{ - key: 'componentWillMount', - value: function componentWillMount() { - this.setState({ - time: this.isControlled() ? this.getControlledTime() : this.props.defaultTime - }); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (nextProps.value !== this.props.value) { - this.setState({ - time: this.getControlledTime(nextProps) - }); - } - } - - /** - * Alias for `openDialog()` for an api consistent with TextField. - */ - - }, { - key: 'focus', - value: function focus() { - this.openDialog(); - } - }, { - key: 'openDialog', - value: function openDialog() { - this.setState({ - dialogTime: this.state.time - }); - this.refs.dialogWindow.show(); + (0, _createClass3.default)(TableRow, [{ + key: 'onRowClick', + value: function onRowClick(event) { + if (this.props.selectable && this.props.onRowClick) this.props.onRowClick(event, this.props.rowNumber); } }, { - key: 'isControlled', - value: function isControlled() { - return this.props.value !== null; + key: 'onRowHover', + value: function onRowHover(event) { + if (this.props.onRowHover) this.props.onRowHover(event, this.props.rowNumber); } }, { - key: 'getControlledTime', - value: function getControlledTime() { - var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; - - var result = null; - if (props.value instanceof Date) { - result = props.value; - } - return result; + key: 'onRowHoverExit', + value: function onRowHoverExit(event) { + if (this.props.onRowHoverExit) this.props.onRowHoverExit(event, this.props.rowNumber); } }, { key: 'render', value: function render() { + var _this2 = this; + var _props = this.props, - autoOk = _props.autoOk, - cancelLabel = _props.cancelLabel, - defaultTime = _props.defaultTime, - dialogBodyStyle = _props.dialogBodyStyle, - dialogStyle = _props.dialogStyle, - format = _props.format, - okLabel = _props.okLabel, - onFocus = _props.onFocus, - onTouchTap = _props.onTouchTap, - onShow = _props.onShow, - onDismiss = _props.onDismiss, - pedantic = _props.pedantic, + className = _props.className, + displayBorder = _props.displayBorder, + hoverable = _props.hoverable, + hovered = _props.hovered, + onCellClick = _props.onCellClick, + onCellHover = _props.onCellHover, + onCellHoverExit = _props.onCellHoverExit, + onRowClick = _props.onRowClick, + onRowHover = _props.onRowHover, + onRowHoverExit = _props.onRowHoverExit, + rowNumber = _props.rowNumber, + selectable = _props.selectable, + selected = _props.selected, + striped = _props.striped, style = _props.style, - textFieldStyle = _props.textFieldStyle, - other = (0, _objectWithoutProperties3.default)(_props, ['autoOk', 'cancelLabel', 'defaultTime', 'dialogBodyStyle', 'dialogStyle', 'format', 'okLabel', 'onFocus', 'onTouchTap', 'onShow', 'onDismiss', 'pedantic', 'style', 'textFieldStyle']); + other = (0, _objectWithoutProperties3.default)(_props, ['className', 'displayBorder', 'hoverable', 'hovered', 'onCellClick', 'onCellHover', 'onCellHoverExit', 'onRowClick', 'onRowHover', 'onRowHoverExit', 'rowNumber', 'selectable', 'selected', 'striped', 'style']); var prepareStyles = this.context.muiTheme.prepareStyles; - var time = this.state.time; + var styles = getStyles(this.props, this.context, this.state); + + var rowColumns = _react2.default.Children.map(this.props.children, function (child, columnNumber) { + if (_react2.default.isValidElement(child)) { + return _react2.default.cloneElement(child, { + columnNumber: columnNumber, + hoverable: _this2.props.hoverable, + key: _this2.props.rowNumber + '-' + columnNumber, + onClick: _this2.onCellClick, + onHover: _this2.onCellHover, + onHoverExit: _this2.onCellHoverExit, + style: (0, _simpleAssign2.default)({}, styles.cell, child.props.style) + }); + } + }); return _react2.default.createElement( - 'div', - { style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, - _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { - style: textFieldStyle, - ref: 'input', - value: time === emptyTime ? null : (0, _timeUtils.formatTime)(time, format, pedantic), - onFocus: this.handleFocusInput, - onTouchTap: this.handleTouchTapInput - })), - _react2.default.createElement(_TimePickerDialog2.default, { - ref: 'dialogWindow', - bodyStyle: dialogBodyStyle, - initialTime: this.state.dialogTime, - onAccept: this.handleAcceptDialog, - onShow: onShow, - onDismiss: onDismiss, - format: format, - okLabel: okLabel, - cancelLabel: cancelLabel, - autoOk: autoOk, - style: dialogStyle - }) + 'tr', + (0, _extends3.default)({ + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }, other), + rowColumns ); } }]); - return TimePicker; + return TableRow; }(_react.Component); -TimePicker.defaultProps = { - autoOk: false, - cancelLabel: 'Cancel', - defaultTime: null, - disabled: false, - format: 'ampm', - okLabel: 'OK', - pedantic: false, - style: {}, - value: null +TableRow.defaultProps = { + displayBorder: true, + hoverable: false, + hovered: false, + selectable: true, + selected: false, + striped: false }; -TimePicker.contextTypes = { +TableRow.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? TimePicker.propTypes = { - /** - * If true, automatically accept and close the picker on set minutes. - */ - autoOk: _react.PropTypes.bool, + false ? TableRow.propTypes = { /** - * Override the label of the 'Cancel' button. + * Children passed to table row. */ - cancelLabel: _react.PropTypes.node, + children: _react.PropTypes.node, /** - * The initial time value of the TimePicker. + * The css class name of the root element. */ - defaultTime: _react.PropTypes.object, + className: _react.PropTypes.string, /** - * Override the inline-styles of TimePickerDialog's body element. + * If true, row border will be displayed for the row. + * If false, no border will be drawn. */ - dialogBodyStyle: _react.PropTypes.object, + displayBorder: _react.PropTypes.bool, /** - * Override the inline-styles of TimePickerDialog's root element. + * Controls whether or not the row reponseds to hover events. */ - dialogStyle: _react.PropTypes.object, + hoverable: _react.PropTypes.bool, /** - * If true, the TimePicker is disabled. + * Controls whether or not the row should be rendered as being + * hovered. This property is evaluated in addition to this.state.hovered + * and can be used to synchronize the hovered state with some other + * external events. */ - disabled: _react.PropTypes.bool, + hovered: _react.PropTypes.bool, /** - * Tells the component to display the picker in `ampm` (12hr) format or `24hr` format. + * @ignore + * Called when a row cell is clicked. + * rowNumber is the row number and columnId is + * the column number or the column key. */ - format: _react.PropTypes.oneOf(['ampm', '24hr']), + onCellClick: _react.PropTypes.func, /** - * Override the label of the 'OK' button. + * @ignore + * Called when a table cell is hovered. + * rowNumber is the row number of the hovered row + * and columnId is the column number or the column key of the cell. */ - okLabel: _react.PropTypes.node, + onCellHover: _react.PropTypes.func, /** - * Callback function that is fired when the time value changes. The time value is passed in a Date Object. - * Since there is no particular event associated with the change the first argument will always be null - * and the second argument will be the new Date instance. + * @ignore + * Called when a table cell is no longer hovered. + * rowNumber is the row number of the row and columnId + * is the column number or the column key of the cell. */ - onChange: _react.PropTypes.func, + onCellHoverExit: _react.PropTypes.func, /** - * Callback function fired when the TimePicker dialog is dismissed. + * @ignore + * Called when row is clicked. */ - onDismiss: _react.PropTypes.func, + onRowClick: _react.PropTypes.func, /** - * Callback function fired when the TimePicker `TextField` gains focus. + * @ignore + * Called when a table row is hovered. + * rowNumber is the row number of the hovered row. */ - onFocus: _react.PropTypes.func, + onRowHover: _react.PropTypes.func, /** - * Callback function fired when the TimePicker dialog is shown. + * @ignore + * Called when a table row is no longer hovered. + * rowNumber is the row number of the row that is no longer hovered. */ - onShow: _react.PropTypes.func, + onRowHoverExit: _react.PropTypes.func, /** - * Callback function fired when the TimePicker is tapped or clicked. + * Number to identify the row. This property is + * automatically populated when used with the TableBody component. */ - onTouchTap: _react.PropTypes.func, + rowNumber: _react.PropTypes.number, /** - * If true, uses ("noon" / "midnight") instead of ("12 a.m." / "12 p.m."). - * - * It's technically more correct to refer to "12 noon" and "12 midnight" rather than "12 a.m." and "12 p.m." - * and it avoids confusion between different locales. By default (for compatibility reasons) TimePicker uses - * ("12 a.m." / "12 p.m."). + * If true, table rows can be selected. If multiple row + * selection is desired, enable multiSelectable. + * The default value is true. */ - pedantic: _react.PropTypes.bool, + selectable: _react.PropTypes.bool, /** - * Override the inline-styles of the root element. + * Indicates that a particular row is selected. + * This property can be used to programmatically select rows. */ - style: _react.PropTypes.object, + selected: _react.PropTypes.bool, /** - * Override the inline-styles of TimePicker's TextField element. + * Indicates whether or not the row is striped. */ - textFieldStyle: _react.PropTypes.object, + striped: _react.PropTypes.bool, /** - * Sets the time for the Time Picker programmatically. + * Override the inline-styles of the root element. */ - value: _react.PropTypes.object + style: _react.PropTypes.object } : void 0; -exports.default = TimePicker; +exports.default = TableRow; + +/***/ }), +/* 828 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.addAtcProduct = addAtcProduct; +exports.removeAtcProduct = removeAtcProduct; +exports.setAtcProductEnabled = setAtcProductEnabled; + +var _ActionTypes = __webpack_require__(49); + +var types = _interopRequireWildcard(_ActionTypes); + +var _notification = __webpack_require__(342); + +var _notification2 = _interopRequireDefault(_notification); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function addAtcProduct(data) { + return function (dispatch) { + dispatch((0, _notification2.default)('Atc product ' + data.name + ' added')); + dispatch({ + type: types.ATC_PRODUCT_ADD, + name: name, + data: data + }); + }; +} + +function removeAtcProduct(name) { + return function (dispatch) { + dispatch((0, _notification2.default)('Atc product ' + name + ' removed')); + dispatch({ + type: types.ATC_PRODUCT_REMOVE, + name: name + }); + }; +} + +function setAtcProductEnabled(name) { + var enabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + return { + type: types.ATC_SET_PRODUCT_ENABLED, + name: name, + enabled: enabled + }; +} + +/***/ }), +/* 829 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reduxForm = __webpack_require__(82); + +var _reactRedux = __webpack_require__(19); + +var _materialUiChipInput = __webpack_require__(830); + +var _materialUiChipInput2 = _interopRequireDefault(_materialUiChipInput); + +var _MenuItem = __webpack_require__(97); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +var _reduxFormMaterialUi = __webpack_require__(98); + +var _RaisedButton = __webpack_require__(65); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _FlatButton = __webpack_require__(100); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +var _FormValidators = __webpack_require__(102); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Styles = __webpack_require__(52); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _Utils = __webpack_require__(210); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var AtcCreateForm = function (_Component) { + (0, _inherits3.default)(AtcCreateForm, _Component); + + function AtcCreateForm() { + (0, _classCallCheck3.default)(this, AtcCreateForm); + return (0, _possibleConstructorReturn3.default)(this, (AtcCreateForm.__proto__ || (0, _getPrototypeOf2.default)(AtcCreateForm)).apply(this, arguments)); + } + + (0, _createClass3.default)(AtcCreateForm, [{ + key: 'render', + value: function render() { + var _props = this.props, + handleSubmit = _props.handleSubmit, + pristine = _props.pristine, + submitting = _props.submitting, + onRequestClose = _props.onRequestClose, + atcProducts = _props.atcProducts; + + var renderChip = function renderChip(_ref) { + var input = _ref.input, + hintText = _ref.hintText, + floatingLabelText = _ref.floatingLabelText, + _ref$meta = _ref.meta, + touched = _ref$meta.touched, + error = _ref$meta.error; + return _react2.default.createElement(_materialUiChipInput2.default, (0, _extends3.default)({}, input, { + chipContainerStyle: _Styles2.default.fields.text, + fullWidth: true, + value: input.value || [], + onRequestAdd: function onRequestAdd(addedChip) { + var values = input.value || []; + values = values.slice(); + values.push(addedChip); + input.onChange(values); + }, + onRequestDelete: function onRequestDelete(deletedChip) { + var values = input.value || []; + values = values.filter(function (v) { + return v !== deletedChip; + }); + input.onChange(values); + }, + onBlur: function onBlur() { + return input.onBlur(); + }, + hintText: hintText, + floatingLabelText: floatingLabelText, + errorText: touched && error ? error : '' + })); + }; + var buttonStyle = { + margin: 6, + float: 'right' + }; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'atc-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'name', + validate: [Validators.required, Validators.unique(atcProducts.map(function (x) { + return x.name; + }))], + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Name', + hintText: 'Name', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'keywords', + component: renderChip, + floatingLabelText: 'Product keywords, press enter to validate a keyword', + hintText: 'Product keywords', + style: _Styles2.default.fields.text, + labelStyle: _Styles2.default.fields.text, + validate: [Validators.required, Validators.notEmpty] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'color', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Color', + hintText: 'Color', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'category', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Product category', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + _Utils.categories.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement('br', null), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'enabled', + component: _reduxFormMaterialUi.Toggle, + label: 'Enabled', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Add', + style: buttonStyle, + disabled: pristine || submitting, + type: 'submit' + }), + _react2.default.createElement(_FlatButton2.default, { + label: 'Cancel', + style: buttonStyle, + onTouchTap: function onTouchTap() { + if (onRequestClose) { + onRequestClose(); + } + } + }) + ) + ); + } + }]); + return AtcCreateForm; +}(_react.Component); + +AtcCreateForm.propTypes = { + onRequestClose: _react.PropTypes.function +}; + +var Form = (0, _reduxForm.reduxForm)({ + form: 'atc-form' +})(AtcCreateForm); + +function mapStateToProps(state) { + return { + atcProducts: state.atc.atcProducts, + initialValues: { + enabled: true + } + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps)(Form); /***/ }), -/* 831 */ +/* 830 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70802,446 +74106,823 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _objectWithoutProperties2 = __webpack_require__(8); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /** + * Notice: Some code was adapted from Material-UI's text field. + * Copyright (c) 2014 Call-Em-All (https://github.com/callemall/material-ui) + */ -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var _getPrototypeOf = __webpack_require__(3); +var _react = __webpack_require__(0); -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _react2 = _interopRequireDefault(_react); -var _classCallCheck2 = __webpack_require__(1); +var _propTypes = __webpack_require__(831); -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var _propTypes2 = _interopRequireDefault(_propTypes); -var _createClass2 = __webpack_require__(2); +var _TextFieldUnderline = __webpack_require__(331); -var _createClass3 = _interopRequireDefault(_createClass2); +var _TextFieldUnderline2 = _interopRequireDefault(_TextFieldUnderline); -var _possibleConstructorReturn2 = __webpack_require__(4); +var _TextFieldHint = __webpack_require__(329); -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); +var _TextFieldHint2 = _interopRequireDefault(_TextFieldHint); -var _inherits2 = __webpack_require__(5); +var _TextFieldLabel = __webpack_require__(330); -var _inherits3 = _interopRequireDefault(_inherits2); +var _TextFieldLabel2 = _interopRequireDefault(_TextFieldLabel); -var _simpleAssign = __webpack_require__(6); +var _AutoComplete = __webpack_require__(328); -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); -var _react = __webpack_require__(0); +var _transitions = __webpack_require__(10); -var _react2 = _interopRequireDefault(_react); +var _transitions2 = _interopRequireDefault(_transitions); -var _reactEventListener = __webpack_require__(42); +var _Chip = __webpack_require__(833); -var _reactEventListener2 = _interopRequireDefault(_reactEventListener); +var _Chip2 = _interopRequireDefault(_Chip); -var _keycode = __webpack_require__(30); +var _colors = __webpack_require__(31); -var _keycode2 = _interopRequireDefault(_keycode); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _Clock = __webpack_require__(832); +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -var _Clock2 = _interopRequireDefault(_Clock); +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } -var _Dialog = __webpack_require__(323); +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -var _Dialog2 = _interopRequireDefault(_Dialog); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var _FlatButton = __webpack_require__(198); +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -var _FlatButton2 = _interopRequireDefault(_FlatButton); +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var getStyles = function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + _context$muiTheme$tex = _context$muiTheme.textField, + floatingLabelColor = _context$muiTheme$tex.floatingLabelColor, + focusColor = _context$muiTheme$tex.focusColor, + textColor = _context$muiTheme$tex.textColor, + disabledTextColor = _context$muiTheme$tex.disabledTextColor, + backgroundColor = _context$muiTheme$tex.backgroundColor, + errorColor = _context$muiTheme$tex.errorColor; -var TimePickerDialog = function (_Component) { - (0, _inherits3.default)(TimePickerDialog, _Component); - function TimePickerDialog() { - var _ref; + var styles = { + root: { + fontSize: 16, + lineHeight: '24px', + width: props.fullWidth ? '100%' : 256, + display: 'inline-block', + position: 'relative', + backgroundColor: backgroundColor, + fontFamily: baseTheme.fontFamily, + transition: _transitions2.default.easeOut('200ms', 'height'), + cursor: 'text' + }, + input: { + padding: 0, + marginTop: 0, + marginBottom: 24, + lineHeight: '32px', + height: 32, + position: 'relative', + display: 'inline-block', + border: 'none', + outline: 'none', + backgroundColor: 'rgba(0,0,0,0)', + color: props.disabled ? disabledTextColor : textColor, + cursor: props.disabled ? 'not-allowed' : 'initial', + font: 'inherit', + appearance: 'none', // Remove border in Safari, doesn't seem to break anything in other browsers + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated style). + float: 'left' + }, + error: { + position: 'absolute', + bottom: -10, + fontSize: 12, + lineHeight: '12px', + color: errorColor, + transition: _transitions2.default.easeOut() + }, + floatingLabel: { + color: props.disabled ? disabledTextColor : floatingLabelColor, + pointerEvents: 'none', + top: 28 + }, + floatingLabelFocusStyle: { + transform: 'scale(0.75) translate(0, -36px)' + }, + defaultChip: { + margin: '8px 8px 0 0', + float: 'left' + }, + chipContainer: { + marginTop: props.floatingLabelText ? 12 : 0 + } + }; - var _temp, _this, _ret; + if (state.isFocused) { + styles.floatingLabel.color = focusColor; + } - (0, _classCallCheck3.default)(this, TimePickerDialog); + if (props.floatingLabelText) { + styles.input.boxSizing = 'border-box'; + } - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; + if (state.errorText) { + if (state.isFocused) { + styles.floatingLabel.color = styles.error.color; } + } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(TimePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - open: false - }, _this.handleRequestClose = function () { - _this.dismiss(); - }, _this.handleTouchTapCancel = function () { - _this.dismiss(); - }, _this.handleTouchTapOK = function () { - if (_this.props.onAccept) { - _this.props.onAccept(_this.refs.clock.getSelectedTime()); + return styles; +}; + +var defaultChipRenderer = function defaultChipRenderer(_ref, key) { + var value = _ref.value, + text = _ref.text, + isFocused = _ref.isFocused, + isDisabled = _ref.isDisabled, + handleClick = _ref.handleClick, + handleRequestDelete = _ref.handleRequestDelete, + defaultStyle = _ref.defaultStyle; + return _react2.default.createElement( + _Chip2.default, + { + key: key, + style: _extends({}, defaultStyle, { pointerEvents: isDisabled ? 'none' : undefined }), + backgroundColor: isFocused ? _colors.blue300 : null, + onClick: handleClick, + onRequestDelete: handleRequestDelete + }, + text + ); +}; + +var ChipInput = function (_React$Component) { + _inherits(ChipInput, _React$Component); + + function ChipInput(props) { + _classCallCheck(this, ChipInput); + + var _this = _possibleConstructorReturn(this, (ChipInput.__proto__ || Object.getPrototypeOf(ChipInput)).call(this, props)); + + _this.state = { + isFocused: false, + errorText: undefined, + isClean: true, + chips: [], + focusedChip: null, + inputValue: '' + }; + + _this.handleInputBlur = function (event) { + if (_this.props.onBlur) { + _this.props.onBlur(event); } - _this.setState({ - open: false - }); - }, _this.handleKeyUp = function (event) { - switch ((0, _keycode2.default)(event)) { - case 'enter': - _this.handleTouchTapOK(); - break; + + // A momentary delay is required to support openOnFocus. We must give time for the autocomplete + // menu to close before checking the current status. Otherwise, tabbing off the input while the + // menu is open results in the input keeping its focus styles. Note that the ref might not be set + // yet, so this.autocomplete might be null. + setTimeout(function () { + if (_this.autoComplete && (!_this.autoComplete.state.open || _this.autoComplete.requestsList.length === 0)) { + if (_this.props.clearOnBlur) { + _this.clearInput(); + } + _this.setState({ isFocused: false }); + } + }, 0); + }; + + _this.handleInputFocus = function (event) { + if (_this.props.disabled) { + return; } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } + _this.setState({ isFocused: true }); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }; - (0, _createClass3.default)(TimePickerDialog, [{ - key: 'show', - value: function show() { - if (this.props.onShow && !this.state.open) this.props.onShow(); - this.setState({ - open: true - }); + _this.handleKeyDown = function (event) { + _this.setState({ keyPressed: false }); + if (_this.props.newChipKeyCodes.indexOf(event.keyCode) >= 0) { + _this.handleAddChip(event.target.value); + } else if (event.keyCode === 8 || event.keyCode === 46) { + if (event.target.value === '') { + var chips = _this.props.value || _this.state.chips; + if (_this.state.focusedChip == null && event.keyCode === 8) { + _this.setState({ focusedChip: chips[chips.length - 1] }); + } else if (_this.state.focusedChip) { + var index = chips.indexOf(_this.state.focusedChip); + var value = _this.props.dataSourceConfig ? _this.state.focusedChip[_this.props.dataSourceConfig.value] : _this.state.focusedChip; + _this.handleDeleteChip(value, index); + if (event.keyCode === 8 && index > 0) { + _this.setState({ focusedChip: chips[index - 1] }); + } else if (event.keyCode === 46 && index < chips.length - 1) { + _this.setState({ focusedChip: chips[index + 1] }); + } + } + } + } else if (event.keyCode === 37) { + var _chips = _this.props.value || _this.state.chips; + var _index = _chips.indexOf(_this.state.focusedChip); + if (_index > 0) { + _this.setState({ focusedChip: _chips[_index - 1] }); + } + } else if (event.keyCode === 39) { + var _chips2 = _this.props.value || _this.state.chips; + var _index2 = _chips2.indexOf(_this.state.focusedChip); + if (_index2 >= 0 && _index2 < _chips2.length - 1) { + _this.setState({ focusedChip: _chips2[_index2 + 1] }); + } else { + _this.setState({ focusedChip: null }); + } + } else { + _this.setState({ focusedChip: null }); + } + }; + + _this.handleKeyUp = function (event) { + if (_this.props.newChipKeyCodes.indexOf(event.keyCode) > 0 && _this.state.keyPressed) { + _this.clearInput(); + } else { + _this.setState({ inputValue: event.target.value }); + } + }; + + _this.handleKeyPress = function (event) { + _this.setState({ keyPressed: true }); + }; + + _this.setAutoComplete = function (autoComplete) { + _this.autoComplete = autoComplete; + }; + + if (props.defaultValue) { + _this.state.chips = props.defaultValue; } - }, { - key: 'dismiss', - value: function dismiss() { - if (this.props.onDismiss && this.state.open) this.props.onDismiss(); + return _this; + } + + _createClass(ChipInput, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + name = _props.name, + hintText = _props.hintText, + floatingLabelText = _props.floatingLabelText; + + this.setState({ - open: false + errorText: this.props.errorText }); + + var uniqueId = name + '-' + hintText + '-' + floatingLabelText + '-' + Math.floor(Math.random() * 0xFFFF); + this.uniqueId = uniqueId.replace(/[^A-Za-z0-9-]/gi, ''); } }, { - key: 'render', - value: function render() { - var _props = this.props, - bodyStyle = _props.bodyStyle, - initialTime = _props.initialTime, - onAccept = _props.onAccept, - format = _props.format, - autoOk = _props.autoOk, - okLabel = _props.okLabel, - cancelLabel = _props.cancelLabel, - style = _props.style, - other = (0, _objectWithoutProperties3.default)(_props, ['bodyStyle', 'initialTime', 'onAccept', 'format', 'autoOk', 'okLabel', 'cancelLabel', 'style']); + key: 'componentDidMount', + value: function componentDidMount() { + var _this2 = this; + var handleKeyDown = this.autoComplete.handleKeyDown; + this.autoComplete.handleKeyDown = function (event) { + var newChipKeyCodes = _this2.props.newChipKeyCodes; - var styles = { - root: { - fontSize: 14, - color: this.context.muiTheme.timePicker.clockColor - }, - dialogContent: { - width: 280 - }, - body: { - padding: 0 + if (newChipKeyCodes.indexOf(event.keyCode) >= 0 && event.target.value) { + event.preventDefault(); + _this2.handleAddChip(event.target.value); + _this2.autoComplete.setState({ searchText: '' }); + _this2.autoComplete.forceUpdate(); + } else { + handleKeyDown(event); } }; - var actions = [_react2.default.createElement(_FlatButton2.default, { - key: 0, - label: cancelLabel, - primary: true, - onTouchTap: this.handleTouchTapCancel - }), _react2.default.createElement(_FlatButton2.default, { - key: 1, - label: okLabel, - primary: true, - onTouchTap: this.handleTouchTapOK - })]; + this.autoComplete.handleItemTouchTap = function (event, child) { + var dataSource = _this2.autoComplete.props.dataSource; - var onClockChangeMinutes = autoOk === true ? this.handleTouchTapOK : undefined; - var open = this.state.open; + var index = parseInt(child.key, 10); + var chosenRequest = dataSource[index]; + _this2.handleAddChip(chosenRequest); - return _react2.default.createElement( - _Dialog2.default, - (0, _extends3.default)({}, other, { - style: (0, _simpleAssign2.default)(styles.root, style), - bodyStyle: (0, _simpleAssign2.default)(styles.body, bodyStyle), - actions: actions, - contentStyle: styles.dialogContent, - repositionOnUpdate: false, - open: open, - onRequestClose: this.handleRequestClose - }), - open && _react2.default.createElement(_reactEventListener2.default, { target: 'window', onKeyUp: this.handleKeyUp }), - open && _react2.default.createElement(_Clock2.default, { - ref: 'clock', - format: format, - initialTime: initialTime, - onChangeMinutes: onClockChangeMinutes - }) - ); + _this2.autoComplete.setState({ + searchText: '' + }); + _this2.autoComplete.forceUpdate(); + _this2.autoComplete.close(); + + setTimeout(function () { + return _this2.focus(); + }, 1); + }; + + // force update autocomplete to ensure that it uses the new handlers + this.autoComplete.forceUpdate(); } - }]); - return TimePickerDialog; -}(_react.Component); + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.disabled) { + this.setState({ focusedChip: null }); + } + if (nextProps.errorText !== this.props.errorText) { + this.setState({ + errorText: nextProps.errorText + }); + } + } + }, { + key: 'blur', + value: function blur() { + if (this.input) this.getInputNode().blur(); + } + }, { + key: 'focus', + value: function focus() { + if (this.autoComplete) { + this.getInputNode().focus(); + if (this.props.openOnFocus) { + this.autoComplete.setState({ + open: true, + anchorEl: this.getInputNode() + }); -TimePickerDialog.defaultProps = { - okLabel: 'OK', - cancelLabel: 'Cancel' -}; -TimePickerDialog.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? TimePickerDialog.propTypes = { - autoOk: _react.PropTypes.bool, - bodyStyle: _react.PropTypes.object, - cancelLabel: _react.PropTypes.node, - format: _react.PropTypes.oneOf(['ampm', '24hr']), - initialTime: _react.PropTypes.object, - okLabel: _react.PropTypes.node, - onAccept: _react.PropTypes.func, - onDismiss: _react.PropTypes.func, - onShow: _react.PropTypes.func, - style: _react.PropTypes.object -} : void 0; -exports.default = TimePickerDialog; + this.autoComplete.forceUpdate(); + } + } + if (this.state.focusedChip) { + this.setState({ focusedChip: null }); + } + } + }, { + key: 'select', + value: function select() { + if (this.input) this.getInputNode().select(); + } + }, { + key: 'getValue', + value: function getValue() { + return this.input ? this.getInputNode().value : undefined; + } + }, { + key: 'getInputNode', + value: function getInputNode() { + return this.autoComplete.refs.searchTextField.getInputNode(); + } + }, { + key: 'handleAddChip', + value: function handleAddChip(chip) { + var _this3 = this; -/***/ }), -/* 832 */ -/***/ (function(module, exports, __webpack_require__) { + this.autoComplete.setState({ searchText: '' }); + var chips = this.props.value || this.state.chips; -"use strict"; + if (this.props.dataSourceConfig) { + if (typeof chip === 'string') { + var _chip; + chip = (_chip = {}, _defineProperty(_chip, this.props.dataSourceConfig.text, chip), _defineProperty(_chip, this.props.dataSourceConfig.value, chip), _chip); + } -Object.defineProperty(exports, "__esModule", { - value: true -}); + if (this.props.allowDuplicates || !chips.some(function (c) { + return c[_this3.props.dataSourceConfig.value] === chip[_this3.props.dataSourceConfig.value]; + })) { + if (this.props.value) { + if (this.props.onRequestAdd) { + this.props.onRequestAdd(chip); + } + } else { + this.setState({ chips: [].concat(_toConsumableArray(this.state.chips), [chip]) }); + if (this.props.onChange) { + this.props.onChange([].concat(_toConsumableArray(this.state.chips), [chip])); + } + } + } + } else { + if (chip.trim().length > 0) { + if (this.props.allowDuplicates || chips.indexOf(chip) === -1) { + if (this.props.value) { + if (this.props.onRequestAdd) { + this.props.onRequestAdd(chip); + } + } else { + this.setState({ chips: [].concat(_toConsumableArray(this.state.chips), [chip]) }); + if (this.props.onChange) { + this.props.onChange([].concat(_toConsumableArray(this.state.chips), [chip])); + } + } + } + } + } + } + }, { + key: 'handleDeleteChip', + value: function handleDeleteChip(chip, i) { + if (this.props.value) { + if (this.props.onRequestDelete) { + this.props.onRequestDelete(chip, i); + } + } else { + if (this.props.dataSourceConfig) { + var chips = this.state.chips.slice(); + var changed = chips.splice(i, 1); // remove the chip at index i + if (changed) { + this.setState({ + chips: chips, + focusedChip: this.state.focusedChip && this.state.focusedChip[this.props.dataSourceConfig.value] === chip ? null : this.state.focusedChip + }); + if (this.props.onChange) { + this.props.onChange(chips); + } + } + } else { + var _chips3 = this.state.chips.slice(); + var _changed = _chips3.splice(i, 1); // remove the chip at index i + if (_changed) { + this.setState({ + chips: _chips3, + focusedChip: this.state.focusedChip === chip ? null : this.state.focusedChip + }); + if (this.props.onChange) { + this.props.onChange(_chips3); + } + } + } + } + } + }, { + key: 'clearInput', + value: function clearInput() { + this.setState({ inputValue: '' }); + } -var _getPrototypeOf = __webpack_require__(3); + /** + * Sets a reference to the AutoComplete instance. + * + * Using a bound class method here to set `autoComplete` to avoid it being set + * to null by an inline ref callback. + * + * See [Issue #71](https://github.com/TeamWertarbyte/material-ui-chip-input/issues/71) + * + * @param {Object} autoComplete - The AutoComplete DOM element or null + */ -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + }, { + key: 'render', + value: function render() { + var _this4 = this; -var _classCallCheck2 = __webpack_require__(1); + var _props2 = this.props, + children = _props2.children, + className = _props2.className, + dataSourceConfig = _props2.dataSourceConfig, + disabled = _props2.disabled, + errorStyle = _props2.errorStyle, + errorText = _props2.errorText, + fullWidth = _props2.fullWidth, + fullWidthInput = _props2.fullWidthInput, + hintText = _props2.hintText, + hintStyle = _props2.hintStyle, + id = _props2.id, + inputStyle = _props2.inputStyle, + clearOnBlur = _props2.clearOnBlur, + onBlur = _props2.onBlur, + onChange = _props2.onChange, + onFocus = _props2.onFocus, + style = _props2.style, + chipContainerStyle = _props2.chipContainerStyle, + underlineDisabledStyle = _props2.underlineDisabledStyle, + underlineFocusStyle = _props2.underlineFocusStyle, + underlineShow = _props2.underlineShow, + underlineStyle = _props2.underlineStyle, + _props2$defaultValue = _props2.defaultValue, + defaultValue = _props2$defaultValue === undefined ? [] : _props2$defaultValue, + filter = _props2.filter, + value = _props2.value, + dataSource = _props2.dataSource, + floatingLabelFixed = _props2.floatingLabelFixed, + floatingLabelFocusStyle = _props2.floatingLabelFocusStyle, + floatingLabelStyle = _props2.floatingLabelStyle, + floatingLabelText = _props2.floatingLabelText, + onRequestAdd = _props2.onRequestAdd, + onRequestDelete = _props2.onRequestDelete, + _props2$chipRenderer = _props2.chipRenderer, + chipRenderer = _props2$chipRenderer === undefined ? defaultChipRenderer : _props2$chipRenderer, + newChipKeyCodes = _props2.newChipKeyCodes, + allowDuplicates = _props2.allowDuplicates, + other = _objectWithoutProperties(_props2, ['children', 'className', 'dataSourceConfig', 'disabled', 'errorStyle', 'errorText', 'fullWidth', 'fullWidthInput', 'hintText', 'hintStyle', 'id', 'inputStyle', 'clearOnBlur', 'onBlur', 'onChange', 'onFocus', 'style', 'chipContainerStyle', 'underlineDisabledStyle', 'underlineFocusStyle', 'underlineShow', 'underlineStyle', 'defaultValue', 'filter', 'value', 'dataSource', 'floatingLabelFixed', 'floatingLabelFocusStyle', 'floatingLabelStyle', 'floatingLabelText', 'onRequestAdd', 'onRequestDelete', 'chipRenderer', 'newChipKeyCodes', 'allowDuplicates']); -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + var prepareStyles = this.context.muiTheme.prepareStyles; -var _createClass2 = __webpack_require__(2); + var styles = getStyles(this.props, this.context, this.state); + var inputId = id || this.uniqueId; -var _createClass3 = _interopRequireDefault(_createClass2); + var inputProps = { + id: inputId, + ref: function ref(elem) { + _this4.input = elem; + }, + disabled: !!this.props.disabled, + onBlur: this.handleInputBlur, + onFocus: this.handleInputFocus, + onKeyDown: this.handleKeyDown, + onKeyUp: this.handleKeyUp, + onKeyPress: this.handleKeyPress, + fullWidth: !!fullWidthInput + }; -var _possibleConstructorReturn2 = __webpack_require__(4); + var inputStyleMerged = _extends(styles.input, inputStyle); -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + var hasInput = (this.props.value || this.state.chips).length > 0 || this.state.inputValue.length > 0; + var showHintText = hintText && !hasInput; + var shrinkFloatingLabel = floatingLabelText && (hasInput || this.state.isFocused || floatingLabelFixed); -var _inherits2 = __webpack_require__(5); + var errorTextElement = this.state.errorText && _react2.default.createElement( + 'div', + { style: prepareStyles(_extends(styles.error, errorStyle)) }, + this.state.errorText + ); -var _inherits3 = _interopRequireDefault(_inherits2); + var floatingLabelTextElement = floatingLabelText && _react2.default.createElement( + _TextFieldLabel2.default, + { + muiTheme: this.context.muiTheme, + style: _extends(styles.floatingLabel, this.props.floatingLabelStyle), + shrinkStyle: _extends(styles.floatingLabelFocusStyle, this.props.floatingLabelFocusStyle), + htmlFor: inputId, + shrink: shrinkFloatingLabel, + disabled: disabled + }, + floatingLabelText + ); -var _react = __webpack_require__(0); + var overrideRootStyles = {}; + if (floatingLabelText) { + overrideRootStyles.marginTop = 14; + } + if (fullWidth) { + overrideRootStyles.width = '100%'; + } + if (disabled) { + overrideRootStyles.cursor = 'not-allowed'; + } -var _react2 = _interopRequireDefault(_react); + var chips = this.props.value || this.state.chips; + var autoCompleteData = dataSourceConfig ? (dataSource || []).filter(function (value) { + return !chips.some(function (c) { + return c[dataSourceConfig.value] === value[dataSourceConfig.value]; + }); + }) : (dataSource || []).filter(function (value) { + return chips.indexOf(value) < 0; + }); -var _TimeDisplay = __webpack_require__(833); + var actualFilter = other.openOnFocus ? function (search, key) { + return search === '' || filter(search, key); + } : filter; -var _TimeDisplay2 = _interopRequireDefault(_TimeDisplay); + return _react2.default.createElement( + 'div', + { + className: className, + style: prepareStyles(_extends(styles.root, style, overrideRootStyles)), + onClick: function onClick() { + return _this4.focus(); + } + }, + _react2.default.createElement( + 'div', + null, + floatingLabelTextElement, + _react2.default.createElement( + 'div', + { style: _extends(styles.chipContainer, chipContainerStyle) }, + chips.map(function (tag, i) { + var value = dataSourceConfig ? tag[dataSourceConfig.value] : tag; + return chipRenderer({ + value: value, + text: dataSourceConfig ? tag[dataSourceConfig.text] : tag, + chip: tag, + isDisabled: disabled, + isFocused: dataSourceConfig ? _this4.state.focusedChip && _this4.state.focusedChip[dataSourceConfig.value] === value : _this4.state.focusedChip === value, + handleClick: function handleClick() { + return _this4.setState({ focusedChip: value }); + }, + handleRequestDelete: function handleRequestDelete() { + return _this4.handleDeleteChip(value, i); + }, + defaultStyle: styles.defaultChip + }, i); + }) + ) + ), + hintText ? _react2.default.createElement(_TextFieldHint2.default, { + muiTheme: this.context.muiTheme, + show: showHintText && !(floatingLabelText && !floatingLabelFixed && !this.state.isFocused), + style: _extends({ bottom: 20, pointerEvents: 'none' }, hintStyle), + text: hintText + }) : null, + _react2.default.createElement(_AutoComplete2.default, _extends({}, other, inputProps, { + filter: actualFilter, + style: inputStyleMerged, + dataSource: autoCompleteData, + dataSourceConfig: dataSourceConfig, + searchText: this.state.inputValue, + underlineShow: false, + ref: this.setAutoComplete + })), + underlineShow ? _react2.default.createElement(_TextFieldUnderline2.default, { + disabled: disabled, + disabledStyle: underlineDisabledStyle, + error: !!this.state.errorText, + errorStyle: errorStyle, + focus: this.state.isFocused, + focusStyle: underlineFocusStyle, + muiTheme: this.context.muiTheme, + style: underlineStyle + }) : null, + errorTextElement + ); + } + }]); -var _ClockHours = __webpack_require__(840); + return ChipInput; +}(_react2.default.Component); -var _ClockHours2 = _interopRequireDefault(_ClockHours); +ChipInput.contextTypes = { + muiTheme: _propTypes2.default.object.isRequired +}; -var _ClockMinutes = __webpack_require__(841); -var _ClockMinutes2 = _interopRequireDefault(_ClockMinutes); +ChipInput.propTypes = { + style: _propTypes2.default.object, + chipContainerStyle: _propTypes2.default.object, + floatingLabelText: _propTypes2.default.node, + hintText: _propTypes2.default.node, + id: _propTypes2.default.string, + dataSourceConfig: _propTypes2.default.shape({ + text: _propTypes2.default.string.isRequired, + value: _propTypes2.default.string.isRequired + }), + disabled: _propTypes2.default.bool, + defaultValue: _propTypes2.default.array, + onChange: _propTypes2.default.func, + value: _propTypes2.default.array, + onRequestAdd: _propTypes2.default.func, + onRequestDelete: _propTypes2.default.func, + dataSource: _propTypes2.default.array, + onUpdateInput: _propTypes2.default.func, + openOnFocus: _propTypes2.default.bool, + chipRenderer: _propTypes2.default.func, + newChipKeyCodes: _propTypes2.default.arrayOf(_propTypes2.default.number), + clearOnBlur: _propTypes2.default.bool, + allowDuplicates: _propTypes2.default.bool +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +ChipInput.defaultProps = { + filter: _AutoComplete2.default.caseInsensitiveFilter, + newChipKeyCodes: [13], + clearOnBlur: true, + allowDuplicates: false, + underlineShow: true +}; -var Clock = function (_Component) { - (0, _inherits3.default)(Clock, _Component); +exports.default = ChipInput; - function Clock() { - var _ref; +/***/ }), +/* 831 */ +/***/ (function(module, exports, __webpack_require__) { - var _temp, _this, _ret; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ - (0, _classCallCheck3.default)(this, Clock); +if (false) { + var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && + Symbol.for && + Symbol.for('react.element')) || + 0xeac7; - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + var isValidElement = function(object) { + return typeof object === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE; + }; - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Clock.__proto__ || (0, _getPrototypeOf2.default)(Clock)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - selectedTime: null, - mode: 'hour' - }, _this.setMode = function (mode) { - setTimeout(function () { - _this.setState({ - mode: mode - }); - }, 100); - }, _this.handleSelectAffix = function (affix) { - if (affix === _this.getAffix()) return; + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess); +} else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__(832)(); +} - var hours = _this.state.selectedTime.getHours(); - if (affix === 'am') { - _this.handleChangeHours(hours - 12, affix); - return; - } +/***/ }), +/* 832 */ +/***/ (function(module, exports, __webpack_require__) { - _this.handleChangeHours(hours + 12, affix); - }, _this.handleChangeHours = function (hours, finished) { - var time = new Date(_this.state.selectedTime); - var affix = void 0; +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ - if (typeof finished === 'string') { - affix = finished; - finished = undefined; - } - if (!affix) { - affix = _this.getAffix(); - } - if (affix === 'pm' && hours < 12) { - hours += 12; - } - time.setHours(hours); - _this.setState({ - selectedTime: time - }); - if (finished) { - setTimeout(function () { - _this.setState({ - mode: 'minute' - }); +var emptyFunction = __webpack_require__(22); +var invariant = __webpack_require__(9); +var ReactPropTypesSecret = __webpack_require__(224); - var onChangeHours = _this.props.onChangeHours; +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, - if (onChangeHours) { - onChangeHours(time); - } - }, 100); - } - }, _this.handleChangeMinutes = function (minutes, finished) { - var time = new Date(_this.state.selectedTime); - time.setMinutes(minutes); - _this.setState({ - selectedTime: time - }); + any: shim, + arrayOf: getShim, + element: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim + }; - var onChangeMinutes = _this.props.onChangeMinutes; + ReactPropTypes.checkPropTypes = emptyFunction; + ReactPropTypes.PropTypes = ReactPropTypes; - if (onChangeMinutes && finished) { - setTimeout(function () { - onChangeMinutes(time); - }, 0); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } + return ReactPropTypes; +}; - (0, _createClass3.default)(Clock, [{ - key: 'componentWillMount', - value: function componentWillMount() { - this.setState({ - selectedTime: this.props.initialTime || new Date() - }); - } - }, { - key: 'getAffix', - value: function getAffix() { - if (this.props.format !== 'ampm') return ''; - var hours = this.state.selectedTime.getHours(); - if (hours < 12) { - return 'am'; - } +/***/ }), +/* 833 */ +/***/ (function(module, exports, __webpack_require__) { - return 'pm'; - } - }, { - key: 'getSelectedTime', - value: function getSelectedTime() { - return this.state.selectedTime; - } - }, { - key: 'render', - value: function render() { - var clock = null; +"use strict"; - var _context$muiTheme = this.context.muiTheme, - prepareStyles = _context$muiTheme.prepareStyles, - timePicker = _context$muiTheme.timePicker; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; - var styles = { - root: { - userSelect: 'none' - }, - container: { - height: 280, - padding: 10, - position: 'relative', - boxSizing: 'content-box' - }, - circle: { - position: 'absolute', - top: 20, - width: 260, - height: 260, - borderRadius: '100%', - backgroundColor: timePicker.clockCircleColor - } - }; +var _Chip = __webpack_require__(834); - if (this.state.mode === 'hour') { - clock = _react2.default.createElement(_ClockHours2.default, { - key: 'hours', - format: this.props.format, - onChange: this.handleChangeHours, - initialHours: this.state.selectedTime.getHours() - }); - } else { - clock = _react2.default.createElement(_ClockMinutes2.default, { - key: 'minutes', - onChange: this.handleChangeMinutes, - initialMinutes: this.state.selectedTime.getMinutes() - }); - } +var _Chip2 = _interopRequireDefault(_Chip); - return _react2.default.createElement( - 'div', - { style: prepareStyles(styles.root) }, - _react2.default.createElement(_TimeDisplay2.default, { - selectedTime: this.state.selectedTime, - mode: this.state.mode, - format: this.props.format, - affix: this.getAffix(), - onSelectAffix: this.handleSelectAffix, - onSelectHour: this.setMode.bind(this, 'hour'), - onSelectMin: this.setMode.bind(this, 'minute') - }), - _react2.default.createElement( - 'div', - { style: prepareStyles(styles.container) }, - _react2.default.createElement('div', { style: prepareStyles(styles.circle) }), - clock - ) - ); - } - }]); - return Clock; -}(_react.Component); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -Clock.defaultProps = { - initialTime: new Date() -}; -Clock.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? Clock.propTypes = { - format: _react.PropTypes.oneOf(['ampm', '24hr']), - initialTime: _react.PropTypes.object, - onChangeHours: _react.PropTypes.func, - onChangeMinutes: _react.PropTypes.func -} : void 0; -exports.default = Clock; +exports.default = _Chip2.default; /***/ }), -/* 833 */ +/* 834 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71255,10 +74936,6 @@ var _extends2 = __webpack_require__(7); var _extends3 = _interopRequireDefault(_extends2); -var _slicedToArray2 = __webpack_require__(326); - -var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); - var _objectWithoutProperties2 = __webpack_require__(8); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); @@ -71291,265 +74968,361 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); +var _keycode = __webpack_require__(26); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _colorManipulator = __webpack_require__(50); + +var _EnhancedButton = __webpack_require__(51); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _cancel = __webpack_require__(835); + +var _cancel2 = _interopRequireDefault(_cancel); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var TimeDisplay = function (_Component) { - (0, _inherits3.default)(TimeDisplay, _Component); +function getStyles(props, context, state) { + var chip = context.muiTheme.chip; - function TimeDisplay() { + + var backgroundColor = props.backgroundColor || chip.backgroundColor; + var focusColor = (0, _colorManipulator.emphasize)(backgroundColor, 0.08); + var pressedColor = (0, _colorManipulator.emphasize)(backgroundColor, 0.12); + + return { + avatar: { + marginRight: -4 + }, + deleteIcon: { + color: state.deleteHovered ? (0, _colorManipulator.fade)(chip.deleteIconColor, 0.4) : chip.deleteIconColor, + cursor: 'pointer', + margin: '4px 4px 0px -8px' + }, + label: { + color: props.labelColor || chip.textColor, + fontSize: chip.fontSize, + fontWeight: chip.fontWeight, + lineHeight: '32px', + paddingLeft: 12, + paddingRight: 12, + userSelect: 'none', + whiteSpace: 'nowrap' + }, + root: { + backgroundColor: state.clicked ? pressedColor : state.focused || state.hovered ? focusColor : backgroundColor, + borderRadius: 16, + boxShadow: state.clicked ? chip.shadow : null, + cursor: props.onTouchTap ? 'pointer' : 'default', + display: 'flex', + whiteSpace: 'nowrap', + width: 'fit-content' + } + }; +} + +var Chip = function (_Component) { + (0, _inherits3.default)(Chip, _Component); + + function Chip() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, TimeDisplay); + (0, _classCallCheck3.default)(this, Chip); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimeDisplay.__proto__ || (0, _getPrototypeOf2.default)(TimeDisplay)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - transitionDirection: 'up' - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - - (0, _createClass3.default)(TimeDisplay, [{ - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (nextProps.selectedTime !== this.props.selectedTime) { - var direction = nextProps.selectedTime > this.props.selectedTime ? 'up' : 'down'; - - this.setState({ - transitionDirection: direction - }); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Chip.__proto__ || (0, _getPrototypeOf2.default)(Chip)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + clicked: false, + deleteHovered: false, + focused: false, + hovered: false + }, _this.handleBlur = function (event) { + _this.setState({ clicked: false, focused: false }); + _this.props.onBlur(event); + }, _this.handleFocus = function (event) { + if (_this.props.onTouchTap || _this.props.onRequestDelete) { + _this.setState({ focused: true }); } - } - }, { - key: 'sanitizeTime', - value: function sanitizeTime() { - var hour = this.props.selectedTime.getHours(); - var min = this.props.selectedTime.getMinutes().toString(); - - if (this.props.format === 'ampm') { - hour %= 12; - hour = hour || 12; + _this.props.onFocus(event); + }, _this.handleKeyboardFocus = function (event, keyboardFocused) { + if (keyboardFocused) { + _this.handleFocus(); + _this.props.onFocus(event); + } else { + _this.handleBlur(); } - hour = hour.toString(); - if (hour.length < 2) hour = '0' + hour; - if (min.length < 2) min = '0' + min; + _this.props.onKeyboardFocus(event, keyboardFocused); + }, _this.handleKeyDown = function (event) { + if ((0, _keycode2.default)(event) === 'backspace') { + event.preventDefault(); + if (_this.props.onRequestDelete) { + _this.props.onRequestDelete(event); + } + } + _this.props.onKeyDown(event); + }, _this.handleMouseDown = function (event) { + // Only listen to left clicks + if (event.button === 0) { + event.stopPropagation(); + if (_this.props.onTouchTap) { + _this.setState({ clicked: true }); + } + } + _this.props.onMouseDown(event); + }, _this.handleMouseEnter = function (event) { + if (_this.props.onTouchTap) { + _this.setState({ hovered: true }); + } + _this.props.onMouseEnter(event); + }, _this.handleMouseEnterDeleteIcon = function () { + _this.setState({ deleteHovered: true }); + }, _this.handleMouseLeave = function (event) { + _this.setState({ + clicked: false, + hovered: false + }); + _this.props.onMouseLeave(event); + }, _this.handleMouseLeaveDeleteIcon = function () { + _this.setState({ deleteHovered: false }); + }, _this.handleMouseUp = function (event) { + _this.setState({ clicked: false }); + _this.props.onMouseUp(event); + }, _this.handleTouchTapDeleteIcon = function (event) { + // Stop the event from bubbling up to the `Chip` + event.stopPropagation(); + _this.props.onRequestDelete(event); + }, _this.handleTouchEnd = function (event) { + _this.setState({ clicked: false }); + _this.props.onTouchEnd(event); + }, _this.handleTouchStart = function (event) { + event.stopPropagation(); + if (_this.props.onTouchTap) { + _this.setState({ clicked: true }); + } + _this.props.onTouchStart(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } - return [hour, min]; - } - }, { + (0, _createClass3.default)(Chip, [{ key: 'render', value: function render() { + var buttonEventHandlers = { + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onKeyDown: this.handleKeyDown, + onMouseDown: this.handleMouseDown, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onMouseUp: this.handleMouseUp, + onTouchEnd: this.handleTouchEnd, + onTouchStart: this.handleTouchStart, + onKeyboardFocus: this.handleKeyboardFocus + }; + + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var _props = this.props, - affix = _props.affix, - format = _props.format, - mode = _props.mode, - onSelectAffix = _props.onSelectAffix, - onSelectHour = _props.onSelectHour, - onSelectMin = _props.onSelectMin, - selectedTime = _props.selectedTime, - other = (0, _objectWithoutProperties3.default)(_props, ['affix', 'format', 'mode', 'onSelectAffix', 'onSelectHour', 'onSelectMin', 'selectedTime']); - var _context$muiTheme = this.context.muiTheme, - prepareStyles = _context$muiTheme.prepareStyles, - timePicker = _context$muiTheme.timePicker; + childrenProp = _props.children, + style = _props.style, + className = _props.className, + labelStyle = _props.labelStyle, + labelColor = _props.labelColor, + backgroundColor = _props.backgroundColor, + onRequestDelete = _props.onRequestDelete, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'style', 'className', 'labelStyle', 'labelColor', 'backgroundColor', 'onRequestDelete']); - var styles = { - root: { - padding: '14px 0', - borderTopLeftRadius: 2, - borderTopRightRadius: 2, - backgroundColor: timePicker.headerColor, - color: timePicker.textColor - }, - text: { - margin: '6px 0', - lineHeight: '58px', - height: 58, - fontSize: 58, - display: 'flex', - justifyContent: 'center', - alignItems: 'baseline' - }, - time: { - margin: '0 10px' - }, - affix: { - flex: 1, - position: 'relative', - lineHeight: '17px', - height: 17, - fontSize: 17 - }, - affixTop: { - position: 'absolute', - top: -20, - left: 0 - }, - clickable: { - cursor: 'pointer' - }, - inactive: { - opacity: 0.7 - } - }; + var deletable = this.props.onRequestDelete; + var avatar = null; - var _sanitizeTime = this.sanitizeTime(), - _sanitizeTime2 = (0, _slicedToArray3.default)(_sanitizeTime, 2), - hour = _sanitizeTime2[0], - min = _sanitizeTime2[1]; + var deleteIcon = deletable ? _react2.default.createElement(_cancel2.default, { + color: styles.deleteIcon.color, + style: styles.deleteIcon, + onTouchTap: this.handleTouchTapDeleteIcon, + onMouseEnter: this.handleMouseEnterDeleteIcon, + onMouseLeave: this.handleMouseLeaveDeleteIcon + }) : null; - var buttons = []; - if (format === 'ampm') { - buttons = [_react2.default.createElement( - 'div', - { - key: 'pm', - style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, affix === 'pm' ? {} : styles.inactive)), - onTouchTap: function onTouchTap() { - return onSelectAffix('pm'); - } - }, - 'PM' - ), _react2.default.createElement( - 'div', - { - key: 'am', - style: prepareStyles((0, _simpleAssign2.default)({}, styles.affixTop, styles.clickable, affix === 'am' ? {} : styles.inactive)), - onTouchTap: function onTouchTap() { - return onSelectAffix('am'); - } - }, - 'AM' - )]; + var children = childrenProp; + var childCount = _react2.default.Children.count(children); + + // If the first child is an avatar, extract it and style it + if (childCount > 1) { + children = _react2.default.Children.toArray(children); + + if (_react2.default.isValidElement(children[0]) && children[0].type.muiName === 'Avatar') { + avatar = children.shift(); + + avatar = _react2.default.cloneElement(avatar, { + style: (0, _simpleAssign2.default)(styles.avatar, avatar.props.style), + size: 32 + }); + } } return _react2.default.createElement( - 'div', - (0, _extends3.default)({}, other, { style: prepareStyles(styles.root) }), + _EnhancedButton2.default, + (0, _extends3.default)({}, other, buttonEventHandlers, { + className: className, + containerElement: 'div' // Firefox doesn't support nested buttons + , disableTouchRipple: true, + disableFocusRipple: true, + style: (0, _simpleAssign2.default)(styles.root, style) + }), + avatar, _react2.default.createElement( - 'div', - { style: prepareStyles(styles.text) }, - _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.affix)) }), - _react2.default.createElement( - 'div', - { style: prepareStyles(styles.time) }, - _react2.default.createElement( - 'span', - { - style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, mode === 'hour' ? {} : styles.inactive)), - onTouchTap: onSelectHour - }, - hour - ), - _react2.default.createElement( - 'span', - null, - ':' - ), - _react2.default.createElement( - 'span', - { - style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, mode === 'minute' ? {} : styles.inactive)), - onTouchTap: onSelectMin - }, - min - ) - ), - _react2.default.createElement( - 'div', - { style: prepareStyles((0, _simpleAssign2.default)({}, styles.affix)) }, - buttons - ) - ) + 'span', + { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) }, + children + ), + deleteIcon ); - } - }]); - return TimeDisplay; -}(_react.Component); - -TimeDisplay.defaultProps = { - affix: '', - mode: 'hour' -}; -TimeDisplay.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired + } + }]); + return Chip; +}(_react.Component); + +Chip.defaultProps = { + onBlur: function onBlur() {}, + onFocus: function onFocus() {}, + onKeyDown: function onKeyDown() {}, + onKeyboardFocus: function onKeyboardFocus() {}, + onMouseDown: function onMouseDown() {}, + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + onMouseUp: function onMouseUp() {}, + onTouchEnd: function onTouchEnd() {}, + onTouchStart: function onTouchStart() {} }; - false ? TimeDisplay.propTypes = { - affix: _react.PropTypes.oneOf(['', 'pm', 'am']), - format: _react.PropTypes.oneOf(['ampm', '24hr']), - mode: _react.PropTypes.oneOf(['hour', 'minute']), - onSelectAffix: _react.PropTypes.func, - onSelectHour: _react.PropTypes.func, - onSelectMin: _react.PropTypes.func, - selectedTime: _react.PropTypes.object.isRequired +Chip.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; + false ? Chip.propTypes = { + /** + * Override the background color of the chip. + */ + backgroundColor: _react.PropTypes.string, + /** + * Used to render elements inside the Chip. + */ + children: _react.PropTypes.node, + /** + * CSS `className` of the root element. + */ + className: _react.PropTypes.node, + /** + * Override the label color. + */ + labelColor: _react.PropTypes.string, + /** + * Override the inline-styles of the label. + */ + labelStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** @ignore */ + onKeyDown: _react.PropTypes.func, + /** @ignore */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseDown: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onMouseUp: _react.PropTypes.func, + /** + * Callback function fired when the delete icon is clicked. If set, the delete icon will be shown. + * @param {object} event `touchTap` event targeting the element. + */ + onRequestDelete: _react.PropTypes.func, + /** @ignore */ + onTouchEnd: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * Callback function fired when the `Chip` element is touch-tapped. + * + * @param {object} event TouchTap event targeting the element. + */ + onTouchTap: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object } : void 0; -exports.default = TimeDisplay; +exports.default = Chip; /***/ }), -/* 834 */ +/* 835 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(835), __esModule: true }; +"use strict"; -/***/ }), -/* 835 */ -/***/ (function(module, exports, __webpack_require__) { -__webpack_require__(124); -__webpack_require__(93); -module.exports = __webpack_require__(836); +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _react = __webpack_require__(0); -/***/ }), -/* 836 */ -/***/ (function(module, exports, __webpack_require__) { +var _react2 = _interopRequireDefault(_react); -var classof = __webpack_require__(191); -var ITERATOR = __webpack_require__(22)('iterator'); -var Iterators = __webpack_require__(78); -module.exports = __webpack_require__(18).isIterable = function (it) { - var O = Object(it); - return O[ITERATOR] !== undefined - || '@@iterator' in O - // eslint-disable-next-line no-prototype-builtins - || Iterators.hasOwnProperty(classof(O)); +var _pure = __webpack_require__(20); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(21); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationCancel = function NavigationCancel(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z' }) + ); }; +NavigationCancel = (0, _pure2.default)(NavigationCancel); +NavigationCancel.displayName = 'NavigationCancel'; +NavigationCancel.muiName = 'SvgIcon'; +exports.default = NavigationCancel; /***/ }), -/* 837 */ +/* 836 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(838), __esModule: true }; +"use strict"; -/***/ }), -/* 838 */ -/***/ (function(module, exports, __webpack_require__) { -__webpack_require__(124); -__webpack_require__(93); -module.exports = __webpack_require__(839); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; +var _AppBar = __webpack_require__(837); -/***/ }), -/* 839 */ -/***/ (function(module, exports, __webpack_require__) { +var _AppBar2 = _interopRequireDefault(_AppBar); -var anObject = __webpack_require__(36); -var get = __webpack_require__(190); -module.exports = __webpack_require__(18).getIterator = function (it) { - var iterFn = get(it); - if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); - return anObject(iterFn.call(it)); -}; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +exports.default = _AppBar2.default; /***/ }), -/* 840 */ +/* 837 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71559,6 +75332,18 @@ Object.defineProperty(exports, "__esModule", { value: true }); +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _keys = __webpack_require__(62); + +var _keys2 = _interopRequireDefault(_keys); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -71579,221 +75364,389 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); +exports.getStyles = getStyles; + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(19); +var _IconButton = __webpack_require__(64); -var _reactDom2 = _interopRequireDefault(_reactDom); +var _IconButton2 = _interopRequireDefault(_IconButton); -var _ClockNumber = __webpack_require__(327); +var _menu = __webpack_require__(838); -var _ClockNumber2 = _interopRequireDefault(_ClockNumber); +var _menu2 = _interopRequireDefault(_menu); -var _ClockPointer = __webpack_require__(328); +var _Paper = __webpack_require__(32); -var _ClockPointer2 = _interopRequireDefault(_ClockPointer); +var _Paper2 = _interopRequireDefault(_Paper); + +var _propTypes = __webpack_require__(39); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _warning = __webpack_require__(15); -var _timeUtils = __webpack_require__(98); +var _warning2 = _interopRequireDefault(_warning); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var ClockHours = function (_Component) { - (0, _inherits3.default)(ClockHours, _Component); +function getStyles(props, context) { + var _context$muiTheme = context.muiTheme, + appBar = _context$muiTheme.appBar, + iconButtonSize = _context$muiTheme.button.iconButtonSize, + zIndex = _context$muiTheme.zIndex; - function ClockHours() { + + var flatButtonSize = 36; + + var styles = { + root: { + position: 'relative', + zIndex: zIndex.appBar, + width: '100%', + display: 'flex', + backgroundColor: appBar.color, + paddingLeft: appBar.padding, + paddingRight: appBar.padding + }, + title: { + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', + margin: 0, + paddingTop: 0, + letterSpacing: 0, + fontSize: 24, + fontWeight: appBar.titleFontWeight, + color: appBar.textColor, + height: appBar.height, + lineHeight: appBar.height + 'px' + }, + mainElement: { + boxFlex: 1, + flex: '1' + }, + iconButtonStyle: { + marginTop: (appBar.height - iconButtonSize) / 2, + marginRight: 8, + marginLeft: -16 + }, + iconButtonIconStyle: { + fill: appBar.textColor, + color: appBar.textColor + }, + flatButton: { + color: appBar.textColor, + marginTop: (iconButtonSize - flatButtonSize) / 2 + 1 + } + }; + + return styles; +} + +var AppBar = function (_Component) { + (0, _inherits3.default)(AppBar, _Component); + + function AppBar() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, ClockHours); + (0, _classCallCheck3.default)(this, AppBar); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockHours.__proto__ || (0, _getPrototypeOf2.default)(ClockHours)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) { - event.preventDefault(); - _this.setClock(event.nativeEvent, true); - }, _this.handleMove = function (event) { - event.preventDefault(); - if (_this.isMousePressed(event) !== 1) return; - _this.setClock(event.nativeEvent, false); - }, _this.handleTouchMove = function (event) { - event.preventDefault(); - _this.setClock(event.changedTouches[0], false); - }, _this.handleTouchEnd = function (event) { - event.preventDefault(); - _this.setClock(event.changedTouches[0], true); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AppBar.__proto__ || (0, _getPrototypeOf2.default)(AppBar)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapLeftIconButton = function (event) { + if (_this.props.onLeftIconButtonTouchTap) { + _this.props.onLeftIconButtonTouchTap(event); + } + }, _this.handleTouchTapRightIconButton = function (event) { + if (_this.props.onRightIconButtonTouchTap) { + _this.props.onRightIconButtonTouchTap(event); + } + }, _this.handleTitleTouchTap = function (event) { + if (_this.props.onTitleTouchTap) { + _this.props.onTitleTouchTap(event); + } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(ClockHours, [{ + (0, _createClass3.default)(AppBar, [{ key: 'componentDidMount', value: function componentDidMount() { - var clockElement = _reactDom2.default.findDOMNode(this.refs.mask); - - this.center = { - x: clockElement.offsetWidth / 2, - y: clockElement.offsetHeight / 2 - }; + false ? (0, _warning2.default)(!this.props.iconElementLeft || !this.props.iconClassNameLeft, 'Material-UI: Properties iconElementLeft\n and iconClassNameLeft cannot be simultaneously defined. Please use one or the other.') : void 0; - this.basePoint = { - x: this.center.x, - y: 0 - }; + false ? (0, _warning2.default)(!this.props.iconElementRight || !this.props.iconClassNameRight, 'Material-UI: Properties iconElementRight\n and iconClassNameRight cannot be simultaneously defined. Please use one or the other.') : void 0; } }, { - key: 'isMousePressed', - value: function isMousePressed(event) { - if (typeof event.buttons === 'undefined') { - return event.nativeEvent.which; - } + key: 'render', + value: function render() { + var _props = this.props, + title = _props.title, + titleStyle = _props.titleStyle, + iconStyleLeft = _props.iconStyleLeft, + iconStyleRight = _props.iconStyleRight, + onTitleTouchTap = _props.onTitleTouchTap, + showMenuIconButton = _props.showMenuIconButton, + iconElementLeft = _props.iconElementLeft, + iconElementRight = _props.iconElementRight, + iconClassNameLeft = _props.iconClassNameLeft, + iconClassNameRight = _props.iconClassNameRight, + onLeftIconButtonTouchTap = _props.onLeftIconButtonTouchTap, + onRightIconButtonTouchTap = _props.onRightIconButtonTouchTap, + className = _props.className, + style = _props.style, + zDepth = _props.zDepth, + children = _props.children, + other = (0, _objectWithoutProperties3.default)(_props, ['title', 'titleStyle', 'iconStyleLeft', 'iconStyleRight', 'onTitleTouchTap', 'showMenuIconButton', 'iconElementLeft', 'iconElementRight', 'iconClassNameLeft', 'iconClassNameRight', 'onLeftIconButtonTouchTap', 'onRightIconButtonTouchTap', 'className', 'style', 'zDepth', 'children']); + var prepareStyles = this.context.muiTheme.prepareStyles; - return event.buttons; - } - }, { - key: 'setClock', - value: function setClock(event, finish) { - if (typeof event.offsetX === 'undefined') { - var offset = (0, _timeUtils.getTouchEventOffsetValues)(event); + var styles = getStyles(this.props, this.context); - event.offsetX = offset.offsetX; - event.offsetY = offset.offsetY; - } + var menuElementLeft = void 0; + var menuElementRight = void 0; - var hours = this.getHours(event.offsetX, event.offsetY); + // If the title is a string, wrap in an h1 tag. + // If not, wrap in a div tag. + var titleComponent = typeof title === 'string' || title instanceof String ? 'h1' : 'div'; - this.props.onChange(hours, finish); - } - }, { - key: 'getHours', - value: function getHours(offsetX, offsetY) { - var step = 30; - var x = offsetX - this.center.x; - var y = offsetY - this.center.y; - var cx = this.basePoint.x - this.center.x; - var cy = this.basePoint.y - this.center.y; + var titleElement = _react2.default.createElement(titleComponent, { + onTouchTap: this.handleTitleTouchTap, + style: prepareStyles((0, _simpleAssign2.default)(styles.title, styles.mainElement, titleStyle)) + }, title); - var atan = Math.atan2(cx, cy) - Math.atan2(x, y); + var iconLeftStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, iconStyleLeft); - var deg = (0, _timeUtils.rad2deg)(atan); - deg = Math.round(deg / step) * step; - deg %= 360; + if (showMenuIconButton) { + if (iconElementLeft) { + var iconElementLeftProps = {}; - var value = Math.floor(deg / step) || 0; + if (iconElementLeft.type.muiName === 'IconButton') { + var iconElemLeftChildren = iconElementLeft.props.children; + var iconButtonIconStyle = !(iconElemLeftChildren && iconElemLeftChildren.props && iconElemLeftChildren.props.color) ? styles.iconButtonIconStyle : null; - var delta = Math.pow(x, 2) + Math.pow(y, 2); - var distance = Math.sqrt(delta); + iconElementLeftProps.iconStyle = (0, _simpleAssign2.default)({}, iconButtonIconStyle, iconElementLeft.props.iconStyle); + } - value = value || 12; - if (this.props.format === '24hr') { - if (distance < 90) { - value += 12; - value %= 24; + if (!iconElementLeft.props.onTouchTap && this.props.onLeftIconButtonTouchTap) { + iconElementLeftProps.onTouchTap = this.handleTouchTapLeftIconButton; + } + + menuElementLeft = _react2.default.createElement( + 'div', + { style: prepareStyles(iconLeftStyle) }, + (0, _keys2.default)(iconElementLeftProps).length > 0 ? (0, _react.cloneElement)(iconElementLeft, iconElementLeftProps) : iconElementLeft + ); + } else { + menuElementLeft = _react2.default.createElement( + _IconButton2.default, + { + style: iconLeftStyle, + iconStyle: styles.iconButtonIconStyle, + iconClassName: iconClassNameLeft, + onTouchTap: this.handleTouchTapLeftIconButton + }, + iconClassNameLeft ? '' : _react2.default.createElement(_menu2.default, { style: (0, _simpleAssign2.default)({}, styles.iconButtonIconStyle) }) + ); } - } else { - value %= 12; } - return value; - } - }, { - key: 'getSelected', - value: function getSelected() { - var hour = this.props.initialHours; + var iconRightStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, { + marginRight: -16, + marginLeft: 'auto' + }, iconStyleRight); - if (this.props.format === 'ampm') { - hour %= 12; - hour = hour || 12; + if (iconElementRight) { + var iconElementRightProps = {}; + + switch (iconElementRight.type.muiName) { + case 'IconMenu': + case 'IconButton': + var iconElemRightChildren = iconElementRight.props.children; + var _iconButtonIconStyle = !(iconElemRightChildren && iconElemRightChildren.props && iconElemRightChildren.props.color) ? styles.iconButtonIconStyle : null; + + iconElementRightProps.iconStyle = (0, _simpleAssign2.default)({}, _iconButtonIconStyle, iconElementRight.props.iconStyle); + break; + + case 'FlatButton': + iconElementRightProps.style = (0, _simpleAssign2.default)({}, styles.flatButton, iconElementRight.props.style); + break; + + default: + } + + if (!iconElementRight.props.onTouchTap && this.props.onRightIconButtonTouchTap) { + iconElementRightProps.onTouchTap = this.handleTouchTapRightIconButton; + } + + menuElementRight = _react2.default.createElement( + 'div', + { style: prepareStyles(iconRightStyle) }, + (0, _keys2.default)(iconElementRightProps).length > 0 ? (0, _react.cloneElement)(iconElementRight, iconElementRightProps) : iconElementRight + ); + } else if (iconClassNameRight) { + menuElementRight = _react2.default.createElement(_IconButton2.default, { + style: iconRightStyle, + iconStyle: styles.iconButtonIconStyle, + iconClassName: iconClassNameRight, + onTouchTap: this.handleTouchTapRightIconButton + }); } - return hour; + return _react2.default.createElement( + _Paper2.default, + (0, _extends3.default)({}, other, { + rounded: false, + className: className, + style: (0, _simpleAssign2.default)({}, styles.root, style), + zDepth: zDepth + }), + menuElementLeft, + titleElement, + menuElementRight, + children + ); } - }, { - key: 'getHourNumbers', - value: function getHourNumbers() { - var _this2 = this; + }]); + return AppBar; +}(_react.Component); + +AppBar.muiName = 'AppBar'; +AppBar.defaultProps = { + showMenuIconButton: true, + title: '', + zDepth: 1 +}; +AppBar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? AppBar.propTypes = { + /** + * Can be used to render a tab inside an app bar for instance. + */ + children: _react.PropTypes.node, + /** + * Applied to the app bar's root element. + */ + className: _react.PropTypes.string, + /** + * The classname of the icon on the left of the app bar. + * If you are using a stylesheet for your icons, enter the class name for the icon to be used here. + */ + iconClassNameLeft: _react.PropTypes.string, + /** + * Similiar to the iconClassNameLeft prop except that + * it applies to the icon displayed on the right of the app bar. + */ + iconClassNameRight: _react.PropTypes.string, + /** + * The custom element to be displayed on the left side of the + * app bar such as an SvgIcon. + */ + iconElementLeft: _react.PropTypes.element, + /** + * Similiar to the iconElementLeft prop except that this element is displayed on the right of the app bar. + */ + iconElementRight: _react.PropTypes.element, + /** + * Override the inline-styles of the element displayed on the left side of the app bar. + */ + iconStyleLeft: _react.PropTypes.object, + /** + * Override the inline-styles of the element displayed on the right side of the app bar. + */ + iconStyleRight: _react.PropTypes.object, + /** + * Callback function for when the left icon is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the left `IconButton`. + */ + onLeftIconButtonTouchTap: _react.PropTypes.func, + /** + * Callback function for when the right icon is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the right `IconButton`. + */ + onRightIconButtonTouchTap: _react.PropTypes.func, + /** + * Callback function for when the title text is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the `title` node. + */ + onTitleTouchTap: _react.PropTypes.func, + /** + * Determines whether or not to display the Menu icon next to the title. + * Setting this prop to false will hide the icon. + */ + showMenuIconButton: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The title to display on the app bar. + */ + title: _react.PropTypes.node, + /** + * Override the inline-styles of the app bar's title element. + */ + titleStyle: _react.PropTypes.object, + /** + * The zDepth of the component. + * The shadow of the app bar is also dependent on this property. + */ + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = AppBar; + +/***/ }), +/* 838 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); - var style = { - pointerEvents: 'none' - }; - var hourSize = this.props.format === 'ampm' ? 12 : 24; +var _react = __webpack_require__(0); - var hours = []; - for (var i = 1; i <= hourSize; i++) { - hours.push(i % 24); - } +var _react2 = _interopRequireDefault(_react); - return hours.map(function (hour) { - var isSelected = _this2.getSelected() === hour; - return _react2.default.createElement(_ClockNumber2.default, { - key: hour, - style: style, - isSelected: isSelected, - type: 'hour', - value: hour - }); - }); - } - }, { - key: 'render', - value: function render() { - var styles = { - root: { - height: '100%', - width: '100%', - borderRadius: '100%', - position: 'relative', - pointerEvents: 'none', - boxSizing: 'border-box' - }, +var _pure = __webpack_require__(20); - hitMask: { - height: '100%', - width: '100%', - pointerEvents: 'auto' - } - }; +var _pure2 = _interopRequireDefault(_pure); - var prepareStyles = this.context.muiTheme.prepareStyles; +var _SvgIcon = __webpack_require__(21); - var hours = this.getSelected(); - var numbers = this.getHourNumbers(); +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); - return _react2.default.createElement( - 'div', - { ref: 'clock', style: prepareStyles(styles.root) }, - _react2.default.createElement(_ClockPointer2.default, { hasSelected: true, value: hours, type: 'hour' }), - numbers, - _react2.default.createElement('div', { - ref: 'mask', style: prepareStyles(styles.hitMask), onTouchMove: this.handleTouchMove, - onTouchEnd: this.handleTouchEnd, onMouseUp: this.handleUp, onMouseMove: this.handleMove - }) - ); - } - }]); - return ClockHours; -}(_react.Component); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -ClockHours.defaultProps = { - initialHours: new Date().getHours(), - onChange: function onChange() {}, - format: 'ampm' -}; -ClockHours.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired +var NavigationMenu = function NavigationMenu(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z' }) + ); }; - false ? ClockHours.propTypes = { - format: _react.PropTypes.oneOf(['ampm', '24hr']), - initialHours: _react.PropTypes.number, - onChange: _react.PropTypes.func -} : void 0; -exports.default = ClockHours; +NavigationMenu = (0, _pure2.default)(NavigationMenu); +NavigationMenu.displayName = 'NavigationMenu'; +NavigationMenu.muiName = 'SvgIcon'; + +exports.default = NavigationMenu; /***/ }), -/* 841 */ +/* 839 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71803,6 +75756,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -71823,234 +75784,443 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _ClockNumber = __webpack_require__(327); +var _warning = __webpack_require__(15); -var _ClockNumber2 = _interopRequireDefault(_ClockNumber); +var _warning2 = _interopRequireDefault(_warning); -var _ClockPointer = __webpack_require__(328); +var _TabTemplate = __webpack_require__(840); -var _ClockPointer2 = _interopRequireDefault(_ClockPointer); +var _TabTemplate2 = _interopRequireDefault(_TabTemplate); + +var _InkBar = __webpack_require__(841); -var _timeUtils = __webpack_require__(98); +var _InkBar2 = _interopRequireDefault(_InkBar); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var ClockMinutes = function (_Component) { - (0, _inherits3.default)(ClockMinutes, _Component); +function getStyles(props, context) { + var tabs = context.muiTheme.tabs; - function ClockMinutes() { + + return { + tabItemContainer: { + width: '100%', + backgroundColor: tabs.backgroundColor, + whiteSpace: 'nowrap', + display: 'flex' + } + }; +} + +var Tabs = function (_Component) { + (0, _inherits3.default)(Tabs, _Component); + + function Tabs() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, ClockMinutes); + (0, _classCallCheck3.default)(this, Tabs); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockMinutes.__proto__ || (0, _getPrototypeOf2.default)(ClockMinutes)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) { - event.preventDefault(); - _this.setClock(event.nativeEvent, true); - }, _this.handleMove = function (event) { - event.preventDefault(); - if (_this.isMousePressed(event) !== 1) { - return; + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tabs.__proto__ || (0, _getPrototypeOf2.default)(Tabs)).call.apply(_ref, [this].concat(args))), _this), _this.state = { selectedIndex: 0 }, _this.handleTabTouchTap = function (value, event, tab) { + var valueLink = _this.getValueLink(_this.props); + var index = tab.props.index; + + if (valueLink.value && valueLink.value !== value || _this.state.selectedIndex !== index) { + valueLink.requestChange(value, event, tab); + } + + _this.setState({ selectedIndex: index }); + + if (tab.props.onActive) { + tab.props.onActive(tab); } - _this.setClock(event.nativeEvent, false); - }, _this.handleTouch = function (event) { - event.preventDefault(); - _this.setClock(event.changedTouches[0], event.type === 'touchend'); }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(ClockMinutes, [{ - key: 'componentDidMount', - value: function componentDidMount() { - var clockElement = this.refs.mask; - - this.center = { - x: clockElement.offsetWidth / 2, - y: clockElement.offsetHeight / 2 - }; + (0, _createClass3.default)(Tabs, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var valueLink = this.getValueLink(this.props); + var initialIndex = this.props.initialSelectedIndex; - this.basePoint = { - x: this.center.x, - y: 0 - }; + this.setState({ + selectedIndex: valueLink.value !== undefined ? this.getSelectedIndex(this.props) : initialIndex < this.getTabCount() ? initialIndex : 0 + }); } }, { - key: 'isMousePressed', - value: function isMousePressed(event) { - if (typeof event.buttons === 'undefined') { - return event.nativeEvent.which; + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(newProps, nextContext) { + var valueLink = this.getValueLink(newProps); + var newState = { + muiTheme: nextContext.muiTheme || this.context.muiTheme + }; + + if (valueLink.value !== undefined) { + newState.selectedIndex = this.getSelectedIndex(newProps); } - return event.buttons; + + this.setState(newState); } }, { - key: 'setClock', - value: function setClock(event, finish) { - if (typeof event.offsetX === 'undefined') { - var offset = (0, _timeUtils.getTouchEventOffsetValues)(event); + key: 'getTabs', + value: function getTabs() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; - event.offsetX = offset.offsetX; - event.offsetY = offset.offsetY; - } + var tabs = []; - var minutes = this.getMinutes(event.offsetX, event.offsetY); + _react.Children.forEach(props.children, function (tab) { + if ((0, _react.isValidElement)(tab)) { + tabs.push(tab); + } + }); - this.props.onChange(minutes, finish); + return tabs; } }, { - key: 'getMinutes', - value: function getMinutes(offsetX, offsetY) { - var step = 6; - var x = offsetX - this.center.x; - var y = offsetY - this.center.y; - var cx = this.basePoint.x - this.center.x; - var cy = this.basePoint.y - this.center.y; - - var atan = Math.atan2(cx, cy) - Math.atan2(x, y); - - var deg = (0, _timeUtils.rad2deg)(atan); - deg = Math.round(deg / step) * step; - deg %= 360; + key: 'getTabCount', + value: function getTabCount() { + return this.getTabs().length; + } - var value = Math.floor(deg / step) || 0; + // Do not use outside of this component, it will be removed once valueLink is deprecated - return value; + }, { + key: 'getValueLink', + value: function getValueLink(props) { + return props.valueLink || { + value: props.value, + requestChange: props.onChange + }; } }, { - key: 'getMinuteNumbers', - value: function getMinuteNumbers() { - var minutes = []; - for (var i = 0; i < 12; i++) { - minutes.push(i * 5); - } - var selectedMinutes = this.props.initialMinutes; - var hasSelected = false; + key: 'getSelectedIndex', + value: function getSelectedIndex(props) { + var valueLink = this.getValueLink(props); + var selectedIndex = -1; - var numbers = minutes.map(function (minute) { - var isSelected = selectedMinutes === minute; - if (isSelected) { - hasSelected = true; + this.getTabs(props).forEach(function (tab, index) { + if (valueLink.value === tab.props.value) { + selectedIndex = index; } - return _react2.default.createElement(_ClockNumber2.default, { - key: minute, - isSelected: isSelected, - type: 'minute', - value: minute - }); }); - return { - numbers: numbers, - hasSelected: hasSelected, - selected: selectedMinutes - }; + return selectedIndex; + } + }, { + key: 'getSelected', + value: function getSelected(tab, index) { + var valueLink = this.getValueLink(this.props); + return valueLink.value ? valueLink.value === tab.props.value : this.state.selectedIndex === index; } }, { key: 'render', value: function render() { - var styles = { - root: { - height: '100%', - width: '100%', - borderRadius: '100%', - position: 'relative', - pointerEvents: 'none', - boxSizing: 'border-box' - }, - - hitMask: { - height: '100%', - width: '100%', - pointerEvents: 'auto' - } - }; + var _this2 = this; + var _props = this.props, + contentContainerClassName = _props.contentContainerClassName, + contentContainerStyle = _props.contentContainerStyle, + initialSelectedIndex = _props.initialSelectedIndex, + inkBarStyle = _props.inkBarStyle, + onChange = _props.onChange, + style = _props.style, + tabItemContainerStyle = _props.tabItemContainerStyle, + tabTemplate = _props.tabTemplate, + tabTemplateStyle = _props.tabTemplateStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['contentContainerClassName', 'contentContainerStyle', 'initialSelectedIndex', 'inkBarStyle', 'onChange', 'style', 'tabItemContainerStyle', 'tabTemplate', 'tabTemplateStyle']); var prepareStyles = this.context.muiTheme.prepareStyles; - var minutes = this.getMinuteNumbers(); + var styles = getStyles(this.props, this.context); + var valueLink = this.getValueLink(this.props); + var tabValue = valueLink.value; + var tabContent = []; + var width = 100 / this.getTabCount(); + + var tabs = this.getTabs().map(function (tab, index) { + false ? (0, _warning2.default)(tab.type && tab.type.muiName === 'Tab', 'Material-UI: Tabs only accepts Tab Components as children.\n Found ' + (tab.type.muiName || tab.type) + ' as child number ' + (index + 1) + ' of Tabs') : void 0; + + false ? (0, _warning2.default)(!tabValue || tab.props.value !== undefined, 'Material-UI: Tabs value prop has been passed, but Tab ' + index + '\n does not have a value prop. Needs value if Tabs is going\n to be a controlled component.') : void 0; + + tabContent.push(tab.props.children ? (0, _react.createElement)(tabTemplate || _TabTemplate2.default, { + key: index, + selected: _this2.getSelected(tab, index), + style: tabTemplateStyle + }, tab.props.children) : undefined); + + return (0, _react.cloneElement)(tab, { + key: index, + index: index, + selected: _this2.getSelected(tab, index), + width: width + '%', + onTouchTap: _this2.handleTabTouchTap + }); + }); + + var inkBar = this.state.selectedIndex !== -1 ? _react2.default.createElement(_InkBar2.default, { + left: width * this.state.selectedIndex + '%', + width: width + '%', + style: inkBarStyle + }) : null; + + var inkBarContainerWidth = tabItemContainerStyle ? tabItemContainerStyle.width : '100%'; return _react2.default.createElement( 'div', - { ref: 'clock', style: prepareStyles(styles.root) }, - _react2.default.createElement(_ClockPointer2.default, { value: minutes.selected, type: 'minute', hasSelected: minutes.hasSelected }), - minutes.numbers, - _react2.default.createElement('div', { - ref: 'mask', - style: prepareStyles(styles.hitMask), - onTouchMove: this.handleTouch, - onTouchEnd: this.handleTouch, - onMouseUp: this.handleUp, - onMouseMove: this.handleMove - }) + (0, _extends3.default)({ style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, other), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.tabItemContainer, tabItemContainerStyle)) }, + tabs + ), + _react2.default.createElement( + 'div', + { style: { width: inkBarContainerWidth } }, + inkBar + ), + _react2.default.createElement( + 'div', + { + style: prepareStyles((0, _simpleAssign2.default)({}, contentContainerStyle)), + className: contentContainerClassName + }, + tabContent + ) ); } }]); - return ClockMinutes; + return Tabs; }(_react.Component); -ClockMinutes.defaultProps = { - initialMinutes: new Date().getMinutes(), +Tabs.defaultProps = { + initialSelectedIndex: 0, onChange: function onChange() {} }; -ClockMinutes.contextTypes = { +Tabs.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? ClockMinutes.propTypes = { - initialMinutes: _react.PropTypes.number, - onChange: _react.PropTypes.func + false ? Tabs.propTypes = { + /** + * Should be used to pass `Tab` components. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The css class name of the content's container. + */ + contentContainerClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the content's container. + */ + contentContainerStyle: _react.PropTypes.object, + /** + * Specify initial visible tab index. + * If `initialSelectedIndex` is set but larger than the total amount of specified tabs, + * `initialSelectedIndex` will revert back to default. + * If `initialSelectedIndex` is set to any negative value, no tab will be selected intially. + */ + initialSelectedIndex: _react.PropTypes.number, + /** + * Override the inline-styles of the InkBar. + */ + inkBarStyle: _react.PropTypes.object, + /** + * Called when the selected value change. + */ + onChange: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of the tab-labels container. + */ + tabItemContainerStyle: _react.PropTypes.object, + /** + * Override the default tab template used to wrap the content of each tab element. + */ + tabTemplate: _react.PropTypes.func, + /** + * Override the inline-styles of the tab template. + */ + tabTemplateStyle: _react.PropTypes.object, + /** + * Makes Tabs controllable and selects the tab whose value prop matches this prop. + */ + value: _react.PropTypes.any } : void 0; -exports.default = ClockMinutes; +exports.default = Tabs; + +/***/ }), +/* 840 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + width: '100%', + position: 'relative', + textAlign: 'initial' +}; + +var TabTemplate = function TabTemplate(_ref) { + var children = _ref.children, + selected = _ref.selected, + style = _ref.style; + + var templateStyle = (0, _simpleAssign2.default)({}, styles, style); + if (!selected) { + templateStyle.height = 0; + templateStyle.overflow = 'hidden'; + } + + return _react2.default.createElement( + 'div', + { style: templateStyle }, + children + ); +}; + + false ? TabTemplate.propTypes = { + children: _react.PropTypes.node, + selected: _react.PropTypes.bool, + style: _react.PropTypes.object +} : void 0; + +exports.default = TabTemplate; + +/***/ }), +/* 841 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -/***/ }), -/* 842 */ -/***/ (function(module, exports, __webpack_require__) { +var _react = __webpack_require__(0); -"use strict"; +var _react2 = _interopRequireDefault(_react); +var _transitions = __webpack_require__(10); -Object.defineProperty(exports, "__esModule", { - value: true -}); +var _transitions2 = _interopRequireDefault(_transitions); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _Toggle = __webpack_require__(843); +function getStyles(props, context) { + var inkBar = context.muiTheme.inkBar; -var _Toggle2 = _interopRequireDefault(_Toggle); -var _createComponent = __webpack_require__(43); + return { + root: { + left: props.left, + width: props.width, + bottom: 0, + display: 'block', + backgroundColor: props.color || inkBar.backgroundColor, + height: 2, + marginTop: -2, + position: 'relative', + transition: _transitions2.default.easeOut('1s', 'left') + } + }; +} -var _createComponent2 = _interopRequireDefault(_createComponent); +var InkBar = function (_Component) { + (0, _inherits3.default)(InkBar, _Component); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function InkBar() { + (0, _classCallCheck3.default)(this, InkBar); + return (0, _possibleConstructorReturn3.default)(this, (InkBar.__proto__ || (0, _getPrototypeOf2.default)(InkBar)).apply(this, arguments)); + } -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + (0, _createClass3.default)(InkBar, [{ + key: 'render', + value: function render() { + var style = this.props.style; + var prepareStyles = this.context.muiTheme.prepareStyles; -exports.default = (0, _createComponent2.default)(_Toggle2.default, function (_ref) { - var _ref$input = _ref.input, - onChange = _ref$input.onChange, - value = _ref$input.value, - inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']), - defaultToggled = _ref.defaultToggled, - meta = _ref.meta, - props = _objectWithoutProperties(_ref, ['input', 'defaultToggled', 'meta']); + var styles = getStyles(this.props, this.context); - return _extends({}, inputProps, props, { - onToggle: onChange, - toggled: !!value - }); -}); + return _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }); + } + }]); + return InkBar; +}(_react.Component); + +InkBar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? InkBar.propTypes = { + color: _react.PropTypes.string, + left: _react.PropTypes.string.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + width: _react.PropTypes.string.isRequired +} : void 0; +exports.default = InkBar; /***/ }), -/* 843 */ +/* 842 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72061,16 +76231,16 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _Toggle = __webpack_require__(844); +var _Badge = __webpack_require__(843); -var _Toggle2 = _interopRequireDefault(_Toggle); +var _Badge2 = _interopRequireDefault(_Badge); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = _Toggle2.default; +exports.default = _Badge2.default; /***/ }), -/* 844 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72116,293 +76286,137 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(10); - -var _transitions2 = _interopRequireDefault(_transitions); - -var _Paper = __webpack_require__(34); - -var _Paper2 = _interopRequireDefault(_Paper); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _EnhancedSwitch = __webpack_require__(202); +function getStyles(props, context) { + var primary = props.primary, + secondary = props.secondary; + var badge = context.muiTheme.badge; -var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var badgeBackgroundColor = void 0; + var badgeTextColor = void 0; -function getStyles(props, context, state) { - var disabled = props.disabled, - elementStyle = props.elementStyle, - trackSwitchedStyle = props.trackSwitchedStyle, - thumbSwitchedStyle = props.thumbSwitchedStyle, - trackStyle = props.trackStyle, - thumbStyle = props.thumbStyle, - iconStyle = props.iconStyle, - rippleStyle = props.rippleStyle, - labelStyle = props.labelStyle; - var _context$muiTheme = context.muiTheme, - baseTheme = _context$muiTheme.baseTheme, - toggle = _context$muiTheme.toggle; + if (primary) { + badgeBackgroundColor = badge.primaryColor; + badgeTextColor = badge.primaryTextColor; + } else if (secondary) { + badgeBackgroundColor = badge.secondaryColor; + badgeTextColor = badge.secondaryTextColor; + } else { + badgeBackgroundColor = badge.color; + badgeTextColor = badge.textColor; + } + var radius = 12; + var radius2x = Math.floor(2 * radius); - var toggleSize = 20; - var toggleTrackWidth = 36; - var styles = { - icon: { - width: 36, - padding: '4px 0px 6px 2px' - }, - ripple: { - top: -10, - left: -10, - color: state.switched ? toggle.thumbOnColor : baseTheme.palette.textColor - }, - toggleElement: { - width: toggleTrackWidth - }, - track: { - transition: _transitions2.default.easeOut(), - width: '100%', - height: 14, - borderRadius: 30, - backgroundColor: toggle.trackOffColor + return { + root: { + position: 'relative', + display: 'inline-block', + padding: radius2x + 'px ' + radius2x + 'px ' + radius + 'px ' + radius + 'px' }, - thumb: { - transition: _transitions2.default.easeOut(), + badge: { + display: 'flex', + flexDirection: 'row', + flexWrap: 'wrap', + justifyContent: 'center', + alignContent: 'center', + alignItems: 'center', position: 'absolute', - top: 1, - left: 0, - width: toggleSize, - height: toggleSize, - lineHeight: '24px', + top: 0, + right: 0, + fontWeight: badge.fontWeight, + fontSize: radius, + width: radius2x, + height: radius2x, borderRadius: '50%', - backgroundColor: toggle.thumbOffColor - }, - trackWhenSwitched: { - backgroundColor: toggle.trackOnColor - }, - thumbWhenSwitched: { - backgroundColor: toggle.thumbOnColor, - left: '100%' - }, - trackWhenDisabled: { - backgroundColor: toggle.trackDisabledColor - }, - thumbWhenDisabled: { - backgroundColor: toggle.thumbDisabledColor - }, - label: { - color: disabled ? toggle.labelDisabledColor : toggle.labelColor, - width: 'calc(100% - ' + (toggleTrackWidth + 10) + 'px)' + backgroundColor: badgeBackgroundColor, + color: badgeTextColor } }; - - (0, _simpleAssign2.default)(styles.track, trackStyle, state.switched && styles.trackWhenSwitched, state.switched && trackSwitchedStyle, disabled && styles.trackWhenDisabled); - - (0, _simpleAssign2.default)(styles.thumb, thumbStyle, state.switched && styles.thumbWhenSwitched, state.switched && thumbSwitchedStyle, disabled && styles.thumbWhenDisabled); - - if (state.switched) { - styles.thumb.marginLeft = 0 - styles.thumb.width; - } - - (0, _simpleAssign2.default)(styles.icon, iconStyle); - - (0, _simpleAssign2.default)(styles.ripple, rippleStyle); - - (0, _simpleAssign2.default)(styles.label, labelStyle); - - (0, _simpleAssign2.default)(styles.toggleElement, elementStyle); - - return styles; } -var Toggle = function (_Component) { - (0, _inherits3.default)(Toggle, _Component); - - function Toggle() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, Toggle); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +var Badge = function (_Component) { + (0, _inherits3.default)(Badge, _Component); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Toggle.__proto__ || (0, _getPrototypeOf2.default)(Toggle)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - switched: false - }, _this.handleStateChange = function (newSwitched) { - _this.setState({ - switched: newSwitched - }); - }, _this.handleToggle = function (event, isInputChecked) { - if (_this.props.onToggle) { - _this.props.onToggle(event, isInputChecked); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + function Badge() { + (0, _classCallCheck3.default)(this, Badge); + return (0, _possibleConstructorReturn3.default)(this, (Badge.__proto__ || (0, _getPrototypeOf2.default)(Badge)).apply(this, arguments)); } - (0, _createClass3.default)(Toggle, [{ - key: 'componentWillMount', - value: function componentWillMount() { - var _props = this.props, - toggled = _props.toggled, - defaultToggled = _props.defaultToggled, - valueLink = _props.valueLink; - - - if (toggled || defaultToggled || valueLink && valueLink.value) { - this.setState({ - switched: true - }); - } - } - }, { - key: 'isToggled', - value: function isToggled() { - return this.refs.enhancedSwitch.isSwitched(); - } - }, { - key: 'setToggled', - value: function setToggled(newToggledValue) { - this.refs.enhancedSwitch.setSwitched(newToggledValue); - } - }, { + (0, _createClass3.default)(Badge, [{ key: 'render', value: function render() { - var _props2 = this.props, - defaultToggled = _props2.defaultToggled, - elementStyle = _props2.elementStyle, - onToggle = _props2.onToggle, - trackSwitchedStyle = _props2.trackSwitchedStyle, - thumbSwitchedStyle = _props2.thumbSwitchedStyle, - toggled = _props2.toggled, - other = (0, _objectWithoutProperties3.default)(_props2, ['defaultToggled', 'elementStyle', 'onToggle', 'trackSwitchedStyle', 'thumbSwitchedStyle', 'toggled']); + var _props = this.props, + badgeContent = _props.badgeContent, + badgeStyle = _props.badgeStyle, + children = _props.children, + primary = _props.primary, + secondary = _props.secondary, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['badgeContent', 'badgeStyle', 'children', 'primary', 'secondary', 'style']); var prepareStyles = this.context.muiTheme.prepareStyles; - var styles = getStyles(this.props, this.context, this.state); + var styles = getStyles(this.props, this.context); - var toggleElement = _react2.default.createElement( + return _react2.default.createElement( 'div', - { style: prepareStyles((0, _simpleAssign2.default)({}, styles.toggleElement)) }, - _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.track)) }), - _react2.default.createElement(_Paper2.default, { style: styles.thumb, circle: true, zDepth: 1 }) + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, styles.root, style)) }), + children, + _react2.default.createElement( + 'span', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.badge, badgeStyle)) }, + badgeContent + ) ); - - var enhancedSwitchProps = { - ref: 'enhancedSwitch', - inputType: 'checkbox', - switchElement: toggleElement, - rippleStyle: styles.ripple, - rippleColor: styles.ripple.color, - iconStyle: styles.icon, - trackStyle: styles.track, - thumbStyle: styles.thumb, - labelStyle: styles.label, - switched: this.state.switched, - onSwitch: this.handleToggle, - onParentShouldUpdate: this.handleStateChange, - labelPosition: this.props.labelPosition - }; - - if (this.props.hasOwnProperty('toggled')) { - enhancedSwitchProps.checked = toggled; - } else if (this.props.hasOwnProperty('defaultToggled')) { - enhancedSwitchProps.defaultChecked = defaultToggled; - } - - return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps)); } }]); - return Toggle; + return Badge; }(_react.Component); -Toggle.defaultProps = { - defaultToggled: false, - disabled: false, - labelPosition: 'left' +Badge.defaultProps = { + primary: false, + secondary: false }; -Toggle.contextTypes = { +Badge.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; - false ? Toggle.propTypes = { - /** - * Determines whether the Toggle is initially turned on. - * **Warning:** This cannot be used in conjunction with `toggled`. - * Decide between using a controlled or uncontrolled input element and remove one of these props. - * More info: https://fb.me/react-controlled-components - */ - defaultToggled: _react.PropTypes.bool, - /** - * Will disable the toggle if true. - */ - disabled: _react.PropTypes.bool, - /** - * Overrides the inline-styles of the Toggle element. - */ - elementStyle: _react.PropTypes.object, - /** - * Overrides the inline-styles of the Icon element. - */ - iconStyle: _react.PropTypes.object, + false ? Badge.propTypes = { /** - * Overrides the inline-styles of the input element. + * This is the content rendered within the badge. */ - inputStyle: _react.PropTypes.object, + badgeContent: _react.PropTypes.node.isRequired, /** - * Label for toggle. + * Override the inline-styles of the badge element. */ - label: _react.PropTypes.node, + badgeStyle: _react.PropTypes.object, /** - * Where the label will be placed next to the toggle. + * The badge will be added relativelty to this node. */ - labelPosition: _react.PropTypes.oneOf(['left', 'right']), + children: _react.PropTypes.node, /** - * Overrides the inline-styles of the Toggle element label. + * The css class name of the root element. */ - labelStyle: _react.PropTypes.object, + className: _react.PropTypes.string, /** - * Callback function that is fired when the toggle switch is toggled. + * If true, the badge will use the primary badge colors. */ - onToggle: _react.PropTypes.func, + primary: _react.PropTypes.bool, /** - * Override style of ripple. + * If true, the badge will use the secondary badge colors. */ - rippleStyle: _react.PropTypes.object, + secondary: _react.PropTypes.bool, /** * Override the inline-styles of the root element. */ - style: _react.PropTypes.object, - /** - * Override style for thumb. - */ - thumbStyle: _react.PropTypes.object, - /** - * Override the inline styles for thumb when the toggle switch is toggled on. - */ - thumbSwitchedStyle: _react.PropTypes.object, - /** - * Toggled if set to true. - */ - toggled: _react.PropTypes.bool, - /** - * Override style for track. - */ - trackStyle: _react.PropTypes.object, - /** - * Override the inline styles for track when the toggle switch is toggled on. - */ - trackSwitchedStyle: _react.PropTypes.object, - /** - * ValueLink prop for when using controlled toggle. - */ - valueLink: _react.PropTypes.object + style: _react.PropTypes.object } : void 0; -exports.default = Toggle; +exports.default = Badge; /***/ }), -/* 845 */ +/* 844 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72412,184 +76426,36 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _assign = __webpack_require__(49); - -var _assign2 = _interopRequireDefault(_assign); - -var _react = __webpack_require__(0); - -var _react2 = _interopRequireDefault(_react); - -var _reduxForm = __webpack_require__(113); - -var _reactRedux = __webpack_require__(27); - -var _RaisedButton = __webpack_require__(200); - -var _RaisedButton2 = _interopRequireDefault(_RaisedButton); - -var _reduxFormMaterialUi = __webpack_require__(201); +var _keys = __webpack_require__(62); -var _Styles = __webpack_require__(80); +var _keys2 = _interopRequireDefault(_keys); -var _Styles2 = _interopRequireDefault(_Styles); +exports.changeMenu = changeMenu; -var _FormValidators = __webpack_require__(204); +var _ActionTypes = __webpack_require__(49); -var Validators = _interopRequireWildcard(_FormValidators); +var types = _interopRequireWildcard(_ActionTypes); -var _Menus = __webpack_require__(96); +var _Menus = __webpack_require__(84); var menus = _interopRequireWildcard(_Menus); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var defaultValues = { - autoCheckout: false, - autoPay: false, - strictSize: true, - hideSoldOut: false, - captchaBypass: false, - addToCartDelay: 200, - checkoutDelay: 2000 -}; - -var Options = function Options(props) { - var handleSubmit = props.handleSubmit, - pristine = props.pristine, - submitting = props.submitting; - - return _react2.default.createElement( - 'form', - { onSubmit: handleSubmit, id: 'options-form' }, - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'autoCheckout', - component: _reduxFormMaterialUi.Toggle, - label: 'Enable auto checkout', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'autoPay', - component: _reduxFormMaterialUi.Toggle, - label: 'Enable auto payment', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'strictSize', - component: _reduxFormMaterialUi.Toggle, - label: 'Enable strict size checking', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'hideSoldOut', - component: _reduxFormMaterialUi.Toggle, - label: 'Hide sold out products', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'captchaBypass', - component: _reduxFormMaterialUi.Toggle, - label: 'Bypass captcha (beta)', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'addToCartDelay', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Add to cart delay (ms)', - hintText: 'Add to cart delay (ms)', - style: _Styles2.default.fields.text, - validate: [Validators.required, Validators.number] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'checkoutDelay', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Checkout delay (ms)', - hintText: 'Checkout delay (ms)', - style: _Styles2.default.fields.text, - validate: [Validators.required, Validators.number] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'maxPrice', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Maximum product price', - hintText: 'Maximum product price', - style: _Styles2.default.fields.text, - validate: [Validators.required, Validators.number] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'minPrice', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Minimum product price', - hintText: 'Minimum product price', - style: _Styles2.default.fields.text, - validate: [Validators.required, Validators.number] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_RaisedButton2.default, { - label: 'Save', - disabled: pristine || submitting, - type: 'submit' - }) - ) - ); -}; - -function mapStateToProps(state, ownProps) { - return { - initialValues: (0, _assign2.default)(defaultValues, (state.settings.values[ownProps.shop] || {})[menus.MENU_OPTIONS] || {}) - }; -} - -Options.propTypes = { - shop: _react.PropTypes.string.isRequired -}; - -exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({ - form: 'options' -})(Options)); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function changeMenu(newMenu) { + var keys = (0, _keys2.default)(menus).map(function (x) { + return menus[x]; + }); + if (keys.indexOf(newMenu) !== -1) { + return { type: types.CHANGE_MENU, menu: newMenu }; + } + throw new Error('Invalid menu : ' + newMenu); +} /***/ }), -/* 846 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72603,235 +76469,58 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _reduxForm = __webpack_require__(113); - -var _reactRedux = __webpack_require__(27); +var _reactRedux = __webpack_require__(19); -var _MenuItem = __webpack_require__(129); +var _Snackbar = __webpack_require__(846); -var _MenuItem2 = _interopRequireDefault(_MenuItem); +var _Snackbar2 = _interopRequireDefault(_Snackbar); -var _RaisedButton = __webpack_require__(200); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _RaisedButton2 = _interopRequireDefault(_RaisedButton); +function NotificationBar(props) { + var notification = props.notification; -var _reduxFormMaterialUi = __webpack_require__(201); + return _react2.default.createElement(_Snackbar2.default, { + open: notification.message !== null, + message: notification.message === null ? '...' : notification.message, + autoHideDuration: 4000, + bodyStyle: { height: 'auto', lineHeight: '20px', padding: 24, marginLeft: 256, whiteSpace: 'pre-line' } + }); +} -var _Styles = __webpack_require__(80); +NotificationBar.propTypes = { + notification: _react.PropTypes.shape({ + message: _react.PropTypes.string + }) +}; -var _Styles2 = _interopRequireDefault(_Styles); +function mapStateToProps(state) { + return { + notification: state.notification + }; +} -var _Utils = __webpack_require__(329); +exports.default = (0, _reactRedux.connect)(mapStateToProps)(NotificationBar); -var Utils = _interopRequireWildcard(_Utils); +/***/ }), +/* 846 */ +/***/ (function(module, exports, __webpack_require__) { -var _FormValidators = __webpack_require__(204); +"use strict"; -var Validators = _interopRequireWildcard(_FormValidators); -var _Menus = __webpack_require__(96); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; -var menus = _interopRequireWildcard(_Menus); +var _Snackbar = __webpack_require__(847); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +var _Snackbar2 = _interopRequireDefault(_Snackbar); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var Sizes = function Sizes(props) { - var handleSubmit = props.handleSubmit, - pristine = props.pristine, - submitting = props.submitting; - - return _react2.default.createElement( - 'form', - { onSubmit: handleSubmit, id: 'biling-form' }, - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'accessories', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Accessories', - hintText: 'Accessories', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 't-shirts', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'T-Shirts', - hintText: 'T-Shirts', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'pants', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Pants', - hintText: 'Pants', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizesPants.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'shorts', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Shorts', - hintText: 'Shorts', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizesPants.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'sweatshirts', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Sweatshirts', - hintText: 'Sweatshirts', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'tops-sweaters', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Tops/Sweaters', - hintText: 'Tops/Sweaters', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'shirts', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Shirts', - hintText: 'Shirts', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'jackets', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Jackets', - hintText: 'Jackets', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'shoes', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Shoes', - hintText: 'Shoes', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.shoeSizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_RaisedButton2.default, { - label: 'Save', - disabled: pristine || submitting, - type: 'submit' - }) - ) - ); -}; - -Sizes.propTypes = { - shop: _react.PropTypes.string.isRequired -}; - -function mapStateToProps(state, ownProps) { - return { - initialValues: (state.settings.values[ownProps.shop] || {})[menus.MENU_SIZES] || {} - }; -} - -exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({ - form: 'sizes' -})(Sizes)); +exports.default = _Snackbar2.default; /***/ }), /* 847 */ @@ -72844,87 +76533,309 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _assign = __webpack_require__(49); +var _extends2 = __webpack_require__(7); -var _assign2 = _interopRequireDefault(_assign); +var _extends3 = _interopRequireDefault(_extends2); -exports.default = Layout; +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _AppBar = __webpack_require__(848); +var _transitions = __webpack_require__(10); -var _AppBar2 = _interopRequireDefault(_AppBar); +var _transitions2 = _interopRequireDefault(_transitions); -var _Tabs = __webpack_require__(851); +var _ClickAwayListener = __webpack_require__(206); -var _Tabs2 = _interopRequireDefault(_Tabs); +var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener); -var _Paper = __webpack_require__(34); +var _SnackbarBody = __webpack_require__(848); -var _Paper2 = _interopRequireDefault(_Paper); +var _SnackbarBody2 = _interopRequireDefault(_SnackbarBody); -var _Styles = __webpack_require__(80); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _Styles2 = _interopRequireDefault(_Styles); +function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + desktopSubheaderHeight = _context$muiTheme.baseTheme.spacing.desktopSubheaderHeight, + zIndex = _context$muiTheme.zIndex; + var open = state.open; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function Layout(props) { - var children = props.children, - title = props.title, - contentStyle = props.contentStyle, - tabs = props.tabs, - currentTab = props.currentTab; + var styles = { + root: { + position: 'fixed', + left: '50%', + display: 'flex', + bottom: 0, + zIndex: zIndex.snackbar, + visibility: open ? 'visible' : 'hidden', + transform: open ? 'translate(-50%, 0)' : 'translate(-50%, ' + desktopSubheaderHeight + 'px)', + transition: _transitions2.default.easeOut('400ms', 'transform') + ', ' + _transitions2.default.easeOut('400ms', 'visibility') + } + }; + return styles; +} - var appBarStyles = (0, _assign2.default)({}, _Styles2.default.appBar); +var Snackbar = function (_Component) { + (0, _inherits3.default)(Snackbar, _Component); - if (tabs) { - appBarStyles.marginBottom = 64; + function Snackbar() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Snackbar); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Snackbar.__proto__ || (0, _getPrototypeOf2.default)(Snackbar)).call.apply(_ref, [this].concat(args))), _this), _this.componentClickAway = function () { + if (_this.timerTransitionId) { + // If transitioning, don't close the snackbar. + return; + } + + if (_this.props.open !== null && _this.props.onRequestClose) { + _this.props.onRequestClose('clickaway'); + } else { + _this.setState({ open: false }); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - return _react2.default.createElement( - 'div', - { style: _Styles2.default.container }, - _react2.default.createElement( - _AppBar2.default, - { title: title, showMenuIconButton: false, style: appBarStyles }, - tabs && _react2.default.createElement( - 'div', - { style: { width: '100%' } }, - _react2.default.createElement( - _Tabs2.default, - { style: _Styles2.default.tabs, value: currentTab }, - tabs - ) - ) - ), - _react2.default.createElement( - 'div', - { style: { width: '100%' } }, - _react2.default.createElement( - 'div', - { style: (0, _assign2.default)({}, _Styles2.default.content, contentStyle) }, + (0, _createClass3.default)(Snackbar, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + open: this.props.open, + message: this.props.message, + action: this.props.action + }); + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + if (this.state.open) { + this.setAutoHideTimer(); + this.setTransitionTimer(); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; + + if (this.props.open && nextProps.open && (nextProps.message !== this.props.message || nextProps.action !== this.props.action)) { + this.setState({ + open: false + }); + + clearTimeout(this.timerOneAtTheTimeId); + this.timerOneAtTheTimeId = setTimeout(function () { + _this2.setState({ + message: nextProps.message, + action: nextProps.action, + open: true + }); + }, 400); + } else { + var open = nextProps.open; + + this.setState({ + open: open !== null ? open : this.state.open, + message: nextProps.message, + action: nextProps.action + }); + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps, prevState) { + if (prevState.open !== this.state.open) { + if (this.state.open) { + this.setAutoHideTimer(); + this.setTransitionTimer(); + } else { + clearTimeout(this.timerAutoHideId); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.timerAutoHideId); + clearTimeout(this.timerTransitionId); + clearTimeout(this.timerOneAtTheTimeId); + } + }, { + key: 'setAutoHideTimer', + + + // Timer that controls delay before snackbar auto hides + value: function setAutoHideTimer() { + var _this3 = this; + + var autoHideDuration = this.props.autoHideDuration; + + if (autoHideDuration > 0) { + clearTimeout(this.timerAutoHideId); + this.timerAutoHideId = setTimeout(function () { + if (_this3.props.open !== null && _this3.props.onRequestClose) { + _this3.props.onRequestClose('timeout'); + } else { + _this3.setState({ open: false }); + } + }, autoHideDuration); + } + } + + // Timer that controls delay before click-away events are captured (based on when animation completes) + + }, { + key: 'setTransitionTimer', + value: function setTransitionTimer() { + var _this4 = this; + + this.timerTransitionId = setTimeout(function () { + _this4.timerTransitionId = undefined; + }, 400); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + autoHideDuration = _props.autoHideDuration, + contentStyle = _props.contentStyle, + bodyStyle = _props.bodyStyle, + messageProp = _props.message, + onRequestClose = _props.onRequestClose, + onActionTouchTap = _props.onActionTouchTap, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['autoHideDuration', 'contentStyle', 'bodyStyle', 'message', 'onRequestClose', 'onActionTouchTap', 'style']); + var _state = this.state, + action = _state.action, + message = _state.message, + open = _state.open; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _ClickAwayListener2.default, + { onClickAway: open ? this.componentClickAway : null }, _react2.default.createElement( - _Paper2.default, - { style: _Styles2.default.paper }, - children + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + _react2.default.createElement(_SnackbarBody2.default, { + action: action, + contentStyle: contentStyle, + message: message, + open: open, + onActionTouchTap: onActionTouchTap, + style: bodyStyle + }) ) - ) - ) - ); -} - -Layout.propTypes = { - children: _react.PropTypes.node, - title: _react.PropTypes.string.isRequired, - contentStyle: _react.PropTypes.object, - tabs: _react.PropTypes.arrayOf(_react.PropTypes.node), - currentTab: _react.PropTypes.any + ); + } + }]); + return Snackbar; +}(_react.Component); + +Snackbar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired }; + false ? Snackbar.propTypes = { + /** + * The label for the action on the snackbar. + */ + action: _react.PropTypes.node, + /** + * The number of milliseconds to wait before automatically dismissing. + * If no value is specified the snackbar will dismiss normally. + * If a value is provided the snackbar can still be dismissed normally. + * If a snackbar is dismissed before the timer expires, the timer will be cleared. + */ + autoHideDuration: _react.PropTypes.number, + /** + * Override the inline-styles of the body element. + */ + bodyStyle: _react.PropTypes.object, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Override the inline-styles of the content element. + */ + contentStyle: _react.PropTypes.object, + /** + * The message to be displayed. + * + * (Note: If the message is an element or array, and the `Snackbar` may re-render while it is still open, + * ensure that the same object remains as the `message` property if you want to avoid the `Snackbar` hiding and + * showing again) + */ + message: _react.PropTypes.node.isRequired, + /** + * Fired when the action button is touchtapped. + * + * @param {object} event Action button event. + */ + onActionTouchTap: _react.PropTypes.func, + /** + * Fired when the `Snackbar` is requested to be closed by a click outside the `Snackbar`, or after the + * `autoHideDuration` timer expires. + * + * Typically `onRequestClose` is used to set state in the parent component, which is used to control the `Snackbar` + * `open` prop. + * + * The `reason` parameter can optionally be used to control the response to `onRequestClose`, + * for example ignoring `clickaway`. + * + * @param {string} reason Can be:`"timeout"` (`autoHideDuration` expired) or: `"clickaway"` + */ + onRequestClose: _react.PropTypes.func, + /** + * Controls whether the `Snackbar` is opened or not. + */ + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = Snackbar; /***/ }), /* 848 */ @@ -72936,61 +76847,16 @@ Layout.propTypes = { Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = undefined; - -var _AppBar = __webpack_require__(849); - -var _AppBar2 = _interopRequireDefault(_AppBar); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _AppBar2.default; - -/***/ }), -/* 849 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); +exports.SnackbarBody = undefined; var _extends2 = __webpack_require__(7); var _extends3 = _interopRequireDefault(_extends2); -var _keys = __webpack_require__(79); - -var _keys2 = _interopRequireDefault(_keys); - var _objectWithoutProperties2 = __webpack_require__(8); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var _getPrototypeOf = __webpack_require__(3); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(1); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(2); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(4); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(5); - -var _inherits3 = _interopRequireDefault(_inherits2); - -exports.getStyles = getStyles; - var _simpleAssign = __webpack_require__(6); var _simpleAssign2 = _interopRequireDefault(_simpleAssign); @@ -72999,379 +76865,301 @@ var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _IconButton = __webpack_require__(95); - -var _IconButton2 = _interopRequireDefault(_IconButton); - -var _menu = __webpack_require__(850); - -var _menu2 = _interopRequireDefault(_menu); - -var _Paper = __webpack_require__(34); +var _transitions = __webpack_require__(10); -var _Paper2 = _interopRequireDefault(_Paper); +var _transitions2 = _interopRequireDefault(_transitions); -var _propTypes = __webpack_require__(41); +var _withWidth = __webpack_require__(849); -var _propTypes2 = _interopRequireDefault(_propTypes); +var _withWidth2 = _interopRequireDefault(_withWidth); -var _warning = __webpack_require__(17); +var _FlatButton = __webpack_require__(100); -var _warning2 = _interopRequireDefault(_warning); +var _FlatButton2 = _interopRequireDefault(_FlatButton); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function getStyles(props, context) { + var open = props.open, + width = props.width; var _context$muiTheme = context.muiTheme, - appBar = _context$muiTheme.appBar, - iconButtonSize = _context$muiTheme.button.iconButtonSize, - zIndex = _context$muiTheme.zIndex; + _context$muiTheme$bas = _context$muiTheme.baseTheme, + _context$muiTheme$bas2 = _context$muiTheme$bas.spacing, + desktopGutter = _context$muiTheme$bas2.desktopGutter, + desktopSubheaderHeight = _context$muiTheme$bas2.desktopSubheaderHeight, + fontFamily = _context$muiTheme$bas.fontFamily, + _context$muiTheme$sna = _context$muiTheme.snackbar, + backgroundColor = _context$muiTheme$sna.backgroundColor, + textColor = _context$muiTheme$sna.textColor, + actionColor = _context$muiTheme$sna.actionColor; - var flatButtonSize = 36; + var isSmall = width === _withWidth.SMALL; var styles = { root: { - position: 'relative', - zIndex: zIndex.appBar, - width: '100%', - display: 'flex', - backgroundColor: appBar.color, - paddingLeft: appBar.padding, - paddingRight: appBar.padding - }, - title: { - whiteSpace: 'nowrap', - overflow: 'hidden', - textOverflow: 'ellipsis', - margin: 0, - paddingTop: 0, - letterSpacing: 0, - fontSize: 24, - fontWeight: appBar.titleFontWeight, - color: appBar.textColor, - height: appBar.height, - lineHeight: appBar.height + 'px' - }, - mainElement: { - boxFlex: 1, - flex: '1' - }, - iconButtonStyle: { - marginTop: (appBar.height - iconButtonSize) / 2, - marginRight: 8, - marginLeft: -16 + fontFamily: fontFamily, + backgroundColor: backgroundColor, + padding: '0 ' + desktopGutter + 'px', + height: desktopSubheaderHeight, + lineHeight: desktopSubheaderHeight + 'px', + borderRadius: isSmall ? 0 : 2, + maxWidth: isSmall ? 'inherit' : 568, + minWidth: isSmall ? 'inherit' : 288, + width: isSmall ? 'calc(100vw - ' + desktopGutter * 2 + 'px)' : 'auto', + flexGrow: isSmall ? 1 : 0 }, - iconButtonIconStyle: { - fill: appBar.textColor, - color: appBar.textColor + content: { + fontSize: 14, + color: textColor, + opacity: open ? 1 : 0, + transition: open ? _transitions2.default.easeOut('500ms', 'opacity', '100ms') : _transitions2.default.easeOut('400ms', 'opacity') }, - flatButton: { - color: appBar.textColor, - marginTop: (iconButtonSize - flatButtonSize) / 2 + 1 + action: { + color: actionColor, + float: 'right', + marginTop: 6, + marginRight: -16, + marginLeft: desktopGutter, + backgroundColor: 'transparent' } }; return styles; } -var AppBar = function (_Component) { - (0, _inherits3.default)(AppBar, _Component); - - function AppBar() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, AppBar); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AppBar.__proto__ || (0, _getPrototypeOf2.default)(AppBar)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapLeftIconButton = function (event) { - if (_this.props.onLeftIconButtonTouchTap) { - _this.props.onLeftIconButtonTouchTap(event); - } - }, _this.handleTouchTapRightIconButton = function (event) { - if (_this.props.onRightIconButtonTouchTap) { - _this.props.onRightIconButtonTouchTap(event); - } - }, _this.handleTitleTouchTap = function (event) { - if (_this.props.onTitleTouchTap) { - _this.props.onTitleTouchTap(event); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - - (0, _createClass3.default)(AppBar, [{ - key: 'componentDidMount', - value: function componentDidMount() { - false ? (0, _warning2.default)(!this.props.iconElementLeft || !this.props.iconClassNameLeft, 'Material-UI: Properties iconElementLeft\n and iconClassNameLeft cannot be simultaneously defined. Please use one or the other.') : void 0; - - false ? (0, _warning2.default)(!this.props.iconElementRight || !this.props.iconClassNameRight, 'Material-UI: Properties iconElementRight\n and iconClassNameRight cannot be simultaneously defined. Please use one or the other.') : void 0; - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - title = _props.title, - titleStyle = _props.titleStyle, - iconStyleLeft = _props.iconStyleLeft, - iconStyleRight = _props.iconStyleRight, - onTitleTouchTap = _props.onTitleTouchTap, - showMenuIconButton = _props.showMenuIconButton, - iconElementLeft = _props.iconElementLeft, - iconElementRight = _props.iconElementRight, - iconClassNameLeft = _props.iconClassNameLeft, - iconClassNameRight = _props.iconClassNameRight, - onLeftIconButtonTouchTap = _props.onLeftIconButtonTouchTap, - onRightIconButtonTouchTap = _props.onRightIconButtonTouchTap, - className = _props.className, - style = _props.style, - zDepth = _props.zDepth, - children = _props.children, - other = (0, _objectWithoutProperties3.default)(_props, ['title', 'titleStyle', 'iconStyleLeft', 'iconStyleRight', 'onTitleTouchTap', 'showMenuIconButton', 'iconElementLeft', 'iconElementRight', 'iconClassNameLeft', 'iconClassNameRight', 'onLeftIconButtonTouchTap', 'onRightIconButtonTouchTap', 'className', 'style', 'zDepth', 'children']); - var prepareStyles = this.context.muiTheme.prepareStyles; - - var styles = getStyles(this.props, this.context); - - var menuElementLeft = void 0; - var menuElementRight = void 0; - - // If the title is a string, wrap in an h1 tag. - // If not, wrap in a div tag. - var titleComponent = typeof title === 'string' || title instanceof String ? 'h1' : 'div'; - - var titleElement = _react2.default.createElement(titleComponent, { - onTouchTap: this.handleTitleTouchTap, - style: prepareStyles((0, _simpleAssign2.default)(styles.title, styles.mainElement, titleStyle)) - }, title); - - var iconLeftStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, iconStyleLeft); - - if (showMenuIconButton) { - if (iconElementLeft) { - var iconElementLeftProps = {}; - - if (iconElementLeft.type.muiName === 'IconButton') { - var iconElemLeftChildren = iconElementLeft.props.children; - var iconButtonIconStyle = !(iconElemLeftChildren && iconElemLeftChildren.props && iconElemLeftChildren.props.color) ? styles.iconButtonIconStyle : null; - - iconElementLeftProps.iconStyle = (0, _simpleAssign2.default)({}, iconButtonIconStyle, iconElementLeft.props.iconStyle); - } - - if (!iconElementLeft.props.onTouchTap && this.props.onLeftIconButtonTouchTap) { - iconElementLeftProps.onTouchTap = this.handleTouchTapLeftIconButton; - } - - menuElementLeft = _react2.default.createElement( - 'div', - { style: prepareStyles(iconLeftStyle) }, - (0, _keys2.default)(iconElementLeftProps).length > 0 ? (0, _react.cloneElement)(iconElementLeft, iconElementLeftProps) : iconElementLeft - ); - } else { - menuElementLeft = _react2.default.createElement( - _IconButton2.default, - { - style: iconLeftStyle, - iconStyle: styles.iconButtonIconStyle, - iconClassName: iconClassNameLeft, - onTouchTap: this.handleTouchTapLeftIconButton - }, - iconClassNameLeft ? '' : _react2.default.createElement(_menu2.default, { style: (0, _simpleAssign2.default)({}, styles.iconButtonIconStyle) }) - ); - } - } - - var iconRightStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, { - marginRight: -16, - marginLeft: 'auto' - }, iconStyleRight); - - if (iconElementRight) { - var iconElementRightProps = {}; - - switch (iconElementRight.type.muiName) { - case 'IconMenu': - case 'IconButton': - var iconElemRightChildren = iconElementRight.props.children; - var _iconButtonIconStyle = !(iconElemRightChildren && iconElemRightChildren.props && iconElemRightChildren.props.color) ? styles.iconButtonIconStyle : null; - - iconElementRightProps.iconStyle = (0, _simpleAssign2.default)({}, _iconButtonIconStyle, iconElementRight.props.iconStyle); - break; - - case 'FlatButton': - iconElementRightProps.style = (0, _simpleAssign2.default)({}, styles.flatButton, iconElementRight.props.style); - break; - - default: - } - - if (!iconElementRight.props.onTouchTap && this.props.onRightIconButtonTouchTap) { - iconElementRightProps.onTouchTap = this.handleTouchTapRightIconButton; - } +var SnackbarBody = exports.SnackbarBody = function SnackbarBody(props, context) { + var action = props.action, + contentStyle = props.contentStyle, + message = props.message, + open = props.open, + onActionTouchTap = props.onActionTouchTap, + style = props.style, + other = (0, _objectWithoutProperties3.default)(props, ['action', 'contentStyle', 'message', 'open', 'onActionTouchTap', 'style']); + var prepareStyles = context.muiTheme.prepareStyles; - menuElementRight = _react2.default.createElement( - 'div', - { style: prepareStyles(iconRightStyle) }, - (0, _keys2.default)(iconElementRightProps).length > 0 ? (0, _react.cloneElement)(iconElementRight, iconElementRightProps) : iconElementRight - ); - } else if (iconClassNameRight) { - menuElementRight = _react2.default.createElement(_IconButton2.default, { - style: iconRightStyle, - iconStyle: styles.iconButtonIconStyle, - iconClassName: iconClassNameRight, - onTouchTap: this.handleTouchTapRightIconButton - }); - } + var styles = getStyles(props, context); - return _react2.default.createElement( - _Paper2.default, - (0, _extends3.default)({}, other, { - rounded: false, - className: className, - style: (0, _simpleAssign2.default)({}, styles.root, style), - zDepth: zDepth - }), - menuElementLeft, - titleElement, - menuElementRight, - children - ); - } - }]); - return AppBar; -}(_react.Component); + var actionButton = action && _react2.default.createElement(_FlatButton2.default, { + style: styles.action, + label: action, + onTouchTap: onActionTouchTap + }); -AppBar.muiName = 'AppBar'; -AppBar.defaultProps = { - showMenuIconButton: true, - title: '', - zDepth: 1 -}; -AppBar.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.content, contentStyle)) }, + _react2.default.createElement( + 'span', + null, + message + ), + actionButton + ) + ); }; - false ? AppBar.propTypes = { - /** - * Can be used to render a tab inside an app bar for instance. - */ - children: _react.PropTypes.node, - /** - * Applied to the app bar's root element. - */ - className: _react.PropTypes.string, - /** - * The classname of the icon on the left of the app bar. - * If you are using a stylesheet for your icons, enter the class name for the icon to be used here. - */ - iconClassNameLeft: _react.PropTypes.string, - /** - * Similiar to the iconClassNameLeft prop except that - * it applies to the icon displayed on the right of the app bar. - */ - iconClassNameRight: _react.PropTypes.string, - /** - * The custom element to be displayed on the left side of the - * app bar such as an SvgIcon. - */ - iconElementLeft: _react.PropTypes.element, - /** - * Similiar to the iconElementLeft prop except that this element is displayed on the right of the app bar. - */ - iconElementRight: _react.PropTypes.element, - /** - * Override the inline-styles of the element displayed on the left side of the app bar. - */ - iconStyleLeft: _react.PropTypes.object, + + false ? SnackbarBody.propTypes = { /** - * Override the inline-styles of the element displayed on the right side of the app bar. + * The label for the action on the snackbar. */ - iconStyleRight: _react.PropTypes.object, + action: _react.PropTypes.node, /** - * Callback function for when the left icon is selected via a touch tap. - * - * @param {object} event TouchTap event targeting the left `IconButton`. + * Override the inline-styles of the content element. */ - onLeftIconButtonTouchTap: _react.PropTypes.func, + contentStyle: _react.PropTypes.object, /** - * Callback function for when the right icon is selected via a touch tap. + * The message to be displayed. * - * @param {object} event TouchTap event targeting the right `IconButton`. + * (Note: If the message is an element or array, and the `Snackbar` may re-render while it is still open, + * ensure that the same object remains as the `message` property if you want to avoid the `Snackbar` hiding and + * showing again) */ - onRightIconButtonTouchTap: _react.PropTypes.func, + message: _react.PropTypes.node.isRequired, /** - * Callback function for when the title text is selected via a touch tap. + * Fired when the action button is touchtapped. * - * @param {object} event TouchTap event targeting the `title` node. + * @param {object} event Action button event. */ - onTitleTouchTap: _react.PropTypes.func, + onActionTouchTap: _react.PropTypes.func, /** - * Determines whether or not to display the Menu icon next to the title. - * Setting this prop to false will hide the icon. + * @ignore + * Controls whether the `Snackbar` is opened or not. */ - showMenuIconButton: _react.PropTypes.bool, + open: _react.PropTypes.bool.isRequired, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, /** - * The title to display on the app bar. - */ - title: _react.PropTypes.node, - /** - * Override the inline-styles of the app bar's title element. - */ - titleStyle: _react.PropTypes.object, - /** - * The zDepth of the component. - * The shadow of the app bar is also dependent on this property. + * @ignore + * Width of the screen. */ - zDepth: _propTypes2.default.zDepth + width: _react.PropTypes.number.isRequired } : void 0; -exports.default = AppBar; -/***/ }), -/* 850 */ -/***/ (function(module, exports, __webpack_require__) { +SnackbarBody.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +exports.default = (0, _withWidth2.default)()(SnackbarBody); + +/***/ }), +/* 849 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.LARGE = exports.MEDIUM = exports.SMALL = undefined; + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); -"use strict"; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); +var _inherits3 = _interopRequireDefault(_inherits2); -Object.defineProperty(exports, "__esModule", { - value: true -}); +exports.default = withWidth; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(25); +var _reactEventListener = __webpack_require__(40); -var _pure2 = _interopRequireDefault(_pure); +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -var _SvgIcon = __webpack_require__(26); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); +var SMALL = exports.SMALL = 1; +var MEDIUM = exports.MEDIUM = 2; +var LARGE = exports.LARGE = 3; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function withWidth() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var _options$largeWidth = options.largeWidth, + largeWidth = _options$largeWidth === undefined ? 992 : _options$largeWidth, + _options$mediumWidth = options.mediumWidth, + mediumWidth = _options$mediumWidth === undefined ? 768 : _options$mediumWidth, + _options$resizeInterv = options.resizeInterval, + resizeInterval = _options$resizeInterv === undefined ? 166 : _options$resizeInterv; -var NavigationMenu = function NavigationMenu(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z' }) - ); -}; -NavigationMenu = (0, _pure2.default)(NavigationMenu); -NavigationMenu.displayName = 'NavigationMenu'; -NavigationMenu.muiName = 'SvgIcon'; -exports.default = NavigationMenu; + return function (MyComponent) { + return function (_Component) { + (0, _inherits3.default)(WithWidth, _Component); + + function WithWidth() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, WithWidth); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = WithWidth.__proto__ || (0, _getPrototypeOf2.default)(WithWidth)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + width: null + }, _this.handleResize = function () { + clearTimeout(_this.deferTimer); + _this.deferTimer = setTimeout(function () { + _this.updateWidth(); + }, resizeInterval); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(WithWidth, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.updateWidth(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.deferTimer); + } + }, { + key: 'updateWidth', + value: function updateWidth() { + var innerWidth = window.innerWidth; + var width = void 0; + + if (innerWidth >= largeWidth) { + width = LARGE; + } else if (innerWidth >= mediumWidth) { + width = MEDIUM; + } else { + // innerWidth < 768 + width = SMALL; + } + + if (width !== this.state.width) { + this.setState({ + width: width + }); + } + } + }, { + key: 'render', + value: function render() { + var width = this.state.width; + + /** + * When rendering the component on the server, + * we have no idea about the screen width. + * In order to prevent blinks and help the reconciliation + * we are not rendering the component. + * + * A better alternative would be to send client hints. + * But the browser support of this API is low: + * http://caniuse.com/#search=client%20hint + */ + if (width === null) { + return null; + } + + return _react2.default.createElement( + _reactEventListener2.default, + { target: 'window', onResize: this.handleResize }, + _react2.default.createElement(MyComponent, (0, _extends3.default)({ + width: width + }, this.props)) + ); + } + }]); + return WithWidth; + }(_react.Component); + }; +} /***/ }), -/* 851 */ +/* 850 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73381,14 +77169,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(7); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(8); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _getPrototypeOf = __webpack_require__(3); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -73409,146 +77189,95 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _warning = __webpack_require__(17); +var _reactRedux = __webpack_require__(19); -var _warning2 = _interopRequireDefault(_warning); +var _Table = __webpack_require__(339); -var _TabTemplate = __webpack_require__(852); +var _colors = __webpack_require__(31); -var _TabTemplate2 = _interopRequireDefault(_TabTemplate); +var _Dialog = __webpack_require__(134); -var _InkBar = __webpack_require__(853); +var _Dialog2 = _interopRequireDefault(_Dialog); -var _InkBar2 = _interopRequireDefault(_InkBar); +var _Toggle = __webpack_require__(135); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _Toggle2 = _interopRequireDefault(_Toggle); -function getStyles(props, context) { - var tabs = context.muiTheme.tabs; +var _IconButton = __webpack_require__(64); +var _IconButton2 = _interopRequireDefault(_IconButton); - return { - tabItemContainer: { - width: '100%', - backgroundColor: tabs.backgroundColor, - whiteSpace: 'nowrap', - display: 'flex' - } - }; -} +var _delete = __webpack_require__(341); -var Tabs = function (_Component) { - (0, _inherits3.default)(Tabs, _Component); +var _delete2 = _interopRequireDefault(_delete); - function Tabs() { - var _ref; +var _RaisedButton = __webpack_require__(65); - var _temp, _this, _ret; +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); - (0, _classCallCheck3.default)(this, Tabs); +var _profiles = __webpack_require__(212); - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +var _Layout = __webpack_require__(343); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tabs.__proto__ || (0, _getPrototypeOf2.default)(Tabs)).call.apply(_ref, [this].concat(args))), _this), _this.state = { selectedIndex: 0 }, _this.handleTabTouchTap = function (value, event, tab) { - var valueLink = _this.getValueLink(_this.props); - var index = tab.props.index; +var _Layout2 = _interopRequireDefault(_Layout); - if (valueLink.value && valueLink.value !== value || _this.state.selectedIndex !== index) { - valueLink.requestChange(value, event, tab); - } +var _ProfileCreateForm = __webpack_require__(851); - _this.setState({ selectedIndex: index }); +var _ProfileCreateForm2 = _interopRequireDefault(_ProfileCreateForm); - if (tab.props.onActive) { - tab.props.onActive(tab); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } +var _ProfileToggle = __webpack_require__(852); - (0, _createClass3.default)(Tabs, [{ - key: 'componentWillMount', - value: function componentWillMount() { - var valueLink = this.getValueLink(this.props); - var initialIndex = this.props.initialSelectedIndex; +var _ProfileToggle2 = _interopRequireDefault(_ProfileToggle); - this.setState({ - selectedIndex: valueLink.value !== undefined ? this.getSelectedIndex(this.props) : initialIndex < this.getTabCount() ? initialIndex : 0 - }); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(newProps, nextContext) { - var valueLink = this.getValueLink(newProps); - var newState = { - muiTheme: nextContext.muiTheme || this.context.muiTheme - }; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (valueLink.value !== undefined) { - newState.selectedIndex = this.getSelectedIndex(newProps); - } +var Profile = function (_Component) { + (0, _inherits3.default)(Profile, _Component); - this.setState(newState); - } - }, { - key: 'getTabs', - value: function getTabs() { - var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; + function Profile(props) { + (0, _classCallCheck3.default)(this, Profile); - var tabs = []; + var _this = (0, _possibleConstructorReturn3.default)(this, (Profile.__proto__ || (0, _getPrototypeOf2.default)(Profile)).call(this, props)); - _react.Children.forEach(props.children, function (tab) { - if ((0, _react.isValidElement)(tab)) { - tabs.push(tab); - } - }); + _this.state = { + createModalOpen: false + }; + return _this; + } - return tabs; + (0, _createClass3.default)(Profile, [{ + key: 'onSetProfile', + value: function onSetProfile(profileName) { + this.props.setProfileEnabled(profileName); } }, { - key: 'getTabCount', - value: function getTabCount() { - return this.getTabs().length; + key: 'requestCloseModal', + value: function requestCloseModal() { + this.setState({ + createModalOpen: false + }); } - - // Do not use outside of this component, it will be removed once valueLink is deprecated - }, { - key: 'getValueLink', - value: function getValueLink(props) { - return props.valueLink || { - value: props.value, - requestChange: props.onChange - }; + key: 'requestModalOpen', + value: function requestModalOpen() { + this.setState({ + createModalOpen: true + }); } }, { - key: 'getSelectedIndex', - value: function getSelectedIndex(props) { - var valueLink = this.getValueLink(props); - var selectedIndex = -1; - - this.getTabs(props).forEach(function (tab, index) { - if (valueLink.value === tab.props.value) { - selectedIndex = index; - } - }); - - return selectedIndex; + key: 'onRequestDeleteProfile', + value: function onRequestDeleteProfile(name) { + this.props.removeProfile(name); } }, { - key: 'getSelected', - value: function getSelected(tab, index) { - var valueLink = this.getValueLink(this.props); - return valueLink.value ? valueLink.value === tab.props.value : this.state.selectedIndex === index; + key: 'handleSubmit', + value: function handleSubmit(data) { + this.props.createProfile(data.name, data.description); + this.requestCloseModal(); } }, { key: 'render', @@ -73556,143 +77285,134 @@ var Tabs = function (_Component) { var _this2 = this; var _props = this.props, - contentContainerClassName = _props.contentContainerClassName, - contentContainerStyle = _props.contentContainerStyle, - initialSelectedIndex = _props.initialSelectedIndex, - inkBarStyle = _props.inkBarStyle, - onChange = _props.onChange, - style = _props.style, - tabItemContainerStyle = _props.tabItemContainerStyle, - tabTemplate = _props.tabTemplate, - tabTemplateStyle = _props.tabTemplateStyle, - other = (0, _objectWithoutProperties3.default)(_props, ['contentContainerClassName', 'contentContainerStyle', 'initialSelectedIndex', 'inkBarStyle', 'onChange', 'style', 'tabItemContainerStyle', 'tabTemplate', 'tabTemplateStyle']); - var prepareStyles = this.context.muiTheme.prepareStyles; - - var styles = getStyles(this.props, this.context); - var valueLink = this.getValueLink(this.props); - var tabValue = valueLink.value; - var tabContent = []; - var width = 100 / this.getTabCount(); - - var tabs = this.getTabs().map(function (tab, index) { - false ? (0, _warning2.default)(tab.type && tab.type.muiName === 'Tab', 'Material-UI: Tabs only accepts Tab Components as children.\n Found ' + (tab.type.muiName || tab.type) + ' as child number ' + (index + 1) + ' of Tabs') : void 0; - - false ? (0, _warning2.default)(!tabValue || tab.props.value !== undefined, 'Material-UI: Tabs value prop has been passed, but Tab ' + index + '\n does not have a value prop. Needs value if Tabs is going\n to be a controlled component.') : void 0; - - tabContent.push(tab.props.children ? (0, _react.createElement)(tabTemplate || _TabTemplate2.default, { - key: index, - selected: _this2.getSelected(tab, index), - style: tabTemplateStyle - }, tab.props.children) : undefined); - - return (0, _react.cloneElement)(tab, { - key: index, - index: index, - selected: _this2.getSelected(tab, index), - width: width + '%', - onTouchTap: _this2.handleTabTouchTap - }); - }); - - var inkBar = this.state.selectedIndex !== -1 ? _react2.default.createElement(_InkBar2.default, { - left: width * this.state.selectedIndex + '%', - width: width + '%', - style: inkBarStyle - }) : null; + profiles = _props.profiles, + currentProfile = _props.currentProfile; - var inkBarContainerWidth = tabItemContainerStyle ? tabItemContainerStyle.width : '100%'; return _react2.default.createElement( - 'div', - (0, _extends3.default)({ style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, other), - _react2.default.createElement( - 'div', - { style: prepareStyles((0, _simpleAssign2.default)(styles.tabItemContainer, tabItemContainerStyle)) }, - tabs - ), - _react2.default.createElement( - 'div', - { style: { width: inkBarContainerWidth } }, - inkBar - ), + _Layout2.default, + { title: 'Profiles' }, _react2.default.createElement( - 'div', + _Dialog2.default, { - style: prepareStyles((0, _simpleAssign2.default)({}, contentContainerStyle)), - className: contentContainerClassName + open: this.state.createModalOpen, + title: 'Create a new profile', + modal: false, + onRequestClose: function onRequestClose() { + return _this2.requestCloseModal(); + } }, - tabContent + _react2.default.createElement(_ProfileCreateForm2.default, { + onSubmit: function onSubmit(data) { + return _this2.handleSubmit(data); + }, + onRequestClose: function onRequestClose() { + return _this2.requestCloseModal(); + } + }) + ), + _react2.default.createElement(_RaisedButton2.default, { label: 'Add new', onTouchTap: function onTouchTap() { + return _this2.requestModalOpen(); + }, primary: true }), + _react2.default.createElement( + _Table.Table, + { selectable: false }, + _react2.default.createElement( + _Table.TableHeader, + { displaySelectAll: false, adjustForCheckbox: false }, + _react2.default.createElement( + _Table.TableRow, + null, + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Name' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Description' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Enabled' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Delete' + ) + ) + ), + _react2.default.createElement( + _Table.TableBody, + { displayRowCheckbox: false, stripedRows: true }, + profiles.map(function (x, i) { + return _react2.default.createElement( + _Table.TableRow, + { key: i }, + _react2.default.createElement( + _Table.TableRowColumn, + null, + x.name + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + x.description + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + _react2.default.createElement(_ProfileToggle2.default, { profile: x }) + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + _react2.default.createElement( + _IconButton2.default, + { onTouchTap: function onTouchTap() { + return _this2.onRequestDeleteProfile(x.name); + }, disabled: x.name === 'default' }, + _react2.default.createElement(_delete2.default, { color: _colors.red300 }) + ) + ) + ); + }) + ) ) ); } }]); - return Tabs; + return Profile; }(_react.Component); -Tabs.defaultProps = { - initialSelectedIndex: 0, - onChange: function onChange() {} -}; -Tabs.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? Tabs.propTypes = { - /** - * Should be used to pass `Tab` components. - */ - children: _react.PropTypes.node, - /** - * The css class name of the root element. - */ - className: _react.PropTypes.string, - /** - * The css class name of the content's container. - */ - contentContainerClassName: _react.PropTypes.string, - /** - * Override the inline-styles of the content's container. - */ - contentContainerStyle: _react.PropTypes.object, - /** - * Specify initial visible tab index. - * If `initialSelectedIndex` is set but larger than the total amount of specified tabs, - * `initialSelectedIndex` will revert back to default. - * If `initialSelectedIndex` is set to any negative value, no tab will be selected intially. - */ - initialSelectedIndex: _react.PropTypes.number, - /** - * Override the inline-styles of the InkBar. - */ - inkBarStyle: _react.PropTypes.object, - /** - * Called when the selected value change. - */ - onChange: _react.PropTypes.func, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - /** - * Override the inline-styles of the tab-labels container. - */ - tabItemContainerStyle: _react.PropTypes.object, - /** - * Override the default tab template used to wrap the content of each tab element. - */ - tabTemplate: _react.PropTypes.func, - /** - * Override the inline-styles of the tab template. - */ - tabTemplateStyle: _react.PropTypes.object, - /** - * Makes Tabs controllable and selects the tab whose value prop matches this prop. - */ - value: _react.PropTypes.any -} : void 0; -exports.default = Tabs; +function mapStateToProps(state) { + return { + profiles: state.profiles.profiles, + currentProfile: state.profiles.currentProfile + }; +} + +function mapDispatchToProps(dispatch) { + return { + createProfile: function createProfile(name, description) { + return dispatch((0, _profiles.createProfile)(name, description)); + }, + setProfileEnabled: function setProfileEnabled(name) { + return dispatch((0, _profiles.setProfileEnabled)(name)); + }, + removeProfile: function removeProfile(name) { + return dispatch((0, _profiles.removeProfile)(name)); + } + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Profile); /***/ }), -/* 852 */ +/* 851 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73702,50 +77422,152 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _simpleAssign = __webpack_require__(6); +var _getPrototypeOf = __webpack_require__(3); -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _reactRedux = __webpack_require__(19); -var styles = { - width: '100%', - position: 'relative', - textAlign: 'initial' -}; +var _reduxForm = __webpack_require__(82); -var TabTemplate = function TabTemplate(_ref) { - var children = _ref.children, - selected = _ref.selected, - style = _ref.style; +var _reduxFormMaterialUi = __webpack_require__(98); - var templateStyle = (0, _simpleAssign2.default)({}, styles, style); - if (!selected) { - templateStyle.height = 0; - templateStyle.overflow = 'hidden'; +var _RaisedButton = __webpack_require__(65); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _FlatButton = __webpack_require__(100); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +var _FormValidators = __webpack_require__(102); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Styles = __webpack_require__(52); + +var _Styles2 = _interopRequireDefault(_Styles); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ProfileCreateForm = function (_Component) { + (0, _inherits3.default)(ProfileCreateForm, _Component); + + function ProfileCreateForm() { + (0, _classCallCheck3.default)(this, ProfileCreateForm); + return (0, _possibleConstructorReturn3.default)(this, (ProfileCreateForm.__proto__ || (0, _getPrototypeOf2.default)(ProfileCreateForm)).apply(this, arguments)); } - return _react2.default.createElement( - 'div', - { style: templateStyle }, - children - ); + (0, _createClass3.default)(ProfileCreateForm, [{ + key: 'render', + value: function render() { + var _props = this.props, + handleSubmit = _props.handleSubmit, + pristine = _props.pristine, + submitting = _props.submitting, + onRequestClose = _props.onRequestClose, + profiles = _props.profiles; + + var buttonStyle = { + margin: 6, + float: 'right' + }; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'profile-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'name', + validate: [Validators.required, Validators.unique(profiles.map(function (x) { + return x.name; + }))], + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Name', + hintText: 'Name', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'description', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Description', + hintText: 'Description', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Add', + style: buttonStyle, + disabled: pristine || submitting, + type: 'submit' + }), + _react2.default.createElement(_FlatButton2.default, { + label: 'Cancel', + style: buttonStyle, + onTouchTap: function onTouchTap() { + if (onRequestClose) { + onRequestClose(); + } + } + }) + ) + ); + } + }]); + return ProfileCreateForm; +}(_react.Component); + +ProfileCreateForm.propTypes = { + onRequestClose: _react.PropTypes.function }; - false ? TabTemplate.propTypes = { - children: _react.PropTypes.node, - selected: _react.PropTypes.bool, - style: _react.PropTypes.object -} : void 0; +function mapStateToProps(state) { + return { + profiles: state.profiles.profiles, + currentProfile: state.profiles.currentProfile + }; +} -exports.default = TabTemplate; +var Form = (0, _reduxForm.reduxForm)({ + form: 'profile-form' +})(ProfileCreateForm); + +exports.default = (0, _reactRedux.connect)(mapStateToProps)(Form); /***/ }), -/* 853 */ +/* 852 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73775,178 +77597,72 @@ var _inherits2 = __webpack_require__(5); var _inherits3 = _interopRequireDefault(_inherits2); -var _simpleAssign = __webpack_require__(6); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(10); +var _reactRedux = __webpack_require__(19); -var _transitions2 = _interopRequireDefault(_transitions); +var _Toggle = __webpack_require__(135); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getStyles(props, context) { - var inkBar = context.muiTheme.inkBar; +var _Toggle2 = _interopRequireDefault(_Toggle); +var _profiles = __webpack_require__(212); - return { - root: { - left: props.left, - width: props.width, - bottom: 0, - display: 'block', - backgroundColor: props.color || inkBar.backgroundColor, - height: 2, - marginTop: -2, - position: 'relative', - transition: _transitions2.default.easeOut('1s', 'left') - } - }; -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var InkBar = function (_Component) { - (0, _inherits3.default)(InkBar, _Component); +var ProfileToggle = function (_Component) { + (0, _inherits3.default)(ProfileToggle, _Component); - function InkBar() { - (0, _classCallCheck3.default)(this, InkBar); - return (0, _possibleConstructorReturn3.default)(this, (InkBar.__proto__ || (0, _getPrototypeOf2.default)(InkBar)).apply(this, arguments)); + function ProfileToggle() { + (0, _classCallCheck3.default)(this, ProfileToggle); + return (0, _possibleConstructorReturn3.default)(this, (ProfileToggle.__proto__ || (0, _getPrototypeOf2.default)(ProfileToggle)).apply(this, arguments)); } - (0, _createClass3.default)(InkBar, [{ + (0, _createClass3.default)(ProfileToggle, [{ + key: 'onSetProfile', + value: function onSetProfile(profileName) { + this.props.setProfileEnabled(profileName); + } + }, { key: 'render', value: function render() { - var style = this.props.style; - var prepareStyles = this.context.muiTheme.prepareStyles; + var _this2 = this; - var styles = getStyles(this.props, this.context); + var _props = this.props, + profile = _props.profile, + currentProfile = _props.currentProfile; - return _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }); + return _react2.default.createElement(_Toggle2.default, { toggled: profile.name === currentProfile, onToggle: function onToggle() { + return _this2.onSetProfile(profile.name); + } }); } }]); - return InkBar; + return ProfileToggle; }(_react.Component); -InkBar.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - false ? InkBar.propTypes = { - color: _react.PropTypes.string, - left: _react.PropTypes.string.isRequired, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - width: _react.PropTypes.string.isRequired -} : void 0; -exports.default = InkBar; - -/***/ }), -/* 854 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _keys = __webpack_require__(79); - -var _keys2 = _interopRequireDefault(_keys); - -exports.changeMenu = changeMenu; - -var _ActionTypes = __webpack_require__(77); - -var types = _interopRequireWildcard(_ActionTypes); - -var _Menus = __webpack_require__(96); - -var menus = _interopRequireWildcard(_Menus); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function changeMenu(newMenu) { - var keys = (0, _keys2.default)(menus).map(function (x) { - return menus[x]; - }); - if (keys.indexOf(newMenu) !== -1) { - return { type: types.CHANGE_MENU, menu: newMenu }; - } - throw new Error('Invalid menu : ' + newMenu); -} - -/***/ }), -/* 855 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.updateSettings = updateSettings; - -var _ActionTypes = __webpack_require__(77); - -var types = _interopRequireWildcard(_ActionTypes); - -var _notification = __webpack_require__(856); - -var _notification2 = _interopRequireDefault(_notification); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function updateSettings(shop, key, value) { - return function (dispatch) { - dispatch((0, _notification2.default)('Settings saved')); - var obj = {}; - obj[key] = value; - dispatch({ - type: types.UPDATE_SETTINGS, - value: obj, - shop: shop - }); +function mapStateToProps(state) { + return { + currentProfile: state.profiles.currentProfile }; } -/***/ }), -/* 856 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = addNotification; - -var _ActionTypes = __webpack_require__(77); - -var types = _interopRequireWildcard(_ActionTypes); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function addNotification(message) { +function mapDispatchToProps(dispatch) { return { - type: types.NOTIFICATION_ADD, - message: message + setProfileEnabled: function setProfileEnabled(name) { + return dispatch((0, _profiles.setProfileEnabled)(name)); + } }; } +ProfileToggle.PropTypes = { + profile: _react.PropTypes.object.isRequired +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ProfileToggle); + /***/ }), -/* 857 */ +/* 853 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73957,26 +77673,26 @@ Object.defineProperty(exports, "__esModule", { }); exports.saveState = exports.loadSavedState = exports.initializeLocalStorageState = undefined; -var _regenerator = __webpack_require__(858); +var _regenerator = __webpack_require__(854); var _regenerator2 = _interopRequireDefault(_regenerator); -var _asyncToGenerator2 = __webpack_require__(861); +var _asyncToGenerator2 = __webpack_require__(857); var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); -var _promise = __webpack_require__(330); +var _promise = __webpack_require__(344); var _promise2 = _interopRequireDefault(_promise); -var _stringify = __webpack_require__(872); +var _stringify = __webpack_require__(867); var _stringify2 = _interopRequireDefault(_stringify); exports.saveToChromeStorage = saveToChromeStorage; exports.getFromChromeStorage = getFromChromeStorage; -var _Helpers = __webpack_require__(874); +var _Helpers = __webpack_require__(338); var Helpers = _interopRequireWildcard(_Helpers); @@ -74066,14 +77782,14 @@ function getFromChromeStorage(key) { } /***/ }), -/* 858 */ +/* 854 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(859); +module.exports = __webpack_require__(855); /***/ }), -/* 859 */ +/* 855 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {// This method of obtaining a reference to the global object needs to be @@ -74094,7 +77810,7 @@ var oldRuntime = hadRuntime && g.regeneratorRuntime; // Force reevalutation of runtime.js. g.regeneratorRuntime = undefined; -module.exports = __webpack_require__(860); +module.exports = __webpack_require__(856); if (hadRuntime) { // Restore the original runtime. @@ -74108,13 +77824,13 @@ if (hadRuntime) { } } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46))) /***/ }), -/* 860 */ +/* 856 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(global) {/** +/* WEBPACK VAR INJECTION */(function(global, process) {/** * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * @@ -74132,7 +77848,6 @@ if (hadRuntime) { var undefined; // More compressible than void 0. var $Symbol = typeof Symbol === "function" ? Symbol : {}; var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; var inModule = typeof module === "object"; @@ -74306,8 +78021,8 @@ if (hadRuntime) { } } - if (typeof global.process === "object" && global.process.domain) { - invoke = global.process.domain.bind(invoke); + if (typeof process === "object" && process.domain) { + invoke = process.domain.bind(invoke); } var previousPromise; @@ -74346,9 +78061,6 @@ if (hadRuntime) { } defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; runtime.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of @@ -74384,34 +78096,90 @@ if (hadRuntime) { return doneResult(); } - context.method = method; - context.arg = arg; - while (true) { var delegate = context.delegate; if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; + if (method === "return" || + (method === "throw" && delegate.iterator[method] === undefined)) { + // A return or throw (when the delegate iterator has no throw + // method) always terminates the yield* loop. + context.delegate = null; + + // If the delegate iterator has a return method, give it a + // chance to clean up. + var returnMethod = delegate.iterator["return"]; + if (returnMethod) { + var record = tryCatch(returnMethod, delegate.iterator, arg); + if (record.type === "throw") { + // If the return method threw an exception, let that + // exception prevail over the original return or throw. + method = "throw"; + arg = record.arg; + continue; + } + } + + if (method === "return") { + // Continue with the outer return, now that the delegate + // iterator has been terminated. + continue; + } + } + + var record = tryCatch( + delegate.iterator[method], + delegate.iterator, + arg + ); + + if (record.type === "throw") { + context.delegate = null; + + // Like returning generator.throw(uncaught), but without the + // overhead of an extra function call. + method = "throw"; + arg = record.arg; + continue; } + + // Delegate generator ran and handled its own exceptions so + // regardless of what the method was, we continue as if it is + // "next" with an undefined arg. + method = "next"; + arg = undefined; + + var info = record.arg; + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + } else { + state = GenStateSuspendedYield; + return info; + } + + context.delegate = null; } - if (context.method === "next") { + if (method === "next") { // Setting context._sent for legacy support of Babel's // function.sent implementation. - context.sent = context._sent = context.arg; + context.sent = context._sent = arg; - } else if (context.method === "throw") { + } else if (method === "throw") { if (state === GenStateSuspendedStart) { state = GenStateCompleted; - throw context.arg; + throw arg; } - context.dispatchException(context.arg); + if (context.dispatchException(arg)) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + method = "next"; + arg = undefined; + } - } else if (context.method === "return") { - context.abrupt("return", context.arg); + } else if (method === "return") { + context.abrupt("return", arg); } state = GenStateExecuting; @@ -74424,123 +78192,38 @@ if (hadRuntime) { ? GenStateCompleted : GenStateSuspendedYield; - if (record.arg === ContinueSentinel) { - continue; - } - - return { + var info = { value: record.arg, done: context.done }; + if (record.arg === ContinueSentinel) { + if (context.delegate && method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + arg = undefined; + } + } else { + return info; + } + } else if (record.type === "throw") { state = GenStateCompleted; // Dispatch the exception by looping back around to the - // context.dispatchException(context.arg) call above. - context.method = "throw"; - context.arg = record.arg; + // context.dispatchException(arg) call above. + method = "throw"; + arg = record.arg; } } }; } - // Call delegate.iterator[context.method](context.arg) and handle the - // result, either by returning a { value, done } result from the - // delegate iterator, or by modifying context.method and context.arg, - // setting context.delegate to null, and returning the ContinueSentinel. - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. - context.delegate = null; - - if (context.method === "throw") { - if (delegate.iterator.return) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; - } - } - - context.method = "throw"; - context.arg = new TypeError( - "The iterator does not provide a 'throw' method"); - } - - return ContinueSentinel; - } - - var record = tryCatch(method, delegate.iterator, context.arg); - - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - - var info = record.arg; - - if (! info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } - - if (info.done) { - // Assign the result of the finished delegate to the temporary - // variable specified by delegate.resultName (see delegateYield). - context[delegate.resultName] = info.value; - - // Resume execution at the desired location (see delegateYield). - context.next = delegate.nextLoc; - - // If context.method was "throw" but the delegate handled the - // exception, let the outer generator proceed normally. If - // context.method was "next", forget context.arg since it has been - // "consumed" by the delegate iterator. If context.method was - // "return", allow the original .return call to continue in the - // outer generator. - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined; - } - - } else { - // Re-yield the result returned by the delegate method. - return info; - } - - // The delegate iterator is finished, so forget it and continue with - // the outer generator. - context.delegate = null; - return ContinueSentinel; - } - // Define Generator.prototype.{next,throw,return} in terms of the // unified ._invoke helper method. defineIteratorMethods(Gp); Gp[toStringTagSymbol] = "Generator"; - // A Generator should always return itself as the iterator object when the - // @@iterator function is called on it. Some browsers' implementations of the - // iterator prototype chain incorrectly implement this, causing the Generator - // object to not be returned from this call. This ensures that doesn't happen. - // See https://github.com/facebook/regenerator/issues/274 for more details. - Gp[iteratorSymbol] = function() { - return this; - }; - Gp.toString = function() { return "[object Generator]"; }; @@ -74655,9 +78338,6 @@ if (hadRuntime) { this.done = false; this.delegate = null; - this.method = "next"; - this.arg = undefined; - this.tryEntries.forEach(resetTryEntry); if (!skipTempReset) { @@ -74694,15 +78374,7 @@ if (hadRuntime) { record.type = "throw"; record.arg = exception; context.next = loc; - - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined; - } - - return !! caught; + return !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { @@ -74770,12 +78442,12 @@ if (hadRuntime) { record.arg = arg; if (finallyEntry) { - this.method = "next"; this.next = finallyEntry.finallyLoc; - return ContinueSentinel; + } else { + this.complete(record); } - return this.complete(record); + return ContinueSentinel; }, complete: function(record, afterLoc) { @@ -74787,14 +78459,11 @@ if (hadRuntime) { record.type === "continue") { this.next = record.arg; } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; + this.rval = record.arg; this.next = "end"; } else if (record.type === "normal" && afterLoc) { this.next = afterLoc; } - - return ContinueSentinel; }, finish: function(finallyLoc) { @@ -74833,12 +78502,6 @@ if (hadRuntime) { nextLoc: nextLoc }; - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined; - } - return ContinueSentinel; } }; @@ -74851,10 +78514,10 @@ if (hadRuntime) { typeof self === "object" ? self : this ); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46), __webpack_require__(112))) /***/ }), -/* 861 */ +/* 857 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74862,7 +78525,7 @@ if (hadRuntime) { exports.__esModule = true; -var _promise = __webpack_require__(330); +var _promise = __webpack_require__(344); var _promise2 = _interopRequireDefault(_promise); @@ -74898,178 +78561,189 @@ exports.default = function (fn) { }; /***/ }), -/* 862 */ +/* 858 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(300); -__webpack_require__(93); -__webpack_require__(124); -__webpack_require__(863); -__webpack_require__(870); -__webpack_require__(871); +__webpack_require__(303); +__webpack_require__(94); +__webpack_require__(128); +__webpack_require__(859); module.exports = __webpack_require__(18).Promise; - /***/ }), -/* 863 */ +/* 859 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var LIBRARY = __webpack_require__(122); -var global = __webpack_require__(23); -var ctx = __webpack_require__(61); -var classof = __webpack_require__(191); -var $export = __webpack_require__(28); -var isObject = __webpack_require__(62); -var aFunction = __webpack_require__(99); -var anInstance = __webpack_require__(864); -var forOf = __webpack_require__(865); -var speciesConstructor = __webpack_require__(331); -var task = __webpack_require__(332).set; -var microtask = __webpack_require__(867)(); -var newPromiseCapabilityModule = __webpack_require__(205); -var perform = __webpack_require__(333); -var promiseResolve = __webpack_require__(334); -var PROMISE = 'Promise'; -var TypeError = global.TypeError; -var process = global.process; -var $Promise = global[PROMISE]; -var isNode = classof(process) == 'process'; -var empty = function () { /* empty */ }; -var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; -var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; - -var USE_NATIVE = !!function () { +var LIBRARY = __webpack_require__(126) + , global = __webpack_require__(25) + , ctx = __webpack_require__(67) + , classof = __webpack_require__(198) + , $export = __webpack_require__(33) + , isObject = __webpack_require__(68) + , aFunction = __webpack_require__(136) + , anInstance = __webpack_require__(860) + , forOf = __webpack_require__(861) + , speciesConstructor = __webpack_require__(862) + , task = __webpack_require__(345).set + , microtask = __webpack_require__(864)() + , PROMISE = 'Promise' + , TypeError = global.TypeError + , process = global.process + , $Promise = global[PROMISE] + , process = global.process + , isNode = classof(process) == 'process' + , empty = function(){ /* empty */ } + , Internal, GenericPromiseCapability, Wrapper; + +var USE_NATIVE = !!function(){ try { // correct subclassing with @@species support - var promise = $Promise.resolve(1); - var FakePromise = (promise.constructor = {})[__webpack_require__(22)('species')] = function (exec) { - exec(empty, empty); - }; + var promise = $Promise.resolve(1) + , FakePromise = (promise.constructor = {})[__webpack_require__(24)('species')] = function(exec){ exec(empty, empty); }; // unhandled rejections tracking support, NodeJS Promise without it fails @@species test return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; - } catch (e) { /* empty */ } + } catch(e){ /* empty */ } }(); // helpers -var sameConstructor = LIBRARY ? function (a, b) { +var sameConstructor = function(a, b){ // with library wrapper special case return a === b || a === $Promise && b === Wrapper; -} : function (a, b) { - return a === b; }; -var isThenable = function (it) { +var isThenable = function(it){ var then; return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; -var notify = function (promise, isReject) { - if (promise._n) return; +var newPromiseCapability = function(C){ + return sameConstructor($Promise, C) + ? new PromiseCapability(C) + : new GenericPromiseCapability(C); +}; +var PromiseCapability = GenericPromiseCapability = function(C){ + var resolve, reject; + this.promise = new C(function($$resolve, $$reject){ + if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +}; +var perform = function(exec){ + try { + exec(); + } catch(e){ + return {error: e}; + } +}; +var notify = function(promise, isReject){ + if(promise._n)return; promise._n = true; var chain = promise._c; - microtask(function () { - var value = promise._v; - var ok = promise._s == 1; - var i = 0; - var run = function (reaction) { - var handler = ok ? reaction.ok : reaction.fail; - var resolve = reaction.resolve; - var reject = reaction.reject; - var domain = reaction.domain; - var result, then; + microtask(function(){ + var value = promise._v + , ok = promise._s == 1 + , i = 0; + var run = function(reaction){ + var handler = ok ? reaction.ok : reaction.fail + , resolve = reaction.resolve + , reject = reaction.reject + , domain = reaction.domain + , result, then; try { - if (handler) { - if (!ok) { - if (promise._h == 2) onHandleUnhandled(promise); + if(handler){ + if(!ok){ + if(promise._h == 2)onHandleUnhandled(promise); promise._h = 1; } - if (handler === true) result = value; + if(handler === true)result = value; else { - if (domain) domain.enter(); + if(domain)domain.enter(); result = handler(value); - if (domain) domain.exit(); + if(domain)domain.exit(); } - if (result === reaction.promise) { + if(result === reaction.promise){ reject(TypeError('Promise-chain cycle')); - } else if (then = isThenable(result)) { + } else if(then = isThenable(result)){ then.call(result, resolve, reject); } else resolve(result); } else reject(value); - } catch (e) { + } catch(e){ reject(e); } }; - while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + while(chain.length > i)run(chain[i++]); // variable length - can't use forEach promise._c = []; promise._n = false; - if (isReject && !promise._h) onUnhandled(promise); + if(isReject && !promise._h)onUnhandled(promise); }); }; -var onUnhandled = function (promise) { - task.call(global, function () { - var value = promise._v; - var unhandled = isUnhandled(promise); - var result, handler, console; - if (unhandled) { - result = perform(function () { - if (isNode) { +var onUnhandled = function(promise){ + task.call(global, function(){ + var value = promise._v + , abrupt, handler, console; + if(isUnhandled(promise)){ + abrupt = perform(function(){ + if(isNode){ process.emit('unhandledRejection', value, promise); - } else if (handler = global.onunhandledrejection) { - handler({ promise: promise, reason: value }); - } else if ((console = global.console) && console.error) { + } else if(handler = global.onunhandledrejection){ + handler({promise: promise, reason: value}); + } else if((console = global.console) && console.error){ console.error('Unhandled promise rejection', value); } }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should promise._h = isNode || isUnhandled(promise) ? 2 : 1; } promise._a = undefined; - if (unhandled && result.e) throw result.v; + if(abrupt)throw abrupt.error; }); }; -var isUnhandled = function (promise) { - if (promise._h == 1) return false; - var chain = promise._a || promise._c; - var i = 0; - var reaction; - while (chain.length > i) { +var isUnhandled = function(promise){ + if(promise._h == 1)return false; + var chain = promise._a || promise._c + , i = 0 + , reaction; + while(chain.length > i){ reaction = chain[i++]; - if (reaction.fail || !isUnhandled(reaction.promise)) return false; + if(reaction.fail || !isUnhandled(reaction.promise))return false; } return true; }; -var onHandleUnhandled = function (promise) { - task.call(global, function () { +var onHandleUnhandled = function(promise){ + task.call(global, function(){ var handler; - if (isNode) { + if(isNode){ process.emit('rejectionHandled', promise); - } else if (handler = global.onrejectionhandled) { - handler({ promise: promise, reason: promise._v }); + } else if(handler = global.onrejectionhandled){ + handler({promise: promise, reason: promise._v}); } }); }; -var $reject = function (value) { +var $reject = function(value){ var promise = this; - if (promise._d) return; + if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap promise._v = value; promise._s = 2; - if (!promise._a) promise._a = promise._c.slice(); + if(!promise._a)promise._a = promise._c.slice(); notify(promise, true); }; -var $resolve = function (value) { - var promise = this; - var then; - if (promise._d) return; +var $resolve = function(value){ + var promise = this + , then; + if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap try { - if (promise === value) throw TypeError("Promise can't be resolved itself"); - if (then = isThenable(value)) { - microtask(function () { - var wrapper = { _w: promise, _d: false }; // wrap + if(promise === value)throw TypeError("Promise can't be resolved itself"); + if(then = isThenable(value)){ + microtask(function(){ + var wrapper = {_w: promise, _d: false}; // wrap try { then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); - } catch (e) { + } catch(e){ $reject.call(wrapper, e); } }); @@ -75078,26 +78752,25 @@ var $resolve = function (value) { promise._s = 1; notify(promise, false); } - } catch (e) { - $reject.call({ _w: promise, _d: false }, e); // wrap + } catch(e){ + $reject.call({_w: promise, _d: false}, e); // wrap } }; // constructor polyfill -if (!USE_NATIVE) { +if(!USE_NATIVE){ // 25.4.3.1 Promise(executor) - $Promise = function Promise(executor) { + $Promise = function Promise(executor){ anInstance(this, $Promise, PROMISE, '_h'); aFunction(executor); Internal.call(this); try { executor(ctx($resolve, this, 1), ctx($reject, this, 1)); - } catch (err) { + } catch(err){ $reject.call(this, err); } }; - // eslint-disable-next-line no-unused-vars - Internal = function Promise(executor) { + Internal = function Promise(executor){ this._c = []; // <- awaiting reactions this._a = undefined; // <- checked in isUnhandled reactions this._s = 0; // <- state @@ -75106,155 +78779,163 @@ if (!USE_NATIVE) { this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; - Internal.prototype = __webpack_require__(868)($Promise.prototype, { + Internal.prototype = __webpack_require__(865)($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) - then: function then(onFulfilled, onRejected) { - var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); - reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; - reaction.fail = typeof onRejected == 'function' && onRejected; + then: function then(onFulfilled, onRejected){ + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; reaction.domain = isNode ? process.domain : undefined; this._c.push(reaction); - if (this._a) this._a.push(reaction); - if (this._s) notify(this, false); + if(this._a)this._a.push(reaction); + if(this._s)notify(this, false); return reaction.promise; }, // 25.4.5.1 Promise.prototype.catch(onRejected) - 'catch': function (onRejected) { + 'catch': function(onRejected){ return this.then(undefined, onRejected); } }); - OwnPromiseCapability = function () { - var promise = new Internal(); + PromiseCapability = function(){ + var promise = new Internal; this.promise = promise; this.resolve = ctx($resolve, promise, 1); - this.reject = ctx($reject, promise, 1); - }; - newPromiseCapabilityModule.f = newPromiseCapability = function (C) { - return sameConstructor($Promise, C) - ? new OwnPromiseCapability(C) - : newGenericPromiseCapability(C); + this.reject = ctx($reject, promise, 1); }; } -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); -__webpack_require__(123)($Promise, PROMISE); -__webpack_require__(869)(PROMISE); +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); +__webpack_require__(127)($Promise, PROMISE); +__webpack_require__(866)(PROMISE); Wrapper = __webpack_require__(18)[PROMISE]; // statics $export($export.S + $export.F * !USE_NATIVE, PROMISE, { // 25.4.4.5 Promise.reject(r) - reject: function reject(r) { - var capability = newPromiseCapability(this); - var $$reject = capability.reject; + reject: function reject(r){ + var capability = newPromiseCapability(this) + , $$reject = capability.reject; $$reject(r); return capability.promise; } }); $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { // 25.4.4.6 Promise.resolve(x) - resolve: function resolve(x) { + resolve: function resolve(x){ // instanceof instead of internal slot check because we should fix it without replacement native Promise core - if (x instanceof $Promise && sameConstructor(x.constructor, this)) return x; - return promiseResolve(this, x); + if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; + var capability = newPromiseCapability(this) + , $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; } }); -$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(305)(function (iter) { +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(309)(function(iter){ $Promise.all(iter)['catch'](empty); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) - all: function all(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var resolve = capability.resolve; - var reject = capability.reject; - var result = perform(function () { - var values = []; - var index = 0; - var remaining = 1; - forOf(iterable, false, function (promise) { - var $index = index++; - var alreadyCalled = false; + all: function all(iterable){ + var C = this + , capability = newPromiseCapability(C) + , resolve = capability.resolve + , reject = capability.reject; + var abrupt = perform(function(){ + var values = [] + , index = 0 + , remaining = 1; + forOf(iterable, false, function(promise){ + var $index = index++ + , alreadyCalled = false; values.push(undefined); remaining++; - C.resolve(promise).then(function (value) { - if (alreadyCalled) return; - alreadyCalled = true; + C.resolve(promise).then(function(value){ + if(alreadyCalled)return; + alreadyCalled = true; values[$index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); - if (result.e) reject(result.v); + if(abrupt)reject(abrupt.error); return capability.promise; }, // 25.4.4.4 Promise.race(iterable) - race: function race(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var reject = capability.reject; - var result = perform(function () { - forOf(iterable, false, function (promise) { + race: function race(iterable){ + var C = this + , capability = newPromiseCapability(C) + , reject = capability.reject; + var abrupt = perform(function(){ + forOf(iterable, false, function(promise){ C.resolve(promise).then(capability.resolve, reject); }); }); - if (result.e) reject(result.v); + if(abrupt)reject(abrupt.error); return capability.promise; } }); - /***/ }), -/* 864 */ +/* 860 */ /***/ (function(module, exports) { -module.exports = function (it, Constructor, name, forbiddenField) { - if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { +module.exports = function(it, Constructor, name, forbiddenField){ + if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ throw TypeError(name + ': incorrect invocation!'); } return it; }; - /***/ }), -/* 865 */ +/* 861 */ /***/ (function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(61); -var call = __webpack_require__(303); -var isArrayIter = __webpack_require__(304); -var anObject = __webpack_require__(36); -var toLength = __webpack_require__(134); -var getIterFn = __webpack_require__(190); -var BREAK = {}; -var RETURN = {}; -var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); - var f = ctx(fn, that, entries ? 2 : 1); - var index = 0; - var length, step, iterator, result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); +var ctx = __webpack_require__(67) + , call = __webpack_require__(307) + , isArrayIter = __webpack_require__(308) + , anObject = __webpack_require__(35) + , toLength = __webpack_require__(140) + , getIterFn = __webpack_require__(197) + , BREAK = {} + , RETURN = {}; +var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , index = 0 + , length, step, iterator, result; + if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + if(result === BREAK || result === RETURN)return result; + } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; + if(result === BREAK || result === RETURN)return result; } }; -exports.BREAK = BREAK; +exports.BREAK = BREAK; exports.RETURN = RETURN; +/***/ }), +/* 862 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(35) + , aFunction = __webpack_require__(136) + , SPECIES = __webpack_require__(24)('species'); +module.exports = function(O, D){ + var C = anObject(O).constructor, S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; /***/ }), -/* 866 */ +/* 863 */ /***/ (function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 -module.exports = function (fn, args, that) { +module.exports = function(fn, args, that){ var un = that === undefined; - switch (args.length) { + switch(args.length){ case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) @@ -75265,58 +78946,57 @@ module.exports = function (fn, args, that) { : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); - } return fn.apply(that, args); + } return fn.apply(that, args); }; - /***/ }), -/* 867 */ +/* 864 */ /***/ (function(module, exports, __webpack_require__) { -var global = __webpack_require__(23); -var macrotask = __webpack_require__(332).set; -var Observer = global.MutationObserver || global.WebKitMutationObserver; -var process = global.process; -var Promise = global.Promise; -var isNode = __webpack_require__(83)(process) == 'process'; +var global = __webpack_require__(25) + , macrotask = __webpack_require__(345).set + , Observer = global.MutationObserver || global.WebKitMutationObserver + , process = global.process + , Promise = global.Promise + , isNode = __webpack_require__(87)(process) == 'process'; -module.exports = function () { +module.exports = function(){ var head, last, notify; - var flush = function () { + var flush = function(){ var parent, fn; - if (isNode && (parent = process.domain)) parent.exit(); - while (head) { - fn = head.fn; + if(isNode && (parent = process.domain))parent.exit(); + while(head){ + fn = head.fn; head = head.next; try { fn(); - } catch (e) { - if (head) notify(); + } catch(e){ + if(head)notify(); else last = undefined; throw e; } } last = undefined; - if (parent) parent.enter(); + if(parent)parent.enter(); }; // Node.js - if (isNode) { - notify = function () { + if(isNode){ + notify = function(){ process.nextTick(flush); }; // browsers with MutationObserver - } else if (Observer) { - var toggle = true; - var node = document.createTextNode(''); - new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new - notify = function () { + } else if(Observer){ + var toggle = true + , node = document.createTextNode(''); + new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new + notify = function(){ node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise - } else if (Promise && Promise.resolve) { + } else if(Promise && Promise.resolve){ var promise = Promise.resolve(); - notify = function () { + notify = function(){ promise.then(flush); }; // for other environments - macrotask based on: @@ -75326,159 +79006,69 @@ module.exports = function () { // - onreadystatechange // - setTimeout } else { - notify = function () { + notify = function(){ // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } - return function (fn) { - var task = { fn: fn, next: undefined }; - if (last) last.next = task; - if (!head) { + return function(fn){ + var task = {fn: fn, next: undefined}; + if(last)last.next = task; + if(!head){ head = task; notify(); } last = task; }; }; - /***/ }), -/* 868 */ +/* 865 */ /***/ (function(module, exports, __webpack_require__) { -var hide = __webpack_require__(50); -module.exports = function (target, src, safe) { - for (var key in src) { - if (safe && target[key]) target[key] = src[key]; +var hide = __webpack_require__(53); +module.exports = function(target, src, safe){ + for(var key in src){ + if(safe && target[key])target[key] = src[key]; else hide(target, key, src[key]); } return target; }; - /***/ }), -/* 869 */ +/* 866 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var global = __webpack_require__(23); -var core = __webpack_require__(18); -var dP = __webpack_require__(35); -var DESCRIPTORS = __webpack_require__(44); -var SPECIES = __webpack_require__(22)('species'); +var global = __webpack_require__(25) + , core = __webpack_require__(18) + , dP = __webpack_require__(34) + , DESCRIPTORS = __webpack_require__(43) + , SPECIES = __webpack_require__(24)('species'); -module.exports = function (KEY) { +module.exports = function(KEY){ var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; - if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { configurable: true, - get: function () { return this; } + get: function(){ return this; } }); }; - /***/ }), -/* 870 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -// https://github.com/tc39/proposal-promise-finally - -var $export = __webpack_require__(28); -var core = __webpack_require__(18); -var global = __webpack_require__(23); -var speciesConstructor = __webpack_require__(331); -var promiseResolve = __webpack_require__(334); - -$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { - var C = speciesConstructor(this, core.Promise || global.Promise); - var isFunction = typeof onFinally == 'function'; - return this.then( - isFunction ? function (x) { - return promiseResolve(C, onFinally()).then(function () { return x; }); - } : onFinally, - isFunction ? function (e) { - return promiseResolve(C, onFinally()).then(function () { throw e; }); - } : onFinally - ); -} }); - - -/***/ }), -/* 871 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -// https://github.com/tc39/proposal-promise-try -var $export = __webpack_require__(28); -var newPromiseCapability = __webpack_require__(205); -var perform = __webpack_require__(333); - -$export($export.S, 'Promise', { 'try': function (callbackfn) { - var promiseCapability = newPromiseCapability.f(this); - var result = perform(callbackfn); - (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); - return promiseCapability.promise; -} }); - - -/***/ }), -/* 872 */ +/* 867 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(873), __esModule: true }; +module.exports = { "default": __webpack_require__(868), __esModule: true }; /***/ }), -/* 873 */ +/* 868 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(18); -var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); -module.exports = function stringify(it) { // eslint-disable-line no-unused-vars +var core = __webpack_require__(18) + , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify}); +module.exports = function stringify(it){ // eslint-disable-line no-unused-vars return $JSON.stringify.apply($JSON, arguments); }; - -/***/ }), -/* 874 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _keys = __webpack_require__(79); - -var _keys2 = _interopRequireDefault(_keys); - -exports.isObjectEmpty = isObjectEmpty; -exports.getQueryStringValue = getQueryStringValue; -exports.pageHasNodeOfClass = pageHasNodeOfClass; -exports.hasStringInPath = hasStringInPath; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isObjectEmpty(obj) { - return (0, _keys2.default)(obj).length === 0 && obj.constructor === Object; -} - -function getQueryStringValue(key) { - return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1")); -} - -function pageHasNodeOfClass(className) { - return document.querySelectorAll('.' + className).length > 0; -} - -function hasStringInPath(value) { - return location.pathname.substring(1).split('/').filter(function (x) { - return !!x && x === value; - }).length > 0; -} - /***/ }) /******/ ]); \ No newline at end of file diff --git a/bot/build/bundle.js.orig b/bot/build/bundle.js.orig new file mode 100644 index 0000000..f81ae3d --- /dev/null +++ b/bot/build/bundle.js.orig @@ -0,0 +1,152357 @@ +<<<<<<< HEAD +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 335); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = __webpack_require__(65); + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _defineProperty = __webpack_require__(185); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(660), __esModule: true }; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _typeof2 = __webpack_require__(92); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; +}; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _setPrototypeOf = __webpack_require__(682); + +var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); + +var _create = __webpack_require__(686); + +var _create2 = _interopRequireDefault(_create); + +var _typeof2 = __webpack_require__(92); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; +}; + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +module.exports = function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; +}; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _assign = __webpack_require__(49); + +var _assign2 = _interopRequireDefault(_assign); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _assign2.default || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; +}; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (obj, keys) { + var target = {}; + + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + + return target; +}; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var validateFormat = function validateFormat(format) {}; + +if (false) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; +} + +function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +} + +module.exports = invariant; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + + easeOutFunction: 'cubic-bezier(0.23, 1, 0.32, 1)', + easeInOutFunction: 'cubic-bezier(0.445, 0.05, 0.55, 0.95)', + + easeOut: function easeOut(duration, property, delay, easeFunction) { + easeFunction = easeFunction || this.easeOutFunction; + + if (property && Object.prototype.toString.call(property) === '[object Array]') { + var transitions = ''; + for (var i = 0; i < property.length; i++) { + if (transitions) transitions += ','; + transitions += this.create(duration, property[i], delay, easeFunction); + } + + return transitions; + } else { + return this.create(duration, property, delay, easeFunction); + } + }, + create: function create(duration, property, delay, easeFunction) { + duration = duration || '450ms'; + property = property || 'all'; + delay = delay || '0ms'; + easeFunction = easeFunction || 'linear'; + + return property + ' ' + duration + ' ' + easeFunction + ' ' + delay; + } +}; + +/***/ }), +/* 11 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__splice__ = __webpack_require__(500); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getIn__ = __webpack_require__(501); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setIn__ = __webpack_require__(526); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepEqual__ = __webpack_require__(527); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__deleteIn__ = __webpack_require__(562); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys__ = __webpack_require__(563); + + + + + + + +var structure = { + allowsArrayErrors: true, + empty: {}, + emptyList: [], + getIn: __WEBPACK_IMPORTED_MODULE_1__getIn__["a" /* default */], + setIn: __WEBPACK_IMPORTED_MODULE_2__setIn__["a" /* default */], + deepEqual: __WEBPACK_IMPORTED_MODULE_3__deepEqual__["a" /* default */], + deleteIn: __WEBPACK_IMPORTED_MODULE_4__deleteIn__["a" /* default */], + fromJS: function fromJS(value) { + return value; + }, + keys: __WEBPACK_IMPORTED_MODULE_5__keys__["a" /* default */], + size: function size(array) { + return array ? array.length : 0; + }, + splice: __WEBPACK_IMPORTED_MODULE_0__splice__["a" /* default */], + toJS: function toJS(value) { + return value; + } +}; + +/* harmony default export */ __webpack_exports__["a"] = (structure); + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var emptyFunction = __webpack_require__(24); + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = emptyFunction; + +if (false) { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; +} + +module.exports = warning; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + +/** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + +function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; +} + +module.exports = reactProdInvariant; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +if (false) { + var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && + Symbol.for && + Symbol.for('react.element')) || + 0xeac7; + + var isValidElement = function(object) { + return typeof object === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE; + }; + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess); +} else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__(431)(); +} + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var DOMProperty = __webpack_require__(67); +var ReactDOMComponentFlags = __webpack_require__(216); + +var invariant = __webpack_require__(9); + +var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; +var Flags = ReactDOMComponentFlags; + +var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2); + +/** + * Check if a given node should be cached. + */ +function shouldPrecacheNode(node, nodeID) { + return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' '; +} + +/** + * Drill down (through composites and empty components) until we get a host or + * host text component. + * + * This is pretty polymorphic but unavoidable with the current structure we have + * for `_renderedChildren`. + */ +function getRenderedHostOrTextFromComponent(component) { + var rendered; + while (rendered = component._renderedComponent) { + component = rendered; + } + return component; +} + +/** + * Populate `_hostNode` on the rendered host/text component with the given + * DOM node. The passed `inst` can be a composite. + */ +function precacheNode(inst, node) { + var hostInst = getRenderedHostOrTextFromComponent(inst); + hostInst._hostNode = node; + node[internalInstanceKey] = hostInst; +} + +function uncacheNode(inst) { + var node = inst._hostNode; + if (node) { + delete node[internalInstanceKey]; + inst._hostNode = null; + } +} + +/** + * Populate `_hostNode` on each child of `inst`, assuming that the children + * match up with the DOM (element) children of `node`. + * + * We cache entire levels at once to avoid an n^2 problem where we access the + * children of a node sequentially and have to walk from the start to our target + * node every time. + * + * Since we update `_renderedChildren` and the actual DOM at (slightly) + * different times, we could race here and see a newer `_renderedChildren` than + * the DOM nodes we see. To avoid this, ReactMultiChild calls + * `prepareToManageChildren` before we change `_renderedChildren`, at which + * time the container's child nodes are always cached (until it unmounts). + */ +function precacheChildNodes(inst, node) { + if (inst._flags & Flags.hasCachedChildNodes) { + return; + } + var children = inst._renderedChildren; + var childNode = node.firstChild; + outer: for (var name in children) { + if (!children.hasOwnProperty(name)) { + continue; + } + var childInst = children[name]; + var childID = getRenderedHostOrTextFromComponent(childInst)._domID; + if (childID === 0) { + // We're currently unmounting this child in ReactMultiChild; skip it. + continue; + } + // We assume the child nodes are in the same order as the child instances. + for (; childNode !== null; childNode = childNode.nextSibling) { + if (shouldPrecacheNode(childNode, childID)) { + precacheNode(childInst, childNode); + continue outer; + } + } + // We reached the end of the DOM children without finding an ID match. + true ? false ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0; + } + inst._flags |= Flags.hasCachedChildNodes; +} + +/** + * Given a DOM node, return the closest ReactDOMComponent or + * ReactDOMTextComponent instance ancestor. + */ +function getClosestInstanceFromNode(node) { + if (node[internalInstanceKey]) { + return node[internalInstanceKey]; + } + + // Walk up the tree until we find an ancestor whose instance we have cached. + var parents = []; + while (!node[internalInstanceKey]) { + parents.push(node); + if (node.parentNode) { + node = node.parentNode; + } else { + // Top of the tree. This node must not be part of a React tree (or is + // unmounted, potentially). + return null; + } + } + + var closest; + var inst; + for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) { + closest = inst; + if (parents.length) { + precacheChildNodes(inst, node); + } + } + + return closest; +} + +/** + * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent + * instance, or null if the node was not rendered by this React. + */ +function getInstanceFromNode(node) { + var inst = getClosestInstanceFromNode(node); + if (inst != null && inst._hostNode === node) { + return inst; + } else { + return null; + } +} + +/** + * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding + * DOM node. + */ +function getNodeFromInstance(inst) { + // Without this first invariant, passing a non-DOM-component triggers the next + // invariant for a missing parent, which is super confusing. + !(inst._hostNode !== undefined) ? false ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; + + if (inst._hostNode) { + return inst._hostNode; + } + + // Walk up the tree until we find an ancestor whose DOM node we have cached. + var parents = []; + while (!inst._hostNode) { + parents.push(inst); + !inst._hostParent ? false ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0; + inst = inst._hostParent; + } + + // Now parents contains each ancestor that does *not* have a cached native + // node, and `inst` is the deepest ancestor that does. + for (; parents.length; inst = parents.pop()) { + precacheChildNodes(inst, inst._hostNode); + } + + return inst._hostNode; +} + +var ReactDOMComponentTree = { + getClosestInstanceFromNode: getClosestInstanceFromNode, + getInstanceFromNode: getInstanceFromNode, + getNodeFromInstance: getNodeFromInstance, + precacheChildNodes: precacheChildNodes, + precacheNode: precacheNode, + uncacheNode: uncacheNode +}; + +module.exports = ReactDOMComponentTree; + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = function() {}; + +if (false) { + warning = function(condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.length < 10 || (/^[s\W]*$/).test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + format + ); + } + + if (!condition) { + var argIndex = 0; + var message = 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch(x) {} + } + }; +} + +module.exports = warning; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.5.0' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = __webpack_require__(354); + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var invariant = function(condition, format, a, b, c, d, e, f) { + if (false) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +/** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ +var ExecutionEnvironment = { + + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + + isInWorker: !canUseDOM // For now, this is true - might change in the future. + +}; + +module.exports = ExecutionEnvironment; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(137)('wks'); +var uid = __webpack_require__(100); +var Symbol = __webpack_require__(23).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + +function makeEmptyFunction(arg) { + return function () { + return arg; + }; +} + +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +var emptyFunction = function emptyFunction() {}; + +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function () { + return this; +}; +emptyFunction.thatReturnsArgument = function (arg) { + return arg; +}; + +module.exports = emptyFunction; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _shouldUpdate = __webpack_require__(741); + +var _shouldUpdate2 = _interopRequireDefault(_shouldUpdate); + +var _shallowEqual = __webpack_require__(58); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _createHelper = __webpack_require__(318); + +var _createHelper2 = _interopRequireDefault(_createHelper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var pure = (0, _shouldUpdate2.default)(function (props, nextProps) { + return !(0, _shallowEqual2.default)(props, nextProps); +}); + +exports.default = (0, _createHelper2.default)(pure, 'pure', true, true); + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _SvgIcon = __webpack_require__(746); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _SvgIcon2.default; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.connect = exports.Provider = undefined; + +var _Provider = __webpack_require__(463); + +var _Provider2 = _interopRequireDefault(_Provider); + +var _connect = __webpack_require__(464); + +var _connect2 = _interopRequireDefault(_connect); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +exports.Provider = _Provider2["default"]; +exports.connect = _connect2["default"]; + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(23); +var core = __webpack_require__(18); +var ctx = __webpack_require__(61); +var hide = __webpack_require__(50); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && key in exports) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +// Trust the developer to only use ReactInstrumentation with a __DEV__ check + +var debugTool = null; + +if (false) { + var ReactDebugTool = require('./ReactDebugTool'); + debugTool = ReactDebugTool; +} + +module.exports = { debugTool: debugTool }; + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +// Source: http://jsfiddle.net/vWx8V/ +// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes + +/** + * Conenience method returns corresponding value for given keyName or keyCode. + * + * @param {Mixed} keyCode {Number} or keyName {String} + * @return {Mixed} + * @api public + */ + +exports = module.exports = function(searchInput) { + // Keyboard Events + if (searchInput && 'object' === typeof searchInput) { + var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode + if (hasKeyCode) searchInput = hasKeyCode + } + + // Numbers + if ('number' === typeof searchInput) return names[searchInput] + + // Everything else (cast to string) + var search = String(searchInput) + + // check codes + var foundNamedKey = codes[search.toLowerCase()] + if (foundNamedKey) return foundNamedKey + + // check aliases + var foundNamedKey = aliases[search.toLowerCase()] + if (foundNamedKey) return foundNamedKey + + // weird character? + if (search.length === 1) return search.charCodeAt(0) + + return undefined +} + +/** + * Get by name + * + * exports.code['enter'] // => 13 + */ + +var codes = exports.code = exports.codes = { + 'backspace': 8, + 'tab': 9, + 'enter': 13, + 'shift': 16, + 'ctrl': 17, + 'alt': 18, + 'pause/break': 19, + 'caps lock': 20, + 'esc': 27, + 'space': 32, + 'page up': 33, + 'page down': 34, + 'end': 35, + 'home': 36, + 'left': 37, + 'up': 38, + 'right': 39, + 'down': 40, + 'insert': 45, + 'delete': 46, + 'command': 91, + 'left command': 91, + 'right command': 93, + 'numpad *': 106, + 'numpad +': 107, + 'numpad -': 109, + 'numpad .': 110, + 'numpad /': 111, + 'num lock': 144, + 'scroll lock': 145, + 'my computer': 182, + 'my calculator': 183, + ';': 186, + '=': 187, + ',': 188, + '-': 189, + '.': 190, + '/': 191, + '`': 192, + '[': 219, + '\\': 220, + ']': 221, + "'": 222 +} + +// Helper aliases + +var aliases = exports.aliases = { + 'windows': 91, + '⇧': 16, + '⌥': 18, + '⌃': 17, + '⌘': 91, + 'ctl': 17, + 'control': 17, + 'option': 18, + 'pause': 19, + 'break': 19, + 'caps': 20, + 'return': 13, + 'escape': 27, + 'spc': 32, + 'pgup': 33, + 'pgdn': 34, + 'ins': 45, + 'del': 46, + 'cmd': 91 +} + + +/*! + * Programatically add the following + */ + +// lower case chars +for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32 + +// numbers +for (var i = 48; i < 58; i++) codes[i - 48] = i + +// function keys +for (i = 1; i < 13; i++) codes['f'+i] = i + 111 + +// numpad keys +for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96 + +/** + * Get by code + * + * exports.name[13] // => 'Enter' + */ + +var names = exports.names = exports.title = {} // title for backward compat + +// Create reverse mapping +for (i in codes) names[codes[i]] = i + +// Add aliases +for (var alias in aliases) { + codes[alias] = aliases[alias] +} + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(15); + +var CallbackQueue = __webpack_require__(220); +var PooledClass = __webpack_require__(53); +var ReactFeatureFlags = __webpack_require__(221); +var ReactReconciler = __webpack_require__(70); +var Transaction = __webpack_require__(104); + +var invariant = __webpack_require__(9); + +var dirtyComponents = []; +var updateBatchNumber = 0; +var asapCallbackQueue = CallbackQueue.getPooled(); +var asapEnqueued = false; + +var batchingStrategy = null; + +function ensureInjected() { + !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? false ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0; +} + +var NESTED_UPDATES = { + initialize: function () { + this.dirtyComponentsLength = dirtyComponents.length; + }, + close: function () { + if (this.dirtyComponentsLength !== dirtyComponents.length) { + // Additional updates were enqueued by componentDidUpdate handlers or + // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run + // these new updates so that if A's componentDidUpdate calls setState on + // B, B will update before the callback A's updater provided when calling + // setState. + dirtyComponents.splice(0, this.dirtyComponentsLength); + flushBatchedUpdates(); + } else { + dirtyComponents.length = 0; + } + } +}; + +var UPDATE_QUEUEING = { + initialize: function () { + this.callbackQueue.reset(); + }, + close: function () { + this.callbackQueue.notifyAll(); + } +}; + +var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING]; + +function ReactUpdatesFlushTransaction() { + this.reinitializeTransaction(); + this.dirtyComponentsLength = null; + this.callbackQueue = CallbackQueue.getPooled(); + this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled( + /* useCreateElement */true); +} + +_assign(ReactUpdatesFlushTransaction.prototype, Transaction, { + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + destructor: function () { + this.dirtyComponentsLength = null; + CallbackQueue.release(this.callbackQueue); + this.callbackQueue = null; + ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction); + this.reconcileTransaction = null; + }, + + perform: function (method, scope, a) { + // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` + // with this transaction's wrappers around it. + return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a); + } +}); + +PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); + +function batchedUpdates(callback, a, b, c, d, e) { + ensureInjected(); + return batchingStrategy.batchedUpdates(callback, a, b, c, d, e); +} + +/** + * Array comparator for ReactComponents by mount ordering. + * + * @param {ReactComponent} c1 first component you're comparing + * @param {ReactComponent} c2 second component you're comparing + * @return {number} Return value usable by Array.prototype.sort(). + */ +function mountOrderComparator(c1, c2) { + return c1._mountOrder - c2._mountOrder; +} + +function runBatchedUpdates(transaction) { + var len = transaction.dirtyComponentsLength; + !(len === dirtyComponents.length) ? false ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0; + + // Since reconciling a component higher in the owner hierarchy usually (not + // always -- see shouldComponentUpdate()) will reconcile children, reconcile + // them before their children by sorting the array. + dirtyComponents.sort(mountOrderComparator); + + // Any updates enqueued while reconciling must be performed after this entire + // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and + // C, B could update twice in a single batch if C's render enqueues an update + // to B (since B would have already updated, we should skip it, and the only + // way we can know to do so is by checking the batch counter). + updateBatchNumber++; + + for (var i = 0; i < len; i++) { + // If a component is unmounted before pending changes apply, it will still + // be here, but we assume that it has cleared its _pendingCallbacks and + // that performUpdateIfNecessary is a noop. + var component = dirtyComponents[i]; + + // If performUpdateIfNecessary happens to enqueue any new updates, we + // shouldn't execute the callbacks until the next render happens, so + // stash the callbacks first + var callbacks = component._pendingCallbacks; + component._pendingCallbacks = null; + + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var namedComponent = component; + // Duck type TopLevelWrapper. This is probably always true. + if (component._currentElement.type.isReactTopLevelWrapper) { + namedComponent = component._renderedComponent; + } + markerName = 'React update: ' + namedComponent.getName(); + console.time(markerName); + } + + ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber); + + if (markerName) { + console.timeEnd(markerName); + } + + if (callbacks) { + for (var j = 0; j < callbacks.length; j++) { + transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); + } + } + } +} + +var flushBatchedUpdates = function () { + // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents + // array and perform any updates enqueued by mount-ready handlers (i.e., + // componentDidUpdate) but we need to check here too in order to catch + // updates enqueued by setState callbacks and asap calls. + while (dirtyComponents.length || asapEnqueued) { + if (dirtyComponents.length) { + var transaction = ReactUpdatesFlushTransaction.getPooled(); + transaction.perform(runBatchedUpdates, null, transaction); + ReactUpdatesFlushTransaction.release(transaction); + } + + if (asapEnqueued) { + asapEnqueued = false; + var queue = asapCallbackQueue; + asapCallbackQueue = CallbackQueue.getPooled(); + queue.notifyAll(); + CallbackQueue.release(queue); + } + } +}; + +/** + * Mark a component as needing a rerender, adding an optional callback to a + * list of functions which will be executed once the rerender occurs. + */ +function enqueueUpdate(component) { + ensureInjected(); + + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (This is called by each top-level update + // function, like setState, forceUpdate, etc.; creation and + // destruction of top-level components is guarded in ReactMount.) + + if (!batchingStrategy.isBatchingUpdates) { + batchingStrategy.batchedUpdates(enqueueUpdate, component); + return; + } + + dirtyComponents.push(component); + if (component._updateBatchNumber == null) { + component._updateBatchNumber = updateBatchNumber + 1; + } +} + +/** + * Enqueue a callback to be run at the end of the current batching cycle. Throws + * if no updates are currently being performed. + */ +function asap(callback, context) { + !batchingStrategy.isBatchingUpdates ? false ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0; + asapCallbackQueue.enqueue(callback, context); + asapEnqueued = true; +} + +var ReactUpdatesInjection = { + injectReconcileTransaction: function (ReconcileTransaction) { + !ReconcileTransaction ? false ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0; + ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; + }, + + injectBatchingStrategy: function (_batchingStrategy) { + !_batchingStrategy ? false ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0; + !(typeof _batchingStrategy.batchedUpdates === 'function') ? false ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0; + !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? false ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0; + batchingStrategy = _batchingStrategy; + } +}; + +var ReactUpdates = { + /** + * React references `ReactReconcileTransaction` using this property in order + * to allow dependency injection. + * + * @internal + */ + ReactReconcileTransaction: null, + + batchedUpdates: batchedUpdates, + enqueueUpdate: enqueueUpdate, + flushBatchedUpdates: flushBatchedUpdates, + injection: ReactUpdatesInjection, + asap: asap +}; + +module.exports = ReactUpdates; + +/***/ }), +/* 32 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(253); + + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || freeSelf || Function('return this')(); + +/* harmony default export */ __webpack_exports__["a"] = (root); + + +/***/ }), +/* 33 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/* harmony default export */ __webpack_exports__["a"] = (isArray); + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Paper = __webpack_require__(755); + +var _Paper2 = _interopRequireDefault(_Paper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Paper2.default; + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(36); +var IE8_DOM_DEFINE = __webpack_require__(206); +var toPrimitive = __webpack_require__(132); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(44) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(62); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + */ +var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null +}; + +module.exports = ReactCurrentOwner; + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var PooledClass = __webpack_require__(53); + +var emptyFunction = __webpack_require__(24); +var warning = __webpack_require__(12); + +var didWarnForAddedNewProperty = false; +var isProxySupported = typeof Proxy === 'function'; + +var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances']; + +/** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var EventInterface = { + type: null, + target: null, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: emptyFunction.thatReturnsNull, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function (event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null +}; + +/** + * Synthetic events are dispatched by event plugins, typically in response to a + * top-level event delegation handler. + * + * These systems should generally use pooling to reduce the frequency of garbage + * collection. The system should check `isPersistent` to determine whether the + * event should be released into the pool after being dispatched. Users that + * need a persisted event should invoke `persist`. + * + * Synthetic events (and subclasses) implement the DOM Level 3 Events API by + * normalizing browser quirks. Subclasses do not necessarily have to implement a + * DOM interface; custom application-specific events can also subclass this. + * + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {*} targetInst Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @param {DOMEventTarget} nativeEventTarget Target node. + */ +function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { + if (false) { + // these have a getter/setter for warnings + delete this.nativeEvent; + delete this.preventDefault; + delete this.stopPropagation; + } + + this.dispatchConfig = dispatchConfig; + this._targetInst = targetInst; + this.nativeEvent = nativeEvent; + + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + if (false) { + delete this[propName]; // this has a getter/setter for warnings + } + var normalize = Interface[propName]; + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + if (propName === 'target') { + this.target = nativeEventTarget; + } else { + this[propName] = nativeEvent[propName]; + } + } + } + + var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; + if (defaultPrevented) { + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + } else { + this.isDefaultPrevented = emptyFunction.thatReturnsFalse; + } + this.isPropagationStopped = emptyFunction.thatReturnsFalse; + return this; +} + +_assign(SyntheticEvent.prototype, { + preventDefault: function () { + this.defaultPrevented = true; + var event = this.nativeEvent; + if (!event) { + return; + } + + if (event.preventDefault) { + event.preventDefault(); + // eslint-disable-next-line valid-typeof + } else if (typeof event.returnValue !== 'unknown') { + event.returnValue = false; + } + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + }, + + stopPropagation: function () { + var event = this.nativeEvent; + if (!event) { + return; + } + + if (event.stopPropagation) { + event.stopPropagation(); + // eslint-disable-next-line valid-typeof + } else if (typeof event.cancelBubble !== 'unknown') { + // The ChangeEventPlugin registers a "propertychange" event for + // IE. This event does not support bubbling or cancelling, and + // any references to cancelBubble throw "Member not found". A + // typeof check of "unknown" circumvents this issue (and is also + // IE specific). + event.cancelBubble = true; + } + + this.isPropagationStopped = emptyFunction.thatReturnsTrue; + }, + + /** + * We release all dispatched `SyntheticEvent`s after each event loop, adding + * them back into the pool. This allows a way to hold onto a reference that + * won't be added back into the pool. + */ + persist: function () { + this.isPersistent = emptyFunction.thatReturnsTrue; + }, + + /** + * Checks if this event should be released back into the pool. + * + * @return {boolean} True if this should not be released, false otherwise. + */ + isPersistent: emptyFunction.thatReturnsFalse, + + /** + * `PooledClass` looks for `destructor` on each instance it releases. + */ + destructor: function () { + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (false) { + Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName])); + } else { + this[propName] = null; + } + } + for (var i = 0; i < shouldBeReleasedProperties.length; i++) { + this[shouldBeReleasedProperties[i]] = null; + } + if (false) { + Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null)); + Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction)); + Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)); + } + } +}); + +SyntheticEvent.Interface = EventInterface; + +if (false) { + if (isProxySupported) { + /*eslint-disable no-func-assign */ + SyntheticEvent = new Proxy(SyntheticEvent, { + construct: function (target, args) { + return this.apply(target, Object.create(target.prototype), args); + }, + apply: function (constructor, that, args) { + return new Proxy(constructor.apply(that, args), { + set: function (target, prop, value) { + if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) { + process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0; + didWarnForAddedNewProperty = true; + } + target[prop] = value; + return true; + } + }); + } + }); + /*eslint-enable no-func-assign */ + } +} +/** + * Helper to reduce boilerplate when creating subclasses. + * + * @param {function} Class + * @param {?object} Interface + */ +SyntheticEvent.augmentClass = function (Class, Interface) { + var Super = this; + + var E = function () {}; + E.prototype = Super.prototype; + var prototype = new E(); + + _assign(prototype, Class.prototype); + Class.prototype = prototype; + Class.prototype.constructor = Class; + + Class.Interface = _assign({}, Super.Interface, Interface); + Class.augmentClass = Super.augmentClass; + + PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler); +}; + +PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler); + +module.exports = SyntheticEvent; + +/** + * Helper to nullify syntheticEvent instance properties when destructing + * + * @param {object} SyntheticEvent + * @param {String} propName + * @return {object} defineProperty object + */ +function getPooledWarningPropertyDefinition(propName, getVal) { + var isFunction = typeof getVal === 'function'; + return { + configurable: true, + set: set, + get: get + }; + + function set(val) { + var action = isFunction ? 'setting the method' : 'setting the property'; + warn(action, 'This is effectively a no-op'); + return val; + } + + function get() { + var action = isFunction ? 'accessing the method' : 'accessing the property'; + var result = isFunction ? 'This is a no-op function' : 'This is set to null'; + warn(action, result); + return getVal; + } + + function warn(action, result) { + var warningCondition = false; + false ? warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0; + } +} + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var React = __webpack_require__(0); +var factory = __webpack_require__(215); + +if (typeof React === 'undefined') { + throw Error( + 'create-react-class could not find the React object. If you are using script tags, ' + + 'make sure that React is being loaded before create-react-class.' + ); +} + +// Hack to grab NoopUpdateQueue from isomorphic React +var ReactNoopUpdateQueue = new React.Component().updater; + +module.exports = factory( + React.Component, + React.isValidElement, + ReactNoopUpdateQueue +); + + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (prefixedValue, value, keepUnprefixed) { + return keepUnprefixed ? [prefixedValue, value] : prefixedValue; +}; + +module.exports = exports["default"]; + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var horizontal = _react.PropTypes.oneOf(['left', 'middle', 'right']); +var vertical = _react.PropTypes.oneOf(['top', 'center', 'bottom']); + +exports.default = { + + corners: _react.PropTypes.oneOf(['bottom-left', 'bottom-right', 'top-left', 'top-right']), + + horizontal: horizontal, + + vertical: vertical, + + origin: _react.PropTypes.shape({ + horizontal: horizontal, + vertical: vertical + }), + + cornersAndCenter: _react.PropTypes.oneOf(['bottom-center', 'bottom-left', 'bottom-right', 'top-center', 'top-left', 'top-right']), + + stringOrNumber: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]), + + zDepth: _react.PropTypes.oneOf([0, 1, 2, 3, 4, 5]) + +}; + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _typeof2 = __webpack_require__(92); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _keys = __webpack_require__(79); + +var _keys2 = _interopRequireDefault(_keys); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _assign = __webpack_require__(49); + +var _assign2 = _interopRequireDefault(_assign); + +exports.withOptions = withOptions; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(14); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _shallowEqual = __webpack_require__(87); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +var _supports = __webpack_require__(752); + +var supports = _interopRequireWildcard(_supports); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var defaultEventOptions = { + capture: false, + passive: false +}; +/* eslint-disable prefer-spread */ + +function mergeDefaultEventOptions(options) { + return (0, _assign2.default)({}, defaultEventOptions, options); +} + +function getEventListenerArgs(eventName, callback, options) { + var args = [eventName, callback]; + args.push(supports.passiveOption ? options : options.capture); + return args; +} + +function on(target, eventName, callback, options) { + if (supports.addEventListener) { + target.addEventListener.apply(target, getEventListenerArgs(eventName, callback, options)); + } else if (supports.attachEvent) { + // IE8+ Support + target.attachEvent('on' + eventName, function () { + callback.call(target); + }); + } +} + +function off(target, eventName, callback, options) { + if (supports.removeEventListener) { + target.removeEventListener.apply(target, getEventListenerArgs(eventName, callback, options)); + } else if (supports.detachEvent) { + // IE8+ Support + target.detachEvent('on' + eventName, callback); + } +} + +function forEachListener(props, iteratee) { + var children = props.children, + target = props.target, + eventProps = (0, _objectWithoutProperties3.default)(props, ['children', 'target']); + + + (0, _keys2.default)(eventProps).forEach(function (name) { + if (name.substring(0, 2) !== 'on') { + return; + } + + var prop = eventProps[name]; + var type = typeof prop === 'undefined' ? 'undefined' : (0, _typeof3.default)(prop); + var isObject = type === 'object'; + var isFunction = type === 'function'; + + if (!isObject && !isFunction) { + return; + } + + var capture = name.substr(-7).toLowerCase() === 'capture'; + var eventName = name.substring(2).toLowerCase(); + eventName = capture ? eventName.substring(0, eventName.length - 7) : eventName; + + if (isObject) { + iteratee(eventName, prop.handler, prop.options); + } else { + iteratee(eventName, prop, mergeDefaultEventOptions({ capture: capture })); + } + }); +} + +function withOptions(handler, options) { + false ? (0, _warning2.default)(options, 'react-event-listener: Should be specified options in withOptions.') : void 0; + + return { + handler: handler, + options: mergeDefaultEventOptions(options) + }; +} + +var EventListener = function (_Component) { + (0, _inherits3.default)(EventListener, _Component); + + function EventListener() { + (0, _classCallCheck3.default)(this, EventListener); + return (0, _possibleConstructorReturn3.default)(this, (EventListener.__proto__ || (0, _getPrototypeOf2.default)(EventListener)).apply(this, arguments)); + } + + (0, _createClass3.default)(EventListener, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.addListeners(); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + return !(0, _shallowEqual2.default)(this.props, nextProps); + } + }, { + key: 'componentWillUpdate', + value: function componentWillUpdate() { + this.removeListeners(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.addListeners(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.removeListeners(); + } + }, { + key: 'addListeners', + value: function addListeners() { + this.applyListeners(on); + } + }, { + key: 'removeListeners', + value: function removeListeners() { + this.applyListeners(off); + } + }, { + key: 'applyListeners', + value: function applyListeners(onOrOff) { + var target = this.props.target; + + + if (target) { + var element = target; + + if (typeof target === 'string') { + element = window[target]; + } + + forEachListener(this.props, onOrOff.bind(null, element)); + } + } + }, { + key: 'render', + value: function render() { + return this.props.children || null; + } + }]); + return EventListener; +}(_react.Component); + + false ? EventListener.propTypes = { + /** + * You can provide a single child too. + */ + children: _propTypes2.default.element, + /** + * The DOM target to listen to. + */ + target: _propTypes2.default.oneOfType([_propTypes2.default.object, _propTypes2.default.string]).isRequired +} : void 0; +exports.default = EventListener; + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +exports.default = createComponent; + +var _react = __webpack_require__(0); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * Creates a component class that renders the given Material UI component + * + * @param MaterialUIComponent The material ui component to render + * @param mapProps A mapping of props provided by redux-form to the props the Material UI + * component needs + */ +function createComponent(MaterialUIComponent, mapProps) { + var InputComponent = function (_Component) { + _inherits(InputComponent, _Component); + + function InputComponent() { + _classCallCheck(this, InputComponent); + + return _possibleConstructorReturn(this, (InputComponent.__proto__ || Object.getPrototypeOf(InputComponent)).apply(this, arguments)); + } + + _createClass(InputComponent, [{ + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.component; + } + }, { + key: 'render', + value: function render() { + return (0, _react.createElement)(MaterialUIComponent, _extends({}, mapProps(this.props), { + ref: 'component' + })); + } + }]); + + return InputComponent; + }(_react.Component); + + InputComponent.displayName = 'ReduxFormMaterialUI' + MaterialUIComponent.name; + return InputComponent; +} + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(63)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 45 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["c"] = isReactChildren; +/* harmony export (immutable) */ __webpack_exports__["a"] = createRouteFromReactElement; +/* unused harmony export createRoutesFromReactChildren */ +/* harmony export (immutable) */ __webpack_exports__["b"] = createRoutes; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + +function isValidChild(object) { + return object == null || __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(object); +} + +function isReactChildren(object) { + return isValidChild(object) || Array.isArray(object) && object.every(isValidChild); +} + +function createRoute(defaultProps, props) { + return _extends({}, defaultProps, props); +} + +function createRouteFromReactElement(element) { + var type = element.type; + var route = createRoute(type.defaultProps, element.props); + + if (route.children) { + var childRoutes = createRoutesFromReactChildren(route.children, route); + + if (childRoutes.length) route.childRoutes = childRoutes; + + delete route.children; + } + + return route; +} + +/** + * Creates and returns a routes object from the given ReactChildren. JSX + * provides a convenient way to visualize how routes in the hierarchy are + * nested. + * + * import { Route, createRoutesFromReactChildren } from 'react-router' + * + * const routes = createRoutesFromReactChildren( + * + * + * + * + * ) + * + * Note: This method is automatically used when you provide children + * to a component. + */ +function createRoutesFromReactChildren(children, parentRoute) { + var routes = []; + + __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) { + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) { + // Component classes may have a static create* method. + if (element.type.createRouteFromReactElement) { + var route = element.type.createRouteFromReactElement(element, parentRoute); + + if (route) routes.push(route); + } else { + routes.push(createRouteFromReactElement(element)); + } + } + }); + + return routes; +} + +/** + * Creates and returns an array of routes from the given object which + * may be a JSX route, a plain object route, or an array of either. + */ +function createRoutes(routes) { + if (isReactChildren(routes)) { + routes = createRoutesFromReactChildren(routes); + } else if (routes && !Array.isArray(routes)) { + routes = [routes]; + } + + return routes; +} + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.createPath = exports.parsePath = exports.getQueryStringValueFromPath = exports.stripQueryStringValueFromPath = exports.addQueryStringValueToPath = undefined; + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var addQueryStringValueToPath = exports.addQueryStringValueToPath = function addQueryStringValueToPath(path, key, value) { + var _parsePath = parsePath(path), + pathname = _parsePath.pathname, + search = _parsePath.search, + hash = _parsePath.hash; + + return createPath({ + pathname: pathname, + search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value, + hash: hash + }); +}; + +var stripQueryStringValueFromPath = exports.stripQueryStringValueFromPath = function stripQueryStringValueFromPath(path, key) { + var _parsePath2 = parsePath(path), + pathname = _parsePath2.pathname, + search = _parsePath2.search, + hash = _parsePath2.hash; + + return createPath({ + pathname: pathname, + search: search.replace(new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), function (match, prefix, suffix) { + return prefix === '?' ? prefix : suffix; + }), + hash: hash + }); +}; + +var getQueryStringValueFromPath = exports.getQueryStringValueFromPath = function getQueryStringValueFromPath(path, key) { + var _parsePath3 = parsePath(path), + search = _parsePath3.search; + + var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)')); + return match && match[1]; +}; + +var extractPath = function extractPath(string) { + var match = string.match(/^(https?:)?\/\/[^\/]*/); + return match == null ? string : string.substring(match[0].length); +}; + +var parsePath = exports.parsePath = function parsePath(path) { + var pathname = extractPath(path); + var search = ''; + var hash = ''; + + false ? (0, _warning2.default)(path === pathname, 'A path must be pathname + search + hash only, not a full URL like "%s"', path) : void 0; + + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substring(hashIndex); + pathname = pathname.substring(0, hashIndex); + } + + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substring(searchIndex); + pathname = pathname.substring(0, searchIndex); + } + + if (pathname === '') pathname = '/'; + + return { + pathname: pathname, + search: search, + hash: hash + }; +}; + +var createPath = exports.createPath = function createPath(location) { + if (location == null || typeof location === 'string') return location; + + var basename = location.basename, + pathname = location.pathname, + search = location.search, + hash = location.hash; + + var path = (basename || '') + pathname; + + if (search && search !== '?') path += search; + + if (hash) path += hash; + + return path; +}; + +/***/ }), +/* 47 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 48 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +/* harmony default export */ __webpack_exports__["a"] = (isObject); + + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(336), __esModule: true }; + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(35); +var createDesc = __webpack_require__(82); +module.exports = __webpack_require__(44) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(208); +var defined = __webpack_require__(133); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(9); + +/** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ +var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; + +var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } +}; + +var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } +}; + +var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } +}; + +var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) ? false ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } +}; + +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; + +/** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ +var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; +}; + +var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler +}; + +module.exports = PooledClass; + +/***/ }), +/* 54 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +/* harmony default export */ __webpack_exports__["a"] = (isObjectLike); + + +/***/ }), +/* 55 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(507); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__(510); + + + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = Object(__WEBPACK_IMPORTED_MODULE_1__getValue_js__["a" /* default */])(object, key); + return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */])(value) ? value : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (getNative); + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.convertColorToString = convertColorToString; +exports.convertHexToRGB = convertHexToRGB; +exports.decomposeColor = decomposeColor; +exports.getContrastRatio = getContrastRatio; +exports.getLuminance = getLuminance; +exports.emphasize = emphasize; +exports.fade = fade; +exports.darken = darken; +exports.lighten = lighten; +/** + * Returns a number whose value is limited to the given range. + * + * @param {number} value The value to be clamped + * @param {number} min The lower boundary of the output range + * @param {number} max The upper boundary of the output range + * @returns {number} A number in the range [min, max] + */ +function clamp(value, min, max) { + if (value < min) { + return min; + } + if (value > max) { + return max; + } + return value; +} + +/** + * Converts a color object with type and values to a string. + * + * @param {object} color - Decomposed color + * @param {string} color.type - One of, 'rgb', 'rgba', 'hsl', 'hsla' + * @param {array} color.values - [n,n,n] or [n,n,n,n] + * @returns {string} A CSS color string + */ +function convertColorToString(color) { + var type = color.type, + values = color.values; + + + if (type.indexOf('rgb') > -1) { + // Only convert the first 3 values to int (i.e. not alpha) + for (var i = 0; i < 3; i++) { + values[i] = parseInt(values[i]); + } + } + + var colorString = void 0; + + if (type.indexOf('hsl') > -1) { + colorString = color.type + '(' + values[0] + ', ' + values[1] + '%, ' + values[2] + '%'; + } else { + colorString = color.type + '(' + values[0] + ', ' + values[1] + ', ' + values[2]; + } + + if (values.length === 4) { + colorString += ', ' + color.values[3] + ')'; + } else { + colorString += ')'; + } + + return colorString; +} + +/** + * Converts a color from CSS hex format to CSS rgb format. + * + * @param {string} color - Hex color, i.e. #nnn or #nnnnnn + * @returns {string} A CSS rgb color string + */ +function convertHexToRGB(color) { + if (color.length === 4) { + var extendedColor = '#'; + for (var i = 1; i < color.length; i++) { + extendedColor += color.charAt(i) + color.charAt(i); + } + color = extendedColor; + } + + var values = { + r: parseInt(color.substr(1, 2), 16), + g: parseInt(color.substr(3, 2), 16), + b: parseInt(color.substr(5, 2), 16) + }; + + return 'rgb(' + values.r + ', ' + values.g + ', ' + values.b + ')'; +} + +/** + * Returns an object with the type and values of a color. + * + * Note: Does not support rgb % values. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {{type: string, values: number[]}} A MUI color object + */ +function decomposeColor(color) { + if (color.charAt(0) === '#') { + return decomposeColor(convertHexToRGB(color)); + } + + var marker = color.indexOf('('); + var type = color.substring(0, marker); + var values = color.substring(marker + 1, color.length - 1).split(','); + values = values.map(function (value) { + return parseFloat(value); + }); + + return { type: type, values: values }; +} + +/** + * Calculates the contrast ratio between two colors. + * + * Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef + * + * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {number} A contrast ratio value in the range 0 - 21 with 2 digit precision. + */ +function getContrastRatio(foreground, background) { + var lumA = getLuminance(foreground); + var lumB = getLuminance(background); + var contrastRatio = (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05); + + return Number(contrastRatio.toFixed(2)); // Truncate at two digits +} + +/** + * The relative brightness of any point in a color space, + * normalized to 0 for darkest black and 1 for lightest white. + * + * Formula: https://www.w3.org/WAI/GL/wiki/Relative_luminance + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {number} The relative brightness of the color in the range 0 - 1 + */ +function getLuminance(color) { + color = decomposeColor(color); + + if (color.type.indexOf('rgb') > -1) { + var rgb = color.values.map(function (val) { + val /= 255; // normalized + return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4); + }); + return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3)); // Truncate at 3 digits + } else if (color.type.indexOf('hsl') > -1) { + return color.values[2] / 100; + } +} + +/** + * Darken or lighten a colour, depending on its luminance. + * Light colors are darkened, dark colors are lightened. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient=0.15 - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function emphasize(color) { + var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15; + + return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient); +} + +/** + * Set the absolute transparency of a color. + * Any existing alpha values are overwritten. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} value - value to set the alpha channel to in the range 0 -1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function fade(color, value) { + color = decomposeColor(color); + value = clamp(value, 0, 1); + + if (color.type === 'rgb' || color.type === 'hsl') { + color.type += 'a'; + } + color.values[3] = value; + + return convertColorToString(color); +} + +/** + * Darkens a color. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function darken(color, coefficient) { + color = decomposeColor(color); + coefficient = clamp(coefficient, 0, 1); + + if (color.type.indexOf('hsl') > -1) { + color.values[2] *= 1 - coefficient; + } else if (color.type.indexOf('rgb') > -1) { + for (var i = 0; i < 3; i++) { + color.values[i] *= 1 - coefficient; + } + } + return convertColorToString(color); +} + +/** + * Lightens a color. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function lighten(color, coefficient) { + color = decomposeColor(color); + coefficient = clamp(coefficient, 0, 1); + + if (color.type.indexOf('hsl') > -1) { + color.values[2] += (100 - color.values[2]) * coefficient; + } else if (color.type.indexOf('rgb') > -1) { + for (var i = 0; i < 3; i++) { + color.values[i] += (255 - color.values[i]) * coefficient; + } + } + + return convertColorToString(color); +} + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var red50 = exports.red50 = '#ffebee'; +var red100 = exports.red100 = '#ffcdd2'; +var red200 = exports.red200 = '#ef9a9a'; +var red300 = exports.red300 = '#e57373'; +var red400 = exports.red400 = '#ef5350'; +var red500 = exports.red500 = '#f44336'; +var red600 = exports.red600 = '#e53935'; +var red700 = exports.red700 = '#d32f2f'; +var red800 = exports.red800 = '#c62828'; +var red900 = exports.red900 = '#b71c1c'; +var redA100 = exports.redA100 = '#ff8a80'; +var redA200 = exports.redA200 = '#ff5252'; +var redA400 = exports.redA400 = '#ff1744'; +var redA700 = exports.redA700 = '#d50000'; + +var pink50 = exports.pink50 = '#fce4ec'; +var pink100 = exports.pink100 = '#f8bbd0'; +var pink200 = exports.pink200 = '#f48fb1'; +var pink300 = exports.pink300 = '#f06292'; +var pink400 = exports.pink400 = '#ec407a'; +var pink500 = exports.pink500 = '#e91e63'; +var pink600 = exports.pink600 = '#d81b60'; +var pink700 = exports.pink700 = '#c2185b'; +var pink800 = exports.pink800 = '#ad1457'; +var pink900 = exports.pink900 = '#880e4f'; +var pinkA100 = exports.pinkA100 = '#ff80ab'; +var pinkA200 = exports.pinkA200 = '#ff4081'; +var pinkA400 = exports.pinkA400 = '#f50057'; +var pinkA700 = exports.pinkA700 = '#c51162'; + +var purple50 = exports.purple50 = '#f3e5f5'; +var purple100 = exports.purple100 = '#e1bee7'; +var purple200 = exports.purple200 = '#ce93d8'; +var purple300 = exports.purple300 = '#ba68c8'; +var purple400 = exports.purple400 = '#ab47bc'; +var purple500 = exports.purple500 = '#9c27b0'; +var purple600 = exports.purple600 = '#8e24aa'; +var purple700 = exports.purple700 = '#7b1fa2'; +var purple800 = exports.purple800 = '#6a1b9a'; +var purple900 = exports.purple900 = '#4a148c'; +var purpleA100 = exports.purpleA100 = '#ea80fc'; +var purpleA200 = exports.purpleA200 = '#e040fb'; +var purpleA400 = exports.purpleA400 = '#d500f9'; +var purpleA700 = exports.purpleA700 = '#aa00ff'; + +var deepPurple50 = exports.deepPurple50 = '#ede7f6'; +var deepPurple100 = exports.deepPurple100 = '#d1c4e9'; +var deepPurple200 = exports.deepPurple200 = '#b39ddb'; +var deepPurple300 = exports.deepPurple300 = '#9575cd'; +var deepPurple400 = exports.deepPurple400 = '#7e57c2'; +var deepPurple500 = exports.deepPurple500 = '#673ab7'; +var deepPurple600 = exports.deepPurple600 = '#5e35b1'; +var deepPurple700 = exports.deepPurple700 = '#512da8'; +var deepPurple800 = exports.deepPurple800 = '#4527a0'; +var deepPurple900 = exports.deepPurple900 = '#311b92'; +var deepPurpleA100 = exports.deepPurpleA100 = '#b388ff'; +var deepPurpleA200 = exports.deepPurpleA200 = '#7c4dff'; +var deepPurpleA400 = exports.deepPurpleA400 = '#651fff'; +var deepPurpleA700 = exports.deepPurpleA700 = '#6200ea'; + +var indigo50 = exports.indigo50 = '#e8eaf6'; +var indigo100 = exports.indigo100 = '#c5cae9'; +var indigo200 = exports.indigo200 = '#9fa8da'; +var indigo300 = exports.indigo300 = '#7986cb'; +var indigo400 = exports.indigo400 = '#5c6bc0'; +var indigo500 = exports.indigo500 = '#3f51b5'; +var indigo600 = exports.indigo600 = '#3949ab'; +var indigo700 = exports.indigo700 = '#303f9f'; +var indigo800 = exports.indigo800 = '#283593'; +var indigo900 = exports.indigo900 = '#1a237e'; +var indigoA100 = exports.indigoA100 = '#8c9eff'; +var indigoA200 = exports.indigoA200 = '#536dfe'; +var indigoA400 = exports.indigoA400 = '#3d5afe'; +var indigoA700 = exports.indigoA700 = '#304ffe'; + +var blue50 = exports.blue50 = '#e3f2fd'; +var blue100 = exports.blue100 = '#bbdefb'; +var blue200 = exports.blue200 = '#90caf9'; +var blue300 = exports.blue300 = '#64b5f6'; +var blue400 = exports.blue400 = '#42a5f5'; +var blue500 = exports.blue500 = '#2196f3'; +var blue600 = exports.blue600 = '#1e88e5'; +var blue700 = exports.blue700 = '#1976d2'; +var blue800 = exports.blue800 = '#1565c0'; +var blue900 = exports.blue900 = '#0d47a1'; +var blueA100 = exports.blueA100 = '#82b1ff'; +var blueA200 = exports.blueA200 = '#448aff'; +var blueA400 = exports.blueA400 = '#2979ff'; +var blueA700 = exports.blueA700 = '#2962ff'; + +var lightBlue50 = exports.lightBlue50 = '#e1f5fe'; +var lightBlue100 = exports.lightBlue100 = '#b3e5fc'; +var lightBlue200 = exports.lightBlue200 = '#81d4fa'; +var lightBlue300 = exports.lightBlue300 = '#4fc3f7'; +var lightBlue400 = exports.lightBlue400 = '#29b6f6'; +var lightBlue500 = exports.lightBlue500 = '#03a9f4'; +var lightBlue600 = exports.lightBlue600 = '#039be5'; +var lightBlue700 = exports.lightBlue700 = '#0288d1'; +var lightBlue800 = exports.lightBlue800 = '#0277bd'; +var lightBlue900 = exports.lightBlue900 = '#01579b'; +var lightBlueA100 = exports.lightBlueA100 = '#80d8ff'; +var lightBlueA200 = exports.lightBlueA200 = '#40c4ff'; +var lightBlueA400 = exports.lightBlueA400 = '#00b0ff'; +var lightBlueA700 = exports.lightBlueA700 = '#0091ea'; + +var cyan50 = exports.cyan50 = '#e0f7fa'; +var cyan100 = exports.cyan100 = '#b2ebf2'; +var cyan200 = exports.cyan200 = '#80deea'; +var cyan300 = exports.cyan300 = '#4dd0e1'; +var cyan400 = exports.cyan400 = '#26c6da'; +var cyan500 = exports.cyan500 = '#00bcd4'; +var cyan600 = exports.cyan600 = '#00acc1'; +var cyan700 = exports.cyan700 = '#0097a7'; +var cyan800 = exports.cyan800 = '#00838f'; +var cyan900 = exports.cyan900 = '#006064'; +var cyanA100 = exports.cyanA100 = '#84ffff'; +var cyanA200 = exports.cyanA200 = '#18ffff'; +var cyanA400 = exports.cyanA400 = '#00e5ff'; +var cyanA700 = exports.cyanA700 = '#00b8d4'; + +var teal50 = exports.teal50 = '#e0f2f1'; +var teal100 = exports.teal100 = '#b2dfdb'; +var teal200 = exports.teal200 = '#80cbc4'; +var teal300 = exports.teal300 = '#4db6ac'; +var teal400 = exports.teal400 = '#26a69a'; +var teal500 = exports.teal500 = '#009688'; +var teal600 = exports.teal600 = '#00897b'; +var teal700 = exports.teal700 = '#00796b'; +var teal800 = exports.teal800 = '#00695c'; +var teal900 = exports.teal900 = '#004d40'; +var tealA100 = exports.tealA100 = '#a7ffeb'; +var tealA200 = exports.tealA200 = '#64ffda'; +var tealA400 = exports.tealA400 = '#1de9b6'; +var tealA700 = exports.tealA700 = '#00bfa5'; + +var green50 = exports.green50 = '#e8f5e9'; +var green100 = exports.green100 = '#c8e6c9'; +var green200 = exports.green200 = '#a5d6a7'; +var green300 = exports.green300 = '#81c784'; +var green400 = exports.green400 = '#66bb6a'; +var green500 = exports.green500 = '#4caf50'; +var green600 = exports.green600 = '#43a047'; +var green700 = exports.green700 = '#388e3c'; +var green800 = exports.green800 = '#2e7d32'; +var green900 = exports.green900 = '#1b5e20'; +var greenA100 = exports.greenA100 = '#b9f6ca'; +var greenA200 = exports.greenA200 = '#69f0ae'; +var greenA400 = exports.greenA400 = '#00e676'; +var greenA700 = exports.greenA700 = '#00c853'; + +var lightGreen50 = exports.lightGreen50 = '#f1f8e9'; +var lightGreen100 = exports.lightGreen100 = '#dcedc8'; +var lightGreen200 = exports.lightGreen200 = '#c5e1a5'; +var lightGreen300 = exports.lightGreen300 = '#aed581'; +var lightGreen400 = exports.lightGreen400 = '#9ccc65'; +var lightGreen500 = exports.lightGreen500 = '#8bc34a'; +var lightGreen600 = exports.lightGreen600 = '#7cb342'; +var lightGreen700 = exports.lightGreen700 = '#689f38'; +var lightGreen800 = exports.lightGreen800 = '#558b2f'; +var lightGreen900 = exports.lightGreen900 = '#33691e'; +var lightGreenA100 = exports.lightGreenA100 = '#ccff90'; +var lightGreenA200 = exports.lightGreenA200 = '#b2ff59'; +var lightGreenA400 = exports.lightGreenA400 = '#76ff03'; +var lightGreenA700 = exports.lightGreenA700 = '#64dd17'; + +var lime50 = exports.lime50 = '#f9fbe7'; +var lime100 = exports.lime100 = '#f0f4c3'; +var lime200 = exports.lime200 = '#e6ee9c'; +var lime300 = exports.lime300 = '#dce775'; +var lime400 = exports.lime400 = '#d4e157'; +var lime500 = exports.lime500 = '#cddc39'; +var lime600 = exports.lime600 = '#c0ca33'; +var lime700 = exports.lime700 = '#afb42b'; +var lime800 = exports.lime800 = '#9e9d24'; +var lime900 = exports.lime900 = '#827717'; +var limeA100 = exports.limeA100 = '#f4ff81'; +var limeA200 = exports.limeA200 = '#eeff41'; +var limeA400 = exports.limeA400 = '#c6ff00'; +var limeA700 = exports.limeA700 = '#aeea00'; + +var yellow50 = exports.yellow50 = '#fffde7'; +var yellow100 = exports.yellow100 = '#fff9c4'; +var yellow200 = exports.yellow200 = '#fff59d'; +var yellow300 = exports.yellow300 = '#fff176'; +var yellow400 = exports.yellow400 = '#ffee58'; +var yellow500 = exports.yellow500 = '#ffeb3b'; +var yellow600 = exports.yellow600 = '#fdd835'; +var yellow700 = exports.yellow700 = '#fbc02d'; +var yellow800 = exports.yellow800 = '#f9a825'; +var yellow900 = exports.yellow900 = '#f57f17'; +var yellowA100 = exports.yellowA100 = '#ffff8d'; +var yellowA200 = exports.yellowA200 = '#ffff00'; +var yellowA400 = exports.yellowA400 = '#ffea00'; +var yellowA700 = exports.yellowA700 = '#ffd600'; + +var amber50 = exports.amber50 = '#fff8e1'; +var amber100 = exports.amber100 = '#ffecb3'; +var amber200 = exports.amber200 = '#ffe082'; +var amber300 = exports.amber300 = '#ffd54f'; +var amber400 = exports.amber400 = '#ffca28'; +var amber500 = exports.amber500 = '#ffc107'; +var amber600 = exports.amber600 = '#ffb300'; +var amber700 = exports.amber700 = '#ffa000'; +var amber800 = exports.amber800 = '#ff8f00'; +var amber900 = exports.amber900 = '#ff6f00'; +var amberA100 = exports.amberA100 = '#ffe57f'; +var amberA200 = exports.amberA200 = '#ffd740'; +var amberA400 = exports.amberA400 = '#ffc400'; +var amberA700 = exports.amberA700 = '#ffab00'; + +var orange50 = exports.orange50 = '#fff3e0'; +var orange100 = exports.orange100 = '#ffe0b2'; +var orange200 = exports.orange200 = '#ffcc80'; +var orange300 = exports.orange300 = '#ffb74d'; +var orange400 = exports.orange400 = '#ffa726'; +var orange500 = exports.orange500 = '#ff9800'; +var orange600 = exports.orange600 = '#fb8c00'; +var orange700 = exports.orange700 = '#f57c00'; +var orange800 = exports.orange800 = '#ef6c00'; +var orange900 = exports.orange900 = '#e65100'; +var orangeA100 = exports.orangeA100 = '#ffd180'; +var orangeA200 = exports.orangeA200 = '#ffab40'; +var orangeA400 = exports.orangeA400 = '#ff9100'; +var orangeA700 = exports.orangeA700 = '#ff6d00'; + +var deepOrange50 = exports.deepOrange50 = '#fbe9e7'; +var deepOrange100 = exports.deepOrange100 = '#ffccbc'; +var deepOrange200 = exports.deepOrange200 = '#ffab91'; +var deepOrange300 = exports.deepOrange300 = '#ff8a65'; +var deepOrange400 = exports.deepOrange400 = '#ff7043'; +var deepOrange500 = exports.deepOrange500 = '#ff5722'; +var deepOrange600 = exports.deepOrange600 = '#f4511e'; +var deepOrange700 = exports.deepOrange700 = '#e64a19'; +var deepOrange800 = exports.deepOrange800 = '#d84315'; +var deepOrange900 = exports.deepOrange900 = '#bf360c'; +var deepOrangeA100 = exports.deepOrangeA100 = '#ff9e80'; +var deepOrangeA200 = exports.deepOrangeA200 = '#ff6e40'; +var deepOrangeA400 = exports.deepOrangeA400 = '#ff3d00'; +var deepOrangeA700 = exports.deepOrangeA700 = '#dd2c00'; + +var brown50 = exports.brown50 = '#efebe9'; +var brown100 = exports.brown100 = '#d7ccc8'; +var brown200 = exports.brown200 = '#bcaaa4'; +var brown300 = exports.brown300 = '#a1887f'; +var brown400 = exports.brown400 = '#8d6e63'; +var brown500 = exports.brown500 = '#795548'; +var brown600 = exports.brown600 = '#6d4c41'; +var brown700 = exports.brown700 = '#5d4037'; +var brown800 = exports.brown800 = '#4e342e'; +var brown900 = exports.brown900 = '#3e2723'; + +var blueGrey50 = exports.blueGrey50 = '#eceff1'; +var blueGrey100 = exports.blueGrey100 = '#cfd8dc'; +var blueGrey200 = exports.blueGrey200 = '#b0bec5'; +var blueGrey300 = exports.blueGrey300 = '#90a4ae'; +var blueGrey400 = exports.blueGrey400 = '#78909c'; +var blueGrey500 = exports.blueGrey500 = '#607d8b'; +var blueGrey600 = exports.blueGrey600 = '#546e7a'; +var blueGrey700 = exports.blueGrey700 = '#455a64'; +var blueGrey800 = exports.blueGrey800 = '#37474f'; +var blueGrey900 = exports.blueGrey900 = '#263238'; + +var grey50 = exports.grey50 = '#fafafa'; +var grey100 = exports.grey100 = '#f5f5f5'; +var grey200 = exports.grey200 = '#eeeeee'; +var grey300 = exports.grey300 = '#e0e0e0'; +var grey400 = exports.grey400 = '#bdbdbd'; +var grey500 = exports.grey500 = '#9e9e9e'; +var grey600 = exports.grey600 = '#757575'; +var grey700 = exports.grey700 = '#616161'; +var grey800 = exports.grey800 = '#424242'; +var grey900 = exports.grey900 = '#212121'; + +var black = exports.black = '#000000'; +var white = exports.white = '#ffffff'; + +var transparent = exports.transparent = 'rgba(0, 0, 0, 0)'; +var fullBlack = exports.fullBlack = 'rgba(0, 0, 0, 1)'; +var darkBlack = exports.darkBlack = 'rgba(0, 0, 0, 0.87)'; +var lightBlack = exports.lightBlack = 'rgba(0, 0, 0, 0.54)'; +var minBlack = exports.minBlack = 'rgba(0, 0, 0, 0.26)'; +var faintBlack = exports.faintBlack = 'rgba(0, 0, 0, 0.12)'; +var fullWhite = exports.fullWhite = 'rgba(255, 255, 255, 1)'; +var darkWhite = exports.darkWhite = 'rgba(255, 255, 255, 0.87)'; +var lightWhite = exports.lightWhite = 'rgba(255, 255, 255, 0.54)'; + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _shallowEqual = __webpack_require__(87); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _shallowEqual2.default; + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _childUtils = __webpack_require__(127); + +var _events = __webpack_require__(196); + +var _events2 = _interopRequireDefault(_events); + +var _keycode = __webpack_require__(30); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _FocusRipple = __webpack_require__(197); + +var _FocusRipple2 = _interopRequireDefault(_FocusRipple); + +var _TouchRipple = __webpack_require__(314); + +var _TouchRipple2 = _interopRequireDefault(_TouchRipple); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styleInjected = false; +var listening = false; +var tabPressed = false; + +function injectStyle() { + if (!styleInjected) { + // Remove inner padding and border in Firefox 4+. + var style = document.createElement('style'); + style.innerHTML = '\n button::-moz-focus-inner,\n input::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n '; + + document.body.appendChild(style); + styleInjected = true; + } +} + +function listenForTabPresses() { + if (!listening) { + _events2.default.on(window, 'keydown', function (event) { + tabPressed = (0, _keycode2.default)(event) === 'tab'; + }); + listening = true; + } +} + +var EnhancedButton = function (_Component) { + (0, _inherits3.default)(EnhancedButton, _Component); + + function EnhancedButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, EnhancedButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedButton.__proto__ || (0, _getPrototypeOf2.default)(EnhancedButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + isKeyboardFocused: false + }, _this.handleKeyDown = function (event) { + if (!_this.props.disabled && !_this.props.disableKeyboardFocus) { + if ((0, _keycode2.default)(event) === 'enter' && _this.state.isKeyboardFocused) { + _this.handleTouchTap(event); + } + if ((0, _keycode2.default)(event) === 'esc' && _this.state.isKeyboardFocused) { + _this.removeKeyboardFocus(event); + } + } + _this.props.onKeyDown(event); + }, _this.handleKeyUp = function (event) { + if (!_this.props.disabled && !_this.props.disableKeyboardFocus) { + if ((0, _keycode2.default)(event) === 'space' && _this.state.isKeyboardFocused) { + _this.handleTouchTap(event); + } + } + _this.props.onKeyUp(event); + }, _this.handleBlur = function (event) { + _this.cancelFocusTimeout(); + _this.removeKeyboardFocus(event); + _this.props.onBlur(event); + }, _this.handleFocus = function (event) { + if (event) event.persist(); + if (!_this.props.disabled && !_this.props.disableKeyboardFocus) { + // setTimeout is needed because the focus event fires first + // Wait so that we can capture if this was a keyboard focus + // or touch focus + _this.focusTimeout = setTimeout(function () { + if (tabPressed) { + _this.setKeyboardFocus(event); + tabPressed = false; + } + }, 150); + + _this.props.onFocus(event); + } + }, _this.handleClick = function (event) { + if (!_this.props.disabled) { + tabPressed = false; + _this.props.onClick(event); + } + }, _this.handleTouchTap = function (event) { + _this.cancelFocusTimeout(); + if (!_this.props.disabled) { + tabPressed = false; + _this.removeKeyboardFocus(event); + _this.props.onTouchTap(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(EnhancedButton, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + disabled = _props.disabled, + disableKeyboardFocus = _props.disableKeyboardFocus, + keyboardFocused = _props.keyboardFocused; + + if (!disabled && keyboardFocused && !disableKeyboardFocus) { + this.setState({ isKeyboardFocused: true }); + } + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + injectStyle(); + listenForTabPresses(); + if (this.state.isKeyboardFocused) { + this.refs.enhancedButton.focus(); + this.props.onKeyboardFocus(null, true); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if ((nextProps.disabled || nextProps.disableKeyboardFocus) && this.state.isKeyboardFocused) { + this.setState({ isKeyboardFocused: false }); + if (nextProps.onKeyboardFocus) { + nextProps.onKeyboardFocus(null, false); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.focusTimeout); + } + }, { + key: 'isKeyboardFocused', + value: function isKeyboardFocused() { + return this.state.isKeyboardFocused; + } + }, { + key: 'removeKeyboardFocus', + value: function removeKeyboardFocus(event) { + if (this.state.isKeyboardFocused) { + this.setState({ isKeyboardFocused: false }); + this.props.onKeyboardFocus(event, false); + } + } + }, { + key: 'setKeyboardFocus', + value: function setKeyboardFocus(event) { + if (!this.state.isKeyboardFocused) { + this.setState({ isKeyboardFocused: true }); + this.props.onKeyboardFocus(event, true); + } + } + }, { + key: 'cancelFocusTimeout', + value: function cancelFocusTimeout() { + if (this.focusTimeout) { + clearTimeout(this.focusTimeout); + this.focusTimeout = null; + } + } + }, { + key: 'createButtonChildren', + value: function createButtonChildren() { + var _props2 = this.props, + centerRipple = _props2.centerRipple, + children = _props2.children, + disabled = _props2.disabled, + disableFocusRipple = _props2.disableFocusRipple, + disableKeyboardFocus = _props2.disableKeyboardFocus, + disableTouchRipple = _props2.disableTouchRipple, + focusRippleColor = _props2.focusRippleColor, + focusRippleOpacity = _props2.focusRippleOpacity, + touchRippleColor = _props2.touchRippleColor, + touchRippleOpacity = _props2.touchRippleOpacity; + var isKeyboardFocused = this.state.isKeyboardFocused; + + // Focus Ripple + + var focusRipple = isKeyboardFocused && !disabled && !disableFocusRipple && !disableKeyboardFocus ? _react2.default.createElement(_FocusRipple2.default, { + color: focusRippleColor, + opacity: focusRippleOpacity, + show: isKeyboardFocused + }) : undefined; + + // Touch Ripple + var touchRipple = !disabled && !disableTouchRipple ? _react2.default.createElement( + _TouchRipple2.default, + { + centerRipple: centerRipple, + color: touchRippleColor, + opacity: touchRippleOpacity + }, + children + ) : undefined; + + return (0, _childUtils.createChildFragment)({ + focusRipple: focusRipple, + touchRipple: touchRipple, + children: touchRipple ? undefined : children + }); + } + }, { + key: 'render', + value: function render() { + var _props3 = this.props, + centerRipple = _props3.centerRipple, + children = _props3.children, + containerElement = _props3.containerElement, + disabled = _props3.disabled, + disableFocusRipple = _props3.disableFocusRipple, + disableKeyboardFocus = _props3.disableKeyboardFocus, + disableTouchRipple = _props3.disableTouchRipple, + focusRippleColor = _props3.focusRippleColor, + focusRippleOpacity = _props3.focusRippleOpacity, + href = _props3.href, + keyboardFocused = _props3.keyboardFocused, + touchRippleColor = _props3.touchRippleColor, + touchRippleOpacity = _props3.touchRippleOpacity, + onBlur = _props3.onBlur, + onClick = _props3.onClick, + onFocus = _props3.onFocus, + onKeyUp = _props3.onKeyUp, + onKeyDown = _props3.onKeyDown, + onKeyboardFocus = _props3.onKeyboardFocus, + onTouchTap = _props3.onTouchTap, + style = _props3.style, + tabIndex = _props3.tabIndex, + type = _props3.type, + other = (0, _objectWithoutProperties3.default)(_props3, ['centerRipple', 'children', 'containerElement', 'disabled', 'disableFocusRipple', 'disableKeyboardFocus', 'disableTouchRipple', 'focusRippleColor', 'focusRippleOpacity', 'href', 'keyboardFocused', 'touchRippleColor', 'touchRippleOpacity', 'onBlur', 'onClick', 'onFocus', 'onKeyUp', 'onKeyDown', 'onKeyboardFocus', 'onTouchTap', 'style', 'tabIndex', 'type']); + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + enhancedButton = _context$muiTheme.enhancedButton; + + + var mergedStyles = (0, _simpleAssign2.default)({ + border: 10, + boxSizing: 'border-box', + display: 'inline-block', + fontFamily: this.context.muiTheme.baseTheme.fontFamily, + WebkitTapHighlightColor: enhancedButton.tapHighlightColor, // Remove mobile color flashing (deprecated) + cursor: disabled ? 'default' : 'pointer', + textDecoration: 'none', + margin: 0, + padding: 0, + outline: 'none', + fontSize: 'inherit', + fontWeight: 'inherit', + position: 'relative', // This is needed so that ripples do not bleed past border radius. + verticalAlign: href ? 'middle' : null + }, style); + + // Passing both background:none & backgroundColor can break due to object iteration order + if (!mergedStyles.backgroundColor && !mergedStyles.background) { + mergedStyles.background = 'none'; + } + + if (disabled && href) { + return _react2.default.createElement( + 'span', + (0, _extends3.default)({}, other, { + style: mergedStyles + }), + children + ); + } + + var buttonProps = (0, _extends3.default)({}, other, { + style: prepareStyles(mergedStyles), + ref: 'enhancedButton', + disabled: disabled, + href: href, + onBlur: this.handleBlur, + onClick: this.handleClick, + onFocus: this.handleFocus, + onKeyUp: this.handleKeyUp, + onKeyDown: this.handleKeyDown, + onTouchTap: this.handleTouchTap, + tabIndex: disabled || disableKeyboardFocus ? -1 : tabIndex + }); + + var buttonChildren = this.createButtonChildren(); + + if (_react2.default.isValidElement(containerElement)) { + return _react2.default.cloneElement(containerElement, buttonProps, buttonChildren); + } + + if (!href && containerElement === 'button') { + buttonProps.type = type; + } + + return _react2.default.createElement(href ? 'a' : containerElement, buttonProps, buttonChildren); + } + }]); + return EnhancedButton; +}(_react.Component); + +EnhancedButton.defaultProps = { + containerElement: 'button', + onBlur: function onBlur() {}, + onClick: function onClick() {}, + onFocus: function onFocus() {}, + onKeyDown: function onKeyDown() {}, + onKeyUp: function onKeyUp() {}, + onKeyboardFocus: function onKeyboardFocus() {}, + onTouchTap: function onTouchTap() {}, + tabIndex: 0, + type: 'button' +}; +EnhancedButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? EnhancedButton.propTypes = { + centerRipple: _react.PropTypes.bool, + children: _react.PropTypes.node, + containerElement: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.element]), + disableFocusRipple: _react.PropTypes.bool, + disableKeyboardFocus: _react.PropTypes.bool, + disableTouchRipple: _react.PropTypes.bool, + disabled: _react.PropTypes.bool, + focusRippleColor: _react.PropTypes.string, + focusRippleOpacity: _react.PropTypes.number, + href: _react.PropTypes.string, + keyboardFocused: _react.PropTypes.bool, + onBlur: _react.PropTypes.func, + onClick: _react.PropTypes.func, + onFocus: _react.PropTypes.func, + onKeyDown: _react.PropTypes.func, + onKeyUp: _react.PropTypes.func, + onKeyboardFocus: _react.PropTypes.func, + onTouchTap: _react.PropTypes.func, + style: _react.PropTypes.object, + tabIndex: _react.PropTypes.number, + touchRippleColor: _react.PropTypes.string, + touchRippleOpacity: _react.PropTypes.number, + type: _react.PropTypes.string +} : void 0; +exports.default = EnhancedButton; + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var mapError = function mapError(_ref) { + var errorProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'errorText'; + var _ref$meta = _ref.meta; + _ref$meta = _ref$meta === undefined ? {} : _ref$meta; + + var touched = _ref$meta.touched, + error = _ref$meta.error, + warning = _ref$meta.warning, + input = _ref.input, + props = _objectWithoutProperties(_ref, ['meta', 'input']); + + return touched && (error || warning) ? _extends({}, props, input, _defineProperty({}, errorProp, error || warning)) : _extends({}, input, props); +}; + +exports.default = mapError; + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(99); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(207); +var enumBugKeys = __webpack_require__(138); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var ReactBaseClasses = __webpack_require__(209); +var ReactChildren = __webpack_require__(342); +var ReactDOMFactories = __webpack_require__(347); +var ReactElement = __webpack_require__(66); +var ReactPropTypes = __webpack_require__(348); +var ReactVersion = __webpack_require__(351); + +var createReactClass = __webpack_require__(352); +var onlyChild = __webpack_require__(353); + +var createElement = ReactElement.createElement; +var createFactory = ReactElement.createFactory; +var cloneElement = ReactElement.cloneElement; + +if (false) { + var lowPriorityWarning = require('./lowPriorityWarning'); + var canDefineProperty = require('./canDefineProperty'); + var ReactElementValidator = require('./ReactElementValidator'); + var didWarnPropTypesDeprecated = false; + createElement = ReactElementValidator.createElement; + createFactory = ReactElementValidator.createFactory; + cloneElement = ReactElementValidator.cloneElement; +} + +var __spread = _assign; +var createMixin = function (mixin) { + return mixin; +}; + +if (false) { + var warnedForSpread = false; + var warnedForCreateMixin = false; + __spread = function () { + lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.'); + warnedForSpread = true; + return _assign.apply(null, arguments); + }; + + createMixin = function (mixin) { + lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.'); + warnedForCreateMixin = true; + return mixin; + }; +} + +var React = { + // Modern + + Children: { + map: ReactChildren.map, + forEach: ReactChildren.forEach, + count: ReactChildren.count, + toArray: ReactChildren.toArray, + only: onlyChild + }, + + Component: ReactBaseClasses.Component, + PureComponent: ReactBaseClasses.PureComponent, + + createElement: createElement, + cloneElement: cloneElement, + isValidElement: ReactElement.isValidElement, + + // Classic + + PropTypes: ReactPropTypes, + createClass: createReactClass, + createFactory: createFactory, + createMixin: createMixin, + + // This looks DOM specific but these are actually isomorphic helpers + // since they are just generating DOM strings. + DOM: ReactDOMFactories, + + version: ReactVersion, + + // Deprecated hook for JSX spread, don't use this for anything. + __spread: __spread +}; + +if (false) { + var warnedForCreateClass = false; + if (canDefineProperty) { + Object.defineProperty(React, 'PropTypes', { + get: function () { + lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs'); + didWarnPropTypesDeprecated = true; + return ReactPropTypes; + } + }); + + Object.defineProperty(React, 'createClass', { + get: function () { + lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class'); + warnedForCreateClass = true; + return createReactClass; + } + }); + } + + // React.DOM factories are deprecated. Wrap these methods so that + // invocations of the React.DOM namespace and alert users to switch + // to the `react-dom-factories` package. + React.DOM = {}; + var warnedForFactories = false; + Object.keys(ReactDOMFactories).forEach(function (factory) { + React.DOM[factory] = function () { + if (!warnedForFactories) { + lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory); + warnedForFactories = true; + } + return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments); + }; + }); +} + +module.exports = React; + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var ReactCurrentOwner = __webpack_require__(37); + +var warning = __webpack_require__(12); +var canDefineProperty = __webpack_require__(211); +var hasOwnProperty = Object.prototype.hasOwnProperty; + +var REACT_ELEMENT_TYPE = __webpack_require__(212); + +var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true +}; + +var specialPropKeyWarningShown, specialPropRefWarningShown; + +function hasValidRef(config) { + if (false) { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== undefined; +} + +function hasValidKey(config) { + if (false) { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== undefined; +} + +function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function () { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + false ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true + }); +} + +function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function () { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + false ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true + }); +} + +/** + * Factory method to create a new React element. This no longer adheres to + * the class pattern, so do not use new to call it. Also, no instanceof check + * will work. Instead test $$typeof field against Symbol.for('react.element') to check + * if something is a React Element. + * + * @param {*} type + * @param {*} key + * @param {string|object} ref + * @param {*} self A *temporary* helper to detect places where `this` is + * different from the `owner` when React.createElement is called, so that we + * can warn. We want to get rid of owner and replace string `ref`s with arrow + * functions, and as long as `this` and owner are the same, there will be no + * change in behavior. + * @param {*} source An annotation object (added by a transpiler or otherwise) + * indicating filename, line number, and/or other information. + * @param {*} owner + * @param {*} props + * @internal + */ +var ReactElement = function (type, key, ref, self, source, owner, props) { + var element = { + // This tag allow us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, + + // Record the component responsible for creating this element. + _owner: owner + }; + + if (false) { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; + + // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + if (canDefineProperty) { + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + // self and source are DEV only properties. + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self + }); + // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + } else { + element._store.validated = false; + element._self = self; + element._source = source; + } + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + + return element; +}; + +/** + * Create and return a new ReactElement of the given type. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement + */ +ReactElement.createElement = function (type, config, children) { + var propName; + + // Reserved names are extracted + var props = {}; + + var key = null; + var ref = null; + var self = null; + var source = null; + + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + if (hasValidKey(config)) { + key = '' + config.key; + } + + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; + // Remaining properties are added to a new props object + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + if (false) { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + + // Resolve default props + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + if (false) { + if (key || ref) { + if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { + var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + } + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); +}; + +/** + * Return a function that produces ReactElements of a given type. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory + */ +ReactElement.createFactory = function (type) { + var factory = ReactElement.createElement.bind(null, type); + // Expose the type on the factory and the prototype so that it can be + // easily accessed on elements. E.g. `.type === Foo`. + // This should not be named `constructor` since this may not be the function + // that created the element, and it may not even be a constructor. + // Legacy hook TODO: Warn if this is accessed + factory.type = type; + return factory; +}; + +ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + + return newElement; +}; + +/** + * Clone and return a new ReactElement using element as the starting point. + * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement + */ +ReactElement.cloneElement = function (element, config, children) { + var propName; + + // Original props are copied + var props = _assign({}, element.props); + + // Reserved names are extracted + var key = element.key; + var ref = element.ref; + // Self is preserved since the owner is preserved. + var self = element._self; + // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + var source = element._source; + + // Owner will be preserved, unless ref is overridden + var owner = element._owner; + + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + key = '' + config.key; + } + + // Remaining properties override existing props + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === undefined && defaultProps !== undefined) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + + return ReactElement(element.type, key, ref, self, source, owner, props); +}; + +/** + * Verifies the object is a ReactElement. + * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement + * @param {?object} object + * @return {boolean} True if `object` is a valid component. + * @final + */ +ReactElement.isValidElement = function (object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; +}; + +module.exports = ReactElement; + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(9); + +function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; +} + +var DOMPropertyInjection = { + /** + * Mapping from normalized, camelcased property names to a configuration that + * specifies how the associated DOM property should be accessed or rendered. + */ + MUST_USE_PROPERTY: 0x1, + HAS_BOOLEAN_VALUE: 0x4, + HAS_NUMERIC_VALUE: 0x8, + HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, + HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, + + /** + * Inject some specialized knowledge about the DOM. This takes a config object + * with the following properties: + * + * isCustomAttribute: function that given an attribute name will return true + * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* + * attributes where it's impossible to enumerate all of the possible + * attribute names, + * + * Properties: object mapping DOM property name to one of the + * DOMPropertyInjection constants or null. If your attribute isn't in here, + * it won't get written to the DOM. + * + * DOMAttributeNames: object mapping React attribute name to the DOM + * attribute name. Attribute names not specified use the **lowercase** + * normalized name. + * + * DOMAttributeNamespaces: object mapping React attribute name to the DOM + * attribute namespace URL. (Attribute names not specified use no namespace.) + * + * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. + * Property names not specified use the normalized name. + * + * DOMMutationMethods: Properties that require special mutation methods. If + * `value` is undefined, the mutation method should unset the property. + * + * @param {object} domPropertyConfig the config as described above. + */ + injectDOMPropertyConfig: function (domPropertyConfig) { + var Injection = DOMPropertyInjection; + var Properties = domPropertyConfig.Properties || {}; + var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; + + if (domPropertyConfig.isCustomAttribute) { + DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); + } + + for (var propName in Properties) { + !!DOMProperty.properties.hasOwnProperty(propName) ? false ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0; + + var lowerCased = propName.toLowerCase(); + var propConfig = Properties[propName]; + + var propertyInfo = { + attributeName: lowerCased, + attributeNamespace: null, + propertyName: propName, + mutationMethod: null, + + mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), + hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), + hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), + hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), + hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) + }; + !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? false ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0; + + if (false) { + DOMProperty.getPossibleStandardName[lowerCased] = propName; + } + + if (DOMAttributeNames.hasOwnProperty(propName)) { + var attributeName = DOMAttributeNames[propName]; + propertyInfo.attributeName = attributeName; + if (false) { + DOMProperty.getPossibleStandardName[attributeName] = propName; + } + } + + if (DOMAttributeNamespaces.hasOwnProperty(propName)) { + propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; + } + + if (DOMPropertyNames.hasOwnProperty(propName)) { + propertyInfo.propertyName = DOMPropertyNames[propName]; + } + + if (DOMMutationMethods.hasOwnProperty(propName)) { + propertyInfo.mutationMethod = DOMMutationMethods[propName]; + } + + DOMProperty.properties[propName] = propertyInfo; + } + } +}; + +/* eslint-disable max-len */ +var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; +/* eslint-enable max-len */ + +/** + * DOMProperty exports lookup objects that can be used like functions: + * + * > DOMProperty.isValid['id'] + * true + * > DOMProperty.isValid['foobar'] + * undefined + * + * Although this may be confusing, it performs better in general. + * + * @see http://jsperf.com/key-exists + * @see http://jsperf.com/key-missing + */ +var DOMProperty = { + ID_ATTRIBUTE_NAME: 'data-reactid', + ROOT_ATTRIBUTE_NAME: 'data-reactroot', + + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', + + /** + * Map from property "standard name" to an object with info about how to set + * the property in the DOM. Each object contains: + * + * attributeName: + * Used when rendering markup or with `*Attribute()`. + * attributeNamespace + * propertyName: + * Used on DOM node instances. (This includes properties that mutate due to + * external factors.) + * mutationMethod: + * If non-null, used instead of the property or `setAttribute()` after + * initial render. + * mustUseProperty: + * Whether the property must be accessed and mutated as an object property. + * hasBooleanValue: + * Whether the property should be removed when set to a falsey value. + * hasNumericValue: + * Whether the property must be numeric or parse as a numeric and should be + * removed when set to a falsey value. + * hasPositiveNumericValue: + * Whether the property must be positive numeric or parse as a positive + * numeric and should be removed when set to a falsey value. + * hasOverloadedBooleanValue: + * Whether the property can be used as a flag as well as with a value. + * Removed when strictly equal to false; present without a value when + * strictly equal to true; present with a value otherwise. + */ + properties: {}, + + /** + * Mapping from lowercase property names to the properly cased version, used + * to warn in the case of missing properties. Available only in __DEV__. + * + * autofocus is predefined, because adding it to the property whitelist + * causes unintended side effects. + * + * @type {Object} + */ + getPossibleStandardName: false ? { autofocus: 'autoFocus' } : null, + + /** + * All of the isCustomAttribute() functions that have been injected. + */ + _isCustomAttributeFunctions: [], + + /** + * Checks whether a property name is a custom attribute. + * @method + */ + isCustomAttribute: function (attributeName) { + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; + if (isCustomAttributeFn(attributeName)) { + return true; + } + } + return false; + }, + + injection: DOMPropertyInjection +}; + +module.exports = DOMProperty; + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPluginHub = __webpack_require__(69); +var EventPluginUtils = __webpack_require__(103); + +var accumulateInto = __webpack_require__(217); +var forEachAccumulated = __webpack_require__(218); +var warning = __webpack_require__(12); + +var getListener = EventPluginHub.getListener; + +/** + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. + */ +function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); +} + +/** + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function + * here, allows us to not have to bind or create functions for each event. + * Mutating the event's members allows us to not have to create a wrapping + * "dispatch" object that pairs the event with the listener. + */ +function accumulateDirectionalDispatches(inst, phase, event) { + if (false) { + process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0; + } + var listener = listenerAtPhase(inst, event, phase); + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } +} + +/** + * Collect dispatches (must be entirely collected before dispatching - see unit + * tests). Lazily allocate the array to conserve memory. We must loop through + * each event and perform the traversal for each one. We cannot perform a + * single traversal for the entire collection of events because each event may + * have a different target. + */ +function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); + } +} + +/** + * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. + */ +function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + var targetInst = event._targetInst; + var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null; + EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event); + } +} + +/** + * Accumulates without regard to direction, does not look for phased + * registration names. Same as `accumulateDirectDispatchesSingle` but without + * requiring that the `dispatchMarker` be the same as the dispatched ID. + */ +function accumulateDispatches(inst, ignoredDirection, event) { + if (event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(inst, registrationName); + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } +} + +/** + * Accumulates dispatches on an `SyntheticEvent`, but only for the + * `dispatchMarker`. + * @param {SyntheticEvent} event + */ +function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event._targetInst, null, event); + } +} + +function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); +} + +function accumulateTwoPhaseDispatchesSkipTarget(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); +} + +function accumulateEnterLeaveDispatches(leave, enter, from, to) { + EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter); +} + +function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); +} + +/** + * A small set of propagation patterns, each of which will accept a small amount + * of information, and generate a set of "dispatch ready event objects" - which + * are sets of events that have already been annotated with a set of dispatched + * listener functions/ids. The API is designed this way to discourage these + * propagation strategies from actually executing the dispatches, since we + * always want to collect the entire set of dispatches before executing event a + * single one. + * + * @constructor EventPropagators + */ +var EventPropagators = { + accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, + accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, + accumulateDirectDispatches: accumulateDirectDispatches, + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches +}; + +module.exports = EventPropagators; + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var EventPluginRegistry = __webpack_require__(140); +var EventPluginUtils = __webpack_require__(103); +var ReactErrorUtils = __webpack_require__(141); + +var accumulateInto = __webpack_require__(217); +var forEachAccumulated = __webpack_require__(218); +var invariant = __webpack_require__(9); + +/** + * Internal store for event listeners + */ +var listenerBank = {}; + +/** + * Internal queue of events that have accumulated their dispatches and are + * waiting to have their dispatches executed. + */ +var eventQueue = null; + +/** + * Dispatches an event and releases it back into the pool, unless persistent. + * + * @param {?object} event Synthetic event to be dispatched. + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @private + */ +var executeDispatchesAndRelease = function (event, simulated) { + if (event) { + EventPluginUtils.executeDispatchesInOrder(event, simulated); + + if (!event.isPersistent()) { + event.constructor.release(event); + } + } +}; +var executeDispatchesAndReleaseSimulated = function (e) { + return executeDispatchesAndRelease(e, true); +}; +var executeDispatchesAndReleaseTopLevel = function (e) { + return executeDispatchesAndRelease(e, false); +}; + +var getDictionaryKey = function (inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 + return '.' + inst._rootNodeID; +}; + +function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; +} + +function shouldPreventMouseEvent(name, type, props) { + switch (name) { + case 'onClick': + case 'onClickCapture': + case 'onDoubleClick': + case 'onDoubleClickCapture': + case 'onMouseDown': + case 'onMouseDownCapture': + case 'onMouseMove': + case 'onMouseMoveCapture': + case 'onMouseUp': + case 'onMouseUpCapture': + return !!(props.disabled && isInteractive(type)); + default: + return false; + } +} + +/** + * This is a unified interface for event plugins to be installed and configured. + * + * Event plugins can implement the following properties: + * + * `extractEvents` {function(string, DOMEventTarget, string, object): *} + * Required. When a top-level event is fired, this method is expected to + * extract synthetic events that will in turn be queued and dispatched. + * + * `eventTypes` {object} + * Optional, plugins that fire events must publish a mapping of registration + * names that are used to register listeners. Values of this mapping must + * be objects that contain `registrationName` or `phasedRegistrationNames`. + * + * `executeDispatch` {function(object, function, string)} + * Optional, allows plugins to override how an event gets dispatched. By + * default, the listener is simply invoked. + * + * Each plugin that is injected into `EventsPluginHub` is immediately operable. + * + * @public + */ +var EventPluginHub = { + /** + * Methods for injecting dependencies. + */ + injection: { + /** + * @param {array} InjectedEventPluginOrder + * @public + */ + injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, + + /** + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + */ + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName + }, + + /** + * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent. + * + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {function} listener The callback to store. + */ + putListener: function (inst, registrationName, listener) { + !(typeof listener === 'function') ? false ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0; + + var key = getDictionaryKey(inst); + var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {}); + bankForRegistrationName[key] = listener; + + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.didPutListener) { + PluginModule.didPutListener(inst, registrationName, listener); + } + }, + + /** + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @return {?function} The stored callback. + */ + getListener: function (inst, registrationName) { + // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not + // live here; needs to be moved to a better place soon + var bankForRegistrationName = listenerBank[registrationName]; + if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) { + return null; + } + var key = getDictionaryKey(inst); + return bankForRegistrationName && bankForRegistrationName[key]; + }, + + /** + * Deletes a listener from the registration bank. + * + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + */ + deleteListener: function (inst, registrationName) { + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } + + var bankForRegistrationName = listenerBank[registrationName]; + // TODO: This should never be null -- when is it? + if (bankForRegistrationName) { + var key = getDictionaryKey(inst); + delete bankForRegistrationName[key]; + } + }, + + /** + * Deletes all listeners for the DOM element with the supplied ID. + * + * @param {object} inst The instance, which is the source of events. + */ + deleteAllListeners: function (inst) { + var key = getDictionaryKey(inst); + for (var registrationName in listenerBank) { + if (!listenerBank.hasOwnProperty(registrationName)) { + continue; + } + + if (!listenerBank[registrationName][key]) { + continue; + } + + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } + + delete listenerBank[registrationName][key]; + } + }, + + /** + * Allows registered plugins an opportunity to extract events from top-level + * native browser events. + * + * @return {*} An accumulation of synthetic events. + * @internal + */ + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events; + var plugins = EventPluginRegistry.plugins; + for (var i = 0; i < plugins.length; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + return events; + }, + + /** + * Enqueues a synthetic event that should be dispatched when + * `processEventQueue` is invoked. + * + * @param {*} events An accumulation of synthetic events. + * @internal + */ + enqueueEvents: function (events) { + if (events) { + eventQueue = accumulateInto(eventQueue, events); + } + }, + + /** + * Dispatches all synthetic events on the event queue. + * + * @internal + */ + processEventQueue: function (simulated) { + // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + var processingEventQueue = eventQueue; + eventQueue = null; + if (simulated) { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); + } else { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); + } + !!eventQueue ? false ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0; + // This would be a good time to rethrow if any of the event handlers threw. + ReactErrorUtils.rethrowCaughtError(); + }, + + /** + * These are needed for tests only. Do not use! + */ + __purge: function () { + listenerBank = {}; + }, + + __getListenerBank: function () { + return listenerBank; + } +}; + +module.exports = EventPluginHub; + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactRef = __webpack_require__(362); +var ReactInstrumentation = __webpack_require__(29); + +var warning = __webpack_require__(12); + +/** + * Helper to call ReactRef.attachRefs with this composite component, split out + * to avoid allocations in the transaction mount-ready queue. + */ +function attachRefs() { + ReactRef.attachRefs(this, this._currentElement); +} + +var ReactReconciler = { + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?object} the containing host component instance + * @param {?object} info about the host container + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots + { + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID); + } + } + var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID); + if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); + } + } + return markup; + }, + + /** + * Returns a value that can be passed to + * ReactComponentEnvironment.replaceNodeWithMarkup. + */ + getHostNode: function (internalInstance) { + return internalInstance.getHostNode(); + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function (internalInstance, safely) { + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID); + } + } + ReactRef.detachRefs(internalInstance, internalInstance._currentElement); + internalInstance.unmountComponent(safely); + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); + } + } + }, + + /** + * Update a component using a new element. + * + * @param {ReactComponent} internalInstance + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @internal + */ + receiveComponent: function (internalInstance, nextElement, transaction, context) { + var prevElement = internalInstance._currentElement; + + if (nextElement === prevElement && context === internalInstance._context) { + // Since elements are immutable after the owner is rendered, + // we can do a cheap identity compare here to determine if this is a + // superfluous reconcile. It's possible for state to be mutable but such + // change should trigger an update of the owner which would recreate + // the element. We explicitly check for the existence of an owner since + // it's possible for an element created outside a composite to be + // deeply mutated and reused. + + // TODO: Bailing out early is just a perf optimization right? + // TODO: Removing the return statement should affect correctness? + return; + } + + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); + } + } + + var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); + + if (refsChanged) { + ReactRef.detachRefs(internalInstance, prevElement); + } + + internalInstance.receiveComponent(nextElement, transaction, context); + + if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); + } + } + }, + + /** + * Flush any dirty changes in a component. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) { + if (internalInstance._updateBatchNumber !== updateBatchNumber) { + // The component's enqueued batch number should always be the current + // batch or the following one. + false ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0; + return; + } + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement); + } + } + internalInstance.performUpdateIfNecessary(transaction); + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); + } + } + } +}; + +module.exports = ReactReconciler; + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(38); + +var getEventTarget = __webpack_require__(142); + +/** + * @interface UIEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var UIEventInterface = { + view: function (event) { + if (event.view) { + return event.view; + } + + var target = getEventTarget(event); + if (target.window === target) { + // target is a window object + return target; + } + + var doc = target.ownerDocument; + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + if (doc) { + return doc.defaultView || doc.parentWindow; + } else { + return window; + } + }, + detail: function (event) { + return event.detail || 0; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); + +module.exports = SyntheticUIEvent; + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMNamespaces = __webpack_require__(147); +var setInnerHTML = __webpack_require__(106); + +var createMicrosoftUnsafeLocalFunction = __webpack_require__(148); +var setTextContent = __webpack_require__(224); + +var ELEMENT_NODE_TYPE = 1; +var DOCUMENT_FRAGMENT_NODE_TYPE = 11; + +/** + * In IE (8-11) and Edge, appending nodes with no children is dramatically + * faster than appending a full subtree, so we essentially queue up the + * .appendChild calls here and apply them so each node is added to its parent + * before any children are added. + * + * In other browsers, doing so is slower or neutral compared to the other order + * (in Firefox, twice as slow) so we only do this inversion in IE. + * + * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode. + */ +var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent); + +function insertTreeChildren(tree) { + if (!enableLazy) { + return; + } + var node = tree.node; + var children = tree.children; + if (children.length) { + for (var i = 0; i < children.length; i++) { + insertTreeBefore(node, children[i], null); + } + } else if (tree.html != null) { + setInnerHTML(node, tree.html); + } else if (tree.text != null) { + setTextContent(node, tree.text); + } +} + +var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) { + // DocumentFragments aren't actually part of the DOM after insertion so + // appending children won't update the DOM. We need to ensure the fragment + // is properly populated first, breaking out of our lazy approach for just + // this level. Also, some plugins (like Flash Player) will read + // nodes immediately upon insertion into the DOM, so + // must also be populated prior to insertion into the DOM. + if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) { + insertTreeChildren(tree); + parentNode.insertBefore(tree.node, referenceNode); + } else { + parentNode.insertBefore(tree.node, referenceNode); + insertTreeChildren(tree); + } +}); + +function replaceChildWithTree(oldNode, newTree) { + oldNode.parentNode.replaceChild(newTree.node, oldNode); + insertTreeChildren(newTree); +} + +function queueChild(parentTree, childTree) { + if (enableLazy) { + parentTree.children.push(childTree); + } else { + parentTree.node.appendChild(childTree.node); + } +} + +function queueHTML(tree, html) { + if (enableLazy) { + tree.html = html; + } else { + setInnerHTML(tree.node, html); + } +} + +function queueText(tree, text) { + if (enableLazy) { + tree.text = text; + } else { + setTextContent(tree.node, text); + } +} + +function toString() { + return this.node.nodeName; +} + +function DOMLazyTree(node) { + return { + node: node, + children: [], + html: null, + text: null, + toString: toString + }; +} + +DOMLazyTree.insertTreeBefore = insertTreeBefore; +DOMLazyTree.replaceChildWithTree = replaceChildWithTree; +DOMLazyTree.queueChild = queueChild; +DOMLazyTree.queueHTML = queueHTML; +DOMLazyTree.queueText = queueText; + +module.exports = DOMLazyTree; + +/***/ }), +/* 73 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export default */ +/* unused harmony export _resetWarned */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); + + +var warned = {}; + +function routerWarning(falseToWarn, message) { + // Only issue deprecation warnings once. + if (message.indexOf('deprecated') !== -1) { + if (warned[message]) { + return; + } + + warned[message] = true; + } + + message = '[react-router] ' + message; + + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + __WEBPACK_IMPORTED_MODULE_0_warning___default.a.apply(undefined, [falseToWarn, message].concat(args)); +} + +function _resetWarned() { + warned = {}; +} + +/***/ }), +/* 74 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export compilePattern */ +/* harmony export (immutable) */ __webpack_exports__["c"] = matchPattern; +/* harmony export (immutable) */ __webpack_exports__["b"] = getParamNames; +/* unused harmony export getParams */ +/* harmony export (immutable) */ __webpack_exports__["a"] = formatPattern; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); + + +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} + +function _compilePattern(pattern) { + var regexpSource = ''; + var paramNames = []; + var tokens = []; + + var match = void 0, + lastIndex = 0, + matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g; + while (match = matcher.exec(pattern)) { + if (match.index !== lastIndex) { + tokens.push(pattern.slice(lastIndex, match.index)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index)); + } + + if (match[1]) { + regexpSource += '([^/]+)'; + paramNames.push(match[1]); + } else if (match[0] === '**') { + regexpSource += '(.*)'; + paramNames.push('splat'); + } else if (match[0] === '*') { + regexpSource += '(.*?)'; + paramNames.push('splat'); + } else if (match[0] === '(') { + regexpSource += '(?:'; + } else if (match[0] === ')') { + regexpSource += ')?'; + } else if (match[0] === '\\(') { + regexpSource += '\\('; + } else if (match[0] === '\\)') { + regexpSource += '\\)'; + } + + tokens.push(match[0]); + + lastIndex = matcher.lastIndex; + } + + if (lastIndex !== pattern.length) { + tokens.push(pattern.slice(lastIndex, pattern.length)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length)); + } + + return { + pattern: pattern, + regexpSource: regexpSource, + paramNames: paramNames, + tokens: tokens + }; +} + +var CompiledPatternsCache = Object.create(null); + +function compilePattern(pattern) { + if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern); + + return CompiledPatternsCache[pattern]; +} + +/** + * Attempts to match a pattern on the given pathname. Patterns may use + * the following special characters: + * + * - :paramName Matches a URL segment up to the next /, ?, or #. The + * captured string is considered a "param" + * - () Wraps a segment of the URL that is optional + * - * Consumes (non-greedy) all characters up to the next + * character in the pattern, or to the end of the URL if + * there is none + * - ** Consumes (greedy) all characters up to the next character + * in the pattern, or to the end of the URL if there is none + * + * The function calls callback(error, matched) when finished. + * The return value is an object with the following properties: + * + * - remainingPathname + * - paramNames + * - paramValues + */ +function matchPattern(pattern, pathname) { + // Ensure pattern starts with leading slash for consistency with pathname. + if (pattern.charAt(0) !== '/') { + pattern = '/' + pattern; + } + + var _compilePattern2 = compilePattern(pattern), + regexpSource = _compilePattern2.regexpSource, + paramNames = _compilePattern2.paramNames, + tokens = _compilePattern2.tokens; + + if (pattern.charAt(pattern.length - 1) !== '/') { + regexpSource += '/?'; // Allow optional path separator at end. + } + + // Special-case patterns like '*' for catch-all routes. + if (tokens[tokens.length - 1] === '*') { + regexpSource += '$'; + } + + var match = pathname.match(new RegExp('^' + regexpSource, 'i')); + if (match == null) { + return null; + } + + var matchedPath = match[0]; + var remainingPathname = pathname.substr(matchedPath.length); + + if (remainingPathname) { + // Require that the match ends at a path separator, if we didn't match + // the full path, so any remaining pathname is a new path segment. + if (matchedPath.charAt(matchedPath.length - 1) !== '/') { + return null; + } + + // If there is a remaining pathname, treat the path separator as part of + // the remaining pathname for properly continuing the match. + remainingPathname = '/' + remainingPathname; + } + + return { + remainingPathname: remainingPathname, + paramNames: paramNames, + paramValues: match.slice(1).map(function (v) { + return v && decodeURIComponent(v); + }) + }; +} + +function getParamNames(pattern) { + return compilePattern(pattern).paramNames; +} + +function getParams(pattern, pathname) { + var match = matchPattern(pattern, pathname); + if (!match) { + return null; + } + + var paramNames = match.paramNames, + paramValues = match.paramValues; + + var params = {}; + + paramNames.forEach(function (paramName, index) { + params[paramName] = paramValues[index]; + }); + + return params; +} + +/** + * Returns a version of the given pattern with params interpolated. Throws + * if there is a dynamic segment of the pattern for which there is no param. + */ +function formatPattern(pattern, params) { + params = params || {}; + + var _compilePattern3 = compilePattern(pattern), + tokens = _compilePattern3.tokens; + + var parenCount = 0, + pathname = '', + splatIndex = 0, + parenHistory = []; + + var token = void 0, + paramName = void 0, + paramValue = void 0; + for (var i = 0, len = tokens.length; i < len; ++i) { + token = tokens[i]; + + if (token === '*' || token === '**') { + paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat; + + !(paramValue != null || parenCount > 0) ? false ? invariant(false, 'Missing splat #%s for path "%s"', splatIndex, pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + + if (paramValue != null) pathname += encodeURI(paramValue); + } else if (token === '(') { + parenHistory[parenCount] = ''; + parenCount += 1; + } else if (token === ')') { + var parenText = parenHistory.pop(); + parenCount -= 1; + + if (parenCount) parenHistory[parenCount - 1] += parenText;else pathname += parenText; + } else if (token === '\\(') { + pathname += '('; + } else if (token === '\\)') { + pathname += ')'; + } else if (token.charAt(0) === ':') { + paramName = token.substring(1); + paramValue = params[paramName]; + + !(paramValue != null || parenCount > 0) ? false ? invariant(false, 'Missing "%s" parameter for path "%s"', paramName, pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + + if (paramValue == null) { + if (parenCount) { + parenHistory[parenCount - 1] = ''; + + var curTokenIdx = tokens.indexOf(token); + var tokensSubset = tokens.slice(curTokenIdx, tokens.length); + var nextParenIdx = -1; + + for (var _i = 0; _i < tokensSubset.length; _i++) { + if (tokensSubset[_i] == ')') { + nextParenIdx = _i; + break; + } + } + + !(nextParenIdx > 0) ? false ? invariant(false, 'Path "%s" is missing end paren at segment "%s"', pattern, tokensSubset.join('')) : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + + // jump to ending paren + i = curTokenIdx + nextParenIdx - 1; + } + } else if (parenCount) parenHistory[parenCount - 1] += encodeURIComponent(paramValue);else pathname += encodeURIComponent(paramValue); + } else { + if (parenCount) parenHistory[parenCount - 1] += token;else pathname += token; + } + } + + !(parenCount <= 0) ? false ? invariant(false, 'Path "%s" is missing end paren', pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + + return pathname.replace(/\/+/g, '/'); +} + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.locationsAreEqual = exports.statesAreEqual = exports.createLocation = exports.createQuery = undefined; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _invariant = __webpack_require__(20); + +var _invariant2 = _interopRequireDefault(_invariant); + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +var _PathUtils = __webpack_require__(46); + +var _Actions = __webpack_require__(109); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createQuery = exports.createQuery = function createQuery(props) { + return _extends(Object.create(null), props); +}; + +var createLocation = exports.createLocation = function createLocation() { + var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/'; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Actions.POP; + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input; + + false ? (0, _warning2.default)(!object.path, 'Location descriptor objects should have a `pathname`, not a `path`.') : void 0; + + var pathname = object.pathname || '/'; + var search = object.search || ''; + var hash = object.hash || ''; + var state = object.state; + + return { + pathname: pathname, + search: search, + hash: hash, + state: state, + action: action, + key: key + }; +}; + +var isDate = function isDate(object) { + return Object.prototype.toString.call(object) === '[object Date]'; +}; + +var statesAreEqual = exports.statesAreEqual = function statesAreEqual(a, b) { + if (a === b) return true; + + var typeofA = typeof a === 'undefined' ? 'undefined' : _typeof(a); + var typeofB = typeof b === 'undefined' ? 'undefined' : _typeof(b); + + if (typeofA !== typeofB) return false; + + !(typeofA !== 'function') ? false ? (0, _invariant2.default)(false, 'You must not store functions in location state') : (0, _invariant2.default)(false) : void 0; + + // Not the same object, but same type. + if (typeofA === 'object') { + !!(isDate(a) && isDate(b)) ? false ? (0, _invariant2.default)(false, 'You must not store Date objects in location state') : (0, _invariant2.default)(false) : void 0; + + if (!Array.isArray(a)) { + var keysofA = Object.keys(a); + var keysofB = Object.keys(b); + return keysofA.length === keysofB.length && keysofA.every(function (key) { + return statesAreEqual(a[key], b[key]); + }); + } + + return Array.isArray(b) && a.length === b.length && a.every(function (item, index) { + return statesAreEqual(item, b[index]); + }); + } + + // All other serializable types (string, number, boolean) + // should be strict equal. + return false; +}; + +var locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) { + return a.key === b.key && + // a.action === b.action && // Different action !== location change. + a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && statesAreEqual(a.state, b.state); +}; + +/***/ }), +/* 76 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(455); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(456); + + + + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? Object(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */])(value) + : Object(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseGetTag); + + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var CHANGE_MENU = exports.CHANGE_MENU = 'CHANGE_MENU'; +var UPDATE_SETTINGS = exports.UPDATE_SETTINGS = 'UPDATE_SETTINGS'; +var NOTIFICATION_ADD = exports.NOTIFICATION_ADD = 'NOTIFICATION_ADD'; + +/***/ }), +/* 78 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(724), __esModule: true }; + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getTheme = getTheme; + +var _getMuiTheme = __webpack_require__(125); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + +var _colors = __webpack_require__(57); + +var _styles = __webpack_require__(758); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + paper: { + margin: _styles.spacing.desktopGutter, + padding: _styles.spacing.desktopGutter + }, + container: { + display: 'flex', + flexFlow: 'column', + alignItems: 'center', + minHeight: '100%', + backgroundColor: _colors.grey50 + }, + content: { + maxWidth: 1200, + margin: '0 auto', + zIndex: 101 + }, + tabs: { + marginLeft: -24, + marginRight: -24 + }, + appBar: { + flex: 'none', + display: 'block', + flexWrap: 'wrap', + zIndex: 100, + height: 64 + }, + logo: { + fontSize: 16, + color: _styles.typography.textFullWhite, + lineHeight: _styles.spacing.desktopKeylineIncrement + 'px', + fontWeight: _styles.typography.fontWeightLight, + backgroundColor: 'rgb(72, 72, 72)', + marginBottom: 8, + height: 64, + textAlign: 'center' + }, + fields: { + text: { + width: '100%' + } + }, + colors: { + main: 'rgb(72, 72, 72)', + drawer: 'rgb(250, 250, 250)', + tabs: 'rgb(137, 189, 191)' + }, + theme: { + palette: { + primary1Color: 'rgb(72, 72, 72)', + primary2Color: 'rgb(72, 72, 72)' + }, + drawer: { + color: 'rgb(250, 250, 250)' + } + } +}; + +function getTheme() { + return (0, _getMuiTheme2.default)(styles.theme); +} + +exports.default = styles; + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.dateTimeFormat = dateTimeFormat; +exports.addDays = addDays; +exports.addMonths = addMonths; +exports.addYears = addYears; +exports.cloneDate = cloneDate; +exports.cloneAsDate = cloneAsDate; +exports.getDaysInMonth = getDaysInMonth; +exports.getFirstDayOfMonth = getFirstDayOfMonth; +exports.getFirstDayOfWeek = getFirstDayOfWeek; +exports.getWeekArray = getWeekArray; +exports.localizedWeekday = localizedWeekday; +exports.formatIso = formatIso; +exports.isEqualDate = isEqualDate; +exports.isBeforeDate = isBeforeDate; +exports.isAfterDate = isAfterDate; +exports.isBetweenDates = isBetweenDates; +exports.monthDiff = monthDiff; +exports.yearDiff = yearDiff; + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var dayAbbreviation = ['S', 'M', 'T', 'W', 'T', 'F', 'S']; +var dayList = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var monthList = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; +var monthLongList = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; + +function dateTimeFormat(locale, options) { + false ? (0, _warning2.default)(locale === 'en-US', 'Material-UI: The ' + locale + ' locale is not supported by the built-in DateTimeFormat.\n Use the `DateTimeFormat` prop to supply an alternative implementation.') : void 0; + + this.format = function (date) { + if (options.month === 'short' && options.weekday === 'short' && options.day === '2-digit') { + return dayList[date.getDay()] + ', ' + monthList[date.getMonth()] + ' ' + date.getDate(); + } else if (options.year === 'numeric' && options.month === 'numeric' && options.day === 'numeric') { + return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); + } else if (options.year === 'numeric' && options.month === 'long') { + return monthLongList[date.getMonth()] + ' ' + date.getFullYear(); + } else if (options.weekday === 'narrow') { + return dayAbbreviation[date.getDay()]; + } else if (options.year === 'numeric') { + return date.getFullYear().toString(); + } else if (options.day === 'numeric') { + return date.getDate(); + } else { + false ? (0, _warning2.default)(false, 'Material-UI: Wrong usage of DateTimeFormat') : void 0; + } + }; +} + +function addDays(d, days) { + var newDate = cloneDate(d); + newDate.setDate(d.getDate() + days); + return newDate; +} + +function addMonths(d, months) { + var newDate = cloneDate(d); + newDate.setMonth(d.getMonth() + months); + return newDate; +} + +function addYears(d, years) { + var newDate = cloneDate(d); + newDate.setFullYear(d.getFullYear() + years); + return newDate; +} + +function cloneDate(d) { + return new Date(d.getTime()); +} + +function cloneAsDate(d) { + var clonedDate = cloneDate(d); + clonedDate.setHours(0, 0, 0, 0); + return clonedDate; +} + +function getDaysInMonth(d) { + var resultDate = getFirstDayOfMonth(d); + + resultDate.setMonth(resultDate.getMonth() + 1); + resultDate.setDate(resultDate.getDate() - 1); + + return resultDate.getDate(); +} + +function getFirstDayOfMonth(d) { + return new Date(d.getFullYear(), d.getMonth(), 1); +} + +function getFirstDayOfWeek() { + var now = new Date(); + return new Date(now.setDate(now.getDate() - now.getDay())); +} + +function getWeekArray(d, firstDayOfWeek) { + var dayArray = []; + var daysInMonth = getDaysInMonth(d); + var weekArray = []; + var week = []; + + for (var i = 1; i <= daysInMonth; i++) { + dayArray.push(new Date(d.getFullYear(), d.getMonth(), i)); + } + + var addWeek = function addWeek(week) { + var emptyDays = 7 - week.length; + for (var _i = 0; _i < emptyDays; ++_i) { + week[weekArray.length ? 'push' : 'unshift'](null); + } + weekArray.push(week); + }; + + dayArray.forEach(function (day) { + if (week.length > 0 && day.getDay() === firstDayOfWeek) { + addWeek(week); + week = []; + } + week.push(day); + if (dayArray.indexOf(day) === dayArray.length - 1) { + addWeek(week); + } + }); + + return weekArray; +} + +function localizedWeekday(DateTimeFormat, locale, day, firstDayOfWeek) { + var weekdayFormatter = new DateTimeFormat(locale, { weekday: 'narrow' }); + var firstDayDate = getFirstDayOfWeek(); + + return weekdayFormatter.format(addDays(firstDayDate, day + firstDayOfWeek)); +} + +// Convert date to ISO 8601 (YYYY-MM-DD) date string, accounting for current timezone +function formatIso(date) { + return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10); +} + +function isEqualDate(d1, d2) { + return d1 && d2 && d1.getFullYear() === d2.getFullYear() && d1.getMonth() === d2.getMonth() && d1.getDate() === d2.getDate(); +} + +function isBeforeDate(d1, d2) { + var date1 = cloneAsDate(d1); + var date2 = cloneAsDate(d2); + + return date1.getTime() < date2.getTime(); +} + +function isAfterDate(d1, d2) { + var date1 = cloneAsDate(d1); + var date2 = cloneAsDate(d2); + + return date1.getTime() > date2.getTime(); +} + +function isBetweenDates(dateToCheck, startDate, endDate) { + return !isBeforeDate(dateToCheck, startDate) && !isAfterDate(dateToCheck, endDate); +} + +function monthDiff(d1, d2) { + var m = void 0; + m = (d1.getFullYear() - d2.getFullYear()) * 12; + m += d1.getMonth(); + m -= d2.getMonth(); + return m; +} + +function yearDiff(d1, d2) { + return ~~(monthDiff(d1, d2) / 12); +} + +/***/ }), +/* 82 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(133); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + +/** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + +function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; +} + +module.exports = reactProdInvariant; + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * `ReactInstanceMap` maintains a mapping from a public facing stateful + * instance (key) and the internal representation (value). This allows public + * methods to accept the user facing instance as an argument and map them back + * to internal methods. + */ + +// TODO: Replace this with ES6: var ReactInstanceMap = new Map(); + +var ReactInstanceMap = { + /** + * This API should be called `delete` but we'd have to make sure to always + * transform these to strings for IE support. When this transform is fully + * supported we can rename it. + */ + remove: function (key) { + key._reactInternalInstance = undefined; + }, + + get: function (key) { + return key._reactInternalInstance; + }, + + has: function (key) { + return key._reactInternalInstance !== undefined; + }, + + set: function (key, value) { + key._reactInternalInstance = value; + } +}; + +module.exports = ReactInstanceMap; + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + * + */ + +/*eslint-disable no-self-compare */ + + + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ +function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + // Added the nonzero y check to make Flow happy, but it is redundant + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } +} + +/** + * Performs equality by iterating through keys on an object and returning false + * when any key has values which are not strictly equal between the arguments. + * Returns true when the values of all keys are strictly equal. + */ +function shallowEqual(objA, objB) { + if (is(objA, objB)) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + for (var i = 0; i < keysA.length; i++) { + if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; +} + +module.exports = shallowEqual; + +/***/ }), +/* 88 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["c"] = falsy; +/* unused harmony export history */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return component; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return components; }); +/* unused harmony export route */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return routes; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); + + +function falsy(props, propName, componentName) { + if (props[propName]) return new Error('<' + componentName + '> should not have a "' + propName + '" prop'); +} + +var history = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["shape"])({ + listen: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, + push: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, + replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, + go: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, + goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, + goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired +}); + +var component = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["oneOfType"])([__WEBPACK_IMPORTED_MODULE_0_prop_types__["func"], __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"]]); +var components = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["oneOfType"])([component, __WEBPACK_IMPORTED_MODULE_0_prop_types__["object"]]); +var route = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["oneOfType"])([__WEBPACK_IMPORTED_MODULE_0_prop_types__["object"], __WEBPACK_IMPORTED_MODULE_0_prop_types__["element"]]); +var routes = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["oneOfType"])([route, Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["arrayOf"])(route)]); + +/***/ }), +/* 89 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = formatName; +function formatName(context, name) { + var sectionPrefix = context._reduxForm.sectionPrefix; + + return !sectionPrefix ? name : sectionPrefix + "." + name; +} + +/***/ }), +/* 90 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/* harmony default export */ __webpack_exports__["a"] = (eq); + + +/***/ }), +/* 91 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(115); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || Object(__WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */])(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ __webpack_exports__["a"] = (toKey); + + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _iterator = __webpack_require__(664); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = __webpack_require__(672); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(666)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(295)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + set: function set(style, key, value) { + style[key] = value; + } +}; + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _IconButton = __webpack_require__(737); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _IconButton2.default; + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var MENU_OPTIONS = exports.MENU_OPTIONS = 'Options'; +var MENU_BILLING = exports.MENU_BILLING = 'Billing'; +var MENU_SIZES = exports.MENU_SIZES = 'Sizes'; + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _TextField = __webpack_require__(780); + +var _TextField2 = _interopRequireDefault(_TextField); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _TextField2.default; + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.addHours = addHours; +exports.addMinutes = addMinutes; +exports.addSeconds = addSeconds; +exports.formatTime = formatTime; +exports.rad2deg = rad2deg; +exports.getTouchEventOffsetValues = getTouchEventOffsetValues; +exports.isInner = isInner; +function addHours(d, hours) { + var newDate = clone(d); + newDate.setHours(d.getHours() + hours); + return newDate; +} + +function addMinutes(d, minutes) { + var newDate = clone(d); + newDate.setMinutes(d.getMinutes() + minutes); + return newDate; +} + +function addSeconds(d, seconds) { + var newDate = clone(d); + newDate.setSeconds(d.getMinutes() + seconds); + return newDate; +} + +function clone(d) { + return new Date(d.getTime()); +} + +/** + * @param date [Date] A Date object. + * @param format [String] One of 'ampm', '24hr', defaults to 'ampm'. + * @param pedantic [Boolean] Check time-picker/time-picker.jsx file. + * + * @return String A string representing the formatted time. + */ +function formatTime(date) { + var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'ampm'; + var pedantic = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + if (!date) return ''; + var hours = date.getHours(); + var mins = date.getMinutes().toString(); + + if (format === 'ampm') { + var isAM = hours < 12; + hours = hours % 12; + var additional = isAM ? ' am' : ' pm'; + hours = (hours || 12).toString(); + + if (mins.length < 2) mins = '0' + mins; + + if (pedantic) { + // Treat midday/midnight specially http://www.nist.gov/pml/div688/times.cfm + if (hours === '12' && mins === '00') { + return additional === ' pm' ? '12 noon' : '12 midnight'; + } + } + + return hours + (mins === '00' ? '' : ':' + mins) + additional; + } + + hours = hours.toString(); + + if (hours.length < 2) hours = '0' + hours; + if (mins.length < 2) mins = '0' + mins; + + return hours + ':' + mins; +} + +function rad2deg(rad) { + return rad * 57.29577951308232; +} + +function getTouchEventOffsetValues(event) { + var el = event.target; + var boundingRect = el.getBoundingClientRect(); + + return { + offsetX: event.clientX - boundingRect.left, + offsetY: event.clientY - boundingRect.top + }; +} + +function isInner(props) { + if (props.type !== 'hour') { + return false; + } + return props.value < 1 || props.value > 12; +} + +/***/ }), +/* 99 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 101 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var emptyObject = {}; + +if (false) { + Object.freeze(emptyObject); +} + +module.exports = emptyObject; + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var ReactErrorUtils = __webpack_require__(141); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(12); + +/** + * Injected dependencies: + */ + +/** + * - `ComponentTree`: [required] Module that can convert between React instances + * and actual node references. + */ +var ComponentTree; +var TreeTraversal; +var injection = { + injectComponentTree: function (Injected) { + ComponentTree = Injected; + if (false) { + process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0; + } + }, + injectTreeTraversal: function (Injected) { + TreeTraversal = Injected; + if (false) { + process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0; + } + } +}; + +function isEndish(topLevelType) { + return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel'; +} + +function isMoveish(topLevelType) { + return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove'; +} +function isStartish(topLevelType) { + return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart'; +} + +var validateEventDispatches; +if (false) { + validateEventDispatches = function (event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + + var listenersIsArr = Array.isArray(dispatchListeners); + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; + + var instancesIsArr = Array.isArray(dispatchInstances); + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; + + process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0; + }; +} + +/** + * Dispatch the event to the listener. + * @param {SyntheticEvent} event SyntheticEvent to handle + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @param {function} listener Application-level callback + * @param {*} inst Internal component instance + */ +function executeDispatch(event, simulated, listener, inst) { + var type = event.type || 'unknown-event'; + event.currentTarget = EventPluginUtils.getNodeFromInstance(inst); + if (simulated) { + ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event); + } else { + ReactErrorUtils.invokeGuardedCallback(type, listener, event); + } + event.currentTarget = null; +} + +/** + * Standard/simple iteration through an event's collected dispatches. + */ +function executeDispatchesInOrder(event, simulated) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + if (false) { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and Instances are two parallel arrays that are always in sync. + executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); + } + } else if (dispatchListeners) { + executeDispatch(event, simulated, dispatchListeners, dispatchInstances); + } + event._dispatchListeners = null; + event._dispatchInstances = null; +} + +/** + * Standard/simple iteration through an event's collected dispatches, but stops + * at the first dispatch execution returning true, and returns that id. + * + * @return {?string} id of the first dispatch execution who's listener returns + * true, or null if no listener returned true. + */ +function executeDispatchesInOrderStopAtTrueImpl(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + if (false) { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and Instances are two parallel arrays that are always in sync. + if (dispatchListeners[i](event, dispatchInstances[i])) { + return dispatchInstances[i]; + } + } + } else if (dispatchListeners) { + if (dispatchListeners(event, dispatchInstances)) { + return dispatchInstances; + } + } + return null; +} + +/** + * @see executeDispatchesInOrderStopAtTrueImpl + */ +function executeDispatchesInOrderStopAtTrue(event) { + var ret = executeDispatchesInOrderStopAtTrueImpl(event); + event._dispatchInstances = null; + event._dispatchListeners = null; + return ret; +} + +/** + * Execution of a "direct" dispatch - there must be at most one dispatch + * accumulated on the event or it is considered an error. It doesn't really make + * sense for an event with multiple dispatches (bubbled) to keep track of the + * return values at each dispatch execution, but it does tend to make sense when + * dealing with "direct" dispatches. + * + * @return {*} The return value of executing the single dispatch. + */ +function executeDirectDispatch(event) { + if (false) { + validateEventDispatches(event); + } + var dispatchListener = event._dispatchListeners; + var dispatchInstance = event._dispatchInstances; + !!Array.isArray(dispatchListener) ? false ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0; + event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null; + var res = dispatchListener ? dispatchListener(event) : null; + event.currentTarget = null; + event._dispatchListeners = null; + event._dispatchInstances = null; + return res; +} + +/** + * @param {SyntheticEvent} event + * @return {boolean} True iff number of dispatches accumulated is greater than 0. + */ +function hasDispatches(event) { + return !!event._dispatchListeners; +} + +/** + * General utilities that are useful in creating custom Event Plugins. + */ +var EventPluginUtils = { + isEndish: isEndish, + isMoveish: isMoveish, + isStartish: isStartish, + + executeDirectDispatch: executeDirectDispatch, + executeDispatchesInOrder: executeDispatchesInOrder, + executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, + hasDispatches: hasDispatches, + + getInstanceFromNode: function (node) { + return ComponentTree.getInstanceFromNode(node); + }, + getNodeFromInstance: function (node) { + return ComponentTree.getNodeFromInstance(node); + }, + isAncestor: function (a, b) { + return TreeTraversal.isAncestor(a, b); + }, + getLowestCommonAncestor: function (a, b) { + return TreeTraversal.getLowestCommonAncestor(a, b); + }, + getParentInstance: function (inst) { + return TreeTraversal.getParentInstance(inst); + }, + traverseTwoPhase: function (target, fn, arg) { + return TreeTraversal.traverseTwoPhase(target, fn, arg); + }, + traverseEnterLeave: function (from, to, fn, argFrom, argTo) { + return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo); + }, + + injection: injection +}; + +module.exports = EventPluginUtils; + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(9); + +var OBSERVED_ERROR = {}; + +/** + * `Transaction` creates a black box that is able to wrap any method such that + * certain invariants are maintained before and after the method is invoked + * (Even if an exception is thrown while invoking the wrapped method). Whoever + * instantiates a transaction can provide enforcers of the invariants at + * creation time. The `Transaction` class itself will supply one additional + * automatic invariant for you - the invariant that any transaction instance + * should not be run while it is already being run. You would typically create a + * single instance of a `Transaction` for reuse multiple times, that potentially + * is used to wrap several different methods. Wrappers are extremely simple - + * they only require implementing two methods. + * + *
+ *                       wrappers (injected at creation time)
+ *                                      +        +
+ *                                      |        |
+ *                    +-----------------|--------|--------------+
+ *                    |                 v        |              |
+ *                    |      +---------------+   |              |
+ *                    |   +--|    wrapper1   |---|----+         |
+ *                    |   |  +---------------+   v    |         |
+ *                    |   |          +-------------+  |         |
+ *                    |   |     +----|   wrapper2  |--------+   |
+ *                    |   |     |    +-------------+  |     |   |
+ *                    |   |     |                     |     |   |
+ *                    |   v     v                     v     v   | wrapper
+ *                    | +---+ +---+   +---------+   +---+ +---+ | invariants
+ * perform(anyMethod) | |   | |   |   |         |   |   | |   | | maintained
+ * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
+ *                    | |   | |   |   |         |   |   | |   | |
+ *                    | |   | |   |   |         |   |   | |   | |
+ *                    | |   | |   |   |         |   |   | |   | |
+ *                    | +---+ +---+   +---------+   +---+ +---+ |
+ *                    |  initialize                    close    |
+ *                    +-----------------------------------------+
+ * 
+ * + * Use cases: + * - Preserving the input selection ranges before/after reconciliation. + * Restoring selection even in the event of an unexpected error. + * - Deactivating events while rearranging the DOM, preventing blurs/focuses, + * while guaranteeing that afterwards, the event system is reactivated. + * - Flushing a queue of collected DOM mutations to the main UI thread after a + * reconciliation takes place in a worker thread. + * - Invoking any collected `componentDidUpdate` callbacks after rendering new + * content. + * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue + * to preserve the `scrollTop` (an automatic scroll aware DOM). + * - (Future use case): Layout calculations before and after DOM updates. + * + * Transactional plugin API: + * - A module that has an `initialize` method that returns any precomputation. + * - and a `close` method that accepts the precomputation. `close` is invoked + * when the wrapped process is completed, or has failed. + * + * @param {Array} transactionWrapper Wrapper modules + * that implement `initialize` and `close`. + * @return {Transaction} Single transaction for reuse in thread. + * + * @class Transaction + */ +var TransactionImpl = { + /** + * Sets up this instance so that it is prepared for collecting metrics. Does + * so such that this setup method may be used on an instance that is already + * initialized, in a way that does not consume additional memory upon reuse. + * That can be useful if you decide to make your subclass of this mixin a + * "PooledClass". + */ + reinitializeTransaction: function () { + this.transactionWrappers = this.getTransactionWrappers(); + if (this.wrapperInitData) { + this.wrapperInitData.length = 0; + } else { + this.wrapperInitData = []; + } + this._isInTransaction = false; + }, + + _isInTransaction: false, + + /** + * @abstract + * @return {Array} Array of transaction wrappers. + */ + getTransactionWrappers: null, + + isInTransaction: function () { + return !!this._isInTransaction; + }, + + /* eslint-disable space-before-function-paren */ + + /** + * Executes the function within a safety window. Use this for the top level + * methods that result in large amounts of computation/mutations that would + * need to be safety checked. The optional arguments helps prevent the need + * to bind in many cases. + * + * @param {function} method Member of scope to call. + * @param {Object} scope Scope to invoke from. + * @param {Object?=} a Argument to pass to the method. + * @param {Object?=} b Argument to pass to the method. + * @param {Object?=} c Argument to pass to the method. + * @param {Object?=} d Argument to pass to the method. + * @param {Object?=} e Argument to pass to the method. + * @param {Object?=} f Argument to pass to the method. + * + * @return {*} Return value from `method`. + */ + perform: function (method, scope, a, b, c, d, e, f) { + /* eslint-enable space-before-function-paren */ + !!this.isInTransaction() ? false ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0; + var errorThrown; + var ret; + try { + this._isInTransaction = true; + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // one of these calls threw. + errorThrown = true; + this.initializeAll(0); + ret = method.call(scope, a, b, c, d, e, f); + errorThrown = false; + } finally { + try { + if (errorThrown) { + // If `method` throws, prefer to show that stack trace over any thrown + // by invoking `closeAll`. + try { + this.closeAll(0); + } catch (err) {} + } else { + // Since `method` didn't throw, we don't want to silence the exception + // here. + this.closeAll(0); + } + } finally { + this._isInTransaction = false; + } + } + return ret; + }, + + initializeAll: function (startIndex) { + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + try { + // Catching errors makes debugging more difficult, so we start with the + // OBSERVED_ERROR state before overwriting it with the real return value + // of initialize -- if it's still set to OBSERVED_ERROR in the finally + // block, it means wrapper.initialize threw. + this.wrapperInitData[i] = OBSERVED_ERROR; + this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; + } finally { + if (this.wrapperInitData[i] === OBSERVED_ERROR) { + // The initializer for wrapper i threw an error; initialize the + // remaining wrappers but silence any exceptions from them to ensure + // that the first error is the one to bubble up. + try { + this.initializeAll(i + 1); + } catch (err) {} + } + } + } + }, + + /** + * Invokes each of `this.transactionWrappers.close[i]` functions, passing into + * them the respective return values of `this.transactionWrappers.init[i]` + * (`close`rs that correspond to initializers that failed will not be + * invoked). + */ + closeAll: function (startIndex) { + !this.isInTransaction() ? false ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0; + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + var initData = this.wrapperInitData[i]; + var errorThrown; + try { + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // wrapper.close threw. + errorThrown = true; + if (initData !== OBSERVED_ERROR && wrapper.close) { + wrapper.close.call(this, initData); + } + errorThrown = false; + } finally { + if (errorThrown) { + // The closer for wrapper i threw an error; close the remaining + // wrappers but silence any exceptions from them to ensure that the + // first error is the one to bubble up. + try { + this.closeAll(i + 1); + } catch (e) {} + } + } + } + this.wrapperInitData.length = 0; + } +}; + +module.exports = TransactionImpl; + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticUIEvent = __webpack_require__(71); +var ViewportMetrics = __webpack_require__(144); + +var getEventModifierState = __webpack_require__(145); + +/** + * @interface MouseEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var MouseEventInterface = { + screenX: null, + screenY: null, + clientX: null, + clientY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: function (event) { + // Webkit, Firefox, IE9+ + // which: 1 2 3 + // button: 0 1 2 (standard) + var button = event.button; + if ('which' in event) { + return button; + } + // IE<9 + // which: undefined + // button: 0 0 0 + // button: 1 4 2 (onmouseup) + return button === 2 ? 2 : button === 4 ? 1 : 0; + }, + buttons: null, + relatedTarget: function (event) { + return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement); + }, + // "Proprietary" Interface. + pageX: function (event) { + return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft; + }, + pageY: function (event) { + return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); + +module.exports = SyntheticMouseEvent; + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(21); +var DOMNamespaces = __webpack_require__(147); + +var WHITESPACE_TEST = /^[ \r\n\t\f]/; +var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; + +var createMicrosoftUnsafeLocalFunction = __webpack_require__(148); + +// SVG temp container for IE lacking innerHTML +var reusableSVGContainer; + +/** + * Set the innerHTML property of a node, ensuring that whitespace is preserved + * even in IE8. + * + * @param {DOMElement} node + * @param {string} html + * @internal + */ +var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { + // IE does not have innerHTML for SVG nodes, so instead we inject the + // new markup in a temp node and then move the child nodes across into + // the target node + if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) { + reusableSVGContainer = reusableSVGContainer || document.createElement('div'); + reusableSVGContainer.innerHTML = '' + html + ''; + var svgNode = reusableSVGContainer.firstChild; + while (svgNode.firstChild) { + node.appendChild(svgNode.firstChild); + } + } else { + node.innerHTML = html; + } +}); + +if (ExecutionEnvironment.canUseDOM) { + // IE8: When updating a just created node with innerHTML only leading + // whitespace is removed. When updating an existing node with innerHTML + // whitespace in root TextNodes is also collapsed. + // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html + + // Feature detection; only IE8 is known to behave improperly like this. + var testElement = document.createElement('div'); + testElement.innerHTML = ' '; + if (testElement.innerHTML === '') { + setInnerHTML = function (node, html) { + // Magic theory: IE8 supposedly differentiates between added and updated + // nodes when processing innerHTML, innerHTML on updated nodes suffers + // from worse whitespace behavior. Re-adding a node like this triggers + // the initial and more favorable whitespace behavior. + // TODO: What to do on a detached node? + if (node.parentNode) { + node.parentNode.replaceChild(node, node); + } + + // We also implement a workaround for non-visible tags disappearing into + // thin air on IE8, this only happens if there is no visible text + // in-front of the non-visible tags. Piggyback on the whitespace fix + // and simply check if any non-visible tags appear in the source. + if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) { + // Recover leading whitespace by temporarily prepending any character. + // \uFEFF has the potential advantage of being zero-width/invisible. + // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode + // in hopes that this is preserved even if "\uFEFF" is transformed to + // the actual Unicode character (by Babel, for example). + // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 + node.innerHTML = String.fromCharCode(0xfeff) + html; + + // deleteData leaves an empty `TextNode` which offsets the index of all + // children. Definitely want to avoid this. + var textNode = node.firstChild; + if (textNode.data.length === 1) { + node.removeChild(textNode); + } else { + textNode.deleteData(0, 1); + } + } else { + node.innerHTML = html; + } + }; + } + testElement = null; +} + +module.exports = setInnerHTML; + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * Based on the escape-html library, which is used under the MIT License below: + * + * Copyright (c) 2012-2013 TJ Holowaychuk + * Copyright (c) 2015 Andreas Lubbe + * Copyright (c) 2015 Tiancheng "Timothy" Gu + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * 'Software'), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + + + +// code copied and modified from escape-html +/** + * Module variables. + * @private + */ + +var matchHtmlRegExp = /["'&<>]/; + +/** + * Escape special characters in the given string of html. + * + * @param {string} string The string to escape for inserting into HTML + * @return {string} + * @public + */ + +function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index = 0; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + case 38: + // & + escape = '&'; + break; + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + break; + case 60: + // < + escape = '<'; + break; + case 62: + // > + escape = '>'; + break; + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; +} +// end code copied and modified from escape-html + +/** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ +function escapeTextContentForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + return escapeHtml(text); +} + +module.exports = escapeTextContentForBrowser; + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var EventPluginRegistry = __webpack_require__(140); +var ReactEventEmitterMixin = __webpack_require__(383); +var ViewportMetrics = __webpack_require__(144); + +var getVendorPrefixedEventName = __webpack_require__(384); +var isEventSupported = __webpack_require__(143); + +/** + * Summary of `ReactBrowserEventEmitter` event handling: + * + * - Top-level delegation is used to trap most native browser events. This + * may only occur in the main thread and is the responsibility of + * ReactEventListener, which is injected and can therefore support pluggable + * event sources. This is the only work that occurs in the main thread. + * + * - We normalize and de-duplicate events to account for browser quirks. This + * may be done in the worker thread. + * + * - Forward these native events (with the associated top-level type used to + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want + * to extract any synthetic events. + * + * - The `EventPluginHub` will then process each event by annotating them with + * "dispatches", a sequence of listeners and IDs that care about that event. + * + * - The `EventPluginHub` then dispatches the events. + * + * Overview of React and the event system: + * + * +------------+ . + * | DOM | . + * +------------+ . + * | . + * v . + * +------------+ . + * | ReactEvent | . + * | Listener | . + * +------------+ . +-----------+ + * | . +--------+|SimpleEvent| + * | . | |Plugin | + * +-----|------+ . v +-----------+ + * | | | . +--------------+ +------------+ + * | +-----------.--->|EventPluginHub| | Event | + * | | . | | +-----------+ | Propagators| + * | ReactEvent | . | | |TapEvent | |------------| + * | Emitter | . | |<---+|Plugin | |other plugin| + * | | . | | +-----------+ | utilities | + * | +-----------.--->| | +------------+ + * | | | . +--------------+ + * +-----|------+ . ^ +-----------+ + * | . | |Enter/Leave| + * + . +-------+|Plugin | + * +-------------+ . +-----------+ + * | application | . + * |-------------| . + * | | . + * | | . + * +-------------+ . + * . + * React Core . General Purpose Event Plugin System + */ + +var hasEventPageXY; +var alreadyListeningTo = {}; +var isMonitoringScrollValue = false; +var reactTopListenersCounter = 0; + +// For events like 'submit' which don't consistently bubble (which we trap at a +// lower node than `document`), binding at `document` would cause duplicate +// events so we don't include them here +var topEventMapping = { + topAbort: 'abort', + topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend', + topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration', + topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart', + topBlur: 'blur', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topChange: 'change', + topClick: 'click', + topCompositionEnd: 'compositionend', + topCompositionStart: 'compositionstart', + topCompositionUpdate: 'compositionupdate', + topContextMenu: 'contextmenu', + topCopy: 'copy', + topCut: 'cut', + topDoubleClick: 'dblclick', + topDrag: 'drag', + topDragEnd: 'dragend', + topDragEnter: 'dragenter', + topDragExit: 'dragexit', + topDragLeave: 'dragleave', + topDragOver: 'dragover', + topDragStart: 'dragstart', + topDrop: 'drop', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topFocus: 'focus', + topInput: 'input', + topKeyDown: 'keydown', + topKeyPress: 'keypress', + topKeyUp: 'keyup', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topMouseDown: 'mousedown', + topMouseMove: 'mousemove', + topMouseOut: 'mouseout', + topMouseOver: 'mouseover', + topMouseUp: 'mouseup', + topPaste: 'paste', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topScroll: 'scroll', + topSeeked: 'seeked', + topSeeking: 'seeking', + topSelectionChange: 'selectionchange', + topStalled: 'stalled', + topSuspend: 'suspend', + topTextInput: 'textInput', + topTimeUpdate: 'timeupdate', + topTouchCancel: 'touchcancel', + topTouchEnd: 'touchend', + topTouchMove: 'touchmove', + topTouchStart: 'touchstart', + topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend', + topVolumeChange: 'volumechange', + topWaiting: 'waiting', + topWheel: 'wheel' +}; + +/** + * To ensure no conflicts with other potential React instances on the page + */ +var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2); + +function getListeningForDocument(mountAt) { + // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` + // directly. + if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { + mountAt[topListenersIDKey] = reactTopListenersCounter++; + alreadyListeningTo[mountAt[topListenersIDKey]] = {}; + } + return alreadyListeningTo[mountAt[topListenersIDKey]]; +} + +/** + * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For + * example: + * + * EventPluginHub.putListener('myID', 'onClick', myFunction); + * + * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'. + * + * @internal + */ +var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { + /** + * Injectable event backend + */ + ReactEventListener: null, + + injection: { + /** + * @param {object} ReactEventListener + */ + injectReactEventListener: function (ReactEventListener) { + ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel); + ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; + } + }, + + /** + * Sets whether or not any created callbacks should be enabled. + * + * @param {boolean} enabled True if callbacks should be enabled. + */ + setEnabled: function (enabled) { + if (ReactBrowserEventEmitter.ReactEventListener) { + ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); + } + }, + + /** + * @return {boolean} True if callbacks are enabled. + */ + isEnabled: function () { + return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled()); + }, + + /** + * We listen for bubbled touch events on the document object. + * + * Firefox v8.01 (and possibly others) exhibited strange behavior when + * mounting `onmousemove` events at some node that was not the document + * element. The symptoms were that if your mouse is not moving over something + * contained within that mount point (for example on the background) the + * top-level listeners for `onmousemove` won't be called. However, if you + * register the `mousemove` on the document object, then it will of course + * catch all `mousemove`s. This along with iOS quirks, justifies restricting + * top-level listeners to the document object only, at least for these + * movement types of events and possibly all events. + * + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + * + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but + * they bubble to document. + * + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {object} contentDocumentHandle Document which owns the container + */ + listenTo: function (registrationName, contentDocumentHandle) { + var mountAt = contentDocumentHandle; + var isListening = getListeningForDocument(mountAt); + var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { + if (dependency === 'topWheel') { + if (isEventSupported('wheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt); + } else if (isEventSupported('mousewheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt); + } else { + // Firefox needs to capture a different mouse scroll event. + // @see http://www.quirksmode.org/dom/events/tests/scroll.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt); + } + } else if (dependency === 'topScroll') { + if (isEventSupported('scroll', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt); + } else { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); + } + } else if (dependency === 'topFocus' || dependency === 'topBlur') { + if (isEventSupported('focus', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt); + } else if (isEventSupported('focusin')) { + // IE has `focusin` and `focusout` events which bubble. + // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt); + } + + // to make sure blur and focus event listeners are only attached once + isListening.topBlur = true; + isListening.topFocus = true; + } else if (topEventMapping.hasOwnProperty(dependency)) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt); + } + + isListening[dependency] = true; + } + } + }, + + trapBubbledEvent: function (topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle); + }, + + trapCapturedEvent: function (topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle); + }, + + /** + * Protect against document.createEvent() returning null + * Some popup blocker extensions appear to do this: + * https://github.com/facebook/react/issues/6887 + */ + supportsEventPageXY: function () { + if (!document.createEvent) { + return false; + } + var ev = document.createEvent('MouseEvent'); + return ev != null && 'pageX' in ev; + }, + + /** + * Listens to window scroll and resize events. We cache scroll values so that + * application code can access them without triggering reflows. + * + * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when + * pageX/pageY isn't supported (legacy browsers). + * + * NOTE: Scroll events do not bubble. + * + * @see http://www.quirksmode.org/dom/events/scroll.html + */ + ensureScrollValueMonitoring: function () { + if (hasEventPageXY === undefined) { + hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY(); + } + if (!hasEventPageXY && !isMonitoringScrollValue) { + var refresh = ViewportMetrics.refreshScrollValues; + ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); + isMonitoringScrollValue = true; + } + } +}); + +module.exports = ReactBrowserEventEmitter; + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +/** + * Indicates that navigation was caused by a call to history.push. + */ +var PUSH = exports.PUSH = 'PUSH'; + +/** + * Indicates that navigation was caused by a call to history.replace. + */ +var REPLACE = exports.REPLACE = 'REPLACE'; + +/** + * Indicates that navigation was caused by some other action such + * as using a browser's back/forward buttons and/or manually manipulating + * the URL in a browser's location bar. This is the default. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate + * for more information. + */ +var POP = exports.POP = 'POP'; + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var addEventListener = exports.addEventListener = function addEventListener(node, event, listener) { + return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener); +}; + +var removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) { + return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener); +}; + +/** + * Returns true if the HTML5 history API is supported. Taken from Modernizr. + * + * https://github.com/Modernizr/Modernizr/blob/master/LICENSE + * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js + * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 + */ +var supportsHistory = exports.supportsHistory = function supportsHistory() { + var ua = window.navigator.userAgent; + + if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false; + + return window.history && 'pushState' in window.history; +}; + +/** + * Returns false if using go(n) with hash history causes a full page reload. + */ +var supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() { + return window.navigator.userAgent.indexOf('Firefox') === -1; +}; + +/** + * Returns true if browser fires popstate on hash change. + * IE10 and IE11 do not. + */ +var supportsPopstateOnHashchange = exports.supportsPopstateOnHashchange = function supportsPopstateOnHashchange() { + return window.navigator.userAgent.indexOf('Trident') === -1; +}; + +/** + * Returns true if a given popstate event is an extraneous WebKit event. + * Accounts for the fact that Chrome on iOS fires real popstate events + * containing undefined state when pressing the back button. + */ +var isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) { + return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; +}; + +/***/ }), +/* 111 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(252); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(460); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(461); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(462); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(258); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(257); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["b"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_4__compose__["a"]; }); + + + + + + + +/* +* This is a dummy function to check if the function name has been altered by minification. +* If the function has been minified and NODE_ENV !== 'production', warn the user. +*/ +function isCrushed() {} + +if (false) { + warning('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.'); +} + + + +/***/ }), +/* 112 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32); + + +/** Built-in value references. */ +var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; + +/* harmony default export */ __webpack_exports__["a"] = (Symbol); + + +/***/ }), +/* 113 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionTypes", function() { return actionTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actions", function() { return actions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmitErrors", function() { return clearSubmitErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actions__ = __webpack_require__(265); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__actionTypes__ = __webpack_require__(167); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultShouldAsyncValidate__ = __webpack_require__(266); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultShouldAsyncValidate", function() { return __WEBPACK_IMPORTED_MODULE_2__defaultShouldAsyncValidate__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultShouldValidate__ = __webpack_require__(267); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultShouldValidate", function() { return __WEBPACK_IMPORTED_MODULE_3__defaultShouldValidate__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Form__ = __webpack_require__(490); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return __WEBPACK_IMPORTED_MODULE_4__Form__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__FormSection__ = __webpack_require__(491); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FormSection", function() { return __WEBPACK_IMPORTED_MODULE_5__FormSection__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__SubmissionError__ = __webpack_require__(268); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SubmissionError", function() { return __WEBPACK_IMPORTED_MODULE_6__SubmissionError__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__propTypes__ = __webpack_require__(493); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fieldInputPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["b"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fieldMetaPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["c"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fieldPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["d"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["e"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Field__ = __webpack_require__(494); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Field", function() { return __WEBPACK_IMPORTED_MODULE_8__Field__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Fields__ = __webpack_require__(564); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Fields", function() { return __WEBPACK_IMPORTED_MODULE_9__Fields__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__FieldArray__ = __webpack_require__(567); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FieldArray", function() { return __WEBPACK_IMPORTED_MODULE_10__FieldArray__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__formValueSelector__ = __webpack_require__(585); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formValueSelector", function() { return __WEBPACK_IMPORTED_MODULE_11__formValueSelector__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__formValues__ = __webpack_require__(587); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formValues", function() { return __WEBPACK_IMPORTED_MODULE_12__formValues__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__getFormNames__ = __webpack_require__(589); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormNames", function() { return __WEBPACK_IMPORTED_MODULE_13__getFormNames__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__getFormValues__ = __webpack_require__(591); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormValues", function() { return __WEBPACK_IMPORTED_MODULE_14__getFormValues__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__getFormInitialValues__ = __webpack_require__(593); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormInitialValues", function() { return __WEBPACK_IMPORTED_MODULE_15__getFormInitialValues__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__getFormSyncErrors__ = __webpack_require__(595); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncErrors", function() { return __WEBPACK_IMPORTED_MODULE_16__getFormSyncErrors__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__getFormMeta__ = __webpack_require__(597); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormMeta", function() { return __WEBPACK_IMPORTED_MODULE_17__getFormMeta__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__getFormAsyncErrors__ = __webpack_require__(599); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormAsyncErrors", function() { return __WEBPACK_IMPORTED_MODULE_18__getFormAsyncErrors__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__getFormSyncWarnings__ = __webpack_require__(601); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncWarnings", function() { return __WEBPACK_IMPORTED_MODULE_19__getFormSyncWarnings__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__getFormSubmitErrors__ = __webpack_require__(603); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSubmitErrors", function() { return __WEBPACK_IMPORTED_MODULE_20__getFormSubmitErrors__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__isDirty__ = __webpack_require__(605); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isDirty", function() { return __WEBPACK_IMPORTED_MODULE_21__isDirty__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__isInvalid__ = __webpack_require__(607); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isInvalid", function() { return __WEBPACK_IMPORTED_MODULE_22__isInvalid__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__isPristine__ = __webpack_require__(610); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isPristine", function() { return __WEBPACK_IMPORTED_MODULE_23__isPristine__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__isValid__ = __webpack_require__(611); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isValid", function() { return __WEBPACK_IMPORTED_MODULE_24__isValid__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__isSubmitting__ = __webpack_require__(612); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isSubmitting", function() { return __WEBPACK_IMPORTED_MODULE_25__isSubmitting__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__hasSubmitSucceeded__ = __webpack_require__(614); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitSucceeded", function() { return __WEBPACK_IMPORTED_MODULE_26__hasSubmitSucceeded__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__hasSubmitFailed__ = __webpack_require__(616); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitFailed", function() { return __WEBPACK_IMPORTED_MODULE_27__hasSubmitFailed__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__reduxForm__ = __webpack_require__(618); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reduxForm", function() { return __WEBPACK_IMPORTED_MODULE_28__reduxForm__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__reducer__ = __webpack_require__(648); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return __WEBPACK_IMPORTED_MODULE_29__reducer__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__values__ = __webpack_require__(651); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return __WEBPACK_IMPORTED_MODULE_30__values__["a"]; }); + + + + + + + +// alias for propTypes + + + + + + + + + + + + + + + + + + + + + + + + +var actionTypes = __WEBPACK_IMPORTED_MODULE_1__actionTypes__; +var actions = __WEBPACK_IMPORTED_MODULE_0__actions__; +var arrayInsert = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayInsert"], + arrayMove = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayMove"], + arrayPop = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayPop"], + arrayPush = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayPush"], + arrayRemove = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayRemove"], + arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayRemoveAll"], + arrayShift = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayShift"], + arraySplice = __WEBPACK_IMPORTED_MODULE_0__actions__["arraySplice"], + arraySwap = __WEBPACK_IMPORTED_MODULE_0__actions__["arraySwap"], + arrayUnshift = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayUnshift"], + autofill = __WEBPACK_IMPORTED_MODULE_0__actions__["autofill"], + blur = __WEBPACK_IMPORTED_MODULE_0__actions__["blur"], + change = __WEBPACK_IMPORTED_MODULE_0__actions__["change"], + clearSubmitErrors = __WEBPACK_IMPORTED_MODULE_0__actions__["clearSubmitErrors"], + destroy = __WEBPACK_IMPORTED_MODULE_0__actions__["destroy"], + focus = __WEBPACK_IMPORTED_MODULE_0__actions__["focus"], + initialize = __WEBPACK_IMPORTED_MODULE_0__actions__["initialize"], + registerField = __WEBPACK_IMPORTED_MODULE_0__actions__["registerField"], + reset = __WEBPACK_IMPORTED_MODULE_0__actions__["reset"], + setSubmitFailed = __WEBPACK_IMPORTED_MODULE_0__actions__["setSubmitFailed"], + setSubmitSucceeded = __WEBPACK_IMPORTED_MODULE_0__actions__["setSubmitSucceeded"], + startAsyncValidation = __WEBPACK_IMPORTED_MODULE_0__actions__["startAsyncValidation"], + startSubmit = __WEBPACK_IMPORTED_MODULE_0__actions__["startSubmit"], + stopAsyncValidation = __WEBPACK_IMPORTED_MODULE_0__actions__["stopAsyncValidation"], + stopSubmit = __WEBPACK_IMPORTED_MODULE_0__actions__["stopSubmit"], + submit = __WEBPACK_IMPORTED_MODULE_0__actions__["submit"], + touch = __WEBPACK_IMPORTED_MODULE_0__actions__["touch"], + unregisterField = __WEBPACK_IMPORTED_MODULE_0__actions__["unregisterField"], + untouch = __WEBPACK_IMPORTED_MODULE_0__actions__["untouch"]; + + +/***/ }), +/* 114 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(272); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyArray_js__ = __webpack_require__(273); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(115); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringToPath_js__ = __webpack_require__(274); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(91); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toString_js__ = __webpack_require__(276); + + + + + + + + +/** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ +function toPath(value) { + if (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value)) { + return Object(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(value, __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */]); + } + return Object(__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */])(value) ? [value] : Object(__WEBPACK_IMPORTED_MODULE_1__copyArray_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_4__stringToPath_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_6__toString_js__["a" /* default */])(value))); +} + +/* harmony default export */ __webpack_exports__["a"] = (toPath); + + +/***/ }), +/* 115 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == symbolTag); +} + +/* harmony default export */ __webpack_exports__["a"] = (isSymbol); + + +/***/ }), +/* 116 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); + + +/* Built-in method references that are verified to be native. */ +var nativeCreate = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(Object, 'create'); + +/* harmony default export */ __webpack_exports__["a"] = (nativeCreate); + + +/***/ }), +/* 117 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__ = __webpack_require__(515); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__ = __webpack_require__(516); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__ = __webpack_require__(517); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__ = __webpack_require__(518); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__ = __webpack_require__(519); + + + + + + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__["a" /* default */]; +ListCache.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__["a" /* default */]; +ListCache.prototype.get = __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__["a" /* default */]; +ListCache.prototype.has = __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__["a" /* default */]; +ListCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (ListCache); + + +/***/ }), +/* 118 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(90); + + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (Object(__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */])(array[length][0], key)) { + return length; + } + } + return -1; +} + +/* harmony default export */ __webpack_exports__["a"] = (assocIndexOf); + + +/***/ }), +/* 119 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__ = __webpack_require__(521); + + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return Object(__WEBPACK_IMPORTED_MODULE_0__isKeyable_js__["a" /* default */])(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/* harmony default export */ __webpack_exports__["a"] = (getMapData); + + +/***/ }), +/* 120 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(179); + + + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && Object(__WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */])(value.length) && !Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isArrayLike); + + +/***/ }), +/* 121 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__(283); + + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */]) { + Object(__WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */])(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +/* harmony default export */ __webpack_exports__["a"] = (baseAssignValue); + + +/***/ }), +/* 122 */ +/***/ (function(module, exports) { + +module.exports = true; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(35).f; +var has = __webpack_require__(51); +var TAG = __webpack_require__(22)('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(669); +var global = __webpack_require__(23); +var hide = __webpack_require__(50); +var Iterators = __webpack_require__(78); +var TO_STRING_TAG = __webpack_require__(22)('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _toConsumableArray2 = __webpack_require__(189); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +exports.default = getMuiTheme; + +var _lodash = __webpack_require__(692); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _colorManipulator = __webpack_require__(56); + +var _lightBaseTheme = __webpack_require__(306); + +var _lightBaseTheme2 = _interopRequireDefault(_lightBaseTheme); + +var _zIndex = __webpack_require__(307); + +var _zIndex2 = _interopRequireDefault(_zIndex); + +var _autoprefixer = __webpack_require__(693); + +var _autoprefixer2 = _interopRequireDefault(_autoprefixer); + +var _callOnce = __webpack_require__(722); + +var _callOnce2 = _interopRequireDefault(_callOnce); + +var _rtl = __webpack_require__(723); + +var _rtl2 = _interopRequireDefault(_rtl); + +var _compose = __webpack_require__(726); + +var _compose2 = _interopRequireDefault(_compose); + +var _typography = __webpack_require__(311); + +var _typography2 = _interopRequireDefault(_typography); + +var _colors = __webpack_require__(57); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Get the MUI theme corresponding to a base theme. + * It's possible to override the computed theme values + * by providing a second argument. The calculated + * theme will be deeply merged with the second argument. + */ +function getMuiTheme(muiTheme) { + for (var _len = arguments.length, more = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + more[_key - 1] = arguments[_key]; + } + + muiTheme = _lodash2.default.apply(undefined, [{ + zIndex: _zIndex2.default, + isRtl: false, + userAgent: undefined + }, _lightBaseTheme2.default, muiTheme].concat(more)); + + var _muiTheme = muiTheme, + spacing = _muiTheme.spacing, + fontFamily = _muiTheme.fontFamily, + palette = _muiTheme.palette; + + var baseTheme = { spacing: spacing, fontFamily: fontFamily, palette: palette }; + + muiTheme = (0, _lodash2.default)({ + appBar: { + color: palette.primary1Color, + textColor: palette.alternateTextColor, + height: spacing.desktopKeylineIncrement, + titleFontWeight: _typography2.default.fontWeightNormal, + padding: spacing.desktopGutter + }, + avatar: { + color: palette.canvasColor, + backgroundColor: (0, _colorManipulator.emphasize)(palette.canvasColor, 0.26) + }, + badge: { + color: palette.alternateTextColor, + textColor: palette.textColor, + primaryColor: palette.primary1Color, + primaryTextColor: palette.alternateTextColor, + secondaryColor: palette.accent1Color, + secondaryTextColor: palette.alternateTextColor, + fontWeight: _typography2.default.fontWeightMedium + }, + bottomNavigation: { + backgroundColor: palette.canvasColor, + unselectedColor: (0, _colorManipulator.fade)(palette.textColor, 0.54), + selectedColor: palette.primary1Color, + height: 56, + unselectedFontSize: 12, + selectedFontSize: 14 + }, + button: { + height: 36, + minWidth: 88, + iconButtonSize: spacing.iconSize * 2 + }, + card: { + titleColor: (0, _colorManipulator.fade)(palette.textColor, 0.87), + subtitleColor: (0, _colorManipulator.fade)(palette.textColor, 0.54), + fontWeight: _typography2.default.fontWeightMedium + }, + cardMedia: { + color: _colors.darkWhite, + overlayContentBackground: _colors.lightBlack, + titleColor: _colors.darkWhite, + subtitleColor: _colors.lightWhite + }, + cardText: { + textColor: palette.textColor + }, + checkbox: { + boxColor: palette.textColor, + checkedColor: palette.primary1Color, + requiredColor: palette.primary1Color, + disabledColor: palette.disabledColor, + labelColor: palette.textColor, + labelDisabledColor: palette.disabledColor + }, + chip: { + backgroundColor: (0, _colorManipulator.emphasize)(palette.canvasColor, 0.12), + deleteIconColor: (0, _colorManipulator.fade)(palette.textColor, 0.26), + textColor: (0, _colorManipulator.fade)(palette.textColor, 0.87), + fontSize: 14, + fontWeight: _typography2.default.fontWeightNormal, + shadow: '0 1px 6px ' + (0, _colorManipulator.fade)(palette.shadowColor, 0.12) + ',\n 0 1px 4px ' + (0, _colorManipulator.fade)(palette.shadowColor, 0.12) + }, + datePicker: { + color: palette.primary1Color, + textColor: palette.alternateTextColor, + calendarTextColor: palette.textColor, + selectColor: palette.primary2Color, + selectTextColor: palette.alternateTextColor, + calendarYearBackgroundColor: palette.canvasColor + }, + dialog: { + titleFontSize: 22, + bodyFontSize: 16, + bodyColor: (0, _colorManipulator.fade)(palette.textColor, 0.6) + }, + dropDownMenu: { + accentColor: palette.borderColor + }, + enhancedButton: { + tapHighlightColor: _colors.transparent + }, + flatButton: { + color: _colors.transparent, + buttonFilterColor: '#999999', + disabledTextColor: (0, _colorManipulator.fade)(palette.textColor, 0.3), + textColor: palette.textColor, + primaryTextColor: palette.primary1Color, + secondaryTextColor: palette.accent1Color, + fontSize: _typography2.default.fontStyleButtonFontSize, + fontWeight: _typography2.default.fontWeightMedium + }, + floatingActionButton: { + buttonSize: 56, + miniSize: 40, + color: palette.primary1Color, + iconColor: palette.alternateTextColor, + secondaryColor: palette.accent1Color, + secondaryIconColor: palette.alternateTextColor, + disabledTextColor: palette.disabledColor, + disabledColor: (0, _colorManipulator.emphasize)(palette.canvasColor, 0.12) + }, + gridTile: { + textColor: _colors.white + }, + icon: { + color: palette.canvasColor, + backgroundColor: palette.primary1Color + }, + inkBar: { + backgroundColor: palette.accent1Color + }, + drawer: { + width: spacing.desktopKeylineIncrement * 4, + color: palette.canvasColor + }, + listItem: { + nestedLevelDepth: 18, + secondaryTextColor: palette.secondaryTextColor, + leftIconColor: _colors.grey600, + rightIconColor: _colors.grey600 + }, + menu: { + backgroundColor: palette.canvasColor, + containerBackgroundColor: palette.canvasColor + }, + menuItem: { + dataHeight: 32, + height: 48, + hoverColor: (0, _colorManipulator.fade)(palette.textColor, 0.1), + padding: spacing.desktopGutter, + selectedTextColor: palette.accent1Color, + rightIconDesktopFill: _colors.grey600 + }, + menuSubheader: { + padding: spacing.desktopGutter, + borderColor: palette.borderColor, + textColor: palette.primary1Color + }, + overlay: { + backgroundColor: _colors.lightBlack + }, + paper: { + color: palette.textColor, + backgroundColor: palette.canvasColor, + zDepthShadows: [[1, 6, 0.12, 1, 4, 0.12], [3, 10, 0.16, 3, 10, 0.23], [10, 30, 0.19, 6, 10, 0.23], [14, 45, 0.25, 10, 18, 0.22], [19, 60, 0.30, 15, 20, 0.22]].map(function (d) { + return '0 ' + d[0] + 'px ' + d[1] + 'px ' + (0, _colorManipulator.fade)(palette.shadowColor, d[2]) + ',\n 0 ' + d[3] + 'px ' + d[4] + 'px ' + (0, _colorManipulator.fade)(palette.shadowColor, d[5]); + }) + }, + radioButton: { + borderColor: palette.textColor, + backgroundColor: palette.alternateTextColor, + checkedColor: palette.primary1Color, + requiredColor: palette.primary1Color, + disabledColor: palette.disabledColor, + size: 24, + labelColor: palette.textColor, + labelDisabledColor: palette.disabledColor + }, + raisedButton: { + color: palette.alternateTextColor, + textColor: palette.textColor, + primaryColor: palette.primary1Color, + primaryTextColor: palette.alternateTextColor, + secondaryColor: palette.accent1Color, + secondaryTextColor: palette.alternateTextColor, + disabledColor: (0, _colorManipulator.darken)(palette.alternateTextColor, 0.1), + disabledTextColor: (0, _colorManipulator.fade)(palette.textColor, 0.3), + fontSize: _typography2.default.fontStyleButtonFontSize, + fontWeight: _typography2.default.fontWeightMedium + }, + refreshIndicator: { + strokeColor: palette.borderColor, + loadingStrokeColor: palette.primary1Color + }, + ripple: { + color: (0, _colorManipulator.fade)(palette.textColor, 0.87) + }, + slider: { + trackSize: 2, + trackColor: palette.primary3Color, + trackColorSelected: palette.accent3Color, + handleSize: 12, + handleSizeDisabled: 8, + handleSizeActive: 18, + handleColorZero: palette.primary3Color, + handleFillColor: palette.alternateTextColor, + selectionColor: palette.primary1Color, + rippleColor: palette.primary1Color + }, + snackbar: { + textColor: palette.alternateTextColor, + backgroundColor: palette.textColor, + actionColor: palette.accent1Color + }, + subheader: { + color: (0, _colorManipulator.fade)(palette.textColor, 0.54), + fontWeight: _typography2.default.fontWeightMedium + }, + stepper: { + backgroundColor: 'transparent', + hoverBackgroundColor: (0, _colorManipulator.fade)(_colors.black, 0.06), + iconColor: palette.primary1Color, + hoveredIconColor: _colors.grey700, + inactiveIconColor: _colors.grey500, + textColor: (0, _colorManipulator.fade)(_colors.black, 0.87), + disabledTextColor: (0, _colorManipulator.fade)(_colors.black, 0.26), + connectorLineColor: _colors.grey400 + }, + svgIcon: { + color: palette.textColor + }, + table: { + backgroundColor: palette.canvasColor + }, + tableFooter: { + borderColor: palette.borderColor, + textColor: palette.accent3Color + }, + tableHeader: { + borderColor: palette.borderColor + }, + tableHeaderColumn: { + textColor: palette.accent3Color, + height: 56, + spacing: 24 + }, + tableRow: { + hoverColor: palette.accent2Color, + stripeColor: (0, _colorManipulator.fade)((0, _colorManipulator.lighten)(palette.primary1Color, 0.5), 0.4), + selectedColor: palette.borderColor, + textColor: palette.textColor, + borderColor: palette.borderColor, + height: 48 + }, + tableRowColumn: { + height: 48, + spacing: 24 + }, + tabs: { + backgroundColor: palette.primary1Color, + textColor: (0, _colorManipulator.fade)(palette.alternateTextColor, 0.7), + selectedTextColor: palette.alternateTextColor + }, + textField: { + textColor: palette.textColor, + hintColor: palette.disabledColor, + floatingLabelColor: palette.disabledColor, + disabledTextColor: palette.disabledColor, + errorColor: _colors.red500, + focusColor: palette.primary1Color, + backgroundColor: 'transparent', + borderColor: palette.borderColor + }, + timePicker: { + color: palette.alternateTextColor, + textColor: palette.alternateTextColor, + accentColor: palette.primary1Color, + clockColor: palette.textColor, + clockCircleColor: palette.clockCircleColor, + headerColor: palette.pickerHeaderColor || palette.primary1Color, + selectColor: palette.primary2Color, + selectTextColor: palette.alternateTextColor + }, + toggle: { + thumbOnColor: palette.primary1Color, + thumbOffColor: palette.accent2Color, + thumbDisabledColor: palette.borderColor, + thumbRequiredColor: palette.primary1Color, + trackOnColor: (0, _colorManipulator.fade)(palette.primary1Color, 0.5), + trackOffColor: palette.primary3Color, + trackDisabledColor: palette.primary3Color, + labelColor: palette.textColor, + labelDisabledColor: palette.disabledColor, + trackRequiredColor: (0, _colorManipulator.fade)(palette.primary1Color, 0.5) + }, + toolbar: { + color: (0, _colorManipulator.fade)(palette.textColor, 0.54), + hoverColor: (0, _colorManipulator.fade)(palette.textColor, 0.87), + backgroundColor: (0, _colorManipulator.darken)(palette.accent2Color, 0.05), + height: 56, + titleFontSize: 20, + iconColor: (0, _colorManipulator.fade)(palette.textColor, 0.4), + separatorColor: (0, _colorManipulator.fade)(palette.textColor, 0.175), + menuHoverColor: (0, _colorManipulator.fade)(palette.textColor, 0.1) + }, + tooltip: { + color: _colors.white, + rippleBackgroundColor: _colors.grey700 + } + }, muiTheme, { + baseTheme: baseTheme, // To provide backward compatibility. + rawTheme: baseTheme }); + + var transformers = [_autoprefixer2.default, _rtl2.default, _callOnce2.default].map(function (t) { + return t(muiTheme); + }).filter(function (t) { + return t; + }); + + muiTheme.prepareStyles = _compose2.default.apply(undefined, (0, _toConsumableArray3.default)(transformers)); + + return muiTheme; +} + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// returns a style object with a single concated prefixed value string + +exports.default = function (property, value) { + var replacer = arguments.length <= 2 || arguments[2] === undefined ? function (prefix, value) { + return prefix + value; + } : arguments[2]; + return _defineProperty({}, property, ['-webkit-', '-moz-', ''].map(function (prefix) { + return replacer(prefix, value); + })); +}; + +module.exports = exports['default']; + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createChildFragment = createChildFragment; +exports.extendChildren = extendChildren; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactAddonsCreateFragment = __webpack_require__(730); + +var _reactAddonsCreateFragment2 = _interopRequireDefault(_reactAddonsCreateFragment); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function createChildFragment(fragments) { + var newFragments = {}; + var validChildrenCount = 0; + var firstKey = void 0; + + // Only create non-empty key fragments + for (var key in fragments) { + var currentChild = fragments[key]; + + if (currentChild) { + if (validChildrenCount === 0) firstKey = key; + newFragments[key] = currentChild; + validChildrenCount++; + } + } + + if (validChildrenCount === 0) return undefined; + if (validChildrenCount === 1) return newFragments[firstKey]; + return (0, _reactAddonsCreateFragment2.default)(newFragments); +} + +function extendChildren(children, extendedProps, extendedChildren) { + return _react2.default.Children.map(children, function (child) { + if (!_react2.default.isValidElement(child)) { + return child; + } + + var newProps = typeof extendedProps === 'function' ? extendedProps(child) : extendedProps; + + var newChildren = typeof extendedChildren === 'function' ? extendedChildren(child) : extendedChildren ? extendedChildren : child.props.children; + + return _react2.default.cloneElement(child, newProps, newChildren); + }); +} + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +module.exports = __webpack_require__(732); + + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _MenuItem = __webpack_require__(321); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _MenuItem2.default; + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactEventListener = __webpack_require__(42); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _RenderToLayer = __webpack_require__(322); + +var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer); + +var _propTypes = __webpack_require__(41); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _Paper = __webpack_require__(34); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _lodash = __webpack_require__(771); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _PopoverAnimationDefault = __webpack_require__(772); + +var _PopoverAnimationDefault2 = _interopRequireDefault(_PopoverAnimationDefault); + +var _iOSHelpers = __webpack_require__(773); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + root: { + display: 'none' + } +}; + +var Popover = function (_Component) { + (0, _inherits3.default)(Popover, _Component); + + function Popover(props, context) { + (0, _classCallCheck3.default)(this, Popover); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Popover.__proto__ || (0, _getPrototypeOf2.default)(Popover)).call(this, props, context)); + + _this.timeout = null; + + _this.renderLayer = function () { + var _this$props = _this.props, + animated = _this$props.animated, + animation = _this$props.animation, + anchorEl = _this$props.anchorEl, + anchorOrigin = _this$props.anchorOrigin, + autoCloseWhenOffScreen = _this$props.autoCloseWhenOffScreen, + canAutoPosition = _this$props.canAutoPosition, + children = _this$props.children, + onRequestClose = _this$props.onRequestClose, + style = _this$props.style, + targetOrigin = _this$props.targetOrigin, + useLayerForClickAway = _this$props.useLayerForClickAway, + other = (0, _objectWithoutProperties3.default)(_this$props, ['animated', 'animation', 'anchorEl', 'anchorOrigin', 'autoCloseWhenOffScreen', 'canAutoPosition', 'children', 'onRequestClose', 'style', 'targetOrigin', 'useLayerForClickAway']); + + + var styleRoot = style; + + if (!animated) { + styleRoot = { + position: 'fixed', + zIndex: _this.context.muiTheme.zIndex.popover + }; + + if (!_this.state.open) { + return null; + } + + return _react2.default.createElement( + _Paper2.default, + (0, _extends3.default)({ style: (0, _simpleAssign2.default)(styleRoot, style) }, other), + children + ); + } + + var Animation = animation || _PopoverAnimationDefault2.default; + + return _react2.default.createElement( + Animation, + (0, _extends3.default)({ + targetOrigin: targetOrigin, + style: styleRoot + }, other, { + open: _this.state.open && !_this.state.closing + }), + children + ); + }; + + _this.componentClickAway = function (event) { + event.preventDefault(); + _this.requestClose('clickAway'); + }; + + _this.setPlacement = function (scrolling) { + if (!_this.state.open) { + return; + } + + if (!_this.refs.layer.getLayer()) { + return; + } + + var targetEl = _this.refs.layer.getLayer().children[0]; + if (!targetEl) { + return; + } + + var _this$props2 = _this.props, + targetOrigin = _this$props2.targetOrigin, + anchorOrigin = _this$props2.anchorOrigin; + + var anchorEl = _this.props.anchorEl || _this.anchorEl; + + var anchor = _this.getAnchorPosition(anchorEl); + var target = _this.getTargetPosition(targetEl); + + var targetPosition = { + top: anchor[anchorOrigin.vertical] - target[targetOrigin.vertical], + left: anchor[anchorOrigin.horizontal] - target[targetOrigin.horizontal] + }; + + if (scrolling && _this.props.autoCloseWhenOffScreen) { + _this.autoCloseWhenOffScreen(anchor); + } + + if (_this.props.canAutoPosition) { + target = _this.getTargetPosition(targetEl); // update as height may have changed + targetPosition = _this.applyAutoPositionIfNeeded(anchor, target, targetOrigin, anchorOrigin, targetPosition); + } + + targetEl.style.top = Math.max(0, targetPosition.top) + 'px'; + targetEl.style.left = Math.max(0, targetPosition.left) + 'px'; + targetEl.style.maxHeight = window.innerHeight + 'px'; + }; + + _this.handleResize = (0, _lodash2.default)(_this.setPlacement, 100); + _this.handleScroll = (0, _lodash2.default)(_this.setPlacement.bind(_this, true), 50); + + _this.state = { + open: props.open, + closing: false + }; + return _this; + } + + (0, _createClass3.default)(Popover, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setPlacement(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; + + if (nextProps.open !== this.state.open) { + if (nextProps.open) { + this.anchorEl = nextProps.anchorEl || this.props.anchorEl; + this.setState({ + open: true, + closing: false + }); + } else { + if (nextProps.animated) { + if (this.timeout !== null) return; + this.setState({ closing: true }); + this.timeout = setTimeout(function () { + _this2.setState({ + open: false + }, function () { + _this2.timeout = null; + }); + }, 500); + } else { + this.setState({ + open: false + }); + } + } + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.setPlacement(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.handleResize.cancel(); + this.handleScroll.cancel(); + + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + } + }, { + key: 'requestClose', + value: function requestClose(reason) { + if (this.props.onRequestClose) { + this.props.onRequestClose(reason); + } + } + }, { + key: 'getAnchorPosition', + value: function getAnchorPosition(el) { + if (!el) { + el = _reactDom2.default.findDOMNode(this); + } + + var rect = el.getBoundingClientRect(); + var a = { + top: rect.top, + left: rect.left, + width: el.offsetWidth, + height: el.offsetHeight + }; + + a.right = rect.right || a.left + a.width; + + // The fixed positioning isn't respected on iOS when an input is focused. + // We need to compute the position from the top of the page and not the viewport. + if ((0, _iOSHelpers.isIOS)() && document.activeElement.tagName === 'INPUT') { + a.bottom = (0, _iOSHelpers.getOffsetTop)(el) + a.height; + } else { + a.bottom = rect.bottom || a.top + a.height; + } + a.middle = a.left + (a.right - a.left) / 2; + a.center = a.top + (a.bottom - a.top) / 2; + + return a; + } + }, { + key: 'getTargetPosition', + value: function getTargetPosition(targetEl) { + return { + top: 0, + center: targetEl.offsetHeight / 2, + bottom: targetEl.offsetHeight, + left: 0, + middle: targetEl.offsetWidth / 2, + right: targetEl.offsetWidth + }; + } + }, { + key: 'autoCloseWhenOffScreen', + value: function autoCloseWhenOffScreen(anchorPosition) { + if (anchorPosition.top < 0 || anchorPosition.top > window.innerHeight || anchorPosition.left < 0 || anchorPosition.left > window.innerWidth) { + this.requestClose('offScreen'); + } + } + }, { + key: 'getOverlapMode', + value: function getOverlapMode(anchor, target, median) { + if ([anchor, target].indexOf(median) >= 0) return 'auto'; + if (anchor === target) return 'inclusive'; + return 'exclusive'; + } + }, { + key: 'getPositions', + value: function getPositions(anchor, target) { + var a = (0, _extends3.default)({}, anchor); + var t = (0, _extends3.default)({}, target); + + var positions = { + x: ['left', 'right'].filter(function (p) { + return p !== t.horizontal; + }), + y: ['top', 'bottom'].filter(function (p) { + return p !== t.vertical; + }) + }; + + var overlap = { + x: this.getOverlapMode(a.horizontal, t.horizontal, 'middle'), + y: this.getOverlapMode(a.vertical, t.vertical, 'center') + }; + + positions.x.splice(overlap.x === 'auto' ? 0 : 1, 0, 'middle'); + positions.y.splice(overlap.y === 'auto' ? 0 : 1, 0, 'center'); + + if (overlap.y !== 'auto') { + a.vertical = a.vertical === 'top' ? 'bottom' : 'top'; + if (overlap.y === 'inclusive') { + t.vertical = t.vertical; + } + } + + if (overlap.x !== 'auto') { + a.horizontal = a.horizontal === 'left' ? 'right' : 'left'; + if (overlap.y === 'inclusive') { + t.horizontal = t.horizontal; + } + } + + return { + positions: positions, + anchorPos: a + }; + } + }, { + key: 'applyAutoPositionIfNeeded', + value: function applyAutoPositionIfNeeded(anchor, target, targetOrigin, anchorOrigin, targetPosition) { + var _getPositions = this.getPositions(anchorOrigin, targetOrigin), + positions = _getPositions.positions, + anchorPos = _getPositions.anchorPos; + + if (targetPosition.top < 0 || targetPosition.top + target.bottom > window.innerHeight) { + var newTop = anchor[anchorPos.vertical] - target[positions.y[0]]; + if (newTop + target.bottom <= window.innerHeight) { + targetPosition.top = Math.max(0, newTop); + } else { + newTop = anchor[anchorPos.vertical] - target[positions.y[1]]; + if (newTop + target.bottom <= window.innerHeight) { + targetPosition.top = Math.max(0, newTop); + } + } + } + + if (targetPosition.left < 0 || targetPosition.left + target.right > window.innerWidth) { + var newLeft = anchor[anchorPos.horizontal] - target[positions.x[0]]; + if (newLeft + target.right <= window.innerWidth) { + targetPosition.left = Math.max(0, newLeft); + } else { + newLeft = anchor[anchorPos.horizontal] - target[positions.x[1]]; + if (newLeft + target.right <= window.innerWidth) { + targetPosition.left = Math.max(0, newLeft); + } + } + } + + return targetPosition; + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement( + 'div', + { style: styles.root }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onScroll: this.handleScroll, + onResize: this.handleResize + }), + _react2.default.createElement(_RenderToLayer2.default, { + ref: 'layer', + open: this.state.open, + componentClickAway: this.componentClickAway, + useLayerForClickAway: this.props.useLayerForClickAway, + render: this.renderLayer + }) + ); + } + }]); + return Popover; +}(_react.Component); + +Popover.defaultProps = { + anchorOrigin: { + vertical: 'bottom', + horizontal: 'left' + }, + animated: true, + autoCloseWhenOffScreen: true, + canAutoPosition: true, + onRequestClose: function onRequestClose() {}, + open: false, + style: { + overflowY: 'auto' + }, + targetOrigin: { + vertical: 'top', + horizontal: 'left' + }, + useLayerForClickAway: true, + zDepth: 1 +}; +Popover.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Popover.propTypes = { + /** + * This is the DOM element that will be used to set the position of the + * popover. + */ + anchorEl: _react.PropTypes.object, + /** + * This is the point on the anchor where the popover's + * `targetOrigin` will attach to. + * Options: + * vertical: [top, center, bottom] + * horizontal: [left, middle, right]. + */ + anchorOrigin: _propTypes2.default.origin, + /** + * If true, the popover will apply transitions when + * it is added to the DOM. + */ + animated: _react.PropTypes.bool, + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * If true, the popover will hide when the anchor is scrolled off the screen. + */ + autoCloseWhenOffScreen: _react.PropTypes.bool, + /** + * If true, the popover (potentially) ignores `targetOrigin` + * and `anchorOrigin` to make itself fit on screen, + * which is useful for mobile devices. + */ + canAutoPosition: _react.PropTypes.bool, + /** + * The content of the popover. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Callback function fired when the popover is requested to be closed. + * + * @param {string} reason The reason for the close request. Possibles values + * are 'clickAway' and 'offScreen'. + */ + onRequestClose: _react.PropTypes.func, + /** + * If true, the popover is visible. + */ + open: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * This is the point on the popover which will attach to + * the anchor's origin. + * Options: + * vertical: [top, center, bottom] + * horizontal: [left, middle, right]. + */ + targetOrigin: _propTypes2.default.origin, + /** + * If true, the popover will render on top of an invisible + * layer, which will prevent clicks to the underlying + * elements, and trigger an `onRequestClose('clickAway')` call. + */ + useLayerForClickAway: _react.PropTypes.bool, + /** + * The zDepth of the popover. + */ + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = Popover; + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(62); +var document = __webpack_require__(23).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(62); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 133 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(135); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 135 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(137)('keys'); +var uid = __webpack_require__(100); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 137 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(23); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); +module.exports = function (key) { + return store[key] || (store[key] = {}); +}; + + +/***/ }), +/* 138 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 139 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(9); + +/** + * Injectable ordering of event plugins. + */ +var eventPluginOrder = null; + +/** + * Injectable mapping from names to event plugin modules. + */ +var namesToPlugins = {}; + +/** + * Recomputes the plugin list using the injected plugins and plugin ordering. + * + * @private + */ +function recomputePluginOrdering() { + if (!eventPluginOrder) { + // Wait until an `eventPluginOrder` is injected. + return; + } + for (var pluginName in namesToPlugins) { + var pluginModule = namesToPlugins[pluginName]; + var pluginIndex = eventPluginOrder.indexOf(pluginName); + !(pluginIndex > -1) ? false ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0; + if (EventPluginRegistry.plugins[pluginIndex]) { + continue; + } + !pluginModule.extractEvents ? false ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0; + EventPluginRegistry.plugins[pluginIndex] = pluginModule; + var publishedEvents = pluginModule.eventTypes; + for (var eventName in publishedEvents) { + !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? false ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0; + } + } +} + +/** + * Publishes an event so that it can be dispatched by the supplied plugin. + * + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private + */ +function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { + !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? false ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0; + EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; + + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName(phasedRegistrationName, pluginModule, eventName); + } + } + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); + return true; + } + return false; +} + +/** + * Publishes a registration name that is used to identify dispatched events and + * can be used with `EventPluginHub.putListener` to register listeners. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ +function publishRegistrationName(registrationName, pluginModule, eventName) { + !!EventPluginRegistry.registrationNameModules[registrationName] ? false ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0; + EventPluginRegistry.registrationNameModules[registrationName] = pluginModule; + EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; + + if (false) { + var lowerCasedName = registrationName.toLowerCase(); + EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName; + + if (registrationName === 'onDoubleClick') { + EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName; + } + } +} + +/** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ +var EventPluginRegistry = { + /** + * Ordered list of injected plugins. + */ + plugins: [], + + /** + * Mapping from event name to dispatch config + */ + eventNameDispatchConfigs: {}, + + /** + * Mapping from registration name to plugin module + */ + registrationNameModules: {}, + + /** + * Mapping from registration name to event name + */ + registrationNameDependencies: {}, + + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in __DEV__. + * @type {Object} + */ + possibleRegistrationNames: false ? {} : null, + // Trust the developer to only use possibleRegistrationNames in __DEV__ + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + injectEventPluginOrder: function (injectedEventPluginOrder) { + !!eventPluginOrder ? false ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0; + // Clone the ordering so it cannot be dynamically mutated. + eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); + recomputePluginOrdering(); + }, + + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + injectEventPluginsByName: function (injectedNamesToPlugins) { + var isOrderingDirty = false; + for (var pluginName in injectedNamesToPlugins) { + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { + continue; + } + var pluginModule = injectedNamesToPlugins[pluginName]; + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { + !!namesToPlugins[pluginName] ? false ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0; + namesToPlugins[pluginName] = pluginModule; + isOrderingDirty = true; + } + } + if (isOrderingDirty) { + recomputePluginOrdering(); + } + }, + + /** + * Looks up the plugin for the supplied event. + * + * @param {object} event A synthetic event. + * @return {?object} The plugin that created the supplied event. + * @internal + */ + getPluginModuleForEvent: function (event) { + var dispatchConfig = event.dispatchConfig; + if (dispatchConfig.registrationName) { + return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; + } + if (dispatchConfig.phasedRegistrationNames !== undefined) { + // pulling phasedRegistrationNames out of dispatchConfig helps Flow see + // that it is not undefined. + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + + for (var phase in phasedRegistrationNames) { + if (!phasedRegistrationNames.hasOwnProperty(phase)) { + continue; + } + var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]]; + if (pluginModule) { + return pluginModule; + } + } + } + return null; + }, + + /** + * Exposed for unit testing. + * @private + */ + _resetEventPlugins: function () { + eventPluginOrder = null; + for (var pluginName in namesToPlugins) { + if (namesToPlugins.hasOwnProperty(pluginName)) { + delete namesToPlugins[pluginName]; + } + } + EventPluginRegistry.plugins.length = 0; + + var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; + for (var eventName in eventNameDispatchConfigs) { + if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { + delete eventNameDispatchConfigs[eventName]; + } + } + + var registrationNameModules = EventPluginRegistry.registrationNameModules; + for (var registrationName in registrationNameModules) { + if (registrationNameModules.hasOwnProperty(registrationName)) { + delete registrationNameModules[registrationName]; + } + } + + if (false) { + var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames; + for (var lowerCasedName in possibleRegistrationNames) { + if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) { + delete possibleRegistrationNames[lowerCasedName]; + } + } + } + } +}; + +module.exports = EventPluginRegistry; + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var caughtError = null; + +/** + * Call a function while guarding against errors that happens within it. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} a First argument + * @param {*} b Second argument + */ +function invokeGuardedCallback(name, func, a) { + try { + func(a); + } catch (x) { + if (caughtError === null) { + caughtError = x; + } + } +} + +var ReactErrorUtils = { + invokeGuardedCallback: invokeGuardedCallback, + + /** + * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event + * handler are sure to be rethrown by rethrowCaughtError. + */ + invokeGuardedCallbackWithCatch: invokeGuardedCallback, + + /** + * During execution of guarded functions we will capture the first error which + * we will rethrow to be handled by the top level error handler. + */ + rethrowCaughtError: function () { + if (caughtError) { + var error = caughtError; + caughtError = null; + throw error; + } + } +}; + +if (false) { + /** + * To help development we can get better devtools integration by simulating a + * real browser event. + */ + if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') { + var fakeNode = document.createElement('react'); + ReactErrorUtils.invokeGuardedCallback = function (name, func, a) { + var boundFunc = func.bind(null, a); + var evtType = 'react-' + name; + fakeNode.addEventListener(evtType, boundFunc, false); + var evt = document.createEvent('Event'); + evt.initEvent(evtType, false, false); + fakeNode.dispatchEvent(evt); + fakeNode.removeEventListener(evtType, boundFunc, false); + }; + } +} + +module.exports = ReactErrorUtils; + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Gets the target node from a native browser event by accounting for + * inconsistencies in browser DOM APIs. + * + * @param {object} nativeEvent Native browser event. + * @return {DOMEventTarget} Target node. + */ + +function getEventTarget(nativeEvent) { + var target = nativeEvent.target || nativeEvent.srcElement || window; + + // Normalize SVG element events #4963 + if (target.correspondingUseElement) { + target = target.correspondingUseElement; + } + + // Safari may fire events on text nodes (Node.TEXT_NODE is 3). + // @see http://www.quirksmode.org/js/events_properties.html + return target.nodeType === 3 ? target.parentNode : target; +} + +module.exports = getEventTarget; + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(21); + +var useHasFeature; +if (ExecutionEnvironment.canUseDOM) { + useHasFeature = document.implementation && document.implementation.hasFeature && + // always returns true in newer browsers as per the standard. + // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature + document.implementation.hasFeature('', '') !== true; +} + +/** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @param {?boolean} capture Check if the capture phase is supported. + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ +function isEventSupported(eventNameSuffix, capture) { + if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { + return false; + } + + var eventName = 'on' + eventNameSuffix; + var isSupported = eventName in document; + + if (!isSupported) { + var element = document.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { + // This is the only way to test support for the `wheel` event in IE9+. + isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); + } + + return isSupported; +} + +module.exports = isEventSupported; + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ViewportMetrics = { + currentScrollLeft: 0, + + currentScrollTop: 0, + + refreshScrollValues: function (scrollPosition) { + ViewportMetrics.currentScrollLeft = scrollPosition.x; + ViewportMetrics.currentScrollTop = scrollPosition.y; + } +}; + +module.exports = ViewportMetrics; + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers + */ + +var modifierKeyToProp = { + Alt: 'altKey', + Control: 'ctrlKey', + Meta: 'metaKey', + Shift: 'shiftKey' +}; + +// IE8 does not implement getModifierState so we simply map it to the only +// modifier keys exposed by the event itself, does not support Lock-keys. +// Currently, all major browsers except Chrome seems to support Lock-keys. +function modifierStateGetter(keyArg) { + var syntheticEvent = this; + var nativeEvent = syntheticEvent.nativeEvent; + if (nativeEvent.getModifierState) { + return nativeEvent.getModifierState(keyArg); + } + var keyProp = modifierKeyToProp[keyArg]; + return keyProp ? !!nativeEvent[keyProp] : false; +} + +function getEventModifierState(nativeEvent) { + return modifierStateGetter; +} + +module.exports = getEventModifierState; + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMLazyTree = __webpack_require__(72); +var Danger = __webpack_require__(368); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactInstrumentation = __webpack_require__(29); + +var createMicrosoftUnsafeLocalFunction = __webpack_require__(148); +var setInnerHTML = __webpack_require__(106); +var setTextContent = __webpack_require__(224); + +function getNodeAfter(parentNode, node) { + // Special case for text components, which return [open, close] comments + // from getHostNode. + if (Array.isArray(node)) { + node = node[1]; + } + return node ? node.nextSibling : parentNode.firstChild; +} + +/** + * Inserts `childNode` as a child of `parentNode` at the `index`. + * + * @param {DOMElement} parentNode Parent node in which to insert. + * @param {DOMElement} childNode Child node to insert. + * @param {number} index Index at which to insert the child. + * @internal + */ +var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) { + // We rely exclusively on `insertBefore(node, null)` instead of also using + // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so + // we are careful to use `null`.) + parentNode.insertBefore(childNode, referenceNode); +}); + +function insertLazyTreeChildAt(parentNode, childTree, referenceNode) { + DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode); +} + +function moveChild(parentNode, childNode, referenceNode) { + if (Array.isArray(childNode)) { + moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode); + } else { + insertChildAt(parentNode, childNode, referenceNode); + } +} + +function removeChild(parentNode, childNode) { + if (Array.isArray(childNode)) { + var closingComment = childNode[1]; + childNode = childNode[0]; + removeDelimitedText(parentNode, childNode, closingComment); + parentNode.removeChild(closingComment); + } + parentNode.removeChild(childNode); +} + +function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) { + var node = openingComment; + while (true) { + var nextNode = node.nextSibling; + insertChildAt(parentNode, node, referenceNode); + if (node === closingComment) { + break; + } + node = nextNode; + } +} + +function removeDelimitedText(parentNode, startNode, closingComment) { + while (true) { + var node = startNode.nextSibling; + if (node === closingComment) { + // The closing comment is removed by ReactMultiChild. + break; + } else { + parentNode.removeChild(node); + } + } +} + +function replaceDelimitedText(openingComment, closingComment, stringText) { + var parentNode = openingComment.parentNode; + var nodeAfterComment = openingComment.nextSibling; + if (nodeAfterComment === closingComment) { + // There are no text nodes between the opening and closing comments; insert + // a new one if stringText isn't empty. + if (stringText) { + insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment); + } + } else { + if (stringText) { + // Set the text content of the first node after the opening comment, and + // remove all following nodes up until the closing comment. + setTextContent(nodeAfterComment, stringText); + removeDelimitedText(parentNode, nodeAfterComment, closingComment); + } else { + removeDelimitedText(parentNode, openingComment, closingComment); + } + } + + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, + type: 'replace text', + payload: stringText + }); + } +} + +var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup; +if (false) { + dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) { + Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup); + if (prevInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: prevInstance._debugID, + type: 'replace with', + payload: markup.toString() + }); + } else { + var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node); + if (nextInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: nextInstance._debugID, + type: 'mount', + payload: markup.toString() + }); + } + } + }; +} + +/** + * Operations for updating with DOM children. + */ +var DOMChildrenOperations = { + dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup, + + replaceDelimitedText: replaceDelimitedText, + + /** + * Updates a component's children by processing a series of updates. The + * update configurations are each expected to have a `parentNode` property. + * + * @param {array} updates List of update configurations. + * @internal + */ + processUpdates: function (parentNode, updates) { + if (false) { + var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID; + } + + for (var k = 0; k < updates.length; k++) { + var update = updates[k]; + switch (update.type) { + case 'INSERT_MARKUP': + insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode)); + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'insert child', + payload: { + toIndex: update.toIndex, + content: update.content.toString() + } + }); + } + break; + case 'MOVE_EXISTING': + moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode)); + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'move child', + payload: { fromIndex: update.fromIndex, toIndex: update.toIndex } + }); + } + break; + case 'SET_MARKUP': + setInnerHTML(parentNode, update.content); + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'replace children', + payload: update.content.toString() + }); + } + break; + case 'TEXT_CONTENT': + setTextContent(parentNode, update.content); + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'replace text', + payload: update.content.toString() + }); + } + break; + case 'REMOVE_NODE': + removeChild(parentNode, update.fromNode); + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'remove child', + payload: { fromIndex: update.fromIndex } + }); + } + break; + } + } + } +}; + +module.exports = DOMChildrenOperations; + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMNamespaces = { + html: 'http://www.w3.org/1999/xhtml', + mathml: 'http://www.w3.org/1998/Math/MathML', + svg: 'http://www.w3.org/2000/svg' +}; + +module.exports = DOMNamespaces; + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/* globals MSApp */ + + + +/** + * Create a function which has 'unsafe' privileges (required by windows8 apps) + */ + +var createMicrosoftUnsafeLocalFunction = function (func) { + if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { + return function (arg0, arg1, arg2, arg3) { + MSApp.execUnsafeLocalFunction(function () { + return func(arg0, arg1, arg2, arg3); + }); + }; + } else { + return func; + } +}; + +module.exports = createMicrosoftUnsafeLocalFunction; + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var ReactPropTypesSecret = __webpack_require__(386); +var propTypesFactory = __webpack_require__(213); + +var React = __webpack_require__(65); +var PropTypes = propTypesFactory(React.isValidElement); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(12); + +var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true +}; + +function _assertSingleLink(inputProps) { + !(inputProps.checkedLink == null || inputProps.valueLink == null) ? false ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0; +} +function _assertValueLink(inputProps) { + _assertSingleLink(inputProps); + !(inputProps.value == null && inputProps.onChange == null) ? false ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\'t want to use valueLink.') : _prodInvariant('88') : void 0; +} + +function _assertCheckedLink(inputProps) { + _assertSingleLink(inputProps); + !(inputProps.checked == null && inputProps.onChange == null) ? false ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\'t want to use checkedLink') : _prodInvariant('89') : void 0; +} + +var propTypes = { + value: function (props, propName, componentName) { + if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) { + return null; + } + return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + }, + checked: function (props, propName, componentName) { + if (!props[propName] || props.onChange || props.readOnly || props.disabled) { + return null; + } + return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + }, + onChange: PropTypes.func +}; + +var loggedTypeFailures = {}; +function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +/** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ +var LinkedValueUtils = { + checkPropTypes: function (tagName, props, owner) { + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) { + var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret); + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var addendum = getDeclarationErrorAddendum(owner); + false ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0; + } + } + }, + + /** + * @param {object} inputProps Props for form component + * @return {*} current value of the input either from value prop or link. + */ + getValue: function (inputProps) { + if (inputProps.valueLink) { + _assertValueLink(inputProps); + return inputProps.valueLink.value; + } + return inputProps.value; + }, + + /** + * @param {object} inputProps Props for form component + * @return {*} current checked status of the input either from checked prop + * or link. + */ + getChecked: function (inputProps) { + if (inputProps.checkedLink) { + _assertCheckedLink(inputProps); + return inputProps.checkedLink.value; + } + return inputProps.checked; + }, + + /** + * @param {object} inputProps Props for form component + * @param {SyntheticEvent} event change event to handle + */ + executeOnChange: function (inputProps, event) { + if (inputProps.valueLink) { + _assertValueLink(inputProps); + return inputProps.valueLink.requestChange(event.target.value); + } else if (inputProps.checkedLink) { + _assertCheckedLink(inputProps); + return inputProps.checkedLink.requestChange(event.target.checked); + } else if (inputProps.onChange) { + return inputProps.onChange.call(undefined, event); + } + } +}; + +module.exports = LinkedValueUtils; + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(9); + +var injected = false; + +var ReactComponentEnvironment = { + /** + * Optionally injectable hook for swapping out mount images in the middle of + * the tree. + */ + replaceNodeWithMarkup: null, + + /** + * Optionally injectable hook for processing a queue of child updates. Will + * later move into MultiChildComponents. + */ + processChildrenUpdates: null, + + injection: { + injectEnvironment: function (environment) { + !!injected ? false ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0; + ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup; + ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates; + injected = true; + } + } +}; + +module.exports = ReactComponentEnvironment; + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Given a `prevElement` and `nextElement`, determines if the existing + * instance should be updated as opposed to being destroyed or replaced by a new + * instance. Both arguments are elements. This ensures that this logic can + * operate on stateless trees without any backing instance. + * + * @param {?object} prevElement + * @param {?object} nextElement + * @return {boolean} True if the existing instance should be updated. + * @protected + */ + +function shouldUpdateReactComponent(prevElement, nextElement) { + var prevEmpty = prevElement === null || prevElement === false; + var nextEmpty = nextElement === null || nextElement === false; + if (prevEmpty || nextEmpty) { + return prevEmpty === nextEmpty; + } + + var prevType = typeof prevElement; + var nextType = typeof nextElement; + if (prevType === 'string' || prevType === 'number') { + return nextType === 'string' || nextType === 'number'; + } else { + return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key; + } +} + +module.exports = shouldUpdateReactComponent; + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + +function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2' + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; +} + +/** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ +function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':' + }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); + + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); +} + +var KeyEscapeUtils = { + escape: escape, + unescape: unescape +}; + +module.exports = KeyEscapeUtils; + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var ReactCurrentOwner = __webpack_require__(37); +var ReactInstanceMap = __webpack_require__(86); +var ReactInstrumentation = __webpack_require__(29); +var ReactUpdates = __webpack_require__(31); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(12); + +function enqueueUpdate(internalInstance) { + ReactUpdates.enqueueUpdate(internalInstance); +} + +function formatUnexpectedArgument(arg) { + var type = typeof arg; + if (type !== 'object') { + return type; + } + var displayName = arg.constructor && arg.constructor.name || type; + var keys = Object.keys(arg); + if (keys.length > 0 && keys.length < 20) { + return displayName + ' (keys: ' + keys.join(', ') + ')'; + } + return displayName; +} + +function getInternalInstanceReadyForUpdate(publicInstance, callerName) { + var internalInstance = ReactInstanceMap.get(publicInstance); + if (!internalInstance) { + if (false) { + var ctor = publicInstance.constructor; + // Only warn when we have a callerName. Otherwise we should be silent. + // We're probably calling from enqueueCallback. We don't want to warn + // there because we already warned for the corresponding lifecycle method. + process.env.NODE_ENV !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0; + } + return null; + } + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + "within `render` or another component's constructor). Render methods " + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0; + } + + return internalInstance; +} + +/** + * ReactUpdateQueue allows for state updates to be scheduled into a later + * reconciliation step. + */ +var ReactUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + if (false) { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0; + owner._warnedAboutRefsInRender = true; + } + } + var internalInstance = ReactInstanceMap.get(publicInstance); + if (internalInstance) { + // During componentWillMount and render this will still be null but after + // that will always render to something. At least for now. So we can use + // this hack. + return !!internalInstance._renderedComponent; + } else { + return false; + } + }, + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @param {string} callerName Name of the calling function in the public API. + * @internal + */ + enqueueCallback: function (publicInstance, callback, callerName) { + ReactUpdateQueue.validateCallback(callback, callerName); + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); + + // Previously we would throw an error if we didn't have an internal + // instance. Since we want to make it a no-op instead, we mirror the same + // behavior we have in other enqueue* methods. + // We also need to ignore callbacks in componentWillMount. See + // enqueueUpdates. + if (!internalInstance) { + return null; + } + + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + // TODO: The callback here is ignored when setState is called from + // componentWillMount. Either fix it or disallow doing so completely in + // favor of getInitialState. Alternatively, we can disallow + // componentWillMount during server-side rendering. + enqueueUpdate(internalInstance); + }, + + enqueueCallbackInternal: function (internalInstance, callback) { + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + enqueueUpdate(internalInstance); + }, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function (publicInstance) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate'); + + if (!internalInstance) { + return; + } + + internalInstance._pendingForceUpdate = true; + + enqueueUpdate(internalInstance); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState, callback) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); + + if (!internalInstance) { + return; + } + + internalInstance._pendingStateQueue = [completeState]; + internalInstance._pendingReplaceState = true; + + // Future-proof 15.5 + if (callback !== undefined && callback !== null) { + ReactUpdateQueue.validateCallback(callback, 'replaceState'); + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + } + + enqueueUpdate(internalInstance); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function (publicInstance, partialState) { + if (false) { + ReactInstrumentation.debugTool.onSetState(); + process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0; + } + + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState'); + + if (!internalInstance) { + return; + } + + var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []); + queue.push(partialState); + + enqueueUpdate(internalInstance); + }, + + enqueueElementInternal: function (internalInstance, nextElement, nextContext) { + internalInstance._pendingElement = nextElement; + // TODO: introduce _pendingContext instead of setting it directly. + internalInstance._context = nextContext; + enqueueUpdate(internalInstance); + }, + + validateCallback: function (callback, callerName) { + !(!callback || typeof callback === 'function') ? false ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0; + } +}; + +module.exports = ReactUpdateQueue; + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var emptyFunction = __webpack_require__(24); +var warning = __webpack_require__(12); + +var validateDOMNesting = emptyFunction; + +if (false) { + // This validation code was written based on the HTML5 parsing spec: + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + // + // Note: this does not catch all invalid nesting, nor does it try to (as it's + // not clear what practical benefit doing so provides); instead, we warn only + // for cases where the parser will give a parse tree differing from what React + // intended. For example,
is invalid but we don't warn + // because it still parses correctly; we do warn for other cases like nested + //

tags where the beginning of the second element implicitly closes the + // first, causing a confusing mess. + + // https://html.spec.whatwg.org/multipage/syntax.html#special + var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; + + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', + + // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point + // TODO: Distinguish by namespace here -- for , including it here + // errs on the side of fewer warnings + 'foreignObject', 'desc', 'title']; + + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope + var buttonScopeTags = inScopeTags.concat(['button']); + + // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags + var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; + + var emptyAncestorInfo = { + current: null, + + formTag: null, + aTagInScope: null, + buttonTagInScope: null, + nobrTagInScope: null, + pTagInButtonScope: null, + + listItemTagAutoclosing: null, + dlItemTagAutoclosing: null + }; + + var updatedAncestorInfo = function (oldInfo, tag, instance) { + var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); + var info = { tag: tag, instance: instance }; + + if (inScopeTags.indexOf(tag) !== -1) { + ancestorInfo.aTagInScope = null; + ancestorInfo.buttonTagInScope = null; + ancestorInfo.nobrTagInScope = null; + } + if (buttonScopeTags.indexOf(tag) !== -1) { + ancestorInfo.pTagInButtonScope = null; + } + + // See rules for 'li', 'dd', 'dt' start tags in + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { + ancestorInfo.listItemTagAutoclosing = null; + ancestorInfo.dlItemTagAutoclosing = null; + } + + ancestorInfo.current = info; + + if (tag === 'form') { + ancestorInfo.formTag = info; + } + if (tag === 'a') { + ancestorInfo.aTagInScope = info; + } + if (tag === 'button') { + ancestorInfo.buttonTagInScope = info; + } + if (tag === 'nobr') { + ancestorInfo.nobrTagInScope = info; + } + if (tag === 'p') { + ancestorInfo.pTagInButtonScope = info; + } + if (tag === 'li') { + ancestorInfo.listItemTagAutoclosing = info; + } + if (tag === 'dd' || tag === 'dt') { + ancestorInfo.dlItemTagAutoclosing = info; + } + + return ancestorInfo; + }; + + /** + * Returns whether + */ + var isTagValidWithParent = function (tag, parentTag) { + // First, let's check if we're in an unusual parsing mode... + switch (parentTag) { + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect + case 'select': + return tag === 'option' || tag === 'optgroup' || tag === '#text'; + case 'optgroup': + return tag === 'option' || tag === '#text'; + // Strictly speaking, seeing an <option> doesn't mean we're in a <select> + // but + case 'option': + return tag === '#text'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption + // No special behavior since these rules fall back to "in body" mode for + // all except special table nodes which cause bad parsing behavior anyway. + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr + case 'tr': + return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody + case 'tbody': + case 'thead': + case 'tfoot': + return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup + case 'colgroup': + return tag === 'col' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable + case 'table': + return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead + case 'head': + return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element + case 'html': + return tag === 'head' || tag === 'body'; + case '#document': + return tag === 'html'; + } + + // Probably in the "in body" parsing mode, so we outlaw only tag combos + // where the parsing rules cause implicit opens or closes to be added. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + switch (tag) { + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6'; + + case 'rp': + case 'rt': + return impliedEndTags.indexOf(parentTag) === -1; + + case 'body': + case 'caption': + case 'col': + case 'colgroup': + case 'frame': + case 'head': + case 'html': + case 'tbody': + case 'td': + case 'tfoot': + case 'th': + case 'thead': + case 'tr': + // These tags are only valid with a few parents that have special child + // parsing rules -- if we're down here, then none of those matched and + // so we allow it only if we don't know what the parent is, as all other + // cases are invalid. + return parentTag == null; + } + + return true; + }; + + /** + * Returns whether + */ + var findInvalidAncestorForTag = function (tag, ancestorInfo) { + switch (tag) { + case 'address': + case 'article': + case 'aside': + case 'blockquote': + case 'center': + case 'details': + case 'dialog': + case 'dir': + case 'div': + case 'dl': + case 'fieldset': + case 'figcaption': + case 'figure': + case 'footer': + case 'header': + case 'hgroup': + case 'main': + case 'menu': + case 'nav': + case 'ol': + case 'p': + case 'section': + case 'summary': + case 'ul': + case 'pre': + case 'listing': + case 'table': + case 'hr': + case 'xmp': + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ancestorInfo.pTagInButtonScope; + + case 'form': + return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; + + case 'li': + return ancestorInfo.listItemTagAutoclosing; + + case 'dd': + case 'dt': + return ancestorInfo.dlItemTagAutoclosing; + + case 'button': + return ancestorInfo.buttonTagInScope; + + case 'a': + // Spec says something about storing a list of markers, but it sounds + // equivalent to this check. + return ancestorInfo.aTagInScope; + + case 'nobr': + return ancestorInfo.nobrTagInScope; + } + + return null; + }; + + /** + * Given a ReactCompositeComponent instance, return a list of its recursive + * owners, starting at the root and ending with the instance itself. + */ + var findOwnerStack = function (instance) { + if (!instance) { + return []; + } + + var stack = []; + do { + stack.push(instance); + } while (instance = instance._currentElement._owner); + stack.reverse(); + return stack; + }; + + var didWarn = {}; + + validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + + if (childText != null) { + process.env.NODE_ENV !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0; + childTag = '#text'; + } + + var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; + var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); + var problematic = invalidParent || invalidAncestor; + + if (problematic) { + var ancestorTag = problematic.tag; + var ancestorInstance = problematic.instance; + + var childOwner = childInstance && childInstance._currentElement._owner; + var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner; + + var childOwners = findOwnerStack(childOwner); + var ancestorOwners = findOwnerStack(ancestorOwner); + + var minStackLen = Math.min(childOwners.length, ancestorOwners.length); + var i; + + var deepestCommon = -1; + for (i = 0; i < minStackLen; i++) { + if (childOwners[i] === ancestorOwners[i]) { + deepestCommon = i; + } else { + break; + } + } + + var UNKNOWN = '(unknown)'; + var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) { + return inst.getName() || UNKNOWN; + }); + var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) { + return inst.getName() || UNKNOWN; + }); + var ownerInfo = [].concat( + // If the parent and child instances have a common owner ancestor, start + // with that -- otherwise we just start with the parent's owners. + deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag, + // If we're warning about an invalid (non-parent) ancestry, add '...' + invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > '); + + var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo; + if (didWarn[warnKey]) { + return; + } + didWarn[warnKey] = true; + + var tagDisplayName = childTag; + var whitespaceInfo = ''; + if (childTag === '#text') { + if (/\S/.test(childText)) { + tagDisplayName = 'Text nodes'; + } else { + tagDisplayName = 'Whitespace text nodes'; + whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.'; + } + } else { + tagDisplayName = '<' + childTag + '>'; + } + + if (invalidParent) { + var info = ''; + if (ancestorTag === 'table' && childTag === 'tr') { + info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.'; + } + process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0; + } else { + process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0; + } + } + }; + + validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo; + + // For testing + validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo); + }; +} + +module.exports = validateDOMNesting; + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * `charCode` represents the actual "character code" and is safe to use with + * `String.fromCharCode`. As such, only keys that correspond to printable + * characters produce a valid `charCode`, the only exception to this is Enter. + * The Tab-key is considered non-printable and does not have a `charCode`, + * presumably because it does not produce a tab-character in browsers. + * + * @param {object} nativeEvent Native browser event. + * @return {number} Normalized `charCode` property. + */ + +function getEventCharCode(nativeEvent) { + var charCode; + var keyCode = nativeEvent.keyCode; + + if ('charCode' in nativeEvent) { + charCode = nativeEvent.charCode; + + // FF does not set `charCode` for the Enter-key, check against `keyCode`. + if (charCode === 0 && keyCode === 13) { + charCode = 13; + } + } else { + // IE8 does not implement `charCode`, but `keyCode` has the correct value. + charCode = keyCode; + } + + // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. + // Must not discard the (non-)printable Enter-key. + if (charCode >= 32 || charCode === 13) { + return charCode; + } + + return 0; +} + +module.exports = getEventCharCode; + +/***/ }), +/* 156 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(430); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_0__Router__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(244); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_1__Link__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(438); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexLink", function() { return __WEBPACK_IMPORTED_MODULE_2__IndexLink__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(439); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_3__withRouter__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(440); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRedirect", function() { return __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(441); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRoute", function() { return __WEBPACK_IMPORTED_MODULE_5__IndexRoute__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(245); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(442); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(45); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createRoutes", function() { return __WEBPACK_IMPORTED_MODULE_8__RouteUtils__["b"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(158); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "RouterContext", function() { return __WEBPACK_IMPORTED_MODULE_9__RouterContext__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(160); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "locationShape", function() { return __WEBPACK_IMPORTED_MODULE_10__PropTypes__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "routerShape", function() { return __WEBPACK_IMPORTED_MODULE_10__PropTypes__["b"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(443); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "match", function() { return __WEBPACK_IMPORTED_MODULE_11__match__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(249); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useRouterHistory", function() { return __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(74); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formatPattern", function() { return __WEBPACK_IMPORTED_MODULE_13__PatternUtils__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = __webpack_require__(448); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyRouterMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(449); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "browserHistory", function() { return __WEBPACK_IMPORTED_MODULE_15__browserHistory__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(452); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hashHistory", function() { return __WEBPACK_IMPORTED_MODULE_16__hashHistory__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(246); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createMemoryHistory", function() { return __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__["a"]; }); +/* components */ + + + + + + + + + +/* components (configuration) */ + + + + + + + + + + +/* utils */ + + + + + + + + + + + + + + + +/* histories */ + + + + + + + + +/***/ }), +/* 157 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = loopAsync; +/* harmony export (immutable) */ __webpack_exports__["b"] = mapAsync; +function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var sync = false, + hasNext = false, + doneArgs = void 0; + + function done() { + isDone = true; + if (sync) { + // Iterate instead of recursing if possible. + doneArgs = [].concat(Array.prototype.slice.call(arguments)); + return; + } + + callback.apply(this, arguments); + } + + function next() { + if (isDone) { + return; + } + + hasNext = true; + if (sync) { + // Iterate instead of recursing if possible. + return; + } + + sync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work.call(this, currentTurn++, next, done); + } + + sync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(this, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + } + + next(); +} + +function mapAsync(array, work, callback) { + var length = array.length; + var values = []; + + if (length === 0) return callback(null, values); + + var isDone = false, + doneCount = 0; + + function done(index, error, value) { + if (isDone) return; + + if (error) { + isDone = true; + callback(error); + } else { + values[index] = value; + + isDone = ++doneCount === length; + + if (isDone) callback(null, values); + } + } + + array.forEach(function (item, index) { + work(item, index, function (error, value) { + done(index, error, value); + }); + }); +} + +/***/ }), +/* 158 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getRouteParams__ = __webpack_require__(437); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(159); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouteUtils__ = __webpack_require__(45); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + + + + + + + + + + +/** + * A <RouterContext> renders the component tree for a given router state + * and sets the history object and the current location in context. + */ +var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'RouterContext', + + mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__["a" /* ContextProvider */])('router')], + + propTypes: { + router: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"].isRequired, + location: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"].isRequired, + routes: __WEBPACK_IMPORTED_MODULE_3_prop_types__["array"].isRequired, + params: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"].isRequired, + components: __WEBPACK_IMPORTED_MODULE_3_prop_types__["array"].isRequired, + createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"].isRequired + }, + + getDefaultProps: function getDefaultProps() { + return { + createElement: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement + }; + }, + + + childContextTypes: { + router: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"].isRequired + }, + + getChildContext: function getChildContext() { + return { + router: this.props.router + }; + }, + createElement: function createElement(component, props) { + return component == null ? null : this.props.createElement(component, props); + }, + render: function render() { + var _this = this; + + var _props = this.props, + location = _props.location, + routes = _props.routes, + params = _props.params, + components = _props.components, + router = _props.router; + + var element = null; + + if (components) { + element = components.reduceRight(function (element, components, index) { + if (components == null) return element; // Don't create new children; use the grandchildren. + + var route = routes[index]; + var routeParams = Object(__WEBPACK_IMPORTED_MODULE_4__getRouteParams__["a" /* default */])(route, params); + var props = { + location: location, + params: params, + route: route, + router: router, + routeParams: routeParams, + routes: routes + }; + + if (Object(__WEBPACK_IMPORTED_MODULE_6__RouteUtils__["c" /* isReactChildren */])(element)) { + props.children = element; + } else if (element) { + for (var prop in element) { + if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop]; + } + } + + if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) === 'object') { + var elements = {}; + + for (var key in components) { + if (Object.prototype.hasOwnProperty.call(components, key)) { + // Pass through the key as a prop to createElement to allow + // custom createElement functions to know which named component + // they're rendering, for e.g. matching up to fetched data. + elements[key] = _this.createElement(components[key], _extends({ + key: key }, props)); + } + } + + return elements; + } + + return _this.createElement(components, props); + }, element); + } + + !(element === null || element === false || __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element)) ? false ? invariant(false, 'The root route must render a single element') : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + + return element; + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (RouterContext); + +/***/ }), +/* 159 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = ContextProvider; +/* harmony export (immutable) */ __webpack_exports__["b"] = ContextSubscriber; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); + + +// Works around issues with context updates failing to propagate. +// Caveat: the context value is expected to never change its identity. +// https://github.com/facebook/react/issues/2517 +// https://github.com/reactjs/react-router/issues/470 + +var contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, + eventIndex: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired +}); + +function makeContextName(name) { + return '@@contextSubscriber/' + name; +} + +function ContextProvider(name) { + var _childContextTypes, _ref2; + + var contextName = makeContextName(name); + var listenersKey = contextName + '/listeners'; + var eventIndexKey = contextName + '/eventIndex'; + var subscribeKey = contextName + '/subscribe'; + + return _ref2 = { + childContextTypes: (_childContextTypes = {}, _childContextTypes[contextName] = contextProviderShape.isRequired, _childContextTypes), + + getChildContext: function getChildContext() { + var _ref; + + return _ref = {}, _ref[contextName] = { + eventIndex: this[eventIndexKey], + subscribe: this[subscribeKey] + }, _ref; + }, + componentWillMount: function componentWillMount() { + this[listenersKey] = []; + this[eventIndexKey] = 0; + }, + componentWillReceiveProps: function componentWillReceiveProps() { + this[eventIndexKey]++; + }, + componentDidUpdate: function componentDidUpdate() { + var _this = this; + + this[listenersKey].forEach(function (listener) { + return listener(_this[eventIndexKey]); + }); + } + }, _ref2[subscribeKey] = function (listener) { + var _this2 = this; + + // No need to immediately call listener here. + this[listenersKey].push(listener); + + return function () { + _this2[listenersKey] = _this2[listenersKey].filter(function (item) { + return item !== listener; + }); + }; + }, _ref2; +} + +function ContextSubscriber(name) { + var _contextTypes, _ref4; + + var contextName = makeContextName(name); + var lastRenderedEventIndexKey = contextName + '/lastRenderedEventIndex'; + var handleContextUpdateKey = contextName + '/handleContextUpdate'; + var unsubscribeKey = contextName + '/unsubscribe'; + + return _ref4 = { + contextTypes: (_contextTypes = {}, _contextTypes[contextName] = contextProviderShape, _contextTypes), + + getInitialState: function getInitialState() { + var _ref3; + + if (!this.context[contextName]) { + return {}; + } + + return _ref3 = {}, _ref3[lastRenderedEventIndexKey] = this.context[contextName].eventIndex, _ref3; + }, + componentDidMount: function componentDidMount() { + if (!this.context[contextName]) { + return; + } + + this[unsubscribeKey] = this.context[contextName].subscribe(this[handleContextUpdateKey]); + }, + componentWillReceiveProps: function componentWillReceiveProps() { + var _setState; + + if (!this.context[contextName]) { + return; + } + + this.setState((_setState = {}, _setState[lastRenderedEventIndexKey] = this.context[contextName].eventIndex, _setState)); + }, + componentWillUnmount: function componentWillUnmount() { + if (!this[unsubscribeKey]) { + return; + } + + this[unsubscribeKey](); + this[unsubscribeKey] = null; + } + }, _ref4[handleContextUpdateKey] = function (eventIndex) { + if (eventIndex !== this.state[lastRenderedEventIndexKey]) { + var _setState2; + + this.setState((_setState2 = {}, _setState2[lastRenderedEventIndexKey] = eventIndex, _setState2)); + } + }, _ref4; +} + +/***/ }), +/* 160 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return routerShape; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return locationShape; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); + + +var routerShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["shape"])({ + push: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, + replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, + go: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, + goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, + goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, + setRouteLeaveHook: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired, + isActive: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired +}); + +var locationShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["shape"])({ + pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"].isRequired, + search: __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"].isRequired, + state: __WEBPACK_IMPORTED_MODULE_0_prop_types__["object"], + action: __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"].isRequired, + key: __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"] +}); + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + + +var REACT_STATICS = { + childContextTypes: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + mixins: true, + propTypes: true, + type: true +}; + +var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + arguments: true, + arity: true +}; + +var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function'; + +module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { + if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components + var keys = Object.getOwnPropertyNames(sourceComponent); + + /* istanbul ignore else */ + if (isGetOwnPropertySymbolsAvailable) { + keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); + } + + for (var i = 0; i < keys.length; ++i) { + if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) { + try { + targetComponent[keys[i]] = sourceComponent[keys[i]]; + } catch (error) { + + } + } + } + } + + return targetComponent; +}; + + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var runTransitionHook = function runTransitionHook(hook, location, callback) { + var result = hook(location, callback); + + if (hook.length < 2) { + // Assume the hook runs synchronously and automatically + // call the callback with the return value. + callback(result); + } else { + false ? (0, _warning2.default)(result === undefined, 'You should not "return" in a transition hook with a callback argument; ' + 'call the callback instead') : void 0; + } +}; + +exports.default = runTransitionHook; + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _AsyncUtils = __webpack_require__(447); + +var _PathUtils = __webpack_require__(46); + +var _runTransitionHook = __webpack_require__(162); + +var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + +var _Actions = __webpack_require__(109); + +var _LocationUtils = __webpack_require__(75); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createHistory = function createHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var getCurrentLocation = options.getCurrentLocation, + getUserConfirmation = options.getUserConfirmation, + pushLocation = options.pushLocation, + replaceLocation = options.replaceLocation, + go = options.go, + keyLength = options.keyLength; + + + var currentLocation = void 0; + var pendingLocation = void 0; + var beforeListeners = []; + var listeners = []; + var allKeys = []; + + var getCurrentIndex = function getCurrentIndex() { + if (pendingLocation && pendingLocation.action === _Actions.POP) return allKeys.indexOf(pendingLocation.key); + + if (currentLocation) return allKeys.indexOf(currentLocation.key); + + return -1; + }; + + var updateLocation = function updateLocation(nextLocation) { + var currentIndex = getCurrentIndex(); + + currentLocation = nextLocation; + + if (currentLocation.action === _Actions.PUSH) { + allKeys = [].concat(allKeys.slice(0, currentIndex + 1), [currentLocation.key]); + } else if (currentLocation.action === _Actions.REPLACE) { + allKeys[currentIndex] = currentLocation.key; + } + + listeners.forEach(function (listener) { + return listener(currentLocation); + }); + }; + + var listenBefore = function listenBefore(listener) { + beforeListeners.push(listener); + + return function () { + return beforeListeners = beforeListeners.filter(function (item) { + return item !== listener; + }); + }; + }; + + var listen = function listen(listener) { + listeners.push(listener); + + return function () { + return listeners = listeners.filter(function (item) { + return item !== listener; + }); + }; + }; + + var confirmTransitionTo = function confirmTransitionTo(location, callback) { + (0, _AsyncUtils.loopAsync)(beforeListeners.length, function (index, next, done) { + (0, _runTransitionHook2.default)(beforeListeners[index], location, function (result) { + return result != null ? done(result) : next(); + }); + }, function (message) { + if (getUserConfirmation && typeof message === 'string') { + getUserConfirmation(message, function (ok) { + return callback(ok !== false); + }); + } else { + callback(message !== false); + } + }); + }; + + var transitionTo = function transitionTo(nextLocation) { + if (currentLocation && (0, _LocationUtils.locationsAreEqual)(currentLocation, nextLocation) || pendingLocation && (0, _LocationUtils.locationsAreEqual)(pendingLocation, nextLocation)) return; // Nothing to do + + pendingLocation = nextLocation; + + confirmTransitionTo(nextLocation, function (ok) { + if (pendingLocation !== nextLocation) return; // Transition was interrupted during confirmation + + pendingLocation = null; + + if (ok) { + // Treat PUSH to same path like REPLACE to be consistent with browsers + if (nextLocation.action === _Actions.PUSH) { + var prevPath = (0, _PathUtils.createPath)(currentLocation); + var nextPath = (0, _PathUtils.createPath)(nextLocation); + + if (nextPath === prevPath && (0, _LocationUtils.statesAreEqual)(currentLocation.state, nextLocation.state)) nextLocation.action = _Actions.REPLACE; + } + + if (nextLocation.action === _Actions.POP) { + updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.PUSH) { + if (pushLocation(nextLocation) !== false) updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.REPLACE) { + if (replaceLocation(nextLocation) !== false) updateLocation(nextLocation); + } + } else if (currentLocation && nextLocation.action === _Actions.POP) { + var prevIndex = allKeys.indexOf(currentLocation.key); + var nextIndex = allKeys.indexOf(nextLocation.key); + + if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL + } + }); + }; + + var push = function push(input) { + return transitionTo(createLocation(input, _Actions.PUSH)); + }; + + var replace = function replace(input) { + return transitionTo(createLocation(input, _Actions.REPLACE)); + }; + + var goBack = function goBack() { + return go(-1); + }; + + var goForward = function goForward() { + return go(1); + }; + + var createKey = function createKey() { + return Math.random().toString(36).substr(2, keyLength || 6); + }; + + var createHref = function createHref(location) { + return (0, _PathUtils.createPath)(location); + }; + + var createLocation = function createLocation(location, action) { + var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createKey(); + return (0, _LocationUtils.createLocation)(location, action, key); + }; + + return { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + transitionTo: transitionTo, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + createKey: createKey, + createPath: _PathUtils.createPath, + createHref: createHref, + createLocation: createLocation + }; +}; + +exports.default = createHistory; + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.go = exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getUserConfirmation = exports.getCurrentLocation = undefined; + +var _LocationUtils = __webpack_require__(75); + +var _DOMUtils = __webpack_require__(110); + +var _DOMStateStorage = __webpack_require__(250); + +var _PathUtils = __webpack_require__(46); + +var _ExecutionEnvironment = __webpack_require__(164); + +var PopStateEvent = 'popstate'; +var HashChangeEvent = 'hashchange'; + +var needsHashchangeListener = _ExecutionEnvironment.canUseDOM && !(0, _DOMUtils.supportsPopstateOnHashchange)(); + +var _createLocation = function _createLocation(historyState) { + var key = historyState && historyState.key; + + return (0, _LocationUtils.createLocation)({ + pathname: window.location.pathname, + search: window.location.search, + hash: window.location.hash, + state: key ? (0, _DOMStateStorage.readState)(key) : undefined + }, undefined, key); +}; + +var getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() { + var historyState = void 0; + try { + historyState = window.history.state || {}; + } catch (error) { + // IE 11 sometimes throws when accessing window.history.state + // See https://github.com/ReactTraining/history/pull/289 + historyState = {}; + } + + return _createLocation(historyState); +}; + +var getUserConfirmation = exports.getUserConfirmation = function getUserConfirmation(message, callback) { + return callback(window.confirm(message)); +}; // eslint-disable-line no-alert + +var startListener = exports.startListener = function startListener(listener) { + var handlePopState = function handlePopState(event) { + if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) // Ignore extraneous popstate events in WebKit + return; + listener(_createLocation(event.state)); + }; + + (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState); + + var handleUnpoppedHashChange = function handleUnpoppedHashChange() { + return listener(getCurrentLocation()); + }; + + if (needsHashchangeListener) { + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + + return function () { + (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState); + + if (needsHashchangeListener) { + (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + }; +}; + +var updateLocation = function updateLocation(location, updateState) { + var state = location.state, + key = location.key; + + + if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state); + + updateState({ key: key }, (0, _PathUtils.createPath)(location)); +}; + +var pushLocation = exports.pushLocation = function pushLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.pushState(state, null, path); + }); +}; + +var replaceLocation = exports.replaceLocation = function replaceLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.replaceState(state, null, path); + }); +}; + +var go = exports.go = function go(n) { + if (n) window.history.go(n); +}; + +/***/ }), +/* 166 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(254); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(54); + + + + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) != objectTag) { + return false; + } + var proto = Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +/* harmony default export */ __webpack_exports__["a"] = (isPlainObject); + + +/***/ }), +/* 167 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefix", function() { return prefix; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_INSERT", function() { return ARRAY_INSERT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_MOVE", function() { return ARRAY_MOVE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_POP", function() { return ARRAY_POP; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_PUSH", function() { return ARRAY_PUSH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_REMOVE", function() { return ARRAY_REMOVE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_REMOVE_ALL", function() { return ARRAY_REMOVE_ALL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_SHIFT", function() { return ARRAY_SHIFT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_SPLICE", function() { return ARRAY_SPLICE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_UNSHIFT", function() { return ARRAY_UNSHIFT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_SWAP", function() { return ARRAY_SWAP; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AUTOFILL", function() { return AUTOFILL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BLUR", function() { return BLUR; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CHANGE", function() { return CHANGE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_SUBMIT", function() { return CLEAR_SUBMIT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_SUBMIT_ERRORS", function() { return CLEAR_SUBMIT_ERRORS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_ASYNC_ERROR", function() { return CLEAR_ASYNC_ERROR; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DESTROY", function() { return DESTROY; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOCUS", function() { return FOCUS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INITIALIZE", function() { return INITIALIZE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REGISTER_FIELD", function() { return REGISTER_FIELD; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RESET", function() { return RESET; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SET_SUBMIT_FAILED", function() { return SET_SUBMIT_FAILED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SET_SUBMIT_SUCCEEDED", function() { return SET_SUBMIT_SUCCEEDED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "START_ASYNC_VALIDATION", function() { return START_ASYNC_VALIDATION; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "START_SUBMIT", function() { return START_SUBMIT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STOP_ASYNC_VALIDATION", function() { return STOP_ASYNC_VALIDATION; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STOP_SUBMIT", function() { return STOP_SUBMIT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUBMIT", function() { return SUBMIT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TOUCH", function() { return TOUCH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNREGISTER_FIELD", function() { return UNREGISTER_FIELD; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNTOUCH", function() { return UNTOUCH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_SYNC_ERRORS", function() { return UPDATE_SYNC_ERRORS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_SYNC_WARNINGS", function() { return UPDATE_SYNC_WARNINGS; }); +var prefix = '@@redux-form/'; + +var ARRAY_INSERT = prefix + 'ARRAY_INSERT'; +var ARRAY_MOVE = prefix + 'ARRAY_MOVE'; +var ARRAY_POP = prefix + 'ARRAY_POP'; +var ARRAY_PUSH = prefix + 'ARRAY_PUSH'; +var ARRAY_REMOVE = prefix + 'ARRAY_REMOVE'; +var ARRAY_REMOVE_ALL = prefix + 'ARRAY_REMOVE_ALL'; +var ARRAY_SHIFT = prefix + 'ARRAY_SHIFT'; +var ARRAY_SPLICE = prefix + 'ARRAY_SPLICE'; +var ARRAY_UNSHIFT = prefix + 'ARRAY_UNSHIFT'; +var ARRAY_SWAP = prefix + 'ARRAY_SWAP'; +var AUTOFILL = prefix + 'AUTOFILL'; +var BLUR = prefix + 'BLUR'; +var CHANGE = prefix + 'CHANGE'; +var CLEAR_SUBMIT = prefix + 'CLEAR_SUBMIT'; +var CLEAR_SUBMIT_ERRORS = prefix + 'CLEAR_SUBMIT_ERRORS'; +var CLEAR_ASYNC_ERROR = prefix + 'CLEAR_ASYNC_ERROR'; +var DESTROY = prefix + 'DESTROY'; +var FOCUS = prefix + 'FOCUS'; +var INITIALIZE = prefix + 'INITIALIZE'; +var REGISTER_FIELD = prefix + 'REGISTER_FIELD'; +var RESET = prefix + 'RESET'; +var SET_SUBMIT_FAILED = prefix + 'SET_SUBMIT_FAILED'; +var SET_SUBMIT_SUCCEEDED = prefix + 'SET_SUBMIT_SUCCEEDED'; +var START_ASYNC_VALIDATION = prefix + 'START_ASYNC_VALIDATION'; +var START_SUBMIT = prefix + 'START_SUBMIT'; +var STOP_ASYNC_VALIDATION = prefix + 'STOP_ASYNC_VALIDATION'; +var STOP_SUBMIT = prefix + 'STOP_SUBMIT'; +var SUBMIT = prefix + 'SUBMIT'; +var TOUCH = prefix + 'TOUCH'; +var UNREGISTER_FIELD = prefix + 'UNREGISTER_FIELD'; +var UNTOUCH = prefix + 'UNTOUCH'; +var UPDATE_SYNC_ERRORS = prefix + 'UPDATE_SYNC_ERRORS'; +var UPDATE_SYNC_WARNINGS = prefix + 'UPDATE_SYNC_WARNINGS'; + +/***/ }), +/* 168 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__ = __webpack_require__(504); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__ = __webpack_require__(520); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__ = __webpack_require__(522); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__ = __webpack_require__(523); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__ = __webpack_require__(524); + + + + + + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__["a" /* default */]; +MapCache.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__["a" /* default */]; +MapCache.prototype.get = __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__["a" /* default */]; +MapCache.prototype.has = __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__["a" /* default */]; +MapCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (MapCache); + + +/***/ }), +/* 169 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(48); + + + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!Object(__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" /* default */])(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +/* harmony default export */ __webpack_exports__["a"] = (isFunction); + + +/***/ }), +/* 170 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32); + + + +/* Built-in method references that are verified to be native. */ +var Map = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Map'); + +/* harmony default export */ __webpack_exports__["a"] = (Map); + + +/***/ }), +/* 171 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__ = __webpack_require__(528); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54); + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && !Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(other))) { + return value !== value && other !== other; + } + return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__["a" /* default */])(value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsEqual); + + +/***/ }), +/* 172 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(117); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stackClear_js__ = __webpack_require__(529); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__ = __webpack_require__(530); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stackGet_js__ = __webpack_require__(531); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stackHas_js__ = __webpack_require__(532); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stackSet_js__ = __webpack_require__(533); + + + + + + + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */](entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = __WEBPACK_IMPORTED_MODULE_1__stackClear_js__["a" /* default */]; +Stack.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__["a" /* default */]; +Stack.prototype.get = __WEBPACK_IMPORTED_MODULE_3__stackGet_js__["a" /* default */]; +Stack.prototype.has = __WEBPACK_IMPORTED_MODULE_4__stackHas_js__["a" /* default */]; +Stack.prototype.set = __WEBPACK_IMPORTED_MODULE_5__stackSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (Stack); + + +/***/ }), +/* 173 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(280); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__ = __webpack_require__(555); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(120); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return Object(__WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */])(object) ? Object(__WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */])(object) : Object(__WEBPACK_IMPORTED_MODULE_1__baseKeys_js__["a" /* default */])(object); +} + +/* harmony default export */ __webpack_exports__["a"] = (keys); + + +/***/ }), +/* 174 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__ = __webpack_require__(550); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = Object(__WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */])(function() { return arguments; }()) ? __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */] : function(value) { + return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +/* harmony default export */ __webpack_exports__["a"] = (isArguments); + + +/***/ }), +/* 175 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__ = __webpack_require__(551); + + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isBuffer); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(176)(module))) + +/***/ }), +/* 176 */ +/***/ (function(module, exports) { + +module.exports = function(originalModule) { + if(!originalModule.webpackPolyfill) { + var module = Object.create(originalModule); + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + Object.defineProperty(module, "exports", { + enumerable: true, + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), +/* 177 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/* harmony default export */ __webpack_exports__["a"] = (isIndex); + + +/***/ }), +/* 178 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__ = __webpack_require__(552); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(553); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(554); + + + + +/* Node.js helper references. */ +var nodeIsTypedArray = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? Object(__WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */])(nodeIsTypedArray) : __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isTypedArray); + + +/***/ }), +/* 179 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/* harmony default export */ __webpack_exports__["a"] = (isLength); + + +/***/ }), +/* 180 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/* harmony default export */ __webpack_exports__["a"] = (isPrototype); + + +/***/ }), +/* 181 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(115); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */])(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || Object(__WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" /* default */])(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (isKey); + + +/***/ }), +/* 182 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +/* harmony default export */ __webpack_exports__["a"] = (identity); + + +/***/ }), +/* 183 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hasError__ = __webpack_require__(609); + + +var createIsValid = function createIsValid(structure) { + var getIn = structure.getIn, + keys = structure.keys; + + var hasError = Object(__WEBPACK_IMPORTED_MODULE_0__hasError__["a" /* default */])(structure); + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + var ignoreSubmitErrors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + return function (state) { + var formState = getFormState(state); + var syncError = getIn(formState, form + '.syncError'); + if (syncError) { + return false; + } + if (!ignoreSubmitErrors) { + var error = getIn(formState, form + '.error'); + if (error) { + return false; + } + } + var syncErrors = getIn(formState, form + '.syncErrors'); + var asyncErrors = getIn(formState, form + '.asyncErrors'); + var submitErrors = ignoreSubmitErrors ? undefined : getIn(formState, form + '.submitErrors'); + if (!syncErrors && !asyncErrors && !submitErrors) { + return true; + } + + var registeredFields = getIn(formState, form + '.registeredFields'); + if (!registeredFields) { + return true; + } + + return !keys(registeredFields).filter(function (name) { + return getIn(registeredFields, '[\'' + name + '\'].count') > 0; + }).some(function (name) { + return hasError(getIn(registeredFields, '[\'' + name + '\']'), syncErrors, asyncErrors, submitErrors); + }); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsValid); + +/***/ }), +/* 184 */ +/***/ (function(module, exports) { + +module.exports = isPromise; + +function isPromise(obj) { + return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; +} + + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(662), __esModule: true }; + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(36); +var dPs = __webpack_require__(668); +var enumBugKeys = __webpack_require__(138); +var IE_PROTO = __webpack_require__(136)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(131)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(297).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(22); + + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(23); +var core = __webpack_require__(18); +var LIBRARY = __webpack_require__(122); +var wksExt = __webpack_require__(187); +var defineProperty = __webpack_require__(35).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _from = __webpack_require__(302); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } else { + return (0, _from2.default)(arr); + } +}; + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(191); +var ITERATOR = __webpack_require__(22)('iterator'); +var Iterators = __webpack_require__(78); +module.exports = __webpack_require__(18).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(83); +var TAG = __webpack_require__(22)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + iconSize: 24, + + desktopGutter: 24, + desktopGutterMore: 32, + desktopGutterLess: 16, + desktopGutterMini: 8, + desktopKeylineIncrement: 64, + desktopDropDownMenuItemHeight: 32, + desktopDropDownMenuFontSize: 15, + desktopDrawerMenuItemHeight: 48, + desktopSubheaderHeight: 48, + desktopToolbarHeight: 56 +}; + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +// helper to capitalize strings + +exports.default = function (str) { + return str.charAt(0).toUpperCase() + str.slice(1); +}; + +module.exports = exports["default"]; + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (value) { + if (Array.isArray(value)) value = value.join(','); + + return value.match(/-webkit-|-moz-|-ms-/) !== null; +}; + +module.exports = exports['default']; + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _Subheader = __webpack_require__(312); + +var _Subheader2 = _interopRequireDefault(_Subheader); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var List = function (_Component) { + (0, _inherits3.default)(List, _Component); + + function List() { + (0, _classCallCheck3.default)(this, List); + return (0, _possibleConstructorReturn3.default)(this, (List.__proto__ || (0, _getPrototypeOf2.default)(List)).apply(this, arguments)); + } + + (0, _createClass3.default)(List, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var hasSubheader = false; + + var firstChild = _react.Children.toArray(children)[0]; + if ((0, _react.isValidElement)(firstChild) && firstChild.type === _Subheader2.default) { + hasSubheader = true; + } + + var styles = { + root: { + padding: (hasSubheader ? 0 : 8) + 'px 0px 8px 0px' + } + }; + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + children + ); + } + }]); + return List; +}(_react.Component); + +List.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? List.propTypes = { + /** + * These are usually `ListItem`s that are passed to + * be part of the list. + */ + children: _react.PropTypes.node, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = List; + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + once: function once(el, type, callback) { + var typeArray = type ? type.split(' ') : []; + var recursiveFunction = function recursiveFunction(event) { + event.target.removeEventListener(event.type, recursiveFunction); + return callback(event); + }; + + for (var i = typeArray.length - 1; i >= 0; i--) { + this.on(el, typeArray[i], recursiveFunction); + } + }, + on: function on(el, type, callback) { + if (el.addEventListener) { + el.addEventListener(type, callback); + } else { + // IE8+ Support + el.attachEvent('on' + type, function () { + callback.call(el); + }); + } + }, + off: function off(el, type, callback) { + if (el.removeEventListener) { + el.removeEventListener(type, callback); + } else { + // IE8+ Support + el.detachEvent('on' + type, callback); + } + }, + isKeyboard: function isKeyboard(event) { + return ['keydown', 'keypress', 'keyup'].indexOf(event.type) !== -1; + } +}; + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(58); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _autoPrefix = __webpack_require__(94); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _ScaleIn = __webpack_require__(731); + +var _ScaleIn2 = _interopRequireDefault(_ScaleIn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var pulsateDuration = 750; + +var FocusRipple = function (_Component) { + (0, _inherits3.default)(FocusRipple, _Component); + + function FocusRipple() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, FocusRipple); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FocusRipple.__proto__ || (0, _getPrototypeOf2.default)(FocusRipple)).call.apply(_ref, [this].concat(args))), _this), _this.pulsate = function () { + var innerCircle = _reactDom2.default.findDOMNode(_this.refs.innerCircle); + if (!innerCircle) return; + + var startScale = 'scale(1)'; + var endScale = 'scale(0.85)'; + var currentScale = innerCircle.style.transform || startScale; + var nextScale = currentScale === startScale ? endScale : startScale; + + _autoPrefix2.default.set(innerCircle.style, 'transform', nextScale); + _this.timeout = setTimeout(_this.pulsate, pulsateDuration); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(FocusRipple, [{ + key: 'componentDidMount', + value: function componentDidMount() { + if (this.props.show) { + this.setRippleSize(); + this.pulsate(); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + if (this.props.show) { + this.setRippleSize(); + this.pulsate(); + } else { + if (this.timeout) clearTimeout(this.timeout); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.timeout); + } + }, { + key: 'getRippleElement', + value: function getRippleElement(props) { + var color = props.color, + innerStyle = props.innerStyle, + opacity = props.opacity; + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + ripple = _context$muiTheme.ripple; + + + var innerStyles = (0, _simpleAssign2.default)({ + position: 'absolute', + height: '100%', + width: '100%', + borderRadius: '50%', + opacity: opacity ? opacity : 0.16, + backgroundColor: color || ripple.color, + transition: _transitions2.default.easeOut(pulsateDuration + 'ms', 'transform', null, _transitions2.default.easeInOutFunction) + }, innerStyle); + + return _react2.default.createElement('div', { ref: 'innerCircle', style: prepareStyles((0, _simpleAssign2.default)({}, innerStyles)) }); + } + }, { + key: 'setRippleSize', + value: function setRippleSize() { + var el = _reactDom2.default.findDOMNode(this.refs.innerCircle); + var height = el.offsetHeight; + var width = el.offsetWidth; + var size = Math.max(height, width); + + var oldTop = 0; + // For browsers that don't support endsWith() + if (el.style.top.indexOf('px', el.style.top.length - 2) !== -1) { + oldTop = parseInt(el.style.top); + } + el.style.height = size + 'px'; + el.style.top = height / 2 - size / 2 + oldTop + 'px'; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + show = _props.show, + style = _props.style; + + + var mergedRootStyles = (0, _simpleAssign2.default)({ + height: '100%', + width: '100%', + position: 'absolute', + top: 0, + left: 0 + }, style); + + var ripple = show ? this.getRippleElement(this.props) : null; + + return _react2.default.createElement( + _ScaleIn2.default, + { + maxScale: 0.85, + style: mergedRootStyles + }, + ripple + ); + } + }]); + return FocusRipple; +}(_react.Component); + +FocusRipple.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? FocusRipple.propTypes = { + color: _react.PropTypes.string, + innerStyle: _react.PropTypes.object, + opacity: _react.PropTypes.number, + show: _react.PropTypes.bool, + style: _react.PropTypes.object +} : void 0; +exports.default = FocusRipple; + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _FlatButton = __webpack_require__(766); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _FlatButton2.default; + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _toArray2 = __webpack_require__(315); + +var _toArray3 = _interopRequireDefault(_toArray2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(58); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _ClickAwayListener = __webpack_require__(320); + +var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener); + +var _keycode = __webpack_require__(30); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _propTypes = __webpack_require__(41); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _List = __webpack_require__(195); + +var _List2 = _interopRequireDefault(_List); + +var _menuUtils = __webpack_require__(775); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var desktop = props.desktop, + maxHeight = props.maxHeight, + width = props.width; + var muiTheme = context.muiTheme; + + + var styles = { + root: { + // Nested div bacause the List scales x faster than it scales y + zIndex: muiTheme.zIndex.menu, + maxHeight: maxHeight, + overflowY: maxHeight ? 'auto' : null + }, + divider: { + marginTop: 7, + marginBottom: 8 + }, + list: { + display: 'table-cell', + paddingBottom: desktop ? 16 : 8, + paddingTop: desktop ? 16 : 8, + userSelect: 'none', + width: width + }, + selectedMenuItem: { + color: muiTheme.menuItem.selectedTextColor + } + }; + + return styles; +} + +var Menu = function (_Component) { + (0, _inherits3.default)(Menu, _Component); + + function Menu(props, context) { + (0, _classCallCheck3.default)(this, Menu); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Menu.__proto__ || (0, _getPrototypeOf2.default)(Menu)).call(this, props, context)); + + _initialiseProps.call(_this); + + var filteredChildren = _this.getFilteredChildren(props.children); + var selectedIndex = _this.getSelectedIndex(props, filteredChildren); + + var newFocusIndex = props.disableAutoFocus ? -1 : selectedIndex >= 0 ? selectedIndex : 0; + if (newFocusIndex !== -1 && props.onMenuItemFocusChange) { + props.onMenuItemFocusChange(null, newFocusIndex); + } + _this.state = { + focusIndex: newFocusIndex, + isKeyboardFocused: props.initiallyKeyboardFocused, + keyWidth: props.desktop ? 64 : 56 + }; + + _this.hotKeyHolder = new _menuUtils.HotKeyHolder(); + return _this; + } + + (0, _createClass3.default)(Menu, [{ + key: 'componentDidMount', + value: function componentDidMount() { + if (this.props.autoWidth) { + this.setWidth(); + } + this.setScollPosition(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var filteredChildren = this.getFilteredChildren(nextProps.children); + var selectedIndex = this.getSelectedIndex(nextProps, filteredChildren); + + var newFocusIndex = nextProps.disableAutoFocus ? -1 : selectedIndex >= 0 ? selectedIndex : 0; + if (newFocusIndex !== this.state.focusIndex && this.props.onMenuItemFocusChange) { + this.props.onMenuItemFocusChange(null, newFocusIndex); + } + this.setState({ + focusIndex: newFocusIndex, + keyWidth: nextProps.desktop ? 64 : 56 + }); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + if (this.props.autoWidth) this.setWidth(); + } + }, { + key: 'getValueLink', + + + // Do not use outside of this component, it will be removed once valueLink is deprecated + value: function getValueLink(props) { + return props.valueLink || { + value: props.value, + requestChange: props.onChange + }; + } + }, { + key: 'setKeyboardFocused', + value: function setKeyboardFocused(keyboardFocused) { + this.setState({ + isKeyboardFocused: keyboardFocused + }); + } + }, { + key: 'getFilteredChildren', + value: function getFilteredChildren(children) { + var filteredChildren = []; + _react2.default.Children.forEach(children, function (child) { + if (child) { + filteredChildren.push(child); + } + }); + return filteredChildren; + } + }, { + key: 'cloneMenuItem', + value: function cloneMenuItem(child, childIndex, styles, index) { + var _this2 = this; + + var _props = this.props, + desktop = _props.desktop, + menuItemStyle = _props.menuItemStyle, + selectedMenuItemStyle = _props.selectedMenuItemStyle; + + + var selected = this.isChildSelected(child, this.props); + var selectedChildrenStyles = {}; + + if (selected) { + selectedChildrenStyles = (0, _simpleAssign2.default)(styles.selectedMenuItem, selectedMenuItemStyle); + } + + var mergedChildrenStyles = (0, _simpleAssign2.default)({}, child.props.style, menuItemStyle, selectedChildrenStyles); + + var isFocused = childIndex === this.state.focusIndex; + var focusState = 'none'; + if (isFocused) { + focusState = this.state.isKeyboardFocused ? 'keyboard-focused' : 'focused'; + } + + return _react2.default.cloneElement(child, { + desktop: desktop, + focusState: focusState, + onTouchTap: function onTouchTap(event) { + _this2.handleMenuItemTouchTap(event, child, index); + if (child.props.onTouchTap) child.props.onTouchTap(event); + }, + ref: isFocused ? 'focusedMenuItem' : null, + style: mergedChildrenStyles + }); + } + }, { + key: 'decrementKeyboardFocusIndex', + value: function decrementKeyboardFocusIndex(event) { + var index = this.state.focusIndex; + + index--; + if (index < 0) index = 0; + + this.setFocusIndex(event, index, true); + } + }, { + key: 'getMenuItemCount', + value: function getMenuItemCount(filteredChildren) { + var menuItemCount = 0; + filteredChildren.forEach(function (child) { + var childIsADivider = child.type && child.type.muiName === 'Divider'; + var childIsDisabled = child.props.disabled; + if (!childIsADivider && !childIsDisabled) menuItemCount++; + }); + return menuItemCount; + } + }, { + key: 'getSelectedIndex', + value: function getSelectedIndex(props, filteredChildren) { + var _this3 = this; + + var selectedIndex = -1; + var menuItemIndex = 0; + + filteredChildren.forEach(function (child) { + var childIsADivider = child.type && child.type.muiName === 'Divider'; + + if (_this3.isChildSelected(child, props)) selectedIndex = menuItemIndex; + if (!childIsADivider) menuItemIndex++; + }); + + return selectedIndex; + } + }, { + key: 'setFocusIndexStartsWith', + value: function setFocusIndexStartsWith(event, keys) { + var foundIndex = -1; + _react2.default.Children.forEach(this.props.children, function (child, index) { + if (foundIndex >= 0) { + return; + } + var primaryText = child.props.primaryText; + + if (typeof primaryText === 'string' && new RegExp('^' + keys, 'i').test(primaryText)) { + foundIndex = index; + } + }); + if (foundIndex >= 0) { + this.setFocusIndex(event, foundIndex, true); + return true; + } + return false; + } + }, { + key: 'handleMenuItemTouchTap', + value: function handleMenuItemTouchTap(event, item, index) { + var children = this.props.children; + var multiple = this.props.multiple; + var valueLink = this.getValueLink(this.props); + var menuValue = valueLink.value; + var itemValue = item.props.value; + var focusIndex = _react2.default.isValidElement(children) ? 0 : children.indexOf(item); + + this.setFocusIndex(event, focusIndex, false); + + if (multiple) { + var itemIndex = menuValue.indexOf(itemValue); + + var _menuValue = (0, _toArray3.default)(menuValue), + newMenuValue = _menuValue; + + if (itemIndex === -1) { + newMenuValue.push(itemValue); + } else { + newMenuValue.splice(itemIndex, 1); + } + + valueLink.requestChange(event, newMenuValue); + } else if (!multiple && itemValue !== menuValue) { + valueLink.requestChange(event, itemValue); + } + + this.props.onItemTouchTap(event, item, index); + } + }, { + key: 'incrementKeyboardFocusIndex', + value: function incrementKeyboardFocusIndex(event, filteredChildren) { + var index = this.state.focusIndex; + var maxIndex = this.getMenuItemCount(filteredChildren) - 1; + + index++; + if (index > maxIndex) index = maxIndex; + + this.setFocusIndex(event, index, true); + } + }, { + key: 'isChildSelected', + value: function isChildSelected(child, props) { + var menuValue = this.getValueLink(props).value; + var childValue = child.props.value; + + if (props.multiple) { + return menuValue.length && menuValue.indexOf(childValue) !== -1; + } else { + return child.props.hasOwnProperty('value') && menuValue === childValue; + } + } + }, { + key: 'setFocusIndex', + value: function setFocusIndex(event, newIndex, isKeyboardFocused) { + if (this.props.onMenuItemFocusChange) { + // Do this even if `newIndex === this.state.focusIndex` to allow users + // to detect up-arrow on the first MenuItem or down-arrow on the last. + this.props.onMenuItemFocusChange(event, newIndex); + } + this.setState({ + focusIndex: newIndex, + isKeyboardFocused: isKeyboardFocused + }); + } + }, { + key: 'setScollPosition', + value: function setScollPosition() { + var desktop = this.props.desktop; + var focusedMenuItem = this.refs.focusedMenuItem; + var menuItemHeight = desktop ? 32 : 48; + + if (focusedMenuItem) { + var selectedOffSet = _reactDom2.default.findDOMNode(focusedMenuItem).offsetTop; + + // Make the focused item be the 2nd item in the list the user sees + var scrollTop = selectedOffSet - menuItemHeight; + if (scrollTop < menuItemHeight) scrollTop = 0; + + _reactDom2.default.findDOMNode(this.refs.scrollContainer).scrollTop = scrollTop; + } + } + }, { + key: 'cancelScrollEvent', + value: function cancelScrollEvent(event) { + event.stopPropagation(); + event.preventDefault(); + return false; + } + }, { + key: 'setWidth', + value: function setWidth() { + var el = _reactDom2.default.findDOMNode(this); + var listEl = _reactDom2.default.findDOMNode(this.refs.list); + var elWidth = el.offsetWidth; + var keyWidth = this.state.keyWidth; + var minWidth = keyWidth * 1.5; + var keyIncrements = elWidth / keyWidth; + var newWidth = void 0; + + keyIncrements = keyIncrements <= 1.5 ? 1.5 : Math.ceil(keyIncrements); + newWidth = keyIncrements * keyWidth; + + if (newWidth < minWidth) newWidth = minWidth; + + el.style.width = newWidth + 'px'; + listEl.style.width = newWidth + 'px'; + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + + var _props2 = this.props, + autoWidth = _props2.autoWidth, + children = _props2.children, + desktop = _props2.desktop, + disableAutoFocus = _props2.disableAutoFocus, + initiallyKeyboardFocused = _props2.initiallyKeyboardFocused, + listStyle = _props2.listStyle, + maxHeight = _props2.maxHeight, + multiple = _props2.multiple, + onItemTouchTap = _props2.onItemTouchTap, + onEscKeyDown = _props2.onEscKeyDown, + onMenuItemFocusChange = _props2.onMenuItemFocusChange, + selectedMenuItemStyle = _props2.selectedMenuItemStyle, + menuItemStyle = _props2.menuItemStyle, + style = _props2.style, + value = _props2.value, + valueLink = _props2.valueLink, + width = _props2.width, + other = (0, _objectWithoutProperties3.default)(_props2, ['autoWidth', 'children', 'desktop', 'disableAutoFocus', 'initiallyKeyboardFocused', 'listStyle', 'maxHeight', 'multiple', 'onItemTouchTap', 'onEscKeyDown', 'onMenuItemFocusChange', 'selectedMenuItemStyle', 'menuItemStyle', 'style', 'value', 'valueLink', 'width']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style); + var mergedListStyles = (0, _simpleAssign2.default)(styles.list, listStyle); + + var filteredChildren = this.getFilteredChildren(children); + + var menuItemIndex = 0; + var newChildren = _react2.default.Children.map(filteredChildren, function (child, index) { + var childIsDisabled = child.props.disabled; + var childName = child.type ? child.type.muiName : ''; + var newChild = child; + + switch (childName) { + case 'MenuItem': + newChild = childIsDisabled ? _react2.default.cloneElement(child, { desktop: desktop }) : _this4.cloneMenuItem(child, menuItemIndex, styles, index); + break; + + case 'Divider': + newChild = _react2.default.cloneElement(child, { + style: (0, _simpleAssign2.default)({}, styles.divider, child.props.style) + }); + break; + } + + if (childName === 'MenuItem' && !childIsDisabled) { + menuItemIndex++; + } + + return newChild; + }); + + return _react2.default.createElement( + _ClickAwayListener2.default, + { onClickAway: this.handleClickAway }, + _react2.default.createElement( + 'div', + { + onKeyDown: this.handleKeyDown, + onWheel: this.handleOnWheel, + style: prepareStyles(mergedRootStyles), + ref: 'scrollContainer' + }, + _react2.default.createElement( + _List2.default, + (0, _extends3.default)({}, other, { + ref: 'list', + style: mergedListStyles + }), + newChildren + ) + ) + ); + } + }]); + return Menu; +}(_react.Component); + +Menu.defaultProps = { + autoWidth: true, + desktop: false, + disableAutoFocus: false, + initiallyKeyboardFocused: false, + maxHeight: null, + multiple: false, + onChange: function onChange() {}, + onEscKeyDown: function onEscKeyDown() {}, + onItemTouchTap: function onItemTouchTap() {}, + onKeyDown: function onKeyDown() {} +}; +Menu.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +var _initialiseProps = function _initialiseProps() { + var _this5 = this; + + this.handleClickAway = function (event) { + if (event.defaultPrevented) { + return; + } + + _this5.setFocusIndex(event, -1, false); + }; + + this.handleKeyDown = function (event) { + var filteredChildren = _this5.getFilteredChildren(_this5.props.children); + var key = (0, _keycode2.default)(event); + switch (key) { + case 'down': + event.preventDefault(); + _this5.incrementKeyboardFocusIndex(event, filteredChildren); + break; + case 'esc': + _this5.props.onEscKeyDown(event); + break; + case 'tab': + event.preventDefault(); + if (event.shiftKey) { + _this5.decrementKeyboardFocusIndex(event); + } else { + _this5.incrementKeyboardFocusIndex(event, filteredChildren); + } + break; + case 'up': + event.preventDefault(); + _this5.decrementKeyboardFocusIndex(event); + break; + default: + if (key && key.length === 1) { + var hotKeys = _this5.hotKeyHolder.append(key); + if (_this5.setFocusIndexStartsWith(event, hotKeys)) { + event.preventDefault(); + } + } + } + _this5.props.onKeyDown(event); + }; + + this.handleOnWheel = function (event) { + var scrollContainer = _this5.refs.scrollContainer; + // Only scroll lock if the the Menu is scrollable. + if (scrollContainer.scrollHeight <= scrollContainer.clientHeight) return; + + var scrollTop = scrollContainer.scrollTop, + scrollHeight = scrollContainer.scrollHeight, + clientHeight = scrollContainer.clientHeight; + + var wheelDelta = event.deltaY; + var isDeltaPositive = wheelDelta > 0; + + if (isDeltaPositive && wheelDelta > scrollHeight - clientHeight - scrollTop) { + scrollContainer.scrollTop = scrollHeight; + return _this5.cancelScrollEvent(event); + } else if (!isDeltaPositive && -wheelDelta > scrollTop) { + scrollContainer.scrollTop = 0; + return _this5.cancelScrollEvent(event); + } + }; +}; + + false ? Menu.propTypes = { + /** + * If true, the width of the menu will be set automatically + * according to the widths of its children, + * using proper keyline increments (64px for desktop, + * 56px otherwise). + */ + autoWidth: _react.PropTypes.bool, + /** + * The content of the menu. This is usually used to pass `MenuItem` + * elements. + */ + children: _react.PropTypes.node, + /** + * If true, the menu item will render with compact desktop styles. + */ + desktop: _react.PropTypes.bool, + /** + * If true, the menu will not be auto-focused. + */ + disableAutoFocus: _react.PropTypes.bool, + /** + * If true, the menu will be keyboard-focused initially. + */ + initiallyKeyboardFocused: _react.PropTypes.bool, + /** + * Override the inline-styles of the underlying `List` element. + */ + listStyle: _react.PropTypes.object, + /** + * The maximum height of the menu in pixels. If specified, + * the menu will be scrollable if it is taller than the provided + * height. + */ + maxHeight: _react.PropTypes.number, + /** + * Override the inline-styles of menu items. + */ + menuItemStyle: _react.PropTypes.object, + /** + * If true, `value` must be an array and the menu will support + * multiple selections. + */ + multiple: _react.PropTypes.bool, + /** + * Callback function fired when a menu item with `value` not + * equal to the current `value` of the menu is touch-tapped. + * + * @param {object} event TouchTap event targeting the menu item. + * @param {any} value If `multiple` is true, the menu's `value` + * array with either the menu item's `value` added (if + * it wasn't already selected) or omitted (if it was already selected). + * Otherwise, the `value` of the menu item. + */ + onChange: _react.PropTypes.func, + /** + * Callback function fired when the menu is focused and the *Esc* key + * is pressed. + * + * @param {object} event `keydown` event targeting the menu. + */ + onEscKeyDown: _react.PropTypes.func, + /** + * Callback function fired when a menu item is touch-tapped. + * + * @param {object} event TouchTap event targeting the menu item. + * @param {object} menuItem The menu item. + * @param {number} index The index of the menu item. + */ + onItemTouchTap: _react.PropTypes.func, + /** @ignore */ + onKeyDown: _react.PropTypes.func, + /** + * Callback function fired when the focus on a `MenuItem` is changed. + * There will be some "duplicate" changes reported if two different + * focusing event happen, for example if a `MenuItem` is focused via + * the keyboard and then it is clicked on. + * + * @param {object} event The event that triggered the focus change. + * The event can be null since the focus can be changed for non-event + * reasons such as prop changes. + * @param {number} newFocusIndex The index of the newly focused + * `MenuItem` or `-1` if focus was lost. + */ + onMenuItemFocusChange: _react.PropTypes.func, + /** + * Override the inline-styles of selected menu items. + */ + selectedMenuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * If `multiple` is true, an array of the `value`s of the selected + * menu items. Otherwise, the `value` of the selected menu item. + * If provided, the menu will be a controlled component. + * This component also supports valueLink. + */ + value: _react.PropTypes.any, + /** + * ValueLink for the menu's `value`. + */ + valueLink: _react.PropTypes.object, + /** + * The width of the menu. If not specified, the menu's width + * will be set according to the widths of its children, using + * proper keyline increments (64px for desktop, 56px otherwise). + */ + width: _propTypes2.default.stringOrNumber +} : void 0; +exports.default = Menu; + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _RaisedButton = __webpack_require__(776); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _RaisedButton2.default; + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Toggle = exports.TextField = exports.Slider = exports.SelectField = exports.RadioButtonGroup = exports.TimePicker = exports.DatePicker = exports.Checkbox = exports.AutoComplete = undefined; + +var _AutoComplete = __webpack_require__(777); + +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); + +var _Checkbox = __webpack_require__(788); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +var _DatePicker = __webpack_require__(793); + +var _DatePicker2 = _interopRequireDefault(_DatePicker); + +var _RadioButtonGroup = __webpack_require__(809); + +var _RadioButtonGroup2 = _interopRequireDefault(_RadioButtonGroup); + +var _SelectField = __webpack_require__(814); + +var _SelectField2 = _interopRequireDefault(_SelectField); + +var _Slider = __webpack_require__(822); + +var _Slider2 = _interopRequireDefault(_Slider); + +var _TextField = __webpack_require__(827); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _TimePicker = __webpack_require__(828); + +var _TimePicker2 = _interopRequireDefault(_TimePicker); + +var _Toggle = __webpack_require__(842); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.AutoComplete = _AutoComplete2.default; +exports.Checkbox = _Checkbox2.default; +exports.DatePicker = _DatePicker2.default; +exports.TimePicker = _TimePicker2.default; +exports.RadioButtonGroup = _RadioButtonGroup2.default; +exports.SelectField = _SelectField2.default; +exports.Slider = _Slider2.default; +exports.TextField = _TextField2.default; +exports.Toggle = _Toggle2.default; + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(42); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(30); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _FocusRipple = __webpack_require__(197); + +var _FocusRipple2 = _interopRequireDefault(_FocusRipple); + +var _TouchRipple = __webpack_require__(314); + +var _TouchRipple2 = _interopRequireDefault(_TouchRipple); + +var _Paper = __webpack_require__(34); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var baseTheme = context.muiTheme.baseTheme; + + + return { + root: { + cursor: props.disabled ? 'not-allowed' : 'pointer', + position: 'relative', + overflow: 'visible', + display: 'table', + height: 'auto', + width: '100%' + }, + input: { + position: 'absolute', + cursor: 'inherit', + pointerEvents: 'all', + opacity: 0, + width: '100%', + height: '100%', + zIndex: 2, + left: 0, + boxSizing: 'border-box', + padding: 0, + margin: 0 + }, + controls: { + display: 'flex', + width: '100%', + height: '100%' + }, + label: { + float: 'left', + position: 'relative', + display: 'block', + width: 'calc(100% - 60px)', + lineHeight: '24px', + color: baseTheme.palette.textColor, + fontFamily: baseTheme.fontFamily + }, + wrap: { + transition: _transitions2.default.easeOut(), + float: 'left', + position: 'relative', + display: 'block', + flexShrink: 0, + width: 60 - baseTheme.spacing.desktopGutterLess, + marginRight: props.labelPosition === 'right' ? baseTheme.spacing.desktopGutterLess : 0, + marginLeft: props.labelPosition === 'left' ? baseTheme.spacing.desktopGutterLess : 0 + }, + ripple: { + color: props.rippleColor || baseTheme.palette.primary1Color, + height: '200%', + width: '200%', + top: -12, + left: -12 + } + }; +} + +var EnhancedSwitch = function (_Component) { + (0, _inherits3.default)(EnhancedSwitch, _Component); + + function EnhancedSwitch() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, EnhancedSwitch); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedSwitch.__proto__ || (0, _getPrototypeOf2.default)(EnhancedSwitch)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + isKeyboardFocused: false + }, _this.handleChange = function (event) { + _this.tabPressed = false; + _this.setState({ + isKeyboardFocused: false + }); + + var isInputChecked = _this.refs.checkbox.checked; + + if (!_this.props.hasOwnProperty('checked') && _this.props.onParentShouldUpdate) { + _this.props.onParentShouldUpdate(isInputChecked); + } + + if (_this.props.onSwitch) { + _this.props.onSwitch(event, isInputChecked); + } + }, _this.handleKeyDown = function (event) { + var code = (0, _keycode2.default)(event); + + if (code === 'tab') { + _this.tabPressed = true; + } + if (_this.state.isKeyboardFocused && code === 'space') { + _this.handleChange(event); + } + }, _this.handleKeyUp = function (event) { + if (_this.state.isKeyboardFocused && (0, _keycode2.default)(event) === 'space') { + _this.handleChange(event); + } + }, _this.handleMouseDown = function (event) { + // only listen to left clicks + if (event.button === 0) { + _this.refs.touchRipple.start(event); + } + }, _this.handleMouseUp = function () { + _this.refs.touchRipple.end(); + }, _this.handleMouseLeave = function () { + _this.refs.touchRipple.end(); + }, _this.handleTouchStart = function (event) { + _this.refs.touchRipple.start(event); + }, _this.handleTouchEnd = function () { + _this.refs.touchRipple.end(); + }, _this.handleBlur = function (event) { + _this.setState({ + isKeyboardFocused: false + }); + + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleFocus = function (event) { + // setTimeout is needed becuase the focus event fires first + // Wait so that we can capture if this was a keyboard focus + // or touch focus + setTimeout(function () { + if (_this.tabPressed) { + _this.setState({ + isKeyboardFocused: true + }); + } + }, 150); + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(EnhancedSwitch, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var inputNode = this.refs.checkbox; + if ((!this.props.switched || inputNode.checked !== this.props.switched) && this.props.onParentShouldUpdate) { + this.props.onParentShouldUpdate(inputNode.checked); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var hasCheckedProp = nextProps.hasOwnProperty('checked'); + var hasToggledProp = nextProps.hasOwnProperty('toggled'); + var hasNewDefaultProp = nextProps.hasOwnProperty('defaultChecked') && nextProps.defaultChecked !== this.props.defaultChecked; + + if (hasCheckedProp || hasToggledProp || hasNewDefaultProp) { + var switched = nextProps.checked || nextProps.toggled || nextProps.defaultChecked || false; + + this.setState({ + switched: switched + }); + + if (this.props.onParentShouldUpdate && switched !== this.props.switched) { + this.props.onParentShouldUpdate(switched); + } + } + } + }, { + key: 'isSwitched', + value: function isSwitched() { + return this.refs.checkbox.checked; + } + + // no callback here because there is no event + + }, { + key: 'setSwitched', + value: function setSwitched(newSwitchedValue) { + if (!this.props.hasOwnProperty('checked') || this.props.checked === false) { + if (this.props.onParentShouldUpdate) { + this.props.onParentShouldUpdate(newSwitchedValue); + } + this.refs.checkbox.checked = newSwitchedValue; + } else { + false ? (0, _warning2.default)(false, 'Material-UI: Cannot call set method while checked is defined as a property.') : void 0; + } + } + }, { + key: 'getValue', + value: function getValue() { + return this.refs.checkbox.value; + } + + // Checkbox inputs only use SPACE to change their state. Using ENTER will + // update the ui but not the input. + + + /** + * Because both the ripples and the checkbox input cannot share pointer + * events, the checkbox input takes control of pointer events and calls + * ripple animations manually. + */ + + }, { + key: 'render', + value: function render() { + var _props = this.props, + name = _props.name, + value = _props.value, + iconStyle = _props.iconStyle, + inputStyle = _props.inputStyle, + inputType = _props.inputType, + label = _props.label, + labelStyle = _props.labelStyle, + labelPosition = _props.labelPosition, + onSwitch = _props.onSwitch, + onBlur = _props.onBlur, + onFocus = _props.onFocus, + onMouseUp = _props.onMouseUp, + onMouseDown = _props.onMouseDown, + onMouseLeave = _props.onMouseLeave, + onTouchStart = _props.onTouchStart, + onTouchEnd = _props.onTouchEnd, + onParentShouldUpdate = _props.onParentShouldUpdate, + disabled = _props.disabled, + disableTouchRipple = _props.disableTouchRipple, + disableFocusRipple = _props.disableFocusRipple, + className = _props.className, + rippleColor = _props.rippleColor, + rippleStyle = _props.rippleStyle, + style = _props.style, + switched = _props.switched, + switchElement = _props.switchElement, + thumbStyle = _props.thumbStyle, + trackStyle = _props.trackStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['name', 'value', 'iconStyle', 'inputStyle', 'inputType', 'label', 'labelStyle', 'labelPosition', 'onSwitch', 'onBlur', 'onFocus', 'onMouseUp', 'onMouseDown', 'onMouseLeave', 'onTouchStart', 'onTouchEnd', 'onParentShouldUpdate', 'disabled', 'disableTouchRipple', 'disableFocusRipple', 'className', 'rippleColor', 'rippleStyle', 'style', 'switched', 'switchElement', 'thumbStyle', 'trackStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var wrapStyles = (0, _simpleAssign2.default)(styles.wrap, iconStyle); + var mergedRippleStyle = (0, _simpleAssign2.default)(styles.ripple, rippleStyle); + + if (thumbStyle) { + wrapStyles.marginLeft /= 2; + wrapStyles.marginRight /= 2; + } + + var labelElement = label && _react2.default.createElement( + 'label', + { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) }, + label + ); + + var showTouchRipple = !disabled && !disableTouchRipple; + var showFocusRipple = !disabled && !disableFocusRipple; + + var touchRipple = _react2.default.createElement(_TouchRipple2.default, { + ref: 'touchRipple', + key: 'touchRipple', + style: mergedRippleStyle, + color: mergedRippleStyle.color, + muiTheme: this.context.muiTheme, + centerRipple: true + }); + + var focusRipple = _react2.default.createElement(_FocusRipple2.default, { + key: 'focusRipple', + innerStyle: mergedRippleStyle, + color: mergedRippleStyle.color, + muiTheme: this.context.muiTheme, + show: this.state.isKeyboardFocused + }); + + var ripples = [showTouchRipple ? touchRipple : null, showFocusRipple ? focusRipple : null]; + + var inputElement = _react2.default.createElement('input', (0, _extends3.default)({}, other, { + ref: 'checkbox', + type: inputType, + style: prepareStyles((0, _simpleAssign2.default)(styles.input, inputStyle)), + name: name, + value: value, + disabled: disabled, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onChange: this.handleChange, + onMouseUp: showTouchRipple && this.handleMouseUp, + onMouseDown: showTouchRipple && this.handleMouseDown, + onMouseLeave: showTouchRipple && this.handleMouseLeave, + onTouchStart: showTouchRipple && this.handleTouchStart, + onTouchEnd: showTouchRipple && this.handleTouchEnd + })); + + // If toggle component (indicated by whether the style includes thumb) manually lay out + // elements in order to nest ripple elements + var switchOrThumbElement = !thumbStyle ? _react2.default.createElement( + 'div', + { style: prepareStyles(wrapStyles) }, + switchElement, + ripples + ) : _react2.default.createElement( + 'div', + { style: prepareStyles(wrapStyles) }, + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, trackStyle)) }), + _react2.default.createElement( + _Paper2.default, + { style: thumbStyle, zDepth: 1, circle: true }, + ' ', + ripples, + ' ' + ) + ); + + var elementsInOrder = labelPosition === 'right' ? _react2.default.createElement( + 'div', + { style: styles.controls }, + switchOrThumbElement, + labelElement + ) : _react2.default.createElement( + 'div', + { style: styles.controls }, + labelElement, + switchOrThumbElement + ); + + return _react2.default.createElement( + 'div', + { ref: 'root', className: className, style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyDown: this.handleKeyDown, + onKeyUp: this.handleKeyUp + }), + inputElement, + elementsInOrder + ); + } + }]); + return EnhancedSwitch; +}(_react.Component); + +EnhancedSwitch.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? EnhancedSwitch.propTypes = { + checked: _react.PropTypes.bool, + className: _react.PropTypes.string, + defaultChecked: _react.PropTypes.bool, + disableFocusRipple: _react.PropTypes.bool, + disableTouchRipple: _react.PropTypes.bool, + disabled: _react.PropTypes.bool, + iconStyle: _react.PropTypes.object, + inputStyle: _react.PropTypes.object, + inputType: _react.PropTypes.string.isRequired, + label: _react.PropTypes.node, + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + labelStyle: _react.PropTypes.object, + name: _react.PropTypes.string, + onBlur: _react.PropTypes.func, + onFocus: _react.PropTypes.func, + onMouseDown: _react.PropTypes.func, + onMouseLeave: _react.PropTypes.func, + onMouseUp: _react.PropTypes.func, + onParentShouldUpdate: _react.PropTypes.func, + onSwitch: _react.PropTypes.func, + onTouchEnd: _react.PropTypes.func, + onTouchStart: _react.PropTypes.func, + rippleColor: _react.PropTypes.string, + rippleStyle: _react.PropTypes.object, + style: _react.PropTypes.object, + switchElement: _react.PropTypes.element.isRequired, + switched: _react.PropTypes.bool.isRequired, + thumbStyle: _react.PropTypes.object, + trackStyle: _react.PropTypes.object, + value: _react.PropTypes.any +} : void 0; +exports.default = EnhancedSwitch; + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactAddonsTransitionGroup = __webpack_require__(128); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +var _SlideInChild = __webpack_require__(806); + +var _SlideInChild2 = _interopRequireDefault(_SlideInChild); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SlideIn = function (_Component) { + (0, _inherits3.default)(SlideIn, _Component); + + function SlideIn() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, SlideIn); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = SlideIn.__proto__ || (0, _getPrototypeOf2.default)(SlideIn)).call.apply(_ref, [this].concat(args))), _this), _this.getLeaveDirection = function () { + return _this.props.direction; + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(SlideIn, [{ + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + enterDelay = _props.enterDelay, + children = _props.children, + childStyle = _props.childStyle, + direction = _props.direction, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['enterDelay', 'children', 'childStyle', 'direction', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'relative', + overflow: 'hidden', + height: '100%' + }, style); + + var newChildren = _react2.default.Children.map(children, function (child) { + return _react2.default.createElement( + _SlideInChild2.default, + { + key: child.key, + direction: direction, + enterDelay: enterDelay, + getLeaveDirection: _this2.getLeaveDirection, + style: childStyle + }, + child + ); + }, this); + + return _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + (0, _extends3.default)({}, other, { + style: prepareStyles(mergedRootStyles), + component: 'div' + }), + newChildren + ); + } + }]); + return SlideIn; +}(_react.Component); + +SlideIn.defaultProps = { + enterDelay: 0, + direction: 'left' +}; +SlideIn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? SlideIn.propTypes = { + childStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + direction: _react.PropTypes.oneOf(['left', 'right', 'up', 'down']), + enterDelay: _react.PropTypes.number, + style: _react.PropTypes.object +} : void 0; +exports.default = SlideIn; + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.email = email; +exports.required = required; +exports.simpleText = simpleText; +exports.number = number; +exports.minValue = minValue; +exports.maxValue = maxValue; +exports.fullName = fullName; +function email(input) { + var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return re.test(input) ? undefined : 'Please enter a valid email'; +} + +function required(value) { + var empty = typeof value !== 'number' && !value; + return empty ? 'Required field' : undefined; +} + +function simpleText(value) { + return value && !value.match(/^[0-9a-zA-Z_]{1,64}$/) ? 'Only use characters (a-z, A-Z, 0-9, _)' : undefined; +} + +function number(value) { + return value && isNaN(Number(value)) ? 'This field must be a number' : undefined; +} + +function minValue(min) { + return function (value) { + return value && value < min ? 'The value must be greater than ' + min : undefined; + }; +} + +function maxValue(max) { + return function (value) { + return value && value > max ? 'The value must be less than ' + max : undefined; + }; +} + +function fullName(value) { + return !value || value.split(' ').filter(function (x) { + return x !== ""; + }).length < 2 ? 'Please enter a valid full name (firstname + lastname)' : undefined; +} + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(99); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(44) && !__webpack_require__(63)(function () { + return Object.defineProperty(__webpack_require__(131)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(51); +var toIObject = __webpack_require__(52); +var arrayIndexOf = __webpack_require__(339)(false); +var IE_PROTO = __webpack_require__(136)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(83); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(85), + _assign = __webpack_require__(15); + +var ReactNoopUpdateQueue = __webpack_require__(210); + +var canDefineProperty = __webpack_require__(211); +var emptyObject = __webpack_require__(102); +var invariant = __webpack_require__(9); +var lowPriorityWarning = __webpack_require__(341); + +/** + * Base class helpers for the updating state of a component. + */ +function ReactComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; +} + +ReactComponent.prototype.isReactComponent = {}; + +/** + * Sets a subset of the state. Always use this to mutate + * state. You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * There is no guarantee that calls to `setState` will run synchronously, + * as they may eventually be batched together. You can provide an optional + * callback that will be executed when the call to setState is actually + * completed. + * + * When a function is provided to setState, it will be called at some point in + * the future (not synchronously). It will be called with the up to date + * component arguments (state, props, context). These values can be different + * from this.* because your function may be called after receiveProps but before + * shouldComponentUpdate, and this new state, props, and context will not yet be + * assigned to this. + * + * @param {object|function} partialState Next partial state or function to + * produce next partial state to be merged with current state. + * @param {?function} callback Called after state is updated. + * @final + * @protected + */ +ReactComponent.prototype.setState = function (partialState, callback) { + !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? false ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0; + this.updater.enqueueSetState(this, partialState); + if (callback) { + this.updater.enqueueCallback(this, callback, 'setState'); + } +}; + +/** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {?function} callback Called after update is complete. + * @final + * @protected + */ +ReactComponent.prototype.forceUpdate = function (callback) { + this.updater.enqueueForceUpdate(this); + if (callback) { + this.updater.enqueueCallback(this, callback, 'forceUpdate'); + } +}; + +/** + * Deprecated APIs. These APIs used to exist on classic React classes but since + * we would like to deprecate them, we're not going to move them over to this + * modern base class. Instead, we define a getter that warns if it's accessed. + */ +if (false) { + var deprecatedAPIs = { + isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], + replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] + }; + var defineDeprecationWarning = function (methodName, info) { + if (canDefineProperty) { + Object.defineProperty(ReactComponent.prototype, methodName, { + get: function () { + lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); + return undefined; + } + }); + } + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } +} + +/** + * Base class helpers for the updating state of a component. + */ +function ReactPureComponent(props, context, updater) { + // Duplicated from ReactComponent. + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; +} + +function ComponentDummy() {} +ComponentDummy.prototype = ReactComponent.prototype; +ReactPureComponent.prototype = new ComponentDummy(); +ReactPureComponent.prototype.constructor = ReactPureComponent; +// Avoid an extra prototype jump for these methods. +_assign(ReactPureComponent.prototype, ReactComponent.prototype); +ReactPureComponent.prototype.isPureReactComponent = true; + +module.exports = { + Component: ReactComponent, + PureComponent: ReactPureComponent +}; + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var warning = __webpack_require__(12); + +function warnNoop(publicInstance, callerName) { + if (false) { + var constructor = publicInstance.constructor; + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; + } +} + +/** + * This is the abstract API for an update queue. + */ +var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + return false; + }, + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + enqueueCallback: function (publicInstance, callback) {}, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function (publicInstance) { + warnNoop(publicInstance, 'forceUpdate'); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState) { + warnNoop(publicInstance, 'replaceState'); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function (publicInstance, partialState) { + warnNoop(publicInstance, 'setState'); + } +}; + +module.exports = ReactNoopUpdateQueue; + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var canDefineProperty = false; +if (false) { + try { + // $FlowFixMe https://github.com/facebook/flow/issues/285 + Object.defineProperty({}, 'x', { get: function () {} }); + canDefineProperty = true; + } catch (x) { + // IE will fail on defineProperty + } +} + +module.exports = canDefineProperty; + +/***/ }), +/* 212 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +// The Symbol used to tag the ReactElement type. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. + +var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; + +module.exports = REACT_ELEMENT_TYPE; + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +// React 15.5 references this module, and assumes PropTypes are still callable in production. +// Therefore we re-export development-only version with all the PropTypes checks here. +// However if one is migrating to the `prop-types` npm library, they will go through the +// `index.js` entry point, and it will branch depending on the environment. +var factory = __webpack_require__(349); +module.exports = function(isValidElement) { + // It is still allowed in 15.5. + var throwOnDirectAccess = false; + return factory(isValidElement, throwOnDirectAccess); +}; + + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var emptyObject = __webpack_require__(102); +var _invariant = __webpack_require__(9); + +if (false) { + var warning = require('fbjs/lib/warning'); +} + +var MIXINS_KEY = 'mixins'; + +// Helper function to allow the creation of anonymous functions which do not +// have .name set to the name of the variable being assigned to. +function identity(fn) { + return fn; +} + +var ReactPropTypeLocationNames; +if (false) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; +} else { + ReactPropTypeLocationNames = {}; +} + +function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { + /** + * Policies that describe methods in `ReactClassInterface`. + */ + + var injectedMixins = []; + + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE' + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function(Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function(Constructor, childContextTypes) { + if (false) { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign( + {}, + Constructor.childContextTypes, + childContextTypes + ); + }, + contextTypes: function(Constructor, contextTypes) { + if (false) { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign( + {}, + Constructor.contextTypes, + contextTypes + ); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function(Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function(Constructor, propTypes) { + if (false) { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function() {} + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + if (false) { + warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName + ); + } + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) + ? ReactClassInterface[name] + : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name + ); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name + ); + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (false) { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + if (process.env.NODE_ENV !== 'production') { + warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec + ); + } + } + + return; + } + + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.' + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.' + ); + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && + !isReactClassMethod && + !isAlreadyDefined && + spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || + specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + + 'when mixing in component specs.', + specPolicy, + name + ); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (false) { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name + ); + + var isInherited = name in Constructor; + _invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name + ); + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key + ); + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (false) { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function(newThis) { + for ( + var _len = arguments.length, + args = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + if (process.env.NODE_ENV !== 'production') { + warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName + ); + } + } else if (!args.length) { + if (process.env.NODE_ENV !== 'production') { + warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName + ); + } + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + var IsMountedPreMixin = { + componentDidMount: function() { + this.__isMounted = true; + } + }; + + var IsMountedPostMixin = { + componentWillUnmount: function() { + this.__isMounted = false; + } + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function(newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function() { + if (false) { + warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || + this.name || + 'Component' + ); + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; + } + }; + + var ReactClassComponent = function() {}; + _assign( + ReactClassComponent.prototype, + ReactComponent.prototype, + ReactClassMixin + ); + + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function(props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (false) { + warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory' + ); + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (false) { + // We allow auto-mocks to proceed as if they're returning null. + if ( + initialState === undefined && + this.getInitialState._isMockFunction + ) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent' + ); + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedPreMixin); + mixSpecIntoComponent(Constructor, spec); + mixSpecIntoComponent(Constructor, IsMountedPostMixin); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (false) { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.' + ); + + if (false) { + warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component' + ); + warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component' + ); + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; +} + +module.exports = factory; + + +/***/ }), +/* 216 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMComponentFlags = { + hasCachedChildNodes: 1 << 0 +}; + +module.exports = ReactDOMComponentFlags; + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(9); + +/** + * Accumulates items that must not be null or undefined into the first one. This + * is used to conserve memory by avoiding array allocations, and thus sacrifices + * API cleanness. Since `current` can be null before being passed in and not + * null after this function, make sure to assign it back to `current`: + * + * `a = accumulateInto(a, b);` + * + * This API should be sparingly used. Try `accumulate` for something cleaner. + * + * @return {*|array<*>} An accumulation of items. + */ + +function accumulateInto(current, next) { + !(next != null) ? false ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0; + + if (current == null) { + return next; + } + + // Both are not empty. Warning: Never call x.concat(y) when you are not + // certain that x is an Array (x could be a string with concat method). + if (Array.isArray(current)) { + if (Array.isArray(next)) { + current.push.apply(current, next); + return current; + } + current.push(next); + return current; + } + + if (Array.isArray(next)) { + // A bit too dangerous to mutate `next`. + return [current].concat(next); + } + + return [current, next]; +} + +module.exports = accumulateInto; + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * @param {array} arr an "accumulation" of items which is either an Array or + * a single item. Useful when paired with the `accumulate` module. This is a + * simple utility that allows us to reason about a collection of items, but + * handling the case when there is exactly one item (and we do not need to + * allocate an array). + */ + +function forEachAccumulated(arr, cb, scope) { + if (Array.isArray(arr)) { + arr.forEach(cb, scope); + } else if (arr) { + cb.call(scope, arr); + } +} + +module.exports = forEachAccumulated; + +/***/ }), +/* 219 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(21); + +var contentKey = null; + +/** + * Gets the key used to access text content on a DOM node. + * + * @return {?string} Key used to access text content. + * @internal + */ +function getTextContentAccessor() { + if (!contentKey && ExecutionEnvironment.canUseDOM) { + // Prefer textContent to innerText because many browsers support both but + // SVG <text> elements don't support innerText even when <div> does. + contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText'; + } + return contentKey; +} + +module.exports = getTextContentAccessor; + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var PooledClass = __webpack_require__(53); + +var invariant = __webpack_require__(9); + +/** + * A specialized pseudo-event module to help keep track of components waiting to + * be notified when their DOM representations are available for use. + * + * This implements `PooledClass`, so you should never need to instantiate this. + * Instead, use `CallbackQueue.getPooled()`. + * + * @class ReactMountReady + * @implements PooledClass + * @internal + */ + +var CallbackQueue = function () { + function CallbackQueue(arg) { + _classCallCheck(this, CallbackQueue); + + this._callbacks = null; + this._contexts = null; + this._arg = arg; + } + + /** + * Enqueues a callback to be invoked when `notifyAll` is invoked. + * + * @param {function} callback Invoked when `notifyAll` is invoked. + * @param {?object} context Context to call `callback` with. + * @internal + */ + + + CallbackQueue.prototype.enqueue = function enqueue(callback, context) { + this._callbacks = this._callbacks || []; + this._callbacks.push(callback); + this._contexts = this._contexts || []; + this._contexts.push(context); + }; + + /** + * Invokes all enqueued callbacks and clears the queue. This is invoked after + * the DOM representation of a component has been created or updated. + * + * @internal + */ + + + CallbackQueue.prototype.notifyAll = function notifyAll() { + var callbacks = this._callbacks; + var contexts = this._contexts; + var arg = this._arg; + if (callbacks && contexts) { + !(callbacks.length === contexts.length) ? false ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0; + this._callbacks = null; + this._contexts = null; + for (var i = 0; i < callbacks.length; i++) { + callbacks[i].call(contexts[i], arg); + } + callbacks.length = 0; + contexts.length = 0; + } + }; + + CallbackQueue.prototype.checkpoint = function checkpoint() { + return this._callbacks ? this._callbacks.length : 0; + }; + + CallbackQueue.prototype.rollback = function rollback(len) { + if (this._callbacks && this._contexts) { + this._callbacks.length = len; + this._contexts.length = len; + } + }; + + /** + * Resets the internal queue. + * + * @internal + */ + + + CallbackQueue.prototype.reset = function reset() { + this._callbacks = null; + this._contexts = null; + }; + + /** + * `PooledClass` looks for this. + */ + + + CallbackQueue.prototype.destructor = function destructor() { + this.reset(); + }; + + return CallbackQueue; +}(); + +module.exports = PooledClass.addPoolingTo(CallbackQueue); + +/***/ }), +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactFeatureFlags = { + // When true, call console.time() before and .timeEnd() after each top-level + // render (both initial renders and updates). Useful when looking at prod-mode + // timeline profiles in Chrome, for example. + logTopLevelRenders: false +}; + +module.exports = ReactFeatureFlags; + +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMComponentTree = __webpack_require__(16); + +function isCheckable(elem) { + var type = elem.type; + var nodeName = elem.nodeName; + return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio'); +} + +function getTracker(inst) { + return inst._wrapperState.valueTracker; +} + +function attachTracker(inst, tracker) { + inst._wrapperState.valueTracker = tracker; +} + +function detachTracker(inst) { + delete inst._wrapperState.valueTracker; +} + +function getValueFromNode(node) { + var value; + if (node) { + value = isCheckable(node) ? '' + node.checked : node.value; + } + return value; +} + +var inputValueTracking = { + // exposed for testing + _getTrackerFromNode: function (node) { + return getTracker(ReactDOMComponentTree.getInstanceFromNode(node)); + }, + + + track: function (inst) { + if (getTracker(inst)) { + return; + } + + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var valueField = isCheckable(node) ? 'checked' : 'value'; + var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); + + var currentValue = '' + node[valueField]; + + // if someone has already defined a value or Safari, then bail + // and don't track value will cause over reporting of changes, + // but it's better then a hard failure + // (needed for certain tests that spyOn input values and Safari) + if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') { + return; + } + + Object.defineProperty(node, valueField, { + enumerable: descriptor.enumerable, + configurable: true, + get: function () { + return descriptor.get.call(this); + }, + set: function (value) { + currentValue = '' + value; + descriptor.set.call(this, value); + } + }); + + attachTracker(inst, { + getValue: function () { + return currentValue; + }, + setValue: function (value) { + currentValue = '' + value; + }, + stopTracking: function () { + detachTracker(inst); + delete node[valueField]; + } + }); + }, + + updateValueIfChanged: function (inst) { + if (!inst) { + return false; + } + var tracker = getTracker(inst); + + if (!tracker) { + inputValueTracking.track(inst); + return true; + } + + var lastValue = tracker.getValue(); + var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst)); + + if (nextValue !== lastValue) { + tracker.setValue(nextValue); + return true; + } + + return false; + }, + stopTracking: function (inst) { + var tracker = getTracker(inst); + if (tracker) { + tracker.stopTracking(); + } + } +}; + +module.exports = inputValueTracking; + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + */ + +var supportedInputTypes = { + color: true, + date: true, + datetime: true, + 'datetime-local': true, + email: true, + month: true, + number: true, + password: true, + range: true, + search: true, + tel: true, + text: true, + time: true, + url: true, + week: true +}; + +function isTextInputElement(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + + if (nodeName === 'input') { + return !!supportedInputTypes[elem.type]; + } + + if (nodeName === 'textarea') { + return true; + } + + return false; +} + +module.exports = isTextInputElement; + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(21); +var escapeTextContentForBrowser = __webpack_require__(107); +var setInnerHTML = __webpack_require__(106); + +/** + * Set the textContent property of a node, ensuring that whitespace is preserved + * even in IE8. innerText is a poor substitute for textContent and, among many + * issues, inserts <br> instead of the literal newline chars. innerHTML behaves + * as it should. + * + * @param {DOMElement} node + * @param {string} text + * @internal + */ +var setTextContent = function (node, text) { + if (text) { + var firstChild = node.firstChild; + + if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) { + firstChild.nodeValue = text; + return; + } + } + node.textContent = text; +}; + +if (ExecutionEnvironment.canUseDOM) { + if (!('textContent' in document.documentElement)) { + setTextContent = function (node, text) { + if (node.nodeType === 3) { + node.nodeValue = text; + return; + } + setInnerHTML(node, escapeTextContentForBrowser(text)); + }; + } +} + +module.exports = setTextContent; + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * @param {DOMElement} node input/textarea to focus + */ + +function focusNode(node) { + // IE8 can throw "Can't move focus to the control because it is invisible, + // not enabled, or of a type that does not accept the focus." for all kinds of + // reasons that are too expensive and fragile to test. + try { + node.focus(); + } catch (e) {} +} + +module.exports = focusNode; + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * CSS properties which accept numbers but are not in units of "px". + */ + +var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridRow: true, + gridRowEnd: true, + gridRowSpan: true, + gridRowStart: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnSpan: true, + gridColumnStart: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true +}; + +/** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ +function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); +} + +/** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ +var prefixes = ['Webkit', 'ms', 'Moz', 'O']; + +// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an +// infinite loop, because it iterates over the newly added props too. +Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); +}); + +/** + * Most style properties can be unset by doing .style[prop] = '' but IE8 + * doesn't like doing that with shorthand properties so for the properties that + * IE8 breaks on, which are listed here, we instead unset each of the + * individual properties. See http://bugs.jquery.com/ticket/12385. + * The 4-value 'clock' properties like margin, padding, border-width seem to + * behave without any problems. Curiously, list-style works too without any + * special prodding. + */ +var shorthandPropertyExpansions = { + background: { + backgroundAttachment: true, + backgroundColor: true, + backgroundImage: true, + backgroundPositionX: true, + backgroundPositionY: true, + backgroundRepeat: true + }, + backgroundPosition: { + backgroundPositionX: true, + backgroundPositionY: true + }, + border: { + borderWidth: true, + borderStyle: true, + borderColor: true + }, + borderBottom: { + borderBottomWidth: true, + borderBottomStyle: true, + borderBottomColor: true + }, + borderLeft: { + borderLeftWidth: true, + borderLeftStyle: true, + borderLeftColor: true + }, + borderRight: { + borderRightWidth: true, + borderRightStyle: true, + borderRightColor: true + }, + borderTop: { + borderTopWidth: true, + borderTopStyle: true, + borderTopColor: true + }, + font: { + fontStyle: true, + fontVariant: true, + fontWeight: true, + fontSize: true, + lineHeight: true, + fontFamily: true + }, + outline: { + outlineWidth: true, + outlineStyle: true, + outlineColor: true + } +}; + +var CSSProperty = { + isUnitlessNumber: isUnitlessNumber, + shorthandPropertyExpansions: shorthandPropertyExpansions +}; + +module.exports = CSSProperty; + +/***/ }), +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMProperty = __webpack_require__(67); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactInstrumentation = __webpack_require__(29); + +var quoteAttributeValueForBrowser = __webpack_require__(382); +var warning = __webpack_require__(12); + +var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); +var illegalAttributeNameCache = {}; +var validatedAttributeNameCache = {}; + +function isAttributeNameSafe(attributeName) { + if (validatedAttributeNameCache.hasOwnProperty(attributeName)) { + return true; + } + if (illegalAttributeNameCache.hasOwnProperty(attributeName)) { + return false; + } + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + illegalAttributeNameCache[attributeName] = true; + false ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0; + return false; +} + +function shouldIgnoreValue(propertyInfo, value) { + return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false; +} + +/** + * Operations for dealing with DOM properties. + */ +var DOMPropertyOperations = { + /** + * Creates markup for the ID property. + * + * @param {string} id Unescaped ID. + * @return {string} Markup string. + */ + createMarkupForID: function (id) { + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id); + }, + + setAttributeForID: function (node, id) { + node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id); + }, + + createMarkupForRoot: function () { + return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""'; + }, + + setAttributeForRoot: function (node) { + node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, ''); + }, + + /** + * Creates markup for a property. + * + * @param {string} name + * @param {*} value + * @return {?string} Markup string, or null if the property was invalid. + */ + createMarkupForProperty: function (name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + if (shouldIgnoreValue(propertyInfo, value)) { + return ''; + } + var attributeName = propertyInfo.attributeName; + if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) { + return attributeName + '=""'; + } + return attributeName + '=' + quoteAttributeValueForBrowser(value); + } else if (DOMProperty.isCustomAttribute(name)) { + if (value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + } + return null; + }, + + /** + * Creates markup for a custom property. + * + * @param {string} name + * @param {*} value + * @return {string} Markup string, or empty string if the property was invalid. + */ + createMarkupForCustomAttribute: function (name, value) { + if (!isAttributeNameSafe(name) || value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + }, + + /** + * Sets the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + * @param {*} value + */ + setValueForProperty: function (node, name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; + if (mutationMethod) { + mutationMethod(node, value); + } else if (shouldIgnoreValue(propertyInfo, value)) { + this.deleteValueForProperty(node, name); + return; + } else if (propertyInfo.mustUseProperty) { + // Contrary to `setAttribute`, object properties are properly + // `toString`ed by IE8/9. + node[propertyInfo.propertyName] = value; + } else { + var attributeName = propertyInfo.attributeName; + var namespace = propertyInfo.attributeNamespace; + // `setAttribute` with objects becomes only `[object]` in IE8/9, + // ('' + value) makes it output the correct toString()-value. + if (namespace) { + node.setAttributeNS(namespace, attributeName, '' + value); + } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) { + node.setAttribute(attributeName, ''); + } else { + node.setAttribute(attributeName, '' + value); + } + } + } else if (DOMProperty.isCustomAttribute(name)) { + DOMPropertyOperations.setValueForAttribute(node, name, value); + return; + } + + if (false) { + var payload = {}; + payload[name] = value; + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'update attribute', + payload: payload + }); + } + }, + + setValueForAttribute: function (node, name, value) { + if (!isAttributeNameSafe(name)) { + return; + } + if (value == null) { + node.removeAttribute(name); + } else { + node.setAttribute(name, '' + value); + } + + if (false) { + var payload = {}; + payload[name] = value; + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'update attribute', + payload: payload + }); + } + }, + + /** + * Deletes an attributes from a node. + * + * @param {DOMElement} node + * @param {string} name + */ + deleteValueForAttribute: function (node, name) { + node.removeAttribute(name); + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'remove attribute', + payload: name + }); + } + }, + + /** + * Deletes the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + */ + deleteValueForProperty: function (node, name) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; + if (mutationMethod) { + mutationMethod(node, undefined); + } else if (propertyInfo.mustUseProperty) { + var propName = propertyInfo.propertyName; + if (propertyInfo.hasBooleanValue) { + node[propName] = false; + } else { + node[propName] = ''; + } + } else { + node.removeAttribute(propertyInfo.attributeName); + } + } else if (DOMProperty.isCustomAttribute(name)) { + node.removeAttribute(name); + } + + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'remove attribute', + payload: name + }); + } + } +}; + +module.exports = DOMPropertyOperations; + +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var LinkedValueUtils = __webpack_require__(149); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactUpdates = __webpack_require__(31); + +var warning = __webpack_require__(12); + +var didWarnValueLink = false; +var didWarnValueDefaultValue = false; + +function updateOptionsIfPendingUpdateAndMounted() { + if (this._rootNodeID && this._wrapperState.pendingUpdate) { + this._wrapperState.pendingUpdate = false; + + var props = this._currentElement.props; + var value = LinkedValueUtils.getValue(props); + + if (value != null) { + updateOptions(this, Boolean(props.multiple), value); + } + } +} + +function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +var valuePropNames = ['value', 'defaultValue']; + +/** + * Validation function for `value` and `defaultValue`. + * @private + */ +function checkSelectPropTypes(inst, props) { + var owner = inst._currentElement._owner; + LinkedValueUtils.checkPropTypes('select', props, owner); + + if (props.valueLink !== undefined && !didWarnValueLink) { + false ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnValueLink = true; + } + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + if (props[propName] == null) { + continue; + } + var isArray = Array.isArray(props[propName]); + if (props.multiple && !isArray) { + false ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0; + } else if (!props.multiple && isArray) { + false ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0; + } + } +} + +/** + * @param {ReactDOMComponent} inst + * @param {boolean} multiple + * @param {*} propValue A stringable (with `multiple`, a list of stringables). + * @private + */ +function updateOptions(inst, multiple, propValue) { + var selectedValue, i; + var options = ReactDOMComponentTree.getNodeFromInstance(inst).options; + + if (multiple) { + selectedValue = {}; + for (i = 0; i < propValue.length; i++) { + selectedValue['' + propValue[i]] = true; + } + for (i = 0; i < options.length; i++) { + var selected = selectedValue.hasOwnProperty(options[i].value); + if (options[i].selected !== selected) { + options[i].selected = selected; + } + } + } else { + // Do not set `select.value` as exact behavior isn't consistent across all + // browsers for all cases. + selectedValue = '' + propValue; + for (i = 0; i < options.length; i++) { + if (options[i].value === selectedValue) { + options[i].selected = true; + return; + } + } + if (options.length) { + options[0].selected = true; + } + } +} + +/** + * Implements a <select> host component that allows optionally setting the + * props `value` and `defaultValue`. If `multiple` is false, the prop must be a + * stringable. If `multiple` is true, the prop must be an array of stringables. + * + * If `value` is not supplied (or null/undefined), user actions that change the + * selected option will trigger updates to the rendered options. + * + * If it is supplied (and not null/undefined), the rendered options will not + * update in response to user actions. Instead, the `value` prop must change in + * order for the rendered options to update. + * + * If `defaultValue` is provided, any options with the supplied values will be + * selected. + */ +var ReactDOMSelect = { + getHostProps: function (inst, props) { + return _assign({}, props, { + onChange: inst._wrapperState.onChange, + value: undefined + }); + }, + + mountWrapper: function (inst, props) { + if (false) { + checkSelectPropTypes(inst, props); + } + + var value = LinkedValueUtils.getValue(props); + inst._wrapperState = { + pendingUpdate: false, + initialValue: value != null ? value : props.defaultValue, + listeners: null, + onChange: _handleChange.bind(inst), + wasMultiple: Boolean(props.multiple) + }; + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { + false ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0; + didWarnValueDefaultValue = true; + } + }, + + getSelectValueContext: function (inst) { + // ReactDOMOption looks at this initial value so the initial generated + // markup has correct `selected` attributes + return inst._wrapperState.initialValue; + }, + + postUpdateWrapper: function (inst) { + var props = inst._currentElement.props; + + // After the initial mount, we control selected-ness manually so don't pass + // this value down + inst._wrapperState.initialValue = undefined; + + var wasMultiple = inst._wrapperState.wasMultiple; + inst._wrapperState.wasMultiple = Boolean(props.multiple); + + var value = LinkedValueUtils.getValue(props); + if (value != null) { + inst._wrapperState.pendingUpdate = false; + updateOptions(inst, Boolean(props.multiple), value); + } else if (wasMultiple !== Boolean(props.multiple)) { + // For simplicity, reapply `defaultValue` if `multiple` is toggled. + if (props.defaultValue != null) { + updateOptions(inst, Boolean(props.multiple), props.defaultValue); + } else { + // Revert the select back to its default unselected state. + updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : ''); + } + } + } +}; + +function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); + + if (this._rootNodeID) { + this._wrapperState.pendingUpdate = true; + } + ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this); + return returnValue; +} + +module.exports = ReactDOMSelect; + +/***/ }), +/* 229 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(15); + +var ReactCompositeComponent = __webpack_require__(391); +var ReactEmptyComponent = __webpack_require__(232); +var ReactHostComponent = __webpack_require__(233); + +var getNextDebugID = __webpack_require__(392); +var invariant = __webpack_require__(9); +var warning = __webpack_require__(12); + +// To avoid a cyclic dependency, we create the final class in this module +var ReactCompositeComponentWrapper = function (element) { + this.construct(element); +}; + +function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +/** + * Check if the type reference is a known internal type. I.e. not a user + * provided composite type. + * + * @param {function} type + * @return {boolean} Returns true if this is a valid internal type. + */ +function isInternalComponentType(type) { + return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function'; +} + +/** + * Given a ReactNode, create an instance that will actually be mounted. + * + * @param {ReactNode} node + * @param {boolean} shouldHaveDebugID + * @return {object} A new instance of the element's constructor. + * @protected + */ +function instantiateReactComponent(node, shouldHaveDebugID) { + var instance; + + if (node === null || node === false) { + instance = ReactEmptyComponent.create(instantiateReactComponent); + } else if (typeof node === 'object') { + var element = node; + var type = element.type; + if (typeof type !== 'function' && typeof type !== 'string') { + var info = ''; + if (false) { + if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { + info += ' You likely forgot to export your component from the file ' + "it's defined in."; + } + } + info += getDeclarationErrorAddendum(element._owner); + true ? false ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0; + } + + // Special case string values + if (typeof element.type === 'string') { + instance = ReactHostComponent.createInternalComponent(element); + } else if (isInternalComponentType(element.type)) { + // This is temporarily available for custom components that are not string + // representations. I.e. ART. Once those are updated to use the string + // representation, we can drop this code path. + instance = new element.type(element); + + // We renamed this. Allow the old name for compat. :( + if (!instance.getHostNode) { + instance.getHostNode = instance.getNativeNode; + } + } else { + instance = new ReactCompositeComponentWrapper(element); + } + } else if (typeof node === 'string' || typeof node === 'number') { + instance = ReactHostComponent.createInstanceForText(node); + } else { + true ? false ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0; + } + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0; + } + + // These two fields are used by the DOM and ART diffing algorithms + // respectively. Instead of using expandos on components, we should be + // storing the state needed by the diffing algorithms elsewhere. + instance._mountIndex = 0; + instance._mountImage = null; + + if (false) { + instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0; + } + + // Internal instances should fully constructed at this point, so they should + // not get any new fields added to them at this point. + if (false) { + if (Object.preventExtensions) { + Object.preventExtensions(instance); + } + } + + return instance; +} + +_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, { + _instantiateReactComponent: instantiateReactComponent +}); + +module.exports = instantiateReactComponent; + +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var React = __webpack_require__(65); + +var invariant = __webpack_require__(9); + +var ReactNodeTypes = { + HOST: 0, + COMPOSITE: 1, + EMPTY: 2, + + getType: function (node) { + if (node === null || node === false) { + return ReactNodeTypes.EMPTY; + } else if (React.isValidElement(node)) { + if (typeof node.type === 'function') { + return ReactNodeTypes.COMPOSITE; + } else { + return ReactNodeTypes.HOST; + } + } + true ? false ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0; + } +}; + +module.exports = ReactNodeTypes; + +/***/ }), +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var emptyComponentFactory; + +var ReactEmptyComponentInjection = { + injectEmptyComponentFactory: function (factory) { + emptyComponentFactory = factory; + } +}; + +var ReactEmptyComponent = { + create: function (instantiate) { + return emptyComponentFactory(instantiate); + } +}; + +ReactEmptyComponent.injection = ReactEmptyComponentInjection; + +module.exports = ReactEmptyComponent; + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(9); + +var genericComponentClass = null; +var textComponentClass = null; + +var ReactHostComponentInjection = { + // This accepts a class that receives the tag string. This is a catch all + // that can render any kind of tag. + injectGenericComponentClass: function (componentClass) { + genericComponentClass = componentClass; + }, + // This accepts a text component class that takes the text string to be + // rendered as props. + injectTextComponentClass: function (componentClass) { + textComponentClass = componentClass; + } +}; + +/** + * Get a host internal component class for a specific tag. + * + * @param {ReactElement} element The element to create. + * @return {function} The internal class constructor function. + */ +function createInternalComponent(element) { + !genericComponentClass ? false ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0; + return new genericComponentClass(element); +} + +/** + * @param {ReactText} text + * @return {ReactComponent} + */ +function createInstanceForText(text) { + return new textComponentClass(text); +} + +/** + * @param {ReactComponent} component + * @return {boolean} + */ +function isTextComponent(component) { + return component instanceof textComponentClass; +} + +var ReactHostComponent = { + createInternalComponent: createInternalComponent, + createInstanceForText: createInstanceForText, + isTextComponent: isTextComponent, + injection: ReactHostComponentInjection +}; + +module.exports = ReactHostComponent; + +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var ReactCurrentOwner = __webpack_require__(37); +var REACT_ELEMENT_TYPE = __webpack_require__(393); + +var getIteratorFn = __webpack_require__(394); +var invariant = __webpack_require__(9); +var KeyEscapeUtils = __webpack_require__(152); +var warning = __webpack_require__(12); + +var SEPARATOR = '.'; +var SUBSEPARATOR = ':'; + +/** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ + +/** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + +var didWarnAboutMaps = false; + +/** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ +function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); +} + +/** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if (children === null || type === 'string' || type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { + callback(traverseContext, children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + if (false) { + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } + } + } else if (type === 'object') { + var addendum = ''; + if (false) { + addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; + if (children._isReactElement) { + addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } + } + } + var childrenString = String(children); + true ? false ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; + } + } + + return subtreeCount; +} + +/** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); +} + +module.exports = traverseAllChildren; + +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(85); + +var ReactCurrentOwner = __webpack_require__(37); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(12); + +function isNative(fn) { + // Based on isNative() from Lodash + var funcToString = Function.prototype.toString; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var reIsNative = RegExp('^' + funcToString + // Take an example native function source for comparison + .call(hasOwnProperty + // Strip regex characters so we can use it for regex + ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&' + // Remove hasOwnProperty from the template to make it generic + ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + try { + var source = funcToString.call(fn); + return reIsNative.test(source); + } catch (err) { + return false; + } +} + +var canUseCollections = +// Array.from +typeof Array.from === 'function' && +// Map +typeof Map === 'function' && isNative(Map) && +// Map.prototype.keys +Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) && +// Set +typeof Set === 'function' && isNative(Set) && +// Set.prototype.keys +Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys); + +var setItem; +var getItem; +var removeItem; +var getItemIDs; +var addRoot; +var removeRoot; +var getRootIDs; + +if (canUseCollections) { + var itemMap = new Map(); + var rootIDSet = new Set(); + + setItem = function (id, item) { + itemMap.set(id, item); + }; + getItem = function (id) { + return itemMap.get(id); + }; + removeItem = function (id) { + itemMap['delete'](id); + }; + getItemIDs = function () { + return Array.from(itemMap.keys()); + }; + + addRoot = function (id) { + rootIDSet.add(id); + }; + removeRoot = function (id) { + rootIDSet['delete'](id); + }; + getRootIDs = function () { + return Array.from(rootIDSet.keys()); + }; +} else { + var itemByKey = {}; + var rootByKey = {}; + + // Use non-numeric keys to prevent V8 performance issues: + // https://github.com/facebook/react/pull/7232 + var getKeyFromID = function (id) { + return '.' + id; + }; + var getIDFromKey = function (key) { + return parseInt(key.substr(1), 10); + }; + + setItem = function (id, item) { + var key = getKeyFromID(id); + itemByKey[key] = item; + }; + getItem = function (id) { + var key = getKeyFromID(id); + return itemByKey[key]; + }; + removeItem = function (id) { + var key = getKeyFromID(id); + delete itemByKey[key]; + }; + getItemIDs = function () { + return Object.keys(itemByKey).map(getIDFromKey); + }; + + addRoot = function (id) { + var key = getKeyFromID(id); + rootByKey[key] = true; + }; + removeRoot = function (id) { + var key = getKeyFromID(id); + delete rootByKey[key]; + }; + getRootIDs = function () { + return Object.keys(rootByKey).map(getIDFromKey); + }; +} + +var unmountedIDs = []; + +function purgeDeep(id) { + var item = getItem(id); + if (item) { + var childIDs = item.childIDs; + + removeItem(id); + childIDs.forEach(purgeDeep); + } +} + +function describeComponentFrame(name, source, ownerName) { + return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); +} + +function getDisplayName(element) { + if (element == null) { + return '#empty'; + } else if (typeof element === 'string' || typeof element === 'number') { + return '#text'; + } else if (typeof element.type === 'string') { + return element.type; + } else { + return element.type.displayName || element.type.name || 'Unknown'; + } +} + +function describeID(id) { + var name = ReactComponentTreeHook.getDisplayName(id); + var element = ReactComponentTreeHook.getElement(id); + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var ownerName; + if (ownerID) { + ownerName = ReactComponentTreeHook.getDisplayName(ownerID); + } + false ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0; + return describeComponentFrame(name, element && element._source, ownerName); +} + +var ReactComponentTreeHook = { + onSetChildren: function (id, nextChildIDs) { + var item = getItem(id); + !item ? false ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; + item.childIDs = nextChildIDs; + + for (var i = 0; i < nextChildIDs.length; i++) { + var nextChildID = nextChildIDs[i]; + var nextChild = getItem(nextChildID); + !nextChild ? false ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0; + !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? false ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0; + !nextChild.isMounted ? false ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0; + if (nextChild.parentID == null) { + nextChild.parentID = id; + // TODO: This shouldn't be necessary but mounting a new root during in + // componentWillMount currently causes not-yet-mounted components to + // be purged from our tree data so their parent id is missing. + } + !(nextChild.parentID === id) ? false ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0; + } + }, + onBeforeMountComponent: function (id, element, parentID) { + var item = { + element: element, + parentID: parentID, + text: null, + childIDs: [], + isMounted: false, + updateCount: 0 + }; + setItem(id, item); + }, + onBeforeUpdateComponent: function (id, element) { + var item = getItem(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.element = element; + }, + onMountComponent: function (id) { + var item = getItem(id); + !item ? false ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; + item.isMounted = true; + var isRoot = item.parentID === 0; + if (isRoot) { + addRoot(id); + } + }, + onUpdateComponent: function (id) { + var item = getItem(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.updateCount++; + }, + onUnmountComponent: function (id) { + var item = getItem(id); + if (item) { + // We need to check if it exists. + // `item` might not exist if it is inside an error boundary, and a sibling + // error boundary child threw while mounting. Then this instance never + // got a chance to mount, but it still gets an unmounting event during + // the error boundary cleanup. + item.isMounted = false; + var isRoot = item.parentID === 0; + if (isRoot) { + removeRoot(id); + } + } + unmountedIDs.push(id); + }, + purgeUnmountedComponents: function () { + if (ReactComponentTreeHook._preventPurging) { + // Should only be used for testing. + return; + } + + for (var i = 0; i < unmountedIDs.length; i++) { + var id = unmountedIDs[i]; + purgeDeep(id); + } + unmountedIDs.length = 0; + }, + isMounted: function (id) { + var item = getItem(id); + return item ? item.isMounted : false; + }, + getCurrentStackAddendum: function (topElement) { + var info = ''; + if (topElement) { + var name = getDisplayName(topElement); + var owner = topElement._owner; + info += describeComponentFrame(name, topElement._source, owner && owner.getName()); + } + + var currentOwner = ReactCurrentOwner.current; + var id = currentOwner && currentOwner._debugID; + + info += ReactComponentTreeHook.getStackAddendumByID(id); + return info; + }, + getStackAddendumByID: function (id) { + var info = ''; + while (id) { + info += describeID(id); + id = ReactComponentTreeHook.getParentID(id); + } + return info; + }, + getChildIDs: function (id) { + var item = getItem(id); + return item ? item.childIDs : []; + }, + getDisplayName: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (!element) { + return null; + } + return getDisplayName(element); + }, + getElement: function (id) { + var item = getItem(id); + return item ? item.element : null; + }, + getOwnerID: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (!element || !element._owner) { + return null; + } + return element._owner._debugID; + }, + getParentID: function (id) { + var item = getItem(id); + return item ? item.parentID : null; + }, + getSource: function (id) { + var item = getItem(id); + var element = item ? item.element : null; + var source = element != null ? element._source : null; + return source; + }, + getText: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (typeof element === 'string') { + return element; + } else if (typeof element === 'number') { + return '' + element; + } else { + return null; + } + }, + getUpdateCount: function (id) { + var item = getItem(id); + return item ? item.updateCount : 0; + }, + + + getRootIDs: getRootIDs, + getRegisteredIDs: getItemIDs, + + pushNonStandardWarningStack: function (isCreatingElement, currentSource) { + if (typeof console.reactStack !== 'function') { + return; + } + + var stack = []; + var currentOwner = ReactCurrentOwner.current; + var id = currentOwner && currentOwner._debugID; + + try { + if (isCreatingElement) { + stack.push({ + name: id ? ReactComponentTreeHook.getDisplayName(id) : null, + fileName: currentSource ? currentSource.fileName : null, + lineNumber: currentSource ? currentSource.lineNumber : null + }); + } + + while (id) { + var element = ReactComponentTreeHook.getElement(id); + var parentID = ReactComponentTreeHook.getParentID(id); + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null; + var source = element && element._source; + stack.push({ + name: ownerName, + fileName: source ? source.fileName : null, + lineNumber: source ? source.lineNumber : null + }); + id = parentID; + } + } catch (err) { + // Internal state is messed up. + // Stop building the stack (it's just a nice to have). + } + + console.reactStack(stack); + }, + popNonStandardWarningStack: function () { + if (typeof console.reactStackEnd !== 'function') { + return; + } + console.reactStackEnd(); + } +}; + +module.exports = ReactComponentTreeHook; + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var emptyFunction = __webpack_require__(24); + +/** + * Upstream version of event listener. Does not take into account specific + * nature of platform. + */ +var EventListener = { + /** + * Listen to DOM events during the bubble phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + listen: function listen(target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, false); + return { + remove: function remove() { + target.removeEventListener(eventType, callback, false); + } + }; + } else if (target.attachEvent) { + target.attachEvent('on' + eventType, callback); + return { + remove: function remove() { + target.detachEvent('on' + eventType, callback); + } + }; + } + }, + + /** + * Listen to DOM events during the capture phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + capture: function capture(target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, true); + return { + remove: function remove() { + target.removeEventListener(eventType, callback, true); + } + }; + } else { + if (false) { + console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.'); + } + return { + remove: emptyFunction + }; + } + }, + + registerDefault: function registerDefault() {} +}; + +module.exports = EventListener; + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMSelection = __webpack_require__(406); + +var containsNode = __webpack_require__(408); +var focusNode = __webpack_require__(225); +var getActiveElement = __webpack_require__(238); + +function isInDocument(node) { + return containsNode(document.documentElement, node); +} + +/** + * @ReactInputSelection: React input selection module. Based on Selection.js, + * but modified to be suitable for react and has a couple of bug fixes (doesn't + * assume buttons have range selections allowed). + * Input selection module for React. + */ +var ReactInputSelection = { + hasSelectionCapabilities: function (elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true'); + }, + + getSelectionInformation: function () { + var focusedElem = getActiveElement(); + return { + focusedElem: focusedElem, + selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null + }; + }, + + /** + * @restoreSelection: If any selection information was potentially lost, + * restore it. This is useful when performing operations that could remove dom + * nodes and place them back in, resulting in focus being lost. + */ + restoreSelection: function (priorSelectionInformation) { + var curFocusedElem = getActiveElement(); + var priorFocusedElem = priorSelectionInformation.focusedElem; + var priorSelectionRange = priorSelectionInformation.selectionRange; + if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { + if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) { + ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange); + } + focusNode(priorFocusedElem); + } + }, + + /** + * @getSelection: Gets the selection bounds of a focused textarea, input or + * contentEditable node. + * -@input: Look up selection bounds of this input + * -@return {start: selectionStart, end: selectionEnd} + */ + getSelection: function (input) { + var selection; + + if ('selectionStart' in input) { + // Modern browser with input or textarea. + selection = { + start: input.selectionStart, + end: input.selectionEnd + }; + } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { + // IE8 input. + var range = document.selection.createRange(); + // There can only be one selection per document in IE, so it must + // be in our element. + if (range.parentElement() === input) { + selection = { + start: -range.moveStart('character', -input.value.length), + end: -range.moveEnd('character', -input.value.length) + }; + } + } else { + // Content editable or old IE textarea. + selection = ReactDOMSelection.getOffsets(input); + } + + return selection || { start: 0, end: 0 }; + }, + + /** + * @setSelection: Sets the selection bounds of a textarea or input and focuses + * the input. + * -@input Set selection bounds of this input or textarea + * -@offsets Object of same form that is returned from get* + */ + setSelection: function (input, offsets) { + var start = offsets.start; + var end = offsets.end; + if (end === undefined) { + end = start; + } + + if ('selectionStart' in input) { + input.selectionStart = start; + input.selectionEnd = Math.min(end, input.value.length); + } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { + var range = input.createTextRange(); + range.collapse(true); + range.moveStart('character', start); + range.moveEnd('character', end - start); + range.select(); + } else { + ReactDOMSelection.setOffsets(input, offsets); + } + } +}; + +module.exports = ReactInputSelection; + +/***/ }), +/* 238 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +/* eslint-disable fb-www/typeof-undefined */ + +/** + * Same as document.activeElement but wraps in a try-catch block. In IE it is + * not safe to call document.activeElement if there is nothing focused. + * + * The activeElement will be null only if the document or document body is not + * yet defined. + * + * @param {?DOMDocument} doc Defaults to current document. + * @return {?DOMElement} + */ +function getActiveElement(doc) /*?DOMElement*/{ + doc = doc || (typeof document !== 'undefined' ? document : undefined); + if (typeof doc === 'undefined') { + return null; + } + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } +} + +module.exports = getActiveElement; + +/***/ }), +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var DOMLazyTree = __webpack_require__(72); +var DOMProperty = __webpack_require__(67); +var React = __webpack_require__(65); +var ReactBrowserEventEmitter = __webpack_require__(108); +var ReactCurrentOwner = __webpack_require__(37); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactDOMContainerInfo = __webpack_require__(423); +var ReactDOMFeatureFlags = __webpack_require__(424); +var ReactFeatureFlags = __webpack_require__(221); +var ReactInstanceMap = __webpack_require__(86); +var ReactInstrumentation = __webpack_require__(29); +var ReactMarkupChecksum = __webpack_require__(425); +var ReactReconciler = __webpack_require__(70); +var ReactUpdateQueue = __webpack_require__(153); +var ReactUpdates = __webpack_require__(31); + +var emptyObject = __webpack_require__(102); +var instantiateReactComponent = __webpack_require__(230); +var invariant = __webpack_require__(9); +var setInnerHTML = __webpack_require__(106); +var shouldUpdateReactComponent = __webpack_require__(151); +var warning = __webpack_require__(12); + +var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; +var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME; + +var ELEMENT_NODE_TYPE = 1; +var DOC_NODE_TYPE = 9; +var DOCUMENT_FRAGMENT_NODE_TYPE = 11; + +var instancesByReactRootID = {}; + +/** + * Finds the index of the first character + * that's not common between the two given strings. + * + * @return {number} the index of the character where the strings diverge + */ +function firstDifferenceIndex(string1, string2) { + var minLen = Math.min(string1.length, string2.length); + for (var i = 0; i < minLen; i++) { + if (string1.charAt(i) !== string2.charAt(i)) { + return i; + } + } + return string1.length === string2.length ? -1 : minLen; +} + +/** + * @param {DOMElement|DOMDocument} container DOM element that may contain + * a React component + * @return {?*} DOM element that may have the reactRoot ID, or null. + */ +function getReactRootElementInContainer(container) { + if (!container) { + return null; + } + + if (container.nodeType === DOC_NODE_TYPE) { + return container.documentElement; + } else { + return container.firstChild; + } +} + +function internalGetID(node) { + // If node is something like a window, document, or text node, none of + // which support attributes or a .getAttribute method, gracefully return + // the empty string, as if the attribute were missing. + return node.getAttribute && node.getAttribute(ATTR_NAME) || ''; +} + +/** + * Mounts this component and inserts it into the DOM. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {DOMElement} container DOM element to mount into. + * @param {ReactReconcileTransaction} transaction + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ +function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) { + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var wrappedElement = wrapperInstance._currentElement.props.child; + var type = wrappedElement.type; + markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name); + console.time(markerName); + } + + var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */ + ); + + if (markerName) { + console.timeEnd(markerName); + } + + wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance; + ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction); +} + +/** + * Batched mount. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {DOMElement} container DOM element to mount into. + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ +function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) { + var transaction = ReactUpdates.ReactReconcileTransaction.getPooled( + /* useCreateElement */ + !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement); + transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context); + ReactUpdates.ReactReconcileTransaction.release(transaction); +} + +/** + * Unmounts a component and removes it from the DOM. + * + * @param {ReactComponent} instance React component instance. + * @param {DOMElement} container DOM element to unmount from. + * @final + * @internal + * @see {ReactMount.unmountComponentAtNode} + */ +function unmountComponentFromNode(instance, container, safely) { + if (false) { + ReactInstrumentation.debugTool.onBeginFlush(); + } + ReactReconciler.unmountComponent(instance, safely); + if (false) { + ReactInstrumentation.debugTool.onEndFlush(); + } + + if (container.nodeType === DOC_NODE_TYPE) { + container = container.documentElement; + } + + // http://jsperf.com/emptying-a-node + while (container.lastChild) { + container.removeChild(container.lastChild); + } +} + +/** + * True if the supplied DOM node has a direct React-rendered child that is + * not a React root element. Useful for warning in `render`, + * `unmountComponentAtNode`, etc. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM element contains a direct child that was + * rendered by React but is not a root element. + * @internal + */ +function hasNonRootReactChild(container) { + var rootEl = getReactRootElementInContainer(container); + if (rootEl) { + var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl); + return !!(inst && inst._hostParent); + } +} + +/** + * True if the supplied DOM node is a React DOM element and + * it has been rendered by another copy of React. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM has been rendered by another copy of React + * @internal + */ +function nodeIsRenderedByOtherInstance(container) { + var rootEl = getReactRootElementInContainer(container); + return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl)); +} + +/** + * True if the supplied DOM node is a valid node element. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM is a valid DOM node. + * @internal + */ +function isValidContainer(node) { + return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)); +} + +/** + * True if the supplied DOM node is a valid React node element. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM is a valid React DOM node. + * @internal + */ +function isReactNode(node) { + return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME)); +} + +function getHostRootInstanceInContainer(container) { + var rootEl = getReactRootElementInContainer(container); + var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl); + return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null; +} + +function getTopLevelWrapperInContainer(container) { + var root = getHostRootInstanceInContainer(container); + return root ? root._hostContainerInfo._topLevelWrapper : null; +} + +/** + * Temporary (?) hack so that we can store all top-level pending updates on + * composites instead of having to worry about different types of components + * here. + */ +var topLevelRootCounter = 1; +var TopLevelWrapper = function () { + this.rootID = topLevelRootCounter++; +}; +TopLevelWrapper.prototype.isReactComponent = {}; +if (false) { + TopLevelWrapper.displayName = 'TopLevelWrapper'; +} +TopLevelWrapper.prototype.render = function () { + return this.props.child; +}; +TopLevelWrapper.isReactTopLevelWrapper = true; + +/** + * Mounting is the process of initializing a React component by creating its + * representative DOM elements and inserting them into a supplied `container`. + * Any prior content inside `container` is destroyed in the process. + * + * ReactMount.render( + * component, + * document.getElementById('container') + * ); + * + * <div id="container"> <-- Supplied `container`. + * <div data-reactid=".3"> <-- Rendered reactRoot of React + * // ... component. + * </div> + * </div> + * + * Inside of `container`, the first element rendered is the "reactRoot". + */ +var ReactMount = { + TopLevelWrapper: TopLevelWrapper, + + /** + * Used by devtools. The keys are not important. + */ + _instancesByReactRootID: instancesByReactRootID, + + /** + * This is a hook provided to support rendering React components while + * ensuring that the apparent scroll position of its `container` does not + * change. + * + * @param {DOMElement} container The `container` being rendered into. + * @param {function} renderCallback This must be called once to do the render. + */ + scrollMonitor: function (container, renderCallback) { + renderCallback(); + }, + + /** + * Take a component that's already mounted into the DOM and replace its props + * @param {ReactComponent} prevComponent component instance already in the DOM + * @param {ReactElement} nextElement component instance to render + * @param {DOMElement} container container to render into + * @param {?function} callback function triggered on completion + */ + _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) { + ReactMount.scrollMonitor(container, function () { + ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext); + if (callback) { + ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback); + } + }); + + return prevComponent; + }, + + /** + * Render a new component into the DOM. Hooked by hooks! + * + * @param {ReactElement} nextElement element to render + * @param {DOMElement} container container to render into + * @param {boolean} shouldReuseMarkup if we should skip the markup insertion + * @return {ReactComponent} nextComponent + */ + _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. + false ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0; + + !isValidContainer(container) ? false ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0; + + ReactBrowserEventEmitter.ensureScrollValueMonitoring(); + var componentInstance = instantiateReactComponent(nextElement, false); + + // The initial render is synchronous but any updates that happen during + // rendering, in componentWillMount or componentDidMount, will be batched + // according to the current batching strategy. + + ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context); + + var wrapperID = componentInstance._instance.rootID; + instancesByReactRootID[wrapperID] = componentInstance; + + return componentInstance; + }, + + /** + * Renders a React component into the DOM in the supplied `container`. + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. + * + * @param {ReactComponent} parentComponent The conceptual parent of this render tree. + * @param {ReactElement} nextElement Component element to render. + * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion + * @return {ReactComponent} Component instance rendered in `container`. + */ + renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { + !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? false ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0; + return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback); + }, + + _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { + ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render'); + !React.isValidElement(nextElement) ? false ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or <div />." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : // Check if it quacks like an element + nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or <div />." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0; + + false ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0; + + var nextWrappedElement = React.createElement(TopLevelWrapper, { + child: nextElement + }); + + var nextContext; + if (parentComponent) { + var parentInst = ReactInstanceMap.get(parentComponent); + nextContext = parentInst._processChildContext(parentInst._context); + } else { + nextContext = emptyObject; + } + + var prevComponent = getTopLevelWrapperInContainer(container); + + if (prevComponent) { + var prevWrappedElement = prevComponent._currentElement; + var prevElement = prevWrappedElement.props.child; + if (shouldUpdateReactComponent(prevElement, nextElement)) { + var publicInst = prevComponent._renderedComponent.getPublicInstance(); + var updatedCallback = callback && function () { + callback.call(publicInst); + }; + ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback); + return publicInst; + } else { + ReactMount.unmountComponentAtNode(container); + } + } + + var reactRootElement = getReactRootElementInContainer(container); + var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement); + var containerHasNonRootReactChild = hasNonRootReactChild(container); + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0; + + if (!containerHasReactMarkup || reactRootElement.nextSibling) { + var rootElementSibling = reactRootElement; + while (rootElementSibling) { + if (internalGetID(rootElementSibling)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0; + break; + } + rootElementSibling = rootElementSibling.nextSibling; + } + } + } + + var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild; + var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance(); + if (callback) { + callback.call(component); + } + return component; + }, + + /** + * Renders a React component into the DOM in the supplied `container`. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. + * + * @param {ReactElement} nextElement Component element to render. + * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion + * @return {ReactComponent} Component instance rendered in `container`. + */ + render: function (nextElement, container, callback) { + return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback); + }, + + /** + * Unmounts and destroys the React component rendered in the `container`. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode + * + * @param {DOMElement} container DOM element containing a React component. + * @return {boolean} True if a component was found in and unmounted from + * `container` + */ + unmountComponentAtNode: function (container) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (Strictly speaking, unmounting won't cause a + // render but we still don't expect to be in a render call here.) + false ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0; + + !isValidContainer(container) ? false ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0; + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0; + } + + var prevComponent = getTopLevelWrapperInContainer(container); + if (!prevComponent) { + // Check if the node being unmounted was rendered by React, but isn't a + // root node. + var containerHasNonRootReactChild = hasNonRootReactChild(container); + + // Check if the container itself is a React root node. + var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME); + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0; + } + + return false; + } + delete instancesByReactRootID[prevComponent._instance.rootID]; + ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false); + return true; + }, + + _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) { + !isValidContainer(container) ? false ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0; + + if (shouldReuseMarkup) { + var rootElement = getReactRootElementInContainer(container); + if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) { + ReactDOMComponentTree.precacheNode(instance, rootElement); + return; + } else { + var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + + var rootMarkup = rootElement.outerHTML; + rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum); + + var normalizedMarkup = markup; + if (false) { + // because rootMarkup is retrieved from the DOM, various normalizations + // will have occurred which will not be present in `markup`. Here, + // insert markup into a <div> or <iframe> depending on the container + // type to perform the same normalizations before comparing. + var normalizer; + if (container.nodeType === ELEMENT_NODE_TYPE) { + normalizer = document.createElement('div'); + normalizer.innerHTML = markup; + normalizedMarkup = normalizer.innerHTML; + } else { + normalizer = document.createElement('iframe'); + document.body.appendChild(normalizer); + normalizer.contentDocument.write(markup); + normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML; + document.body.removeChild(normalizer); + } + } + + var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup); + var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20); + + !(container.nodeType !== DOC_NODE_TYPE) ? false ? invariant(false, 'You\'re trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s', difference) : _prodInvariant('42', difference) : void 0; + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : void 0; + } + } + } + + !(container.nodeType !== DOC_NODE_TYPE) ? false ? invariant(false, 'You\'re trying to render a component to the document but you didn\'t use server rendering. We can\'t do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('43') : void 0; + + if (transaction.useCreateElement) { + while (container.lastChild) { + container.removeChild(container.lastChild); + } + DOMLazyTree.insertTreeBefore(container, markup, null); + } else { + setInnerHTML(container, markup); + ReactDOMComponentTree.precacheNode(instance, container.firstChild); + } + + if (false) { + var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild); + if (hostNode._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: hostNode._debugID, + type: 'mount', + payload: markup.toString() + }); + } + } + } +}; + +module.exports = ReactMount; + +/***/ }), +/* 240 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactNodeTypes = __webpack_require__(231); + +function getHostComponentFromComposite(inst) { + var type; + + while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) { + inst = inst._renderedComponent; + } + + if (type === ReactNodeTypes.HOST) { + return inst._renderedComponent; + } else if (type === ReactNodeTypes.EMPTY) { + return null; + } +} + +module.exports = getHostComponentFromComposite; + +/***/ }), +/* 241 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = createTransitionManager; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(73); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(432); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(433); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(434); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(435); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(436); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + + + + +function hasAnyProperties(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return true; + }return false; +} + +function createTransitionManager(history, routes) { + var state = {}; + + var _getTransitionUtils = Object(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["a" /* default */])(), + runEnterHooks = _getTransitionUtils.runEnterHooks, + runChangeHooks = _getTransitionUtils.runChangeHooks, + runLeaveHooks = _getTransitionUtils.runLeaveHooks; + + // Signature should be (location, indexOnly), but needs to support (path, + // query, indexOnly) + + + function isActive(location, indexOnly) { + location = history.createLocation(location); + + return Object(__WEBPACK_IMPORTED_MODULE_3__isActive__["a" /* default */])(location, indexOnly, state.location, state.routes, state.params); + } + + var partialNextState = void 0; + + function match(location, callback) { + if (partialNextState && partialNextState.location === location) { + // Continue from where we left off. + finishMatch(partialNextState, callback); + } else { + Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */])(routes, location, function (error, nextState) { + if (error) { + callback(error); + } else if (nextState) { + finishMatch(_extends({}, nextState, { location: location }), callback); + } else { + callback(); + } + }); + } + } + + function finishMatch(nextState, callback) { + var _computeChangedRoutes = Object(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */])(state, nextState), + leaveRoutes = _computeChangedRoutes.leaveRoutes, + changeRoutes = _computeChangedRoutes.changeRoutes, + enterRoutes = _computeChangedRoutes.enterRoutes; + + runLeaveHooks(leaveRoutes, state); + + // Tear down confirmation hooks for left routes + leaveRoutes.filter(function (route) { + return enterRoutes.indexOf(route) === -1; + }).forEach(removeListenBeforeHooksForRoute); + + // change and enter hooks are run in series + runChangeHooks(changeRoutes, state, nextState, function (error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + runEnterHooks(enterRoutes, nextState, finishEnterHooks); + }); + + function finishEnterHooks(error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + // TODO: Fetch components after state is updated. + Object(__WEBPACK_IMPORTED_MODULE_4__getComponents__["a" /* default */])(nextState, function (error, components) { + if (error) { + callback(error); + } else { + // TODO: Make match a pure function and have some other API + // for "match and update state". + callback(null, null, state = _extends({}, nextState, { components: components })); + } + }); + } + + function handleErrorOrRedirect(error, redirectInfo) { + if (error) callback(error);else callback(null, redirectInfo); + } + } + + var RouteGuid = 1; + + function getRouteID(route) { + var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + return route.__id__ || create && (route.__id__ = RouteGuid++); + } + + var RouteHooks = Object.create(null); + + function getRouteHooksForRoutes(routes) { + return routes.map(function (route) { + return RouteHooks[getRouteID(route)]; + }).filter(function (hook) { + return hook; + }); + } + + function transitionHook(location, callback) { + Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */])(routes, location, function (error, nextState) { + if (nextState == null) { + // TODO: We didn't actually match anything, but hang + // onto error/nextState so we don't have to matchRoutes + // again in the listen callback. + callback(); + return; + } + + // Cache some state here so we don't have to + // matchRoutes() again in the listen callback. + partialNextState = _extends({}, nextState, { location: location }); + + var hooks = getRouteHooksForRoutes(Object(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */])(state, partialNextState).leaveRoutes); + + var result = void 0; + for (var i = 0, len = hooks.length; result == null && i < len; ++i) { + // Passing the location arg here indicates to + // the user that this is a transition hook. + result = hooks[i](location); + } + + callback(result); + }); + } + + /* istanbul ignore next: untestable with Karma */ + function beforeUnloadHook() { + // Synchronously check to see if any route hooks want + // to prevent the current window/tab from closing. + if (state.routes) { + var hooks = getRouteHooksForRoutes(state.routes); + + var message = void 0; + for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) { + // Passing no args indicates to the user that this is a + // beforeunload hook. We don't know the next location. + message = hooks[i](); + } + + return message; + } + } + + var unlistenBefore = void 0, + unlistenBeforeUnload = void 0; + + function removeListenBeforeHooksForRoute(route) { + var routeID = getRouteID(route); + if (!routeID) { + return; + } + + delete RouteHooks[routeID]; + + if (!hasAnyProperties(RouteHooks)) { + // teardown transition & beforeunload hooks + if (unlistenBefore) { + unlistenBefore(); + unlistenBefore = null; + } + + if (unlistenBeforeUnload) { + unlistenBeforeUnload(); + unlistenBeforeUnload = null; + } + } + } + + /** + * Registers the given hook function to run before leaving the given route. + * + * During a normal transition, the hook function receives the next location + * as its only argument and can return either a prompt message (string) to show the user, + * to make sure they want to leave the page; or `false`, to prevent the transition. + * Any other return value will have no effect. + * + * During the beforeunload event (in browsers) the hook receives no arguments. + * In this case it must return a prompt message to prevent the transition. + * + * Returns a function that may be used to unbind the listener. + */ + function listenBeforeLeavingRoute(route, hook) { + var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks); + var routeID = getRouteID(route, true); + + RouteHooks[routeID] = hook; + + if (thereWereNoRouteHooks) { + // setup transition & beforeunload hooks + unlistenBefore = history.listenBefore(transitionHook); + + if (history.listenBeforeUnload) unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook); + } + + return function () { + removeListenBeforeHooksForRoute(route); + }; + } + + /** + * This is the API for stateful environments. As the location + * changes, we update state and call the listener. We can also + * gracefully handle errors and redirects. + */ + function listen(listener) { + function historyListener(location) { + if (state.location === location) { + listener(null, state); + } else { + match(location, function (error, redirectLocation, nextState) { + if (error) { + listener(error); + } else if (redirectLocation) { + history.replace(redirectLocation); + } else if (nextState) { + listener(null, nextState); + } else { + false ? warning(false, 'Location "%s" did not match any routes', location.pathname + location.search + location.hash) : void 0; + } + }); + } + } + + // TODO: Only use a single history listener. Otherwise we'll end up with + // multiple concurrent calls to match. + + // Set up the history listener first in case the initial match redirects. + var unsubscribe = history.listen(historyListener); + + if (state.location) { + // Picking up on a matchContext. + listener(null, state); + } else { + historyListener(history.getCurrentLocation()); + } + + return unsubscribe; + } + + return { + isActive: isActive, + match: match, + listenBeforeLeavingRoute: listenBeforeLeavingRoute, + listen: listen + }; +} + +/***/ }), +/* 242 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = isPromise; +function isPromise(obj) { + return obj && typeof obj.then === 'function'; +} + +/***/ }), +/* 243 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["b"] = createRouterObject; +/* harmony export (immutable) */ __webpack_exports__["a"] = assignRouterState; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function createRouterObject(history, transitionManager, state) { + var router = _extends({}, history, { + setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute, + isActive: transitionManager.isActive + }); + + return assignRouterState(router, state); +} + +function assignRouterState(router, _ref) { + var location = _ref.location, + params = _ref.params, + routes = _ref.routes; + + router.location = location; + router.params = params; + router.routes = routes; + + return router; +} + +/***/ }), +/* 244 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(160); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(159); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + + + + +function isLeftClickEvent(event) { + return event.button === 0; +} + +function isModifiedEvent(event) { + return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); +} + +// TODO: De-duplicate against hasAnyProperties in createTransitionManager. +function isEmptyObject(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return false; + }return true; +} + +function resolveToLocation(to, router) { + return typeof to === 'function' ? to(router.location) : to; +} + +/** + * A <Link> is used to create an <a> element that links to a route. + * When that route is active, the link gets the value of its + * activeClassName prop. + * + * For example, assuming you have the following route: + * + * <Route path="/posts/:postID" component={Post} /> + * + * You could use the following component to link to that route: + * + * <Link to={`/posts/${post.id}`} /> + */ +var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ + displayName: 'Link', + + mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__["b" /* ContextSubscriber */])('router')], + + contextTypes: { + router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__["b" /* routerShape */] + }, + + propTypes: { + to: Object(__WEBPACK_IMPORTED_MODULE_2_prop_types__["oneOfType"])([__WEBPACK_IMPORTED_MODULE_2_prop_types__["string"], __WEBPACK_IMPORTED_MODULE_2_prop_types__["object"], __WEBPACK_IMPORTED_MODULE_2_prop_types__["func"]]), + activeStyle: __WEBPACK_IMPORTED_MODULE_2_prop_types__["object"], + activeClassName: __WEBPACK_IMPORTED_MODULE_2_prop_types__["string"], + onlyActiveOnIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types__["bool"].isRequired, + onClick: __WEBPACK_IMPORTED_MODULE_2_prop_types__["func"], + target: __WEBPACK_IMPORTED_MODULE_2_prop_types__["string"] + }, + + getDefaultProps: function getDefaultProps() { + return { + onlyActiveOnIndex: false, + style: {} + }; + }, + handleClick: function handleClick(event) { + if (this.props.onClick) this.props.onClick(event); + + if (event.defaultPrevented) return; + + var router = this.context.router; + + !router ? false ? invariant(false, '<Link>s rendered outside of a router context cannot navigate.') : __WEBPACK_IMPORTED_MODULE_3_invariant___default()(false) : void 0; + + if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; + + // If target prop is set (e.g. to "_blank"), let browser handle link. + /* istanbul ignore if: untestable with Karma */ + if (this.props.target) return; + + event.preventDefault(); + + router.push(resolveToLocation(this.props.to, router)); + }, + render: function render() { + var _props = this.props, + to = _props.to, + activeClassName = _props.activeClassName, + activeStyle = _props.activeStyle, + onlyActiveOnIndex = _props.onlyActiveOnIndex, + props = _objectWithoutProperties(_props, ['to', 'activeClassName', 'activeStyle', 'onlyActiveOnIndex']); + + // Ignore if rendered outside the context of router to simplify unit testing. + + + var router = this.context.router; + + + if (router) { + // If user does not specify a `to` prop, return an empty anchor tag. + if (!to) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', props); + } + + var toLocation = resolveToLocation(to, router); + props.href = router.createHref(toLocation); + + if (activeClassName || activeStyle != null && !isEmptyObject(activeStyle)) { + if (router.isActive(toLocation, onlyActiveOnIndex)) { + if (activeClassName) { + if (props.className) { + props.className += ' ' + activeClassName; + } else { + props.className = activeClassName; + } + } + + if (activeStyle) props.style = _extends({}, props.style, activeStyle); + } + } + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', _extends({}, props, { onClick: this.handleClick })); + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (Link); + +/***/ }), +/* 245 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PatternUtils__ = __webpack_require__(74); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(88); + + + + + + + +/** + * A <Redirect> is used to declare another URL path a client should + * be sent to when they request a given URL. + * + * Redirects are placed alongside routes in the route configuration + * and are traversed in the same manner. + */ +/* eslint-disable react/require-render-return */ +var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'Redirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element) { + var route = Object(__WEBPACK_IMPORTED_MODULE_3__RouteUtils__["a" /* createRouteFromReactElement */])(element); + + if (route.from) route.path = route.from; + + route.onEnter = function (nextState, replace) { + var location = nextState.location, + params = nextState.params; + + + var pathname = void 0; + if (route.to.charAt(0) === '/') { + pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__["a" /* formatPattern */])(route.to, params); + } else if (!route.to) { + pathname = location.pathname; + } else { + var routeIndex = nextState.routes.indexOf(route); + var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); + var pattern = parentPattern.replace(/\/*$/, '/') + route.to; + pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__["a" /* formatPattern */])(pattern, params); + } + + replace({ + pathname: pathname, + query: route.query || location.query, + state: route.state || location.state + }); + }; + + return route; + }, + getRoutePattern: function getRoutePattern(routes, routeIndex) { + var parentPattern = ''; + + for (var i = routeIndex; i >= 0; i--) { + var route = routes[i]; + var pattern = route.path || ''; + + parentPattern = pattern.replace(/\/*$/, '/') + parentPattern; + + if (pattern.indexOf('/') === 0) break; + } + + return '/' + parentPattern; + } + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"], + from: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"], // Alias for path + to: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"].isRequired, + query: __WEBPACK_IMPORTED_MODULE_1_prop_types__["object"], + state: __WEBPACK_IMPORTED_MODULE_1_prop_types__["object"], + onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */] + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true ? false ? invariant(false, '<Redirect> elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false) : void 0; + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (Redirect); + +/***/ }), +/* 246 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = createMemoryHistory; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(247); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(248); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = __webpack_require__(446); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__); + + + + +function createMemoryHistory(options) { + // signatures and type checking differ between `useQueries` and + // `createMemoryHistory`, have to create `memoryHistory` first because + // `useQueries` doesn't understand the signature + var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default()(options); + var createHistory = function createHistory() { + return memoryHistory; + }; + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory))(options); + return history; +} + +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _queryString = __webpack_require__(444); + +var _runTransitionHook = __webpack_require__(162); + +var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + +var _LocationUtils = __webpack_require__(75); + +var _PathUtils = __webpack_require__(46); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var defaultStringifyQuery = function defaultStringifyQuery(query) { + return (0, _queryString.stringify)(query).replace(/%20/g, '+'); +}; + +var defaultParseQueryString = _queryString.parse; + +/** + * Returns a new createHistory function that may be used to create + * history objects that know how to handle URL queries. + */ +var useQueries = function useQueries(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var stringifyQuery = options.stringifyQuery, + parseQueryString = options.parseQueryString; + + + if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; + + if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString; + + var decodeQuery = function decodeQuery(location) { + if (!location) return location; + + if (location.query == null) location.query = parseQueryString(location.search.substring(1)); + + return location; + }; + + var encodeQuery = function encodeQuery(location, query) { + if (query == null) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var queryString = stringifyQuery(query); + var search = queryString ? '?' + queryString : ''; + + return _extends({}, object, { + search: search + }); + }; + + // Override all read methods with query-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return decodeQuery(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, decodeQuery(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(decodeQuery(location)); + }); + }; + + // Override all write methods with query-aware versions. + var push = function push(location) { + return history.push(encodeQuery(location, location.query)); + }; + + var replace = function replace(location) { + return history.replace(encodeQuery(location, location.query)); + }; + + var createPath = function createPath(location) { + return history.createPath(encodeQuery(location, location.query)); + }; + + var createHref = function createHref(location) { + return history.createHref(encodeQuery(location, location.query)); + }; + + var createLocation = function createLocation(location) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var newLocation = history.createLocation.apply(history, [encodeQuery(location, location.query)].concat(args)); + + if (location.query) newLocation.query = (0, _LocationUtils.createQuery)(location.query); + + return decodeQuery(newLocation); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation + }); + }; +}; + +exports.default = useQueries; + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _runTransitionHook = __webpack_require__(162); + +var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + +var _PathUtils = __webpack_require__(46); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var useBasename = function useBasename(createHistory) { + return function () { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var history = createHistory(options); + var basename = options.basename; + + + var addBasename = function addBasename(location) { + if (!location) return location; + + if (basename && location.basename == null) { + if (location.pathname.toLowerCase().indexOf(basename.toLowerCase()) === 0) { + location.pathname = location.pathname.substring(basename.length); + location.basename = basename; + + if (location.pathname === '') location.pathname = '/'; + } else { + location.basename = ''; + } + } + + return location; + }; + + var prependBasename = function prependBasename(location) { + if (!basename) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var pname = object.pathname; + var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/'; + var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname; + var pathname = normalizedBasename + normalizedPathname; + + return _extends({}, object, { + pathname: pathname + }); + }; + + // Override all read methods with basename-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return addBasename(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, addBasename(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(addBasename(location)); + }); + }; + + // Override all write methods with basename-aware versions. + var push = function push(location) { + return history.push(prependBasename(location)); + }; + + var replace = function replace(location) { + return history.replace(prependBasename(location)); + }; + + var createPath = function createPath(location) { + return history.createPath(prependBasename(location)); + }; + + var createHref = function createHref(location) { + return history.createHref(prependBasename(location)); + }; + + var createLocation = function createLocation(location) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args))); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation + }); + }; +}; + +exports.default = useBasename; + +/***/ }), +/* 249 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = useRouterHistory; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(247); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(248); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + + + +function useRouterHistory(createHistory) { + return function (options) { + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory))(options); + return history; + }; +} + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.readState = exports.saveState = undefined; + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var QuotaExceededErrors = { + QuotaExceededError: true, + QUOTA_EXCEEDED_ERR: true +}; + +var SecurityErrors = { + SecurityError: true +}; + +var KeyPrefix = '@@History/'; + +var createKey = function createKey(key) { + return KeyPrefix + key; +}; + +var saveState = exports.saveState = function saveState(key, state) { + if (!window.sessionStorage) { + // Session storage is not available or hidden. + // sessionStorage is undefined in Internet Explorer when served via file protocol. + false ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available') : void 0; + + return; + } + + try { + if (state == null) { + window.sessionStorage.removeItem(createKey(key)); + } else { + window.sessionStorage.setItem(createKey(key), JSON.stringify(state)); + } + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + false ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available due to security settings') : void 0; + + return; + } + + if (QuotaExceededErrors[error.name] && window.sessionStorage.length === 0) { + // Safari "private mode" throws QuotaExceededError. + false ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : void 0; + + return; + } + + throw error; + } +}; + +var readState = exports.readState = function readState(key) { + var json = void 0; + try { + json = window.sessionStorage.getItem(createKey(key)); + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + false ? (0, _warning2.default)(false, '[history] Unable to read state; sessionStorage is not available due to security settings') : void 0; + + return undefined; + } + } + + if (json) { + try { + return JSON.parse(json); + } catch (error) { + // Ignore invalid JSON. + } + } + + return undefined; +}; + +/***/ }), +/* 251 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = createRouterHistory; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(249); + + +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +function createRouterHistory(createHistory) { + var history = void 0; + if (canUseDOM) history = Object(__WEBPACK_IMPORTED_MODULE_0__useRouterHistory__["a" /* default */])(createHistory)(); + return history; +} + +/***/ }), +/* 252 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionTypes; }); +/* harmony export (immutable) */ __webpack_exports__["b"] = createStore; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(457); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__); + + + +/** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ +var ActionTypes = { + INIT: '@@redux/INIT' + + /** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} [enhancer] The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ +};function createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error('Expected the enhancer to be a function.'); + } + + return enhancer(createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error('Expected the reducer to be a function.'); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + function getState() { + return currentState; + } + + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error('Expected listener to be a function.'); + } + + var isSubscribed = true; + + ensureCanMutateNextListeners(); + nextListeners.push(listener); + + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + isSubscribed = false; + + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + }; + } + + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + function dispatch(action) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */])(action)) { + throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); + } + + if (typeof action.type === 'undefined') { + throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?'); + } + + if (isDispatching) { + throw new Error('Reducers may not dispatch actions.'); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = currentListeners = nextListeners; + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + listener(); + } + + return action; + } + + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error('Expected the nextReducer to be a function.'); + } + + currentReducer = nextReducer; + dispatch({ type: ActionTypes.INIT }); + } + + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/tc39/proposal-observable + */ + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return _ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object') { + throw new TypeError('Expected the observer to be an object.'); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { unsubscribe: unsubscribe }; + } + }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () { + return this; + }, _ref; + } + + // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + dispatch({ type: ActionTypes.INIT }); + + return _ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer + }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2; +} + +/***/ }), +/* 253 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/* harmony default export */ __webpack_exports__["a"] = (freeGlobal); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(47))) + +/***/ }), +/* 254 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(255); + + +/** Built-in value references. */ +var getPrototype = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.getPrototypeOf, Object); + +/* harmony default export */ __webpack_exports__["a"] = (getPrototype); + + +/***/ }), +/* 255 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (overArg); + + +/***/ }), +/* 256 */ +/***/ (function(module, exports) { + +module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), +/* 257 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export default */ +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ +} + +/***/ }), +/* 258 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = compose; +/** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ + +function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(undefined, arguments)); + }; + }); +} + +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _propTypes = __webpack_require__(14); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +exports["default"] = _propTypes2["default"].shape({ + subscribe: _propTypes2["default"].func.isRequired, + dispatch: _propTypes2["default"].func.isRequired, + getState: _propTypes2["default"].func.isRequired +}); + +/***/ }), +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = warning; +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ +} + +/***/ }), +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(469); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; + + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var repeat = exports.repeat = function repeat(str, times) { + return new Array(times + 1).join(str); +}; + +var pad = exports.pad = function pad(num, maxLength) { + return repeat("0", maxLength - num.toString().length) + num; +}; + +var formatTime = exports.formatTime = function formatTime(time) { + return pad(time.getHours(), 2) + ":" + pad(time.getMinutes(), 2) + ":" + pad(time.getSeconds(), 2) + "." + pad(time.getMilliseconds(), 3); +}; + +// Use performance API if it's available in order to get better precision +var timer = exports.timer = typeof performance !== "undefined" && performance !== null && typeof performance.now === "function" ? performance : Date; + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +exports.routerReducer = routerReducer; +/** + * This action type will be dispatched when your history + * receives a location change. + */ +var LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE'; + +var initialState = { + locationBeforeTransitions: null +}; + +/** + * This reducer will update the state with the most recent location history + * has transitioned to. This may not be in sync with the router, particularly + * if you have asynchronously-loaded routes, so reading from and relying on + * this state is discouraged. + */ +function routerReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + type = _ref.type, + payload = _ref.payload; + + if (type === LOCATION_CHANGE) { + return _extends({}, state, { locationBeforeTransitions: payload }); + } + + return state; +} + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** + * This action type will be dispatched by the history actions below. + * If you're writing a middleware to watch for navigation events, be sure to + * look for actions of this type. + */ +var CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; + +function updateLocation(method) { + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return { + type: CALL_HISTORY_METHOD, + payload: { method: method, args: args } + }; + }; +} + +/** + * These actions correspond to the history API. + * The associated routerMiddleware will capture these events before they get to + * your reducer and reissue them as the matching function on your history. + */ +var push = exports.push = updateLocation('push'); +var replace = exports.replace = updateLocation('replace'); +var go = exports.go = updateLocation('go'); +var goBack = exports.goBack = updateLocation('goBack'); +var goForward = exports.goForward = updateLocation('goForward'); + +var routerActions = exports.routerActions = { push: push, replace: replace, go: go, goBack: goBack, goForward: goForward }; + +/***/ }), +/* 265 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmit", function() { return clearSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmitErrors", function() { return clearSubmitErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearAsyncError", function() { return clearAsyncError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncErrors", function() { return updateSyncErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncWarnings", function() { return updateSyncWarnings; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(167); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + +var arrayInsert = function arrayInsert(form, field, index, value) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], + meta: { form: form, field: field, index: index }, + payload: value + }; +}; + +var arrayMove = function arrayMove(form, field, from, to) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], + meta: { form: form, field: field, from: from, to: to } + }; +}; + +var arrayPop = function arrayPop(form, field) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], + meta: { form: form, field: field } + }; +}; + +var arrayPush = function arrayPush(form, field, value) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], + meta: { form: form, field: field }, + payload: value + }; +}; + +var arrayRemove = function arrayRemove(form, field, index) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], + meta: { form: form, field: field, index: index } + }; +}; + +var arrayRemoveAll = function arrayRemoveAll(form, field) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], + meta: { form: form, field: field } + }; +}; + +var arrayShift = function arrayShift(form, field) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], + meta: { form: form, field: field } + }; +}; + +var arraySplice = function arraySplice(form, field, index, removeNum, value) { + var action = { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], + meta: { form: form, field: field, index: index, removeNum: removeNum } + }; + if (value !== undefined) { + action.payload = value; + } + return action; +}; + +var arraySwap = function arraySwap(form, field, indexA, indexB) { + if (indexA === indexB) { + throw new Error('Swap indices cannot be equal'); + } + if (indexA < 0 || indexB < 0) { + throw new Error('Swap indices cannot be negative'); + } + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], meta: { form: form, field: field, indexA: indexA, indexB: indexB } }; +}; + +var arrayUnshift = function arrayUnshift(form, field, value) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], + meta: { form: form, field: field }, + payload: value + }; +}; + +var autofill = function autofill(form, field, value) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], + meta: { form: form, field: field }, + payload: value + }; +}; + +var blur = function blur(form, field, value, touch) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], + meta: { form: form, field: field, touch: touch }, + payload: value + }; +}; + +var change = function change(form, field, value, touch, persistentSubmitErrors) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], + meta: { form: form, field: field, touch: touch, persistentSubmitErrors: persistentSubmitErrors }, + payload: value + }; +}; + +var clearSubmit = function clearSubmit(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], meta: { form: form } }; +}; + +var clearSubmitErrors = function clearSubmitErrors(form) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT_ERRORS"], + meta: { form: form } + }; +}; + +var clearAsyncError = function clearAsyncError(form, field) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], + meta: { form: form, field: field } + }; +}; + +var destroy = function destroy() { + for (var _len = arguments.length, form = Array(_len), _key = 0; _key < _len; _key++) { + form[_key] = arguments[_key]; + } + + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"], meta: { form: form } }; +}; + +var focus = function focus(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], meta: { form: form, field: field } }; +}; + +var initialize = function initialize(form, values, keepDirty) { + var otherMeta = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + if (keepDirty instanceof Object) { + otherMeta = keepDirty; + keepDirty = false; + } + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], + meta: _extends({ form: form, keepDirty: keepDirty }, otherMeta), + payload: values + }; +}; + +var registerField = function registerField(form, name, type) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], + meta: { form: form }, + payload: { name: name, type: type } + }; +}; + +var reset = function reset(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], meta: { form: form } }; +}; + +var startAsyncValidation = function startAsyncValidation(form, field) { + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], + meta: { form: form, field: field } + }; +}; + +var startSubmit = function startSubmit(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], meta: { form: form } }; +}; + +var stopAsyncValidation = function stopAsyncValidation(form, errors) { + var action = { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], + meta: { form: form }, + payload: errors + }; + if (errors && Object.keys(errors).length) { + action.error = true; + } + return action; +}; + +var stopSubmit = function stopSubmit(form, errors) { + var action = { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], + meta: { form: form }, + payload: errors + }; + if (errors && Object.keys(errors).length) { + action.error = true; + } + return action; +}; + +var submit = function submit(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], meta: { form: form } }; +}; + +var setSubmitFailed = function setSubmitFailed(form) { + for (var _len2 = arguments.length, fields = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + fields[_key2 - 1] = arguments[_key2]; + } + + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], + meta: { form: form, fields: fields }, + error: true + }; +}; + +var setSubmitSucceeded = function setSubmitSucceeded(form) { + for (var _len3 = arguments.length, fields = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { + fields[_key3 - 1] = arguments[_key3]; + } + + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], + meta: { form: form, fields: fields }, + error: false + }; +}; + +var touch = function touch(form) { + for (var _len4 = arguments.length, fields = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { + fields[_key4 - 1] = arguments[_key4]; + } + + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], + meta: { form: form, fields: fields } + }; +}; + +var unregisterField = function unregisterField(form, name) { + var destroyOnUnmount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], + meta: { form: form }, + payload: { name: name, destroyOnUnmount: destroyOnUnmount } + }; +}; + +var untouch = function untouch(form) { + for (var _len5 = arguments.length, fields = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { + fields[_key5 - 1] = arguments[_key5]; + } + + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], + meta: { form: form, fields: fields } + }; +}; + +var updateSyncErrors = function updateSyncErrors(form) { + var syncErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var error = arguments[2]; + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], + meta: { form: form }, + payload: { syncErrors: syncErrors, error: error } + }; +}; + +var updateSyncWarnings = function updateSyncWarnings(form) { + var syncWarnings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var warning = arguments[2]; + return { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], + meta: { form: form }, + payload: { syncWarnings: syncWarnings, warning: warning } + }; +}; + +/***/ }), +/* 266 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var defaultShouldAsyncValidate = function defaultShouldAsyncValidate(_ref) { + var initialized = _ref.initialized, + trigger = _ref.trigger, + pristine = _ref.pristine, + syncValidationPasses = _ref.syncValidationPasses; + + if (!syncValidationPasses) { + return false; + } + switch (trigger) { + case 'blur': + // blurring + return true; + case 'submit': + // submitting, so only async validate if form is dirty or was never initialized + // conversely, DON'T async validate if the form is pristine just as it was initialized + return !pristine || !initialized; + default: + return false; + } +}; + +/* harmony default export */ __webpack_exports__["a"] = (defaultShouldAsyncValidate); + +/***/ }), +/* 267 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var defaultShouldValidate = function defaultShouldValidate(_ref) { + var values = _ref.values, + nextProps = _ref.nextProps, + initialRender = _ref.initialRender, + lastFieldValidatorKeys = _ref.lastFieldValidatorKeys, + fieldValidatorKeys = _ref.fieldValidatorKeys, + structure = _ref.structure; + + if (initialRender) { + return true; + } + return !structure.deepEqual(values, nextProps.values) || !structure.deepEqual(lastFieldValidatorKeys, fieldValidatorKeys); +}; + +/* harmony default export */ __webpack_exports__["a"] = (defaultShouldValidate); + +/***/ }), +/* 268 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error__ = __webpack_require__(492); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_es6_error__); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + +var SubmissionError = function (_ExtendableError) { + _inherits(SubmissionError, _ExtendableError); + + function SubmissionError(errors) { + _classCallCheck(this, SubmissionError); + + var _this = _possibleConstructorReturn(this, (SubmissionError.__proto__ || Object.getPrototypeOf(SubmissionError)).call(this, 'Submit Validation Failed')); + + _this.errors = errors; + return _this; + } + + return SubmissionError; +}(__WEBPACK_IMPORTED_MODULE_0_es6_error___default.a); + +/* harmony default export */ __webpack_exports__["a"] = (SubmissionError); + +/***/ }), +/* 269 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var processProps = function processProps(type, props, _value) { + var value = props.value; + + if (type === 'checkbox') { + return _extends({}, props, { + checked: !!value + }); + } + if (type === 'radio') { + return _extends({}, props, { + checked: value === _value, + value: _value + }); + } + if (type === 'select-multiple') { + return _extends({}, props, { + value: value || [] + }); + } + if (type === 'file') { + return _extends({}, props, { + value: value || undefined + }); + } + return props; +}; + +var createFieldProps = function createFieldProps(_ref2, name, _ref) { + var getIn = _ref2.getIn, + toJS = _ref2.toJS; + + var asyncError = _ref.asyncError, + asyncValidating = _ref.asyncValidating, + onBlur = _ref.onBlur, + onChange = _ref.onChange, + onDrop = _ref.onDrop, + onDragStart = _ref.onDragStart, + dirty = _ref.dirty, + dispatch = _ref.dispatch, + onFocus = _ref.onFocus, + form = _ref.form, + format = _ref.format, + initial = _ref.initial, + parse = _ref.parse, + pristine = _ref.pristine, + props = _ref.props, + state = _ref.state, + submitError = _ref.submitError, + submitFailed = _ref.submitFailed, + submitting = _ref.submitting, + syncError = _ref.syncError, + syncWarning = _ref.syncWarning, + validate = _ref.validate, + value = _ref.value, + _value = _ref._value, + warn = _ref.warn, + custom = _objectWithoutProperties(_ref, ['asyncError', 'asyncValidating', 'onBlur', 'onChange', 'onDrop', 'onDragStart', 'dirty', 'dispatch', 'onFocus', 'form', 'format', 'initial', 'parse', 'pristine', 'props', 'state', 'submitError', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'validate', 'value', '_value', 'warn']); + + var error = syncError || asyncError || submitError; + var warning = syncWarning; + + var formatFieldValue = function formatFieldValue(value, format) { + if (format === null) { + return value; + } + var defaultFormattedValue = value == null ? '' : value; + return format ? format(value, name) : defaultFormattedValue; + }; + + var formattedFieldValue = formatFieldValue(value, format); + + return { + input: processProps(custom.type, { + name: name, + onBlur: onBlur, + onChange: onChange, + onDragStart: onDragStart, + onDrop: onDrop, + onFocus: onFocus, + value: formattedFieldValue + }, _value), + meta: _extends({}, toJS(state), { + active: !!(state && getIn(state, 'active')), + asyncValidating: asyncValidating, + autofilled: !!(state && getIn(state, 'autofilled')), + dirty: dirty, + dispatch: dispatch, + error: error, + form: form, + initial: initial, + warning: warning, + invalid: !!error, + pristine: pristine, + submitting: !!submitting, + submitFailed: !!submitFailed, + touched: !!(state && getIn(state, 'touched')), + valid: !error, + visited: !!(state && getIn(state, 'visited')) + }), + custom: _extends({}, custom, props) + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFieldProps); + +/***/ }), +/* 270 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getValue__ = __webpack_require__(497); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isReactNative__ = __webpack_require__(498); + + + +var onChangeValue = function onChangeValue(event, _ref) { + var name = _ref.name, + parse = _ref.parse, + normalize = _ref.normalize; + + // read value from input + var value = Object(__WEBPACK_IMPORTED_MODULE_0__getValue__["a" /* default */])(event, __WEBPACK_IMPORTED_MODULE_1__isReactNative__["a" /* default */] + + // parse value if we have a parser + );if (parse) { + value = parse(value, name); + } + + // normalize value + if (normalize) { + value = normalize(name, value); + } + + return value; +}; + +/* harmony default export */ __webpack_exports__["a"] = (onChangeValue); + +/***/ }), +/* 271 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var isEvent = function isEvent(candidate) { + return !!(candidate && candidate.stopPropagation && candidate.preventDefault); +}; + +/* harmony default export */ __webpack_exports__["a"] = (isEvent); + +/***/ }), +/* 272 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayMap); + + +/***/ }), +/* 273 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (copyArray); + + +/***/ }), +/* 274 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__ = __webpack_require__(502); + + +/** Used to match property names within property paths. */ +var reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = Object(__WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__["a" /* default */])(function(string) { + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ __webpack_exports__["a"] = (stringToPath); + + +/***/ }), +/* 275 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/* harmony default export */ __webpack_exports__["a"] = (toSource); + + +/***/ }), +/* 276 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseToString_js__ = __webpack_require__(525); + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : Object(__WEBPACK_IMPORTED_MODULE_0__baseToString_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (toString); + + +/***/ }), +/* 277 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(171); + + +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */])(value, other, undefined, customizer) : !!result; +} + +/* harmony default export */ __webpack_exports__["a"] = (isEqualWith); + + +/***/ }), +/* 278 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SetCache_js__ = __webpack_require__(534); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arraySome_js__ = __webpack_require__(537); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cacheHas_js__ = __webpack_require__(538); + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new __WEBPACK_IMPORTED_MODULE_0__SetCache_js__["a" /* default */] : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!Object(__WEBPACK_IMPORTED_MODULE_1__arraySome_js__["a" /* default */])(other, function(othValue, othIndex) { + if (!Object(__WEBPACK_IMPORTED_MODULE_2__cacheHas_js__["a" /* default */])(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (equalArrays); + + +/***/ }), +/* 279 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32); + + +/** Built-in value references. */ +var Uint8Array = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Uint8Array; + +/* harmony default export */ __webpack_exports__["a"] = (Uint8Array); + + +/***/ }), +/* 280 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__ = __webpack_require__(549); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__ = __webpack_require__(175); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isIndex_js__ = __webpack_require__(177); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__ = __webpack_require__(178); + + + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value), + isArg = !isArr && Object(__WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */])(value), + isBuff = !isArr && !isArg && Object(__WEBPACK_IMPORTED_MODULE_3__isBuffer_js__["a" /* default */])(value), + isType = !isArr && !isArg && !isBuff && Object(__WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__["a" /* default */])(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? Object(__WEBPACK_IMPORTED_MODULE_0__baseTimes_js__["a" /* default */])(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + Object(__WEBPACK_IMPORTED_MODULE_4__isIndex_js__["a" /* default */])(key, length) + ))) { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayLikeKeys); + + +/***/ }), +/* 281 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(277); + + + +var customizer = function customizer(objectValue, otherValue, indexOrkey, object, other, stack) { + // https://lodash.com/docs/4.17.4#isEqualWith + if (stack) { + // Shallow compares + // For 1st level, stack === undefined. + // -> Do nothing (and implicitly return undefined so that it goes to compare 2nd level) + // For 2nd level and up, stack !== undefined. + // -> Compare by === operator + return objectValue === otherValue; + } +}; + +var shallowCompare = function shallowCompare(instance, nextProps, nextState) { + return !Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */])(instance.props, nextProps, customizer) || !Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */])(instance.state, nextState, customizer); +}; + +/* harmony default export */ __webpack_exports__["a"] = (shallowCompare); + +/***/ }), +/* 282 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(121); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__ = __webpack_require__(570); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(572); + + + + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(iteratee, 3); + + Object(__WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__["a" /* default */])(object, function(value, key, object) { + Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapValues); + + +/***/ }), +/* 283 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); + + +var defineProperty = (function() { + try { + var func = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +/* harmony default export */ __webpack_exports__["a"] = (defineProperty); + + +/***/ }), +/* 284 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__ = __webpack_require__(571); + + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = Object(__WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__["a" /* default */])(); + +/* harmony default export */ __webpack_exports__["a"] = (baseFor); + + +/***/ }), +/* 285 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(48); + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isStrictComparable); + + +/***/ }), +/* 286 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (matchesStrictComparable); + + +/***/ }), +/* 287 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(288); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toKey_js__ = __webpack_require__(91); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = Object(__WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */])(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[Object(__WEBPACK_IMPORTED_MODULE_1__toKey_js__["a" /* default */])(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseGet); + + +/***/ }), +/* 288 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isKey_js__ = __webpack_require__(181); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__ = __webpack_require__(274); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(276); + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */])(value)) { + return value; + } + return Object(__WEBPACK_IMPORTED_MODULE_1__isKey_js__["a" /* default */])(value, object) ? [value] : Object(__WEBPACK_IMPORTED_MODULE_2__stringToPath_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (castPath); + + +/***/ }), +/* 289 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createIsPristine = function createIsPristine(_ref) { + var deepEqual = _ref.deepEqual, + empty = _ref.empty, + getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + var initial = getIn(formState, form + '.initial') || empty; + var values = getIn(formState, form + '.values') || initial; + return deepEqual(initial, values); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsPristine); + +/***/ }), +/* 290 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(121); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(90); + + + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !Object(__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */])(object[key], value)) || + (value === undefined && !(key in object))) { + Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(object, key, value); + } +} + +/* harmony default export */ __webpack_exports__["a"] = (assignMergeValue); + + +/***/ }), +/* 291 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(280); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__ = __webpack_require__(632); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(120); + + + + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return Object(__WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */])(object) ? Object(__WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */])(object, true) : Object(__WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__["a" /* default */])(object); +} + +/* harmony default export */ __webpack_exports__["a"] = (keysIn); + + +/***/ }), +/* 292 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(271); + + +var silenceEvent = function silenceEvent(event) { + var is = Object(__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */])(event); + if (is) { + event.preventDefault(); + } + return is; +}; + +/* harmony default export */ __webpack_exports__["a"] = (silenceEvent); + +/***/ }), +/* 293 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(51); +var toObject = __webpack_require__(84); +var IE_PROTO = __webpack_require__(136)('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), +/* 294 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(28); +var core = __webpack_require__(18); +var fails = __webpack_require__(63); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + + +/***/ }), +/* 295 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(122); +var $export = __webpack_require__(28); +var redefine = __webpack_require__(296); +var hide = __webpack_require__(50); +var has = __webpack_require__(51); +var Iterators = __webpack_require__(78); +var $iterCreate = __webpack_require__(667); +var setToStringTag = __webpack_require__(123); +var getPrototypeOf = __webpack_require__(293); +var ITERATOR = __webpack_require__(22)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(50); + + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(23).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(207); +var hiddenKeys = __webpack_require__(138).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(101); +var createDesc = __webpack_require__(82); +var toIObject = __webpack_require__(52); +var toPrimitive = __webpack_require__(132); +var has = __webpack_require__(51); +var IE8_DOM_DEFINE = __webpack_require__(206); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(44) ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; + + +/***/ }), +/* 300 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 301 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _getMuiTheme = __webpack_require__(125); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MuiThemeProvider = function (_Component) { + (0, _inherits3.default)(MuiThemeProvider, _Component); + + function MuiThemeProvider() { + (0, _classCallCheck3.default)(this, MuiThemeProvider); + return (0, _possibleConstructorReturn3.default)(this, (MuiThemeProvider.__proto__ || (0, _getPrototypeOf2.default)(MuiThemeProvider)).apply(this, arguments)); + } + + (0, _createClass3.default)(MuiThemeProvider, [{ + key: 'getChildContext', + value: function getChildContext() { + return { + muiTheme: this.props.muiTheme || (0, _getMuiTheme2.default)() + }; + } + }, { + key: 'render', + value: function render() { + return this.props.children; + } + }]); + return MuiThemeProvider; +}(_react.Component); + +MuiThemeProvider.childContextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? MuiThemeProvider.propTypes = { + children: _react.PropTypes.element, + muiTheme: _react.PropTypes.object +} : void 0; +exports.default = MuiThemeProvider; + +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(689), __esModule: true }; + +/***/ }), +/* 303 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(36); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; + + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(78); +var ITERATOR = __webpack_require__(22)('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(22)('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _colors = __webpack_require__(57); + +var _colorManipulator = __webpack_require__(56); + +var _spacing = __webpack_require__(192); + +var _spacing2 = _interopRequireDefault(_spacing); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Light Theme is the default theme used in material-ui. It is guaranteed to + * have all theme variables needed for every component. Variables not defined + * in a custom theme will default to these values. + */ +exports.default = { + spacing: _spacing2.default, + fontFamily: 'Roboto, sans-serif', + palette: { + primary1Color: _colors.cyan500, + primary2Color: _colors.cyan700, + primary3Color: _colors.grey400, + accent1Color: _colors.pinkA200, + accent2Color: _colors.grey100, + accent3Color: _colors.grey500, + textColor: _colors.darkBlack, + secondaryTextColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.54), + alternateTextColor: _colors.white, + canvasColor: _colors.white, + borderColor: _colors.grey300, + disabledColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.3), + pickerHeaderColor: _colors.cyan500, + clockCircleColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.07), + shadowColor: _colors.fullBlack + } +}; /** + * NB: If you update this file, please also update `docs/src/app/customization/Themes.js` + */ + +/***/ }), +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + menu: 1000, + appBar: 1100, + drawerOverlay: 1200, + drawer: 1300, + dialogOverlay: 1400, + dialog: 1500, + layer: 2000, + popover: 2100, + snackbar: 2900, + tooltip: 3000 +}; + +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { "Webkit": { "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "backfaceVisibility": true, "perspective": true, "perspectiveOrigin": true, "transformStyle": true, "transformOriginZ": true, "animation": true, "animationDelay": true, "animationDirection": true, "animationFillMode": true, "animationDuration": true, "animationIterationCount": true, "animationName": true, "animationPlayState": true, "animationTimingFunction": true, "appearance": true, "userSelect": true, "fontKerning": true, "textEmphasisPosition": true, "textEmphasis": true, "textEmphasisStyle": true, "textEmphasisColor": true, "boxDecorationBreak": true, "clipPath": true, "maskImage": true, "maskMode": true, "maskRepeat": true, "maskPosition": true, "maskClip": true, "maskOrigin": true, "maskSize": true, "maskComposite": true, "mask": true, "maskBorderSource": true, "maskBorderMode": true, "maskBorderSlice": true, "maskBorderWidth": true, "maskBorderOutset": true, "maskBorderRepeat": true, "maskBorder": true, "maskType": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "filter": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true, "flex": true, "flexBasis": true, "flexDirection": true, "flexGrow": true, "flexFlow": true, "flexShrink": true, "flexWrap": true, "alignContent": true, "alignItems": true, "alignSelf": true, "justifyContent": true, "order": true, "transition": true, "transitionDelay": true, "transitionDuration": true, "transitionProperty": true, "transitionTimingFunction": true, "backdropFilter": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "shapeImageThreshold": true, "shapeImageMargin": true, "shapeImageOutside": true, "hyphens": true, "flowInto": true, "flowFrom": true, "regionFragment": true, "textSizeAdjust": true }, "Moz": { "appearance": true, "userSelect": true, "boxSizing": true, "textAlignLast": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "tabSize": true, "hyphens": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true }, "ms": { "flex": true, "flexBasis": false, "flexDirection": true, "flexGrow": false, "flexFlow": true, "flexShrink": false, "flexWrap": true, "alignContent": false, "alignItems": false, "alignSelf": false, "justifyContent": false, "order": false, "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "userSelect": true, "wrapFlow": true, "wrapThrough": true, "wrapMargin": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "touchAction": true, "hyphens": true, "flowInto": true, "flowFrom": true, "breakBefore": true, "breakAfter": true, "breakInside": true, "regionFragment": true, "gridTemplateColumns": true, "gridTemplateRows": true, "gridTemplateAreas": true, "gridTemplate": true, "gridAutoColumns": true, "gridAutoRows": true, "gridAutoFlow": true, "grid": true, "gridRowStart": true, "gridColumnStart": true, "gridRowEnd": true, "gridRow": true, "gridColumn": true, "gridColumnEnd": true, "gridColumnGap": true, "gridRowGap": true, "gridArea": true, "gridGap": true, "textSizeAdjust": true } }; +module.exports = exports["default"]; + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sortPrefixedStyle; + +var _isPrefixedProperty = __webpack_require__(696); + +var _isPrefixedProperty2 = _interopRequireDefault(_isPrefixedProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sortPrefixedStyle(style) { + return Object.keys(style).sort(function (left, right) { + if ((0, _isPrefixedProperty2.default)(left) && !(0, _isPrefixedProperty2.default)(right)) { + return -1; + } else if (!(0, _isPrefixedProperty2.default)(left) && (0, _isPrefixedProperty2.default)(right)) { + return 1; + } + return 0; + }).reduce(function (sortedStyle, prop) { + sortedStyle[prop] = style[prop]; + return sortedStyle; + }, {}); +} +module.exports = exports['default']; + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var uppercasePattern = /[A-Z]/g; +var msPattern = /^ms-/; +var cache = {}; + +function hyphenateStyleName(string) { + return string in cache + ? cache[string] + : cache[string] = string + .replace(uppercasePattern, '-$&') + .toLowerCase() + .replace(msPattern, '-ms-'); +} + +module.exports = hyphenateStyleName; + + +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _colors = __webpack_require__(57); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Typography = function Typography() { + (0, _classCallCheck3.default)(this, Typography); + + // text colors + this.textFullBlack = _colors.fullBlack; + this.textDarkBlack = _colors.darkBlack; + this.textLightBlack = _colors.lightBlack; + this.textMinBlack = _colors.minBlack; + this.textFullWhite = _colors.fullWhite; + this.textDarkWhite = _colors.darkWhite; + this.textLightWhite = _colors.lightWhite; + + // font weight + this.fontWeightLight = 300; + this.fontWeightNormal = 400; + this.fontWeightMedium = 500; + + this.fontStyleButtonFontSize = 14; +}; + +exports.default = new Typography(); + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Subheader = __webpack_require__(729); + +var _Subheader2 = _interopRequireDefault(_Subheader); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Subheader2.default; + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(58); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _colorManipulator = __webpack_require__(56); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _EnhancedButton = __webpack_require__(59); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _IconButton = __webpack_require__(95); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _expandLess = __webpack_require__(740); + +var _expandLess2 = _interopRequireDefault(_expandLess); + +var _expandMore = __webpack_require__(747); + +var _expandMore2 = _interopRequireDefault(_expandMore); + +var _NestedList = __webpack_require__(748); + +var _NestedList2 = _interopRequireDefault(_NestedList); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var insetChildren = props.insetChildren, + leftAvatar = props.leftAvatar, + leftCheckbox = props.leftCheckbox, + leftIcon = props.leftIcon, + nestedLevel = props.nestedLevel, + rightAvatar = props.rightAvatar, + rightIcon = props.rightIcon, + rightIconButton = props.rightIconButton, + rightToggle = props.rightToggle, + secondaryText = props.secondaryText, + secondaryTextLines = props.secondaryTextLines; + var muiTheme = context.muiTheme; + var listItem = muiTheme.listItem; + + + var textColor = muiTheme.baseTheme.palette.textColor; + var hoverColor = props.hoverColor || (0, _colorManipulator.fade)(textColor, 0.1); + var singleAvatar = !secondaryText && (leftAvatar || rightAvatar); + var singleNoAvatar = !secondaryText && !(leftAvatar || rightAvatar); + var twoLine = secondaryText && secondaryTextLines === 1; + var threeLine = secondaryText && secondaryTextLines > 1; + + var styles = { + root: { + backgroundColor: (state.isKeyboardFocused || state.hovered) && !state.rightIconButtonHovered && !state.rightIconButtonKeyboardFocused ? hoverColor : null, + color: textColor, + display: 'block', + fontSize: 16, + lineHeight: '16px', + position: 'relative', + transition: _transitions2.default.easeOut() + }, + + // This inner div is needed so that ripples will span the entire container + innerDiv: { + marginLeft: nestedLevel * listItem.nestedLevelDepth, + paddingLeft: leftIcon || leftAvatar || leftCheckbox || insetChildren ? 72 : 16, + paddingRight: rightIcon || rightAvatar || rightIconButton ? 56 : rightToggle ? 72 : 16, + paddingBottom: singleAvatar ? 20 : 16, + paddingTop: singleNoAvatar || threeLine ? 16 : 20, + position: 'relative' + }, + + icons: { + height: 24, + width: 24, + display: 'block', + position: 'absolute', + top: twoLine ? 12 : singleAvatar ? 4 : 0, + margin: 12 + }, + + leftIcon: { + left: 4 + }, + + rightIcon: { + right: 4 + }, + + avatars: { + position: 'absolute', + top: singleAvatar ? 8 : 16 + }, + + label: { + cursor: 'pointer' + }, + + leftAvatar: { + left: 16 + }, + + rightAvatar: { + right: 16 + }, + + leftCheckbox: { + position: 'absolute', + display: 'block', + width: 24, + top: twoLine ? 24 : singleAvatar ? 16 : 12, + left: 16 + }, + + primaryText: {}, + + rightIconButton: { + position: 'absolute', + display: 'block', + top: twoLine ? 12 : singleAvatar ? 4 : 0, + right: 4 + }, + + rightToggle: { + position: 'absolute', + display: 'block', + width: 54, + top: twoLine ? 25 : singleAvatar ? 17 : 13, + right: 8 + }, + + secondaryText: { + fontSize: 14, + lineHeight: threeLine ? '18px' : '16px', + height: threeLine ? 36 : 16, + margin: 0, + marginTop: 4, + color: listItem.secondaryTextColor, + + // needed for 2 and 3 line ellipsis + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: threeLine ? null : 'nowrap', + display: threeLine ? '-webkit-box' : null, + WebkitLineClamp: threeLine ? 2 : null, + WebkitBoxOrient: threeLine ? 'vertical' : null + } + }; + + return styles; +} + +var ListItem = function (_Component) { + (0, _inherits3.default)(ListItem, _Component); + + function ListItem() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ListItem); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ListItem.__proto__ || (0, _getPrototypeOf2.default)(ListItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + open: false, + rightIconButtonHovered: false, + rightIconButtonKeyboardFocused: false, + touch: false + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + _this.props.onKeyboardFocus(event, isKeyboardFocused); + }, _this.handleMouseEnter = function (event) { + if (!_this.state.touch) _this.setState({ hovered: true }); + _this.props.onMouseEnter(event); + }, _this.handleMouseLeave = function (event) { + _this.setState({ hovered: false }); + _this.props.onMouseLeave(event); + }, _this.handleNestedListToggle = function (event) { + event.stopPropagation(); + + if (_this.props.open === null) { + _this.setState({ open: !_this.state.open }, function () { + _this.props.onNestedListToggle(_this); + }); + } else { + // Exposing `this` in the callback is quite a bad API. + // I'm doing a one level deep clone to expose a fake state.open. + _this.props.onNestedListToggle((0, _extends3.default)({}, _this, { + state: { + open: !_this.state.open + } + })); + } + }, _this.handleRightIconButtonKeyboardFocus = function (event, isKeyboardFocused) { + if (isKeyboardFocused) { + _this.setState({ + isKeyboardFocused: false, + rightIconButtonKeyboardFocused: isKeyboardFocused + }); + } + + var iconButton = _this.props.rightIconButton; + + if (iconButton && iconButton.props.onKeyboardFocus) iconButton.props.onKeyboardFocus(event, isKeyboardFocused); + }, _this.handleRightIconButtonMouseLeave = function (event) { + var iconButton = _this.props.rightIconButton; + _this.setState({ rightIconButtonHovered: false }); + if (iconButton && iconButton.props.onMouseLeave) iconButton.props.onMouseLeave(event); + }, _this.handleRightIconButtonMouseEnter = function (event) { + var iconButton = _this.props.rightIconButton; + _this.setState({ rightIconButtonHovered: true }); + if (iconButton && iconButton.props.onMouseEnter) iconButton.props.onMouseEnter(event); + }, _this.handleRightIconButtonMouseUp = function (event) { + var iconButton = _this.props.rightIconButton; + event.stopPropagation(); + if (iconButton && iconButton.props.onMouseUp) iconButton.props.onMouseUp(event); + }, _this.handleRightIconButtonTouchTap = function (event) { + var iconButton = _this.props.rightIconButton; + + // Stop the event from bubbling up to the list-item + event.stopPropagation(); + if (iconButton && iconButton.props.onTouchTap) iconButton.props.onTouchTap(event); + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); + _this.props.onTouchStart(event); + }, _this.handleTouchEnd = function (event) { + _this.setState({ touch: true }); + _this.props.onTouchEnd(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ListItem, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + open: this.props.open === null ? this.props.initiallyOpen === true : this.props.open + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + // update the state when the component is controlled. + if (nextProps.open !== null) this.setState({ open: nextProps.open }); + if (nextProps.disabled && this.state.hovered) this.setState({ hovered: false }); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + + // This method is needed by the `MenuItem` component. + + }, { + key: 'applyFocusState', + value: function applyFocusState(focusState) { + var button = this.refs.enhancedButton; + + if (button) { + var buttonEl = _reactDom2.default.findDOMNode(button); + + switch (focusState) { + case 'none': + buttonEl.blur(); + break; + case 'focused': + buttonEl.focus(); + break; + case 'keyboard-focused': + button.setKeyboardFocus(); + buttonEl.focus(); + break; + } + } + } + }, { + key: 'createDisabledElement', + value: function createDisabledElement(styles, contentChildren, additionalProps) { + var _props = this.props, + innerDivStyle = _props.innerDivStyle, + style = _props.style; + + + var mergedDivStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, style); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, additionalProps, { + style: this.context.muiTheme.prepareStyles(mergedDivStyles) + }), + contentChildren + ); + } + }, { + key: 'createLabelElement', + value: function createLabelElement(styles, contentChildren, additionalProps) { + var _props2 = this.props, + innerDivStyle = _props2.innerDivStyle, + style = _props2.style; + + + var mergedLabelStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, styles.label, style); + + return _react2.default.createElement( + 'label', + (0, _extends3.default)({}, additionalProps, { + style: this.context.muiTheme.prepareStyles(mergedLabelStyles) + }), + contentChildren + ); + } + }, { + key: 'createTextElement', + value: function createTextElement(styles, data, key) { + var prepareStyles = this.context.muiTheme.prepareStyles; + + if (_react2.default.isValidElement(data)) { + var style = (0, _simpleAssign2.default)({}, styles, data.props.style); + if (typeof data.type === 'string') { + // if element is a native dom node + style = prepareStyles(style); + } + return _react2.default.cloneElement(data, { + key: key, + style: style + }); + } + + return _react2.default.createElement( + 'div', + { key: key, style: prepareStyles(styles) }, + data + ); + } + }, { + key: 'pushElement', + value: function pushElement(children, element, baseStyles, additionalProps) { + if (element) { + var styles = (0, _simpleAssign2.default)({}, baseStyles, element.props.style); + children.push(_react2.default.cloneElement(element, (0, _extends3.default)({ + key: children.length, + style: styles + }, additionalProps))); + } + } + }, { + key: 'render', + value: function render() { + var _props3 = this.props, + autoGenerateNestedIndicator = _props3.autoGenerateNestedIndicator, + children = _props3.children, + disabled = _props3.disabled, + disableKeyboardFocus = _props3.disableKeyboardFocus, + hoverColor = _props3.hoverColor, + initiallyOpen = _props3.initiallyOpen, + innerDivStyle = _props3.innerDivStyle, + insetChildren = _props3.insetChildren, + leftAvatar = _props3.leftAvatar, + leftCheckbox = _props3.leftCheckbox, + leftIcon = _props3.leftIcon, + nestedItems = _props3.nestedItems, + nestedLevel = _props3.nestedLevel, + nestedListStyle = _props3.nestedListStyle, + onKeyboardFocus = _props3.onKeyboardFocus, + onMouseEnter = _props3.onMouseEnter, + onMouseLeave = _props3.onMouseLeave, + onNestedListToggle = _props3.onNestedListToggle, + onTouchStart = _props3.onTouchStart, + onTouchTap = _props3.onTouchTap, + rightAvatar = _props3.rightAvatar, + rightIcon = _props3.rightIcon, + rightIconButton = _props3.rightIconButton, + rightToggle = _props3.rightToggle, + primaryText = _props3.primaryText, + primaryTogglesNestedList = _props3.primaryTogglesNestedList, + secondaryText = _props3.secondaryText, + secondaryTextLines = _props3.secondaryTextLines, + style = _props3.style, + other = (0, _objectWithoutProperties3.default)(_props3, ['autoGenerateNestedIndicator', 'children', 'disabled', 'disableKeyboardFocus', 'hoverColor', 'initiallyOpen', 'innerDivStyle', 'insetChildren', 'leftAvatar', 'leftCheckbox', 'leftIcon', 'nestedItems', 'nestedLevel', 'nestedListStyle', 'onKeyboardFocus', 'onMouseEnter', 'onMouseLeave', 'onNestedListToggle', 'onTouchStart', 'onTouchTap', 'rightAvatar', 'rightIcon', 'rightIconButton', 'rightToggle', 'primaryText', 'primaryTogglesNestedList', 'secondaryText', 'secondaryTextLines', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var contentChildren = [children]; + + if (leftIcon) { + var additionalProps = { + color: leftIcon.props.color || this.context.muiTheme.listItem.leftIconColor + }; + this.pushElement(contentChildren, leftIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.leftIcon), additionalProps); + } + + if (rightIcon) { + var _additionalProps = { + color: rightIcon.props.color || this.context.muiTheme.listItem.rightIconColor + }; + this.pushElement(contentChildren, rightIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.rightIcon), _additionalProps); + } + + if (leftAvatar) { + this.pushElement(contentChildren, leftAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.leftAvatar)); + } + + if (rightAvatar) { + this.pushElement(contentChildren, rightAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.rightAvatar)); + } + + if (leftCheckbox) { + this.pushElement(contentChildren, leftCheckbox, (0, _simpleAssign2.default)({}, styles.leftCheckbox)); + } + + // RightIconButtonElement + var hasNestListItems = nestedItems.length; + var hasRightElement = rightAvatar || rightIcon || rightIconButton || rightToggle; + var needsNestedIndicator = hasNestListItems && autoGenerateNestedIndicator && !hasRightElement; + + if (rightIconButton || needsNestedIndicator) { + var rightIconButtonElement = rightIconButton; + var rightIconButtonHandlers = { + onKeyboardFocus: this.handleRightIconButtonKeyboardFocus, + onMouseEnter: this.handleRightIconButtonMouseEnter, + onMouseLeave: this.handleRightIconButtonMouseLeave, + onTouchTap: this.handleRightIconButtonTouchTap, + onMouseDown: this.handleRightIconButtonMouseUp, + onMouseUp: this.handleRightIconButtonMouseUp + }; + + // Create a nested list indicator icon if we don't have an icon on the right + if (needsNestedIndicator) { + rightIconButtonElement = this.state.open ? _react2.default.createElement( + _IconButton2.default, + null, + _react2.default.createElement(_expandLess2.default, null) + ) : _react2.default.createElement( + _IconButton2.default, + null, + _react2.default.createElement(_expandMore2.default, null) + ); + rightIconButtonHandlers.onTouchTap = this.handleNestedListToggle; + } + + this.pushElement(contentChildren, rightIconButtonElement, (0, _simpleAssign2.default)({}, styles.rightIconButton), rightIconButtonHandlers); + } + + if (rightToggle) { + this.pushElement(contentChildren, rightToggle, (0, _simpleAssign2.default)({}, styles.rightToggle)); + } + + if (primaryText) { + var primaryTextElement = this.createTextElement(styles.primaryText, primaryText, 'primaryText'); + contentChildren.push(primaryTextElement); + } + + if (secondaryText) { + var secondaryTextElement = this.createTextElement(styles.secondaryText, secondaryText, 'secondaryText'); + contentChildren.push(secondaryTextElement); + } + + var nestedList = nestedItems.length ? _react2.default.createElement( + _NestedList2.default, + { nestedLevel: nestedLevel, open: this.state.open, style: nestedListStyle }, + nestedItems + ) : undefined; + + var simpleLabel = !primaryTogglesNestedList && (leftCheckbox || rightToggle); + + return _react2.default.createElement( + 'div', + null, + simpleLabel ? this.createLabelElement(styles, contentChildren, other) : disabled ? this.createDisabledElement(styles, contentChildren, other) : _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({ + containerElement: 'span' + }, other, { + disableKeyboardFocus: disableKeyboardFocus || this.state.rightIconButtonKeyboardFocused, + onKeyboardFocus: this.handleKeyboardFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd, + onTouchTap: primaryTogglesNestedList ? this.handleNestedListToggle : onTouchTap, + ref: 'enhancedButton', + style: (0, _simpleAssign2.default)({}, styles.root, style) + }), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.innerDiv, innerDivStyle)) }, + contentChildren + ) + ), + nestedList + ); + } + }]); + return ListItem; +}(_react.Component); + +ListItem.muiName = 'ListItem'; +ListItem.defaultProps = { + autoGenerateNestedIndicator: true, + disableKeyboardFocus: false, + disabled: false, + initiallyOpen: false, + insetChildren: false, + nestedItems: [], + nestedLevel: 0, + onKeyboardFocus: function onKeyboardFocus() {}, + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + onNestedListToggle: function onNestedListToggle() {}, + onTouchEnd: function onTouchEnd() {}, + onTouchStart: function onTouchStart() {}, + open: null, + primaryTogglesNestedList: false, + secondaryTextLines: 1 +}; +ListItem.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ListItem.propTypes = { + /** + * If true, generate a nested-list-indicator icon when nested list + * items are detected. Note that an indicator will not be created + * if a `rightIcon` or `rightIconButton` has been provided to + * the element. + */ + autoGenerateNestedIndicator: _react.PropTypes.bool, + /** + * Children passed into the `ListItem`. + */ + children: _react.PropTypes.node, + /** + * If true, the element will not be able to be focused by the keyboard. + */ + disableKeyboardFocus: _react.PropTypes.bool, + /** + * If true, the element will not be clickable + * and will not display hover effects. + * This is automatically disabled if either `leftCheckbox` + * or `rightToggle` is set. + */ + disabled: _react.PropTypes.bool, + /** + * Override the hover background color. + */ + hoverColor: _react.PropTypes.string, + /** + * If true, the nested `ListItem`s are initially displayed. + */ + initiallyOpen: _react.PropTypes.bool, + /** + * Override the inline-styles of the inner div element. + */ + innerDivStyle: _react.PropTypes.object, + /** + * If true, the children will be indented by 72px. + * This is useful if there is no left avatar or left icon. + */ + insetChildren: _react.PropTypes.bool, + /** + * This is the `Avatar` element to be displayed on the left side. + */ + leftAvatar: _react.PropTypes.element, + /** + * This is the `Checkbox` element to be displayed on the left side. + */ + leftCheckbox: _react.PropTypes.element, + /** + * This is the `SvgIcon` or `FontIcon` to be displayed on the left side. + */ + leftIcon: _react.PropTypes.element, + /** + * An array of `ListItem`s to nest underneath the current `ListItem`. + */ + nestedItems: _react.PropTypes.arrayOf(_react.PropTypes.element), + /** + * Controls how deep a `ListItem` appears. + * This property is automatically managed, so modify at your own risk. + */ + nestedLevel: _react.PropTypes.number, + /** + * Override the inline-styles of the nested items' `NestedList`. + */ + nestedListStyle: _react.PropTypes.object, + /** + * Callback function fired when the `ListItem` is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the `ListItem`. + * @param {boolean} isKeyboardFocused If true, the `ListItem` is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Callbak function fired when the `ListItem` toggles its nested list. + * + * @param {object} listItem The `ListItem`. + */ + onNestedListToggle: _react.PropTypes.func, + /** @ignore */ + onTouchEnd: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** @ignore */ + onTouchTap: _react.PropTypes.func, + /** + * Control toggle state of nested list. + */ + open: _react.PropTypes.bool, + /** + * This is the block element that contains the primary text. + * If a string is passed in, a div tag will be rendered. + */ + primaryText: _react.PropTypes.node, + /** + * If true, clicking or tapping the primary text of the `ListItem` + * toggles the nested list. + */ + primaryTogglesNestedList: _react.PropTypes.bool, + /** + * This is the `Avatar` element to be displayed on the right side. + */ + rightAvatar: _react.PropTypes.element, + /** + * This is the `SvgIcon` or `FontIcon` to be displayed on the right side. + */ + rightIcon: _react.PropTypes.element, + /** + * This is the `IconButton` to be displayed on the right side. + * Hovering over this button will remove the `ListItem` hover. + * Also, clicking on this button will not trigger a + * ripple on the `ListItem`; the event will be stopped and prevented + * from bubbling up to cause a `ListItem` click. + */ + rightIconButton: _react.PropTypes.element, + /** + * This is the `Toggle` element to display on the right side. + */ + rightToggle: _react.PropTypes.element, + /** + * This is the block element that contains the secondary text. + * If a string is passed in, a div tag will be rendered. + */ + secondaryText: _react.PropTypes.node, + /** + * Can be 1 or 2. This is the number of secondary + * text lines before ellipsis will show. + */ + secondaryTextLines: _react.PropTypes.oneOf([1, 2]), + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = ListItem; + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _toConsumableArray2 = __webpack_require__(189); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _toArray2 = __webpack_require__(315); + +var _toArray3 = _interopRequireDefault(_toArray2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactAddonsTransitionGroup = __webpack_require__(128); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +var _dom = __webpack_require__(316); + +var _dom2 = _interopRequireDefault(_dom); + +var _CircleRipple = __webpack_require__(736); + +var _CircleRipple2 = _interopRequireDefault(_CircleRipple); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Remove the first element of the array +var shift = function shift(_ref) { + var _ref2 = (0, _toArray3.default)(_ref), + newArray = _ref2.slice(1); + + return newArray; +}; + +var TouchRipple = function (_Component) { + (0, _inherits3.default)(TouchRipple, _Component); + + function TouchRipple(props, context) { + (0, _classCallCheck3.default)(this, TouchRipple); + + // Touch start produces a mouse down event for compat reasons. To avoid + // showing ripples twice we skip showing a ripple for the first mouse down + // after a touch start. Note we don't store ignoreNextMouseDown in this.state + // to avoid re-rendering when we change it. + var _this = (0, _possibleConstructorReturn3.default)(this, (TouchRipple.__proto__ || (0, _getPrototypeOf2.default)(TouchRipple)).call(this, props, context)); + + _this.handleMouseDown = function (event) { + // only listen to left clicks + if (event.button === 0) { + _this.start(event, false); + } + }; + + _this.handleMouseUp = function () { + _this.end(); + }; + + _this.handleMouseLeave = function () { + _this.end(); + }; + + _this.handleTouchStart = function (event) { + event.stopPropagation(); + // If the user is swiping (not just tapping), save the position so we can + // abort ripples if the user appears to be scrolling. + if (_this.props.abortOnScroll && event.touches) { + _this.startListeningForScrollAbort(event); + _this.startTime = Date.now(); + } + _this.start(event, true); + }; + + _this.handleTouchEnd = function () { + _this.end(); + }; + + _this.handleTouchMove = function (event) { + // Stop trying to abort if we're already 300ms into the animation + var timeSinceStart = Math.abs(Date.now() - _this.startTime); + if (timeSinceStart > 300) { + _this.stopListeningForScrollAbort(); + return; + } + + // If the user is scrolling... + var deltaY = Math.abs(event.touches[0].clientY - _this.firstTouchY); + var deltaX = Math.abs(event.touches[0].clientX - _this.firstTouchX); + // Call it a scroll after an arbitrary 6px (feels reasonable in testing) + if (deltaY > 6 || deltaX > 6) { + var currentRipples = _this.state.ripples; + var ripple = currentRipples[0]; + // This clone will replace the ripple in ReactTransitionGroup with a + // version that will disappear immediately when removed from the DOM + var abortedRipple = _react2.default.cloneElement(ripple, { aborted: true }); + // Remove the old ripple and replace it with the new updated one + currentRipples = shift(currentRipples); + currentRipples = [].concat((0, _toConsumableArray3.default)(currentRipples), [abortedRipple]); + _this.setState({ ripples: currentRipples }, function () { + // Call end after we've set the ripple to abort otherwise the setState + // in end() merges with this and the ripple abort fails + _this.end(); + }); + } + }; + + _this.ignoreNextMouseDown = false; + + _this.state = { + // This prop allows us to only render the ReactTransitionGroup + // on the first click of the component, making the inital render faster. + hasRipples: false, + nextKey: 0, + ripples: [] + }; + return _this; + } + + (0, _createClass3.default)(TouchRipple, [{ + key: 'start', + value: function start(event, isRippleTouchGenerated) { + var theme = this.context.muiTheme.ripple; + + if (this.ignoreNextMouseDown && !isRippleTouchGenerated) { + this.ignoreNextMouseDown = false; + return; + } + + var ripples = this.state.ripples; + + // Add a ripple to the ripples array + ripples = [].concat((0, _toConsumableArray3.default)(ripples), [_react2.default.createElement(_CircleRipple2.default, { + key: this.state.nextKey, + style: !this.props.centerRipple ? this.getRippleStyle(event) : {}, + color: this.props.color || theme.color, + opacity: this.props.opacity, + touchGenerated: isRippleTouchGenerated + })]); + + this.ignoreNextMouseDown = isRippleTouchGenerated; + this.setState({ + hasRipples: true, + nextKey: this.state.nextKey + 1, + ripples: ripples + }); + } + }, { + key: 'end', + value: function end() { + var currentRipples = this.state.ripples; + this.setState({ + ripples: shift(currentRipples) + }); + if (this.props.abortOnScroll) { + this.stopListeningForScrollAbort(); + } + } + + // Check if the user seems to be scrolling and abort the animation if so + + }, { + key: 'startListeningForScrollAbort', + value: function startListeningForScrollAbort(event) { + this.firstTouchY = event.touches[0].clientY; + this.firstTouchX = event.touches[0].clientX; + // Note that when scolling Chrome throttles this event to every 200ms + // Also note we don't listen for scroll events directly as there's no general + // way to cover cases like scrolling within containers on the page + document.body.addEventListener('touchmove', this.handleTouchMove); + } + }, { + key: 'stopListeningForScrollAbort', + value: function stopListeningForScrollAbort() { + document.body.removeEventListener('touchmove', this.handleTouchMove); + } + }, { + key: 'getRippleStyle', + value: function getRippleStyle(event) { + var el = _reactDom2.default.findDOMNode(this); + var elHeight = el.offsetHeight; + var elWidth = el.offsetWidth; + var offset = _dom2.default.offset(el); + var isTouchEvent = event.touches && event.touches.length; + var pageX = isTouchEvent ? event.touches[0].pageX : event.pageX; + var pageY = isTouchEvent ? event.touches[0].pageY : event.pageY; + var pointerX = pageX - offset.left; + var pointerY = pageY - offset.top; + var topLeftDiag = this.calcDiag(pointerX, pointerY); + var topRightDiag = this.calcDiag(elWidth - pointerX, pointerY); + var botRightDiag = this.calcDiag(elWidth - pointerX, elHeight - pointerY); + var botLeftDiag = this.calcDiag(pointerX, elHeight - pointerY); + var rippleRadius = Math.max(topLeftDiag, topRightDiag, botRightDiag, botLeftDiag); + var rippleSize = rippleRadius * 2; + var left = pointerX - rippleRadius; + var top = pointerY - rippleRadius; + + return { + directionInvariant: true, + height: rippleSize, + width: rippleSize, + top: top, + left: left + }; + } + }, { + key: 'calcDiag', + value: function calcDiag(a, b) { + return Math.sqrt(a * a + b * b); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + style = _props.style; + var _state = this.state, + hasRipples = _state.hasRipples, + ripples = _state.ripples; + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var rippleGroup = void 0; + + if (hasRipples) { + var mergedStyles = (0, _simpleAssign2.default)({ + height: '100%', + width: '100%', + position: 'absolute', + top: 0, + left: 0, + overflow: 'hidden', + pointerEvents: 'none' + }, style); + + rippleGroup = _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + { style: prepareStyles(mergedStyles) }, + ripples + ); + } + + return _react2.default.createElement( + 'div', + { + onMouseUp: this.handleMouseUp, + onMouseDown: this.handleMouseDown, + onMouseLeave: this.handleMouseLeave, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd + }, + rippleGroup, + children + ); + } + }]); + return TouchRipple; +}(_react.Component); + +TouchRipple.defaultProps = { + abortOnScroll: true +}; +TouchRipple.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TouchRipple.propTypes = { + abortOnScroll: _react.PropTypes.bool, + centerRipple: _react.PropTypes.bool, + children: _react.PropTypes.node, + color: _react.PropTypes.string, + opacity: _react.PropTypes.number, + style: _react.PropTypes.object +} : void 0; +exports.default = TouchRipple; + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _from = __webpack_require__(302); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + return Array.isArray(arr) ? arr : (0, _from2.default)(arr); +}; + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + isDescendant: function isDescendant(parent, child) { + var node = child.parentNode; + + while (node !== null) { + if (node === parent) return true; + node = node.parentNode; + } + + return false; + }, + offset: function offset(el) { + var rect = el.getBoundingClientRect(); + return { + top: rect.top + document.body.scrollTop, + left: rect.left + document.body.scrollLeft + }; + } +}; + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _FontIcon = __webpack_require__(738); + +var _FontIcon2 = _interopRequireDefault(_FontIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _FontIcon2.default; + +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var createHelper = function createHelper(func, helperName) { + var setDisplayName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var noArgs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + if (false) { + var _ret = function () { + /* eslint-disable global-require */ + var wrapDisplayName = require('./wrapDisplayName').default; + /* eslint-enable global-require */ + + if (noArgs) { + return { + v: function v(BaseComponent) { + var Component = func(BaseComponent); + Component.displayName = wrapDisplayName(BaseComponent, helperName); + return Component; + } + }; + } + + return { + v: function v() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return function (BaseComponent) { + var Component = func.apply(undefined, args)(BaseComponent); + Component.displayName = wrapDisplayName(BaseComponent, helperName); + return Component; + }; + } + }; + }(); + + if (typeof _ret === "object") return _ret.v; + } + + return func; +}; + +exports.default = createHelper; + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _AutoLockScrolling = __webpack_require__(754); + +var _AutoLockScrolling2 = _interopRequireDefault(_AutoLockScrolling); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var overlay = context.muiTheme.overlay; + + + var style = { + root: { + position: 'fixed', + height: '100%', + width: '100%', + top: 0, + left: '-100%', + opacity: 0, + backgroundColor: overlay.backgroundColor, + WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)', // Remove mobile color flashing (deprecated) + + // Two ways to promote overlay to its own render layer + willChange: 'opacity', + transform: 'translateZ(0)', + + transition: props.transitionEnabled && _transitions2.default.easeOut('0ms', 'left', '400ms') + ', ' + _transitions2.default.easeOut('400ms', 'opacity') + } + }; + + if (props.show) { + (0, _simpleAssign2.default)(style.root, { + left: 0, + opacity: 1, + transition: _transitions2.default.easeOut('0ms', 'left') + ', ' + _transitions2.default.easeOut('400ms', 'opacity') + }); + } + + return style; +} + +var Overlay = function (_Component) { + (0, _inherits3.default)(Overlay, _Component); + + function Overlay() { + (0, _classCallCheck3.default)(this, Overlay); + return (0, _possibleConstructorReturn3.default)(this, (Overlay.__proto__ || (0, _getPrototypeOf2.default)(Overlay)).apply(this, arguments)); + } + + (0, _createClass3.default)(Overlay, [{ + key: 'setOpacity', + value: function setOpacity(opacity) { + this.refs.overlay.style.opacity = opacity; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + autoLockScrolling = _props.autoLockScrolling, + show = _props.show, + style = _props.style, + transitionEnabled = _props.transitionEnabled, + other = (0, _objectWithoutProperties3.default)(_props, ['autoLockScrolling', 'show', 'style', 'transitionEnabled']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { ref: 'overlay', style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + autoLockScrolling && _react2.default.createElement(_AutoLockScrolling2.default, { lock: show }) + ); + } + }]); + return Overlay; +}(_react.Component); + +Overlay.defaultProps = { + autoLockScrolling: true, + style: {}, + transitionEnabled: true +}; +Overlay.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Overlay.propTypes = { + autoLockScrolling: _react.PropTypes.bool, + show: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + transitionEnabled: _react.PropTypes.bool +} : void 0; +exports.default = Overlay; + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _events = __webpack_require__(196); + +var _events2 = _interopRequireDefault(_events); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isDescendant = function isDescendant(el, target) { + if (target !== null) { + return el === target || isDescendant(el, target.parentNode); + } + return false; +}; + +var clickAwayEvents = ['mouseup', 'touchend']; +var bind = function bind(callback) { + return clickAwayEvents.forEach(function (event) { + return _events2.default.on(document, event, callback); + }); +}; +var unbind = function unbind(callback) { + return clickAwayEvents.forEach(function (event) { + return _events2.default.off(document, event, callback); + }); +}; + +var ClickAwayListener = function (_Component) { + (0, _inherits3.default)(ClickAwayListener, _Component); + + function ClickAwayListener() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClickAwayListener); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClickAwayListener.__proto__ || (0, _getPrototypeOf2.default)(ClickAwayListener)).call.apply(_ref, [this].concat(args))), _this), _this.handleClickAway = function (event) { + if (event.defaultPrevented) { + return; + } + + // IE11 support, which trigger the handleClickAway even after the unbind + if (_this.isCurrentlyMounted) { + var el = _reactDom2.default.findDOMNode(_this); + + if (document.documentElement.contains(event.target) && !isDescendant(el, event.target)) { + _this.props.onClickAway(event); + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClickAwayListener, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.isCurrentlyMounted = true; + if (this.props.onClickAway) { + bind(this.handleClickAway); + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps) { + if (prevProps.onClickAway !== this.props.onClickAway) { + unbind(this.handleClickAway); + if (this.props.onClickAway) { + bind(this.handleClickAway); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.isCurrentlyMounted = false; + unbind(this.handleClickAway); + } + }, { + key: 'render', + value: function render() { + return this.props.children; + } + }]); + return ClickAwayListener; +}(_react.Component); + + false ? ClickAwayListener.propTypes = { + children: _react.PropTypes.element, + onClickAway: _react.PropTypes.func +} : void 0; +exports.default = ClickAwayListener; + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(58); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _Popover = __webpack_require__(130); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _check = __webpack_require__(774); + +var _check2 = _interopRequireDefault(_check); + +var _ListItem = __webpack_require__(313); + +var _ListItem2 = _interopRequireDefault(_ListItem); + +var _Menu = __webpack_require__(199); + +var _Menu2 = _interopRequireDefault(_Menu); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var nestedMenuStyle = { + position: 'relative' +}; + +function getStyles(props, context) { + var disabledColor = context.muiTheme.baseTheme.palette.disabledColor; + var textColor = context.muiTheme.baseTheme.palette.textColor; + var indent = props.desktop ? 64 : 72; + var sidePadding = props.desktop ? 24 : 16; + + var styles = { + root: { + color: props.disabled ? disabledColor : textColor, + cursor: props.disabled ? 'not-allowed' : 'pointer', + minHeight: props.desktop ? '32px' : '48px', + lineHeight: props.desktop ? '32px' : '48px', + fontSize: props.desktop ? 15 : 16, + whiteSpace: 'nowrap' + }, + + innerDivStyle: { + paddingLeft: props.leftIcon || props.insetChildren || props.checked ? indent : sidePadding, + paddingRight: props.rightIcon ? indent : sidePadding, + paddingBottom: 0, + paddingTop: 0 + }, + + secondaryText: { + float: 'right' + }, + + leftIconDesktop: { + margin: 0, + left: 24, + top: 4 + }, + + rightIconDesktop: { + margin: 0, + right: 24, + top: 4, + fill: context.muiTheme.menuItem.rightIconDesktopFill + } + }; + + return styles; +} + +var MenuItem = function (_Component) { + (0, _inherits3.default)(MenuItem, _Component); + + function MenuItem() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, MenuItem); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuItem.__proto__ || (0, _getPrototypeOf2.default)(MenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.cloneMenuItem = function (item) { + return _react2.default.cloneElement(item, { + onTouchTap: function onTouchTap(event) { + if (!item.props.menuItems) { + _this.handleRequestClose(); + } + + if (item.props.onTouchTap) { + item.props.onTouchTap(event); + } + } + }); + }, _this.handleTouchTap = function (event) { + event.preventDefault(); + + _this.setState({ + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this) + }); + + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + }, _this.handleRequestClose = function () { + _this.setState({ + open: false, + anchorEl: null + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(MenuItem, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.applyFocusState(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.state.open && nextProps.focusState === 'none') { + this.handleRequestClose(); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.applyFocusState(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + if (this.state.open) { + this.setState({ + open: false + }); + } + } + }, { + key: 'applyFocusState', + value: function applyFocusState() { + this.refs.listItem.applyFocusState(this.props.focusState); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + checked = _props.checked, + children = _props.children, + desktop = _props.desktop, + disabled = _props.disabled, + focusState = _props.focusState, + innerDivStyle = _props.innerDivStyle, + insetChildren = _props.insetChildren, + leftIcon = _props.leftIcon, + menuItems = _props.menuItems, + rightIcon = _props.rightIcon, + secondaryText = _props.secondaryText, + style = _props.style, + animation = _props.animation, + value = _props.value, + other = (0, _objectWithoutProperties3.default)(_props, ['checked', 'children', 'desktop', 'disabled', 'focusState', 'innerDivStyle', 'insetChildren', 'leftIcon', 'menuItems', 'rightIcon', 'secondaryText', 'style', 'animation', 'value']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style); + var mergedInnerDivStyles = (0, _simpleAssign2.default)(styles.innerDivStyle, innerDivStyle); + + // Left Icon + var leftIconElement = leftIcon ? leftIcon : checked ? _react2.default.createElement(_check2.default, null) : null; + if (leftIconElement) { + var mergedLeftIconStyles = desktop ? (0, _simpleAssign2.default)(styles.leftIconDesktop, leftIconElement.props.style) : leftIconElement.props.style; + leftIconElement = _react2.default.cloneElement(leftIconElement, { style: mergedLeftIconStyles }); + } + + // Right Icon + var rightIconElement = void 0; + if (rightIcon) { + var mergedRightIconStyles = desktop ? (0, _simpleAssign2.default)(styles.rightIconDesktop, rightIcon.props.style) : rightIcon.props.style; + rightIconElement = _react2.default.cloneElement(rightIcon, { style: mergedRightIconStyles }); + } + + // Secondary Text + var secondaryTextElement = void 0; + if (secondaryText) { + var secondaryTextIsAnElement = _react2.default.isValidElement(secondaryText); + var mergedSecondaryTextStyles = secondaryTextIsAnElement ? (0, _simpleAssign2.default)(styles.secondaryText, secondaryText.props.style) : null; + + secondaryTextElement = secondaryTextIsAnElement ? _react2.default.cloneElement(secondaryText, { style: mergedSecondaryTextStyles }) : _react2.default.createElement( + 'div', + { style: prepareStyles(styles.secondaryText) }, + secondaryText + ); + } + var childMenuPopover = void 0; + if (menuItems) { + childMenuPopover = _react2.default.createElement( + _Popover2.default, + { + animation: animation, + anchorOrigin: { horizontal: 'right', vertical: 'top' }, + anchorEl: this.state.anchorEl, + open: this.state.open, + useLayerForClickAway: false, + onRequestClose: this.handleRequestClose + }, + _react2.default.createElement( + _Menu2.default, + { desktop: desktop, disabled: disabled, style: nestedMenuStyle }, + _react2.default.Children.map(menuItems, this.cloneMenuItem) + ) + ); + other.onTouchTap = this.handleTouchTap; + } + + return _react2.default.createElement( + _ListItem2.default, + (0, _extends3.default)({}, other, { + disabled: disabled, + hoverColor: this.context.muiTheme.menuItem.hoverColor, + innerDivStyle: mergedInnerDivStyles, + insetChildren: insetChildren, + leftIcon: leftIconElement, + ref: 'listItem', + rightIcon: rightIconElement, + style: mergedRootStyles + }), + children, + secondaryTextElement, + childMenuPopover + ); + } + }]); + return MenuItem; +}(_react.Component); + +MenuItem.muiName = 'MenuItem'; +MenuItem.defaultProps = { + checked: false, + desktop: false, + disabled: false, + focusState: 'none', + insetChildren: false +}; +MenuItem.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? MenuItem.propTypes = { + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * If true, a left check mark will be rendered. + */ + checked: _react.PropTypes.bool, + /** + * Elements passed as children to the underlying `ListItem`. + */ + children: _react.PropTypes.node, + /** + * @ignore + * If true, the menu item will render with compact desktop + * styles. + */ + desktop: _react.PropTypes.bool, + /** + * If true, the menu item will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * The focus state of the menu item. This prop is used to set the focus + * state of the underlying `ListItem`. + */ + focusState: _react.PropTypes.oneOf(['none', 'focused', 'keyboard-focused']), + /** + * Override the inline-styles of the inner div. + */ + innerDivStyle: _react.PropTypes.object, + /** + * If true, the children will be indented. + * This is only needed when there is no `leftIcon`. + */ + insetChildren: _react.PropTypes.bool, + /** + * The `SvgIcon` or `FontIcon` to be displayed on the left side. + */ + leftIcon: _react.PropTypes.element, + /** + * `MenuItem` elements to nest within the menu item. + */ + menuItems: _react.PropTypes.node, + /** + * Callback function fired when the menu item is touch-tapped. + * + * @param {object} event TouchTap event targeting the menu item. + */ + onTouchTap: _react.PropTypes.func, + /** + * Can be used to render primary text within the menu item. + */ + primaryText: _react.PropTypes.node, + /** + * The `SvgIcon` or `FontIcon` to be displayed on the right side. + */ + rightIcon: _react.PropTypes.element, + /** + * Can be used to render secondary text within the menu item. + */ + secondaryText: _react.PropTypes.node, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The value of the menu item. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = MenuItem; + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _reactDom = __webpack_require__(19); + +var _dom = __webpack_require__(316); + +var _dom2 = _interopRequireDefault(_dom); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// heavily inspired by https://github.com/Khan/react-components/blob/master/js/layered-component-mixin.jsx +var RenderToLayer = function (_Component) { + (0, _inherits3.default)(RenderToLayer, _Component); + + function RenderToLayer() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RenderToLayer); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RenderToLayer.__proto__ || (0, _getPrototypeOf2.default)(RenderToLayer)).call.apply(_ref, [this].concat(args))), _this), _this.onClickAway = function (event) { + if (event.defaultPrevented) { + return; + } + + if (!_this.props.componentClickAway) { + return; + } + + if (!_this.props.open) { + return; + } + + var el = _this.layer; + if (event.target !== el && event.target === window || document.documentElement.contains(event.target) && !_dom2.default.isDescendant(el, event.target)) { + _this.props.componentClickAway(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(RenderToLayer, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.renderLayer(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.renderLayer(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.unrenderLayer(); + } + }, { + key: 'getLayer', + value: function getLayer() { + return this.layer; + } + }, { + key: 'unrenderLayer', + value: function unrenderLayer() { + if (!this.layer) { + return; + } + + if (this.props.useLayerForClickAway) { + this.layer.style.position = 'relative'; + this.layer.removeEventListener('touchstart', this.onClickAway); + this.layer.removeEventListener('click', this.onClickAway); + } else { + window.removeEventListener('touchstart', this.onClickAway); + window.removeEventListener('click', this.onClickAway); + } + + (0, _reactDom.unmountComponentAtNode)(this.layer); + document.body.removeChild(this.layer); + this.layer = null; + } + + /** + * By calling this method in componentDidMount() and + * componentDidUpdate(), you're effectively creating a "wormhole" that + * funnels React's hierarchical updates through to a DOM node on an + * entirely different part of the page. + */ + + }, { + key: 'renderLayer', + value: function renderLayer() { + var _this2 = this; + + var _props = this.props, + open = _props.open, + render = _props.render; + + + if (open) { + if (!this.layer) { + this.layer = document.createElement('div'); + document.body.appendChild(this.layer); + + if (this.props.useLayerForClickAway) { + this.layer.addEventListener('touchstart', this.onClickAway); + this.layer.addEventListener('click', this.onClickAway); + this.layer.style.position = 'fixed'; + this.layer.style.top = 0; + this.layer.style.bottom = 0; + this.layer.style.left = 0; + this.layer.style.right = 0; + this.layer.style.zIndex = this.context.muiTheme.zIndex.layer; + } else { + setTimeout(function () { + window.addEventListener('touchstart', _this2.onClickAway); + window.addEventListener('click', _this2.onClickAway); + }, 0); + } + } + + var layerElement = render(); + this.layerElement = (0, _reactDom.unstable_renderSubtreeIntoContainer)(this, layerElement, this.layer); + } else { + this.unrenderLayer(); + } + } + }, { + key: 'render', + value: function render() { + return null; + } + }]); + return RenderToLayer; +}(_react.Component); + +RenderToLayer.defaultProps = { + useLayerForClickAway: true +}; +RenderToLayer.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? RenderToLayer.propTypes = { + componentClickAway: _react.PropTypes.func, + open: _react.PropTypes.bool.isRequired, + render: _react.PropTypes.func.isRequired, + useLayerForClickAway: _react.PropTypes.bool +} : void 0; +exports.default = RenderToLayer; + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Dialog = __webpack_require__(808); + +var _Dialog2 = _interopRequireDefault(_Dialog); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Dialog2.default; + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _Paper = __webpack_require__(34); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _propTypes = __webpack_require__(41); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var targetOrigin = props.targetOrigin; + var open = state.open; + var muiTheme = context.muiTheme; + + var horizontal = targetOrigin.horizontal.replace('middle', 'vertical'); + + return { + root: { + position: 'fixed', + zIndex: muiTheme.zIndex.popover, + opacity: open ? 1 : 0, + transform: open ? 'scaleY(1)' : 'scaleY(0)', + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('450ms', ['transform', 'opacity']), + maxHeight: '100%' + } + }; +} + +var PopoverAnimationVertical = function (_Component) { + (0, _inherits3.default)(PopoverAnimationVertical, _Component); + + function PopoverAnimationVertical() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, PopoverAnimationVertical); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PopoverAnimationVertical.__proto__ || (0, _getPrototypeOf2.default)(PopoverAnimationVertical)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(PopoverAnimationVertical, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setState({ open: true }); // eslint-disable-line react/no-did-mount-set-state + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + open: nextProps.open + }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + className = _props.className, + style = _props.style, + zDepth = _props.zDepth; + + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _Paper2.default, + { + style: (0, _simpleAssign2.default)(styles.root, style), + zDepth: zDepth, + className: className + }, + this.props.children + ); + } + }]); + return PopoverAnimationVertical; +}(_react.Component); + +PopoverAnimationVertical.defaultProps = { + style: {}, + zDepth: 1 +}; +PopoverAnimationVertical.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? PopoverAnimationVertical.propTypes = { + children: _react.PropTypes.node, + className: _react.PropTypes.string, + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + targetOrigin: _propTypes2.default.origin.isRequired, + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = PopoverAnimationVertical; + +/***/ }), +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.RadioButtonGroup = exports.RadioButton = undefined; + +var _RadioButton2 = __webpack_require__(810); + +var _RadioButton3 = _interopRequireDefault(_RadioButton2); + +var _RadioButtonGroup2 = __webpack_require__(813); + +var _RadioButtonGroup3 = _interopRequireDefault(_RadioButtonGroup2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.RadioButton = _RadioButton3.default; +exports.RadioButtonGroup = _RadioButtonGroup3.default; +exports.default = _RadioButton3.default; + +/***/ }), +/* 326 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _isIterable2 = __webpack_require__(834); + +var _isIterable3 = _interopRequireDefault(_isIterable2); + +var _getIterator2 = __webpack_require__(837); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if ((0, _isIterable3.default)(Object(arr))) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + +/***/ }), +/* 327 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _slicedToArray2 = __webpack_require__(326); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _timeUtils = __webpack_require__(98); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var styles = { + root: { + directionInvariant: true, + display: 'inline-block', + position: 'absolute', + width: 32, + height: 32, + borderRadius: '100%', + left: 'calc(50% - 16px)', + top: 10, + textAlign: 'center', + paddingTop: 5, + userSelect: 'none', /* Chrome all / Safari all */ + fontSize: '1.1em', + pointerEvents: 'none', + boxSizing: 'border-box' + } + }; + + var muiTheme = context.muiTheme; + + + var pos = props.value; + + if (props.type === 'hour') { + pos %= 12; + } else { + pos = pos / 5; + } + + var positions = [[0, 5], [54.5, 16.6], [94.4, 59.5], [109, 114], [94.4, 168.5], [54.5, 208.4], [0, 223], [-54.5, 208.4], [-94.4, 168.5], [-109, 114], [-94.4, 59.5], [-54.5, 19.6]]; + + var innerPositions = [[0, 40], [36.9, 49.9], [64, 77], [74, 114], [64, 151], [37, 178], [0, 188], [-37, 178], [-64, 151], [-74, 114], [-64, 77], [-37, 50]]; + + if (props.isSelected) { + styles.root.backgroundColor = muiTheme.timePicker.accentColor; + styles.root.color = muiTheme.timePicker.selectTextColor; + } + + var transformPos = positions[pos]; + + if ((0, _timeUtils.isInner)(props)) { + styles.root.width = 28; + styles.root.height = 28; + styles.root.left = 'calc(50% - 14px)'; + transformPos = innerPositions[pos]; + } + + var _transformPos = transformPos, + _transformPos2 = (0, _slicedToArray3.default)(_transformPos, 2), + x = _transformPos2[0], + y = _transformPos2[1]; + + styles.root.transform = 'translate(' + x + 'px, ' + y + 'px)'; + + return styles; +} + +var ClockNumber = function (_Component) { + (0, _inherits3.default)(ClockNumber, _Component); + + function ClockNumber() { + (0, _classCallCheck3.default)(this, ClockNumber); + return (0, _possibleConstructorReturn3.default)(this, (ClockNumber.__proto__ || (0, _getPrototypeOf2.default)(ClockNumber)).apply(this, arguments)); + } + + (0, _createClass3.default)(ClockNumber, [{ + key: 'render', + value: function render() { + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var clockNumber = this.props.value === 0 ? '00' : this.props.value; + + return _react2.default.createElement( + 'span', + { style: prepareStyles(styles.root) }, + clockNumber + ); + } + }]); + return ClockNumber; +}(_react.Component); + +ClockNumber.defaultProps = { + value: 0, + type: 'minute', + isSelected: false +}; +ClockNumber.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ClockNumber.propTypes = { + isSelected: _react.PropTypes.bool, + onSelected: _react.PropTypes.func, + type: _react.PropTypes.oneOf(['hour', 'minute']), + value: _react.PropTypes.number +} : void 0; +exports.default = ClockNumber; + +/***/ }), +/* 328 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _timeUtils = __webpack_require__(98); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function calcAngle(value, base) { + value %= base; + var angle = 360 / base * value; + return angle; +} + +function getStyles(props, context, state) { + var hasSelected = props.hasSelected, + type = props.type, + value = props.value; + var inner = state.inner; + var timePicker = context.muiTheme.timePicker; + + var angle = type === 'hour' ? calcAngle(value, 12) : calcAngle(value, 60); + + var styles = { + root: { + height: inner ? '30%' : '40%', + background: timePicker.accentColor, + width: 2, + left: 'calc(50% - 1px)', + position: 'absolute', + bottom: '50%', + transformOrigin: 'bottom', + pointerEvents: 'none', + transform: 'rotateZ(' + angle + 'deg)' + }, + mark: { + boxSizing: 'content-box', + background: timePicker.selectTextColor, + border: '4px solid ' + timePicker.accentColor, + display: hasSelected && 'none', + width: 7, + height: 7, + position: 'absolute', + top: -5, + left: -6, + borderRadius: '100%' + } + }; + + return styles; +} + +var ClockPointer = function (_Component) { + (0, _inherits3.default)(ClockPointer, _Component); + + function ClockPointer() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClockPointer); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockPointer.__proto__ || (0, _getPrototypeOf2.default)(ClockPointer)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + inner: false + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClockPointer, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + inner: (0, _timeUtils.isInner)(this.props) + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + inner: (0, _timeUtils.isInner)(nextProps) + }); + } + }, { + key: 'render', + value: function render() { + if (this.props.value === null) { + return _react2.default.createElement('span', null); + } + + var styles = getStyles(this.props, this.context, this.state); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement('div', { style: prepareStyles(styles.mark) }) + ); + } + }]); + return ClockPointer; +}(_react.Component); + +ClockPointer.defaultProps = { + hasSelected: false, + value: null, + type: 'minute' +}; +ClockPointer.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ClockPointer.propTypes = { + hasSelected: _react.PropTypes.bool, + type: _react.PropTypes.oneOf(['hour', 'minute']), + value: _react.PropTypes.number +} : void 0; +exports.default = ClockPointer; + +/***/ }), +/* 329 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var countries = exports.countries = [{ "text": "USA", "value": "USA" }, { "text": "CANADA", "value": "CANADA" }, { "text": "JAPAN", "value": "JAPAN" }, { "text": "UK", "value": "GB" }, { "text": "UK (N. IRELAND)", "value": "NB" }, { "text": "AUSTRIA", "value": "AT" }, { "text": "BELARUS", "value": "BY" }, { "text": "BELGIUM", "value": "BE" }, { "text": "BULGARIA", "value": "BG" }, { "text": "CROATIA", "value": "HR" }, { "text": "CZECH REPUBLIC", "value": "CZ" }, { "text": "DENMARK", "value": "DK" }, { "text": "ESTONIA", "value": "EE" }, { "text": "FINLAND", "value": "FI" }, { "text": "FRANCE", "value": "FR" }, { "text": "GERMANY", "value": "DE" }, { "text": "GREECE", "value": "GR" }, { "text": "HUNGARY", "value": "HU" }, { "text": "ICELAND", "value": "IS" }, { "text": "IRELAND", "value": "IE" }, { "text": "ITALY", "value": "IT" }, { "text": "LATVIA", "value": "LV" }, { "text": "LITHUANIA", "value": "LT" }, { "text": "LUXEMBOURG", "value": "LU" }, { "text": "MONACO", "value": "MC" }, { "text": "NETHERLANDS", "value": "NL" }, { "text": "NORWAY", "value": "NO" }, { "text": "POLAND", "value": "PL" }, { "text": "PORTUGAL", "value": "PT" }, { "text": "ROMANIA", "value": "RO" }, { "text": "RUSSIA", "value": "RU" }, { "text": "SLOVAKIA", "value": "SK" }, { "text": "SLOVENIA", "value": "SI" }, { "text": "SPAIN", "value": "ES" }, { "text": "SWEDEN", "value": "SE" }, { "text": "SWITZERLAND", "value": "CH" }, { "text": "TURKEY", "value": "TR" }]; +var sizes = exports.sizes = ["Small", "Medium", "Large", "XLarge"]; +var sizesPants = exports.sizesPants = [28, 30, 32, 34, 36, 38, 40]; +var shoeSizes = exports.shoeSizes = [4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5]; +var usaRegions = exports.usaRegions = [{ "text": "AL", "value": "AL" }, { "text": "AK", "value": "AK" }, { "text": "AS", "value": "AS" }, { "text": "AZ", "value": "AZ" }, { "text": "AR", "value": "AR" }, { "text": "CA", "value": "CA" }, { "text": "CO", "value": "CO" }, { "text": "CT", "value": "CT" }, { "text": "DE", "value": "DE" }, { "text": "DC", "value": "DC" }, { "text": "FM", "value": "FM" }, { "text": "FL", "value": "FL" }, { "text": "GA", "value": "GA" }, { "text": "GU", "value": "GU" }, { "text": "HI", "value": "HI" }, { "text": "ID", "value": "ID" }, { "text": "IL", "value": "IL" }, { "text": "IN", "value": "IN" }, { "text": "IA", "value": "IA" }, { "text": "KS", "value": "KS" }, { "text": "KY", "value": "KY" }, { "text": "LA", "value": "LA" }, { "text": "ME", "value": "ME" }, { "text": "MH", "value": "MH" }, { "text": "MD", "value": "MD" }, { "text": "MA", "value": "MA" }, { "text": "MI", "value": "MI" }, { "text": "MN", "value": "MN" }, { "text": "MS", "value": "MS" }, { "text": "MO", "value": "MO" }, { "text": "MT", "value": "MT" }, { "text": "NE", "value": "NE" }, { "text": "NV", "value": "NV" }, { "text": "NH", "value": "NH" }, { "text": "NJ", "value": "NJ" }, { "text": "NM", "value": "NM" }, { "text": "NY", "value": "NY" }, { "text": "NC", "value": "NC" }, { "text": "ND", "value": "ND" }, { "text": "MP", "value": "MP" }, { "text": "OH", "value": "OH" }, { "text": "OK", "value": "OK" }, { "text": "OR", "value": "OR" }, { "text": "PW", "value": "PW" }, { "text": "PA", "value": "PA" }, { "text": "PR", "value": "PR" }, { "text": "RI", "value": "RI" }, { "text": "SC", "value": "SC" }, { "text": "SD", "value": "SD" }, { "text": "TN", "value": "TN" }, { "text": "TX", "value": "TX" }, { "text": "UT", "value": "UT" }, { "text": "VT", "value": "VT" }, { "text": "VI", "value": "VI" }, { "text": "VA", "value": "VA" }, { "text": "WA", "value": "WA" }, { "text": "WV", "value": "WV" }, { "text": "WI", "value": "WI" }, { "text": "WY", "value": "WY" }]; +var canadaRegions = exports.canadaRegions = [{ "text": "AB", "value": "AB" }, { "text": "BC", "value": "BC" }, { "text": "MB", "value": "MB" }, { "text": "NB", "value": "NB" }, { "text": "NL", "value": "NL" }, { "text": "NT", "value": "NT" }, { "text": "NS", "value": "NS" }, { "text": "NU", "value": "NU" }, { "text": "ON", "value": "ON" }, { "text": "PE", "value": "PE" }, { "text": "QC", "value": "QC" }, { "text": "SK", "value": "SK" }, { "text": "YT", "value": "YT" }]; +var japanRegions = exports.japanRegions = [{ "text": " 北海道", "value": " 北海道" }, { "text": " 青森県", "value": " 青森県" }, { "text": " 岩手県", "value": " 岩手県" }, { "text": " 宮城県", "value": " 宮城県" }, { "text": " 秋田県", "value": " 秋田県" }, { "text": " 山形県", "value": " 山形県" }, { "text": " 福島県", "value": " 福島県" }, { "text": " 茨城県", "value": " 茨城県" }, { "text": " 栃木県", "value": " 栃木県" }, { "text": " 群馬県", "value": " 群馬県" }, { "text": " 埼玉県", "value": " 埼玉県" }, { "text": " 千葉県", "value": " 千葉県" }, { "text": " 東京都", "value": " 東京都" }, { "text": " 神奈川県", "value": " 神奈川県" }, { "text": " 新潟県", "value": " 新潟県" }, { "text": " 富山県", "value": " 富山県" }, { "text": " 石川県", "value": " 石川県" }, { "text": " 福井県", "value": " 福井県" }, { "text": " 山梨県", "value": " 山梨県" }, { "text": " 長野県", "value": " 長野県" }, { "text": " 岐阜県", "value": " 岐阜県" }, { "text": " 静岡県", "value": " 静岡県" }, { "text": " 愛知県", "value": " 愛知県" }, { "text": " 三重県", "value": " 三重県" }, { "text": " 滋賀県", "value": " 滋賀県" }, { "text": " 京都府", "value": " 京都府" }, { "text": " 大阪府", "value": " 大阪府" }, { "text": " 兵庫県", "value": " 兵庫県" }, { "text": " 奈良県", "value": " 奈良県" }, { "text": " 和歌山県", "value": " 和歌山県" }, { "text": " 鳥取県", "value": " 鳥取県" }, { "text": " 島根県", "value": " 島根県" }, { "text": " 岡山県", "value": " 岡山県" }, { "text": " 広島県", "value": " 広島県" }, { "text": " 山口県", "value": " 山口県" }, { "text": " 徳島県", "value": " 徳島県" }, { "text": " 香川県", "value": " 香川県" }, { "text": " 愛媛県", "value": " 愛媛県" }, { "text": " 高知県", "value": " 高知県" }, { "text": " 福岡県", "value": " 福岡県" }, { "text": " 佐賀県", "value": " 佐賀県" }, { "text": " 長崎県", "value": " 長崎県" }, { "text": " 熊本県", "value": " 熊本県" }, { "text": " 大分県", "value": " 大分県" }, { "text": " 宮崎県", "value": " 宮崎県" }, { "text": " 鹿児島県", "value": " 鹿児島県" }, { "text": " 沖縄県", "value": " 沖縄県" }]; + +/***/ }), +/* 330 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(862), __esModule: true }; + +/***/ }), +/* 331 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(36); +var aFunction = __webpack_require__(99); +var SPECIES = __webpack_require__(22)('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + + +/***/ }), +/* 332 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(61); +var invoke = __webpack_require__(866); +var html = __webpack_require__(297); +var cel = __webpack_require__(131); +var global = __webpack_require__(23); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(83)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + + +/***/ }), +/* 333 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), +/* 334 */ +/***/ (function(module, exports, __webpack_require__) { + +var newPromiseCapability = __webpack_require__(205); + +module.exports = function (C, x) { + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + + +/***/ }), +/* 335 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _assign = __webpack_require__(49); + +var _assign2 = _interopRequireDefault(_assign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactRouter = __webpack_require__(156); + +var _redux = __webpack_require__(111); + +var _reactRedux = __webpack_require__(27); + +var _reduxLogger = __webpack_require__(476); + +var _reduxLogger2 = _interopRequireDefault(_reduxLogger); + +var _reactRouterRedux = __webpack_require__(481); + +var _reactTapEventPlugin = __webpack_require__(484); + +var _reactTapEventPlugin2 = _interopRequireDefault(_reactTapEventPlugin); + +var _reduxForm = __webpack_require__(113); + +var _reduxThunk = __webpack_require__(653); + +var _reduxThunk2 = _interopRequireDefault(_reduxThunk); + +var _reducers = __webpack_require__(654); + +var reducers = _interopRequireWildcard(_reducers); + +var _routes = __webpack_require__(658); + +var _routes2 = _interopRequireDefault(_routes); + +var _StorageManager = __webpack_require__(857); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var VERSION = '0.0.1'; + +(0, _reactTapEventPlugin2.default)(); + +var middleware = [_reduxThunk2.default, (0, _reactRouterRedux.routerMiddleware)(_reactRouter.browserHistory)]; +if (false) { + middleware.push((0, _reduxLogger2.default)()); +} + +var savedState = (0, _StorageManager.loadSavedState)(VERSION); +var store = (0, _redux.createStore)((0, _redux.combineReducers)((0, _assign2.default)({}, reducers, { + routing: _reactRouterRedux.routerReducer, + form: _reduxForm.reducer +})), savedState, _redux.applyMiddleware.apply(undefined, middleware)); + +// Save state in localStorage automatically +store.subscribe(function () { + var state = store.getState(); + if (state) { + (0, _StorageManager.saveState)({ menu: state.menu, settings: state.settings }, VERSION); + if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined') { + (0, _StorageManager.saveToChromeStorage)('settings', state.settings.values || {}); + } + } +}); + +var history = (0, _reactRouterRedux.syncHistoryWithStore)(_reactRouter.hashHistory, store); + +_reactDom2.default.render(_react2.default.createElement( + _reactRedux.Provider, + { store: store }, + _react2.default.createElement( + _reactRouter.Router, + { history: history }, + (0, _routes2.default)(store) + ) +), document.getElementById('app')); + +/***/ }), +/* 336 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(337); +module.exports = __webpack_require__(18).Object.assign; + + +/***/ }), +/* 337 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(28); + +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(338) }); + + +/***/ }), +/* 338 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(64); +var gOPS = __webpack_require__(139); +var pIE = __webpack_require__(101); +var toObject = __webpack_require__(84); +var IObject = __webpack_require__(208); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(63)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; + + +/***/ }), +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(52); +var toLength = __webpack_require__(134); +var toAbsoluteIndex = __webpack_require__(340); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), +/* 340 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(135); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), +/* 341 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var lowPriorityWarning = function () {}; + +if (false) { + var printWarning = function (format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.warn(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarning = function (condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; +} + +module.exports = lowPriorityWarning; + +/***/ }), +/* 342 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var PooledClass = __webpack_require__(343); +var ReactElement = __webpack_require__(66); + +var emptyFunction = __webpack_require__(24); +var traverseAllChildren = __webpack_require__(344); + +var twoArgumentPooler = PooledClass.twoArgumentPooler; +var fourArgumentPooler = PooledClass.fourArgumentPooler; + +var userProvidedKeyEscapeRegex = /\/+/g; +function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); +} + +/** + * PooledClass representing the bookkeeping associated with performing a child + * traversal. Allows avoiding binding callbacks. + * + * @constructor ForEachBookKeeping + * @param {!function} forEachFunction Function to perform traversal with. + * @param {?*} forEachContext Context to perform context with. + */ +function ForEachBookKeeping(forEachFunction, forEachContext) { + this.func = forEachFunction; + this.context = forEachContext; + this.count = 0; +} +ForEachBookKeeping.prototype.destructor = function () { + this.func = null; + this.context = null; + this.count = 0; +}; +PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); + +function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + + func.call(context, child, bookKeeping.count++); +} + +/** + * Iterates through children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ +function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + ForEachBookKeeping.release(traverseContext); +} + +/** + * PooledClass representing the bookkeeping associated with performing a child + * mapping. Allows avoiding binding callbacks. + * + * @constructor MapBookKeeping + * @param {!*} mapResult Object containing the ordered map of results. + * @param {!function} mapFunction Function to perform mapping with. + * @param {?*} mapContext Context to perform mapping with. + */ +function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { + this.result = mapResult; + this.keyPrefix = keyPrefix; + this.func = mapFunction; + this.context = mapContext; + this.count = 0; +} +MapBookKeeping.prototype.destructor = function () { + this.result = null; + this.keyPrefix = null; + this.func = null; + this.context = null; + this.count = 0; +}; +PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); + +function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; + + + var mappedChild = func.call(context, child, bookKeeping.count++); + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); + } else if (mappedChild != null) { + if (ReactElement.isValidElement(mappedChild)) { + mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); + } + result.push(mappedChild); + } +} + +function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + MapBookKeeping.release(traverseContext); +} + +/** + * Maps children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ +function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; +} + +function forEachSingleChildDummy(traverseContext, child, name) { + return null; +} + +/** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ +function countChildren(children, context) { + return traverseAllChildren(children, forEachSingleChildDummy, null); +} + +/** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray + */ +function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); + return result; +} + +var ReactChildren = { + forEach: forEachChildren, + map: mapChildren, + mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, + count: countChildren, + toArray: toArray +}; + +module.exports = ReactChildren; + +/***/ }), +/* 343 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(85); + +var invariant = __webpack_require__(9); + +/** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ +var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; + +var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } +}; + +var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } +}; + +var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } +}; + +var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) ? false ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } +}; + +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; + +/** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ +var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; +}; + +var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler +}; + +module.exports = PooledClass; + +/***/ }), +/* 344 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(85); + +var ReactCurrentOwner = __webpack_require__(37); +var REACT_ELEMENT_TYPE = __webpack_require__(212); + +var getIteratorFn = __webpack_require__(345); +var invariant = __webpack_require__(9); +var KeyEscapeUtils = __webpack_require__(346); +var warning = __webpack_require__(12); + +var SEPARATOR = '.'; +var SUBSEPARATOR = ':'; + +/** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ + +/** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + +var didWarnAboutMaps = false; + +/** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ +function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); +} + +/** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if (children === null || type === 'string' || type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { + callback(traverseContext, children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + if (false) { + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } + } + } else if (type === 'object') { + var addendum = ''; + if (false) { + addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; + if (children._isReactElement) { + addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } + } + } + var childrenString = String(children); + true ? false ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; + } + } + + return subtreeCount; +} + +/** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); +} + +module.exports = traverseAllChildren; + +/***/ }), +/* 345 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/* global Symbol */ + +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + +/** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ +function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } +} + +module.exports = getIteratorFn; + +/***/ }), +/* 346 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + +function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2' + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; +} + +/** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ +function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':' + }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); + + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); +} + +var KeyEscapeUtils = { + escape: escape, + unescape: unescape +}; + +module.exports = KeyEscapeUtils; + +/***/ }), +/* 347 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactElement = __webpack_require__(66); + +/** + * Create a factory that creates HTML tag elements. + * + * @private + */ +var createDOMFactory = ReactElement.createFactory; +if (false) { + var ReactElementValidator = require('./ReactElementValidator'); + createDOMFactory = ReactElementValidator.createFactory; +} + +/** + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. + * + * @public + */ +var ReactDOMFactories = { + a: createDOMFactory('a'), + abbr: createDOMFactory('abbr'), + address: createDOMFactory('address'), + area: createDOMFactory('area'), + article: createDOMFactory('article'), + aside: createDOMFactory('aside'), + audio: createDOMFactory('audio'), + b: createDOMFactory('b'), + base: createDOMFactory('base'), + bdi: createDOMFactory('bdi'), + bdo: createDOMFactory('bdo'), + big: createDOMFactory('big'), + blockquote: createDOMFactory('blockquote'), + body: createDOMFactory('body'), + br: createDOMFactory('br'), + button: createDOMFactory('button'), + canvas: createDOMFactory('canvas'), + caption: createDOMFactory('caption'), + cite: createDOMFactory('cite'), + code: createDOMFactory('code'), + col: createDOMFactory('col'), + colgroup: createDOMFactory('colgroup'), + data: createDOMFactory('data'), + datalist: createDOMFactory('datalist'), + dd: createDOMFactory('dd'), + del: createDOMFactory('del'), + details: createDOMFactory('details'), + dfn: createDOMFactory('dfn'), + dialog: createDOMFactory('dialog'), + div: createDOMFactory('div'), + dl: createDOMFactory('dl'), + dt: createDOMFactory('dt'), + em: createDOMFactory('em'), + embed: createDOMFactory('embed'), + fieldset: createDOMFactory('fieldset'), + figcaption: createDOMFactory('figcaption'), + figure: createDOMFactory('figure'), + footer: createDOMFactory('footer'), + form: createDOMFactory('form'), + h1: createDOMFactory('h1'), + h2: createDOMFactory('h2'), + h3: createDOMFactory('h3'), + h4: createDOMFactory('h4'), + h5: createDOMFactory('h5'), + h6: createDOMFactory('h6'), + head: createDOMFactory('head'), + header: createDOMFactory('header'), + hgroup: createDOMFactory('hgroup'), + hr: createDOMFactory('hr'), + html: createDOMFactory('html'), + i: createDOMFactory('i'), + iframe: createDOMFactory('iframe'), + img: createDOMFactory('img'), + input: createDOMFactory('input'), + ins: createDOMFactory('ins'), + kbd: createDOMFactory('kbd'), + keygen: createDOMFactory('keygen'), + label: createDOMFactory('label'), + legend: createDOMFactory('legend'), + li: createDOMFactory('li'), + link: createDOMFactory('link'), + main: createDOMFactory('main'), + map: createDOMFactory('map'), + mark: createDOMFactory('mark'), + menu: createDOMFactory('menu'), + menuitem: createDOMFactory('menuitem'), + meta: createDOMFactory('meta'), + meter: createDOMFactory('meter'), + nav: createDOMFactory('nav'), + noscript: createDOMFactory('noscript'), + object: createDOMFactory('object'), + ol: createDOMFactory('ol'), + optgroup: createDOMFactory('optgroup'), + option: createDOMFactory('option'), + output: createDOMFactory('output'), + p: createDOMFactory('p'), + param: createDOMFactory('param'), + picture: createDOMFactory('picture'), + pre: createDOMFactory('pre'), + progress: createDOMFactory('progress'), + q: createDOMFactory('q'), + rp: createDOMFactory('rp'), + rt: createDOMFactory('rt'), + ruby: createDOMFactory('ruby'), + s: createDOMFactory('s'), + samp: createDOMFactory('samp'), + script: createDOMFactory('script'), + section: createDOMFactory('section'), + select: createDOMFactory('select'), + small: createDOMFactory('small'), + source: createDOMFactory('source'), + span: createDOMFactory('span'), + strong: createDOMFactory('strong'), + style: createDOMFactory('style'), + sub: createDOMFactory('sub'), + summary: createDOMFactory('summary'), + sup: createDOMFactory('sup'), + table: createDOMFactory('table'), + tbody: createDOMFactory('tbody'), + td: createDOMFactory('td'), + textarea: createDOMFactory('textarea'), + tfoot: createDOMFactory('tfoot'), + th: createDOMFactory('th'), + thead: createDOMFactory('thead'), + time: createDOMFactory('time'), + title: createDOMFactory('title'), + tr: createDOMFactory('tr'), + track: createDOMFactory('track'), + u: createDOMFactory('u'), + ul: createDOMFactory('ul'), + 'var': createDOMFactory('var'), + video: createDOMFactory('video'), + wbr: createDOMFactory('wbr'), + + // SVG + circle: createDOMFactory('circle'), + clipPath: createDOMFactory('clipPath'), + defs: createDOMFactory('defs'), + ellipse: createDOMFactory('ellipse'), + g: createDOMFactory('g'), + image: createDOMFactory('image'), + line: createDOMFactory('line'), + linearGradient: createDOMFactory('linearGradient'), + mask: createDOMFactory('mask'), + path: createDOMFactory('path'), + pattern: createDOMFactory('pattern'), + polygon: createDOMFactory('polygon'), + polyline: createDOMFactory('polyline'), + radialGradient: createDOMFactory('radialGradient'), + rect: createDOMFactory('rect'), + stop: createDOMFactory('stop'), + svg: createDOMFactory('svg'), + text: createDOMFactory('text'), + tspan: createDOMFactory('tspan') +}; + +module.exports = ReactDOMFactories; + +/***/ }), +/* 348 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _require = __webpack_require__(66), + isValidElement = _require.isValidElement; + +var factory = __webpack_require__(213); + +module.exports = factory(isValidElement); + +/***/ }), +/* 349 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +var emptyFunction = __webpack_require__(24); +var invariant = __webpack_require__(9); +var warning = __webpack_require__(12); + +var ReactPropTypesSecret = __webpack_require__(214); +var checkPropTypes = __webpack_require__(350); + +module.exports = function(isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (false) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + } else if (false) { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', + propFullName, + componentName + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); + } + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + false ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + false ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } + + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (typeof checker !== 'function') { + warning( + false, + 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + + 'received %s at index %s.', + getPostfixForTypeWarning(checker), + i + ); + return emptyFunction.thatReturnsNull; + } + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { + return null; + } + } + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + default: + return type; + } + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + + +/***/ }), +/* 350 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +if (false) { + var invariant = require('fbjs/lib/invariant'); + var warning = require('fbjs/lib/warning'); + var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret'); + var loggedTypeFailures = {}; +} + +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ +function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (false) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + } + } + } + } +} + +module.exports = checkPropTypes; + + +/***/ }), +/* 351 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +module.exports = '15.6.1'; + +/***/ }), +/* 352 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _require = __webpack_require__(209), + Component = _require.Component; + +var _require2 = __webpack_require__(66), + isValidElement = _require2.isValidElement; + +var ReactNoopUpdateQueue = __webpack_require__(210); +var factory = __webpack_require__(215); + +module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue); + +/***/ }), +/* 353 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + +var _prodInvariant = __webpack_require__(85); + +var ReactElement = __webpack_require__(66); + +var invariant = __webpack_require__(9); + +/** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. + */ +function onlyChild(children) { + !ReactElement.isValidElement(children) ? false ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0; + return children; +} + +module.exports = onlyChild; + +/***/ }), +/* 354 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ + + + +var ReactDOMComponentTree = __webpack_require__(16); +var ReactDefaultInjection = __webpack_require__(355); +var ReactMount = __webpack_require__(239); +var ReactReconciler = __webpack_require__(70); +var ReactUpdates = __webpack_require__(31); +var ReactVersion = __webpack_require__(427); + +var findDOMNode = __webpack_require__(428); +var getHostComponentFromComposite = __webpack_require__(240); +var renderSubtreeIntoContainer = __webpack_require__(429); +var warning = __webpack_require__(12); + +ReactDefaultInjection.inject(); + +var ReactDOM = { + findDOMNode: findDOMNode, + render: ReactMount.render, + unmountComponentAtNode: ReactMount.unmountComponentAtNode, + version: ReactVersion, + + /* eslint-disable camelcase */ + unstable_batchedUpdates: ReactUpdates.batchedUpdates, + unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer + /* eslint-enable camelcase */ +}; + +// Inject the runtime into a devtools global hook regardless of browser. +// Allows for debugging when the hook is injected on the page. +if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { + __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ + ComponentTree: { + getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode, + getNodeFromInstance: function (inst) { + // inst is an internal instance (but could be a composite) + if (inst._renderedComponent) { + inst = getHostComponentFromComposite(inst); + } + if (inst) { + return ReactDOMComponentTree.getNodeFromInstance(inst); + } else { + return null; + } + } + }, + Mount: ReactMount, + Reconciler: ReactReconciler + }); +} + +if (false) { + var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment'); + if (ExecutionEnvironment.canUseDOM && window.top === window.self) { + // First check if devtools is not installed + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + // If we're in Chrome or Firefox, provide a download link if not installed. + if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) { + // Firefox does not have the issue with devtools loaded over file:// + var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1; + console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools'); + } + } + + var testFunc = function testFn() {}; + process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, "It looks like you're using a minified copy of the development build " + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0; + + // If we're in IE8, check to see if we are in compatibility mode and provide + // information on preventing compatibility mode + var ieCompatibilityMode = document.documentMode && document.documentMode < 8; + + process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0; + + var expectedFeatures = [ + // shims + Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim]; + + for (var i = 0; i < expectedFeatures.length; i++) { + if (!expectedFeatures[i]) { + process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0; + break; + } + } + } +} + +if (false) { + var ReactInstrumentation = require('./ReactInstrumentation'); + var ReactDOMUnknownPropertyHook = require('./ReactDOMUnknownPropertyHook'); + var ReactDOMNullInputValuePropHook = require('./ReactDOMNullInputValuePropHook'); + var ReactDOMInvalidARIAHook = require('./ReactDOMInvalidARIAHook'); + + ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook); + ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook); + ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook); +} + +module.exports = ReactDOM; + +/***/ }), +/* 355 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ARIADOMPropertyConfig = __webpack_require__(356); +var BeforeInputEventPlugin = __webpack_require__(357); +var ChangeEventPlugin = __webpack_require__(361); +var DefaultEventPluginOrder = __webpack_require__(364); +var EnterLeaveEventPlugin = __webpack_require__(365); +var HTMLDOMPropertyConfig = __webpack_require__(366); +var ReactComponentBrowserEnvironment = __webpack_require__(367); +var ReactDOMComponent = __webpack_require__(373); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactDOMEmptyComponent = __webpack_require__(398); +var ReactDOMTreeTraversal = __webpack_require__(399); +var ReactDOMTextComponent = __webpack_require__(400); +var ReactDefaultBatchingStrategy = __webpack_require__(401); +var ReactEventListener = __webpack_require__(402); +var ReactInjection = __webpack_require__(404); +var ReactReconcileTransaction = __webpack_require__(405); +var SVGDOMPropertyConfig = __webpack_require__(411); +var SelectEventPlugin = __webpack_require__(412); +var SimpleEventPlugin = __webpack_require__(413); + +var alreadyInjected = false; + +function inject() { + if (alreadyInjected) { + // TODO: This is currently true because these injections are shared between + // the client and the server package. They should be built independently + // and not share any injection state. Then this problem will be solved. + return; + } + alreadyInjected = true; + + ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); + + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); + ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree); + ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal); + + /** + * Some important event plugins included by default (without having to require + * them). + */ + ReactInjection.EventPluginHub.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin + }); + + ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent); + + ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent); + + ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); + + ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) { + return new ReactDOMEmptyComponent(instantiate); + }); + + ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); + ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); + + ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); +} + +module.exports = { + inject: inject +}; + +/***/ }), +/* 356 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ARIADOMPropertyConfig = { + Properties: { + // Global States and Properties + 'aria-current': 0, // state + 'aria-details': 0, + 'aria-disabled': 0, // state + 'aria-hidden': 0, // state + 'aria-invalid': 0, // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0 + }, + DOMAttributeNames: {}, + DOMPropertyNames: {} +}; + +module.exports = ARIADOMPropertyConfig; + +/***/ }), +/* 357 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPropagators = __webpack_require__(68); +var ExecutionEnvironment = __webpack_require__(21); +var FallbackCompositionState = __webpack_require__(358); +var SyntheticCompositionEvent = __webpack_require__(359); +var SyntheticInputEvent = __webpack_require__(360); + +var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space +var START_KEYCODE = 229; + +var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; + +var documentMode = null; +if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; +} + +// Webkit offers a very useful `textInput` event that can be used to +// directly represent `beforeInput`. The IE `textinput` event is not as +// useful, so we don't use it. +var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); + +// In IE9+, we have access to composition events, but the data supplied +// by the native compositionend event may be incorrect. Japanese ideographic +// spaces, for instance (\u3000) are not recorded correctly. +var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); + +/** + * Opera <= 12 includes TextEvent in window, but does not fire + * text input events. Rely on keypress instead. + */ +function isPresto() { + var opera = window.opera; + return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12; +} + +var SPACEBAR_CODE = 32; +var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); + +// Events and their corresponding property names. +var eventTypes = { + beforeInput: { + phasedRegistrationNames: { + bubbled: 'onBeforeInput', + captured: 'onBeforeInputCapture' + }, + dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste'] + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: 'onCompositionEnd', + captured: 'onCompositionEndCapture' + }, + dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: 'onCompositionStart', + captured: 'onCompositionStartCapture' + }, + dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: 'onCompositionUpdate', + captured: 'onCompositionUpdateCapture' + }, + dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + } +}; + +// Track whether we've ever handled a keypress on the space key. +var hasSpaceKeypress = false; + +/** + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. + */ +function isKeypressCommand(nativeEvent) { + return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && + // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey); +} + +/** + * Translate native top level events into event types. + * + * @param {string} topLevelType + * @return {object} + */ +function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case 'topCompositionStart': + return eventTypes.compositionStart; + case 'topCompositionEnd': + return eventTypes.compositionEnd; + case 'topCompositionUpdate': + return eventTypes.compositionUpdate; + } +} + +/** + * Does our fallback best-guess model think this event signifies that + * composition has begun? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ +function isFallbackCompositionStart(topLevelType, nativeEvent) { + return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; +} + +/** + * Does our fallback mode think that this event is the end of composition? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ +function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case 'topKeyUp': + // Command keys insert or clear IME input. + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; + case 'topKeyDown': + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return nativeEvent.keyCode !== START_KEYCODE; + case 'topKeyPress': + case 'topMouseDown': + case 'topBlur': + // Events are not possible without cancelling IME. + return true; + default: + return false; + } +} + +/** + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. + * + * @param {object} nativeEvent + * @return {?string} + */ +function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; + } + return null; +} + +// Track the current IME composition fallback object, if any. +var currentComposition = null; + +/** + * @return {?object} A SyntheticCompositionEvent. + */ +function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var eventType; + var fallbackData; + + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!currentComposition) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionStart; + } + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionEnd; + } + + if (!eventType) { + return null; + } + + if (useFallbackCompositionData) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!currentComposition && eventType === eventTypes.compositionStart) { + currentComposition = FallbackCompositionState.getPooled(nativeEventTarget); + } else if (eventType === eventTypes.compositionEnd) { + if (currentComposition) { + fallbackData = currentComposition.getData(); + } + } + } + + var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget); + + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + if (customData !== null) { + event.data = customData; + } + } + + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; +} + +/** + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. + */ +function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case 'topCompositionEnd': + return getDataFromCustomEvent(nativeEvent); + case 'topKeyPress': + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + if (which !== SPACEBAR_CODE) { + return null; + } + + hasSpaceKeypress = true; + return SPACEBAR_CHAR; + + case 'topTextInput': + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; + + // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to blacklist it. + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } + + return chars; + + default: + // For other native event types, do nothing. + return null; + } +} + +/** + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. + */ +function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + // If composition event is available, we extract a string only at + // compositionevent, otherwise extract it at fallback events. + if (currentComposition) { + if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { + var chars = currentComposition.getData(); + FallbackCompositionState.release(currentComposition); + currentComposition = null; + return chars; + } + return null; + } + + switch (topLevelType) { + case 'topPaste': + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + case 'topKeyPress': + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { + return String.fromCharCode(nativeEvent.which); + } + return null; + case 'topCompositionEnd': + return useFallbackCompositionData ? null : nativeEvent.data; + default: + return null; + } +} + +/** + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. + * + * @return {?object} A SyntheticInputEvent. + */ +function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var chars; + + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); + } + + // If no characters are being inserted, no BeforeInput event should + // be fired. + if (!chars) { + return null; + } + + var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget); + + event.data = chars; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; +} + +/** + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. + * + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. + */ +var BeforeInputEventPlugin = { + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)]; + } +}; + +module.exports = BeforeInputEventPlugin; + +/***/ }), +/* 358 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var PooledClass = __webpack_require__(53); + +var getTextContentAccessor = __webpack_require__(219); + +/** + * This helper class stores information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * @param {DOMEventTarget} root + */ +function FallbackCompositionState(root) { + this._root = root; + this._startText = this.getText(); + this._fallbackText = null; +} + +_assign(FallbackCompositionState.prototype, { + destructor: function () { + this._root = null; + this._startText = null; + this._fallbackText = null; + }, + + /** + * Get current text of input. + * + * @return {string} + */ + getText: function () { + if ('value' in this._root) { + return this._root.value; + } + return this._root[getTextContentAccessor()]; + }, + + /** + * Determine the differing substring between the initially stored + * text content and the current content. + * + * @return {string} + */ + getData: function () { + if (this._fallbackText) { + return this._fallbackText; + } + + var start; + var startValue = this._startText; + var startLength = startValue.length; + var end; + var endValue = this.getText(); + var endLength = endValue.length; + + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } + } + + var minEnd = startLength - start; + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } + + var sliceTail = end > 1 ? 1 - end : undefined; + this._fallbackText = endValue.slice(start, sliceTail); + return this._fallbackText; + } +}); + +PooledClass.addPoolingTo(FallbackCompositionState); + +module.exports = FallbackCompositionState; + +/***/ }), +/* 359 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(38); + +/** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ +var CompositionEventInterface = { + data: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface); + +module.exports = SyntheticCompositionEvent; + +/***/ }), +/* 360 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(38); + +/** + * @interface Event + * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 + * /#events-inputevents + */ +var InputEventInterface = { + data: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface); + +module.exports = SyntheticInputEvent; + +/***/ }), +/* 361 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPluginHub = __webpack_require__(69); +var EventPropagators = __webpack_require__(68); +var ExecutionEnvironment = __webpack_require__(21); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactUpdates = __webpack_require__(31); +var SyntheticEvent = __webpack_require__(38); + +var inputValueTracking = __webpack_require__(222); +var getEventTarget = __webpack_require__(142); +var isEventSupported = __webpack_require__(143); +var isTextInputElement = __webpack_require__(223); + +var eventTypes = { + change: { + phasedRegistrationNames: { + bubbled: 'onChange', + captured: 'onChangeCapture' + }, + dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange'] + } +}; + +function createAndAccumulateChangeEvent(inst, nativeEvent, target) { + var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target); + event.type = 'change'; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; +} +/** + * For IE shims + */ +var activeElement = null; +var activeElementInst = null; + +/** + * SECTION: handle `change` event + */ +function shouldUseChangeEvent(elem) { + var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; +} + +var doesChangeEventBubble = false; +if (ExecutionEnvironment.canUseDOM) { + // See `handleChange` comment below + doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8); +} + +function manualDispatchChangeEvent(nativeEvent) { + var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); + + // If change and propertychange bubbled, we'd just bind to it like all the + // other events and have it go through ReactBrowserEventEmitter. Since it + // doesn't, we manually listen for the events and so we have to enqueue and + // process the abstract event manually. + // + // Batching is necessary here in order to ensure that all event handlers run + // before the next rerender (including event handlers attached to ancestor + // elements instead of directly on the input). Without this, controlled + // components don't work properly in conjunction with event bubbling because + // the component is rerendered and the value reverted before all the event + // handlers can run. See https://github.com/facebook/react/issues/708. + ReactUpdates.batchedUpdates(runEventInBatch, event); +} + +function runEventInBatch(event) { + EventPluginHub.enqueueEvents(event); + EventPluginHub.processEventQueue(false); +} + +function startWatchingForChangeEventIE8(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElement.attachEvent('onchange', manualDispatchChangeEvent); +} + +function stopWatchingForChangeEventIE8() { + if (!activeElement) { + return; + } + activeElement.detachEvent('onchange', manualDispatchChangeEvent); + activeElement = null; + activeElementInst = null; +} + +function getInstIfValueChanged(targetInst, nativeEvent) { + var updated = inputValueTracking.updateValueIfChanged(targetInst); + var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough; + + if (updated || simulated) { + return targetInst; + } +} + +function getTargetInstForChangeEvent(topLevelType, targetInst) { + if (topLevelType === 'topChange') { + return targetInst; + } +} + +function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { + if (topLevelType === 'topFocus') { + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForChangeEventIE8(); + startWatchingForChangeEventIE8(target, targetInst); + } else if (topLevelType === 'topBlur') { + stopWatchingForChangeEventIE8(); + } +} + +/** + * SECTION: handle `input` event + */ +var isInputEventSupported = false; +if (ExecutionEnvironment.canUseDOM) { + // IE9 claims to support the input event but fails to trigger it when + // deleting text, so we ignore its input events. + + isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 9); +} + +/** + * (For IE <=9) Starts tracking propertychange events on the passed-in element + * and override the value property so that we can distinguish user events from + * value changes in JS. + */ +function startWatchingForValueChange(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElement.attachEvent('onpropertychange', handlePropertyChange); +} + +/** + * (For IE <=9) Removes the event listeners from the currently-tracked element, + * if any exists. + */ +function stopWatchingForValueChange() { + if (!activeElement) { + return; + } + activeElement.detachEvent('onpropertychange', handlePropertyChange); + + activeElement = null; + activeElementInst = null; +} + +/** + * (For IE <=9) Handles a propertychange event, sending a `change` event if + * the value of the active element has changed. + */ +function handlePropertyChange(nativeEvent) { + if (nativeEvent.propertyName !== 'value') { + return; + } + if (getInstIfValueChanged(activeElementInst, nativeEvent)) { + manualDispatchChangeEvent(nativeEvent); + } +} + +function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { + if (topLevelType === 'topFocus') { + // In IE8, we can capture almost all .value changes by adding a + // propertychange handler and looking for events with propertyName + // equal to 'value' + // In IE9, propertychange fires for most input events but is buggy and + // doesn't fire when text is deleted, but conveniently, selectionchange + // appears to fire in all of the remaining cases so we catch those and + // forward the event if the value has changed + // In either case, we don't want to call the event handler if the value + // is changed from JS so we redefine a setter for `.value` that updates + // our activeElementValue variable, allowing us to ignore those changes + // + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForValueChange(); + startWatchingForValueChange(target, targetInst); + } else if (topLevelType === 'topBlur') { + stopWatchingForValueChange(); + } +} + +// For IE8 and IE9. +function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) { + if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { + // On the selectionchange event, the target is just document which isn't + // helpful for us so just check activeElement instead. + // + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire + // propertychange on the first input event after setting `value` from a + // script and fires only keydown, keypress, keyup. Catching keyup usually + // gets it and catching keydown lets us fire an event for the first + // keystroke if user does a key repeat (it'll be a little delayed: right + // before the second keystroke). Other input methods (e.g., paste) seem to + // fire selectionchange normally. + return getInstIfValueChanged(activeElementInst, nativeEvent); + } +} + +/** + * SECTION: handle `click` event + */ +function shouldUseClickEvent(elem) { + // Use the `click` event to detect changes to checkbox and radio inputs. + // This approach works across all browsers, whereas `change` does not fire + // until `blur` in IE8. + var nodeName = elem.nodeName; + return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); +} + +function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) { + if (topLevelType === 'topClick') { + return getInstIfValueChanged(targetInst, nativeEvent); + } +} + +function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) { + if (topLevelType === 'topInput' || topLevelType === 'topChange') { + return getInstIfValueChanged(targetInst, nativeEvent); + } +} + +function handleControlledInputBlur(inst, node) { + // TODO: In IE, inst is occasionally null. Why? + if (inst == null) { + return; + } + + // Fiber and ReactDOM keep wrapper state in separate places + var state = inst._wrapperState || node._wrapperState; + + if (!state || !state.controlled || node.type !== 'number') { + return; + } + + // If controlled, assign the value attribute to the current value on blur + var value = '' + node.value; + if (node.getAttribute('value') !== value) { + node.setAttribute('value', value); + } +} + +/** + * This plugin creates an `onChange` event that normalizes change events + * across form elements. This event fires at a time when it's possible to + * change the element's value without seeing a flicker. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - select + */ +var ChangeEventPlugin = { + eventTypes: eventTypes, + + _allowSimulatedPassThrough: true, + _isInputEventSupported: isInputEventSupported, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + + var getTargetInstFunc, handleEventFunc; + if (shouldUseChangeEvent(targetNode)) { + if (doesChangeEventBubble) { + getTargetInstFunc = getTargetInstForChangeEvent; + } else { + handleEventFunc = handleEventsForChangeEventIE8; + } + } else if (isTextInputElement(targetNode)) { + if (isInputEventSupported) { + getTargetInstFunc = getTargetInstForInputOrChangeEvent; + } else { + getTargetInstFunc = getTargetInstForInputEventPolyfill; + handleEventFunc = handleEventsForInputEventPolyfill; + } + } else if (shouldUseClickEvent(targetNode)) { + getTargetInstFunc = getTargetInstForClickEvent; + } + + if (getTargetInstFunc) { + var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent); + if (inst) { + var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget); + return event; + } + } + + if (handleEventFunc) { + handleEventFunc(topLevelType, targetNode, targetInst); + } + + // When blurring, set the value attribute for number inputs + if (topLevelType === 'topBlur') { + handleControlledInputBlur(targetInst, targetNode); + } + } +}; + +module.exports = ChangeEventPlugin; + +/***/ }), +/* 362 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactOwner = __webpack_require__(363); + +var ReactRef = {}; + +function attachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(component.getPublicInstance()); + } else { + // Legacy ref + ReactOwner.addComponentAsRefTo(component, ref, owner); + } +} + +function detachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(null); + } else { + // Legacy ref + ReactOwner.removeComponentAsRefFrom(component, ref, owner); + } +} + +ReactRef.attachRefs = function (instance, element) { + if (element === null || typeof element !== 'object') { + return; + } + var ref = element.ref; + if (ref != null) { + attachRef(ref, instance, element._owner); + } +}; + +ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { + // If either the owner or a `ref` has changed, make sure the newest owner + // has stored a reference to `this`, and the previous owner (if different) + // has forgotten the reference to `this`. We use the element instead + // of the public this.props because the post processing cannot determine + // a ref. The ref conceptually lives on the element. + + // TODO: Should this even be possible? The owner cannot change because + // it's forbidden by shouldUpdateReactComponent. The ref can change + // if you swap the keys of but not the refs. Reconsider where this check + // is made. It probably belongs where the key checking and + // instantiateReactComponent is done. + + var prevRef = null; + var prevOwner = null; + if (prevElement !== null && typeof prevElement === 'object') { + prevRef = prevElement.ref; + prevOwner = prevElement._owner; + } + + var nextRef = null; + var nextOwner = null; + if (nextElement !== null && typeof nextElement === 'object') { + nextRef = nextElement.ref; + nextOwner = nextElement._owner; + } + + return prevRef !== nextRef || + // If owner changes but we have an unchanged function ref, don't update refs + typeof nextRef === 'string' && nextOwner !== prevOwner; +}; + +ReactRef.detachRefs = function (instance, element) { + if (element === null || typeof element !== 'object') { + return; + } + var ref = element.ref; + if (ref != null) { + detachRef(ref, instance, element._owner); + } +}; + +module.exports = ReactRef; + +/***/ }), +/* 363 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(9); + +/** + * @param {?object} object + * @return {boolean} True if `object` is a valid owner. + * @final + */ +function isValidOwner(object) { + return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); +} + +/** + * ReactOwners are capable of storing references to owned components. + * + * All components are capable of //being// referenced by owner components, but + * only ReactOwner components are capable of //referencing// owned components. + * The named reference is known as a "ref". + * + * Refs are available when mounted and updated during reconciliation. + * + * var MyComponent = React.createClass({ + * render: function() { + * return ( + * <div onClick={this.handleClick}> + * <CustomComponent ref="custom" /> + * </div> + * ); + * }, + * handleClick: function() { + * this.refs.custom.handleClick(); + * }, + * componentDidMount: function() { + * this.refs.custom.initialize(); + * } + * }); + * + * Refs should rarely be used. When refs are used, they should only be done to + * control data that is not handled by React's data flow. + * + * @class ReactOwner + */ +var ReactOwner = { + /** + * Adds a component by ref to an owner component. + * + * @param {ReactComponent} component Component to reference. + * @param {string} ref Name by which to refer to the component. + * @param {ReactOwner} owner Component on which to record the ref. + * @final + * @internal + */ + addComponentAsRefTo: function (component, ref, owner) { + !isValidOwner(owner) ? false ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0; + owner.attachRef(ref, component); + }, + + /** + * Removes a component by ref from an owner component. + * + * @param {ReactComponent} component Component to dereference. + * @param {string} ref Name of the ref to remove. + * @param {ReactOwner} owner Component on which the ref is recorded. + * @final + * @internal + */ + removeComponentAsRefFrom: function (component, ref, owner) { + !isValidOwner(owner) ? false ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0; + var ownerPublicInstance = owner.getPublicInstance(); + // Check that `component`'s owner is still alive and that `component` is still the current ref + // because we do not want to detach the ref if another component stole it. + if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) { + owner.detachRef(ref); + } + } +}; + +module.exports = ReactOwner; + +/***/ }), +/* 364 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ + +var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; + +module.exports = DefaultEventPluginOrder; + +/***/ }), +/* 365 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPropagators = __webpack_require__(68); +var ReactDOMComponentTree = __webpack_require__(16); +var SyntheticMouseEvent = __webpack_require__(105); + +var eventTypes = { + mouseEnter: { + registrationName: 'onMouseEnter', + dependencies: ['topMouseOut', 'topMouseOver'] + }, + mouseLeave: { + registrationName: 'onMouseLeave', + dependencies: ['topMouseOut', 'topMouseOver'] + } +}; + +var EnterLeaveEventPlugin = { + eventTypes: eventTypes, + + /** + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. + */ + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { + return null; + } + if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { + // Must not be a mouse in or mouse out - ignoring. + return null; + } + + var win; + if (nativeEventTarget.window === nativeEventTarget) { + // `nativeEventTarget` is probably a window object. + win = nativeEventTarget; + } else { + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = nativeEventTarget.ownerDocument; + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; + } + } + + var from; + var to; + if (topLevelType === 'topMouseOut') { + from = targetInst; + var related = nativeEvent.relatedTarget || nativeEvent.toElement; + to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; + } else { + // Moving to a node from outside the window. + from = null; + to = targetInst; + } + + if (from === to) { + // Nothing pertains to our managed components. + return null; + } + + var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from); + var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to); + + var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget); + leave.type = 'mouseleave'; + leave.target = fromNode; + leave.relatedTarget = toNode; + + var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget); + enter.type = 'mouseenter'; + enter.target = toNode; + enter.relatedTarget = fromNode; + + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to); + + return [leave, enter]; + } +}; + +module.exports = EnterLeaveEventPlugin; + +/***/ }), +/* 366 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMProperty = __webpack_require__(67); + +var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; +var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; +var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; +var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; +var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; + +var HTMLDOMPropertyConfig = { + isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')), + Properties: { + /** + * Standard Properties + */ + accept: 0, + acceptCharset: 0, + accessKey: 0, + action: 0, + allowFullScreen: HAS_BOOLEAN_VALUE, + allowTransparency: 0, + alt: 0, + // specifies target context for links with `preload` type + as: 0, + async: HAS_BOOLEAN_VALUE, + autoComplete: 0, + // autoFocus is polyfilled/normalized by AutoFocusUtils + // autoFocus: HAS_BOOLEAN_VALUE, + autoPlay: HAS_BOOLEAN_VALUE, + capture: HAS_BOOLEAN_VALUE, + cellPadding: 0, + cellSpacing: 0, + charSet: 0, + challenge: 0, + checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + cite: 0, + classID: 0, + className: 0, + cols: HAS_POSITIVE_NUMERIC_VALUE, + colSpan: 0, + content: 0, + contentEditable: 0, + contextMenu: 0, + controls: HAS_BOOLEAN_VALUE, + coords: 0, + crossOrigin: 0, + data: 0, // For `<object />` acts as `src`. + dateTime: 0, + 'default': HAS_BOOLEAN_VALUE, + defer: HAS_BOOLEAN_VALUE, + dir: 0, + disabled: HAS_BOOLEAN_VALUE, + download: HAS_OVERLOADED_BOOLEAN_VALUE, + draggable: 0, + encType: 0, + form: 0, + formAction: 0, + formEncType: 0, + formMethod: 0, + formNoValidate: HAS_BOOLEAN_VALUE, + formTarget: 0, + frameBorder: 0, + headers: 0, + height: 0, + hidden: HAS_BOOLEAN_VALUE, + high: 0, + href: 0, + hrefLang: 0, + htmlFor: 0, + httpEquiv: 0, + icon: 0, + id: 0, + inputMode: 0, + integrity: 0, + is: 0, + keyParams: 0, + keyType: 0, + kind: 0, + label: 0, + lang: 0, + list: 0, + loop: HAS_BOOLEAN_VALUE, + low: 0, + manifest: 0, + marginHeight: 0, + marginWidth: 0, + max: 0, + maxLength: 0, + media: 0, + mediaGroup: 0, + method: 0, + min: 0, + minLength: 0, + // Caution; `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. + multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + name: 0, + nonce: 0, + noValidate: HAS_BOOLEAN_VALUE, + open: HAS_BOOLEAN_VALUE, + optimum: 0, + pattern: 0, + placeholder: 0, + playsInline: HAS_BOOLEAN_VALUE, + poster: 0, + preload: 0, + profile: 0, + radioGroup: 0, + readOnly: HAS_BOOLEAN_VALUE, + referrerPolicy: 0, + rel: 0, + required: HAS_BOOLEAN_VALUE, + reversed: HAS_BOOLEAN_VALUE, + role: 0, + rows: HAS_POSITIVE_NUMERIC_VALUE, + rowSpan: HAS_NUMERIC_VALUE, + sandbox: 0, + scope: 0, + scoped: HAS_BOOLEAN_VALUE, + scrolling: 0, + seamless: HAS_BOOLEAN_VALUE, + selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + shape: 0, + size: HAS_POSITIVE_NUMERIC_VALUE, + sizes: 0, + span: HAS_POSITIVE_NUMERIC_VALUE, + spellCheck: 0, + src: 0, + srcDoc: 0, + srcLang: 0, + srcSet: 0, + start: HAS_NUMERIC_VALUE, + step: 0, + style: 0, + summary: 0, + tabIndex: 0, + target: 0, + title: 0, + // Setting .type throws on non-<input> tags + type: 0, + useMap: 0, + value: 0, + width: 0, + wmode: 0, + wrap: 0, + + /** + * RDFa Properties + */ + about: 0, + datatype: 0, + inlist: 0, + prefix: 0, + // property is also supported for OpenGraph in meta tags. + property: 0, + resource: 0, + 'typeof': 0, + vocab: 0, + + /** + * Non-standard Properties + */ + // autoCapitalize and autoCorrect are supported in Mobile Safari for + // keyboard hints. + autoCapitalize: 0, + autoCorrect: 0, + // autoSave allows WebKit/Blink to persist values of input fields on page reloads + autoSave: 0, + // color is for Safari mask-icon link + color: 0, + // itemProp, itemScope, itemType are for + // Microdata support. See http://schema.org/docs/gs.html + itemProp: 0, + itemScope: HAS_BOOLEAN_VALUE, + itemType: 0, + // itemID and itemRef are for Microdata support as well but + // only specified in the WHATWG spec document. See + // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api + itemID: 0, + itemRef: 0, + // results show looking glass icon and recent searches on input + // search fields in WebKit/Blink + results: 0, + // IE-only attribute that specifies security restrictions on an iframe + // as an alternative to the sandbox attribute on IE<10 + security: 0, + // IE-only attribute that controls focus behavior + unselectable: 0 + }, + DOMAttributeNames: { + acceptCharset: 'accept-charset', + className: 'class', + htmlFor: 'for', + httpEquiv: 'http-equiv' + }, + DOMPropertyNames: {}, + DOMMutationMethods: { + value: function (node, value) { + if (value == null) { + return node.removeAttribute('value'); + } + + // Number inputs get special treatment due to some edge cases in + // Chrome. Let everything else assign the value attribute as normal. + // https://github.com/facebook/react/issues/7253#issuecomment-236074326 + if (node.type !== 'number' || node.hasAttribute('value') === false) { + node.setAttribute('value', '' + value); + } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) { + // Don't assign an attribute if validation reports bad + // input. Chrome will clear the value. Additionally, don't + // operate on inputs that have focus, otherwise Chrome might + // strip off trailing decimal places and cause the user's + // cursor position to jump to the beginning of the input. + // + // In ReactDOMInput, we have an onBlur event that will trigger + // this function again when focus is lost. + node.setAttribute('value', '' + value); + } + } + } +}; + +module.exports = HTMLDOMPropertyConfig; + +/***/ }), +/* 367 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMChildrenOperations = __webpack_require__(146); +var ReactDOMIDOperations = __webpack_require__(372); + +/** + * Abstracts away all functionality of the reconciler that requires knowledge of + * the browser context. TODO: These callers should be refactored to avoid the + * need for this injection. + */ +var ReactComponentBrowserEnvironment = { + processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, + + replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup +}; + +module.exports = ReactComponentBrowserEnvironment; + +/***/ }), +/* 368 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var DOMLazyTree = __webpack_require__(72); +var ExecutionEnvironment = __webpack_require__(21); + +var createNodesFromMarkup = __webpack_require__(369); +var emptyFunction = __webpack_require__(24); +var invariant = __webpack_require__(9); + +var Danger = { + /** + * Replaces a node with a string of markup at its current position within its + * parent. The markup must render into a single root node. + * + * @param {DOMElement} oldChild Child node to replace. + * @param {string} markup Markup to render in place of the child node. + * @internal + */ + dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) { + !ExecutionEnvironment.canUseDOM ? false ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0; + !markup ? false ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0; + !(oldChild.nodeName !== 'HTML') ? false ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0; + + if (typeof markup === 'string') { + var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; + oldChild.parentNode.replaceChild(newChild, oldChild); + } else { + DOMLazyTree.replaceChildWithTree(oldChild, markup); + } + } +}; + +module.exports = Danger; + +/***/ }), +/* 369 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +/*eslint-disable fb-www/unsafe-html*/ + +var ExecutionEnvironment = __webpack_require__(21); + +var createArrayFromMixed = __webpack_require__(370); +var getMarkupWrap = __webpack_require__(371); +var invariant = __webpack_require__(9); + +/** + * Dummy container used to render all markup. + */ +var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Pattern used by `getNodeName`. + */ +var nodeNamePattern = /^\s*<(\w+)/; + +/** + * Extracts the `nodeName` of the first element in a string of markup. + * + * @param {string} markup String of markup. + * @return {?string} Node name of the supplied markup. + */ +function getNodeName(markup) { + var nodeNameMatch = markup.match(nodeNamePattern); + return nodeNameMatch && nodeNameMatch[1].toLowerCase(); +} + +/** + * Creates an array containing the nodes rendered from the supplied markup. The + * optionally supplied `handleScript` function will be invoked once for each + * <script> element that is rendered. If no `handleScript` function is supplied, + * an exception is thrown if any <script> elements are rendered. + * + * @param {string} markup A string of valid HTML markup. + * @param {?function} handleScript Invoked once for each rendered <script>. + * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. + */ +function createNodesFromMarkup(markup, handleScript) { + var node = dummyNode; + !!!dummyNode ? false ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0; + var nodeName = getNodeName(markup); + + var wrap = nodeName && getMarkupWrap(nodeName); + if (wrap) { + node.innerHTML = wrap[1] + markup + wrap[2]; + + var wrapDepth = wrap[0]; + while (wrapDepth--) { + node = node.lastChild; + } + } else { + node.innerHTML = markup; + } + + var scripts = node.getElementsByTagName('script'); + if (scripts.length) { + !handleScript ? false ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0; + createArrayFromMixed(scripts).forEach(handleScript); + } + + var nodes = Array.from(node.childNodes); + while (node.lastChild) { + node.removeChild(node.lastChild); + } + return nodes; +} + +module.exports = createNodesFromMarkup; + +/***/ }), +/* 370 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var invariant = __webpack_require__(9); + +/** + * Convert array-like objects to arrays. + * + * This API assumes the caller knows the contents of the data type. For less + * well defined inputs use createArrayFromMixed. + * + * @param {object|function|filelist} obj + * @return {array} + */ +function toArray(obj) { + var length = obj.length; + + // Some browsers builtin objects can report typeof 'function' (e.g. NodeList + // in old versions of Safari). + !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? false ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0; + + !(typeof length === 'number') ? false ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0; + + !(length === 0 || length - 1 in obj) ? false ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0; + + !(typeof obj.callee !== 'function') ? false ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0; + + // Old IE doesn't give collections access to hasOwnProperty. Assume inputs + // without method will throw during the slice call and skip straight to the + // fallback. + if (obj.hasOwnProperty) { + try { + return Array.prototype.slice.call(obj); + } catch (e) { + // IE < 9 does not support Array#slice on collections objects + } + } + + // Fall back to copying key by key. This assumes all keys have a value, + // so will not preserve sparsely populated inputs. + var ret = Array(length); + for (var ii = 0; ii < length; ii++) { + ret[ii] = obj[ii]; + } + return ret; +} + +/** + * Perform a heuristic test to determine if an object is "array-like". + * + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." + * + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} + */ +function hasArrayNature(obj) { + return ( + // not null/false + !!obj && ( + // arrays are objects, NodeLists are functions in Safari + typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + 'length' in obj && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + typeof obj.nodeType != 'number' && ( + // a real array + Array.isArray(obj) || + // arguments + 'callee' in obj || + // HTMLCollection/NodeList + 'item' in obj) + ); +} + +/** + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. + * + * This is mostly useful idiomatically: + * + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} + */ +function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + return toArray(obj); + } +} + +module.exports = createArrayFromMixed; + +/***/ }), +/* 371 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/*eslint-disable fb-www/unsafe-html */ + +var ExecutionEnvironment = __webpack_require__(21); + +var invariant = __webpack_require__(9); + +/** + * Dummy container used to detect which wraps are necessary. + */ +var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Some browsers cannot use `innerHTML` to render certain elements standalone, + * so we wrap them, render the wrapped nodes, then extract the desired node. + * + * In IE8, certain elements cannot render alone, so wrap all elements ('*'). + */ + +var shouldWrap = {}; + +var selectWrap = [1, '<select multiple="true">', '</select>']; +var tableWrap = [1, '<table>', '</table>']; +var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; + +var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>']; + +var markupWrap = { + '*': [1, '?<div>', '</div>'], + + 'area': [1, '<map>', '</map>'], + 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], + 'legend': [1, '<fieldset>', '</fieldset>'], + 'param': [1, '<object>', '</object>'], + 'tr': [2, '<table><tbody>', '</tbody></table>'], + + 'optgroup': selectWrap, + 'option': selectWrap, + + 'caption': tableWrap, + 'colgroup': tableWrap, + 'tbody': tableWrap, + 'tfoot': tableWrap, + 'thead': tableWrap, + + 'td': trWrap, + 'th': trWrap +}; + +// Initialize the SVG elements since we know they'll always need to be wrapped +// consistently. If they are created inside a <div> they will be initialized in +// the wrong namespace (and will not display). +var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan']; +svgElements.forEach(function (nodeName) { + markupWrap[nodeName] = svgWrap; + shouldWrap[nodeName] = true; +}); + +/** + * Gets the markup wrap configuration for the supplied `nodeName`. + * + * NOTE: This lazily detects which wraps are necessary for the current browser. + * + * @param {string} nodeName Lowercase `nodeName`. + * @return {?array} Markup wrap configuration, if applicable. + */ +function getMarkupWrap(nodeName) { + !!!dummyNode ? false ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0; + if (!markupWrap.hasOwnProperty(nodeName)) { + nodeName = '*'; + } + if (!shouldWrap.hasOwnProperty(nodeName)) { + if (nodeName === '*') { + dummyNode.innerHTML = '<link />'; + } else { + dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; + } + shouldWrap[nodeName] = !dummyNode.firstChild; + } + return shouldWrap[nodeName] ? markupWrap[nodeName] : null; +} + +module.exports = getMarkupWrap; + +/***/ }), +/* 372 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMChildrenOperations = __webpack_require__(146); +var ReactDOMComponentTree = __webpack_require__(16); + +/** + * Operations used to process updates to DOM nodes. + */ +var ReactDOMIDOperations = { + /** + * Updates a component's children by processing a series of updates. + * + * @param {array<object>} updates List of update configurations. + * @internal + */ + dangerouslyProcessChildrenUpdates: function (parentInst, updates) { + var node = ReactDOMComponentTree.getNodeFromInstance(parentInst); + DOMChildrenOperations.processUpdates(node, updates); + } +}; + +module.exports = ReactDOMIDOperations; + +/***/ }), +/* 373 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/* global hasOwnProperty:true */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(15); + +var AutoFocusUtils = __webpack_require__(374); +var CSSPropertyOperations = __webpack_require__(375); +var DOMLazyTree = __webpack_require__(72); +var DOMNamespaces = __webpack_require__(147); +var DOMProperty = __webpack_require__(67); +var DOMPropertyOperations = __webpack_require__(227); +var EventPluginHub = __webpack_require__(69); +var EventPluginRegistry = __webpack_require__(140); +var ReactBrowserEventEmitter = __webpack_require__(108); +var ReactDOMComponentFlags = __webpack_require__(216); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactDOMInput = __webpack_require__(385); +var ReactDOMOption = __webpack_require__(387); +var ReactDOMSelect = __webpack_require__(228); +var ReactDOMTextarea = __webpack_require__(388); +var ReactInstrumentation = __webpack_require__(29); +var ReactMultiChild = __webpack_require__(389); +var ReactServerRenderingTransaction = __webpack_require__(396); + +var emptyFunction = __webpack_require__(24); +var escapeTextContentForBrowser = __webpack_require__(107); +var invariant = __webpack_require__(9); +var isEventSupported = __webpack_require__(143); +var shallowEqual = __webpack_require__(87); +var inputValueTracking = __webpack_require__(222); +var validateDOMNesting = __webpack_require__(154); +var warning = __webpack_require__(12); + +var Flags = ReactDOMComponentFlags; +var deleteListener = EventPluginHub.deleteListener; +var getNode = ReactDOMComponentTree.getNodeFromInstance; +var listenTo = ReactBrowserEventEmitter.listenTo; +var registrationNameModules = EventPluginRegistry.registrationNameModules; + +// For quickly matching children type, to test if can be treated as content. +var CONTENT_TYPES = { string: true, number: true }; + +var STYLE = 'style'; +var HTML = '__html'; +var RESERVED_PROPS = { + children: null, + dangerouslySetInnerHTML: null, + suppressContentEditableWarning: null +}; + +// Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE). +var DOC_FRAGMENT_TYPE = 11; + +function getDeclarationErrorAddendum(internalInstance) { + if (internalInstance) { + var owner = internalInstance._currentElement._owner || null; + if (owner) { + var name = owner.getName(); + if (name) { + return ' This DOM node was rendered by `' + name + '`.'; + } + } + } + return ''; +} + +function friendlyStringify(obj) { + if (typeof obj === 'object') { + if (Array.isArray(obj)) { + return '[' + obj.map(friendlyStringify).join(', ') + ']'; + } else { + var pairs = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key); + pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key])); + } + } + return '{' + pairs.join(', ') + '}'; + } + } else if (typeof obj === 'string') { + return JSON.stringify(obj); + } else if (typeof obj === 'function') { + return '[function object]'; + } + // Differs from JSON.stringify in that undefined because undefined and that + // inf and nan don't become null + return String(obj); +} + +var styleMutationWarning = {}; + +function checkAndWarnForMutatedStyle(style1, style2, component) { + if (style1 == null || style2 == null) { + return; + } + if (shallowEqual(style1, style2)) { + return; + } + + var componentName = component._tag; + var owner = component._currentElement._owner; + var ownerName; + if (owner) { + ownerName = owner.getName(); + } + + var hash = ownerName + '|' + componentName; + + if (styleMutationWarning.hasOwnProperty(hash)) { + return; + } + + styleMutationWarning[hash] = true; + + false ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0; +} + +/** + * @param {object} component + * @param {?object} props + */ +function assertValidProps(component, props) { + if (!props) { + return; + } + // Note the use of `==` which checks for null or undefined. + if (voidElementTags[component._tag]) { + !(props.children == null && props.dangerouslySetInnerHTML == null) ? false ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0; + } + if (props.dangerouslySetInnerHTML != null) { + !(props.children == null) ? false ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0; + !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? false ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0; + } + if (false) { + process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0; + } + !(props.style == null || typeof props.style === 'object') ? false ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0; +} + +function enqueuePutListener(inst, registrationName, listener, transaction) { + if (transaction instanceof ReactServerRenderingTransaction) { + return; + } + if (false) { + // IE8 has no API for event capturing and the `onScroll` event doesn't + // bubble. + process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : void 0; + } + var containerInfo = inst._hostContainerInfo; + var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE; + var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument; + listenTo(registrationName, doc); + transaction.getReactMountReady().enqueue(putListener, { + inst: inst, + registrationName: registrationName, + listener: listener + }); +} + +function putListener() { + var listenerToPut = this; + EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener); +} + +function inputPostMount() { + var inst = this; + ReactDOMInput.postMountWrapper(inst); +} + +function textareaPostMount() { + var inst = this; + ReactDOMTextarea.postMountWrapper(inst); +} + +function optionPostMount() { + var inst = this; + ReactDOMOption.postMountWrapper(inst); +} + +var setAndValidateContentChildDev = emptyFunction; +if (false) { + setAndValidateContentChildDev = function (content) { + var hasExistingContent = this._contentDebugID != null; + var debugID = this._debugID; + // This ID represents the inlined child that has no backing instance: + var contentDebugID = -debugID; + + if (content == null) { + if (hasExistingContent) { + ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID); + } + this._contentDebugID = null; + return; + } + + validateDOMNesting(null, String(content), this, this._ancestorInfo); + this._contentDebugID = contentDebugID; + if (hasExistingContent) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content); + ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID); + } else { + ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID); + ReactInstrumentation.debugTool.onMountComponent(contentDebugID); + ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]); + } + }; +} + +// There are so many media events, it makes sense to just +// maintain a list rather than create a `trapBubbledEvent` for each +var mediaEvents = { + topAbort: 'abort', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topSeeked: 'seeked', + topSeeking: 'seeking', + topStalled: 'stalled', + topSuspend: 'suspend', + topTimeUpdate: 'timeupdate', + topVolumeChange: 'volumechange', + topWaiting: 'waiting' +}; + +function trackInputValue() { + inputValueTracking.track(this); +} + +function trapBubbledEventsLocal() { + var inst = this; + // If a component renders to null or if another component fatals and causes + // the state of the tree to be corrupted, `node` here can be null. + !inst._rootNodeID ? false ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0; + var node = getNode(inst); + !node ? false ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0; + + switch (inst._tag) { + case 'iframe': + case 'object': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; + break; + case 'video': + case 'audio': + inst._wrapperState.listeners = []; + // Create listener for each media event + for (var event in mediaEvents) { + if (mediaEvents.hasOwnProperty(event)) { + inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node)); + } + } + break; + case 'source': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)]; + break; + case 'img': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; + break; + case 'form': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)]; + break; + case 'input': + case 'select': + case 'textarea': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)]; + break; + } +} + +function postUpdateSelectWrapper() { + ReactDOMSelect.postUpdateWrapper(this); +} + +// For HTML, certain tags should omit their close tag. We keep a whitelist for +// those special-case tags. + +var omittedCloseTags = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + keygen: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true + // NOTE: menuitem's close tag should be omitted, but that causes problems. +}; + +var newlineEatingTags = { + listing: true, + pre: true, + textarea: true +}; + +// For HTML, certain tags cannot have children. This has the same purpose as +// `omittedCloseTags` except that `menuitem` should still have its closing tag. + +var voidElementTags = _assign({ + menuitem: true +}, omittedCloseTags); + +// We accept any tag to be rendered but since this gets injected into arbitrary +// HTML, we want to make sure that it's a safe tag. +// http://www.w3.org/TR/REC-xml/#NT-Name + +var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset +var validatedTagCache = {}; +var hasOwnProperty = {}.hasOwnProperty; + +function validateDangerousTag(tag) { + if (!hasOwnProperty.call(validatedTagCache, tag)) { + !VALID_TAG_REGEX.test(tag) ? false ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0; + validatedTagCache[tag] = true; + } +} + +function isCustomComponent(tagName, props) { + return tagName.indexOf('-') >= 0 || props.is != null; +} + +var globalIdCounter = 1; + +/** + * Creates a new React class that is idempotent and capable of containing other + * React components. It accepts event listeners and DOM properties that are + * valid according to `DOMProperty`. + * + * - Event listeners: `onClick`, `onMouseDown`, etc. + * - DOM properties: `className`, `name`, `title`, etc. + * + * The `style` property functions differently from the DOM API. It accepts an + * object mapping of style properties to values. + * + * @constructor ReactDOMComponent + * @extends ReactMultiChild + */ +function ReactDOMComponent(element) { + var tag = element.type; + validateDangerousTag(tag); + this._currentElement = element; + this._tag = tag.toLowerCase(); + this._namespaceURI = null; + this._renderedChildren = null; + this._previousStyle = null; + this._previousStyleCopy = null; + this._hostNode = null; + this._hostParent = null; + this._rootNodeID = 0; + this._domID = 0; + this._hostContainerInfo = null; + this._wrapperState = null; + this._topLevelWrapper = null; + this._flags = 0; + if (false) { + this._ancestorInfo = null; + setAndValidateContentChildDev.call(this, null); + } +} + +ReactDOMComponent.displayName = 'ReactDOMComponent'; + +ReactDOMComponent.Mixin = { + /** + * Generates root tag markup then recurses. This method has side effects and + * is not idempotent. + * + * @internal + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?ReactDOMComponent} the parent component instance + * @param {?object} info about the host container + * @param {object} context + * @return {string} The computed markup. + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + this._rootNodeID = globalIdCounter++; + this._domID = hostContainerInfo._idCounter++; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var props = this._currentElement.props; + + switch (this._tag) { + case 'audio': + case 'form': + case 'iframe': + case 'img': + case 'link': + case 'object': + case 'source': + case 'video': + this._wrapperState = { + listeners: null + }; + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'input': + ReactDOMInput.mountWrapper(this, props, hostParent); + props = ReactDOMInput.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trackInputValue, this); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'option': + ReactDOMOption.mountWrapper(this, props, hostParent); + props = ReactDOMOption.getHostProps(this, props); + break; + case 'select': + ReactDOMSelect.mountWrapper(this, props, hostParent); + props = ReactDOMSelect.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'textarea': + ReactDOMTextarea.mountWrapper(this, props, hostParent); + props = ReactDOMTextarea.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trackInputValue, this); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + } + + assertValidProps(this, props); + + // We create tags in the namespace of their parent container, except HTML + // tags get no namespace. + var namespaceURI; + var parentTag; + if (hostParent != null) { + namespaceURI = hostParent._namespaceURI; + parentTag = hostParent._tag; + } else if (hostContainerInfo._tag) { + namespaceURI = hostContainerInfo._namespaceURI; + parentTag = hostContainerInfo._tag; + } + if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') { + namespaceURI = DOMNamespaces.html; + } + if (namespaceURI === DOMNamespaces.html) { + if (this._tag === 'svg') { + namespaceURI = DOMNamespaces.svg; + } else if (this._tag === 'math') { + namespaceURI = DOMNamespaces.mathml; + } + } + this._namespaceURI = namespaceURI; + + if (false) { + var parentInfo; + if (hostParent != null) { + parentInfo = hostParent._ancestorInfo; + } else if (hostContainerInfo._tag) { + parentInfo = hostContainerInfo._ancestorInfo; + } + if (parentInfo) { + // parentInfo should always be present except for the top-level + // component when server rendering + validateDOMNesting(this._tag, null, this, parentInfo); + } + this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this); + } + + var mountImage; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var el; + if (namespaceURI === DOMNamespaces.html) { + if (this._tag === 'script') { + // Create the script via .innerHTML so its "parser-inserted" flag is + // set to true and it does not execute + var div = ownerDocument.createElement('div'); + var type = this._currentElement.type; + div.innerHTML = '<' + type + '></' + type + '>'; + el = div.removeChild(div.firstChild); + } else if (props.is) { + el = ownerDocument.createElement(this._currentElement.type, props.is); + } else { + // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug. + // See discussion in https://github.com/facebook/react/pull/6896 + // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 + el = ownerDocument.createElement(this._currentElement.type); + } + } else { + el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type); + } + ReactDOMComponentTree.precacheNode(this, el); + this._flags |= Flags.hasCachedChildNodes; + if (!this._hostParent) { + DOMPropertyOperations.setAttributeForRoot(el); + } + this._updateDOMProperties(null, props, transaction); + var lazyTree = DOMLazyTree(el); + this._createInitialChildren(transaction, props, context, lazyTree); + mountImage = lazyTree; + } else { + var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props); + var tagContent = this._createContentMarkup(transaction, props, context); + if (!tagContent && omittedCloseTags[this._tag]) { + mountImage = tagOpen + '/>'; + } else { + mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>'; + } + } + + switch (this._tag) { + case 'input': + transaction.getReactMountReady().enqueue(inputPostMount, this); + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'textarea': + transaction.getReactMountReady().enqueue(textareaPostMount, this); + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'select': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'button': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'option': + transaction.getReactMountReady().enqueue(optionPostMount, this); + break; + } + + return mountImage; + }, + + /** + * Creates markup for the open tag and all attributes. + * + * This method has side effects because events get registered. + * + * Iterating over object properties is faster than iterating over arrays. + * @see http://jsperf.com/obj-vs-arr-iteration + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props + * @return {string} Markup of opening tag. + */ + _createOpenTagMarkupAndPutListeners: function (transaction, props) { + var ret = '<' + this._currentElement.type; + + for (var propKey in props) { + if (!props.hasOwnProperty(propKey)) { + continue; + } + var propValue = props[propKey]; + if (propValue == null) { + continue; + } + if (registrationNameModules.hasOwnProperty(propKey)) { + if (propValue) { + enqueuePutListener(this, propKey, propValue, transaction); + } + } else { + if (propKey === STYLE) { + if (propValue) { + if (false) { + // See `_updateDOMProperties`. style block + this._previousStyle = propValue; + } + propValue = this._previousStyleCopy = _assign({}, props.style); + } + propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this); + } + var markup = null; + if (this._tag != null && isCustomComponent(this._tag, props)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue); + } + } else { + markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue); + } + if (markup) { + ret += ' ' + markup; + } + } + } + + // For static pages, no need to put React ID and checksum. Saves lots of + // bytes. + if (transaction.renderToStaticMarkup) { + return ret; + } + + if (!this._hostParent) { + ret += ' ' + DOMPropertyOperations.createMarkupForRoot(); + } + ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID); + return ret; + }, + + /** + * Creates markup for the content between the tags. + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props + * @param {object} context + * @return {string} Content markup. + */ + _createContentMarkup: function (transaction, props, context) { + var ret = ''; + + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + ret = innerHTML.__html; + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + if (contentToUse != null) { + // TODO: Validate that text is allowed as a child of this node + ret = escapeTextContentForBrowser(contentToUse); + if (false) { + setAndValidateContentChildDev.call(this, contentToUse); + } + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + ret = mountImages.join(''); + } + } + if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + return '\n' + ret; + } else { + return ret; + } + }, + + _createInitialChildren: function (transaction, props, context, lazyTree) { + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + DOMLazyTree.queueHTML(lazyTree, innerHTML.__html); + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + // TODO: Validate that text is allowed as a child of this node + if (contentToUse != null) { + // Avoid setting textContent when the text is empty. In IE11 setting + // textContent on a text area will cause the placeholder to not + // show within the textarea until it has been focused and blurred again. + // https://github.com/facebook/react/issues/6731#issuecomment-254874553 + if (contentToUse !== '') { + if (false) { + setAndValidateContentChildDev.call(this, contentToUse); + } + DOMLazyTree.queueText(lazyTree, contentToUse); + } + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + for (var i = 0; i < mountImages.length; i++) { + DOMLazyTree.queueChild(lazyTree, mountImages[i]); + } + } + } + }, + + /** + * Receives a next element and updates the component. + * + * @internal + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} context + */ + receiveComponent: function (nextElement, transaction, context) { + var prevElement = this._currentElement; + this._currentElement = nextElement; + this.updateComponent(transaction, prevElement, nextElement, context); + }, + + /** + * Updates a DOM component after it has already been allocated and + * attached to the DOM. Reconciles the root DOM node, then recurses. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevElement + * @param {ReactElement} nextElement + * @internal + * @overridable + */ + updateComponent: function (transaction, prevElement, nextElement, context) { + var lastProps = prevElement.props; + var nextProps = this._currentElement.props; + + switch (this._tag) { + case 'input': + lastProps = ReactDOMInput.getHostProps(this, lastProps); + nextProps = ReactDOMInput.getHostProps(this, nextProps); + break; + case 'option': + lastProps = ReactDOMOption.getHostProps(this, lastProps); + nextProps = ReactDOMOption.getHostProps(this, nextProps); + break; + case 'select': + lastProps = ReactDOMSelect.getHostProps(this, lastProps); + nextProps = ReactDOMSelect.getHostProps(this, nextProps); + break; + case 'textarea': + lastProps = ReactDOMTextarea.getHostProps(this, lastProps); + nextProps = ReactDOMTextarea.getHostProps(this, nextProps); + break; + } + + assertValidProps(this, nextProps); + this._updateDOMProperties(lastProps, nextProps, transaction); + this._updateDOMChildren(lastProps, nextProps, transaction, context); + + switch (this._tag) { + case 'input': + // Update the wrapper around inputs *after* updating props. This has to + // happen after `_updateDOMProperties`. Otherwise HTML5 input validations + // raise warnings and prevent the new value from being assigned. + ReactDOMInput.updateWrapper(this); + break; + case 'textarea': + ReactDOMTextarea.updateWrapper(this); + break; + case 'select': + // <select> value update needs to occur after <option> children + // reconciliation + transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this); + break; + } + }, + + /** + * Reconciles the properties by detecting differences in property values and + * updating the DOM as necessary. This function is probably the single most + * critical path for performance optimization. + * + * TODO: Benchmark whether checking for changed values in memory actually + * improves performance (especially statically positioned elements). + * TODO: Benchmark the effects of putting this at the top since 99% of props + * do not change for a given reconciliation. + * TODO: Benchmark areas that can be improved with caching. + * + * @private + * @param {object} lastProps + * @param {object} nextProps + * @param {?DOMElement} node + */ + _updateDOMProperties: function (lastProps, nextProps, transaction) { + var propKey; + var styleName; + var styleUpdates; + for (propKey in lastProps) { + if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) { + continue; + } + if (propKey === STYLE) { + var lastStyle = this._previousStyleCopy; + for (styleName in lastStyle) { + if (lastStyle.hasOwnProperty(styleName)) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + this._previousStyleCopy = null; + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (lastProps[propKey]) { + // Only call deleteListener if there was a listener previously or + // else willDeleteListener gets called when there wasn't actually a + // listener (e.g., onClick={null}) + deleteListener(this, propKey); + } + } else if (isCustomComponent(this._tag, lastProps)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey); + } + } + for (propKey in nextProps) { + var nextProp = nextProps[propKey]; + var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined; + if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) { + continue; + } + if (propKey === STYLE) { + if (nextProp) { + if (false) { + checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this); + this._previousStyle = nextProp; + } + nextProp = this._previousStyleCopy = _assign({}, nextProp); + } else { + this._previousStyleCopy = null; + } + if (lastProp) { + // Unset styles on `lastProp` but not on `nextProp`. + for (styleName in lastProp) { + if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + // Update styles that changed since `lastProp`. + for (styleName in nextProp) { + if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = nextProp[styleName]; + } + } + } else { + // Relies on `updateStylesByID` not mutating `styleUpdates`. + styleUpdates = nextProp; + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp) { + enqueuePutListener(this, propKey, nextProp, transaction); + } else if (lastProp) { + deleteListener(this, propKey); + } + } else if (isCustomComponent(this._tag, nextProps)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + var node = getNode(this); + // If we're updating to null or undefined, we should remove the property + // from the DOM node instead of inadvertently setting to a string. This + // brings us in line with the same behavior we have on initial render. + if (nextProp != null) { + DOMPropertyOperations.setValueForProperty(node, propKey, nextProp); + } else { + DOMPropertyOperations.deleteValueForProperty(node, propKey); + } + } + } + if (styleUpdates) { + CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this); + } + }, + + /** + * Reconciles the children with the various properties that affect the + * children content. + * + * @param {object} lastProps + * @param {object} nextProps + * @param {ReactReconcileTransaction} transaction + * @param {object} context + */ + _updateDOMChildren: function (lastProps, nextProps, transaction, context) { + var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; + var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; + + var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html; + var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html; + + // Note the use of `!=` which checks for null or undefined. + var lastChildren = lastContent != null ? null : lastProps.children; + var nextChildren = nextContent != null ? null : nextProps.children; + + // If we're switching from children to content/html or vice versa, remove + // the old content + var lastHasContentOrHtml = lastContent != null || lastHtml != null; + var nextHasContentOrHtml = nextContent != null || nextHtml != null; + if (lastChildren != null && nextChildren == null) { + this.updateChildren(null, transaction, context); + } else if (lastHasContentOrHtml && !nextHasContentOrHtml) { + this.updateTextContent(''); + if (false) { + ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); + } + } + + if (nextContent != null) { + if (lastContent !== nextContent) { + this.updateTextContent('' + nextContent); + if (false) { + setAndValidateContentChildDev.call(this, nextContent); + } + } + } else if (nextHtml != null) { + if (lastHtml !== nextHtml) { + this.updateMarkup('' + nextHtml); + } + if (false) { + ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); + } + } else if (nextChildren != null) { + if (false) { + setAndValidateContentChildDev.call(this, null); + } + + this.updateChildren(nextChildren, transaction, context); + } + }, + + getHostNode: function () { + return getNode(this); + }, + + /** + * Destroys all event registrations for this instance. Does not remove from + * the DOM. That must be done by the parent. + * + * @internal + */ + unmountComponent: function (safely) { + switch (this._tag) { + case 'audio': + case 'form': + case 'iframe': + case 'img': + case 'link': + case 'object': + case 'source': + case 'video': + var listeners = this._wrapperState.listeners; + if (listeners) { + for (var i = 0; i < listeners.length; i++) { + listeners[i].remove(); + } + } + break; + case 'input': + case 'textarea': + inputValueTracking.stopTracking(this); + break; + case 'html': + case 'head': + case 'body': + /** + * Components like <html> <head> and <body> can't be removed or added + * easily in a cross-browser way, however it's valuable to be able to + * take advantage of React's reconciliation for styling and <title> + * management. So we just document it and throw in dangerous cases. + */ + true ? false ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0; + break; + } + + this.unmountChildren(safely); + ReactDOMComponentTree.uncacheNode(this); + EventPluginHub.deleteAllListeners(this); + this._rootNodeID = 0; + this._domID = 0; + this._wrapperState = null; + + if (false) { + setAndValidateContentChildDev.call(this, null); + } + }, + + getPublicInstance: function () { + return getNode(this); + } +}; + +_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin); + +module.exports = ReactDOMComponent; + +/***/ }), +/* 374 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMComponentTree = __webpack_require__(16); + +var focusNode = __webpack_require__(225); + +var AutoFocusUtils = { + focusDOMComponent: function () { + focusNode(ReactDOMComponentTree.getNodeFromInstance(this)); + } +}; + +module.exports = AutoFocusUtils; + +/***/ }), +/* 375 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var CSSProperty = __webpack_require__(226); +var ExecutionEnvironment = __webpack_require__(21); +var ReactInstrumentation = __webpack_require__(29); + +var camelizeStyleName = __webpack_require__(376); +var dangerousStyleValue = __webpack_require__(378); +var hyphenateStyleName = __webpack_require__(379); +var memoizeStringOnly = __webpack_require__(381); +var warning = __webpack_require__(12); + +var processStyleName = memoizeStringOnly(function (styleName) { + return hyphenateStyleName(styleName); +}); + +var hasShorthandPropertyBug = false; +var styleFloatAccessor = 'cssFloat'; +if (ExecutionEnvironment.canUseDOM) { + var tempStyle = document.createElement('div').style; + try { + // IE8 throws "Invalid argument." if resetting shorthand style properties. + tempStyle.font = ''; + } catch (e) { + hasShorthandPropertyBug = true; + } + // IE8 only supports accessing cssFloat (standard) as styleFloat + if (document.documentElement.style.cssFloat === undefined) { + styleFloatAccessor = 'styleFloat'; + } +} + +if (false) { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + + // style values shouldn't contain a semicolon + var badStyleValueWithSemicolonPattern = /;\s*$/; + + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + + var warnHyphenatedStyleName = function (name, owner) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0; + }; + + var warnBadVendoredStyleName = function (name, owner) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0; + }; + + var warnStyleValueWithSemicolon = function (name, value, owner) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + process.env.NODE_ENV !== 'production' ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0; + }; + + var warnStyleValueIsNaN = function (name, value, owner) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0; + }; + + var checkRenderMessage = function (owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + }; + + /** + * @param {string} name + * @param {*} value + * @param {ReactDOMComponent} component + */ + var warnValidStyle = function (name, value, component) { + var owner; + if (component) { + owner = component._currentElement._owner; + } + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name, owner); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name, owner); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value, owner); + } + + if (typeof value === 'number' && isNaN(value)) { + warnStyleValueIsNaN(name, value, owner); + } + }; +} + +/** + * Operations for dealing with CSS properties. + */ +var CSSPropertyOperations = { + /** + * Serializes a mapping of style properties for use as inline styles: + * + * > createMarkupForStyles({width: '200px', height: 0}) + * "width:200px;height:0;" + * + * Undefined values are ignored so that declarative programming is easier. + * The result should be HTML-escaped before insertion into the DOM. + * + * @param {object} styles + * @param {ReactDOMComponent} component + * @return {?string} + */ + createMarkupForStyles: function (styles, component) { + var serialized = ''; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + var isCustomProperty = styleName.indexOf('--') === 0; + var styleValue = styles[styleName]; + if (false) { + if (!isCustomProperty) { + warnValidStyle(styleName, styleValue, component); + } + } + if (styleValue != null) { + serialized += processStyleName(styleName) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';'; + } + } + return serialized || null; + }, + + /** + * Sets the value for multiple styles on a node. If a value is specified as + * '' (empty string), the corresponding style property will be unset. + * + * @param {DOMElement} node + * @param {object} styles + * @param {ReactDOMComponent} component + */ + setValueForStyles: function (node, styles, component) { + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: component._debugID, + type: 'update styles', + payload: styles + }); + } + + var style = node.style; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + var isCustomProperty = styleName.indexOf('--') === 0; + if (false) { + if (!isCustomProperty) { + warnValidStyle(styleName, styles[styleName], component); + } + } + var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty); + if (styleName === 'float' || styleName === 'cssFloat') { + styleName = styleFloatAccessor; + } + if (isCustomProperty) { + style.setProperty(styleName, styleValue); + } else if (styleValue) { + style[styleName] = styleValue; + } else { + var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; + if (expansion) { + // Shorthand property that IE8 won't like unsetting, so unset each + // component to placate it + for (var individualStyleName in expansion) { + style[individualStyleName] = ''; + } + } else { + style[styleName] = ''; + } + } + } + } +}; + +module.exports = CSSPropertyOperations; + +/***/ }), +/* 376 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + + +var camelize = __webpack_require__(377); + +var msPattern = /^-ms-/; + +/** + * Camelcases a hyphenated CSS property name, for example: + * + * > camelizeStyleName('background-color') + * < "backgroundColor" + * > camelizeStyleName('-moz-transition') + * < "MozTransition" + * > camelizeStyleName('-ms-transition') + * < "msTransition" + * + * As Andi Smith suggests + * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + * is converted to lowercase `ms`. + * + * @param {string} string + * @return {string} + */ +function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); +} + +module.exports = camelizeStyleName; + +/***/ }), +/* 377 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var _hyphenPattern = /-(.)/g; + +/** + * Camelcases a hyphenated string, for example: + * + * > camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ +function camelize(string) { + return string.replace(_hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); +} + +module.exports = camelize; + +/***/ }), +/* 378 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var CSSProperty = __webpack_require__(226); +var warning = __webpack_require__(12); + +var isUnitlessNumber = CSSProperty.isUnitlessNumber; +var styleWarnings = {}; + +/** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @param {ReactDOMComponent} component + * @return {string} Normalized style value with dimensions applied. + */ +function dangerousStyleValue(name, value, component, isCustomProperty) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + if (isEmpty) { + return ''; + } + + var isNonNumeric = isNaN(value); + if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { + return '' + value; // cast to string + } + + if (typeof value === 'string') { + if (false) { + // Allow '0' to pass through without warning. 0 is already special and + // doesn't require units, so we don't need to warn about it. + if (component && value !== '0') { + var owner = component._currentElement._owner; + var ownerName = owner ? owner.getName() : null; + if (ownerName && !styleWarnings[ownerName]) { + styleWarnings[ownerName] = {}; + } + var warned = false; + if (ownerName) { + var warnings = styleWarnings[ownerName]; + warned = warnings[name]; + if (!warned) { + warnings[name] = true; + } + } + if (!warned) { + process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0; + } + } + } + value = value.trim(); + } + return value + 'px'; +} + +module.exports = dangerousStyleValue; + +/***/ }), +/* 379 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + + +var hyphenate = __webpack_require__(380); + +var msPattern = /^ms-/; + +/** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + * + * @param {string} string + * @return {string} + */ +function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, '-ms-'); +} + +module.exports = hyphenateStyleName; + +/***/ }), +/* 380 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var _uppercasePattern = /([A-Z])/g; + +/** + * Hyphenates a camelcased string, for example: + * + * > hyphenate('backgroundColor') + * < "background-color" + * + * For CSS style names, use `hyphenateStyleName` instead which works properly + * with all vendor prefixes, including `ms`. + * + * @param {string} string + * @return {string} + */ +function hyphenate(string) { + return string.replace(_uppercasePattern, '-$1').toLowerCase(); +} + +module.exports = hyphenate; + +/***/ }), +/* 381 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + * @typechecks static-only + */ + + + +/** + * Memoizes the return value of a function that accepts one string argument. + */ + +function memoizeStringOnly(callback) { + var cache = {}; + return function (string) { + if (!cache.hasOwnProperty(string)) { + cache[string] = callback.call(this, string); + } + return cache[string]; + }; +} + +module.exports = memoizeStringOnly; + +/***/ }), +/* 382 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var escapeTextContentForBrowser = __webpack_require__(107); + +/** + * Escapes attribute value to prevent scripting attacks. + * + * @param {*} value Value to escape. + * @return {string} An escaped string. + */ +function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextContentForBrowser(value) + '"'; +} + +module.exports = quoteAttributeValueForBrowser; + +/***/ }), +/* 383 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPluginHub = __webpack_require__(69); + +function runEventQueueInBatch(events) { + EventPluginHub.enqueueEvents(events); + EventPluginHub.processEventQueue(false); +} + +var ReactEventEmitterMixin = { + /** + * Streams a fired top-level event to `EventPluginHub` where plugins have the + * opportunity to create `ReactEvent`s to be dispatched. + */ + handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); + runEventQueueInBatch(events); + } +}; + +module.exports = ReactEventEmitterMixin; + +/***/ }), +/* 384 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(21); + +/** + * Generate a mapping of standard vendor prefixes using the defined style property and event name. + * + * @param {string} styleProp + * @param {string} eventName + * @returns {object} + */ +function makePrefixMap(styleProp, eventName) { + var prefixes = {}; + + prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); + prefixes['Webkit' + styleProp] = 'webkit' + eventName; + prefixes['Moz' + styleProp] = 'moz' + eventName; + prefixes['ms' + styleProp] = 'MS' + eventName; + prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); + + return prefixes; +} + +/** + * A list of event names to a configurable list of vendor prefixes. + */ +var vendorPrefixes = { + animationend: makePrefixMap('Animation', 'AnimationEnd'), + animationiteration: makePrefixMap('Animation', 'AnimationIteration'), + animationstart: makePrefixMap('Animation', 'AnimationStart'), + transitionend: makePrefixMap('Transition', 'TransitionEnd') +}; + +/** + * Event names that have already been detected and prefixed (if applicable). + */ +var prefixedEventNames = {}; + +/** + * Element to check for prefixes on. + */ +var style = {}; + +/** + * Bootstrap if a DOM exists. + */ +if (ExecutionEnvironment.canUseDOM) { + style = document.createElement('div').style; + + // On some platforms, in particular some releases of Android 4.x, + // the un-prefixed "animation" and "transition" properties are defined on the + // style object but the events that fire will still be prefixed, so we need + // to check if the un-prefixed events are usable, and if not remove them from the map. + if (!('AnimationEvent' in window)) { + delete vendorPrefixes.animationend.animation; + delete vendorPrefixes.animationiteration.animation; + delete vendorPrefixes.animationstart.animation; + } + + // Same as above + if (!('TransitionEvent' in window)) { + delete vendorPrefixes.transitionend.transition; + } +} + +/** + * Attempts to determine the correct vendor prefixed event name. + * + * @param {string} eventName + * @returns {string} + */ +function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) { + return prefixedEventNames[eventName]; + } else if (!vendorPrefixes[eventName]) { + return eventName; + } + + var prefixMap = vendorPrefixes[eventName]; + + for (var styleProp in prefixMap) { + if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { + return prefixedEventNames[eventName] = prefixMap[styleProp]; + } + } + + return ''; +} + +module.exports = getVendorPrefixedEventName; + +/***/ }), +/* 385 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(15); + +var DOMPropertyOperations = __webpack_require__(227); +var LinkedValueUtils = __webpack_require__(149); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactUpdates = __webpack_require__(31); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(12); + +var didWarnValueLink = false; +var didWarnCheckedLink = false; +var didWarnValueDefaultValue = false; +var didWarnCheckedDefaultChecked = false; +var didWarnControlledToUncontrolled = false; +var didWarnUncontrolledToControlled = false; + +function forceUpdateIfMounted() { + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMInput.updateWrapper(this); + } +} + +function isControlled(props) { + var usesChecked = props.type === 'checkbox' || props.type === 'radio'; + return usesChecked ? props.checked != null : props.value != null; +} + +/** + * Implements an <input> host component that allows setting these optional + * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. + * + * If `checked` or `value` are not supplied (or null/undefined), user actions + * that affect the checked state or value will trigger updates to the element. + * + * If they are supplied (and not null/undefined), the rendered element will not + * trigger updates to the element. Instead, the props must change in order for + * the rendered element to be updated. + * + * The rendered element will be initialized as unchecked (or `defaultChecked`) + * with an empty value (or `defaultValue`). + * + * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + */ +var ReactDOMInput = { + getHostProps: function (inst, props) { + var value = LinkedValueUtils.getValue(props); + var checked = LinkedValueUtils.getChecked(props); + + var hostProps = _assign({ + // Make sure we set .type before any other properties (setting .value + // before .type means .value is lost in IE11 and below) + type: undefined, + // Make sure we set .step before .value (setting .value before .step + // means .value is rounded on mount, based upon step precision) + step: undefined, + // Make sure we set .min & .max before .value (to ensure proper order + // in corner cases such as min or max deriving from value, e.g. Issue #7170) + min: undefined, + max: undefined + }, props, { + defaultChecked: undefined, + defaultValue: undefined, + value: value != null ? value : inst._wrapperState.initialValue, + checked: checked != null ? checked : inst._wrapperState.initialChecked, + onChange: inst._wrapperState.onChange + }); + + return hostProps; + }, + + mountWrapper: function (inst, props) { + if (false) { + LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner); + + var owner = inst._currentElement._owner; + + if (props.valueLink !== undefined && !didWarnValueLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnValueLink = true; + } + if (props.checkedLink !== undefined && !didWarnCheckedLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnCheckedLink = true; + } + if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnCheckedDefaultChecked = true; + } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnValueDefaultValue = true; + } + } + + var defaultValue = props.defaultValue; + inst._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: props.value != null ? props.value : defaultValue, + listeners: null, + onChange: _handleChange.bind(inst), + controlled: isControlled(props) + }; + }, + + updateWrapper: function (inst) { + var props = inst._currentElement.props; + + if (false) { + var controlled = isControlled(props); + var owner = inst._currentElement._owner; + + if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnUncontrolledToControlled = true; + } + if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnControlledToUncontrolled = true; + } + } + + // TODO: Shouldn't this be getChecked(props)? + var checked = props.checked; + if (checked != null) { + DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false); + } + + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var value = LinkedValueUtils.getValue(props); + if (value != null) { + if (value === 0 && node.value === '') { + node.value = '0'; + // Note: IE9 reports a number inputs as 'text', so check props instead. + } else if (props.type === 'number') { + // Simulate `input.valueAsNumber`. IE9 does not support it + var valueAsNumber = parseFloat(node.value, 10) || 0; + + if ( + // eslint-disable-next-line + value != valueAsNumber || + // eslint-disable-next-line + value == valueAsNumber && node.value != value) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + node.value = '' + value; + } + } else if (node.value !== '' + value) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + node.value = '' + value; + } + } else { + if (props.value == null && props.defaultValue != null) { + // In Chrome, assigning defaultValue to certain input types triggers input validation. + // For number inputs, the display value loses trailing decimal points. For email inputs, + // Chrome raises "The specified value <x> is not a valid email address". + // + // Here we check to see if the defaultValue has actually changed, avoiding these problems + // when the user is inputting text + // + // https://github.com/facebook/react/issues/7253 + if (node.defaultValue !== '' + props.defaultValue) { + node.defaultValue = '' + props.defaultValue; + } + } + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + }, + + postMountWrapper: function (inst) { + var props = inst._currentElement.props; + + // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + + // Detach value from defaultValue. We won't do anything if we're working on + // submit or reset inputs as those values & defaultValues are linked. They + // are not resetable nodes so this operation doesn't matter and actually + // removes browser-default values (eg "Submit Query") when no value is + // provided. + + switch (props.type) { + case 'submit': + case 'reset': + break; + case 'color': + case 'date': + case 'datetime': + case 'datetime-local': + case 'month': + case 'time': + case 'week': + // This fixes the no-show issue on iOS Safari and Android Chrome: + // https://github.com/facebook/react/issues/7233 + node.value = ''; + node.value = node.defaultValue; + break; + default: + node.value = node.value; + break; + } + + // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug + // this is needed to work around a chrome bug where setting defaultChecked + // will sometimes influence the value of checked (even after detachment). + // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 + // We need to temporarily unset name to avoid disrupting radio button groups. + var name = node.name; + if (name !== '') { + node.name = ''; + } + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !node.defaultChecked; + if (name !== '') { + node.name = name; + } + } +}; + +function _handleChange(event) { + var props = this._currentElement.props; + + var returnValue = LinkedValueUtils.executeOnChange(props, event); + + // Here we use asap to wait until all updates have propagated, which + // is important when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + ReactUpdates.asap(forceUpdateIfMounted, this); + + var name = props.name; + if (props.type === 'radio' && name != null) { + var rootNode = ReactDOMComponentTree.getNodeFromInstance(this); + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } + + // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form, let's just use the global + // `querySelectorAll` to ensure we don't miss anything. + var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); + + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } + // This will throw if radio buttons rendered by different copies of React + // and the same name are rendered into the same form (same as #1939). + // That's probably okay; we don't support it just as we don't support + // mixing React radio buttons with non-React ones. + var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode); + !otherInstance ? false ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0; + // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + ReactUpdates.asap(forceUpdateIfMounted, otherInstance); + } + } + + return returnValue; +} + +module.exports = ReactDOMInput; + +/***/ }), +/* 386 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + +/***/ }), +/* 387 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var React = __webpack_require__(65); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactDOMSelect = __webpack_require__(228); + +var warning = __webpack_require__(12); +var didWarnInvalidOptionChildren = false; + +function flattenChildren(children) { + var content = ''; + + // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + if (typeof child === 'string' || typeof child === 'number') { + content += child; + } else if (!didWarnInvalidOptionChildren) { + didWarnInvalidOptionChildren = true; + false ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0; + } + }); + + return content; +} + +/** + * Implements an <option> host component that warns when `selected` is set. + */ +var ReactDOMOption = { + mountWrapper: function (inst, props, hostParent) { + // TODO (yungsters): Remove support for `selected` in <option>. + if (false) { + process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0; + } + + // Look up whether this option is 'selected' + var selectValue = null; + if (hostParent != null) { + var selectParent = hostParent; + + if (selectParent._tag === 'optgroup') { + selectParent = selectParent._hostParent; + } + + if (selectParent != null && selectParent._tag === 'select') { + selectValue = ReactDOMSelect.getSelectValueContext(selectParent); + } + } + + // If the value is null (e.g., no specified value or after initial mount) + // or missing (e.g., for <datalist>), we don't change props.selected + var selected = null; + if (selectValue != null) { + var value; + if (props.value != null) { + value = props.value + ''; + } else { + value = flattenChildren(props.children); + } + selected = false; + if (Array.isArray(selectValue)) { + // multiple + for (var i = 0; i < selectValue.length; i++) { + if ('' + selectValue[i] === value) { + selected = true; + break; + } + } + } else { + selected = '' + selectValue === value; + } + } + + inst._wrapperState = { selected: selected }; + }, + + postMountWrapper: function (inst) { + // value="" should make a value attribute (#6219) + var props = inst._currentElement.props; + if (props.value != null) { + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + node.setAttribute('value', props.value); + } + }, + + getHostProps: function (inst, props) { + var hostProps = _assign({ selected: undefined, children: undefined }, props); + + // Read state only from initial mount because <select> updates value + // manually; we need the initial state only for server rendering + if (inst._wrapperState.selected != null) { + hostProps.selected = inst._wrapperState.selected; + } + + var content = flattenChildren(props.children); + + if (content) { + hostProps.children = content; + } + + return hostProps; + } +}; + +module.exports = ReactDOMOption; + +/***/ }), +/* 388 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(15); + +var LinkedValueUtils = __webpack_require__(149); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactUpdates = __webpack_require__(31); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(12); + +var didWarnValueLink = false; +var didWarnValDefaultVal = false; + +function forceUpdateIfMounted() { + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMTextarea.updateWrapper(this); + } +} + +/** + * Implements a <textarea> host component that allows setting `value`, and + * `defaultValue`. This differs from the traditional DOM API because value is + * usually set as PCDATA children. + * + * If `value` is not supplied (or null/undefined), user actions that affect the + * value will trigger updates to the element. + * + * If `value` is supplied (and not null/undefined), the rendered element will + * not trigger updates to the element. Instead, the `value` prop must change in + * order for the rendered element to be updated. + * + * The rendered element will be initialized with an empty value, the prop + * `defaultValue` if specified, or the children content (deprecated). + */ +var ReactDOMTextarea = { + getHostProps: function (inst, props) { + !(props.dangerouslySetInnerHTML == null) ? false ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0; + + // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. We could add a check in setTextContent + // to only set the value if/when the value differs from the node value (which would + // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution. + // The value can be a boolean or object so that's why it's forced to be a string. + var hostProps = _assign({}, props, { + value: undefined, + defaultValue: undefined, + children: '' + inst._wrapperState.initialValue, + onChange: inst._wrapperState.onChange + }); + + return hostProps; + }, + + mountWrapper: function (inst, props) { + if (false) { + LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner); + if (props.valueLink !== undefined && !didWarnValueLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnValueLink = true; + } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0; + didWarnValDefaultVal = true; + } + } + + var value = LinkedValueUtils.getValue(props); + var initialValue = value; + + // Only bother fetching default value if we're going to use it + if (value == null) { + var defaultValue = props.defaultValue; + // TODO (yungsters): Remove support for children content in <textarea>. + var children = props.children; + if (children != null) { + if (false) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0; + } + !(defaultValue == null) ? false ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0; + if (Array.isArray(children)) { + !(children.length <= 1) ? false ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0; + children = children[0]; + } + + defaultValue = '' + children; + } + if (defaultValue == null) { + defaultValue = ''; + } + initialValue = defaultValue; + } + + inst._wrapperState = { + initialValue: '' + initialValue, + listeners: null, + onChange: _handleChange.bind(inst) + }; + }, + + updateWrapper: function (inst) { + var props = inst._currentElement.props; + + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var value = LinkedValueUtils.getValue(props); + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = '' + value; + + // To avoid side effects (such as losing text selection), only set value if changed + if (newValue !== node.value) { + node.value = newValue; + } + if (props.defaultValue == null) { + node.defaultValue = newValue; + } + } + if (props.defaultValue != null) { + node.defaultValue = props.defaultValue; + } + }, + + postMountWrapper: function (inst) { + // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var textContent = node.textContent; + + // Only set node.value if textContent is equal to the expected + // initial value. In IE10/IE11 there is a bug where the placeholder attribute + // will populate textContent as well. + // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ + if (textContent === inst._wrapperState.initialValue) { + node.value = textContent; + } + } +}; + +function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); + ReactUpdates.asap(forceUpdateIfMounted, this); + return returnValue; +} + +module.exports = ReactDOMTextarea; + +/***/ }), +/* 389 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var ReactComponentEnvironment = __webpack_require__(150); +var ReactInstanceMap = __webpack_require__(86); +var ReactInstrumentation = __webpack_require__(29); + +var ReactCurrentOwner = __webpack_require__(37); +var ReactReconciler = __webpack_require__(70); +var ReactChildReconciler = __webpack_require__(390); + +var emptyFunction = __webpack_require__(24); +var flattenChildren = __webpack_require__(395); +var invariant = __webpack_require__(9); + +/** + * Make an update for markup to be rendered and inserted at a supplied index. + * + * @param {string} markup Markup that renders into an element. + * @param {number} toIndex Destination index. + * @private + */ +function makeInsertMarkup(markup, afterNode, toIndex) { + // NOTE: Null values reduce hidden classes. + return { + type: 'INSERT_MARKUP', + content: markup, + fromIndex: null, + fromNode: null, + toIndex: toIndex, + afterNode: afterNode + }; +} + +/** + * Make an update for moving an existing element to another index. + * + * @param {number} fromIndex Source index of the existing element. + * @param {number} toIndex Destination index of the element. + * @private + */ +function makeMove(child, afterNode, toIndex) { + // NOTE: Null values reduce hidden classes. + return { + type: 'MOVE_EXISTING', + content: null, + fromIndex: child._mountIndex, + fromNode: ReactReconciler.getHostNode(child), + toIndex: toIndex, + afterNode: afterNode + }; +} + +/** + * Make an update for removing an element at an index. + * + * @param {number} fromIndex Index of the element to remove. + * @private + */ +function makeRemove(child, node) { + // NOTE: Null values reduce hidden classes. + return { + type: 'REMOVE_NODE', + content: null, + fromIndex: child._mountIndex, + fromNode: node, + toIndex: null, + afterNode: null + }; +} + +/** + * Make an update for setting the markup of a node. + * + * @param {string} markup Markup that renders into an element. + * @private + */ +function makeSetMarkup(markup) { + // NOTE: Null values reduce hidden classes. + return { + type: 'SET_MARKUP', + content: markup, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null + }; +} + +/** + * Make an update for setting the text content. + * + * @param {string} textContent Text content to set. + * @private + */ +function makeTextContent(textContent) { + // NOTE: Null values reduce hidden classes. + return { + type: 'TEXT_CONTENT', + content: textContent, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null + }; +} + +/** + * Push an update, if any, onto the queue. Creates a new queue if none is + * passed and always returns the queue. Mutative. + */ +function enqueue(queue, update) { + if (update) { + queue = queue || []; + queue.push(update); + } + return queue; +} + +/** + * Processes any enqueued updates. + * + * @private + */ +function processQueue(inst, updateQueue) { + ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue); +} + +var setChildrenForInstrumentation = emptyFunction; +if (false) { + var getDebugID = function (inst) { + if (!inst._debugID) { + // Check for ART-like instances. TODO: This is silly/gross. + var internal; + if (internal = ReactInstanceMap.get(inst)) { + inst = internal; + } + } + return inst._debugID; + }; + setChildrenForInstrumentation = function (children) { + var debugID = getDebugID(this); + // TODO: React Native empty components are also multichild. + // This means they still get into this method but don't have _debugID. + if (debugID !== 0) { + ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) { + return children[key]._debugID; + }) : []); + } + }; +} + +/** + * ReactMultiChild are capable of reconciling multiple children. + * + * @class ReactMultiChild + * @internal + */ +var ReactMultiChild = { + /** + * Provides common functionality for components that must reconcile multiple + * children. This is used by `ReactDOMComponent` to mount, update, and + * unmount child components. + * + * @lends {ReactMultiChild.prototype} + */ + Mixin: { + _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) { + if (false) { + var selfDebugID = getDebugID(this); + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID); + } finally { + ReactCurrentOwner.current = null; + } + } + } + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); + }, + + _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) { + var nextChildren; + var selfDebugID = 0; + if (false) { + selfDebugID = getDebugID(this); + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); + } finally { + ReactCurrentOwner.current = null; + } + ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); + return nextChildren; + } + } + nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); + ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); + return nextChildren; + }, + + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildren Nested child maps. + * @return {array} An array of mounted representations. + * @internal + */ + mountChildren: function (nestedChildren, transaction, context) { + var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context); + this._renderedChildren = children; + + var mountImages = []; + var index = 0; + for (var name in children) { + if (children.hasOwnProperty(name)) { + var child = children[name]; + var selfDebugID = 0; + if (false) { + selfDebugID = getDebugID(this); + } + var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID); + child._mountIndex = index++; + mountImages.push(mountImage); + } + } + + if (false) { + setChildrenForInstrumentation.call(this, children); + } + + return mountImages; + }, + + /** + * Replaces any rendered children with a text content string. + * + * @param {string} nextContent String of content. + * @internal + */ + updateTextContent: function (nextContent) { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren, false); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + true ? false ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; + } + } + // Set new text content. + var updates = [makeTextContent(nextContent)]; + processQueue(this, updates); + }, + + /** + * Replaces any rendered children with a markup string. + * + * @param {string} nextMarkup String of markup. + * @internal + */ + updateMarkup: function (nextMarkup) { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren, false); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + true ? false ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; + } + } + var updates = [makeSetMarkup(nextMarkup)]; + processQueue(this, updates); + }, + + /** + * Updates the rendered children with new children. + * + * @param {?object} nextNestedChildrenElements Nested child element maps. + * @param {ReactReconcileTransaction} transaction + * @internal + */ + updateChildren: function (nextNestedChildrenElements, transaction, context) { + // Hook used by React ART + this._updateChildren(nextNestedChildrenElements, transaction, context); + }, + + /** + * @param {?object} nextNestedChildrenElements Nested child element maps. + * @param {ReactReconcileTransaction} transaction + * @final + * @protected + */ + _updateChildren: function (nextNestedChildrenElements, transaction, context) { + var prevChildren = this._renderedChildren; + var removedNodes = {}; + var mountImages = []; + var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context); + if (!nextChildren && !prevChildren) { + return; + } + var updates = null; + var name; + // `nextIndex` will increment for each child in `nextChildren`, but + // `lastIndex` will be the last index visited in `prevChildren`. + var nextIndex = 0; + var lastIndex = 0; + // `nextMountIndex` will increment for each newly mounted child. + var nextMountIndex = 0; + var lastPlacedNode = null; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + var prevChild = prevChildren && prevChildren[name]; + var nextChild = nextChildren[name]; + if (prevChild === nextChild) { + updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex)); + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + prevChild._mountIndex = nextIndex; + } else { + if (prevChild) { + // Update `lastIndex` before `_mountIndex` gets unset by unmounting. + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + // The `removedNodes` loop below will actually remove the child. + } + // The child must be instantiated before it's mounted. + updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context)); + nextMountIndex++; + } + nextIndex++; + lastPlacedNode = ReactReconciler.getHostNode(nextChild); + } + // Remove children that are no longer present. + for (name in removedNodes) { + if (removedNodes.hasOwnProperty(name)) { + updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name])); + } + } + if (updates) { + processQueue(this, updates); + } + this._renderedChildren = nextChildren; + + if (false) { + setChildrenForInstrumentation.call(this, nextChildren); + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. It does not actually perform any + * backend operations. + * + * @internal + */ + unmountChildren: function (safely) { + var renderedChildren = this._renderedChildren; + ReactChildReconciler.unmountChildren(renderedChildren, safely); + this._renderedChildren = null; + }, + + /** + * Moves a child component to the supplied index. + * + * @param {ReactComponent} child Component to move. + * @param {number} toIndex Destination index of the element. + * @param {number} lastIndex Last index visited of the siblings of `child`. + * @protected + */ + moveChild: function (child, afterNode, toIndex, lastIndex) { + // If the index of `child` is less than `lastIndex`, then it needs to + // be moved. Otherwise, we do not need to move it because a child will be + // inserted or moved before `child`. + if (child._mountIndex < lastIndex) { + return makeMove(child, afterNode, toIndex); + } + }, + + /** + * Creates a child component. + * + * @param {ReactComponent} child Component to create. + * @param {string} mountImage Markup to insert. + * @protected + */ + createChild: function (child, afterNode, mountImage) { + return makeInsertMarkup(mountImage, afterNode, child._mountIndex); + }, + + /** + * Removes a child component. + * + * @param {ReactComponent} child Child to remove. + * @protected + */ + removeChild: function (child, node) { + return makeRemove(child, node); + }, + + /** + * Mounts a child with the supplied name. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to mount. + * @param {string} name Name of the child. + * @param {number} index Index at which to insert the child. + * @param {ReactReconcileTransaction} transaction + * @private + */ + _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) { + child._mountIndex = index; + return this.createChild(child, afterNode, mountImage); + }, + + /** + * Unmounts a rendered child. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to unmount. + * @private + */ + _unmountChild: function (child, node) { + var update = this.removeChild(child, node); + child._mountIndex = null; + return update; + } + } +}; + +module.exports = ReactMultiChild; + +/***/ }), +/* 390 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactReconciler = __webpack_require__(70); + +var instantiateReactComponent = __webpack_require__(230); +var KeyEscapeUtils = __webpack_require__(152); +var shouldUpdateReactComponent = __webpack_require__(151); +var traverseAllChildren = __webpack_require__(234); +var warning = __webpack_require__(12); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && Object({"NODE_ENV":'production'}) && 'production' === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(235); +} + +function instantiateChild(childInstances, child, name, selfDebugID) { + // We found a component instance. + var keyUnique = childInstances[name] === undefined; + if (false) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook'); + } + if (!keyUnique) { + process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; + } + } + if (child != null && keyUnique) { + childInstances[name] = instantiateReactComponent(child, true); + } +} + +/** + * ReactChildReconciler provides helpers for initializing or updating a set of + * children. Its output is suitable for passing it onto ReactMultiChild which + * does diffed reordering and insertion. + */ +var ReactChildReconciler = { + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildNodes Nested child maps. + * @return {?object} A set of child instances. + * @internal + */ + instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots + { + if (nestedChildNodes == null) { + return null; + } + var childInstances = {}; + + if (false) { + traverseAllChildren(nestedChildNodes, function (childInsts, child, name) { + return instantiateChild(childInsts, child, name, selfDebugID); + }, childInstances); + } else { + traverseAllChildren(nestedChildNodes, instantiateChild, childInstances); + } + return childInstances; + }, + + /** + * Updates the rendered children and returns a new set of children. + * + * @param {?object} prevChildren Previously initialized set of children. + * @param {?object} nextChildren Flat child element maps. + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @return {?object} A new set of child instances. + * @internal + */ + updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots + { + // We currently don't have a way to track moves here but if we use iterators + // instead of for..in we can zip the iterators and check if an item has + // moved. + // TODO: If nothing has changed, return the prevChildren object so that we + // can quickly bailout if nothing has changed. + if (!nextChildren && !prevChildren) { + return; + } + var name; + var prevChild; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + prevChild = prevChildren && prevChildren[name]; + var prevElement = prevChild && prevChild._currentElement; + var nextElement = nextChildren[name]; + if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) { + ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context); + nextChildren[name] = prevChild; + } else { + if (prevChild) { + removedNodes[name] = ReactReconciler.getHostNode(prevChild); + ReactReconciler.unmountComponent(prevChild, false); + } + // The child must be instantiated before it's mounted. + var nextChildInstance = instantiateReactComponent(nextElement, true); + nextChildren[name] = nextChildInstance; + // Creating mount image now ensures refs are resolved in right order + // (see https://github.com/facebook/react/pull/7101 for explanation). + var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID); + mountImages.push(nextChildMountImage); + } + } + // Unmount children that are no longer present. + for (name in prevChildren) { + if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { + prevChild = prevChildren[name]; + removedNodes[name] = ReactReconciler.getHostNode(prevChild); + ReactReconciler.unmountComponent(prevChild, false); + } + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. + * + * @param {?object} renderedChildren Previously initialized set of children. + * @internal + */ + unmountChildren: function (renderedChildren, safely) { + for (var name in renderedChildren) { + if (renderedChildren.hasOwnProperty(name)) { + var renderedChild = renderedChildren[name]; + ReactReconciler.unmountComponent(renderedChild, safely); + } + } + } +}; + +module.exports = ReactChildReconciler; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(229))) + +/***/ }), +/* 391 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(15); + +var React = __webpack_require__(65); +var ReactComponentEnvironment = __webpack_require__(150); +var ReactCurrentOwner = __webpack_require__(37); +var ReactErrorUtils = __webpack_require__(141); +var ReactInstanceMap = __webpack_require__(86); +var ReactInstrumentation = __webpack_require__(29); +var ReactNodeTypes = __webpack_require__(231); +var ReactReconciler = __webpack_require__(70); + +if (false) { + var checkReactTypeSpec = require('./checkReactTypeSpec'); +} + +var emptyObject = __webpack_require__(102); +var invariant = __webpack_require__(9); +var shallowEqual = __webpack_require__(87); +var shouldUpdateReactComponent = __webpack_require__(151); +var warning = __webpack_require__(12); + +var CompositeTypes = { + ImpureClass: 0, + PureClass: 1, + StatelessFunctional: 2 +}; + +function StatelessComponent(Component) {} +StatelessComponent.prototype.render = function () { + var Component = ReactInstanceMap.get(this)._currentElement.type; + var element = Component(this.props, this.context, this.updater); + warnIfInvalidElement(Component, element); + return element; +}; + +function warnIfInvalidElement(Component, element) { + if (false) { + process.env.NODE_ENV !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0; + } +} + +function shouldConstruct(Component) { + return !!(Component.prototype && Component.prototype.isReactComponent); +} + +function isPureComponent(Component) { + return !!(Component.prototype && Component.prototype.isPureReactComponent); +} + +// Separated into a function to contain deoptimizations caused by try/finally. +function measureLifeCyclePerf(fn, debugID, timerType) { + if (debugID === 0) { + // Top-level wrappers (see ReactMount) and empty components (see + // ReactDOMEmptyComponent) are invisible to hooks and devtools. + // Both are implementation details that should go away in the future. + return fn(); + } + + ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType); + try { + return fn(); + } finally { + ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType); + } +} + +/** + * ------------------ The Life-Cycle of a Composite Component ------------------ + * + * - constructor: Initialization of state. The instance is now retained. + * - componentWillMount + * - render + * - [children's constructors] + * - [children's componentWillMount and render] + * - [children's componentDidMount] + * - componentDidMount + * + * Update Phases: + * - componentWillReceiveProps (only called if parent updated) + * - shouldComponentUpdate + * - componentWillUpdate + * - render + * - [children's constructors or receive props phases] + * - componentDidUpdate + * + * - componentWillUnmount + * - [children's componentWillUnmount] + * - [children destroyed] + * - (destroyed): The instance is now blank, released by React and ready for GC. + * + * ----------------------------------------------------------------------------- + */ + +/** + * An incrementing ID assigned to each component when it is mounted. This is + * used to enforce the order in which `ReactUpdates` updates dirty components. + * + * @private + */ +var nextMountID = 1; + +/** + * @lends {ReactCompositeComponent.prototype} + */ +var ReactCompositeComponent = { + /** + * Base constructor for all composite component. + * + * @param {ReactElement} element + * @final + * @internal + */ + construct: function (element) { + this._currentElement = element; + this._rootNodeID = 0; + this._compositeType = null; + this._instance = null; + this._hostParent = null; + this._hostContainerInfo = null; + + // See ReactUpdateQueue + this._updateBatchNumber = null; + this._pendingElement = null; + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + this._renderedNodeType = null; + this._renderedComponent = null; + this._context = null; + this._mountOrder = 0; + this._topLevelWrapper = null; + + // See ReactUpdates and ReactUpdateQueue. + this._pendingCallbacks = null; + + // ComponentWillUnmount shall only be called once + this._calledComponentWillUnmount = false; + + if (false) { + this._warnedAboutRefsInRender = false; + } + }, + + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?object} hostParent + * @param {?object} hostContainerInfo + * @param {?object} context + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + var _this = this; + + this._context = context; + this._mountOrder = nextMountID++; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var publicProps = this._currentElement.props; + var publicContext = this._processContext(context); + + var Component = this._currentElement.type; + + var updateQueue = transaction.getUpdateQueue(); + + // Initialize the public class + var doConstruct = shouldConstruct(Component); + var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue); + var renderedElement; + + // Support functional components + if (!doConstruct && (inst == null || inst.render == null)) { + renderedElement = inst; + warnIfInvalidElement(Component, renderedElement); + !(inst === null || inst === false || React.isValidElement(inst)) ? false ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0; + inst = new StatelessComponent(Component); + this._compositeType = CompositeTypes.StatelessFunctional; + } else { + if (isPureComponent(Component)) { + this._compositeType = CompositeTypes.PureClass; + } else { + this._compositeType = CompositeTypes.ImpureClass; + } + } + + if (false) { + // This will throw later in _renderValidatedComponent, but add an early + // warning now to help debugging + if (inst.render == null) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0; + } + + var propsMutated = inst.props !== publicProps; + var componentName = Component.displayName || Component.name || 'Component'; + + process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", componentName, componentName) : void 0; + } + + // These should be set up in the constructor, but as a convenience for + // simpler class abstractions, we set them up after the fact. + inst.props = publicProps; + inst.context = publicContext; + inst.refs = emptyObject; + inst.updater = updateQueue; + + this._instance = inst; + + // Store a reference from the instance back to the internal representation + ReactInstanceMap.set(inst, this); + + if (false) { + // Since plain JS classes are defined without any special initialization + // logic, we can not catch common errors early. Therefore, we have to + // catch them here, at initialization time, instead. + process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0; + } + + var initialState = inst.state; + if (initialState === undefined) { + inst.state = initialState = null; + } + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? false ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0; + + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + var markup; + if (inst.unstable_handleError) { + markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context); + } else { + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } + + if (inst.componentDidMount) { + if (false) { + transaction.getReactMountReady().enqueue(function () { + measureLifeCyclePerf(function () { + return inst.componentDidMount(); + }, _this._debugID, 'componentDidMount'); + }); + } else { + transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); + } + } + + return markup; + }, + + _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) { + if (false) { + ReactCurrentOwner.current = this; + try { + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); + } finally { + ReactCurrentOwner.current = null; + } + } else { + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); + } + }, + + _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) { + var Component = this._currentElement.type; + + if (doConstruct) { + if (false) { + return measureLifeCyclePerf(function () { + return new Component(publicProps, publicContext, updateQueue); + }, this._debugID, 'ctor'); + } else { + return new Component(publicProps, publicContext, updateQueue); + } + } + + // This can still be an instance in case of factory components + // but we'll count this as time spent rendering as the more common case. + if (false) { + return measureLifeCyclePerf(function () { + return Component(publicProps, publicContext, updateQueue); + }, this._debugID, 'render'); + } else { + return Component(publicProps, publicContext, updateQueue); + } + }, + + performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { + var markup; + var checkpoint = transaction.checkpoint(); + try { + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } catch (e) { + // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint + transaction.rollback(checkpoint); + this._instance.unstable_handleError(e); + if (this._pendingStateQueue) { + this._instance.state = this._processPendingState(this._instance.props, this._instance.context); + } + checkpoint = transaction.checkpoint(); + + this._renderedComponent.unmountComponent(true); + transaction.rollback(checkpoint); + + // Try again - we've informed the component about the error, so they can render an error message this time. + // If this throws again, the error will bubble up (and can be caught by a higher error boundary). + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } + return markup; + }, + + performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { + var inst = this._instance; + + var debugID = 0; + if (false) { + debugID = this._debugID; + } + + if (inst.componentWillMount) { + if (false) { + measureLifeCyclePerf(function () { + return inst.componentWillMount(); + }, debugID, 'componentWillMount'); + } else { + inst.componentWillMount(); + } + // When mounting, calls to `setState` by `componentWillMount` will set + // `this._pendingStateQueue` without triggering a re-render. + if (this._pendingStateQueue) { + inst.state = this._processPendingState(inst.props, inst.context); + } + } + + // If not a stateless component, we now render + if (renderedElement === undefined) { + renderedElement = this._renderValidatedComponent(); + } + + var nodeType = ReactNodeTypes.getType(renderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ + ); + this._renderedComponent = child; + + var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID); + + if (false) { + if (debugID !== 0) { + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); + } + } + + return markup; + }, + + getHostNode: function () { + return ReactReconciler.getHostNode(this._renderedComponent); + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function (safely) { + if (!this._renderedComponent) { + return; + } + + var inst = this._instance; + + if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) { + inst._calledComponentWillUnmount = true; + + if (safely) { + var name = this.getName() + '.componentWillUnmount()'; + ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst)); + } else { + if (false) { + measureLifeCyclePerf(function () { + return inst.componentWillUnmount(); + }, this._debugID, 'componentWillUnmount'); + } else { + inst.componentWillUnmount(); + } + } + } + + if (this._renderedComponent) { + ReactReconciler.unmountComponent(this._renderedComponent, safely); + this._renderedNodeType = null; + this._renderedComponent = null; + this._instance = null; + } + + // Reset pending fields + // Even if this component is scheduled for another update in ReactUpdates, + // it would still be ignored because these fields are reset. + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + this._pendingCallbacks = null; + this._pendingElement = null; + + // These fields do not really need to be reset since this object is no + // longer accessible. + this._context = null; + this._rootNodeID = 0; + this._topLevelWrapper = null; + + // Delete the reference from the instance to this internal representation + // which allow the internals to be properly cleaned up even if the user + // leaks a reference to the public instance. + ReactInstanceMap.remove(inst); + + // Some existing components rely on inst.props even after they've been + // destroyed (in event handlers). + // TODO: inst.props = null; + // TODO: inst.state = null; + // TODO: inst.context = null; + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes` + * + * @param {object} context + * @return {?object} + * @private + */ + _maskContext: function (context) { + var Component = this._currentElement.type; + var contextTypes = Component.contextTypes; + if (!contextTypes) { + return emptyObject; + } + var maskedContext = {}; + for (var contextName in contextTypes) { + maskedContext[contextName] = context[contextName]; + } + return maskedContext; + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes`, and asserts that they are valid. + * + * @param {object} context + * @return {?object} + * @private + */ + _processContext: function (context) { + var maskedContext = this._maskContext(context); + if (false) { + var Component = this._currentElement.type; + if (Component.contextTypes) { + this._checkContextTypes(Component.contextTypes, maskedContext, 'context'); + } + } + return maskedContext; + }, + + /** + * @param {object} currentContext + * @return {object} + * @private + */ + _processChildContext: function (currentContext) { + var Component = this._currentElement.type; + var inst = this._instance; + var childContext; + + if (inst.getChildContext) { + if (false) { + ReactInstrumentation.debugTool.onBeginProcessingChildContext(); + try { + childContext = inst.getChildContext(); + } finally { + ReactInstrumentation.debugTool.onEndProcessingChildContext(); + } + } else { + childContext = inst.getChildContext(); + } + } + + if (childContext) { + !(typeof Component.childContextTypes === 'object') ? false ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0; + if (false) { + this._checkContextTypes(Component.childContextTypes, childContext, 'child context'); + } + for (var name in childContext) { + !(name in Component.childContextTypes) ? false ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0; + } + return _assign({}, currentContext, childContext); + } + return currentContext; + }, + + /** + * Assert that the context types are valid + * + * @param {object} typeSpecs Map of context field to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @private + */ + _checkContextTypes: function (typeSpecs, values, location) { + if (false) { + checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID); + } + }, + + receiveComponent: function (nextElement, transaction, nextContext) { + var prevElement = this._currentElement; + var prevContext = this._context; + + this._pendingElement = null; + + this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); + }, + + /** + * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate` + * is set, update the component. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function (transaction) { + if (this._pendingElement != null) { + ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context); + } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) { + this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context); + } else { + this._updateBatchNumber = null; + } + }, + + /** + * Perform an update to a mounted component. The componentWillReceiveProps and + * shouldComponentUpdate methods are called, then (assuming the update isn't + * skipped) the remaining update lifecycle methods are called and the DOM + * representation is updated. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevParentElement + * @param {ReactElement} nextParentElement + * @internal + * @overridable + */ + updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) { + var inst = this._instance; + !(inst != null) ? false ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0; + + var willReceive = false; + var nextContext; + + // Determine if the context has changed or not + if (this._context === nextUnmaskedContext) { + nextContext = inst.context; + } else { + nextContext = this._processContext(nextUnmaskedContext); + willReceive = true; + } + + var prevProps = prevParentElement.props; + var nextProps = nextParentElement.props; + + // Not a simple state update but a props update + if (prevParentElement !== nextParentElement) { + willReceive = true; + } + + // An update here will schedule an update but immediately set + // _pendingStateQueue which will ensure that any state updates gets + // immediately reconciled instead of waiting for the next batch. + if (willReceive && inst.componentWillReceiveProps) { + if (false) { + measureLifeCyclePerf(function () { + return inst.componentWillReceiveProps(nextProps, nextContext); + }, this._debugID, 'componentWillReceiveProps'); + } else { + inst.componentWillReceiveProps(nextProps, nextContext); + } + } + + var nextState = this._processPendingState(nextProps, nextContext); + var shouldUpdate = true; + + if (!this._pendingForceUpdate) { + if (inst.shouldComponentUpdate) { + if (false) { + shouldUpdate = measureLifeCyclePerf(function () { + return inst.shouldComponentUpdate(nextProps, nextState, nextContext); + }, this._debugID, 'shouldComponentUpdate'); + } else { + shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext); + } + } else { + if (this._compositeType === CompositeTypes.PureClass) { + shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState); + } + } + } + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0; + } + + this._updateBatchNumber = null; + if (shouldUpdate) { + this._pendingForceUpdate = false; + // Will set `this.props`, `this.state` and `this.context`. + this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext); + } else { + // If it's determined that a component should not update, we still want + // to set props and state but we shortcut the rest of the update. + this._currentElement = nextParentElement; + this._context = nextUnmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + } + }, + + _processPendingState: function (props, context) { + var inst = this._instance; + var queue = this._pendingStateQueue; + var replace = this._pendingReplaceState; + this._pendingReplaceState = false; + this._pendingStateQueue = null; + + if (!queue) { + return inst.state; + } + + if (replace && queue.length === 1) { + return queue[0]; + } + + var nextState = _assign({}, replace ? queue[0] : inst.state); + for (var i = replace ? 1 : 0; i < queue.length; i++) { + var partial = queue[i]; + _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial); + } + + return nextState; + }, + + /** + * Merges new props and state, notifies delegate methods of update and + * performs update. + * + * @param {ReactElement} nextElement Next element + * @param {object} nextProps Next public object to set as properties. + * @param {?object} nextState Next object to set as state. + * @param {?object} nextContext Next public object to set as context. + * @param {ReactReconcileTransaction} transaction + * @param {?object} unmaskedContext + * @private + */ + _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) { + var _this2 = this; + + var inst = this._instance; + + var hasComponentDidUpdate = Boolean(inst.componentDidUpdate); + var prevProps; + var prevState; + var prevContext; + if (hasComponentDidUpdate) { + prevProps = inst.props; + prevState = inst.state; + prevContext = inst.context; + } + + if (inst.componentWillUpdate) { + if (false) { + measureLifeCyclePerf(function () { + return inst.componentWillUpdate(nextProps, nextState, nextContext); + }, this._debugID, 'componentWillUpdate'); + } else { + inst.componentWillUpdate(nextProps, nextState, nextContext); + } + } + + this._currentElement = nextElement; + this._context = unmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + + this._updateRenderedComponent(transaction, unmaskedContext); + + if (hasComponentDidUpdate) { + if (false) { + transaction.getReactMountReady().enqueue(function () { + measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate'); + }); + } else { + transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); + } + } + }, + + /** + * Call the component's `render` method and update the DOM accordingly. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + _updateRenderedComponent: function (transaction, context) { + var prevComponentInstance = this._renderedComponent; + var prevRenderedElement = prevComponentInstance._currentElement; + var nextRenderedElement = this._renderValidatedComponent(); + + var debugID = 0; + if (false) { + debugID = this._debugID; + } + + if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { + ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context)); + } else { + var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance); + ReactReconciler.unmountComponent(prevComponentInstance, false); + + var nodeType = ReactNodeTypes.getType(nextRenderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ + ); + this._renderedComponent = child; + + var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID); + + if (false) { + if (debugID !== 0) { + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); + } + } + + this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance); + } + }, + + /** + * Overridden in shallow rendering. + * + * @protected + */ + _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) { + ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance); + }, + + /** + * @protected + */ + _renderValidatedComponentWithoutOwnerOrContext: function () { + var inst = this._instance; + var renderedElement; + + if (false) { + renderedElement = measureLifeCyclePerf(function () { + return inst.render(); + }, this._debugID, 'render'); + } else { + renderedElement = inst.render(); + } + + if (false) { + // We allow auto-mocks to proceed as if they're returning null. + if (renderedElement === undefined && inst.render._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + renderedElement = null; + } + } + + return renderedElement; + }, + + /** + * @private + */ + _renderValidatedComponent: function () { + var renderedElement; + if ('production' !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) { + ReactCurrentOwner.current = this; + try { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } finally { + ReactCurrentOwner.current = null; + } + } else { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } + !( + // TODO: An `isValidNode` function would probably be more appropriate + renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? false ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0; + + return renderedElement; + }, + + /** + * Lazily allocates the refs object and stores `component` as `ref`. + * + * @param {string} ref Reference name. + * @param {component} component Component to store as `ref`. + * @final + * @private + */ + attachRef: function (ref, component) { + var inst = this.getPublicInstance(); + !(inst != null) ? false ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0; + var publicComponentInstance = component.getPublicInstance(); + if (false) { + var componentName = component && component.getName ? component.getName() : 'a component'; + process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0; + } + var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs; + refs[ref] = publicComponentInstance; + }, + + /** + * Detaches a reference name. + * + * @param {string} ref Name to dereference. + * @final + * @private + */ + detachRef: function (ref) { + var refs = this.getPublicInstance().refs; + delete refs[ref]; + }, + + /** + * Get a text description of the component that can be used to identify it + * in error messages. + * @return {string} The name or null. + * @internal + */ + getName: function () { + var type = this._currentElement.type; + var constructor = this._instance && this._instance.constructor; + return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null; + }, + + /** + * Get the publicly accessible representation of this component - i.e. what + * is exposed by refs and returned by render. Can be null for stateless + * components. + * + * @return {ReactComponent} the public component instance. + * @internal + */ + getPublicInstance: function () { + var inst = this._instance; + if (this._compositeType === CompositeTypes.StatelessFunctional) { + return null; + } + return inst; + }, + + // Stub + _instantiateReactComponent: null +}; + +module.exports = ReactCompositeComponent; + +/***/ }), +/* 392 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var nextDebugID = 1; + +function getNextDebugID() { + return nextDebugID++; +} + +module.exports = getNextDebugID; + +/***/ }), +/* 393 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +// The Symbol used to tag the ReactElement type. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. + +var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; + +module.exports = REACT_ELEMENT_TYPE; + +/***/ }), +/* 394 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/* global Symbol */ + +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + +/** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ +function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } +} + +module.exports = getIteratorFn; + +/***/ }), +/* 395 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var KeyEscapeUtils = __webpack_require__(152); +var traverseAllChildren = __webpack_require__(234); +var warning = __webpack_require__(12); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && Object({"NODE_ENV":'production'}) && 'production' === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(235); +} + +/** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + * @param {number=} selfDebugID Optional debugID of the current internal instance. + */ +function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + // We found a component instance. + if (traverseContext && typeof traverseContext === 'object') { + var result = traverseContext; + var keyUnique = result[name] === undefined; + if (false) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook'); + } + if (!keyUnique) { + process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; + } + } + if (keyUnique && child != null) { + result[name] = child; + } + } +} + +/** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ +function flattenChildren(children, selfDebugID) { + if (children == null) { + return children; + } + var result = {}; + + if (false) { + traverseAllChildren(children, function (traverseContext, child, name) { + return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); + }, result); + } else { + traverseAllChildren(children, flattenSingleChildIntoContext, result); + } + return result; +} + +module.exports = flattenChildren; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(229))) + +/***/ }), +/* 396 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var PooledClass = __webpack_require__(53); +var Transaction = __webpack_require__(104); +var ReactInstrumentation = __webpack_require__(29); +var ReactServerUpdateQueue = __webpack_require__(397); + +/** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ +var TRANSACTION_WRAPPERS = []; + +if (false) { + TRANSACTION_WRAPPERS.push({ + initialize: ReactInstrumentation.debugTool.onBeginFlush, + close: ReactInstrumentation.debugTool.onEndFlush + }); +} + +var noopCallbackQueue = { + enqueue: function () {} +}; + +/** + * @class ReactServerRenderingTransaction + * @param {boolean} renderToStaticMarkup + */ +function ReactServerRenderingTransaction(renderToStaticMarkup) { + this.reinitializeTransaction(); + this.renderToStaticMarkup = renderToStaticMarkup; + this.useCreateElement = false; + this.updateQueue = new ReactServerUpdateQueue(this); +} + +var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array} Empty list of operation wrap procedures. + */ + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function () { + return noopCallbackQueue; + }, + + /** + * @return {object} The queue to collect React async events. + */ + getUpdateQueue: function () { + return this.updateQueue; + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be reused. + */ + destructor: function () {}, + + checkpoint: function () {}, + + rollback: function () {} +}; + +_assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin); + +PooledClass.addPoolingTo(ReactServerRenderingTransaction); + +module.exports = ReactServerRenderingTransaction; + +/***/ }), +/* 397 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var ReactUpdateQueue = __webpack_require__(153); + +var warning = __webpack_require__(12); + +function warnNoop(publicInstance, callerName) { + if (false) { + var constructor = publicInstance.constructor; + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; + } +} + +/** + * This is the update queue used for server rendering. + * It delegates to ReactUpdateQueue while server rendering is in progress and + * switches to ReactNoopUpdateQueue after the transaction has completed. + * @class ReactServerUpdateQueue + * @param {Transaction} transaction + */ + +var ReactServerUpdateQueue = function () { + function ReactServerUpdateQueue(transaction) { + _classCallCheck(this, ReactServerUpdateQueue); + + this.transaction = transaction; + } + + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + + + ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) { + return false; + }; + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName); + } + }; + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueForceUpdate(publicInstance); + } else { + warnNoop(publicInstance, 'forceUpdate'); + } + }; + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object|function} completeState Next state. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState); + } else { + warnNoop(publicInstance, 'replaceState'); + } + }; + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object|function} partialState Next partial state to be merged with state. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueSetState(publicInstance, partialState); + } else { + warnNoop(publicInstance, 'setState'); + } + }; + + return ReactServerUpdateQueue; +}(); + +module.exports = ReactServerUpdateQueue; + +/***/ }), +/* 398 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var DOMLazyTree = __webpack_require__(72); +var ReactDOMComponentTree = __webpack_require__(16); + +var ReactDOMEmptyComponent = function (instantiate) { + // ReactCompositeComponent uses this: + this._currentElement = null; + // ReactDOMComponentTree uses these: + this._hostNode = null; + this._hostParent = null; + this._hostContainerInfo = null; + this._domID = 0; +}; +_assign(ReactDOMEmptyComponent.prototype, { + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + var domID = hostContainerInfo._idCounter++; + this._domID = domID; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var nodeValue = ' react-empty: ' + this._domID + ' '; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var node = ownerDocument.createComment(nodeValue); + ReactDOMComponentTree.precacheNode(this, node); + return DOMLazyTree(node); + } else { + if (transaction.renderToStaticMarkup) { + // Normally we'd insert a comment node, but since this is a situation + // where React won't take over (static pages), we can simply return + // nothing. + return ''; + } + return '<!--' + nodeValue + '-->'; + } + }, + receiveComponent: function () {}, + getHostNode: function () { + return ReactDOMComponentTree.getNodeFromInstance(this); + }, + unmountComponent: function () { + ReactDOMComponentTree.uncacheNode(this); + } +}); + +module.exports = ReactDOMEmptyComponent; + +/***/ }), +/* 399 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(9); + +/** + * Return the lowest common ancestor of A and B, or null if they are in + * different trees. + */ +function getLowestCommonAncestor(instA, instB) { + !('_hostNode' in instA) ? false ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; + !('_hostNode' in instB) ? false ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; + + var depthA = 0; + for (var tempA = instA; tempA; tempA = tempA._hostParent) { + depthA++; + } + var depthB = 0; + for (var tempB = instB; tempB; tempB = tempB._hostParent) { + depthB++; + } + + // If A is deeper, crawl up. + while (depthA - depthB > 0) { + instA = instA._hostParent; + depthA--; + } + + // If B is deeper, crawl up. + while (depthB - depthA > 0) { + instB = instB._hostParent; + depthB--; + } + + // Walk in lockstep until we find a match. + var depth = depthA; + while (depth--) { + if (instA === instB) { + return instA; + } + instA = instA._hostParent; + instB = instB._hostParent; + } + return null; +} + +/** + * Return if A is an ancestor of B. + */ +function isAncestor(instA, instB) { + !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; + !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; + + while (instB) { + if (instB === instA) { + return true; + } + instB = instB._hostParent; + } + return false; +} + +/** + * Return the parent instance of the passed-in instance. + */ +function getParentInstance(inst) { + !('_hostNode' in inst) ? false ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0; + + return inst._hostParent; +} + +/** + * Simulates the traversal of a two-phase, capture/bubble event dispatch. + */ +function traverseTwoPhase(inst, fn, arg) { + var path = []; + while (inst) { + path.push(inst); + inst = inst._hostParent; + } + var i; + for (i = path.length; i-- > 0;) { + fn(path[i], 'captured', arg); + } + for (i = 0; i < path.length; i++) { + fn(path[i], 'bubbled', arg); + } +} + +/** + * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that + * should would receive a `mouseEnter` or `mouseLeave` event. + * + * Does not invoke the callback on the nearest common ancestor because nothing + * "entered" or "left" that element. + */ +function traverseEnterLeave(from, to, fn, argFrom, argTo) { + var common = from && to ? getLowestCommonAncestor(from, to) : null; + var pathFrom = []; + while (from && from !== common) { + pathFrom.push(from); + from = from._hostParent; + } + var pathTo = []; + while (to && to !== common) { + pathTo.push(to); + to = to._hostParent; + } + var i; + for (i = 0; i < pathFrom.length; i++) { + fn(pathFrom[i], 'bubbled', argFrom); + } + for (i = pathTo.length; i-- > 0;) { + fn(pathTo[i], 'captured', argTo); + } +} + +module.exports = { + isAncestor: isAncestor, + getLowestCommonAncestor: getLowestCommonAncestor, + getParentInstance: getParentInstance, + traverseTwoPhase: traverseTwoPhase, + traverseEnterLeave: traverseEnterLeave +}; + +/***/ }), +/* 400 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(15); + +var DOMChildrenOperations = __webpack_require__(146); +var DOMLazyTree = __webpack_require__(72); +var ReactDOMComponentTree = __webpack_require__(16); + +var escapeTextContentForBrowser = __webpack_require__(107); +var invariant = __webpack_require__(9); +var validateDOMNesting = __webpack_require__(154); + +/** + * Text nodes violate a couple assumptions that React makes about components: + * + * - When mounting text into the DOM, adjacent text nodes are merged. + * - Text nodes cannot be assigned a React root ID. + * + * This component is used to wrap strings between comment nodes so that they + * can undergo the same reconciliation that is applied to elements. + * + * TODO: Investigate representing React components in the DOM with text nodes. + * + * @class ReactDOMTextComponent + * @extends ReactComponent + * @internal + */ +var ReactDOMTextComponent = function (text) { + // TODO: This is really a ReactText (ReactNode), not a ReactElement + this._currentElement = text; + this._stringText = '' + text; + // ReactDOMComponentTree uses these: + this._hostNode = null; + this._hostParent = null; + + // Properties + this._domID = 0; + this._mountIndex = 0; + this._closingComment = null; + this._commentNodes = null; +}; + +_assign(ReactDOMTextComponent.prototype, { + /** + * Creates the markup for this text node. This node is not intended to have + * any features besides containing text content. + * + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {string} Markup for this text node. + * @internal + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + if (false) { + var parentInfo; + if (hostParent != null) { + parentInfo = hostParent._ancestorInfo; + } else if (hostContainerInfo != null) { + parentInfo = hostContainerInfo._ancestorInfo; + } + if (parentInfo) { + // parentInfo should always be present except for the top-level + // component when server rendering + validateDOMNesting(null, this._stringText, this, parentInfo); + } + } + + var domID = hostContainerInfo._idCounter++; + var openingValue = ' react-text: ' + domID + ' '; + var closingValue = ' /react-text '; + this._domID = domID; + this._hostParent = hostParent; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var openingComment = ownerDocument.createComment(openingValue); + var closingComment = ownerDocument.createComment(closingValue); + var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment()); + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment)); + if (this._stringText) { + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText))); + } + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment)); + ReactDOMComponentTree.precacheNode(this, openingComment); + this._closingComment = closingComment; + return lazyTree; + } else { + var escapedText = escapeTextContentForBrowser(this._stringText); + + if (transaction.renderToStaticMarkup) { + // Normally we'd wrap this between comment nodes for the reasons stated + // above, but since this is a situation where React won't take over + // (static pages), we can simply return the text as it is. + return escapedText; + } + + return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->'; + } + }, + + /** + * Updates this component by updating the text content. + * + * @param {ReactText} nextText The next text content + * @param {ReactReconcileTransaction} transaction + * @internal + */ + receiveComponent: function (nextText, transaction) { + if (nextText !== this._currentElement) { + this._currentElement = nextText; + var nextStringText = '' + nextText; + if (nextStringText !== this._stringText) { + // TODO: Save this as pending props and use performUpdateIfNecessary + // and/or updateComponent to do the actual update for consistency with + // other component types? + this._stringText = nextStringText; + var commentNodes = this.getHostNode(); + DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText); + } + } + }, + + getHostNode: function () { + var hostNode = this._commentNodes; + if (hostNode) { + return hostNode; + } + if (!this._closingComment) { + var openingComment = ReactDOMComponentTree.getNodeFromInstance(this); + var node = openingComment.nextSibling; + while (true) { + !(node != null) ? false ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0; + if (node.nodeType === 8 && node.nodeValue === ' /react-text ') { + this._closingComment = node; + break; + } + node = node.nextSibling; + } + } + hostNode = [this._hostNode, this._closingComment]; + this._commentNodes = hostNode; + return hostNode; + }, + + unmountComponent: function () { + this._closingComment = null; + this._commentNodes = null; + ReactDOMComponentTree.uncacheNode(this); + } +}); + +module.exports = ReactDOMTextComponent; + +/***/ }), +/* 401 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var ReactUpdates = __webpack_require__(31); +var Transaction = __webpack_require__(104); + +var emptyFunction = __webpack_require__(24); + +var RESET_BATCHED_UPDATES = { + initialize: emptyFunction, + close: function () { + ReactDefaultBatchingStrategy.isBatchingUpdates = false; + } +}; + +var FLUSH_BATCHED_UPDATES = { + initialize: emptyFunction, + close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates) +}; + +var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES]; + +function ReactDefaultBatchingStrategyTransaction() { + this.reinitializeTransaction(); +} + +_assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, { + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + } +}); + +var transaction = new ReactDefaultBatchingStrategyTransaction(); + +var ReactDefaultBatchingStrategy = { + isBatchingUpdates: false, + + /** + * Call the provided function in a context within which calls to `setState` + * and friends are batched such that components aren't updated unnecessarily. + */ + batchedUpdates: function (callback, a, b, c, d, e) { + var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; + + ReactDefaultBatchingStrategy.isBatchingUpdates = true; + + // The code is written this way to avoid extra allocations + if (alreadyBatchingUpdates) { + return callback(a, b, c, d, e); + } else { + return transaction.perform(callback, null, a, b, c, d, e); + } + } +}; + +module.exports = ReactDefaultBatchingStrategy; + +/***/ }), +/* 402 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var EventListener = __webpack_require__(236); +var ExecutionEnvironment = __webpack_require__(21); +var PooledClass = __webpack_require__(53); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactUpdates = __webpack_require__(31); + +var getEventTarget = __webpack_require__(142); +var getUnboundedScrollPosition = __webpack_require__(403); + +/** + * Find the deepest React component completely containing the root of the + * passed-in instance (for use when entire React trees are nested within each + * other). If React trees are not nested, returns null. + */ +function findParent(inst) { + // TODO: It may be a good idea to cache this to prevent unnecessary DOM + // traversal, but caching is difficult to do correctly without using a + // mutation observer to listen for all DOM changes. + while (inst._hostParent) { + inst = inst._hostParent; + } + var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst); + var container = rootNode.parentNode; + return ReactDOMComponentTree.getClosestInstanceFromNode(container); +} + +// Used to store ancestor hierarchy in top level callback +function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { + this.topLevelType = topLevelType; + this.nativeEvent = nativeEvent; + this.ancestors = []; +} +_assign(TopLevelCallbackBookKeeping.prototype, { + destructor: function () { + this.topLevelType = null; + this.nativeEvent = null; + this.ancestors.length = 0; + } +}); +PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler); + +function handleTopLevelImpl(bookKeeping) { + var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent); + var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget); + + // Loop through the hierarchy, in case there's any nested components. + // It's important that we build the array of ancestors before calling any + // event handlers, because event handlers can modify the DOM, leading to + // inconsistencies with ReactMount's node cache. See #1105. + var ancestor = targetInst; + do { + bookKeeping.ancestors.push(ancestor); + ancestor = ancestor && findParent(ancestor); + } while (ancestor); + + for (var i = 0; i < bookKeeping.ancestors.length; i++) { + targetInst = bookKeeping.ancestors[i]; + ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); + } +} + +function scrollValueMonitor(cb) { + var scrollPosition = getUnboundedScrollPosition(window); + cb(scrollPosition); +} + +var ReactEventListener = { + _enabled: true, + _handleTopLevel: null, + + WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, + + setHandleTopLevel: function (handleTopLevel) { + ReactEventListener._handleTopLevel = handleTopLevel; + }, + + setEnabled: function (enabled) { + ReactEventListener._enabled = !!enabled; + }, + + isEnabled: function () { + return ReactEventListener._enabled; + }, + + /** + * Traps top-level events by using event bubbling. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} element Element on which to attach listener. + * @return {?object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapBubbledEvent: function (topLevelType, handlerBaseName, element) { + if (!element) { + return null; + } + return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); + }, + + /** + * Traps a top-level event by using event capturing. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} element Element on which to attach listener. + * @return {?object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapCapturedEvent: function (topLevelType, handlerBaseName, element) { + if (!element) { + return null; + } + return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); + }, + + monitorScrollValue: function (refresh) { + var callback = scrollValueMonitor.bind(null, refresh); + EventListener.listen(window, 'scroll', callback); + }, + + dispatchEvent: function (topLevelType, nativeEvent) { + if (!ReactEventListener._enabled) { + return; + } + + var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent); + try { + // Event queue being processed in the same cycle allows + // `preventDefault`. + ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping); + } finally { + TopLevelCallbackBookKeeping.release(bookKeeping); + } + } +}; + +module.exports = ReactEventListener; + +/***/ }), +/* 403 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + + +/** + * Gets the scroll position of the supplied element or window. + * + * The return values are unbounded, unlike `getScrollPosition`. This means they + * may be negative or exceed the element boundaries (which is possible using + * inertial scrolling). + * + * @param {DOMWindow|DOMElement} scrollable + * @return {object} Map with `x` and `y` keys. + */ + +function getUnboundedScrollPosition(scrollable) { + if (scrollable.Window && scrollable instanceof scrollable.Window) { + return { + x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft, + y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop + }; + } + return { + x: scrollable.scrollLeft, + y: scrollable.scrollTop + }; +} + +module.exports = getUnboundedScrollPosition; + +/***/ }), +/* 404 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMProperty = __webpack_require__(67); +var EventPluginHub = __webpack_require__(69); +var EventPluginUtils = __webpack_require__(103); +var ReactComponentEnvironment = __webpack_require__(150); +var ReactEmptyComponent = __webpack_require__(232); +var ReactBrowserEventEmitter = __webpack_require__(108); +var ReactHostComponent = __webpack_require__(233); +var ReactUpdates = __webpack_require__(31); + +var ReactInjection = { + Component: ReactComponentEnvironment.injection, + DOMProperty: DOMProperty.injection, + EmptyComponent: ReactEmptyComponent.injection, + EventPluginHub: EventPluginHub.injection, + EventPluginUtils: EventPluginUtils.injection, + EventEmitter: ReactBrowserEventEmitter.injection, + HostComponent: ReactHostComponent.injection, + Updates: ReactUpdates.injection +}; + +module.exports = ReactInjection; + +/***/ }), +/* 405 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(15); + +var CallbackQueue = __webpack_require__(220); +var PooledClass = __webpack_require__(53); +var ReactBrowserEventEmitter = __webpack_require__(108); +var ReactInputSelection = __webpack_require__(237); +var ReactInstrumentation = __webpack_require__(29); +var Transaction = __webpack_require__(104); +var ReactUpdateQueue = __webpack_require__(153); + +/** + * Ensures that, when possible, the selection range (currently selected text + * input) is not disturbed by performing the transaction. + */ +var SELECTION_RESTORATION = { + /** + * @return {Selection} Selection information. + */ + initialize: ReactInputSelection.getSelectionInformation, + /** + * @param {Selection} sel Selection information returned from `initialize`. + */ + close: ReactInputSelection.restoreSelection +}; + +/** + * Suppresses events (blur/focus) that could be inadvertently dispatched due to + * high level DOM manipulations (like temporarily removing a text input from the + * DOM). + */ +var EVENT_SUPPRESSION = { + /** + * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before + * the reconciliation. + */ + initialize: function () { + var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); + ReactBrowserEventEmitter.setEnabled(false); + return currentlyEnabled; + }, + + /** + * @param {boolean} previouslyEnabled Enabled status of + * `ReactBrowserEventEmitter` before the reconciliation occurred. `close` + * restores the previous value. + */ + close: function (previouslyEnabled) { + ReactBrowserEventEmitter.setEnabled(previouslyEnabled); + } +}; + +/** + * Provides a queue for collecting `componentDidMount` and + * `componentDidUpdate` callbacks during the transaction. + */ +var ON_DOM_READY_QUEUEING = { + /** + * Initializes the internal `onDOMReady` queue. + */ + initialize: function () { + this.reactMountReady.reset(); + }, + + /** + * After DOM is flushed, invoke all registered `onDOMReady` callbacks. + */ + close: function () { + this.reactMountReady.notifyAll(); + } +}; + +/** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ +var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING]; + +if (false) { + TRANSACTION_WRAPPERS.push({ + initialize: ReactInstrumentation.debugTool.onBeginFlush, + close: ReactInstrumentation.debugTool.onEndFlush + }); +} + +/** + * Currently: + * - The order that these are listed in the transaction is critical: + * - Suppresses events. + * - Restores selection range. + * + * Future: + * - Restore document/overflow scroll positions that were unintentionally + * modified via DOM insertions above the top viewport boundary. + * - Implement/integrate with customized constraint based layout system and keep + * track of which dimensions must be remeasured. + * + * @class ReactReconcileTransaction + */ +function ReactReconcileTransaction(useCreateElement) { + this.reinitializeTransaction(); + // Only server-side rendering really needs this option (see + // `ReactServerRendering`), but server-side uses + // `ReactServerRenderingTransaction` instead. This option is here so that it's + // accessible and defaults to false when `ReactDOMComponent` and + // `ReactDOMTextComponent` checks it in `mountComponent`.` + this.renderToStaticMarkup = false; + this.reactMountReady = CallbackQueue.getPooled(null); + this.useCreateElement = useCreateElement; +} + +var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array<object>} List of operation wrap procedures. + * TODO: convert to array<TransactionWrapper> + */ + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function () { + return this.reactMountReady; + }, + + /** + * @return {object} The queue to collect React async events. + */ + getUpdateQueue: function () { + return ReactUpdateQueue; + }, + + /** + * Save current transaction state -- if the return value from this method is + * passed to `rollback`, the transaction will be reset to that state. + */ + checkpoint: function () { + // reactMountReady is the our only stateful wrapper + return this.reactMountReady.checkpoint(); + }, + + rollback: function (checkpoint) { + this.reactMountReady.rollback(checkpoint); + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be reused. + */ + destructor: function () { + CallbackQueue.release(this.reactMountReady); + this.reactMountReady = null; + } +}; + +_assign(ReactReconcileTransaction.prototype, Transaction, Mixin); + +PooledClass.addPoolingTo(ReactReconcileTransaction); + +module.exports = ReactReconcileTransaction; + +/***/ }), +/* 406 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(21); + +var getNodeForCharacterOffset = __webpack_require__(407); +var getTextContentAccessor = __webpack_require__(219); + +/** + * While `isCollapsed` is available on the Selection object and `collapsed` + * is available on the Range object, IE11 sometimes gets them wrong. + * If the anchor/focus nodes and offsets are the same, the range is collapsed. + */ +function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { + return anchorNode === focusNode && anchorOffset === focusOffset; +} + +/** + * Get the appropriate anchor and focus node/offset pairs for IE. + * + * The catch here is that IE's selection API doesn't provide information + * about whether the selection is forward or backward, so we have to + * behave as though it's always forward. + * + * IE text differs from modern selection in that it behaves as though + * block elements end with a new line. This means character offsets will + * differ between the two APIs. + * + * @param {DOMElement} node + * @return {object} + */ +function getIEOffsets(node) { + var selection = document.selection; + var selectedRange = selection.createRange(); + var selectedLength = selectedRange.text.length; + + // Duplicate selection so we can move range without breaking user selection. + var fromStart = selectedRange.duplicate(); + fromStart.moveToElementText(node); + fromStart.setEndPoint('EndToStart', selectedRange); + + var startOffset = fromStart.text.length; + var endOffset = startOffset + selectedLength; + + return { + start: startOffset, + end: endOffset + }; +} + +/** + * @param {DOMElement} node + * @return {?object} + */ +function getModernOffsets(node) { + var selection = window.getSelection && window.getSelection(); + + if (!selection || selection.rangeCount === 0) { + return null; + } + + var anchorNode = selection.anchorNode; + var anchorOffset = selection.anchorOffset; + var focusNode = selection.focusNode; + var focusOffset = selection.focusOffset; + + var currentRange = selection.getRangeAt(0); + + // In Firefox, range.startContainer and range.endContainer can be "anonymous + // divs", e.g. the up/down buttons on an <input type="number">. Anonymous + // divs do not seem to expose properties, triggering a "Permission denied + // error" if any of its properties are accessed. The only seemingly possible + // way to avoid erroring is to access a property that typically works for + // non-anonymous divs and catch any error that may otherwise arise. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 + try { + /* eslint-disable no-unused-expressions */ + currentRange.startContainer.nodeType; + currentRange.endContainer.nodeType; + /* eslint-enable no-unused-expressions */ + } catch (e) { + return null; + } + + // If the node and offset values are the same, the selection is collapsed. + // `Selection.isCollapsed` is available natively, but IE sometimes gets + // this value wrong. + var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset); + + var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length; + + var tempRange = currentRange.cloneRange(); + tempRange.selectNodeContents(node); + tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); + + var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset); + + var start = isTempRangeCollapsed ? 0 : tempRange.toString().length; + var end = start + rangeLength; + + // Detect whether the selection is backward. + var detectionRange = document.createRange(); + detectionRange.setStart(anchorNode, anchorOffset); + detectionRange.setEnd(focusNode, focusOffset); + var isBackward = detectionRange.collapsed; + + return { + start: isBackward ? end : start, + end: isBackward ? start : end + }; +} + +/** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ +function setIEOffsets(node, offsets) { + var range = document.selection.createRange().duplicate(); + var start, end; + + if (offsets.end === undefined) { + start = offsets.start; + end = start; + } else if (offsets.start > offsets.end) { + start = offsets.end; + end = offsets.start; + } else { + start = offsets.start; + end = offsets.end; + } + + range.moveToElementText(node); + range.moveStart('character', start); + range.setEndPoint('EndToStart', range); + range.moveEnd('character', end - start); + range.select(); +} + +/** + * In modern non-IE browsers, we can support both forward and backward + * selections. + * + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programmatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. + * + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ +function setModernOffsets(node, offsets) { + if (!window.getSelection) { + return; + } + + var selection = window.getSelection(); + var length = node[getTextContentAccessor()].length; + var start = Math.min(offsets.start, length); + var end = offsets.end === undefined ? start : Math.min(offsets.end, length); + + // IE 11 uses modern selection, but doesn't support the extend method. + // Flip backward selections, so we can set with a single range. + if (!selection.extend && start > end) { + var temp = end; + end = start; + start = temp; + } + + var startMarker = getNodeForCharacterOffset(node, start); + var endMarker = getNodeForCharacterOffset(node, end); + + if (startMarker && endMarker) { + var range = document.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + + if (start > end) { + selection.addRange(range); + selection.extend(endMarker.node, endMarker.offset); + } else { + range.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range); + } + } +} + +var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window); + +var ReactDOMSelection = { + /** + * @param {DOMElement} node + */ + getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, + + /** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets +}; + +module.exports = ReactDOMSelection; + +/***/ }), +/* 407 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Given any node return the first leaf node without children. + * + * @param {DOMElement|DOMTextNode} node + * @return {DOMElement|DOMTextNode} + */ + +function getLeafNode(node) { + while (node && node.firstChild) { + node = node.firstChild; + } + return node; +} + +/** + * Get the next sibling within a container. This will walk up the + * DOM if a node's siblings have been exhausted. + * + * @param {DOMElement|DOMTextNode} node + * @return {?DOMElement|DOMTextNode} + */ +function getSiblingNode(node) { + while (node) { + if (node.nextSibling) { + return node.nextSibling; + } + node = node.parentNode; + } +} + +/** + * Get object describing the nodes which contain characters at offset. + * + * @param {DOMElement|DOMTextNode} root + * @param {number} offset + * @return {?object} + */ +function getNodeForCharacterOffset(root, offset) { + var node = getLeafNode(root); + var nodeStart = 0; + var nodeEnd = 0; + + while (node) { + if (node.nodeType === 3) { + nodeEnd = nodeStart + node.textContent.length; + + if (nodeStart <= offset && nodeEnd >= offset) { + return { + node: node, + offset: offset - nodeStart + }; + } + + nodeStart = nodeEnd; + } + + node = getLeafNode(getSiblingNode(node)); + } +} + +module.exports = getNodeForCharacterOffset; + +/***/ }), +/* 408 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + +var isTextNode = __webpack_require__(409); + +/*eslint-disable no-bitwise */ + +/** + * Checks if a given DOM node contains or is another DOM node. + */ +function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } +} + +module.exports = containsNode; + +/***/ }), +/* 409 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var isNode = __webpack_require__(410); + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM text node. + */ +function isTextNode(object) { + return isNode(object) && object.nodeType == 3; +} + +module.exports = isTextNode; + +/***/ }), +/* 410 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM node. + */ +function isNode(object) { + var doc = object ? object.ownerDocument || object : document; + var defaultView = doc.defaultView || window; + return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); +} + +module.exports = isNode; + +/***/ }), +/* 411 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var NS = { + xlink: 'http://www.w3.org/1999/xlink', + xml: 'http://www.w3.org/XML/1998/namespace' +}; + +// We use attributes for everything SVG so let's avoid some duplication and run +// code instead. +// The following are all specified in the HTML config already so we exclude here. +// - class (as className) +// - color +// - height +// - id +// - lang +// - max +// - media +// - method +// - min +// - name +// - style +// - target +// - type +// - width +var ATTRS = { + accentHeight: 'accent-height', + accumulate: 0, + additive: 0, + alignmentBaseline: 'alignment-baseline', + allowReorder: 'allowReorder', + alphabetic: 0, + amplitude: 0, + arabicForm: 'arabic-form', + ascent: 0, + attributeName: 'attributeName', + attributeType: 'attributeType', + autoReverse: 'autoReverse', + azimuth: 0, + baseFrequency: 'baseFrequency', + baseProfile: 'baseProfile', + baselineShift: 'baseline-shift', + bbox: 0, + begin: 0, + bias: 0, + by: 0, + calcMode: 'calcMode', + capHeight: 'cap-height', + clip: 0, + clipPath: 'clip-path', + clipRule: 'clip-rule', + clipPathUnits: 'clipPathUnits', + colorInterpolation: 'color-interpolation', + colorInterpolationFilters: 'color-interpolation-filters', + colorProfile: 'color-profile', + colorRendering: 'color-rendering', + contentScriptType: 'contentScriptType', + contentStyleType: 'contentStyleType', + cursor: 0, + cx: 0, + cy: 0, + d: 0, + decelerate: 0, + descent: 0, + diffuseConstant: 'diffuseConstant', + direction: 0, + display: 0, + divisor: 0, + dominantBaseline: 'dominant-baseline', + dur: 0, + dx: 0, + dy: 0, + edgeMode: 'edgeMode', + elevation: 0, + enableBackground: 'enable-background', + end: 0, + exponent: 0, + externalResourcesRequired: 'externalResourcesRequired', + fill: 0, + fillOpacity: 'fill-opacity', + fillRule: 'fill-rule', + filter: 0, + filterRes: 'filterRes', + filterUnits: 'filterUnits', + floodColor: 'flood-color', + floodOpacity: 'flood-opacity', + focusable: 0, + fontFamily: 'font-family', + fontSize: 'font-size', + fontSizeAdjust: 'font-size-adjust', + fontStretch: 'font-stretch', + fontStyle: 'font-style', + fontVariant: 'font-variant', + fontWeight: 'font-weight', + format: 0, + from: 0, + fx: 0, + fy: 0, + g1: 0, + g2: 0, + glyphName: 'glyph-name', + glyphOrientationHorizontal: 'glyph-orientation-horizontal', + glyphOrientationVertical: 'glyph-orientation-vertical', + glyphRef: 'glyphRef', + gradientTransform: 'gradientTransform', + gradientUnits: 'gradientUnits', + hanging: 0, + horizAdvX: 'horiz-adv-x', + horizOriginX: 'horiz-origin-x', + ideographic: 0, + imageRendering: 'image-rendering', + 'in': 0, + in2: 0, + intercept: 0, + k: 0, + k1: 0, + k2: 0, + k3: 0, + k4: 0, + kernelMatrix: 'kernelMatrix', + kernelUnitLength: 'kernelUnitLength', + kerning: 0, + keyPoints: 'keyPoints', + keySplines: 'keySplines', + keyTimes: 'keyTimes', + lengthAdjust: 'lengthAdjust', + letterSpacing: 'letter-spacing', + lightingColor: 'lighting-color', + limitingConeAngle: 'limitingConeAngle', + local: 0, + markerEnd: 'marker-end', + markerMid: 'marker-mid', + markerStart: 'marker-start', + markerHeight: 'markerHeight', + markerUnits: 'markerUnits', + markerWidth: 'markerWidth', + mask: 0, + maskContentUnits: 'maskContentUnits', + maskUnits: 'maskUnits', + mathematical: 0, + mode: 0, + numOctaves: 'numOctaves', + offset: 0, + opacity: 0, + operator: 0, + order: 0, + orient: 0, + orientation: 0, + origin: 0, + overflow: 0, + overlinePosition: 'overline-position', + overlineThickness: 'overline-thickness', + paintOrder: 'paint-order', + panose1: 'panose-1', + pathLength: 'pathLength', + patternContentUnits: 'patternContentUnits', + patternTransform: 'patternTransform', + patternUnits: 'patternUnits', + pointerEvents: 'pointer-events', + points: 0, + pointsAtX: 'pointsAtX', + pointsAtY: 'pointsAtY', + pointsAtZ: 'pointsAtZ', + preserveAlpha: 'preserveAlpha', + preserveAspectRatio: 'preserveAspectRatio', + primitiveUnits: 'primitiveUnits', + r: 0, + radius: 0, + refX: 'refX', + refY: 'refY', + renderingIntent: 'rendering-intent', + repeatCount: 'repeatCount', + repeatDur: 'repeatDur', + requiredExtensions: 'requiredExtensions', + requiredFeatures: 'requiredFeatures', + restart: 0, + result: 0, + rotate: 0, + rx: 0, + ry: 0, + scale: 0, + seed: 0, + shapeRendering: 'shape-rendering', + slope: 0, + spacing: 0, + specularConstant: 'specularConstant', + specularExponent: 'specularExponent', + speed: 0, + spreadMethod: 'spreadMethod', + startOffset: 'startOffset', + stdDeviation: 'stdDeviation', + stemh: 0, + stemv: 0, + stitchTiles: 'stitchTiles', + stopColor: 'stop-color', + stopOpacity: 'stop-opacity', + strikethroughPosition: 'strikethrough-position', + strikethroughThickness: 'strikethrough-thickness', + string: 0, + stroke: 0, + strokeDasharray: 'stroke-dasharray', + strokeDashoffset: 'stroke-dashoffset', + strokeLinecap: 'stroke-linecap', + strokeLinejoin: 'stroke-linejoin', + strokeMiterlimit: 'stroke-miterlimit', + strokeOpacity: 'stroke-opacity', + strokeWidth: 'stroke-width', + surfaceScale: 'surfaceScale', + systemLanguage: 'systemLanguage', + tableValues: 'tableValues', + targetX: 'targetX', + targetY: 'targetY', + textAnchor: 'text-anchor', + textDecoration: 'text-decoration', + textRendering: 'text-rendering', + textLength: 'textLength', + to: 0, + transform: 0, + u1: 0, + u2: 0, + underlinePosition: 'underline-position', + underlineThickness: 'underline-thickness', + unicode: 0, + unicodeBidi: 'unicode-bidi', + unicodeRange: 'unicode-range', + unitsPerEm: 'units-per-em', + vAlphabetic: 'v-alphabetic', + vHanging: 'v-hanging', + vIdeographic: 'v-ideographic', + vMathematical: 'v-mathematical', + values: 0, + vectorEffect: 'vector-effect', + version: 0, + vertAdvY: 'vert-adv-y', + vertOriginX: 'vert-origin-x', + vertOriginY: 'vert-origin-y', + viewBox: 'viewBox', + viewTarget: 'viewTarget', + visibility: 0, + widths: 0, + wordSpacing: 'word-spacing', + writingMode: 'writing-mode', + x: 0, + xHeight: 'x-height', + x1: 0, + x2: 0, + xChannelSelector: 'xChannelSelector', + xlinkActuate: 'xlink:actuate', + xlinkArcrole: 'xlink:arcrole', + xlinkHref: 'xlink:href', + xlinkRole: 'xlink:role', + xlinkShow: 'xlink:show', + xlinkTitle: 'xlink:title', + xlinkType: 'xlink:type', + xmlBase: 'xml:base', + xmlns: 0, + xmlnsXlink: 'xmlns:xlink', + xmlLang: 'xml:lang', + xmlSpace: 'xml:space', + y: 0, + y1: 0, + y2: 0, + yChannelSelector: 'yChannelSelector', + z: 0, + zoomAndPan: 'zoomAndPan' +}; + +var SVGDOMPropertyConfig = { + Properties: {}, + DOMAttributeNamespaces: { + xlinkActuate: NS.xlink, + xlinkArcrole: NS.xlink, + xlinkHref: NS.xlink, + xlinkRole: NS.xlink, + xlinkShow: NS.xlink, + xlinkTitle: NS.xlink, + xlinkType: NS.xlink, + xmlBase: NS.xml, + xmlLang: NS.xml, + xmlSpace: NS.xml + }, + DOMAttributeNames: {} +}; + +Object.keys(ATTRS).forEach(function (key) { + SVGDOMPropertyConfig.Properties[key] = 0; + if (ATTRS[key]) { + SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key]; + } +}); + +module.exports = SVGDOMPropertyConfig; + +/***/ }), +/* 412 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPropagators = __webpack_require__(68); +var ExecutionEnvironment = __webpack_require__(21); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactInputSelection = __webpack_require__(237); +var SyntheticEvent = __webpack_require__(38); + +var getActiveElement = __webpack_require__(238); +var isTextInputElement = __webpack_require__(223); +var shallowEqual = __webpack_require__(87); + +var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; + +var eventTypes = { + select: { + phasedRegistrationNames: { + bubbled: 'onSelect', + captured: 'onSelectCapture' + }, + dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange'] + } +}; + +var activeElement = null; +var activeElementInst = null; +var lastSelection = null; +var mouseDown = false; + +// Track whether a listener exists for this plugin. If none exist, we do +// not extract events. See #3639. +var hasListener = false; + +/** + * Get an object which is a unique representation of the current selection. + * + * The return value will not be consistent across nodes or browsers, but + * two identical selections on the same node will return identical objects. + * + * @param {DOMElement} node + * @return {object} + */ +function getSelection(node) { + if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) { + return { + start: node.selectionStart, + end: node.selectionEnd + }; + } else if (window.getSelection) { + var selection = window.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset + }; + } else if (document.selection) { + var range = document.selection.createRange(); + return { + parentElement: range.parentElement(), + text: range.text, + top: range.boundingTop, + left: range.boundingLeft + }; + } +} + +/** + * Poll selection to see whether it's changed. + * + * @param {object} nativeEvent + * @return {?SyntheticEvent} + */ +function constructSelectEvent(nativeEvent, nativeEventTarget) { + // Ensure we have the right element, and that the user is not dragging a + // selection (this matches native `select` event behavior). In HTML5, select + // fires only on input and textarea thus if there's no focused element we + // won't dispatch. + if (mouseDown || activeElement == null || activeElement !== getActiveElement()) { + return null; + } + + // Only fire when selection has actually changed. + var currentSelection = getSelection(activeElement); + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; + + var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget); + + syntheticEvent.type = 'select'; + syntheticEvent.target = activeElement; + + EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent); + + return syntheticEvent; + } + + return null; +} + +/** + * This plugin creates an `onSelect` event that normalizes select events + * across form elements. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - contentEditable + * + * This differs from native browser implementations in the following ways: + * - Fires on contentEditable fields as well as inputs. + * - Fires for collapsed selection. + * - Fires after user input. + */ +var SelectEventPlugin = { + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (!hasListener) { + return null; + } + + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + + switch (topLevelType) { + // Track the input node that has focus. + case 'topFocus': + if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { + activeElement = targetNode; + activeElementInst = targetInst; + lastSelection = null; + } + break; + case 'topBlur': + activeElement = null; + activeElementInst = null; + lastSelection = null; + break; + // Don't fire the event while the user is dragging. This matches the + // semantics of the native select event. + case 'topMouseDown': + mouseDown = true; + break; + case 'topContextMenu': + case 'topMouseUp': + mouseDown = false; + return constructSelectEvent(nativeEvent, nativeEventTarget); + // Chrome and IE fire non-standard event when selection is changed (and + // sometimes when it hasn't). IE's event fires out of order with respect + // to key and input events on deletion, so we discard it. + // + // Firefox doesn't support selectionchange, so check selection status + // after each key entry. The selection changes after keydown and before + // keyup, but we check on keydown as well in the case of holding down a + // key, when multiple keydown events are fired but only one keyup is. + // This is also our approach for IE handling, for the reason above. + case 'topSelectionChange': + if (skipSelectionChangeEvent) { + break; + } + // falls through + case 'topKeyDown': + case 'topKeyUp': + return constructSelectEvent(nativeEvent, nativeEventTarget); + } + + return null; + }, + + didPutListener: function (inst, registrationName, listener) { + if (registrationName === 'onSelect') { + hasListener = true; + } + } +}; + +module.exports = SelectEventPlugin; + +/***/ }), +/* 413 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var EventListener = __webpack_require__(236); +var EventPropagators = __webpack_require__(68); +var ReactDOMComponentTree = __webpack_require__(16); +var SyntheticAnimationEvent = __webpack_require__(414); +var SyntheticClipboardEvent = __webpack_require__(415); +var SyntheticEvent = __webpack_require__(38); +var SyntheticFocusEvent = __webpack_require__(416); +var SyntheticKeyboardEvent = __webpack_require__(417); +var SyntheticMouseEvent = __webpack_require__(105); +var SyntheticDragEvent = __webpack_require__(419); +var SyntheticTouchEvent = __webpack_require__(420); +var SyntheticTransitionEvent = __webpack_require__(421); +var SyntheticUIEvent = __webpack_require__(71); +var SyntheticWheelEvent = __webpack_require__(422); + +var emptyFunction = __webpack_require__(24); +var getEventCharCode = __webpack_require__(155); +var invariant = __webpack_require__(9); + +/** + * Turns + * ['abort', ...] + * into + * eventTypes = { + * 'abort': { + * phasedRegistrationNames: { + * bubbled: 'onAbort', + * captured: 'onAbortCapture', + * }, + * dependencies: ['topAbort'], + * }, + * ... + * }; + * topLevelEventsToDispatchConfig = { + * 'topAbort': { sameConfig } + * }; + */ +var eventTypes = {}; +var topLevelEventsToDispatchConfig = {}; +['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) { + var capitalizedEvent = event[0].toUpperCase() + event.slice(1); + var onEvent = 'on' + capitalizedEvent; + var topEvent = 'top' + capitalizedEvent; + + var type = { + phasedRegistrationNames: { + bubbled: onEvent, + captured: onEvent + 'Capture' + }, + dependencies: [topEvent] + }; + eventTypes[event] = type; + topLevelEventsToDispatchConfig[topEvent] = type; +}); + +var onClickListeners = {}; + +function getDictionaryKey(inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 + return '.' + inst._rootNodeID; +} + +function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; +} + +var SimpleEventPlugin = { + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + if (!dispatchConfig) { + return null; + } + var EventConstructor; + switch (topLevelType) { + case 'topAbort': + case 'topCanPlay': + case 'topCanPlayThrough': + case 'topDurationChange': + case 'topEmptied': + case 'topEncrypted': + case 'topEnded': + case 'topError': + case 'topInput': + case 'topInvalid': + case 'topLoad': + case 'topLoadedData': + case 'topLoadedMetadata': + case 'topLoadStart': + case 'topPause': + case 'topPlay': + case 'topPlaying': + case 'topProgress': + case 'topRateChange': + case 'topReset': + case 'topSeeked': + case 'topSeeking': + case 'topStalled': + case 'topSubmit': + case 'topSuspend': + case 'topTimeUpdate': + case 'topVolumeChange': + case 'topWaiting': + // HTML Events + // @see http://www.w3.org/TR/html5/index.html#events-0 + EventConstructor = SyntheticEvent; + break; + case 'topKeyPress': + // Firefox creates a keypress event for function keys too. This removes + // the unwanted keypress events. Enter is however both printable and + // non-printable. One would expect Tab to be as well (but it isn't). + if (getEventCharCode(nativeEvent) === 0) { + return null; + } + /* falls through */ + case 'topKeyDown': + case 'topKeyUp': + EventConstructor = SyntheticKeyboardEvent; + break; + case 'topBlur': + case 'topFocus': + EventConstructor = SyntheticFocusEvent; + break; + case 'topClick': + // Firefox creates a click event on right mouse clicks. This removes the + // unwanted click events. + if (nativeEvent.button === 2) { + return null; + } + /* falls through */ + case 'topDoubleClick': + case 'topMouseDown': + case 'topMouseMove': + case 'topMouseUp': + // TODO: Disabled elements should not respond to mouse events + /* falls through */ + case 'topMouseOut': + case 'topMouseOver': + case 'topContextMenu': + EventConstructor = SyntheticMouseEvent; + break; + case 'topDrag': + case 'topDragEnd': + case 'topDragEnter': + case 'topDragExit': + case 'topDragLeave': + case 'topDragOver': + case 'topDragStart': + case 'topDrop': + EventConstructor = SyntheticDragEvent; + break; + case 'topTouchCancel': + case 'topTouchEnd': + case 'topTouchMove': + case 'topTouchStart': + EventConstructor = SyntheticTouchEvent; + break; + case 'topAnimationEnd': + case 'topAnimationIteration': + case 'topAnimationStart': + EventConstructor = SyntheticAnimationEvent; + break; + case 'topTransitionEnd': + EventConstructor = SyntheticTransitionEvent; + break; + case 'topScroll': + EventConstructor = SyntheticUIEvent; + break; + case 'topWheel': + EventConstructor = SyntheticWheelEvent; + break; + case 'topCopy': + case 'topCut': + case 'topPaste': + EventConstructor = SyntheticClipboardEvent; + break; + } + !EventConstructor ? false ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0; + var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget); + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + }, + + didPutListener: function (inst, registrationName, listener) { + // Mobile Safari does not fire properly bubble click events on + // non-interactive elements, which means delegated click listeners do not + // fire. The workaround for this bug involves attaching an empty click + // listener on the target node. + // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + if (registrationName === 'onClick' && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + if (!onClickListeners[key]) { + onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction); + } + } + }, + + willDeleteListener: function (inst, registrationName) { + if (registrationName === 'onClick' && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + onClickListeners[key].remove(); + delete onClickListeners[key]; + } + } +}; + +module.exports = SimpleEventPlugin; + +/***/ }), +/* 414 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(38); + +/** + * @interface Event + * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface + * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent + */ +var AnimationEventInterface = { + animationName: null, + elapsedTime: null, + pseudoElement: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface); + +module.exports = SyntheticAnimationEvent; + +/***/ }), +/* 415 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(38); + +/** + * @interface Event + * @see http://www.w3.org/TR/clipboard-apis/ + */ +var ClipboardEventInterface = { + clipboardData: function (event) { + return 'clipboardData' in event ? event.clipboardData : window.clipboardData; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); + +module.exports = SyntheticClipboardEvent; + +/***/ }), +/* 416 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticUIEvent = __webpack_require__(71); + +/** + * @interface FocusEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var FocusEventInterface = { + relatedTarget: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); + +module.exports = SyntheticFocusEvent; + +/***/ }), +/* 417 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticUIEvent = __webpack_require__(71); + +var getEventCharCode = __webpack_require__(155); +var getEventKey = __webpack_require__(418); +var getEventModifierState = __webpack_require__(145); + +/** + * @interface KeyboardEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var KeyboardEventInterface = { + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + // Legacy Interface + charCode: function (event) { + // `charCode` is the result of a KeyPress event and represents the value of + // the actual printable character. + + // KeyPress is deprecated, but its replacement is not yet final and not + // implemented in any major browser. Only KeyPress has charCode. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + return 0; + }, + keyCode: function (event) { + // `keyCode` is the result of a KeyDown/Up event and represents the value of + // physical keyboard key. + + // The actual meaning of the value depends on the users' keyboard layout + // which cannot be detected. Assuming that it is a US keyboard layout + // provides a surprisingly accurate mapping for US and European users. + // Due to this, it is left to the user to implement at this time. + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + }, + which: function (event) { + // `which` is an alias for either `keyCode` or `charCode` depending on the + // type of the event. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); + +module.exports = SyntheticKeyboardEvent; + +/***/ }), +/* 418 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var getEventCharCode = __webpack_require__(155); + +/** + * Normalization of deprecated HTML5 `key` values + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ +var normalizeKey = { + Esc: 'Escape', + Spacebar: ' ', + Left: 'ArrowLeft', + Up: 'ArrowUp', + Right: 'ArrowRight', + Down: 'ArrowDown', + Del: 'Delete', + Win: 'OS', + Menu: 'ContextMenu', + Apps: 'ContextMenu', + Scroll: 'ScrollLock', + MozPrintableKey: 'Unidentified' +}; + +/** + * Translation from legacy `keyCode` to HTML5 `key` + * Only special keys supported, all others depend on keyboard layout or browser + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ +var translateToKey = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', + 113: 'F2', + 114: 'F3', + 115: 'F4', + 116: 'F5', + 117: 'F6', + 118: 'F7', + 119: 'F8', + 120: 'F9', + 121: 'F10', + 122: 'F11', + 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta' +}; + +/** + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `key` property. + */ +function getEventKey(nativeEvent) { + if (nativeEvent.key) { + // Normalize inconsistent values reported by browsers due to + // implementations of a working draft specification. + + // FireFox implements `key` but returns `MozPrintableKey` for all + // printable characters (normalized to `Unidentified`), ignore it. + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + if (key !== 'Unidentified') { + return key; + } + } + + // Browser does not implement `key`, polyfill as much of it as we can. + if (nativeEvent.type === 'keypress') { + var charCode = getEventCharCode(nativeEvent); + + // The enter-key is technically both printable and non-printable and can + // thus be captured by `keypress`, no other non-printable key should. + return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); + } + if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { + // While user keyboard layout determines the actual meaning of each + // `keyCode` value, almost all function keys have a universal value. + return translateToKey[nativeEvent.keyCode] || 'Unidentified'; + } + return ''; +} + +module.exports = getEventKey; + +/***/ }), +/* 419 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticMouseEvent = __webpack_require__(105); + +/** + * @interface DragEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var DragEventInterface = { + dataTransfer: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); + +module.exports = SyntheticDragEvent; + +/***/ }), +/* 420 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticUIEvent = __webpack_require__(71); + +var getEventModifierState = __webpack_require__(145); + +/** + * @interface TouchEvent + * @see http://www.w3.org/TR/touch-events/ + */ +var TouchEventInterface = { + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); + +module.exports = SyntheticTouchEvent; + +/***/ }), +/* 421 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(38); + +/** + * @interface Event + * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- + * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent + */ +var TransitionEventInterface = { + propertyName: null, + elapsedTime: null, + pseudoElement: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface); + +module.exports = SyntheticTransitionEvent; + +/***/ }), +/* 422 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticMouseEvent = __webpack_require__(105); + +/** + * @interface WheelEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var WheelEventInterface = { + deltaX: function (event) { + return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + 'wheelDeltaX' in event ? -event.wheelDeltaX : 0; + }, + deltaY: function (event) { + return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + 'wheelDelta' in event ? -event.wheelDelta : 0; + }, + deltaZ: null, + + // Browsers without "deltaMode" is reporting in raw wheel delta where one + // notch on the scroll is always +/- 120, roughly equivalent to pixels. + // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or + // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. + deltaMode: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticMouseEvent} + */ +function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); + +module.exports = SyntheticWheelEvent; + +/***/ }), +/* 423 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var validateDOMNesting = __webpack_require__(154); + +var DOC_NODE_TYPE = 9; + +function ReactDOMContainerInfo(topLevelWrapper, node) { + var info = { + _topLevelWrapper: topLevelWrapper, + _idCounter: 1, + _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null, + _node: node, + _tag: node ? node.nodeName.toLowerCase() : null, + _namespaceURI: node ? node.namespaceURI : null + }; + if (false) { + info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null; + } + return info; +} + +module.exports = ReactDOMContainerInfo; + +/***/ }), +/* 424 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMFeatureFlags = { + useCreateElement: true, + useFiber: false +}; + +module.exports = ReactDOMFeatureFlags; + +/***/ }), +/* 425 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var adler32 = __webpack_require__(426); + +var TAG_END = /\/?>/; +var COMMENT_START = /^<\!\-\-/; + +var ReactMarkupChecksum = { + CHECKSUM_ATTR_NAME: 'data-react-checksum', + + /** + * @param {string} markup Markup string + * @return {string} Markup string with checksum attribute attached + */ + addChecksumToMarkup: function (markup) { + var checksum = adler32(markup); + + // Add checksum (handle both parent tags, comments and self-closing tags) + if (COMMENT_START.test(markup)) { + return markup; + } else { + return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&'); + } + }, + + /** + * @param {string} markup to use + * @param {DOMElement} element root React element + * @returns {boolean} whether or not the markup is the same + */ + canReuseMarkup: function (markup, element) { + var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + existingChecksum = existingChecksum && parseInt(existingChecksum, 10); + var markupChecksum = adler32(markup); + return markupChecksum === existingChecksum; + } +}; + +module.exports = ReactMarkupChecksum; + +/***/ }), +/* 426 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var MOD = 65521; + +// adler32 is not cryptographically strong, and is only used to sanity check that +// markup generated on the server matches the markup generated on the client. +// This implementation (a modified version of the SheetJS version) has been optimized +// for our use case, at the expense of conforming to the adler32 specification +// for non-ascii inputs. +function adler32(data) { + var a = 1; + var b = 0; + var i = 0; + var l = data.length; + var m = l & ~0x3; + while (i < m) { + var n = Math.min(i + 4096, m); + for (; i < n; i += 4) { + b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3)); + } + a %= MOD; + b %= MOD; + } + for (; i < l; i++) { + b += a += data.charCodeAt(i); + } + a %= MOD; + b %= MOD; + return a | b << 16; +} + +module.exports = adler32; + +/***/ }), +/* 427 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +module.exports = '15.6.1'; + +/***/ }), +/* 428 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var ReactCurrentOwner = __webpack_require__(37); +var ReactDOMComponentTree = __webpack_require__(16); +var ReactInstanceMap = __webpack_require__(86); + +var getHostComponentFromComposite = __webpack_require__(240); +var invariant = __webpack_require__(9); +var warning = __webpack_require__(12); + +/** + * Returns the DOM node rendered by this element. + * + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode + * + * @param {ReactComponent|DOMElement} componentOrElement + * @return {?DOMElement} The root node of this element. + */ +function findDOMNode(componentOrElement) { + if (false) { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0; + owner._warnedAboutRefsInRender = true; + } + } + if (componentOrElement == null) { + return null; + } + if (componentOrElement.nodeType === 1) { + return componentOrElement; + } + + var inst = ReactInstanceMap.get(componentOrElement); + if (inst) { + inst = getHostComponentFromComposite(inst); + return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null; + } + + if (typeof componentOrElement.render === 'function') { + true ? false ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0; + } else { + true ? false ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0; + } +} + +module.exports = findDOMNode; + +/***/ }), +/* 429 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactMount = __webpack_require__(239); + +module.exports = ReactMount.renderSubtreeIntoContainer; + +/***/ }), +/* 430 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(241); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(88); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterContext__ = __webpack_require__(158); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RouteUtils__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouterUtils__ = __webpack_require__(243); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__routerWarning__ = __webpack_require__(73); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + + + + + + + + + +var propTypes = { + history: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["d" /* routes */], + routes: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["d" /* routes */], // alias for children + render: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"], + createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"], + onError: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"], + onUpdate: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"], + + // PRIVATE: For client-side rehydration of server match. + matchContext: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"] +}; + +/** + * A <Router> is a high-level API for automatically setting up + * a router that renders a <RouterContext> with all the props + * it needs each time the URL changes. + */ +var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'Router', + + propTypes: propTypes, + + getDefaultProps: function getDefaultProps() { + return { + render: function render(props) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__RouterContext__["a" /* default */], props); + } + }; + }, + getInitialState: function getInitialState() { + return { + location: null, + routes: null, + params: null, + components: null + }; + }, + handleError: function handleError(error) { + if (this.props.onError) { + this.props.onError.call(this, error); + } else { + // Throw errors by default so we don't silently swallow them! + throw error; // This error probably occurred in getChildRoutes or getComponents. + } + }, + createRouterObject: function createRouterObject(state) { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.router; + } + + var history = this.props.history; + + return Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__["b" /* createRouterObject */])(history, this.transitionManager, state); + }, + createTransitionManager: function createTransitionManager() { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.transitionManager; + } + + var history = this.props.history; + var _props = this.props, + routes = _props.routes, + children = _props.children; + + + !history.getCurrentLocation ? false ? invariant(false, 'You have provided a history object created with history v4.x or v2.x ' + 'and earlier. This version of React Router is only compatible with v3 ' + 'history objects. Please change to history v3.x.') : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + + return Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__["a" /* default */])(history, Object(__WEBPACK_IMPORTED_MODULE_7__RouteUtils__["b" /* createRoutes */])(routes || children)); + }, + componentWillMount: function componentWillMount() { + var _this = this; + + this.transitionManager = this.createTransitionManager(); + this.router = this.createRouterObject(this.state); + + this._unlisten = this.transitionManager.listen(function (error, state) { + if (error) { + _this.handleError(error); + } else { + // Keep the identity of this.router because of a caveat in ContextUtils: + // they only work if the object identity is preserved. + Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__["a" /* assignRouterState */])(_this.router, state); + _this.setState(state, _this.props.onUpdate); + } + }); + }, + + + /* istanbul ignore next: sanity check */ + componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + false ? warning(nextProps.history === this.props.history, 'You cannot change <Router history>; it will be ignored') : void 0; + + false ? warning((nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), 'You cannot change <Router routes>; it will be ignored') : void 0; + }, + componentWillUnmount: function componentWillUnmount() { + if (this._unlisten) this._unlisten(); + }, + render: function render() { + var _state = this.state, + location = _state.location, + routes = _state.routes, + params = _state.params, + components = _state.components; + + var _props2 = this.props, + createElement = _props2.createElement, + render = _props2.render, + props = _objectWithoutProperties(_props2, ['createElement', 'render']); + + if (location == null) return null; // Async match + + // Only forward non-Router-specific props to routing context, as those are + // the only ones that might be custom routing context props. + Object.keys(propTypes).forEach(function (propType) { + return delete props[propType]; + }); + + return render(_extends({}, props, { + router: this.router, + location: location, + routes: routes, + params: params, + components: components, + createElement: createElement + })); + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (Router); + +/***/ }), +/* 431 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +var emptyFunction = __webpack_require__(24); +var invariant = __webpack_require__(9); +var ReactPropTypesSecret = __webpack_require__(214); + +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + + any: shim, + arrayOf: getShim, + element: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim + }; + + ReactPropTypes.checkPropTypes = emptyFunction; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + + +/***/ }), +/* 432 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(74); + + +function routeParamsChanged(route, prevState, nextState) { + if (!route.path) return false; + + var paramNames = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__["b" /* getParamNames */])(route.path); + + return paramNames.some(function (paramName) { + return prevState.params[paramName] !== nextState.params[paramName]; + }); +} + +/** + * Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by + * the change from prevState to nextState. We leave routes if either + * 1) they are not in the next state or 2) they are in the next state + * but their params have changed (i.e. /users/123 => /users/456). + * + * leaveRoutes are ordered starting at the leaf route of the tree + * we're leaving up to the common parent route. enterRoutes are ordered + * from the top of the tree we're entering down to the leaf route. + * + * changeRoutes are any routes that didn't leave or enter during + * the transition. + */ +function computeChangedRoutes(prevState, nextState) { + var prevRoutes = prevState && prevState.routes; + var nextRoutes = nextState.routes; + + var leaveRoutes = void 0, + changeRoutes = void 0, + enterRoutes = void 0; + if (prevRoutes) { + var parentIsLeaving = false; + leaveRoutes = prevRoutes.filter(function (route) { + if (parentIsLeaving) { + return true; + } else { + var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); + if (isLeaving) parentIsLeaving = true; + return isLeaving; + } + }); + + // onLeave hooks start at the leaf route. + leaveRoutes.reverse(); + + enterRoutes = []; + changeRoutes = []; + + nextRoutes.forEach(function (route) { + var isNew = prevRoutes.indexOf(route) === -1; + var paramsChanged = leaveRoutes.indexOf(route) !== -1; + + if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route); + }); + } else { + leaveRoutes = []; + changeRoutes = []; + enterRoutes = nextRoutes; + } + + return { + leaveRoutes: leaveRoutes, + changeRoutes: changeRoutes, + enterRoutes: enterRoutes + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (computeChangedRoutes); + +/***/ }), +/* 433 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = getTransitionUtils; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(157); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + + +var PendingHooks = function PendingHooks() { + var _this = this; + + _classCallCheck(this, PendingHooks); + + this.hooks = []; + + this.add = function (hook) { + return _this.hooks.push(hook); + }; + + this.remove = function (hook) { + return _this.hooks = _this.hooks.filter(function (h) { + return h !== hook; + }); + }; + + this.has = function (hook) { + return _this.hooks.indexOf(hook) !== -1; + }; + + this.clear = function () { + return _this.hooks = []; + }; +}; + +function getTransitionUtils() { + var enterHooks = new PendingHooks(); + var changeHooks = new PendingHooks(); + + function createTransitionHook(hook, route, asyncArity, pendingHooks) { + var isSync = hook.length < asyncArity; + + var transitionHook = function transitionHook() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + hook.apply(route, args); + + if (isSync) { + var callback = args[args.length - 1]; + // Assume hook executes synchronously and + // automatically call the callback. + callback(); + } + }; + + pendingHooks.add(transitionHook); + + return transitionHook; + } + + function getEnterHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks)); + return hooks; + }, []); + } + + function getChangeHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks)); + return hooks; + }, []); + } + + function runTransitionHooks(length, iter, callback) { + if (!length) { + callback(); + return; + } + + var redirectInfo = void 0; + function replace(location) { + redirectInfo = location; + } + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */])(length, function (index, next, done) { + iter(index, replace, function (error) { + if (error || redirectInfo) { + done(error, redirectInfo); // No need to continue. + } else { + next(); + } + }); + }, callback); + } + + /** + * Runs all onEnter hooks in the given array of routes in order + * with onEnter(nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runEnterHooks(routes, nextState, callback) { + enterHooks.clear(); + var hooks = getEnterHooks(routes); + return runTransitionHooks(hooks.length, function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (enterHooks.has(hooks[index])) { + next.apply(undefined, arguments); + enterHooks.remove(hooks[index]); + } + }; + hooks[index](nextState, replace, wrappedNext); + }, callback); + } + + /** + * Runs all onChange hooks in the given array of routes in order + * with onChange(prevState, nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ + function runChangeHooks(routes, state, nextState, callback) { + changeHooks.clear(); + var hooks = getChangeHooks(routes); + return runTransitionHooks(hooks.length, function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (changeHooks.has(hooks[index])) { + next.apply(undefined, arguments); + changeHooks.remove(hooks[index]); + } + }; + hooks[index](state, nextState, replace, wrappedNext); + }, callback); + } + + /** + * Runs all onLeave hooks in the given array of routes in order. + */ + function runLeaveHooks(routes, prevState) { + for (var i = 0, len = routes.length; i < len; ++i) { + if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState); + } + } + + return { + runEnterHooks: runEnterHooks, + runChangeHooks: runChangeHooks, + runLeaveHooks: runLeaveHooks + }; +} + +/***/ }), +/* 434 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = isActive; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(74); +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + + + +function deepEqual(a, b) { + if (a == b) return true; + + if (a == null || b == null) return false; + + if (Array.isArray(a)) { + return Array.isArray(b) && a.length === b.length && a.every(function (item, index) { + return deepEqual(item, b[index]); + }); + } + + if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') { + for (var p in a) { + if (!Object.prototype.hasOwnProperty.call(a, p)) { + continue; + } + + if (a[p] === undefined) { + if (b[p] !== undefined) { + return false; + } + } else if (!Object.prototype.hasOwnProperty.call(b, p)) { + return false; + } else if (!deepEqual(a[p], b[p])) { + return false; + } + } + + return true; + } + + return String(a) === String(b); +} + +/** + * Returns true if the current pathname matches the supplied one, net of + * leading and trailing slash normalization. This is sufficient for an + * indexOnly route match. + */ +function pathIsActive(pathname, currentPathname) { + // Normalize leading slash for consistency. Leading slash on pathname has + // already been normalized in isActive. See caveat there. + if (currentPathname.charAt(0) !== '/') { + currentPathname = '/' + currentPathname; + } + + // Normalize the end of both path names too. Maybe `/foo/` shouldn't show + // `/foo` as active, but in this case, we would already have failed the + // match. + if (pathname.charAt(pathname.length - 1) !== '/') { + pathname += '/'; + } + if (currentPathname.charAt(currentPathname.length - 1) !== '/') { + currentPathname += '/'; + } + + return currentPathname === pathname; +} + +/** + * Returns true if the given pathname matches the active routes and params. + */ +function routeIsActive(pathname, routes, params) { + var remainingPathname = pathname, + paramNames = [], + paramValues = []; + + // for...of would work here but it's probably slower post-transpilation. + for (var i = 0, len = routes.length; i < len; ++i) { + var route = routes[i]; + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = pathname; + paramNames = []; + paramValues = []; + } + + if (remainingPathname !== null && pattern) { + var matched = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__["c" /* matchPattern */])(pattern, remainingPathname); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + + if (remainingPathname === '') { + // We have an exact match on the route. Just check that all the params + // match. + // FIXME: This doesn't work on repeated params. + return paramNames.every(function (paramName, index) { + return String(paramValues[index]) === String(params[paramName]); + }); + } + } + } + + return false; +} + +/** + * Returns true if all key/value pairs in the given query are + * currently active. + */ +function queryIsActive(query, activeQuery) { + if (activeQuery == null) return query == null; + + if (query == null) return true; + + return deepEqual(query, activeQuery); +} + +/** + * Returns true if a <Link> to the given pathname/query combination is + * currently active. + */ +function isActive(_ref, indexOnly, currentLocation, routes, params) { + var pathname = _ref.pathname, + query = _ref.query; + + if (currentLocation == null) return false; + + // TODO: This is a bit ugly. It keeps around support for treating pathnames + // without preceding slashes as absolute paths, but possibly also works + // around the same quirks with basenames as in matchRoutes. + if (pathname.charAt(0) !== '/') { + pathname = '/' + pathname; + } + + if (!pathIsActive(pathname, currentLocation.pathname)) { + // The path check is necessary and sufficient for indexOnly, but otherwise + // we still need to check the routes. + if (indexOnly || !routeIsActive(pathname, routes, params)) { + return false; + } + } + + return queryIsActive(query, currentLocation.query); +} + +/***/ }), +/* 435 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(157); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(242); + + + +function getComponentsForRoute(nextState, route, callback) { + if (route.component || route.components) { + callback(null, route.component || route.components); + return; + } + + var getComponent = route.getComponent || route.getComponents; + if (getComponent) { + var componentReturn = getComponent.call(route, nextState, callback); + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */])(componentReturn)) componentReturn.then(function (component) { + return callback(null, component); + }, callback); + } else { + callback(); + } +} + +/** + * Asynchronously fetches all components needed for the given router + * state and calls callback(error, components) when finished. + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getComponents method. + */ +function getComponents(nextState, callback) { + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["b" /* mapAsync */])(nextState.routes, function (route, index, callback) { + getComponentsForRoute(nextState, route, callback); + }, callback); +} + +/* harmony default export */ __webpack_exports__["a"] = (getComponents); + +/***/ }), +/* 436 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = matchRoutes; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(157); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(242); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(74); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(73); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(45); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + + + +function getChildRoutes(route, location, paramNames, paramValues, callback) { + if (route.childRoutes) { + return [null, route.childRoutes]; + } + if (!route.getChildRoutes) { + return []; + } + + var sync = true, + result = void 0; + + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues) + }; + + var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) { + childRoutes = !error && Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(childRoutes); + if (sync) { + result = [error, childRoutes]; + return; + } + + callback(error, childRoutes); + }); + + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */])(childRoutesReturn)) childRoutesReturn.then(function (childRoutes) { + return callback(null, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(childRoutes)); + }, callback); + + sync = false; + return result; // Might be undefined. +} + +function getIndexRoute(route, location, paramNames, paramValues, callback) { + if (route.indexRoute) { + callback(null, route.indexRoute); + } else if (route.getIndexRoute) { + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues) + }; + + var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) { + callback(error, !error && Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(indexRoute)[0]); + }); + + if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */])(indexRoutesReturn)) indexRoutesReturn.then(function (indexRoute) { + return callback(null, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(indexRoute)[0]); + }, callback); + } else if (route.childRoutes || route.getChildRoutes) { + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + return; + } + + var pathless = childRoutes.filter(function (childRoute) { + return !childRoute.path; + }); + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */])(pathless.length, function (index, next, done) { + getIndexRoute(pathless[index], location, paramNames, paramValues, function (error, indexRoute) { + if (error || indexRoute) { + var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]); + done(error, routes); + } else { + next(); + } + }); + }, function (err, routes) { + callback(null, routes); + }); + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } +} + +function assignParams(params, paramNames, paramValues) { + return paramNames.reduce(function (params, paramName, index) { + var paramValue = paramValues && paramValues[index]; + + if (Array.isArray(params[paramName])) { + params[paramName].push(paramValue); + } else if (paramName in params) { + params[paramName] = [params[paramName], paramValue]; + } else { + params[paramName] = paramValue; + } + + return params; + }, params); +} + +function createParams(paramNames, paramValues) { + return assignParams({}, paramNames, paramValues); +} + +function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) { + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = location.pathname; + paramNames = []; + paramValues = []; + } + + // Only try to match the path if the route actually has a pattern, and if + // we're not just searching for potential nested absolute paths. + if (remainingPathname !== null && pattern) { + try { + var matched = Object(__WEBPACK_IMPORTED_MODULE_2__PatternUtils__["c" /* matchPattern */])(pattern, remainingPathname); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + } catch (error) { + callback(error); + } + + // By assumption, pattern is non-empty here, which is the prerequisite for + // actually terminating a match. + if (remainingPathname === '') { + var match = { + routes: [route], + params: createParams(paramNames, paramValues) + }; + + getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) { + if (error) { + callback(error); + } else { + if (Array.isArray(indexRoute)) { + var _match$routes; + + false ? warning(indexRoute.every(function (route) { + return !route.path; + }), 'Index routes should not have paths') : void 0; + (_match$routes = match.routes).push.apply(_match$routes, indexRoute); + } else if (indexRoute) { + false ? warning(!indexRoute.path, 'Index routes should not have paths') : void 0; + match.routes.push(indexRoute); + } + + callback(null, match); + } + }); + + return; + } + } + + if (remainingPathname != null || route.childRoutes) { + // Either a) this route matched at least some of the path or b) + // we don't have to load this route's children asynchronously. In + // either case continue checking for matches in the subtree. + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + } else if (childRoutes) { + // Check the child routes to see if any of them match. + matchRoutes(childRoutes, location, function (error, match) { + if (error) { + callback(error); + } else if (match) { + // A child route matched! Augment the match and pass it up the stack. + match.routes.unshift(route); + callback(null, match); + } else { + callback(); + } + }, remainingPathname, paramNames, paramValues); + } else { + callback(); + } + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } +} + +/** + * Asynchronously matches the given location to a set of routes and calls + * callback(error, state) when finished. The state object will have the + * following properties: + * + * - routes An array of routes that matched, in hierarchical order + * - params An object of URL parameters + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getChildRoutes method. + */ +function matchRoutes(routes, location, callback, remainingPathname) { + var paramNames = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; + var paramValues = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; + + if (remainingPathname === undefined) { + // TODO: This is a little bit ugly, but it works around a quirk in history + // that strips the leading slash from pathnames when using basenames with + // trailing slashes. + if (location.pathname.charAt(0) !== '/') { + location = _extends({}, location, { + pathname: '/' + location.pathname + }); + } + remainingPathname = location.pathname; + } + + Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */])(routes.length, function (index, next, done) { + matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) { + if (error || match) { + done(error, match); + } else { + next(); + } + }); + }, callback); +} + +/***/ }), +/* 437 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(74); + + +/** + * Extracts an object of params the given route cares about from + * the given params object. + */ +function getRouteParams(route, params) { + var routeParams = {}; + + if (!route.path) return routeParams; + + Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__["b" /* getParamNames */])(route.path).forEach(function (p) { + if (Object.prototype.hasOwnProperty.call(params, p)) { + routeParams[p] = params[p]; + } + }); + + return routeParams; +} + +/* harmony default export */ __webpack_exports__["a"] = (getRouteParams); + +/***/ }), +/* 438 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(244); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + +/** + * An <IndexLink> is used to link to an <IndexRoute>. + */ +var IndexLink = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({ + displayName: 'IndexLink', + + render: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Link__["a" /* default */], _extends({}, this.props, { onlyActiveOnIndex: true })); + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (IndexLink); + +/***/ }), +/* 439 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = withRouter; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = __webpack_require__(161); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ContextUtils__ = __webpack_require__(159); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PropTypes__ = __webpack_require__(160); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + + + + +function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; +} + +function withRouter(WrappedComponent, options) { + var withRef = options && options.withRef; + + var WithRouter = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({ + displayName: 'WithRouter', + + mixins: [Object(__WEBPACK_IMPORTED_MODULE_4__ContextUtils__["b" /* ContextSubscriber */])('router')], + + contextTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__["b" /* routerShape */] }, + propTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__["b" /* routerShape */] }, + + getWrappedInstance: function getWrappedInstance() { + !withRef ? false ? invariant(false, 'To access the wrapped instance, you need to specify ' + '`{ withRef: true }` as the second argument of the withRouter() call.') : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0; + + return this.wrappedInstance; + }, + render: function render() { + var _this = this; + + var router = this.props.router || this.context.router; + if (!router) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(WrappedComponent, this.props); + } + + var params = router.params, + location = router.location, + routes = router.routes; + + var props = _extends({}, this.props, { router: router, params: params, location: location, routes: routes }); + + if (withRef) { + props.ref = function (c) { + _this.wrappedInstance = c; + }; + } + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(WrappedComponent, props); + } + }); + + WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')'; + WithRouter.WrappedComponent = WrappedComponent; + + return __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default()(WithRouter, WrappedComponent); +} + +/***/ }), +/* 440 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(73); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Redirect__ = __webpack_require__(245); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(88); + + + + + + + +/** + * An <IndexRedirect> is used to redirect from an indexRoute. + */ +/* eslint-disable react/require-render-return */ +var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'IndexRedirect', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = __WEBPACK_IMPORTED_MODULE_4__Redirect__["a" /* default */].createRouteFromReactElement(element); + } else { + false ? warning(false, 'An <IndexRedirect> does not make sense at the root of your route config') : void 0; + } + } + }, + + propTypes: { + to: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"].isRequired, + query: __WEBPACK_IMPORTED_MODULE_1_prop_types__["object"], + state: __WEBPACK_IMPORTED_MODULE_1_prop_types__["object"], + onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */] + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true ? false ? invariant(false, '<IndexRedirect> elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_3_invariant___default()(false) : void 0; + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (IndexRedirect); + +/***/ }), +/* 441 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(73); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(88); + + + + + + + +/** + * An <IndexRoute> is used to specify its parent's <Route indexRoute> in + * a JSX route config. + */ +/* eslint-disable react/require-render-return */ +var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'IndexRoute', + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["a" /* createRouteFromReactElement */])(element); + } else { + false ? warning(false, 'An <IndexRoute> does not make sense at the root of your route config') : void 0; + } + } + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */], + component: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["a" /* component */], + components: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["b" /* components */], + getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__["func"], + getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__["func"] + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true ? false ? invariant(false, '<IndexRoute> elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_3_invariant___default()(false) : void 0; + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (IndexRoute); + +/***/ }), +/* 442 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(39); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(88); + + + + + + +/** + * A <Route> is used to declare which components are rendered to the + * page when the URL matches a given pattern. + * + * Routes are arranged in a nested tree structure. When a new URL is + * requested, the tree is searched depth-first to find a route whose + * path matches the URL. When one is found, all routes in the tree + * that lead to it are considered "active" and their components are + * rendered into the DOM, nested in the same order as in the tree. + */ +/* eslint-disable react/require-render-return */ +var Route = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({ + displayName: 'Route', + + statics: { + createRouteFromReactElement: __WEBPACK_IMPORTED_MODULE_3__RouteUtils__["a" /* createRouteFromReactElement */] + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"], + component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["a" /* component */], + components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["b" /* components */], + getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__["func"], + getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__["func"] + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true ? false ? invariant(false, '<Route> elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false) : void 0; + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (Route); + +/***/ }), +/* 443 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(109); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(246); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(241); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(243); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + + + + + +/** + * A high-level API to be used for server-side rendering. + * + * This function matches a location to a set of routes and calls + * callback(error, redirectLocation, renderProps) when finished. + * + * Note: You probably don't want to use this in a browser unless you're using + * server-side rendering with async routes. + */ +function match(_ref, callback) { + var history = _ref.history, + routes = _ref.routes, + location = _ref.location, + options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']); + + !(history || location) ? false ? invariant(false, 'match needs a history or a location') : __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false) : void 0; + + history = history ? history : Object(__WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__["a" /* default */])(options); + var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_3__createTransitionManager__["a" /* default */])(history, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(routes)); + + if (location) { + // Allow match({ location: '/the/path', ... }) + location = history.createLocation(location); + } else { + location = history.getCurrentLocation(); + } + + transitionManager.match(location, function (error, redirectLocation, nextState) { + var renderProps = void 0; + + if (nextState) { + var router = Object(__WEBPACK_IMPORTED_MODULE_5__RouterUtils__["b" /* createRouterObject */])(history, transitionManager, nextState); + renderProps = _extends({}, nextState, { + router: router, + matchContext: { transitionManager: transitionManager, router: router } + }); + } + + callback(error, redirectLocation && history.createLocation(redirectLocation, __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__["REPLACE"]), renderProps); + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (match); + +/***/ }), +/* 444 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strictUriEncode = __webpack_require__(445); +var objectAssign = __webpack_require__(15); + +function encoderForArrayFormat(opts) { + switch (opts.arrayFormat) { + case 'index': + return function (key, value, index) { + return value === null ? [ + encode(key, opts), + '[', + index, + ']' + ].join('') : [ + encode(key, opts), + '[', + encode(index, opts), + ']=', + encode(value, opts) + ].join(''); + }; + + case 'bracket': + return function (key, value) { + return value === null ? encode(key, opts) : [ + encode(key, opts), + '[]=', + encode(value, opts) + ].join(''); + }; + + default: + return function (key, value) { + return value === null ? encode(key, opts) : [ + encode(key, opts), + '=', + encode(value, opts) + ].join(''); + }; + } +} + +function parserForArrayFormat(opts) { + var result; + + switch (opts.arrayFormat) { + case 'index': + return function (key, value, accumulator) { + result = /\[(\d*)\]$/.exec(key); + + key = key.replace(/\[\d*\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = {}; + } + + accumulator[key][result[1]] = value; + }; + + case 'bracket': + return function (key, value, accumulator) { + result = /(\[\])$/.exec(key); + key = key.replace(/\[\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } else if (accumulator[key] === undefined) { + accumulator[key] = [value]; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + + default: + return function (key, value, accumulator) { + if (accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + } +} + +function encode(value, opts) { + if (opts.encode) { + return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); + } + + return value; +} + +function keysSorter(input) { + if (Array.isArray(input)) { + return input.sort(); + } else if (typeof input === 'object') { + return keysSorter(Object.keys(input)).sort(function (a, b) { + return Number(a) - Number(b); + }).map(function (key) { + return input[key]; + }); + } + + return input; +} + +exports.extract = function (str) { + return str.split('?')[1] || ''; +}; + +exports.parse = function (str, opts) { + opts = objectAssign({arrayFormat: 'none'}, opts); + + var formatter = parserForArrayFormat(opts); + + // Create an object with no prototype + // https://github.com/sindresorhus/query-string/issues/47 + var ret = Object.create(null); + + if (typeof str !== 'string') { + return ret; + } + + str = str.trim().replace(/^(\?|#|&)/, ''); + + if (!str) { + return ret; + } + + str.split('&').forEach(function (param) { + var parts = param.replace(/\+/g, ' ').split('='); + // Firefox (pre 40) decodes `%3D` to `=` + // https://github.com/sindresorhus/query-string/pull/37 + var key = parts.shift(); + var val = parts.length > 0 ? parts.join('=') : undefined; + + // missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + val = val === undefined ? null : decodeURIComponent(val); + + formatter(decodeURIComponent(key), val, ret); + }); + + return Object.keys(ret).sort().reduce(function (result, key) { + var val = ret[key]; + if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) { + // Sort object keys, not values + result[key] = keysSorter(val); + } else { + result[key] = val; + } + + return result; + }, Object.create(null)); +}; + +exports.stringify = function (obj, opts) { + var defaults = { + encode: true, + strict: true, + arrayFormat: 'none' + }; + + opts = objectAssign(defaults, opts); + + var formatter = encoderForArrayFormat(opts); + + return obj ? Object.keys(obj).sort().map(function (key) { + var val = obj[key]; + + if (val === undefined) { + return ''; + } + + if (val === null) { + return encode(key, opts); + } + + if (Array.isArray(val)) { + var result = []; + + val.slice().forEach(function (val2) { + if (val2 === undefined) { + return; + } + + result.push(formatter(key, val2, result.length)); + }); + + return result.join('&'); + } + + return encode(key, opts) + '=' + encode(val, opts); + }).filter(function (x) { + return x.length > 0; + }).join('&') : ''; +}; + + +/***/ }), +/* 445 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); +}; + + +/***/ }), +/* 446 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +var _invariant = __webpack_require__(20); + +var _invariant2 = _interopRequireDefault(_invariant); + +var _LocationUtils = __webpack_require__(75); + +var _PathUtils = __webpack_require__(46); + +var _createHistory = __webpack_require__(163); + +var _createHistory2 = _interopRequireDefault(_createHistory); + +var _Actions = __webpack_require__(109); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createStateStorage = function createStateStorage(entries) { + return entries.filter(function (entry) { + return entry.state; + }).reduce(function (memo, entry) { + memo[entry.key] = entry.state; + return memo; + }, {}); +}; + +var createMemoryHistory = function createMemoryHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + if (Array.isArray(options)) { + options = { entries: options }; + } else if (typeof options === 'string') { + options = { entries: [options] }; + } + + var getCurrentLocation = function getCurrentLocation() { + var entry = entries[current]; + var path = (0, _PathUtils.createPath)(entry); + + var key = void 0, + state = void 0; + if (entry.key) { + key = entry.key; + state = readState(key); + } + + var init = (0, _PathUtils.parsePath)(path); + + return (0, _LocationUtils.createLocation)(_extends({}, init, { state: state }), undefined, key); + }; + + var canGo = function canGo(n) { + var index = current + n; + return index >= 0 && index < entries.length; + }; + + var go = function go(n) { + if (!n) return; + + if (!canGo(n)) { + false ? (0, _warning2.default)(false, 'Cannot go(%s) there is not enough history', n) : void 0; + + return; + } + + current += n; + var currentLocation = getCurrentLocation(); + + // Change action to POP + history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP })); + }; + + var pushLocation = function pushLocation(location) { + current += 1; + + if (current < entries.length) entries.splice(current); + + entries.push(location); + + saveState(location.key, location.state); + }; + + var replaceLocation = function replaceLocation(location) { + entries[current] = location; + saveState(location.key, location.state); + }; + + var history = (0, _createHistory2.default)(_extends({}, options, { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go + })); + + var _options = options, + entries = _options.entries, + current = _options.current; + + + if (typeof entries === 'string') { + entries = [entries]; + } else if (!Array.isArray(entries)) { + entries = ['/']; + } + + entries = entries.map(function (entry) { + return (0, _LocationUtils.createLocation)(entry); + }); + + if (current == null) { + current = entries.length - 1; + } else { + !(current >= 0 && current < entries.length) ? false ? (0, _invariant2.default)(false, 'Current index must be >= 0 and < %s, was %s', entries.length, current) : (0, _invariant2.default)(false) : void 0; + } + + var storage = createStateStorage(entries); + + var saveState = function saveState(key, state) { + return storage[key] = state; + }; + + var readState = function readState(key) { + return storage[key]; + }; + + return _extends({}, history, { + canGo: canGo + }); +}; + +exports.default = createMemoryHistory; + +/***/ }), +/* 447 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var loopAsync = exports.loopAsync = function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var isSync = false, + hasNext = false, + doneArgs = void 0; + + var done = function done() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + isDone = true; + + if (isSync) { + // Iterate instead of recursing if possible. + doneArgs = args; + return; + } + + callback.apply(undefined, args); + }; + + var next = function next() { + if (isDone) return; + + hasNext = true; + + if (isSync) return; // Iterate instead of recursing if possible. + + isSync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work(currentTurn++, next, done); + } + + isSync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(undefined, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + }; + + next(); +}; + +/***/ }), +/* 448 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(158); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(73); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + +/* harmony default export */ __webpack_exports__["a"] = (function () { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + if (false) { + middlewares.forEach(function (middleware, index) { + process.env.NODE_ENV !== 'production' ? warning(middleware.renderRouterContext || middleware.renderRouteComponent, 'The middleware specified at index ' + index + ' does not appear to be ' + 'a valid React Router middleware.') : void 0; + }); + } + + var withContext = middlewares.map(function (middleware) { + return middleware.renderRouterContext; + }).filter(Boolean); + var withComponent = middlewares.map(function (middleware) { + return middleware.renderRouteComponent; + }).filter(Boolean); + + var makeCreateElement = function makeCreateElement() { + var baseCreateElement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : __WEBPACK_IMPORTED_MODULE_0_react__["createElement"]; + return function (Component, props) { + return withComponent.reduceRight(function (previous, renderRouteComponent) { + return renderRouteComponent(previous, props); + }, baseCreateElement(Component, props)); + }; + }; + + return function (renderProps) { + return withContext.reduceRight(function (previous, renderRouterContext) { + return renderRouterContext(previous, renderProps); + }, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__RouterContext__["a" /* default */], _extends({}, renderProps, { + createElement: makeCreateElement(renderProps.createElement) + }))); + }; +}); + +/***/ }), +/* 449 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = __webpack_require__(450); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(251); + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a)); + +/***/ }), +/* 450 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _invariant = __webpack_require__(20); + +var _invariant2 = _interopRequireDefault(_invariant); + +var _ExecutionEnvironment = __webpack_require__(164); + +var _BrowserProtocol = __webpack_require__(165); + +var BrowserProtocol = _interopRequireWildcard(_BrowserProtocol); + +var _RefreshProtocol = __webpack_require__(451); + +var RefreshProtocol = _interopRequireWildcard(_RefreshProtocol); + +var _DOMUtils = __webpack_require__(110); + +var _createHistory = __webpack_require__(163); + +var _createHistory2 = _interopRequireDefault(_createHistory); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Creates and returns a history object that uses HTML5's history API + * (pushState, replaceState, and the popstate event) to manage history. + * This is the recommended method of managing history in browsers because + * it provides the cleanest URLs. + * + * Note: In browsers that do not support the HTML5 history API full + * page reloads will be used to preserve clean URLs. You can force this + * behavior using { forceRefresh: true } in options. + */ +var createBrowserHistory = function createBrowserHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM ? false ? (0, _invariant2.default)(false, 'Browser history needs a DOM') : (0, _invariant2.default)(false) : void 0; + + var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)(); + var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol; + + var getUserConfirmation = Protocol.getUserConfirmation, + getCurrentLocation = Protocol.getCurrentLocation, + pushLocation = Protocol.pushLocation, + replaceLocation = Protocol.replaceLocation, + go = Protocol.go; + + + var history = (0, _createHistory2.default)(_extends({ + getUserConfirmation: getUserConfirmation }, options, { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go + })); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) stopListener = BrowserProtocol.startListener(history.transitionTo); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen + }); +}; + +exports.default = createBrowserHistory; + +/***/ }), +/* 451 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.replaceLocation = exports.pushLocation = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined; + +var _BrowserProtocol = __webpack_require__(165); + +Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + } +}); +Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + } +}); + +var _LocationUtils = __webpack_require__(75); + +var _PathUtils = __webpack_require__(46); + +var getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() { + return (0, _LocationUtils.createLocation)(window.location); +}; + +var pushLocation = exports.pushLocation = function pushLocation(location) { + window.location.href = (0, _PathUtils.createPath)(location); + return false; // Don't update location +}; + +var replaceLocation = exports.replaceLocation = function replaceLocation(location) { + window.location.replace((0, _PathUtils.createPath)(location)); + return false; // Don't update location +}; + +/***/ }), +/* 452 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = __webpack_require__(453); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(251); + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a)); + +/***/ }), +/* 453 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +var _invariant = __webpack_require__(20); + +var _invariant2 = _interopRequireDefault(_invariant); + +var _ExecutionEnvironment = __webpack_require__(164); + +var _DOMUtils = __webpack_require__(110); + +var _HashProtocol = __webpack_require__(454); + +var HashProtocol = _interopRequireWildcard(_HashProtocol); + +var _createHistory = __webpack_require__(163); + +var _createHistory2 = _interopRequireDefault(_createHistory); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DefaultQueryKey = '_k'; + +var addLeadingSlash = function addLeadingSlash(path) { + return path.charAt(0) === '/' ? path : '/' + path; +}; + +var HashPathCoders = { + hashbang: { + encodePath: function encodePath(path) { + return path.charAt(0) === '!' ? path : '!' + path; + }, + decodePath: function decodePath(path) { + return path.charAt(0) === '!' ? path.substring(1) : path; + } + }, + noslash: { + encodePath: function encodePath(path) { + return path.charAt(0) === '/' ? path.substring(1) : path; + }, + decodePath: addLeadingSlash + }, + slash: { + encodePath: addLeadingSlash, + decodePath: addLeadingSlash + } +}; + +var createHashHistory = function createHashHistory() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + !_ExecutionEnvironment.canUseDOM ? false ? (0, _invariant2.default)(false, 'Hash history needs a DOM') : (0, _invariant2.default)(false) : void 0; + + var queryKey = options.queryKey, + hashType = options.hashType; + + + false ? (0, _warning2.default)(queryKey !== false, 'Using { queryKey: false } no longer works. Instead, just don\'t ' + 'use location state if you don\'t want a key in your URL query string') : void 0; + + if (typeof queryKey !== 'string') queryKey = DefaultQueryKey; + + if (hashType == null) hashType = 'slash'; + + if (!(hashType in HashPathCoders)) { + false ? (0, _warning2.default)(false, 'Invalid hash type: %s', hashType) : void 0; + + hashType = 'slash'; + } + + var pathCoder = HashPathCoders[hashType]; + + var getUserConfirmation = HashProtocol.getUserConfirmation; + + + var getCurrentLocation = function getCurrentLocation() { + return HashProtocol.getCurrentLocation(pathCoder, queryKey); + }; + + var pushLocation = function pushLocation(location) { + return HashProtocol.pushLocation(location, pathCoder, queryKey); + }; + + var replaceLocation = function replaceLocation(location) { + return HashProtocol.replaceLocation(location, pathCoder, queryKey); + }; + + var history = (0, _createHistory2.default)(_extends({ + getUserConfirmation: getUserConfirmation }, options, { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: HashProtocol.go + })); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) stopListener = HashProtocol.startListener(history.transitionTo, pathCoder, queryKey); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + var goIsSupportedWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)(); + + var go = function go(n) { + false ? (0, _warning2.default)(goIsSupportedWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0; + + history.go(n); + }; + + var createHref = function createHref(path) { + return '#' + pathCoder.encodePath(history.createHref(path)); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + go: go, + createHref: createHref + }); +}; + +exports.default = createHashHistory; + +/***/ }), +/* 454 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined; + +var _BrowserProtocol = __webpack_require__(165); + +Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + } +}); +Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + } +}); + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +var _LocationUtils = __webpack_require__(75); + +var _DOMUtils = __webpack_require__(110); + +var _DOMStateStorage = __webpack_require__(250); + +var _PathUtils = __webpack_require__(46); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var HashChangeEvent = 'hashchange'; + +var getHashPath = function getHashPath() { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + var href = window.location.href; + var hashIndex = href.indexOf('#'); + return hashIndex === -1 ? '' : href.substring(hashIndex + 1); +}; + +var pushHashPath = function pushHashPath(path) { + return window.location.hash = path; +}; + +var replaceHashPath = function replaceHashPath(path) { + var hashIndex = window.location.href.indexOf('#'); + + window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path); +}; + +var getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation(pathCoder, queryKey) { + var path = pathCoder.decodePath(getHashPath()); + var key = (0, _PathUtils.getQueryStringValueFromPath)(path, queryKey); + + var state = void 0; + if (key) { + path = (0, _PathUtils.stripQueryStringValueFromPath)(path, queryKey); + state = (0, _DOMStateStorage.readState)(key); + } + + var init = (0, _PathUtils.parsePath)(path); + init.state = state; + + return (0, _LocationUtils.createLocation)(init, undefined, key); +}; + +var prevLocation = void 0; + +var startListener = exports.startListener = function startListener(listener, pathCoder, queryKey) { + var handleHashChange = function handleHashChange() { + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) { + // Always be sure we have a properly-encoded hash. + replaceHashPath(encodedPath); + } else { + var currentLocation = getCurrentLocation(pathCoder, queryKey); + + if (prevLocation && currentLocation.key && prevLocation.key === currentLocation.key) return; // Ignore extraneous hashchange events + + prevLocation = currentLocation; + + listener(currentLocation); + } + }; + + // Ensure the hash is encoded properly. + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) replaceHashPath(encodedPath); + + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange); + + return function () { + return (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange); + }; +}; + +var updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) { + var state = location.state, + key = location.key; + + + var path = pathCoder.encodePath((0, _PathUtils.createPath)(location)); + + if (state !== undefined) { + path = (0, _PathUtils.addQueryStringValueToPath)(path, queryKey, key); + (0, _DOMStateStorage.saveState)(key, state); + } + + prevLocation = location; + + updateHash(path); +}; + +var pushLocation = exports.pushLocation = function pushLocation(location, pathCoder, queryKey) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) { + pushHashPath(path); + } else { + false ? (0, _warning2.default)(false, 'You cannot PUSH the same path using hash history') : void 0; + } + }); +}; + +var replaceLocation = exports.replaceLocation = function replaceLocation(location, pathCoder, queryKey) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) replaceHashPath(path); + }); +}; + +/***/ }), +/* 455 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112); + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (getRawTag); + + +/***/ }), +/* 456 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (objectToString); + + +/***/ }), +/* 457 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(458); + + +/***/ }), +/* 458 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global, module) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _ponyfill = __webpack_require__(459); + +var _ponyfill2 = _interopRequireDefault(_ponyfill); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var root; /* global window */ + + +if (typeof self !== 'undefined') { + root = self; +} else if (typeof window !== 'undefined') { + root = window; +} else if (typeof global !== 'undefined') { + root = global; +} else if (true) { + root = module; +} else { + root = Function('return this')(); +} + +var result = (0, _ponyfill2['default'])(root); +exports['default'] = result; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47), __webpack_require__(256)(module))) + +/***/ }), +/* 459 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports['default'] = symbolObservablePonyfill; +function symbolObservablePonyfill(root) { + var result; + var _Symbol = root.Symbol; + + if (typeof _Symbol === 'function') { + if (_Symbol.observable) { + result = _Symbol.observable; + } else { + result = _Symbol('observable'); + _Symbol.observable = result; + } + } else { + result = '@@observable'; + } + + return result; +}; + +/***/ }), +/* 460 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = combineReducers; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(252); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(257); + + + + +function getUndefinedStateErrorMessage(key, action) { + var actionType = action && action.type; + var actionName = actionType && '"' + actionType.toString() + '"' || 'an action'; + + return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.'; +} + +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; + } + + if (!Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */])(inputState)) { + return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"'); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + + if (unexpectedKeys.length > 0) { + return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.'); + } +} + +function assertReducerShape(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT }); + + if (typeof initialState === 'undefined') { + throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.'); + } + + var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); + if (typeof reducer(undefined, { type: type }) === 'undefined') { + throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.'); + } + }); +} + +/** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ +function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (false) { + if (typeof reducers[key] === 'undefined') { + warning('No reducer provided for key "' + key + '"'); + } + } + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + var finalReducerKeys = Object.keys(finalReducers); + + var unexpectedKeyCache = void 0; + if (false) { + unexpectedKeyCache = {}; + } + + var shapeAssertionError = void 0; + try { + assertReducerShape(finalReducers); + } catch (e) { + shapeAssertionError = e; + } + + return function combination() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments[1]; + + if (shapeAssertionError) { + throw shapeAssertionError; + } + + if (false) { + var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); + if (warningMessage) { + warning(warningMessage); + } + } + + var hasChanged = false; + var nextState = {}; + for (var _i = 0; _i < finalReducerKeys.length; _i++) { + var _key = finalReducerKeys[_i]; + var reducer = finalReducers[_key]; + var previousStateForKey = state[_key]; + var nextStateForKey = reducer(previousStateForKey, action); + if (typeof nextStateForKey === 'undefined') { + var errorMessage = getUndefinedStateErrorMessage(_key, action); + throw new Error(errorMessage); + } + nextState[_key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + return hasChanged ? nextState : state; + }; +} + +/***/ }), +/* 461 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = bindActionCreators; +function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(undefined, arguments)); + }; +} + +/** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass a single function as the first argument, + * and get a function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ +function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?'); + } + + var keys = Object.keys(actionCreators); + var boundActionCreators = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var actionCreator = actionCreators[key]; + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + return boundActionCreators; +} + +/***/ }), +/* 462 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(258); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + +/** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ +function applyMiddleware() { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function (reducer, preloadedState, enhancer) { + var store = createStore(reducer, preloadedState, enhancer); + var _dispatch = store.dispatch; + var chain = []; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch(action) { + return _dispatch(action); + } + }; + chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__["a" /* default */].apply(undefined, chain)(store.dispatch); + + return _extends({}, store, { + dispatch: _dispatch + }); + }; + }; +} + +/***/ }), +/* 463 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = undefined; + +var _react = __webpack_require__(0); + +var _propTypes = __webpack_require__(14); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _storeShape = __webpack_require__(259); + +var _storeShape2 = _interopRequireDefault(_storeShape); + +var _warning = __webpack_require__(260); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var didWarnAboutReceivingStore = false; +function warnAboutReceivingStore() { + if (didWarnAboutReceivingStore) { + return; + } + didWarnAboutReceivingStore = true; + + (0, _warning2["default"])('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.'); +} + +var Provider = function (_Component) { + _inherits(Provider, _Component); + + Provider.prototype.getChildContext = function getChildContext() { + return { store: this.store }; + }; + + function Provider(props, context) { + _classCallCheck(this, Provider); + + var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); + + _this.store = props.store; + return _this; + } + + Provider.prototype.render = function render() { + return _react.Children.only(this.props.children); + }; + + return Provider; +}(_react.Component); + +exports["default"] = Provider; + + +if (false) { + Provider.prototype.componentWillReceiveProps = function (nextProps) { + var store = this.store; + var nextStore = nextProps.store; + + + if (store !== nextStore) { + warnAboutReceivingStore(); + } + }; +} + +Provider.propTypes = { + store: _storeShape2["default"].isRequired, + children: _propTypes2["default"].element.isRequired +}; +Provider.childContextTypes = { + store: _storeShape2["default"].isRequired +}; + +/***/ }), +/* 464 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +exports["default"] = connect; + +var _react = __webpack_require__(0); + +var _storeShape = __webpack_require__(259); + +var _storeShape2 = _interopRequireDefault(_storeShape); + +var _shallowEqual = __webpack_require__(465); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _wrapActionCreators = __webpack_require__(466); + +var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators); + +var _warning = __webpack_require__(260); + +var _warning2 = _interopRequireDefault(_warning); + +var _isPlainObject = __webpack_require__(467); + +var _isPlainObject2 = _interopRequireDefault(_isPlainObject); + +var _hoistNonReactStatics = __webpack_require__(161); + +var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); + +var _invariant = __webpack_require__(20); + +var _invariant2 = _interopRequireDefault(_invariant); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var defaultMapStateToProps = function defaultMapStateToProps(state) { + return {}; +}; // eslint-disable-line no-unused-vars +var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) { + return { dispatch: dispatch }; +}; +var defaultMergeProps = function defaultMergeProps(stateProps, dispatchProps, parentProps) { + return _extends({}, parentProps, stateProps, dispatchProps); +}; + +function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; +} + +var errorObject = { value: null }; +function tryCatch(fn, ctx) { + try { + return fn.apply(ctx); + } catch (e) { + errorObject.value = e; + return errorObject; + } +} + +// Helps track hot reloading. +var nextVersion = 0; + +function connect(mapStateToProps, mapDispatchToProps, mergeProps) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + var shouldSubscribe = Boolean(mapStateToProps); + var mapState = mapStateToProps || defaultMapStateToProps; + + var mapDispatch = void 0; + if (typeof mapDispatchToProps === 'function') { + mapDispatch = mapDispatchToProps; + } else if (!mapDispatchToProps) { + mapDispatch = defaultMapDispatchToProps; + } else { + mapDispatch = (0, _wrapActionCreators2["default"])(mapDispatchToProps); + } + + var finalMergeProps = mergeProps || defaultMergeProps; + var _options$pure = options.pure, + pure = _options$pure === undefined ? true : _options$pure, + _options$withRef = options.withRef, + withRef = _options$withRef === undefined ? false : _options$withRef; + + var checkMergedEquals = pure && finalMergeProps !== defaultMergeProps; + + // Helps track hot reloading. + var version = nextVersion++; + + return function wrapWithConnect(WrappedComponent) { + var connectDisplayName = 'Connect(' + getDisplayName(WrappedComponent) + ')'; + + function checkStateShape(props, methodName) { + if (!(0, _isPlainObject2["default"])(props)) { + (0, _warning2["default"])(methodName + '() in ' + connectDisplayName + ' must return a plain object. ' + ('Instead received ' + props + '.')); + } + } + + function computeMergedProps(stateProps, dispatchProps, parentProps) { + var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps); + if (false) { + checkStateShape(mergedProps, 'mergeProps'); + } + return mergedProps; + } + + var Connect = function (_Component) { + _inherits(Connect, _Component); + + Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() { + return !pure || this.haveOwnPropsChanged || this.hasStoreStateChanged; + }; + + function Connect(props, context) { + _classCallCheck(this, Connect); + + var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); + + _this.version = version; + _this.store = props.store || context.store; + + (0, _invariant2["default"])(_this.store, 'Could not find "store" in either the context or ' + ('props of "' + connectDisplayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + connectDisplayName + '".')); + + var storeState = _this.store.getState(); + _this.state = { storeState: storeState }; + _this.clearCache(); + return _this; + } + + Connect.prototype.computeStateProps = function computeStateProps(store, props) { + if (!this.finalMapStateToProps) { + return this.configureFinalMapState(store, props); + } + + var state = store.getState(); + var stateProps = this.doStatePropsDependOnOwnProps ? this.finalMapStateToProps(state, props) : this.finalMapStateToProps(state); + + if (false) { + checkStateShape(stateProps, 'mapStateToProps'); + } + return stateProps; + }; + + Connect.prototype.configureFinalMapState = function configureFinalMapState(store, props) { + var mappedState = mapState(store.getState(), props); + var isFactory = typeof mappedState === 'function'; + + this.finalMapStateToProps = isFactory ? mappedState : mapState; + this.doStatePropsDependOnOwnProps = this.finalMapStateToProps.length !== 1; + + if (isFactory) { + return this.computeStateProps(store, props); + } + + if (false) { + checkStateShape(mappedState, 'mapStateToProps'); + } + return mappedState; + }; + + Connect.prototype.computeDispatchProps = function computeDispatchProps(store, props) { + if (!this.finalMapDispatchToProps) { + return this.configureFinalMapDispatch(store, props); + } + + var dispatch = store.dispatch; + + var dispatchProps = this.doDispatchPropsDependOnOwnProps ? this.finalMapDispatchToProps(dispatch, props) : this.finalMapDispatchToProps(dispatch); + + if (false) { + checkStateShape(dispatchProps, 'mapDispatchToProps'); + } + return dispatchProps; + }; + + Connect.prototype.configureFinalMapDispatch = function configureFinalMapDispatch(store, props) { + var mappedDispatch = mapDispatch(store.dispatch, props); + var isFactory = typeof mappedDispatch === 'function'; + + this.finalMapDispatchToProps = isFactory ? mappedDispatch : mapDispatch; + this.doDispatchPropsDependOnOwnProps = this.finalMapDispatchToProps.length !== 1; + + if (isFactory) { + return this.computeDispatchProps(store, props); + } + + if (false) { + checkStateShape(mappedDispatch, 'mapDispatchToProps'); + } + return mappedDispatch; + }; + + Connect.prototype.updateStatePropsIfNeeded = function updateStatePropsIfNeeded() { + var nextStateProps = this.computeStateProps(this.store, this.props); + if (this.stateProps && (0, _shallowEqual2["default"])(nextStateProps, this.stateProps)) { + return false; + } + + this.stateProps = nextStateProps; + return true; + }; + + Connect.prototype.updateDispatchPropsIfNeeded = function updateDispatchPropsIfNeeded() { + var nextDispatchProps = this.computeDispatchProps(this.store, this.props); + if (this.dispatchProps && (0, _shallowEqual2["default"])(nextDispatchProps, this.dispatchProps)) { + return false; + } + + this.dispatchProps = nextDispatchProps; + return true; + }; + + Connect.prototype.updateMergedPropsIfNeeded = function updateMergedPropsIfNeeded() { + var nextMergedProps = computeMergedProps(this.stateProps, this.dispatchProps, this.props); + if (this.mergedProps && checkMergedEquals && (0, _shallowEqual2["default"])(nextMergedProps, this.mergedProps)) { + return false; + } + + this.mergedProps = nextMergedProps; + return true; + }; + + Connect.prototype.isSubscribed = function isSubscribed() { + return typeof this.unsubscribe === 'function'; + }; + + Connect.prototype.trySubscribe = function trySubscribe() { + if (shouldSubscribe && !this.unsubscribe) { + this.unsubscribe = this.store.subscribe(this.handleChange.bind(this)); + this.handleChange(); + } + }; + + Connect.prototype.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + } + }; + + Connect.prototype.componentDidMount = function componentDidMount() { + this.trySubscribe(); + }; + + Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + if (!pure || !(0, _shallowEqual2["default"])(nextProps, this.props)) { + this.haveOwnPropsChanged = true; + } + }; + + Connect.prototype.componentWillUnmount = function componentWillUnmount() { + this.tryUnsubscribe(); + this.clearCache(); + }; + + Connect.prototype.clearCache = function clearCache() { + this.dispatchProps = null; + this.stateProps = null; + this.mergedProps = null; + this.haveOwnPropsChanged = true; + this.hasStoreStateChanged = true; + this.haveStatePropsBeenPrecalculated = false; + this.statePropsPrecalculationError = null; + this.renderedElement = null; + this.finalMapDispatchToProps = null; + this.finalMapStateToProps = null; + }; + + Connect.prototype.handleChange = function handleChange() { + if (!this.unsubscribe) { + return; + } + + var storeState = this.store.getState(); + var prevStoreState = this.state.storeState; + if (pure && prevStoreState === storeState) { + return; + } + + if (pure && !this.doStatePropsDependOnOwnProps) { + var haveStatePropsChanged = tryCatch(this.updateStatePropsIfNeeded, this); + if (!haveStatePropsChanged) { + return; + } + if (haveStatePropsChanged === errorObject) { + this.statePropsPrecalculationError = errorObject.value; + } + this.haveStatePropsBeenPrecalculated = true; + } + + this.hasStoreStateChanged = true; + this.setState({ storeState: storeState }); + }; + + Connect.prototype.getWrappedInstance = function getWrappedInstance() { + (0, _invariant2["default"])(withRef, 'To access the wrapped instance, you need to specify ' + '{ withRef: true } as the fourth argument of the connect() call.'); + + return this.refs.wrappedInstance; + }; + + Connect.prototype.render = function render() { + var haveOwnPropsChanged = this.haveOwnPropsChanged, + hasStoreStateChanged = this.hasStoreStateChanged, + haveStatePropsBeenPrecalculated = this.haveStatePropsBeenPrecalculated, + statePropsPrecalculationError = this.statePropsPrecalculationError, + renderedElement = this.renderedElement; + + + this.haveOwnPropsChanged = false; + this.hasStoreStateChanged = false; + this.haveStatePropsBeenPrecalculated = false; + this.statePropsPrecalculationError = null; + + if (statePropsPrecalculationError) { + throw statePropsPrecalculationError; + } + + var shouldUpdateStateProps = true; + var shouldUpdateDispatchProps = true; + if (pure && renderedElement) { + shouldUpdateStateProps = hasStoreStateChanged || haveOwnPropsChanged && this.doStatePropsDependOnOwnProps; + shouldUpdateDispatchProps = haveOwnPropsChanged && this.doDispatchPropsDependOnOwnProps; + } + + var haveStatePropsChanged = false; + var haveDispatchPropsChanged = false; + if (haveStatePropsBeenPrecalculated) { + haveStatePropsChanged = true; + } else if (shouldUpdateStateProps) { + haveStatePropsChanged = this.updateStatePropsIfNeeded(); + } + if (shouldUpdateDispatchProps) { + haveDispatchPropsChanged = this.updateDispatchPropsIfNeeded(); + } + + var haveMergedPropsChanged = true; + if (haveStatePropsChanged || haveDispatchPropsChanged || haveOwnPropsChanged) { + haveMergedPropsChanged = this.updateMergedPropsIfNeeded(); + } else { + haveMergedPropsChanged = false; + } + + if (!haveMergedPropsChanged && renderedElement) { + return renderedElement; + } + + if (withRef) { + this.renderedElement = (0, _react.createElement)(WrappedComponent, _extends({}, this.mergedProps, { + ref: 'wrappedInstance' + })); + } else { + this.renderedElement = (0, _react.createElement)(WrappedComponent, this.mergedProps); + } + + return this.renderedElement; + }; + + return Connect; + }(_react.Component); + + Connect.displayName = connectDisplayName; + Connect.WrappedComponent = WrappedComponent; + Connect.contextTypes = { + store: _storeShape2["default"] + }; + Connect.propTypes = { + store: _storeShape2["default"] + }; + + if (false) { + Connect.prototype.componentWillUpdate = function componentWillUpdate() { + if (this.version === version) { + return; + } + + // We are hot reloading! + this.version = version; + this.trySubscribe(); + this.clearCache(); + }; + } + + return (0, _hoistNonReactStatics2["default"])(Connect, WrappedComponent); + }; +} + +/***/ }), +/* 465 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = shallowEqual; +function shallowEqual(objA, objB) { + if (objA === objB) { + return true; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + var hasOwn = Object.prototype.hasOwnProperty; + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { + return false; + } + } + + return true; +} + +/***/ }), +/* 466 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = wrapActionCreators; + +var _redux = __webpack_require__(111); + +function wrapActionCreators(actionCreators) { + return function (dispatch) { + return (0, _redux.bindActionCreators)(actionCreators, dispatch); + }; +} + +/***/ }), +/* 467 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(468), + getPrototype = __webpack_require__(473), + isObjectLike = __webpack_require__(475); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +module.exports = isPlainObject; + + +/***/ }), +/* 468 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(261), + getRawTag = __webpack_require__(471), + objectToString = __webpack_require__(472); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; + + +/***/ }), +/* 469 */ +/***/ (function(module, exports, __webpack_require__) { + +var freeGlobal = __webpack_require__(470); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + + +/***/ }), +/* 470 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47))) + +/***/ }), +/* 471 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(261); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; + + +/***/ }), +/* 472 */ +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; + + +/***/ }), +/* 473 */ +/***/ (function(module, exports, __webpack_require__) { + +var overArg = __webpack_require__(474); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; + + +/***/ }), +/* 474 */ +/***/ (function(module, exports) { + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; + + +/***/ }), +/* 475 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; + + +/***/ }), +/* 476 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.logger = exports.defaults = undefined; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _core = __webpack_require__(477); + +var _helpers = __webpack_require__(262); + +var _defaults = __webpack_require__(480); + +var _defaults2 = _interopRequireDefault(_defaults); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Creates logger with following options + * + * @namespace + * @param {object} options - options for logger + * @param {string | function | object} options.level - console[level] + * @param {boolean} options.duration - print duration of each action? + * @param {boolean} options.timestamp - print timestamp with each action? + * @param {object} options.colors - custom colors + * @param {object} options.logger - implementation of the `console` API + * @param {boolean} options.logErrors - should errors in action execution be caught, logged, and re-thrown? + * @param {boolean} options.collapsed - is group collapsed? + * @param {boolean} options.predicate - condition which resolves logger behavior + * @param {function} options.stateTransformer - transform state before print + * @param {function} options.actionTransformer - transform action before print + * @param {function} options.errorTransformer - transform error before print + * + * @returns {function} logger middleware + */ +function createLogger() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var loggerOptions = _extends({}, _defaults2.default, options); + + var logger = loggerOptions.logger, + transformer = loggerOptions.transformer, + stateTransformer = loggerOptions.stateTransformer, + errorTransformer = loggerOptions.errorTransformer, + predicate = loggerOptions.predicate, + logErrors = loggerOptions.logErrors, + diffPredicate = loggerOptions.diffPredicate; + + // Return if 'console' object is not defined + + if (typeof logger === 'undefined') { + return function () { + return function (next) { + return function (action) { + return next(action); + }; + }; + }; + } + + if (transformer) { + console.error('Option \'transformer\' is deprecated, use \'stateTransformer\' instead!'); // eslint-disable-line no-console + } + + // Detect if 'createLogger' was passed directly to 'applyMiddleware'. + if (options.getState && options.dispatch) { + // eslint-disable-next-line no-console + console.error('[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n\n// Logger with default options\nimport { logger } from \'redux-logger\'\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n\n\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from \'redux-logger\'\n\nconst logger = createLogger({\n // ...options\n});\n\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n'); + + return function () { + return function (next) { + return function (action) { + return next(action); + }; + }; + }; + } + + var logBuffer = []; + + return function (_ref) { + var getState = _ref.getState; + return function (next) { + return function (action) { + // Exit early if predicate function returns 'false' + if (typeof predicate === 'function' && !predicate(getState, action)) { + return next(action); + } + + var logEntry = {}; + logBuffer.push(logEntry); + + logEntry.started = _helpers.timer.now(); + logEntry.startedTime = new Date(); + logEntry.prevState = stateTransformer(getState()); + logEntry.action = action; + + var returnedValue = void 0; + if (logErrors) { + try { + returnedValue = next(action); + } catch (e) { + logEntry.error = errorTransformer(e); + } + } else { + returnedValue = next(action); + } + + logEntry.took = _helpers.timer.now() - logEntry.started; + logEntry.nextState = stateTransformer(getState()); + + var diff = loggerOptions.diff && typeof diffPredicate === 'function' ? diffPredicate(getState, action) : loggerOptions.diff; + + (0, _core.printBuffer)(logBuffer, _extends({}, loggerOptions, { diff: diff })); + logBuffer.length = 0; + + if (logEntry.error) throw logEntry.error; + return returnedValue; + }; + }; + }; +} + +var defaultLogger = createLogger(); + +exports.defaults = _defaults2.default; +exports.logger = defaultLogger; +exports.default = createLogger; +module.exports = exports['default']; + + +/***/ }), +/* 477 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.printBuffer = printBuffer; + +var _helpers = __webpack_require__(262); + +var _diff = __webpack_require__(478); + +var _diff2 = _interopRequireDefault(_diff); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +/** + * Get log level string based on supplied params + * + * @param {string | function | object} level - console[level] + * @param {object} action - selected action + * @param {array} payload - selected payload + * @param {string} type - log entry type + * + * @returns {string} level + */ +function getLogLevel(level, action, payload, type) { + switch (typeof level === 'undefined' ? 'undefined' : _typeof(level)) { + case 'object': + return typeof level[type] === 'function' ? level[type].apply(level, _toConsumableArray(payload)) : level[type]; + case 'function': + return level(action); + default: + return level; + } +} + +function defaultTitleFormatter(options) { + var timestamp = options.timestamp, + duration = options.duration; + + + return function (action, time, took) { + var parts = ['action']; + + parts.push('%c' + String(action.type)); + if (timestamp) parts.push('%c@ ' + time); + if (duration) parts.push('%c(in ' + took.toFixed(2) + ' ms)'); + + return parts.join(' '); + }; +} + +function printBuffer(buffer, options) { + var logger = options.logger, + actionTransformer = options.actionTransformer, + _options$titleFormatt = options.titleFormatter, + titleFormatter = _options$titleFormatt === undefined ? defaultTitleFormatter(options) : _options$titleFormatt, + collapsed = options.collapsed, + colors = options.colors, + level = options.level, + diff = options.diff; + + + buffer.forEach(function (logEntry, key) { + var started = logEntry.started, + startedTime = logEntry.startedTime, + action = logEntry.action, + prevState = logEntry.prevState, + error = logEntry.error; + var took = logEntry.took, + nextState = logEntry.nextState; + + var nextEntry = buffer[key + 1]; + + if (nextEntry) { + nextState = nextEntry.prevState; + took = nextEntry.started - started; + } + + // Message + var formattedAction = actionTransformer(action); + var isCollapsed = typeof collapsed === 'function' ? collapsed(function () { + return nextState; + }, action, logEntry) : collapsed; + + var formattedTime = (0, _helpers.formatTime)(startedTime); + var titleCSS = colors.title ? 'color: ' + colors.title(formattedAction) + ';' : ''; + var headerCSS = ['color: gray; font-weight: lighter;']; + headerCSS.push(titleCSS); + if (options.timestamp) headerCSS.push('color: gray; font-weight: lighter;'); + if (options.duration) headerCSS.push('color: gray; font-weight: lighter;'); + var title = titleFormatter(formattedAction, formattedTime, took); + + // Render + try { + if (isCollapsed) { + if (colors.title) logger.groupCollapsed.apply(logger, ['%c ' + title].concat(headerCSS));else logger.groupCollapsed(title); + } else { + if (colors.title) logger.group.apply(logger, ['%c ' + title].concat(headerCSS));else logger.group(title); + } + } catch (e) { + logger.log(title); + } + + var prevStateLevel = getLogLevel(level, formattedAction, [prevState], 'prevState'); + var actionLevel = getLogLevel(level, formattedAction, [formattedAction], 'action'); + var errorLevel = getLogLevel(level, formattedAction, [error, prevState], 'error'); + var nextStateLevel = getLogLevel(level, formattedAction, [nextState], 'nextState'); + + if (prevStateLevel) { + if (colors.prevState) logger[prevStateLevel]('%c prev state', 'color: ' + colors.prevState(prevState) + '; font-weight: bold', prevState);else logger[prevStateLevel]('prev state', prevState); + } + + if (actionLevel) { + if (colors.action) logger[actionLevel]('%c action ', 'color: ' + colors.action(formattedAction) + '; font-weight: bold', formattedAction);else logger[actionLevel]('action ', formattedAction); + } + + if (error && errorLevel) { + if (colors.error) logger[errorLevel]('%c error ', 'color: ' + colors.error(error, prevState) + '; font-weight: bold;', error);else logger[errorLevel]('error ', error); + } + + if (nextStateLevel) { + if (colors.nextState) logger[nextStateLevel]('%c next state', 'color: ' + colors.nextState(nextState) + '; font-weight: bold', nextState);else logger[nextStateLevel]('next state', nextState); + } + + if (diff) { + (0, _diff2.default)(prevState, nextState, logger, isCollapsed); + } + + try { + logger.groupEnd(); + } catch (e) { + logger.log('\u2014\u2014 log end \u2014\u2014'); + } + }); +} + +/***/ }), +/* 478 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = diffLogger; + +var _deepDiff = __webpack_require__(479); + +var _deepDiff2 = _interopRequireDefault(_deepDiff); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +// https://github.com/flitbit/diff#differences +var dictionary = { + 'E': { + color: '#2196F3', + text: 'CHANGED:' + }, + 'N': { + color: '#4CAF50', + text: 'ADDED:' + }, + 'D': { + color: '#F44336', + text: 'DELETED:' + }, + 'A': { + color: '#2196F3', + text: 'ARRAY:' + } +}; + +function style(kind) { + return 'color: ' + dictionary[kind].color + '; font-weight: bold'; +} + +function render(diff) { + var kind = diff.kind, + path = diff.path, + lhs = diff.lhs, + rhs = diff.rhs, + index = diff.index, + item = diff.item; + + + switch (kind) { + case 'E': + return [path.join('.'), lhs, '\u2192', rhs]; + case 'N': + return [path.join('.'), rhs]; + case 'D': + return [path.join('.')]; + case 'A': + return [path.join('.') + '[' + index + ']', item]; + default: + return []; + } +} + +function diffLogger(prevState, newState, logger, isCollapsed) { + var diff = (0, _deepDiff2.default)(prevState, newState); + + try { + if (isCollapsed) { + logger.groupCollapsed('diff'); + } else { + logger.group('diff'); + } + } catch (e) { + logger.log('diff'); + } + + if (diff) { + diff.forEach(function (elem) { + var kind = elem.kind; + + var output = render(elem); + + logger.log.apply(logger, ['%c ' + dictionary[kind].text, style(kind)].concat(_toConsumableArray(output))); + }); + } else { + logger.log('\u2014\u2014 no diff \u2014\u2014'); + } + + try { + logger.groupEnd(); + } catch (e) { + logger.log('\u2014\u2014 diff end \u2014\u2014 '); + } +} +module.exports = exports['default']; + +/***/ }), +/* 479 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + * deep-diff. + * Licensed under the MIT License. + */ +;(function(root, factory) { + 'use strict'; + if (true) { + // AMD. Register as an anonymous module. + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() { + return factory(); + }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.DeepDiff = factory(); + } +}(this, function(undefined) { + 'use strict'; + + var $scope, conflict, conflictResolution = []; + if (typeof global === 'object' && global) { + $scope = global; + } else if (typeof window !== 'undefined') { + $scope = window; + } else { + $scope = {}; + } + conflict = $scope.DeepDiff; + if (conflict) { + conflictResolution.push( + function() { + if ('undefined' !== typeof conflict && $scope.DeepDiff === accumulateDiff) { + $scope.DeepDiff = conflict; + conflict = undefined; + } + }); + } + + // nodejs compatible on server side and in the browser. + function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + + function Diff(kind, path) { + Object.defineProperty(this, 'kind', { + value: kind, + enumerable: true + }); + if (path && path.length) { + Object.defineProperty(this, 'path', { + value: path, + enumerable: true + }); + } + } + + function DiffEdit(path, origin, value) { + DiffEdit.super_.call(this, 'E', path); + Object.defineProperty(this, 'lhs', { + value: origin, + enumerable: true + }); + Object.defineProperty(this, 'rhs', { + value: value, + enumerable: true + }); + } + inherits(DiffEdit, Diff); + + function DiffNew(path, value) { + DiffNew.super_.call(this, 'N', path); + Object.defineProperty(this, 'rhs', { + value: value, + enumerable: true + }); + } + inherits(DiffNew, Diff); + + function DiffDeleted(path, value) { + DiffDeleted.super_.call(this, 'D', path); + Object.defineProperty(this, 'lhs', { + value: value, + enumerable: true + }); + } + inherits(DiffDeleted, Diff); + + function DiffArray(path, index, item) { + DiffArray.super_.call(this, 'A', path); + Object.defineProperty(this, 'index', { + value: index, + enumerable: true + }); + Object.defineProperty(this, 'item', { + value: item, + enumerable: true + }); + } + inherits(DiffArray, Diff); + + function arrayRemove(arr, from, to) { + var rest = arr.slice((to || from) + 1 || arr.length); + arr.length = from < 0 ? arr.length + from : from; + arr.push.apply(arr, rest); + return arr; + } + + function realTypeOf(subject) { + var type = typeof subject; + if (type !== 'object') { + return type; + } + + if (subject === Math) { + return 'math'; + } else if (subject === null) { + return 'null'; + } else if (Array.isArray(subject)) { + return 'array'; + } else if (Object.prototype.toString.call(subject) === '[object Date]') { + return 'date'; + } else if (typeof subject.toString !== 'undefined' && /^\/.*\//.test(subject.toString())) { + return 'regexp'; + } + return 'object'; + } + + function deepDiff(lhs, rhs, changes, prefilter, path, key, stack) { + path = path || []; + var currentPath = path.slice(0); + if (typeof key !== 'undefined') { + if (prefilter) { + if (typeof(prefilter) === 'function' && prefilter(currentPath, key)) { return; } + else if (typeof(prefilter) === 'object') { + if (prefilter.prefilter && prefilter.prefilter(currentPath, key)) { return; } + if (prefilter.normalize) { + var alt = prefilter.normalize(currentPath, key, lhs, rhs); + if (alt) { + lhs = alt[0]; + rhs = alt[1]; + } + } + } + } + currentPath.push(key); + } + + // Use string comparison for regexes + if (realTypeOf(lhs) === 'regexp' && realTypeOf(rhs) === 'regexp') { + lhs = lhs.toString(); + rhs = rhs.toString(); + } + + var ltype = typeof lhs; + var rtype = typeof rhs; + if (ltype === 'undefined') { + if (rtype !== 'undefined') { + changes(new DiffNew(currentPath, rhs)); + } + } else if (rtype === 'undefined') { + changes(new DiffDeleted(currentPath, lhs)); + } else if (realTypeOf(lhs) !== realTypeOf(rhs)) { + changes(new DiffEdit(currentPath, lhs, rhs)); + } else if (Object.prototype.toString.call(lhs) === '[object Date]' && Object.prototype.toString.call(rhs) === '[object Date]' && ((lhs - rhs) !== 0)) { + changes(new DiffEdit(currentPath, lhs, rhs)); + } else if (ltype === 'object' && lhs !== null && rhs !== null) { + stack = stack || []; + if (stack.indexOf(lhs) < 0) { + stack.push(lhs); + if (Array.isArray(lhs)) { + var i, len = lhs.length; + for (i = 0; i < lhs.length; i++) { + if (i >= rhs.length) { + changes(new DiffArray(currentPath, i, new DiffDeleted(undefined, lhs[i]))); + } else { + deepDiff(lhs[i], rhs[i], changes, prefilter, currentPath, i, stack); + } + } + while (i < rhs.length) { + changes(new DiffArray(currentPath, i, new DiffNew(undefined, rhs[i++]))); + } + } else { + var akeys = Object.keys(lhs); + var pkeys = Object.keys(rhs); + akeys.forEach(function(k, i) { + var other = pkeys.indexOf(k); + if (other >= 0) { + deepDiff(lhs[k], rhs[k], changes, prefilter, currentPath, k, stack); + pkeys = arrayRemove(pkeys, other); + } else { + deepDiff(lhs[k], undefined, changes, prefilter, currentPath, k, stack); + } + }); + pkeys.forEach(function(k) { + deepDiff(undefined, rhs[k], changes, prefilter, currentPath, k, stack); + }); + } + stack.length = stack.length - 1; + } + } else if (lhs !== rhs) { + if (!(ltype === 'number' && isNaN(lhs) && isNaN(rhs))) { + changes(new DiffEdit(currentPath, lhs, rhs)); + } + } + } + + function accumulateDiff(lhs, rhs, prefilter, accum) { + accum = accum || []; + deepDiff(lhs, rhs, + function(diff) { + if (diff) { + accum.push(diff); + } + }, + prefilter); + return (accum.length) ? accum : undefined; + } + + function applyArrayChange(arr, index, change) { + if (change.path && change.path.length) { + var it = arr[index], + i, u = change.path.length - 1; + for (i = 0; i < u; i++) { + it = it[change.path[i]]; + } + switch (change.kind) { + case 'A': + applyArrayChange(it[change.path[i]], change.index, change.item); + break; + case 'D': + delete it[change.path[i]]; + break; + case 'E': + case 'N': + it[change.path[i]] = change.rhs; + break; + } + } else { + switch (change.kind) { + case 'A': + applyArrayChange(arr[index], change.index, change.item); + break; + case 'D': + arr = arrayRemove(arr, index); + break; + case 'E': + case 'N': + arr[index] = change.rhs; + break; + } + } + return arr; + } + + function applyChange(target, source, change) { + if (target && source && change && change.kind) { + var it = target, + i = -1, + last = change.path ? change.path.length - 1 : 0; + while (++i < last) { + if (typeof it[change.path[i]] === 'undefined') { + it[change.path[i]] = (typeof change.path[i] === 'number') ? [] : {}; + } + it = it[change.path[i]]; + } + switch (change.kind) { + case 'A': + applyArrayChange(change.path ? it[change.path[i]] : it, change.index, change.item); + break; + case 'D': + delete it[change.path[i]]; + break; + case 'E': + case 'N': + it[change.path[i]] = change.rhs; + break; + } + } + } + + function revertArrayChange(arr, index, change) { + if (change.path && change.path.length) { + // the structure of the object at the index has changed... + var it = arr[index], + i, u = change.path.length - 1; + for (i = 0; i < u; i++) { + it = it[change.path[i]]; + } + switch (change.kind) { + case 'A': + revertArrayChange(it[change.path[i]], change.index, change.item); + break; + case 'D': + it[change.path[i]] = change.lhs; + break; + case 'E': + it[change.path[i]] = change.lhs; + break; + case 'N': + delete it[change.path[i]]; + break; + } + } else { + // the array item is different... + switch (change.kind) { + case 'A': + revertArrayChange(arr[index], change.index, change.item); + break; + case 'D': + arr[index] = change.lhs; + break; + case 'E': + arr[index] = change.lhs; + break; + case 'N': + arr = arrayRemove(arr, index); + break; + } + } + return arr; + } + + function revertChange(target, source, change) { + if (target && source && change && change.kind) { + var it = target, + i, u; + u = change.path.length - 1; + for (i = 0; i < u; i++) { + if (typeof it[change.path[i]] === 'undefined') { + it[change.path[i]] = {}; + } + it = it[change.path[i]]; + } + switch (change.kind) { + case 'A': + // Array was modified... + // it will be an array... + revertArrayChange(it[change.path[i]], change.index, change.item); + break; + case 'D': + // Item was deleted... + it[change.path[i]] = change.lhs; + break; + case 'E': + // Item was edited... + it[change.path[i]] = change.lhs; + break; + case 'N': + // Item is new... + delete it[change.path[i]]; + break; + } + } + } + + function applyDiff(target, source, filter) { + if (target && source) { + var onChange = function(change) { + if (!filter || filter(target, source, change)) { + applyChange(target, source, change); + } + }; + deepDiff(target, source, onChange); + } + } + + Object.defineProperties(accumulateDiff, { + + diff: { + value: accumulateDiff, + enumerable: true + }, + observableDiff: { + value: deepDiff, + enumerable: true + }, + applyDiff: { + value: applyDiff, + enumerable: true + }, + applyChange: { + value: applyChange, + enumerable: true + }, + revertChange: { + value: revertChange, + enumerable: true + }, + isConflict: { + value: function() { + return 'undefined' !== typeof conflict; + }, + enumerable: true + }, + noConflict: { + value: function() { + if (conflictResolution) { + conflictResolution.forEach(function(it) { + it(); + }); + conflictResolution = null; + } + return accumulateDiff; + }, + enumerable: true + } + }); + + return accumulateDiff; +})); + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47))) + +/***/ }), +/* 480 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + level: "log", + logger: console, + logErrors: true, + collapsed: undefined, + predicate: undefined, + duration: false, + timestamp: true, + stateTransformer: function stateTransformer(state) { + return state; + }, + actionTransformer: function actionTransformer(action) { + return action; + }, + errorTransformer: function errorTransformer(error) { + return error; + }, + colors: { + title: function title() { + return "inherit"; + }, + prevState: function prevState() { + return "#9E9E9E"; + }, + action: function action() { + return "#03A9F4"; + }, + nextState: function nextState() { + return "#4CAF50"; + }, + error: function error() { + return "#F20404"; + } + }, + diff: false, + diffPredicate: undefined, + + // Deprecated options + transformer: undefined +}; +module.exports = exports["default"]; + +/***/ }), +/* 481 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.routerMiddleware = exports.routerActions = exports.goForward = exports.goBack = exports.go = exports.replace = exports.push = exports.CALL_HISTORY_METHOD = exports.routerReducer = exports.LOCATION_CHANGE = exports.syncHistoryWithStore = undefined; + +var _reducer = __webpack_require__(263); + +Object.defineProperty(exports, 'LOCATION_CHANGE', { + enumerable: true, + get: function get() { + return _reducer.LOCATION_CHANGE; + } +}); +Object.defineProperty(exports, 'routerReducer', { + enumerable: true, + get: function get() { + return _reducer.routerReducer; + } +}); + +var _actions = __webpack_require__(264); + +Object.defineProperty(exports, 'CALL_HISTORY_METHOD', { + enumerable: true, + get: function get() { + return _actions.CALL_HISTORY_METHOD; + } +}); +Object.defineProperty(exports, 'push', { + enumerable: true, + get: function get() { + return _actions.push; + } +}); +Object.defineProperty(exports, 'replace', { + enumerable: true, + get: function get() { + return _actions.replace; + } +}); +Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _actions.go; + } +}); +Object.defineProperty(exports, 'goBack', { + enumerable: true, + get: function get() { + return _actions.goBack; + } +}); +Object.defineProperty(exports, 'goForward', { + enumerable: true, + get: function get() { + return _actions.goForward; + } +}); +Object.defineProperty(exports, 'routerActions', { + enumerable: true, + get: function get() { + return _actions.routerActions; + } +}); + +var _sync = __webpack_require__(482); + +var _sync2 = _interopRequireDefault(_sync); + +var _middleware = __webpack_require__(483); + +var _middleware2 = _interopRequireDefault(_middleware); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +exports.syncHistoryWithStore = _sync2['default']; +exports.routerMiddleware = _middleware2['default']; + +/***/ }), +/* 482 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +exports['default'] = syncHistoryWithStore; + +var _reducer = __webpack_require__(263); + +var defaultSelectLocationState = function defaultSelectLocationState(state) { + return state.routing; +}; + +/** + * This function synchronizes your history state with the Redux store. + * Location changes flow from history to the store. An enhanced history is + * returned with a listen method that responds to store updates for location. + * + * When this history is provided to the router, this means the location data + * will flow like this: + * history.push -> store.dispatch -> enhancedHistory.listen -> router + * This ensures that when the store state changes due to a replay or other + * event, the router will be updated appropriately and can transition to the + * correct router state. + */ +function syncHistoryWithStore(history, store) { + var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + _ref$selectLocationSt = _ref.selectLocationState, + selectLocationState = _ref$selectLocationSt === undefined ? defaultSelectLocationState : _ref$selectLocationSt, + _ref$adjustUrlOnRepla = _ref.adjustUrlOnReplay, + adjustUrlOnReplay = _ref$adjustUrlOnRepla === undefined ? true : _ref$adjustUrlOnRepla; + + // Ensure that the reducer is mounted on the store and functioning properly. + if (typeof selectLocationState(store.getState()) === 'undefined') { + throw new Error('Expected the routing state to be available either as `state.routing` ' + 'or as the custom expression you can specify as `selectLocationState` ' + 'in the `syncHistoryWithStore()` options. ' + 'Ensure you have added the `routerReducer` to your store\'s ' + 'reducers via `combineReducers` or whatever method you use to isolate ' + 'your reducers.'); + } + + var initialLocation = void 0; + var isTimeTraveling = void 0; + var unsubscribeFromStore = void 0; + var unsubscribeFromHistory = void 0; + var currentLocation = void 0; + + // What does the store say about current location? + var getLocationInStore = function getLocationInStore(useInitialIfEmpty) { + var locationState = selectLocationState(store.getState()); + return locationState.locationBeforeTransitions || (useInitialIfEmpty ? initialLocation : undefined); + }; + + // Init initialLocation with potential location in store + initialLocation = getLocationInStore(); + + // If the store is replayed, update the URL in the browser to match. + if (adjustUrlOnReplay) { + var handleStoreChange = function handleStoreChange() { + var locationInStore = getLocationInStore(true); + if (currentLocation === locationInStore || initialLocation === locationInStore) { + return; + } + + // Update address bar to reflect store state + isTimeTraveling = true; + currentLocation = locationInStore; + history.transitionTo(_extends({}, locationInStore, { + action: 'PUSH' + })); + isTimeTraveling = false; + }; + + unsubscribeFromStore = store.subscribe(handleStoreChange); + handleStoreChange(); + } + + // Whenever location changes, dispatch an action to get it in the store + var handleLocationChange = function handleLocationChange(location) { + // ... unless we just caused that location change + if (isTimeTraveling) { + return; + } + + // Remember where we are + currentLocation = location; + + // Are we being called for the first time? + if (!initialLocation) { + // Remember as a fallback in case state is reset + initialLocation = location; + + // Respect persisted location, if any + if (getLocationInStore()) { + return; + } + } + + // Tell the store to update by dispatching an action + store.dispatch({ + type: _reducer.LOCATION_CHANGE, + payload: location + }); + }; + unsubscribeFromHistory = history.listen(handleLocationChange); + + // History 3.x doesn't call listen synchronously, so fire the initial location change ourselves + if (history.getCurrentLocation) { + handleLocationChange(history.getCurrentLocation()); + } + + // The enhanced history uses store as source of truth + return _extends({}, history, { + // The listeners are subscribed to the store instead of history + listen: function listen(listener) { + // Copy of last location. + var lastPublishedLocation = getLocationInStore(true); + + // Keep track of whether we unsubscribed, as Redux store + // only applies changes in subscriptions on next dispatch + var unsubscribed = false; + var unsubscribeFromStore = store.subscribe(function () { + var currentLocation = getLocationInStore(true); + if (currentLocation === lastPublishedLocation) { + return; + } + lastPublishedLocation = currentLocation; + if (!unsubscribed) { + listener(lastPublishedLocation); + } + }); + + // History 2.x listeners expect a synchronous call. Make the first call to the + // listener after subscribing to the store, in case the listener causes a + // location change (e.g. when it redirects) + if (!history.getCurrentLocation) { + listener(lastPublishedLocation); + } + + // Let user unsubscribe later + return function () { + unsubscribed = true; + unsubscribeFromStore(); + }; + }, + + + // It also provides a way to destroy internal listeners + unsubscribe: function unsubscribe() { + if (adjustUrlOnReplay) { + unsubscribeFromStore(); + } + unsubscribeFromHistory(); + } + }); +} + +/***/ }), +/* 483 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports['default'] = routerMiddleware; + +var _actions = __webpack_require__(264); + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +/** + * This middleware captures CALL_HISTORY_METHOD actions to redirect to the + * provided history object. This will prevent these actions from reaching your + * reducer or any middleware that comes after this one. + */ +function routerMiddleware(history) { + return function () { + return function (next) { + return function (action) { + if (action.type !== _actions.CALL_HISTORY_METHOD) { + return next(action); + } + + var _action$payload = action.payload, + method = _action$payload.method, + args = _action$payload.args; + + history[method].apply(history, _toConsumableArray(args)); + }; + }; + }; +} + +/***/ }), +/* 484 */ +/***/ (function(module, exports, __webpack_require__) { + +var invariant = __webpack_require__(9); +var defaultClickRejectionStrategy = __webpack_require__(485); + +var alreadyInjected = false; + +module.exports = function injectTapEventPlugin (strategyOverrides) { + strategyOverrides = strategyOverrides || {} + var shouldRejectClick = strategyOverrides.shouldRejectClick || defaultClickRejectionStrategy; + + if (false) { + invariant( + !alreadyInjected, + 'injectTapEventPlugin(): Can only be called once per application lifecycle.\n\n\ +It is recommended to call injectTapEventPlugin() just before you call \ +ReactDOM.render(). If you are using an external library which calls injectTapEventPlugin() \ +itself, please contact the maintainer as it shouldn\'t be called in library code and \ +should be injected by the application.' + ) + } + + alreadyInjected = true; + + __webpack_require__(69).injection.injectEventPluginsByName({ + 'TapEventPlugin': __webpack_require__(486)(shouldRejectClick) + }); +}; + + +/***/ }), +/* 485 */ +/***/ (function(module, exports) { + +module.exports = function(lastTouchEvent, clickTimestamp) { + if (lastTouchEvent && (clickTimestamp - lastTouchEvent) < 750) { + return true; + } +}; + + +/***/ }), +/* 486 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @providesModule TapEventPlugin + * @typechecks static-only + */ + + + +var EventConstants = __webpack_require__(487); +var EventPluginUtils = __webpack_require__(103); +var EventPropagators = __webpack_require__(68); +var SyntheticUIEvent = __webpack_require__(71); +var TouchEventUtils = __webpack_require__(488); +var ViewportMetrics = __webpack_require__(144); + +var keyOf = __webpack_require__(489); +var topLevelTypes = EventConstants.topLevelTypes; + +var isStartish = EventPluginUtils.isStartish; +var isEndish = EventPluginUtils.isEndish; + +var isTouch = function(topLevelType) { + var touchTypes = [ + 'topTouchCancel', + 'topTouchEnd', + 'topTouchStart', + 'topTouchMove' + ]; + return touchTypes.indexOf(topLevelType) >= 0; +} + +/** + * Number of pixels that are tolerated in between a `touchStart` and `touchEnd` + * in order to still be considered a 'tap' event. + */ +var tapMoveThreshold = 10; +var ignoreMouseThreshold = 750; +var startCoords = {x: null, y: null}; +var lastTouchEvent = null; + +var Axis = { + x: {page: 'pageX', client: 'clientX', envScroll: 'currentPageScrollLeft'}, + y: {page: 'pageY', client: 'clientY', envScroll: 'currentPageScrollTop'} +}; + +function getAxisCoordOfEvent(axis, nativeEvent) { + var singleTouch = TouchEventUtils.extractSingleTouch(nativeEvent); + if (singleTouch) { + return singleTouch[axis.page]; + } + return axis.page in nativeEvent ? + nativeEvent[axis.page] : + nativeEvent[axis.client] + ViewportMetrics[axis.envScroll]; +} + +function getDistance(coords, nativeEvent) { + var pageX = getAxisCoordOfEvent(Axis.x, nativeEvent); + var pageY = getAxisCoordOfEvent(Axis.y, nativeEvent); + return Math.pow( + Math.pow(pageX - coords.x, 2) + Math.pow(pageY - coords.y, 2), + 0.5 + ); +} + +var touchEvents = [ + 'topTouchStart', + 'topTouchCancel', + 'topTouchEnd', + 'topTouchMove', +]; + +var dependencies = [ + 'topMouseDown', + 'topMouseMove', + 'topMouseUp', +].concat(touchEvents); + +var eventTypes = { + touchTap: { + phasedRegistrationNames: { + bubbled: keyOf({onTouchTap: null}), + captured: keyOf({onTouchTapCapture: null}) + }, + dependencies: dependencies + } +}; + +var now = (function() { + if (Date.now) { + return Date.now; + } else { + // IE8 support: http://stackoverflow.com/questions/9430357/please-explain-why-and-how-new-date-works-as-workaround-for-date-now-in + return function () { + return +new Date; + } + } +})(); + +function createTapEventPlugin(shouldRejectClick) { + return { + + tapMoveThreshold: tapMoveThreshold, + + ignoreMouseThreshold: ignoreMouseThreshold, + + eventTypes: eventTypes, + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} targetInst The listening component root node. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget + ) { + + if (!isStartish(topLevelType) && !isEndish(topLevelType)) { + return null; + } + + if (isTouch(topLevelType)) { + lastTouchEvent = now(); + } else { + if (shouldRejectClick(lastTouchEvent, now())) { + return null; + } + } + + var event = null; + var distance = getDistance(startCoords, nativeEvent); + if (isEndish(topLevelType) && distance < tapMoveThreshold) { + event = SyntheticUIEvent.getPooled( + eventTypes.touchTap, + targetInst, + nativeEvent, + nativeEventTarget + ); + } + if (isStartish(topLevelType)) { + startCoords.x = getAxisCoordOfEvent(Axis.x, nativeEvent); + startCoords.y = getAxisCoordOfEvent(Axis.y, nativeEvent); + } else if (isEndish(topLevelType)) { + startCoords.x = 0; + startCoords.y = 0; + } + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + + }; +} + +module.exports = createTapEventPlugin; + + +/***/ }), +/* 487 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Types of raw signals from the browser caught at the top level. + */ +var topLevelTypes = { + topAbort: null, + topAnimationEnd: null, + topAnimationIteration: null, + topAnimationStart: null, + topBlur: null, + topCanPlay: null, + topCanPlayThrough: null, + topChange: null, + topClick: null, + topCompositionEnd: null, + topCompositionStart: null, + topCompositionUpdate: null, + topContextMenu: null, + topCopy: null, + topCut: null, + topDoubleClick: null, + topDrag: null, + topDragEnd: null, + topDragEnter: null, + topDragExit: null, + topDragLeave: null, + topDragOver: null, + topDragStart: null, + topDrop: null, + topDurationChange: null, + topEmptied: null, + topEncrypted: null, + topEnded: null, + topError: null, + topFocus: null, + topInput: null, + topInvalid: null, + topKeyDown: null, + topKeyPress: null, + topKeyUp: null, + topLoad: null, + topLoadedData: null, + topLoadedMetadata: null, + topLoadStart: null, + topMouseDown: null, + topMouseMove: null, + topMouseOut: null, + topMouseOver: null, + topMouseUp: null, + topPaste: null, + topPause: null, + topPlay: null, + topPlaying: null, + topProgress: null, + topRateChange: null, + topReset: null, + topScroll: null, + topSeeked: null, + topSeeking: null, + topSelectionChange: null, + topStalled: null, + topSubmit: null, + topSuspend: null, + topTextInput: null, + topTimeUpdate: null, + topTouchCancel: null, + topTouchEnd: null, + topTouchMove: null, + topTouchStart: null, + topTransitionEnd: null, + topVolumeChange: null, + topWaiting: null, + topWheel: null +}; + +var EventConstants = { + topLevelTypes: topLevelTypes +}; + +module.exports = EventConstants; + +/***/ }), +/* 488 */ +/***/ (function(module, exports) { + +/** + * Copyright 2013-2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @providesModule TouchEventUtils + */ + +var TouchEventUtils = { + /** + * Utility function for common case of extracting out the primary touch from a + * touch event. + * - `touchEnd` events usually do not have the `touches` property. + * http://stackoverflow.com/questions/3666929/ + * mobile-sarai-touchend-event-not-firing-when-last-touch-is-removed + * + * @param {Event} nativeEvent Native event that may or may not be a touch. + * @return {TouchesObject?} an object with pageX and pageY or null. + */ + extractSingleTouch: function(nativeEvent) { + var touches = nativeEvent.touches; + var changedTouches = nativeEvent.changedTouches; + var hasTouches = touches && touches.length > 0; + var hasChangedTouches = changedTouches && changedTouches.length > 0; + + return !hasTouches && hasChangedTouches ? changedTouches[0] : + hasTouches ? touches[0] : + nativeEvent; + } +}; + +module.exports = TouchEventUtils; + + +/***/ }), +/* 489 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/** + * Allows extraction of a minified key. Let's the build system minify keys + * without losing the ability to dynamically use key strings as values + * themselves. Pass in an object with a single key/val pair and it will return + * you the string key of that single record. Suppose you want to grab the + * value for a key 'className' inside of an object. Key/val minification may + * have aliased that key to be 'xa12'. keyOf({className: null}) will return + * 'xa12' in that case. Resolve keys you want to use once at startup time, then + * reuse those resolutions. + */ +var keyOf = function keyOf(oneKeyObj) { + var key; + for (key in oneKeyObj) { + if (!oneKeyObj.hasOwnProperty(key)) { + continue; + } + return key; + } + return null; +}; + +module.exports = keyOf; + +/***/ }), +/* 490 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + +var Form = function (_Component) { + _inherits(Form, _Component); + + function Form(props, context) { + _classCallCheck(this, Form); + + var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Form must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(Form, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit); + } + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('form', this.props); + } + }]); + + return Form; +}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + +Form.propTypes = { + onSubmit: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired +}; +Form.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object +}; + +/* harmony default export */ __webpack_exports__["a"] = (Form); + +/***/ }), +/* 491 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_prefixName__ = __webpack_require__(89); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + +var FormSection = function (_Component) { + _inherits(FormSection, _Component); + + function FormSection(props, context) { + _classCallCheck(this, FormSection); + + var _this = _possibleConstructorReturn(this, (FormSection.__proto__ || Object.getPrototypeOf(FormSection)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('FormSection must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(FormSection, [{ + key: 'getChildContext', + value: function getChildContext() { + var context = this.context, + name = this.props.name; + + return { + _reduxForm: _extends({}, context._reduxForm, { + sectionPrefix: Object(__WEBPACK_IMPORTED_MODULE_2__util_prefixName__["a" /* default */])(context, name) + }) + }; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + name = _props.name, + component = _props.component, + rest = _objectWithoutProperties(_props, ['children', 'name', 'component']); + + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(children)) { + return children; + } + + return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, rest, { + children: children + })); + } + }]); + + return FormSection; +}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + +FormSection.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]) +}; + +FormSection.defaultProps = { + component: 'div' +}; + +FormSection.childContextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired +}; + +FormSection.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object +}; + +/* harmony default export */ __webpack_exports__["a"] = (FormSection); + +/***/ }), +/* 492 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +function _extendableBuiltin(cls) { + function ExtendableBuiltin() { + cls.apply(this, arguments); + } + + ExtendableBuiltin.prototype = Object.create(cls.prototype, { + constructor: { + value: cls, + enumerable: false, + writable: true, + configurable: true + } + }); + + if (Object.setPrototypeOf) { + Object.setPrototypeOf(ExtendableBuiltin, cls); + } else { + ExtendableBuiltin.__proto__ = cls; + } + + return ExtendableBuiltin; +} + +var ExtendableError = function (_extendableBuiltin2) { + _inherits(ExtendableError, _extendableBuiltin2); + + function ExtendableError() { + var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + + _classCallCheck(this, ExtendableError); + + // extending Error is weird and does not propagate `message` + var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message)); + + Object.defineProperty(_this, 'message', { + configurable: true, + enumerable: false, + value: message, + writable: true + }); + + Object.defineProperty(_this, 'name', { + configurable: true, + enumerable: false, + value: _this.constructor.name, + writable: true + }); + + if (Error.hasOwnProperty('captureStackTrace')) { + Error.captureStackTrace(_this, _this.constructor); + return _possibleConstructorReturn(_this); + } + + Object.defineProperty(_this, 'stack', { + configurable: true, + enumerable: false, + value: new Error(message).stack, + writable: true + }); + return _this; + } + + return ExtendableError; +}(_extendableBuiltin(Error)); + +exports.default = ExtendableError; +module.exports = exports['default']; + + +/***/ }), +/* 493 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return formPropTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return fieldInputPropTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return fieldMetaPropTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return fieldPropTypes; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); + + +var any = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any, + bool = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool, + func = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func, + shape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape, + string = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, + oneOfType = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType, + object = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object; + + +var formPropTypes = { + // State: + anyTouched: bool.isRequired, // true if any of the fields have been marked as touched + asyncValidating: oneOfType([bool, string]).isRequired, // true if async validation is running, a string if a field triggered async validation + dirty: bool.isRequired, // true if any values are different from initialValues + error: any, // form-wide error from '_error' key in validation result + form: string.isRequired, // the name of the form + invalid: bool.isRequired, // true if there are any validation errors + initialized: bool.isRequired, // true if the form has been initialized + initialValues: object, // the initialValues object passed to reduxForm + pristine: bool.isRequired, // true if the values are the same as initialValues + pure: bool.isRequired, // if true, implements shouldComponentUpdate + submitting: bool.isRequired, // true if the form is in the process of being submitted + submitFailed: bool.isRequired, // true if the form was submitted and failed for any reason + submitSucceeded: bool.isRequired, // true if the form was successfully submitted + valid: bool.isRequired, // true if there are no validation errors + warning: any, // form-wide warning from '_warning' key in validation result + // Actions: + array: shape({ + insert: func.isRequired, // function to insert a value into an array field + move: func.isRequired, // function to move a value within an array field + pop: func.isRequired, // function to pop a value off of an array field + push: func.isRequired, // function to push a value onto an array field + remove: func.isRequired, // function to remove a value from an array field + removeAll: func.isRequired, // function to remove all the values from an array field + shift: func.isRequired, // function to shift a value out of an array field + splice: func.isRequired, // function to splice a value into an array field + swap: func.isRequired, // function to swap values in an array field + unshift: func.isRequired // function to unshift a value into an array field + }), + asyncValidate: func.isRequired, // function to trigger async validation + autofill: func.isRequired, // action to set a value of a field and mark it as autofilled + blur: func.isRequired, // action to mark a field as blurred + change: func.isRequired, // action to change the value of a field + clearAsyncError: func.isRequired, // action to clear the async error of a field + destroy: func.isRequired, // action to destroy the form's data in Redux + dispatch: func.isRequired, // the Redux dispatch action + handleSubmit: func.isRequired, // function to submit the form + initialize: func.isRequired, // action to initialize form data + reset: func.isRequired, // action to reset the form data to previously initialized values + touch: func.isRequired, // action to mark fields as touched + submit: func.isRequired, // action to trigger a submission of the specified form + untouch: func.isRequired, // action to mark fields as untouched + + // triggerSubmit + triggerSubmit: bool, // if true, submits the form on componentWillReceiveProps + clearSubmit: func.isRequired // called before a triggered submit, by default clears triggerSubmit +}; + +var fieldInputPropTypes = { + checked: bool, + name: string.isRequired, + onBlur: func.isRequired, + onChange: func.isRequired, + onDragStart: func.isRequired, + onDrop: func.isRequired, + onFocus: func.isRequired, + value: any +}; + +var fieldMetaPropTypes = { + active: bool.isRequired, + asyncValidating: bool.isRequired, + autofilled: bool.isRequired, + dirty: bool.isRequired, + dispatch: func.isRequired, + error: string, + form: string.isRequired, + invalid: bool.isRequired, + pristine: bool.isRequired, + submitting: bool.isRequired, + submitFailed: bool.isRequired, + touched: bool.isRequired, + valid: bool.isRequired, + visited: bool.isRequired, + warning: string +}; + +var fieldPropTypes = { + input: shape(fieldInputPropTypes).isRequired, + meta: shape(fieldMetaPropTypes).isRequired, + custom: object.isRequired +}; + +/* harmony default export */ __webpack_exports__["a"] = (formPropTypes); + +/***/ }), +/* 494 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createField__ = __webpack_require__(495); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createField__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 495 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConnectedField__ = __webpack_require__(496); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__ = __webpack_require__(281); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_prefixName__ = __webpack_require__(89); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + + +var createField = function createField(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + setIn = _ref.setIn, + toJS = _ref.toJS; + + var ConnectedField = Object(__WEBPACK_IMPORTED_MODULE_3__ConnectedField__["a" /* default */])({ + deepEqual: deepEqual, + getIn: getIn, + toJS: toJS + }); + + var Field = function (_Component) { + _inherits(Field, _Component); + + function Field(props, context) { + _classCallCheck(this, Field); + + var _this = _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Field must be inside a component decorated with reduxForm()'); + } + + _this.normalize = _this.normalize.bind(_this); + return _this; + } + + _createClass(Field, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return Object(__WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__["a" /* default */])(this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; + + this.context._reduxForm.register(this.name, 'Field', function () { + return _this2.props.validate; + }, function () { + return _this2.props.warn; + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.name !== nextProps.name) { + // unregister old name + this.context._reduxForm.unregister(this.name + // register new name + );this.context._reduxForm.register(Object(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */])(this.context, nextProps.name), 'Field'); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context._reduxForm.unregister(this.name); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Field'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'normalize', + value: function normalize(name, value) { + var normalize = this.props.normalize; + + if (!normalize) { + return value; + } + var previousValues = this.context._reduxForm.getValues(); + var previousValue = this.value; + var nextValues = setIn(previousValues, name, value); + return normalize(value, previousValue, nextValues, previousValues); + } + }, { + key: 'render', + value: function render() { + return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(ConnectedField, _extends({}, this.props, { + name: this.name, + normalize: this.normalize, + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'name', + get: function get() { + return Object(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */])(this.context, this.props.name); + } + }, { + key: 'dirty', + get: function get() { + return !this.pristine; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.connected.getWrappedInstance().isPristine(); + } + }, { + key: 'value', + get: function get() { + return this.refs.connected && this.refs.connected.getWrappedInstance().getValue(); + } + }]); + + return Field; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + Field.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired, + format: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, + normalize: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, + onBlur: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, + onChange: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, + onFocus: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, + onDragStart: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, + onDrop: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, + parse: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, + props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, + validate: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]), + warn: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]), + withRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool + }; + Field.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object + }; + + return Field; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createField); + +/***/ }), +/* 496 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(27); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createFieldProps__ = __webpack_require__(269); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(270); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__ = __webpack_require__(499); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__structure_plain__ = __webpack_require__(11); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + + + +var propsToNotUpdateFor = ['_reduxForm']; + +var isObject = function isObject(entity) { + return entity && (typeof entity === 'undefined' ? 'undefined' : _typeof(entity)) === 'object'; +}; + +var isFunction = function isFunction(entity) { + return entity && typeof entity === 'function'; +}; + +var eventPreventDefault = function eventPreventDefault(event) { + if (isObject(event) && isFunction(event.preventDefault)) { + event.preventDefault(); + } +}; + +var eventDataTransferGetData = function eventDataTransferGetData(event, key) { + if (isObject(event) && isObject(event.dataTransfer) && isFunction(event.dataTransfer.getData)) { + return event.dataTransfer.getData(key); + } +}; + +var eventDataTransferSetData = function eventDataTransferSetData(event, key, value) { + if (isObject(event) && isObject(event.dataTransfer) && isFunction(event.dataTransfer.setData)) { + event.dataTransfer.setData(key, value); + } +}; + +var createConnectedField = function createConnectedField(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS; + + var getSyncError = function getSyncError(syncErrors, name) { + var error = __WEBPACK_IMPORTED_MODULE_6__structure_plain__["a" /* default */].getIn(syncErrors, name + // Because the error for this field might not be at a level in the error structure where + // it can be set directly, it might need to be unwrapped from the _error property + );return error && error._error ? error._error : error; + }; + + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + var warning = getIn(syncWarnings, name + // Because the warning for this field might not be at a level in the warning structure where + // it can be set directly, it might need to be unwrapped from the _warning property + );return warning && warning._warning ? warning._warning : warning; + }; + + var ConnectedField = function (_Component) { + _inherits(ConnectedField, _Component); + + function ConnectedField(props) { + _classCallCheck(this, ConnectedField); + + var _this = _possibleConstructorReturn(this, (ConnectedField.__proto__ || Object.getPrototypeOf(ConnectedField)).call(this, props)); + + _this.handleChange = _this.handleChange.bind(_this); + _this.handleFocus = _this.handleFocus.bind(_this); + _this.handleBlur = _this.handleBlur.bind(_this); + _this.handleDragStart = _this.handleDragStart.bind(_this); + _this.handleDrop = _this.handleDrop.bind(_this); + return _this; + } + + _createClass(ConnectedField, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this2 = this; + + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); + }); + } + }, { + key: 'isPristine', + value: function isPristine() { + return this.props.pristine; + } + }, { + key: 'getValue', + value: function getValue() { + return this.props.value; + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'handleChange', + value: function handleChange(event) { + var _props = this.props, + name = _props.name, + dispatch = _props.dispatch, + parse = _props.parse, + normalize = _props.normalize, + onChange = _props.onChange, + _reduxForm = _props._reduxForm, + previousValue = _props.value; + + var newValue = Object(__WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize }); + + var defaultPrevented = false; + if (onChange) { + onChange(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return eventPreventDefault(event); + } + }), newValue, previousValue); + } + if (!defaultPrevented) { + // dispatch change action + dispatch(_reduxForm.change(name, newValue)); + } + } + }, { + key: 'handleFocus', + value: function handleFocus(event) { + var _props2 = this.props, + name = _props2.name, + dispatch = _props2.dispatch, + onFocus = _props2.onFocus, + _reduxForm = _props2._reduxForm; + + + var defaultPrevented = false; + if (onFocus) { + onFocus(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return eventPreventDefault(event); + } + })); + } + + if (!defaultPrevented) { + dispatch(_reduxForm.focus(name)); + } + } + }, { + key: 'handleBlur', + value: function handleBlur(event) { + var _props3 = this.props, + name = _props3.name, + dispatch = _props3.dispatch, + parse = _props3.parse, + normalize = _props3.normalize, + onBlur = _props3.onBlur, + _reduxForm = _props3._reduxForm, + _value = _props3._value, + previousValue = _props3.value; + + var newValue = Object(__WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize } + + // for checkbox and radio, if the value property of checkbox or radio equals + // the value passed by blur event, then fire blur action with previousValue. + );if (newValue === _value && _value !== undefined) { + newValue = previousValue; + } + + var defaultPrevented = false; + if (onBlur) { + onBlur(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return eventPreventDefault(event); + } + }), newValue, previousValue); + } + + if (!defaultPrevented) { + // dispatch blur action + dispatch(_reduxForm.blur(name, newValue) + + // call post-blur callback + );if (_reduxForm.asyncValidate) { + _reduxForm.asyncValidate(name, newValue); + } + } + } + }, { + key: 'handleDragStart', + value: function handleDragStart(event) { + var _props4 = this.props, + onDragStart = _props4.onDragStart, + value = _props4.value; + + eventDataTransferSetData(event, __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */], value == null ? '' : value); + + if (onDragStart) { + onDragStart(event); + } + } + }, { + key: 'handleDrop', + value: function handleDrop(event) { + var _props5 = this.props, + name = _props5.name, + dispatch = _props5.dispatch, + onDrop = _props5.onDrop, + _reduxForm = _props5._reduxForm, + previousValue = _props5.value; + + var newValue = eventDataTransferGetData(event, __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */]); + + var defaultPrevented = false; + if (onDrop) { + onDrop(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return eventPreventDefault(event); + } + }), newValue, previousValue); + } + + if (!defaultPrevented) { + // dispatch change action + dispatch(_reduxForm.change(name, newValue)); + eventPreventDefault(event); + } + } + }, { + key: 'render', + value: function render() { + var _props6 = this.props, + component = _props6.component, + withRef = _props6.withRef, + name = _props6.name, + _reduxForm = _props6._reduxForm, + normalize = _props6.normalize, + onBlur = _props6.onBlur, + onChange = _props6.onChange, + onFocus = _props6.onFocus, + onDragStart = _props6.onDragStart, + onDrop = _props6.onDrop, + rest = _objectWithoutProperties(_props6, ['component', 'withRef', 'name', '_reduxForm', 'normalize', 'onBlur', 'onChange', 'onFocus', 'onDragStart', 'onDrop']); + + var _createFieldProps = Object(__WEBPACK_IMPORTED_MODULE_3__createFieldProps__["a" /* default */])({ getIn: getIn, toJS: toJS }, name, _extends({}, rest, { + form: _reduxForm.form, + onBlur: this.handleBlur, + onChange: this.handleChange, + onDrop: this.handleDrop, + onDragStart: this.handleDragStart, + onFocus: this.handleFocus + })), + custom = _createFieldProps.custom, + props = _objectWithoutProperties(_createFieldProps, ['custom']); + + if (withRef) { + custom.ref = 'renderedComponent'; + } + if (typeof component === 'string') { + var input = props.input, + meta = props.meta; // eslint-disable-line no-unused-vars + // flatten input into other props + + return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, input, custom)); + } else { + return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, props, custom)); + } + } + }]); + + return ConnectedField; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + ConnectedField.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired, + props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object + }; + + var connector = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(function (state, ownProps) { + var name = ownProps.name, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; + + var formState = getFormState(state); + var initialState = getIn(formState, 'initial.' + name); + var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var submitting = getIn(formState, 'submitting'); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var pristine = deepEqual(value, initial); + return { + asyncError: getIn(formState, 'asyncErrors.' + name), + asyncValidating: getIn(formState, 'asyncValidating') === name, + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name), + submitFailed: getIn(formState, 'submitFailed'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + initial: initial, + value: value, + _value: ownProps.value // save value passed in (for checkboxes) + }; + }, undefined, undefined, { withRef: true }); + return connector(ConnectedField); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createConnectedField); + +/***/ }), +/* 497 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(271); + + +var getSelectedValues = function getSelectedValues(options) { + var result = []; + if (options) { + for (var index = 0; index < options.length; index++) { + var option = options[index]; + if (option.selected) { + result.push(option.value); + } + } + } + return result; +}; + +var getValue = function getValue(event, isReactNative) { + if (Object(__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */])(event)) { + if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) { + return event.nativeEvent.text; + } + if (isReactNative && event.nativeEvent !== undefined) { + return event.nativeEvent.text; + } + var _event$target = event.target, + type = _event$target.type, + value = _event$target.value, + checked = _event$target.checked, + files = _event$target.files, + dataTransfer = event.dataTransfer; + + if (type === 'checkbox') { + return checked || ''; + } + if (type === 'file') { + return files || dataTransfer && dataTransfer.files; + } + if (type === 'select-multiple') { + return getSelectedValues(event.target.options); + } + return value; + } + return event; +}; + +/* harmony default export */ __webpack_exports__["a"] = (getValue); + +/***/ }), +/* 498 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var isReactNative = typeof window !== 'undefined' && window.navigator && window.navigator.product && window.navigator.product === 'ReactNative'; + +/* harmony default export */ __webpack_exports__["a"] = (isReactNative); + +/***/ }), +/* 499 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dataKey; }); +var dataKey = 'text'; + +/***/ }), +/* 500 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var splice = function splice(array, index, removeNum, value) { + array = array || []; + + if (index < array.length) { + if (value === undefined && !removeNum) { + // inserting undefined + var _copy2 = [].concat(_toConsumableArray(array)); + _copy2.splice(index, 0, null); + _copy2[index] = undefined; + return _copy2; + } + if (value != null) { + var _copy3 = [].concat(_toConsumableArray(array)); + _copy3.splice(index, removeNum, value // removing and adding + );return _copy3; + } + var _copy = [].concat(_toConsumableArray(array)); + _copy.splice(index, removeNum // removing + );return _copy; + } + if (removeNum) { + // trying to remove non-existant item: return original array + return array; + } + // trying to add outside of range: just set value + var copy = [].concat(_toConsumableArray(array)); + copy[index] = value; + return copy; +}; + +/* harmony default export */ __webpack_exports__["a"] = (splice); + +/***/ }), +/* 501 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(114); + + + +var getIn = function getIn(state, field) { + if (!state) { + return state; + } + + var path = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(field); + var length = path.length; + if (!length) { + return undefined; + } + + var result = state; + for (var i = 0; i < length && !!result; ++i) { + result = result[path[i]]; + } + + return result; +}; + +/* harmony default export */ __webpack_exports__["a"] = (getIn); + +/***/ }), +/* 502 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoize_js__ = __webpack_require__(503); + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = Object(__WEBPACK_IMPORTED_MODULE_0__memoize_js__["a" /* default */])(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (memoizeCapped); + + +/***/ }), +/* 503 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(168); + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]); + return memoized; +} + +// Expose `MapCache`. +memoize.Cache = __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (memoize); + + +/***/ }), +/* 504 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Hash_js__ = __webpack_require__(505); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ListCache_js__ = __webpack_require__(117); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Map_js__ = __webpack_require__(170); + + + + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new __WEBPACK_IMPORTED_MODULE_0__Hash_js__["a" /* default */], + 'map': new (__WEBPACK_IMPORTED_MODULE_2__Map_js__["a" /* default */] || __WEBPACK_IMPORTED_MODULE_1__ListCache_js__["a" /* default */]), + 'string': new __WEBPACK_IMPORTED_MODULE_0__Hash_js__["a" /* default */] + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheClear); + + +/***/ }), +/* 505 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hashClear_js__ = __webpack_require__(506); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__ = __webpack_require__(511); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hashGet_js__ = __webpack_require__(512); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__hashHas_js__ = __webpack_require__(513); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__hashSet_js__ = __webpack_require__(514); + + + + + + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__hashClear_js__["a" /* default */]; +Hash.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__["a" /* default */]; +Hash.prototype.get = __WEBPACK_IMPORTED_MODULE_2__hashGet_js__["a" /* default */]; +Hash.prototype.has = __WEBPACK_IMPORTED_MODULE_3__hashHas_js__["a" /* default */]; +Hash.prototype.set = __WEBPACK_IMPORTED_MODULE_4__hashSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (Hash); + + +/***/ }), +/* 506 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(116); + + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? Object(__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */])(null) : {}; + this.size = 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashClear); + + +/***/ }), +/* 507 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isMasked_js__ = __webpack_require__(508); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toSource_js__ = __webpack_require__(275); + + + + + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!Object(__WEBPACK_IMPORTED_MODULE_2__isObject_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_1__isMasked_js__["a" /* default */])(value)) { + return false; + } + var pattern = Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(value) ? reIsNative : reIsHostCtor; + return pattern.test(Object(__WEBPACK_IMPORTED_MODULE_3__toSource_js__["a" /* default */])(value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsNative); + + +/***/ }), +/* 508 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__ = __webpack_require__(509); + + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(__WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */].keys && __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */].keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/* harmony default export */ __webpack_exports__["a"] = (isMasked); + + +/***/ }), +/* 509 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32); + + +/** Used to detect overreaching core-js shims. */ +var coreJsData = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */]['__core-js_shared__']; + +/* harmony default export */ __webpack_exports__["a"] = (coreJsData); + + +/***/ }), +/* 510 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/* harmony default export */ __webpack_exports__["a"] = (getValue); + + +/***/ }), +/* 511 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashDelete); + + +/***/ }), +/* 512 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(116); + + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */]) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashGet); + + +/***/ }), +/* 513 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(116); + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +/* harmony default export */ __webpack_exports__["a"] = (hashHas); + + +/***/ }), +/* 514 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(116); + + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashSet); + + +/***/ }), +/* 515 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheClear); + + +/***/ }), +/* 516 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(118); + + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheDelete); + + +/***/ }), +/* 517 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(118); + + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheGet); + + +/***/ }), +/* 518 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(118); + + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(this.__data__, key) > -1; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheHas); + + +/***/ }), +/* 519 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(118); + + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheSet); + + +/***/ }), +/* 520 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(119); + + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheDelete); + + +/***/ }), +/* 521 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/* harmony default export */ __webpack_exports__["a"] = (isKeyable); + + +/***/ }), +/* 522 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(119); + + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key).get(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheGet); + + +/***/ }), +/* 523 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(119); + + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key).has(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheHas); + + +/***/ }), +/* 524 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(119); + + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheSet); + + +/***/ }), +/* 525 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(272); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(115); + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value)) { + // Recursively convert values (susceptible to call stack limits). + return Object(__WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */])(value, baseToString) + ''; + } + if (Object(__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */])(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseToString); + + +/***/ }), +/* 526 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(114); + + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var setInWithPath = function setInWithPath(state, value, path, pathIndex) { + if (pathIndex >= path.length) { + return value; + } + + var first = path[pathIndex]; + var next = setInWithPath(state && state[first], value, path, pathIndex + 1); + + if (!state) { + var initialized = isNaN(first) ? {} : []; + initialized[first] = next; + return initialized; + } + + if (Array.isArray(state)) { + var copy = [].concat(state); + copy[first] = next; + return copy; + } + + return _extends({}, state, _defineProperty({}, first, next)); +}; + +var setIn = function setIn(state, field, value) { + return setInWithPath(state, value, Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(field), 0); +}; + +/* harmony default export */ __webpack_exports__["a"] = (setIn); + +/***/ }), +/* 527 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(277); + + + +var customizer = function customizer(obj, other) { + if (obj === other) return true; + if ((obj == null || obj === '' || obj === false) && (other == null || other === '' || other === false)) return true; + + if (obj && other && obj._error !== other._error) return false; + if (obj && other && obj._warning !== other._warning) return false; +}; + +var deepEqual = function deepEqual(a, b) { + return Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */])(a, b, customizer); +}; + +/* harmony default export */ __webpack_exports__["a"] = (deepEqual); + +/***/ }), +/* 528 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(172); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__ = __webpack_require__(278); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__ = __webpack_require__(539); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__ = __webpack_require__(542); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getTag_js__ = __webpack_require__(557); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArray_js__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__ = __webpack_require__(175); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__ = __webpack_require__(178); + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = Object(__WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */])(object), + othIsArr = Object(__WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */])(other), + objTag = objIsArr ? arrayTag : Object(__WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */])(object), + othTag = othIsArr ? arrayTag : Object(__WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */])(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && Object(__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */])(object)) { + if (!Object(__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */])(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return (objIsArr || Object(__WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__["a" /* default */])(object)) + ? Object(__WEBPACK_IMPORTED_MODULE_1__equalArrays_js__["a" /* default */])(object, other, bitmask, customizer, equalFunc, stack) + : Object(__WEBPACK_IMPORTED_MODULE_2__equalByTag_js__["a" /* default */])(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return Object(__WEBPACK_IMPORTED_MODULE_3__equalObjects_js__["a" /* default */])(object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsEqualDeep); + + +/***/ }), +/* 529 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(117); + + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */]; + this.size = 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (stackClear); + + +/***/ }), +/* 530 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (stackDelete); + + +/***/ }), +/* 531 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (stackGet); + + +/***/ }), +/* 532 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (stackHas); + + +/***/ }), +/* 533 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(117); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(170); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MapCache_js__ = __webpack_require__(168); + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */]) { + var pairs = data.__data__; + if (!__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new __WEBPACK_IMPORTED_MODULE_2__MapCache_js__["a" /* default */](pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (stackSet); + + +/***/ }), +/* 534 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(168); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__ = __webpack_require__(535); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__ = __webpack_require__(536); + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__["a" /* default */]; +SetCache.prototype.has = __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (SetCache); + + +/***/ }), +/* 535 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (setCacheAdd); + + +/***/ }), +/* 536 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (setCacheHas); + + +/***/ }), +/* 537 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (arraySome); + + +/***/ }), +/* 538 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (cacheHas); + + +/***/ }), +/* 539 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__ = __webpack_require__(279); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__eq_js__ = __webpack_require__(90); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__ = __webpack_require__(278); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__ = __webpack_require__(540); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__setToArray_js__ = __webpack_require__(541); + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](object), new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return Object(__WEBPACK_IMPORTED_MODULE_2__eq_js__["a" /* default */])(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__["a" /* default */]; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = __WEBPACK_IMPORTED_MODULE_5__setToArray_js__["a" /* default */]); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = Object(__WEBPACK_IMPORTED_MODULE_3__equalArrays_js__["a" /* default */])(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (equalByTag); + + +/***/ }), +/* 540 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapToArray); + + +/***/ }), +/* 541 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (setToArray); + + +/***/ }), +/* 542 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__ = __webpack_require__(543); + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = Object(__WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */])(object), + objLength = objProps.length, + othProps = Object(__WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */])(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (equalObjects); + + +/***/ }), +/* 543 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__ = __webpack_require__(544); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__ = __webpack_require__(546); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(173); + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__["a" /* default */])(object, __WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (getAllKeys); + + +/***/ }), +/* 544 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__ = __webpack_require__(545); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(33); + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */])(object) ? result : Object(__WEBPACK_IMPORTED_MODULE_0__arrayPush_js__["a" /* default */])(result, symbolsFunc(object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseGetAllKeys); + + +/***/ }), +/* 545 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayPush); + + +/***/ }), +/* 546 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(547); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubArray_js__ = __webpack_require__(548); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? __WEBPACK_IMPORTED_MODULE_1__stubArray_js__["a" /* default */] : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return Object(__WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */])(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ __webpack_exports__["a"] = (getSymbols); + + +/***/ }), +/* 547 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayFilter); + + +/***/ }), +/* 548 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ __webpack_exports__["a"] = (stubArray); + + +/***/ }), +/* 549 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseTimes); + + +/***/ }), +/* 550 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54); + + + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == argsTag; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsArguments); + + +/***/ }), +/* 551 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (stubFalse); + + +/***/ }), +/* 552 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(179); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(54); + + + + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) && + Object(__WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */])(value.length) && !!typedArrayTags[Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value)]; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsTypedArray); + + +/***/ }), +/* 553 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseUnary); + + +/***/ }), +/* 554 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(253); + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */].process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* harmony default export */ __webpack_exports__["a"] = (nodeUtil); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(176)(module))) + +/***/ }), +/* 555 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPrototype_js__ = __webpack_require__(180); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__ = __webpack_require__(556); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0__isPrototype_js__["a" /* default */])(object)) { + return Object(__WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__["a" /* default */])(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseKeys); + + +/***/ }), +/* 556 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(255); + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.keys, Object); + +/* harmony default export */ __webpack_exports__["a"] = (nativeKeys); + + +/***/ }), +/* 557 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DataView_js__ = __webpack_require__(558); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(170); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Promise_js__ = __webpack_require__(559); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Set_js__ = __webpack_require__(560); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__ = __webpack_require__(561); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__ = __webpack_require__(76); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toSource_js__ = __webpack_require__(275); + + + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */]), + mapCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]), + promiseCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */]), + setCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]), + weakMapCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */]; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */](new ArrayBuffer(1))) != dataViewTag) || + (__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]) != mapTag) || + (__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */] && getTag(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */].resolve()) != promiseTag) || + (__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]) != setTag) || + (__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]) != weakMapTag)) { + getTag = function(value) { + var result = Object(__WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */])(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (getTag); + + +/***/ }), +/* 558 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32); + + + +/* Built-in method references that are verified to be native. */ +var DataView = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'DataView'); + +/* harmony default export */ __webpack_exports__["a"] = (DataView); + + +/***/ }), +/* 559 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32); + + + +/* Built-in method references that are verified to be native. */ +var Promise = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Promise'); + +/* harmony default export */ __webpack_exports__["a"] = (Promise); + + +/***/ }), +/* 560 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32); + + + +/* Built-in method references that are verified to be native. */ +var Set = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Set'); + +/* harmony default export */ __webpack_exports__["a"] = (Set); + + +/***/ }), +/* 561 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32); + + + +/* Built-in method references that are verified to be native. */ +var WeakMap = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'WeakMap'); + +/* harmony default export */ __webpack_exports__["a"] = (WeakMap); + + +/***/ }), +/* 562 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(114); + + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var deleteInWithPath = function deleteInWithPath(state, first) { + for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + rest[_key - 2] = arguments[_key]; + } + + if (state === undefined || first === undefined) { + return state; + } + if (rest.length) { + if (Array.isArray(state)) { + if (first < state.length) { + var result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); + if (result !== state[first]) { + var copy = [].concat(_toConsumableArray(state)); + copy[first] = result; + return copy; + } + } + return state; + } + if (first in state) { + var _result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); + return state[first] === _result ? state : _extends({}, state, _defineProperty({}, first, _result)); + } + return state; + } + if (Array.isArray(state)) { + if (isNaN(first)) { + throw new Error('Cannot delete non-numerical index from an array'); + } + if (first < state.length) { + var _copy = [].concat(_toConsumableArray(state)); + _copy.splice(first, 1); + return _copy; + } + return state; + } + if (first in state) { + var _copy2 = _extends({}, state); + delete _copy2[first]; + return _copy2; + } + return state; +}; + +var deleteIn = function deleteIn(state, field) { + return deleteInWithPath.apply(undefined, [state].concat(_toConsumableArray(Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(field)))); +}; + +/* harmony default export */ __webpack_exports__["a"] = (deleteIn); + +/***/ }), +/* 563 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var keys = function keys(value) { + if (!value) { + return []; + } + + if (Array.isArray(value)) { + return value.map(function (i) { + return i.name; + }); + } + + return Object.keys(value); +}; + +/* harmony default export */ __webpack_exports__["a"] = (keys); + +/***/ }), +/* 564 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFields__ = __webpack_require__(565); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFields__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 565 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConnectedFields__ = __webpack_require__(566); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__ = __webpack_require__(281); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__structure_plain__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_prefixName__ = __webpack_require__(89); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + + + +var validateNameProp = function validateNameProp(prop) { + if (!prop) { + return new Error('No "names" prop was specified <Fields/>'); + } + if (!Array.isArray(prop) && !prop._isFieldArray) { + return new Error('Invalid prop "names" supplied to <Fields/>. Must be either an array of strings or the fields array generated by FieldArray.'); + } +}; + +var createFields = function createFields(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS, + size = _ref.size; + + var ConnectedFields = Object(__WEBPACK_IMPORTED_MODULE_3__ConnectedFields__["a" /* default */])({ + deepEqual: deepEqual, + getIn: getIn, + toJS: toJS, + size: size + }); + + var Fields = function (_Component) { + _inherits(Fields, _Component); + + function Fields(props, context) { + _classCallCheck(this, Fields); + + var _this = _possibleConstructorReturn(this, (Fields.__proto__ || Object.getPrototypeOf(Fields)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Fields must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(Fields, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return Object(__WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__["a" /* default */])(this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var error = validateNameProp(this.props.names); + if (error) { + throw error; + } + var context = this.context; + var register = context._reduxForm.register; + + this.names.forEach(function (name) { + return register(name, 'Field'); + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (!__WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].deepEqual(this.props.names, nextProps.names)) { + var context = this.context; + var _context$_reduxForm = context._reduxForm, + register = _context$_reduxForm.register, + unregister = _context$_reduxForm.unregister; + // unregister old name + + this.props.names.forEach(function (name) { + return unregister(Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name)); + } + // register new name + );nextProps.names.forEach(function (name) { + return register(Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name), 'Field'); + }); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + var context = this.context; + var unregister = context._reduxForm.unregister; + + this.props.names.forEach(function (name) { + return unregister(Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name)); + }); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Fields'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'render', + value: function render() { + var context = this.context; + + return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(ConnectedFields, _extends({}, this.props, { + names: this.props.names.map(function (name) { + return Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name); + }), + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'names', + get: function get() { + var context = this.context; + + return this.props.names.map(function (name) { + return Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name); + }); + } + }, { + key: 'dirty', + get: function get() { + return this.refs.connected.getWrappedInstance().isDirty(); + } + }, { + key: 'pristine', + get: function get() { + return !this.dirty; + } + }, { + key: 'values', + get: function get() { + return this.refs.connected && this.refs.connected.getWrappedInstance().getValues(); + } + }]); + + return Fields; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + Fields.propTypes = { + names: function names(props, propName) { + return validateNameProp(props[propName]); + }, + component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired, + format: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, + parse: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, + props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, + withRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool + }; + Fields.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object + }; + + return Fields; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFields); + +/***/ }), +/* 566 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(27); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createFieldProps__ = __webpack_require__(269); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__structure_plain__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__events_onChangeValue__ = __webpack_require__(270); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + + +var propsToNotUpdateFor = ['_reduxForm']; + +var createConnectedFields = function createConnectedFields(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS, + size = _ref.size; + + var getSyncError = function getSyncError(syncErrors, name) { + // Because the error for this field might not be at a level in the error structure where + // it can be set directly, it might need to be unwrapped from the _error property + return __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error') || __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].getIn(syncErrors, name); + }; + + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + var warning = getIn(syncWarnings, name + // Because the warning for this field might not be at a level in the warning structure where + // it can be set directly, it might need to be unwrapped from the _warning property + );return warning && warning._warning ? warning._warning : warning; + }; + + var ConnectedFields = function (_Component) { + _inherits(ConnectedFields, _Component); + + function ConnectedFields(props) { + _classCallCheck(this, ConnectedFields); + + var _this = _possibleConstructorReturn(this, (ConnectedFields.__proto__ || Object.getPrototypeOf(ConnectedFields)).call(this, props)); + + _this.handleChange = _this.handleChange.bind(_this); + _this.handleFocus = _this.handleFocus.bind(_this); + _this.handleBlur = _this.handleBlur.bind(_this); + + _this.onChangeFns = props.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this.handleChange(name, event); + }; + return acc; + }, {}); + + _this.onFocusFns = props.names.reduce(function (acc, name) { + acc[name] = function () { + return _this.handleFocus(name); + }; + return acc; + }, {}); + + _this.onBlurFns = props.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this.handleBlur(name, event); + }; + return acc; + }, {}); + return _this; + } + + _createClass(ConnectedFields, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; + + if (this.props.names !== nextProps.names && (size(this.props.names) !== size(nextProps.names) || nextProps.names.some(function (nextName) { + return !_this2.props._fields[nextName]; + }))) { + // names is changed. The cached event handlers need to be updated + this.onChangeFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this2.handleChange(name, event); + }; + return acc; + }, {}); + + this.onFocusFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function () { + return _this2.handleFocus(name); + }; + return acc; + }, {}); + + this.onBlurFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this2.handleBlur(name, event); + }; + return acc; + }, {}); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this3 = this; + + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); + }); + } + }, { + key: 'isDirty', + value: function isDirty() { + var _fields = this.props._fields; + + return Object.keys(_fields).some(function (name) { + return _fields[name].dirty; + }); + } + }, { + key: 'getValues', + value: function getValues() { + var _fields = this.props._fields; + + return Object.keys(_fields).reduce(function (accumulator, name) { + return __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].setIn(accumulator, name, _fields[name].value); + }, {}); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'handleChange', + value: function handleChange(name, event) { + var _props = this.props, + dispatch = _props.dispatch, + parse = _props.parse, + normalize = _props.normalize, + _reduxForm = _props._reduxForm; + + var value = Object(__WEBPACK_IMPORTED_MODULE_5__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize }); + + dispatch(_reduxForm.change(name, value)); + } + }, { + key: 'handleFocus', + value: function handleFocus(name) { + var _props2 = this.props, + dispatch = _props2.dispatch, + _reduxForm = _props2._reduxForm; + + dispatch(_reduxForm.focus(name)); + } + }, { + key: 'handleBlur', + value: function handleBlur(name, event) { + var _props3 = this.props, + dispatch = _props3.dispatch, + parse = _props3.parse, + normalize = _props3.normalize, + _reduxForm = _props3._reduxForm; + + var value = Object(__WEBPACK_IMPORTED_MODULE_5__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize } + + // dispatch blur action + );dispatch(_reduxForm.blur(name, value) + + // call post-blur callback + );if (_reduxForm.asyncValidate) { + _reduxForm.asyncValidate(name, value); + } + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + + var _props4 = this.props, + component = _props4.component, + withRef = _props4.withRef, + _fields = _props4._fields, + _reduxForm = _props4._reduxForm, + rest = _objectWithoutProperties(_props4, ['component', 'withRef', '_fields', '_reduxForm']); + + var sectionPrefix = _reduxForm.sectionPrefix, + form = _reduxForm.form; + + var _Object$keys$reduce = Object.keys(_fields).reduce(function (accumulator, name) { + var connectedProps = _fields[name]; + + var _createFieldProps = Object(__WEBPACK_IMPORTED_MODULE_3__createFieldProps__["a" /* default */])({ getIn: getIn, toJS: toJS }, name, _extends({}, connectedProps, rest, { + form: form, + onBlur: _this4.onBlurFns[name], + onChange: _this4.onChangeFns[name], + onFocus: _this4.onFocusFns[name] + })), + custom = _createFieldProps.custom, + fieldProps = _objectWithoutProperties(_createFieldProps, ['custom']); + + accumulator.custom = custom; + var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; + return __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].setIn(accumulator, fieldName, fieldProps); + }, {}), + custom = _Object$keys$reduce.custom, + props = _objectWithoutProperties(_Object$keys$reduce, ['custom']); + + if (withRef) { + props.ref = 'renderedComponent'; + } + + return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, props, custom)); + } + }]); + + return ConnectedFields; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + ConnectedFields.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired, + _fields: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired, + props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object + }; + + var connector = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(function (state, ownProps) { + var names = ownProps.names, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; + + var formState = getFormState(state); + return { + _fields: names.reduce(function (accumulator, name) { + var initialState = getIn(formState, 'initial.' + name); + var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var submitting = getIn(formState, 'submitting'); + var pristine = value === initial; + accumulator[name] = { + asyncError: getIn(formState, 'asyncErrors.' + name), + asyncValidating: getIn(formState, 'asyncValidating') === name, + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name), + submitFailed: getIn(formState, 'submitFailed'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + _value: ownProps.value // save value passed in (for checkboxes) + }; + return accumulator; + }, {}) + }; + }, undefined, undefined, { withRef: true }); + return connector(ConnectedFields); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createConnectedFields); + +/***/ }), +/* 567 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFieldArray__ = __webpack_require__(568); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFieldArray__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 568 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConnectedFieldArray__ = __webpack_require__(569); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(89); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + + + + + + +var toArray = function toArray(value) { + return Array.isArray(value) ? value : [value]; +}; + +var wrapError = function wrapError(fn, key) { + return fn && function () { + var validators = toArray(fn); + for (var i = 0; i < validators.length; i++) { + var result = validators[i].apply(validators, arguments); + if (result) { + return _defineProperty({}, key, result); + } + } + }; +}; + +var createFieldArray = function createFieldArray(_ref2) { + var deepEqual = _ref2.deepEqual, + getIn = _ref2.getIn, + size = _ref2.size; + + var ConnectedFieldArray = Object(__WEBPACK_IMPORTED_MODULE_3__ConnectedFieldArray__["a" /* default */])({ + deepEqual: deepEqual, + getIn: getIn, + size: size + }); + + var FieldArray = function (_Component) { + _inherits(FieldArray, _Component); + + function FieldArray(props, context) { + _classCallCheck(this, FieldArray); + + var _this = _possibleConstructorReturn(this, (FieldArray.__proto__ || Object.getPrototypeOf(FieldArray)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('FieldArray must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(FieldArray, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; + + this.context._reduxForm.register(this.name, 'FieldArray', function () { + return wrapError(_this2.props.validate, '_error'); + }, function () { + return wrapError(_this2.props.warn, '_warning'); + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.name !== nextProps.name) { + // unregister old name + this.context._reduxForm.unregister(this.name + // register new name + );this.context._reduxForm.register(Object(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */])(this.context, nextProps.name), 'FieldArray'); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context._reduxForm.unregister(this.name); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to FieldArray'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'render', + value: function render() { + return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(ConnectedFieldArray, _extends({}, this.props, { + name: this.name, + syncError: this.syncError, + syncWarning: this.syncWarning, + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'name', + get: function get() { + return Object(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */])(this.context, this.props.name); + } + }, { + key: 'dirty', + get: function get() { + return this.refs.connected.getWrappedInstance().dirty; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.connected.getWrappedInstance().pristine; + } + }, { + key: 'value', + get: function get() { + return this.refs.connected.getWrappedInstance().value; + } + }]); + + return FieldArray; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + FieldArray.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired, + props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, + validate: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]), + warn: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]), + withRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool + }; + FieldArray.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object + }; + + return FieldArray; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFieldArray); + +/***/ }), +/* 569 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__ = __webpack_require__(282); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_redux__ = __webpack_require__(27); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_redux__ = __webpack_require__(111); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__createFieldArrayProps__ = __webpack_require__(584); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__structure_plain__ = __webpack_require__(11); + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + + + +var propsToNotUpdateFor = ['_reduxForm', 'value']; + +var createConnectedFieldArray = function createConnectedFieldArray(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + size = _ref.size; + + var getSyncError = function getSyncError(syncErrors, name) { + // For an array, the error can _ONLY_ be under _error. + // This is why this getSyncError is not the same as the + // one in Field. + return __WEBPACK_IMPORTED_MODULE_6__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error'); + }; + + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + // For an array, the warning can _ONLY_ be under _warning. + // This is why this getSyncError is not the same as the + // one in Field. + return getIn(syncWarnings, name + '._warning'); + }; + + var ConnectedFieldArray = function (_Component) { + _inherits(ConnectedFieldArray, _Component); + + function ConnectedFieldArray() { + _classCallCheck(this, ConnectedFieldArray); + + var _this = _possibleConstructorReturn(this, (ConnectedFieldArray.__proto__ || Object.getPrototypeOf(ConnectedFieldArray)).call(this)); + + _this.getValue = _this.getValue.bind(_this); + return _this; + } + + _createClass(ConnectedFieldArray, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this2 = this; + + // Update if the elements of the value array was updated. + var thisValue = this.props.value; + var nextValue = nextProps.value; + + if (thisValue && nextValue) { + if (thisValue.length !== nextValue.length || nextProps.rerenderOnEveryChange && thisValue.some(function (val) { + return nextValue.every(function (next) { + return !deepEqual(val, next); + }); + })) { + return true; + } + } + + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + // useful to debug rerenders + // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { + // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) + // } + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); + }); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'getValue', + value: function getValue(index) { + return this.props.value && getIn(this.props.value, index); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + component = _props.component, + withRef = _props.withRef, + name = _props.name, + _reduxForm = _props._reduxForm, + validate = _props.validate, + warn = _props.warn, + rerenderOnEveryChange = _props.rerenderOnEveryChange, + rest = _objectWithoutProperties(_props, ['component', 'withRef', 'name', '_reduxForm', 'validate', 'warn', 'rerenderOnEveryChange']); + + var props = Object(__WEBPACK_IMPORTED_MODULE_5__createFieldArrayProps__["a" /* default */])(getIn, name, _reduxForm.form, _reduxForm.sectionPrefix, this.getValue, rest); + if (withRef) { + props.ref = 'renderedComponent'; + } + return Object(__WEBPACK_IMPORTED_MODULE_1_react__["createElement"])(component, props); + } + }, { + key: 'dirty', + get: function get() { + return this.props.dirty; + } + }, { + key: 'pristine', + get: function get() { + return this.props.pristine; + } + }, { + key: 'value', + get: function get() { + return this.props.value; + } + }]); + + return ConnectedFieldArray; + }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); + + ConnectedFieldArray.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string]).isRequired, + props: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object, + rerenderOnEveryChange: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool + }; + + ConnectedFieldArray.defaultProps = { + rerenderOnEveryChange: false + }; + + ConnectedFieldArray.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object + }; + + var connector = Object(__WEBPACK_IMPORTED_MODULE_3_react_redux__["connect"])(function (state, ownProps) { + var name = ownProps.name, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; + + var formState = getFormState(state); + var initial = getIn(formState, 'initial.' + name) || initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var submitting = getIn(formState, 'submitting'); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var pristine = deepEqual(value, initial); + return { + asyncError: getIn(formState, 'asyncErrors.' + name + '._error'), + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name + '._error'), + submitFailed: getIn(formState, 'submitFailed'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + length: size(value) + }; + }, function (dispatch, ownProps) { + var name = ownProps.name, + _reduxForm = ownProps._reduxForm; + var arrayInsert = _reduxForm.arrayInsert, + arrayMove = _reduxForm.arrayMove, + arrayPop = _reduxForm.arrayPop, + arrayPush = _reduxForm.arrayPush, + arrayRemove = _reduxForm.arrayRemove, + arrayRemoveAll = _reduxForm.arrayRemoveAll, + arrayShift = _reduxForm.arrayShift, + arraySplice = _reduxForm.arraySplice, + arraySwap = _reduxForm.arraySwap, + arrayUnshift = _reduxForm.arrayUnshift; + + return Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__["a" /* default */])({ + arrayInsert: arrayInsert, + arrayMove: arrayMove, + arrayPop: arrayPop, + arrayPush: arrayPush, + arrayRemove: arrayRemove, + arrayRemoveAll: arrayRemoveAll, + arrayShift: arrayShift, + arraySplice: arraySplice, + arraySwap: arraySwap, + arrayUnshift: arrayUnshift + }, function (actionCreator) { + return Object(__WEBPACK_IMPORTED_MODULE_4_redux__["bindActionCreators"])(actionCreator.bind(null, name), dispatch); + }); + }, undefined, { withRef: true }); + return connector(ConnectedFieldArray); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createConnectedFieldArray); + +/***/ }), +/* 570 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFor_js__ = __webpack_require__(284); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(173); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && Object(__WEBPACK_IMPORTED_MODULE_0__baseFor_js__["a" /* default */])(object, iteratee, __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseForOwn); + + +/***/ }), +/* 571 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (createBaseFor); + + +/***/ }), +/* 572 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__ = __webpack_require__(573); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__ = __webpack_require__(576); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(182); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__property_js__ = __webpack_require__(581); + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */]; + } + if (typeof value == 'object') { + return Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(value) + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__["a" /* default */])(value[0], value[1]) + : Object(__WEBPACK_IMPORTED_MODULE_0__baseMatches_js__["a" /* default */])(value); + } + return Object(__WEBPACK_IMPORTED_MODULE_4__property_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIteratee); + + +/***/ }), +/* 573 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__ = __webpack_require__(574); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__ = __webpack_require__(575); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__ = __webpack_require__(286); + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = Object(__WEBPACK_IMPORTED_MODULE_1__getMatchData_js__["a" /* default */])(source); + if (matchData.length == 1 && matchData[0][2]) { + return Object(__WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__["a" /* default */])(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || Object(__WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__["a" /* default */])(object, source, matchData); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMatches); + + +/***/ }), +/* 574 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(172); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__ = __webpack_require__(171); + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? Object(__WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__["a" /* default */])(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsMatch); + + +/***/ }), +/* 575 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__ = __webpack_require__(285); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(173); + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */])(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, Object(__WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__["a" /* default */])(value)]; + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (getMatchData); + + +/***/ }), +/* 576 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__get_js__ = __webpack_require__(577); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hasIn_js__ = __webpack_require__(578); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isKey_js__ = __webpack_require__(181); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__ = __webpack_require__(285); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__ = __webpack_require__(286); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toKey_js__ = __webpack_require__(91); + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (Object(__WEBPACK_IMPORTED_MODULE_3__isKey_js__["a" /* default */])(path) && Object(__WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__["a" /* default */])(srcValue)) { + return Object(__WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_6__toKey_js__["a" /* default */])(path), srcValue); + } + return function(object) { + var objValue = Object(__WEBPACK_IMPORTED_MODULE_1__get_js__["a" /* default */])(object, path); + return (objValue === undefined && objValue === srcValue) + ? Object(__WEBPACK_IMPORTED_MODULE_2__hasIn_js__["a" /* default */])(object, path) + : Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */])(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMatchesProperty); + + +/***/ }), +/* 577 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(287); + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : Object(__WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */])(object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ __webpack_exports__["a"] = (get); + + +/***/ }), +/* 578 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__ = __webpack_require__(579); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasPath_js__ = __webpack_require__(580); + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && Object(__WEBPACK_IMPORTED_MODULE_1__hasPath_js__["a" /* default */])(object, path, __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (hasIn); + + +/***/ }), +/* 579 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseHasIn); + + +/***/ }), +/* 580 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(288); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isIndex_js__ = __webpack_require__(177); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isLength_js__ = __webpack_require__(179); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(91); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = Object(__WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */])(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = Object(__WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */])(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && Object(__WEBPACK_IMPORTED_MODULE_4__isLength_js__["a" /* default */])(length) && Object(__WEBPACK_IMPORTED_MODULE_3__isIndex_js__["a" /* default */])(key, length) && + (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(object) || Object(__WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */])(object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (hasPath); + + +/***/ }), +/* 581 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__ = __webpack_require__(582); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__ = __webpack_require__(583); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isKey_js__ = __webpack_require__(181); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toKey_js__ = __webpack_require__(91); + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return Object(__WEBPACK_IMPORTED_MODULE_2__isKey_js__["a" /* default */])(path) ? Object(__WEBPACK_IMPORTED_MODULE_0__baseProperty_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__toKey_js__["a" /* default */])(path)) : Object(__WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__["a" /* default */])(path); +} + +/* harmony default export */ __webpack_exports__["a"] = (property); + + +/***/ }), +/* 582 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseProperty); + + +/***/ }), +/* 583 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(287); + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */])(object, path); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (basePropertyDeep); + + +/***/ }), +/* 584 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var createFieldArrayProps = function createFieldArrayProps(getIn, name, form, sectionPrefix, getValue, _ref) { + var arrayInsert = _ref.arrayInsert, + arrayMove = _ref.arrayMove, + arrayPop = _ref.arrayPop, + arrayPush = _ref.arrayPush, + arrayRemove = _ref.arrayRemove, + arrayRemoveAll = _ref.arrayRemoveAll, + arrayShift = _ref.arrayShift, + arraySplice = _ref.arraySplice, + arraySwap = _ref.arraySwap, + arrayUnshift = _ref.arrayUnshift, + asyncError = _ref.asyncError, + dirty = _ref.dirty, + length = _ref.length, + pristine = _ref.pristine, + submitError = _ref.submitError, + state = _ref.state, + submitFailed = _ref.submitFailed, + submitting = _ref.submitting, + syncError = _ref.syncError, + syncWarning = _ref.syncWarning, + value = _ref.value, + props = _ref.props, + rest = _objectWithoutProperties(_ref, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncError', 'dirty', 'length', 'pristine', 'submitError', 'state', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'value', 'props']); + + var error = syncError || asyncError || submitError; + var warning = syncWarning; + var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; + var finalProps = _extends({ + fields: { + _isFieldArray: true, + forEach: function forEach(callback) { + return (value || []).forEach(function (item, index) { + return callback(fieldName + '[' + index + ']', index, finalProps.fields); + }); + }, + get: getValue, + getAll: function getAll() { + return value; + }, + insert: arrayInsert, + length: length, + map: function map(callback) { + return (value || []).map(function (item, index) { + return callback(fieldName + '[' + index + ']', index, finalProps.fields); + }); + }, + move: arrayMove, + name: name, + pop: function pop() { + arrayPop(); + return getIn(value, length - 1); + }, + push: arrayPush, + reduce: function reduce(callback, initial) { + return (value || []).reduce(function (accumulator, item, index) { + return callback(accumulator, fieldName + '[' + index + ']', index, finalProps.fields); + }, initial); + }, + remove: arrayRemove, + removeAll: arrayRemoveAll, + shift: function shift() { + arrayShift(); + return getIn(value, 0); + }, + swap: arraySwap, + unshift: arrayUnshift + }, + meta: { + dirty: dirty, + error: error, + form: form, + warning: warning, + invalid: !!error, + pristine: pristine, + submitting: submitting, + submitFailed: submitFailed, + valid: !error + } + }, props, rest); + return finalProps; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFieldArrayProps); + +/***/ }), +/* 585 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFormValueSelector__ = __webpack_require__(586); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFormValueSelector__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 586 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +var createFormValueSelector = function createFormValueSelector(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + + __WEBPACK_IMPORTED_MODULE_0_invariant___default()(form, 'Form value must be specified'); + return function (state) { + for (var _len = arguments.length, fields = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + fields[_key - 1] = arguments[_key]; + } + + __WEBPACK_IMPORTED_MODULE_0_invariant___default()(fields.length, 'No fields specified'); + return fields.length === 1 ? // only selecting one field, so return its value + getIn(getFormState(state), form + '.values.' + fields[0]) : // selecting many fields, so return an object of field values + fields.reduce(function (accumulator, field) { + var value = getIn(getFormState(state), form + '.values.' + field); + return value === undefined ? accumulator : __WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */].setIn(accumulator, field, value); + }, {}); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFormValueSelector); + +/***/ }), +/* 587 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFormValues__ = __webpack_require__(588); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFormValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 588 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(27); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_prefixName__ = __webpack_require__(89); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + +var createValues = function createValues(_ref) { + var getIn = _ref.getIn; + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var valuesMap = void 0; + + if (typeof args[0] === 'string') { + valuesMap = args.map(function (k) { + return { prop: k, path: k }; + }); + } else { + var config = args[0]; + valuesMap = Object.keys(config).map(function (k) { + return { + prop: k, + path: config[k] + }; + }); + } + if (!valuesMap.length) { + throw new Error('formValues(): You must specify values to get as formValues(name1, name2, ...) or formValues({propName1: propPath1, ...})'); + } + + // create a class that reads current form name and creates a selector + // return + return function (Component) { + var FormValues = function (_React$Component) { + _inherits(FormValues, _React$Component); + + function FormValues(props, context) { + _classCallCheck(this, FormValues); + + var _this = _possibleConstructorReturn(this, (FormValues.__proto__ || Object.getPrototypeOf(FormValues)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('formValues() must be used inside a React tree decorated with reduxForm()'); + } + var getValues = context._reduxForm.getValues; + + var formValuesSelector = function formValuesSelector(_) { + // Yes, we're only using connect() for listening to updates + var props = {}; + var values = getValues(); + valuesMap.forEach(function (_ref2) { + var prop = _ref2.prop, + path = _ref2.path; + return props[prop] = getIn(values, Object(__WEBPACK_IMPORTED_MODULE_3__util_prefixName__["a" /* default */])(context, path)); + }); + return props; + }; + _this.Component = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(formValuesSelector, function () { + return {}; + } // ignore dispatch + )(Component); + return _this; + } + + _createClass(FormValues, [{ + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(this.Component, this.props); + } + }]); + + return FormValues; + }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component); + + FormValues.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object + }; + return FormValues; + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createValues); + +/***/ }), +/* 589 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormNames__ = __webpack_require__(590); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormNames__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 590 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormNames = function createGetFormNames(_ref) { + var getIn = _ref.getIn, + keys = _ref.keys; + return function () { + var getFormState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return keys(getFormState(state)); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormNames); + +/***/ }), +/* 591 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormValues__ = __webpack_require__(592); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 592 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormValues = function createGetFormValues(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.values'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormValues); + +/***/ }), +/* 593 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormInitialValues__ = __webpack_require__(594); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormInitialValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 594 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormInitialValues = function createGetFormInitialValues(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.initial'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormInitialValues); + +/***/ }), +/* 595 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncErrors__ = __webpack_require__(596); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncErrors__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 596 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormSyncErrors = function createGetFormSyncErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.syncErrors'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncErrors); + +/***/ }), +/* 597 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormMeta__ = __webpack_require__(598); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormMeta__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 598 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormMeta = function createGetFormMeta(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.fields'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormMeta); + +/***/ }), +/* 599 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormAsyncErrors__ = __webpack_require__(600); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormAsyncErrors__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 600 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormAsyncErrors = function createGetFormAsyncErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.asyncErrors'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormAsyncErrors); + +/***/ }), +/* 601 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncWarnings__ = __webpack_require__(602); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncWarnings__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 602 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormSyncWarnings = function createGetFormSyncWarnings(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.syncWarnings'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncWarnings); + +/***/ }), +/* 603 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormSubmitErrors__ = __webpack_require__(604); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormSubmitErrors__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 604 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormSubmitErrors = function createGetFormSubmitErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.submitErrors'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormSubmitErrors); + +/***/ }), +/* 605 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isDirty__ = __webpack_require__(606); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isDirty__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 606 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPristine__ = __webpack_require__(289); + + +var createIsDirty = function createIsDirty(structure) { + return function (form, getFormState) { + var isPristine = Object(__WEBPACK_IMPORTED_MODULE_0__isPristine__["a" /* default */])(structure)(form, getFormState); + return function (state) { + return !isPristine(state); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsDirty); + +/***/ }), +/* 607 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isInvalid__ = __webpack_require__(608); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isInvalid__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 608 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isValid__ = __webpack_require__(183); + + +var createIsInvalid = function createIsInvalid(structure) { + return function (form, getFormState) { + var isValid = Object(__WEBPACK_IMPORTED_MODULE_0__isValid__["a" /* default */])(structure)(form, getFormState); + return function (state) { + return !isValid(state); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsInvalid); + +/***/ }), +/* 609 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var getErrorKeys = function getErrorKeys(name, type) { + switch (type) { + case 'Field': + return [name, name + '._error']; + case 'FieldArray': + return [name + '._error']; + default: + throw new Error('Unknown field type'); + } +}; + +var createHasError = function createHasError(_ref) { + var getIn = _ref.getIn; + + var hasError = function hasError(field, syncErrors, asyncErrors, submitErrors) { + if (!syncErrors && !asyncErrors && !submitErrors) { + return false; + } + + var name = getIn(field, 'name'); + var type = getIn(field, 'type'); + return getErrorKeys(name, type).some(function (key) { + return getIn(syncErrors, key) || getIn(asyncErrors, key) || getIn(submitErrors, key); + }); + }; + return hasError; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createHasError); + +/***/ }), +/* 610 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isPristine__ = __webpack_require__(289); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isPristine__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 611 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isValid__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isValid__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 612 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isSubmitting__ = __webpack_require__(613); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isSubmitting__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 613 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createIsSubmitting = function createIsSubmitting(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitting') || false; + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsSubmitting); + +/***/ }), +/* 614 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitSucceeded__ = __webpack_require__(615); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitSucceeded__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 615 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createHasSubmitSucceeded = function createHasSubmitSucceeded(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitSucceeded') || false; + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitSucceeded); + +/***/ }), +/* 616 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitFailed__ = __webpack_require__(617); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitFailed__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 617 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createHasSubmitFailed = function createHasSubmitFailed(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitFailed') || false; + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitFailed); + +/***/ }), +/* 618 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createReduxForm__ = __webpack_require__(619); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createReduxForm__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 619 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__ = __webpack_require__(620); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__ = __webpack_require__(282); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(161); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_is_promise__ = __webpack_require__(184); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_is_promise__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_redux__ = __webpack_require__(27); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_redux__ = __webpack_require__(111); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__actions__ = __webpack_require__(265); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__asyncValidation__ = __webpack_require__(643); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__defaultShouldAsyncValidate__ = __webpack_require__(266); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__defaultShouldValidate__ = __webpack_require__(267); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__events_silenceEvent__ = __webpack_require__(292); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__events_silenceEvents__ = __webpack_require__(644); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__generateValidator__ = __webpack_require__(645); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__handleSubmit__ = __webpack_require__(646); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__selectors_isValid__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__structure_plain__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__util_getDisplayName__ = __webpack_require__(647); + + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + + + + + + + + + + + + + + + + +var isClassComponent = function isClassComponent(Component) { + return Boolean(Component && Component.prototype && _typeof(Component.prototype.isReactComponent) === 'object' + + // extract field-specific actions + ); +}; +var arrayInsert = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayInsert"], + arrayMove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayMove"], + arrayPop = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPop"], + arrayPush = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPush"], + arrayRemove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemove"], + arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemoveAll"], + arrayShift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayShift"], + arraySplice = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySplice"], + arraySwap = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySwap"], + arrayUnshift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayUnshift"], + blur = __WEBPACK_IMPORTED_MODULE_8__actions__["blur"], + change = __WEBPACK_IMPORTED_MODULE_8__actions__["change"], + focus = __WEBPACK_IMPORTED_MODULE_8__actions__["focus"], + formActions = _objectWithoutProperties(__WEBPACK_IMPORTED_MODULE_8__actions__, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'blur', 'change', 'focus']); + +var arrayActions = { + arrayInsert: arrayInsert, + arrayMove: arrayMove, + arrayPop: arrayPop, + arrayPush: arrayPush, + arrayRemove: arrayRemove, + arrayRemoveAll: arrayRemoveAll, + arrayShift: arrayShift, + arraySplice: arraySplice, + arraySwap: arraySwap, + arrayUnshift: arrayUnshift +}; + +var propsToNotUpdateFor = [].concat(_toConsumableArray(Object.keys(__WEBPACK_IMPORTED_MODULE_8__actions__)), ['array', 'asyncErrors', 'initialValues', 'syncErrors', 'syncWarnings', 'values', 'registeredFields']); + +var checkSubmit = function checkSubmit(submit) { + if (!submit || typeof submit !== 'function') { + throw new Error('You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop'); + } + return submit; +}; + +/** + * The decorator that is the main API to redux-form + */ +var createReduxForm = function createReduxForm(structure) { + var deepEqual = structure.deepEqual, + empty = structure.empty, + getIn = structure.getIn, + setIn = structure.setIn, + keys = structure.keys, + fromJS = structure.fromJS; + + var isValid = Object(__WEBPACK_IMPORTED_MODULE_16__selectors_isValid__["a" /* default */])(structure); + return function (initialConfig) { + var config = _extends({ + touchOnBlur: true, + touchOnChange: false, + persistentSubmitErrors: false, + destroyOnUnmount: true, + shouldAsyncValidate: __WEBPACK_IMPORTED_MODULE_10__defaultShouldAsyncValidate__["a" /* default */], + shouldValidate: __WEBPACK_IMPORTED_MODULE_11__defaultShouldValidate__["a" /* default */], + enableReinitialize: false, + keepDirtyOnReinitialize: false, + getFormState: function getFormState(state) { + return getIn(state, 'form'); + }, + pure: true, + forceUnregisterOnUnmount: false + }, initialConfig); + + return function (WrappedComponent) { + var Form = function (_Component) { + _inherits(Form, _Component); + + function Form(props) { + _classCallCheck(this, Form); + + var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props)); + + _this.submit = _this.submit.bind(_this); + _this.reset = _this.reset.bind(_this); + _this.asyncValidate = _this.asyncValidate.bind(_this); + _this.getValues = _this.getValues.bind(_this); + _this.register = _this.register.bind(_this); + _this.unregister = _this.unregister.bind(_this); + _this.submitCompleted = _this.submitCompleted.bind(_this); + _this.submitFailed = _this.submitFailed.bind(_this); + _this.fieldValidators = {}; + _this.lastFieldValidatorKeys = []; + _this.fieldWarners = {}; + _this.lastFieldWarnerKeys = []; + return _this; + } + + _createClass(Form, [{ + key: 'getChildContext', + value: function getChildContext() { + var _this2 = this; + + return { + _reduxForm: _extends({}, this.props, { + getFormState: function getFormState(state) { + return getIn(_this2.props.getFormState(state), _this2.props.form); + }, + asyncValidate: this.asyncValidate, + getValues: this.getValues, + sectionPrefix: undefined, + register: this.register, + unregister: this.unregister, + registerInnerOnSubmit: function registerInnerOnSubmit(innerOnSubmit) { + return _this2.innerOnSubmit = innerOnSubmit; + } + }) + }; + } + }, { + key: 'initIfNeeded', + value: function initIfNeeded(nextProps) { + var enableReinitialize = this.props.enableReinitialize; + + if (nextProps) { + if ((enableReinitialize || !nextProps.initialized) && !deepEqual(this.props.initialValues, nextProps.initialValues)) { + var keepDirty = nextProps.initialized && this.props.keepDirtyOnReinitialize; + this.props.initialize(nextProps.initialValues, keepDirty, { + lastInitialValues: this.props.initialValues + }); + } + } else if (this.props.initialValues && (!this.props.initialized || enableReinitialize)) { + this.props.initialize(this.props.initialValues, this.props.keepDirtyOnReinitialize); + } + } + }, { + key: 'updateSyncErrorsIfNeeded', + value: function updateSyncErrorsIfNeeded(nextSyncErrors, nextError, lastSyncErrors) { + var _props = this.props, + error = _props.error, + updateSyncErrors = _props.updateSyncErrors; + + var noErrors = (!lastSyncErrors || !Object.keys(lastSyncErrors).length) && !error; + var nextNoErrors = (!nextSyncErrors || !Object.keys(nextSyncErrors).length) && !nextError; + if (!(noErrors && nextNoErrors) && (!__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(lastSyncErrors, nextSyncErrors) || !__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(error, nextError))) { + updateSyncErrors(nextSyncErrors, nextError); + } + } + }, { + key: 'clearSubmitPromiseIfNeeded', + value: function clearSubmitPromiseIfNeeded(nextProps) { + var submitting = this.props.submitting; + + if (this.submitPromise && submitting && !nextProps.submitting) { + delete this.submitPromise; + } + } + }, { + key: 'submitIfNeeded', + value: function submitIfNeeded(nextProps) { + var _props2 = this.props, + clearSubmit = _props2.clearSubmit, + triggerSubmit = _props2.triggerSubmit; + + if (!triggerSubmit && nextProps.triggerSubmit) { + clearSubmit(); + this.submit(); + } + } + }, { + key: 'validateIfNeeded', + value: function validateIfNeeded(nextProps) { + var _props3 = this.props, + shouldValidate = _props3.shouldValidate, + validate = _props3.validate, + values = _props3.values; + + var fieldLevelValidate = this.generateValidator(); + if (validate || fieldLevelValidate) { + var initialRender = nextProps === undefined; + var fieldValidatorKeys = Object.keys(this.getValidators()); + var shouldValidateResult = shouldValidate({ + values: values, + nextProps: nextProps, + props: this.props, + initialRender: initialRender, + lastFieldValidatorKeys: this.lastFieldValidatorKeys, + fieldValidatorKeys: fieldValidatorKeys, + structure: structure + }); + + if (shouldValidateResult) { + var propsToValidate = initialRender ? this.props : nextProps; + + var _merge2 = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */])(validate ? validate(propsToValidate.values, propsToValidate) || {} : {}, fieldLevelValidate ? fieldLevelValidate(propsToValidate.values, propsToValidate) || {} : {}), + _error = _merge2._error, + nextSyncErrors = _objectWithoutProperties(_merge2, ['_error']); + + this.lastFieldValidatorKeys = fieldValidatorKeys; + this.updateSyncErrorsIfNeeded(nextSyncErrors, _error, propsToValidate.syncErrors); + } + } + } + }, { + key: 'updateSyncWarningsIfNeeded', + value: function updateSyncWarningsIfNeeded(nextSyncWarnings, nextWarning, lastSyncWarnings) { + var _props4 = this.props, + warning = _props4.warning, + syncWarnings = _props4.syncWarnings, + updateSyncWarnings = _props4.updateSyncWarnings; + + var noWarnings = (!syncWarnings || !Object.keys(syncWarnings).length) && !warning; + var nextNoWarnings = (!nextSyncWarnings || !Object.keys(nextSyncWarnings).length) && !nextWarning; + if (!(noWarnings && nextNoWarnings) && (!__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(lastSyncWarnings, nextSyncWarnings) || !__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(warning, nextWarning))) { + updateSyncWarnings(nextSyncWarnings, nextWarning); + } + } + }, { + key: 'warnIfNeeded', + value: function warnIfNeeded(nextProps) { + var _props5 = this.props, + shouldValidate = _props5.shouldValidate, + warn = _props5.warn, + values = _props5.values; + + var fieldLevelWarn = this.generateWarner(); + if (warn || fieldLevelWarn) { + var initialRender = nextProps === undefined; + var fieldWarnerKeys = Object.keys(this.getWarners()); + var shouldWarnResult = shouldValidate({ + values: values, + nextProps: nextProps, + props: this.props, + initialRender: initialRender, + lastFieldValidatorKeys: this.lastFieldWarnerKeys, + fieldValidatorKeys: fieldWarnerKeys, + structure: structure + }); + + if (shouldWarnResult) { + var propsToWarn = initialRender ? this.props : nextProps; + + var _merge3 = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */])(warn ? warn(propsToWarn.values, propsToWarn) : {}, fieldLevelWarn ? fieldLevelWarn(propsToWarn.values, propsToWarn) : {}), + _warning = _merge3._warning, + nextSyncWarnings = _objectWithoutProperties(_merge3, ['_warning']); + + this.lastFieldWarnerKeys = fieldWarnerKeys; + this.updateSyncWarningsIfNeeded(nextSyncWarnings, _warning, propsToWarn.syncWarnings); + } + } + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + this.initIfNeeded(); + this.validateIfNeeded(); + this.warnIfNeeded(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.initIfNeeded(nextProps); + this.validateIfNeeded(nextProps); + this.warnIfNeeded(nextProps); + this.clearSubmitPromiseIfNeeded(nextProps); + this.submitIfNeeded(nextProps); + if (nextProps.onChange) { + if (!deepEqual(nextProps.values, this.props.values)) { + nextProps.onChange(nextProps.values, nextProps.dispatch, nextProps); + } + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this3 = this; + + if (!this.props.pure) return true; + var _initialConfig$immuta = initialConfig.immutableProps, + immutableProps = _initialConfig$immuta === undefined ? [] : _initialConfig$immuta; + + return Object.keys(nextProps).some(function (prop) { + // useful to debug rerenders + // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { + // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) + // } + if (~immutableProps.indexOf(prop)) { + return _this3.props[prop] !== nextProps[prop]; + } + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); + }); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + var _props6 = this.props, + destroyOnUnmount = _props6.destroyOnUnmount, + destroy = _props6.destroy; + + if (destroyOnUnmount) { + this.destroyed = true; + destroy(); + } + } + }, { + key: 'getValues', + value: function getValues() { + return this.props.values; + } + }, { + key: 'isValid', + value: function isValid() { + return this.props.valid; + } + }, { + key: 'isPristine', + value: function isPristine() { + return this.props.pristine; + } + }, { + key: 'register', + value: function register(name, type, getValidator, getWarner) { + this.props.registerField(name, type); + if (getValidator) { + this.fieldValidators[name] = getValidator; + } + if (getWarner) { + this.fieldWarners[name] = getWarner; + } + } + }, { + key: 'unregister', + value: function unregister(name) { + if (!this.destroyed) { + if (this.props.destroyOnUnmount || this.props.forceUnregisterOnUnmount) { + this.props.unregisterField(name); + delete this.fieldValidators[name]; + delete this.fieldWarners[name]; + } else { + this.props.unregisterField(name, false); + } + } + } + }, { + key: 'getFieldList', + value: function getFieldList(options) { + var registeredFields = this.props.registeredFields; + var list = []; + if (!registeredFields) { + return list; + } + var keySeq = keys(registeredFields); + if (options && options.excludeFieldArray) { + keySeq = keySeq.filter(function (name) { + return getIn(registeredFields, '[\'' + name + '\'].type') !== 'FieldArray'; + }); + } + return fromJS(keySeq.reduce(function (acc, key) { + acc.push(key); + return acc; + }, list)); + } + }, { + key: 'getValidators', + value: function getValidators() { + var _this4 = this; + + var validators = {}; + Object.keys(this.fieldValidators).forEach(function (name) { + var validator = _this4.fieldValidators[name](); + if (validator) { + validators[name] = validator; + } + }); + return validators; + } + }, { + key: 'generateValidator', + value: function generateValidator() { + var validators = this.getValidators(); + return Object.keys(validators).length ? Object(__WEBPACK_IMPORTED_MODULE_14__generateValidator__["a" /* default */])(validators, structure) : undefined; + } + }, { + key: 'getWarners', + value: function getWarners() { + var _this5 = this; + + var warners = {}; + Object.keys(this.fieldWarners).forEach(function (name) { + var warner = _this5.fieldWarners[name](); + if (warner) { + warners[name] = warner; + } + }); + return warners; + } + }, { + key: 'generateWarner', + value: function generateWarner() { + var warners = this.getWarners(); + return Object.keys(warners).length ? Object(__WEBPACK_IMPORTED_MODULE_14__generateValidator__["a" /* default */])(warners, structure) : undefined; + } + }, { + key: 'asyncValidate', + value: function asyncValidate(name, value) { + var _this6 = this; + + var _props7 = this.props, + asyncBlurFields = _props7.asyncBlurFields, + asyncErrors = _props7.asyncErrors, + asyncValidate = _props7.asyncValidate, + dispatch = _props7.dispatch, + initialized = _props7.initialized, + pristine = _props7.pristine, + shouldAsyncValidate = _props7.shouldAsyncValidate, + startAsyncValidation = _props7.startAsyncValidation, + stopAsyncValidation = _props7.stopAsyncValidation, + syncErrors = _props7.syncErrors, + values = _props7.values; + + var submitting = !name; + if (asyncValidate) { + var valuesToValidate = submitting ? values : setIn(values, name, value); + var syncValidationPasses = submitting || !getIn(syncErrors, name); + var isBlurredField = !submitting && (!asyncBlurFields || ~asyncBlurFields.indexOf(name.replace(/\[[0-9]+\]/g, '[]'))); + if ((isBlurredField || submitting) && shouldAsyncValidate({ + asyncErrors: asyncErrors, + initialized: initialized, + trigger: submitting ? 'submit' : 'blur', + blurredField: name, + pristine: pristine, + syncValidationPasses: syncValidationPasses + })) { + return Object(__WEBPACK_IMPORTED_MODULE_9__asyncValidation__["a" /* default */])(function () { + return asyncValidate(valuesToValidate, dispatch, _this6.props, name); + }, startAsyncValidation, stopAsyncValidation, name); + } + } + } + }, { + key: 'submitCompleted', + value: function submitCompleted(result) { + delete this.submitPromise; + return result; + } + }, { + key: 'submitFailed', + value: function submitFailed(error) { + delete this.submitPromise; + throw error; + } + }, { + key: 'listenToSubmit', + value: function listenToSubmit(promise) { + if (!__WEBPACK_IMPORTED_MODULE_3_is_promise___default()(promise)) { + return promise; + } + this.submitPromise = promise; + return promise.then(this.submitCompleted, this.submitFailed); + } + }, { + key: 'submit', + value: function submit(submitOrEvent) { + var _this7 = this; + + var _props8 = this.props, + onSubmit = _props8.onSubmit, + blur = _props8.blur, + change = _props8.change, + dispatch = _props8.dispatch; + + + if (!submitOrEvent || Object(__WEBPACK_IMPORTED_MODULE_12__events_silenceEvent__["a" /* default */])(submitOrEvent)) { + // submitOrEvent is an event: fire submit if not already submitting + if (!this.submitPromise) { + // avoid recursive stack trace if use Form with onSubmit as handleSubmit + if (this.innerOnSubmit && this.innerOnSubmit !== this.submit) { + // will call "submitOrEvent is the submit function" block below + return this.innerOnSubmit(); + } else { + return this.listenToSubmit(Object(__WEBPACK_IMPORTED_MODULE_15__handleSubmit__["a" /* default */])(checkSubmit(onSubmit), _extends({}, this.props, Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])({ blur: blur, change: change }, dispatch)), this.props.validExceptSubmit, this.asyncValidate, this.getFieldList({ excludeFieldArray: true }))); + } + } + } else { + // submitOrEvent is the submit function: return deferred submit thunk + return Object(__WEBPACK_IMPORTED_MODULE_13__events_silenceEvents__["a" /* default */])(function () { + return !_this7.submitPromise && _this7.listenToSubmit(Object(__WEBPACK_IMPORTED_MODULE_15__handleSubmit__["a" /* default */])(checkSubmit(submitOrEvent), _extends({}, _this7.props, Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])({ blur: blur, change: change }, dispatch)), _this7.props.validExceptSubmit, _this7.asyncValidate, _this7.getFieldList({ excludeFieldArray: true }))); + }); + } + } + }, { + key: 'reset', + value: function reset() { + this.props.reset(); + } + }, { + key: 'render', + value: function render() { + // remove some redux-form config-only props + /* eslint-disable no-unused-vars */ + var _props9 = this.props, + anyTouched = _props9.anyTouched, + arrayInsert = _props9.arrayInsert, + arrayMove = _props9.arrayMove, + arrayPop = _props9.arrayPop, + arrayPush = _props9.arrayPush, + arrayRemove = _props9.arrayRemove, + arrayRemoveAll = _props9.arrayRemoveAll, + arrayShift = _props9.arrayShift, + arraySplice = _props9.arraySplice, + arraySwap = _props9.arraySwap, + arrayUnshift = _props9.arrayUnshift, + asyncErrors = _props9.asyncErrors, + asyncValidate = _props9.asyncValidate, + asyncValidating = _props9.asyncValidating, + blur = _props9.blur, + change = _props9.change, + destroy = _props9.destroy, + destroyOnUnmount = _props9.destroyOnUnmount, + forceUnregisterOnUnmount = _props9.forceUnregisterOnUnmount, + dirty = _props9.dirty, + dispatch = _props9.dispatch, + enableReinitialize = _props9.enableReinitialize, + error = _props9.error, + focus = _props9.focus, + form = _props9.form, + getFormState = _props9.getFormState, + initialize = _props9.initialize, + initialized = _props9.initialized, + initialValues = _props9.initialValues, + invalid = _props9.invalid, + keepDirtyOnReinitialize = _props9.keepDirtyOnReinitialize, + pristine = _props9.pristine, + propNamespace = _props9.propNamespace, + registeredFields = _props9.registeredFields, + registerField = _props9.registerField, + reset = _props9.reset, + setSubmitFailed = _props9.setSubmitFailed, + setSubmitSucceeded = _props9.setSubmitSucceeded, + shouldAsyncValidate = _props9.shouldAsyncValidate, + shouldValidate = _props9.shouldValidate, + startAsyncValidation = _props9.startAsyncValidation, + startSubmit = _props9.startSubmit, + stopAsyncValidation = _props9.stopAsyncValidation, + stopSubmit = _props9.stopSubmit, + submitting = _props9.submitting, + submitFailed = _props9.submitFailed, + submitSucceeded = _props9.submitSucceeded, + touch = _props9.touch, + touchOnBlur = _props9.touchOnBlur, + touchOnChange = _props9.touchOnChange, + persistentSubmitErrors = _props9.persistentSubmitErrors, + syncErrors = _props9.syncErrors, + syncWarnings = _props9.syncWarnings, + unregisterField = _props9.unregisterField, + untouch = _props9.untouch, + updateSyncErrors = _props9.updateSyncErrors, + updateSyncWarnings = _props9.updateSyncWarnings, + valid = _props9.valid, + validExceptSubmit = _props9.validExceptSubmit, + values = _props9.values, + warning = _props9.warning, + rest = _objectWithoutProperties(_props9, ['anyTouched', 'arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'blur', 'change', 'destroy', 'destroyOnUnmount', 'forceUnregisterOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'focus', 'form', 'getFormState', 'initialize', 'initialized', 'initialValues', 'invalid', 'keepDirtyOnReinitialize', 'pristine', 'propNamespace', 'registeredFields', 'registerField', 'reset', 'setSubmitFailed', 'setSubmitSucceeded', 'shouldAsyncValidate', 'shouldValidate', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitting', 'submitFailed', 'submitSucceeded', 'touch', 'touchOnBlur', 'touchOnChange', 'persistentSubmitErrors', 'syncErrors', 'syncWarnings', 'unregisterField', 'untouch', 'updateSyncErrors', 'updateSyncWarnings', 'valid', 'validExceptSubmit', 'values', 'warning']); + /* eslint-enable no-unused-vars */ + + + var reduxFormProps = _extends({ + anyTouched: anyTouched, + asyncValidate: this.asyncValidate, + asyncValidating: asyncValidating + }, Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])({ blur: blur, change: change }, dispatch), { + destroy: destroy, + dirty: dirty, + dispatch: dispatch, + error: error, + form: form, + handleSubmit: this.submit, + initialize: initialize, + initialized: initialized, + initialValues: initialValues, + invalid: invalid, + pristine: pristine, + reset: reset, + submitting: submitting, + submitFailed: submitFailed, + submitSucceeded: submitSucceeded, + touch: touch, + untouch: untouch, + valid: valid, + warning: warning + }); + var propsToPass = _extends({}, propNamespace ? _defineProperty({}, propNamespace, reduxFormProps) : reduxFormProps, rest); + if (isClassComponent(WrappedComponent)) { + propsToPass.ref = 'wrapped'; + } + return Object(__WEBPACK_IMPORTED_MODULE_5_react__["createElement"])(WrappedComponent, propsToPass); + } + }]); + + return Form; + }(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]); + + Form.displayName = 'Form(' + Object(__WEBPACK_IMPORTED_MODULE_18__util_getDisplayName__["a" /* default */])(WrappedComponent) + ')'; + Form.WrappedComponent = WrappedComponent; + Form.childContextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object.isRequired + }; + Form.propTypes = { + destroyOnUnmount: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, + forceUnregisterOnUnmount: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, + form: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string.isRequired, + initialValues: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.array, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object]), + getFormState: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, + onSubmitFail: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, + onSubmitSuccess: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, + propNameSpace: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, + validate: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, + warn: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, + touchOnBlur: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, + touchOnChange: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, + triggerSubmit: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, + persistentSubmitErrors: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, + registeredFields: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any + }; + + var connector = Object(__WEBPACK_IMPORTED_MODULE_6_react_redux__["connect"])(function (state, props) { + var form = props.form, + getFormState = props.getFormState, + initialValues = props.initialValues, + enableReinitialize = props.enableReinitialize, + keepDirtyOnReinitialize = props.keepDirtyOnReinitialize; + + var formState = getIn(getFormState(state) || empty, form) || empty; + var stateInitial = getIn(formState, 'initial'); + var initialized = !!stateInitial; + + var shouldUpdateInitialValues = enableReinitialize && initialized && !deepEqual(initialValues, stateInitial); + var shouldResetValues = shouldUpdateInitialValues && !keepDirtyOnReinitialize; + + var initial = initialValues || stateInitial || empty; + + if (shouldUpdateInitialValues) { + initial = stateInitial || empty; + } + + var values = getIn(formState, 'values') || initial; + + if (shouldResetValues) { + values = initial; + } + + var pristine = shouldResetValues || deepEqual(initial, values); + var asyncErrors = getIn(formState, 'asyncErrors'); + var syncErrors = getIn(formState, 'syncErrors') || {}; + var syncWarnings = getIn(formState, 'syncWarnings') || {}; + var registeredFields = getIn(formState, 'registeredFields'); + var valid = isValid(form, getFormState, false)(state); + var validExceptSubmit = isValid(form, getFormState, true)(state); + var anyTouched = !!getIn(formState, 'anyTouched'); + var submitting = !!getIn(formState, 'submitting'); + var submitFailed = !!getIn(formState, 'submitFailed'); + var submitSucceeded = !!getIn(formState, 'submitSucceeded'); + var error = getIn(formState, 'error'); + var warning = getIn(formState, 'warning'); + var triggerSubmit = getIn(formState, 'triggerSubmit'); + return { + anyTouched: anyTouched, + asyncErrors: asyncErrors, + asyncValidating: getIn(formState, 'asyncValidating') || false, + dirty: !pristine, + error: error, + initialized: initialized, + invalid: !valid, + pristine: pristine, + registeredFields: registeredFields, + submitting: submitting, + submitFailed: submitFailed, + submitSucceeded: submitSucceeded, + syncErrors: syncErrors, + syncWarnings: syncWarnings, + triggerSubmit: triggerSubmit, + values: values, + valid: valid, + validExceptSubmit: validExceptSubmit, + warning: warning + }; + }, function (dispatch, initialProps) { + var bindForm = function bindForm(actionCreator) { + return actionCreator.bind(null, initialProps.form + + // Bind the first parameter on `props.form` + ); + };var boundFormACs = Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */])(formActions, bindForm); + var boundArrayACs = Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */])(arrayActions, bindForm); + var boundBlur = function boundBlur(field, value) { + return blur(initialProps.form, field, value, !!initialProps.touchOnBlur); + }; + var boundChange = function boundChange(field, value) { + return change(initialProps.form, field, value, !!initialProps.touchOnChange, !!initialProps.persistentSubmitErrors); + }; + var boundFocus = bindForm(focus + + // Wrap action creators with `dispatch` + );var connectedFormACs = Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundFormACs, dispatch); + var connectedArrayACs = { + insert: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayInsert, dispatch), + move: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayMove, dispatch), + pop: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayPop, dispatch), + push: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayPush, dispatch), + remove: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayRemove, dispatch), + removeAll: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayRemoveAll, dispatch), + shift: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayShift, dispatch), + splice: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arraySplice, dispatch), + swap: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arraySwap, dispatch), + unshift: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayUnshift, dispatch) + }; + + var computedActions = _extends({}, connectedFormACs, boundArrayACs, { + blur: boundBlur, + change: boundChange, + array: connectedArrayACs, + focus: boundFocus, + dispatch: dispatch + }); + + return function () { + return computedActions; + }; + }, undefined, { withRef: true }); + var ConnectedForm = __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(connector(Form), WrappedComponent); + ConnectedForm.defaultProps = config; + + // build outer component to expose instance api + return function (_Component2) { + _inherits(ReduxForm, _Component2); + + function ReduxForm() { + _classCallCheck(this, ReduxForm); + + return _possibleConstructorReturn(this, (ReduxForm.__proto__ || Object.getPrototypeOf(ReduxForm)).apply(this, arguments)); + } + + _createClass(ReduxForm, [{ + key: 'submit', + value: function submit() { + return this.refs.wrapped.getWrappedInstance().submit(); + } + }, { + key: 'reset', + value: function reset() { + return this.refs.wrapped.getWrappedInstance().reset(); + } + }, { + key: 'render', + value: function render() { + var _props10 = this.props, + initialValues = _props10.initialValues, + rest = _objectWithoutProperties(_props10, ['initialValues']); + + return Object(__WEBPACK_IMPORTED_MODULE_5_react__["createElement"])(ConnectedForm, _extends({}, rest, { + ref: 'wrapped', + // convert initialValues if need to + initialValues: fromJS(initialValues) + })); + } + }, { + key: 'valid', + get: function get() { + return this.refs.wrapped.getWrappedInstance().isValid(); + } + }, { + key: 'invalid', + get: function get() { + return !this.valid; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.wrapped.getWrappedInstance().isPristine(); + } + }, { + key: 'dirty', + get: function get() { + return !this.pristine; + } + }, { + key: 'values', + get: function get() { + return this.refs.wrapped.getWrappedInstance().getValues(); + } + }, { + key: 'fieldList', + get: function get() { + // mainly provided for testing + return this.refs.wrapped.getWrappedInstance().getFieldList(); + } + }, { + key: 'wrappedInstance', + get: function get() { + // for testing + return this.refs.wrapped.getWrappedInstance().refs.wrapped; + } + }]); + + return ReduxForm; + }(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createReduxForm); + +/***/ }), +/* 620 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__ = __webpack_require__(621); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(634); + + + +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = Object(__WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */])(function(object, source, srcIndex) { + Object(__WEBPACK_IMPORTED_MODULE_0__baseMerge_js__["a" /* default */])(object, source, srcIndex); +}); + +/* harmony default export */ __webpack_exports__["a"] = (merge); + + +/***/ }), +/* 621 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(172); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__ = __webpack_require__(290); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseFor_js__ = __webpack_require__(284); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__ = __webpack_require__(622); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isObject_js__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keysIn_js__ = __webpack_require__(291); + + + + + + + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + Object(__WEBPACK_IMPORTED_MODULE_2__baseFor_js__["a" /* default */])(source, function(srcValue, key) { + if (Object(__WEBPACK_IMPORTED_MODULE_4__isObject_js__["a" /* default */])(srcValue)) { + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + Object(__WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__["a" /* default */])(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + Object(__WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__["a" /* default */])(object, key, newValue); + } + }, __WEBPACK_IMPORTED_MODULE_5__keysIn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMerge); + + +/***/ }), +/* 622 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__ = __webpack_require__(290); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__ = __webpack_require__(623); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__ = __webpack_require__(624); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__copyArray_js__ = __webpack_require__(273); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__ = __webpack_require__(626); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArguments_js__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isArray_js__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__ = __webpack_require__(628); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__ = __webpack_require__(175); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__isFunction_js__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__isObject_js__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__ = __webpack_require__(629); + + + + + + + + + + + + + + + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + Object(__WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */])(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = Object(__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */])(srcValue), + isBuff = !isArr && Object(__WEBPACK_IMPORTED_MODULE_8__isBuffer_js__["a" /* default */])(srcValue), + isTyped = !isArr && !isBuff && Object(__WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__["a" /* default */])(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (Object(__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */])(objValue)) { + newValue = objValue; + } + else if (Object(__WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__["a" /* default */])(objValue)) { + newValue = Object(__WEBPACK_IMPORTED_MODULE_3__copyArray_js__["a" /* default */])(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = Object(__WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__["a" /* default */])(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = Object(__WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__["a" /* default */])(srcValue, true); + } + else { + newValue = []; + } + } + else if (Object(__WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__["a" /* default */])(srcValue) || Object(__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */])(srcValue)) { + newValue = objValue; + if (Object(__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */])(objValue)) { + newValue = Object(__WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__["a" /* default */])(objValue); + } + else if (!Object(__WEBPACK_IMPORTED_MODULE_10__isObject_js__["a" /* default */])(objValue) || (srcIndex && Object(__WEBPACK_IMPORTED_MODULE_9__isFunction_js__["a" /* default */])(objValue))) { + newValue = Object(__WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__["a" /* default */])(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + Object(__WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */])(object, key, newValue); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMergeDeep); + + +/***/ }), +/* 623 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32); + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneBuffer); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(176)(module))) + +/***/ }), +/* 624 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__ = __webpack_require__(625); + + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? Object(__WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__["a" /* default */])(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneTypedArray); + + +/***/ }), +/* 625 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__ = __webpack_require__(279); + + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](result).set(new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](arrayBuffer)); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneArrayBuffer); + + +/***/ }), +/* 626 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(627); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(254); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isPrototype_js__ = __webpack_require__(180); + + + + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !Object(__WEBPACK_IMPORTED_MODULE_2__isPrototype_js__["a" /* default */])(object)) + ? Object(__WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(object)) + : {}; +} + +/* harmony default export */ __webpack_exports__["a"] = (initCloneObject); + + +/***/ }), +/* 627 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(48); + + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +/* harmony default export */ __webpack_exports__["a"] = (baseCreate); + + +/***/ }), +/* 628 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(120); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54); + + + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isArrayLikeObject); + + +/***/ }), +/* 629 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(630); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keysIn_js__ = __webpack_require__(291); + + + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return Object(__WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */])(value, Object(__WEBPACK_IMPORTED_MODULE_1__keysIn_js__["a" /* default */])(value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (toPlainObject); + + +/***/ }), +/* 630 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignValue_js__ = __webpack_require__(631); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__ = __webpack_require__(121); + + + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + Object(__WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__["a" /* default */])(object, key, newValue); + } else { + Object(__WEBPACK_IMPORTED_MODULE_0__assignValue_js__["a" /* default */])(object, key, newValue); + } + } + return object; +} + +/* harmony default export */ __webpack_exports__["a"] = (copyObject); + + +/***/ }), +/* 631 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(121); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(90); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && Object(__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */])(objValue, value)) || + (value === undefined && !(key in object))) { + Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(object, key, value); + } +} + +/* harmony default export */ __webpack_exports__["a"] = (assignValue); + + +/***/ }), +/* 632 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__ = __webpack_require__(180); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__ = __webpack_require__(633); + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(object)) { + return Object(__WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__["a" /* default */])(object); + } + var isProto = Object(__WEBPACK_IMPORTED_MODULE_1__isPrototype_js__["a" /* default */])(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseKeysIn); + + +/***/ }), +/* 633 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (nativeKeysIn); + + +/***/ }), +/* 634 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(635); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(642); + + + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return Object(__WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */])(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && Object(__WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */])(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (createAssigner); + + +/***/ }), +/* 635 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(182); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__overRest_js__ = __webpack_require__(636); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setToString_js__ = __webpack_require__(638); + + + + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return Object(__WEBPACK_IMPORTED_MODULE_2__setToString_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__overRest_js__["a" /* default */])(func, start, __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */]), func + ''); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseRest); + + +/***/ }), +/* 636 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(637); + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(func, this, otherArgs); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (overRest); + + +/***/ }), +/* 637 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/* harmony default export */ __webpack_exports__["a"] = (apply); + + +/***/ }), +/* 638 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__ = __webpack_require__(639); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shortOut_js__ = __webpack_require__(641); + + + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = Object(__WEBPACK_IMPORTED_MODULE_1__shortOut_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (setToString); + + +/***/ }), +/* 639 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(640); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__ = __webpack_require__(283); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(182); + + + + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */] : function(func, string) { + return Object(__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */])(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(string), + 'writable': true + }); +}; + +/* harmony default export */ __webpack_exports__["a"] = (baseSetToString); + + +/***/ }), +/* 640 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (constant); + + +/***/ }), +/* 641 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (shortOut); + + +/***/ }), +/* 642 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(90); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(120); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isIndex_js__ = __webpack_require__(177); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isObject_js__ = __webpack_require__(48); + + + + + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!Object(__WEBPACK_IMPORTED_MODULE_3__isObject_js__["a" /* default */])(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */])(object) && Object(__WEBPACK_IMPORTED_MODULE_2__isIndex_js__["a" /* default */])(index, object.length)) + : (type == 'string' && index in object) + ) { + return Object(__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */])(object[index], value); + } + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (isIterateeCall); + + +/***/ }), +/* 643 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(184); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); + + +var asyncValidation = function asyncValidation(fn, start, stop, field) { + start(field); + var promise = fn(); + if (!__WEBPACK_IMPORTED_MODULE_0_is_promise___default()(promise)) { + throw new Error('asyncValidate function passed to reduxForm must return a promise'); + } + var handleErrors = function handleErrors(rejected) { + return function (errors) { + if (errors && Object.keys(errors).length) { + stop(errors); + return errors; + } else if (rejected) { + stop(); + throw new Error('Asynchronous validation promise was rejected without errors.'); + } + stop(); + return Promise.resolve(); + }; + }; + return promise.then(handleErrors(false), handleErrors(true)); +}; + +/* harmony default export */ __webpack_exports__["a"] = (asyncValidation); + +/***/ }), +/* 644 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__silenceEvent__ = __webpack_require__(292); + + +var silenceEvents = function silenceEvents(fn) { + return function (event) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return Object(__WEBPACK_IMPORTED_MODULE_0__silenceEvent__["a" /* default */])(event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args)); + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (silenceEvents); + +/***/ }), +/* 645 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain__ = __webpack_require__(11); + + +var toArray = function toArray(value) { + return Array.isArray(value) ? value : [value]; +}; + +var getError = function getError(value, values, props, validators) { + var array = toArray(validators); + for (var i = 0; i < array.length; i++) { + var error = array[i](value, values, props); + if (error) { + return error; + } + } +}; + +var generateValidator = function generateValidator(validators, _ref) { + var getIn = _ref.getIn; + return function (values, props) { + var errors = {}; + Object.keys(validators).forEach(function (name) { + var value = getIn(values, name); + var error = getError(value, values, props, validators[name]); + if (error) { + errors = __WEBPACK_IMPORTED_MODULE_0__structure_plain__["a" /* default */].setIn(errors, name, error); + } + }); + return errors; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (generateValidator); + +/***/ }), +/* 646 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(184); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubmissionError__ = __webpack_require__(268); +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + + + + +var handleSubmit = function handleSubmit(submit, props, valid, asyncValidate, fields) { + var dispatch = props.dispatch, + onSubmitFail = props.onSubmitFail, + onSubmitSuccess = props.onSubmitSuccess, + startSubmit = props.startSubmit, + stopSubmit = props.stopSubmit, + setSubmitFailed = props.setSubmitFailed, + setSubmitSucceeded = props.setSubmitSucceeded, + syncErrors = props.syncErrors, + touch = props.touch, + values = props.values, + persistentSubmitErrors = props.persistentSubmitErrors; + + + touch.apply(undefined, _toConsumableArray(fields)); // mark all fields as touched + + if (valid || persistentSubmitErrors) { + var doSubmit = function doSubmit() { + var result = void 0; + try { + result = submit(values, dispatch, props); + } catch (submitError) { + var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; + stopSubmit(error); + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(error, dispatch, submitError, props); + } + if (error || onSubmitFail) { + // if you've provided an onSubmitFail callback, don't re-throw the error + return error; + } else { + throw submitError; + } + } + if (__WEBPACK_IMPORTED_MODULE_0_is_promise___default()(result)) { + startSubmit(); + return result.then(function (submitResult) { + stopSubmit(); + setSubmitSucceeded(); + if (onSubmitSuccess) { + onSubmitSuccess(submitResult, dispatch, props); + } + return submitResult; + }, function (submitError) { + var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; + stopSubmit(error); + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(error, dispatch, submitError, props); + } + if (error || onSubmitFail) { + // if you've provided an onSubmitFail callback, don't re-throw the error + return error; + } else { + throw submitError; + } + }); + } else { + setSubmitSucceeded(); + if (onSubmitSuccess) { + onSubmitSuccess(result, dispatch, props); + } + } + return result; + }; + + var asyncValidateResult = asyncValidate && asyncValidate(); + if (asyncValidateResult) { + return asyncValidateResult.then(function (asyncErrors) { + if (asyncErrors) { + throw asyncErrors; + } + return doSubmit(); + }).catch(function (asyncErrors) { + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(asyncErrors, dispatch, null, props); + } + return Promise.reject(asyncErrors); + }); + } else { + return doSubmit(); + } + } else { + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(syncErrors, dispatch, null, props); + } + return syncErrors; + } +}; + +/* harmony default export */ __webpack_exports__["a"] = (handleSubmit); + +/***/ }), +/* 647 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var getDisplayName = function getDisplayName(Comp) { + return Comp.displayName || Comp.name || 'Component'; +}; + +/* harmony default export */ __webpack_exports__["a"] = (getDisplayName); + +/***/ }), +/* 648 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createReducer__ = __webpack_require__(649); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createReducer__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 649 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(167); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__ = __webpack_require__(650); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__structure_plain__ = __webpack_require__(11); +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + +var isReduxFormAction = function isReduxFormAction(action) { + return action && action.type && action.type.length > __WEBPACK_IMPORTED_MODULE_0__actionTypes__["prefix"].length && action.type.substring(0, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["prefix"].length) === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["prefix"]; +}; + +var createReducer = function createReducer(structure) { + var _behaviors; + + var deepEqual = structure.deepEqual, + empty = structure.empty, + getIn = structure.getIn, + setIn = structure.setIn, + deleteIn = structure.deleteIn, + fromJS = structure.fromJS, + keys = structure.keys, + size = structure.size, + splice = structure.splice; + + var deleteInWithCleanUp = Object(__WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__["a" /* default */])(structure); + var doSplice = function doSplice(state, key, field, index, removeNum, value, force) { + var existing = getIn(state, key + '.' + field); + return existing || force ? setIn(state, key + '.' + field, splice(existing, index, removeNum, value)) : state; + }; + var doPlainSplice = function doPlainSplice(state, key, field, index, removeNum, value, force) { + var slice = getIn(state, key); + var existing = __WEBPACK_IMPORTED_MODULE_2__structure_plain__["a" /* default */].getIn(slice, field); + return existing || force ? setIn(state, key, __WEBPACK_IMPORTED_MODULE_2__structure_plain__["a" /* default */].setIn(slice, field, __WEBPACK_IMPORTED_MODULE_2__structure_plain__["a" /* default */].splice(existing, index, removeNum, value))) : state; + }; + var rootKeys = ['values', 'fields', 'submitErrors', 'asyncErrors']; + var arraySplice = function arraySplice(state, field, index, removeNum, value) { + var result = state; + var nonValuesValue = value != null ? empty : undefined; + result = doSplice(result, 'values', field, index, removeNum, value, true); + result = doSplice(result, 'fields', field, index, removeNum, nonValuesValue); + result = doPlainSplice(result, 'syncErrors', field, index, removeNum, undefined); + result = doPlainSplice(result, 'syncWarnings', field, index, removeNum, undefined); + result = doSplice(result, 'submitErrors', field, index, removeNum, undefined); + result = doSplice(result, 'asyncErrors', field, index, removeNum, undefined); + return result; + }; + + var behaviors = (_behaviors = {}, _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], function (state, _ref) { + var _ref$meta = _ref.meta, + field = _ref$meta.field, + index = _ref$meta.index, + payload = _ref.payload; + + return arraySplice(state, field, index, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], function (state, _ref2) { + var _ref2$meta = _ref2.meta, + field = _ref2$meta.field, + from = _ref2$meta.from, + to = _ref2$meta.to; + + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + var result = state; + if (length) { + rootKeys.forEach(function (key) { + var path = key + '.' + field; + if (getIn(result, path)) { + var value = getIn(result, path + '[' + from + ']'); + result = setIn(result, path, splice(getIn(result, path), from, 1) // remove + );result = setIn(result, path, splice(getIn(result, path), to, 0, value) // insert + ); + } + }); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], function (state, _ref3) { + var field = _ref3.meta.field; + + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return length ? arraySplice(state, field, length - 1, 1) : state; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], function (state, _ref4) { + var field = _ref4.meta.field, + payload = _ref4.payload; + + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return arraySplice(state, field, length, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], function (state, _ref5) { + var _ref5$meta = _ref5.meta, + field = _ref5$meta.field, + index = _ref5$meta.index; + + return arraySplice(state, field, index, 1); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], function (state, _ref6) { + var field = _ref6.meta.field; + + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return length ? arraySplice(state, field, 0, length) : state; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], function (state, _ref7) { + var field = _ref7.meta.field; + + return arraySplice(state, field, 0, 1); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], function (state, _ref8) { + var _ref8$meta = _ref8.meta, + field = _ref8$meta.field, + index = _ref8$meta.index, + removeNum = _ref8$meta.removeNum, + payload = _ref8.payload; + + return arraySplice(state, field, index, removeNum, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], function (state, _ref9) { + var _ref9$meta = _ref9.meta, + field = _ref9$meta.field, + indexA = _ref9$meta.indexA, + indexB = _ref9$meta.indexB; + + var result = state; + rootKeys.forEach(function (key) { + var valueA = getIn(result, key + '.' + field + '[' + indexA + ']'); + var valueB = getIn(result, key + '.' + field + '[' + indexB + ']'); + if (valueA !== undefined || valueB !== undefined) { + result = setIn(result, key + '.' + field + '[' + indexA + ']', valueB); + result = setIn(result, key + '.' + field + '[' + indexB + ']', valueA); + } + }); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], function (state, _ref10) { + var field = _ref10.meta.field, + payload = _ref10.payload; + + return arraySplice(state, field, 0, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], function (state, _ref11) { + var field = _ref11.meta.field, + payload = _ref11.payload; + + var result = state; + result = deleteInWithCleanUp(result, 'asyncErrors.' + field); + result = deleteInWithCleanUp(result, 'submitErrors.' + field); + result = setIn(result, 'fields.' + field + '.autofilled', true); + result = setIn(result, 'values.' + field, payload); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], function (state, _ref12) { + var _ref12$meta = _ref12.meta, + field = _ref12$meta.field, + touch = _ref12$meta.touch, + payload = _ref12.payload; + + var result = state; + var initial = getIn(result, 'initial.' + field); + if (initial === undefined && payload === '') { + result = deleteInWithCleanUp(result, 'values.' + field); + } else if (payload !== undefined) { + result = setIn(result, 'values.' + field, payload); + } + if (field === getIn(result, 'active')) { + result = deleteIn(result, 'active'); + } + result = deleteIn(result, 'fields.' + field + '.active'); + if (touch) { + result = setIn(result, 'fields.' + field + '.touched', true); + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], function (state, _ref13) { + var _ref13$meta = _ref13.meta, + field = _ref13$meta.field, + touch = _ref13$meta.touch, + persistentSubmitErrors = _ref13$meta.persistentSubmitErrors, + payload = _ref13.payload; + + var result = state; + var initial = getIn(result, 'initial.' + field); + if (initial === undefined && payload === '') { + result = deleteInWithCleanUp(result, 'values.' + field); + } else if (payload !== undefined) { + result = setIn(result, 'values.' + field, payload); + } + result = deleteInWithCleanUp(result, 'asyncErrors.' + field); + if (!persistentSubmitErrors) { + result = deleteInWithCleanUp(result, 'submitErrors.' + field); + } + result = deleteInWithCleanUp(result, 'fields.' + field + '.autofilled'); + if (touch) { + result = setIn(result, 'fields.' + field + '.touched', true); + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], function (state) { + return deleteIn(state, 'triggerSubmit'); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT_ERRORS"], function (state) { + return deleteInWithCleanUp(state, 'submitErrors'); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], function (state, _ref14) { + var field = _ref14.meta.field; + + return deleteIn(state, 'asyncErrors.' + field); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], function (state, _ref15) { + var field = _ref15.meta.field; + + var result = state; + var previouslyActive = getIn(state, 'active'); + result = deleteIn(result, 'fields.' + previouslyActive + '.active'); + result = setIn(result, 'fields.' + field + '.visited', true); + result = setIn(result, 'fields.' + field + '.active', true); + result = setIn(result, 'active', field); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], function (state, _ref16) { + var payload = _ref16.payload, + _ref16$meta = _ref16.meta, + keepDirty = _ref16$meta.keepDirty, + keepSubmitSucceeded = _ref16$meta.keepSubmitSucceeded; + + var mapData = fromJS(payload); + var result = empty; // clean all field state + + // persist old warnings, they will get recalculated if the new form values are different from the old values + var warning = getIn(state, 'warning'); + if (warning) { + result = setIn(result, 'warning', warning); + } + var syncWarnings = getIn(state, 'syncWarnings'); + if (syncWarnings) { + result = setIn(result, 'syncWarnings', syncWarnings); + } + + // persist old errors, they will get recalculated if the new form values are different from the old values + var error = getIn(state, 'error'); + if (error) { + result = setIn(result, 'error', error); + } + var syncErrors = getIn(state, 'syncErrors'); + if (syncErrors) { + result = setIn(result, 'syncErrors', syncErrors); + } + + var registeredFields = getIn(state, 'registeredFields'); + if (registeredFields) { + result = setIn(result, 'registeredFields', registeredFields); + } + + var previousValues = getIn(state, 'values'); + var previousInitialValues = getIn(state, 'initial'); + var newInitialValues = mapData; + + var newValues = previousValues; + + if (keepDirty && registeredFields) { + if (!deepEqual(newInitialValues, previousInitialValues)) { + // + // Keep the value of dirty fields while updating the value of + // pristine fields. This way, apps can reinitialize forms while + // avoiding stomping on user edits. + // + // Note 1: The initialize action replaces all initial values + // regardless of keepDirty. + // + // Note 2: When a field is dirty, keepDirty is enabled, and the field + // value is the same as the new initial value for the field, the + // initialize action causes the field to become pristine. That effect + // is what we want. + // + keys(registeredFields).forEach(function (name) { + var previousInitialValue = getIn(previousInitialValues, name); + var previousValue = getIn(previousValues, name); + + if (deepEqual(previousValue, previousInitialValue)) { + // Overwrite the old pristine value with the new pristine value + var newInitialValue = getIn(newInitialValues, name); + newValues = setIn(newValues, name, newInitialValue); + } + }); + + keys(newInitialValues).forEach(function (name) { + var previousInitialValue = getIn(previousInitialValues, name); + if (typeof previousInitialValue === 'undefined') { + // Add new values at the root level. + var newInitialValue = getIn(newInitialValues, name); + newValues = setIn(newValues, name, newInitialValue); + } + }); + } + } else { + newValues = newInitialValues; + } + + if (keepSubmitSucceeded && getIn(state, 'submitSucceeded')) { + result = setIn(result, 'submitSucceeded', true); + } + result = setIn(result, 'values', newValues); + result = setIn(result, 'initial', newInitialValues); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], function (state, _ref17) { + var _ref17$payload = _ref17.payload, + name = _ref17$payload.name, + type = _ref17$payload.type; + + var key = 'registeredFields[\'' + name + '\']'; + var field = getIn(state, key); + if (field) { + var count = getIn(field, 'count') + 1; + field = setIn(field, 'count', count); + } else { + field = fromJS({ name: name, type: type, count: 1 }); + } + return setIn(state, key, field); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], function (state) { + var result = empty; + var registeredFields = getIn(state, 'registeredFields'); + if (registeredFields) { + result = setIn(result, 'registeredFields', registeredFields); + } + var values = getIn(state, 'initial'); + if (values) { + result = setIn(result, 'values', values); + result = setIn(result, 'initial', values); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], function (state) { + return setIn(state, 'triggerSubmit', true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], function (state, _ref18) { + var field = _ref18.meta.field; + + return setIn(state, 'asyncValidating', field || true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], function (state) { + return setIn(state, 'submitting', true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], function (state, _ref19) { + var payload = _ref19.payload; + + var result = state; + result = deleteIn(result, 'asyncValidating'); + if (payload && Object.keys(payload).length) { + var _error = payload._error, + fieldErrors = _objectWithoutProperties(payload, ['_error']); + + if (_error) { + result = setIn(result, 'error', _error); + } + if (Object.keys(fieldErrors).length) { + result = setIn(result, 'asyncErrors', fromJS(fieldErrors)); + } else { + result = deleteIn(result, 'asyncErrors'); + } + } else { + result = deleteIn(result, 'error'); + result = deleteIn(result, 'asyncErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], function (state, _ref20) { + var payload = _ref20.payload; + + var result = state; + result = deleteIn(result, 'submitting'); + result = deleteIn(result, 'submitFailed'); + result = deleteIn(result, 'submitSucceeded'); + if (payload && Object.keys(payload).length) { + var _error = payload._error, + fieldErrors = _objectWithoutProperties(payload, ['_error']); + + if (_error) { + result = setIn(result, 'error', _error); + } else { + result = deleteIn(result, 'error'); + } + if (Object.keys(fieldErrors).length) { + result = setIn(result, 'submitErrors', fromJS(fieldErrors)); + } else { + result = deleteIn(result, 'submitErrors'); + } + result = setIn(result, 'submitFailed', true); + } else { + result = setIn(result, 'submitSucceeded', true); + result = deleteIn(result, 'error'); + result = deleteIn(result, 'submitErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], function (state, _ref21) { + var fields = _ref21.meta.fields; + + var result = state; + result = setIn(result, 'submitFailed', true); + result = deleteIn(result, 'submitSucceeded'); + result = deleteIn(result, 'submitting'); + fields.forEach(function (field) { + return result = setIn(result, 'fields.' + field + '.touched', true); + }); + if (fields.length) { + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], function (state) { + var result = state; + result = deleteIn(result, 'submitFailed'); + result = setIn(result, 'submitSucceeded', true); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], function (state, _ref22) { + var fields = _ref22.meta.fields; + + var result = state; + fields.forEach(function (field) { + return result = setIn(result, 'fields.' + field + '.touched', true); + }); + result = setIn(result, 'anyTouched', true); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], function (state, _ref23) { + var _ref23$payload = _ref23.payload, + name = _ref23$payload.name, + destroyOnUnmount = _ref23$payload.destroyOnUnmount; + + var result = state; + var key = 'registeredFields[\'' + name + '\']'; + var field = getIn(result, key); + if (!field) { + return result; + } + + var count = getIn(field, 'count') - 1; + if (count <= 0 && destroyOnUnmount) { + // Note: Cannot use deleteWithCleanUp here because of the flat nature of registeredFields + result = deleteIn(result, key); + if (deepEqual(getIn(result, 'registeredFields'), empty)) { + result = deleteIn(result, 'registeredFields'); + } + } else { + field = setIn(field, 'count', count); + result = setIn(result, key, field); + } + if (destroyOnUnmount) { + result = deleteInWithCleanUp(result, 'syncErrors.' + name); + result = deleteInWithCleanUp(result, 'submitErrors.' + name); + result = deleteInWithCleanUp(result, 'asyncErrors.' + name); + result = deleteInWithCleanUp(result, 'syncWarnings.' + name); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], function (state, _ref24) { + var fields = _ref24.meta.fields; + + var result = state; + fields.forEach(function (field) { + return result = deleteIn(result, 'fields.' + field + '.touched'); + }); + var anyTouched = keys(getIn(result, 'registeredFields')).some(function (key) { + return getIn(result, 'fields.' + key + '.touched'); + }); + result = anyTouched ? setIn(result, 'anyTouched', true) : deleteIn(result, 'anyTouched'); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], function (state, _ref25) { + var _ref25$payload = _ref25.payload, + syncErrors = _ref25$payload.syncErrors, + error = _ref25$payload.error; + + var result = state; + if (error) { + result = setIn(result, 'error', error); + result = setIn(result, 'syncError', true); + } else { + result = deleteIn(result, 'error'); + result = deleteIn(result, 'syncError'); + } + if (Object.keys(syncErrors).length) { + result = setIn(result, 'syncErrors', syncErrors); + } else { + result = deleteIn(result, 'syncErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], function (state, _ref26) { + var _ref26$payload = _ref26.payload, + syncWarnings = _ref26$payload.syncWarnings, + warning = _ref26$payload.warning; + + var result = state; + if (warning) { + result = setIn(result, 'warning', warning); + } else { + result = deleteIn(result, 'warning'); + } + if (Object.keys(syncWarnings).length) { + result = setIn(result, 'syncWarnings', syncWarnings); + } else { + result = deleteIn(result, 'syncWarnings'); + } + return result; + }), _behaviors); + + var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments[1]; + + var behavior = behaviors[action.type]; + return behavior ? behavior(state, action) : state; + }; + + var byForm = function byForm(reducer) { + return function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var form = action && action.meta && action.meta.form; + if (!form || !isReduxFormAction(action)) { + return state; + } + if (action.type === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"]) { + return action.meta.form.reduce(function (result, form) { + return deleteInWithCleanUp(result, form); + }, state); + } + var formState = getIn(state, form); + var result = reducer(formState, action); + return result === formState ? state : setIn(state, form, result); + }; + }; + + /** + * Adds additional functionality to the reducer + */ + function decorate(target) { + target.plugin = function plugin(reducers) { + var _this = this; + + // use 'function' keyword to enable 'this' + return decorate(function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return Object.keys(reducers).reduce(function (accumulator, key) { + var previousState = getIn(accumulator, key); + var nextState = reducers[key](previousState, action, getIn(state, key)); + return nextState === previousState ? accumulator : setIn(accumulator, key, nextState); + }, _this(state, action)); + }); + }; + + return target; + } + + return decorate(byForm(reducer)); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createReducer); + +/***/ }), +/* 650 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(114); + + + +var createDeleteInWithCleanUp = function createDeleteInWithCleanUp(_ref) { + var deepEqual = _ref.deepEqual, + empty = _ref.empty, + getIn = _ref.getIn, + deleteIn = _ref.deleteIn, + setIn = _ref.setIn; + + var deleteInWithCleanUp = function deleteInWithCleanUp(state, path) { + if (path[path.length - 1] === ']') { + // array path + var pathTokens = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(path); + pathTokens.pop(); + var parent = getIn(state, pathTokens.join('.')); + return parent ? setIn(state, path, undefined) : state; + } + + var result = state; + if (getIn(state, path) !== undefined) { + result = deleteIn(state, path); + } + + var dotIndex = path.lastIndexOf('.'); + if (dotIndex > 0) { + var parentPath = path.substring(0, dotIndex); + if (parentPath[parentPath.length - 1] !== ']') { + var _parent = getIn(result, parentPath); + if (deepEqual(_parent, empty)) { + return deleteInWithCleanUp(result, parentPath); + } + } + } + return result; + }; + + return deleteInWithCleanUp; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createDeleteInWithCleanUp); + +/***/ }), +/* 651 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createValues__ = __webpack_require__(652); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11); + + + +/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + +/***/ }), +/* 652 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(27); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_redux__); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + + +var createValues = function createValues(_ref) { + var getIn = _ref.getIn; + return function (config) { + var _prop$getFormState$co = _extends({ + prop: 'values', + getFormState: function getFormState(state) { + return getIn(state, 'form'); + } + }, config), + form = _prop$getFormState$co.form, + prop = _prop$getFormState$co.prop, + getFormState = _prop$getFormState$co.getFormState; + + return Object(__WEBPACK_IMPORTED_MODULE_0_react_redux__["connect"])(function (state) { + return _defineProperty({}, prop, getIn(getFormState(state), form + '.values')); + }, function () { + return {}; + } // ignore dispatch + ); + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createValues); + +/***/ }), +/* 653 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +function createThunkMiddleware(extraArgument) { + return function (_ref) { + var dispatch = _ref.dispatch, + getState = _ref.getState; + return function (next) { + return function (action) { + if (typeof action === 'function') { + return action(dispatch, getState, extraArgument); + } + + return next(action); + }; + }; + }; +} + +var thunk = createThunkMiddleware(); +thunk.withExtraArgument = createThunkMiddleware; + +exports['default'] = thunk; + +/***/ }), +/* 654 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _menu = __webpack_require__(655); + +Object.defineProperty(exports, 'menu', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_menu).default; + } +}); + +var _settings = __webpack_require__(656); + +Object.defineProperty(exports, 'settings', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_settings).default; + } +}); + +var _notification = __webpack_require__(657); + +Object.defineProperty(exports, 'notification', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_notification).default; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), +/* 655 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _assign = __webpack_require__(49); + +var _assign2 = _interopRequireDefault(_assign); + +exports.default = menu; + +var _ActionTypes = __webpack_require__(77); + +var types = _interopRequireWildcard(_ActionTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function menu() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + currentMenu: null + }; + var action = arguments[1]; + + switch (action.type) { + case types.CHANGE_MENU: + return (0, _assign2.default)({}, state, { + currentMenu: action.menu + }); + default: + return state; + } +} + +/***/ }), +/* 656 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _assign = __webpack_require__(49); + +var _assign2 = _interopRequireDefault(_assign); + +exports.default = settings; + +var _ActionTypes = __webpack_require__(77); + +var types = _interopRequireWildcard(_ActionTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function settings() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + values: {} + }; + var action = arguments[1]; + + switch (action.type) { + case types.UPDATE_SETTINGS: + var data = (0, _assign2.default)({}, state.values); + data[action.shop] = (0, _assign2.default)({}, state.values[action.shop], action.value); + return (0, _assign2.default)({}, state, { values: data }); + default: + return state; + } +} + +/***/ }), +/* 657 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = notification; + +var _ActionTypes = __webpack_require__(77); + +var types = _interopRequireWildcard(_ActionTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function notification() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + message: null + }; + var action = arguments[1]; + + switch (action.type) { + case types.NOTIFICATION_ADD: + return { message: action.message }; + default: + return state; + } +} + +/***/ }), +/* 658 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRouter = __webpack_require__(156); + +var _App = __webpack_require__(659); + +var _App2 = _interopRequireDefault(_App); + +var _Supreme = __webpack_require__(768); + +var _Supreme2 = _interopRequireDefault(_Supreme); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + return _react2.default.createElement( + _reactRouter.Route, + { component: _App2.default }, + _react2.default.createElement(_reactRouter.Route, { path: 'supreme/', component: _Supreme2.default }), + _react2.default.createElement(_reactRouter.Redirect, { from: '/', to: 'supreme/' }) + ); +}; + +/***/ }), +/* 659 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _MuiThemeProvider = __webpack_require__(301); + +var _MuiThemeProvider2 = _interopRequireDefault(_MuiThemeProvider); + +var _AppDrawer = __webpack_require__(727); + +var _AppDrawer2 = _interopRequireDefault(_AppDrawer); + +var _NotificationBar = __webpack_require__(761); + +var _NotificationBar2 = _interopRequireDefault(_NotificationBar); + +var _Styles = __webpack_require__(80); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var App = function (_Component) { + (0, _inherits3.default)(App, _Component); + + function App() { + (0, _classCallCheck3.default)(this, App); + return (0, _possibleConstructorReturn3.default)(this, (App.__proto__ || (0, _getPrototypeOf2.default)(App)).apply(this, arguments)); + } + + (0, _createClass3.default)(App, [{ + key: 'render', + value: function render() { + var children = this.props.children; + + return _react2.default.createElement( + _MuiThemeProvider2.default, + { muiTheme: (0, _Styles.getTheme)() }, + _react2.default.createElement( + 'div', + { style: { height: '100%' } }, + _react2.default.createElement(_AppDrawer2.default, this.props), + _react2.default.createElement( + 'div', + { style: { paddingLeft: 256, height: '100%' } }, + children + ), + _react2.default.createElement(_NotificationBar2.default, null) + ) + ); + } + }]); + return App; +}(_react.Component); + +App.propTypes = { + children: _react.PropTypes.element +}; + +exports.default = App; + +/***/ }), +/* 660 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(661); +module.exports = __webpack_require__(18).Object.getPrototypeOf; + + +/***/ }), +/* 661 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(84); +var $getPrototypeOf = __webpack_require__(293); + +__webpack_require__(294)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + + +/***/ }), +/* 662 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(663); +var $Object = __webpack_require__(18).Object; +module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); +}; + + +/***/ }), +/* 663 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(28); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(44), 'Object', { defineProperty: __webpack_require__(35).f }); + + +/***/ }), +/* 664 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(665), __esModule: true }; + +/***/ }), +/* 665 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(93); +__webpack_require__(124); +module.exports = __webpack_require__(187).f('iterator'); + + +/***/ }), +/* 666 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(135); +var defined = __webpack_require__(133); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), +/* 667 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(186); +var descriptor = __webpack_require__(82); +var setToStringTag = __webpack_require__(123); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(50)(IteratorPrototype, __webpack_require__(22)('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), +/* 668 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(35); +var anObject = __webpack_require__(36); +var getKeys = __webpack_require__(64); + +module.exports = __webpack_require__(44) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), +/* 669 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(670); +var step = __webpack_require__(671); +var Iterators = __webpack_require__(78); +var toIObject = __webpack_require__(52); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(295)(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), +/* 670 */ +/***/ (function(module, exports) { + +module.exports = function () { /* empty */ }; + + +/***/ }), +/* 671 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 672 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(673), __esModule: true }; + +/***/ }), +/* 673 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(674); +__webpack_require__(300); +__webpack_require__(680); +__webpack_require__(681); +module.exports = __webpack_require__(18).Symbol; + + +/***/ }), +/* 674 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(23); +var has = __webpack_require__(51); +var DESCRIPTORS = __webpack_require__(44); +var $export = __webpack_require__(28); +var redefine = __webpack_require__(296); +var META = __webpack_require__(675).KEY; +var $fails = __webpack_require__(63); +var shared = __webpack_require__(137); +var setToStringTag = __webpack_require__(123); +var uid = __webpack_require__(100); +var wks = __webpack_require__(22); +var wksExt = __webpack_require__(187); +var wksDefine = __webpack_require__(188); +var keyOf = __webpack_require__(676); +var enumKeys = __webpack_require__(677); +var isArray = __webpack_require__(678); +var anObject = __webpack_require__(36); +var toIObject = __webpack_require__(52); +var toPrimitive = __webpack_require__(132); +var createDesc = __webpack_require__(82); +var _create = __webpack_require__(186); +var gOPNExt = __webpack_require__(679); +var $GOPD = __webpack_require__(299); +var $DP = __webpack_require__(35); +var $keys = __webpack_require__(64); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function'; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(298).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(101).f = $propertyIsEnumerable; + __webpack_require__(139).f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(122)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key) { + if (isSymbol(key)) return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + replacer = args[1]; + if (typeof replacer == 'function') $replacer = replacer; + if ($replacer || !isArray(replacer)) replacer = function (key, value) { + if ($replacer) value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(50)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), +/* 675 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(100)('meta'); +var isObject = __webpack_require__(62); +var has = __webpack_require__(51); +var setDesc = __webpack_require__(35).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(63)(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + + +/***/ }), +/* 676 */ +/***/ (function(module, exports, __webpack_require__) { + +var getKeys = __webpack_require__(64); +var toIObject = __webpack_require__(52); +module.exports = function (object, el) { + var O = toIObject(object); + var keys = getKeys(O); + var length = keys.length; + var index = 0; + var key; + while (length > index) if (O[key = keys[index++]] === el) return key; +}; + + +/***/ }), +/* 677 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(64); +var gOPS = __webpack_require__(139); +var pIE = __webpack_require__(101); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + + +/***/ }), +/* 678 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(83); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), +/* 679 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(52); +var gOPN = __webpack_require__(298).f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 680 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(188)('asyncIterator'); + + +/***/ }), +/* 681 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(188)('observable'); + + +/***/ }), +/* 682 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(683), __esModule: true }; + +/***/ }), +/* 683 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(684); +module.exports = __webpack_require__(18).Object.setPrototypeOf; + + +/***/ }), +/* 684 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(28); +$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(685).set }); + + +/***/ }), +/* 685 */ +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(62); +var anObject = __webpack_require__(36); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = __webpack_require__(61)(Function.call, __webpack_require__(299).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + + +/***/ }), +/* 686 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(687), __esModule: true }; + +/***/ }), +/* 687 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(688); +var $Object = __webpack_require__(18).Object; +module.exports = function create(P, D) { + return $Object.create(P, D); +}; + + +/***/ }), +/* 688 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(28); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: __webpack_require__(186) }); + + +/***/ }), +/* 689 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(93); +__webpack_require__(690); +module.exports = __webpack_require__(18).Array.from; + + +/***/ }), +/* 690 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(61); +var $export = __webpack_require__(28); +var toObject = __webpack_require__(84); +var call = __webpack_require__(303); +var isArrayIter = __webpack_require__(304); +var toLength = __webpack_require__(134); +var createProperty = __webpack_require__(691); +var getIterFn = __webpack_require__(190); + +$export($export.S + $export.F * !__webpack_require__(305)(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + + +/***/ }), +/* 691 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(35); +var createDesc = __webpack_require__(82); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + + +/***/ }), +/* 692 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, module) {/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ +function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; +} + +/** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ +function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; +} + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array ? array.length : 0; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + this.__data__ = new ListCache(entries); +} + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; +} + +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + return this.__data__['delete'](key); +} + +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; +} + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (typeof key == 'number' && value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, isDeep, isFull, customizer, key, object, stack) { + var result; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + if (isHostObject(value)) { + return object ? value : {}; + } + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (!isArr) { + var props = isFull ? getAllKeys(value) : keys(value); + } + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + }); + return result; +} + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +function baseCreate(proto) { + return isObject(proto) ? objectCreate(proto) : {}; +} + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +/** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + return objectToString.call(value); +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; +} + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + if (!(isArray(source) || isTypedArray(source))) { + var props = baseKeysIn(source); + } + arrayEach(props || source, function(srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; + } + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }); +} + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + newValue = srcValue; + if (isArray(srcValue) || isTypedArray(srcValue)) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else { + isCommon = false; + newValue = baseClone(srcValue, true); + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + isCommon = false; + newValue = baseClone(srcValue, true); + } + else { + newValue = objValue; + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; +} + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var result = new buffer.constructor(buffer.length); + buffer.copy(result); + return result; +} + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ +function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); +} + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ +function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); +} + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; +} + +/** + * Copies own symbol properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Creates an array of the own enumerable symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge < 14, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || + objectToString.call(value) != objectTag || isHostObject(value)) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return (typeof Ctor == 'function' && + Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); +} + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return copyObject(value, keysIn(value)); +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); +}); + +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = merge; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47), __webpack_require__(256)(module))) + +/***/ }), +/* 693 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = __webpack_require__(92); + +var _typeof3 = _interopRequireDefault(_typeof2); + +exports.default = function (muiTheme) { + var isClient = typeof navigator !== 'undefined'; + var userAgent = muiTheme.userAgent; + + if (userAgent === undefined && isClient) { + userAgent = navigator.userAgent; + } + + if (userAgent === undefined && !hasWarnedAboutUserAgent) { + false ? (0, _warning2.default)(false, 'Material-UI: userAgent should be supplied in the muiTheme context\n for server-side rendering.') : void 0; + + hasWarnedAboutUserAgent = true; + } + + if (userAgent === false) { + // Disabled autoprefixer + return null; + } else if (userAgent === 'all' || userAgent === undefined) { + // Prefix for all user agent + return function (style) { + var isFlex = ['flex', 'inline-flex'].indexOf(style.display) !== -1; + var stylePrefixed = _inlineStylePrefixer2.default.prefixAll(style); + + if (isFlex) { + var display = stylePrefixed.display; + if (isClient) { + // We can't apply this join with react-dom: + // #https://github.com/facebook/react/issues/6467 + stylePrefixed.display = display[display.length - 1]; + } else { + stylePrefixed.display = display.join('; display: '); + } + } + + return stylePrefixed; + }; + } else { + var _ret = function () { + var prefixer = new _inlineStylePrefixer2.default({ + userAgent: userAgent + }); + + return { + v: function v(style) { + return prefixer.prefix(style); + } + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + } +}; + +var _inlineStylePrefixer = __webpack_require__(694); + +var _inlineStylePrefixer2 = _interopRequireDefault(_inlineStylePrefixer); + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var hasWarnedAboutUserAgent = false; + +/***/ }), +/* 694 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +// special flexbox specifications + + +var _prefixAll2 = __webpack_require__(695); + +var _prefixAll3 = _interopRequireDefault(_prefixAll2); + +var _getBrowserInformation = __webpack_require__(706); + +var _getBrowserInformation2 = _interopRequireDefault(_getBrowserInformation); + +var _getPrefixedKeyframes = __webpack_require__(709); + +var _getPrefixedKeyframes2 = _interopRequireDefault(_getPrefixedKeyframes); + +var _capitalizeString = __webpack_require__(193); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _sortPrefixedStyle = __webpack_require__(309); + +var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); + +var _prefixProps = __webpack_require__(710); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +var _position = __webpack_require__(711); + +var _position2 = _interopRequireDefault(_position); + +var _calc = __webpack_require__(712); + +var _calc2 = _interopRequireDefault(_calc); + +var _zoomCursor = __webpack_require__(713); + +var _zoomCursor2 = _interopRequireDefault(_zoomCursor); + +var _grabCursor = __webpack_require__(714); + +var _grabCursor2 = _interopRequireDefault(_grabCursor); + +var _flex = __webpack_require__(715); + +var _flex2 = _interopRequireDefault(_flex); + +var _sizing = __webpack_require__(716); + +var _sizing2 = _interopRequireDefault(_sizing); + +var _gradient = __webpack_require__(717); + +var _gradient2 = _interopRequireDefault(_gradient); + +var _transition = __webpack_require__(718); + +var _transition2 = _interopRequireDefault(_transition); + +var _flexboxIE = __webpack_require__(720); + +var _flexboxIE2 = _interopRequireDefault(_flexboxIE); + +var _flexboxOld = __webpack_require__(721); + +var _flexboxOld2 = _interopRequireDefault(_flexboxOld); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var plugins = [_position2.default, _calc2.default, _zoomCursor2.default, _grabCursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, +// this must be run AFTER the flexbox specs +_flex2.default]; + +var Prefixer = function () { + /** + * Instantiante a new prefixer + * @param {string} userAgent - userAgent to gather prefix information according to caniuse.com + * @param {string} keepUnprefixed - keeps unprefixed properties and values + */ + + function Prefixer() { + var _this = this; + + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + _classCallCheck(this, Prefixer); + + var defaultUserAgent = typeof navigator !== 'undefined' ? navigator.userAgent : undefined; + + this._userAgent = options.userAgent || defaultUserAgent; + this._keepUnprefixed = options.keepUnprefixed || false; + + this._browserInfo = (0, _getBrowserInformation2.default)(this._userAgent); + + // Checks if the userAgent was resolved correctly + if (this._browserInfo && this._browserInfo.prefix) { + // set additional prefix information + this.cssPrefix = this._browserInfo.prefix.css; + this.jsPrefix = this._browserInfo.prefix.inline; + this.prefixedKeyframes = (0, _getPrefixedKeyframes2.default)(this._browserInfo); + } else { + this._usePrefixAllFallback = true; + return false; + } + + var data = this._browserInfo.browser && _prefixProps2.default[this._browserInfo.browser]; + if (data) { + this._requiresPrefix = Object.keys(data).filter(function (key) { + return data[key] >= _this._browserInfo.version; + }).reduce(function (result, name) { + result[name] = true; + return result; + }, {}); + this._hasPropsRequiringPrefix = Object.keys(this._requiresPrefix).length > 0; + } else { + this._usePrefixAllFallback = true; + } + } + + /** + * Returns a prefixed version of the style object + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ + + + _createClass(Prefixer, [{ + key: 'prefix', + value: function prefix(styles) { + var _this2 = this; + + // use prefixAll as fallback if userAgent can not be resolved + if (this._usePrefixAllFallback) { + return (0, _prefixAll3.default)(styles); + } + + // only add prefixes if needed + if (!this._hasPropsRequiringPrefix) { + return styles; + } + + Object.keys(styles).forEach(function (property) { + var value = styles[property]; + if (value instanceof Object && !Array.isArray(value)) { + // recurse through nested style objects + styles[property] = _this2.prefix(value); + } else { + // add prefixes if needed + if (_this2._requiresPrefix[property]) { + styles[_this2.jsPrefix + (0, _capitalizeString2.default)(property)] = value; + if (!_this2._keepUnprefixed) { + delete styles[property]; + } + } + } + }); + + Object.keys(styles).forEach(function (property) { + [].concat(styles[property]).forEach(function (value) { + // resolve plugins + plugins.forEach(function (plugin) { + // generates a new plugin interface with current data + assignStyles(styles, plugin({ + property: property, + value: value, + styles: styles, + browserInfo: _this2._browserInfo, + prefix: { + js: _this2.jsPrefix, + css: _this2.cssPrefix, + keyframes: _this2.prefixedKeyframes + }, + keepUnprefixed: _this2._keepUnprefixed, + requiresPrefix: _this2._requiresPrefix + }), value, _this2._keepUnprefixed); + }); + }); + }); + + return (0, _sortPrefixedStyle2.default)(styles); + } + + /** + * Returns a prefixed version of the style object using all vendor prefixes + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ + + }], [{ + key: 'prefixAll', + value: function prefixAll(styles) { + return (0, _prefixAll3.default)(styles); + } + }]); + + return Prefixer; +}(); + +exports.default = Prefixer; + + +function assignStyles(base) { + var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var value = arguments[2]; + var keepUnprefixed = arguments[3]; + + Object.keys(extend).forEach(function (property) { + var baseValue = base[property]; + if (Array.isArray(baseValue)) { + [].concat(extend[property]).forEach(function (val) { + if (base[property].indexOf(val) === -1) { + base[property].splice(baseValue.indexOf(value), keepUnprefixed ? 0 : 1, val); + } + }); + } else { + base[property] = extend[property]; + } + }); +} +module.exports = exports['default']; + +/***/ }), +/* 695 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = prefixAll; + +var _prefixProps = __webpack_require__(308); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +var _capitalizeString = __webpack_require__(193); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _sortPrefixedStyle = __webpack_require__(309); + +var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); + +var _position = __webpack_require__(697); + +var _position2 = _interopRequireDefault(_position); + +var _calc = __webpack_require__(698); + +var _calc2 = _interopRequireDefault(_calc); + +var _cursor = __webpack_require__(699); + +var _cursor2 = _interopRequireDefault(_cursor); + +var _flex = __webpack_require__(700); + +var _flex2 = _interopRequireDefault(_flex); + +var _sizing = __webpack_require__(701); + +var _sizing2 = _interopRequireDefault(_sizing); + +var _gradient = __webpack_require__(702); + +var _gradient2 = _interopRequireDefault(_gradient); + +var _transition = __webpack_require__(703); + +var _transition2 = _interopRequireDefault(_transition); + +var _flexboxIE = __webpack_require__(704); + +var _flexboxIE2 = _interopRequireDefault(_flexboxIE); + +var _flexboxOld = __webpack_require__(705); + +var _flexboxOld2 = _interopRequireDefault(_flexboxOld); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// special flexbox specifications + + +var plugins = [_position2.default, _calc2.default, _cursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, _flex2.default]; + +/** + * Returns a prefixed version of the style object using all vendor prefixes + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ +function prefixAll(styles) { + Object.keys(styles).forEach(function (property) { + var value = styles[property]; + if (value instanceof Object && !Array.isArray(value)) { + // recurse through nested style objects + styles[property] = prefixAll(value); + } else { + Object.keys(_prefixProps2.default).forEach(function (prefix) { + var properties = _prefixProps2.default[prefix]; + // add prefixes if needed + if (properties[property]) { + styles[prefix + (0, _capitalizeString2.default)(property)] = value; + } + }); + } + }); + + Object.keys(styles).forEach(function (property) { + [].concat(styles[property]).forEach(function (value, index) { + // resolve every special plugins + plugins.forEach(function (plugin) { + return assignStyles(styles, plugin(property, value)); + }); + }); + }); + + return (0, _sortPrefixedStyle2.default)(styles); +} + +function assignStyles(base) { + var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + Object.keys(extend).forEach(function (property) { + var baseValue = base[property]; + if (Array.isArray(baseValue)) { + [].concat(extend[property]).forEach(function (value) { + var valueIndex = baseValue.indexOf(value); + if (valueIndex > -1) { + base[property].splice(valueIndex, 1); + } + base[property].push(value); + }); + } else { + base[property] = extend[property]; + } + }); +} +module.exports = exports['default']; + +/***/ }), +/* 696 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (property) { + return property.match(/^(Webkit|Moz|O|ms)/) !== null; +}; + +module.exports = exports["default"]; + +/***/ }), +/* 697 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = position; +function position(property, value) { + if (property === 'position' && value === 'sticky') { + return { position: ['-webkit-sticky', 'sticky'] }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 698 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = calc; + +var _joinPrefixedValue = __webpack_require__(126); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +var _isPrefixedValue = __webpack_require__(194); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function calc(property, value) { + if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('calc(') > -1) { + return (0, _joinPrefixedValue2.default)(property, value, function (prefix, value) { + return value.replace(/calc\(/g, prefix + 'calc('); + }); + } +} +module.exports = exports['default']; + +/***/ }), +/* 699 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cursor; + +var _joinPrefixedValue = __webpack_require__(126); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { + 'zoom-in': true, + 'zoom-out': true, + grab: true, + grabbing: true +}; + +function cursor(property, value) { + if (property === 'cursor' && values[value]) { + return (0, _joinPrefixedValue2.default)(property, value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 700 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flex; +var values = { flex: true, 'inline-flex': true }; + +function flex(property, value) { + if (property === 'display' && values[value]) { + return { + display: ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value] + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 701 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sizing; + +var _joinPrefixedValue = __webpack_require__(126); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var properties = { + maxHeight: true, + maxWidth: true, + width: true, + height: true, + columnWidth: true, + minWidth: true, + minHeight: true +}; +var values = { + 'min-content': true, + 'max-content': true, + 'fill-available': true, + 'fit-content': true, + 'contain-floats': true +}; + +function sizing(property, value) { + if (properties[property] && values[value]) { + return (0, _joinPrefixedValue2.default)(property, value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 702 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gradient; + +var _joinPrefixedValue = __webpack_require__(126); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +var _isPrefixedValue = __webpack_require__(194); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; + +function gradient(property, value) { + if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.match(values) !== null) { + return (0, _joinPrefixedValue2.default)(property, value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 703 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = transition; + +var _hyphenateStyleName = __webpack_require__(310); + +var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); + +var _capitalizeString = __webpack_require__(193); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _isPrefixedValue = __webpack_require__(194); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +var _prefixProps = __webpack_require__(308); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { + transition: true, + transitionProperty: true, + WebkitTransition: true, + WebkitTransitionProperty: true +}; + +function transition(property, value) { + // also check for already prefixed transitions + if (typeof value === 'string' && properties[property]) { + var _ref2; + + var outputValue = prefixValue(value); + var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (value) { + return value.match(/-moz-|-ms-/) === null; + }).join(','); + + // if the property is already prefixed + if (property.indexOf('Webkit') > -1) { + return _defineProperty({}, property, webkitOutput); + } + + return _ref2 = {}, _defineProperty(_ref2, 'Webkit' + (0, _capitalizeString2.default)(property), webkitOutput), _defineProperty(_ref2, property, outputValue), _ref2; + } +} + +function prefixValue(value) { + if ((0, _isPrefixedValue2.default)(value)) { + return value; + } + + // only split multi values, not cubic beziers + var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); + + // iterate each single value and check for transitioned properties + // that need to be prefixed as well + multipleValues.forEach(function (val, index) { + multipleValues[index] = Object.keys(_prefixProps2.default).reduce(function (out, prefix) { + var dashCasePrefix = '-' + prefix.toLowerCase() + '-'; + + Object.keys(_prefixProps2.default[prefix]).forEach(function (prop) { + var dashCaseProperty = (0, _hyphenateStyleName2.default)(prop); + + if (val.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') { + // join all prefixes and create a new value + out = val.replace(dashCaseProperty, dashCasePrefix + dashCaseProperty) + ',' + out; + } + }); + return out; + }, val); + }); + + return multipleValues.join(','); +} +module.exports = exports['default']; + +/***/ }), +/* 704 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxIE; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'distribute', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end' +}; +var alternativeProps = { + alignContent: 'msFlexLinePack', + alignSelf: 'msFlexItemAlign', + alignItems: 'msFlexAlign', + justifyContent: 'msFlexPack', + order: 'msFlexOrder', + flexGrow: 'msFlexPositive', + flexShrink: 'msFlexNegative', + flexBasis: 'msPreferredSize' +}; + +function flexboxIE(property, value) { + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 705 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxOld; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'justify', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + 'wrap-reverse': 'multiple', + wrap: 'multiple' +}; + +var alternativeProps = { + alignItems: 'WebkitBoxAlign', + justifyContent: 'WebkitBoxPack', + flexWrap: 'WebkitBoxLines' +}; + +function flexboxOld(property, value) { + if (property === 'flexDirection' && typeof value === 'string') { + return { + WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', + WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 706 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _bowser = __webpack_require__(707); + +var _bowser2 = _interopRequireDefault(_bowser); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var vendorPrefixes = { + Webkit: ['chrome', 'safari', 'ios', 'android', 'phantom', 'opera', 'webos', 'blackberry', 'bada', 'tizen', 'chromium', 'vivaldi'], + Moz: ['firefox', 'seamonkey', 'sailfish'], + ms: ['msie', 'msedge'] +}; +var browsers = { + chrome: [['chrome'], ['chromium']], + safari: [['safari']], + firefox: [['firefox']], + edge: [['msedge']], + opera: [['opera'], ['vivaldi']], + ios_saf: [['ios', 'mobile'], ['ios', 'tablet']], + ie: [['msie']], + op_mini: [['opera', 'mobile'], ['opera', 'tablet']], + and_uc: [['android', 'mobile'], ['android', 'tablet']], + android: [['android', 'mobile'], ['android', 'tablet']] +}; + +var browserByInfo = function browserByInfo(info) { + if (info.firefox) { + return 'firefox'; + } + var name = ''; + + Object.keys(browsers).forEach(function (browser) { + browsers[browser].forEach(function (condition) { + var match = 0; + condition.forEach(function (single) { + if (info[single]) { + match += 1; + } + }); + if (condition.length === match) { + name = browser; + } + }); + }); + + return name; +}; + +/** + * Uses bowser to get default browser information such as version and name + * Evaluates bowser info and adds vendorPrefix information + * @param {string} userAgent - userAgent that gets evaluated + */ + +exports.default = function (userAgent) { + if (!userAgent) { + return false; + } + var info = _bowser2.default._detect(userAgent); + + Object.keys(vendorPrefixes).forEach(function (prefix) { + vendorPrefixes[prefix].forEach(function (browser) { + if (info[browser]) { + info.prefix = { + inline: prefix, + css: '-' + prefix.toLowerCase() + '-' + }; + } + }); + }); + + info.browser = browserByInfo(info); + + // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN + info.version = info.version ? parseFloat(info.version) : parseInt(parseFloat(info.osversion), 10); + info.osversion = parseFloat(info.osversion); + + // iOS forces all browsers to use Safari under the hood + // as the Safari version seems to match the iOS version + // we just explicitely use the osversion instead + // https://github.com/rofrischmann/inline-style-prefixer/issues/72 + if (info.browser === 'ios_saf' && info.version > info.osversion) { + info.version = info.osversion; + info.safari = true; + } + + // seperate native android chrome + // https://github.com/rofrischmann/inline-style-prefixer/issues/45 + if (info.browser === 'android' && info.chrome && info.version > 37) { + info.browser = 'and_chr'; + } + + // For android < 4.4 we want to check the osversion + // not the chrome version, see issue #26 + // https://github.com/rofrischmann/inline-style-prefixer/issues/26 + if (info.browser === 'android' && info.osversion < 5) { + info.version = info.osversion; + } + + return info; +}; + +module.exports = exports['default']; + +/***/ }), +/* 707 */ +/***/ (function(module, exports, __webpack_require__) { + +/*! + * Bowser - a browser detector + * https://github.com/ded/bowser + * MIT License | (c) Dustin Diaz 2015 + */ + +!function (root, name, definition) { + if (typeof module != 'undefined' && module.exports) module.exports = definition() + else if (true) __webpack_require__(708)(name, definition) + else root[name] = definition() +}(this, 'bowser', function () { + /** + * See useragents.js for examples of navigator.userAgent + */ + + var t = true + + function detect(ua) { + + function getFirstMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[1]) || ''; + } + + function getSecondMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[2]) || ''; + } + + var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase() + , likeAndroid = /like android/i.test(ua) + , android = !likeAndroid && /android/i.test(ua) + , nexusMobile = /nexus\s*[0-6]\s*/i.test(ua) + , nexusTablet = !nexusMobile && /nexus\s*[0-9]+/i.test(ua) + , chromeos = /CrOS/.test(ua) + , silk = /silk/i.test(ua) + , sailfish = /sailfish/i.test(ua) + , tizen = /tizen/i.test(ua) + , webos = /(web|hpw)os/i.test(ua) + , windowsphone = /windows phone/i.test(ua) + , samsungBrowser = /SamsungBrowser/i.test(ua) + , windows = !windowsphone && /windows/i.test(ua) + , mac = !iosdevice && !silk && /macintosh/i.test(ua) + , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua) + , edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i) + , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i) + , tablet = /tablet/i.test(ua) && !/tablet pc/i.test(ua) + , mobile = !tablet && /[^-]mobi/i.test(ua) + , xbox = /xbox/i.test(ua) + , result + + if (/opera/i.test(ua)) { + // an old Opera + result = { + name: 'Opera' + , opera: t + , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i) + } + } else if (/opr|opios/i.test(ua)) { + // a new Opera + result = { + name: 'Opera' + , opera: t + , version: getFirstMatch(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i) || versionIdentifier + } + } + else if (/SamsungBrowser/i.test(ua)) { + result = { + name: 'Samsung Internet for Android' + , samsungBrowser: t + , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/coast/i.test(ua)) { + result = { + name: 'Opera Coast' + , coast: t + , version: versionIdentifier || getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/yabrowser/i.test(ua)) { + result = { + name: 'Yandex Browser' + , yandexbrowser: t + , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/ucbrowser/i.test(ua)) { + result = { + name: 'UC Browser' + , ucbrowser: t + , version: getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/mxios/i.test(ua)) { + result = { + name: 'Maxthon' + , maxthon: t + , version: getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/epiphany/i.test(ua)) { + result = { + name: 'Epiphany' + , epiphany: t + , version: getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/puffin/i.test(ua)) { + result = { + name: 'Puffin' + , puffin: t + , version: getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i) + } + } + else if (/sleipnir/i.test(ua)) { + result = { + name: 'Sleipnir' + , sleipnir: t + , version: getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/k-meleon/i.test(ua)) { + result = { + name: 'K-Meleon' + , kMeleon: t + , version: getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (windowsphone) { + result = { + name: 'Windows Phone' + , windowsphone: t + } + if (edgeVersion) { + result.msedge = t + result.version = edgeVersion + } + else { + result.msie = t + result.version = getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i) + } + } + else if (/msie|trident/i.test(ua)) { + result = { + name: 'Internet Explorer' + , msie: t + , version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i) + } + } else if (chromeos) { + result = { + name: 'Chrome' + , chromeos: t + , chromeBook: t + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } else if (/chrome.+? edge/i.test(ua)) { + result = { + name: 'Microsoft Edge' + , msedge: t + , version: edgeVersion + } + } + else if (/vivaldi/i.test(ua)) { + result = { + name: 'Vivaldi' + , vivaldi: t + , version: getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i) || versionIdentifier + } + } + else if (sailfish) { + result = { + name: 'Sailfish' + , sailfish: t + , version: getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i) + } + } + else if (/seamonkey\//i.test(ua)) { + result = { + name: 'SeaMonkey' + , seamonkey: t + , version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i) + } + } + else if (/firefox|iceweasel|fxios/i.test(ua)) { + result = { + name: 'Firefox' + , firefox: t + , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i) + } + if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) { + result.firefoxos = t + } + } + else if (silk) { + result = { + name: 'Amazon Silk' + , silk: t + , version : getFirstMatch(/silk\/(\d+(\.\d+)?)/i) + } + } + else if (/phantom/i.test(ua)) { + result = { + name: 'PhantomJS' + , phantom: t + , version: getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i) + } + } + else if (/slimerjs/i.test(ua)) { + result = { + name: 'SlimerJS' + , slimer: t + , version: getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i) + } + } + else if (/blackberry|\bbb\d+/i.test(ua) || /rim\stablet/i.test(ua)) { + result = { + name: 'BlackBerry' + , blackberry: t + , version: versionIdentifier || getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i) + } + } + else if (webos) { + result = { + name: 'WebOS' + , webos: t + , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i) + }; + /touchpad\//i.test(ua) && (result.touchpad = t) + } + else if (/bada/i.test(ua)) { + result = { + name: 'Bada' + , bada: t + , version: getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i) + }; + } + else if (tizen) { + result = { + name: 'Tizen' + , tizen: t + , version: getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || versionIdentifier + }; + } + else if (/qupzilla/i.test(ua)) { + result = { + name: 'QupZilla' + , qupzilla: t + , version: getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || versionIdentifier + } + } + else if (/chromium/i.test(ua)) { + result = { + name: 'Chromium' + , chromium: t + , version: getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || versionIdentifier + } + } + else if (/chrome|crios|crmo/i.test(ua)) { + result = { + name: 'Chrome' + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } + else if (android) { + result = { + name: 'Android' + , version: versionIdentifier + } + } + else if (/safari|applewebkit/i.test(ua)) { + result = { + name: 'Safari' + , safari: t + } + if (versionIdentifier) { + result.version = versionIdentifier + } + } + else if (iosdevice) { + result = { + name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod' + } + // WTF: version is not part of user agent in web apps + if (versionIdentifier) { + result.version = versionIdentifier + } + } + else if(/googlebot/i.test(ua)) { + result = { + name: 'Googlebot' + , googlebot: t + , version: getFirstMatch(/googlebot\/(\d+(\.\d+))/i) || versionIdentifier + } + } + else { + result = { + name: getFirstMatch(/^(.*)\/(.*) /), + version: getSecondMatch(/^(.*)\/(.*) /) + }; + } + + // set webkit or gecko flag for browsers based on these engines + if (!result.msedge && /(apple)?webkit/i.test(ua)) { + if (/(apple)?webkit\/537\.36/i.test(ua)) { + result.name = result.name || "Blink" + result.blink = t + } else { + result.name = result.name || "Webkit" + result.webkit = t + } + if (!result.version && versionIdentifier) { + result.version = versionIdentifier + } + } else if (!result.opera && /gecko\//i.test(ua)) { + result.name = result.name || "Gecko" + result.gecko = t + result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i) + } + + // set OS flags for platforms that have multiple browsers + if (!result.windowsphone && !result.msedge && (android || result.silk)) { + result.android = t + } else if (!result.windowsphone && !result.msedge && iosdevice) { + result[iosdevice] = t + result.ios = t + } else if (mac) { + result.mac = t + } else if (xbox) { + result.xbox = t + } else if (windows) { + result.windows = t + } else if (linux) { + result.linux = t + } + + function getWindowsVersion (s) { + switch (s) { + case 'NT': return 'NT' + case 'XP': return 'XP' + case 'NT 5.0': return '2000' + case 'NT 5.1': return 'XP' + case 'NT 5.2': return '2003' + case 'NT 6.0': return 'Vista' + case 'NT 6.1': return '7' + case 'NT 6.2': return '8' + case 'NT 6.3': return '8.1' + case 'NT 10.0': return '10' + default: return undefined + } + } + + // OS version extraction + var osVersion = ''; + if (result.windows) { + osVersion = getWindowsVersion(getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i)) + } else if (result.windowsphone) { + osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i); + } else if (result.mac) { + osVersion = getFirstMatch(/Mac OS X (\d+([_\.\s]\d+)*)/i); + osVersion = osVersion.replace(/[_\s]/g, '.'); + } else if (iosdevice) { + osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i); + osVersion = osVersion.replace(/[_\s]/g, '.'); + } else if (android) { + osVersion = getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i); + } else if (result.webos) { + osVersion = getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i); + } else if (result.blackberry) { + osVersion = getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i); + } else if (result.bada) { + osVersion = getFirstMatch(/bada\/(\d+(\.\d+)*)/i); + } else if (result.tizen) { + osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i); + } + if (osVersion) { + result.osversion = osVersion; + } + + // device type extraction + var osMajorVersion = !result.windows && osVersion.split('.')[0]; + if ( + tablet + || nexusTablet + || iosdevice == 'ipad' + || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile))) + || result.silk + ) { + result.tablet = t + } else if ( + mobile + || iosdevice == 'iphone' + || iosdevice == 'ipod' + || android + || nexusMobile + || result.blackberry + || result.webos + || result.bada + ) { + result.mobile = t + } + + // Graded Browser Support + // http://developer.yahoo.com/yui/articles/gbs + if (result.msedge || + (result.msie && result.version >= 10) || + (result.yandexbrowser && result.version >= 15) || + (result.vivaldi && result.version >= 1.0) || + (result.chrome && result.version >= 20) || + (result.samsungBrowser && result.version >= 4) || + (result.firefox && result.version >= 20.0) || + (result.safari && result.version >= 6) || + (result.opera && result.version >= 10.0) || + (result.ios && result.osversion && result.osversion.split(".")[0] >= 6) || + (result.blackberry && result.version >= 10.1) + || (result.chromium && result.version >= 20) + ) { + result.a = t; + } + else if ((result.msie && result.version < 10) || + (result.chrome && result.version < 20) || + (result.firefox && result.version < 20.0) || + (result.safari && result.version < 6) || + (result.opera && result.version < 10.0) || + (result.ios && result.osversion && result.osversion.split(".")[0] < 6) + || (result.chromium && result.version < 20) + ) { + result.c = t + } else result.x = t + + return result + } + + var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '') + + bowser.test = function (browserList) { + for (var i = 0; i < browserList.length; ++i) { + var browserItem = browserList[i]; + if (typeof browserItem=== 'string') { + if (browserItem in bowser) { + return true; + } + } + } + return false; + } + + /** + * Get version precisions count + * + * @example + * getVersionPrecision("1.10.3") // 3 + * + * @param {string} version + * @return {number} + */ + function getVersionPrecision(version) { + return version.split(".").length; + } + + /** + * Array::map polyfill + * + * @param {Array} arr + * @param {Function} iterator + * @return {Array} + */ + function map(arr, iterator) { + var result = [], i; + if (Array.prototype.map) { + return Array.prototype.map.call(arr, iterator); + } + for (i = 0; i < arr.length; i++) { + result.push(iterator(arr[i])); + } + return result; + } + + /** + * Calculate browser version weight + * + * @example + * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1 + * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1 + * compareVersions(['1.10.2.1', '1.10.2.1']); // 0 + * compareVersions(['1.10.2.1', '1.0800.2']); // -1 + * + * @param {Array<String>} versions versions to compare + * @return {Number} comparison result + */ + function compareVersions(versions) { + // 1) get common precision for both versions, for example for "10.0" and "9" it should be 2 + var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1])); + var chunks = map(versions, function (version) { + var delta = precision - getVersionPrecision(version); + + // 2) "9" -> "9.0" (for precision = 2) + version = version + new Array(delta + 1).join(".0"); + + // 3) "9.0" -> ["000000000"", "000000009"] + return map(version.split("."), function (chunk) { + return new Array(20 - chunk.length).join("0") + chunk; + }).reverse(); + }); + + // iterate in reverse order by reversed chunks array + while (--precision >= 0) { + // 4) compare: "000000009" > "000000010" = false (but "9" > "10" = true) + if (chunks[0][precision] > chunks[1][precision]) { + return 1; + } + else if (chunks[0][precision] === chunks[1][precision]) { + if (precision === 0) { + // all version chunks are same + return 0; + } + } + else { + return -1; + } + } + } + + /** + * Check if browser is unsupported + * + * @example + * bowser.isUnsupportedBrowser({ + * msie: "10", + * firefox: "23", + * chrome: "29", + * safari: "5.1", + * opera: "16", + * phantom: "534" + * }); + * + * @param {Object} minVersions map of minimal version to browser + * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map + * @param {String} [ua] user agent string + * @return {Boolean} + */ + function isUnsupportedBrowser(minVersions, strictMode, ua) { + var _bowser = bowser; + + // make strictMode param optional with ua param usage + if (typeof strictMode === 'string') { + ua = strictMode; + strictMode = void(0); + } + + if (strictMode === void(0)) { + strictMode = false; + } + if (ua) { + _bowser = detect(ua); + } + + var version = "" + _bowser.version; + for (var browser in minVersions) { + if (minVersions.hasOwnProperty(browser)) { + if (_bowser[browser]) { + if (typeof minVersions[browser] !== 'string') { + throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions)); + } + + // browser version and min supported version. + return compareVersions([version, minVersions[browser]]) < 0; + } + } + } + + return strictMode; // not found + } + + /** + * Check if browser is supported + * + * @param {Object} minVersions map of minimal version to browser + * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map + * @param {String} [ua] user agent string + * @return {Boolean} + */ + function check(minVersions, strictMode, ua) { + return !isUnsupportedBrowser(minVersions, strictMode, ua); + } + + bowser.isUnsupportedBrowser = isUnsupportedBrowser; + bowser.compareVersions = compareVersions; + bowser.check = check; + + /* + * Set our detect method to the main bowser object so we can + * reuse it to test other user agents. + * This is needed to implement future tests. + */ + bowser._detect = detect; + + return bowser +}); + + +/***/ }), +/* 708 */ +/***/ (function(module, exports) { + +module.exports = function() { + throw new Error("define cannot be used indirect"); +}; + + +/***/ }), +/* 709 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (_ref) { + var browser = _ref.browser; + var version = _ref.version; + var prefix = _ref.prefix; + + var prefixedKeyframes = 'keyframes'; + + if (browser === 'chrome' && version < 43 || (browser === 'safari' || browser === 'ios_saf') && version < 9 || browser === 'opera' && version < 30 || browser === 'android' && version <= 4.4 || browser === 'and_uc') { + prefixedKeyframes = prefix.css + prefixedKeyframes; + } + return prefixedKeyframes; +}; + +module.exports = exports['default']; + +/***/ }), +/* 710 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { "chrome": { "transform": 35, "transformOrigin": 35, "transformOriginX": 35, "transformOriginY": 35, "backfaceVisibility": 35, "perspective": 35, "perspectiveOrigin": 35, "transformStyle": 35, "transformOriginZ": 35, "animation": 42, "animationDelay": 42, "animationDirection": 42, "animationFillMode": 42, "animationDuration": 42, "animationIterationCount": 42, "animationName": 42, "animationPlayState": 42, "animationTimingFunction": 42, "appearance": 55, "userSelect": 55, "fontKerning": 32, "textEmphasisPosition": 55, "textEmphasis": 55, "textEmphasisStyle": 55, "textEmphasisColor": 55, "boxDecorationBreak": 55, "clipPath": 55, "maskImage": 55, "maskMode": 55, "maskRepeat": 55, "maskPosition": 55, "maskClip": 55, "maskOrigin": 55, "maskSize": 55, "maskComposite": 55, "mask": 55, "maskBorderSource": 55, "maskBorderMode": 55, "maskBorderSlice": 55, "maskBorderWidth": 55, "maskBorderOutset": 55, "maskBorderRepeat": 55, "maskBorder": 55, "maskType": 55, "textDecorationStyle": 55, "textDecorationSkip": 55, "textDecorationLine": 55, "textDecorationColor": 55, "filter": 52, "fontFeatureSettings": 47, "breakAfter": 49, "breakBefore": 49, "breakInside": 49, "columnCount": 49, "columnFill": 49, "columnGap": 49, "columnRule": 49, "columnRuleColor": 49, "columnRuleStyle": 49, "columnRuleWidth": 49, "columns": 49, "columnSpan": 49, "columnWidth": 49 }, "safari": { "flex": 8, "flexBasis": 8, "flexDirection": 8, "flexGrow": 8, "flexFlow": 8, "flexShrink": 8, "flexWrap": 8, "alignContent": 8, "alignItems": 8, "alignSelf": 8, "justifyContent": 8, "order": 8, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8, "transformOrigin": 8, "transformOriginX": 8, "transformOriginY": 8, "backfaceVisibility": 8, "perspective": 8, "perspectiveOrigin": 8, "transformStyle": 8, "transformOriginZ": 8, "animation": 8, "animationDelay": 8, "animationDirection": 8, "animationFillMode": 8, "animationDuration": 8, "animationIterationCount": 8, "animationName": 8, "animationPlayState": 8, "animationTimingFunction": 8, "appearance": 10, "userSelect": 10, "backdropFilter": 10, "fontKerning": 9, "scrollSnapType": 10, "scrollSnapPointsX": 10, "scrollSnapPointsY": 10, "scrollSnapDestination": 10, "scrollSnapCoordinate": 10, "textEmphasisPosition": 7, "textEmphasis": 7, "textEmphasisStyle": 7, "textEmphasisColor": 7, "boxDecorationBreak": 10, "clipPath": 10, "maskImage": 10, "maskMode": 10, "maskRepeat": 10, "maskPosition": 10, "maskClip": 10, "maskOrigin": 10, "maskSize": 10, "maskComposite": 10, "mask": 10, "maskBorderSource": 10, "maskBorderMode": 10, "maskBorderSlice": 10, "maskBorderWidth": 10, "maskBorderOutset": 10, "maskBorderRepeat": 10, "maskBorder": 10, "maskType": 10, "textDecorationStyle": 10, "textDecorationSkip": 10, "textDecorationLine": 10, "textDecorationColor": 10, "shapeImageThreshold": 10, "shapeImageMargin": 10, "shapeImageOutside": 10, "filter": 9, "hyphens": 10, "flowInto": 10, "flowFrom": 10, "breakBefore": 8, "breakAfter": 8, "breakInside": 8, "regionFragment": 10, "columnCount": 8, "columnFill": 8, "columnGap": 8, "columnRule": 8, "columnRuleColor": 8, "columnRuleStyle": 8, "columnRuleWidth": 8, "columns": 8, "columnSpan": 8, "columnWidth": 8 }, "firefox": { "appearance": 51, "userSelect": 51, "boxSizing": 28, "textAlignLast": 48, "textDecorationStyle": 35, "textDecorationSkip": 35, "textDecorationLine": 35, "textDecorationColor": 35, "tabSize": 51, "hyphens": 42, "fontFeatureSettings": 33, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "opera": { "flex": 16, "flexBasis": 16, "flexDirection": 16, "flexGrow": 16, "flexFlow": 16, "flexShrink": 16, "flexWrap": 16, "alignContent": 16, "alignItems": 16, "alignSelf": 16, "justifyContent": 16, "order": 16, "transform": 22, "transformOrigin": 22, "transformOriginX": 22, "transformOriginY": 22, "backfaceVisibility": 22, "perspective": 22, "perspectiveOrigin": 22, "transformStyle": 22, "transformOriginZ": 22, "animation": 29, "animationDelay": 29, "animationDirection": 29, "animationFillMode": 29, "animationDuration": 29, "animationIterationCount": 29, "animationName": 29, "animationPlayState": 29, "animationTimingFunction": 29, "appearance": 41, "userSelect": 41, "fontKerning": 19, "textEmphasisPosition": 41, "textEmphasis": 41, "textEmphasisStyle": 41, "textEmphasisColor": 41, "boxDecorationBreak": 41, "clipPath": 41, "maskImage": 41, "maskMode": 41, "maskRepeat": 41, "maskPosition": 41, "maskClip": 41, "maskOrigin": 41, "maskSize": 41, "maskComposite": 41, "mask": 41, "maskBorderSource": 41, "maskBorderMode": 41, "maskBorderSlice": 41, "maskBorderWidth": 41, "maskBorderOutset": 41, "maskBorderRepeat": 41, "maskBorder": 41, "maskType": 41, "textDecorationStyle": 41, "textDecorationSkip": 41, "textDecorationLine": 41, "textDecorationColor": 41, "filter": 39, "fontFeatureSettings": 34, "breakAfter": 36, "breakBefore": 36, "breakInside": 36, "columnCount": 36, "columnFill": 36, "columnGap": 36, "columnRule": 36, "columnRuleColor": 36, "columnRuleStyle": 36, "columnRuleWidth": 36, "columns": 36, "columnSpan": 36, "columnWidth": 36 }, "ie": { "flex": 10, "flexDirection": 10, "flexFlow": 10, "flexWrap": 10, "transform": 9, "transformOrigin": 9, "transformOriginX": 9, "transformOriginY": 9, "userSelect": 11, "wrapFlow": 11, "wrapThrough": 11, "wrapMargin": 11, "scrollSnapType": 11, "scrollSnapPointsX": 11, "scrollSnapPointsY": 11, "scrollSnapDestination": 11, "scrollSnapCoordinate": 11, "touchAction": 10, "hyphens": 11, "flowInto": 11, "flowFrom": 11, "breakBefore": 11, "breakAfter": 11, "breakInside": 11, "regionFragment": 11, "gridTemplateColumns": 11, "gridTemplateRows": 11, "gridTemplateAreas": 11, "gridTemplate": 11, "gridAutoColumns": 11, "gridAutoRows": 11, "gridAutoFlow": 11, "grid": 11, "gridRowStart": 11, "gridColumnStart": 11, "gridRowEnd": 11, "gridRow": 11, "gridColumn": 11, "gridColumnEnd": 11, "gridColumnGap": 11, "gridRowGap": 11, "gridArea": 11, "gridGap": 11, "textSizeAdjust": 11 }, "edge": { "userSelect": 14, "wrapFlow": 14, "wrapThrough": 14, "wrapMargin": 14, "scrollSnapType": 14, "scrollSnapPointsX": 14, "scrollSnapPointsY": 14, "scrollSnapDestination": 14, "scrollSnapCoordinate": 14, "hyphens": 14, "flowInto": 14, "flowFrom": 14, "breakBefore": 14, "breakAfter": 14, "breakInside": 14, "regionFragment": 14, "gridTemplateColumns": 14, "gridTemplateRows": 14, "gridTemplateAreas": 14, "gridTemplate": 14, "gridAutoColumns": 14, "gridAutoRows": 14, "gridAutoFlow": 14, "grid": 14, "gridRowStart": 14, "gridColumnStart": 14, "gridRowEnd": 14, "gridRow": 14, "gridColumn": 14, "gridColumnEnd": 14, "gridColumnGap": 14, "gridRowGap": 14, "gridArea": 14, "gridGap": 14 }, "ios_saf": { "flex": 8.1, "flexBasis": 8.1, "flexDirection": 8.1, "flexGrow": 8.1, "flexFlow": 8.1, "flexShrink": 8.1, "flexWrap": 8.1, "alignContent": 8.1, "alignItems": 8.1, "alignSelf": 8.1, "justifyContent": 8.1, "order": 8.1, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8.1, "transformOrigin": 8.1, "transformOriginX": 8.1, "transformOriginY": 8.1, "backfaceVisibility": 8.1, "perspective": 8.1, "perspectiveOrigin": 8.1, "transformStyle": 8.1, "transformOriginZ": 8.1, "animation": 8.1, "animationDelay": 8.1, "animationDirection": 8.1, "animationFillMode": 8.1, "animationDuration": 8.1, "animationIterationCount": 8.1, "animationName": 8.1, "animationPlayState": 8.1, "animationTimingFunction": 8.1, "appearance": 9.3, "userSelect": 9.3, "backdropFilter": 9.3, "fontKerning": 9.3, "scrollSnapType": 9.3, "scrollSnapPointsX": 9.3, "scrollSnapPointsY": 9.3, "scrollSnapDestination": 9.3, "scrollSnapCoordinate": 9.3, "boxDecorationBreak": 9.3, "clipPath": 9.3, "maskImage": 9.3, "maskMode": 9.3, "maskRepeat": 9.3, "maskPosition": 9.3, "maskClip": 9.3, "maskOrigin": 9.3, "maskSize": 9.3, "maskComposite": 9.3, "mask": 9.3, "maskBorderSource": 9.3, "maskBorderMode": 9.3, "maskBorderSlice": 9.3, "maskBorderWidth": 9.3, "maskBorderOutset": 9.3, "maskBorderRepeat": 9.3, "maskBorder": 9.3, "maskType": 9.3, "textSizeAdjust": 9.3, "textDecorationStyle": 9.3, "textDecorationSkip": 9.3, "textDecorationLine": 9.3, "textDecorationColor": 9.3, "shapeImageThreshold": 9.3, "shapeImageMargin": 9.3, "shapeImageOutside": 9.3, "filter": 9, "hyphens": 9.3, "flowInto": 9.3, "flowFrom": 9.3, "breakBefore": 8.1, "breakAfter": 8.1, "breakInside": 8.1, "regionFragment": 9.3, "columnCount": 8.1, "columnFill": 8.1, "columnGap": 8.1, "columnRule": 8.1, "columnRuleColor": 8.1, "columnRuleStyle": 8.1, "columnRuleWidth": 8.1, "columns": 8.1, "columnSpan": 8.1, "columnWidth": 8.1 }, "android": { "flex": 4.2, "flexBasis": 4.2, "flexDirection": 4.2, "flexGrow": 4.2, "flexFlow": 4.2, "flexShrink": 4.2, "flexWrap": 4.2, "alignContent": 4.2, "alignItems": 4.2, "alignSelf": 4.2, "justifyContent": 4.2, "order": 4.2, "transition": 4.2, "transitionDelay": 4.2, "transitionDuration": 4.2, "transitionProperty": 4.2, "transitionTimingFunction": 4.2, "transform": 4.4, "transformOrigin": 4.4, "transformOriginX": 4.4, "transformOriginY": 4.4, "backfaceVisibility": 4.4, "perspective": 4.4, "perspectiveOrigin": 4.4, "transformStyle": 4.4, "transformOriginZ": 4.4, "animation": 4.4, "animationDelay": 4.4, "animationDirection": 4.4, "animationFillMode": 4.4, "animationDuration": 4.4, "animationIterationCount": 4.4, "animationName": 4.4, "animationPlayState": 4.4, "animationTimingFunction": 4.4, "appearance": 51, "userSelect": 51, "fontKerning": 4.4, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "filter": 51, "fontFeatureSettings": 4.4, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "and_chr": { "appearance": 51, "userSelect": 51, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "textDecorationStyle": 51, "textDecorationSkip": 51, "textDecorationLine": 51, "textDecorationColor": 51, "filter": 51 }, "and_uc": { "flex": 9.9, "flexBasis": 9.9, "flexDirection": 9.9, "flexGrow": 9.9, "flexFlow": 9.9, "flexShrink": 9.9, "flexWrap": 9.9, "alignContent": 9.9, "alignItems": 9.9, "alignSelf": 9.9, "justifyContent": 9.9, "order": 9.9, "transition": 9.9, "transitionDelay": 9.9, "transitionDuration": 9.9, "transitionProperty": 9.9, "transitionTimingFunction": 9.9, "transform": 9.9, "transformOrigin": 9.9, "transformOriginX": 9.9, "transformOriginY": 9.9, "backfaceVisibility": 9.9, "perspective": 9.9, "perspectiveOrigin": 9.9, "transformStyle": 9.9, "transformOriginZ": 9.9, "animation": 9.9, "animationDelay": 9.9, "animationDirection": 9.9, "animationFillMode": 9.9, "animationDuration": 9.9, "animationIterationCount": 9.9, "animationName": 9.9, "animationPlayState": 9.9, "animationTimingFunction": 9.9, "appearance": 9.9, "userSelect": 9.9, "fontKerning": 9.9, "textEmphasisPosition": 9.9, "textEmphasis": 9.9, "textEmphasisStyle": 9.9, "textEmphasisColor": 9.9, "maskImage": 9.9, "maskMode": 9.9, "maskRepeat": 9.9, "maskPosition": 9.9, "maskClip": 9.9, "maskOrigin": 9.9, "maskSize": 9.9, "maskComposite": 9.9, "mask": 9.9, "maskBorderSource": 9.9, "maskBorderMode": 9.9, "maskBorderSlice": 9.9, "maskBorderWidth": 9.9, "maskBorderOutset": 9.9, "maskBorderRepeat": 9.9, "maskBorder": 9.9, "maskType": 9.9, "textSizeAdjust": 9.9, "filter": 9.9, "hyphens": 9.9, "flowInto": 9.9, "flowFrom": 9.9, "breakBefore": 9.9, "breakAfter": 9.9, "breakInside": 9.9, "regionFragment": 9.9, "fontFeatureSettings": 9.9, "columnCount": 9.9, "columnFill": 9.9, "columnGap": 9.9, "columnRule": 9.9, "columnRuleColor": 9.9, "columnRuleStyle": 9.9, "columnRuleWidth": 9.9, "columns": 9.9, "columnSpan": 9.9, "columnWidth": 9.9 }, "op_mini": {} }; +module.exports = exports["default"]; + +/***/ }), +/* 711 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = position; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function position(_ref) { + var property = _ref.property; + var value = _ref.value; + var browser = _ref.browserInfo.browser; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'position' && value === 'sticky' && (browser === 'safari' || browser === 'ios_saf')) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 712 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = calc; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function calc(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (typeof value === 'string' && value.indexOf('calc(') > -1 && (browser === 'firefox' && version < 15 || browser === 'chrome' && version < 25 || browser === 'safari' && version < 6.1 || browser === 'ios_saf' && version < 7)) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(value.replace(/calc\(/g, css + 'calc('), value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 713 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = zoomCursor; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { 'zoom-in': true, 'zoom-out': true }; + +function zoomCursor(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'cursor' && values[value] && (browser === 'firefox' && version < 24 || browser === 'chrome' && version < 37 || browser === 'safari' && version < 9 || browser === 'opera' && version < 24)) { + return { + cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 714 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = grabCursor; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { grab: true, grabbing: true }; + +function grabCursor(_ref) { + var property = _ref.property; + var value = _ref.value; + var browser = _ref.browserInfo.browser; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + // adds prefixes for firefox, chrome, safari, and opera regardless of version until a reliable brwoser support info can be found (see: https://github.com/rofrischmann/inline-style-prefixer/issues/79) + if (property === 'cursor' && values[value] && (browser === 'firefox' || browser === 'chrome' || browser === 'safari' || browser === 'opera')) { + return { + cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 715 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flex; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { flex: true, 'inline-flex': true }; + +function flex(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'display' && values[value] && (browser === 'chrome' && version < 29 && version > 20 || (browser === 'safari' || browser === 'ios_saf') && version < 9 && version > 6 || browser === 'opera' && (version == 15 || version == 16))) { + return { + display: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 716 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sizing; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { + maxHeight: true, + maxWidth: true, + width: true, + height: true, + columnWidth: true, + minWidth: true, + minHeight: true +}; +var values = { + 'min-content': true, + 'max-content': true, + 'fill-available': true, + 'fit-content': true, + 'contain-floats': true +}; + +function sizing(_ref) { + var property = _ref.property; + var value = _ref.value; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + // This might change in the future + // Keep an eye on it + if (properties[property] && values[value]) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 717 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gradient; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; + +function gradient(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (typeof value === 'string' && value.match(values) !== null && (browser === 'firefox' && version < 16 || browser === 'chrome' && version < 26 || (browser === 'safari' || browser === 'ios_saf') && version < 7 || (browser === 'opera' || browser === 'op_mini') && version < 12.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 718 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + +exports.default = transition; + +var _hyphenateStyleName = __webpack_require__(310); + +var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); + +var _unprefixProperty = __webpack_require__(719); + +var _unprefixProperty2 = _interopRequireDefault(_unprefixProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { transition: true, transitionProperty: true }; + +function transition(_ref) { + var property = _ref.property; + var value = _ref.value; + var css = _ref.prefix.css; + var requiresPrefix = _ref.requiresPrefix; + var keepUnprefixed = _ref.keepUnprefixed; + + // also check for already prefixed transitions + var unprefixedProperty = (0, _unprefixProperty2.default)(property); + + if (typeof value === 'string' && properties[unprefixedProperty]) { + var _ret = function () { + // TODO: memoize this array + var requiresPrefixDashCased = Object.keys(requiresPrefix).map(function (prop) { + return (0, _hyphenateStyleName2.default)(prop); + }); + + // only split multi values, not cubic beziers + var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); + + requiresPrefixDashCased.forEach(function (prop) { + multipleValues.forEach(function (val, index) { + if (val.indexOf(prop) > -1 && prop !== 'order') { + multipleValues[index] = val.replace(prop, css + prop) + (keepUnprefixed ? ',' + val : ''); + } + }); + }); + + return { + v: _defineProperty({}, property, multipleValues.join(',')) + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } +} +module.exports = exports['default']; + +/***/ }), +/* 719 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (property) { + var unprefixed = property.replace(/^(ms|Webkit|Moz|O)/, ''); + return unprefixed.charAt(0).toLowerCase() + unprefixed.slice(1); +}; + +module.exports = exports['default']; + +/***/ }), +/* 720 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxIE; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'distribute', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + flex: 'flexbox', + 'inline-flex': 'inline-flexbox' +}; +var alternativeProps = { + alignContent: 'msFlexLinePack', + alignSelf: 'msFlexItemAlign', + alignItems: 'msFlexAlign', + justifyContent: 'msFlexPack', + order: 'msFlexOrder', + flexGrow: 'msFlexPositive', + flexShrink: 'msFlexNegative', + flexBasis: 'msPreferredSize' +}; + +function flexboxIE(_ref) { + var property = _ref.property; + var value = _ref.value; + var styles = _ref.styles; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if ((alternativeProps[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'ie_mob' || browser === 'ie') && version == 10) { + if (!keepUnprefixed && !Array.isArray(styles[property])) { + delete styles[property]; + } + if (property === 'display' && alternativeValues[value]) { + return { + display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } + } +} +module.exports = exports['default']; + +/***/ }), +/* 721 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxOld; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'justify', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + 'wrap-reverse': 'multiple', + wrap: 'multiple', + flex: 'box', + 'inline-flex': 'inline-box' +}; + +var alternativeProps = { + alignItems: 'WebkitBoxAlign', + justifyContent: 'WebkitBoxPack', + flexWrap: 'WebkitBoxLines' +}; + +var otherProps = ['alignContent', 'alignSelf', 'order', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection']; +var properties = Object.keys(alternativeProps).concat(otherProps); + +function flexboxOld(_ref) { + var property = _ref.property; + var value = _ref.value; + var styles = _ref.styles; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'firefox' && version < 22 || browser === 'chrome' && version < 21 || (browser === 'safari' || browser === 'ios_saf') && version <= 6.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { + if (!keepUnprefixed && !Array.isArray(styles[property])) { + delete styles[property]; + } + if (property === 'flexDirection' && typeof value === 'string') { + return { + WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', + WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' + }; + } + if (property === 'display' && alternativeValues[value]) { + return { + display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } + } +} +module.exports = exports['default']; + +/***/ }), +/* 722 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = callOnce; + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CALLED_ONCE = 'muiPrepared'; + +function callOnce() { + if (false) { + return function (style) { + if (style[CALLED_ONCE]) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: You cannot call prepareStyles() on the same style object more than once.') : void 0; + } + style[CALLED_ONCE] = true; + return style; + }; + } +} + +/***/ }), +/* 723 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(79); + +var _keys2 = _interopRequireDefault(_keys); + +exports.default = rtl; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var reTranslate = /((^|\s)translate(3d|X)?\()(\-?[\d]+)/; +var reSkew = /((^|\s)skew(x|y)?\()\s*(\-?[\d]+)(deg|rad|grad)(,\s*(\-?[\d]+)(deg|rad|grad))?/; + +/** + * This function ensures that `style` supports both ltr and rtl directions by + * checking `styleConstants` in `muiTheme` and replacing attribute keys if + * necessary. + */ +function rtl(muiTheme) { + if (muiTheme.isRtl) { + return function (style) { + if (style.directionInvariant === true) { + return style; + } + + var flippedAttributes = { + // Keys and their replacements. + right: 'left', + left: 'right', + marginRight: 'marginLeft', + marginLeft: 'marginRight', + paddingRight: 'paddingLeft', + paddingLeft: 'paddingRight', + borderRight: 'borderLeft', + borderLeft: 'borderRight' + }; + + var newStyle = {}; + + (0, _keys2.default)(style).forEach(function (attribute) { + var value = style[attribute]; + var key = attribute; + + if (flippedAttributes.hasOwnProperty(attribute)) { + key = flippedAttributes[attribute]; + } + + switch (attribute) { + case 'float': + case 'textAlign': + if (value === 'right') { + value = 'left'; + } else if (value === 'left') { + value = 'right'; + } + break; + + case 'direction': + if (value === 'ltr') { + value = 'rtl'; + } else if (value === 'rtl') { + value = 'ltr'; + } + break; + + case 'transform': + if (!value) break; + var matches = void 0; + if (matches = value.match(reTranslate)) { + value = value.replace(matches[0], matches[1] + -parseFloat(matches[4])); + } + if (matches = value.match(reSkew)) { + value = value.replace(matches[0], matches[1] + -parseFloat(matches[4]) + matches[5] + matches[6] ? ', ' + (-parseFloat(matches[7]) + matches[8]) : ''); + } + break; + + case 'transformOrigin': + if (!value) break; + if (value.indexOf('right') > -1) { + value = value.replace('right', 'left'); + } else if (value.indexOf('left') > -1) { + value = value.replace('left', 'right'); + } + break; + } + + newStyle[key] = value; + }); + + return newStyle; + }; + } +} + +/***/ }), +/* 724 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(725); +module.exports = __webpack_require__(18).Object.keys; + + +/***/ }), +/* 725 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(84); +var $keys = __webpack_require__(64); + +__webpack_require__(294)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), +/* 726 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = compose; +function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(undefined, arguments)); + }; + }); +} + +/***/ }), +/* 727 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = AppDrawer; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRouter = __webpack_require__(156); + +var _List = __webpack_require__(728); + +var _Drawer = __webpack_require__(750); + +var _Drawer2 = _interopRequireDefault(_Drawer); + +var _Subheader = __webpack_require__(312); + +var _Subheader2 = _interopRequireDefault(_Subheader); + +var _code = __webpack_require__(756); + +var _code2 = _interopRequireDefault(_code); + +var _shop = __webpack_require__(757); + +var _shop2 = _interopRequireDefault(_shop); + +var _Styles = __webpack_require__(80); + +var _Styles2 = _interopRequireDefault(_Styles); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SelectableList = (0, _List.makeSelectable)(_List.List); + +function openUrlInNewTab(url) { + var win = window.open(url, '_blank'); + win.focus(); +} + +function AppDrawer(props) { + var location = props.location; + + var paths = location.pathname.split('/').filter(function (x) { + return !!x; + }); + var currentPage = paths[0]; + return _react2.default.createElement( + _Drawer2.default, + { open: true }, + _react2.default.createElement( + 'div', + { style: _Styles2.default.logo }, + 'Supreme Auto Checkout' + ), + _react2.default.createElement( + SelectableList, + { value: currentPage }, + _react2.default.createElement( + _Subheader2.default, + null, + 'Shops' + ), + _react2.default.createElement(_List.ListItem, { + value: 'supreme', + primaryText: 'Supreme', + containerElement: _react2.default.createElement(_reactRouter.Link, { to: '/supreme/' }), + leftIcon: _react2.default.createElement(_shop2.default, null) + }), + _react2.default.createElement( + _Subheader2.default, + null, + 'Other' + ), + _react2.default.createElement(_List.ListItem, { + value: 'about', + primaryText: 'Github', + onTouchTap: function onTouchTap() { + return openUrlInNewTab('https://github.com/val92130/Supreme-Auto-Checkout'); + }, + leftIcon: _react2.default.createElement(_code2.default, null) + }) + ) + ); +} + +AppDrawer.propTypes = { + location: _react.PropTypes.shape({ + pathname: _react.PropTypes.string.isRequired + }) +}; + +/***/ }), +/* 728 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.makeSelectable = exports.ListItem = exports.List = undefined; + +var _List2 = __webpack_require__(195); + +var _List3 = _interopRequireDefault(_List2); + +var _ListItem2 = __webpack_require__(313); + +var _ListItem3 = _interopRequireDefault(_ListItem2); + +var _makeSelectable2 = __webpack_require__(749); + +var _makeSelectable3 = _interopRequireDefault(_makeSelectable2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.List = _List3.default; +exports.ListItem = _ListItem3.default; +exports.makeSelectable = _makeSelectable3.default; +exports.default = _List3.default; + +/***/ }), +/* 729 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Subheader = function Subheader(props, context) { + var children = props.children, + inset = props.inset, + style = props.style, + other = (0, _objectWithoutProperties3.default)(props, ['children', 'inset', 'style']); + var _context$muiTheme = context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + subheader = _context$muiTheme.subheader; + + + var styles = { + root: { + boxSizing: 'border-box', + color: subheader.color, + fontSize: 14, + fontWeight: subheader.fontWeight, + lineHeight: '48px', + paddingLeft: inset ? 72 : 16, + width: '100%' + } + }; + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + children + ); +}; + +Subheader.muiName = 'Subheader'; + + false ? Subheader.propTypes = { + /** + * Node that will be placed inside the `Subheader`. + */ + children: _react.PropTypes.node, + /** + * If true, the `Subheader` will be indented. + */ + inset: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +Subheader.defaultProps = { + inset: false +}; + +Subheader.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +exports.default = Subheader; + +/***/ }), +/* 730 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +var React = __webpack_require__(0); + +var REACT_ELEMENT_TYPE = + (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || + 0xeac7; + +var emptyFunction = __webpack_require__(24); +var invariant = __webpack_require__(9); +var warning = __webpack_require__(12); + +var SEPARATOR = '.'; +var SUBSEPARATOR = ':'; + +var didWarnAboutMaps = false; + +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + +function getIteratorFn(maybeIterable) { + var iteratorFn = + maybeIterable && + ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || + maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } +} + +function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2' + }; + var escapedString = ('' + key).replace(escapeRegex, function(match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; +} + +function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); +} + +function traverseAllChildrenImpl( + children, + nameSoFar, + callback, + traverseContext +) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if ( + children === null || + type === 'string' || + type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + (type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) + ) { + callback( + traverseContext, + children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar + ); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + callback, + traverseContext + ); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + if (false) { + // Warn about using Maps as children + if (iteratorFn === children.entries) { + warning( + didWarnAboutMaps, + 'Using Maps as children is unsupported and will likely yield ' + + 'unexpected results. Convert it to a sequence/iterable of keyed ' + + 'ReactElements instead.' + ); + didWarnAboutMaps = true; + } + } + + var iterator = iteratorFn.call(children); + var step; + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + callback, + traverseContext + ); + } + } else if (type === 'object') { + var addendum = ''; + if (false) { + addendum = + ' If you meant to render a collection of children, use an array ' + + 'instead or wrap the object using createFragment(object) from the ' + + 'React add-ons.'; + } + var childrenString = '' + children; + invariant( + false, + 'Objects are not valid as a React child (found: %s).%s', + childrenString === '[object Object]' + ? 'object with keys {' + Object.keys(children).join(', ') + '}' + : childrenString, + addendum + ); + } + } + + return subtreeCount; +} + +function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); +} + +var userProvidedKeyEscapeRegex = /\/+/g; +function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); +} + +function cloneAndReplaceKey(oldElement, newKey) { + return React.cloneElement( + oldElement, + {key: newKey}, + oldElement.props !== undefined ? oldElement.props.children : undefined + ); +} + +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; + +var oneArgumentPooler = function(copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; + +var addPoolingTo = function addPoolingTo(CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; +}; + +var standardReleaser = function standardReleaser(instance) { + var Klass = this; + invariant( + instance instanceof Klass, + 'Trying to release an instance into a pool of a different type.' + ); + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } +}; + +var fourArgumentPooler = function fourArgumentPooler(a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } +}; + +function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { + this.result = mapResult; + this.keyPrefix = keyPrefix; + this.func = mapFunction; + this.context = mapContext; + this.count = 0; +} +MapBookKeeping.prototype.destructor = function() { + this.result = null; + this.keyPrefix = null; + this.func = null; + this.context = null; + this.count = 0; +}; +addPoolingTo(MapBookKeeping, fourArgumentPooler); + +function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result; + var keyPrefix = bookKeeping.keyPrefix; + var func = bookKeeping.func; + var context = bookKeeping.context; + + var mappedChild = func.call(context, child, bookKeeping.count++); + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal( + mappedChild, + result, + childKey, + emptyFunction.thatReturnsArgument + ); + } else if (mappedChild != null) { + if (React.isValidElement(mappedChild)) { + mappedChild = cloneAndReplaceKey( + mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + + (mappedChild.key && (!child || child.key !== mappedChild.key) + ? escapeUserProvidedKey(mappedChild.key) + '/' + : '') + + childKey + ); + } + result.push(mappedChild); + } +} + +function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + var traverseContext = MapBookKeeping.getPooled( + array, + escapedPrefix, + func, + context + ); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + MapBookKeeping.release(traverseContext); +} + +var numericPropertyRegex = /^\d+$/; + +var warnedAboutNumeric = false; + +function createReactFragment(object) { + if (typeof object !== 'object' || !object || Array.isArray(object)) { + warning( + false, + 'React.addons.createFragment only accepts a single object. Got: %s', + object + ); + return object; + } + if (React.isValidElement(object)) { + warning( + false, + 'React.addons.createFragment does not accept a ReactElement ' + + 'without a wrapper object.' + ); + return object; + } + + invariant( + object.nodeType !== 1, + 'React.addons.createFragment(...): Encountered an invalid child; DOM ' + + 'elements are not valid children of React components.' + ); + + var result = []; + + for (var key in object) { + if (false) { + if (!warnedAboutNumeric && numericPropertyRegex.test(key)) { + warning( + false, + 'React.addons.createFragment(...): Child objects should have ' + + 'non-numeric keys so ordering is preserved.' + ); + warnedAboutNumeric = true; + } + } + mapIntoWithKeyPrefixInternal( + object[key], + result, + key, + emptyFunction.thatReturnsArgument + ); + } + + return result; +} + +module.exports = createReactFragment; + + +/***/ }), +/* 731 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactAddonsTransitionGroup = __webpack_require__(128); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +var _ScaleInChild = __webpack_require__(735); + +var _ScaleInChild2 = _interopRequireDefault(_ScaleInChild); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ScaleIn = function (_Component) { + (0, _inherits3.default)(ScaleIn, _Component); + + function ScaleIn() { + (0, _classCallCheck3.default)(this, ScaleIn); + return (0, _possibleConstructorReturn3.default)(this, (ScaleIn.__proto__ || (0, _getPrototypeOf2.default)(ScaleIn)).apply(this, arguments)); + } + + (0, _createClass3.default)(ScaleIn, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + childStyle = _props.childStyle, + enterDelay = _props.enterDelay, + maxScale = _props.maxScale, + minScale = _props.minScale, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'childStyle', 'enterDelay', 'maxScale', 'minScale', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'relative', + overflow: 'hidden', + height: '100%' + }, style); + + var newChildren = _react2.default.Children.map(children, function (child) { + return _react2.default.createElement( + _ScaleInChild2.default, + { + key: child.key, + enterDelay: enterDelay, + maxScale: maxScale, + minScale: minScale, + style: childStyle + }, + child + ); + }); + + return _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + (0, _extends3.default)({}, other, { + style: prepareStyles(mergedRootStyles), + component: 'div' + }), + newChildren + ); + } + }]); + return ScaleIn; +}(_react.Component); + +ScaleIn.defaultProps = { + enterDelay: 0 +}; +ScaleIn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ScaleIn.propTypes = { + childStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + enterDelay: _react.PropTypes.number, + maxScale: _react.PropTypes.number, + minScale: _react.PropTypes.number, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = ScaleIn; + +/***/ }), +/* 732 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _chainFunction = __webpack_require__(733); + +var _chainFunction2 = _interopRequireDefault(_chainFunction); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(14); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +var _ChildMapping = __webpack_require__(734); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var propTypes = { + component: _propTypes2.default.any, + childFactory: _propTypes2.default.func, + children: _propTypes2.default.node +}; + +var defaultProps = { + component: 'span', + childFactory: function childFactory(child) { + return child; + } +}; + +var TransitionGroup = function (_React$Component) { + _inherits(TransitionGroup, _React$Component); + + function TransitionGroup(props, context) { + _classCallCheck(this, TransitionGroup); + + var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); + + _this.performAppear = function (key, component) { + _this.currentlyTransitioningKeys[key] = true; + + if (component.componentWillAppear) { + component.componentWillAppear(_this._handleDoneAppearing.bind(_this, key, component)); + } else { + _this._handleDoneAppearing(key, component); + } + }; + + _this._handleDoneAppearing = function (key, component) { + if (component.componentDidAppear) { + component.componentDidAppear(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = (0, _ChildMapping.getChildMapping)(_this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully appeared. Remove it. + _this.performLeave(key, component); + } + }; + + _this.performEnter = function (key, component) { + _this.currentlyTransitioningKeys[key] = true; + + if (component.componentWillEnter) { + component.componentWillEnter(_this._handleDoneEntering.bind(_this, key, component)); + } else { + _this._handleDoneEntering(key, component); + } + }; + + _this._handleDoneEntering = function (key, component) { + if (component.componentDidEnter) { + component.componentDidEnter(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = (0, _ChildMapping.getChildMapping)(_this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully entered. Remove it. + _this.performLeave(key, component); + } + }; + + _this.performLeave = function (key, component) { + _this.currentlyTransitioningKeys[key] = true; + + if (component.componentWillLeave) { + component.componentWillLeave(_this._handleDoneLeaving.bind(_this, key, component)); + } else { + // Note that this is somewhat dangerous b/c it calls setState() + // again, effectively mutating the component before all the work + // is done. + _this._handleDoneLeaving(key, component); + } + }; + + _this._handleDoneLeaving = function (key, component) { + if (component.componentDidLeave) { + component.componentDidLeave(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = (0, _ChildMapping.getChildMapping)(_this.props.children); + + if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) { + // This entered again before it fully left. Add it again. + _this.keysToEnter.push(key); + } else { + _this.setState(function (state) { + var newChildren = _extends({}, state.children); + delete newChildren[key]; + return { children: newChildren }; + }); + } + }; + + _this.childRefs = Object.create(null); + + _this.state = { + children: (0, _ChildMapping.getChildMapping)(props.children) + }; + return _this; + } + + TransitionGroup.prototype.componentWillMount = function componentWillMount() { + this.currentlyTransitioningKeys = {}; + this.keysToEnter = []; + this.keysToLeave = []; + }; + + TransitionGroup.prototype.componentDidMount = function componentDidMount() { + var initialChildMapping = this.state.children; + for (var key in initialChildMapping) { + if (initialChildMapping[key]) { + this.performAppear(key, this.childRefs[key]); + } + } + }; + + TransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + var nextChildMapping = (0, _ChildMapping.getChildMapping)(nextProps.children); + var prevChildMapping = this.state.children; + + this.setState({ + children: (0, _ChildMapping.mergeChildMappings)(prevChildMapping, nextChildMapping) + }); + + for (var key in nextChildMapping) { + var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); + if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) { + this.keysToEnter.push(key); + } + } + + for (var _key in prevChildMapping) { + var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(_key); + if (prevChildMapping[_key] && !hasNext && !this.currentlyTransitioningKeys[_key]) { + this.keysToLeave.push(_key); + } + } + + // If we want to someday check for reordering, we could do it here. + }; + + TransitionGroup.prototype.componentDidUpdate = function componentDidUpdate() { + var _this2 = this; + + var keysToEnter = this.keysToEnter; + this.keysToEnter = []; + keysToEnter.forEach(function (key) { + return _this2.performEnter(key, _this2.childRefs[key]); + }); + + var keysToLeave = this.keysToLeave; + this.keysToLeave = []; + keysToLeave.forEach(function (key) { + return _this2.performLeave(key, _this2.childRefs[key]); + }); + }; + + TransitionGroup.prototype.render = function render() { + var _this3 = this; + + // TODO: we could get rid of the need for the wrapper node + // by cloning a single child + var childrenToRender = []; + + var _loop = function _loop(key) { + var child = _this3.state.children[key]; + if (child) { + var isCallbackRef = typeof child.ref !== 'string'; + var factoryChild = _this3.props.childFactory(child); + var ref = function ref(r) { + _this3.childRefs[key] = r; + }; + + false ? (0, _warning2.default)(isCallbackRef, 'string refs are not supported on children of TransitionGroup and will be ignored. ' + 'Please use a callback ref instead: https://facebook.github.io/react/docs/refs-and-the-dom.html#the-ref-callback-attribute') : void 0; + + // Always chaining the refs leads to problems when the childFactory + // wraps the child. The child ref callback gets called twice with the + // wrapper and the child. So we only need to chain the ref if the + // factoryChild is not different from child. + if (factoryChild === child && isCallbackRef) { + ref = (0, _chainFunction2.default)(child.ref, ref); + } + + // You may need to apply reactive updates to a child as it is leaving. + // The normal React way to do it won't work since the child will have + // already been removed. In case you need this behavior you can provide + // a childFactory function to wrap every child, even the ones that are + // leaving. + childrenToRender.push(_react2.default.cloneElement(factoryChild, { + key: key, + ref: ref + })); + } + }; + + for (var key in this.state.children) { + _loop(key); + } + + // Do not forward TransitionGroup props to primitive DOM nodes + var props = _extends({}, this.props); + delete props.transitionLeave; + delete props.transitionName; + delete props.transitionAppear; + delete props.transitionEnter; + delete props.childFactory; + delete props.transitionLeaveTimeout; + delete props.transitionEnterTimeout; + delete props.transitionAppearTimeout; + delete props.component; + + return _react2.default.createElement(this.props.component, props, childrenToRender); + }; + + return TransitionGroup; +}(_react2.default.Component); + +TransitionGroup.displayName = 'TransitionGroup'; + + +TransitionGroup.propTypes = false ? propTypes : {}; +TransitionGroup.defaultProps = defaultProps; + +exports.default = TransitionGroup; +module.exports = exports['default']; + +/***/ }), +/* 733 */ +/***/ (function(module, exports) { + + +module.exports = function chain(){ + var len = arguments.length + var args = []; + + for (var i = 0; i < len; i++) + args[i] = arguments[i] + + args = args.filter(function(fn){ return fn != null }) + + if (args.length === 0) return undefined + if (args.length === 1) return args[0] + + return args.reduce(function(current, next){ + return function chainedFunction() { + current.apply(this, arguments); + next.apply(this, arguments); + }; + }) +} + + +/***/ }), +/* 734 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.getChildMapping = getChildMapping; +exports.mergeChildMappings = mergeChildMappings; + +var _react = __webpack_require__(0); + +/** + * Given `this.props.children`, return an object mapping key to child. + * + * @param {*} children `this.props.children` + * @return {object} Mapping of key to child + */ +function getChildMapping(children) { + if (!children) { + return children; + } + var result = {}; + _react.Children.map(children, function (child) { + return child; + }).forEach(function (child) { + result[child.key] = child; + }); + return result; +} + +/** + * When you're adding or removing children some may be added or removed in the + * same render pass. We want to show *both* since we want to simultaneously + * animate elements in and out. This function takes a previous set of keys + * and a new set of keys and merges them with its best guess of the correct + * ordering. In the future we may expose some of the utilities in + * ReactMultiChild to make this easy, but for now React itself does not + * directly have this concept of the union of prevChildren and nextChildren + * so we implement it here. + * + * @param {object} prev prev children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @param {object} next next children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @return {object} a key set that contains all keys in `prev` and all keys + * in `next` in a reasonable order. + */ +function mergeChildMappings(prev, next) { + prev = prev || {}; + next = next || {}; + + function getValueForKey(key) { + if (next.hasOwnProperty(key)) { + return next[key]; + } + + return prev[key]; + } + + // For each key of `next`, the list of keys to insert before that key in + // the combined list + var nextKeysPending = {}; + + var pendingKeys = []; + for (var prevKey in prev) { + if (next.hasOwnProperty(prevKey)) { + if (pendingKeys.length) { + nextKeysPending[prevKey] = pendingKeys; + pendingKeys = []; + } + } else { + pendingKeys.push(prevKey); + } + } + + var i = void 0; + var childMapping = {}; + for (var nextKey in next) { + if (nextKeysPending.hasOwnProperty(nextKey)) { + for (i = 0; i < nextKeysPending[nextKey].length; i++) { + var pendingNextKey = nextKeysPending[nextKey][i]; + childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); + } + } + childMapping[nextKey] = getValueForKey(nextKey); + } + + // Finally, add the keys which didn't appear before any key in `next` + for (i = 0; i < pendingKeys.length; i++) { + childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + } + + return childMapping; +} + +/***/ }), +/* 735 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _autoPrefix = __webpack_require__(94); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ScaleInChild = function (_Component) { + (0, _inherits3.default)(ScaleInChild, _Component); + + function ScaleInChild() { + (0, _classCallCheck3.default)(this, ScaleInChild); + return (0, _possibleConstructorReturn3.default)(this, (ScaleInChild.__proto__ || (0, _getPrototypeOf2.default)(ScaleInChild)).apply(this, arguments)); + } + + (0, _createClass3.default)(ScaleInChild, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentDidAppear', + value: function componentDidAppear() { + this.animate(); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + this.animate(); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.minScale + ')'); + + this.leaveTimer = setTimeout(callback, 450); + } + }, { + key: 'animate', + value: function animate() { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '1'; + _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.maxScale + ')'); + } + }, { + key: 'initializeAnimation', + value: function initializeAnimation(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'scale(0)'); + + this.enterTimer = setTimeout(callback, this.props.enterDelay); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + enterDelay = _props.enterDelay, + maxScale = _props.maxScale, + minScale = _props.minScale, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'maxScale', 'minScale', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'absolute', + height: '100%', + width: '100%', + top: 0, + left: 0, + transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) + }, style); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }), + children + ); + } + }]); + return ScaleInChild; +}(_react.Component); + +ScaleInChild.defaultProps = { + enterDelay: 0, + maxScale: 1, + minScale: 0 +}; +ScaleInChild.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ScaleInChild.propTypes = { + children: _react.PropTypes.node, + enterDelay: _react.PropTypes.number, + maxScale: _react.PropTypes.number, + minScale: _react.PropTypes.number, + style: _react.PropTypes.object +} : void 0; +exports.default = ScaleInChild; + +/***/ }), +/* 736 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(58); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _autoPrefix = __webpack_require__(94); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CircleRipple = function (_Component) { + (0, _inherits3.default)(CircleRipple, _Component); + + function CircleRipple() { + (0, _classCallCheck3.default)(this, CircleRipple); + return (0, _possibleConstructorReturn3.default)(this, (CircleRipple.__proto__ || (0, _getPrototypeOf2.default)(CircleRipple)).apply(this, arguments)); + } + + (0, _createClass3.default)(CircleRipple, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + return !(0, _shallowEqual2.default)(this.props, nextProps); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentDidAppear', + value: function componentDidAppear() { + this.animate(); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + this.animate(); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = 0; + // If the animation is aborted, remove from the DOM immediately + var removeAfter = this.props.aborted ? 0 : 2000; + this.enterTimer = setTimeout(callback, removeAfter); + } + }, { + key: 'animate', + value: function animate() { + var style = _reactDom2.default.findDOMNode(this).style; + var transitionValue = _transitions2.default.easeOut('2s', 'opacity') + ', ' + _transitions2.default.easeOut('1s', 'transform'); + _autoPrefix2.default.set(style, 'transition', transitionValue); + _autoPrefix2.default.set(style, 'transform', 'scale(1)'); + } + }, { + key: 'initializeAnimation', + value: function initializeAnimation(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = this.props.opacity; + _autoPrefix2.default.set(style, 'transform', 'scale(0)'); + this.leaveTimer = setTimeout(callback, 0); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + aborted = _props.aborted, + color = _props.color, + opacity = _props.opacity, + style = _props.style, + touchGenerated = _props.touchGenerated, + other = (0, _objectWithoutProperties3.default)(_props, ['aborted', 'color', 'opacity', 'style', 'touchGenerated']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedStyles = (0, _simpleAssign2.default)({ + position: 'absolute', + top: 0, + left: 0, + height: '100%', + width: '100%', + borderRadius: '50%', + backgroundColor: color + }, style); + + return _react2.default.createElement('div', (0, _extends3.default)({}, other, { style: prepareStyles(mergedStyles) })); + } + }]); + return CircleRipple; +}(_react.Component); + +CircleRipple.defaultProps = { + opacity: 0.1, + aborted: false +}; +CircleRipple.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? CircleRipple.propTypes = { + aborted: _react.PropTypes.bool, + color: _react.PropTypes.string, + opacity: _react.PropTypes.number, + style: _react.PropTypes.object, + touchGenerated: _react.PropTypes.bool +} : void 0; +exports.default = CircleRipple; + +/***/ }), +/* 737 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _propTypes = __webpack_require__(41); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _EnhancedButton = __webpack_require__(59); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _FontIcon = __webpack_require__(317); + +var _FontIcon2 = _interopRequireDefault(_FontIcon); + +var _Tooltip = __webpack_require__(739); + +var _Tooltip2 = _interopRequireDefault(_Tooltip); + +var _childUtils = __webpack_require__(127); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var baseTheme = context.muiTheme.baseTheme; + + + return { + root: { + boxSizing: 'border-box', + overflow: 'visible', + transition: _transitions2.default.easeOut(), + padding: baseTheme.spacing.iconSize / 2, + width: baseTheme.spacing.iconSize * 2, + height: baseTheme.spacing.iconSize * 2, + fontSize: 0 + }, + tooltip: { + boxSizing: 'border-box' + }, + disabled: { + color: baseTheme.palette.disabledColor, + fill: baseTheme.palette.disabledColor, + cursor: 'not-allowed' + } + }; +} + +var IconButton = function (_Component) { + (0, _inherits3.default)(IconButton, _Component); + + function IconButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, IconButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = IconButton.__proto__ || (0, _getPrototypeOf2.default)(IconButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + // Not to be confonded with the touch property. + // This state is to determined if it's a mobile device. + touch: false, + tooltipShown: false + }, _this.handleBlur = function (event) { + _this.hideTooltip(); + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleFocus = function (event) { + _this.showTooltip(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleMouseLeave = function (event) { + if (!_this.button.isKeyboardFocused()) { + _this.hideTooltip(); + } + _this.setState({ hovered: false }); + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseOut = function (event) { + if (_this.props.disabled) _this.hideTooltip(); + if (_this.props.onMouseOut) _this.props.onMouseOut(event); + }, _this.handleMouseEnter = function (event) { + _this.showTooltip(); + + // Cancel hover styles for touch devices + if (!_this.state.touch) { + _this.setState({ hovered: true }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); + + if (_this.props.onTouchStart) { + _this.props.onTouchStart(event); + } + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + var _this$props = _this.props, + disabled = _this$props.disabled, + onFocus = _this$props.onFocus, + onBlur = _this$props.onBlur, + onKeyboardFocus = _this$props.onKeyboardFocus; + + if (isKeyboardFocused && !disabled) { + _this.showTooltip(); + if (onFocus) { + onFocus(event); + } + } else { + _this.hideTooltip(); + if (onBlur) { + onBlur(event); + } + } + + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + if (onKeyboardFocus) { + onKeyboardFocus(event, isKeyboardFocused); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(IconButton, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.disabled) { + this.setState({ hovered: false }); + } + } + }, { + key: 'setKeyboardFocus', + value: function setKeyboardFocus() { + this.button.setKeyboardFocus(); + } + }, { + key: 'showTooltip', + value: function showTooltip() { + if (this.props.tooltip) { + this.setState({ tooltipShown: true }); + } + } + }, { + key: 'hideTooltip', + value: function hideTooltip() { + if (this.props.tooltip) this.setState({ tooltipShown: false }); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + disabled = _props.disabled, + hoveredStyle = _props.hoveredStyle, + disableTouchRipple = _props.disableTouchRipple, + children = _props.children, + iconClassName = _props.iconClassName, + style = _props.style, + tooltip = _props.tooltip, + tooltipPositionProp = _props.tooltipPosition, + tooltipStyles = _props.tooltipStyles, + touch = _props.touch, + iconStyle = _props.iconStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['disabled', 'hoveredStyle', 'disableTouchRipple', 'children', 'iconClassName', 'style', 'tooltip', 'tooltipPosition', 'tooltipStyles', 'touch', 'iconStyle']); + + var fonticon = void 0; + + var styles = getStyles(this.props, this.context); + var tooltipPosition = tooltipPositionProp.split('-'); + + var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled; + + var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style, hovered ? hoveredStyle : {}); + + var tooltipElement = tooltip ? _react2.default.createElement(_Tooltip2.default, { + label: tooltip, + show: this.state.tooltipShown, + touch: touch, + style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyles), + verticalPosition: tooltipPosition[0], + horizontalPosition: tooltipPosition[1] + }) : null; + + if (iconClassName) { + var iconHoverColor = iconStyle.iconHoverColor, + iconStyleFontIcon = (0, _objectWithoutProperties3.default)(iconStyle, ['iconHoverColor']); + + + fonticon = _react2.default.createElement( + _FontIcon2.default, + { + className: iconClassName, + hoverColor: disabled ? null : iconHoverColor, + style: (0, _simpleAssign2.default)({}, disabled && styles.disabled, iconStyleFontIcon), + color: this.context.muiTheme.baseTheme.palette.textColor + }, + children + ); + } + + var childrenStyle = disabled ? (0, _simpleAssign2.default)({}, iconStyle, styles.disabled) : iconStyle; + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({ + ref: function ref(_ref2) { + return _this2.button = _ref2; + } + }, other, { + centerRipple: true, + disabled: disabled, + onTouchStart: this.handleTouchStart, + style: mergedRootStyles, + disableTouchRipple: disableTouchRipple, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onMouseOut: this.handleMouseOut, + onKeyboardFocus: this.handleKeyboardFocus + }), + tooltipElement, + fonticon, + (0, _childUtils.extendChildren)(children, { + style: childrenStyle + }) + ); + } + }]); + return IconButton; +}(_react.Component); + +IconButton.muiName = 'IconButton'; +IconButton.defaultProps = { + disabled: false, + disableTouchRipple: false, + iconStyle: {}, + tooltipPosition: 'bottom-center', + touch: false +}; +IconButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? IconButton.propTypes = { + /** + * Can be used to pass a `FontIcon` element as the icon for the button. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the element's ripple effect will be disabled. + */ + disableTouchRipple: _react.PropTypes.bool, + /** + * If true, the element will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element when the component is hovered. + */ + hoveredStyle: _react.PropTypes.object, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * The CSS class name of the icon. Used for setting the icon with a stylesheet. + */ + iconClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the icon element. + * Note: you can specify iconHoverColor as a String inside this object. + */ + iconStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Callback function fired when the element is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the element. + * @param {boolean} keyboardFocused Indicates whether the element is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onMouseOut: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The text to supply to the element's tooltip. + */ + tooltip: _react.PropTypes.node, + /** + * The vertical and horizontal positions, respectively, of the element's tooltip. + * Possible values are: "bottom-center", "top-center", "bottom-right", "top-right", + * "bottom-left", and "top-left". + */ + tooltipPosition: _propTypes2.default.cornersAndCenter, + /** + * Override the inline-styles of the tooltip element. + */ + tooltipStyles: _react.PropTypes.object, + /** + * If true, increase the tooltip element's size. Useful for increasing tooltip + * readability on mobile devices. + */ + touch: _react.PropTypes.bool +} : void 0; +exports.default = IconButton; + +/***/ }), +/* 738 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var color = props.color, + hoverColor = props.hoverColor; + var baseTheme = context.muiTheme.baseTheme; + + var offColor = color || baseTheme.palette.textColor; + var onColor = hoverColor || offColor; + + return { + root: { + color: state.hovered ? onColor : offColor, + position: 'relative', + fontSize: baseTheme.spacing.iconSize, + display: 'inline-block', + userSelect: 'none', + transition: _transitions2.default.easeOut() + } + }; +} + +var FontIcon = function (_Component) { + (0, _inherits3.default)(FontIcon, _Component); + + function FontIcon() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, FontIcon); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FontIcon.__proto__ || (0, _getPrototypeOf2.default)(FontIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.handleMouseLeave = function (event) { + // hover is needed only when a hoverColor is defined + if (_this.props.hoverColor !== undefined) { + _this.setState({ hovered: false }); + } + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseEnter = function (event) { + // hover is needed only when a hoverColor is defined + if (_this.props.hoverColor !== undefined) { + _this.setState({ hovered: true }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(FontIcon, [{ + key: 'render', + value: function render() { + var _props = this.props, + hoverColor = _props.hoverColor, + onMouseLeave = _props.onMouseLeave, + onMouseEnter = _props.onMouseEnter, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['hoverColor', 'onMouseLeave', 'onMouseEnter', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement('span', (0, _extends3.default)({}, other, { + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + })); + } + }]); + return FontIcon; +}(_react.Component); + +FontIcon.muiName = 'FontIcon'; +FontIcon.defaultProps = { + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {} +}; +FontIcon.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? FontIcon.propTypes = { + /** + * This is the font color of the font icon. If not specified, + * this component will default to muiTheme.palette.textColor. + */ + color: _react.PropTypes.string, + /** + * This is the icon color when the mouse hovers over the icon. + */ + hoverColor: _react.PropTypes.string, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = FontIcon; + +/***/ }), +/* 739 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var verticalPosition = props.verticalPosition; + var horizontalPosition = props.horizontalPosition; + var touchMarginOffset = props.touch ? 10 : 0; + var touchOffsetTop = props.touch ? -20 : -10; + var offset = verticalPosition === 'bottom' ? 14 + touchMarginOffset : -14 - touchMarginOffset; + + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + zIndex = _context$muiTheme.zIndex, + tooltip = _context$muiTheme.tooltip; + + + var styles = { + root: { + position: 'absolute', + fontFamily: baseTheme.fontFamily, + fontSize: '10px', + lineHeight: '22px', + padding: '0 8px', + zIndex: zIndex.tooltip, + color: tooltip.color, + overflow: 'hidden', + top: -10000, + borderRadius: 2, + userSelect: 'none', + opacity: 0, + right: horizontalPosition === 'left' ? 12 : null, + left: horizontalPosition === 'center' ? (state.offsetWidth - 48) / 2 * -1 : null, + transition: _transitions2.default.easeOut('0ms', 'top', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') + }, + label: { + position: 'relative', + whiteSpace: 'nowrap' + }, + ripple: { + position: 'absolute', + left: horizontalPosition === 'center' ? '50%' : horizontalPosition === 'left' ? '100%' : '0%', + top: verticalPosition === 'bottom' ? 0 : '100%', + transform: 'translate(-50%, -50%)', + borderRadius: '50%', + backgroundColor: 'transparent', + transition: _transitions2.default.easeOut('0ms', 'width', '450ms') + ', ' + _transitions2.default.easeOut('0ms', 'height', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') + }, + rootWhenShown: { + top: verticalPosition === 'top' ? touchOffsetTop : 36, + opacity: 0.9, + transform: 'translate(0px, ' + offset + 'px)', + transition: _transitions2.default.easeOut('0ms', 'top', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') + }, + rootWhenTouched: { + fontSize: '14px', + lineHeight: '32px', + padding: '0 16px' + }, + rippleWhenShown: { + backgroundColor: tooltip.rippleBackgroundColor, + transition: _transitions2.default.easeOut('450ms', 'width', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'height', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') + } + }; + + return styles; +} + +var Tooltip = function (_Component) { + (0, _inherits3.default)(Tooltip, _Component); + + function Tooltip() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Tooltip); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tooltip.__proto__ || (0, _getPrototypeOf2.default)(Tooltip)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + offsetWidth: null + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Tooltip, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setRippleSize(); + this.setTooltipPosition(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps() { + this.setTooltipPosition(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.setRippleSize(); + } + }, { + key: 'setRippleSize', + value: function setRippleSize() { + var ripple = this.refs.ripple; + var tooltip = this.refs.tooltip; + var tooltipWidth = parseInt(tooltip.offsetWidth, 10) / (this.props.horizontalPosition === 'center' ? 2 : 1); + var tooltipHeight = parseInt(tooltip.offsetHeight, 10); + + var rippleDiameter = Math.ceil(Math.sqrt(Math.pow(tooltipHeight, 2) + Math.pow(tooltipWidth, 2)) * 2); + if (this.props.show) { + ripple.style.height = rippleDiameter + 'px'; + ripple.style.width = rippleDiameter + 'px'; + } else { + ripple.style.width = '0px'; + ripple.style.height = '0px'; + } + } + }, { + key: 'setTooltipPosition', + value: function setTooltipPosition() { + this.setState({ offsetWidth: this.refs.tooltip.offsetWidth }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + horizontalPosition = _props.horizontalPosition, + label = _props.label, + show = _props.show, + touch = _props.touch, + verticalPosition = _props.verticalPosition, + other = (0, _objectWithoutProperties3.default)(_props, ['horizontalPosition', 'label', 'show', 'touch', 'verticalPosition']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { + ref: 'tooltip', + style: prepareStyles((0, _simpleAssign2.default)(styles.root, this.props.show && styles.rootWhenShown, this.props.touch && styles.rootWhenTouched, this.props.style)) + }), + _react2.default.createElement('div', { + ref: 'ripple', + style: prepareStyles((0, _simpleAssign2.default)(styles.ripple, this.props.show && styles.rippleWhenShown)) + }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + label + ) + ); + } + }]); + return Tooltip; +}(_react.Component); + +Tooltip.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Tooltip.propTypes = { + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + horizontalPosition: _react.PropTypes.oneOf(['left', 'right', 'center']), + label: _react.PropTypes.node.isRequired, + show: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + touch: _react.PropTypes.bool, + verticalPosition: _react.PropTypes.oneOf(['top', 'bottom']) +} : void 0; +exports.default = Tooltip; + +/***/ }), +/* 740 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationExpandLess = function NavigationExpandLess(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z' }) + ); +}; +NavigationExpandLess = (0, _pure2.default)(NavigationExpandLess); +NavigationExpandLess.displayName = 'NavigationExpandLess'; +NavigationExpandLess.muiName = 'SvgIcon'; + +exports.default = NavigationExpandLess; + +/***/ }), +/* 741 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _react = __webpack_require__(0); + +var _createHelper = __webpack_require__(318); + +var _createHelper2 = _interopRequireDefault(_createHelper); + +var _createEagerFactory = __webpack_require__(742); + +var _createEagerFactory2 = _interopRequireDefault(_createEagerFactory); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var shouldUpdate = function shouldUpdate(test) { + return function (BaseComponent) { + var factory = (0, _createEagerFactory2.default)(BaseComponent); + return function (_Component) { + _inherits(_class, _Component); + + function _class() { + _classCallCheck(this, _class); + + return _possibleConstructorReturn(this, _Component.apply(this, arguments)); + } + + _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return test(this.props, nextProps); + }; + + _class.prototype.render = function render() { + return factory(this.props); + }; + + return _class; + }(_react.Component); + }; +}; + +exports.default = (0, _createHelper2.default)(shouldUpdate, 'shouldUpdate'); + +/***/ }), +/* 742 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _createEagerElementUtil = __webpack_require__(743); + +var _createEagerElementUtil2 = _interopRequireDefault(_createEagerElementUtil); + +var _isReferentiallyTransparentFunctionComponent = __webpack_require__(744); + +var _isReferentiallyTransparentFunctionComponent2 = _interopRequireDefault(_isReferentiallyTransparentFunctionComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createFactory = function createFactory(type) { + var isReferentiallyTransparent = (0, _isReferentiallyTransparentFunctionComponent2.default)(type); + return function (p, c) { + return (0, _createEagerElementUtil2.default)(false, isReferentiallyTransparent, type, p, c); + }; +}; + +exports.default = createFactory; + +/***/ }), +/* 743 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createEagerElementUtil = function createEagerElementUtil(hasKey, isReferentiallyTransparent, type, props, children) { + if (!hasKey && isReferentiallyTransparent) { + if (children) { + return type(_extends({}, props, { children: children })); + } + return type(props); + } + + var Component = type; + + if (children) { + return _react2.default.createElement( + Component, + props, + children + ); + } + + return _react2.default.createElement(Component, props); +}; + +exports.default = createEagerElementUtil; + +/***/ }), +/* 744 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _isClassComponent = __webpack_require__(745); + +var _isClassComponent2 = _interopRequireDefault(_isClassComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isReferentiallyTransparentFunctionComponent = function isReferentiallyTransparentFunctionComponent(Component) { + return Boolean(typeof Component === 'function' && !(0, _isClassComponent2.default)(Component) && !Component.defaultProps && !Component.contextTypes && ('production' === 'production' || !Component.propTypes)); +}; + +exports.default = isReferentiallyTransparentFunctionComponent; + +/***/ }), +/* 745 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var isClassComponent = function isClassComponent(Component) { + return Boolean(Component && Component.prototype && typeof Component.prototype.isReactComponent === 'object'); +}; + +exports.default = isClassComponent; + +/***/ }), +/* 746 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SvgIcon = function (_Component) { + (0, _inherits3.default)(SvgIcon, _Component); + + function SvgIcon() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, SvgIcon); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = SvgIcon.__proto__ || (0, _getPrototypeOf2.default)(SvgIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.handleMouseLeave = function (event) { + _this.setState({ hovered: false }); + _this.props.onMouseLeave(event); + }, _this.handleMouseEnter = function (event) { + _this.setState({ hovered: true }); + _this.props.onMouseEnter(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(SvgIcon, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + color = _props.color, + hoverColor = _props.hoverColor, + onMouseEnter = _props.onMouseEnter, + onMouseLeave = _props.onMouseLeave, + style = _props.style, + viewBox = _props.viewBox, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'color', 'hoverColor', 'onMouseEnter', 'onMouseLeave', 'style', 'viewBox']); + var _context$muiTheme = this.context.muiTheme, + svgIcon = _context$muiTheme.svgIcon, + prepareStyles = _context$muiTheme.prepareStyles; + + + var offColor = color ? color : 'currentColor'; + var onColor = hoverColor ? hoverColor : offColor; + + var mergedStyles = (0, _simpleAssign2.default)({ + display: 'inline-block', + color: svgIcon.color, + fill: this.state.hovered ? onColor : offColor, + height: 24, + width: 24, + userSelect: 'none', + transition: _transitions2.default.easeOut() + }, style); + + return _react2.default.createElement( + 'svg', + (0, _extends3.default)({}, other, { + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + style: prepareStyles(mergedStyles), + viewBox: viewBox + }), + children + ); + } + }]); + return SvgIcon; +}(_react.Component); + +SvgIcon.muiName = 'SvgIcon'; +SvgIcon.defaultProps = { + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + viewBox: '0 0 24 24' +}; +SvgIcon.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? SvgIcon.propTypes = { + /** + * Elements passed into the SVG Icon. + */ + children: _react.PropTypes.node, + /** + * This is the fill color of the svg icon. + * If not specified, this component will default + * to muiTheme.palette.textColor. + */ + color: _react.PropTypes.string, + /** + * This is the icon color when the mouse hovers over the icon. + */ + hoverColor: _react.PropTypes.string, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Allows you to redefine what the coordinates + * without units mean inside an svg element. For example, + * if the SVG element is 500 (width) by 200 (height), and you + * pass viewBox="0 0 50 20", this means that the coordinates inside + * the svg will go from the top left corner (0,0) to bottom right (50,20) + * and each unit will be worth 10px. + */ + viewBox: _react.PropTypes.string +} : void 0; +exports.default = SvgIcon; + +/***/ }), +/* 747 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationExpandMore = function NavigationExpandMore(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z' }) + ); +}; +NavigationExpandMore = (0, _pure2.default)(NavigationExpandMore); +NavigationExpandMore.displayName = 'NavigationExpandMore'; +NavigationExpandMore.muiName = 'SvgIcon'; + +exports.default = NavigationExpandMore; + +/***/ }), +/* 748 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _List = __webpack_require__(195); + +var _List2 = _interopRequireDefault(_List); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NestedList = function NestedList(props) { + var children = props.children, + open = props.open, + nestedLevel = props.nestedLevel, + style = props.style; + + + if (!open) { + return null; + } + + return _react2.default.createElement( + _List2.default, + { style: style }, + _react.Children.map(children, function (child) { + return (0, _react.isValidElement)(child) ? (0, _react.cloneElement)(child, { + nestedLevel: nestedLevel + 1 + }) : child; + }) + ); +}; + + false ? NestedList.propTypes = { + children: _react.PropTypes.node, + nestedLevel: _react.PropTypes.number.isRequired, + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +exports.default = NestedList; + +/***/ }), +/* 749 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.makeSelectable = undefined; + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _colorManipulator = __webpack_require__(56); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var makeSelectable = exports.makeSelectable = function makeSelectable(MyComponent) { + var _class, _temp2; + + return _temp2 = _class = function (_Component) { + (0, _inherits3.default)(_class, _Component); + + function _class() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, _class); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = _class.__proto__ || (0, _getPrototypeOf2.default)(_class)).call.apply(_ref, [this].concat(args))), _this), _this.hasSelectedDescendant = function (previousValue, child) { + if (_react2.default.isValidElement(child) && child.props.nestedItems && child.props.nestedItems.length > 0) { + return child.props.nestedItems.reduce(_this.hasSelectedDescendant, previousValue); + } + return previousValue || _this.isChildSelected(child, _this.props); + }, _this.handleItemTouchTap = function (event, item) { + var itemValue = item.props.value; + + if (itemValue !== _this.props.value) { + if (_this.props.onChange) { + _this.props.onChange(event, itemValue); + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(_class, [{ + key: 'extendChild', + value: function extendChild(child, styles, selectedItemStyle) { + var _this2 = this; + + if (child && child.type && child.type.muiName === 'ListItem') { + var selected = this.isChildSelected(child, this.props); + var selectedChildrenStyles = void 0; + if (selected) { + selectedChildrenStyles = (0, _simpleAssign2.default)({}, styles, selectedItemStyle); + } + + var mergedChildrenStyles = (0, _simpleAssign2.default)({}, child.props.style, selectedChildrenStyles); + + this.keyIndex += 1; + + return _react2.default.cloneElement(child, { + onTouchTap: function onTouchTap(event) { + _this2.handleItemTouchTap(event, child); + if (child.props.onTouchTap) { + child.props.onTouchTap(event); + } + }, + key: this.keyIndex, + style: mergedChildrenStyles, + nestedItems: child.props.nestedItems.map(function (child) { + return _this2.extendChild(child, styles, selectedItemStyle); + }), + initiallyOpen: this.isInitiallyOpen(child) + }); + } else { + return child; + } + } + }, { + key: 'isInitiallyOpen', + value: function isInitiallyOpen(child) { + if (child.props.initiallyOpen) { + return child.props.initiallyOpen; + } + return this.hasSelectedDescendant(false, child); + } + }, { + key: 'isChildSelected', + value: function isChildSelected(child, props) { + return props.value === child.props.value; + } + }, { + key: 'render', + value: function render() { + var _this3 = this; + + var _props = this.props, + children = _props.children, + selectedItemStyle = _props.selectedItemStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'selectedItemStyle']); + + + this.keyIndex = 0; + var styles = {}; + + if (!selectedItemStyle) { + var textColor = this.context.muiTheme.baseTheme.palette.textColor; + styles.backgroundColor = (0, _colorManipulator.fade)(textColor, 0.2); + } + + return _react2.default.createElement( + MyComponent, + (0, _extends3.default)({}, other, this.state), + _react.Children.map(children, function (child) { + return _this3.extendChild(child, styles, selectedItemStyle); + }) + ); + } + }]); + return _class; + }(_react.Component), _class.propTypes = { + children: _react.PropTypes.node, + onChange: _react.PropTypes.func, + selectedItemStyle: _react.PropTypes.object, + value: _react.PropTypes.any + }, _class.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired + }, _temp2; +}; + +exports.default = makeSelectable; + +/***/ }), +/* 750 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Drawer = __webpack_require__(751); + +var _Drawer2 = _interopRequireDefault(_Drawer); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Drawer2.default; + +/***/ }), +/* 751 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactEventListener = __webpack_require__(42); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(30); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _autoPrefix = __webpack_require__(94); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _Overlay = __webpack_require__(319); + +var _Overlay2 = _interopRequireDefault(_Overlay); + +var _Paper = __webpack_require__(34); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _propTypes = __webpack_require__(41); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var openNavEventHandler = null; + +var Drawer = function (_Component) { + (0, _inherits3.default)(Drawer, _Component); + + function Drawer() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Drawer); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Drawer.__proto__ || (0, _getPrototypeOf2.default)(Drawer)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapOverlay = function (event) { + event.preventDefault(); + _this.close('clickaway'); + }, _this.handleKeyUp = function (event) { + if (_this.state.open && !_this.props.docked && (0, _keycode2.default)(event) === 'esc') { + _this.close('escape'); + } + }, _this.onBodyTouchStart = function (event) { + var swipeAreaWidth = _this.props.swipeAreaWidth; + + var touchStartX = event.touches[0].pageX; + var touchStartY = event.touches[0].pageY; + + // Open only if swiping from far left (or right) while closed + if (swipeAreaWidth !== null && !_this.state.open) { + if (_this.props.openSecondary) { + // If openSecondary is true calculate from the far right + if (touchStartX < document.body.offsetWidth - swipeAreaWidth) return; + } else { + // If openSecondary is false calculate from the far left + if (touchStartX > swipeAreaWidth) return; + } + } + + if (!_this.state.open && (openNavEventHandler !== _this.onBodyTouchStart || _this.props.disableSwipeToOpen)) { + return; + } + + _this.maybeSwiping = true; + _this.touchStartX = touchStartX; + _this.touchStartY = touchStartY; + + document.body.addEventListener('touchmove', _this.onBodyTouchMove); + document.body.addEventListener('touchend', _this.onBodyTouchEnd); + document.body.addEventListener('touchcancel', _this.onBodyTouchEnd); + }, _this.onBodyTouchMove = function (event) { + var currentX = event.touches[0].pageX; + var currentY = event.touches[0].pageY; + + if (_this.state.swiping) { + event.preventDefault(); + _this.setPosition(_this.getTranslateX(currentX)); + } else if (_this.maybeSwiping) { + var dXAbs = Math.abs(currentX - _this.touchStartX); + var dYAbs = Math.abs(currentY - _this.touchStartY); + // If the user has moved his thumb ten pixels in either direction, + // we can safely make an assumption about whether he was intending + // to swipe or scroll. + var threshold = 10; + + if (dXAbs > threshold && dYAbs <= threshold) { + _this.swipeStartX = currentX; + _this.setState({ + swiping: _this.state.open ? 'closing' : 'opening' + }); + _this.setPosition(_this.getTranslateX(currentX)); + } else if (dXAbs <= threshold && dYAbs > threshold) { + _this.onBodyTouchEnd(); + } + } + }, _this.onBodyTouchEnd = function (event) { + if (_this.state.swiping) { + var currentX = event.changedTouches[0].pageX; + var translateRatio = _this.getTranslateX(currentX) / _this.getMaxTranslateX(); + + _this.maybeSwiping = false; + var swiping = _this.state.swiping; + _this.setState({ + swiping: null + }); + + // We have to open or close after setting swiping to null, + // because only then CSS transition is enabled. + if (translateRatio > 0.5) { + if (swiping === 'opening') { + _this.setPosition(_this.getMaxTranslateX()); + } else { + _this.close('swipe'); + } + } else { + if (swiping === 'opening') { + _this.open('swipe'); + } else { + _this.setPosition(0); + } + } + } else { + _this.maybeSwiping = false; + } + + document.body.removeEventListener('touchmove', _this.onBodyTouchMove); + document.body.removeEventListener('touchend', _this.onBodyTouchEnd); + document.body.removeEventListener('touchcancel', _this.onBodyTouchEnd); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Drawer, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.maybeSwiping = false; + this.touchStartX = null; + this.touchStartY = null; + this.swipeStartX = null; + + this.setState({ + open: this.props.open !== null ? this.props.open : this.props.docked, + swiping: null + }); + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + this.enableSwipeHandling(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + // If controlled then the open prop takes precedence. + if (nextProps.open !== null) { + this.setState({ + open: nextProps.open + }); + // Otherwise, if docked is changed, change the open state for when uncontrolled. + } else if (this.props.docked !== nextProps.docked) { + this.setState({ + open: nextProps.docked + }); + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.enableSwipeHandling(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.disableSwipeHandling(); + } + }, { + key: 'getStyles', + value: function getStyles() { + var muiTheme = this.context.muiTheme; + var theme = muiTheme.drawer; + + var x = this.getTranslateMultiplier() * (this.state.open ? 0 : this.getMaxTranslateX()); + + var styles = { + root: { + height: '100%', + width: this.props.width || theme.width, + position: 'fixed', + zIndex: muiTheme.zIndex.drawer, + left: 0, + top: 0, + transform: 'translate(' + x + 'px, 0)', + transition: !this.state.swiping && _transitions2.default.easeOut(null, 'transform', null), + backgroundColor: theme.color, + overflow: 'auto', + WebkitOverflowScrolling: 'touch' }, + overlay: { + zIndex: muiTheme.zIndex.drawerOverlay, + pointerEvents: this.state.open ? 'auto' : 'none' }, + rootWhenOpenRight: { + left: 'auto', + right: 0 + } + }; + + return styles; + } + }, { + key: 'shouldShow', + value: function shouldShow() { + return this.state.open || !!this.state.swiping; // component is swiping + } + }, { + key: 'close', + value: function close(reason) { + if (this.props.open === null) this.setState({ open: false }); + if (this.props.onRequestChange) this.props.onRequestChange(false, reason); + return this; + } + }, { + key: 'open', + value: function open(reason) { + if (this.props.open === null) this.setState({ open: true }); + if (this.props.onRequestChange) this.props.onRequestChange(true, reason); + return this; + } + }, { + key: 'getMaxTranslateX', + value: function getMaxTranslateX() { + var width = this.props.width || this.context.muiTheme.drawer.width; + return width + 10; + } + }, { + key: 'getTranslateMultiplier', + value: function getTranslateMultiplier() { + return this.props.openSecondary ? 1 : -1; + } + }, { + key: 'enableSwipeHandling', + value: function enableSwipeHandling() { + if (!this.props.docked) { + document.body.addEventListener('touchstart', this.onBodyTouchStart); + if (!openNavEventHandler) { + openNavEventHandler = this.onBodyTouchStart; + } + } else { + this.disableSwipeHandling(); + } + } + }, { + key: 'disableSwipeHandling', + value: function disableSwipeHandling() { + document.body.removeEventListener('touchstart', this.onBodyTouchStart); + if (openNavEventHandler === this.onBodyTouchStart) { + openNavEventHandler = null; + } + } + }, { + key: 'setPosition', + value: function setPosition(translateX) { + var drawer = _reactDom2.default.findDOMNode(this.refs.clickAwayableElement); + var transformCSS = 'translate(' + this.getTranslateMultiplier() * translateX + 'px, 0)'; + this.refs.overlay.setOpacity(1 - translateX / this.getMaxTranslateX()); + _autoPrefix2.default.set(drawer.style, 'transform', transformCSS); + } + }, { + key: 'getTranslateX', + value: function getTranslateX(currentX) { + return Math.min(Math.max(this.state.swiping === 'closing' ? this.getTranslateMultiplier() * (currentX - this.swipeStartX) : this.getMaxTranslateX() - this.getTranslateMultiplier() * (this.swipeStartX - currentX), 0), this.getMaxTranslateX()); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + containerClassName = _props.containerClassName, + containerStyle = _props.containerStyle, + docked = _props.docked, + openSecondary = _props.openSecondary, + overlayClassName = _props.overlayClassName, + overlayStyle = _props.overlayStyle, + style = _props.style, + zDepth = _props.zDepth; + + + var styles = this.getStyles(); + + var overlay = void 0; + if (!docked) { + overlay = _react2.default.createElement(_Overlay2.default, { + ref: 'overlay', + show: this.shouldShow(), + className: overlayClassName, + style: (0, _simpleAssign2.default)(styles.overlay, overlayStyle), + transitionEnabled: !this.state.swiping, + onTouchTap: this.handleTouchTapOverlay + }); + } + + return _react2.default.createElement( + 'div', + { + className: className, + style: style + }, + _react2.default.createElement(_reactEventListener2.default, { target: 'window', onKeyUp: this.handleKeyUp }), + overlay, + _react2.default.createElement( + _Paper2.default, + { + ref: 'clickAwayableElement', + zDepth: zDepth, + rounded: false, + transitionEnabled: !this.state.swiping, + className: containerClassName, + style: (0, _simpleAssign2.default)(styles.root, openSecondary && styles.rootWhenOpenRight, containerStyle) + }, + children + ) + ); + } + }]); + return Drawer; +}(_react.Component); + +Drawer.defaultProps = { + disableSwipeToOpen: false, + docked: true, + open: null, + openSecondary: false, + swipeAreaWidth: 30, + width: null, + zDepth: 2 +}; +Drawer.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Drawer.propTypes = { + /** + * The contents of the `Drawer` + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The CSS class name of the container element. + */ + containerClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the container element. + */ + containerStyle: _react.PropTypes.object, + /** + * If true, swiping sideways when the `Drawer` is closed will not open it. + */ + disableSwipeToOpen: _react.PropTypes.bool, + /** + * If true, the `Drawer` will be docked. In this state, the overlay won't show and + * clicking on a menu item will not close the `Drawer`. + */ + docked: _react.PropTypes.bool, + /** + * Callback function fired when the `open` state of the `Drawer` is requested to be changed. + * + * @param {boolean} open If true, the `Drawer` was requested to be opened. + * @param {string} reason The reason for the open or close request. Possible values are + * 'swipe' for open requests; 'clickaway' (on overlay clicks), + * 'escape' (on escape key press), and 'swipe' for close requests. + */ + onRequestChange: _react.PropTypes.func, + /** + * If true, the `Drawer` is opened. Providing a value will turn the `Drawer` + * into a controlled component. + */ + open: _react.PropTypes.bool, + /** + * If true, the `Drawer` is positioned to open from the opposite side. + */ + openSecondary: _react.PropTypes.bool, + /** + * The CSS class name to add to the `Overlay` component that is rendered behind the `Drawer`. + */ + overlayClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the `Overlay` component that is rendered behind the `Drawer`. + */ + overlayStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The width of the left most (or right most) area in pixels where the `Drawer` can be + * swiped open from. Setting this to `null` spans that area to the entire page + * (**CAUTION!** Setting this property to `null` might cause issues with sliders and + * swipeable `Tabs`: use at your own risk). + */ + swipeAreaWidth: _react.PropTypes.number, + /** + * The width of the `Drawer` in pixels. Defaults to using the values from theme. + */ + width: _react.PropTypes.number, + /** + * The zDepth of the `Drawer`. + */ + zDepth: _propTypes2.default.zDepth + +} : void 0; +exports.default = Drawer; + +/***/ }), +/* 752 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.passiveOption = exports.detachEvent = exports.attachEvent = exports.removeEventListener = exports.addEventListener = exports.canUseDOM = undefined; + +var _defineProperty = __webpack_require__(753); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Inspired by https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/ExecutionEnvironment.js +var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +var addEventListener = exports.addEventListener = canUseDOM && 'addEventListener' in window; +var removeEventListener = exports.removeEventListener = canUseDOM && 'removeEventListener' in window; + +// IE8+ Support +var attachEvent = exports.attachEvent = canUseDOM && 'attachEvent' in window; +var detachEvent = exports.detachEvent = canUseDOM && 'detachEvent' in window; + +// Passive options +// Inspired by https://github.com/Modernizr/Modernizr/blob/master/feature-detects/dom/passiveeventlisteners.js +var passiveOption = exports.passiveOption = function () { + var cache = null; + + return function () { + if (cache !== null) { + return cache; + } + + var supportsPassiveOption = false; + + try { + window.addEventListener('test', null, (0, _defineProperty2.default)({}, 'passive', { + get: function get() { + supportsPassiveOption = true; + } + })); + } catch (e) {} // eslint-disable-line no-empty + + cache = supportsPassiveOption; + + return supportsPassiveOption; + }(); +}(); + +/***/ }), +/* 753 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _defineProperty = __webpack_require__(185); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +exports.default = defineProperty; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// weak + +function defineProperty(o, p, attr) { + return (0, _defineProperty2.default)(o, p, attr); +} + +/***/ }), +/* 754 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var originalBodyOverflow = null; +var lockingCounter = 0; + +var AutoLockScrolling = function (_Component) { + (0, _inherits3.default)(AutoLockScrolling, _Component); + + function AutoLockScrolling() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, AutoLockScrolling); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoLockScrolling.__proto__ || (0, _getPrototypeOf2.default)(AutoLockScrolling)).call.apply(_ref, [this].concat(args))), _this), _this.locked = false, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(AutoLockScrolling, [{ + key: 'componentDidMount', + value: function componentDidMount() { + if (this.props.lock === true) { + this.preventScrolling(); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.lock !== nextProps.lock) { + if (nextProps.lock) { + this.preventScrolling(); + } else { + this.allowScrolling(); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.allowScrolling(); + } + + // force to only lock/unlock once + + }, { + key: 'preventScrolling', + value: function preventScrolling() { + if (this.locked === true) { + return; + } + + lockingCounter = lockingCounter + 1; + this.locked = true; + + // only lock the first time the component is mounted. + if (lockingCounter === 1) { + var body = document.getElementsByTagName('body')[0]; + originalBodyOverflow = body.style.overflow; + body.style.overflow = 'hidden'; + } + } + }, { + key: 'allowScrolling', + value: function allowScrolling() { + if (this.locked === true) { + lockingCounter = lockingCounter - 1; + this.locked = false; + } + + if (lockingCounter === 0 && originalBodyOverflow !== null) { + var body = document.getElementsByTagName('body')[0]; + body.style.overflow = originalBodyOverflow || ''; + originalBodyOverflow = null; + } + } + }, { + key: 'render', + value: function render() { + return null; + } + }]); + return AutoLockScrolling; +}(_react.Component); + + false ? AutoLockScrolling.propTypes = { + lock: _react.PropTypes.bool.isRequired +} : void 0; +exports.default = AutoLockScrolling; + +/***/ }), +/* 755 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(41); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var rounded = props.rounded, + circle = props.circle, + transitionEnabled = props.transitionEnabled, + zDepth = props.zDepth; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + paper = _context$muiTheme.paper; + + + return { + root: { + color: paper.color, + backgroundColor: paper.backgroundColor, + transition: transitionEnabled && _transitions2.default.easeOut(), + boxSizing: 'border-box', + fontFamily: baseTheme.fontFamily, + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + boxShadow: paper.zDepthShadows[zDepth - 1], // No shadow for 0 depth papers + borderRadius: circle ? '50%' : rounded ? '2px' : '0px' + } + }; +} + +var Paper = function (_Component) { + (0, _inherits3.default)(Paper, _Component); + + function Paper() { + (0, _classCallCheck3.default)(this, Paper); + return (0, _possibleConstructorReturn3.default)(this, (Paper.__proto__ || (0, _getPrototypeOf2.default)(Paper)).apply(this, arguments)); + } + + (0, _createClass3.default)(Paper, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + circle = _props.circle, + rounded = _props.rounded, + style = _props.style, + transitionEnabled = _props.transitionEnabled, + zDepth = _props.zDepth, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'circle', 'rounded', 'style', 'transitionEnabled', 'zDepth']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + children + ); + } + }]); + return Paper; +}(_react.Component); + +Paper.defaultProps = { + circle: false, + rounded: true, + transitionEnabled: true, + zDepth: 1 +}; +Paper.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Paper.propTypes = { + /** + * Children passed into the paper element. + */ + children: _react.PropTypes.node, + /** + * Set to true to generate a circlular paper container. + */ + circle: _react.PropTypes.bool, + /** + * By default, the paper container will have a border radius. + * Set this to false to generate a container with sharp corners. + */ + rounded: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Set to false to disable CSS transitions for the paper element. + */ + transitionEnabled: _react.PropTypes.bool, + /** + * This number represents the zDepth of the paper shadow. + */ + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = Paper; + +/***/ }), +/* 756 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ActionCode = function ActionCode(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z' }) + ); +}; +ActionCode = (0, _pure2.default)(ActionCode); +ActionCode.displayName = 'ActionCode'; +ActionCode.muiName = 'SvgIcon'; + +exports.default = ActionCode; + +/***/ }), +/* 757 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ActionShop = function ActionShop(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M16 6V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H2v13c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6h-6zm-6-2h4v2h-4V4zM9 18V9l7.5 4L9 18z' }) + ); +}; +ActionShop = (0, _pure2.default)(ActionShop); +ActionShop.displayName = 'ActionShop'; +ActionShop.muiName = 'SvgIcon'; + +exports.default = ActionShop; + +/***/ }), +/* 758 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zIndex = exports.typography = exports.transitions = exports.spacing = exports.muiThemeable = exports.getMuiTheme = exports.LightRawTheme = exports.lightBaseTheme = exports.DarkRawTheme = exports.darkBaseTheme = exports.colors = exports.MuiThemeProvider = undefined; + +var _MuiThemeProvider2 = __webpack_require__(301); + +var _MuiThemeProvider3 = _interopRequireDefault(_MuiThemeProvider2); + +var _colors2 = __webpack_require__(57); + +var _colors = _interopRequireWildcard(_colors2); + +var _darkBaseTheme2 = __webpack_require__(759); + +var _darkBaseTheme3 = _interopRequireDefault(_darkBaseTheme2); + +var _lightBaseTheme2 = __webpack_require__(306); + +var _lightBaseTheme3 = _interopRequireDefault(_lightBaseTheme2); + +var _getMuiTheme2 = __webpack_require__(125); + +var _getMuiTheme3 = _interopRequireDefault(_getMuiTheme2); + +var _muiThemeable2 = __webpack_require__(760); + +var _muiThemeable3 = _interopRequireDefault(_muiThemeable2); + +var _spacing2 = __webpack_require__(192); + +var _spacing3 = _interopRequireDefault(_spacing2); + +var _transitions2 = __webpack_require__(10); + +var _transitions3 = _interopRequireDefault(_transitions2); + +var _typography2 = __webpack_require__(311); + +var _typography3 = _interopRequireDefault(_typography2); + +var _zIndex2 = __webpack_require__(307); + +var _zIndex3 = _interopRequireDefault(_zIndex2); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.MuiThemeProvider = _MuiThemeProvider3.default; +exports.colors = _colors; +exports.darkBaseTheme = _darkBaseTheme3.default; +exports.DarkRawTheme = _darkBaseTheme3.default; +exports.lightBaseTheme = _lightBaseTheme3.default; +exports.LightRawTheme = _lightBaseTheme3.default; +exports.getMuiTheme = _getMuiTheme3.default; +exports.muiThemeable = _muiThemeable3.default; +exports.spacing = _spacing3.default; +exports.transitions = _transitions3.default; +exports.typography = _typography3.default; +exports.zIndex = _zIndex3.default; + +/***/ }), +/* 759 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _colors = __webpack_require__(57); + +var _colorManipulator = __webpack_require__(56); + +var _spacing = __webpack_require__(192); + +var _spacing2 = _interopRequireDefault(_spacing); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = { + spacing: _spacing2.default, + fontFamily: 'Roboto, sans-serif', + palette: { + primary1Color: _colors.cyan700, + primary2Color: _colors.cyan700, + primary3Color: _colors.grey600, + accent1Color: _colors.pinkA200, + accent2Color: _colors.pinkA400, + accent3Color: _colors.pinkA100, + textColor: _colors.fullWhite, + secondaryTextColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.7), + alternateTextColor: '#303030', + canvasColor: '#303030', + borderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), + disabledColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), + pickerHeaderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12), + clockCircleColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12) + } +}; + +/***/ }), +/* 760 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +exports.default = muiThemeable; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _getMuiTheme = __webpack_require__(125); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DEFAULT_THEME = void 0; + +function getDefaultTheme() { + if (!DEFAULT_THEME) { + DEFAULT_THEME = (0, _getMuiTheme2.default)(); + } + return DEFAULT_THEME; +} + +function muiThemeable() { + return function (Component) { + var MuiComponent = function MuiComponent(props, context) { + var _context$muiTheme = context.muiTheme, + muiTheme = _context$muiTheme === undefined ? getDefaultTheme() : _context$muiTheme; + + + return _react2.default.createElement(Component, (0, _extends3.default)({ muiTheme: muiTheme }, props)); + }; + + MuiComponent.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired + }; + + return MuiComponent; + }; +} + +/***/ }), +/* 761 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRedux = __webpack_require__(27); + +var _Snackbar = __webpack_require__(762); + +var _Snackbar2 = _interopRequireDefault(_Snackbar); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function NotificationBar(props) { + var notification = props.notification; + + return _react2.default.createElement(_Snackbar2.default, { + open: notification.message !== null, + message: notification.message === null ? '...' : notification.message, + autoHideDuration: 4000, + bodyStyle: { height: 'auto', lineHeight: '20px', padding: 24, marginLeft: 256, whiteSpace: 'pre-line' } + }); +} + +NotificationBar.propTypes = { + notification: _react.PropTypes.shape({ + message: _react.PropTypes.string + }) +}; + +function mapStateToProps(state) { + return { + notification: state.notification + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps)(NotificationBar); + +/***/ }), +/* 762 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Snackbar = __webpack_require__(763); + +var _Snackbar2 = _interopRequireDefault(_Snackbar); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Snackbar2.default; + +/***/ }), +/* 763 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _ClickAwayListener = __webpack_require__(320); + +var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener); + +var _SnackbarBody = __webpack_require__(764); + +var _SnackbarBody2 = _interopRequireDefault(_SnackbarBody); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + desktopSubheaderHeight = _context$muiTheme.baseTheme.spacing.desktopSubheaderHeight, + zIndex = _context$muiTheme.zIndex; + var open = state.open; + + + var styles = { + root: { + position: 'fixed', + left: '50%', + display: 'flex', + bottom: 0, + zIndex: zIndex.snackbar, + visibility: open ? 'visible' : 'hidden', + transform: open ? 'translate(-50%, 0)' : 'translate(-50%, ' + desktopSubheaderHeight + 'px)', + transition: _transitions2.default.easeOut('400ms', 'transform') + ', ' + _transitions2.default.easeOut('400ms', 'visibility') + } + }; + + return styles; +} + +var Snackbar = function (_Component) { + (0, _inherits3.default)(Snackbar, _Component); + + function Snackbar() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Snackbar); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Snackbar.__proto__ || (0, _getPrototypeOf2.default)(Snackbar)).call.apply(_ref, [this].concat(args))), _this), _this.componentClickAway = function () { + if (_this.timerTransitionId) { + // If transitioning, don't close the snackbar. + return; + } + + if (_this.props.open !== null && _this.props.onRequestClose) { + _this.props.onRequestClose('clickaway'); + } else { + _this.setState({ open: false }); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Snackbar, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + open: this.props.open, + message: this.props.message, + action: this.props.action + }); + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + if (this.state.open) { + this.setAutoHideTimer(); + this.setTransitionTimer(); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; + + if (this.props.open && nextProps.open && (nextProps.message !== this.props.message || nextProps.action !== this.props.action)) { + this.setState({ + open: false + }); + + clearTimeout(this.timerOneAtTheTimeId); + this.timerOneAtTheTimeId = setTimeout(function () { + _this2.setState({ + message: nextProps.message, + action: nextProps.action, + open: true + }); + }, 400); + } else { + var open = nextProps.open; + + this.setState({ + open: open !== null ? open : this.state.open, + message: nextProps.message, + action: nextProps.action + }); + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps, prevState) { + if (prevState.open !== this.state.open) { + if (this.state.open) { + this.setAutoHideTimer(); + this.setTransitionTimer(); + } else { + clearTimeout(this.timerAutoHideId); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.timerAutoHideId); + clearTimeout(this.timerTransitionId); + clearTimeout(this.timerOneAtTheTimeId); + } + }, { + key: 'setAutoHideTimer', + + + // Timer that controls delay before snackbar auto hides + value: function setAutoHideTimer() { + var _this3 = this; + + var autoHideDuration = this.props.autoHideDuration; + + if (autoHideDuration > 0) { + clearTimeout(this.timerAutoHideId); + this.timerAutoHideId = setTimeout(function () { + if (_this3.props.open !== null && _this3.props.onRequestClose) { + _this3.props.onRequestClose('timeout'); + } else { + _this3.setState({ open: false }); + } + }, autoHideDuration); + } + } + + // Timer that controls delay before click-away events are captured (based on when animation completes) + + }, { + key: 'setTransitionTimer', + value: function setTransitionTimer() { + var _this4 = this; + + this.timerTransitionId = setTimeout(function () { + _this4.timerTransitionId = undefined; + }, 400); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + autoHideDuration = _props.autoHideDuration, + contentStyle = _props.contentStyle, + bodyStyle = _props.bodyStyle, + messageProp = _props.message, + onRequestClose = _props.onRequestClose, + onActionTouchTap = _props.onActionTouchTap, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['autoHideDuration', 'contentStyle', 'bodyStyle', 'message', 'onRequestClose', 'onActionTouchTap', 'style']); + var _state = this.state, + action = _state.action, + message = _state.message, + open = _state.open; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _ClickAwayListener2.default, + { onClickAway: open ? this.componentClickAway : null }, + _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + _react2.default.createElement(_SnackbarBody2.default, { + action: action, + contentStyle: contentStyle, + message: message, + open: open, + onActionTouchTap: onActionTouchTap, + style: bodyStyle + }) + ) + ); + } + }]); + return Snackbar; +}(_react.Component); + +Snackbar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Snackbar.propTypes = { + /** + * The label for the action on the snackbar. + */ + action: _react.PropTypes.node, + /** + * The number of milliseconds to wait before automatically dismissing. + * If no value is specified the snackbar will dismiss normally. + * If a value is provided the snackbar can still be dismissed normally. + * If a snackbar is dismissed before the timer expires, the timer will be cleared. + */ + autoHideDuration: _react.PropTypes.number, + /** + * Override the inline-styles of the body element. + */ + bodyStyle: _react.PropTypes.object, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Override the inline-styles of the content element. + */ + contentStyle: _react.PropTypes.object, + /** + * The message to be displayed. + * + * (Note: If the message is an element or array, and the `Snackbar` may re-render while it is still open, + * ensure that the same object remains as the `message` property if you want to avoid the `Snackbar` hiding and + * showing again) + */ + message: _react.PropTypes.node.isRequired, + /** + * Fired when the action button is touchtapped. + * + * @param {object} event Action button event. + */ + onActionTouchTap: _react.PropTypes.func, + /** + * Fired when the `Snackbar` is requested to be closed by a click outside the `Snackbar`, or after the + * `autoHideDuration` timer expires. + * + * Typically `onRequestClose` is used to set state in the parent component, which is used to control the `Snackbar` + * `open` prop. + * + * The `reason` parameter can optionally be used to control the response to `onRequestClose`, + * for example ignoring `clickaway`. + * + * @param {string} reason Can be:`"timeout"` (`autoHideDuration` expired) or: `"clickaway"` + */ + onRequestClose: _react.PropTypes.func, + /** + * Controls whether the `Snackbar` is opened or not. + */ + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = Snackbar; + +/***/ }), +/* 764 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SnackbarBody = undefined; + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _withWidth = __webpack_require__(765); + +var _withWidth2 = _interopRequireDefault(_withWidth); + +var _FlatButton = __webpack_require__(198); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var open = props.open, + width = props.width; + var _context$muiTheme = context.muiTheme, + _context$muiTheme$bas = _context$muiTheme.baseTheme, + _context$muiTheme$bas2 = _context$muiTheme$bas.spacing, + desktopGutter = _context$muiTheme$bas2.desktopGutter, + desktopSubheaderHeight = _context$muiTheme$bas2.desktopSubheaderHeight, + fontFamily = _context$muiTheme$bas.fontFamily, + _context$muiTheme$sna = _context$muiTheme.snackbar, + backgroundColor = _context$muiTheme$sna.backgroundColor, + textColor = _context$muiTheme$sna.textColor, + actionColor = _context$muiTheme$sna.actionColor; + + + var isSmall = width === _withWidth.SMALL; + + var styles = { + root: { + fontFamily: fontFamily, + backgroundColor: backgroundColor, + padding: '0 ' + desktopGutter + 'px', + height: desktopSubheaderHeight, + lineHeight: desktopSubheaderHeight + 'px', + borderRadius: isSmall ? 0 : 2, + maxWidth: isSmall ? 'inherit' : 568, + minWidth: isSmall ? 'inherit' : 288, + width: isSmall ? 'calc(100vw - ' + desktopGutter * 2 + 'px)' : 'auto', + flexGrow: isSmall ? 1 : 0 + }, + content: { + fontSize: 14, + color: textColor, + opacity: open ? 1 : 0, + transition: open ? _transitions2.default.easeOut('500ms', 'opacity', '100ms') : _transitions2.default.easeOut('400ms', 'opacity') + }, + action: { + color: actionColor, + float: 'right', + marginTop: 6, + marginRight: -16, + marginLeft: desktopGutter, + backgroundColor: 'transparent' + } + }; + + return styles; +} + +var SnackbarBody = exports.SnackbarBody = function SnackbarBody(props, context) { + var action = props.action, + contentStyle = props.contentStyle, + message = props.message, + open = props.open, + onActionTouchTap = props.onActionTouchTap, + style = props.style, + other = (0, _objectWithoutProperties3.default)(props, ['action', 'contentStyle', 'message', 'open', 'onActionTouchTap', 'style']); + var prepareStyles = context.muiTheme.prepareStyles; + + var styles = getStyles(props, context); + + var actionButton = action && _react2.default.createElement(_FlatButton2.default, { + style: styles.action, + label: action, + onTouchTap: onActionTouchTap + }); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.content, contentStyle)) }, + _react2.default.createElement( + 'span', + null, + message + ), + actionButton + ) + ); +}; + + false ? SnackbarBody.propTypes = { + /** + * The label for the action on the snackbar. + */ + action: _react.PropTypes.node, + /** + * Override the inline-styles of the content element. + */ + contentStyle: _react.PropTypes.object, + /** + * The message to be displayed. + * + * (Note: If the message is an element or array, and the `Snackbar` may re-render while it is still open, + * ensure that the same object remains as the `message` property if you want to avoid the `Snackbar` hiding and + * showing again) + */ + message: _react.PropTypes.node.isRequired, + /** + * Fired when the action button is touchtapped. + * + * @param {object} event Action button event. + */ + onActionTouchTap: _react.PropTypes.func, + /** + * @ignore + * Controls whether the `Snackbar` is opened or not. + */ + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * @ignore + * Width of the screen. + */ + width: _react.PropTypes.number.isRequired +} : void 0; + +SnackbarBody.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +exports.default = (0, _withWidth2.default)()(SnackbarBody); + +/***/ }), +/* 765 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.LARGE = exports.MEDIUM = exports.SMALL = undefined; + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +exports.default = withWidth; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(42); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SMALL = exports.SMALL = 1; +var MEDIUM = exports.MEDIUM = 2; +var LARGE = exports.LARGE = 3; + +function withWidth() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var _options$largeWidth = options.largeWidth, + largeWidth = _options$largeWidth === undefined ? 992 : _options$largeWidth, + _options$mediumWidth = options.mediumWidth, + mediumWidth = _options$mediumWidth === undefined ? 768 : _options$mediumWidth, + _options$resizeInterv = options.resizeInterval, + resizeInterval = _options$resizeInterv === undefined ? 166 : _options$resizeInterv; + + + return function (MyComponent) { + return function (_Component) { + (0, _inherits3.default)(WithWidth, _Component); + + function WithWidth() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, WithWidth); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = WithWidth.__proto__ || (0, _getPrototypeOf2.default)(WithWidth)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + width: null + }, _this.handleResize = function () { + clearTimeout(_this.deferTimer); + _this.deferTimer = setTimeout(function () { + _this.updateWidth(); + }, resizeInterval); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(WithWidth, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.updateWidth(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.deferTimer); + } + }, { + key: 'updateWidth', + value: function updateWidth() { + var innerWidth = window.innerWidth; + var width = void 0; + + if (innerWidth >= largeWidth) { + width = LARGE; + } else if (innerWidth >= mediumWidth) { + width = MEDIUM; + } else { + // innerWidth < 768 + width = SMALL; + } + + if (width !== this.state.width) { + this.setState({ + width: width + }); + } + } + }, { + key: 'render', + value: function render() { + var width = this.state.width; + + /** + * When rendering the component on the server, + * we have no idea about the screen width. + * In order to prevent blinks and help the reconciliation + * we are not rendering the component. + * + * A better alternative would be to send client hints. + * But the browser support of this API is low: + * http://caniuse.com/#search=client%20hint + */ + if (width === null) { + return null; + } + + return _react2.default.createElement( + _reactEventListener2.default, + { target: 'window', onResize: this.handleResize }, + _react2.default.createElement(MyComponent, (0, _extends3.default)({ + width: width + }, this.props)) + ); + } + }]); + return WithWidth; + }(_react.Component); + }; +} + +/***/ }), +/* 766 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _childUtils = __webpack_require__(127); + +var _colorManipulator = __webpack_require__(56); + +var _EnhancedButton = __webpack_require__(59); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _FlatButtonLabel = __webpack_require__(767); + +var _FlatButtonLabel2 = _interopRequireDefault(_FlatButtonLabel); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validateLabel(props, propName, componentName) { + if (false) { + if (!props.children && props.label !== 0 && !props.label && !props.icon) { + return new Error('Required prop label or children or icon was not specified in ' + componentName + '.'); + } + } +} + +var FlatButton = function (_Component) { + (0, _inherits3.default)(FlatButton, _Component); + + function FlatButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, FlatButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FlatButton.__proto__ || (0, _getPrototypeOf2.default)(FlatButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + touch: false + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + _this.props.onKeyboardFocus(event, isKeyboardFocused); + }, _this.handleMouseEnter = function (event) { + // Cancel hover styles for touch devices + if (!_this.state.touch) _this.setState({ hovered: true }); + _this.props.onMouseEnter(event); + }, _this.handleMouseLeave = function (event) { + _this.setState({ hovered: false }); + _this.props.onMouseLeave(event); + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); + _this.props.onTouchStart(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(FlatButton, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.disabled) { + this.setState({ + hovered: false + }); + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + disabled = _props.disabled, + hoverColor = _props.hoverColor, + backgroundColor = _props.backgroundColor, + icon = _props.icon, + label = _props.label, + labelStyle = _props.labelStyle, + labelPosition = _props.labelPosition, + primary = _props.primary, + rippleColor = _props.rippleColor, + secondary = _props.secondary, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'disabled', 'hoverColor', 'backgroundColor', 'icon', 'label', 'labelStyle', 'labelPosition', 'primary', 'rippleColor', 'secondary', 'style']); + var _context$muiTheme = this.context.muiTheme, + _context$muiTheme$but = _context$muiTheme.button, + buttonHeight = _context$muiTheme$but.height, + buttonMinWidth = _context$muiTheme$but.minWidth, + buttonTextTransform = _context$muiTheme$but.textTransform, + _context$muiTheme$fla = _context$muiTheme.flatButton, + buttonFilterColor = _context$muiTheme$fla.buttonFilterColor, + buttonColor = _context$muiTheme$fla.color, + disabledTextColor = _context$muiTheme$fla.disabledTextColor, + fontSize = _context$muiTheme$fla.fontSize, + fontWeight = _context$muiTheme$fla.fontWeight, + primaryTextColor = _context$muiTheme$fla.primaryTextColor, + secondaryTextColor = _context$muiTheme$fla.secondaryTextColor, + textColor = _context$muiTheme$fla.textColor, + _context$muiTheme$fla2 = _context$muiTheme$fla.textTransform, + textTransform = _context$muiTheme$fla2 === undefined ? buttonTextTransform || 'uppercase' : _context$muiTheme$fla2; + + var defaultTextColor = disabled ? disabledTextColor : primary ? primaryTextColor : secondary ? secondaryTextColor : textColor; + + var defaultHoverColor = (0, _colorManipulator.fade)(buttonFilterColor, 0.2); + var defaultRippleColor = buttonFilterColor; + var buttonHoverColor = hoverColor || defaultHoverColor; + var buttonRippleColor = rippleColor || defaultRippleColor; + var buttonBackgroundColor = backgroundColor || buttonColor; + var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled; + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + height: buttonHeight, + lineHeight: buttonHeight + 'px', + minWidth: buttonMinWidth, + color: defaultTextColor, + transition: _transitions2.default.easeOut(), + borderRadius: 2, + userSelect: 'none', + overflow: 'hidden', + backgroundColor: hovered ? buttonHoverColor : buttonBackgroundColor, + padding: 0, + margin: 0, + textAlign: 'center' + }, style); + + var iconCloned = void 0; + var labelStyleIcon = {}; + + if (icon) { + var iconStyles = (0, _simpleAssign2.default)({ + verticalAlign: 'middle', + marginLeft: label && labelPosition !== 'before' ? 12 : 0, + marginRight: label && labelPosition === 'before' ? 12 : 0 + }, icon.props.style); + iconCloned = _react2.default.cloneElement(icon, { + color: icon.props.color || mergedRootStyles.color, + style: iconStyles + }); + + if (labelPosition === 'before') { + labelStyleIcon.paddingRight = 8; + } else { + labelStyleIcon.paddingLeft = 8; + } + } + + var mergedLabelStyles = (0, _simpleAssign2.default)({ + letterSpacing: 0, + textTransform: textTransform, + fontWeight: fontWeight, + fontSize: fontSize + }, labelStyleIcon, labelStyle); + + var labelElement = label ? _react2.default.createElement(_FlatButtonLabel2.default, { label: label, style: mergedLabelStyles }) : undefined; + + // Place label before or after children. + var childrenFragment = labelPosition === 'before' ? { + labelElement: labelElement, + iconCloned: iconCloned, + children: children + } : { + children: children, + iconCloned: iconCloned, + labelElement: labelElement + }; + + var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment); + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + disabled: disabled, + focusRippleColor: buttonRippleColor, + focusRippleOpacity: 0.3, + onKeyboardFocus: this.handleKeyboardFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onTouchStart: this.handleTouchStart, + style: mergedRootStyles, + touchRippleColor: buttonRippleColor, + touchRippleOpacity: 0.3 + }), + enhancedButtonChildren + ); + } + }]); + return FlatButton; +}(_react.Component); + +FlatButton.muiName = 'FlatButton'; +FlatButton.defaultProps = { + disabled: false, + labelStyle: {}, + labelPosition: 'after', + onKeyboardFocus: function onKeyboardFocus() {}, + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + onTouchStart: function onTouchStart() {}, + primary: false, + secondary: false +}; +FlatButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? FlatButton.propTypes = { + /** + * Color of button when mouse is not hovering over it. + */ + backgroundColor: _react.PropTypes.string, + /** + * This is what will be displayed inside the button. + * If a label is specified, the text within the label prop will + * be displayed. Otherwise, the component will expect children + * which will then be displayed. (In our example, + * we are nesting an `<input type="file" />` and a `span` + * that acts as our label to be displayed.) This only + * applies to flat and raised buttons. + */ + children: _react.PropTypes.node, + /** + * Disables the button if set to true. + */ + disabled: _react.PropTypes.bool, + /** + * Color of button when mouse hovers over. + */ + hoverColor: _react.PropTypes.string, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * Use this property to display an icon. + */ + icon: _react.PropTypes.node, + /** + * Label for the button. + */ + label: validateLabel, + /** + * Place label before or after the passed children. + */ + labelPosition: _react.PropTypes.oneOf(['before', 'after']), + /** + * Override the inline-styles of the button's label element. + */ + labelStyle: _react.PropTypes.object, + /** + * Callback function fired when the element is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the element. + * @param {boolean} isKeyboardFocused Indicates whether the element is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * If true, colors button according to + * primaryTextColor from the Theme. + */ + primary: _react.PropTypes.bool, + /** + * Color for the ripple after button is clicked. + */ + rippleColor: _react.PropTypes.string, + /** + * If true, colors button according to secondaryTextColor from the theme. + * The primary prop has precendent if set to true. + */ + secondary: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = FlatButton; + +/***/ }), +/* 767 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var baseTheme = context.muiTheme.baseTheme; + + + return { + root: { + position: 'relative', + paddingLeft: baseTheme.spacing.desktopGutterLess, + paddingRight: baseTheme.spacing.desktopGutterLess, + verticalAlign: 'middle' + } + }; +} + +var FlatButtonLabel = function (_Component) { + (0, _inherits3.default)(FlatButtonLabel, _Component); + + function FlatButtonLabel() { + (0, _classCallCheck3.default)(this, FlatButtonLabel); + return (0, _possibleConstructorReturn3.default)(this, (FlatButtonLabel.__proto__ || (0, _getPrototypeOf2.default)(FlatButtonLabel)).apply(this, arguments)); + } + + (0, _createClass3.default)(FlatButtonLabel, [{ + key: 'render', + value: function render() { + var _props = this.props, + label = _props.label, + style = _props.style; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + 'span', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + label + ); + } + }]); + return FlatButtonLabel; +}(_react.Component); + +FlatButtonLabel.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? FlatButtonLabel.propTypes = { + label: _react.PropTypes.node, + style: _react.PropTypes.object +} : void 0; +exports.default = FlatButtonLabel; + +/***/ }), +/* 768 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SHOP_NAME = undefined; + +var _keys = __webpack_require__(79); + +var _keys2 = _interopRequireDefault(_keys); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _Tab = __webpack_require__(769); + +var _Tab2 = _interopRequireDefault(_Tab); + +var _reactRedux = __webpack_require__(27); + +var _FontIcon = __webpack_require__(317); + +var _FontIcon2 = _interopRequireDefault(_FontIcon); + +var _IconButton = __webpack_require__(95); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _colors = __webpack_require__(57); + +var _Menus = __webpack_require__(96); + +var menus = _interopRequireWildcard(_Menus); + +var _Billing = __webpack_require__(770); + +var _Billing2 = _interopRequireDefault(_Billing); + +var _Options = __webpack_require__(845); + +var _Options2 = _interopRequireDefault(_Options); + +var _Sizes = __webpack_require__(846); + +var _Sizes2 = _interopRequireDefault(_Sizes); + +var _Layout = __webpack_require__(847); + +var _Layout2 = _interopRequireDefault(_Layout); + +var _menu = __webpack_require__(854); + +var _settings = __webpack_require__(855); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SHOP_NAME = exports.SHOP_NAME = 'Supreme'; + +var Supreme = function (_Component) { + (0, _inherits3.default)(Supreme, _Component); + + function Supreme() { + (0, _classCallCheck3.default)(this, Supreme); + return (0, _possibleConstructorReturn3.default)(this, (Supreme.__proto__ || (0, _getPrototypeOf2.default)(Supreme)).apply(this, arguments)); + } + + (0, _createClass3.default)(Supreme, [{ + key: 'getContainerForMenu', + value: function getContainerForMenu(menu) { + var _this2 = this; + + switch (menu) { + case menus.MENU_BILLING: + return _react2.default.createElement(_Billing2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + case menus.MENU_OPTIONS: + return _react2.default.createElement(_Options2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + case menus.MENU_SIZES: + return _react2.default.createElement(_Sizes2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + default: + return null; + } + } + }, { + key: 'strToNumberReducer', + value: function strToNumberReducer(menu, key, value) { + // Don't process values for billing + if (typeof value === 'string' && !isNaN(value) && menu !== menus.MENU_BILLING) { + return +value; + } + return value; + } + }, { + key: 'transform', + value: function transform(menu, obj, reducer) { + var keys = (0, _keys2.default)(obj); + var newObj = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = obj[key]; + newObj[key] = reducer(menu, key, value); + } + return newObj; + } + }, { + key: 'onSubmit', + value: function onSubmit(menu, data) { + var newObj = this.transform(menu, data, this.strToNumberReducer); + this.props.updateSettings(SHOP_NAME, menu, newObj); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + if (this.props.menu == null) { + this.props.changeMenu(Supreme.getDefaultMenu()); + } + } + }, { + key: 'getIconForTabMenu', + value: function getIconForTabMenu(menu) { + var isIncomplete = !this.props.settings[SHOP_NAME] || !this.props.settings[SHOP_NAME][menu]; + var color = isIncomplete ? _colors.red300 : 'white'; + var tip = isIncomplete ? 'This tab hasn\'t been configured yet' : ''; + return _react2.default.createElement( + _IconButton2.default, + { iconStyle: { color: color }, tooltip: tip, tooltipPosition: 'top-center', tooltipStyles: { color: 'white' } }, + _react2.default.createElement( + _FontIcon2.default, + { style: { color: color }, className: 'material-icons' }, + isIncomplete ? 'error' : 'done' + ) + ); + } + }, { + key: 'getTabs', + value: function getTabs() { + var _this3 = this; + + return [_react2.default.createElement(_Tab2.default, { + label: 'Billing', + key: 1, + icon: this.getIconForTabMenu(menus.MENU_BILLING), + value: menus.MENU_BILLING, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_BILLING); + } + }), _react2.default.createElement(_Tab2.default, { + label: 'Options', + key: 2, + icon: this.getIconForTabMenu(menus.MENU_OPTIONS), + value: menus.MENU_OPTIONS, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_OPTIONS); + } + }), _react2.default.createElement(_Tab2.default, { + label: 'Sizes', + key: 3, + icon: this.getIconForTabMenu(menus.MENU_SIZES), + value: menus.MENU_SIZES, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_SIZES); + } + })]; + } + }, { + key: 'render', + value: function render() { + var menu = this.props.menu; + + return _react2.default.createElement( + _Layout2.default, + { title: menu || 'Loading...', tabs: this.getTabs(), currentTab: menu }, + this.getContainerForMenu(menu) + ); + } + }], [{ + key: 'getDefaultMenu', + value: function getDefaultMenu() { + return menus.MENU_BILLING; + } + }]); + return Supreme; +}(_react.Component); + +function mapStateToProps(state) { + return { + menu: state.menu.currentMenu, + settings: state.settings.values + }; +} + +function mapDispatchToProps(dispatch) { + return { + changeMenu: function changeMenu(menu) { + return dispatch((0, _menu.changeMenu)(menu)); + }, + updateSettings: function updateSettings(shop, key, value) { + return dispatch((0, _settings.updateSettings)(shop, key, value)); + } + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Supreme); + +/***/ }), +/* 769 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _EnhancedButton = __webpack_require__(59); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tabs = context.muiTheme.tabs; + + + return { + root: { + color: props.selected ? tabs.selectedTextColor : tabs.textColor, + fontWeight: 500, + fontSize: 14, + width: props.width, + textTransform: 'uppercase', + padding: 0 + }, + button: { + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + justifyContent: 'center', + height: props.label && props.icon ? 72 : 48 + } + }; +} + +var Tab = function (_Component) { + (0, _inherits3.default)(Tab, _Component); + + function Tab() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Tab); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tab.__proto__ || (0, _getPrototypeOf2.default)(Tab)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(_this.props.value, event, _this); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Tab, [{ + key: 'render', + value: function render() { + var _props = this.props, + icon = _props.icon, + index = _props.index, + onActive = _props.onActive, + onTouchTap = _props.onTouchTap, + selected = _props.selected, + label = _props.label, + buttonStyle = _props.buttonStyle, + style = _props.style, + value = _props.value, + width = _props.width, + other = (0, _objectWithoutProperties3.default)(_props, ['icon', 'index', 'onActive', 'onTouchTap', 'selected', 'label', 'buttonStyle', 'style', 'value', 'width']); + + + var styles = getStyles(this.props, this.context); + + var iconElement = void 0; + if (icon && _react2.default.isValidElement(icon)) { + var iconProps = { + style: { + fontSize: 24, + color: styles.root.color, + marginBottom: label ? 5 : 0 + } + }; + // If it's svg icon set color via props + if (icon.type.muiName !== 'FontIcon') { + iconProps.color = styles.root.color; + } + iconElement = _react2.default.cloneElement(icon, iconProps); + } + + var rippleOpacity = 0.3; + var rippleColor = this.context.muiTheme.tabs.selectedTextColor; + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + style: (0, _simpleAssign2.default)(styles.root, style), + focusRippleColor: rippleColor, + touchRippleColor: rippleColor, + focusRippleOpacity: rippleOpacity, + touchRippleOpacity: rippleOpacity, + onTouchTap: this.handleTouchTap + }), + _react2.default.createElement( + 'div', + { style: (0, _simpleAssign2.default)(styles.button, buttonStyle) }, + iconElement, + label + ) + ); + } + }]); + return Tab; +}(_react.Component); + +Tab.muiName = 'Tab'; +Tab.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Tab.propTypes = { + /** + * Override the inline-styles of the button element. + */ + buttonStyle: _react.PropTypes.object, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Sets the icon of the tab, you can pass `FontIcon` or `SvgIcon` elements. + */ + icon: _react.PropTypes.node, + /** + * @ignore + */ + index: _react.PropTypes.any, + /** + * Sets the text value of the tab item to the string specified. + */ + label: _react.PropTypes.node, + /** + * Fired when the active tab changes by touch or tap. + * Use this event to specify any functionality when an active tab changes. + * For example - we are using this to route to home when the third tab becomes active. + * This function will always recieve the active tab as it\'s first argument. + */ + onActive: _react.PropTypes.func, + /** + * @ignore + * This property is overriden by the Tabs component. + */ + onTouchTap: _react.PropTypes.func, + /** + * @ignore + * Defines if the current tab is selected or not. + * The Tabs component is responsible for setting this property. + */ + selected: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * If value prop passed to Tabs component, this value prop is also required. + * It assigns a value to the tab so that it can be selected by the Tabs. + */ + value: _react.PropTypes.any, + /** + * @ignore + * This property is overriden by the Tabs component. + */ + width: _react.PropTypes.string +} : void 0; +exports.default = Tab; + +/***/ }), +/* 770 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reduxForm = __webpack_require__(113); + +var _reactRedux = __webpack_require__(27); + +var _MenuItem = __webpack_require__(129); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +var _RaisedButton = __webpack_require__(200); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _reduxFormMaterialUi = __webpack_require__(201); + +var _Styles = __webpack_require__(80); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _Utils = __webpack_require__(329); + +var Utils = _interopRequireWildcard(_Utils); + +var _FormValidators = __webpack_require__(204); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Menus = __webpack_require__(96); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStatesForCountry(country) { + switch (country) { + case 'USA': + return Utils.usaRegions; + case 'JAPAN': + return Utils.japanRegions; + case 'CANADA': + return Utils.canadaRegions; + default: + return []; + } +} + +var Billing = function Billing(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting, + country = props.country; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'biling-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_name', + validate: Validators.fullName, + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Firstname and Lastname', + hintText: 'Firstname and Lastname', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_email', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Email', + hintText: 'Email', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.email] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_tel', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Phone number', + hintText: 'Phone number', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'bo', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Address', + hintText: 'Address', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_city', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'City', + hintText: 'City', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'order_billing_country', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Country', + hintText: 'Country', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.countries.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); + }) + ) + ), + ['JAPAN', 'USA', 'CANADA'].indexOf(country) !== -1 && _react2.default.createElement( + _reduxForm.Field, + { + name: 'order_billing_state', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'State', + hintText: 'State', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + getStatesForCountry(country).map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_zip', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Zip', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_type', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Credit card type', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + _react2.default.createElement(_MenuItem2.default, { value: 'visa', primaryText: 'Visa' }), + _react2.default.createElement(_MenuItem2.default, { value: 'american_express', primaryText: 'American Express' }), + _react2.default.createElement(_MenuItem2.default, { value: 'master', primaryText: 'Mastercard' }), + _react2.default.createElement(_MenuItem2.default, { value: 'solo', primaryText: 'Solo' }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'cnb', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Credit Card Number', + hintText: 'Credit Card Number', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_month', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Expiry month', + hintText: 'Expiry month', + validate: [Validators.required], + style: _Styles2.default.fields.text + }, + Array.apply(null, new Array(12)).map(function (x, i) { + var month = ++i < 10 ? '0' + i : i; + return _react2.default.createElement(_MenuItem2.default, { key: month, value: month, primaryText: month }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_year', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Expiry year', + hintText: 'Expiry year', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Array.apply(null, new Array(5)).map(function (x, i) { + var year = new Date().getFullYear() + i; + return _react2.default.createElement(_MenuItem2.default, { key: year, value: year, primaryText: year }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'vval', + component: _reduxFormMaterialUi.TextField, + hintText: 'CCV', + floatingLabelText: 'CCV', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; + +var BillingForm = (0, _reduxForm.reduxForm)({ + form: 'billing' +})(Billing); + +Billing.propTypes = { + shop: _react.PropTypes.string.isRequired +}; +var selector = (0, _reduxForm.formValueSelector)('billing'); + +function mapStateToProps(state, ownProps) { + return { + initialValues: (state.settings.values[ownProps.shop] || {})[menus.MENU_BILLING] || {}, + country: selector(state, 'order_billing_country') + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps)(BillingForm); + +/***/ }), +/* 771 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +module.exports = throttle; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47))) + +/***/ }), +/* 772 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(41); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _Paper = __webpack_require__(34); + +var _Paper2 = _interopRequireDefault(_Paper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var targetOrigin = props.targetOrigin; + var open = state.open; + var muiTheme = context.muiTheme; + + var horizontal = targetOrigin.horizontal.replace('middle', 'vertical'); + + return { + root: { + position: 'fixed', + zIndex: muiTheme.zIndex.popover, + opacity: open ? 1 : 0, + transform: open ? 'scale(1, 1)' : 'scale(0, 0)', + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity']), + maxHeight: '100%' + }, + horizontal: { + maxHeight: '100%', + overflowY: 'auto', + transform: open ? 'scaleX(1)' : 'scaleX(0)', + opacity: open ? 1 : 0, + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity']) + }, + vertical: { + opacity: open ? 1 : 0, + transform: open ? 'scaleY(1)' : 'scaleY(0)', + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('500ms', ['transform', 'opacity']) + } + }; +} + +var PopoverAnimationDefault = function (_Component) { + (0, _inherits3.default)(PopoverAnimationDefault, _Component); + + function PopoverAnimationDefault() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, PopoverAnimationDefault); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PopoverAnimationDefault.__proto__ || (0, _getPrototypeOf2.default)(PopoverAnimationDefault)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(PopoverAnimationDefault, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setState({ open: true }); // eslint-disable-line react/no-did-mount-set-state + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + open: nextProps.open + }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + className = _props.className, + style = _props.style, + zDepth = _props.zDepth; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _Paper2.default, + { + style: (0, _simpleAssign2.default)(styles.root, style), + zDepth: zDepth, + className: className + }, + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.horizontal) }, + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.vertical) }, + this.props.children + ) + ) + ); + } + }]); + return PopoverAnimationDefault; +}(_react.Component); + +PopoverAnimationDefault.defaultProps = { + style: {}, + zDepth: 1 +}; +PopoverAnimationDefault.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? PopoverAnimationDefault.propTypes = { + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + targetOrigin: _propTypes2.default.origin.isRequired, + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = PopoverAnimationDefault; + +/***/ }), +/* 773 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** +* Returns a number of pixels from the top of the screen for given dom element. +* +* @param {object} dom element +* @returns {number} A position from the top of the screen in pixels +*/ +var getOffsetTop = exports.getOffsetTop = function getOffsetTop(elem) { + var yPos = elem.offsetTop; + var tempEl = elem.offsetParent; + + while (tempEl != null) { + yPos += tempEl.offsetTop; + tempEl = tempEl.offsetParent; + } + + return yPos; +}; + +var isIOS = exports.isIOS = function isIOS() { + return (/iPad|iPhone|iPod/.test(window.navigator.userAgent) && !window.MSStream + ); +}; + +/***/ }), +/* 774 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationCheck = function NavigationCheck(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' }) + ); +}; +NavigationCheck = (0, _pure2.default)(NavigationCheck); +NavigationCheck.displayName = 'NavigationCheck'; +NavigationCheck.muiName = 'SvgIcon'; + +exports.default = NavigationCheck; + +/***/ }), +/* 775 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.HotKeyHolder = undefined; + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var HotKeyHolder = exports.HotKeyHolder = function () { + function HotKeyHolder() { + var _this = this; + + (0, _classCallCheck3.default)(this, HotKeyHolder); + + this.clear = function () { + _this.timerId = null; + _this.lastKeys = null; + }; + } + + (0, _createClass3.default)(HotKeyHolder, [{ + key: 'append', + value: function append(key) { + clearTimeout(this.timerId); + this.timerId = setTimeout(this.clear, 500); + return this.lastKeys = (this.lastKeys || '') + key; + } + }]); + return HotKeyHolder; +}(); + +/***/ }), +/* 776 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _colorManipulator = __webpack_require__(56); + +var _childUtils = __webpack_require__(127); + +var _EnhancedButton = __webpack_require__(59); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _Paper = __webpack_require__(34); + +var _Paper2 = _interopRequireDefault(_Paper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validateLabel(props, propName, componentName) { + if (false) { + if (!props.children && props.label !== 0 && !props.label && !props.icon) { + return new Error('Required prop label or children or icon was not specified in ' + componentName + '.'); + } + } +} + +function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + button = _context$muiTheme.button, + raisedButton = _context$muiTheme.raisedButton; + var disabled = props.disabled, + disabledBackgroundColor = props.disabledBackgroundColor, + disabledLabelColor = props.disabledLabelColor, + fullWidth = props.fullWidth, + icon = props.icon, + label = props.label, + labelPosition = props.labelPosition, + primary = props.primary, + secondary = props.secondary, + style = props.style; + + + var amount = primary || secondary ? 0.4 : 0.08; + + var backgroundColor = raisedButton.color; + var labelColor = raisedButton.textColor; + + if (disabled) { + backgroundColor = disabledBackgroundColor || raisedButton.disabledColor; + labelColor = disabledLabelColor || raisedButton.disabledTextColor; + } else if (primary) { + backgroundColor = raisedButton.primaryColor; + labelColor = raisedButton.primaryTextColor; + } else if (secondary) { + backgroundColor = raisedButton.secondaryColor; + labelColor = raisedButton.secondaryTextColor; + } else { + if (props.backgroundColor) { + backgroundColor = props.backgroundColor; + } + if (props.labelColor) { + labelColor = props.labelColor; + } + } + + var buttonHeight = style && style.height || button.height; + var borderRadius = 2; + + return { + root: { + display: 'inline-block', + transition: _transitions2.default.easeOut(), + minWidth: fullWidth ? '100%' : button.minWidth + }, + button: { + height: buttonHeight, + lineHeight: buttonHeight + 'px', + width: '100%', + padding: 0, + borderRadius: borderRadius, + transition: _transitions2.default.easeOut(), + backgroundColor: backgroundColor, + // That's the default value for a button but not a link + textAlign: 'center' + }, + label: { + position: 'relative', + opacity: 1, + fontSize: raisedButton.fontSize, + letterSpacing: 0, + textTransform: raisedButton.textTransform || button.textTransform || 'uppercase', + fontWeight: raisedButton.fontWeight, + margin: 0, + userSelect: 'none', + paddingLeft: icon && labelPosition !== 'before' ? 8 : baseTheme.spacing.desktopGutterLess, + paddingRight: icon && labelPosition === 'before' ? 8 : baseTheme.spacing.desktopGutterLess, + color: labelColor + }, + icon: { + verticalAlign: 'middle', + marginLeft: label && labelPosition !== 'before' ? 12 : 0, + marginRight: label && labelPosition === 'before' ? 12 : 0 + }, + overlay: { + height: buttonHeight, + borderRadius: borderRadius, + backgroundColor: (state.keyboardFocused || state.hovered) && !disabled && (0, _colorManipulator.fade)(labelColor, amount), + transition: _transitions2.default.easeOut(), + top: 0 + }, + ripple: { + color: labelColor, + opacity: !(primary || secondary) ? 0.1 : 0.16 + } + }; +} + +var RaisedButton = function (_Component) { + (0, _inherits3.default)(RaisedButton, _Component); + + function RaisedButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RaisedButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RaisedButton.__proto__ || (0, _getPrototypeOf2.default)(RaisedButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + keyboardFocused: false, + touched: false, + initialZDepth: 0, + zDepth: 0 + }, _this.handleMouseDown = function (event) { + // only listen to left clicks + if (event.button === 0) { + _this.setState({ + zDepth: _this.state.initialZDepth + 1 + }); + } + if (_this.props.onMouseDown) { + _this.props.onMouseDown(event); + } + }, _this.handleMouseUp = function (event) { + _this.setState({ + zDepth: _this.state.initialZDepth + }); + if (_this.props.onMouseUp) { + _this.props.onMouseUp(event); + } + }, _this.handleMouseLeave = function (event) { + if (!_this.state.keyboardFocused) { + _this.setState({ + zDepth: _this.state.initialZDepth, + hovered: false + }); + } + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseEnter = function (event) { + if (!_this.state.keyboardFocused && !_this.state.touched) { + _this.setState({ + hovered: true + }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _this.handleTouchStart = function (event) { + _this.setState({ + touched: true, + zDepth: _this.state.initialZDepth + 1 + }); + + if (_this.props.onTouchStart) { + _this.props.onTouchStart(event); + } + }, _this.handleTouchEnd = function (event) { + _this.setState({ + touched: true, + zDepth: _this.state.initialZDepth + }); + + if (_this.props.onTouchEnd) { + _this.props.onTouchEnd(event); + } + }, _this.handleKeyboardFocus = function (event, keyboardFocused) { + var zDepth = keyboardFocused && !_this.props.disabled ? _this.state.initialZDepth + 1 : _this.state.initialZDepth; + + _this.setState({ + zDepth: zDepth, + keyboardFocused: keyboardFocused + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(RaisedButton, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var zDepth = this.props.disabled ? 0 : 1; + this.setState({ + zDepth: zDepth, + initialZDepth: zDepth + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var zDepth = nextProps.disabled ? 0 : 1; + var nextState = { + zDepth: zDepth, + initialZDepth: zDepth + }; + + if (nextProps.disabled) { + nextState.hovered = false; + } + + this.setState(nextState); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + backgroundColor = _props.backgroundColor, + buttonStyle = _props.buttonStyle, + children = _props.children, + className = _props.className, + disabled = _props.disabled, + disabledBackgroundColor = _props.disabledBackgroundColor, + disabledLabelColor = _props.disabledLabelColor, + fullWidth = _props.fullWidth, + icon = _props.icon, + label = _props.label, + labelColor = _props.labelColor, + labelPosition = _props.labelPosition, + labelStyle = _props.labelStyle, + overlayStyle = _props.overlayStyle, + primary = _props.primary, + rippleStyle = _props.rippleStyle, + secondary = _props.secondary, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['backgroundColor', 'buttonStyle', 'children', 'className', 'disabled', 'disabledBackgroundColor', 'disabledLabelColor', 'fullWidth', 'icon', 'label', 'labelColor', 'labelPosition', 'labelStyle', 'overlayStyle', 'primary', 'rippleStyle', 'secondary', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var mergedRippleStyles = (0, _simpleAssign2.default)({}, styles.ripple, rippleStyle); + + var buttonEventHandlers = disabled ? {} : { + onMouseDown: this.handleMouseDown, + onMouseUp: this.handleMouseUp, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd, + onKeyboardFocus: this.handleKeyboardFocus + }; + + var labelElement = label && _react2.default.createElement( + 'span', + { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) }, + label + ); + + var iconCloned = icon && (0, _react.cloneElement)(icon, { + color: icon.props.color || styles.label.color, + style: (0, _simpleAssign2.default)(styles.icon, icon.props.style) + }); + + // Place label before or after children. + var childrenFragment = labelPosition === 'before' ? { + labelElement: labelElement, + iconCloned: iconCloned, + children: children + } : { + children: children, + iconCloned: iconCloned, + labelElement: labelElement + }; + + var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment); + + return _react2.default.createElement( + _Paper2.default, + { + className: className, + style: (0, _simpleAssign2.default)(styles.root, style), + zDepth: this.state.zDepth + }, + _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, buttonEventHandlers, { + ref: 'container', + disabled: disabled, + style: (0, _simpleAssign2.default)(styles.button, buttonStyle), + focusRippleColor: mergedRippleStyles.color, + touchRippleColor: mergedRippleStyles.color, + focusRippleOpacity: mergedRippleStyles.opacity, + touchRippleOpacity: mergedRippleStyles.opacity + }), + _react2.default.createElement( + 'div', + { + ref: 'overlay', + style: prepareStyles((0, _simpleAssign2.default)(styles.overlay, overlayStyle)) + }, + enhancedButtonChildren + ) + ) + ); + } + }]); + return RaisedButton; +}(_react.Component); + +RaisedButton.muiName = 'RaisedButton'; +RaisedButton.defaultProps = { + disabled: false, + labelPosition: 'after', + fullWidth: false, + primary: false, + secondary: false +}; +RaisedButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? RaisedButton.propTypes = { + /** + * Override the default background color for the button, + * but not the default disabled background color + * (use `disabledBackgroundColor` for this). + */ + backgroundColor: _react.PropTypes.string, + /** + * Override the inline-styles of the button element. + */ + buttonStyle: _react.PropTypes.object, + /** + * The content of the button. + * If a label is provided via the `label` prop, the text within the label + * will be displayed in addition to the content provided here. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the button will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the default background color for the button + * when it is disabled. + */ + disabledBackgroundColor: _react.PropTypes.string, + /** + * The color of the button's label when the button is disabled. + */ + disabledLabelColor: _react.PropTypes.string, + /** + * If true, the button will take up the full width of its container. + */ + fullWidth: _react.PropTypes.bool, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * An icon to be displayed within the button. + */ + icon: _react.PropTypes.node, + /** + * The label to be displayed within the button. + * If content is provided via the `children` prop, that content will be + * displayed in addition to the label provided here. + */ + label: validateLabel, + /** + * The color of the button's label. + */ + labelColor: _react.PropTypes.string, + /** + * The position of the button's label relative to the button's `children`. + */ + labelPosition: _react.PropTypes.oneOf(['before', 'after']), + /** + * Override the inline-styles of the button's label element. + */ + labelStyle: _react.PropTypes.object, + /** @ignore */ + onMouseDown: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onMouseUp: _react.PropTypes.func, + /** @ignore */ + onTouchEnd: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * Override the inline style of the button overlay. + */ + overlayStyle: _react.PropTypes.object, + /** + * If true, the button will use the theme's primary color. + */ + primary: _react.PropTypes.bool, + /** + * Override the inline style of the ripple element. + */ + rippleStyle: _react.PropTypes.object, + /** + * If true, the button will use the theme's secondary color. + * If both `secondary` and `primary` are true, the button will use + * the theme's primary color. + */ + secondary: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = RaisedButton; + +/***/ }), +/* 777 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _AutoComplete = __webpack_require__(778); + +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); + +var _createComponent = __webpack_require__(43); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(60); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_AutoComplete2.default, function (_ref) { + var _ref$input = _ref.input, + onChange = _ref$input.onChange, + value = _ref$input.value, + _onNewRequest = _ref.onNewRequest, + dataSourceConfig = _ref.dataSourceConfig, + props = _objectWithoutProperties(_ref, ['input', 'onNewRequest', 'dataSourceConfig']); + + return _extends({}, (0, _mapError2.default)(props), { + dataSourceConfig: dataSourceConfig, + searchText: dataSourceConfig ? value[dataSourceConfig.text] : value, + onNewRequest: function onNewRequest(value) { + onChange((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && dataSourceConfig ? value[dataSourceConfig.value] : value); + if (_onNewRequest) { + _onNewRequest(value); + } + }, + onUpdateInput: function onUpdateInput(value) { + if (!dataSourceConfig) { + onChange(value); + } + } + }); +}); + +/***/ }), +/* 778 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _AutoComplete = __webpack_require__(779); + +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _AutoComplete2.default; + +/***/ }), +/* 779 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _typeof2 = __webpack_require__(92); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _keycode = __webpack_require__(30); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _TextField = __webpack_require__(97); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _Menu = __webpack_require__(785); + +var _Menu2 = _interopRequireDefault(_Menu); + +var _MenuItem = __webpack_require__(129); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +var _Divider = __webpack_require__(786); + +var _Divider2 = _interopRequireDefault(_Divider); + +var _Popover = __webpack_require__(130); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _propTypes = __webpack_require__(41); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var anchorEl = state.anchorEl; + var fullWidth = props.fullWidth; + + + var styles = { + root: { + display: 'inline-block', + position: 'relative', + width: fullWidth ? '100%' : 256 + }, + menu: { + width: '100%' + }, + list: { + display: 'block', + width: fullWidth ? '100%' : 256 + }, + innerDiv: { + overflow: 'hidden' + } + }; + + if (anchorEl && fullWidth) { + styles.popover = { + width: anchorEl.clientWidth + }; + } + + return styles; +} + +var AutoComplete = function (_Component) { + (0, _inherits3.default)(AutoComplete, _Component); + + function AutoComplete() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, AutoComplete); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoComplete.__proto__ || (0, _getPrototypeOf2.default)(AutoComplete)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + anchorEl: null, + focusTextField: true, + open: false, + searchText: undefined + }, _this.handleRequestClose = function () { + // Only take into account the Popover clickAway when we are + // not focusing the TextField. + if (!_this.state.focusTextField) { + _this.close(); + } + }, _this.handleMouseDown = function (event) { + // Keep the TextField focused + event.preventDefault(); + }, _this.handleItemTouchTap = function (event, child) { + var dataSource = _this.props.dataSource; + + var index = parseInt(child.key, 10); + var chosenRequest = dataSource[index]; + var searchText = _this.chosenRequestText(chosenRequest); + + _this.setState({ + searchText: searchText + }, function () { + _this.props.onUpdateInput(searchText, _this.props.dataSource, { + source: 'touchTap' + }); + + _this.timerTouchTapCloseId = setTimeout(function () { + _this.timerTouchTapCloseId = null; + _this.close(); + _this.props.onNewRequest(chosenRequest, index); + }, _this.props.menuCloseDelay); + }); + }, _this.chosenRequestText = function (chosenRequest) { + if (typeof chosenRequest === 'string') { + return chosenRequest; + } else { + return chosenRequest[_this.props.dataSourceConfig.text]; + } + }, _this.handleEscKeyDown = function () { + _this.close(); + }, _this.handleKeyDown = function (event) { + if (_this.props.onKeyDown) _this.props.onKeyDown(event); + + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.close(); + var searchText = _this.state.searchText; + if (searchText !== '') { + _this.props.onNewRequest(searchText, -1); + } + break; + + case 'esc': + _this.close(); + break; + + case 'down': + event.preventDefault(); + _this.setState({ + open: true, + focusTextField: false, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }); + break; + + default: + break; + } + }, _this.handleChange = function (event) { + var searchText = event.target.value; + + // Make sure that we have a new searchText. + // Fix an issue with a Cordova Webview + if (searchText === _this.state.searchText) { + return; + } + + _this.setState({ + searchText: searchText, + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }, function () { + _this.props.onUpdateInput(searchText, _this.props.dataSource, { + source: 'change' + }); + }); + }, _this.handleBlur = function (event) { + if (_this.state.focusTextField && _this.timerTouchTapCloseId === null) { + _this.timerBlurClose = setTimeout(function () { + _this.close(); + }, 0); + } + + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleFocus = function (event) { + if (!_this.state.open && _this.props.openOnFocus) { + _this.setState({ + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }); + } + + _this.setState({ + focusTextField: true + }); + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(AutoComplete, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.requestsList = []; + this.setState({ + open: this.props.open, + searchText: this.props.searchText + }); + this.timerTouchTapCloseId = null; + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.searchText !== nextProps.searchText) { + this.setState({ + searchText: nextProps.searchText + }); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.timerTouchTapCloseId); + clearTimeout(this.timerBlurClose); + } + }, { + key: 'close', + value: function close() { + this.setState({ + open: false, + anchorEl: null + }); + + if (this.props.onClose) { + this.props.onClose(); + } + } + }, { + key: 'blur', + value: function blur() { + this.refs.searchTextField.blur(); + } + }, { + key: 'focus', + value: function focus() { + this.refs.searchTextField.focus(); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + anchorOrigin = _props.anchorOrigin, + animated = _props.animated, + animation = _props.animation, + dataSource = _props.dataSource, + dataSourceConfig = _props.dataSourceConfig, + disableFocusRipple = _props.disableFocusRipple, + errorStyle = _props.errorStyle, + floatingLabelText = _props.floatingLabelText, + filter = _props.filter, + fullWidth = _props.fullWidth, + style = _props.style, + hintText = _props.hintText, + maxSearchResults = _props.maxSearchResults, + menuCloseDelay = _props.menuCloseDelay, + textFieldStyle = _props.textFieldStyle, + menuStyle = _props.menuStyle, + menuProps = _props.menuProps, + listStyle = _props.listStyle, + targetOrigin = _props.targetOrigin, + onClose = _props.onClose, + onNewRequest = _props.onNewRequest, + onUpdateInput = _props.onUpdateInput, + openOnFocus = _props.openOnFocus, + popoverProps = _props.popoverProps, + searchTextProp = _props.searchText, + other = (0, _objectWithoutProperties3.default)(_props, ['anchorOrigin', 'animated', 'animation', 'dataSource', 'dataSourceConfig', 'disableFocusRipple', 'errorStyle', 'floatingLabelText', 'filter', 'fullWidth', 'style', 'hintText', 'maxSearchResults', 'menuCloseDelay', 'textFieldStyle', 'menuStyle', 'menuProps', 'listStyle', 'targetOrigin', 'onClose', 'onNewRequest', 'onUpdateInput', 'openOnFocus', 'popoverProps', 'searchText']); + + var _ref2 = popoverProps || {}, + popoverStyle = _ref2.style, + popoverOther = (0, _objectWithoutProperties3.default)(_ref2, ['style']); + + var _state = this.state, + open = _state.open, + anchorEl = _state.anchorEl, + searchText = _state.searchText, + focusTextField = _state.focusTextField; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + var requestsList = []; + + dataSource.every(function (item, index) { + switch (typeof item === 'undefined' ? 'undefined' : (0, _typeof3.default)(item)) { + case 'string': + if (filter(searchText, item, item)) { + requestsList.push({ + text: item, + value: _react2.default.createElement(_MenuItem2.default, { + innerDivStyle: styles.innerDiv, + value: item, + primaryText: item, + disableFocusRipple: disableFocusRipple, + key: index + }) + }); + } + break; + + case 'object': + if (item && typeof item[_this2.props.dataSourceConfig.text] === 'string') { + var itemText = item[_this2.props.dataSourceConfig.text]; + if (!_this2.props.filter(searchText, itemText, item)) break; + + var itemValue = item[_this2.props.dataSourceConfig.value]; + if (itemValue.type && (itemValue.type.muiName === _MenuItem2.default.muiName || itemValue.type.muiName === _Divider2.default.muiName)) { + requestsList.push({ + text: itemText, + value: _react2.default.cloneElement(itemValue, { + key: index, + disableFocusRipple: disableFocusRipple + }) + }); + } else { + requestsList.push({ + text: itemText, + value: _react2.default.createElement(_MenuItem2.default, { + innerDivStyle: styles.innerDiv, + primaryText: itemText, + disableFocusRipple: disableFocusRipple, + key: index + }) + }); + } + } + break; + + default: + // Do nothing + } + + return !(maxSearchResults && maxSearchResults > 0 && requestsList.length === maxSearchResults); + }); + + this.requestsList = requestsList; + + var menu = open && requestsList.length > 0 && _react2.default.createElement( + _Menu2.default, + (0, _extends3.default)({}, menuProps, { + ref: 'menu', + autoWidth: false, + disableAutoFocus: focusTextField, + onEscKeyDown: this.handleEscKeyDown, + initiallyKeyboardFocused: true, + onItemTouchTap: this.handleItemTouchTap, + onMouseDown: this.handleMouseDown, + style: (0, _simpleAssign2.default)(styles.menu, menuStyle), + listStyle: (0, _simpleAssign2.default)(styles.list, listStyle) + }), + requestsList.map(function (i) { + return i.value; + }) + ); + + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + ref: 'searchTextField', + autoComplete: 'off', + value: searchText, + onChange: this.handleChange, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onKeyDown: this.handleKeyDown, + floatingLabelText: floatingLabelText, + hintText: hintText, + fullWidth: fullWidth, + multiLine: false, + errorStyle: errorStyle, + style: textFieldStyle + })), + _react2.default.createElement( + _Popover2.default, + (0, _extends3.default)({ + style: (0, _simpleAssign2.default)({}, styles.popover, popoverStyle), + canAutoPosition: false, + anchorOrigin: anchorOrigin, + targetOrigin: targetOrigin, + open: open, + anchorEl: anchorEl, + useLayerForClickAway: false, + onRequestClose: this.handleRequestClose, + animated: animated, + animation: animation + }, popoverOther), + menu + ) + ); + } + }]); + return AutoComplete; +}(_react.Component); + +AutoComplete.defaultProps = { + anchorOrigin: { + vertical: 'bottom', + horizontal: 'left' + }, + animated: true, + dataSourceConfig: { + text: 'text', + value: 'value' + }, + disableFocusRipple: true, + filter: function filter(searchText, key) { + return searchText !== '' && key.indexOf(searchText) !== -1; + }, + fullWidth: false, + open: false, + openOnFocus: false, + onUpdateInput: function onUpdateInput() {}, + onNewRequest: function onNewRequest() {}, + searchText: '', + menuCloseDelay: 300, + targetOrigin: { + vertical: 'top', + horizontal: 'left' + } +}; +AutoComplete.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? AutoComplete.propTypes = { + /** + * Location of the anchor for the auto complete. + */ + anchorOrigin: _propTypes2.default.origin, + /** + * If true, the auto complete is animated as it is toggled. + */ + animated: _react.PropTypes.bool, + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * Array of strings or nodes used to populate the list. + */ + dataSource: _react.PropTypes.array.isRequired, + /** + * Config for objects list dataSource. + * + * @typedef {Object} dataSourceConfig + * + * @property {string} text `dataSource` element key used to find a string to be matched for search + * and shown as a `TextField` input value after choosing the result. + * @property {string} value `dataSource` element key used to find a string to be shown in search results. + */ + dataSourceConfig: _react.PropTypes.object, + /** + * Disables focus ripple when true. + */ + disableFocusRipple: _react.PropTypes.bool, + /** + * Override style prop for error. + */ + errorStyle: _react.PropTypes.object, + /** + * The error content to display. + */ + errorText: _react.PropTypes.node, + /** + * Callback function used to filter the auto complete. + * + * @param {string} searchText The text to search for within `dataSource`. + * @param {string} key `dataSource` element, or `text` property on that element if it's not a string. + * @returns {boolean} `true` indicates the auto complete list will include `key` when the input is `searchText`. + */ + filter: _react.PropTypes.func, + /** + * The content to use for adding floating label element. + */ + floatingLabelText: _react.PropTypes.node, + /** + * If true, the field receives the property `width: 100%`. + */ + fullWidth: _react.PropTypes.bool, + /** + * The hint content to display. + */ + hintText: _react.PropTypes.node, + /** + * Override style for list. + */ + listStyle: _react.PropTypes.object, + /** + * The max number of search results to be shown. + * By default it shows all the items which matches filter. + */ + maxSearchResults: _react.PropTypes.number, + /** + * Delay for closing time of the menu. + */ + menuCloseDelay: _react.PropTypes.number, + /** + * Props to be passed to menu. + */ + menuProps: _react.PropTypes.object, + /** + * Override style for menu. + */ + menuStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function fired when the menu is closed. + */ + onClose: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** @ignore */ + onKeyDown: _react.PropTypes.func, + /** + * Callback function that is fired when a list item is selected, or enter is pressed in the `TextField`. + * + * @param {string} chosenRequest Either the `TextField` input value, if enter is pressed in the `TextField`, + * or the text value of the corresponding list item that was selected. + * @param {number} index The index in `dataSource` of the list item selected, or `-1` if enter is pressed in the + * `TextField`. + */ + onNewRequest: _react.PropTypes.func, + /** + * Callback function that is fired when the user updates the `TextField`. + * + * @param {string} searchText The auto-complete's `searchText` value. + * @param {array} dataSource The auto-complete's `dataSource` array. + * @param {object} params Additional information linked the update. + */ + onUpdateInput: _react.PropTypes.func, + /** + * Auto complete menu is open if true. + */ + open: _react.PropTypes.bool, + /** + * If true, the list item is showed when a focus event triggers. + */ + openOnFocus: _react.PropTypes.bool, + /** + * Props to be passed to popover. + */ + popoverProps: _react.PropTypes.object, + /** + * Text being input to auto complete. + */ + searchText: _react.PropTypes.string, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Origin for location of target. + */ + targetOrigin: _propTypes2.default.origin, + /** + * Override the inline-styles of AutoComplete's TextField element. + */ + textFieldStyle: _react.PropTypes.object +} : void 0; + + +AutoComplete.levenshteinDistance = function (searchText, key) { + var current = []; + var prev = void 0; + var value = void 0; + + for (var i = 0; i <= key.length; i++) { + for (var j = 0; j <= searchText.length; j++) { + if (i && j) { + if (searchText.charAt(j - 1) === key.charAt(i - 1)) value = prev;else value = Math.min(current[j], current[j - 1], prev) + 1; + } else { + value = i + j; + } + prev = current[j]; + current[j] = value; + } + } + return current.pop(); +}; + +AutoComplete.noFilter = function () { + return true; +}; + +AutoComplete.defaultFilter = AutoComplete.caseSensitiveFilter = function (searchText, key) { + return searchText !== '' && key.indexOf(searchText) !== -1; +}; + +AutoComplete.caseInsensitiveFilter = function (searchText, key) { + return key.toLowerCase().indexOf(searchText.toLowerCase()) !== -1; +}; + +AutoComplete.levenshteinDistanceFilter = function (distanceLessThan) { + if (distanceLessThan === undefined) { + return AutoComplete.levenshteinDistance; + } else if (typeof distanceLessThan !== 'number') { + throw 'Error: AutoComplete.levenshteinDistanceFilter is a filter generator, not a filter!'; + } + + return function (s, k) { + return AutoComplete.levenshteinDistance(s, k) < distanceLessThan; + }; +}; + +AutoComplete.fuzzyFilter = function (searchText, key) { + var compareString = key.toLowerCase(); + searchText = searchText.toLowerCase(); + + var searchTextIndex = 0; + for (var index = 0; index < key.length; index++) { + if (compareString[index] === searchText[searchTextIndex]) { + searchTextIndex += 1; + } + } + + return searchTextIndex === searchText.length; +}; + +AutoComplete.Item = _MenuItem2.default; +AutoComplete.Divider = _Divider2.default; + +exports.default = AutoComplete; + +/***/ }), +/* 780 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(58); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _EnhancedTextarea = __webpack_require__(781); + +var _EnhancedTextarea2 = _interopRequireDefault(_EnhancedTextarea); + +var _TextFieldHint = __webpack_require__(782); + +var _TextFieldHint2 = _interopRequireDefault(_TextFieldHint); + +var _TextFieldLabel = __webpack_require__(783); + +var _TextFieldLabel2 = _interopRequireDefault(_TextFieldLabel); + +var _TextFieldUnderline = __webpack_require__(784); + +var _TextFieldUnderline2 = _interopRequireDefault(_TextFieldUnderline); + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var getStyles = function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + _context$muiTheme$tex = _context$muiTheme.textField, + floatingLabelColor = _context$muiTheme$tex.floatingLabelColor, + focusColor = _context$muiTheme$tex.focusColor, + textColor = _context$muiTheme$tex.textColor, + disabledTextColor = _context$muiTheme$tex.disabledTextColor, + backgroundColor = _context$muiTheme$tex.backgroundColor, + errorColor = _context$muiTheme$tex.errorColor; + + + var styles = { + root: { + fontSize: 16, + lineHeight: '24px', + width: props.fullWidth ? '100%' : 256, + height: (props.rows - 1) * 24 + (props.floatingLabelText ? 72 : 48), + display: 'inline-block', + position: 'relative', + backgroundColor: backgroundColor, + fontFamily: baseTheme.fontFamily, + transition: _transitions2.default.easeOut('200ms', 'height'), + cursor: props.disabled ? 'not-allowed' : 'auto' + }, + error: { + position: 'relative', + bottom: 2, + fontSize: 12, + lineHeight: '12px', + color: errorColor, + transition: _transitions2.default.easeOut() + }, + floatingLabel: { + color: props.disabled ? disabledTextColor : floatingLabelColor, + pointerEvents: 'none' + }, + input: { + padding: 0, + position: 'relative', + width: '100%', + border: 'none', + outline: 'none', + backgroundColor: 'rgba(0,0,0,0)', + color: props.disabled ? disabledTextColor : textColor, + cursor: 'inherit', + font: 'inherit', + WebkitTapHighlightColor: 'rgba(0,0,0,0)' }, + inputNative: { + appearance: 'textfield' } + }; + + styles.textarea = (0, _simpleAssign2.default)({}, styles.input, { + marginTop: props.floatingLabelText ? 36 : 12, + marginBottom: props.floatingLabelText ? -36 : -12, + boxSizing: 'border-box', + font: 'inherit' + }); + + // Do not assign a height to the textarea as he handles it on his own. + styles.input.height = '100%'; + + if (state.isFocused) { + styles.floatingLabel.color = focusColor; + } + + if (props.floatingLabelText) { + styles.input.boxSizing = 'border-box'; + + if (!props.multiLine) { + styles.input.marginTop = 14; + } + + if (state.errorText) { + styles.error.bottom = !props.multiLine ? styles.error.fontSize + 3 : 3; + } + } + + if (state.errorText) { + if (state.isFocused) { + styles.floatingLabel.color = styles.error.color; + } + } + + return styles; +}; + +/** + * Check if a value is valid to be displayed inside an input. + * + * @param The value to check. + * @returns True if the string provided is valid, false otherwise. + */ +function isValid(value) { + return value !== '' && value !== undefined && value !== null; +} + +var TextField = function (_Component) { + (0, _inherits3.default)(TextField, _Component); + + function TextField() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TextField); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TextField.__proto__ || (0, _getPrototypeOf2.default)(TextField)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + isFocused: false, + errorText: undefined, + hasValue: false + }, _this.handleInputBlur = function (event) { + _this.setState({ isFocused: false }); + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleInputChange = function (event) { + _this.setState({ hasValue: isValid(event.target.value) }); + if (_this.props.onChange) { + _this.props.onChange(event, event.target.value); + } + }, _this.handleInputFocus = function (event) { + if (_this.props.disabled) { + return; + } + _this.setState({ isFocused: true }); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleHeightChange = function (event, height) { + var newHeight = height + 24; + if (_this.props.floatingLabelText) { + newHeight += 24; + } + _reactDom2.default.findDOMNode(_this).style.height = newHeight + 'px'; + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TextField, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + children = _props.children, + name = _props.name, + hintText = _props.hintText, + floatingLabelText = _props.floatingLabelText, + id = _props.id; + + + var propsLeaf = children ? children.props : this.props; + + this.setState({ + errorText: this.props.errorText, + hasValue: isValid(propsLeaf.value) || isValid(propsLeaf.defaultValue) + }); + + false ? (0, _warning2.default)(name || hintText || floatingLabelText || id, 'Material-UI: We don\'t have enough information\n to build a robust unique id for the TextField component. Please provide an id or a name.') : void 0; + + var uniqueId = name + '-' + hintText + '-' + floatingLabelText + '-' + Math.floor(Math.random() * 0xFFFF); + this.uniqueId = uniqueId.replace(/[^A-Za-z0-9-]/gi, ''); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.errorText !== this.props.errorText) { + this.setState({ + errorText: nextProps.errorText + }); + } + + if (nextProps.children && nextProps.children.props) { + nextProps = nextProps.children.props; + } + + if (nextProps.hasOwnProperty('value')) { + var hasValue = isValid(nextProps.value); + + this.setState({ + hasValue: hasValue + }); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + }, { + key: 'blur', + value: function blur() { + if (this.input) { + this.getInputNode().blur(); + } + } + }, { + key: 'focus', + value: function focus() { + if (this.input) { + this.getInputNode().focus(); + } + } + }, { + key: 'select', + value: function select() { + if (this.input) { + this.getInputNode().select(); + } + } + }, { + key: 'getValue', + value: function getValue() { + return this.input ? this.getInputNode().value : undefined; + } + }, { + key: 'getInputNode', + value: function getInputNode() { + return this.props.children || this.props.multiLine ? this.input.getInputNode() : _reactDom2.default.findDOMNode(this.input); + } + }, { + key: '_isControlled', + value: function _isControlled() { + return this.props.hasOwnProperty('value'); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props2 = this.props, + children = _props2.children, + className = _props2.className, + disabled = _props2.disabled, + errorStyle = _props2.errorStyle, + errorText = _props2.errorText, + floatingLabelFixed = _props2.floatingLabelFixed, + floatingLabelFocusStyle = _props2.floatingLabelFocusStyle, + floatingLabelShrinkStyle = _props2.floatingLabelShrinkStyle, + floatingLabelStyle = _props2.floatingLabelStyle, + floatingLabelText = _props2.floatingLabelText, + fullWidth = _props2.fullWidth, + hintText = _props2.hintText, + hintStyle = _props2.hintStyle, + id = _props2.id, + inputStyle = _props2.inputStyle, + multiLine = _props2.multiLine, + onBlur = _props2.onBlur, + onChange = _props2.onChange, + onFocus = _props2.onFocus, + style = _props2.style, + type = _props2.type, + underlineDisabledStyle = _props2.underlineDisabledStyle, + underlineFocusStyle = _props2.underlineFocusStyle, + underlineShow = _props2.underlineShow, + underlineStyle = _props2.underlineStyle, + rows = _props2.rows, + rowsMax = _props2.rowsMax, + textareaStyle = _props2.textareaStyle, + other = (0, _objectWithoutProperties3.default)(_props2, ['children', 'className', 'disabled', 'errorStyle', 'errorText', 'floatingLabelFixed', 'floatingLabelFocusStyle', 'floatingLabelShrinkStyle', 'floatingLabelStyle', 'floatingLabelText', 'fullWidth', 'hintText', 'hintStyle', 'id', 'inputStyle', 'multiLine', 'onBlur', 'onChange', 'onFocus', 'style', 'type', 'underlineDisabledStyle', 'underlineFocusStyle', 'underlineShow', 'underlineStyle', 'rows', 'rowsMax', 'textareaStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var inputId = id || this.uniqueId; + + var errorTextElement = this.state.errorText && _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.error, errorStyle)) }, + this.state.errorText + ); + + var floatingLabelTextElement = floatingLabelText && _react2.default.createElement( + _TextFieldLabel2.default, + { + muiTheme: this.context.muiTheme, + style: (0, _simpleAssign2.default)(styles.floatingLabel, floatingLabelStyle, this.state.isFocused ? floatingLabelFocusStyle : null), + shrinkStyle: floatingLabelShrinkStyle, + htmlFor: inputId, + shrink: this.state.hasValue || this.state.isFocused || floatingLabelFixed, + disabled: disabled + }, + floatingLabelText + ); + + var inputProps = { + id: inputId, + ref: function ref(elem) { + return _this2.input = elem; + }, + disabled: this.props.disabled, + onBlur: this.handleInputBlur, + onChange: this.handleInputChange, + onFocus: this.handleInputFocus + }; + + var childStyleMerged = (0, _simpleAssign2.default)(styles.input, inputStyle); + + var inputElement = void 0; + if (children) { + inputElement = _react2.default.cloneElement(children, (0, _extends3.default)({}, inputProps, children.props, { + style: (0, _simpleAssign2.default)(childStyleMerged, children.props.style) + })); + } else { + inputElement = multiLine ? _react2.default.createElement(_EnhancedTextarea2.default, (0, _extends3.default)({ + style: childStyleMerged, + textareaStyle: (0, _simpleAssign2.default)(styles.textarea, styles.inputNative, textareaStyle), + rows: rows, + rowsMax: rowsMax + }, other, inputProps, { + onHeightChange: this.handleHeightChange + })) : _react2.default.createElement('input', (0, _extends3.default)({ + type: type, + style: prepareStyles((0, _simpleAssign2.default)(styles.inputNative, childStyleMerged)) + }, other, inputProps)); + } + + var rootProps = {}; + + if (children) { + rootProps = other; + } + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, rootProps, { + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }), + floatingLabelTextElement, + hintText ? _react2.default.createElement(_TextFieldHint2.default, { + muiTheme: this.context.muiTheme, + show: !(this.state.hasValue || floatingLabelText && !this.state.isFocused) || !this.state.hasValue && floatingLabelText && floatingLabelFixed && !this.state.isFocused, + style: hintStyle, + text: hintText + }) : null, + inputElement, + underlineShow ? _react2.default.createElement(_TextFieldUnderline2.default, { + disabled: disabled, + disabledStyle: underlineDisabledStyle, + error: !!this.state.errorText, + errorStyle: errorStyle, + focus: this.state.isFocused, + focusStyle: underlineFocusStyle, + muiTheme: this.context.muiTheme, + style: underlineStyle + }) : null, + errorTextElement + ); + } + }]); + return TextField; +}(_react.Component); + +TextField.defaultProps = { + disabled: false, + floatingLabelFixed: false, + multiLine: false, + fullWidth: false, + type: 'text', + underlineShow: true, + rows: 1 +}; +TextField.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TextField.propTypes = { + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The text string to use for the default value. + */ + defaultValue: _react.PropTypes.any, + /** + * Disables the text field if set to true. + */ + disabled: _react.PropTypes.bool, + /** + * The style object to use to override error styles. + */ + errorStyle: _react.PropTypes.object, + /** + * The error content to display. + */ + errorText: _react.PropTypes.node, + /** + * If true, the floating label will float even when there is no value. + */ + floatingLabelFixed: _react.PropTypes.bool, + /** + * The style object to use to override floating label styles when focused. + */ + floatingLabelFocusStyle: _react.PropTypes.object, + /** + * The style object to use to override floating label styles when shrunk. + */ + floatingLabelShrinkStyle: _react.PropTypes.object, + /** + * The style object to use to override floating label styles. + */ + floatingLabelStyle: _react.PropTypes.object, + /** + * The content to use for the floating label element. + */ + floatingLabelText: _react.PropTypes.node, + /** + * If true, the field receives the property width 100%. + */ + fullWidth: _react.PropTypes.bool, + /** + * Override the inline-styles of the TextField's hint text element. + */ + hintStyle: _react.PropTypes.object, + /** + * The hint content to display. + */ + hintText: _react.PropTypes.node, + /** + * The id prop for the text field. + */ + id: _react.PropTypes.string, + /** + * Override the inline-styles of the TextField's input element. + * When multiLine is false: define the style of the input element. + * When multiLine is true: define the style of the container of the textarea. + */ + inputStyle: _react.PropTypes.object, + /** + * If true, a textarea element will be rendered. + * The textarea also grows and shrinks according to the number of lines. + */ + multiLine: _react.PropTypes.bool, + /** + * Name applied to the input. + */ + name: _react.PropTypes.string, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function that is fired when the textfield's value changes. + * + * @param {object} event Change event targeting the text field. + * @param {string} newValue The new value of the text field. + */ + onChange: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Number of rows to display when multiLine option is set to true. + */ + rows: _react.PropTypes.number, + /** + * Maximum number of rows to display when + * multiLine option is set to true. + */ + rowsMax: _react.PropTypes.number, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of the TextField's textarea element. + * The TextField use either a textarea or an input, + * this property has effects only when multiLine is true. + */ + textareaStyle: _react.PropTypes.object, + /** + * Specifies the type of input to display + * such as "password" or "text". + */ + type: _react.PropTypes.string, + /** + * Override the inline-styles of the + * TextField's underline element when disabled. + */ + underlineDisabledStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the TextField's + * underline element when focussed. + */ + underlineFocusStyle: _react.PropTypes.object, + /** + * If true, shows the underline for the text field. + */ + underlineShow: _react.PropTypes.bool, + /** + * Override the inline-styles of the TextField's underline element. + */ + underlineStyle: _react.PropTypes.object, + /** + * The value of the text field. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = TextField; + +/***/ }), +/* 781 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(42); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var rowsHeight = 24; + +function getStyles(props, context, state) { + return { + root: { + position: 'relative' }, + textarea: { + height: state.height, + width: '100%', + resize: 'none', + font: 'inherit', + padding: 0, + cursor: 'inherit' + }, + shadow: { + resize: 'none', + // Overflow also needed to here to remove the extra row + // added to textareas in Firefox. + overflow: 'hidden', + // Visibility needed to hide the extra text area on ipads + visibility: 'hidden', + position: 'absolute', + height: 'initial' + } + }; +} + +var EnhancedTextarea = function (_Component) { + (0, _inherits3.default)(EnhancedTextarea, _Component); + + function EnhancedTextarea() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, EnhancedTextarea); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedTextarea.__proto__ || (0, _getPrototypeOf2.default)(EnhancedTextarea)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + height: null + }, _this.handleResize = function (event) { + _this.syncHeightWithShadow(undefined, event); + }, _this.handleChange = function (event) { + _this.syncHeightWithShadow(event.target.value); + + if (_this.props.hasOwnProperty('valueLink')) { + _this.props.valueLink.requestChange(event.target.value); + } + + if (_this.props.onChange) { + _this.props.onChange(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(EnhancedTextarea, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + height: this.props.rows * rowsHeight + }); + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + this.syncHeightWithShadow(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== this.props.value) { + this.syncHeightWithShadow(nextProps.value); + } + } + }, { + key: 'getInputNode', + value: function getInputNode() { + return this.refs.input; + } + }, { + key: 'setValue', + value: function setValue(value) { + this.getInputNode().value = value; + this.syncHeightWithShadow(value); + } + }, { + key: 'syncHeightWithShadow', + value: function syncHeightWithShadow(newValue, event) { + var shadow = this.refs.shadow; + + if (newValue !== undefined) { + shadow.value = newValue; + } + + var newHeight = shadow.scrollHeight; + + // Guarding for jsdom, where scrollHeight isn't present. + // See https://github.com/tmpvar/jsdom/issues/1013 + if (newHeight === undefined) return; + + if (this.props.rowsMax >= this.props.rows) { + newHeight = Math.min(this.props.rowsMax * rowsHeight, newHeight); + } + + newHeight = Math.max(newHeight, rowsHeight); + + if (this.state.height !== newHeight) { + this.setState({ + height: newHeight + }); + + if (this.props.onHeightChange) { + this.props.onHeightChange(event, newHeight); + } + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + onChange = _props.onChange, + onHeightChange = _props.onHeightChange, + rows = _props.rows, + rowsMax = _props.rowsMax, + shadowStyle = _props.shadowStyle, + style = _props.style, + textareaStyle = _props.textareaStyle, + valueLink = _props.valueLink, + other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'onHeightChange', 'rows', 'rowsMax', 'shadowStyle', 'style', 'textareaStyle', 'valueLink']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var rootStyles = (0, _simpleAssign2.default)(styles.root, style); + var textareaStyles = (0, _simpleAssign2.default)(styles.textarea, textareaStyle); + var shadowStyles = (0, _simpleAssign2.default)({}, textareaStyles, styles.shadow, shadowStyle); + + if (this.props.hasOwnProperty('valueLink')) { + other.value = this.props.valueLink.value; + } + + return _react2.default.createElement( + 'div', + { style: prepareStyles(rootStyles) }, + _react2.default.createElement(_reactEventListener2.default, { target: 'window', onResize: this.handleResize }), + _react2.default.createElement('textarea', { + ref: 'shadow', + style: prepareStyles(shadowStyles), + tabIndex: '-1', + rows: this.props.rows, + defaultValue: this.props.defaultValue, + readOnly: true, + value: this.props.value, + valueLink: this.props.valueLink + }), + _react2.default.createElement('textarea', (0, _extends3.default)({}, other, { + ref: 'input', + rows: this.props.rows, + style: prepareStyles(textareaStyles), + onChange: this.handleChange + })) + ); + } + }]); + return EnhancedTextarea; +}(_react.Component); + +EnhancedTextarea.defaultProps = { + rows: 1 +}; +EnhancedTextarea.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? EnhancedTextarea.propTypes = { + defaultValue: _react.PropTypes.any, + disabled: _react.PropTypes.bool, + onChange: _react.PropTypes.func, + onHeightChange: _react.PropTypes.func, + rows: _react.PropTypes.number, + rowsMax: _react.PropTypes.number, + shadowStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + textareaStyle: _react.PropTypes.object, + value: _react.PropTypes.string, + valueLink: _react.PropTypes.object +} : void 0; +exports.default = EnhancedTextarea; + +/***/ }), +/* 782 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props) { + var hintColor = props.muiTheme.textField.hintColor, + show = props.show; + + + return { + root: { + position: 'absolute', + opacity: show ? 1 : 0, + color: hintColor, + transition: _transitions2.default.easeOut(), + bottom: 12 + } + }; +} + +var TextFieldHint = function TextFieldHint(props) { + var prepareStyles = props.muiTheme.prepareStyles, + style = props.style, + text = props.text; + + + var styles = getStyles(props); + + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + text + ); +}; + + false ? TextFieldHint.propTypes = { + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * True if the hint text should be visible. + */ + show: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The hint text displayed. + */ + text: _react.PropTypes.node +} : void 0; + +TextFieldHint.defaultProps = { + show: true +}; + +exports.default = TextFieldHint; + +/***/ }), +/* 783 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props) { + var defaultStyles = { + position: 'absolute', + lineHeight: '22px', + top: 38, + transition: _transitions2.default.easeOut(), + zIndex: 1, // Needed to display label above Chrome's autocomplete field background + transform: 'scale(1) translate(0, 0)', + transformOrigin: 'left top', + pointerEvents: 'auto', + userSelect: 'none' + }; + + var shrinkStyles = props.shrink ? (0, _simpleAssign2.default)({ + transform: 'scale(0.75) translate(0, -28px)', + pointerEvents: 'none' + }, props.shrinkStyle) : null; + + return { + root: (0, _simpleAssign2.default)(defaultStyles, props.style, shrinkStyles) + }; +} + +var TextFieldLabel = function TextFieldLabel(props) { + var muiTheme = props.muiTheme, + className = props.className, + children = props.children, + htmlFor = props.htmlFor, + onTouchTap = props.onTouchTap; + var prepareStyles = muiTheme.prepareStyles; + + var styles = getStyles(props); + + return _react2.default.createElement( + 'label', + { + className: className, + style: prepareStyles(styles.root), + htmlFor: htmlFor, + onTouchTap: onTouchTap + }, + children + ); +}; + + false ? TextFieldLabel.propTypes = { + /** + * The label contents. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Disables the label if set to true. + */ + disabled: _react.PropTypes.bool, + /** + * The id of the target element that this label should refer to. + */ + htmlFor: _react.PropTypes.string, + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * Callback function for when the label is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the text field label. + */ + onTouchTap: _react.PropTypes.func, + /** + * True if the floating label should shrink. + */ + shrink: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element when shrunk. + */ + shrinkStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +TextFieldLabel.defaultProps = { + disabled: false, + shrink: false +}; + +exports.default = TextFieldLabel; + +/***/ }), +/* 784 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var propTypes = { + /** + * True if the parent `TextField` is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` is disabled. + */ + disabledStyle: _react.PropTypes.object, + /** + * True if the parent `TextField` has an error. + */ + error: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` has an error. + */ + errorStyle: _react.PropTypes.object, + /** + * True if the parent `TextField` is focused. + */ + focus: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` is focused. + */ + focusStyle: _react.PropTypes.object, + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +}; + +var defaultProps = { + disabled: false, + disabledStyle: {}, + error: false, + errorStyle: {}, + focus: false, + focusStyle: {}, + style: {} +}; + +var TextFieldUnderline = function TextFieldUnderline(props) { + var disabled = props.disabled, + disabledStyle = props.disabledStyle, + error = props.error, + errorStyle = props.errorStyle, + focus = props.focus, + focusStyle = props.focusStyle, + muiTheme = props.muiTheme, + style = props.style; + var errorStyleColor = errorStyle.color; + var prepareStyles = muiTheme.prepareStyles, + _muiTheme$textField = muiTheme.textField, + borderColor = _muiTheme$textField.borderColor, + disabledTextColor = _muiTheme$textField.disabledTextColor, + errorColor = _muiTheme$textField.errorColor, + focusColor = _muiTheme$textField.focusColor; + + + var styles = { + root: { + borderTop: 'none', + borderLeft: 'none', + borderRight: 'none', + borderBottom: 'solid 1px', + borderColor: borderColor, + bottom: 8, + boxSizing: 'content-box', + margin: 0, + position: 'absolute', + width: '100%' + }, + disabled: { + borderBottom: 'dotted 2px', + borderColor: disabledTextColor + }, + focus: { + borderBottom: 'solid 2px', + borderColor: focusColor, + transform: 'scaleX(0)', + transition: _transitions2.default.easeOut() + }, + error: { + borderColor: errorStyleColor ? errorStyleColor : errorColor, + transform: 'scaleX(1)' + } + }; + + var underline = (0, _simpleAssign2.default)({}, styles.root, style); + var focusedUnderline = (0, _simpleAssign2.default)({}, underline, styles.focus, focusStyle); + + if (disabled) underline = (0, _simpleAssign2.default)({}, underline, styles.disabled, disabledStyle); + if (focus) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, { transform: 'scaleX(1)' }); + if (error) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, styles.error); + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement('hr', { style: prepareStyles(underline) }), + _react2.default.createElement('hr', { style: prepareStyles(focusedUnderline) }) + ); +}; + + false ? TextFieldUnderline.propTypes = propTypes : void 0; +TextFieldUnderline.defaultProps = defaultProps; + +exports.default = TextFieldUnderline; + +/***/ }), +/* 785 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.MenuItem = exports.Menu = undefined; + +var _Menu2 = __webpack_require__(199); + +var _Menu3 = _interopRequireDefault(_Menu2); + +var _MenuItem2 = __webpack_require__(129); + +var _MenuItem3 = _interopRequireDefault(_MenuItem2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.Menu = _Menu3.default; +exports.MenuItem = _MenuItem3.default; +exports.default = _Menu3.default; + +/***/ }), +/* 786 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Divider = __webpack_require__(787); + +var _Divider2 = _interopRequireDefault(_Divider); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Divider2.default; + +/***/ }), +/* 787 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Divider = function Divider(props, context) { + var inset = props.inset, + style = props.style, + other = (0, _objectWithoutProperties3.default)(props, ['inset', 'style']); + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + prepareStyles = _context$muiTheme.prepareStyles; + + + var styles = { + root: { + margin: 0, + marginTop: -1, + marginLeft: inset ? 72 : 0, + height: 1, + border: 'none', + backgroundColor: baseTheme.palette.borderColor + } + }; + + return _react2.default.createElement('hr', (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) })); +}; + +Divider.muiName = 'Divider'; + + false ? Divider.propTypes = { + /** + * If true, the `Divider` will be indented. + */ + inset: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +Divider.defaultProps = { + inset: false +}; + +Divider.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +exports.default = Divider; + +/***/ }), +/* 788 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _Checkbox = __webpack_require__(789); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +var _createComponent = __webpack_require__(43); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_Checkbox2.default, function (_ref) { + var _ref$input = _ref.input, + onChange = _ref$input.onChange, + value = _ref$input.value, + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']), + meta = _ref.meta, + _onCheck = _ref.onCheck, + defaultChecked = _ref.defaultChecked, + props = _objectWithoutProperties(_ref, ['input', 'meta', 'onCheck', 'defaultChecked']); + + return _extends({}, inputProps, props, { + checked: value ? true : false, + onCheck: function onCheck(event, isInputChecked) { + onChange(isInputChecked); + if (_onCheck) { + _onCheck(isInputChecked); + } + } + }); +}); + +/***/ }), +/* 789 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Checkbox = __webpack_require__(790); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Checkbox2.default; + +/***/ }), +/* 790 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _EnhancedSwitch = __webpack_require__(202); + +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _checkBoxOutlineBlank = __webpack_require__(791); + +var _checkBoxOutlineBlank2 = _interopRequireDefault(_checkBoxOutlineBlank); + +var _checkBox = __webpack_require__(792); + +var _checkBox2 = _interopRequireDefault(_checkBox); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var checkbox = context.muiTheme.checkbox; + + var checkboxSize = 24; + + return { + icon: { + height: checkboxSize, + width: checkboxSize + }, + check: { + position: 'absolute', + opacity: 0, + transform: 'scale(0)', + transitionOrigin: '50% 50%', + transition: _transitions2.default.easeOut('450ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('0ms', 'transform', '450ms'), + fill: checkbox.checkedColor + }, + checkWhenSwitched: { + opacity: 1, + transform: 'scale(1)', + transition: _transitions2.default.easeOut('0ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('800ms', 'transform', '0ms') + }, + checkWhenDisabled: { + fill: checkbox.disabledColor + }, + box: { + position: 'absolute', + opacity: 1, + fill: checkbox.boxColor, + transition: _transitions2.default.easeOut('1000ms', 'opacity', '200ms') + }, + boxWhenSwitched: { + opacity: 0, + transition: _transitions2.default.easeOut('650ms', 'opacity', '150ms'), + fill: checkbox.checkedColor + }, + boxWhenDisabled: { + fill: props.checked ? 'transparent' : checkbox.disabledColor + }, + label: { + color: props.disabled ? checkbox.labelDisabledColor : checkbox.labelColor + } + }; +} + +var Checkbox = function (_Component) { + (0, _inherits3.default)(Checkbox, _Component); + + function Checkbox() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Checkbox); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Checkbox.__proto__ || (0, _getPrototypeOf2.default)(Checkbox)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + switched: false + }, _this.handleStateChange = function (newSwitched) { + _this.setState({ + switched: newSwitched + }); + }, _this.handleCheck = function (event, isInputChecked) { + if (_this.props.onCheck) { + _this.props.onCheck(event, isInputChecked); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Checkbox, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + checked = _props.checked, + defaultChecked = _props.defaultChecked, + valueLink = _props.valueLink; + + + if (checked || defaultChecked || valueLink && valueLink.value) { + this.setState({ + switched: true + }); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.checked !== nextProps.checked) { + this.setState({ + switched: nextProps.checked + }); + } + } + }, { + key: 'isChecked', + value: function isChecked() { + return this.refs.enhancedSwitch.isSwitched(); + } + }, { + key: 'setChecked', + value: function setChecked(newCheckedValue) { + this.refs.enhancedSwitch.setSwitched(newCheckedValue); + } + }, { + key: 'render', + value: function render() { + var _props2 = this.props, + iconStyle = _props2.iconStyle, + onCheck = _props2.onCheck, + checkedIcon = _props2.checkedIcon, + uncheckedIcon = _props2.uncheckedIcon, + other = (0, _objectWithoutProperties3.default)(_props2, ['iconStyle', 'onCheck', 'checkedIcon', 'uncheckedIcon']); + + var styles = getStyles(this.props, this.context); + var boxStyles = (0, _simpleAssign2.default)(styles.box, this.state.switched && styles.boxWhenSwitched, iconStyle, this.props.disabled && styles.boxWhenDisabled); + var checkStyles = (0, _simpleAssign2.default)(styles.check, this.state.switched && styles.checkWhenSwitched, iconStyle, this.props.disabled && styles.checkWhenDisabled); + + var checkedElement = checkedIcon ? _react2.default.cloneElement(checkedIcon, { + style: (0, _simpleAssign2.default)(checkStyles, checkedIcon.props.style) + }) : _react2.default.createElement(_checkBox2.default, { + style: checkStyles + }); + + var unCheckedElement = uncheckedIcon ? _react2.default.cloneElement(uncheckedIcon, { + style: (0, _simpleAssign2.default)(boxStyles, uncheckedIcon.props.style) + }) : _react2.default.createElement(_checkBoxOutlineBlank2.default, { + style: boxStyles + }); + + var checkboxElement = _react2.default.createElement( + 'div', + null, + unCheckedElement, + checkedElement + ); + + var rippleColor = this.state.switched ? checkStyles.fill : boxStyles.fill; + var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle); + + var labelStyle = (0, _simpleAssign2.default)(styles.label, this.props.labelStyle); + + var enhancedSwitchProps = { + ref: 'enhancedSwitch', + inputType: 'checkbox', + switched: this.state.switched, + switchElement: checkboxElement, + rippleColor: rippleColor, + iconStyle: mergedIconStyle, + onSwitch: this.handleCheck, + labelStyle: labelStyle, + onParentShouldUpdate: this.handleStateChange, + labelPosition: this.props.labelPosition + }; + + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps)); + } + }]); + return Checkbox; +}(_react.Component); + +Checkbox.defaultProps = { + labelPosition: 'right', + disabled: false +}; +Checkbox.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Checkbox.propTypes = { + /** + * Checkbox is checked if true. + */ + checked: _react.PropTypes.bool, + /** + * The SvgIcon to use for the checked state. + * This is useful to create icon toggles. + */ + checkedIcon: _react.PropTypes.element, + /** + * The default state of our checkbox component. + * **Warning:** This cannot be used in conjunction with `checked`. + * Decide between using a controlled or uncontrolled input element and remove one of these props. + * More info: https://fb.me/react-controlled-components + */ + defaultChecked: _react.PropTypes.bool, + /** + * Disabled if true. + */ + disabled: _react.PropTypes.bool, + /** + * Overrides the inline-styles of the icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Overrides the inline-styles of the input element. + */ + inputStyle: _react.PropTypes.object, + /** + * Where the label will be placed next to the checkbox. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * Overrides the inline-styles of the Checkbox element label. + */ + labelStyle: _react.PropTypes.object, + /** + * Callback function that is fired when the checkbox is checked. + * + * @param {object} event `change` event targeting the underlying checkbox `input`. + * @param {boolean} isInputChecked The `checked` value of the underlying checkbox `input`. + */ + onCheck: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The SvgIcon to use for the unchecked state. + * This is useful to create icon toggles. + */ + uncheckedIcon: _react.PropTypes.element, + /** + * ValueLink for when using controlled checkbox. + */ + valueLink: _react.PropTypes.object +} : void 0; +exports.default = Checkbox; + +/***/ }), +/* 791 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ToggleCheckBoxOutlineBlank = function ToggleCheckBoxOutlineBlank(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z' }) + ); +}; +ToggleCheckBoxOutlineBlank = (0, _pure2.default)(ToggleCheckBoxOutlineBlank); +ToggleCheckBoxOutlineBlank.displayName = 'ToggleCheckBoxOutlineBlank'; +ToggleCheckBoxOutlineBlank.muiName = 'SvgIcon'; + +exports.default = ToggleCheckBoxOutlineBlank; + +/***/ }), +/* 792 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ToggleCheckBox = function ToggleCheckBox(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z' }) + ); +}; +ToggleCheckBox = (0, _pure2.default)(ToggleCheckBox); +ToggleCheckBox.displayName = 'ToggleCheckBox'; +ToggleCheckBox.muiName = 'SvgIcon'; + +exports.default = ToggleCheckBox; + +/***/ }), +/* 793 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _DatePicker = __webpack_require__(794); + +var _DatePicker2 = _interopRequireDefault(_DatePicker); + +var _createComponent = __webpack_require__(43); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(60); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_DatePicker2.default, function (_ref) { + var _ref$input = _ref.input, + onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onBlur']), + defaultDate = _ref.defaultDate, + _onChange = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'defaultDate', 'onChange']); + + return _extends({}, inputProps, (0, _mapError2.default)(props), { + onChange: function onChange(event, value) { + inputProps.onChange(value); + if (_onChange) { + _onChange(value); + } + } + }); +}); + +/***/ }), +/* 794 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _DatePicker = __webpack_require__(795); + +var _DatePicker2 = _interopRequireDefault(_DatePicker); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _DatePicker2.default; + +/***/ }), +/* 795 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _dateUtils = __webpack_require__(81); + +var _DatePickerDialog = __webpack_require__(796); + +var _DatePickerDialog2 = _interopRequireDefault(_DatePickerDialog); + +var _TextField = __webpack_require__(97); + +var _TextField2 = _interopRequireDefault(_TextField); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DatePicker = function (_Component) { + (0, _inherits3.default)(DatePicker, _Component); + + function DatePicker() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DatePicker); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePicker.__proto__ || (0, _getPrototypeOf2.default)(DatePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + date: undefined + }, _this.handleAccept = function (date) { + if (!_this.isControlled()) { + _this.setState({ + date: date + }); + } + if (_this.props.onChange) { + _this.props.onChange(null, date); + } + }, _this.handleFocus = function (event) { + event.target.blur(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + + if (!_this.props.disabled) { + setTimeout(function () { + _this.openDialog(); + }, 0); + } + }, _this.formatDate = function (date) { + if (_this.props.locale) { + var DateTimeFormat = _this.props.DateTimeFormat || _dateUtils.dateTimeFormat; + return new DateTimeFormat(_this.props.locale, { + day: 'numeric', + month: 'numeric', + year: 'numeric' + }).format(date); + } else { + return (0, _dateUtils.formatIso)(date); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DatePicker, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + date: this.isControlled() ? this.getControlledDate() : this.props.defaultDate + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.isControlled()) { + var newDate = this.getControlledDate(nextProps); + if (!(0, _dateUtils.isEqualDate)(this.state.date, newDate)) { + this.setState({ + date: newDate + }); + } + } + } + }, { + key: 'getDate', + value: function getDate() { + return this.state.date; + } + + /** + * Open the date-picker dialog programmatically from a parent. + */ + + }, { + key: 'openDialog', + value: function openDialog() { + /** + * if the date is not selected then set it to new date + * (get the current system date while doing so) + * else set it to the currently selected date + */ + if (this.state.date !== undefined) { + this.setState({ + dialogDate: this.getDate() + }, this.refs.dialogWindow.show); + } else { + this.setState({ + dialogDate: new Date() + }, this.refs.dialogWindow.show); + } + } + + /** + * Alias for `openDialog()` for an api consistent with TextField. + */ + + }, { + key: 'focus', + value: function focus() { + this.openDialog(); + } + }, { + key: 'isControlled', + value: function isControlled() { + return this.props.hasOwnProperty('value'); + } + }, { + key: 'getControlledDate', + value: function getControlledDate() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; + + if (props.value instanceof Date) { + return props.value; + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + autoOk = _props.autoOk, + cancelLabel = _props.cancelLabel, + className = _props.className, + container = _props.container, + defaultDate = _props.defaultDate, + dialogContainerStyle = _props.dialogContainerStyle, + disableYearSelection = _props.disableYearSelection, + firstDayOfWeek = _props.firstDayOfWeek, + formatDateProp = _props.formatDate, + locale = _props.locale, + maxDate = _props.maxDate, + minDate = _props.minDate, + mode = _props.mode, + okLabel = _props.okLabel, + onDismiss = _props.onDismiss, + onFocus = _props.onFocus, + onShow = _props.onShow, + onTouchTap = _props.onTouchTap, + shouldDisableDate = _props.shouldDisableDate, + style = _props.style, + textFieldStyle = _props.textFieldStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'className', 'container', 'defaultDate', 'dialogContainerStyle', 'disableYearSelection', 'firstDayOfWeek', 'formatDate', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onDismiss', 'onFocus', 'onShow', 'onTouchTap', 'shouldDisableDate', 'style', 'textFieldStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var formatDate = formatDateProp || this.formatDate; + + return _react2.default.createElement( + 'div', + { className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + onFocus: this.handleFocus, + onTouchTap: this.handleTouchTap, + ref: 'input', + style: textFieldStyle, + value: this.state.date ? formatDate(this.state.date) : '' + })), + _react2.default.createElement(_DatePickerDialog2.default, { + DateTimeFormat: DateTimeFormat, + autoOk: autoOk, + cancelLabel: cancelLabel, + container: container, + containerStyle: dialogContainerStyle, + disableYearSelection: disableYearSelection, + firstDayOfWeek: firstDayOfWeek, + initialDate: this.state.dialogDate, + locale: locale, + maxDate: maxDate, + minDate: minDate, + mode: mode, + okLabel: okLabel, + onAccept: this.handleAccept, + onShow: onShow, + onDismiss: onDismiss, + ref: 'dialogWindow', + shouldDisableDate: shouldDisableDate + }) + ); + } + }]); + return DatePicker; +}(_react.Component); + +DatePicker.defaultProps = { + autoOk: false, + container: 'dialog', + disabled: false, + disableYearSelection: false, + firstDayOfWeek: 1, + style: {} +}; +DatePicker.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DatePicker.propTypes = { + /** + * Constructor for date formatting for the specified `locale`. + * The constructor must follow this specification: ECMAScript Internationalization API 1.0 (ECMA-402). + * `Intl.DateTimeFormat` is supported by most modern browsers, see http://caniuse.com/#search=intl, + * otherwise https://github.com/andyearnshaw/Intl.js is a good polyfill. + * + * By default, a built-in `DateTimeFormat` is used which supports the 'en-US' `locale`. + */ + DateTimeFormat: _react.PropTypes.func, + /** + * If true, automatically accept and close the picker on select a date. + */ + autoOk: _react.PropTypes.bool, + /** + * Override the default text of the 'Cancel' button. + */ + cancelLabel: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Used to control how the Date Picker will be displayed when the input field is focused. + * `dialog` (default) displays the DatePicker as a dialog with a modal. + * `inline` displays the DatePicker below the input field (similar to auto complete). + */ + container: _react.PropTypes.oneOf(['dialog', 'inline']), + /** + * This is the initial date value of the component. + * If either `value` or `valueLink` is provided they will override this + * prop with `value` taking precedence. + */ + defaultDate: _react.PropTypes.object, + /** + * Override the inline-styles of DatePickerDialog's Container element. + */ + dialogContainerStyle: _react.PropTypes.object, + /** + * Disables the year selection in the date picker. + */ + disableYearSelection: _react.PropTypes.bool, + /** + * Disables the DatePicker. + */ + disabled: _react.PropTypes.bool, + /** + * Used to change the first day of week. It varies from + * Saturday to Monday between different locales. + * The allowed range is 0 (Sunday) to 6 (Saturday). + * The default is `1`, Monday, as per ISO 8601. + */ + firstDayOfWeek: _react.PropTypes.number, + /** + * This function is called to format the date displayed in the input field, and should return a string. + * By default if no `locale` and `DateTimeFormat` is provided date objects are formatted to ISO 8601 YYYY-MM-DD. + * + * @param {object} date Date object to be formatted. + * @returns {any} The formatted date. + */ + formatDate: _react.PropTypes.func, + /** + * Locale used for formatting the `DatePicker` date strings. Other than for 'en-US', you + * must provide a `DateTimeFormat` that supports the chosen `locale`. + */ + locale: _react.PropTypes.string, + /** + * The ending of a range of valid dates. The range includes the endDate. + * The default value is current date + 100 years. + */ + maxDate: _react.PropTypes.object, + /** + * The beginning of a range of valid dates. The range includes the startDate. + * The default value is current date - 100 years. + */ + minDate: _react.PropTypes.object, + /** + * Tells the component to display the picker in portrait or landscape mode. + */ + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + /** + * Override the default text of the 'OK' button. + */ + okLabel: _react.PropTypes.node, + /** + * Callback function that is fired when the date value changes. + * + * @param {null} null Since there is no particular event associated with the change, + * the first argument will always be null. + * @param {object} date The new date. + */ + onChange: _react.PropTypes.func, + /** + * Callback function that is fired when the Date Picker's dialog is dismissed. + */ + onDismiss: _react.PropTypes.func, + /** + * Callback function that is fired when the Date Picker's `TextField` gains focus. + */ + onFocus: _react.PropTypes.func, + /** + * Callback function that is fired when the Date Picker's dialog is shown. + */ + onShow: _react.PropTypes.func, + /** + * Callback function that is fired when a touch tap event occurs on the Date Picker's `TextField`. + * + * @param {object} event TouchTap event targeting the `TextField`. + */ + onTouchTap: _react.PropTypes.func, + /** + * Callback function used to determine if a day's entry should be disabled on the calendar. + * + * @param {object} day Date object of a day. + * @returns {boolean} Indicates whether the day should be disabled. + */ + shouldDisableDate: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of DatePicker's TextField element. + */ + textFieldStyle: _react.PropTypes.object, + /** + * Sets the date for the Date Picker programmatically. + */ + value: _react.PropTypes.object +} : void 0; +exports.default = DatePicker; + +/***/ }), +/* 796 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(42); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(30); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _Calendar = __webpack_require__(797); + +var _Calendar2 = _interopRequireDefault(_Calendar); + +var _Dialog = __webpack_require__(323); + +var _Dialog2 = _interopRequireDefault(_Dialog); + +var _Popover = __webpack_require__(130); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _PopoverAnimationVertical = __webpack_require__(324); + +var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical); + +var _dateUtils = __webpack_require__(81); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DatePickerDialog = function (_Component) { + (0, _inherits3.default)(DatePickerDialog, _Component); + + function DatePickerDialog() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DatePickerDialog); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(DatePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.show = function () { + if (_this.props.onShow && !_this.state.open) { + _this.props.onShow(); + } + + _this.setState({ + open: true + }); + }, _this.dismiss = function () { + if (_this.props.onDismiss && _this.state.open) { + _this.props.onDismiss(); + } + + _this.setState({ + open: false + }); + }, _this.handleTouchTapDay = function () { + if (_this.props.autoOk) { + setTimeout(_this.handleTouchTapOk, 300); + } + }, _this.handleTouchTapCancel = function () { + _this.dismiss(); + }, _this.handleRequestClose = function () { + _this.dismiss(); + }, _this.handleTouchTapOk = function () { + if (_this.props.onAccept && !_this.refs.calendar.isSelectedDateDisabled()) { + _this.props.onAccept(_this.refs.calendar.getSelectedDate()); + } + + _this.setState({ + open: false + }); + }, _this.handleWindowKeyUp = function (event) { + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.handleTouchTapOk(); + break; + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DatePickerDialog, [{ + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + autoOk = _props.autoOk, + cancelLabel = _props.cancelLabel, + container = _props.container, + containerStyle = _props.containerStyle, + disableYearSelection = _props.disableYearSelection, + initialDate = _props.initialDate, + firstDayOfWeek = _props.firstDayOfWeek, + locale = _props.locale, + maxDate = _props.maxDate, + minDate = _props.minDate, + mode = _props.mode, + okLabel = _props.okLabel, + onAccept = _props.onAccept, + onDismiss = _props.onDismiss, + onShow = _props.onShow, + shouldDisableDate = _props.shouldDisableDate, + style = _props.style, + animation = _props.animation, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'container', 'containerStyle', 'disableYearSelection', 'initialDate', 'firstDayOfWeek', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onAccept', 'onDismiss', 'onShow', 'shouldDisableDate', 'style', 'animation']); + var open = this.state.open; + + + var styles = { + dialogContent: { + width: mode === 'landscape' ? 479 : 310 + }, + dialogBodyContent: { + padding: 0, + minHeight: mode === 'landscape' ? 330 : 434, + minWidth: mode === 'landscape' ? 479 : 310 + } + }; + + var Container = container === 'inline' ? _Popover2.default : _Dialog2.default; + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { ref: 'root' }), + _react2.default.createElement( + Container, + { + anchorEl: this.refs.root // For Popover + , animation: animation || _PopoverAnimationVertical2.default // For Popover + , bodyStyle: styles.dialogBodyContent, + contentStyle: styles.dialogContent, + ref: 'dialog', + repositionOnUpdate: true, + open: open, + onRequestClose: this.handleRequestClose, + style: (0, _simpleAssign2.default)(styles.dialogBodyContent, containerStyle) + }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyUp: this.handleWindowKeyUp + }), + _react2.default.createElement(_Calendar2.default, { + autoOk: autoOk, + DateTimeFormat: DateTimeFormat, + cancelLabel: cancelLabel, + disableYearSelection: disableYearSelection, + firstDayOfWeek: firstDayOfWeek, + initialDate: initialDate, + locale: locale, + onTouchTapDay: this.handleTouchTapDay, + maxDate: maxDate, + minDate: minDate, + mode: mode, + open: open, + ref: 'calendar', + onTouchTapCancel: this.handleTouchTapCancel, + onTouchTapOk: this.handleTouchTapOk, + okLabel: okLabel, + shouldDisableDate: shouldDisableDate + }) + ) + ); + } + }]); + return DatePickerDialog; +}(_react.Component); + +DatePickerDialog.defaultProps = { + DateTimeFormat: _dateUtils.dateTimeFormat, + cancelLabel: 'Cancel', + container: 'dialog', + locale: 'en-US', + okLabel: 'OK' +}; +DatePickerDialog.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DatePickerDialog.propTypes = { + DateTimeFormat: _react.PropTypes.func, + animation: _react.PropTypes.func, + autoOk: _react.PropTypes.bool, + cancelLabel: _react.PropTypes.node, + container: _react.PropTypes.oneOf(['dialog', 'inline']), + containerStyle: _react.PropTypes.object, + disableYearSelection: _react.PropTypes.bool, + firstDayOfWeek: _react.PropTypes.number, + initialDate: _react.PropTypes.object, + locale: _react.PropTypes.string, + maxDate: _react.PropTypes.object, + minDate: _react.PropTypes.object, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + okLabel: _react.PropTypes.node, + onAccept: _react.PropTypes.func, + onDismiss: _react.PropTypes.func, + onShow: _react.PropTypes.func, + open: _react.PropTypes.bool, + shouldDisableDate: _react.PropTypes.func, + style: _react.PropTypes.object +} : void 0; +exports.default = DatePickerDialog; + +/***/ }), +/* 797 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _toConsumableArray2 = __webpack_require__(189); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(42); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(30); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _CalendarActionButtons = __webpack_require__(798); + +var _CalendarActionButtons2 = _interopRequireDefault(_CalendarActionButtons); + +var _CalendarMonth = __webpack_require__(799); + +var _CalendarMonth2 = _interopRequireDefault(_CalendarMonth); + +var _CalendarYear = __webpack_require__(801); + +var _CalendarYear2 = _interopRequireDefault(_CalendarYear); + +var _CalendarToolbar = __webpack_require__(803); + +var _CalendarToolbar2 = _interopRequireDefault(_CalendarToolbar); + +var _DateDisplay = __webpack_require__(807); + +var _DateDisplay2 = _interopRequireDefault(_DateDisplay); + +var _SlideIn = __webpack_require__(203); + +var _SlideIn2 = _interopRequireDefault(_SlideIn); + +var _dateUtils = __webpack_require__(81); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var daysArray = [].concat((0, _toConsumableArray3.default)(Array(7))); + +var Calendar = function (_Component) { + (0, _inherits3.default)(Calendar, _Component); + + function Calendar() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Calendar); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Calendar.__proto__ || (0, _getPrototypeOf2.default)(Calendar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + displayDate: undefined, + displayMonthDay: true, + selectedDate: undefined, + transitionDirection: 'left', + transitionEnter: true + }, _this.handleTouchTapDay = function (event, date) { + _this.setSelectedDate(date); + if (_this.props.onTouchTapDay) _this.props.onTouchTapDay(event, date); + }, _this.handleMonthChange = function (months) { + _this.setState({ + transitionDirection: months >= 0 ? 'left' : 'right', + displayDate: (0, _dateUtils.addMonths)(_this.state.displayDate, months) + }); + }, _this.handleTouchTapYear = function (event, year) { + var date = (0, _dateUtils.cloneDate)(_this.state.selectedDate); + date.setFullYear(year); + _this.setSelectedDate(date, event); + _this.handleTouchTapDateDisplayMonthDay(); + }, _this.handleTouchTapDateDisplayMonthDay = function () { + _this.setState({ + displayMonthDay: true + }); + }, _this.handleTouchTapDateDisplayYear = function () { + _this.setState({ + displayMonthDay: false + }); + }, _this.handleWindowKeyDown = function (event) { + if (_this.props.open) { + switch ((0, _keycode2.default)(event)) { + case 'up': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(-1); + } else if (event.shiftKey) { + _this.addSelectedMonths(-1); + } else { + _this.addSelectedDays(-7); + } + break; + + case 'down': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(1); + } else if (event.shiftKey) { + _this.addSelectedMonths(1); + } else { + _this.addSelectedDays(7); + } + break; + + case 'right': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(1); + } else if (event.shiftKey) { + _this.addSelectedMonths(1); + } else { + _this.addSelectedDays(1); + } + break; + + case 'left': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(-1); + } else if (event.shiftKey) { + _this.addSelectedMonths(-1); + } else { + _this.addSelectedDays(-1); + } + break; + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Calendar, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + displayDate: (0, _dateUtils.getFirstDayOfMonth)(this.props.initialDate), + selectedDate: this.props.initialDate + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.initialDate !== this.props.initialDate) { + var date = nextProps.initialDate || new Date(); + this.setState({ + displayDate: (0, _dateUtils.getFirstDayOfMonth)(date), + selectedDate: date + }); + } + } + }, { + key: 'getSelectedDate', + value: function getSelectedDate() { + return this.state.selectedDate; + } + }, { + key: 'isSelectedDateDisabled', + value: function isSelectedDateDisabled() { + if (!this.state.displayMonthDay) { + return false; + } + + return this.refs.calendar.isSelectedDateDisabled(); + } + }, { + key: 'addSelectedDays', + value: function addSelectedDays(days) { + this.setSelectedDate((0, _dateUtils.addDays)(this.state.selectedDate, days)); + } + }, { + key: 'addSelectedMonths', + value: function addSelectedMonths(months) { + this.setSelectedDate((0, _dateUtils.addMonths)(this.state.selectedDate, months)); + } + }, { + key: 'addSelectedYears', + value: function addSelectedYears(years) { + this.setSelectedDate((0, _dateUtils.addYears)(this.state.selectedDate, years)); + } + }, { + key: 'setDisplayDate', + value: function setDisplayDate(date, newSelectedDate) { + var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(date); + var direction = newDisplayDate > this.state.displayDate ? 'left' : 'right'; + + if (newDisplayDate !== this.state.displayDate) { + this.setState({ + displayDate: newDisplayDate, + transitionDirection: direction, + selectedDate: newSelectedDate || this.state.selectedDate + }); + } + } + }, { + key: 'setSelectedDate', + value: function setSelectedDate(date) { + var adjustedDate = date; + if ((0, _dateUtils.isBeforeDate)(date, this.props.minDate)) { + adjustedDate = this.props.minDate; + } else if ((0, _dateUtils.isAfterDate)(date, this.props.maxDate)) { + adjustedDate = this.props.maxDate; + } + + var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(adjustedDate); + if (newDisplayDate !== this.state.displayDate) { + this.setDisplayDate(newDisplayDate, adjustedDate); + } else { + this.setState({ + selectedDate: adjustedDate + }); + } + } + }, { + key: 'getToolbarInteractions', + value: function getToolbarInteractions() { + return { + prevMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.minDate) > 0, + nextMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.maxDate) < 0 + }; + } + }, { + key: 'yearSelector', + value: function yearSelector() { + if (!this.props.disableYearSelection) { + return _react2.default.createElement(_CalendarYear2.default, { + key: 'years', + DateTimeFormat: this.props.DateTimeFormat, + locale: this.props.locale, + onTouchTapYear: this.handleTouchTapYear, + selectedDate: this.state.selectedDate, + minDate: this.props.minDate, + maxDate: this.props.maxDate + }); + } + } + }, { + key: 'render', + value: function render() { + var prepareStyles = this.context.muiTheme.prepareStyles; + + var toolbarInteractions = this.getToolbarInteractions(); + var isLandscape = this.props.mode === 'landscape'; + var calendarTextColor = this.context.muiTheme.datePicker.calendarTextColor; + + + var styles = { + root: { + color: calendarTextColor, + userSelect: 'none', + width: isLandscape ? 479 : 310 + }, + calendar: { + display: 'flex', + flexDirection: 'column' + }, + calendarContainer: { + display: 'flex', + alignContent: 'space-between', + justifyContent: 'space-between', + flexDirection: 'column', + fontSize: 12, + fontWeight: 400, + padding: '0px 8px', + transition: _transitions2.default.easeOut() + }, + yearContainer: { + display: 'flex', + justifyContent: 'space-between', + flexDirection: 'column', + height: 272, + marginTop: 10, + overflow: 'hidden', + width: 310 + }, + weekTitle: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'space-between', + fontWeight: '500', + height: 20, + lineHeight: '15px', + opacity: '0.5', + textAlign: 'center' + }, + weekTitleDay: { + width: 42 + }, + transitionSlide: { + height: 214 + } + }; + + var weekTitleDayStyle = prepareStyles(styles.weekTitleDay); + + var _props = this.props, + minDate = _props.minDate, + maxDate = _props.maxDate, + cancelLabel = _props.cancelLabel, + DateTimeFormat = _props.DateTimeFormat, + firstDayOfWeek = _props.firstDayOfWeek, + locale = _props.locale, + okLabel = _props.okLabel, + onTouchTapCancel = _props.onTouchTapCancel, + onTouchTapOk = _props.onTouchTapOk; + + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyDown: this.handleWindowKeyDown + }), + _react2.default.createElement(_DateDisplay2.default, { + DateTimeFormat: DateTimeFormat, + disableYearSelection: this.props.disableYearSelection, + onTouchTapMonthDay: this.handleTouchTapDateDisplayMonthDay, + onTouchTapYear: this.handleTouchTapDateDisplayYear, + locale: locale, + monthDaySelected: this.state.displayMonthDay, + mode: this.props.mode, + selectedDate: this.state.selectedDate + }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.calendar) }, + this.state.displayMonthDay && _react2.default.createElement( + 'div', + { style: prepareStyles(styles.calendarContainer) }, + _react2.default.createElement(_CalendarToolbar2.default, { + DateTimeFormat: DateTimeFormat, + locale: locale, + displayDate: this.state.displayDate, + onMonthChange: this.handleMonthChange, + prevMonth: toolbarInteractions.prevMonth, + nextMonth: toolbarInteractions.nextMonth + }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.weekTitle) }, + daysArray.map(function (event, i) { + return _react2.default.createElement( + 'span', + { key: i, style: weekTitleDayStyle }, + (0, _dateUtils.localizedWeekday)(DateTimeFormat, locale, i, firstDayOfWeek) + ); + }) + ), + _react2.default.createElement( + _SlideIn2.default, + { direction: this.state.transitionDirection, style: styles.transitionSlide }, + _react2.default.createElement(_CalendarMonth2.default, { + DateTimeFormat: DateTimeFormat, + locale: locale, + displayDate: this.state.displayDate, + firstDayOfWeek: this.props.firstDayOfWeek, + key: this.state.displayDate.toDateString(), + minDate: minDate, + maxDate: maxDate, + onTouchTapDay: this.handleTouchTapDay, + ref: 'calendar', + selectedDate: this.state.selectedDate, + shouldDisableDate: this.props.shouldDisableDate + }) + ) + ), + !this.state.displayMonthDay && _react2.default.createElement( + 'div', + { style: prepareStyles(styles.yearContainer) }, + this.yearSelector() + ), + okLabel && _react2.default.createElement(_CalendarActionButtons2.default, { + autoOk: this.props.autoOk, + cancelLabel: cancelLabel, + okLabel: okLabel, + onTouchTapCancel: onTouchTapCancel, + onTouchTapOk: onTouchTapOk + }) + ) + ); + } + }]); + return Calendar; +}(_react.Component); + +Calendar.defaultProps = { + DateTimeFormat: _dateUtils.dateTimeFormat, + disableYearSelection: false, + initialDate: new Date(), + locale: 'en-US', + minDate: (0, _dateUtils.addYears)(new Date(), -100), + maxDate: (0, _dateUtils.addYears)(new Date(), 100) +}; +Calendar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Calendar.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + autoOk: _react.PropTypes.bool, + cancelLabel: _react.PropTypes.node, + disableYearSelection: _react.PropTypes.bool, + firstDayOfWeek: _react.PropTypes.number, + initialDate: _react.PropTypes.object, + locale: _react.PropTypes.string.isRequired, + maxDate: _react.PropTypes.object, + minDate: _react.PropTypes.object, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + okLabel: _react.PropTypes.node, + onTouchTapCancel: _react.PropTypes.func, + onTouchTapDay: _react.PropTypes.func, + onTouchTapOk: _react.PropTypes.func, + open: _react.PropTypes.bool, + shouldDisableDate: _react.PropTypes.func +} : void 0; +exports.default = Calendar; + +/***/ }), +/* 798 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _FlatButton = __webpack_require__(198); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CalendarActionButton = function (_Component) { + (0, _inherits3.default)(CalendarActionButton, _Component); + + function CalendarActionButton() { + (0, _classCallCheck3.default)(this, CalendarActionButton); + return (0, _possibleConstructorReturn3.default)(this, (CalendarActionButton.__proto__ || (0, _getPrototypeOf2.default)(CalendarActionButton)).apply(this, arguments)); + } + + (0, _createClass3.default)(CalendarActionButton, [{ + key: 'render', + value: function render() { + var _props = this.props, + cancelLabel = _props.cancelLabel, + okLabel = _props.okLabel; + + + var styles = { + root: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'flex-end', + margin: 0, + maxHeight: 48, + padding: 0 + }, + flatButtons: { + fontsize: 14, + margin: '4px 8px 8px 0px', + maxHeight: 36, + minWidth: 64, + padding: 0 + } + }; + + return _react2.default.createElement( + 'div', + { style: styles.root }, + _react2.default.createElement(_FlatButton2.default, { + label: cancelLabel, + onTouchTap: this.props.onTouchTapCancel, + primary: true, + style: styles.flatButtons + }), + !this.props.autoOk && _react2.default.createElement(_FlatButton2.default, { + disabled: this.refs.calendar !== undefined && this.refs.calendar.isSelectedDateDisabled(), + label: okLabel, + onTouchTap: this.props.onTouchTapOk, + primary: true, + style: styles.flatButtons + }) + ); + } + }]); + return CalendarActionButton; +}(_react.Component); + + false ? CalendarActionButton.propTypes = { + autoOk: _react.PropTypes.bool, + cancelLabel: _react.PropTypes.node, + okLabel: _react.PropTypes.node, + onTouchTapCancel: _react.PropTypes.func, + onTouchTapOk: _react.PropTypes.func +} : void 0; +exports.default = CalendarActionButton; + +/***/ }), +/* 799 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _dateUtils = __webpack_require__(81); + +var _DayButton = __webpack_require__(800); + +var _DayButton2 = _interopRequireDefault(_DayButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + root: { + display: 'flex', + flexDirection: 'column', + justifyContent: 'flex-start', + fontWeight: 400, + height: 228, + lineHeight: 2, + position: 'relative', + textAlign: 'center', + MozPaddingStart: 0 + }, + week: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'space-around', + height: 34, + marginBottom: 2 + } +}; + +var CalendarMonth = function (_Component) { + (0, _inherits3.default)(CalendarMonth, _Component); + + function CalendarMonth() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, CalendarMonth); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarMonth.__proto__ || (0, _getPrototypeOf2.default)(CalendarMonth)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapDay = function (event, date) { + if (_this.props.onTouchTapDay) { + _this.props.onTouchTapDay(event, date); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(CalendarMonth, [{ + key: 'isSelectedDateDisabled', + value: function isSelectedDateDisabled() { + return this.selectedDateDisabled; + } + }, { + key: 'shouldDisableDate', + value: function shouldDisableDate(day) { + if (day === null) return false; + var disabled = !(0, _dateUtils.isBetweenDates)(day, this.props.minDate, this.props.maxDate); + if (!disabled && this.props.shouldDisableDate) disabled = this.props.shouldDisableDate(day); + + return disabled; + } + }, { + key: 'getWeekElements', + value: function getWeekElements() { + var _this2 = this; + + var weekArray = (0, _dateUtils.getWeekArray)(this.props.displayDate, this.props.firstDayOfWeek); + + return weekArray.map(function (week, i) { + return _react2.default.createElement( + 'div', + { key: i, style: styles.week }, + _this2.getDayElements(week, i) + ); + }, this); + } + }, { + key: 'getDayElements', + value: function getDayElements(week, i) { + var _this3 = this; + + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + locale = _props.locale, + selectedDate = _props.selectedDate; + + + return week.map(function (day, j) { + var isSameDate = (0, _dateUtils.isEqualDate)(selectedDate, day); + var disabled = _this3.shouldDisableDate(day); + var selected = !disabled && isSameDate; + + if (isSameDate) { + _this3.selectedDateDisabled = disabled; + } + + return _react2.default.createElement(_DayButton2.default, { + DateTimeFormat: DateTimeFormat, + locale: locale, + date: day, + disabled: disabled, + key: 'db' + (i + j), + onTouchTap: _this3.handleTouchTapDay, + selected: selected + }); + }, this); + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement( + 'div', + { style: styles.root }, + this.getWeekElements() + ); + } + }]); + return CalendarMonth; +}(_react.Component); + + false ? CalendarMonth.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + autoOk: _react.PropTypes.bool, + displayDate: _react.PropTypes.object.isRequired, + firstDayOfWeek: _react.PropTypes.number, + locale: _react.PropTypes.string.isRequired, + maxDate: _react.PropTypes.object, + minDate: _react.PropTypes.object, + onTouchTapDay: _react.PropTypes.func, + selectedDate: _react.PropTypes.object.isRequired, + shouldDisableDate: _react.PropTypes.func +} : void 0; +exports.default = CalendarMonth; + +/***/ }), +/* 800 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _dateUtils = __webpack_require__(81); + +var _EnhancedButton = __webpack_require__(59); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var date = props.date, + disabled = props.disabled, + selected = props.selected; + var hover = state.hover; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + datePicker = _context$muiTheme.datePicker; + + + var labelColor = baseTheme.palette.textColor; + var buttonStateOpacity = 0; + var buttonStateTransform = 'scale(0)'; + + if (hover || selected) { + labelColor = datePicker.selectTextColor; + buttonStateOpacity = selected ? 1 : 0.6; + buttonStateTransform = 'scale(1)'; + } else if ((0, _dateUtils.isEqualDate)(date, new Date())) { + labelColor = datePicker.color; + } + + return { + root: { + boxSizing: 'border-box', + fontWeight: '400', + opacity: disabled && '0.4', + padding: '4px 0px', + position: 'relative', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + width: 42 + }, + label: { + color: labelColor, + fontWeight: '400', + position: 'relative' + }, + buttonState: { + backgroundColor: datePicker.selectColor, + borderRadius: '50%', + height: 34, + left: 4, + opacity: buttonStateOpacity, + position: 'absolute', + top: 0, + transform: buttonStateTransform, + transition: _transitions2.default.easeOut(), + width: 34 + } + }; +} + +var DayButton = function (_Component) { + (0, _inherits3.default)(DayButton, _Component); + + function DayButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DayButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DayButton.__proto__ || (0, _getPrototypeOf2.default)(DayButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hover: false + }, _this.handleMouseEnter = function () { + if (!_this.props.disabled) { + _this.setState({ hover: true }); + } + }, _this.handleMouseLeave = function () { + if (!_this.props.disabled) { + _this.setState({ hover: false }); + } + }, _this.handleTouchTap = function (event) { + if (!_this.props.disabled && _this.props.onTouchTap) { + _this.props.onTouchTap(event, _this.props.date); + } + }, _this.handleKeyboardFocus = function (event, keyboardFocused) { + if (!_this.props.disabled && _this.props.onKeyboardFocus) { + _this.props.onKeyboardFocus(event, keyboardFocused, _this.props.date); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DayButton, [{ + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + date = _props.date, + disabled = _props.disabled, + locale = _props.locale, + onTouchTap = _props.onTouchTap, + selected = _props.selected, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'date', 'disabled', 'locale', 'onTouchTap', 'selected']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return date ? _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + disabled: disabled, + disableFocusRipple: true, + disableTouchRipple: true, + onKeyboardFocus: this.handleKeyboardFocus, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onTouchTap: this.handleTouchTap, + style: styles.root + }), + _react2.default.createElement('div', { style: prepareStyles(styles.buttonState) }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + new DateTimeFormat(locale, { + day: 'numeric' + }).format(date) + ) + ) : _react2.default.createElement('span', { style: prepareStyles(styles.root) }); + } + }]); + return DayButton; +}(_react.Component); + +DayButton.defaultProps = { + selected: false, + disabled: false +}; +DayButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DayButton.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + date: _react.PropTypes.object, + disabled: _react.PropTypes.bool, + locale: _react.PropTypes.string.isRequired, + onKeyboardFocus: _react.PropTypes.func, + onTouchTap: _react.PropTypes.func, + selected: _react.PropTypes.bool +} : void 0; +exports.default = DayButton; + +/***/ }), +/* 801 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _YearButton = __webpack_require__(802); + +var _YearButton2 = _interopRequireDefault(_YearButton); + +var _dateUtils = __webpack_require__(81); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CalendarYear = function (_Component) { + (0, _inherits3.default)(CalendarYear, _Component); + + function CalendarYear() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, CalendarYear); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarYear.__proto__ || (0, _getPrototypeOf2.default)(CalendarYear)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapYear = function (event, year) { + if (_this.props.onTouchTapYear) { + _this.props.onTouchTapYear(event, year); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(CalendarYear, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.scrollToSelectedYear(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.scrollToSelectedYear(); + } + }, { + key: 'getYears', + value: function getYears() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + locale = _props.locale, + minDate = _props.minDate, + maxDate = _props.maxDate, + selectedDate = _props.selectedDate; + + + var minYear = minDate.getFullYear(); + var maxYear = maxDate.getFullYear(); + var years = []; + var dateCheck = (0, _dateUtils.cloneDate)(selectedDate); + + for (var year = minYear; year <= maxYear; year++) { + dateCheck.setFullYear(year); + var selected = selectedDate.getFullYear() === year; + var selectedProps = {}; + if (selected) { + selectedProps.ref = 'selectedYearButton'; + } + + var yearFormated = new DateTimeFormat(locale, { + year: 'numeric' + }).format(dateCheck); + + var yearButton = _react2.default.createElement( + _YearButton2.default, + (0, _extends3.default)({ + key: 'yb' + year, + onTouchTap: this.handleTouchTapYear, + selected: selected, + year: year + }, selectedProps), + yearFormated + ); + + years.push(yearButton); + } + + return years; + } + }, { + key: 'scrollToSelectedYear', + value: function scrollToSelectedYear() { + if (this.refs.selectedYearButton === undefined) { + return; + } + + var container = _reactDom2.default.findDOMNode(this); + var yearButtonNode = _reactDom2.default.findDOMNode(this.refs.selectedYearButton); + + var containerHeight = container.clientHeight; + var yearButtonNodeHeight = yearButtonNode.clientHeight || 32; + + var scrollYOffset = yearButtonNode.offsetTop + yearButtonNodeHeight / 2 - containerHeight / 2; + container.scrollTop = scrollYOffset; + } + }, { + key: 'render', + value: function render() { + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + calendarYearBackgroundColor = _context$muiTheme.datePicker.calendarYearBackgroundColor; + + + var styles = { + root: { + backgroundColor: calendarYearBackgroundColor, + height: 'inherit', + lineHeight: '35px', + overflowX: 'hidden', + overflowY: 'scroll', + position: 'relative' + }, + child: { + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + minHeight: '100%' + } + }; + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.child) }, + this.getYears() + ) + ); + } + }]); + return CalendarYear; +}(_react.Component); + +CalendarYear.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? CalendarYear.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + locale: _react.PropTypes.string.isRequired, + maxDate: _react.PropTypes.object.isRequired, + minDate: _react.PropTypes.object.isRequired, + onTouchTapYear: _react.PropTypes.func, + selectedDate: _react.PropTypes.object.isRequired, + wordings: _react.PropTypes.object +} : void 0; +exports.default = CalendarYear; + +/***/ }), +/* 802 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _EnhancedButton = __webpack_require__(59); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var selected = props.selected, + year = props.year; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + datePicker = _context$muiTheme.datePicker; + var hover = state.hover; + + + return { + root: { + boxSizing: 'border-box', + color: year === new Date().getFullYear() && datePicker.color, + display: 'block', + fontSize: 14, + margin: '0 auto', + position: 'relative', + textAlign: 'center', + lineHeight: 'inherit', + WebkitTapHighlightColor: 'rgba(0,0,0,0)' }, + label: { + alignSelf: 'center', + color: hover || selected ? datePicker.color : baseTheme.palette.textColor, + fontSize: selected ? 26 : 17, + fontWeight: hover ? 450 : selected ? 500 : 400, + position: 'relative', + top: -1 + } + }; +} + +var YearButton = function (_Component) { + (0, _inherits3.default)(YearButton, _Component); + + function YearButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, YearButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = YearButton.__proto__ || (0, _getPrototypeOf2.default)(YearButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hover: false + }, _this.handleMouseEnter = function () { + _this.setState({ hover: true }); + }, _this.handleMouseLeave = function () { + _this.setState({ hover: false }); + }, _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event, _this.props.year); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(YearButton, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + onTouchTap = _props.onTouchTap, + selected = _props.selected, + year = _props.year, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'onTouchTap', 'selected', 'year']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + disableFocusRipple: true, + disableTouchRipple: true, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onTouchTap: this.handleTouchTap, + style: styles.root + }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + children + ) + ); + } + }]); + return YearButton; +}(_react.Component); + +YearButton.defaultProps = { + selected: false +}; +YearButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? YearButton.propTypes = { + children: _react.PropTypes.node.isRequired, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + onTouchTap: _react.PropTypes.func, + selected: _react.PropTypes.bool, + year: _react.PropTypes.number.isRequired +} : void 0; +exports.default = YearButton; + +/***/ }), +/* 803 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _IconButton = __webpack_require__(95); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _chevronLeft = __webpack_require__(804); + +var _chevronLeft2 = _interopRequireDefault(_chevronLeft); + +var _chevronRight = __webpack_require__(805); + +var _chevronRight2 = _interopRequireDefault(_chevronRight); + +var _SlideIn = __webpack_require__(203); + +var _SlideIn2 = _interopRequireDefault(_SlideIn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + root: { + display: 'flex', + justifyContent: 'space-between', + backgroundColor: 'inherit', + height: 48 + }, + titleDiv: { + fontSize: 14, + fontWeight: '500', + textAlign: 'center', + width: '100%' + }, + titleText: { + height: 'inherit', + paddingTop: 12 + } +}; + +var CalendarToolbar = function (_Component) { + (0, _inherits3.default)(CalendarToolbar, _Component); + + function CalendarToolbar() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, CalendarToolbar); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarToolbar.__proto__ || (0, _getPrototypeOf2.default)(CalendarToolbar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + transitionDirection: 'up' + }, _this.handleTouchTapPrevMonth = function () { + if (_this.props.onMonthChange) { + _this.props.onMonthChange(-1); + } + }, _this.handleTouchTapNextMonth = function () { + if (_this.props.onMonthChange) { + _this.props.onMonthChange(1); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(CalendarToolbar, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.displayDate !== this.props.displayDate) { + var direction = nextProps.displayDate > this.props.displayDate ? 'left' : 'right'; + this.setState({ + transitionDirection: direction + }); + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + locale = _props.locale, + displayDate = _props.displayDate; + + + var dateTimeFormatted = new DateTimeFormat(locale, { + month: 'long', + year: 'numeric' + }).format(displayDate); + + return _react2.default.createElement( + 'div', + { style: styles.root }, + _react2.default.createElement( + _IconButton2.default, + { + disabled: !this.props.prevMonth, + onTouchTap: this.handleTouchTapPrevMonth + }, + _react2.default.createElement(_chevronLeft2.default, null) + ), + _react2.default.createElement( + _SlideIn2.default, + { + direction: this.state.transitionDirection, + style: styles.titleDiv + }, + _react2.default.createElement( + 'div', + { key: dateTimeFormatted, style: styles.titleText }, + dateTimeFormatted + ) + ), + _react2.default.createElement( + _IconButton2.default, + { + disabled: !this.props.nextMonth, + onTouchTap: this.handleTouchTapNextMonth + }, + _react2.default.createElement(_chevronRight2.default, null) + ) + ); + } + }]); + return CalendarToolbar; +}(_react.Component); + +CalendarToolbar.defaultProps = { + nextMonth: true, + prevMonth: true +}; + false ? CalendarToolbar.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + displayDate: _react.PropTypes.object.isRequired, + locale: _react.PropTypes.string.isRequired, + nextMonth: _react.PropTypes.bool, + onMonthChange: _react.PropTypes.func, + prevMonth: _react.PropTypes.bool +} : void 0; +exports.default = CalendarToolbar; + +/***/ }), +/* 804 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationChevronLeft = function NavigationChevronLeft(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z' }) + ); +}; +NavigationChevronLeft = (0, _pure2.default)(NavigationChevronLeft); +NavigationChevronLeft.displayName = 'NavigationChevronLeft'; +NavigationChevronLeft.muiName = 'SvgIcon'; + +exports.default = NavigationChevronLeft; + +/***/ }), +/* 805 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationChevronRight = function NavigationChevronRight(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z' }) + ); +}; +NavigationChevronRight = (0, _pure2.default)(NavigationChevronRight); +NavigationChevronRight.displayName = 'NavigationChevronRight'; +NavigationChevronRight.muiName = 'SvgIcon'; + +exports.default = NavigationChevronRight; + +/***/ }), +/* 806 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _autoPrefix = __webpack_require__(94); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SlideInChild = function (_Component) { + (0, _inherits3.default)(SlideInChild, _Component); + + function SlideInChild() { + (0, _classCallCheck3.default)(this, SlideInChild); + return (0, _possibleConstructorReturn3.default)(this, (SlideInChild.__proto__ || (0, _getPrototypeOf2.default)(SlideInChild)).apply(this, arguments)); + } + + (0, _createClass3.default)(SlideInChild, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + var x = this.props.direction === 'left' ? '100%' : this.props.direction === 'right' ? '-100%' : '0'; + var y = this.props.direction === 'up' ? '100%' : this.props.direction === 'down' ? '-100%' : '0'; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'translate(' + x + ', ' + y + ')'); + + this.enterTimer = setTimeout(callback, this.props.enterDelay); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = '1'; + _autoPrefix2.default.set(style, 'transform', 'translate(0,0)'); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + var direction = this.props.getLeaveDirection(); + var x = direction === 'left' ? '-100%' : direction === 'right' ? '100%' : '0'; + var y = direction === 'up' ? '-100%' : direction === 'down' ? '100%' : '0'; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'translate(' + x + ', ' + y + ')'); + + this.leaveTimer = setTimeout(callback, 450); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + enterDelay = _props.enterDelay, + getLeaveDirection = _props.getLeaveDirection, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'getLeaveDirection', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'absolute', + height: '100%', + width: '100%', + top: 0, + left: 0, + transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) + }, style); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }), + children + ); + } + }]); + return SlideInChild; +}(_react.Component); + +SlideInChild.defaultProps = { + enterDelay: 0 +}; +SlideInChild.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? SlideInChild.propTypes = { + children: _react.PropTypes.node, + direction: _react.PropTypes.string, + enterDelay: _react.PropTypes.number, + // This callback is needed bacause the direction could change when leaving the DOM + getLeaveDirection: _react.PropTypes.func.isRequired, + style: _react.PropTypes.object +} : void 0; +exports.default = SlideInChild; + +/***/ }), +/* 807 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _SlideIn = __webpack_require__(203); + +var _SlideIn2 = _interopRequireDefault(_SlideIn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var datePicker = context.muiTheme.datePicker; + var selectedYear = state.selectedYear; + + var isLandscape = props.mode === 'landscape'; + + var styles = { + root: { + width: isLandscape ? 165 : '100%', + height: isLandscape ? 330 : 'auto', + float: isLandscape ? 'left' : 'none', + fontWeight: 700, + display: 'inline-block', + backgroundColor: datePicker.selectColor, + borderTopLeftRadius: 2, + borderTopRightRadius: isLandscape ? 0 : 2, + borderBottomLeftRadius: isLandscape ? 2 : 0, + color: datePicker.textColor, + padding: 20, + boxSizing: 'border-box' + }, + monthDay: { + display: 'block', + fontSize: 36, + lineHeight: '36px', + height: props.mode === 'landscape' ? '100%' : 38, + opacity: selectedYear ? 0.7 : 1, + transition: _transitions2.default.easeOut(), + width: '100%', + fontWeight: '500' + }, + monthDayTitle: { + cursor: !selectedYear ? 'default' : 'pointer', + width: '100%', + display: 'block' + }, + year: { + margin: 0, + fontSize: 16, + fontWeight: '500', + lineHeight: '16px', + height: 16, + opacity: selectedYear ? 1 : 0.7, + transition: _transitions2.default.easeOut(), + marginBottom: 10 + }, + yearTitle: { + cursor: props.disableYearSelection ? 'not-allowed' : !selectedYear ? 'pointer' : 'default' + } + }; + + return styles; +} + +var DateDisplay = function (_Component) { + (0, _inherits3.default)(DateDisplay, _Component); + + function DateDisplay() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DateDisplay); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DateDisplay.__proto__ || (0, _getPrototypeOf2.default)(DateDisplay)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + selectedYear: false, + transitionDirection: 'up' + }, _this.handleTouchTapMonthDay = function () { + if (_this.props.onTouchTapMonthDay && _this.state.selectedYear) { + _this.props.onTouchTapMonthDay(); + } + + _this.setState({ selectedYear: false }); + }, _this.handleTouchTapYear = function () { + if (_this.props.onTouchTapYear && !_this.props.disableYearSelection && !_this.state.selectedYear) { + _this.props.onTouchTapYear(); + } + + if (!_this.props.disableYearSelection) { + _this.setState({ selectedYear: true }); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DateDisplay, [{ + key: 'componentWillMount', + value: function componentWillMount() { + if (!this.props.monthDaySelected) { + this.setState({ selectedYear: true }); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.selectedDate !== this.props.selectedDate) { + var direction = nextProps.selectedDate > this.props.selectedDate ? 'up' : 'down'; + this.setState({ + transitionDirection: direction + }); + } + + if (nextProps.monthDaySelected !== undefined) { + this.setState({ + selectedYear: !nextProps.monthDaySelected + }); + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + disableYearSelection = _props.disableYearSelection, + locale = _props.locale, + mode = _props.mode, + monthDaySelected = _props.monthDaySelected, + onTouchTapMonthDay = _props.onTouchTapMonthDay, + onTouchTapYear = _props.onTouchTapYear, + selectedDate = _props.selectedDate, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'disableYearSelection', 'locale', 'mode', 'monthDaySelected', 'onTouchTapMonthDay', 'onTouchTapYear', 'selectedDate', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + var year = new DateTimeFormat(locale, { + year: 'numeric' + }).format(selectedDate); + + var dateTime = new DateTimeFormat(locale, { + month: 'short', + weekday: 'short', + day: '2-digit' + }).format(selectedDate); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(styles.root, style) }), + _react2.default.createElement( + _SlideIn2.default, + { style: styles.year, direction: this.state.transitionDirection }, + _react2.default.createElement( + 'div', + { key: year, style: styles.yearTitle, onTouchTap: this.handleTouchTapYear }, + year + ) + ), + _react2.default.createElement( + _SlideIn2.default, + { style: styles.monthDay, direction: this.state.transitionDirection }, + _react2.default.createElement( + 'div', + { + key: dateTime, + onTouchTap: this.handleTouchTapMonthDay, + style: styles.monthDayTitle + }, + dateTime + ) + ) + ); + } + }]); + return DateDisplay; +}(_react.Component); + +DateDisplay.defaultProps = { + disableYearSelection: false, + monthDaySelected: true +}; +DateDisplay.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DateDisplay.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + disableYearSelection: _react.PropTypes.bool, + locale: _react.PropTypes.string.isRequired, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + monthDaySelected: _react.PropTypes.bool, + onTouchTapMonthDay: _react.PropTypes.func, + onTouchTapYear: _react.PropTypes.func, + selectedDate: _react.PropTypes.object.isRequired, + style: _react.PropTypes.object +} : void 0; +exports.default = DateDisplay; + +/***/ }), +/* 808 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactEventListener = __webpack_require__(42); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(30); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _Overlay = __webpack_require__(319); + +var _Overlay2 = _interopRequireDefault(_Overlay); + +var _RenderToLayer = __webpack_require__(322); + +var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer); + +var _Paper = __webpack_require__(34); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _reactAddonsTransitionGroup = __webpack_require__(128); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TransitionItem = function (_Component) { + (0, _inherits3.default)(TransitionItem, _Component); + + function TransitionItem() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TransitionItem); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TransitionItem.__proto__ || (0, _getPrototypeOf2.default)(TransitionItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + style: {} + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TransitionItem, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimeout); + clearTimeout(this.leaveTimeout); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.componentWillAppear(callback); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + var spacing = this.context.muiTheme.baseTheme.spacing; + + this.setState({ + style: { + opacity: 1, + transform: 'translate(0, ' + spacing.desktopKeylineIncrement + 'px)' + } + }); + + this.enterTimeout = setTimeout(callback, 450); // matches transition duration + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + this.setState({ + style: { + opacity: 0, + transform: 'translate(0, 0)' + } + }); + + this.leaveTimeout = setTimeout(callback, 450); // matches transition duration + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + style = _props.style, + children = _props.children, + other = (0, _objectWithoutProperties3.default)(_props, ['style', 'children']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, this.state.style, style)) }), + children + ); + } + }]); + return TransitionItem; +}(_react.Component); + +TransitionItem.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TransitionItem.propTypes = { + children: _react.PropTypes.node, + style: _react.PropTypes.object +} : void 0; + + +function getStyles(props, context) { + var autoScrollBodyContent = props.autoScrollBodyContent, + open = props.open; + var _context$muiTheme = context.muiTheme, + _context$muiTheme$bas = _context$muiTheme.baseTheme, + spacing = _context$muiTheme$bas.spacing, + palette = _context$muiTheme$bas.palette, + dialog = _context$muiTheme.dialog, + zIndex = _context$muiTheme.zIndex; + + + var gutter = spacing.desktopGutter; + var borderScroll = '1px solid ' + palette.borderColor; + + return { + root: { + position: 'fixed', + boxSizing: 'border-box', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + zIndex: zIndex.dialog, + top: 0, + left: open ? 0 : -10000, + width: '100%', + height: '100%', + transition: open ? _transitions2.default.easeOut('0ms', 'left', '0ms') : _transitions2.default.easeOut('0ms', 'left', '450ms') + }, + content: { + boxSizing: 'border-box', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + transition: _transitions2.default.easeOut(), + position: 'relative', + width: '75%', + maxWidth: spacing.desktopKeylineIncrement * 12, + margin: '0 auto', + zIndex: zIndex.dialog + }, + actionsContainer: { + boxSizing: 'border-box', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + padding: 8, + width: '100%', + textAlign: 'right', + marginTop: autoScrollBodyContent ? -1 : 0, + borderTop: autoScrollBodyContent ? borderScroll : 'none' + }, + overlay: { + zIndex: zIndex.dialogOverlay + }, + title: { + margin: 0, + padding: gutter + 'px ' + gutter + 'px 20px ' + gutter + 'px', + color: palette.textColor, + fontSize: dialog.titleFontSize, + lineHeight: '32px', + fontWeight: 400, + marginBottom: autoScrollBodyContent ? -1 : 0, + borderBottom: autoScrollBodyContent ? borderScroll : 'none' + }, + body: { + fontSize: dialog.bodyFontSize, + color: dialog.bodyColor, + padding: (props.title ? 0 : gutter) + 'px ' + gutter + 'px ' + gutter + 'px', + boxSizing: 'border-box', + overflowY: autoScrollBodyContent ? 'auto' : 'hidden' + } + }; +} + +var DialogInline = function (_Component2) { + (0, _inherits3.default)(DialogInline, _Component2); + + function DialogInline() { + var _ref2; + + var _temp2, _this2, _ret2; + + (0, _classCallCheck3.default)(this, DialogInline); + + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + return _ret2 = (_temp2 = (_this2 = (0, _possibleConstructorReturn3.default)(this, (_ref2 = DialogInline.__proto__ || (0, _getPrototypeOf2.default)(DialogInline)).call.apply(_ref2, [this].concat(args))), _this2), _this2.handleTouchTapOverlay = function () { + _this2.requestClose(false); + }, _this2.handleKeyUp = function (event) { + if ((0, _keycode2.default)(event) === 'esc') { + _this2.requestClose(false); + } + }, _this2.handleResize = function () { + _this2.positionDialog(); + }, _temp2), (0, _possibleConstructorReturn3.default)(_this2, _ret2); + } + + (0, _createClass3.default)(DialogInline, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.positionDialog(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.positionDialog(); + } + }, { + key: 'positionDialog', + value: function positionDialog() { + var _props2 = this.props, + actions = _props2.actions, + autoDetectWindowHeight = _props2.autoDetectWindowHeight, + autoScrollBodyContent = _props2.autoScrollBodyContent, + bodyStyle = _props2.bodyStyle, + open = _props2.open, + repositionOnUpdate = _props2.repositionOnUpdate, + title = _props2.title; + + + if (!open) { + return; + } + + var clientHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; + var container = _reactDom2.default.findDOMNode(this); + var dialogWindow = _reactDom2.default.findDOMNode(this.refs.dialogWindow); + var dialogContent = _reactDom2.default.findDOMNode(this.refs.dialogContent); + var minPaddingTop = 16; + + // Reset the height in case the window was resized. + dialogWindow.style.height = ''; + dialogContent.style.height = ''; + + var dialogWindowHeight = dialogWindow.offsetHeight; + var paddingTop = (clientHeight - dialogWindowHeight) / 2 - 64; + if (paddingTop < minPaddingTop) paddingTop = minPaddingTop; + + // Vertically center the dialog window, but make sure it doesn't + // transition to that position. + if (repositionOnUpdate || !container.style.paddingTop) { + container.style.paddingTop = paddingTop + 'px'; + } + + // Force a height if the dialog is taller than clientHeight + if (autoDetectWindowHeight || autoScrollBodyContent) { + var styles = getStyles(this.props, this.context); + styles.body = (0, _simpleAssign2.default)(styles.body, bodyStyle); + var maxDialogContentHeight = clientHeight - 2 * 64; + + if (title) maxDialogContentHeight -= dialogContent.previousSibling.offsetHeight; + + if (_react2.default.Children.count(actions)) { + maxDialogContentHeight -= dialogContent.nextSibling.offsetHeight; + } + + dialogContent.style.maxHeight = maxDialogContentHeight + 'px'; + } + } + }, { + key: 'requestClose', + value: function requestClose(buttonClicked) { + if (!buttonClicked && this.props.modal) { + return; + } + + if (this.props.onRequestClose) { + this.props.onRequestClose(!!buttonClicked); + } + } + }, { + key: 'render', + value: function render() { + var _props3 = this.props, + actions = _props3.actions, + actionsContainerClassName = _props3.actionsContainerClassName, + actionsContainerStyle = _props3.actionsContainerStyle, + bodyClassName = _props3.bodyClassName, + bodyStyle = _props3.bodyStyle, + children = _props3.children, + className = _props3.className, + contentClassName = _props3.contentClassName, + contentStyle = _props3.contentStyle, + overlayClassName = _props3.overlayClassName, + overlayStyle = _props3.overlayStyle, + open = _props3.open, + titleClassName = _props3.titleClassName, + titleStyle = _props3.titleStyle, + title = _props3.title, + style = _props3.style; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + styles.root = (0, _simpleAssign2.default)(styles.root, style); + styles.content = (0, _simpleAssign2.default)(styles.content, contentStyle); + styles.body = (0, _simpleAssign2.default)(styles.body, bodyStyle); + styles.actionsContainer = (0, _simpleAssign2.default)(styles.actionsContainer, actionsContainerStyle); + styles.overlay = (0, _simpleAssign2.default)(styles.overlay, overlayStyle); + styles.title = (0, _simpleAssign2.default)(styles.title, titleStyle); + + var actionsContainer = _react2.default.Children.count(actions) > 0 && _react2.default.createElement( + 'div', + { className: actionsContainerClassName, style: prepareStyles(styles.actionsContainer) }, + _react2.default.Children.toArray(actions) + ); + + var titleElement = title; + if (_react2.default.isValidElement(title)) { + titleElement = _react2.default.cloneElement(title, { + className: title.props.className || titleClassName, + style: prepareStyles((0, _simpleAssign2.default)(styles.title, title.props.style)) + }); + } else if (typeof title === 'string') { + titleElement = _react2.default.createElement( + 'h3', + { className: titleClassName, style: prepareStyles(styles.title) }, + title + ); + } + + return _react2.default.createElement( + 'div', + { className: className, style: prepareStyles(styles.root) }, + open && _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyUp: this.handleKeyUp, + onResize: this.handleResize + }), + _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + { + component: 'div', + ref: 'dialogWindow', + transitionAppear: true, + transitionAppearTimeout: 450, + transitionEnter: true, + transitionEnterTimeout: 450 + }, + open && _react2.default.createElement( + TransitionItem, + { + className: contentClassName, + style: styles.content + }, + _react2.default.createElement( + _Paper2.default, + { zDepth: 4 }, + titleElement, + _react2.default.createElement( + 'div', + { + ref: 'dialogContent', + className: bodyClassName, + style: prepareStyles(styles.body) + }, + children + ), + actionsContainer + ) + ) + ), + _react2.default.createElement(_Overlay2.default, { + show: open, + className: overlayClassName, + style: styles.overlay, + onTouchTap: this.handleTouchTapOverlay + }) + ); + } + }]); + return DialogInline; +}(_react.Component); + +DialogInline.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DialogInline.propTypes = { + actions: _react.PropTypes.node, + actionsContainerClassName: _react.PropTypes.string, + actionsContainerStyle: _react.PropTypes.object, + autoDetectWindowHeight: _react.PropTypes.bool, + autoScrollBodyContent: _react.PropTypes.bool, + bodyClassName: _react.PropTypes.string, + bodyStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + className: _react.PropTypes.string, + contentClassName: _react.PropTypes.string, + contentStyle: _react.PropTypes.object, + modal: _react.PropTypes.bool, + onRequestClose: _react.PropTypes.func, + open: _react.PropTypes.bool.isRequired, + overlayClassName: _react.PropTypes.string, + overlayStyle: _react.PropTypes.object, + repositionOnUpdate: _react.PropTypes.bool, + style: _react.PropTypes.object, + title: _react.PropTypes.node, + titleClassName: _react.PropTypes.string, + titleStyle: _react.PropTypes.object +} : void 0; + +var Dialog = function (_Component3) { + (0, _inherits3.default)(Dialog, _Component3); + + function Dialog() { + var _ref3; + + var _temp3, _this3, _ret3; + + (0, _classCallCheck3.default)(this, Dialog); + + for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + + return _ret3 = (_temp3 = (_this3 = (0, _possibleConstructorReturn3.default)(this, (_ref3 = Dialog.__proto__ || (0, _getPrototypeOf2.default)(Dialog)).call.apply(_ref3, [this].concat(args))), _this3), _this3.renderLayer = function () { + return _react2.default.createElement(DialogInline, _this3.props); + }, _temp3), (0, _possibleConstructorReturn3.default)(_this3, _ret3); + } + + (0, _createClass3.default)(Dialog, [{ + key: 'render', + value: function render() { + return _react2.default.createElement(_RenderToLayer2.default, { render: this.renderLayer, open: true, useLayerForClickAway: false }); + } + }]); + return Dialog; +}(_react.Component); + +Dialog.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +Dialog.defaultProps = { + autoDetectWindowHeight: true, + autoScrollBodyContent: false, + modal: false, + repositionOnUpdate: true +}; + false ? Dialog.propTypes = { + /** + * Action buttons to display below the Dialog content (`children`). + * This property accepts either a React element, or an array of React elements. + */ + actions: _react.PropTypes.node, + /** + * The `className` to add to the actions container's root element. + */ + actionsContainerClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the actions container's root element. + */ + actionsContainerStyle: _react.PropTypes.object, + /** + * If set to true, the height of the `Dialog` will be auto detected. A max height + * will be enforced so that the content does not extend beyond the viewport. + */ + autoDetectWindowHeight: _react.PropTypes.bool, + /** + * If set to true, the body content of the `Dialog` will be scrollable. + */ + autoScrollBodyContent: _react.PropTypes.bool, + /** + * The `className` to add to the content's root element under the title. + */ + bodyClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the content's root element under the title. + */ + bodyStyle: _react.PropTypes.object, + /** + * The contents of the `Dialog`. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The `className` to add to the content container. + */ + contentClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the content container. + */ + contentStyle: _react.PropTypes.object, + /** + * Force the user to use one of the actions in the `Dialog`. + * Clicking outside the `Dialog` will not trigger the `onRequestClose`. + */ + modal: _react.PropTypes.bool, + /** + * Fired when the `Dialog` is requested to be closed by a click outside the `Dialog` or on the buttons. + * + * @param {bool} buttonClicked Determines whether a button click triggered this request. + */ + onRequestClose: _react.PropTypes.func, + /** + * Controls whether the Dialog is opened or not. + */ + open: _react.PropTypes.bool.isRequired, + /** + * The `className` to add to the `Overlay` component that is rendered behind the `Dialog`. + */ + overlayClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the `Overlay` component that is rendered behind the `Dialog`. + */ + overlayStyle: _react.PropTypes.object, + /** + * Determines whether the `Dialog` should be repositioned when it's contents are updated. + */ + repositionOnUpdate: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The title to display on the `Dialog`. Could be number, string, element or an array containing these types. + */ + title: _react.PropTypes.node, + /** + * The `className` to add to the title's root container element. + */ + titleClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the title's root container element. + */ + titleStyle: _react.PropTypes.object +} : void 0; +exports.default = Dialog; + +/***/ }), +/* 809 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _RadioButton = __webpack_require__(325); + +var _createComponent = __webpack_require__(43); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(60); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var mapValueToValueSelected = function mapValueToValueSelected(_ref, errorProp) { + var inputProps = _objectWithoutProperties(_ref.input, []), + props = _objectWithoutProperties(_ref, ['input']); + + return (0, _mapError2.default)(_extends({}, props, { + input: _extends({}, inputProps, { valueSelected: inputProps.value }) + }), errorProp); +}; + +exports.default = (0, _createComponent2.default)(_RadioButton.RadioButtonGroup, mapValueToValueSelected); + +/***/ }), +/* 810 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _EnhancedSwitch = __webpack_require__(202); + +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + +var _radioButtonUnchecked = __webpack_require__(811); + +var _radioButtonUnchecked2 = _interopRequireDefault(_radioButtonUnchecked); + +var _radioButtonChecked = __webpack_require__(812); + +var _radioButtonChecked2 = _interopRequireDefault(_radioButtonChecked); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var radioButton = context.muiTheme.radioButton; + + + return { + icon: { + height: radioButton.size, + width: radioButton.size + }, + target: { + transition: _transitions2.default.easeOut(), + position: 'absolute', + opacity: 1, + transform: 'scale(1)', + fill: radioButton.borderColor + }, + fill: { + position: 'absolute', + opacity: 1, + transform: 'scale(0)', + transformOrigin: '50% 50%', + transition: _transitions2.default.easeOut(), + fill: radioButton.checkedColor + }, + targetWhenChecked: { + opacity: 0, + transform: 'scale(0)' + }, + fillWhenChecked: { + opacity: 1, + transform: 'scale(1)' + }, + targetWhenDisabled: { + fill: radioButton.disabledColor + }, + fillWhenDisabled: { + fill: radioButton.disabledColor + }, + label: { + color: props.disabled ? radioButton.labelDisabledColor : radioButton.labelColor + }, + ripple: { + color: props.checked ? radioButton.checkedColor : radioButton.borderColor + } + }; +} + +var RadioButton = function (_Component) { + (0, _inherits3.default)(RadioButton, _Component); + + function RadioButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RadioButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RadioButton.__proto__ || (0, _getPrototypeOf2.default)(RadioButton)).call.apply(_ref, [this].concat(args))), _this), _this.handleSwitch = function (event) { + if (_this.props.onCheck) { + _this.props.onCheck(event, _this.props.value); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + // Only called when selected, not when unselected. + + + (0, _createClass3.default)(RadioButton, [{ + key: 'isChecked', + value: function isChecked() { + return this.refs.enhancedSwitch.isSwitched(); + } + + // Use RadioButtonGroup.setSelectedValue(newSelectionValue) to set a + // RadioButton's checked value. + + }, { + key: 'setChecked', + value: function setChecked(newCheckedValue) { + this.refs.enhancedSwitch.setSwitched(newCheckedValue); + } + }, { + key: 'getValue', + value: function getValue() { + return this.refs.enhancedSwitch.getValue(); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + checkedIcon = _props.checkedIcon, + checked = _props.checked, + iconStyle = _props.iconStyle, + labelStyle = _props.labelStyle, + labelPosition = _props.labelPosition, + onCheck = _props.onCheck, + uncheckedIcon = _props.uncheckedIcon, + disabled = _props.disabled, + other = (0, _objectWithoutProperties3.default)(_props, ['checkedIcon', 'checked', 'iconStyle', 'labelStyle', 'labelPosition', 'onCheck', 'uncheckedIcon', 'disabled']); + + + var styles = getStyles(this.props, this.context); + + var uncheckedStyles = (0, _simpleAssign2.default)(styles.target, checked && styles.targetWhenChecked, iconStyle, disabled && styles.targetWhenDisabled); + + var checkedStyles = (0, _simpleAssign2.default)(styles.fill, checked && styles.fillWhenChecked, iconStyle, disabled && styles.fillWhenDisabled); + + var uncheckedElement = _react2.default.isValidElement(uncheckedIcon) ? _react2.default.cloneElement(uncheckedIcon, { + style: (0, _simpleAssign2.default)(uncheckedStyles, uncheckedIcon.props.style) + }) : _react2.default.createElement(_radioButtonUnchecked2.default, { style: uncheckedStyles }); + + var checkedElement = _react2.default.isValidElement(checkedIcon) ? _react2.default.cloneElement(checkedIcon, { + style: (0, _simpleAssign2.default)(checkedStyles, checkedIcon.props.style) + }) : _react2.default.createElement(_radioButtonChecked2.default, { style: checkedStyles }); + + var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle); + var mergedLabelStyle = (0, _simpleAssign2.default)(styles.label, labelStyle); + + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, { + ref: 'enhancedSwitch', + inputType: 'radio', + checked: checked, + switched: checked, + disabled: disabled, + rippleColor: styles.ripple.color, + iconStyle: mergedIconStyle, + labelStyle: mergedLabelStyle, + labelPosition: labelPosition, + onSwitch: this.handleSwitch, + switchElement: _react2.default.createElement( + 'div', + null, + uncheckedElement, + checkedElement + ) + })); + } + }]); + return RadioButton; +}(_react.Component); + +RadioButton.defaultProps = { + checked: false, + disabled: false, + labelPosition: 'right' +}; +RadioButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? RadioButton.propTypes = { + /** + * @ignore + * checked if true + * Used internally by `RadioButtonGroup`. + */ + checked: _react.PropTypes.bool, + /** + * The icon element to show when the radio button is checked. + */ + checkedIcon: _react.PropTypes.element, + /** + * If true, the radio button is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the input element. + */ + inputStyle: _react.PropTypes.object, + /** + * @ignore + * Used internally by `RadioButtonGroup`. Use the `labelPosition` property of `RadioButtonGroup` instead. + * Where the label will be placed next to the radio button. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * Override the inline-styles of the label element. + */ + labelStyle: _react.PropTypes.object, + /** + * @ignore + * Callback function fired when the radio button is checked. Note that this + * function will not be called if the radio button is part of a + * radio button group: in this case, use the `onChange` property of + * `RadioButtonGroup`. + * + * @param {object} event `change` event targeting the element. + * @param {string} value The element's `value`. + */ + onCheck: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The icon element to show when the radio button is unchecked. + */ + uncheckedIcon: _react.PropTypes.element, + /** + * The value of the radio button. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = RadioButton; + +/***/ }), +/* 811 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ToggleRadioButtonUnchecked = function ToggleRadioButtonUnchecked(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z' }) + ); +}; +ToggleRadioButtonUnchecked = (0, _pure2.default)(ToggleRadioButtonUnchecked); +ToggleRadioButtonUnchecked.displayName = 'ToggleRadioButtonUnchecked'; +ToggleRadioButtonUnchecked.muiName = 'SvgIcon'; + +exports.default = ToggleRadioButtonUnchecked; + +/***/ }), +/* 812 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ToggleRadioButtonChecked = function ToggleRadioButtonChecked(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z' }) + ); +}; +ToggleRadioButtonChecked = (0, _pure2.default)(ToggleRadioButtonChecked); +ToggleRadioButtonChecked.displayName = 'ToggleRadioButtonChecked'; +ToggleRadioButtonChecked.muiName = 'SvgIcon'; + +exports.default = ToggleRadioButtonChecked; + +/***/ }), +/* 813 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _RadioButton = __webpack_require__(325); + +var _RadioButton2 = _interopRequireDefault(_RadioButton); + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var RadioButtonGroup = function (_Component) { + (0, _inherits3.default)(RadioButtonGroup, _Component); + + function RadioButtonGroup() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RadioButtonGroup); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RadioButtonGroup.__proto__ || (0, _getPrototypeOf2.default)(RadioButtonGroup)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + numberCheckedRadioButtons: 0, + selected: '' + }, _this.handleChange = function (event, newSelection) { + _this.updateRadioButtons(newSelection); + + // Successful update + if (_this.state.numberCheckedRadioButtons === 0) { + if (_this.props.onChange) _this.props.onChange(event, newSelection); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(RadioButtonGroup, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; + + var cnt = 0; + var selected = ''; + var _props = this.props, + valueSelected = _props.valueSelected, + defaultSelected = _props.defaultSelected; + + if (valueSelected !== undefined) { + selected = valueSelected; + } else if (defaultSelected !== undefined) { + selected = defaultSelected; + } + + _react2.default.Children.forEach(this.props.children, function (option) { + if (_this2.hasCheckAttribute(option)) cnt++; + }, this); + + this.setState({ + numberCheckedRadioButtons: cnt, + selected: selected + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.hasOwnProperty('valueSelected')) { + this.setState({ + selected: nextProps.valueSelected + }); + } + } + }, { + key: 'hasCheckAttribute', + value: function hasCheckAttribute(radioButton) { + return radioButton.props.hasOwnProperty('checked') && radioButton.props.checked; + } + }, { + key: 'updateRadioButtons', + value: function updateRadioButtons(newSelection) { + if (this.state.numberCheckedRadioButtons === 0) { + this.setState({ selected: newSelection }); + } else { + false ? (0, _warning2.default)(false, 'Material-UI: Cannot select a different radio button while another radio button\n has the \'checked\' property set to true.') : void 0; + } + } + }, { + key: 'getSelectedValue', + value: function getSelectedValue() { + return this.state.selected; + } + }, { + key: 'setSelectedValue', + value: function setSelectedValue(newSelectionValue) { + this.updateRadioButtons(newSelectionValue); + } + }, { + key: 'clearValue', + value: function clearValue() { + this.setSelectedValue(''); + } + }, { + key: 'render', + value: function render() { + var _this3 = this; + + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var options = _react2.default.Children.map(this.props.children, function (option) { + var _option$props = option.props, + name = _option$props.name, + value = _option$props.value, + label = _option$props.label, + onCheck = _option$props.onCheck, + other = (0, _objectWithoutProperties3.default)(_option$props, ['name', 'value', 'label', 'onCheck']); + + + return _react2.default.createElement(_RadioButton2.default, (0, _extends3.default)({}, other, { + ref: option.props.value, + name: _this3.props.name, + key: option.props.value, + value: option.props.value, + label: option.props.label, + labelPosition: _this3.props.labelPosition, + onCheck: _this3.handleChange, + checked: option.props.value === _this3.state.selected + })); + }, this); + + return _react2.default.createElement( + 'div', + { + style: prepareStyles((0, _simpleAssign2.default)({}, this.props.style)), + className: this.props.className + }, + options + ); + } + }]); + return RadioButtonGroup; +}(_react.Component); + +RadioButtonGroup.defaultProps = { + style: {} +}; +RadioButtonGroup.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? RadioButtonGroup.propTypes = { + /** + * Should be used to pass `RadioButton` components. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The `value` property of the radio button that will be + * selected by default. This takes precedence over the `checked` property + * of the `RadioButton` elements. + */ + defaultSelected: _react.PropTypes.any, + /** + * Where the label will be placed for all child radio buttons. + * This takes precedence over the `labelPosition` property of the + * `RadioButton` elements. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * The name that will be applied to all child radio buttons. + */ + name: _react.PropTypes.string.isRequired, + /** + * Callback function that is fired when a radio button has + * been checked. + * + * @param {object} event `change` event targeting the selected + * radio button. + * @param {*} value The `value` of the selected radio button. + */ + onChange: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The `value` of the currently selected radio button. + */ + valueSelected: _react.PropTypes.any +} : void 0; +exports.default = RadioButtonGroup; + +/***/ }), +/* 814 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _SelectField = __webpack_require__(815); + +var _SelectField2 = _interopRequireDefault(_SelectField); + +var _createComponent = __webpack_require__(43); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(60); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_SelectField2.default, function (_ref) { + var _ref$input = _ref.input, + _onChange = _ref$input.onChange, + value = _ref$input.value, + _onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value', 'onBlur']), + onChangeFromField = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'onChange']); + + return _extends({}, (0, _mapError2.default)(props), inputProps, { + value: value, + onChange: function onChange(event, index, value) { + _onChange(value); + if (onChangeFromField) { + onChangeFromField(value); + } + }, + onBlur: function onBlur() { + return _onBlur(value); + } + }); +}); + +/***/ }), +/* 815 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _SelectField = __webpack_require__(816); + +var _SelectField2 = _interopRequireDefault(_SelectField); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _SelectField2.default; + +/***/ }), +/* 816 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _TextField = __webpack_require__(97); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _DropDownMenu = __webpack_require__(817); + +var _DropDownMenu2 = _interopRequireDefault(_DropDownMenu); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props) { + return { + label: { + paddingLeft: 0, + top: props.floatingLabelText ? 6 : -4 + }, + icon: { + right: 0, + top: props.floatingLabelText ? 8 : 0 + }, + hideDropDownUnderline: { + borderTop: 'none' + }, + dropDownMenu: { + display: 'block' + } + }; +} + +var SelectField = function (_Component) { + (0, _inherits3.default)(SelectField, _Component); + + function SelectField() { + (0, _classCallCheck3.default)(this, SelectField); + return (0, _possibleConstructorReturn3.default)(this, (SelectField.__proto__ || (0, _getPrototypeOf2.default)(SelectField)).apply(this, arguments)); + } + + (0, _createClass3.default)(SelectField, [{ + key: 'render', + value: function render() { + var _props = this.props, + autoWidth = _props.autoWidth, + children = _props.children, + style = _props.style, + labelStyle = _props.labelStyle, + iconStyle = _props.iconStyle, + id = _props.id, + underlineDisabledStyle = _props.underlineDisabledStyle, + underlineFocusStyle = _props.underlineFocusStyle, + menuItemStyle = _props.menuItemStyle, + selectedMenuItemStyle = _props.selectedMenuItemStyle, + underlineStyle = _props.underlineStyle, + errorStyle = _props.errorStyle, + disabled = _props.disabled, + floatingLabelFixed = _props.floatingLabelFixed, + floatingLabelText = _props.floatingLabelText, + floatingLabelStyle = _props.floatingLabelStyle, + hintStyle = _props.hintStyle, + hintText = _props.hintText, + fullWidth = _props.fullWidth, + errorText = _props.errorText, + listStyle = _props.listStyle, + maxHeight = _props.maxHeight, + menuStyle = _props.menuStyle, + onFocus = _props.onFocus, + onBlur = _props.onBlur, + onChange = _props.onChange, + value = _props.value, + other = (0, _objectWithoutProperties3.default)(_props, ['autoWidth', 'children', 'style', 'labelStyle', 'iconStyle', 'id', 'underlineDisabledStyle', 'underlineFocusStyle', 'menuItemStyle', 'selectedMenuItemStyle', 'underlineStyle', 'errorStyle', 'disabled', 'floatingLabelFixed', 'floatingLabelText', 'floatingLabelStyle', 'hintStyle', 'hintText', 'fullWidth', 'errorText', 'listStyle', 'maxHeight', 'menuStyle', 'onFocus', 'onBlur', 'onChange', 'value']); + + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + _TextField2.default, + (0, _extends3.default)({}, other, { + style: style, + disabled: disabled, + floatingLabelFixed: floatingLabelFixed, + floatingLabelText: floatingLabelText, + floatingLabelStyle: floatingLabelStyle, + hintStyle: hintStyle, + hintText: !hintText && !floatingLabelText ? ' ' : hintText, + fullWidth: fullWidth, + errorText: errorText, + underlineStyle: underlineStyle, + errorStyle: errorStyle, + onFocus: onFocus, + onBlur: onBlur, + id: id, + underlineDisabledStyle: underlineDisabledStyle, + underlineFocusStyle: underlineFocusStyle + }), + _react2.default.createElement( + _DropDownMenu2.default, + { + disabled: disabled, + style: (0, _simpleAssign2.default)(styles.dropDownMenu, menuStyle), + labelStyle: (0, _simpleAssign2.default)(styles.label, labelStyle), + iconStyle: (0, _simpleAssign2.default)(styles.icon, iconStyle), + menuItemStyle: menuItemStyle, + selectedMenuItemStyle: selectedMenuItemStyle, + underlineStyle: styles.hideDropDownUnderline, + listStyle: listStyle, + autoWidth: autoWidth, + value: value, + onChange: onChange, + maxHeight: maxHeight + }, + children + ) + ); + } + }]); + return SelectField; +}(_react.Component); + +SelectField.defaultProps = { + autoWidth: false, + disabled: false, + fullWidth: false +}; +SelectField.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? SelectField.propTypes = { + /** + * If true, the width will automatically be set according to the + * items inside the menu. + * To control the width in CSS instead, leave this prop set to `false`. + */ + autoWidth: _react.PropTypes.bool, + /** + * The `MenuItem` elements to populate the select field with. + * If the menu items have a `label` prop, that value will + * represent the selected menu item in the rendered select field. + */ + children: _react.PropTypes.node, + /** + * If true, the select field will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the error element. + */ + errorStyle: _react.PropTypes.object, + /** + * The error content to display. + */ + errorText: _react.PropTypes.node, + /** + * If true, the floating label will float even when no value is selected. + */ + floatingLabelFixed: _react.PropTypes.bool, + /** + * Override the inline-styles of the floating label. + */ + floatingLabelStyle: _react.PropTypes.object, + /** + * The content of the floating label. + */ + floatingLabelText: _react.PropTypes.node, + /** + * If true, the select field will take up the full width of its container. + */ + fullWidth: _react.PropTypes.bool, + /** + * Override the inline-styles of the hint element. + */ + hintStyle: _react.PropTypes.object, + /** + * The hint content to display. + */ + hintText: _react.PropTypes.node, + /** + * Override the inline-styles of the icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * The id prop for the text field. + */ + id: _react.PropTypes.string, + /** + * Override the label style when the select field is inactive. + */ + labelStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the underlying `List` element. + */ + listStyle: _react.PropTypes.object, + /** + * Override the default max-height of the underlying `DropDownMenu` element. + */ + maxHeight: _react.PropTypes.number, + /** + * Override the inline-styles of menu items. + */ + menuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the underlying `DropDownMenu` element. + */ + menuStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function fired when a menu item is selected. + * + * @param {object} event TouchTap event targeting the menu item + * that was selected. + * @param {number} key The index of the selected menu item. + * @param {any} payload The `value` prop of the selected menu item. + */ + onChange: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Override the inline-styles of selected menu items. + */ + selectedMenuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of the underline element when the select + * field is disabled. + */ + underlineDisabledStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the underline element when the select field + * is focused. + */ + underlineFocusStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the underline element. + */ + underlineStyle: _react.PropTypes.object, + /** + * The value that is currently selected. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = SelectField; + +/***/ }), +/* 817 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.MenuItem = exports.DropDownMenu = undefined; + +var _DropDownMenu2 = __webpack_require__(818); + +var _DropDownMenu3 = _interopRequireDefault(_DropDownMenu2); + +var _MenuItem2 = __webpack_require__(321); + +var _MenuItem3 = _interopRequireDefault(_MenuItem2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.DropDownMenu = _DropDownMenu3.default; +exports.MenuItem = _MenuItem3.default; +exports.default = _DropDownMenu3.default; + +/***/ }), +/* 818 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _arrowDropDown = __webpack_require__(819); + +var _arrowDropDown2 = _interopRequireDefault(_arrowDropDown); + +var _Menu = __webpack_require__(199); + +var _Menu2 = _interopRequireDefault(_Menu); + +var _ClearFix = __webpack_require__(820); + +var _ClearFix2 = _interopRequireDefault(_ClearFix); + +var _Popover = __webpack_require__(130); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _PopoverAnimationVertical = __webpack_require__(324); + +var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical); + +var _keycode = __webpack_require__(30); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _events = __webpack_require__(196); + +var _events2 = _interopRequireDefault(_events); + +var _IconButton = __webpack_require__(95); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var anchorOrigin = { + vertical: 'top', + horizontal: 'left' +}; + +function getStyles(props, context) { + var disabled = props.disabled; + + var spacing = context.muiTheme.baseTheme.spacing; + var palette = context.muiTheme.baseTheme.palette; + var accentColor = context.muiTheme.dropDownMenu.accentColor; + return { + control: { + cursor: disabled ? 'not-allowed' : 'pointer', + height: '100%', + position: 'relative', + width: '100%' + }, + icon: { + fill: accentColor, + position: 'absolute', + right: spacing.desktopGutterLess, + top: (spacing.iconSize - 24) / 2 + spacing.desktopGutterMini / 2 + }, + iconChildren: { + fill: 'inherit' + }, + label: { + color: disabled ? palette.disabledColor : palette.textColor, + lineHeight: spacing.desktopToolbarHeight + 'px', + overflow: 'hidden', + opacity: 1, + position: 'relative', + paddingLeft: spacing.desktopGutter, + paddingRight: spacing.iconSize * 2 + spacing.desktopGutterMini, + textOverflow: 'ellipsis', + top: 0, + whiteSpace: 'nowrap' + }, + labelWhenOpen: { + opacity: 0, + top: spacing.desktopToolbarHeight / 8 + }, + root: { + display: 'inline-block', + fontSize: spacing.desktopDropDownMenuFontSize, + height: spacing.desktopSubheaderHeight, + fontFamily: context.muiTheme.baseTheme.fontFamily, + outline: 'none', + position: 'relative', + transition: _transitions2.default.easeOut() + }, + rootWhenOpen: { + opacity: 1 + }, + underline: { + borderTop: 'solid 1px ' + accentColor, + bottom: 1, + left: 0, + margin: '-1px ' + spacing.desktopGutter + 'px', + right: 0, + position: 'absolute' + } + }; +} + +var DropDownMenu = function (_Component) { + (0, _inherits3.default)(DropDownMenu, _Component); + + function DropDownMenu() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DropDownMenu); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DropDownMenu.__proto__ || (0, _getPrototypeOf2.default)(DropDownMenu)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.rootNode = undefined, _this.arrowNode = undefined, _this.handleTouchTapControl = function (event) { + event.preventDefault(); + if (!_this.props.disabled) { + _this.setState({ + open: !_this.state.open, + anchorEl: _this.rootNode + }); + } + }, _this.handleRequestCloseMenu = function () { + _this.close(false); + }, _this.handleEscKeyDownMenu = function () { + _this.close(true); + }, _this.handleKeyDown = function (event) { + switch ((0, _keycode2.default)(event)) { + case 'up': + case 'down': + case 'space': + case 'enter': + event.preventDefault(); + _this.setState({ + open: true, + anchorEl: _this.rootNode + }); + break; + } + }, _this.handleItemTouchTap = function (event, child, index) { + event.persist(); + _this.setState({ + open: false + }, function () { + if (_this.props.onChange) { + _this.props.onChange(event, index, child.props.value); + } + + _this.close(_events2.default.isKeyboard(event)); + }); + }, _this.close = function (isKeyboard) { + _this.setState({ + open: false + }, function () { + if (_this.props.onClose) { + _this.props.onClose(); + } + + if (isKeyboard) { + var dropArrow = _this.arrowNode; + var dropNode = _reactDom2.default.findDOMNode(dropArrow); + dropNode.focus(); + dropArrow.setKeyboardFocus(true); + } + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + // The nested styles for drop-down-menu are modified by toolbar and possibly + // other user components, so it will give full access to its js styles rather + // than just the parent. + + + (0, _createClass3.default)(DropDownMenu, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var _this2 = this; + + if (this.props.autoWidth) { + this.setWidth(); + } + if (this.props.openImmediately) { + // TODO: Temporary fix to make openImmediately work with popover. + /* eslint-disable react/no-did-mount-set-state */ + setTimeout(function () { + return _this2.setState({ + open: true, + anchorEl: _this2.rootNode + }); + }, 0); + /* eslint-enable react/no-did-mount-set-state */ + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps() { + if (this.props.autoWidth) { + this.setWidth(); + } + } + }, { + key: 'getInputNode', + + + /** + * This method is deprecated but still here because the TextField + * need it in order to work. TODO: That will be addressed later. + */ + value: function getInputNode() { + var _this3 = this; + + var rootNode = this.rootNode; + + rootNode.focus = function () { + if (!_this3.props.disabled) { + _this3.setState({ + open: !_this3.state.open, + anchorEl: _this3.rootNode + }); + } + }; + + return rootNode; + } + }, { + key: 'setWidth', + value: function setWidth() { + var el = this.rootNode; + if (!this.props.style || !this.props.style.hasOwnProperty('width')) { + el.style.width = 'auto'; + } + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + + var _props = this.props, + animated = _props.animated, + animation = _props.animation, + autoWidth = _props.autoWidth, + children = _props.children, + className = _props.className, + iconStyle = _props.iconStyle, + labelStyle = _props.labelStyle, + listStyle = _props.listStyle, + maxHeight = _props.maxHeight, + menuStyleProp = _props.menuStyle, + onClose = _props.onClose, + openImmediately = _props.openImmediately, + menuItemStyle = _props.menuItemStyle, + selectedMenuItemStyle = _props.selectedMenuItemStyle, + style = _props.style, + underlineStyle = _props.underlineStyle, + value = _props.value, + other = (0, _objectWithoutProperties3.default)(_props, ['animated', 'animation', 'autoWidth', 'children', 'className', 'iconStyle', 'labelStyle', 'listStyle', 'maxHeight', 'menuStyle', 'onClose', 'openImmediately', 'menuItemStyle', 'selectedMenuItemStyle', 'style', 'underlineStyle', 'value']); + var _state = this.state, + anchorEl = _state.anchorEl, + open = _state.open; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var displayValue = ''; + _react2.default.Children.forEach(children, function (child) { + if (child && value === child.props.value) { + // This will need to be improved (in case primaryText is a node) + displayValue = child.props.label || child.props.primaryText; + } + }); + + var menuStyle = void 0; + if (anchorEl && !autoWidth) { + menuStyle = (0, _simpleAssign2.default)({ + width: anchorEl.clientWidth + }, menuStyleProp); + } else { + menuStyle = menuStyleProp; + } + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { + ref: function ref(node) { + _this4.rootNode = node; + }, + className: className, + style: prepareStyles((0, _simpleAssign2.default)({}, styles.root, open && styles.rootWhenOpen, style)) + }), + _react2.default.createElement( + _ClearFix2.default, + { style: styles.control, onTouchTap: this.handleTouchTapControl }, + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.label, open && styles.labelWhenOpen, labelStyle)) }, + displayValue + ), + _react2.default.createElement( + _IconButton2.default, + { + tabIndex: this.props.disabled ? -1 : undefined, + onKeyDown: this.handleKeyDown, + ref: function ref(node) { + _this4.arrowNode = node; + }, + style: (0, _simpleAssign2.default)({}, styles.icon, iconStyle), + iconStyle: styles.iconChildren + }, + _react2.default.createElement(_arrowDropDown2.default, null) + ), + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.underline, underlineStyle)) }) + ), + _react2.default.createElement( + _Popover2.default, + { + anchorOrigin: anchorOrigin, + anchorEl: anchorEl, + animation: animation || _PopoverAnimationVertical2.default, + open: open, + animated: animated, + onRequestClose: this.handleRequestCloseMenu + }, + _react2.default.createElement( + _Menu2.default, + { + maxHeight: maxHeight, + desktop: true, + value: value, + onEscKeyDown: this.handleEscKeyDownMenu, + style: menuStyle, + listStyle: listStyle, + onItemTouchTap: this.handleItemTouchTap, + menuItemStyle: menuItemStyle, + selectedMenuItemStyle: selectedMenuItemStyle + }, + children + ) + ) + ); + } + }]); + return DropDownMenu; +}(_react.Component); + +DropDownMenu.muiName = 'DropDownMenu'; +DropDownMenu.defaultProps = { + animated: true, + autoWidth: true, + disabled: false, + openImmediately: false, + maxHeight: 500 +}; +DropDownMenu.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DropDownMenu.propTypes = { + /** + * If true, the popover will apply transitions when + * it gets added to the DOM. + */ + animated: _react.PropTypes.bool, + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * The width will automatically be set according to the items inside the menu. + * To control this width in css instead, set this prop to `false`. + */ + autoWidth: _react.PropTypes.bool, + /** + * The `MenuItem`s to populate the `Menu` with. If the `MenuItems` have the + * prop `label` that value will be used to render the representation of that + * item within the field. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Disables the menu. + */ + disabled: _react.PropTypes.bool, + /** + * Overrides the styles of icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Overrides the styles of label when the `DropDownMenu` is inactive. + */ + labelStyle: _react.PropTypes.object, + /** + * The style object to use to override underlying list style. + */ + listStyle: _react.PropTypes.object, + /** + * The maximum height of the `Menu` when it is displayed. + */ + maxHeight: _react.PropTypes.number, + /** + * Override the inline-styles of menu items. + */ + menuItemStyle: _react.PropTypes.object, + /** + * Overrides the styles of `Menu` when the `DropDownMenu` is displayed. + */ + menuStyle: _react.PropTypes.object, + /** + * Callback function fired when a menu item is clicked, other than the one currently selected. + * + * @param {object} event TouchTap event targeting the menu item that was clicked. + * @param {number} key The index of the clicked menu item in the `children` collection. + * @param {any} payload The `value` prop of the clicked menu item. + */ + onChange: _react.PropTypes.func, + /** + * Callback function fired when the menu is closed. + */ + onClose: _react.PropTypes.func, + /** + * Set to true to have the `DropDownMenu` automatically open on mount. + */ + openImmediately: _react.PropTypes.bool, + /** + * Override the inline-styles of selected menu items. + */ + selectedMenuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Overrides the inline-styles of the underline. + */ + underlineStyle: _react.PropTypes.object, + /** + * The value that is currently selected. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = DropDownMenu; + +/***/ }), +/* 819 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationArrowDropDown = function NavigationArrowDropDown(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M7 10l5 5 5-5z' }) + ); +}; +NavigationArrowDropDown = (0, _pure2.default)(NavigationArrowDropDown); +NavigationArrowDropDown.displayName = 'NavigationArrowDropDown'; +NavigationArrowDropDown.muiName = 'SvgIcon'; + +exports.default = NavigationArrowDropDown; + +/***/ }), +/* 820 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _BeforeAfterWrapper = __webpack_require__(821); + +var _BeforeAfterWrapper2 = _interopRequireDefault(_BeforeAfterWrapper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + before: { + content: "' '", + display: 'table' + }, + after: { + content: "' '", + clear: 'both', + display: 'table' + } +}; + +var ClearFix = function ClearFix(_ref) { + var style = _ref.style, + children = _ref.children, + other = (0, _objectWithoutProperties3.default)(_ref, ['style', 'children']); + return _react2.default.createElement( + _BeforeAfterWrapper2.default, + (0, _extends3.default)({}, other, { + beforeStyle: styles.before, + afterStyle: styles.after, + style: style + }), + children + ); +}; + +ClearFix.muiName = 'ClearFix'; + + false ? ClearFix.propTypes = { + children: _react.PropTypes.node, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +exports.default = ClearFix; + +/***/ }), +/* 821 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * BeforeAfterWrapper + * An alternative for the ::before and ::after css pseudo-elements for + * components whose styles are defined in javascript instead of css. + * + * Usage: For the element that we want to apply before and after elements to, + * wrap its children with BeforeAfterWrapper. For example: + * + * <Paper> + * <Paper> <div> // See notice + * <BeforeAfterWrapper> renders <div/> // before element + * [children of paper] ------> [children of paper] + * </BeforeAfterWrapper> <div/> // after element + * </Paper> </div> + * </Paper> + * + * Notice: Notice that this div bundles together our elements. If the element + * that we want to apply before and after elements is a HTML tag (i.e. a + * div, p, or button tag), we can avoid this extra nesting by passing using + * the BeforeAfterWrapper in place of said tag like so: + * + * <p> + * <BeforeAfterWrapper> do this instead <BeforeAfterWrapper elementType='p'> + * [children of p] ------> [children of p] + * </BeforeAfterWrapper> </BeforeAfterWrapper> + * </p> + * + * BeforeAfterWrapper features spread functionality. This means that we can + * pass HTML tag properties directly into the BeforeAfterWrapper tag. + * + * When using BeforeAfterWrapper, ensure that the parent of the beforeElement + * and afterElement have a defined style position. + */ + +var styles = { + box: { + boxSizing: 'border-box' + } +}; + +var BeforeAfterWrapper = function (_Component) { + (0, _inherits3.default)(BeforeAfterWrapper, _Component); + + function BeforeAfterWrapper() { + (0, _classCallCheck3.default)(this, BeforeAfterWrapper); + return (0, _possibleConstructorReturn3.default)(this, (BeforeAfterWrapper.__proto__ || (0, _getPrototypeOf2.default)(BeforeAfterWrapper)).apply(this, arguments)); + } + + (0, _createClass3.default)(BeforeAfterWrapper, [{ + key: 'render', + value: function render() { + var _props = this.props, + beforeStyle = _props.beforeStyle, + afterStyle = _props.afterStyle, + beforeElementType = _props.beforeElementType, + afterElementType = _props.afterElementType, + elementType = _props.elementType, + other = (0, _objectWithoutProperties3.default)(_props, ['beforeStyle', 'afterStyle', 'beforeElementType', 'afterElementType', 'elementType']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var beforeElement = void 0; + var afterElement = void 0; + + if (beforeStyle) { + beforeElement = _react2.default.createElement(this.props.beforeElementType, { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.box, beforeStyle)), + key: '::before' + }); + } + + if (afterStyle) { + afterElement = _react2.default.createElement(this.props.afterElementType, { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.box, afterStyle)), + key: '::after' + }); + } + + var children = [beforeElement, this.props.children, afterElement]; + + var props = other; + props.style = prepareStyles((0, _simpleAssign2.default)({}, this.props.style)); + + return _react2.default.createElement(this.props.elementType, props, children); + } + }]); + return BeforeAfterWrapper; +}(_react.Component); + +BeforeAfterWrapper.defaultProps = { + beforeElementType: 'div', + afterElementType: 'div', + elementType: 'div' +}; +BeforeAfterWrapper.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? BeforeAfterWrapper.propTypes = { + afterElementType: _react.PropTypes.string, + afterStyle: _react.PropTypes.object, + beforeElementType: _react.PropTypes.string, + beforeStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + elementType: _react.PropTypes.string, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = BeforeAfterWrapper; + +/***/ }), +/* 822 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _Slider = __webpack_require__(823); + +var _Slider2 = _interopRequireDefault(_Slider); + +var _createComponent = __webpack_require__(43); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(60); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_Slider2.default, function (_ref) { + var _ref$input = _ref.input, + onDragStart = _ref$input.onDragStart, + _onChange = _ref$input.onChange, + inputProps = _objectWithoutProperties(_ref$input, ['onDragStart', 'onChange']), + onChangeFromField = _ref.onChange, + defaultValue = _ref.defaultValue, + props = _objectWithoutProperties(_ref, ['input', 'onChange', 'defaultValue']); + + return _extends({}, (0, _mapError2.default)(_extends({}, props, { input: inputProps }), 'error'), { + onChange: function onChange(event, value) { + _onChange(value); + if (onChangeFromField) { + onChangeFromField(value); + } + } + }); +}); + +/***/ }), +/* 823 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Slider = __webpack_require__(824); + +var _Slider2 = _interopRequireDefault(_Slider); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Slider2.default; + +/***/ }), +/* 824 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _defineProperty2 = __webpack_require__(825); + +var _defineProperty3 = _interopRequireDefault(_defineProperty2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _keycode = __webpack_require__(30); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _FocusRipple = __webpack_require__(197); + +var _FocusRipple2 = _interopRequireDefault(_FocusRipple); + +var _deprecatedPropType = __webpack_require__(826); + +var _deprecatedPropType2 = _interopRequireDefault(_deprecatedPropType); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Verifies min/max range. + * @param {Object} props Properties of the React component. + * @param {String} propName Name of the property to validate. + * @param {String} componentName Name of the component whose property is being validated. + * @returns {Object} Returns an Error if min >= max otherwise null. + */ +var minMaxPropType = function minMaxPropType(props, propName, componentName) { + for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { + rest[_key - 3] = arguments[_key]; + } + + var error = _react.PropTypes.number.apply(_react.PropTypes, [props, propName, componentName].concat(rest)); + if (error !== null) { + return error; + } + + if (props.min >= props.max) { + var errorMsg = propName === 'min' ? 'min should be less than max' : 'max should be greater than min'; + return new Error(errorMsg); + } +}; + +/** + * Verifies value is within the min/max range. + * @param {Object} props Properties of the React component. + * @param {String} propName Name of the property to validate. + * @param {String} componentName Name of the component whose property is being validated. + * @returns {Object} Returns an Error if the value is not within the range otherwise null. + */ +var valueInRangePropType = function valueInRangePropType(props, propName, componentName) { + for (var _len2 = arguments.length, rest = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) { + rest[_key2 - 3] = arguments[_key2]; + } + + var error = _react.PropTypes.number.apply(_react.PropTypes, [props, propName, componentName].concat(rest)); + if (error !== null) { + return error; + } + + var value = props[propName]; + if (value < props.min || props.max < value) { + return new Error(propName + ' should be within the range specified by min and max'); + } +}; + +var crossAxisProperty = { + x: 'height', + 'x-reverse': 'height', + y: 'width', + 'y-reverse': 'width' +}; + +var crossAxisOffsetProperty = { + x: 'top', + 'x-reverse': 'top', + y: 'left', + 'y-reverse': 'left' +}; + +var mainAxisProperty = { + x: 'width', + 'x-reverse': 'width', + y: 'height', + 'y-reverse': 'height' +}; + +var mainAxisMarginFromEnd = { + x: 'marginRight', + 'x-reverse': 'marginLeft', + y: 'marginTop', + 'y-reverse': 'marginBottom' +}; + +var mainAxisMarginFromStart = { + x: 'marginLeft', + 'x-reverse': 'marginRight', + y: 'marginBottom', + 'y-reverse': 'marginTop' +}; + +var mainAxisOffsetProperty = { + x: 'left', + 'x-reverse': 'right', + y: 'bottom', + 'y-reverse': 'top' +}; + +var mainAxisClientProperty = { + x: 'clientWidth', + 'x-reverse': 'clientWidth', + y: 'clientHeight', + 'y-reverse': 'clientHeight' +}; + +var mainAxisClientOffsetProperty = { + x: 'clientX', + 'x-reverse': 'clientX', + y: 'clientY', + 'y-reverse': 'clientY' +}; + +var reverseMainAxisOffsetProperty = { + x: 'right', + 'x-reverse': 'left', + y: 'top', + 'y-reverse': 'bottom' +}; + +var isMouseControlInverted = function isMouseControlInverted(axis) { + return axis === 'x-reverse' || axis === 'y'; +}; + +function getPercent(value, min, max) { + var percent = (value - min) / (max - min); + if (isNaN(percent)) { + percent = 0; + } + + return percent; +} + +var getStyles = function getStyles(props, context, state) { + var _slider, _track, _filledAndRemaining, _handle, _objectAssign2, _objectAssign3; + + var axis = props.axis, + disabled = props.disabled, + max = props.max, + min = props.min; + var _context$muiTheme$sli = context.muiTheme.slider, + handleColorZero = _context$muiTheme$sli.handleColorZero, + handleFillColor = _context$muiTheme$sli.handleFillColor, + handleSize = _context$muiTheme$sli.handleSize, + handleSizeDisabled = _context$muiTheme$sli.handleSizeDisabled, + handleSizeActive = _context$muiTheme$sli.handleSizeActive, + trackSize = _context$muiTheme$sli.trackSize, + trackColor = _context$muiTheme$sli.trackColor, + trackColorSelected = _context$muiTheme$sli.trackColorSelected, + rippleColor = _context$muiTheme$sli.rippleColor, + selectionColor = _context$muiTheme$sli.selectionColor; + + + var fillGutter = handleSize / 2; + var disabledGutter = trackSize + handleSizeDisabled / 2; + var calcDisabledSpacing = disabled ? ' - ' + disabledGutter + 'px' : ''; + var percent = getPercent(state.value, min, max); + + var styles = { + slider: (_slider = { + touchCallout: 'none', + userSelect: 'none', + cursor: 'default' + }, (0, _defineProperty3.default)(_slider, crossAxisProperty[axis], handleSizeActive), (0, _defineProperty3.default)(_slider, mainAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_slider, 'position', 'relative'), (0, _defineProperty3.default)(_slider, 'marginTop', 24), (0, _defineProperty3.default)(_slider, 'marginBottom', 48), _slider), + track: (_track = { + position: 'absolute' + }, (0, _defineProperty3.default)(_track, crossAxisOffsetProperty[axis], (handleSizeActive - trackSize) / 2), (0, _defineProperty3.default)(_track, mainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_track, mainAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_track, crossAxisProperty[axis], trackSize), _track), + filledAndRemaining: (_filledAndRemaining = { + position: 'absolute' + }, (0, _defineProperty3.default)(_filledAndRemaining, crossAxisOffsetProperty, 0), (0, _defineProperty3.default)(_filledAndRemaining, crossAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_filledAndRemaining, 'transition', _transitions2.default.easeOut(null, 'margin')), _filledAndRemaining), + handle: (_handle = { + boxSizing: 'border-box', + position: 'absolute', + cursor: 'pointer', + pointerEvents: 'inherit' + }, (0, _defineProperty3.default)(_handle, crossAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_handle, mainAxisOffsetProperty[axis], percent === 0 ? '0%' : percent * 100 + '%'), (0, _defineProperty3.default)(_handle, 'zIndex', 1), (0, _defineProperty3.default)(_handle, 'margin', { + x: trackSize / 2 + 'px 0 0 0', + 'x-reverse': trackSize / 2 + 'px 0 0 0', + y: '0 0 0 ' + trackSize / 2 + 'px', + 'y-reverse': '0 0 0 ' + trackSize / 2 + 'px' + }[axis]), (0, _defineProperty3.default)(_handle, 'width', handleSize), (0, _defineProperty3.default)(_handle, 'height', handleSize), (0, _defineProperty3.default)(_handle, 'backgroundColor', selectionColor), (0, _defineProperty3.default)(_handle, 'backgroundClip', 'padding-box'), (0, _defineProperty3.default)(_handle, 'border', '0px solid transparent'), (0, _defineProperty3.default)(_handle, 'borderRadius', '50%'), (0, _defineProperty3.default)(_handle, 'transform', { + x: 'translate(-50%, -50%)', + 'x-reverse': 'translate(50%, -50%)', + y: 'translate(-50%, 50%)', + 'y-reverse': 'translate(-50%, -50%)' + }[axis]), (0, _defineProperty3.default)(_handle, 'transition', _transitions2.default.easeOut('450ms', 'background') + ', ' + _transitions2.default.easeOut('450ms', 'border-color') + ', ' + _transitions2.default.easeOut('450ms', 'width') + ', ' + _transitions2.default.easeOut('450ms', 'height')), (0, _defineProperty3.default)(_handle, 'overflow', 'visible'), (0, _defineProperty3.default)(_handle, 'outline', 'none'), _handle), + handleWhenDisabled: { + boxSizing: 'content-box', + cursor: 'not-allowed', + backgroundColor: trackColor, + width: handleSizeDisabled, + height: handleSizeDisabled, + border: 'none' + }, + handleWhenPercentZero: { + border: trackSize + 'px solid ' + handleColorZero, + backgroundColor: handleFillColor, + boxShadow: 'none' + }, + handleWhenPercentZeroAndDisabled: { + cursor: 'not-allowed', + width: handleSizeDisabled, + height: handleSizeDisabled + }, + handleWhenPercentZeroAndFocused: { + border: trackSize + 'px solid ' + trackColorSelected + }, + handleWhenActive: { + width: handleSizeActive, + height: handleSizeActive + }, + ripple: { + height: handleSize, + width: handleSize, + overflow: 'visible' + }, + rippleWhenPercentZero: { + top: -trackSize, + left: -trackSize + }, + rippleInner: { + height: '300%', + width: '300%', + top: -handleSize, + left: -handleSize + }, + rippleColor: { + fill: percent === 0 ? handleColorZero : rippleColor + } + }; + styles.filled = (0, _simpleAssign2.default)({}, styles.filledAndRemaining, (_objectAssign2 = {}, (0, _defineProperty3.default)(_objectAssign2, mainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_objectAssign2, 'backgroundColor', disabled ? trackColor : selectionColor), (0, _defineProperty3.default)(_objectAssign2, mainAxisMarginFromEnd[axis], fillGutter), (0, _defineProperty3.default)(_objectAssign2, mainAxisProperty[axis], 'calc(' + percent * 100 + '%' + calcDisabledSpacing + ')'), _objectAssign2)); + styles.remaining = (0, _simpleAssign2.default)({}, styles.filledAndRemaining, (_objectAssign3 = {}, (0, _defineProperty3.default)(_objectAssign3, reverseMainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_objectAssign3, 'backgroundColor', (state.hovered || state.focused) && !disabled ? trackColorSelected : trackColor), (0, _defineProperty3.default)(_objectAssign3, mainAxisMarginFromStart[axis], fillGutter), (0, _defineProperty3.default)(_objectAssign3, mainAxisProperty[axis], 'calc(' + (1 - percent) * 100 + '%' + calcDisabledSpacing + ')'), _objectAssign3)); + + return styles; +}; + +var Slider = function (_Component) { + (0, _inherits3.default)(Slider, _Component); + + function Slider() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Slider); + + for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Slider.__proto__ || (0, _getPrototypeOf2.default)(Slider)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + active: false, + dragging: false, + focused: false, + hovered: false, + value: 0 + }, _this.track = null, _this.handle = null, _this.handleKeyDown = function (event) { + var _this$props = _this.props, + axis = _this$props.axis, + min = _this$props.min, + max = _this$props.max, + step = _this$props.step; + + + var action = void 0; + + switch ((0, _keycode2.default)(event)) { + case 'page down': + case 'down': + if (axis === 'y-reverse') { + action = 'increase'; + } else { + action = 'decrease'; + } + break; + case 'left': + if (axis === 'x-reverse') { + action = 'increase'; + } else { + action = 'decrease'; + } + break; + case 'page up': + case 'up': + if (axis === 'y-reverse') { + action = 'decrease'; + } else { + action = 'increase'; + } + break; + case 'right': + if (axis === 'x-reverse') { + action = 'decrease'; + } else { + action = 'increase'; + } + break; + case 'home': + action = 'min'; + break; + case 'end': + action = 'max'; + break; + } + + if (action) { + var newValue = void 0; + + // Cancel scroll + event.preventDefault(); + + switch (action) { + case 'decrease': + newValue = _this.state.value - step; + break; + case 'increase': + newValue = _this.state.value + step; + break; + case 'min': + newValue = min; + break; + case 'max': + newValue = max; + break; + } + + // We need to use toFixed() because of float point errors. + // For example, 0.01 + 0.06 = 0.06999999999999999 + newValue = parseFloat(newValue.toFixed(5)); + + if (newValue > max) { + newValue = max; + } else if (newValue < min) { + newValue = min; + } + + if (_this.state.value !== newValue) { + _this.setState({ + value: newValue + }); + + if (_this.props.onChange) { + _this.props.onChange(event, newValue); + } + } + } + }, _this.handleDragMouseMove = function (event) { + _this.onDragUpdate(event, 'mouse'); + }, _this.handleTouchMove = function (event) { + _this.onDragUpdate(event, 'touch'); + }, _this.handleMouseEnd = function (event) { + document.removeEventListener('mousemove', _this.handleDragMouseMove); + document.removeEventListener('mouseup', _this.handleMouseEnd); + + _this.onDragStop(event); + }, _this.handleTouchEnd = function (event) { + document.removeEventListener('touchmove', _this.handleTouchMove); + document.removeEventListener('touchup', _this.handleTouchEnd); + document.removeEventListener('touchend', _this.handleTouchEnd); + document.removeEventListener('touchcancel', _this.handleTouchEnd); + + _this.onDragStop(event); + }, _this.handleTouchStart = function (event) { + if (_this.props.disabled) { + return; + } + + var position = void 0; + if (isMouseControlInverted(_this.props.axis)) { + position = _this.getTrackOffset() - event.touches[0][mainAxisClientOffsetProperty[_this.props.axis]]; + } else { + position = event.touches[0][mainAxisClientOffsetProperty[_this.props.axis]] - _this.getTrackOffset(); + } + _this.setValueFromPosition(event, position); + + document.addEventListener('touchmove', _this.handleTouchMove); + document.addEventListener('touchup', _this.handleTouchEnd); + document.addEventListener('touchend', _this.handleTouchEnd); + document.addEventListener('touchcancel', _this.handleTouchEnd); + + _this.onDragStart(event); + + // Cancel scroll and context menu + event.preventDefault(); + }, _this.handleFocus = function (event) { + _this.setState({ + focused: true + }); + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleBlur = function (event) { + _this.setState({ + focused: false, + active: false + }); + + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleMouseDown = function (event) { + if (_this.props.disabled) { + return; + } + + var position = void 0; + if (isMouseControlInverted(_this.props.axis)) { + position = _this.getTrackOffset() - event[mainAxisClientOffsetProperty[_this.props.axis]]; + } else { + position = event[mainAxisClientOffsetProperty[_this.props.axis]] - _this.getTrackOffset(); + } + _this.setValueFromPosition(event, position); + + document.addEventListener('mousemove', _this.handleDragMouseMove); + document.addEventListener('mouseup', _this.handleMouseEnd); + + // Cancel text selection + event.preventDefault(); + + // Set focus manually since we called preventDefault() + _this.handle.focus(); + + _this.onDragStart(event); + }, _this.handleMouseUp = function () { + if (!_this.props.disabled) { + _this.setState({ + active: false + }); + } + }, _this.handleMouseEnter = function () { + _this.setState({ + hovered: true + }); + }, _this.handleMouseLeave = function () { + _this.setState({ + hovered: false + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Slider, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + valueProp = _props.value, + defaultValue = _props.defaultValue, + min = _props.min, + max = _props.max; + + + var value = valueProp; + if (value === undefined) { + value = defaultValue !== undefined ? defaultValue : min; + } + + if (value > max) { + value = max; + } else if (value < min) { + value = min; + } + + this.setState({ + value: value + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== undefined && !this.state.dragging) { + this.setState({ + value: nextProps.value + }); + } + } + }, { + key: 'getValue', + value: function getValue() { + false ? (0, _warning2.default)(false, 'Material-UI Slider: getValue() method is deprecated.\n Use the onChange callbacks instead.\n It will be removed with v0.17.0.') : void 0; + + return this.state.value; + } + }, { + key: 'clearValue', + value: function clearValue() { + false ? (0, _warning2.default)(false, 'Material-UI Slider: clearValue() method is deprecated.\n Use the value property to control the component instead.\n It will be removed with v0.17.0.') : void 0; + + this.setState({ + value: this.props.min + }); + } + }, { + key: 'getTrackOffset', + value: function getTrackOffset() { + return this.track.getBoundingClientRect()[mainAxisOffsetProperty[this.props.axis]]; + } + }, { + key: 'onDragStart', + value: function onDragStart(event) { + this.setState({ + dragging: true, + active: true + }); + + if (this.props.onDragStart) { + this.props.onDragStart(event); + } + } + }, { + key: 'onDragUpdate', + value: function onDragUpdate(event, type) { + var _this2 = this; + + if (this.dragRunning) { + return; + } + this.dragRunning = true; + + requestAnimationFrame(function () { + _this2.dragRunning = false; + + var source = type === 'touch' ? event.touches[0] : event; + + var position = void 0; + if (isMouseControlInverted(_this2.props.axis)) { + position = _this2.getTrackOffset() - source[mainAxisClientOffsetProperty[_this2.props.axis]]; + } else { + position = source[mainAxisClientOffsetProperty[_this2.props.axis]] - _this2.getTrackOffset(); + } + + if (!_this2.props.disabled) { + _this2.setValueFromPosition(event, position); + } + }); + } + }, { + key: 'onDragStop', + value: function onDragStop(event) { + this.setState({ + dragging: false, + active: false + }); + + if (this.props.onDragStop) { + this.props.onDragStop(event); + } + } + }, { + key: 'setValueFromPosition', + value: function setValueFromPosition(event, position) { + var positionMax = this.track[mainAxisClientProperty[this.props.axis]]; + if (position < 0) { + position = 0; + } else if (position > positionMax) { + position = positionMax; + } + + var _props2 = this.props, + step = _props2.step, + min = _props2.min, + max = _props2.max; + + + var value = void 0; + value = position / positionMax * (max - min); + value = Math.round(value / step) * step + min; + value = parseFloat(value.toFixed(5)); + + if (value > max) { + value = max; + } else if (value < min) { + value = min; + } + + if (this.state.value !== value) { + this.setState({ + value: value + }); + + if (this.props.onChange) { + this.props.onChange(event, value); + } + } + } + }, { + key: 'render', + value: function render() { + var _this3 = this; + + var _props3 = this.props, + axis = _props3.axis, + description = _props3.description, + disabled = _props3.disabled, + disableFocusRipple = _props3.disableFocusRipple, + error = _props3.error, + max = _props3.max, + min = _props3.min, + name = _props3.name, + onBlur = _props3.onBlur, + onChange = _props3.onChange, + onDragStart = _props3.onDragStart, + onDragStop = _props3.onDragStop, + onFocus = _props3.onFocus, + required = _props3.required, + sliderStyle = _props3.sliderStyle, + step = _props3.step, + style = _props3.style, + other = (0, _objectWithoutProperties3.default)(_props3, ['axis', 'description', 'disabled', 'disableFocusRipple', 'error', 'max', 'min', 'name', 'onBlur', 'onChange', 'onDragStart', 'onDragStop', 'onFocus', 'required', 'sliderStyle', 'step', 'style']); + var _state = this.state, + active = _state.active, + focused = _state.focused, + hovered = _state.hovered, + value = _state.value; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var percent = getPercent(value, min, max); + + var handleStyles = {}; + if (percent === 0) { + handleStyles = (0, _simpleAssign2.default)({}, styles.handle, styles.handleWhenPercentZero, active && styles.handleWhenActive, (hovered || focused) && !disabled && styles.handleWhenPercentZeroAndFocused, disabled && styles.handleWhenPercentZeroAndDisabled); + } else { + handleStyles = (0, _simpleAssign2.default)({}, styles.handle, active && styles.handleWhenActive, disabled && styles.handleWhenDisabled); + } + + var rippleStyle = (0, _simpleAssign2.default)({}, styles.ripple, percent === 0 && styles.rippleWhenPercentZero); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, style)) }), + _react2.default.createElement( + 'span', + null, + description + ), + _react2.default.createElement( + 'span', + null, + error + ), + _react2.default.createElement( + 'div', + { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.slider, sliderStyle)), + onFocus: this.handleFocus, + onBlur: this.handleBlur, + onMouseDown: this.handleMouseDown, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onMouseUp: this.handleMouseUp, + onTouchStart: this.handleTouchStart, + onKeyDown: !disabled && this.handleKeyDown + }, + _react2.default.createElement( + 'div', + { ref: function ref(node) { + return _this3.track = node; + }, style: prepareStyles(styles.track) }, + _react2.default.createElement('div', { style: prepareStyles(styles.filled) }), + _react2.default.createElement('div', { style: prepareStyles(styles.remaining) }), + _react2.default.createElement( + 'div', + { + ref: function ref(node) { + return _this3.handle = node; + }, + style: prepareStyles(handleStyles), + tabIndex: 0 + }, + !disabled && !disableFocusRipple && _react2.default.createElement(_FocusRipple2.default, { + style: rippleStyle, + innerStyle: styles.rippleInner, + show: (hovered || focused) && !active, + color: styles.rippleColor.fill + }) + ) + ) + ), + _react2.default.createElement('input', { + type: 'hidden', + name: name, + value: value, + required: required, + min: min, + max: max, + step: step + }) + ); + } + }]); + return Slider; +}(_react.Component); + +Slider.defaultProps = { + axis: 'x', + disabled: false, + disableFocusRipple: false, + max: 1, + min: 0, + required: true, + step: 0.01, + style: {} +}; +Slider.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Slider.propTypes = { + /** + * The axis on which the slider will slide. + */ + axis: _react.PropTypes.oneOf(['x', 'x-reverse', 'y', 'y-reverse']), + /** + * The default value of the slider. + */ + defaultValue: valueInRangePropType, + /** + * Describe the slider. + */ + description: (0, _deprecatedPropType2.default)(_react.PropTypes.node, 'Use a sibling node element instead. It will be removed with v0.17.0.'), + /** + * Disables focus ripple if set to true. + */ + disableFocusRipple: _react.PropTypes.bool, + /** + * If true, the slider will not be interactable. + */ + disabled: _react.PropTypes.bool, + /** + * An error message for the slider. + */ + error: (0, _deprecatedPropType2.default)(_react.PropTypes.node, 'Use a sibling node element instead. It will be removed with v0.17.0.'), + /** + * The maximum value the slider can slide to on + * a scale from 0 to 1 inclusive. Cannot be equal to min. + */ + max: minMaxPropType, + /** + * The minimum value the slider can slide to on a scale + * from 0 to 1 inclusive. Cannot be equal to max. + */ + min: minMaxPropType, + /** + * The name of the slider. Behaves like the name attribute + * of an input element. + */ + name: _react.PropTypes.string, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function that is fired when the slider's value changed. + * + * @param {object} event KeyDown event targeting the slider. + * @param {number} newValue The new value of the slider. + */ + onChange: _react.PropTypes.func, + /** + * Callback function that is fired when the slider has begun to move. + * + * @param {object} event MouseDown or TouchStart event targeting the slider. + */ + onDragStart: _react.PropTypes.func, + /** + * Callback function that is fired when the slide has stopped moving. + * + * @param {object} event MouseEnd or TouchEnd event targeting the slider. + */ + onDragStop: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Whether or not the slider is required in a form. + */ + required: _react.PropTypes.bool, + /** + * Override the inline-styles of the inner slider element. + */ + sliderStyle: _react.PropTypes.object, + /** + * The granularity the slider can step through values. + */ + step: _react.PropTypes.number, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The value of the slider. + */ + value: valueInRangePropType +} : void 0; +exports.default = Slider; + +/***/ }), +/* 825 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _defineProperty = __webpack_require__(185); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (obj, key, value) { + if (key in obj) { + (0, _defineProperty2.default)(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +}; + +/***/ }), +/* 826 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = deprecated; + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var warned = {}; /** + * This module is taken from https://github.com/react-bootstrap/react-prop-types. + * It's not a dependency to reduce build size / install time. + * It should be pretty stable. + */ +function deprecated(validator, reason) { + return function validate(props, propName, componentName, location, propFullName) { + var componentNameSafe = componentName || '<<anonymous>>'; + var propFullNameSafe = propFullName || propName; + + if (props[propName] != null) { + var messageKey = componentName + '.' + propName; + + false ? (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason)) : void 0; + + warned[messageKey] = true; + } + + for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { + args[_key - 5] = arguments[_key]; + } + + return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args)); + }; +} + +/***/ }), +/* 827 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _TextField = __webpack_require__(97); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _createComponent = __webpack_require__(43); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(60); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_TextField2.default, function (_ref) { + var defaultValue = _ref.defaultValue, + props = _objectWithoutProperties(_ref, ['defaultValue']); + + return (0, _mapError2.default)(props); +}); + +/***/ }), +/* 828 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _TimePicker = __webpack_require__(829); + +var _TimePicker2 = _interopRequireDefault(_TimePicker); + +var _createComponent = __webpack_require__(43); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(60); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_TimePicker2.default, function (_ref) { + var _ref$input = _ref.input, + onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onBlur']), + defaultTime = _ref.defaultTime, + _onChange = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'defaultTime', 'onChange']); + + return _extends({}, inputProps, (0, _mapError2.default)(props), { + onChange: function onChange(event, value) { + inputProps.onChange(value); + if (_onChange) { + _onChange(value); + } + } + }); +}); + +/***/ }), +/* 829 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _TimePicker = __webpack_require__(830); + +var _TimePicker2 = _interopRequireDefault(_TimePicker); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _TimePicker2.default; + +/***/ }), +/* 830 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _TimePickerDialog = __webpack_require__(831); + +var _TimePickerDialog2 = _interopRequireDefault(_TimePickerDialog); + +var _TextField = __webpack_require__(97); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _timeUtils = __webpack_require__(98); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var emptyTime = new Date(); +emptyTime.setHours(0); +emptyTime.setMinutes(0); +emptyTime.setSeconds(0); +emptyTime.setMilliseconds(0); + +var TimePicker = function (_Component) { + (0, _inherits3.default)(TimePicker, _Component); + + function TimePicker() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TimePicker); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimePicker.__proto__ || (0, _getPrototypeOf2.default)(TimePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + time: null, + dialogTime: new Date() + }, _this.handleAcceptDialog = function (time) { + _this.setState({ + time: time + }); + if (_this.props.onChange) _this.props.onChange(null, time); + }, _this.handleFocusInput = function (event) { + event.target.blur(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleTouchTapInput = function (event) { + event.preventDefault(); + + if (!_this.props.disabled) { + _this.openDialog(); + } + + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TimePicker, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + time: this.isControlled() ? this.getControlledTime() : this.props.defaultTime + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== this.props.value) { + this.setState({ + time: this.getControlledTime(nextProps) + }); + } + } + + /** + * Alias for `openDialog()` for an api consistent with TextField. + */ + + }, { + key: 'focus', + value: function focus() { + this.openDialog(); + } + }, { + key: 'openDialog', + value: function openDialog() { + this.setState({ + dialogTime: this.state.time + }); + this.refs.dialogWindow.show(); + } + }, { + key: 'isControlled', + value: function isControlled() { + return this.props.value !== null; + } + }, { + key: 'getControlledTime', + value: function getControlledTime() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; + + var result = null; + if (props.value instanceof Date) { + result = props.value; + } + return result; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + autoOk = _props.autoOk, + cancelLabel = _props.cancelLabel, + defaultTime = _props.defaultTime, + dialogBodyStyle = _props.dialogBodyStyle, + dialogStyle = _props.dialogStyle, + format = _props.format, + okLabel = _props.okLabel, + onFocus = _props.onFocus, + onTouchTap = _props.onTouchTap, + onShow = _props.onShow, + onDismiss = _props.onDismiss, + pedantic = _props.pedantic, + style = _props.style, + textFieldStyle = _props.textFieldStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['autoOk', 'cancelLabel', 'defaultTime', 'dialogBodyStyle', 'dialogStyle', 'format', 'okLabel', 'onFocus', 'onTouchTap', 'onShow', 'onDismiss', 'pedantic', 'style', 'textFieldStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + var time = this.state.time; + + + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + style: textFieldStyle, + ref: 'input', + value: time === emptyTime ? null : (0, _timeUtils.formatTime)(time, format, pedantic), + onFocus: this.handleFocusInput, + onTouchTap: this.handleTouchTapInput + })), + _react2.default.createElement(_TimePickerDialog2.default, { + ref: 'dialogWindow', + bodyStyle: dialogBodyStyle, + initialTime: this.state.dialogTime, + onAccept: this.handleAcceptDialog, + onShow: onShow, + onDismiss: onDismiss, + format: format, + okLabel: okLabel, + cancelLabel: cancelLabel, + autoOk: autoOk, + style: dialogStyle + }) + ); + } + }]); + return TimePicker; +}(_react.Component); + +TimePicker.defaultProps = { + autoOk: false, + cancelLabel: 'Cancel', + defaultTime: null, + disabled: false, + format: 'ampm', + okLabel: 'OK', + pedantic: false, + style: {}, + value: null +}; +TimePicker.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TimePicker.propTypes = { + /** + * If true, automatically accept and close the picker on set minutes. + */ + autoOk: _react.PropTypes.bool, + /** + * Override the label of the 'Cancel' button. + */ + cancelLabel: _react.PropTypes.node, + /** + * The initial time value of the TimePicker. + */ + defaultTime: _react.PropTypes.object, + /** + * Override the inline-styles of TimePickerDialog's body element. + */ + dialogBodyStyle: _react.PropTypes.object, + /** + * Override the inline-styles of TimePickerDialog's root element. + */ + dialogStyle: _react.PropTypes.object, + /** + * If true, the TimePicker is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Tells the component to display the picker in `ampm` (12hr) format or `24hr` format. + */ + format: _react.PropTypes.oneOf(['ampm', '24hr']), + /** + * Override the label of the 'OK' button. + */ + okLabel: _react.PropTypes.node, + /** + * Callback function that is fired when the time value changes. The time value is passed in a Date Object. + * Since there is no particular event associated with the change the first argument will always be null + * and the second argument will be the new Date instance. + */ + onChange: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker dialog is dismissed. + */ + onDismiss: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker `TextField` gains focus. + */ + onFocus: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker dialog is shown. + */ + onShow: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker is tapped or clicked. + */ + onTouchTap: _react.PropTypes.func, + /** + * If true, uses ("noon" / "midnight") instead of ("12 a.m." / "12 p.m."). + * + * It's technically more correct to refer to "12 noon" and "12 midnight" rather than "12 a.m." and "12 p.m." + * and it avoids confusion between different locales. By default (for compatibility reasons) TimePicker uses + * ("12 a.m." / "12 p.m."). + */ + pedantic: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of TimePicker's TextField element. + */ + textFieldStyle: _react.PropTypes.object, + /** + * Sets the time for the Time Picker programmatically. + */ + value: _react.PropTypes.object +} : void 0; +exports.default = TimePicker; + +/***/ }), +/* 831 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(42); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(30); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _Clock = __webpack_require__(832); + +var _Clock2 = _interopRequireDefault(_Clock); + +var _Dialog = __webpack_require__(323); + +var _Dialog2 = _interopRequireDefault(_Dialog); + +var _FlatButton = __webpack_require__(198); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TimePickerDialog = function (_Component) { + (0, _inherits3.default)(TimePickerDialog, _Component); + + function TimePickerDialog() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TimePickerDialog); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(TimePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.handleRequestClose = function () { + _this.dismiss(); + }, _this.handleTouchTapCancel = function () { + _this.dismiss(); + }, _this.handleTouchTapOK = function () { + if (_this.props.onAccept) { + _this.props.onAccept(_this.refs.clock.getSelectedTime()); + } + _this.setState({ + open: false + }); + }, _this.handleKeyUp = function (event) { + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.handleTouchTapOK(); + break; + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TimePickerDialog, [{ + key: 'show', + value: function show() { + if (this.props.onShow && !this.state.open) this.props.onShow(); + this.setState({ + open: true + }); + } + }, { + key: 'dismiss', + value: function dismiss() { + if (this.props.onDismiss && this.state.open) this.props.onDismiss(); + this.setState({ + open: false + }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + bodyStyle = _props.bodyStyle, + initialTime = _props.initialTime, + onAccept = _props.onAccept, + format = _props.format, + autoOk = _props.autoOk, + okLabel = _props.okLabel, + cancelLabel = _props.cancelLabel, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['bodyStyle', 'initialTime', 'onAccept', 'format', 'autoOk', 'okLabel', 'cancelLabel', 'style']); + + + var styles = { + root: { + fontSize: 14, + color: this.context.muiTheme.timePicker.clockColor + }, + dialogContent: { + width: 280 + }, + body: { + padding: 0 + } + }; + + var actions = [_react2.default.createElement(_FlatButton2.default, { + key: 0, + label: cancelLabel, + primary: true, + onTouchTap: this.handleTouchTapCancel + }), _react2.default.createElement(_FlatButton2.default, { + key: 1, + label: okLabel, + primary: true, + onTouchTap: this.handleTouchTapOK + })]; + + var onClockChangeMinutes = autoOk === true ? this.handleTouchTapOK : undefined; + var open = this.state.open; + + return _react2.default.createElement( + _Dialog2.default, + (0, _extends3.default)({}, other, { + style: (0, _simpleAssign2.default)(styles.root, style), + bodyStyle: (0, _simpleAssign2.default)(styles.body, bodyStyle), + actions: actions, + contentStyle: styles.dialogContent, + repositionOnUpdate: false, + open: open, + onRequestClose: this.handleRequestClose + }), + open && _react2.default.createElement(_reactEventListener2.default, { target: 'window', onKeyUp: this.handleKeyUp }), + open && _react2.default.createElement(_Clock2.default, { + ref: 'clock', + format: format, + initialTime: initialTime, + onChangeMinutes: onClockChangeMinutes + }) + ); + } + }]); + return TimePickerDialog; +}(_react.Component); + +TimePickerDialog.defaultProps = { + okLabel: 'OK', + cancelLabel: 'Cancel' +}; +TimePickerDialog.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TimePickerDialog.propTypes = { + autoOk: _react.PropTypes.bool, + bodyStyle: _react.PropTypes.object, + cancelLabel: _react.PropTypes.node, + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialTime: _react.PropTypes.object, + okLabel: _react.PropTypes.node, + onAccept: _react.PropTypes.func, + onDismiss: _react.PropTypes.func, + onShow: _react.PropTypes.func, + style: _react.PropTypes.object +} : void 0; +exports.default = TimePickerDialog; + +/***/ }), +/* 832 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _TimeDisplay = __webpack_require__(833); + +var _TimeDisplay2 = _interopRequireDefault(_TimeDisplay); + +var _ClockHours = __webpack_require__(840); + +var _ClockHours2 = _interopRequireDefault(_ClockHours); + +var _ClockMinutes = __webpack_require__(841); + +var _ClockMinutes2 = _interopRequireDefault(_ClockMinutes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Clock = function (_Component) { + (0, _inherits3.default)(Clock, _Component); + + function Clock() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Clock); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Clock.__proto__ || (0, _getPrototypeOf2.default)(Clock)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + selectedTime: null, + mode: 'hour' + }, _this.setMode = function (mode) { + setTimeout(function () { + _this.setState({ + mode: mode + }); + }, 100); + }, _this.handleSelectAffix = function (affix) { + if (affix === _this.getAffix()) return; + + var hours = _this.state.selectedTime.getHours(); + + if (affix === 'am') { + _this.handleChangeHours(hours - 12, affix); + return; + } + + _this.handleChangeHours(hours + 12, affix); + }, _this.handleChangeHours = function (hours, finished) { + var time = new Date(_this.state.selectedTime); + var affix = void 0; + + if (typeof finished === 'string') { + affix = finished; + finished = undefined; + } + if (!affix) { + affix = _this.getAffix(); + } + if (affix === 'pm' && hours < 12) { + hours += 12; + } + + time.setHours(hours); + _this.setState({ + selectedTime: time + }); + + if (finished) { + setTimeout(function () { + _this.setState({ + mode: 'minute' + }); + + var onChangeHours = _this.props.onChangeHours; + + if (onChangeHours) { + onChangeHours(time); + } + }, 100); + } + }, _this.handleChangeMinutes = function (minutes, finished) { + var time = new Date(_this.state.selectedTime); + time.setMinutes(minutes); + _this.setState({ + selectedTime: time + }); + + var onChangeMinutes = _this.props.onChangeMinutes; + + if (onChangeMinutes && finished) { + setTimeout(function () { + onChangeMinutes(time); + }, 0); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Clock, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + selectedTime: this.props.initialTime || new Date() + }); + } + }, { + key: 'getAffix', + value: function getAffix() { + if (this.props.format !== 'ampm') return ''; + + var hours = this.state.selectedTime.getHours(); + if (hours < 12) { + return 'am'; + } + + return 'pm'; + } + }, { + key: 'getSelectedTime', + value: function getSelectedTime() { + return this.state.selectedTime; + } + }, { + key: 'render', + value: function render() { + var clock = null; + + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + timePicker = _context$muiTheme.timePicker; + + + var styles = { + root: { + userSelect: 'none' + }, + container: { + height: 280, + padding: 10, + position: 'relative', + boxSizing: 'content-box' + }, + circle: { + position: 'absolute', + top: 20, + width: 260, + height: 260, + borderRadius: '100%', + backgroundColor: timePicker.clockCircleColor + } + }; + + if (this.state.mode === 'hour') { + clock = _react2.default.createElement(_ClockHours2.default, { + key: 'hours', + format: this.props.format, + onChange: this.handleChangeHours, + initialHours: this.state.selectedTime.getHours() + }); + } else { + clock = _react2.default.createElement(_ClockMinutes2.default, { + key: 'minutes', + onChange: this.handleChangeMinutes, + initialMinutes: this.state.selectedTime.getMinutes() + }); + } + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement(_TimeDisplay2.default, { + selectedTime: this.state.selectedTime, + mode: this.state.mode, + format: this.props.format, + affix: this.getAffix(), + onSelectAffix: this.handleSelectAffix, + onSelectHour: this.setMode.bind(this, 'hour'), + onSelectMin: this.setMode.bind(this, 'minute') + }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.container) }, + _react2.default.createElement('div', { style: prepareStyles(styles.circle) }), + clock + ) + ); + } + }]); + return Clock; +}(_react.Component); + +Clock.defaultProps = { + initialTime: new Date() +}; +Clock.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Clock.propTypes = { + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialTime: _react.PropTypes.object, + onChangeHours: _react.PropTypes.func, + onChangeMinutes: _react.PropTypes.func +} : void 0; +exports.default = Clock; + +/***/ }), +/* 833 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _slicedToArray2 = __webpack_require__(326); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TimeDisplay = function (_Component) { + (0, _inherits3.default)(TimeDisplay, _Component); + + function TimeDisplay() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TimeDisplay); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimeDisplay.__proto__ || (0, _getPrototypeOf2.default)(TimeDisplay)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + transitionDirection: 'up' + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TimeDisplay, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.selectedTime !== this.props.selectedTime) { + var direction = nextProps.selectedTime > this.props.selectedTime ? 'up' : 'down'; + + this.setState({ + transitionDirection: direction + }); + } + } + }, { + key: 'sanitizeTime', + value: function sanitizeTime() { + var hour = this.props.selectedTime.getHours(); + var min = this.props.selectedTime.getMinutes().toString(); + + if (this.props.format === 'ampm') { + hour %= 12; + hour = hour || 12; + } + + hour = hour.toString(); + if (hour.length < 2) hour = '0' + hour; + if (min.length < 2) min = '0' + min; + + return [hour, min]; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + affix = _props.affix, + format = _props.format, + mode = _props.mode, + onSelectAffix = _props.onSelectAffix, + onSelectHour = _props.onSelectHour, + onSelectMin = _props.onSelectMin, + selectedTime = _props.selectedTime, + other = (0, _objectWithoutProperties3.default)(_props, ['affix', 'format', 'mode', 'onSelectAffix', 'onSelectHour', 'onSelectMin', 'selectedTime']); + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + timePicker = _context$muiTheme.timePicker; + + + var styles = { + root: { + padding: '14px 0', + borderTopLeftRadius: 2, + borderTopRightRadius: 2, + backgroundColor: timePicker.headerColor, + color: timePicker.textColor + }, + text: { + margin: '6px 0', + lineHeight: '58px', + height: 58, + fontSize: 58, + display: 'flex', + justifyContent: 'center', + alignItems: 'baseline' + }, + time: { + margin: '0 10px' + }, + affix: { + flex: 1, + position: 'relative', + lineHeight: '17px', + height: 17, + fontSize: 17 + }, + affixTop: { + position: 'absolute', + top: -20, + left: 0 + }, + clickable: { + cursor: 'pointer' + }, + inactive: { + opacity: 0.7 + } + }; + + var _sanitizeTime = this.sanitizeTime(), + _sanitizeTime2 = (0, _slicedToArray3.default)(_sanitizeTime, 2), + hour = _sanitizeTime2[0], + min = _sanitizeTime2[1]; + + var buttons = []; + if (format === 'ampm') { + buttons = [_react2.default.createElement( + 'div', + { + key: 'pm', + style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, affix === 'pm' ? {} : styles.inactive)), + onTouchTap: function onTouchTap() { + return onSelectAffix('pm'); + } + }, + 'PM' + ), _react2.default.createElement( + 'div', + { + key: 'am', + style: prepareStyles((0, _simpleAssign2.default)({}, styles.affixTop, styles.clickable, affix === 'am' ? {} : styles.inactive)), + onTouchTap: function onTouchTap() { + return onSelectAffix('am'); + } + }, + 'AM' + )]; + } + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(styles.root) }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.text) }, + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.affix)) }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.time) }, + _react2.default.createElement( + 'span', + { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, mode === 'hour' ? {} : styles.inactive)), + onTouchTap: onSelectHour + }, + hour + ), + _react2.default.createElement( + 'span', + null, + ':' + ), + _react2.default.createElement( + 'span', + { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, mode === 'minute' ? {} : styles.inactive)), + onTouchTap: onSelectMin + }, + min + ) + ), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.affix)) }, + buttons + ) + ) + ); + } + }]); + return TimeDisplay; +}(_react.Component); + +TimeDisplay.defaultProps = { + affix: '', + mode: 'hour' +}; +TimeDisplay.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TimeDisplay.propTypes = { + affix: _react.PropTypes.oneOf(['', 'pm', 'am']), + format: _react.PropTypes.oneOf(['ampm', '24hr']), + mode: _react.PropTypes.oneOf(['hour', 'minute']), + onSelectAffix: _react.PropTypes.func, + onSelectHour: _react.PropTypes.func, + onSelectMin: _react.PropTypes.func, + selectedTime: _react.PropTypes.object.isRequired +} : void 0; +exports.default = TimeDisplay; + +/***/ }), +/* 834 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(835), __esModule: true }; + +/***/ }), +/* 835 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(124); +__webpack_require__(93); +module.exports = __webpack_require__(836); + + +/***/ }), +/* 836 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(191); +var ITERATOR = __webpack_require__(22)('iterator'); +var Iterators = __webpack_require__(78); +module.exports = __webpack_require__(18).isIterable = function (it) { + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + // eslint-disable-next-line no-prototype-builtins + || Iterators.hasOwnProperty(classof(O)); +}; + + +/***/ }), +/* 837 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(838), __esModule: true }; + +/***/ }), +/* 838 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(124); +__webpack_require__(93); +module.exports = __webpack_require__(839); + + +/***/ }), +/* 839 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(36); +var get = __webpack_require__(190); +module.exports = __webpack_require__(18).getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; + + +/***/ }), +/* 840 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(19); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _ClockNumber = __webpack_require__(327); + +var _ClockNumber2 = _interopRequireDefault(_ClockNumber); + +var _ClockPointer = __webpack_require__(328); + +var _ClockPointer2 = _interopRequireDefault(_ClockPointer); + +var _timeUtils = __webpack_require__(98); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ClockHours = function (_Component) { + (0, _inherits3.default)(ClockHours, _Component); + + function ClockHours() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClockHours); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockHours.__proto__ || (0, _getPrototypeOf2.default)(ClockHours)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) { + event.preventDefault(); + _this.setClock(event.nativeEvent, true); + }, _this.handleMove = function (event) { + event.preventDefault(); + if (_this.isMousePressed(event) !== 1) return; + _this.setClock(event.nativeEvent, false); + }, _this.handleTouchMove = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], false); + }, _this.handleTouchEnd = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], true); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClockHours, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var clockElement = _reactDom2.default.findDOMNode(this.refs.mask); + + this.center = { + x: clockElement.offsetWidth / 2, + y: clockElement.offsetHeight / 2 + }; + + this.basePoint = { + x: this.center.x, + y: 0 + }; + } + }, { + key: 'isMousePressed', + value: function isMousePressed(event) { + if (typeof event.buttons === 'undefined') { + return event.nativeEvent.which; + } + + return event.buttons; + } + }, { + key: 'setClock', + value: function setClock(event, finish) { + if (typeof event.offsetX === 'undefined') { + var offset = (0, _timeUtils.getTouchEventOffsetValues)(event); + + event.offsetX = offset.offsetX; + event.offsetY = offset.offsetY; + } + + var hours = this.getHours(event.offsetX, event.offsetY); + + this.props.onChange(hours, finish); + } + }, { + key: 'getHours', + value: function getHours(offsetX, offsetY) { + var step = 30; + var x = offsetX - this.center.x; + var y = offsetY - this.center.y; + var cx = this.basePoint.x - this.center.x; + var cy = this.basePoint.y - this.center.y; + + var atan = Math.atan2(cx, cy) - Math.atan2(x, y); + + var deg = (0, _timeUtils.rad2deg)(atan); + deg = Math.round(deg / step) * step; + deg %= 360; + + var value = Math.floor(deg / step) || 0; + + var delta = Math.pow(x, 2) + Math.pow(y, 2); + var distance = Math.sqrt(delta); + + value = value || 12; + if (this.props.format === '24hr') { + if (distance < 90) { + value += 12; + value %= 24; + } + } else { + value %= 12; + } + + return value; + } + }, { + key: 'getSelected', + value: function getSelected() { + var hour = this.props.initialHours; + + if (this.props.format === 'ampm') { + hour %= 12; + hour = hour || 12; + } + + return hour; + } + }, { + key: 'getHourNumbers', + value: function getHourNumbers() { + var _this2 = this; + + var style = { + pointerEvents: 'none' + }; + var hourSize = this.props.format === 'ampm' ? 12 : 24; + + var hours = []; + for (var i = 1; i <= hourSize; i++) { + hours.push(i % 24); + } + + return hours.map(function (hour) { + var isSelected = _this2.getSelected() === hour; + return _react2.default.createElement(_ClockNumber2.default, { + key: hour, + style: style, + isSelected: isSelected, + type: 'hour', + value: hour + }); + }); + } + }, { + key: 'render', + value: function render() { + var styles = { + root: { + height: '100%', + width: '100%', + borderRadius: '100%', + position: 'relative', + pointerEvents: 'none', + boxSizing: 'border-box' + }, + + hitMask: { + height: '100%', + width: '100%', + pointerEvents: 'auto' + } + }; + + var prepareStyles = this.context.muiTheme.prepareStyles; + + var hours = this.getSelected(); + var numbers = this.getHourNumbers(); + + return _react2.default.createElement( + 'div', + { ref: 'clock', style: prepareStyles(styles.root) }, + _react2.default.createElement(_ClockPointer2.default, { hasSelected: true, value: hours, type: 'hour' }), + numbers, + _react2.default.createElement('div', { + ref: 'mask', style: prepareStyles(styles.hitMask), onTouchMove: this.handleTouchMove, + onTouchEnd: this.handleTouchEnd, onMouseUp: this.handleUp, onMouseMove: this.handleMove + }) + ); + } + }]); + return ClockHours; +}(_react.Component); + +ClockHours.defaultProps = { + initialHours: new Date().getHours(), + onChange: function onChange() {}, + format: 'ampm' +}; +ClockHours.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ClockHours.propTypes = { + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialHours: _react.PropTypes.number, + onChange: _react.PropTypes.func +} : void 0; +exports.default = ClockHours; + +/***/ }), +/* 841 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _ClockNumber = __webpack_require__(327); + +var _ClockNumber2 = _interopRequireDefault(_ClockNumber); + +var _ClockPointer = __webpack_require__(328); + +var _ClockPointer2 = _interopRequireDefault(_ClockPointer); + +var _timeUtils = __webpack_require__(98); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ClockMinutes = function (_Component) { + (0, _inherits3.default)(ClockMinutes, _Component); + + function ClockMinutes() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClockMinutes); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockMinutes.__proto__ || (0, _getPrototypeOf2.default)(ClockMinutes)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) { + event.preventDefault(); + _this.setClock(event.nativeEvent, true); + }, _this.handleMove = function (event) { + event.preventDefault(); + if (_this.isMousePressed(event) !== 1) { + return; + } + _this.setClock(event.nativeEvent, false); + }, _this.handleTouch = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], event.type === 'touchend'); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClockMinutes, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var clockElement = this.refs.mask; + + this.center = { + x: clockElement.offsetWidth / 2, + y: clockElement.offsetHeight / 2 + }; + + this.basePoint = { + x: this.center.x, + y: 0 + }; + } + }, { + key: 'isMousePressed', + value: function isMousePressed(event) { + if (typeof event.buttons === 'undefined') { + return event.nativeEvent.which; + } + return event.buttons; + } + }, { + key: 'setClock', + value: function setClock(event, finish) { + if (typeof event.offsetX === 'undefined') { + var offset = (0, _timeUtils.getTouchEventOffsetValues)(event); + + event.offsetX = offset.offsetX; + event.offsetY = offset.offsetY; + } + + var minutes = this.getMinutes(event.offsetX, event.offsetY); + + this.props.onChange(minutes, finish); + } + }, { + key: 'getMinutes', + value: function getMinutes(offsetX, offsetY) { + var step = 6; + var x = offsetX - this.center.x; + var y = offsetY - this.center.y; + var cx = this.basePoint.x - this.center.x; + var cy = this.basePoint.y - this.center.y; + + var atan = Math.atan2(cx, cy) - Math.atan2(x, y); + + var deg = (0, _timeUtils.rad2deg)(atan); + deg = Math.round(deg / step) * step; + deg %= 360; + + var value = Math.floor(deg / step) || 0; + + return value; + } + }, { + key: 'getMinuteNumbers', + value: function getMinuteNumbers() { + var minutes = []; + for (var i = 0; i < 12; i++) { + minutes.push(i * 5); + } + var selectedMinutes = this.props.initialMinutes; + var hasSelected = false; + + var numbers = minutes.map(function (minute) { + var isSelected = selectedMinutes === minute; + if (isSelected) { + hasSelected = true; + } + return _react2.default.createElement(_ClockNumber2.default, { + key: minute, + isSelected: isSelected, + type: 'minute', + value: minute + }); + }); + + return { + numbers: numbers, + hasSelected: hasSelected, + selected: selectedMinutes + }; + } + }, { + key: 'render', + value: function render() { + var styles = { + root: { + height: '100%', + width: '100%', + borderRadius: '100%', + position: 'relative', + pointerEvents: 'none', + boxSizing: 'border-box' + }, + + hitMask: { + height: '100%', + width: '100%', + pointerEvents: 'auto' + } + }; + + var prepareStyles = this.context.muiTheme.prepareStyles; + + var minutes = this.getMinuteNumbers(); + + return _react2.default.createElement( + 'div', + { ref: 'clock', style: prepareStyles(styles.root) }, + _react2.default.createElement(_ClockPointer2.default, { value: minutes.selected, type: 'minute', hasSelected: minutes.hasSelected }), + minutes.numbers, + _react2.default.createElement('div', { + ref: 'mask', + style: prepareStyles(styles.hitMask), + onTouchMove: this.handleTouch, + onTouchEnd: this.handleTouch, + onMouseUp: this.handleUp, + onMouseMove: this.handleMove + }) + ); + } + }]); + return ClockMinutes; +}(_react.Component); + +ClockMinutes.defaultProps = { + initialMinutes: new Date().getMinutes(), + onChange: function onChange() {} +}; +ClockMinutes.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ClockMinutes.propTypes = { + initialMinutes: _react.PropTypes.number, + onChange: _react.PropTypes.func +} : void 0; +exports.default = ClockMinutes; + +/***/ }), +/* 842 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _Toggle = __webpack_require__(843); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +var _createComponent = __webpack_require__(43); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_Toggle2.default, function (_ref) { + var _ref$input = _ref.input, + onChange = _ref$input.onChange, + value = _ref$input.value, + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']), + defaultToggled = _ref.defaultToggled, + meta = _ref.meta, + props = _objectWithoutProperties(_ref, ['input', 'defaultToggled', 'meta']); + + return _extends({}, inputProps, props, { + onToggle: onChange, + toggled: !!value + }); +}); + +/***/ }), +/* 843 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Toggle = __webpack_require__(844); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Toggle2.default; + +/***/ }), +/* 844 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _Paper = __webpack_require__(34); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _EnhancedSwitch = __webpack_require__(202); + +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var disabled = props.disabled, + elementStyle = props.elementStyle, + trackSwitchedStyle = props.trackSwitchedStyle, + thumbSwitchedStyle = props.thumbSwitchedStyle, + trackStyle = props.trackStyle, + thumbStyle = props.thumbStyle, + iconStyle = props.iconStyle, + rippleStyle = props.rippleStyle, + labelStyle = props.labelStyle; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + toggle = _context$muiTheme.toggle; + + + var toggleSize = 20; + var toggleTrackWidth = 36; + var styles = { + icon: { + width: 36, + padding: '4px 0px 6px 2px' + }, + ripple: { + top: -10, + left: -10, + color: state.switched ? toggle.thumbOnColor : baseTheme.palette.textColor + }, + toggleElement: { + width: toggleTrackWidth + }, + track: { + transition: _transitions2.default.easeOut(), + width: '100%', + height: 14, + borderRadius: 30, + backgroundColor: toggle.trackOffColor + }, + thumb: { + transition: _transitions2.default.easeOut(), + position: 'absolute', + top: 1, + left: 0, + width: toggleSize, + height: toggleSize, + lineHeight: '24px', + borderRadius: '50%', + backgroundColor: toggle.thumbOffColor + }, + trackWhenSwitched: { + backgroundColor: toggle.trackOnColor + }, + thumbWhenSwitched: { + backgroundColor: toggle.thumbOnColor, + left: '100%' + }, + trackWhenDisabled: { + backgroundColor: toggle.trackDisabledColor + }, + thumbWhenDisabled: { + backgroundColor: toggle.thumbDisabledColor + }, + label: { + color: disabled ? toggle.labelDisabledColor : toggle.labelColor, + width: 'calc(100% - ' + (toggleTrackWidth + 10) + 'px)' + } + }; + + (0, _simpleAssign2.default)(styles.track, trackStyle, state.switched && styles.trackWhenSwitched, state.switched && trackSwitchedStyle, disabled && styles.trackWhenDisabled); + + (0, _simpleAssign2.default)(styles.thumb, thumbStyle, state.switched && styles.thumbWhenSwitched, state.switched && thumbSwitchedStyle, disabled && styles.thumbWhenDisabled); + + if (state.switched) { + styles.thumb.marginLeft = 0 - styles.thumb.width; + } + + (0, _simpleAssign2.default)(styles.icon, iconStyle); + + (0, _simpleAssign2.default)(styles.ripple, rippleStyle); + + (0, _simpleAssign2.default)(styles.label, labelStyle); + + (0, _simpleAssign2.default)(styles.toggleElement, elementStyle); + + return styles; +} + +var Toggle = function (_Component) { + (0, _inherits3.default)(Toggle, _Component); + + function Toggle() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Toggle); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Toggle.__proto__ || (0, _getPrototypeOf2.default)(Toggle)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + switched: false + }, _this.handleStateChange = function (newSwitched) { + _this.setState({ + switched: newSwitched + }); + }, _this.handleToggle = function (event, isInputChecked) { + if (_this.props.onToggle) { + _this.props.onToggle(event, isInputChecked); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Toggle, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + toggled = _props.toggled, + defaultToggled = _props.defaultToggled, + valueLink = _props.valueLink; + + + if (toggled || defaultToggled || valueLink && valueLink.value) { + this.setState({ + switched: true + }); + } + } + }, { + key: 'isToggled', + value: function isToggled() { + return this.refs.enhancedSwitch.isSwitched(); + } + }, { + key: 'setToggled', + value: function setToggled(newToggledValue) { + this.refs.enhancedSwitch.setSwitched(newToggledValue); + } + }, { + key: 'render', + value: function render() { + var _props2 = this.props, + defaultToggled = _props2.defaultToggled, + elementStyle = _props2.elementStyle, + onToggle = _props2.onToggle, + trackSwitchedStyle = _props2.trackSwitchedStyle, + thumbSwitchedStyle = _props2.thumbSwitchedStyle, + toggled = _props2.toggled, + other = (0, _objectWithoutProperties3.default)(_props2, ['defaultToggled', 'elementStyle', 'onToggle', 'trackSwitchedStyle', 'thumbSwitchedStyle', 'toggled']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + var toggleElement = _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.toggleElement)) }, + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.track)) }), + _react2.default.createElement(_Paper2.default, { style: styles.thumb, circle: true, zDepth: 1 }) + ); + + var enhancedSwitchProps = { + ref: 'enhancedSwitch', + inputType: 'checkbox', + switchElement: toggleElement, + rippleStyle: styles.ripple, + rippleColor: styles.ripple.color, + iconStyle: styles.icon, + trackStyle: styles.track, + thumbStyle: styles.thumb, + labelStyle: styles.label, + switched: this.state.switched, + onSwitch: this.handleToggle, + onParentShouldUpdate: this.handleStateChange, + labelPosition: this.props.labelPosition + }; + + if (this.props.hasOwnProperty('toggled')) { + enhancedSwitchProps.checked = toggled; + } else if (this.props.hasOwnProperty('defaultToggled')) { + enhancedSwitchProps.defaultChecked = defaultToggled; + } + + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps)); + } + }]); + return Toggle; +}(_react.Component); + +Toggle.defaultProps = { + defaultToggled: false, + disabled: false, + labelPosition: 'left' +}; +Toggle.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Toggle.propTypes = { + /** + * Determines whether the Toggle is initially turned on. + * **Warning:** This cannot be used in conjunction with `toggled`. + * Decide between using a controlled or uncontrolled input element and remove one of these props. + * More info: https://fb.me/react-controlled-components + */ + defaultToggled: _react.PropTypes.bool, + /** + * Will disable the toggle if true. + */ + disabled: _react.PropTypes.bool, + /** + * Overrides the inline-styles of the Toggle element. + */ + elementStyle: _react.PropTypes.object, + /** + * Overrides the inline-styles of the Icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Overrides the inline-styles of the input element. + */ + inputStyle: _react.PropTypes.object, + /** + * Label for toggle. + */ + label: _react.PropTypes.node, + /** + * Where the label will be placed next to the toggle. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * Overrides the inline-styles of the Toggle element label. + */ + labelStyle: _react.PropTypes.object, + /** + * Callback function that is fired when the toggle switch is toggled. + */ + onToggle: _react.PropTypes.func, + /** + * Override style of ripple. + */ + rippleStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override style for thumb. + */ + thumbStyle: _react.PropTypes.object, + /** + * Override the inline styles for thumb when the toggle switch is toggled on. + */ + thumbSwitchedStyle: _react.PropTypes.object, + /** + * Toggled if set to true. + */ + toggled: _react.PropTypes.bool, + /** + * Override style for track. + */ + trackStyle: _react.PropTypes.object, + /** + * Override the inline styles for track when the toggle switch is toggled on. + */ + trackSwitchedStyle: _react.PropTypes.object, + /** + * ValueLink prop for when using controlled toggle. + */ + valueLink: _react.PropTypes.object +} : void 0; +exports.default = Toggle; + +/***/ }), +/* 845 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _assign = __webpack_require__(49); + +var _assign2 = _interopRequireDefault(_assign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reduxForm = __webpack_require__(113); + +var _reactRedux = __webpack_require__(27); + +var _RaisedButton = __webpack_require__(200); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _reduxFormMaterialUi = __webpack_require__(201); + +var _Styles = __webpack_require__(80); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _FormValidators = __webpack_require__(204); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Menus = __webpack_require__(96); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var defaultValues = { + autoCheckout: false, + autoPay: false, + strictSize: true, + hideSoldOut: false, + captchaBypass: false, + addToCartDelay: 200, + checkoutDelay: 2000 +}; + +var Options = function Options(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'options-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'autoCheckout', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable auto checkout', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'autoPay', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable auto payment', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'strictSize', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable strict size checking', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'hideSoldOut', + component: _reduxFormMaterialUi.Toggle, + label: 'Hide sold out products', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'captchaBypass', + component: _reduxFormMaterialUi.Toggle, + label: 'Bypass captcha (beta)', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'addToCartDelay', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Add to cart delay (ms)', + hintText: 'Add to cart delay (ms)', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'checkoutDelay', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Checkout delay (ms)', + hintText: 'Checkout delay (ms)', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'maxPrice', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Maximum product price', + hintText: 'Maximum product price', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'minPrice', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Minimum product price', + hintText: 'Minimum product price', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; + +function mapStateToProps(state, ownProps) { + return { + initialValues: (0, _assign2.default)(defaultValues, (state.settings.values[ownProps.shop] || {})[menus.MENU_OPTIONS] || {}) + }; +} + +Options.propTypes = { + shop: _react.PropTypes.string.isRequired +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({ + form: 'options' +})(Options)); + +/***/ }), +/* 846 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reduxForm = __webpack_require__(113); + +var _reactRedux = __webpack_require__(27); + +var _MenuItem = __webpack_require__(129); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +var _RaisedButton = __webpack_require__(200); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _reduxFormMaterialUi = __webpack_require__(201); + +var _Styles = __webpack_require__(80); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _Utils = __webpack_require__(329); + +var Utils = _interopRequireWildcard(_Utils); + +var _FormValidators = __webpack_require__(204); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Menus = __webpack_require__(96); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Sizes = function Sizes(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'biling-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'accessories', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Accessories', + hintText: 'Accessories', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 't-shirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'T-Shirts', + hintText: 'T-Shirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'pants', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Pants', + hintText: 'Pants', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizesPants.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shorts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shorts', + hintText: 'Shorts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizesPants.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'sweatshirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Sweatshirts', + hintText: 'Sweatshirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'tops-sweaters', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Tops/Sweaters', + hintText: 'Tops/Sweaters', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shirts', + hintText: 'Shirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'jackets', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Jackets', + hintText: 'Jackets', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shoes', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shoes', + hintText: 'Shoes', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.shoeSizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; + +Sizes.propTypes = { + shop: _react.PropTypes.string.isRequired +}; + +function mapStateToProps(state, ownProps) { + return { + initialValues: (state.settings.values[ownProps.shop] || {})[menus.MENU_SIZES] || {} + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({ + form: 'sizes' +})(Sizes)); + +/***/ }), +/* 847 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _assign = __webpack_require__(49); + +var _assign2 = _interopRequireDefault(_assign); + +exports.default = Layout; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _AppBar = __webpack_require__(848); + +var _AppBar2 = _interopRequireDefault(_AppBar); + +var _Tabs = __webpack_require__(851); + +var _Tabs2 = _interopRequireDefault(_Tabs); + +var _Paper = __webpack_require__(34); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _Styles = __webpack_require__(80); + +var _Styles2 = _interopRequireDefault(_Styles); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function Layout(props) { + var children = props.children, + title = props.title, + contentStyle = props.contentStyle, + tabs = props.tabs, + currentTab = props.currentTab; + + + var appBarStyles = (0, _assign2.default)({}, _Styles2.default.appBar); + + if (tabs) { + appBarStyles.marginBottom = 64; + } + + return _react2.default.createElement( + 'div', + { style: _Styles2.default.container }, + _react2.default.createElement( + _AppBar2.default, + { title: title, showMenuIconButton: false, style: appBarStyles }, + tabs && _react2.default.createElement( + 'div', + { style: { width: '100%' } }, + _react2.default.createElement( + _Tabs2.default, + { style: _Styles2.default.tabs, value: currentTab }, + tabs + ) + ) + ), + _react2.default.createElement( + 'div', + { style: { width: '100%' } }, + _react2.default.createElement( + 'div', + { style: (0, _assign2.default)({}, _Styles2.default.content, contentStyle) }, + _react2.default.createElement( + _Paper2.default, + { style: _Styles2.default.paper }, + children + ) + ) + ) + ); +} + +Layout.propTypes = { + children: _react.PropTypes.node, + title: _react.PropTypes.string.isRequired, + contentStyle: _react.PropTypes.object, + tabs: _react.PropTypes.arrayOf(_react.PropTypes.node), + currentTab: _react.PropTypes.any +}; + +/***/ }), +/* 848 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _AppBar = __webpack_require__(849); + +var _AppBar2 = _interopRequireDefault(_AppBar); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _AppBar2.default; + +/***/ }), +/* 849 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _keys = __webpack_require__(79); + +var _keys2 = _interopRequireDefault(_keys); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +exports.getStyles = getStyles; + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _IconButton = __webpack_require__(95); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _menu = __webpack_require__(850); + +var _menu2 = _interopRequireDefault(_menu); + +var _Paper = __webpack_require__(34); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _propTypes = __webpack_require__(41); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var _context$muiTheme = context.muiTheme, + appBar = _context$muiTheme.appBar, + iconButtonSize = _context$muiTheme.button.iconButtonSize, + zIndex = _context$muiTheme.zIndex; + + + var flatButtonSize = 36; + + var styles = { + root: { + position: 'relative', + zIndex: zIndex.appBar, + width: '100%', + display: 'flex', + backgroundColor: appBar.color, + paddingLeft: appBar.padding, + paddingRight: appBar.padding + }, + title: { + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', + margin: 0, + paddingTop: 0, + letterSpacing: 0, + fontSize: 24, + fontWeight: appBar.titleFontWeight, + color: appBar.textColor, + height: appBar.height, + lineHeight: appBar.height + 'px' + }, + mainElement: { + boxFlex: 1, + flex: '1' + }, + iconButtonStyle: { + marginTop: (appBar.height - iconButtonSize) / 2, + marginRight: 8, + marginLeft: -16 + }, + iconButtonIconStyle: { + fill: appBar.textColor, + color: appBar.textColor + }, + flatButton: { + color: appBar.textColor, + marginTop: (iconButtonSize - flatButtonSize) / 2 + 1 + } + }; + + return styles; +} + +var AppBar = function (_Component) { + (0, _inherits3.default)(AppBar, _Component); + + function AppBar() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, AppBar); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AppBar.__proto__ || (0, _getPrototypeOf2.default)(AppBar)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapLeftIconButton = function (event) { + if (_this.props.onLeftIconButtonTouchTap) { + _this.props.onLeftIconButtonTouchTap(event); + } + }, _this.handleTouchTapRightIconButton = function (event) { + if (_this.props.onRightIconButtonTouchTap) { + _this.props.onRightIconButtonTouchTap(event); + } + }, _this.handleTitleTouchTap = function (event) { + if (_this.props.onTitleTouchTap) { + _this.props.onTitleTouchTap(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(AppBar, [{ + key: 'componentDidMount', + value: function componentDidMount() { + false ? (0, _warning2.default)(!this.props.iconElementLeft || !this.props.iconClassNameLeft, 'Material-UI: Properties iconElementLeft\n and iconClassNameLeft cannot be simultaneously defined. Please use one or the other.') : void 0; + + false ? (0, _warning2.default)(!this.props.iconElementRight || !this.props.iconClassNameRight, 'Material-UI: Properties iconElementRight\n and iconClassNameRight cannot be simultaneously defined. Please use one or the other.') : void 0; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + title = _props.title, + titleStyle = _props.titleStyle, + iconStyleLeft = _props.iconStyleLeft, + iconStyleRight = _props.iconStyleRight, + onTitleTouchTap = _props.onTitleTouchTap, + showMenuIconButton = _props.showMenuIconButton, + iconElementLeft = _props.iconElementLeft, + iconElementRight = _props.iconElementRight, + iconClassNameLeft = _props.iconClassNameLeft, + iconClassNameRight = _props.iconClassNameRight, + onLeftIconButtonTouchTap = _props.onLeftIconButtonTouchTap, + onRightIconButtonTouchTap = _props.onRightIconButtonTouchTap, + className = _props.className, + style = _props.style, + zDepth = _props.zDepth, + children = _props.children, + other = (0, _objectWithoutProperties3.default)(_props, ['title', 'titleStyle', 'iconStyleLeft', 'iconStyleRight', 'onTitleTouchTap', 'showMenuIconButton', 'iconElementLeft', 'iconElementRight', 'iconClassNameLeft', 'iconClassNameRight', 'onLeftIconButtonTouchTap', 'onRightIconButtonTouchTap', 'className', 'style', 'zDepth', 'children']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var menuElementLeft = void 0; + var menuElementRight = void 0; + + // If the title is a string, wrap in an h1 tag. + // If not, wrap in a div tag. + var titleComponent = typeof title === 'string' || title instanceof String ? 'h1' : 'div'; + + var titleElement = _react2.default.createElement(titleComponent, { + onTouchTap: this.handleTitleTouchTap, + style: prepareStyles((0, _simpleAssign2.default)(styles.title, styles.mainElement, titleStyle)) + }, title); + + var iconLeftStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, iconStyleLeft); + + if (showMenuIconButton) { + if (iconElementLeft) { + var iconElementLeftProps = {}; + + if (iconElementLeft.type.muiName === 'IconButton') { + var iconElemLeftChildren = iconElementLeft.props.children; + var iconButtonIconStyle = !(iconElemLeftChildren && iconElemLeftChildren.props && iconElemLeftChildren.props.color) ? styles.iconButtonIconStyle : null; + + iconElementLeftProps.iconStyle = (0, _simpleAssign2.default)({}, iconButtonIconStyle, iconElementLeft.props.iconStyle); + } + + if (!iconElementLeft.props.onTouchTap && this.props.onLeftIconButtonTouchTap) { + iconElementLeftProps.onTouchTap = this.handleTouchTapLeftIconButton; + } + + menuElementLeft = _react2.default.createElement( + 'div', + { style: prepareStyles(iconLeftStyle) }, + (0, _keys2.default)(iconElementLeftProps).length > 0 ? (0, _react.cloneElement)(iconElementLeft, iconElementLeftProps) : iconElementLeft + ); + } else { + menuElementLeft = _react2.default.createElement( + _IconButton2.default, + { + style: iconLeftStyle, + iconStyle: styles.iconButtonIconStyle, + iconClassName: iconClassNameLeft, + onTouchTap: this.handleTouchTapLeftIconButton + }, + iconClassNameLeft ? '' : _react2.default.createElement(_menu2.default, { style: (0, _simpleAssign2.default)({}, styles.iconButtonIconStyle) }) + ); + } + } + + var iconRightStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, { + marginRight: -16, + marginLeft: 'auto' + }, iconStyleRight); + + if (iconElementRight) { + var iconElementRightProps = {}; + + switch (iconElementRight.type.muiName) { + case 'IconMenu': + case 'IconButton': + var iconElemRightChildren = iconElementRight.props.children; + var _iconButtonIconStyle = !(iconElemRightChildren && iconElemRightChildren.props && iconElemRightChildren.props.color) ? styles.iconButtonIconStyle : null; + + iconElementRightProps.iconStyle = (0, _simpleAssign2.default)({}, _iconButtonIconStyle, iconElementRight.props.iconStyle); + break; + + case 'FlatButton': + iconElementRightProps.style = (0, _simpleAssign2.default)({}, styles.flatButton, iconElementRight.props.style); + break; + + default: + } + + if (!iconElementRight.props.onTouchTap && this.props.onRightIconButtonTouchTap) { + iconElementRightProps.onTouchTap = this.handleTouchTapRightIconButton; + } + + menuElementRight = _react2.default.createElement( + 'div', + { style: prepareStyles(iconRightStyle) }, + (0, _keys2.default)(iconElementRightProps).length > 0 ? (0, _react.cloneElement)(iconElementRight, iconElementRightProps) : iconElementRight + ); + } else if (iconClassNameRight) { + menuElementRight = _react2.default.createElement(_IconButton2.default, { + style: iconRightStyle, + iconStyle: styles.iconButtonIconStyle, + iconClassName: iconClassNameRight, + onTouchTap: this.handleTouchTapRightIconButton + }); + } + + return _react2.default.createElement( + _Paper2.default, + (0, _extends3.default)({}, other, { + rounded: false, + className: className, + style: (0, _simpleAssign2.default)({}, styles.root, style), + zDepth: zDepth + }), + menuElementLeft, + titleElement, + menuElementRight, + children + ); + } + }]); + return AppBar; +}(_react.Component); + +AppBar.muiName = 'AppBar'; +AppBar.defaultProps = { + showMenuIconButton: true, + title: '', + zDepth: 1 +}; +AppBar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? AppBar.propTypes = { + /** + * Can be used to render a tab inside an app bar for instance. + */ + children: _react.PropTypes.node, + /** + * Applied to the app bar's root element. + */ + className: _react.PropTypes.string, + /** + * The classname of the icon on the left of the app bar. + * If you are using a stylesheet for your icons, enter the class name for the icon to be used here. + */ + iconClassNameLeft: _react.PropTypes.string, + /** + * Similiar to the iconClassNameLeft prop except that + * it applies to the icon displayed on the right of the app bar. + */ + iconClassNameRight: _react.PropTypes.string, + /** + * The custom element to be displayed on the left side of the + * app bar such as an SvgIcon. + */ + iconElementLeft: _react.PropTypes.element, + /** + * Similiar to the iconElementLeft prop except that this element is displayed on the right of the app bar. + */ + iconElementRight: _react.PropTypes.element, + /** + * Override the inline-styles of the element displayed on the left side of the app bar. + */ + iconStyleLeft: _react.PropTypes.object, + /** + * Override the inline-styles of the element displayed on the right side of the app bar. + */ + iconStyleRight: _react.PropTypes.object, + /** + * Callback function for when the left icon is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the left `IconButton`. + */ + onLeftIconButtonTouchTap: _react.PropTypes.func, + /** + * Callback function for when the right icon is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the right `IconButton`. + */ + onRightIconButtonTouchTap: _react.PropTypes.func, + /** + * Callback function for when the title text is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the `title` node. + */ + onTitleTouchTap: _react.PropTypes.func, + /** + * Determines whether or not to display the Menu icon next to the title. + * Setting this prop to false will hide the icon. + */ + showMenuIconButton: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The title to display on the app bar. + */ + title: _react.PropTypes.node, + /** + * Override the inline-styles of the app bar's title element. + */ + titleStyle: _react.PropTypes.object, + /** + * The zDepth of the component. + * The shadow of the app bar is also dependent on this property. + */ + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = AppBar; + +/***/ }), +/* 850 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationMenu = function NavigationMenu(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z' }) + ); +}; +NavigationMenu = (0, _pure2.default)(NavigationMenu); +NavigationMenu.displayName = 'NavigationMenu'; +NavigationMenu.muiName = 'SvgIcon'; + +exports.default = NavigationMenu; + +/***/ }), +/* 851 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _warning = __webpack_require__(17); + +var _warning2 = _interopRequireDefault(_warning); + +var _TabTemplate = __webpack_require__(852); + +var _TabTemplate2 = _interopRequireDefault(_TabTemplate); + +var _InkBar = __webpack_require__(853); + +var _InkBar2 = _interopRequireDefault(_InkBar); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tabs = context.muiTheme.tabs; + + + return { + tabItemContainer: { + width: '100%', + backgroundColor: tabs.backgroundColor, + whiteSpace: 'nowrap', + display: 'flex' + } + }; +} + +var Tabs = function (_Component) { + (0, _inherits3.default)(Tabs, _Component); + + function Tabs() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Tabs); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tabs.__proto__ || (0, _getPrototypeOf2.default)(Tabs)).call.apply(_ref, [this].concat(args))), _this), _this.state = { selectedIndex: 0 }, _this.handleTabTouchTap = function (value, event, tab) { + var valueLink = _this.getValueLink(_this.props); + var index = tab.props.index; + + if (valueLink.value && valueLink.value !== value || _this.state.selectedIndex !== index) { + valueLink.requestChange(value, event, tab); + } + + _this.setState({ selectedIndex: index }); + + if (tab.props.onActive) { + tab.props.onActive(tab); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Tabs, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var valueLink = this.getValueLink(this.props); + var initialIndex = this.props.initialSelectedIndex; + + this.setState({ + selectedIndex: valueLink.value !== undefined ? this.getSelectedIndex(this.props) : initialIndex < this.getTabCount() ? initialIndex : 0 + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(newProps, nextContext) { + var valueLink = this.getValueLink(newProps); + var newState = { + muiTheme: nextContext.muiTheme || this.context.muiTheme + }; + + if (valueLink.value !== undefined) { + newState.selectedIndex = this.getSelectedIndex(newProps); + } + + this.setState(newState); + } + }, { + key: 'getTabs', + value: function getTabs() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; + + var tabs = []; + + _react.Children.forEach(props.children, function (tab) { + if ((0, _react.isValidElement)(tab)) { + tabs.push(tab); + } + }); + + return tabs; + } + }, { + key: 'getTabCount', + value: function getTabCount() { + return this.getTabs().length; + } + + // Do not use outside of this component, it will be removed once valueLink is deprecated + + }, { + key: 'getValueLink', + value: function getValueLink(props) { + return props.valueLink || { + value: props.value, + requestChange: props.onChange + }; + } + }, { + key: 'getSelectedIndex', + value: function getSelectedIndex(props) { + var valueLink = this.getValueLink(props); + var selectedIndex = -1; + + this.getTabs(props).forEach(function (tab, index) { + if (valueLink.value === tab.props.value) { + selectedIndex = index; + } + }); + + return selectedIndex; + } + }, { + key: 'getSelected', + value: function getSelected(tab, index) { + var valueLink = this.getValueLink(this.props); + return valueLink.value ? valueLink.value === tab.props.value : this.state.selectedIndex === index; + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + contentContainerClassName = _props.contentContainerClassName, + contentContainerStyle = _props.contentContainerStyle, + initialSelectedIndex = _props.initialSelectedIndex, + inkBarStyle = _props.inkBarStyle, + onChange = _props.onChange, + style = _props.style, + tabItemContainerStyle = _props.tabItemContainerStyle, + tabTemplate = _props.tabTemplate, + tabTemplateStyle = _props.tabTemplateStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['contentContainerClassName', 'contentContainerStyle', 'initialSelectedIndex', 'inkBarStyle', 'onChange', 'style', 'tabItemContainerStyle', 'tabTemplate', 'tabTemplateStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var valueLink = this.getValueLink(this.props); + var tabValue = valueLink.value; + var tabContent = []; + var width = 100 / this.getTabCount(); + + var tabs = this.getTabs().map(function (tab, index) { + false ? (0, _warning2.default)(tab.type && tab.type.muiName === 'Tab', 'Material-UI: Tabs only accepts Tab Components as children.\n Found ' + (tab.type.muiName || tab.type) + ' as child number ' + (index + 1) + ' of Tabs') : void 0; + + false ? (0, _warning2.default)(!tabValue || tab.props.value !== undefined, 'Material-UI: Tabs value prop has been passed, but Tab ' + index + '\n does not have a value prop. Needs value if Tabs is going\n to be a controlled component.') : void 0; + + tabContent.push(tab.props.children ? (0, _react.createElement)(tabTemplate || _TabTemplate2.default, { + key: index, + selected: _this2.getSelected(tab, index), + style: tabTemplateStyle + }, tab.props.children) : undefined); + + return (0, _react.cloneElement)(tab, { + key: index, + index: index, + selected: _this2.getSelected(tab, index), + width: width + '%', + onTouchTap: _this2.handleTabTouchTap + }); + }); + + var inkBar = this.state.selectedIndex !== -1 ? _react2.default.createElement(_InkBar2.default, { + left: width * this.state.selectedIndex + '%', + width: width + '%', + style: inkBarStyle + }) : null; + + var inkBarContainerWidth = tabItemContainerStyle ? tabItemContainerStyle.width : '100%'; + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({ style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, other), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.tabItemContainer, tabItemContainerStyle)) }, + tabs + ), + _react2.default.createElement( + 'div', + { style: { width: inkBarContainerWidth } }, + inkBar + ), + _react2.default.createElement( + 'div', + { + style: prepareStyles((0, _simpleAssign2.default)({}, contentContainerStyle)), + className: contentContainerClassName + }, + tabContent + ) + ); + } + }]); + return Tabs; +}(_react.Component); + +Tabs.defaultProps = { + initialSelectedIndex: 0, + onChange: function onChange() {} +}; +Tabs.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Tabs.propTypes = { + /** + * Should be used to pass `Tab` components. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The css class name of the content's container. + */ + contentContainerClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the content's container. + */ + contentContainerStyle: _react.PropTypes.object, + /** + * Specify initial visible tab index. + * If `initialSelectedIndex` is set but larger than the total amount of specified tabs, + * `initialSelectedIndex` will revert back to default. + * If `initialSelectedIndex` is set to any negative value, no tab will be selected intially. + */ + initialSelectedIndex: _react.PropTypes.number, + /** + * Override the inline-styles of the InkBar. + */ + inkBarStyle: _react.PropTypes.object, + /** + * Called when the selected value change. + */ + onChange: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of the tab-labels container. + */ + tabItemContainerStyle: _react.PropTypes.object, + /** + * Override the default tab template used to wrap the content of each tab element. + */ + tabTemplate: _react.PropTypes.func, + /** + * Override the inline-styles of the tab template. + */ + tabTemplateStyle: _react.PropTypes.object, + /** + * Makes Tabs controllable and selects the tab whose value prop matches this prop. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = Tabs; + +/***/ }), +/* 852 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + width: '100%', + position: 'relative', + textAlign: 'initial' +}; + +var TabTemplate = function TabTemplate(_ref) { + var children = _ref.children, + selected = _ref.selected, + style = _ref.style; + + var templateStyle = (0, _simpleAssign2.default)({}, styles, style); + if (!selected) { + templateStyle.height = 0; + templateStyle.overflow = 'hidden'; + } + + return _react2.default.createElement( + 'div', + { style: templateStyle }, + children + ); +}; + + false ? TabTemplate.propTypes = { + children: _react.PropTypes.node, + selected: _react.PropTypes.bool, + style: _react.PropTypes.object +} : void 0; + +exports.default = TabTemplate; + +/***/ }), +/* 853 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var inkBar = context.muiTheme.inkBar; + + + return { + root: { + left: props.left, + width: props.width, + bottom: 0, + display: 'block', + backgroundColor: props.color || inkBar.backgroundColor, + height: 2, + marginTop: -2, + position: 'relative', + transition: _transitions2.default.easeOut('1s', 'left') + } + }; +} + +var InkBar = function (_Component) { + (0, _inherits3.default)(InkBar, _Component); + + function InkBar() { + (0, _classCallCheck3.default)(this, InkBar); + return (0, _possibleConstructorReturn3.default)(this, (InkBar.__proto__ || (0, _getPrototypeOf2.default)(InkBar)).apply(this, arguments)); + } + + (0, _createClass3.default)(InkBar, [{ + key: 'render', + value: function render() { + var style = this.props.style; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }); + } + }]); + return InkBar; +}(_react.Component); + +InkBar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? InkBar.propTypes = { + color: _react.PropTypes.string, + left: _react.PropTypes.string.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + width: _react.PropTypes.string.isRequired +} : void 0; +exports.default = InkBar; + +/***/ }), +/* 854 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(79); + +var _keys2 = _interopRequireDefault(_keys); + +exports.changeMenu = changeMenu; + +var _ActionTypes = __webpack_require__(77); + +var types = _interopRequireWildcard(_ActionTypes); + +var _Menus = __webpack_require__(96); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function changeMenu(newMenu) { + var keys = (0, _keys2.default)(menus).map(function (x) { + return menus[x]; + }); + if (keys.indexOf(newMenu) !== -1) { + return { type: types.CHANGE_MENU, menu: newMenu }; + } + throw new Error('Invalid menu : ' + newMenu); +} + +/***/ }), +/* 855 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.updateSettings = updateSettings; + +var _ActionTypes = __webpack_require__(77); + +var types = _interopRequireWildcard(_ActionTypes); + +var _notification = __webpack_require__(856); + +var _notification2 = _interopRequireDefault(_notification); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function updateSettings(shop, key, value) { + return function (dispatch) { + dispatch((0, _notification2.default)('Settings saved')); + var obj = {}; + obj[key] = value; + dispatch({ + type: types.UPDATE_SETTINGS, + value: obj, + shop: shop + }); + }; +} + +/***/ }), +/* 856 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = addNotification; + +var _ActionTypes = __webpack_require__(77); + +var types = _interopRequireWildcard(_ActionTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function addNotification(message) { + return { + type: types.NOTIFICATION_ADD, + message: message + }; +} + +/***/ }), +/* 857 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.saveState = exports.loadSavedState = exports.initializeLocalStorageState = undefined; + +var _regenerator = __webpack_require__(858); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _asyncToGenerator2 = __webpack_require__(861); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); + +var _promise = __webpack_require__(330); + +var _promise2 = _interopRequireDefault(_promise); + +var _stringify = __webpack_require__(872); + +var _stringify2 = _interopRequireDefault(_stringify); + +exports.saveToChromeStorage = saveToChromeStorage; +exports.getFromChromeStorage = getFromChromeStorage; + +var _Helpers = __webpack_require__(874); + +var Helpers = _interopRequireWildcard(_Helpers); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var initializeLocalStorageState = exports.initializeLocalStorageState = function initializeLocalStorageState(initialState, version) { + localStorage.setItem('state', (0, _stringify2.default)([{ value: initialState || {}, version: version }])); +}; + +var loadSavedState = exports.loadSavedState = function loadSavedState(version) { + try { + var items = JSON.parse(localStorage.getItem('state')) || []; + var state = items.filter(function (x) { + return x.version === version; + })[0]; + if (state) { + return state.value; + } + return {}; + } catch (err) { + initializeLocalStorageState({}, version); + return {}; + } +}; + +var saveState = exports.saveState = function saveState(state, version) { + try { + // If no state is saved, we create it using the current version number + if (!localStorage.getItem('state')) { + initializeLocalStorageState(state, version); + } else { + var currentState = JSON.parse(localStorage.getItem('state')); + var currentVersionState = currentState.filter(function (x) { + return x.version === version; + })[0]; + // If a state for the current version already exists, we update it + if (currentVersionState) { + currentVersionState.value = state; + } else { + currentState.push({ value: state, version: version }); + } + localStorage.setItem('state', (0, _stringify2.default)(currentState)); + } + } catch (err) { + console.info('Possible corrupted or incompatible state found in the localstorage, reinitializing the state...'); + initializeLocalStorageState({}, version); + } +}; + +function saveToChromeStorage(key, value) { + return new _promise2.default(function (resolve) { + var obj = {}; + obj[key] = value; + chrome.storage.local.set(obj, function () { + resolve(); + }); + }); +} + +function getFromChromeStorage(key) { + var _this = this; + + return new _promise2.default(function (resolve) { + chrome.storage.local.get(key, function () { + var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(settings) { + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + resolve(Helpers.isObjectEmpty(settings) ? {} : settings[key]); + + case 1: + case 'end': + return _context.stop(); + } + } + }, _callee, _this); + })); + + return function (_x) { + return _ref.apply(this, arguments); + }; + }()); + }); +} + +/***/ }), +/* 858 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(859); + + +/***/ }), +/* 859 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this; + +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; + +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; + +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; + +module.exports = __webpack_require__(860); + +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; + } +} + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47))) + +/***/ }), +/* 860 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + if (typeof global.process === "object" && global.process.domain) { + invoke = global.process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function() { + return this; + }; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + return !! caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + } + }; +})( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this +); + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47))) + +/***/ }), +/* 861 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _promise = __webpack_require__(330); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new _promise2.default(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return _promise2.default.resolve(value).then(function (value) { + step("next", value); + }, function (err) { + step("throw", err); + }); + } + } + + return step("next"); + }); + }; +}; + +/***/ }), +/* 862 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(300); +__webpack_require__(93); +__webpack_require__(124); +__webpack_require__(863); +__webpack_require__(870); +__webpack_require__(871); +module.exports = __webpack_require__(18).Promise; + + +/***/ }), +/* 863 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(122); +var global = __webpack_require__(23); +var ctx = __webpack_require__(61); +var classof = __webpack_require__(191); +var $export = __webpack_require__(28); +var isObject = __webpack_require__(62); +var aFunction = __webpack_require__(99); +var anInstance = __webpack_require__(864); +var forOf = __webpack_require__(865); +var speciesConstructor = __webpack_require__(331); +var task = __webpack_require__(332).set; +var microtask = __webpack_require__(867)(); +var newPromiseCapabilityModule = __webpack_require__(205); +var perform = __webpack_require__(333); +var promiseResolve = __webpack_require__(334); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(22)('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch (e) { /* empty */ } +}(); + +// helpers +var sameConstructor = LIBRARY ? function (a, b) { + // with library wrapper special case + return a === b || a === $Promise && b === Wrapper; +} : function (a, b) { + return a === b; +}; +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); + if (domain) domain.exit(); + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + if (promise._h == 1) return false; + var chain = promise._a || promise._c; + var i = 0; + var reaction; + while (chain.length > i) { + reaction = chain[i++]; + if (reaction.fail || !isUnhandled(reaction.promise)) return false; + } return true; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(868)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return sameConstructor($Promise, C) + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(123)($Promise, PROMISE); +__webpack_require__(869)(PROMISE); +Wrapper = __webpack_require__(18)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if (x instanceof $Promise && sameConstructor(x.constructor, this)) return x; + return promiseResolve(this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(305)(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + + +/***/ }), +/* 864 */ +/***/ (function(module, exports) { + +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; + + +/***/ }), +/* 865 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(61); +var call = __webpack_require__(303); +var isArrayIter = __webpack_require__(304); +var anObject = __webpack_require__(36); +var toLength = __webpack_require__(134); +var getIterFn = __webpack_require__(190); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + + +/***/ }), +/* 866 */ +/***/ (function(module, exports) { + +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + + +/***/ }), +/* 867 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(23); +var macrotask = __webpack_require__(332).set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(83)(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if (Observer) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + var promise = Promise.resolve(); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; + + +/***/ }), +/* 868 */ +/***/ (function(module, exports, __webpack_require__) { + +var hide = __webpack_require__(50); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; + + +/***/ }), +/* 869 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(23); +var core = __webpack_require__(18); +var dP = __webpack_require__(35); +var DESCRIPTORS = __webpack_require__(44); +var SPECIES = __webpack_require__(22)('species'); + +module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; + + +/***/ }), +/* 870 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// https://github.com/tc39/proposal-promise-finally + +var $export = __webpack_require__(28); +var core = __webpack_require__(18); +var global = __webpack_require__(23); +var speciesConstructor = __webpack_require__(331); +var promiseResolve = __webpack_require__(334); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + + +/***/ }), +/* 871 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-promise-try +var $export = __webpack_require__(28); +var newPromiseCapability = __webpack_require__(205); +var perform = __webpack_require__(333); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); + + +/***/ }), +/* 872 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(873), __esModule: true }; + +/***/ }), +/* 873 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(18); +var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); +module.exports = function stringify(it) { // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); +}; + + +/***/ }), +/* 874 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(79); + +var _keys2 = _interopRequireDefault(_keys); + +exports.isObjectEmpty = isObjectEmpty; +exports.getQueryStringValue = getQueryStringValue; +exports.pageHasNodeOfClass = pageHasNodeOfClass; +exports.hasStringInPath = hasStringInPath; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isObjectEmpty(obj) { + return (0, _keys2.default)(obj).length === 0 && obj.constructor === Object; +} + +function getQueryStringValue(key) { + return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1")); +} + +function pageHasNodeOfClass(className) { + return document.querySelectorAll('.' + className).length > 0; +} + +function hasStringInPath(value) { + return location.pathname.substring(1).split('/').filter(function (x) { + return !!x && x === value; + }).length > 0; +} + +/***/ }) +======= +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 337); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = __webpack_require__(52); + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _defineProperty = __webpack_require__(194); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(653), __esModule: true }; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _typeof2 = __webpack_require__(57); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; +}; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _setPrototypeOf = __webpack_require__(657); + +var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); + +var _create = __webpack_require__(661); + +var _create2 = _interopRequireDefault(_create); + +var _typeof2 = __webpack_require__(57); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; +}; + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +module.exports = function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; +}; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _assign = __webpack_require__(48); + +var _assign2 = _interopRequireDefault(_assign); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _assign2.default || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; +}; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (obj, keys) { + var target = {}; + + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + + return target; +}; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var validateFormat = function validateFormat(format) {}; + +if (false) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; +} + +function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +} + +module.exports = invariant; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + + easeOutFunction: 'cubic-bezier(0.23, 1, 0.32, 1)', + easeInOutFunction: 'cubic-bezier(0.445, 0.05, 0.55, 0.95)', + + easeOut: function easeOut(duration, property, delay, easeFunction) { + easeFunction = easeFunction || this.easeOutFunction; + + if (property && Object.prototype.toString.call(property) === '[object Array]') { + var transitions = ''; + for (var i = 0; i < property.length; i++) { + if (transitions) transitions += ','; + transitions += this.create(duration, property[i], delay, easeFunction); + } + + return transitions; + } else { + return this.create(duration, property, delay, easeFunction); + } + }, + create: function create(duration, property, delay, easeFunction) { + duration = duration || '450ms'; + property = property || 'all'; + delay = delay || '0ms'; + easeFunction = easeFunction || 'linear'; + + return property + ' ' + duration + ' ' + easeFunction + ' ' + delay; + } +}; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var emptyFunction = __webpack_require__(24); + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = emptyFunction; + +if (false) { + (function () { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); +} + +module.exports = warning; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + +/** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + +function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; +} + +module.exports = reactProdInvariant; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var DOMProperty = __webpack_require__(69); +var ReactDOMComponentFlags = __webpack_require__(223); + +var invariant = __webpack_require__(9); + +var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; +var Flags = ReactDOMComponentFlags; + +var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2); + +/** + * Check if a given node should be cached. + */ +function shouldPrecacheNode(node, nodeID) { + return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' '; +} + +/** + * Drill down (through composites and empty components) until we get a host or + * host text component. + * + * This is pretty polymorphic but unavoidable with the current structure we have + * for `_renderedChildren`. + */ +function getRenderedHostOrTextFromComponent(component) { + var rendered; + while (rendered = component._renderedComponent) { + component = rendered; + } + return component; +} + +/** + * Populate `_hostNode` on the rendered host/text component with the given + * DOM node. The passed `inst` can be a composite. + */ +function precacheNode(inst, node) { + var hostInst = getRenderedHostOrTextFromComponent(inst); + hostInst._hostNode = node; + node[internalInstanceKey] = hostInst; +} + +function uncacheNode(inst) { + var node = inst._hostNode; + if (node) { + delete node[internalInstanceKey]; + inst._hostNode = null; + } +} + +/** + * Populate `_hostNode` on each child of `inst`, assuming that the children + * match up with the DOM (element) children of `node`. + * + * We cache entire levels at once to avoid an n^2 problem where we access the + * children of a node sequentially and have to walk from the start to our target + * node every time. + * + * Since we update `_renderedChildren` and the actual DOM at (slightly) + * different times, we could race here and see a newer `_renderedChildren` than + * the DOM nodes we see. To avoid this, ReactMultiChild calls + * `prepareToManageChildren` before we change `_renderedChildren`, at which + * time the container's child nodes are always cached (until it unmounts). + */ +function precacheChildNodes(inst, node) { + if (inst._flags & Flags.hasCachedChildNodes) { + return; + } + var children = inst._renderedChildren; + var childNode = node.firstChild; + outer: for (var name in children) { + if (!children.hasOwnProperty(name)) { + continue; + } + var childInst = children[name]; + var childID = getRenderedHostOrTextFromComponent(childInst)._domID; + if (childID === 0) { + // We're currently unmounting this child in ReactMultiChild; skip it. + continue; + } + // We assume the child nodes are in the same order as the child instances. + for (; childNode !== null; childNode = childNode.nextSibling) { + if (shouldPrecacheNode(childNode, childID)) { + precacheNode(childInst, childNode); + continue outer; + } + } + // We reached the end of the DOM children without finding an ID match. + true ? false ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0; + } + inst._flags |= Flags.hasCachedChildNodes; +} + +/** + * Given a DOM node, return the closest ReactDOMComponent or + * ReactDOMTextComponent instance ancestor. + */ +function getClosestInstanceFromNode(node) { + if (node[internalInstanceKey]) { + return node[internalInstanceKey]; + } + + // Walk up the tree until we find an ancestor whose instance we have cached. + var parents = []; + while (!node[internalInstanceKey]) { + parents.push(node); + if (node.parentNode) { + node = node.parentNode; + } else { + // Top of the tree. This node must not be part of a React tree (or is + // unmounted, potentially). + return null; + } + } + + var closest; + var inst; + for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) { + closest = inst; + if (parents.length) { + precacheChildNodes(inst, node); + } + } + + return closest; +} + +/** + * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent + * instance, or null if the node was not rendered by this React. + */ +function getInstanceFromNode(node) { + var inst = getClosestInstanceFromNode(node); + if (inst != null && inst._hostNode === node) { + return inst; + } else { + return null; + } +} + +/** + * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding + * DOM node. + */ +function getNodeFromInstance(inst) { + // Without this first invariant, passing a non-DOM-component triggers the next + // invariant for a missing parent, which is super confusing. + !(inst._hostNode !== undefined) ? false ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; + + if (inst._hostNode) { + return inst._hostNode; + } + + // Walk up the tree until we find an ancestor whose DOM node we have cached. + var parents = []; + while (!inst._hostNode) { + parents.push(inst); + !inst._hostParent ? false ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0; + inst = inst._hostParent; + } + + // Now parents contains each ancestor that does *not* have a cached native + // node, and `inst` is the deepest ancestor that does. + for (; parents.length; inst = parents.pop()) { + precacheChildNodes(inst, inst._hostNode); + } + + return inst._hostNode; +} + +var ReactDOMComponentTree = { + getClosestInstanceFromNode: getClosestInstanceFromNode, + getInstanceFromNode: getInstanceFromNode, + getNodeFromInstance: getNodeFromInstance, + precacheChildNodes: precacheChildNodes, + precacheNode: precacheNode, + uncacheNode: uncacheNode +}; + +module.exports = ReactDOMComponentTree; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = function() {}; + +if (false) { + warning = function(condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.length < 10 || (/^[s\W]*$/).test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + format + ); + } + + if (!condition) { + var argIndex = 0; + var message = 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch(x) {} + } + }; +} + +module.exports = warning; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = __webpack_require__(355); + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var invariant = function(condition, format, a, b, c, d, e, f) { + if (false) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports) { + +var core = module.exports = {version: '2.4.0'}; +if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _shouldUpdate = __webpack_require__(716); + +var _shouldUpdate2 = _interopRequireDefault(_shouldUpdate); + +var _shallowEqual = __webpack_require__(60); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _createHelper = __webpack_require__(321); + +var _createHelper2 = _interopRequireDefault(_createHelper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var pure = (0, _shouldUpdate2.default)(function (props, nextProps) { + return !(0, _shallowEqual2.default)(props, nextProps); +}); + +exports.default = (0, _createHelper2.default)(pure, 'pure', true, true); + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _SvgIcon = __webpack_require__(721); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _SvgIcon2.default; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.connect = exports.Provider = undefined; + +var _Provider = __webpack_require__(463); + +var _Provider2 = _interopRequireDefault(_Provider); + +var _connect = __webpack_require__(464); + +var _connect2 = _interopRequireDefault(_connect); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +exports.Provider = _Provider2["default"]; +exports.connect = _connect2["default"]; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +/** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ +var ExecutionEnvironment = { + + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + + isInWorker: !canUseDOM // For now, this is true - might change in the future. + +}; + +module.exports = ExecutionEnvironment; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(141)('wks') + , uid = __webpack_require__(99) + , Symbol = __webpack_require__(25).Symbol + , USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function(name){ + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + +function makeEmptyFunction(arg) { + return function () { + return arg; + }; +} + +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +var emptyFunction = function emptyFunction() {}; + +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function () { + return this; +}; +emptyFunction.thatReturnsArgument = function (arg) { + return arg; +}; + +module.exports = emptyFunction; + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); +if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +// Trust the developer to only use ReactInstrumentation with a __DEV__ check + +var debugTool = null; + +if (false) { + var ReactDebugTool = require('./ReactDebugTool'); + debugTool = ReactDebugTool; +} + +module.exports = { debugTool: debugTool }; + +/***/ }), +/* 27 */ +/***/ (function(module, exports) { + +// Source: http://jsfiddle.net/vWx8V/ +// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes + +/** + * Conenience method returns corresponding value for given keyName or keyCode. + * + * @param {Mixed} keyCode {Number} or keyName {String} + * @return {Mixed} + * @api public + */ + +exports = module.exports = function(searchInput) { + // Keyboard Events + if (searchInput && 'object' === typeof searchInput) { + var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode + if (hasKeyCode) searchInput = hasKeyCode + } + + // Numbers + if ('number' === typeof searchInput) return names[searchInput] + + // Everything else (cast to string) + var search = String(searchInput) + + // check codes + var foundNamedKey = codes[search.toLowerCase()] + if (foundNamedKey) return foundNamedKey + + // check aliases + var foundNamedKey = aliases[search.toLowerCase()] + if (foundNamedKey) return foundNamedKey + + // weird character? + if (search.length === 1) return search.charCodeAt(0) + + return undefined +} + +/** + * Get by name + * + * exports.code['enter'] // => 13 + */ + +var codes = exports.code = exports.codes = { + 'backspace': 8, + 'tab': 9, + 'enter': 13, + 'shift': 16, + 'ctrl': 17, + 'alt': 18, + 'pause/break': 19, + 'caps lock': 20, + 'esc': 27, + 'space': 32, + 'page up': 33, + 'page down': 34, + 'end': 35, + 'home': 36, + 'left': 37, + 'up': 38, + 'right': 39, + 'down': 40, + 'insert': 45, + 'delete': 46, + 'command': 91, + 'left command': 91, + 'right command': 93, + 'numpad *': 106, + 'numpad +': 107, + 'numpad -': 109, + 'numpad .': 110, + 'numpad /': 111, + 'num lock': 144, + 'scroll lock': 145, + 'my computer': 182, + 'my calculator': 183, + ';': 186, + '=': 187, + ',': 188, + '-': 189, + '.': 190, + '/': 191, + '`': 192, + '[': 219, + '\\': 220, + ']': 221, + "'": 222 +} + +// Helper aliases + +var aliases = exports.aliases = { + 'windows': 91, + '⇧': 16, + '⌥': 18, + '⌃': 17, + '⌘': 91, + 'ctl': 17, + 'control': 17, + 'option': 18, + 'pause': 19, + 'break': 19, + 'caps': 20, + 'return': 13, + 'escape': 27, + 'spc': 32, + 'pgup': 33, + 'pgdn': 34, + 'ins': 45, + 'del': 46, + 'cmd': 91 +} + + +/*! + * Programatically add the following + */ + +// lower case chars +for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32 + +// numbers +for (var i = 48; i < 58; i++) codes[i - 48] = i + +// function keys +for (i = 1; i < 13; i++) codes['f'+i] = i + 111 + +// numpad keys +for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96 + +/** + * Get by code + * + * exports.name[13] // => 'Enter' + */ + +var names = exports.names = exports.title = {} // title for backward compat + +// Create reverse mapping +for (i in codes) names[codes[i]] = i + +// Add aliases +for (var alias in aliases) { + codes[alias] = aliases[alias] +} + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); + +var CallbackQueue = __webpack_require__(227); +var PooledClass = __webpack_require__(54); +var ReactFeatureFlags = __webpack_require__(228); +var ReactReconciler = __webpack_require__(72); +var Transaction = __webpack_require__(103); + +var invariant = __webpack_require__(9); + +var dirtyComponents = []; +var updateBatchNumber = 0; +var asapCallbackQueue = CallbackQueue.getPooled(); +var asapEnqueued = false; + +var batchingStrategy = null; + +function ensureInjected() { + !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? false ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0; +} + +var NESTED_UPDATES = { + initialize: function () { + this.dirtyComponentsLength = dirtyComponents.length; + }, + close: function () { + if (this.dirtyComponentsLength !== dirtyComponents.length) { + // Additional updates were enqueued by componentDidUpdate handlers or + // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run + // these new updates so that if A's componentDidUpdate calls setState on + // B, B will update before the callback A's updater provided when calling + // setState. + dirtyComponents.splice(0, this.dirtyComponentsLength); + flushBatchedUpdates(); + } else { + dirtyComponents.length = 0; + } + } +}; + +var UPDATE_QUEUEING = { + initialize: function () { + this.callbackQueue.reset(); + }, + close: function () { + this.callbackQueue.notifyAll(); + } +}; + +var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING]; + +function ReactUpdatesFlushTransaction() { + this.reinitializeTransaction(); + this.dirtyComponentsLength = null; + this.callbackQueue = CallbackQueue.getPooled(); + this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled( + /* useCreateElement */true); +} + +_assign(ReactUpdatesFlushTransaction.prototype, Transaction, { + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + destructor: function () { + this.dirtyComponentsLength = null; + CallbackQueue.release(this.callbackQueue); + this.callbackQueue = null; + ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction); + this.reconcileTransaction = null; + }, + + perform: function (method, scope, a) { + // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` + // with this transaction's wrappers around it. + return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a); + } +}); + +PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); + +function batchedUpdates(callback, a, b, c, d, e) { + ensureInjected(); + return batchingStrategy.batchedUpdates(callback, a, b, c, d, e); +} + +/** + * Array comparator for ReactComponents by mount ordering. + * + * @param {ReactComponent} c1 first component you're comparing + * @param {ReactComponent} c2 second component you're comparing + * @return {number} Return value usable by Array.prototype.sort(). + */ +function mountOrderComparator(c1, c2) { + return c1._mountOrder - c2._mountOrder; +} + +function runBatchedUpdates(transaction) { + var len = transaction.dirtyComponentsLength; + !(len === dirtyComponents.length) ? false ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0; + + // Since reconciling a component higher in the owner hierarchy usually (not + // always -- see shouldComponentUpdate()) will reconcile children, reconcile + // them before their children by sorting the array. + dirtyComponents.sort(mountOrderComparator); + + // Any updates enqueued while reconciling must be performed after this entire + // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and + // C, B could update twice in a single batch if C's render enqueues an update + // to B (since B would have already updated, we should skip it, and the only + // way we can know to do so is by checking the batch counter). + updateBatchNumber++; + + for (var i = 0; i < len; i++) { + // If a component is unmounted before pending changes apply, it will still + // be here, but we assume that it has cleared its _pendingCallbacks and + // that performUpdateIfNecessary is a noop. + var component = dirtyComponents[i]; + + // If performUpdateIfNecessary happens to enqueue any new updates, we + // shouldn't execute the callbacks until the next render happens, so + // stash the callbacks first + var callbacks = component._pendingCallbacks; + component._pendingCallbacks = null; + + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var namedComponent = component; + // Duck type TopLevelWrapper. This is probably always true. + if (component._currentElement.type.isReactTopLevelWrapper) { + namedComponent = component._renderedComponent; + } + markerName = 'React update: ' + namedComponent.getName(); + console.time(markerName); + } + + ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber); + + if (markerName) { + console.timeEnd(markerName); + } + + if (callbacks) { + for (var j = 0; j < callbacks.length; j++) { + transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); + } + } + } +} + +var flushBatchedUpdates = function () { + // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents + // array and perform any updates enqueued by mount-ready handlers (i.e., + // componentDidUpdate) but we need to check here too in order to catch + // updates enqueued by setState callbacks and asap calls. + while (dirtyComponents.length || asapEnqueued) { + if (dirtyComponents.length) { + var transaction = ReactUpdatesFlushTransaction.getPooled(); + transaction.perform(runBatchedUpdates, null, transaction); + ReactUpdatesFlushTransaction.release(transaction); + } + + if (asapEnqueued) { + asapEnqueued = false; + var queue = asapCallbackQueue; + asapCallbackQueue = CallbackQueue.getPooled(); + queue.notifyAll(); + CallbackQueue.release(queue); + } + } +}; + +/** + * Mark a component as needing a rerender, adding an optional callback to a + * list of functions which will be executed once the rerender occurs. + */ +function enqueueUpdate(component) { + ensureInjected(); + + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (This is called by each top-level update + // function, like setState, forceUpdate, etc.; creation and + // destruction of top-level components is guarded in ReactMount.) + + if (!batchingStrategy.isBatchingUpdates) { + batchingStrategy.batchedUpdates(enqueueUpdate, component); + return; + } + + dirtyComponents.push(component); + if (component._updateBatchNumber == null) { + component._updateBatchNumber = updateBatchNumber + 1; + } +} + +/** + * Enqueue a callback to be run at the end of the current batching cycle. Throws + * if no updates are currently being performed. + */ +function asap(callback, context) { + !batchingStrategy.isBatchingUpdates ? false ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0; + asapCallbackQueue.enqueue(callback, context); + asapEnqueued = true; +} + +var ReactUpdatesInjection = { + injectReconcileTransaction: function (ReconcileTransaction) { + !ReconcileTransaction ? false ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0; + ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; + }, + + injectBatchingStrategy: function (_batchingStrategy) { + !_batchingStrategy ? false ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0; + !(typeof _batchingStrategy.batchedUpdates === 'function') ? false ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0; + !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? false ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0; + batchingStrategy = _batchingStrategy; + } +}; + +var ReactUpdates = { + /** + * React references `ReactReconcileTransaction` using this property in order + * to allow dependency injection. + * + * @internal + */ + ReactReconcileTransaction: null, + + batchedUpdates: batchedUpdates, + enqueueUpdate: enqueueUpdate, + flushBatchedUpdates: flushBatchedUpdates, + injection: ReactUpdatesInjection, + asap: asap +}; + +module.exports = ReactUpdates; + +/***/ }), +/* 29 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(257); + + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || freeSelf || Function('return this')(); + +/* harmony default export */ __webpack_exports__["a"] = (root); + + +/***/ }), +/* 30 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/* harmony default export */ __webpack_exports__["a"] = (isArray); + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Paper = __webpack_require__(732); + +var _Paper2 = _interopRequireDefault(_Paper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Paper2.default; + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(25) + , core = __webpack_require__(18) + , ctx = __webpack_require__(64) + , hide = __webpack_require__(49) + , PROTOTYPE = 'prototype'; + +var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(a, b, c){ + if(this instanceof C){ + switch(arguments.length){ + case 0: return new C; + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if(IS_PROTO){ + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(34) + , IE8_DOM_DEFINE = __webpack_require__(212) + , toPrimitive = __webpack_require__(136) + , dP = Object.defineProperty; + +exports.f = __webpack_require__(41) ? Object.defineProperty : function defineProperty(O, P, Attributes){ + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if(IE8_DOM_DEFINE)try { + return dP(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; + return O; +}; + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(65); +module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; +}; + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + */ +var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null +}; + +module.exports = ReactCurrentOwner; + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var PooledClass = __webpack_require__(54); + +var emptyFunction = __webpack_require__(24); +var warning = __webpack_require__(11); + +var didWarnForAddedNewProperty = false; +var isProxySupported = typeof Proxy === 'function'; + +var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances']; + +/** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var EventInterface = { + type: null, + target: null, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: emptyFunction.thatReturnsNull, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function (event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null +}; + +/** + * Synthetic events are dispatched by event plugins, typically in response to a + * top-level event delegation handler. + * + * These systems should generally use pooling to reduce the frequency of garbage + * collection. The system should check `isPersistent` to determine whether the + * event should be released into the pool after being dispatched. Users that + * need a persisted event should invoke `persist`. + * + * Synthetic events (and subclasses) implement the DOM Level 3 Events API by + * normalizing browser quirks. Subclasses do not necessarily have to implement a + * DOM interface; custom application-specific events can also subclass this. + * + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {*} targetInst Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @param {DOMEventTarget} nativeEventTarget Target node. + */ +function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { + if (false) { + // these have a getter/setter for warnings + delete this.nativeEvent; + delete this.preventDefault; + delete this.stopPropagation; + } + + this.dispatchConfig = dispatchConfig; + this._targetInst = targetInst; + this.nativeEvent = nativeEvent; + + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + if (false) { + delete this[propName]; // this has a getter/setter for warnings + } + var normalize = Interface[propName]; + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + if (propName === 'target') { + this.target = nativeEventTarget; + } else { + this[propName] = nativeEvent[propName]; + } + } + } + + var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; + if (defaultPrevented) { + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + } else { + this.isDefaultPrevented = emptyFunction.thatReturnsFalse; + } + this.isPropagationStopped = emptyFunction.thatReturnsFalse; + return this; +} + +_assign(SyntheticEvent.prototype, { + + preventDefault: function () { + this.defaultPrevented = true; + var event = this.nativeEvent; + if (!event) { + return; + } + + if (event.preventDefault) { + event.preventDefault(); + } else if (typeof event.returnValue !== 'unknown') { + // eslint-disable-line valid-typeof + event.returnValue = false; + } + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + }, + + stopPropagation: function () { + var event = this.nativeEvent; + if (!event) { + return; + } + + if (event.stopPropagation) { + event.stopPropagation(); + } else if (typeof event.cancelBubble !== 'unknown') { + // eslint-disable-line valid-typeof + // The ChangeEventPlugin registers a "propertychange" event for + // IE. This event does not support bubbling or cancelling, and + // any references to cancelBubble throw "Member not found". A + // typeof check of "unknown" circumvents this issue (and is also + // IE specific). + event.cancelBubble = true; + } + + this.isPropagationStopped = emptyFunction.thatReturnsTrue; + }, + + /** + * We release all dispatched `SyntheticEvent`s after each event loop, adding + * them back into the pool. This allows a way to hold onto a reference that + * won't be added back into the pool. + */ + persist: function () { + this.isPersistent = emptyFunction.thatReturnsTrue; + }, + + /** + * Checks if this event should be released back into the pool. + * + * @return {boolean} True if this should not be released, false otherwise. + */ + isPersistent: emptyFunction.thatReturnsFalse, + + /** + * `PooledClass` looks for `destructor` on each instance it releases. + */ + destructor: function () { + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (false) { + Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName])); + } else { + this[propName] = null; + } + } + for (var i = 0; i < shouldBeReleasedProperties.length; i++) { + this[shouldBeReleasedProperties[i]] = null; + } + if (false) { + Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null)); + Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction)); + Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)); + } + } + +}); + +SyntheticEvent.Interface = EventInterface; + +if (false) { + if (isProxySupported) { + /*eslint-disable no-func-assign */ + SyntheticEvent = new Proxy(SyntheticEvent, { + construct: function (target, args) { + return this.apply(target, Object.create(target.prototype), args); + }, + apply: function (constructor, that, args) { + return new Proxy(constructor.apply(that, args), { + set: function (target, prop, value) { + if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) { + process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0; + didWarnForAddedNewProperty = true; + } + target[prop] = value; + return true; + } + }); + } + }); + /*eslint-enable no-func-assign */ + } +} +/** + * Helper to reduce boilerplate when creating subclasses. + * + * @param {function} Class + * @param {?object} Interface + */ +SyntheticEvent.augmentClass = function (Class, Interface) { + var Super = this; + + var E = function () {}; + E.prototype = Super.prototype; + var prototype = new E(); + + _assign(prototype, Class.prototype); + Class.prototype = prototype; + Class.prototype.constructor = Class; + + Class.Interface = _assign({}, Super.Interface, Interface); + Class.augmentClass = Super.augmentClass; + + PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler); +}; + +PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler); + +module.exports = SyntheticEvent; + +/** + * Helper to nullify syntheticEvent instance properties when destructing + * + * @param {object} SyntheticEvent + * @param {String} propName + * @return {object} defineProperty object + */ +function getPooledWarningPropertyDefinition(propName, getVal) { + var isFunction = typeof getVal === 'function'; + return { + configurable: true, + set: set, + get: get + }; + + function set(val) { + var action = isFunction ? 'setting the method' : 'setting the property'; + warn(action, 'This is effectively a no-op'); + return val; + } + + function get() { + var action = isFunction ? 'accessing the method' : 'accessing the property'; + var result = isFunction ? 'This is a no-op function' : 'This is set to null'; + warn(action, result); + return getVal; + } + + function warn(action, result) { + var warningCondition = false; + false ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0; + } +} + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (prefixedValue, value, keepUnprefixed) { + return keepUnprefixed ? [prefixedValue, value] : prefixedValue; +}; + +module.exports = exports["default"]; + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var horizontal = _react.PropTypes.oneOf(['left', 'middle', 'right']); +var vertical = _react.PropTypes.oneOf(['top', 'center', 'bottom']); + +exports.default = { + + corners: _react.PropTypes.oneOf(['bottom-left', 'bottom-right', 'top-left', 'top-right']), + + horizontal: horizontal, + + vertical: vertical, + + origin: _react.PropTypes.shape({ + horizontal: horizontal, + vertical: vertical + }), + + cornersAndCenter: _react.PropTypes.oneOf(['bottom-center', 'bottom-left', 'bottom-right', 'top-center', 'top-left', 'top-right']), + + stringOrNumber: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]), + + zDepth: _react.PropTypes.oneOf([0, 1, 2, 3, 4, 5]) + +}; + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _typeof2 = __webpack_require__(57); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _keys = __webpack_require__(59); + +var _keys2 = _interopRequireDefault(_keys); + +var _assign = __webpack_require__(48); + +var _assign2 = _interopRequireDefault(_assign); + +exports.withOptions = withOptions; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactAddonsShallowCompare = __webpack_require__(727); + +var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +var _supports = __webpack_require__(729); + +var supports = _interopRequireWildcard(_supports); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable prefer-spread */ + +var defaultEventOptions = { + capture: false, + passive: false +}; + +function mergeDefaultEventOptions(options) { + return (0, _assign2.default)({}, defaultEventOptions, options); +} + +function getEventListenerArgs(eventName, callback, options) { + var args = [eventName, callback]; + args.push(supports.passiveOption ? options : options.capture); + return args; +} + +function on(target, eventName, callback, options) { + if (supports.addEventListener) { + target.addEventListener.apply(target, getEventListenerArgs(eventName, callback, options)); + } else if (supports.attachEvent) { + // IE8+ Support + target.attachEvent('on' + eventName, function () { + callback.call(target); + }); + } +} + +function off(target, eventName, callback, options) { + if (supports.removeEventListener) { + target.removeEventListener.apply(target, getEventListenerArgs(eventName, callback, options)); + } else if (supports.detachEvent) { + // IE8+ Support + target.detachEvent('on' + eventName, callback); + } +} + +var state = {}; + +function forEachListener(props, iteratee) { + (0, _keys2.default)(props).forEach(function (name) { + if (name.substring(0, 2) !== 'on') { + return; + } + + var prop = props[name]; + var type = typeof prop === 'undefined' ? 'undefined' : (0, _typeof3.default)(prop); + var isObject = type === 'object'; + var isFunction = type === 'function'; + + if (!isObject && !isFunction) { + return; + } + + var capture = name.substr(-7).toLowerCase() === 'capture'; + var eventName = name.substring(2).toLowerCase(); + eventName = capture ? eventName.substring(0, eventName.length - 7) : eventName; + + if (isObject) { + iteratee(eventName, prop.handler, prop.options); + } else { + iteratee(eventName, prop, mergeDefaultEventOptions({ capture: capture })); + } + }); +} + +function withOptions(handler, options) { + false ? (0, _warning2.default)(options, 'react-event-listener: Should be specified options in withOptions.') : void 0; + + return { + handler: handler, + options: mergeDefaultEventOptions(options) + }; +} + +var EventListener = function (_Component) { + (0, _inherits3.default)(EventListener, _Component); + + function EventListener() { + (0, _classCallCheck3.default)(this, EventListener); + return (0, _possibleConstructorReturn3.default)(this, (EventListener.__proto__ || (0, _getPrototypeOf2.default)(EventListener)).apply(this, arguments)); + } + + (0, _createClass3.default)(EventListener, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.addListeners(); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + return (0, _reactAddonsShallowCompare2.default)({ + props: this.props, + state: state + }, nextProps, state); + } + }, { + key: 'componentWillUpdate', + value: function componentWillUpdate() { + this.removeListeners(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.addListeners(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.removeListeners(); + } + }, { + key: 'addListeners', + value: function addListeners() { + this.applyListeners(on); + } + }, { + key: 'removeListeners', + value: function removeListeners() { + this.applyListeners(off); + } + }, { + key: 'applyListeners', + value: function applyListeners(onOrOff) { + var target = this.props.target; + + + if (target) { + var element = target; + + if (typeof target === 'string') { + element = window[target]; + } + + forEachListener(this.props, onOrOff.bind(null, element)); + } + } + }, { + key: 'render', + value: function render() { + return this.props.children || null; + } + }]); + return EventListener; +}(_react.Component); + + false ? EventListener.propTypes = { + /** + * You can provide a single child too. + */ + children: _react.PropTypes.element, + /** + * The DOM target to listen to. + */ + target: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.string]) +} : void 0; +exports.default = EventListener; + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +exports.default = createComponent; + +var _react = __webpack_require__(0); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * Creates a component class that renders the given Material UI component + * + * @param MaterialUIComponent The material ui component to render + * @param mapProps A mapping of props provided by redux-form to the props the Material UI + * component needs + */ +function createComponent(MaterialUIComponent, mapProps) { + var InputComponent = function (_Component) { + _inherits(InputComponent, _Component); + + function InputComponent() { + _classCallCheck(this, InputComponent); + + return _possibleConstructorReturn(this, (InputComponent.__proto__ || Object.getPrototypeOf(InputComponent)).apply(this, arguments)); + } + + _createClass(InputComponent, [{ + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.component; + } + }, { + key: 'render', + value: function render() { + return (0, _react.createElement)(MaterialUIComponent, _extends({}, mapProps(this.props), { + ref: 'component' + })); + } + }]); + + return InputComponent; + }(_react.Component); + + InputComponent.displayName = 'ReduxFormMaterialUI' + MaterialUIComponent.name; + return InputComponent; +} + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(66)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; +}); + +/***/ }), +/* 42 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["c"] = isReactChildren; +/* harmony export (immutable) */ __webpack_exports__["a"] = createRouteFromReactElement; +/* unused harmony export createRoutesFromReactChildren */ +/* harmony export (immutable) */ __webpack_exports__["b"] = createRoutes; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + +function isValidChild(object) { + return object == null || __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(object); +} + +function isReactChildren(object) { + return isValidChild(object) || Array.isArray(object) && object.every(isValidChild); +} + +function createRoute(defaultProps, props) { + return _extends({}, defaultProps, props); +} + +function createRouteFromReactElement(element) { + var type = element.type; + var route = createRoute(type.defaultProps, element.props); + + if (route.children) { + var childRoutes = createRoutesFromReactChildren(route.children, route); + + if (childRoutes.length) route.childRoutes = childRoutes; + + delete route.children; + } + + return route; +} + +/** + * Creates and returns a routes object from the given ReactChildren. JSX + * provides a convenient way to visualize how routes in the hierarchy are + * nested. + * + * import { Route, createRoutesFromReactChildren } from 'react-router' + * + * const routes = createRoutesFromReactChildren( + * <Route component={App}> + * <Route path="home" component={Dashboard}/> + * <Route path="news" component={NewsFeed}/> + * </Route> + * ) + * + * Note: This method is automatically used when you provide <Route> children + * to a <Router> component. + */ +function createRoutesFromReactChildren(children, parentRoute) { + var routes = []; + + __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) { + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) { + // Component classes may have a static create* method. + if (element.type.createRouteFromReactElement) { + var route = element.type.createRouteFromReactElement(element, parentRoute); + + if (route) routes.push(route); + } else { + routes.push(createRouteFromReactElement(element)); + } + } + }); + + return routes; +} + +/** + * Creates and returns an array of routes from the given object which + * may be a JSX route, a plain object route, or an array of either. + */ +function createRoutes(routes) { + if (isReactChildren(routes)) { + routes = createRoutesFromReactChildren(routes); + } else if (routes && !Array.isArray(routes)) { + routes = [routes]; + } + + return routes; +} + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.createPath = exports.parsePath = exports.getQueryStringValueFromPath = exports.stripQueryStringValueFromPath = exports.addQueryStringValueToPath = undefined; + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var addQueryStringValueToPath = exports.addQueryStringValueToPath = function addQueryStringValueToPath(path, key, value) { + var _parsePath = parsePath(path); + + var pathname = _parsePath.pathname; + var search = _parsePath.search; + var hash = _parsePath.hash; + + + return createPath({ + pathname: pathname, + search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value, + hash: hash + }); +}; + +var stripQueryStringValueFromPath = exports.stripQueryStringValueFromPath = function stripQueryStringValueFromPath(path, key) { + var _parsePath2 = parsePath(path); + + var pathname = _parsePath2.pathname; + var search = _parsePath2.search; + var hash = _parsePath2.hash; + + + return createPath({ + pathname: pathname, + search: search.replace(new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), function (match, prefix, suffix) { + return prefix === '?' ? prefix : suffix; + }), + hash: hash + }); +}; + +var getQueryStringValueFromPath = exports.getQueryStringValueFromPath = function getQueryStringValueFromPath(path, key) { + var _parsePath3 = parsePath(path); + + var search = _parsePath3.search; + + var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)')); + return match && match[1]; +}; + +var extractPath = function extractPath(string) { + var match = string.match(/^(https?:)?\/\/[^\/]*/); + return match == null ? string : string.substring(match[0].length); +}; + +var parsePath = exports.parsePath = function parsePath(path) { + var pathname = extractPath(path); + var search = ''; + var hash = ''; + + false ? (0, _warning2.default)(path === pathname, 'A path must be pathname + search + hash only, not a full URL like "%s"', path) : void 0; + + var hashIndex = pathname.indexOf('#'); + if (hashIndex !== -1) { + hash = pathname.substring(hashIndex); + pathname = pathname.substring(0, hashIndex); + } + + var searchIndex = pathname.indexOf('?'); + if (searchIndex !== -1) { + search = pathname.substring(searchIndex); + pathname = pathname.substring(0, searchIndex); + } + + if (pathname === '') pathname = '/'; + + return { + pathname: pathname, + search: search, + hash: hash + }; +}; + +var createPath = exports.createPath = function createPath(location) { + if (location == null || typeof location === 'string') return location; + + var basename = location.basename; + var pathname = location.pathname; + var search = location.search; + var hash = location.hash; + + var path = (basename || '') + pathname; + + if (search && search !== '?') path += search; + + if (hash) path += hash; + + return path; +}; + +/***/ }), +/* 44 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 45 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +/* harmony default export */ __webpack_exports__["a"] = (isObject); + + +/***/ }), +/* 46 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__splice__ = __webpack_require__(596); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getIn__ = __webpack_require__(290); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setIn__ = __webpack_require__(597); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepEqual__ = __webpack_require__(598); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__deleteIn__ = __webpack_require__(599); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys__ = __webpack_require__(600); + + + + + + + +var structure = { + empty: {}, + emptyList: [], + getIn: __WEBPACK_IMPORTED_MODULE_1__getIn__["a" /* default */], + setIn: __WEBPACK_IMPORTED_MODULE_2__setIn__["a" /* default */], + deepEqual: __WEBPACK_IMPORTED_MODULE_3__deepEqual__["a" /* default */], + deleteIn: __WEBPACK_IMPORTED_MODULE_4__deleteIn__["a" /* default */], + fromJS: function fromJS(value) { + return value; + }, + keys: __WEBPACK_IMPORTED_MODULE_5__keys__["a" /* default */], + size: function size(array) { + return array ? array.length : 0; + }, + splice: __WEBPACK_IMPORTED_MODULE_0__splice__["a" /* default */], + toJS: function toJS(value) { + return value; + } +}; + +/* harmony default export */ __webpack_exports__["a"] = (structure); + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var red50 = exports.red50 = '#ffebee'; +var red100 = exports.red100 = '#ffcdd2'; +var red200 = exports.red200 = '#ef9a9a'; +var red300 = exports.red300 = '#e57373'; +var red400 = exports.red400 = '#ef5350'; +var red500 = exports.red500 = '#f44336'; +var red600 = exports.red600 = '#e53935'; +var red700 = exports.red700 = '#d32f2f'; +var red800 = exports.red800 = '#c62828'; +var red900 = exports.red900 = '#b71c1c'; +var redA100 = exports.redA100 = '#ff8a80'; +var redA200 = exports.redA200 = '#ff5252'; +var redA400 = exports.redA400 = '#ff1744'; +var redA700 = exports.redA700 = '#d50000'; + +var pink50 = exports.pink50 = '#fce4ec'; +var pink100 = exports.pink100 = '#f8bbd0'; +var pink200 = exports.pink200 = '#f48fb1'; +var pink300 = exports.pink300 = '#f06292'; +var pink400 = exports.pink400 = '#ec407a'; +var pink500 = exports.pink500 = '#e91e63'; +var pink600 = exports.pink600 = '#d81b60'; +var pink700 = exports.pink700 = '#c2185b'; +var pink800 = exports.pink800 = '#ad1457'; +var pink900 = exports.pink900 = '#880e4f'; +var pinkA100 = exports.pinkA100 = '#ff80ab'; +var pinkA200 = exports.pinkA200 = '#ff4081'; +var pinkA400 = exports.pinkA400 = '#f50057'; +var pinkA700 = exports.pinkA700 = '#c51162'; + +var purple50 = exports.purple50 = '#f3e5f5'; +var purple100 = exports.purple100 = '#e1bee7'; +var purple200 = exports.purple200 = '#ce93d8'; +var purple300 = exports.purple300 = '#ba68c8'; +var purple400 = exports.purple400 = '#ab47bc'; +var purple500 = exports.purple500 = '#9c27b0'; +var purple600 = exports.purple600 = '#8e24aa'; +var purple700 = exports.purple700 = '#7b1fa2'; +var purple800 = exports.purple800 = '#6a1b9a'; +var purple900 = exports.purple900 = '#4a148c'; +var purpleA100 = exports.purpleA100 = '#ea80fc'; +var purpleA200 = exports.purpleA200 = '#e040fb'; +var purpleA400 = exports.purpleA400 = '#d500f9'; +var purpleA700 = exports.purpleA700 = '#aa00ff'; + +var deepPurple50 = exports.deepPurple50 = '#ede7f6'; +var deepPurple100 = exports.deepPurple100 = '#d1c4e9'; +var deepPurple200 = exports.deepPurple200 = '#b39ddb'; +var deepPurple300 = exports.deepPurple300 = '#9575cd'; +var deepPurple400 = exports.deepPurple400 = '#7e57c2'; +var deepPurple500 = exports.deepPurple500 = '#673ab7'; +var deepPurple600 = exports.deepPurple600 = '#5e35b1'; +var deepPurple700 = exports.deepPurple700 = '#512da8'; +var deepPurple800 = exports.deepPurple800 = '#4527a0'; +var deepPurple900 = exports.deepPurple900 = '#311b92'; +var deepPurpleA100 = exports.deepPurpleA100 = '#b388ff'; +var deepPurpleA200 = exports.deepPurpleA200 = '#7c4dff'; +var deepPurpleA400 = exports.deepPurpleA400 = '#651fff'; +var deepPurpleA700 = exports.deepPurpleA700 = '#6200ea'; + +var indigo50 = exports.indigo50 = '#e8eaf6'; +var indigo100 = exports.indigo100 = '#c5cae9'; +var indigo200 = exports.indigo200 = '#9fa8da'; +var indigo300 = exports.indigo300 = '#7986cb'; +var indigo400 = exports.indigo400 = '#5c6bc0'; +var indigo500 = exports.indigo500 = '#3f51b5'; +var indigo600 = exports.indigo600 = '#3949ab'; +var indigo700 = exports.indigo700 = '#303f9f'; +var indigo800 = exports.indigo800 = '#283593'; +var indigo900 = exports.indigo900 = '#1a237e'; +var indigoA100 = exports.indigoA100 = '#8c9eff'; +var indigoA200 = exports.indigoA200 = '#536dfe'; +var indigoA400 = exports.indigoA400 = '#3d5afe'; +var indigoA700 = exports.indigoA700 = '#304ffe'; + +var blue50 = exports.blue50 = '#e3f2fd'; +var blue100 = exports.blue100 = '#bbdefb'; +var blue200 = exports.blue200 = '#90caf9'; +var blue300 = exports.blue300 = '#64b5f6'; +var blue400 = exports.blue400 = '#42a5f5'; +var blue500 = exports.blue500 = '#2196f3'; +var blue600 = exports.blue600 = '#1e88e5'; +var blue700 = exports.blue700 = '#1976d2'; +var blue800 = exports.blue800 = '#1565c0'; +var blue900 = exports.blue900 = '#0d47a1'; +var blueA100 = exports.blueA100 = '#82b1ff'; +var blueA200 = exports.blueA200 = '#448aff'; +var blueA400 = exports.blueA400 = '#2979ff'; +var blueA700 = exports.blueA700 = '#2962ff'; + +var lightBlue50 = exports.lightBlue50 = '#e1f5fe'; +var lightBlue100 = exports.lightBlue100 = '#b3e5fc'; +var lightBlue200 = exports.lightBlue200 = '#81d4fa'; +var lightBlue300 = exports.lightBlue300 = '#4fc3f7'; +var lightBlue400 = exports.lightBlue400 = '#29b6f6'; +var lightBlue500 = exports.lightBlue500 = '#03a9f4'; +var lightBlue600 = exports.lightBlue600 = '#039be5'; +var lightBlue700 = exports.lightBlue700 = '#0288d1'; +var lightBlue800 = exports.lightBlue800 = '#0277bd'; +var lightBlue900 = exports.lightBlue900 = '#01579b'; +var lightBlueA100 = exports.lightBlueA100 = '#80d8ff'; +var lightBlueA200 = exports.lightBlueA200 = '#40c4ff'; +var lightBlueA400 = exports.lightBlueA400 = '#00b0ff'; +var lightBlueA700 = exports.lightBlueA700 = '#0091ea'; + +var cyan50 = exports.cyan50 = '#e0f7fa'; +var cyan100 = exports.cyan100 = '#b2ebf2'; +var cyan200 = exports.cyan200 = '#80deea'; +var cyan300 = exports.cyan300 = '#4dd0e1'; +var cyan400 = exports.cyan400 = '#26c6da'; +var cyan500 = exports.cyan500 = '#00bcd4'; +var cyan600 = exports.cyan600 = '#00acc1'; +var cyan700 = exports.cyan700 = '#0097a7'; +var cyan800 = exports.cyan800 = '#00838f'; +var cyan900 = exports.cyan900 = '#006064'; +var cyanA100 = exports.cyanA100 = '#84ffff'; +var cyanA200 = exports.cyanA200 = '#18ffff'; +var cyanA400 = exports.cyanA400 = '#00e5ff'; +var cyanA700 = exports.cyanA700 = '#00b8d4'; + +var teal50 = exports.teal50 = '#e0f2f1'; +var teal100 = exports.teal100 = '#b2dfdb'; +var teal200 = exports.teal200 = '#80cbc4'; +var teal300 = exports.teal300 = '#4db6ac'; +var teal400 = exports.teal400 = '#26a69a'; +var teal500 = exports.teal500 = '#009688'; +var teal600 = exports.teal600 = '#00897b'; +var teal700 = exports.teal700 = '#00796b'; +var teal800 = exports.teal800 = '#00695c'; +var teal900 = exports.teal900 = '#004d40'; +var tealA100 = exports.tealA100 = '#a7ffeb'; +var tealA200 = exports.tealA200 = '#64ffda'; +var tealA400 = exports.tealA400 = '#1de9b6'; +var tealA700 = exports.tealA700 = '#00bfa5'; + +var green50 = exports.green50 = '#e8f5e9'; +var green100 = exports.green100 = '#c8e6c9'; +var green200 = exports.green200 = '#a5d6a7'; +var green300 = exports.green300 = '#81c784'; +var green400 = exports.green400 = '#66bb6a'; +var green500 = exports.green500 = '#4caf50'; +var green600 = exports.green600 = '#43a047'; +var green700 = exports.green700 = '#388e3c'; +var green800 = exports.green800 = '#2e7d32'; +var green900 = exports.green900 = '#1b5e20'; +var greenA100 = exports.greenA100 = '#b9f6ca'; +var greenA200 = exports.greenA200 = '#69f0ae'; +var greenA400 = exports.greenA400 = '#00e676'; +var greenA700 = exports.greenA700 = '#00c853'; + +var lightGreen50 = exports.lightGreen50 = '#f1f8e9'; +var lightGreen100 = exports.lightGreen100 = '#dcedc8'; +var lightGreen200 = exports.lightGreen200 = '#c5e1a5'; +var lightGreen300 = exports.lightGreen300 = '#aed581'; +var lightGreen400 = exports.lightGreen400 = '#9ccc65'; +var lightGreen500 = exports.lightGreen500 = '#8bc34a'; +var lightGreen600 = exports.lightGreen600 = '#7cb342'; +var lightGreen700 = exports.lightGreen700 = '#689f38'; +var lightGreen800 = exports.lightGreen800 = '#558b2f'; +var lightGreen900 = exports.lightGreen900 = '#33691e'; +var lightGreenA100 = exports.lightGreenA100 = '#ccff90'; +var lightGreenA200 = exports.lightGreenA200 = '#b2ff59'; +var lightGreenA400 = exports.lightGreenA400 = '#76ff03'; +var lightGreenA700 = exports.lightGreenA700 = '#64dd17'; + +var lime50 = exports.lime50 = '#f9fbe7'; +var lime100 = exports.lime100 = '#f0f4c3'; +var lime200 = exports.lime200 = '#e6ee9c'; +var lime300 = exports.lime300 = '#dce775'; +var lime400 = exports.lime400 = '#d4e157'; +var lime500 = exports.lime500 = '#cddc39'; +var lime600 = exports.lime600 = '#c0ca33'; +var lime700 = exports.lime700 = '#afb42b'; +var lime800 = exports.lime800 = '#9e9d24'; +var lime900 = exports.lime900 = '#827717'; +var limeA100 = exports.limeA100 = '#f4ff81'; +var limeA200 = exports.limeA200 = '#eeff41'; +var limeA400 = exports.limeA400 = '#c6ff00'; +var limeA700 = exports.limeA700 = '#aeea00'; + +var yellow50 = exports.yellow50 = '#fffde7'; +var yellow100 = exports.yellow100 = '#fff9c4'; +var yellow200 = exports.yellow200 = '#fff59d'; +var yellow300 = exports.yellow300 = '#fff176'; +var yellow400 = exports.yellow400 = '#ffee58'; +var yellow500 = exports.yellow500 = '#ffeb3b'; +var yellow600 = exports.yellow600 = '#fdd835'; +var yellow700 = exports.yellow700 = '#fbc02d'; +var yellow800 = exports.yellow800 = '#f9a825'; +var yellow900 = exports.yellow900 = '#f57f17'; +var yellowA100 = exports.yellowA100 = '#ffff8d'; +var yellowA200 = exports.yellowA200 = '#ffff00'; +var yellowA400 = exports.yellowA400 = '#ffea00'; +var yellowA700 = exports.yellowA700 = '#ffd600'; + +var amber50 = exports.amber50 = '#fff8e1'; +var amber100 = exports.amber100 = '#ffecb3'; +var amber200 = exports.amber200 = '#ffe082'; +var amber300 = exports.amber300 = '#ffd54f'; +var amber400 = exports.amber400 = '#ffca28'; +var amber500 = exports.amber500 = '#ffc107'; +var amber600 = exports.amber600 = '#ffb300'; +var amber700 = exports.amber700 = '#ffa000'; +var amber800 = exports.amber800 = '#ff8f00'; +var amber900 = exports.amber900 = '#ff6f00'; +var amberA100 = exports.amberA100 = '#ffe57f'; +var amberA200 = exports.amberA200 = '#ffd740'; +var amberA400 = exports.amberA400 = '#ffc400'; +var amberA700 = exports.amberA700 = '#ffab00'; + +var orange50 = exports.orange50 = '#fff3e0'; +var orange100 = exports.orange100 = '#ffe0b2'; +var orange200 = exports.orange200 = '#ffcc80'; +var orange300 = exports.orange300 = '#ffb74d'; +var orange400 = exports.orange400 = '#ffa726'; +var orange500 = exports.orange500 = '#ff9800'; +var orange600 = exports.orange600 = '#fb8c00'; +var orange700 = exports.orange700 = '#f57c00'; +var orange800 = exports.orange800 = '#ef6c00'; +var orange900 = exports.orange900 = '#e65100'; +var orangeA100 = exports.orangeA100 = '#ffd180'; +var orangeA200 = exports.orangeA200 = '#ffab40'; +var orangeA400 = exports.orangeA400 = '#ff9100'; +var orangeA700 = exports.orangeA700 = '#ff6d00'; + +var deepOrange50 = exports.deepOrange50 = '#fbe9e7'; +var deepOrange100 = exports.deepOrange100 = '#ffccbc'; +var deepOrange200 = exports.deepOrange200 = '#ffab91'; +var deepOrange300 = exports.deepOrange300 = '#ff8a65'; +var deepOrange400 = exports.deepOrange400 = '#ff7043'; +var deepOrange500 = exports.deepOrange500 = '#ff5722'; +var deepOrange600 = exports.deepOrange600 = '#f4511e'; +var deepOrange700 = exports.deepOrange700 = '#e64a19'; +var deepOrange800 = exports.deepOrange800 = '#d84315'; +var deepOrange900 = exports.deepOrange900 = '#bf360c'; +var deepOrangeA100 = exports.deepOrangeA100 = '#ff9e80'; +var deepOrangeA200 = exports.deepOrangeA200 = '#ff6e40'; +var deepOrangeA400 = exports.deepOrangeA400 = '#ff3d00'; +var deepOrangeA700 = exports.deepOrangeA700 = '#dd2c00'; + +var brown50 = exports.brown50 = '#efebe9'; +var brown100 = exports.brown100 = '#d7ccc8'; +var brown200 = exports.brown200 = '#bcaaa4'; +var brown300 = exports.brown300 = '#a1887f'; +var brown400 = exports.brown400 = '#8d6e63'; +var brown500 = exports.brown500 = '#795548'; +var brown600 = exports.brown600 = '#6d4c41'; +var brown700 = exports.brown700 = '#5d4037'; +var brown800 = exports.brown800 = '#4e342e'; +var brown900 = exports.brown900 = '#3e2723'; + +var blueGrey50 = exports.blueGrey50 = '#eceff1'; +var blueGrey100 = exports.blueGrey100 = '#cfd8dc'; +var blueGrey200 = exports.blueGrey200 = '#b0bec5'; +var blueGrey300 = exports.blueGrey300 = '#90a4ae'; +var blueGrey400 = exports.blueGrey400 = '#78909c'; +var blueGrey500 = exports.blueGrey500 = '#607d8b'; +var blueGrey600 = exports.blueGrey600 = '#546e7a'; +var blueGrey700 = exports.blueGrey700 = '#455a64'; +var blueGrey800 = exports.blueGrey800 = '#37474f'; +var blueGrey900 = exports.blueGrey900 = '#263238'; + +var grey50 = exports.grey50 = '#fafafa'; +var grey100 = exports.grey100 = '#f5f5f5'; +var grey200 = exports.grey200 = '#eeeeee'; +var grey300 = exports.grey300 = '#e0e0e0'; +var grey400 = exports.grey400 = '#bdbdbd'; +var grey500 = exports.grey500 = '#9e9e9e'; +var grey600 = exports.grey600 = '#757575'; +var grey700 = exports.grey700 = '#616161'; +var grey800 = exports.grey800 = '#424242'; +var grey900 = exports.grey900 = '#212121'; + +var black = exports.black = '#000000'; +var white = exports.white = '#ffffff'; + +var transparent = exports.transparent = 'rgba(0, 0, 0, 0)'; +var fullBlack = exports.fullBlack = 'rgba(0, 0, 0, 1)'; +var darkBlack = exports.darkBlack = 'rgba(0, 0, 0, 0.87)'; +var lightBlack = exports.lightBlack = 'rgba(0, 0, 0, 0.54)'; +var minBlack = exports.minBlack = 'rgba(0, 0, 0, 0.26)'; +var faintBlack = exports.faintBlack = 'rgba(0, 0, 0, 0.12)'; +var fullWhite = exports.fullWhite = 'rgba(255, 255, 255, 1)'; +var darkWhite = exports.darkWhite = 'rgba(255, 255, 255, 0.87)'; +var lightWhite = exports.lightWhite = 'rgba(255, 255, 255, 0.54)'; + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(338), __esModule: true }; + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(33) + , createDesc = __webpack_require__(84); +module.exports = __webpack_require__(41) ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); +} : function(object, key, value){ + object[key] = value; + return object; +}; + +/***/ }), +/* 50 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function(it, key){ + return hasOwnProperty.call(it, key); +}; + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(214) + , defined = __webpack_require__(137); +module.exports = function(it){ + return IObject(defined(it)); +}; + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var ReactBaseClasses = __webpack_require__(215); +var ReactChildren = __webpack_require__(218); +var ReactDOMFactories = __webpack_require__(346); +var ReactElement = __webpack_require__(53); +var ReactPropTypes = __webpack_require__(347); +var ReactVersion = __webpack_require__(351); + +var createReactClass = __webpack_require__(352); +var onlyChild = __webpack_require__(354); + +var createElement = ReactElement.createElement; +var createFactory = ReactElement.createFactory; +var cloneElement = ReactElement.cloneElement; + +if (false) { + var lowPriorityWarning = require('./lowPriorityWarning'); + var canDefineProperty = require('./canDefineProperty'); + var ReactElementValidator = require('./ReactElementValidator'); + var didWarnPropTypesDeprecated = false; + createElement = ReactElementValidator.createElement; + createFactory = ReactElementValidator.createFactory; + cloneElement = ReactElementValidator.cloneElement; +} + +var __spread = _assign; +var createMixin = function (mixin) { + return mixin; +}; + +if (false) { + var warnedForSpread = false; + var warnedForCreateMixin = false; + __spread = function () { + lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.'); + warnedForSpread = true; + return _assign.apply(null, arguments); + }; + + createMixin = function (mixin) { + lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.'); + warnedForCreateMixin = true; + return mixin; + }; +} + +var React = { + // Modern + + Children: { + map: ReactChildren.map, + forEach: ReactChildren.forEach, + count: ReactChildren.count, + toArray: ReactChildren.toArray, + only: onlyChild + }, + + Component: ReactBaseClasses.Component, + PureComponent: ReactBaseClasses.PureComponent, + + createElement: createElement, + cloneElement: cloneElement, + isValidElement: ReactElement.isValidElement, + + // Classic + + PropTypes: ReactPropTypes, + createClass: createReactClass, + createFactory: createFactory, + createMixin: createMixin, + + // This looks DOM specific but these are actually isomorphic helpers + // since they are just generating DOM strings. + DOM: ReactDOMFactories, + + version: ReactVersion, + + // Deprecated hook for JSX spread, don't use this for anything. + __spread: __spread +}; + +if (false) { + var warnedForCreateClass = false; + if (canDefineProperty) { + Object.defineProperty(React, 'PropTypes', { + get: function () { + lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs'); + didWarnPropTypesDeprecated = true; + return ReactPropTypes; + } + }); + + Object.defineProperty(React, 'createClass', { + get: function () { + lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class'); + warnedForCreateClass = true; + return createReactClass; + } + }); + } + + // React.DOM factories are deprecated. Wrap these methods so that + // invocations of the React.DOM namespace and alert users to switch + // to the `react-dom-factories` package. + React.DOM = {}; + var warnedForFactories = false; + Object.keys(ReactDOMFactories).forEach(function (factory) { + React.DOM[factory] = function () { + if (!warnedForFactories) { + lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory); + warnedForFactories = true; + } + return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments); + }; + }); +} + +module.exports = React; + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var ReactCurrentOwner = __webpack_require__(35); + +var warning = __webpack_require__(11); +var canDefineProperty = __webpack_require__(217); +var hasOwnProperty = Object.prototype.hasOwnProperty; + +var REACT_ELEMENT_TYPE = __webpack_require__(219); + +var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true +}; + +var specialPropKeyWarningShown, specialPropRefWarningShown; + +function hasValidRef(config) { + if (false) { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== undefined; +} + +function hasValidKey(config) { + if (false) { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== undefined; +} + +function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function () { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + false ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true + }); +} + +function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function () { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + false ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true + }); +} + +/** + * Factory method to create a new React element. This no longer adheres to + * the class pattern, so do not use new to call it. Also, no instanceof check + * will work. Instead test $$typeof field against Symbol.for('react.element') to check + * if something is a React Element. + * + * @param {*} type + * @param {*} key + * @param {string|object} ref + * @param {*} self A *temporary* helper to detect places where `this` is + * different from the `owner` when React.createElement is called, so that we + * can warn. We want to get rid of owner and replace string `ref`s with arrow + * functions, and as long as `this` and owner are the same, there will be no + * change in behavior. + * @param {*} source An annotation object (added by a transpiler or otherwise) + * indicating filename, line number, and/or other information. + * @param {*} owner + * @param {*} props + * @internal + */ +var ReactElement = function (type, key, ref, self, source, owner, props) { + var element = { + // This tag allow us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, + + // Record the component responsible for creating this element. + _owner: owner + }; + + if (false) { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; + + // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + if (canDefineProperty) { + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + // self and source are DEV only properties. + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self + }); + // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + } else { + element._store.validated = false; + element._self = self; + element._source = source; + } + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + + return element; +}; + +/** + * Create and return a new ReactElement of the given type. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement + */ +ReactElement.createElement = function (type, config, children) { + var propName; + + // Reserved names are extracted + var props = {}; + + var key = null; + var ref = null; + var self = null; + var source = null; + + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + if (hasValidKey(config)) { + key = '' + config.key; + } + + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; + // Remaining properties are added to a new props object + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + if (false) { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + + // Resolve default props + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + if (false) { + if (key || ref) { + if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { + var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + } + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); +}; + +/** + * Return a function that produces ReactElements of a given type. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory + */ +ReactElement.createFactory = function (type) { + var factory = ReactElement.createElement.bind(null, type); + // Expose the type on the factory and the prototype so that it can be + // easily accessed on elements. E.g. `<Foo />.type === Foo`. + // This should not be named `constructor` since this may not be the function + // that created the element, and it may not even be a constructor. + // Legacy hook TODO: Warn if this is accessed + factory.type = type; + return factory; +}; + +ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + + return newElement; +}; + +/** + * Clone and return a new ReactElement using element as the starting point. + * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement + */ +ReactElement.cloneElement = function (element, config, children) { + var propName; + + // Original props are copied + var props = _assign({}, element.props); + + // Reserved names are extracted + var key = element.key; + var ref = element.ref; + // Self is preserved since the owner is preserved. + var self = element._self; + // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + var source = element._source; + + // Owner will be preserved, unless ref is overridden + var owner = element._owner; + + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + key = '' + config.key; + } + + // Remaining properties override existing props + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === undefined && defaultProps !== undefined) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + + return ReactElement(element.type, key, ref, self, source, owner, props); +}; + +/** + * Verifies the object is a ReactElement. + * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement + * @param {?object} object + * @return {boolean} True if `object` is a valid component. + * @final + */ +ReactElement.isValidElement = function (object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; +}; + +module.exports = ReactElement; + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var invariant = __webpack_require__(9); + +/** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ +var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; + +var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } +}; + +var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } +}; + +var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } +}; + +var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) ? false ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } +}; + +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; + +/** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ +var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; +}; + +var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler +}; + +module.exports = PooledClass; + +/***/ }), +/* 55 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +/* harmony default export */ __webpack_exports__["a"] = (isObjectLike); + + +/***/ }), +/* 56 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(498); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__(501); + + + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = __WEBPACK_IMPORTED_MODULE_1__getValue_js__["a" /* default */](object, key); + return __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */](value) ? value : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (getNative); + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _iterator = __webpack_require__(633); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = __webpack_require__(641); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.convertColorToString = convertColorToString; +exports.convertHexToRGB = convertHexToRGB; +exports.decomposeColor = decomposeColor; +exports.getContrastRatio = getContrastRatio; +exports.getLuminance = getLuminance; +exports.emphasize = emphasize; +exports.fade = fade; +exports.darken = darken; +exports.lighten = lighten; +/** + * Returns a number whose value is limited to the given range. + * + * @param {number} value The value to be clamped + * @param {number} min The lower boundary of the output range + * @param {number} max The upper boundary of the output range + * @returns {number} A number in the range [min, max] + */ +function clamp(value, min, max) { + if (value < min) { + return min; + } + if (value > max) { + return max; + } + return value; +} + +/** + * Converts a color object with type and values to a string. + * + * @param {object} color - Decomposed color + * @param {string} color.type - One of, 'rgb', 'rgba', 'hsl', 'hsla' + * @param {array} color.values - [n,n,n] or [n,n,n,n] + * @returns {string} A CSS color string + */ +function convertColorToString(color) { + var type = color.type, + values = color.values; + + + if (type.indexOf('rgb') > -1) { + // Only convert the first 3 values to int (i.e. not alpha) + for (var i = 0; i < 3; i++) { + values[i] = parseInt(values[i]); + } + } + + var colorString = void 0; + + if (type.indexOf('hsl') > -1) { + colorString = color.type + '(' + values[0] + ', ' + values[1] + '%, ' + values[2] + '%'; + } else { + colorString = color.type + '(' + values[0] + ', ' + values[1] + ', ' + values[2]; + } + + if (values.length === 4) { + colorString += ', ' + color.values[3] + ')'; + } else { + colorString += ')'; + } + + return colorString; +} + +/** + * Converts a color from CSS hex format to CSS rgb format. + * + * @param {string} color - Hex color, i.e. #nnn or #nnnnnn + * @returns {string} A CSS rgb color string + */ +function convertHexToRGB(color) { + if (color.length === 4) { + var extendedColor = '#'; + for (var i = 1; i < color.length; i++) { + extendedColor += color.charAt(i) + color.charAt(i); + } + color = extendedColor; + } + + var values = { + r: parseInt(color.substr(1, 2), 16), + g: parseInt(color.substr(3, 2), 16), + b: parseInt(color.substr(5, 2), 16) + }; + + return 'rgb(' + values.r + ', ' + values.g + ', ' + values.b + ')'; +} + +/** + * Returns an object with the type and values of a color. + * + * Note: Does not support rgb % values. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {{type: string, values: number[]}} A MUI color object + */ +function decomposeColor(color) { + if (color.charAt(0) === '#') { + return decomposeColor(convertHexToRGB(color)); + } + + var marker = color.indexOf('('); + var type = color.substring(0, marker); + var values = color.substring(marker + 1, color.length - 1).split(','); + values = values.map(function (value) { + return parseFloat(value); + }); + + return { type: type, values: values }; +} + +/** + * Calculates the contrast ratio between two colors. + * + * Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef + * + * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {number} A contrast ratio value in the range 0 - 21 with 2 digit precision. + */ +function getContrastRatio(foreground, background) { + var lumA = getLuminance(foreground); + var lumB = getLuminance(background); + var contrastRatio = (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05); + + return Number(contrastRatio.toFixed(2)); // Truncate at two digits +} + +/** + * The relative brightness of any point in a color space, + * normalized to 0 for darkest black and 1 for lightest white. + * + * Formula: https://www.w3.org/WAI/GL/wiki/Relative_luminance + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {number} The relative brightness of the color in the range 0 - 1 + */ +function getLuminance(color) { + color = decomposeColor(color); + + if (color.type.indexOf('rgb') > -1) { + var rgb = color.values.map(function (val) { + val /= 255; // normalized + return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4); + }); + return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3)); // Truncate at 3 digits + } else if (color.type.indexOf('hsl') > -1) { + return color.values[2] / 100; + } +} + +/** + * Darken or lighten a colour, depending on its luminance. + * Light colors are darkened, dark colors are lightened. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient=0.15 - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function emphasize(color) { + var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15; + + return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient); +} + +/** + * Set the absolute transparency of a color. + * Any existing alpha values are overwritten. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} value - value to set the alpha channel to in the range 0 -1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function fade(color, value) { + color = decomposeColor(color); + value = clamp(value, 0, 1); + + if (color.type === 'rgb' || color.type === 'hsl') { + color.type += 'a'; + } + color.values[3] = value; + + return convertColorToString(color); +} + +/** + * Darkens a color. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function darken(color, coefficient) { + color = decomposeColor(color); + coefficient = clamp(coefficient, 0, 1); + + if (color.type.indexOf('hsl') > -1) { + color.values[2] *= 1 - coefficient; + } else if (color.type.indexOf('rgb') > -1) { + for (var i = 0; i < 3; i++) { + color.values[i] *= 1 - coefficient; + } + } + return convertColorToString(color); +} + +/** + * Lightens a color. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function lighten(color, coefficient) { + color = decomposeColor(color); + coefficient = clamp(coefficient, 0, 1); + + if (color.type.indexOf('hsl') > -1) { + color.values[2] += (100 - color.values[2]) * coefficient; + } else if (color.type.indexOf('rgb') > -1) { + for (var i = 0; i < 3; i++) { + color.values[i] += (255 - color.values[i]) * coefficient; + } + } + + return convertColorToString(color); +} + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(699), __esModule: true }; + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _shallowEqual = __webpack_require__(88); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _shallowEqual2.default; + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _childUtils = __webpack_require__(127); + +var _events = __webpack_require__(201); + +var _events2 = _interopRequireDefault(_events); + +var _keycode = __webpack_require__(27); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _FocusRipple = __webpack_require__(202); + +var _FocusRipple2 = _interopRequireDefault(_FocusRipple); + +var _TouchRipple = __webpack_require__(316); + +var _TouchRipple2 = _interopRequireDefault(_TouchRipple); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styleInjected = false; +var listening = false; +var tabPressed = false; + +function injectStyle() { + if (!styleInjected) { + // Remove inner padding and border in Firefox 4+. + var style = document.createElement('style'); + style.innerHTML = '\n button::-moz-focus-inner,\n input::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n '; + + document.body.appendChild(style); + styleInjected = true; + } +} + +function listenForTabPresses() { + if (!listening) { + _events2.default.on(window, 'keydown', function (event) { + tabPressed = (0, _keycode2.default)(event) === 'tab'; + }); + listening = true; + } +} + +var EnhancedButton = function (_Component) { + (0, _inherits3.default)(EnhancedButton, _Component); + + function EnhancedButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, EnhancedButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedButton.__proto__ || (0, _getPrototypeOf2.default)(EnhancedButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + isKeyboardFocused: false + }, _this.handleKeyDown = function (event) { + if (!_this.props.disabled && !_this.props.disableKeyboardFocus) { + if ((0, _keycode2.default)(event) === 'enter' && _this.state.isKeyboardFocused) { + _this.handleTouchTap(event); + } + if ((0, _keycode2.default)(event) === 'esc' && _this.state.isKeyboardFocused) { + _this.removeKeyboardFocus(event); + } + } + _this.props.onKeyDown(event); + }, _this.handleKeyUp = function (event) { + if (!_this.props.disabled && !_this.props.disableKeyboardFocus) { + if ((0, _keycode2.default)(event) === 'space' && _this.state.isKeyboardFocused) { + _this.handleTouchTap(event); + } + } + _this.props.onKeyUp(event); + }, _this.handleBlur = function (event) { + _this.cancelFocusTimeout(); + _this.removeKeyboardFocus(event); + _this.props.onBlur(event); + }, _this.handleFocus = function (event) { + if (event) event.persist(); + if (!_this.props.disabled && !_this.props.disableKeyboardFocus) { + // setTimeout is needed because the focus event fires first + // Wait so that we can capture if this was a keyboard focus + // or touch focus + _this.focusTimeout = setTimeout(function () { + if (tabPressed) { + _this.setKeyboardFocus(event); + tabPressed = false; + } + }, 150); + + _this.props.onFocus(event); + } + }, _this.handleClick = function (event) { + if (!_this.props.disabled) { + tabPressed = false; + _this.props.onClick(event); + } + }, _this.handleTouchTap = function (event) { + _this.cancelFocusTimeout(); + if (!_this.props.disabled) { + tabPressed = false; + _this.removeKeyboardFocus(event); + _this.props.onTouchTap(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(EnhancedButton, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + disabled = _props.disabled, + disableKeyboardFocus = _props.disableKeyboardFocus, + keyboardFocused = _props.keyboardFocused; + + if (!disabled && keyboardFocused && !disableKeyboardFocus) { + this.setState({ isKeyboardFocused: true }); + } + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + injectStyle(); + listenForTabPresses(); + if (this.state.isKeyboardFocused) { + this.refs.enhancedButton.focus(); + this.props.onKeyboardFocus(null, true); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if ((nextProps.disabled || nextProps.disableKeyboardFocus) && this.state.isKeyboardFocused) { + this.setState({ isKeyboardFocused: false }); + if (nextProps.onKeyboardFocus) { + nextProps.onKeyboardFocus(null, false); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.focusTimeout); + } + }, { + key: 'isKeyboardFocused', + value: function isKeyboardFocused() { + return this.state.isKeyboardFocused; + } + }, { + key: 'removeKeyboardFocus', + value: function removeKeyboardFocus(event) { + if (this.state.isKeyboardFocused) { + this.setState({ isKeyboardFocused: false }); + this.props.onKeyboardFocus(event, false); + } + } + }, { + key: 'setKeyboardFocus', + value: function setKeyboardFocus(event) { + if (!this.state.isKeyboardFocused) { + this.setState({ isKeyboardFocused: true }); + this.props.onKeyboardFocus(event, true); + } + } + }, { + key: 'cancelFocusTimeout', + value: function cancelFocusTimeout() { + if (this.focusTimeout) { + clearTimeout(this.focusTimeout); + this.focusTimeout = null; + } + } + }, { + key: 'createButtonChildren', + value: function createButtonChildren() { + var _props2 = this.props, + centerRipple = _props2.centerRipple, + children = _props2.children, + disabled = _props2.disabled, + disableFocusRipple = _props2.disableFocusRipple, + disableKeyboardFocus = _props2.disableKeyboardFocus, + disableTouchRipple = _props2.disableTouchRipple, + focusRippleColor = _props2.focusRippleColor, + focusRippleOpacity = _props2.focusRippleOpacity, + touchRippleColor = _props2.touchRippleColor, + touchRippleOpacity = _props2.touchRippleOpacity; + var isKeyboardFocused = this.state.isKeyboardFocused; + + // Focus Ripple + + var focusRipple = isKeyboardFocused && !disabled && !disableFocusRipple && !disableKeyboardFocus ? _react2.default.createElement(_FocusRipple2.default, { + color: focusRippleColor, + opacity: focusRippleOpacity, + show: isKeyboardFocused + }) : undefined; + + // Touch Ripple + var touchRipple = !disabled && !disableTouchRipple ? _react2.default.createElement( + _TouchRipple2.default, + { + centerRipple: centerRipple, + color: touchRippleColor, + opacity: touchRippleOpacity + }, + children + ) : undefined; + + return (0, _childUtils.createChildFragment)({ + focusRipple: focusRipple, + touchRipple: touchRipple, + children: touchRipple ? undefined : children + }); + } + }, { + key: 'render', + value: function render() { + var _props3 = this.props, + centerRipple = _props3.centerRipple, + children = _props3.children, + containerElement = _props3.containerElement, + disabled = _props3.disabled, + disableFocusRipple = _props3.disableFocusRipple, + disableKeyboardFocus = _props3.disableKeyboardFocus, + disableTouchRipple = _props3.disableTouchRipple, + focusRippleColor = _props3.focusRippleColor, + focusRippleOpacity = _props3.focusRippleOpacity, + href = _props3.href, + keyboardFocused = _props3.keyboardFocused, + touchRippleColor = _props3.touchRippleColor, + touchRippleOpacity = _props3.touchRippleOpacity, + onBlur = _props3.onBlur, + onClick = _props3.onClick, + onFocus = _props3.onFocus, + onKeyUp = _props3.onKeyUp, + onKeyDown = _props3.onKeyDown, + onKeyboardFocus = _props3.onKeyboardFocus, + onTouchTap = _props3.onTouchTap, + style = _props3.style, + tabIndex = _props3.tabIndex, + type = _props3.type, + other = (0, _objectWithoutProperties3.default)(_props3, ['centerRipple', 'children', 'containerElement', 'disabled', 'disableFocusRipple', 'disableKeyboardFocus', 'disableTouchRipple', 'focusRippleColor', 'focusRippleOpacity', 'href', 'keyboardFocused', 'touchRippleColor', 'touchRippleOpacity', 'onBlur', 'onClick', 'onFocus', 'onKeyUp', 'onKeyDown', 'onKeyboardFocus', 'onTouchTap', 'style', 'tabIndex', 'type']); + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + enhancedButton = _context$muiTheme.enhancedButton; + + + var mergedStyles = (0, _simpleAssign2.default)({ + border: 10, + boxSizing: 'border-box', + display: 'inline-block', + fontFamily: this.context.muiTheme.baseTheme.fontFamily, + WebkitTapHighlightColor: enhancedButton.tapHighlightColor, // Remove mobile color flashing (deprecated) + cursor: disabled ? 'default' : 'pointer', + textDecoration: 'none', + margin: 0, + padding: 0, + outline: 'none', + fontSize: 'inherit', + fontWeight: 'inherit', + position: 'relative', // This is needed so that ripples do not bleed past border radius. + verticalAlign: href ? 'middle' : null + }, style); + + // Passing both background:none & backgroundColor can break due to object iteration order + if (!mergedStyles.backgroundColor && !mergedStyles.background) { + mergedStyles.background = 'none'; + } + + if (disabled && href) { + return _react2.default.createElement( + 'span', + (0, _extends3.default)({}, other, { + style: mergedStyles + }), + children + ); + } + + var buttonProps = (0, _extends3.default)({}, other, { + style: prepareStyles(mergedStyles), + ref: 'enhancedButton', + disabled: disabled, + href: href, + onBlur: this.handleBlur, + onClick: this.handleClick, + onFocus: this.handleFocus, + onKeyUp: this.handleKeyUp, + onKeyDown: this.handleKeyDown, + onTouchTap: this.handleTouchTap, + tabIndex: disabled || disableKeyboardFocus ? -1 : tabIndex + }); + + var buttonChildren = this.createButtonChildren(); + + if (_react2.default.isValidElement(containerElement)) { + return _react2.default.cloneElement(containerElement, buttonProps, buttonChildren); + } + + if (!href && containerElement === 'button') { + buttonProps.type = type; + } + + return _react2.default.createElement(href ? 'a' : containerElement, buttonProps, buttonChildren); + } + }]); + return EnhancedButton; +}(_react.Component); + +EnhancedButton.defaultProps = { + containerElement: 'button', + onBlur: function onBlur() {}, + onClick: function onClick() {}, + onFocus: function onFocus() {}, + onKeyDown: function onKeyDown() {}, + onKeyUp: function onKeyUp() {}, + onKeyboardFocus: function onKeyboardFocus() {}, + onTouchTap: function onTouchTap() {}, + tabIndex: 0, + type: 'button' +}; +EnhancedButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? EnhancedButton.propTypes = { + centerRipple: _react.PropTypes.bool, + children: _react.PropTypes.node, + containerElement: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.element]), + disableFocusRipple: _react.PropTypes.bool, + disableKeyboardFocus: _react.PropTypes.bool, + disableTouchRipple: _react.PropTypes.bool, + disabled: _react.PropTypes.bool, + focusRippleColor: _react.PropTypes.string, + focusRippleOpacity: _react.PropTypes.number, + href: _react.PropTypes.string, + keyboardFocused: _react.PropTypes.bool, + onBlur: _react.PropTypes.func, + onClick: _react.PropTypes.func, + onFocus: _react.PropTypes.func, + onKeyDown: _react.PropTypes.func, + onKeyUp: _react.PropTypes.func, + onKeyboardFocus: _react.PropTypes.func, + onTouchTap: _react.PropTypes.func, + style: _react.PropTypes.object, + tabIndex: _react.PropTypes.number, + touchRippleColor: _react.PropTypes.string, + touchRippleOpacity: _react.PropTypes.number, + type: _react.PropTypes.string +} : void 0; +exports.default = EnhancedButton; + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getTheme = getTheme; + +var _getMuiTheme = __webpack_require__(125); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + +var _colors = __webpack_require__(47); + +var _styles = __webpack_require__(737); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + paper: { + margin: _styles.spacing.desktopGutter, + padding: _styles.spacing.desktopGutter + }, + container: { + display: 'flex', + flexFlow: 'column', + alignItems: 'center', + minHeight: '100%', + backgroundColor: _colors.grey50 + }, + content: { + maxWidth: 1200, + margin: '0 auto', + zIndex: 101 + }, + tabs: { + marginLeft: -24, + marginRight: -24 + }, + appBar: { + flex: 'none', + display: 'block', + flexWrap: 'wrap', + zIndex: 100, + height: 64 + }, + logo: { + fontSize: 16, + color: _styles.typography.textFullWhite, + lineHeight: _styles.spacing.desktopKeylineIncrement + 'px', + fontWeight: _styles.typography.fontWeightLight, + backgroundColor: 'rgb(72, 72, 72)', + marginBottom: 8, + height: 64, + textAlign: 'center' + }, + fields: { + text: { + width: '100%' + } + }, + colors: { + main: 'rgb(72, 72, 72)', + drawer: 'rgb(250, 250, 250)', + tabs: 'rgb(137, 189, 191)' + }, + theme: { + palette: { + primary1Color: 'rgb(72, 72, 72)', + primary2Color: 'rgb(72, 72, 72)' + }, + drawer: { + color: 'rgb(250, 250, 250)' + } + } +}; + +function getTheme() { + return (0, _getMuiTheme2.default)(styles.theme); +} + +exports.default = styles; + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var mapError = function mapError(_ref) { + var errorProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'errorText'; + var _ref$meta = _ref.meta; + _ref$meta = _ref$meta === undefined ? {} : _ref$meta; + + var touched = _ref$meta.touched, + error = _ref$meta.error, + warning = _ref$meta.warning, + input = _ref.input, + props = _objectWithoutProperties(_ref, ['meta', 'input']); + + return touched && (error || warning) ? _extends({}, props, input, _defineProperty({}, errorProp, error || warning)) : _extends({}, input, props); +}; + +exports.default = mapError; + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(134); +module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; +}; + +/***/ }), +/* 65 */ +/***/ (function(module, exports) { + +module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +/***/ }), +/* 66 */ +/***/ (function(module, exports) { + +module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } +}; + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(213) + , enumBugKeys = __webpack_require__(142); + +module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); +}; + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + +/** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + +function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; +} + +module.exports = reactProdInvariant; + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var invariant = __webpack_require__(9); + +function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; +} + +var DOMPropertyInjection = { + /** + * Mapping from normalized, camelcased property names to a configuration that + * specifies how the associated DOM property should be accessed or rendered. + */ + MUST_USE_PROPERTY: 0x1, + HAS_BOOLEAN_VALUE: 0x4, + HAS_NUMERIC_VALUE: 0x8, + HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, + HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, + + /** + * Inject some specialized knowledge about the DOM. This takes a config object + * with the following properties: + * + * isCustomAttribute: function that given an attribute name will return true + * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* + * attributes where it's impossible to enumerate all of the possible + * attribute names, + * + * Properties: object mapping DOM property name to one of the + * DOMPropertyInjection constants or null. If your attribute isn't in here, + * it won't get written to the DOM. + * + * DOMAttributeNames: object mapping React attribute name to the DOM + * attribute name. Attribute names not specified use the **lowercase** + * normalized name. + * + * DOMAttributeNamespaces: object mapping React attribute name to the DOM + * attribute namespace URL. (Attribute names not specified use no namespace.) + * + * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. + * Property names not specified use the normalized name. + * + * DOMMutationMethods: Properties that require special mutation methods. If + * `value` is undefined, the mutation method should unset the property. + * + * @param {object} domPropertyConfig the config as described above. + */ + injectDOMPropertyConfig: function (domPropertyConfig) { + var Injection = DOMPropertyInjection; + var Properties = domPropertyConfig.Properties || {}; + var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; + + if (domPropertyConfig.isCustomAttribute) { + DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); + } + + for (var propName in Properties) { + !!DOMProperty.properties.hasOwnProperty(propName) ? false ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0; + + var lowerCased = propName.toLowerCase(); + var propConfig = Properties[propName]; + + var propertyInfo = { + attributeName: lowerCased, + attributeNamespace: null, + propertyName: propName, + mutationMethod: null, + + mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), + hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), + hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), + hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), + hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) + }; + !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? false ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0; + + if (false) { + DOMProperty.getPossibleStandardName[lowerCased] = propName; + } + + if (DOMAttributeNames.hasOwnProperty(propName)) { + var attributeName = DOMAttributeNames[propName]; + propertyInfo.attributeName = attributeName; + if (false) { + DOMProperty.getPossibleStandardName[attributeName] = propName; + } + } + + if (DOMAttributeNamespaces.hasOwnProperty(propName)) { + propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; + } + + if (DOMPropertyNames.hasOwnProperty(propName)) { + propertyInfo.propertyName = DOMPropertyNames[propName]; + } + + if (DOMMutationMethods.hasOwnProperty(propName)) { + propertyInfo.mutationMethod = DOMMutationMethods[propName]; + } + + DOMProperty.properties[propName] = propertyInfo; + } + } +}; + +/* eslint-disable max-len */ +var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; +/* eslint-enable max-len */ + +/** + * DOMProperty exports lookup objects that can be used like functions: + * + * > DOMProperty.isValid['id'] + * true + * > DOMProperty.isValid['foobar'] + * undefined + * + * Although this may be confusing, it performs better in general. + * + * @see http://jsperf.com/key-exists + * @see http://jsperf.com/key-missing + */ +var DOMProperty = { + + ID_ATTRIBUTE_NAME: 'data-reactid', + ROOT_ATTRIBUTE_NAME: 'data-reactroot', + + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', + + /** + * Map from property "standard name" to an object with info about how to set + * the property in the DOM. Each object contains: + * + * attributeName: + * Used when rendering markup or with `*Attribute()`. + * attributeNamespace + * propertyName: + * Used on DOM node instances. (This includes properties that mutate due to + * external factors.) + * mutationMethod: + * If non-null, used instead of the property or `setAttribute()` after + * initial render. + * mustUseProperty: + * Whether the property must be accessed and mutated as an object property. + * hasBooleanValue: + * Whether the property should be removed when set to a falsey value. + * hasNumericValue: + * Whether the property must be numeric or parse as a numeric and should be + * removed when set to a falsey value. + * hasPositiveNumericValue: + * Whether the property must be positive numeric or parse as a positive + * numeric and should be removed when set to a falsey value. + * hasOverloadedBooleanValue: + * Whether the property can be used as a flag as well as with a value. + * Removed when strictly equal to false; present without a value when + * strictly equal to true; present with a value otherwise. + */ + properties: {}, + + /** + * Mapping from lowercase property names to the properly cased version, used + * to warn in the case of missing properties. Available only in __DEV__. + * + * autofocus is predefined, because adding it to the property whitelist + * causes unintended side effects. + * + * @type {Object} + */ + getPossibleStandardName: false ? { autofocus: 'autoFocus' } : null, + + /** + * All of the isCustomAttribute() functions that have been injected. + */ + _isCustomAttributeFunctions: [], + + /** + * Checks whether a property name is a custom attribute. + * @method + */ + isCustomAttribute: function (attributeName) { + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; + if (isCustomAttributeFn(attributeName)) { + return true; + } + } + return false; + }, + + injection: DOMPropertyInjection +}; + +module.exports = DOMProperty; + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPluginHub = __webpack_require__(71); +var EventPluginUtils = __webpack_require__(102); + +var accumulateInto = __webpack_require__(224); +var forEachAccumulated = __webpack_require__(225); +var warning = __webpack_require__(11); + +var getListener = EventPluginHub.getListener; + +/** + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. + */ +function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); +} + +/** + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function + * here, allows us to not have to bind or create functions for each event. + * Mutating the event's members allows us to not have to create a wrapping + * "dispatch" object that pairs the event with the listener. + */ +function accumulateDirectionalDispatches(inst, phase, event) { + if (false) { + process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0; + } + var listener = listenerAtPhase(inst, event, phase); + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } +} + +/** + * Collect dispatches (must be entirely collected before dispatching - see unit + * tests). Lazily allocate the array to conserve memory. We must loop through + * each event and perform the traversal for each one. We cannot perform a + * single traversal for the entire collection of events because each event may + * have a different target. + */ +function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); + } +} + +/** + * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. + */ +function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + var targetInst = event._targetInst; + var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null; + EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event); + } +} + +/** + * Accumulates without regard to direction, does not look for phased + * registration names. Same as `accumulateDirectDispatchesSingle` but without + * requiring that the `dispatchMarker` be the same as the dispatched ID. + */ +function accumulateDispatches(inst, ignoredDirection, event) { + if (event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(inst, registrationName); + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } +} + +/** + * Accumulates dispatches on an `SyntheticEvent`, but only for the + * `dispatchMarker`. + * @param {SyntheticEvent} event + */ +function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event._targetInst, null, event); + } +} + +function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); +} + +function accumulateTwoPhaseDispatchesSkipTarget(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); +} + +function accumulateEnterLeaveDispatches(leave, enter, from, to) { + EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter); +} + +function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); +} + +/** + * A small set of propagation patterns, each of which will accept a small amount + * of information, and generate a set of "dispatch ready event objects" - which + * are sets of events that have already been annotated with a set of dispatched + * listener functions/ids. The API is designed this way to discourage these + * propagation strategies from actually executing the dispatches, since we + * always want to collect the entire set of dispatches before executing event a + * single one. + * + * @constructor EventPropagators + */ +var EventPropagators = { + accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, + accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, + accumulateDirectDispatches: accumulateDirectDispatches, + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches +}; + +module.exports = EventPropagators; + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var EventPluginRegistry = __webpack_require__(144); +var EventPluginUtils = __webpack_require__(102); +var ReactErrorUtils = __webpack_require__(145); + +var accumulateInto = __webpack_require__(224); +var forEachAccumulated = __webpack_require__(225); +var invariant = __webpack_require__(9); + +/** + * Internal store for event listeners + */ +var listenerBank = {}; + +/** + * Internal queue of events that have accumulated their dispatches and are + * waiting to have their dispatches executed. + */ +var eventQueue = null; + +/** + * Dispatches an event and releases it back into the pool, unless persistent. + * + * @param {?object} event Synthetic event to be dispatched. + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @private + */ +var executeDispatchesAndRelease = function (event, simulated) { + if (event) { + EventPluginUtils.executeDispatchesInOrder(event, simulated); + + if (!event.isPersistent()) { + event.constructor.release(event); + } + } +}; +var executeDispatchesAndReleaseSimulated = function (e) { + return executeDispatchesAndRelease(e, true); +}; +var executeDispatchesAndReleaseTopLevel = function (e) { + return executeDispatchesAndRelease(e, false); +}; + +var getDictionaryKey = function (inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 + return '.' + inst._rootNodeID; +}; + +function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; +} + +function shouldPreventMouseEvent(name, type, props) { + switch (name) { + case 'onClick': + case 'onClickCapture': + case 'onDoubleClick': + case 'onDoubleClickCapture': + case 'onMouseDown': + case 'onMouseDownCapture': + case 'onMouseMove': + case 'onMouseMoveCapture': + case 'onMouseUp': + case 'onMouseUpCapture': + return !!(props.disabled && isInteractive(type)); + default: + return false; + } +} + +/** + * This is a unified interface for event plugins to be installed and configured. + * + * Event plugins can implement the following properties: + * + * `extractEvents` {function(string, DOMEventTarget, string, object): *} + * Required. When a top-level event is fired, this method is expected to + * extract synthetic events that will in turn be queued and dispatched. + * + * `eventTypes` {object} + * Optional, plugins that fire events must publish a mapping of registration + * names that are used to register listeners. Values of this mapping must + * be objects that contain `registrationName` or `phasedRegistrationNames`. + * + * `executeDispatch` {function(object, function, string)} + * Optional, allows plugins to override how an event gets dispatched. By + * default, the listener is simply invoked. + * + * Each plugin that is injected into `EventsPluginHub` is immediately operable. + * + * @public + */ +var EventPluginHub = { + + /** + * Methods for injecting dependencies. + */ + injection: { + + /** + * @param {array} InjectedEventPluginOrder + * @public + */ + injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, + + /** + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + */ + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName + + }, + + /** + * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent. + * + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {function} listener The callback to store. + */ + putListener: function (inst, registrationName, listener) { + !(typeof listener === 'function') ? false ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0; + + var key = getDictionaryKey(inst); + var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {}); + bankForRegistrationName[key] = listener; + + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.didPutListener) { + PluginModule.didPutListener(inst, registrationName, listener); + } + }, + + /** + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @return {?function} The stored callback. + */ + getListener: function (inst, registrationName) { + // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not + // live here; needs to be moved to a better place soon + var bankForRegistrationName = listenerBank[registrationName]; + if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) { + return null; + } + var key = getDictionaryKey(inst); + return bankForRegistrationName && bankForRegistrationName[key]; + }, + + /** + * Deletes a listener from the registration bank. + * + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + */ + deleteListener: function (inst, registrationName) { + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } + + var bankForRegistrationName = listenerBank[registrationName]; + // TODO: This should never be null -- when is it? + if (bankForRegistrationName) { + var key = getDictionaryKey(inst); + delete bankForRegistrationName[key]; + } + }, + + /** + * Deletes all listeners for the DOM element with the supplied ID. + * + * @param {object} inst The instance, which is the source of events. + */ + deleteAllListeners: function (inst) { + var key = getDictionaryKey(inst); + for (var registrationName in listenerBank) { + if (!listenerBank.hasOwnProperty(registrationName)) { + continue; + } + + if (!listenerBank[registrationName][key]) { + continue; + } + + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } + + delete listenerBank[registrationName][key]; + } + }, + + /** + * Allows registered plugins an opportunity to extract events from top-level + * native browser events. + * + * @return {*} An accumulation of synthetic events. + * @internal + */ + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events; + var plugins = EventPluginRegistry.plugins; + for (var i = 0; i < plugins.length; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + return events; + }, + + /** + * Enqueues a synthetic event that should be dispatched when + * `processEventQueue` is invoked. + * + * @param {*} events An accumulation of synthetic events. + * @internal + */ + enqueueEvents: function (events) { + if (events) { + eventQueue = accumulateInto(eventQueue, events); + } + }, + + /** + * Dispatches all synthetic events on the event queue. + * + * @internal + */ + processEventQueue: function (simulated) { + // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + var processingEventQueue = eventQueue; + eventQueue = null; + if (simulated) { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); + } else { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); + } + !!eventQueue ? false ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0; + // This would be a good time to rethrow if any of the event handlers threw. + ReactErrorUtils.rethrowCaughtError(); + }, + + /** + * These are needed for tests only. Do not use! + */ + __purge: function () { + listenerBank = {}; + }, + + __getListenerBank: function () { + return listenerBank; + } + +}; + +module.exports = EventPluginHub; + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactRef = __webpack_require__(363); +var ReactInstrumentation = __webpack_require__(26); + +var warning = __webpack_require__(11); + +/** + * Helper to call ReactRef.attachRefs with this composite component, split out + * to avoid allocations in the transaction mount-ready queue. + */ +function attachRefs() { + ReactRef.attachRefs(this, this._currentElement); +} + +var ReactReconciler = { + + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?object} the containing host component instance + * @param {?object} info about the host container + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots + ) { + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID); + } + } + var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID); + if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); + } + } + return markup; + }, + + /** + * Returns a value that can be passed to + * ReactComponentEnvironment.replaceNodeWithMarkup. + */ + getHostNode: function (internalInstance) { + return internalInstance.getHostNode(); + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function (internalInstance, safely) { + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID); + } + } + ReactRef.detachRefs(internalInstance, internalInstance._currentElement); + internalInstance.unmountComponent(safely); + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); + } + } + }, + + /** + * Update a component using a new element. + * + * @param {ReactComponent} internalInstance + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @internal + */ + receiveComponent: function (internalInstance, nextElement, transaction, context) { + var prevElement = internalInstance._currentElement; + + if (nextElement === prevElement && context === internalInstance._context) { + // Since elements are immutable after the owner is rendered, + // we can do a cheap identity compare here to determine if this is a + // superfluous reconcile. It's possible for state to be mutable but such + // change should trigger an update of the owner which would recreate + // the element. We explicitly check for the existence of an owner since + // it's possible for an element created outside a composite to be + // deeply mutated and reused. + + // TODO: Bailing out early is just a perf optimization right? + // TODO: Removing the return statement should affect correctness? + return; + } + + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); + } + } + + var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); + + if (refsChanged) { + ReactRef.detachRefs(internalInstance, prevElement); + } + + internalInstance.receiveComponent(nextElement, transaction, context); + + if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); + } + } + }, + + /** + * Flush any dirty changes in a component. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) { + if (internalInstance._updateBatchNumber !== updateBatchNumber) { + // The component's enqueued batch number should always be the current + // batch or the following one. + false ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0; + return; + } + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement); + } + } + internalInstance.performUpdateIfNecessary(transaction); + if (false) { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); + } + } + } + +}; + +module.exports = ReactReconciler; + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(36); + +var getEventTarget = __webpack_require__(146); + +/** + * @interface UIEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var UIEventInterface = { + view: function (event) { + if (event.view) { + return event.view; + } + + var target = getEventTarget(event); + if (target.window === target) { + // target is a window object + return target; + } + + var doc = target.ownerDocument; + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + if (doc) { + return doc.defaultView || doc.parentWindow; + } else { + return window; + } + }, + detail: function (event) { + return event.detail || 0; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); + +module.exports = SyntheticUIEvent; + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMNamespaces = __webpack_require__(151); +var setInnerHTML = __webpack_require__(105); + +var createMicrosoftUnsafeLocalFunction = __webpack_require__(152); +var setTextContent = __webpack_require__(230); + +var ELEMENT_NODE_TYPE = 1; +var DOCUMENT_FRAGMENT_NODE_TYPE = 11; + +/** + * In IE (8-11) and Edge, appending nodes with no children is dramatically + * faster than appending a full subtree, so we essentially queue up the + * .appendChild calls here and apply them so each node is added to its parent + * before any children are added. + * + * In other browsers, doing so is slower or neutral compared to the other order + * (in Firefox, twice as slow) so we only do this inversion in IE. + * + * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode. + */ +var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent); + +function insertTreeChildren(tree) { + if (!enableLazy) { + return; + } + var node = tree.node; + var children = tree.children; + if (children.length) { + for (var i = 0; i < children.length; i++) { + insertTreeBefore(node, children[i], null); + } + } else if (tree.html != null) { + setInnerHTML(node, tree.html); + } else if (tree.text != null) { + setTextContent(node, tree.text); + } +} + +var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) { + // DocumentFragments aren't actually part of the DOM after insertion so + // appending children won't update the DOM. We need to ensure the fragment + // is properly populated first, breaking out of our lazy approach for just + // this level. Also, some <object> plugins (like Flash Player) will read + // <param> nodes immediately upon insertion into the DOM, so <object> + // must also be populated prior to insertion into the DOM. + if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) { + insertTreeChildren(tree); + parentNode.insertBefore(tree.node, referenceNode); + } else { + parentNode.insertBefore(tree.node, referenceNode); + insertTreeChildren(tree); + } +}); + +function replaceChildWithTree(oldNode, newTree) { + oldNode.parentNode.replaceChild(newTree.node, oldNode); + insertTreeChildren(newTree); +} + +function queueChild(parentTree, childTree) { + if (enableLazy) { + parentTree.children.push(childTree); + } else { + parentTree.node.appendChild(childTree.node); + } +} + +function queueHTML(tree, html) { + if (enableLazy) { + tree.html = html; + } else { + setInnerHTML(tree.node, html); + } +} + +function queueText(tree, text) { + if (enableLazy) { + tree.text = text; + } else { + setTextContent(tree.node, text); + } +} + +function toString() { + return this.node.nodeName; +} + +function DOMLazyTree(node) { + return { + node: node, + children: [], + html: null, + text: null, + toString: toString + }; +} + +DOMLazyTree.insertTreeBefore = insertTreeBefore; +DOMLazyTree.replaceChildWithTree = replaceChildWithTree; +DOMLazyTree.queueChild = queueChild; +DOMLazyTree.queueHTML = queueHTML; +DOMLazyTree.queueText = queueText; + +module.exports = DOMLazyTree; + +/***/ }), +/* 75 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export default */ +/* unused harmony export _resetWarned */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(15); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); + + +var warned = {}; + +function routerWarning(falseToWarn, message) { + // Only issue deprecation warnings once. + if (message.indexOf('deprecated') !== -1) { + if (warned[message]) { + return; + } + + warned[message] = true; + } + + message = '[react-router] ' + message; + + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + __WEBPACK_IMPORTED_MODULE_0_warning___default.a.apply(undefined, [falseToWarn, message].concat(args)); +} + +function _resetWarned() { + warned = {}; +} + +/***/ }), +/* 76 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export compilePattern */ +/* harmony export (immutable) */ __webpack_exports__["c"] = matchPattern; +/* harmony export (immutable) */ __webpack_exports__["b"] = getParamNames; +/* unused harmony export getParams */ +/* harmony export (immutable) */ __webpack_exports__["a"] = formatPattern; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); + + +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} + +function _compilePattern(pattern) { + var regexpSource = ''; + var paramNames = []; + var tokens = []; + + var match = void 0, + lastIndex = 0, + matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g; + while (match = matcher.exec(pattern)) { + if (match.index !== lastIndex) { + tokens.push(pattern.slice(lastIndex, match.index)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index)); + } + + if (match[1]) { + regexpSource += '([^/]+)'; + paramNames.push(match[1]); + } else if (match[0] === '**') { + regexpSource += '(.*)'; + paramNames.push('splat'); + } else if (match[0] === '*') { + regexpSource += '(.*?)'; + paramNames.push('splat'); + } else if (match[0] === '(') { + regexpSource += '(?:'; + } else if (match[0] === ')') { + regexpSource += ')?'; + } else if (match[0] === '\\(') { + regexpSource += '\\('; + } else if (match[0] === '\\)') { + regexpSource += '\\)'; + } + + tokens.push(match[0]); + + lastIndex = matcher.lastIndex; + } + + if (lastIndex !== pattern.length) { + tokens.push(pattern.slice(lastIndex, pattern.length)); + regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length)); + } + + return { + pattern: pattern, + regexpSource: regexpSource, + paramNames: paramNames, + tokens: tokens + }; +} + +var CompiledPatternsCache = Object.create(null); + +function compilePattern(pattern) { + if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern); + + return CompiledPatternsCache[pattern]; +} + +/** + * Attempts to match a pattern on the given pathname. Patterns may use + * the following special characters: + * + * - :paramName Matches a URL segment up to the next /, ?, or #. The + * captured string is considered a "param" + * - () Wraps a segment of the URL that is optional + * - * Consumes (non-greedy) all characters up to the next + * character in the pattern, or to the end of the URL if + * there is none + * - ** Consumes (greedy) all characters up to the next character + * in the pattern, or to the end of the URL if there is none + * + * The function calls callback(error, matched) when finished. + * The return value is an object with the following properties: + * + * - remainingPathname + * - paramNames + * - paramValues + */ +function matchPattern(pattern, pathname) { + // Ensure pattern starts with leading slash for consistency with pathname. + if (pattern.charAt(0) !== '/') { + pattern = '/' + pattern; + } + + var _compilePattern2 = compilePattern(pattern), + regexpSource = _compilePattern2.regexpSource, + paramNames = _compilePattern2.paramNames, + tokens = _compilePattern2.tokens; + + if (pattern.charAt(pattern.length - 1) !== '/') { + regexpSource += '/?'; // Allow optional path separator at end. + } + + // Special-case patterns like '*' for catch-all routes. + if (tokens[tokens.length - 1] === '*') { + regexpSource += '$'; + } + + var match = pathname.match(new RegExp('^' + regexpSource, 'i')); + if (match == null) { + return null; + } + + var matchedPath = match[0]; + var remainingPathname = pathname.substr(matchedPath.length); + + if (remainingPathname) { + // Require that the match ends at a path separator, if we didn't match + // the full path, so any remaining pathname is a new path segment. + if (matchedPath.charAt(matchedPath.length - 1) !== '/') { + return null; + } + + // If there is a remaining pathname, treat the path separator as part of + // the remaining pathname for properly continuing the match. + remainingPathname = '/' + remainingPathname; + } + + return { + remainingPathname: remainingPathname, + paramNames: paramNames, + paramValues: match.slice(1).map(function (v) { + return v && decodeURIComponent(v); + }) + }; +} + +function getParamNames(pattern) { + return compilePattern(pattern).paramNames; +} + +function getParams(pattern, pathname) { + var match = matchPattern(pattern, pathname); + if (!match) { + return null; + } + + var paramNames = match.paramNames, + paramValues = match.paramValues; + + var params = {}; + + paramNames.forEach(function (paramName, index) { + params[paramName] = paramValues[index]; + }); + + return params; +} + +/** + * Returns a version of the given pattern with params interpolated. Throws + * if there is a dynamic segment of the pattern for which there is no param. + */ +function formatPattern(pattern, params) { + params = params || {}; + + var _compilePattern3 = compilePattern(pattern), + tokens = _compilePattern3.tokens; + + var parenCount = 0, + pathname = '', + splatIndex = 0, + parenHistory = []; + + var token = void 0, + paramName = void 0, + paramValue = void 0; + for (var i = 0, len = tokens.length; i < len; ++i) { + token = tokens[i]; + + if (token === '*' || token === '**') { + paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat; + + !(paramValue != null || parenCount > 0) ? false ? invariant(false, 'Missing splat #%s for path "%s"', splatIndex, pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; + + if (paramValue != null) pathname += encodeURI(paramValue); + } else if (token === '(') { + parenHistory[parenCount] = ''; + parenCount += 1; + } else if (token === ')') { + var parenText = parenHistory.pop(); + parenCount -= 1; + + if (parenCount) parenHistory[parenCount - 1] += parenText;else pathname += parenText; + } else if (token === '\\(') { + pathname += '('; + } else if (token === '\\)') { + pathname += ')'; + } else if (token.charAt(0) === ':') { + paramName = token.substring(1); + paramValue = params[paramName]; + + !(paramValue != null || parenCount > 0) ? false ? invariant(false, 'Missing "%s" parameter for path "%s"', paramName, pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; + + if (paramValue == null) { + if (parenCount) { + parenHistory[parenCount - 1] = ''; + + var curTokenIdx = tokens.indexOf(token); + var tokensSubset = tokens.slice(curTokenIdx, tokens.length); + var nextParenIdx = -1; + + for (var _i = 0; _i < tokensSubset.length; _i++) { + if (tokensSubset[_i] == ')') { + nextParenIdx = _i; + break; + } + } + + !(nextParenIdx > 0) ? false ? invariant(false, 'Path "%s" is missing end paren at segment "%s"', pattern, tokensSubset.join('')) : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; + + // jump to ending paren + i = curTokenIdx + nextParenIdx - 1; + } + } else if (parenCount) parenHistory[parenCount - 1] += encodeURIComponent(paramValue);else pathname += encodeURIComponent(paramValue); + } else { + if (parenCount) parenHistory[parenCount - 1] += token;else pathname += token; + } + } + + !(parenCount <= 0) ? false ? invariant(false, 'Path "%s" is missing end paren', pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; + + return pathname.replace(/\/+/g, '/'); +} + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.locationsAreEqual = exports.statesAreEqual = exports.createLocation = exports.createQuery = undefined; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _invariant = __webpack_require__(17); + +var _invariant2 = _interopRequireDefault(_invariant); + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +var _PathUtils = __webpack_require__(43); + +var _Actions = __webpack_require__(109); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createQuery = exports.createQuery = function createQuery(props) { + return _extends(Object.create(null), props); +}; + +var createLocation = exports.createLocation = function createLocation() { + var input = arguments.length <= 0 || arguments[0] === undefined ? '/' : arguments[0]; + var action = arguments.length <= 1 || arguments[1] === undefined ? _Actions.POP : arguments[1]; + var key = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2]; + + var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input; + + false ? (0, _warning2.default)(!object.path, 'Location descriptor objects should have a `pathname`, not a `path`.') : void 0; + + var pathname = object.pathname || '/'; + var search = object.search || ''; + var hash = object.hash || ''; + var state = object.state; + + return { + pathname: pathname, + search: search, + hash: hash, + state: state, + action: action, + key: key + }; +}; + +var isDate = function isDate(object) { + return Object.prototype.toString.call(object) === '[object Date]'; +}; + +var statesAreEqual = exports.statesAreEqual = function statesAreEqual(a, b) { + if (a === b) return true; + + var typeofA = typeof a === 'undefined' ? 'undefined' : _typeof(a); + var typeofB = typeof b === 'undefined' ? 'undefined' : _typeof(b); + + if (typeofA !== typeofB) return false; + + !(typeofA !== 'function') ? false ? (0, _invariant2.default)(false, 'You must not store functions in location state') : (0, _invariant2.default)(false) : void 0; + + // Not the same object, but same type. + if (typeofA === 'object') { + !!(isDate(a) && isDate(b)) ? false ? (0, _invariant2.default)(false, 'You must not store Date objects in location state') : (0, _invariant2.default)(false) : void 0; + + if (!Array.isArray(a)) { + var keysofA = Object.keys(a); + var keysofB = Object.keys(b); + return keysofA.length === keysofB.length && keysofA.every(function (key) { + return statesAreEqual(a[key], b[key]); + }); + } + + return Array.isArray(b) && a.length === b.length && a.every(function (item, index) { + return statesAreEqual(item, b[index]); + }); + } + + // All other serializable types (string, number, boolean) + // should be strict equal. + return false; +}; + +var locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) { + return a.key === b.key && + // a.action === b.action && // Different action !== location change. + a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && statesAreEqual(a.state, b.state); +}; + +/***/ }), +/* 78 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(455); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(456); + + + + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */](value) + : __WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseGetTag); + + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var CHANGE_MENU = exports.CHANGE_MENU = 'CHANGE_MENU'; +var NOTIFICATION_ADD = exports.NOTIFICATION_ADD = 'NOTIFICATION_ADD'; +var PROFILE_CREATE = exports.PROFILE_CREATE = 'PROFILE_CREATE'; +var PROFILE_UPDATE_SETTINGS = exports.PROFILE_UPDATE_SETTINGS = 'PROFILE_UPDATE_SETTINGS'; +var PROFILE_REMOVE = exports.PROFILE_REMOVE = 'PROFILE_REMOVE'; +var PROFILE_SET_ENABLED = exports.PROFILE_SET_ENABLED = 'PROFILE_SET_ENABLED'; + +/***/ }), +/* 80 */ +/***/ (function(module, exports) { + +module.exports = {}; + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _IconButton = __webpack_require__(713); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _IconButton2.default; + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var MENU_OPTIONS = exports.MENU_OPTIONS = 'Options'; +var MENU_BILLING = exports.MENU_BILLING = 'Billing'; +var MENU_SIZES = exports.MENU_SIZES = 'Sizes'; + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.dateTimeFormat = dateTimeFormat; +exports.addDays = addDays; +exports.addMonths = addMonths; +exports.addYears = addYears; +exports.cloneDate = cloneDate; +exports.cloneAsDate = cloneAsDate; +exports.getDaysInMonth = getDaysInMonth; +exports.getFirstDayOfMonth = getFirstDayOfMonth; +exports.getFirstDayOfWeek = getFirstDayOfWeek; +exports.getWeekArray = getWeekArray; +exports.localizedWeekday = localizedWeekday; +exports.formatIso = formatIso; +exports.isEqualDate = isEqualDate; +exports.isBeforeDate = isBeforeDate; +exports.isAfterDate = isAfterDate; +exports.isBetweenDates = isBetweenDates; +exports.monthDiff = monthDiff; +exports.yearDiff = yearDiff; + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var dayAbbreviation = ['S', 'M', 'T', 'W', 'T', 'F', 'S']; +var dayList = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var monthList = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; +var monthLongList = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; + +function dateTimeFormat(locale, options) { + false ? (0, _warning2.default)(locale === 'en-US', 'Material-UI: The ' + locale + ' locale is not supported by the built-in DateTimeFormat.\n Use the `DateTimeFormat` prop to supply an alternative implementation.') : void 0; + + this.format = function (date) { + if (options.month === 'short' && options.weekday === 'short' && options.day === '2-digit') { + return dayList[date.getDay()] + ', ' + monthList[date.getMonth()] + ' ' + date.getDate(); + } else if (options.year === 'numeric' && options.month === 'numeric' && options.day === 'numeric') { + return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); + } else if (options.year === 'numeric' && options.month === 'long') { + return monthLongList[date.getMonth()] + ' ' + date.getFullYear(); + } else if (options.weekday === 'narrow') { + return dayAbbreviation[date.getDay()]; + } else if (options.year === 'numeric') { + return date.getFullYear().toString(); + } else if (options.day === 'numeric') { + return date.getDate(); + } else { + false ? (0, _warning2.default)(false, 'Material-UI: Wrong usage of DateTimeFormat') : void 0; + } + }; +} + +function addDays(d, days) { + var newDate = cloneDate(d); + newDate.setDate(d.getDate() + days); + return newDate; +} + +function addMonths(d, months) { + var newDate = cloneDate(d); + newDate.setMonth(d.getMonth() + months); + return newDate; +} + +function addYears(d, years) { + var newDate = cloneDate(d); + newDate.setFullYear(d.getFullYear() + years); + return newDate; +} + +function cloneDate(d) { + return new Date(d.getTime()); +} + +function cloneAsDate(d) { + var clonedDate = cloneDate(d); + clonedDate.setHours(0, 0, 0, 0); + return clonedDate; +} + +function getDaysInMonth(d) { + var resultDate = getFirstDayOfMonth(d); + + resultDate.setMonth(resultDate.getMonth() + 1); + resultDate.setDate(resultDate.getDate() - 1); + + return resultDate.getDate(); +} + +function getFirstDayOfMonth(d) { + return new Date(d.getFullYear(), d.getMonth(), 1); +} + +function getFirstDayOfWeek() { + var now = new Date(); + return new Date(now.setDate(now.getDate() - now.getDay())); +} + +function getWeekArray(d, firstDayOfWeek) { + var dayArray = []; + var daysInMonth = getDaysInMonth(d); + var weekArray = []; + var week = []; + + for (var i = 1; i <= daysInMonth; i++) { + dayArray.push(new Date(d.getFullYear(), d.getMonth(), i)); + } + + var addWeek = function addWeek(week) { + var emptyDays = 7 - week.length; + for (var _i = 0; _i < emptyDays; ++_i) { + week[weekArray.length ? 'push' : 'unshift'](null); + } + weekArray.push(week); + }; + + dayArray.forEach(function (day) { + if (week.length > 0 && day.getDay() === firstDayOfWeek) { + addWeek(week); + week = []; + } + week.push(day); + if (dayArray.indexOf(day) === dayArray.length - 1) { + addWeek(week); + } + }); + + return weekArray; +} + +function localizedWeekday(DateTimeFormat, locale, day, firstDayOfWeek) { + var weekdayFormatter = new DateTimeFormat(locale, { weekday: 'narrow' }); + var firstDayDate = getFirstDayOfWeek(); + + return weekdayFormatter.format(addDays(firstDayDate, day + firstDayOfWeek)); +} + +// Convert date to ISO 8601 (YYYY-MM-DD) date string, accounting for current timezone +function formatIso(date) { + return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10); +} + +function isEqualDate(d1, d2) { + return d1 && d2 && d1.getFullYear() === d2.getFullYear() && d1.getMonth() === d2.getMonth() && d1.getDate() === d2.getDate(); +} + +function isBeforeDate(d1, d2) { + var date1 = cloneAsDate(d1); + var date2 = cloneAsDate(d2); + + return date1.getTime() < date2.getTime(); +} + +function isAfterDate(d1, d2) { + var date1 = cloneAsDate(d1); + var date2 = cloneAsDate(d2); + + return date1.getTime() > date2.getTime(); +} + +function isBetweenDates(dateToCheck, startDate, endDate) { + return !isBeforeDate(dateToCheck, startDate) && !isAfterDate(dateToCheck, endDate); +} + +function monthDiff(d1, d2) { + var m = void 0; + m = (d1.getFullYear() - d2.getFullYear()) * 12; + m += d1.getMonth(); + m -= d2.getMonth(); + return m; +} + +function yearDiff(d1, d2) { + return ~~(monthDiff(d1, d2) / 12); +} + +/***/ }), +/* 84 */ +/***/ (function(module, exports) { + +module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; +}; + +/***/ }), +/* 85 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function(it){ + return toString.call(it).slice(8, -1); +}; + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(137); +module.exports = function(it){ + return Object(defined(it)); +}; + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * `ReactInstanceMap` maintains a mapping from a public facing stateful + * instance (key) and the internal representation (value). This allows public + * methods to accept the user facing instance as an argument and map them back + * to internal methods. + */ + +// TODO: Replace this with ES6: var ReactInstanceMap = new Map(); + +var ReactInstanceMap = { + + /** + * This API should be called `delete` but we'd have to make sure to always + * transform these to strings for IE support. When this transform is fully + * supported we can rename it. + */ + remove: function (key) { + key._reactInternalInstance = undefined; + }, + + get: function (key) { + return key._reactInternalInstance; + }, + + has: function (key) { + return key._reactInternalInstance !== undefined; + }, + + set: function (key, value) { + key._reactInternalInstance = value; + } + +}; + +module.exports = ReactInstanceMap; + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + * + */ + +/*eslint-disable no-self-compare */ + + + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ +function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + // Added the nonzero y check to make Flow happy, but it is redundant + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } +} + +/** + * Performs equality by iterating through keys on an object and returning false + * when any key has values which are not strictly equal between the arguments. + * Returns true when the values of all keys are strictly equal. + */ +function shallowEqual(objA, objB) { + if (is(objA, objB)) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + for (var i = 0; i < keysA.length; i++) { + if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; +} + +module.exports = shallowEqual; + +/***/ }), +/* 89 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["c"] = falsy; +/* unused harmony export history */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return component; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return components; }); +/* unused harmony export route */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return routes; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); + + +var func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + object = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object, + arrayOf = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].arrayOf, + oneOfType = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType, + element = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].element, + shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape, + string = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string; + + +function falsy(props, propName, componentName) { + if (props[propName]) return new Error('<' + componentName + '> should not have a "' + propName + '" prop'); +} + +var history = shape({ + listen: func.isRequired, + push: func.isRequired, + replace: func.isRequired, + go: func.isRequired, + goBack: func.isRequired, + goForward: func.isRequired +}); + +var component = oneOfType([func, string]); +var components = oneOfType([component, object]); +var route = oneOfType([object, element]); +var routes = oneOfType([route, arrayOf(route)]); + +/***/ }), +/* 90 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionTypes", function() { return actionTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Field", function() { return Field; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fields", function() { return Fields; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FieldArray", function() { return FieldArray; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return Form; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormSection", function() { return FormSection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formValueSelector", function() { return formValueSelector; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormValues", function() { return getFormValues; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormInitialValues", function() { return getFormInitialValues; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncErrors", function() { return getFormSyncErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormAsyncErrors", function() { return getFormAsyncErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSubmitErrors", function() { return getFormSubmitErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDirty", function() { return isDirty; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInvalid", function() { return isInvalid; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPristine", function() { return isPristine; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValid", function() { return isValid; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSubmitting", function() { return isSubmitting; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitSucceeded", function() { return hasSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitFailed", function() { return hasSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return propTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduxForm", function() { return reduxForm; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubmissionError", function() { return SubmissionError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return values; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createAll__ = __webpack_require__(490); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(46); + + + +var _createAll = __WEBPACK_IMPORTED_MODULE_0__createAll__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]); + +var actionTypes = _createAll.actionTypes, + arrayInsert = _createAll.arrayInsert, + arrayMove = _createAll.arrayMove, + arrayPop = _createAll.arrayPop, + arrayPush = _createAll.arrayPush, + arrayRemove = _createAll.arrayRemove, + arrayRemoveAll = _createAll.arrayRemoveAll, + arrayShift = _createAll.arrayShift, + arraySplice = _createAll.arraySplice, + arraySwap = _createAll.arraySwap, + arrayUnshift = _createAll.arrayUnshift, + autofill = _createAll.autofill, + blur = _createAll.blur, + change = _createAll.change, + destroy = _createAll.destroy, + Field = _createAll.Field, + Fields = _createAll.Fields, + FieldArray = _createAll.FieldArray, + Form = _createAll.Form, + FormSection = _createAll.FormSection, + focus = _createAll.focus, + formValueSelector = _createAll.formValueSelector, + getFormValues = _createAll.getFormValues, + getFormInitialValues = _createAll.getFormInitialValues, + getFormSyncErrors = _createAll.getFormSyncErrors, + getFormAsyncErrors = _createAll.getFormAsyncErrors, + getFormSubmitErrors = _createAll.getFormSubmitErrors, + initialize = _createAll.initialize, + isDirty = _createAll.isDirty, + isInvalid = _createAll.isInvalid, + isPristine = _createAll.isPristine, + isValid = _createAll.isValid, + isSubmitting = _createAll.isSubmitting, + hasSubmitSucceeded = _createAll.hasSubmitSucceeded, + hasSubmitFailed = _createAll.hasSubmitFailed, + propTypes = _createAll.propTypes, + reducer = _createAll.reducer, + reduxForm = _createAll.reduxForm, + registerField = _createAll.registerField, + reset = _createAll.reset, + setSubmitFailed = _createAll.setSubmitFailed, + setSubmitSucceeded = _createAll.setSubmitSucceeded, + startAsyncValidation = _createAll.startAsyncValidation, + startSubmit = _createAll.startSubmit, + stopAsyncValidation = _createAll.stopAsyncValidation, + stopSubmit = _createAll.stopSubmit, + submit = _createAll.submit, + SubmissionError = _createAll.SubmissionError, + touch = _createAll.touch, + unregisterField = _createAll.unregisterField, + untouch = _createAll.untouch, + values = _createAll.values; + + +/***/ }), +/* 91 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/* harmony default export */ __webpack_exports__["a"] = (eq); + + +/***/ }), +/* 92 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(114); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */](value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ __webpack_exports__["a"] = (toKey); + + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(635)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(295)(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; +}); + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _from = __webpack_require__(304); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } else { + return (0, _from2.default)(arr); + } +}; + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + set: function set(style, key, value) { + style[key] = value; + } +}; + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _RaisedButton = __webpack_require__(747); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _RaisedButton2.default; + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _TextField = __webpack_require__(751); + +var _TextField2 = _interopRequireDefault(_TextField); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _TextField2.default; + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.addHours = addHours; +exports.addMinutes = addMinutes; +exports.addSeconds = addSeconds; +exports.formatTime = formatTime; +exports.rad2deg = rad2deg; +exports.getTouchEventOffsetValues = getTouchEventOffsetValues; +exports.isInner = isInner; +function addHours(d, hours) { + var newDate = clone(d); + newDate.setHours(d.getHours() + hours); + return newDate; +} + +function addMinutes(d, minutes) { + var newDate = clone(d); + newDate.setMinutes(d.getMinutes() + minutes); + return newDate; +} + +function addSeconds(d, seconds) { + var newDate = clone(d); + newDate.setSeconds(d.getMinutes() + seconds); + return newDate; +} + +function clone(d) { + return new Date(d.getTime()); +} + +/** + * @param date [Date] A Date object. + * @param format [String] One of 'ampm', '24hr', defaults to 'ampm'. + * @param pedantic [Boolean] Check time-picker/time-picker.jsx file. + * + * @return String A string representing the formatted time. + */ +function formatTime(date) { + var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'ampm'; + var pedantic = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + if (!date) return ''; + var hours = date.getHours(); + var mins = date.getMinutes().toString(); + + if (format === 'ampm') { + var isAM = hours < 12; + hours = hours % 12; + var additional = isAM ? ' am' : ' pm'; + hours = (hours || 12).toString(); + + if (mins.length < 2) mins = '0' + mins; + + if (pedantic) { + // Treat midday/midnight specially http://www.nist.gov/pml/div688/times.cfm + if (hours === '12' && mins === '00') { + return additional === ' pm' ? '12 noon' : '12 midnight'; + } + } + + return hours + (mins === '00' ? '' : ':' + mins) + additional; + } + + hours = hours.toString(); + + if (hours.length < 2) hours = '0' + hours; + if (mins.length < 2) mins = '0' + mins; + + return hours + ':' + mins; +} + +function rad2deg(rad) { + return rad * 57.29577951308232; +} + +function getTouchEventOffsetValues(event) { + var el = event.target; + var boundingRect = el.getBoundingClientRect(); + + return { + offsetX: event.clientX - boundingRect.left, + offsetY: event.clientY - boundingRect.top + }; +} + +function isInner(props) { + if (props.type !== 'hour') { + return false; + } + return props.value < 1 || props.value > 12; +} + +/***/ }), +/* 99 */ +/***/ (function(module, exports) { + +var id = 0 + , px = Math.random(); +module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + +/***/ }), +/* 100 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var emptyObject = {}; + +if (false) { + Object.freeze(emptyObject); +} + +module.exports = emptyObject; + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var ReactErrorUtils = __webpack_require__(145); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); + +/** + * Injected dependencies: + */ + +/** + * - `ComponentTree`: [required] Module that can convert between React instances + * and actual node references. + */ +var ComponentTree; +var TreeTraversal; +var injection = { + injectComponentTree: function (Injected) { + ComponentTree = Injected; + if (false) { + process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0; + } + }, + injectTreeTraversal: function (Injected) { + TreeTraversal = Injected; + if (false) { + process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0; + } + } +}; + +function isEndish(topLevelType) { + return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel'; +} + +function isMoveish(topLevelType) { + return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove'; +} +function isStartish(topLevelType) { + return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart'; +} + +var validateEventDispatches; +if (false) { + validateEventDispatches = function (event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + + var listenersIsArr = Array.isArray(dispatchListeners); + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; + + var instancesIsArr = Array.isArray(dispatchInstances); + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; + + process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0; + }; +} + +/** + * Dispatch the event to the listener. + * @param {SyntheticEvent} event SyntheticEvent to handle + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @param {function} listener Application-level callback + * @param {*} inst Internal component instance + */ +function executeDispatch(event, simulated, listener, inst) { + var type = event.type || 'unknown-event'; + event.currentTarget = EventPluginUtils.getNodeFromInstance(inst); + if (simulated) { + ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event); + } else { + ReactErrorUtils.invokeGuardedCallback(type, listener, event); + } + event.currentTarget = null; +} + +/** + * Standard/simple iteration through an event's collected dispatches. + */ +function executeDispatchesInOrder(event, simulated) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + if (false) { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and Instances are two parallel arrays that are always in sync. + executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); + } + } else if (dispatchListeners) { + executeDispatch(event, simulated, dispatchListeners, dispatchInstances); + } + event._dispatchListeners = null; + event._dispatchInstances = null; +} + +/** + * Standard/simple iteration through an event's collected dispatches, but stops + * at the first dispatch execution returning true, and returns that id. + * + * @return {?string} id of the first dispatch execution who's listener returns + * true, or null if no listener returned true. + */ +function executeDispatchesInOrderStopAtTrueImpl(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + if (false) { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and Instances are two parallel arrays that are always in sync. + if (dispatchListeners[i](event, dispatchInstances[i])) { + return dispatchInstances[i]; + } + } + } else if (dispatchListeners) { + if (dispatchListeners(event, dispatchInstances)) { + return dispatchInstances; + } + } + return null; +} + +/** + * @see executeDispatchesInOrderStopAtTrueImpl + */ +function executeDispatchesInOrderStopAtTrue(event) { + var ret = executeDispatchesInOrderStopAtTrueImpl(event); + event._dispatchInstances = null; + event._dispatchListeners = null; + return ret; +} + +/** + * Execution of a "direct" dispatch - there must be at most one dispatch + * accumulated on the event or it is considered an error. It doesn't really make + * sense for an event with multiple dispatches (bubbled) to keep track of the + * return values at each dispatch execution, but it does tend to make sense when + * dealing with "direct" dispatches. + * + * @return {*} The return value of executing the single dispatch. + */ +function executeDirectDispatch(event) { + if (false) { + validateEventDispatches(event); + } + var dispatchListener = event._dispatchListeners; + var dispatchInstance = event._dispatchInstances; + !!Array.isArray(dispatchListener) ? false ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0; + event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null; + var res = dispatchListener ? dispatchListener(event) : null; + event.currentTarget = null; + event._dispatchListeners = null; + event._dispatchInstances = null; + return res; +} + +/** + * @param {SyntheticEvent} event + * @return {boolean} True iff number of dispatches accumulated is greater than 0. + */ +function hasDispatches(event) { + return !!event._dispatchListeners; +} + +/** + * General utilities that are useful in creating custom Event Plugins. + */ +var EventPluginUtils = { + isEndish: isEndish, + isMoveish: isMoveish, + isStartish: isStartish, + + executeDirectDispatch: executeDirectDispatch, + executeDispatchesInOrder: executeDispatchesInOrder, + executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, + hasDispatches: hasDispatches, + + getInstanceFromNode: function (node) { + return ComponentTree.getInstanceFromNode(node); + }, + getNodeFromInstance: function (node) { + return ComponentTree.getNodeFromInstance(node); + }, + isAncestor: function (a, b) { + return TreeTraversal.isAncestor(a, b); + }, + getLowestCommonAncestor: function (a, b) { + return TreeTraversal.getLowestCommonAncestor(a, b); + }, + getParentInstance: function (inst) { + return TreeTraversal.getParentInstance(inst); + }, + traverseTwoPhase: function (target, fn, arg) { + return TreeTraversal.traverseTwoPhase(target, fn, arg); + }, + traverseEnterLeave: function (from, to, fn, argFrom, argTo) { + return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo); + }, + + injection: injection +}; + +module.exports = EventPluginUtils; + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var invariant = __webpack_require__(9); + +var OBSERVED_ERROR = {}; + +/** + * `Transaction` creates a black box that is able to wrap any method such that + * certain invariants are maintained before and after the method is invoked + * (Even if an exception is thrown while invoking the wrapped method). Whoever + * instantiates a transaction can provide enforcers of the invariants at + * creation time. The `Transaction` class itself will supply one additional + * automatic invariant for you - the invariant that any transaction instance + * should not be run while it is already being run. You would typically create a + * single instance of a `Transaction` for reuse multiple times, that potentially + * is used to wrap several different methods. Wrappers are extremely simple - + * they only require implementing two methods. + * + * <pre> + * wrappers (injected at creation time) + * + + + * | | + * +-----------------|--------|--------------+ + * | v | | + * | +---------------+ | | + * | +--| wrapper1 |---|----+ | + * | | +---------------+ v | | + * | | +-------------+ | | + * | | +----| wrapper2 |--------+ | + * | | | +-------------+ | | | + * | | | | | | + * | v v v v | wrapper + * | +---+ +---+ +---------+ +---+ +---+ | invariants + * perform(anyMethod) | | | | | | | | | | | | maintained + * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|--------> + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * | +---+ +---+ +---------+ +---+ +---+ | + * | initialize close | + * +-----------------------------------------+ + * </pre> + * + * Use cases: + * - Preserving the input selection ranges before/after reconciliation. + * Restoring selection even in the event of an unexpected error. + * - Deactivating events while rearranging the DOM, preventing blurs/focuses, + * while guaranteeing that afterwards, the event system is reactivated. + * - Flushing a queue of collected DOM mutations to the main UI thread after a + * reconciliation takes place in a worker thread. + * - Invoking any collected `componentDidUpdate` callbacks after rendering new + * content. + * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue + * to preserve the `scrollTop` (an automatic scroll aware DOM). + * - (Future use case): Layout calculations before and after DOM updates. + * + * Transactional plugin API: + * - A module that has an `initialize` method that returns any precomputation. + * - and a `close` method that accepts the precomputation. `close` is invoked + * when the wrapped process is completed, or has failed. + * + * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules + * that implement `initialize` and `close`. + * @return {Transaction} Single transaction for reuse in thread. + * + * @class Transaction + */ +var TransactionImpl = { + /** + * Sets up this instance so that it is prepared for collecting metrics. Does + * so such that this setup method may be used on an instance that is already + * initialized, in a way that does not consume additional memory upon reuse. + * That can be useful if you decide to make your subclass of this mixin a + * "PooledClass". + */ + reinitializeTransaction: function () { + this.transactionWrappers = this.getTransactionWrappers(); + if (this.wrapperInitData) { + this.wrapperInitData.length = 0; + } else { + this.wrapperInitData = []; + } + this._isInTransaction = false; + }, + + _isInTransaction: false, + + /** + * @abstract + * @return {Array<TransactionWrapper>} Array of transaction wrappers. + */ + getTransactionWrappers: null, + + isInTransaction: function () { + return !!this._isInTransaction; + }, + + /** + * Executes the function within a safety window. Use this for the top level + * methods that result in large amounts of computation/mutations that would + * need to be safety checked. The optional arguments helps prevent the need + * to bind in many cases. + * + * @param {function} method Member of scope to call. + * @param {Object} scope Scope to invoke from. + * @param {Object?=} a Argument to pass to the method. + * @param {Object?=} b Argument to pass to the method. + * @param {Object?=} c Argument to pass to the method. + * @param {Object?=} d Argument to pass to the method. + * @param {Object?=} e Argument to pass to the method. + * @param {Object?=} f Argument to pass to the method. + * + * @return {*} Return value from `method`. + */ + perform: function (method, scope, a, b, c, d, e, f) { + !!this.isInTransaction() ? false ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0; + var errorThrown; + var ret; + try { + this._isInTransaction = true; + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // one of these calls threw. + errorThrown = true; + this.initializeAll(0); + ret = method.call(scope, a, b, c, d, e, f); + errorThrown = false; + } finally { + try { + if (errorThrown) { + // If `method` throws, prefer to show that stack trace over any thrown + // by invoking `closeAll`. + try { + this.closeAll(0); + } catch (err) {} + } else { + // Since `method` didn't throw, we don't want to silence the exception + // here. + this.closeAll(0); + } + } finally { + this._isInTransaction = false; + } + } + return ret; + }, + + initializeAll: function (startIndex) { + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + try { + // Catching errors makes debugging more difficult, so we start with the + // OBSERVED_ERROR state before overwriting it with the real return value + // of initialize -- if it's still set to OBSERVED_ERROR in the finally + // block, it means wrapper.initialize threw. + this.wrapperInitData[i] = OBSERVED_ERROR; + this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; + } finally { + if (this.wrapperInitData[i] === OBSERVED_ERROR) { + // The initializer for wrapper i threw an error; initialize the + // remaining wrappers but silence any exceptions from them to ensure + // that the first error is the one to bubble up. + try { + this.initializeAll(i + 1); + } catch (err) {} + } + } + } + }, + + /** + * Invokes each of `this.transactionWrappers.close[i]` functions, passing into + * them the respective return values of `this.transactionWrappers.init[i]` + * (`close`rs that correspond to initializers that failed will not be + * invoked). + */ + closeAll: function (startIndex) { + !this.isInTransaction() ? false ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0; + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + var initData = this.wrapperInitData[i]; + var errorThrown; + try { + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // wrapper.close threw. + errorThrown = true; + if (initData !== OBSERVED_ERROR && wrapper.close) { + wrapper.close.call(this, initData); + } + errorThrown = false; + } finally { + if (errorThrown) { + // The closer for wrapper i threw an error; close the remaining + // wrappers but silence any exceptions from them to ensure that the + // first error is the one to bubble up. + try { + this.closeAll(i + 1); + } catch (e) {} + } + } + } + this.wrapperInitData.length = 0; + } +}; + +module.exports = TransactionImpl; + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticUIEvent = __webpack_require__(73); +var ViewportMetrics = __webpack_require__(148); + +var getEventModifierState = __webpack_require__(149); + +/** + * @interface MouseEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var MouseEventInterface = { + screenX: null, + screenY: null, + clientX: null, + clientY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: function (event) { + // Webkit, Firefox, IE9+ + // which: 1 2 3 + // button: 0 1 2 (standard) + var button = event.button; + if ('which' in event) { + return button; + } + // IE<9 + // which: undefined + // button: 0 0 0 + // button: 1 4 2 (onmouseup) + return button === 2 ? 2 : button === 4 ? 1 : 0; + }, + buttons: null, + relatedTarget: function (event) { + return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement); + }, + // "Proprietary" Interface. + pageX: function (event) { + return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft; + }, + pageY: function (event) { + return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); + +module.exports = SyntheticMouseEvent; + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(22); +var DOMNamespaces = __webpack_require__(151); + +var WHITESPACE_TEST = /^[ \r\n\t\f]/; +var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; + +var createMicrosoftUnsafeLocalFunction = __webpack_require__(152); + +// SVG temp container for IE lacking innerHTML +var reusableSVGContainer; + +/** + * Set the innerHTML property of a node, ensuring that whitespace is preserved + * even in IE8. + * + * @param {DOMElement} node + * @param {string} html + * @internal + */ +var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { + // IE does not have innerHTML for SVG nodes, so instead we inject the + // new markup in a temp node and then move the child nodes across into + // the target node + if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) { + reusableSVGContainer = reusableSVGContainer || document.createElement('div'); + reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>'; + var svgNode = reusableSVGContainer.firstChild; + while (svgNode.firstChild) { + node.appendChild(svgNode.firstChild); + } + } else { + node.innerHTML = html; + } +}); + +if (ExecutionEnvironment.canUseDOM) { + // IE8: When updating a just created node with innerHTML only leading + // whitespace is removed. When updating an existing node with innerHTML + // whitespace in root TextNodes is also collapsed. + // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html + + // Feature detection; only IE8 is known to behave improperly like this. + var testElement = document.createElement('div'); + testElement.innerHTML = ' '; + if (testElement.innerHTML === '') { + setInnerHTML = function (node, html) { + // Magic theory: IE8 supposedly differentiates between added and updated + // nodes when processing innerHTML, innerHTML on updated nodes suffers + // from worse whitespace behavior. Re-adding a node like this triggers + // the initial and more favorable whitespace behavior. + // TODO: What to do on a detached node? + if (node.parentNode) { + node.parentNode.replaceChild(node, node); + } + + // We also implement a workaround for non-visible tags disappearing into + // thin air on IE8, this only happens if there is no visible text + // in-front of the non-visible tags. Piggyback on the whitespace fix + // and simply check if any non-visible tags appear in the source. + if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) { + // Recover leading whitespace by temporarily prepending any character. + // \uFEFF has the potential advantage of being zero-width/invisible. + // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode + // in hopes that this is preserved even if "\uFEFF" is transformed to + // the actual Unicode character (by Babel, for example). + // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 + node.innerHTML = String.fromCharCode(0xFEFF) + html; + + // deleteData leaves an empty `TextNode` which offsets the index of all + // children. Definitely want to avoid this. + var textNode = node.firstChild; + if (textNode.data.length === 1) { + node.removeChild(textNode); + } else { + textNode.deleteData(0, 1); + } + } else { + node.innerHTML = html; + } + }; + } + testElement = null; +} + +module.exports = setInnerHTML; + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * Based on the escape-html library, which is used under the MIT License below: + * + * Copyright (c) 2012-2013 TJ Holowaychuk + * Copyright (c) 2015 Andreas Lubbe + * Copyright (c) 2015 Tiancheng "Timothy" Gu + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * 'Software'), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + + + +// code copied and modified from escape-html +/** + * Module variables. + * @private + */ + +var matchHtmlRegExp = /["'&<>]/; + +/** + * Escape special characters in the given string of html. + * + * @param {string} string The string to escape for inserting into HTML + * @return {string} + * @public + */ + +function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index = 0; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + case 38: + // & + escape = '&'; + break; + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + break; + case 60: + // < + escape = '<'; + break; + case 62: + // > + escape = '>'; + break; + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; +} +// end code copied and modified from escape-html + + +/** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ +function escapeTextContentForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + return escapeHtml(text); +} + +module.exports = escapeTextContentForBrowser; + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var EventPluginRegistry = __webpack_require__(144); +var ReactEventEmitterMixin = __webpack_require__(384); +var ViewportMetrics = __webpack_require__(148); + +var getVendorPrefixedEventName = __webpack_require__(385); +var isEventSupported = __webpack_require__(147); + +/** + * Summary of `ReactBrowserEventEmitter` event handling: + * + * - Top-level delegation is used to trap most native browser events. This + * may only occur in the main thread and is the responsibility of + * ReactEventListener, which is injected and can therefore support pluggable + * event sources. This is the only work that occurs in the main thread. + * + * - We normalize and de-duplicate events to account for browser quirks. This + * may be done in the worker thread. + * + * - Forward these native events (with the associated top-level type used to + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want + * to extract any synthetic events. + * + * - The `EventPluginHub` will then process each event by annotating them with + * "dispatches", a sequence of listeners and IDs that care about that event. + * + * - The `EventPluginHub` then dispatches the events. + * + * Overview of React and the event system: + * + * +------------+ . + * | DOM | . + * +------------+ . + * | . + * v . + * +------------+ . + * | ReactEvent | . + * | Listener | . + * +------------+ . +-----------+ + * | . +--------+|SimpleEvent| + * | . | |Plugin | + * +-----|------+ . v +-----------+ + * | | | . +--------------+ +------------+ + * | +-----------.--->|EventPluginHub| | Event | + * | | . | | +-----------+ | Propagators| + * | ReactEvent | . | | |TapEvent | |------------| + * | Emitter | . | |<---+|Plugin | |other plugin| + * | | . | | +-----------+ | utilities | + * | +-----------.--->| | +------------+ + * | | | . +--------------+ + * +-----|------+ . ^ +-----------+ + * | . | |Enter/Leave| + * + . +-------+|Plugin | + * +-------------+ . +-----------+ + * | application | . + * |-------------| . + * | | . + * | | . + * +-------------+ . + * . + * React Core . General Purpose Event Plugin System + */ + +var hasEventPageXY; +var alreadyListeningTo = {}; +var isMonitoringScrollValue = false; +var reactTopListenersCounter = 0; + +// For events like 'submit' which don't consistently bubble (which we trap at a +// lower node than `document`), binding at `document` would cause duplicate +// events so we don't include them here +var topEventMapping = { + topAbort: 'abort', + topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend', + topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration', + topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart', + topBlur: 'blur', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topChange: 'change', + topClick: 'click', + topCompositionEnd: 'compositionend', + topCompositionStart: 'compositionstart', + topCompositionUpdate: 'compositionupdate', + topContextMenu: 'contextmenu', + topCopy: 'copy', + topCut: 'cut', + topDoubleClick: 'dblclick', + topDrag: 'drag', + topDragEnd: 'dragend', + topDragEnter: 'dragenter', + topDragExit: 'dragexit', + topDragLeave: 'dragleave', + topDragOver: 'dragover', + topDragStart: 'dragstart', + topDrop: 'drop', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topFocus: 'focus', + topInput: 'input', + topKeyDown: 'keydown', + topKeyPress: 'keypress', + topKeyUp: 'keyup', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topMouseDown: 'mousedown', + topMouseMove: 'mousemove', + topMouseOut: 'mouseout', + topMouseOver: 'mouseover', + topMouseUp: 'mouseup', + topPaste: 'paste', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topScroll: 'scroll', + topSeeked: 'seeked', + topSeeking: 'seeking', + topSelectionChange: 'selectionchange', + topStalled: 'stalled', + topSuspend: 'suspend', + topTextInput: 'textInput', + topTimeUpdate: 'timeupdate', + topTouchCancel: 'touchcancel', + topTouchEnd: 'touchend', + topTouchMove: 'touchmove', + topTouchStart: 'touchstart', + topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend', + topVolumeChange: 'volumechange', + topWaiting: 'waiting', + topWheel: 'wheel' +}; + +/** + * To ensure no conflicts with other potential React instances on the page + */ +var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2); + +function getListeningForDocument(mountAt) { + // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` + // directly. + if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { + mountAt[topListenersIDKey] = reactTopListenersCounter++; + alreadyListeningTo[mountAt[topListenersIDKey]] = {}; + } + return alreadyListeningTo[mountAt[topListenersIDKey]]; +} + +/** + * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For + * example: + * + * EventPluginHub.putListener('myID', 'onClick', myFunction); + * + * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'. + * + * @internal + */ +var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { + + /** + * Injectable event backend + */ + ReactEventListener: null, + + injection: { + /** + * @param {object} ReactEventListener + */ + injectReactEventListener: function (ReactEventListener) { + ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel); + ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; + } + }, + + /** + * Sets whether or not any created callbacks should be enabled. + * + * @param {boolean} enabled True if callbacks should be enabled. + */ + setEnabled: function (enabled) { + if (ReactBrowserEventEmitter.ReactEventListener) { + ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); + } + }, + + /** + * @return {boolean} True if callbacks are enabled. + */ + isEnabled: function () { + return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled()); + }, + + /** + * We listen for bubbled touch events on the document object. + * + * Firefox v8.01 (and possibly others) exhibited strange behavior when + * mounting `onmousemove` events at some node that was not the document + * element. The symptoms were that if your mouse is not moving over something + * contained within that mount point (for example on the background) the + * top-level listeners for `onmousemove` won't be called. However, if you + * register the `mousemove` on the document object, then it will of course + * catch all `mousemove`s. This along with iOS quirks, justifies restricting + * top-level listeners to the document object only, at least for these + * movement types of events and possibly all events. + * + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + * + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but + * they bubble to document. + * + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {object} contentDocumentHandle Document which owns the container + */ + listenTo: function (registrationName, contentDocumentHandle) { + var mountAt = contentDocumentHandle; + var isListening = getListeningForDocument(mountAt); + var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { + if (dependency === 'topWheel') { + if (isEventSupported('wheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt); + } else if (isEventSupported('mousewheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt); + } else { + // Firefox needs to capture a different mouse scroll event. + // @see http://www.quirksmode.org/dom/events/tests/scroll.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt); + } + } else if (dependency === 'topScroll') { + + if (isEventSupported('scroll', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt); + } else { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); + } + } else if (dependency === 'topFocus' || dependency === 'topBlur') { + + if (isEventSupported('focus', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt); + } else if (isEventSupported('focusin')) { + // IE has `focusin` and `focusout` events which bubble. + // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt); + } + + // to make sure blur and focus event listeners are only attached once + isListening.topBlur = true; + isListening.topFocus = true; + } else if (topEventMapping.hasOwnProperty(dependency)) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt); + } + + isListening[dependency] = true; + } + } + }, + + trapBubbledEvent: function (topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle); + }, + + trapCapturedEvent: function (topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle); + }, + + /** + * Protect against document.createEvent() returning null + * Some popup blocker extensions appear to do this: + * https://github.com/facebook/react/issues/6887 + */ + supportsEventPageXY: function () { + if (!document.createEvent) { + return false; + } + var ev = document.createEvent('MouseEvent'); + return ev != null && 'pageX' in ev; + }, + + /** + * Listens to window scroll and resize events. We cache scroll values so that + * application code can access them without triggering reflows. + * + * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when + * pageX/pageY isn't supported (legacy browsers). + * + * NOTE: Scroll events do not bubble. + * + * @see http://www.quirksmode.org/dom/events/scroll.html + */ + ensureScrollValueMonitoring: function () { + if (hasEventPageXY === undefined) { + hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY(); + } + if (!hasEventPageXY && !isMonitoringScrollValue) { + var refresh = ViewportMetrics.refreshScrollValues; + ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); + isMonitoringScrollValue = true; + } + } + +}); + +module.exports = ReactBrowserEventEmitter; + +/***/ }), +/* 108 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +/** + * Indicates that navigation was caused by a call to history.push. + */ +var PUSH = exports.PUSH = 'PUSH'; + +/** + * Indicates that navigation was caused by a call to history.replace. + */ +var REPLACE = exports.REPLACE = 'REPLACE'; + +/** + * Indicates that navigation was caused by some other action such + * as using a browser's back/forward buttons and/or manually manipulating + * the URL in a browser's location bar. This is the default. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate + * for more information. + */ +var POP = exports.POP = 'POP'; + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var addEventListener = exports.addEventListener = function addEventListener(node, event, listener) { + return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener); +}; + +var removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) { + return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener); +}; + +/** + * Returns true if the HTML5 history API is supported. Taken from Modernizr. + * + * https://github.com/Modernizr/Modernizr/blob/master/LICENSE + * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js + * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 + */ +var supportsHistory = exports.supportsHistory = function supportsHistory() { + var ua = window.navigator.userAgent; + + if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false; + + return window.history && 'pushState' in window.history; +}; + +/** + * Returns false if using go(n) with hash history causes a full page reload. + */ +var supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() { + return window.navigator.userAgent.indexOf('Firefox') === -1; +}; + +/** + * Returns true if browser fires popstate on hash change. + * IE10 and IE11 do not. + */ +var supportsPopstateOnHashchange = exports.supportsPopstateOnHashchange = function supportsPopstateOnHashchange() { + return window.navigator.userAgent.indexOf('Trident') === -1; +}; + +/***/ }), +/* 111 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(256); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(460); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(461); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(462); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(262); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(261); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["b"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_4__compose__["a"]; }); + + + + + + + +/* +* This is a dummy function to check if the function name has been altered by minification. +* If the function has been minified and NODE_ENV !== 'production', warn the user. +*/ +function isCrushed() {} + +if (false) { + warning('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.'); +} + + + +/***/ }), +/* 112 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29); + + +/** Built-in value references. */ +var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; + +/* harmony default export */ __webpack_exports__["a"] = (Symbol); + + +/***/ }), +/* 113 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(269); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyArray_js__ = __webpack_require__(270); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(114); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringToPath_js__ = __webpack_require__(271); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(92); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toString_js__ = __webpack_require__(273); + + + + + + + + +/** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ +function toPath(value) { + if (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value)) { + return __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */](value, __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */]); + } + return __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */](value) ? [value] : __WEBPACK_IMPORTED_MODULE_1__copyArray_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_4__stringToPath_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_6__toString_js__["a" /* default */](value))); +} + +/* harmony default export */ __webpack_exports__["a"] = (toPath); + + +/***/ }), +/* 114 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(55); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) == symbolTag); +} + +/* harmony default export */ __webpack_exports__["a"] = (isSymbol); + + +/***/ }), +/* 115 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(56); + + +/* Built-in method references that are verified to be native. */ +var nativeCreate = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](Object, 'create'); + +/* harmony default export */ __webpack_exports__["a"] = (nativeCreate); + + +/***/ }), +/* 116 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__ = __webpack_require__(506); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__ = __webpack_require__(507); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__ = __webpack_require__(508); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__ = __webpack_require__(509); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__ = __webpack_require__(510); + + + + + + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__["a" /* default */]; +ListCache.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__["a" /* default */]; +ListCache.prototype.get = __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__["a" /* default */]; +ListCache.prototype.has = __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__["a" /* default */]; +ListCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (ListCache); + + +/***/ }), +/* 117 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(91); + + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */](array[length][0], key)) { + return length; + } + } + return -1; +} + +/* harmony default export */ __webpack_exports__["a"] = (assocIndexOf); + + +/***/ }), +/* 118 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__ = __webpack_require__(512); + + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__["a" /* default */](key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/* harmony default export */ __webpack_exports__["a"] = (getMapData); + + +/***/ }), +/* 119 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__(275); + + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */]) { + __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */](object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +/* harmony default export */ __webpack_exports__["a"] = (baseAssignValue); + + +/***/ }), +/* 120 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(180); + + + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && __WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */](value.length) && !__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isArrayLike); + + +/***/ }), +/* 121 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = formatName; +function formatName(context, name) { + var sectionPrefix = context._reduxForm.sectionPrefix; + + return !sectionPrefix ? name : sectionPrefix + "." + name; +} + +/***/ }), +/* 122 */ +/***/ (function(module, exports) { + +module.exports = true; + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(33).f + , has = __webpack_require__(50) + , TAG = __webpack_require__(23)('toStringTag'); + +module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); +}; + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(638); +var global = __webpack_require__(25) + , hide = __webpack_require__(49) + , Iterators = __webpack_require__(80) + , TO_STRING_TAG = __webpack_require__(23)('toStringTag'); + +for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype; + if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _toConsumableArray2 = __webpack_require__(94); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +exports.default = getMuiTheme; + +var _lodash = __webpack_require__(667); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _colorManipulator = __webpack_require__(58); + +var _lightBaseTheme = __webpack_require__(308); + +var _lightBaseTheme2 = _interopRequireDefault(_lightBaseTheme); + +var _zIndex = __webpack_require__(309); + +var _zIndex2 = _interopRequireDefault(_zIndex); + +var _autoprefixer = __webpack_require__(668); + +var _autoprefixer2 = _interopRequireDefault(_autoprefixer); + +var _callOnce = __webpack_require__(697); + +var _callOnce2 = _interopRequireDefault(_callOnce); + +var _rtl = __webpack_require__(698); + +var _rtl2 = _interopRequireDefault(_rtl); + +var _compose = __webpack_require__(701); + +var _compose2 = _interopRequireDefault(_compose); + +var _typography = __webpack_require__(313); + +var _typography2 = _interopRequireDefault(_typography); + +var _colors = __webpack_require__(47); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Get the MUI theme corresponding to a base theme. + * It's possible to override the computed theme values + * by providing a second argument. The calculated + * theme will be deeply merged with the second argument. + */ +function getMuiTheme(muiTheme) { + for (var _len = arguments.length, more = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + more[_key - 1] = arguments[_key]; + } + + muiTheme = _lodash2.default.apply(undefined, [{ + zIndex: _zIndex2.default, + isRtl: false, + userAgent: undefined + }, _lightBaseTheme2.default, muiTheme].concat(more)); + + var _muiTheme = muiTheme, + spacing = _muiTheme.spacing, + fontFamily = _muiTheme.fontFamily, + palette = _muiTheme.palette; + + var baseTheme = { spacing: spacing, fontFamily: fontFamily, palette: palette }; + + muiTheme = (0, _lodash2.default)({ + appBar: { + color: palette.primary1Color, + textColor: palette.alternateTextColor, + height: spacing.desktopKeylineIncrement, + titleFontWeight: _typography2.default.fontWeightNormal, + padding: spacing.desktopGutter + }, + avatar: { + color: palette.canvasColor, + backgroundColor: (0, _colorManipulator.emphasize)(palette.canvasColor, 0.26) + }, + badge: { + color: palette.alternateTextColor, + textColor: palette.textColor, + primaryColor: palette.primary1Color, + primaryTextColor: palette.alternateTextColor, + secondaryColor: palette.accent1Color, + secondaryTextColor: palette.alternateTextColor, + fontWeight: _typography2.default.fontWeightMedium + }, + bottomNavigation: { + backgroundColor: palette.canvasColor, + unselectedColor: (0, _colorManipulator.fade)(palette.textColor, 0.54), + selectedColor: palette.primary1Color, + height: 56, + unselectedFontSize: 12, + selectedFontSize: 14 + }, + button: { + height: 36, + minWidth: 88, + iconButtonSize: spacing.iconSize * 2 + }, + card: { + titleColor: (0, _colorManipulator.fade)(palette.textColor, 0.87), + subtitleColor: (0, _colorManipulator.fade)(palette.textColor, 0.54), + fontWeight: _typography2.default.fontWeightMedium + }, + cardMedia: { + color: _colors.darkWhite, + overlayContentBackground: _colors.lightBlack, + titleColor: _colors.darkWhite, + subtitleColor: _colors.lightWhite + }, + cardText: { + textColor: palette.textColor + }, + checkbox: { + boxColor: palette.textColor, + checkedColor: palette.primary1Color, + requiredColor: palette.primary1Color, + disabledColor: palette.disabledColor, + labelColor: palette.textColor, + labelDisabledColor: palette.disabledColor + }, + chip: { + backgroundColor: (0, _colorManipulator.emphasize)(palette.canvasColor, 0.12), + deleteIconColor: (0, _colorManipulator.fade)(palette.textColor, 0.26), + textColor: (0, _colorManipulator.fade)(palette.textColor, 0.87), + fontSize: 14, + fontWeight: _typography2.default.fontWeightNormal, + shadow: '0 1px 6px ' + (0, _colorManipulator.fade)(palette.shadowColor, 0.12) + ',\n 0 1px 4px ' + (0, _colorManipulator.fade)(palette.shadowColor, 0.12) + }, + datePicker: { + color: palette.primary1Color, + textColor: palette.alternateTextColor, + calendarTextColor: palette.textColor, + selectColor: palette.primary2Color, + selectTextColor: palette.alternateTextColor, + calendarYearBackgroundColor: palette.canvasColor + }, + dialog: { + titleFontSize: 22, + bodyFontSize: 16, + bodyColor: (0, _colorManipulator.fade)(palette.textColor, 0.6) + }, + dropDownMenu: { + accentColor: palette.borderColor + }, + enhancedButton: { + tapHighlightColor: _colors.transparent + }, + flatButton: { + color: _colors.transparent, + buttonFilterColor: '#999999', + disabledTextColor: (0, _colorManipulator.fade)(palette.textColor, 0.3), + textColor: palette.textColor, + primaryTextColor: palette.primary1Color, + secondaryTextColor: palette.accent1Color, + fontSize: _typography2.default.fontStyleButtonFontSize, + fontWeight: _typography2.default.fontWeightMedium + }, + floatingActionButton: { + buttonSize: 56, + miniSize: 40, + color: palette.primary1Color, + iconColor: palette.alternateTextColor, + secondaryColor: palette.accent1Color, + secondaryIconColor: palette.alternateTextColor, + disabledTextColor: palette.disabledColor, + disabledColor: (0, _colorManipulator.emphasize)(palette.canvasColor, 0.12) + }, + gridTile: { + textColor: _colors.white + }, + icon: { + color: palette.canvasColor, + backgroundColor: palette.primary1Color + }, + inkBar: { + backgroundColor: palette.accent1Color + }, + drawer: { + width: spacing.desktopKeylineIncrement * 4, + color: palette.canvasColor + }, + listItem: { + nestedLevelDepth: 18, + secondaryTextColor: palette.secondaryTextColor, + leftIconColor: _colors.grey600, + rightIconColor: _colors.grey600 + }, + menu: { + backgroundColor: palette.canvasColor, + containerBackgroundColor: palette.canvasColor + }, + menuItem: { + dataHeight: 32, + height: 48, + hoverColor: (0, _colorManipulator.fade)(palette.textColor, 0.1), + padding: spacing.desktopGutter, + selectedTextColor: palette.accent1Color, + rightIconDesktopFill: _colors.grey600 + }, + menuSubheader: { + padding: spacing.desktopGutter, + borderColor: palette.borderColor, + textColor: palette.primary1Color + }, + overlay: { + backgroundColor: _colors.lightBlack + }, + paper: { + color: palette.textColor, + backgroundColor: palette.canvasColor, + zDepthShadows: [[1, 6, 0.12, 1, 4, 0.12], [3, 10, 0.16, 3, 10, 0.23], [10, 30, 0.19, 6, 10, 0.23], [14, 45, 0.25, 10, 18, 0.22], [19, 60, 0.30, 15, 20, 0.22]].map(function (d) { + return '0 ' + d[0] + 'px ' + d[1] + 'px ' + (0, _colorManipulator.fade)(palette.shadowColor, d[2]) + ',\n 0 ' + d[3] + 'px ' + d[4] + 'px ' + (0, _colorManipulator.fade)(palette.shadowColor, d[5]); + }) + }, + radioButton: { + borderColor: palette.textColor, + backgroundColor: palette.alternateTextColor, + checkedColor: palette.primary1Color, + requiredColor: palette.primary1Color, + disabledColor: palette.disabledColor, + size: 24, + labelColor: palette.textColor, + labelDisabledColor: palette.disabledColor + }, + raisedButton: { + color: palette.alternateTextColor, + textColor: palette.textColor, + primaryColor: palette.primary1Color, + primaryTextColor: palette.alternateTextColor, + secondaryColor: palette.accent1Color, + secondaryTextColor: palette.alternateTextColor, + disabledColor: (0, _colorManipulator.darken)(palette.alternateTextColor, 0.1), + disabledTextColor: (0, _colorManipulator.fade)(palette.textColor, 0.3), + fontSize: _typography2.default.fontStyleButtonFontSize, + fontWeight: _typography2.default.fontWeightMedium + }, + refreshIndicator: { + strokeColor: palette.borderColor, + loadingStrokeColor: palette.primary1Color + }, + ripple: { + color: (0, _colorManipulator.fade)(palette.textColor, 0.87) + }, + slider: { + trackSize: 2, + trackColor: palette.primary3Color, + trackColorSelected: palette.accent3Color, + handleSize: 12, + handleSizeDisabled: 8, + handleSizeActive: 18, + handleColorZero: palette.primary3Color, + handleFillColor: palette.alternateTextColor, + selectionColor: palette.primary1Color, + rippleColor: palette.primary1Color + }, + snackbar: { + textColor: palette.alternateTextColor, + backgroundColor: palette.textColor, + actionColor: palette.accent1Color + }, + subheader: { + color: (0, _colorManipulator.fade)(palette.textColor, 0.54), + fontWeight: _typography2.default.fontWeightMedium + }, + stepper: { + backgroundColor: 'transparent', + hoverBackgroundColor: (0, _colorManipulator.fade)(_colors.black, 0.06), + iconColor: palette.primary1Color, + hoveredIconColor: _colors.grey700, + inactiveIconColor: _colors.grey500, + textColor: (0, _colorManipulator.fade)(_colors.black, 0.87), + disabledTextColor: (0, _colorManipulator.fade)(_colors.black, 0.26), + connectorLineColor: _colors.grey400 + }, + svgIcon: { + color: palette.textColor + }, + table: { + backgroundColor: palette.canvasColor + }, + tableFooter: { + borderColor: palette.borderColor, + textColor: palette.accent3Color + }, + tableHeader: { + borderColor: palette.borderColor + }, + tableHeaderColumn: { + textColor: palette.accent3Color, + height: 56, + spacing: 24 + }, + tableRow: { + hoverColor: palette.accent2Color, + stripeColor: (0, _colorManipulator.fade)((0, _colorManipulator.lighten)(palette.primary1Color, 0.5), 0.4), + selectedColor: palette.borderColor, + textColor: palette.textColor, + borderColor: palette.borderColor, + height: 48 + }, + tableRowColumn: { + height: 48, + spacing: 24 + }, + tabs: { + backgroundColor: palette.primary1Color, + textColor: (0, _colorManipulator.fade)(palette.alternateTextColor, 0.7), + selectedTextColor: palette.alternateTextColor + }, + textField: { + textColor: palette.textColor, + hintColor: palette.disabledColor, + floatingLabelColor: palette.disabledColor, + disabledTextColor: palette.disabledColor, + errorColor: _colors.red500, + focusColor: palette.primary1Color, + backgroundColor: 'transparent', + borderColor: palette.borderColor + }, + timePicker: { + color: palette.alternateTextColor, + textColor: palette.alternateTextColor, + accentColor: palette.primary1Color, + clockColor: palette.textColor, + clockCircleColor: palette.clockCircleColor, + headerColor: palette.pickerHeaderColor || palette.primary1Color, + selectColor: palette.primary2Color, + selectTextColor: palette.alternateTextColor + }, + toggle: { + thumbOnColor: palette.primary1Color, + thumbOffColor: palette.accent2Color, + thumbDisabledColor: palette.borderColor, + thumbRequiredColor: palette.primary1Color, + trackOnColor: (0, _colorManipulator.fade)(palette.primary1Color, 0.5), + trackOffColor: palette.primary3Color, + trackDisabledColor: palette.primary3Color, + labelColor: palette.textColor, + labelDisabledColor: palette.disabledColor, + trackRequiredColor: (0, _colorManipulator.fade)(palette.primary1Color, 0.5) + }, + toolbar: { + color: (0, _colorManipulator.fade)(palette.textColor, 0.54), + hoverColor: (0, _colorManipulator.fade)(palette.textColor, 0.87), + backgroundColor: (0, _colorManipulator.darken)(palette.accent2Color, 0.05), + height: 56, + titleFontSize: 20, + iconColor: (0, _colorManipulator.fade)(palette.textColor, 0.4), + separatorColor: (0, _colorManipulator.fade)(palette.textColor, 0.175), + menuHoverColor: (0, _colorManipulator.fade)(palette.textColor, 0.1) + }, + tooltip: { + color: _colors.white, + rippleBackgroundColor: _colors.grey700 + } + }, muiTheme, { + baseTheme: baseTheme, // To provide backward compatibility. + rawTheme: baseTheme }); + + var transformers = [_autoprefixer2.default, _rtl2.default, _callOnce2.default].map(function (t) { + return t(muiTheme); + }).filter(function (t) { + return t; + }); + + muiTheme.prepareStyles = _compose2.default.apply(undefined, (0, _toConsumableArray3.default)(transformers)); + + return muiTheme; +} + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// returns a style object with a single concated prefixed value string + +exports.default = function (property, value) { + var replacer = arguments.length <= 2 || arguments[2] === undefined ? function (prefix, value) { + return prefix + value; + } : arguments[2]; + return _defineProperty({}, property, ['-webkit-', '-moz-', ''].map(function (prefix) { + return replacer(prefix, value); + })); +}; + +module.exports = exports['default']; + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createChildFragment = createChildFragment; +exports.extendChildren = extendChildren; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactAddonsCreateFragment = __webpack_require__(705); + +var _reactAddonsCreateFragment2 = _interopRequireDefault(_reactAddonsCreateFragment); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function createChildFragment(fragments) { + var newFragments = {}; + var validChildrenCount = 0; + var firstKey = void 0; + + // Only create non-empty key fragments + for (var key in fragments) { + var currentChild = fragments[key]; + + if (currentChild) { + if (validChildrenCount === 0) firstKey = key; + newFragments[key] = currentChild; + validChildrenCount++; + } + } + + if (validChildrenCount === 0) return undefined; + if (validChildrenCount === 1) return newFragments[firstKey]; + return (0, _reactAddonsCreateFragment2.default)(newFragments); +} + +function extendChildren(children, extendedProps, extendedChildren) { + return _react2.default.Children.map(children, function (child) { + if (!_react2.default.isValidElement(child)) { + return child; + } + + var newProps = typeof extendedProps === 'function' ? extendedProps(child) : extendedProps; + + var newChildren = typeof extendedChildren === 'function' ? extendedChildren(child) : extendedChildren ? extendedChildren : child.props.children; + + return _react2.default.cloneElement(child, newProps, newChildren); + }); +} + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(708); + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _MenuItem = __webpack_require__(324); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _MenuItem2.default; + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactEventListener = __webpack_require__(39); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _RenderToLayer = __webpack_require__(325); + +var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer); + +var _propTypes = __webpack_require__(38); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _Paper = __webpack_require__(31); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _lodash = __webpack_require__(742); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _PopoverAnimationDefault = __webpack_require__(743); + +var _PopoverAnimationDefault2 = _interopRequireDefault(_PopoverAnimationDefault); + +var _iOSHelpers = __webpack_require__(744); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + root: { + display: 'none' + } +}; + +var Popover = function (_Component) { + (0, _inherits3.default)(Popover, _Component); + + function Popover(props, context) { + (0, _classCallCheck3.default)(this, Popover); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Popover.__proto__ || (0, _getPrototypeOf2.default)(Popover)).call(this, props, context)); + + _this.timeout = null; + + _this.renderLayer = function () { + var _this$props = _this.props, + animated = _this$props.animated, + animation = _this$props.animation, + anchorEl = _this$props.anchorEl, + anchorOrigin = _this$props.anchorOrigin, + autoCloseWhenOffScreen = _this$props.autoCloseWhenOffScreen, + canAutoPosition = _this$props.canAutoPosition, + children = _this$props.children, + onRequestClose = _this$props.onRequestClose, + style = _this$props.style, + targetOrigin = _this$props.targetOrigin, + useLayerForClickAway = _this$props.useLayerForClickAway, + other = (0, _objectWithoutProperties3.default)(_this$props, ['animated', 'animation', 'anchorEl', 'anchorOrigin', 'autoCloseWhenOffScreen', 'canAutoPosition', 'children', 'onRequestClose', 'style', 'targetOrigin', 'useLayerForClickAway']); + + + var styleRoot = style; + + if (!animated) { + styleRoot = { + position: 'fixed', + zIndex: _this.context.muiTheme.zIndex.popover + }; + + if (!_this.state.open) { + return null; + } + + return _react2.default.createElement( + _Paper2.default, + (0, _extends3.default)({ style: (0, _simpleAssign2.default)(styleRoot, style) }, other), + children + ); + } + + var Animation = animation || _PopoverAnimationDefault2.default; + + return _react2.default.createElement( + Animation, + (0, _extends3.default)({ + targetOrigin: targetOrigin, + style: styleRoot + }, other, { + open: _this.state.open && !_this.state.closing + }), + children + ); + }; + + _this.componentClickAway = function (event) { + event.preventDefault(); + _this.requestClose('clickAway'); + }; + + _this.setPlacement = function (scrolling) { + if (!_this.state.open) { + return; + } + + if (!_this.refs.layer.getLayer()) { + return; + } + + var targetEl = _this.refs.layer.getLayer().children[0]; + if (!targetEl) { + return; + } + + var _this$props2 = _this.props, + targetOrigin = _this$props2.targetOrigin, + anchorOrigin = _this$props2.anchorOrigin; + + var anchorEl = _this.props.anchorEl || _this.anchorEl; + + var anchor = _this.getAnchorPosition(anchorEl); + var target = _this.getTargetPosition(targetEl); + + var targetPosition = { + top: anchor[anchorOrigin.vertical] - target[targetOrigin.vertical], + left: anchor[anchorOrigin.horizontal] - target[targetOrigin.horizontal] + }; + + if (scrolling && _this.props.autoCloseWhenOffScreen) { + _this.autoCloseWhenOffScreen(anchor); + } + + if (_this.props.canAutoPosition) { + target = _this.getTargetPosition(targetEl); // update as height may have changed + targetPosition = _this.applyAutoPositionIfNeeded(anchor, target, targetOrigin, anchorOrigin, targetPosition); + } + + targetEl.style.top = Math.max(0, targetPosition.top) + 'px'; + targetEl.style.left = Math.max(0, targetPosition.left) + 'px'; + targetEl.style.maxHeight = window.innerHeight + 'px'; + }; + + _this.handleResize = (0, _lodash2.default)(_this.setPlacement, 100); + _this.handleScroll = (0, _lodash2.default)(_this.setPlacement.bind(_this, true), 50); + + _this.state = { + open: props.open, + closing: false + }; + return _this; + } + + (0, _createClass3.default)(Popover, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setPlacement(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; + + if (nextProps.open !== this.state.open) { + if (nextProps.open) { + this.anchorEl = nextProps.anchorEl || this.props.anchorEl; + this.setState({ + open: true, + closing: false + }); + } else { + if (nextProps.animated) { + if (this.timeout !== null) return; + this.setState({ closing: true }); + this.timeout = setTimeout(function () { + _this2.setState({ + open: false + }, function () { + _this2.timeout = null; + }); + }, 500); + } else { + this.setState({ + open: false + }); + } + } + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.setPlacement(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.handleResize.cancel(); + this.handleScroll.cancel(); + + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + } + }, { + key: 'requestClose', + value: function requestClose(reason) { + if (this.props.onRequestClose) { + this.props.onRequestClose(reason); + } + } + }, { + key: 'getAnchorPosition', + value: function getAnchorPosition(el) { + if (!el) { + el = _reactDom2.default.findDOMNode(this); + } + + var rect = el.getBoundingClientRect(); + var a = { + top: rect.top, + left: rect.left, + width: el.offsetWidth, + height: el.offsetHeight + }; + + a.right = rect.right || a.left + a.width; + + // The fixed positioning isn't respected on iOS when an input is focused. + // We need to compute the position from the top of the page and not the viewport. + if ((0, _iOSHelpers.isIOS)() && document.activeElement.tagName === 'INPUT') { + a.bottom = (0, _iOSHelpers.getOffsetTop)(el) + a.height; + } else { + a.bottom = rect.bottom || a.top + a.height; + } + a.middle = a.left + (a.right - a.left) / 2; + a.center = a.top + (a.bottom - a.top) / 2; + + return a; + } + }, { + key: 'getTargetPosition', + value: function getTargetPosition(targetEl) { + return { + top: 0, + center: targetEl.offsetHeight / 2, + bottom: targetEl.offsetHeight, + left: 0, + middle: targetEl.offsetWidth / 2, + right: targetEl.offsetWidth + }; + } + }, { + key: 'autoCloseWhenOffScreen', + value: function autoCloseWhenOffScreen(anchorPosition) { + if (anchorPosition.top < 0 || anchorPosition.top > window.innerHeight || anchorPosition.left < 0 || anchorPosition.left > window.innerWidth) { + this.requestClose('offScreen'); + } + } + }, { + key: 'getOverlapMode', + value: function getOverlapMode(anchor, target, median) { + if ([anchor, target].indexOf(median) >= 0) return 'auto'; + if (anchor === target) return 'inclusive'; + return 'exclusive'; + } + }, { + key: 'getPositions', + value: function getPositions(anchor, target) { + var a = (0, _extends3.default)({}, anchor); + var t = (0, _extends3.default)({}, target); + + var positions = { + x: ['left', 'right'].filter(function (p) { + return p !== t.horizontal; + }), + y: ['top', 'bottom'].filter(function (p) { + return p !== t.vertical; + }) + }; + + var overlap = { + x: this.getOverlapMode(a.horizontal, t.horizontal, 'middle'), + y: this.getOverlapMode(a.vertical, t.vertical, 'center') + }; + + positions.x.splice(overlap.x === 'auto' ? 0 : 1, 0, 'middle'); + positions.y.splice(overlap.y === 'auto' ? 0 : 1, 0, 'center'); + + if (overlap.y !== 'auto') { + a.vertical = a.vertical === 'top' ? 'bottom' : 'top'; + if (overlap.y === 'inclusive') { + t.vertical = t.vertical; + } + } + + if (overlap.x !== 'auto') { + a.horizontal = a.horizontal === 'left' ? 'right' : 'left'; + if (overlap.y === 'inclusive') { + t.horizontal = t.horizontal; + } + } + + return { + positions: positions, + anchorPos: a + }; + } + }, { + key: 'applyAutoPositionIfNeeded', + value: function applyAutoPositionIfNeeded(anchor, target, targetOrigin, anchorOrigin, targetPosition) { + var _getPositions = this.getPositions(anchorOrigin, targetOrigin), + positions = _getPositions.positions, + anchorPos = _getPositions.anchorPos; + + if (targetPosition.top < 0 || targetPosition.top + target.bottom > window.innerHeight) { + var newTop = anchor[anchorPos.vertical] - target[positions.y[0]]; + if (newTop + target.bottom <= window.innerHeight) { + targetPosition.top = Math.max(0, newTop); + } else { + newTop = anchor[anchorPos.vertical] - target[positions.y[1]]; + if (newTop + target.bottom <= window.innerHeight) { + targetPosition.top = Math.max(0, newTop); + } + } + } + + if (targetPosition.left < 0 || targetPosition.left + target.right > window.innerWidth) { + var newLeft = anchor[anchorPos.horizontal] - target[positions.x[0]]; + if (newLeft + target.right <= window.innerWidth) { + targetPosition.left = Math.max(0, newLeft); + } else { + newLeft = anchor[anchorPos.horizontal] - target[positions.x[1]]; + if (newLeft + target.right <= window.innerWidth) { + targetPosition.left = Math.max(0, newLeft); + } + } + } + + return targetPosition; + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement( + 'div', + { style: styles.root }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onScroll: this.handleScroll, + onResize: this.handleResize + }), + _react2.default.createElement(_RenderToLayer2.default, { + ref: 'layer', + open: this.state.open, + componentClickAway: this.componentClickAway, + useLayerForClickAway: this.props.useLayerForClickAway, + render: this.renderLayer + }) + ); + } + }]); + return Popover; +}(_react.Component); + +Popover.defaultProps = { + anchorOrigin: { + vertical: 'bottom', + horizontal: 'left' + }, + animated: true, + autoCloseWhenOffScreen: true, + canAutoPosition: true, + onRequestClose: function onRequestClose() {}, + open: false, + style: { + overflowY: 'auto' + }, + targetOrigin: { + vertical: 'top', + horizontal: 'left' + }, + useLayerForClickAway: true, + zDepth: 1 +}; +Popover.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Popover.propTypes = { + /** + * This is the DOM element that will be used to set the position of the + * popover. + */ + anchorEl: _react.PropTypes.object, + /** + * This is the point on the anchor where the popover's + * `targetOrigin` will attach to. + * Options: + * vertical: [top, center, bottom] + * horizontal: [left, middle, right]. + */ + anchorOrigin: _propTypes2.default.origin, + /** + * If true, the popover will apply transitions when + * it is added to the DOM. + */ + animated: _react.PropTypes.bool, + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * If true, the popover will hide when the anchor is scrolled off the screen. + */ + autoCloseWhenOffScreen: _react.PropTypes.bool, + /** + * If true, the popover (potentially) ignores `targetOrigin` + * and `anchorOrigin` to make itself fit on screen, + * which is useful for mobile devices. + */ + canAutoPosition: _react.PropTypes.bool, + /** + * The content of the popover. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Callback function fired when the popover is requested to be closed. + * + * @param {string} reason The reason for the close request. Possibles values + * are 'clickAway' and 'offScreen'. + */ + onRequestClose: _react.PropTypes.func, + /** + * If true, the popover is visible. + */ + open: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * This is the point on the popover which will attach to + * the anchor's origin. + * Options: + * vertical: [top, center, bottom] + * horizontal: [left, middle, right]. + */ + targetOrigin: _propTypes2.default.origin, + /** + * If true, the popover will render on top of an invisible + * layer, which will prevent clicks to the underlying + * elements, and trigger an `onRequestClose('clickAway')` call. + */ + useLayerForClickAway: _react.PropTypes.bool, + /** + * The zDepth of the popover. + */ + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = Popover; + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Toggle = exports.TextField = exports.Slider = exports.SelectField = exports.RadioButtonGroup = exports.TimePicker = exports.DatePicker = exports.Checkbox = exports.AutoComplete = undefined; + +var _AutoComplete = __webpack_require__(748); + +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); + +var _Checkbox = __webpack_require__(759); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +var _DatePicker = __webpack_require__(763); + +var _DatePicker2 = _interopRequireDefault(_DatePicker); + +var _RadioButtonGroup = __webpack_require__(781); + +var _RadioButtonGroup2 = _interopRequireDefault(_RadioButtonGroup); + +var _SelectField = __webpack_require__(786); + +var _SelectField2 = _interopRequireDefault(_SelectField); + +var _Slider = __webpack_require__(794); + +var _Slider2 = _interopRequireDefault(_Slider); + +var _TextField = __webpack_require__(799); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _TimePicker = __webpack_require__(800); + +var _TimePicker2 = _interopRequireDefault(_TimePicker); + +var _Toggle = __webpack_require__(813); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.AutoComplete = _AutoComplete2.default; +exports.Checkbox = _Checkbox2.default; +exports.DatePicker = _DatePicker2.default; +exports.TimePicker = _TimePicker2.default; +exports.RadioButtonGroup = _RadioButtonGroup2.default; +exports.SelectField = _SelectField2.default; +exports.Slider = _Slider2.default; +exports.TextField = _TextField2.default; +exports.Toggle = _Toggle2.default; + +/***/ }), +/* 132 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _FlatButton = __webpack_require__(769); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _FlatButton2.default; + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.email = email; +exports.required = required; +exports.simpleText = simpleText; +exports.number = number; +exports.minValue = minValue; +exports.maxValue = maxValue; +exports.fullName = fullName; +exports.unique = unique; +function email(input) { + var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return re.test(input) ? undefined : 'Please enter a valid email'; +} + +function required(value) { + var empty = typeof value !== 'number' && !value; + return empty ? 'Required field' : undefined; +} + +function simpleText(value) { + return value && !value.match(/^[0-9a-zA-Z_]{1,64}$/) ? 'Only use characters (a-z, A-Z, 0-9, _)' : undefined; +} + +function number(value) { + return value && isNaN(Number(value)) ? 'This field must be a number' : undefined; +} + +function minValue(min) { + return function (value) { + return value && value < min ? 'The value must be greater than ' + min : undefined; + }; +} + +function maxValue(max) { + return function (value) { + return value && value > max ? 'The value must be less than ' + max : undefined; + }; +} + +function fullName(value) { + return !value || value.split(' ').filter(function (x) { + return x !== ""; + }).length < 2 ? 'Please enter a valid full name (firstname + lastname)' : undefined; +} + +function unique(candidates) { + return function (value) { + if (candidates.indexOf(value) !== -1) { + return 'This value already exists and must be unique'; + } + return undefined; + }; +} + +/***/ }), +/* 134 */ +/***/ (function(module, exports) { + +module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; +}; + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(65) + , document = __webpack_require__(25).document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); +module.exports = function(it){ + return is ? document.createElement(it) : {}; +}; + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(65); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function(it, S){ + if(!isObject(it))return it; + var fn, val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + throw TypeError("Can't convert object to primitive value"); +}; + +/***/ }), +/* 137 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; +}; + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(139) + , min = Math.min; +module.exports = function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + +/***/ }), +/* 139 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil + , floor = Math.floor; +module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(141)('keys') + , uid = __webpack_require__(99); +module.exports = function(key){ + return shared[key] || (shared[key] = uid(key)); +}; + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(25) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); +module.exports = function(key){ + return store[key] || (store[key] = {}); +}; + +/***/ }), +/* 142 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + +/***/ }), +/* 143 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var invariant = __webpack_require__(9); + +/** + * Injectable ordering of event plugins. + */ +var eventPluginOrder = null; + +/** + * Injectable mapping from names to event plugin modules. + */ +var namesToPlugins = {}; + +/** + * Recomputes the plugin list using the injected plugins and plugin ordering. + * + * @private + */ +function recomputePluginOrdering() { + if (!eventPluginOrder) { + // Wait until an `eventPluginOrder` is injected. + return; + } + for (var pluginName in namesToPlugins) { + var pluginModule = namesToPlugins[pluginName]; + var pluginIndex = eventPluginOrder.indexOf(pluginName); + !(pluginIndex > -1) ? false ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0; + if (EventPluginRegistry.plugins[pluginIndex]) { + continue; + } + !pluginModule.extractEvents ? false ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0; + EventPluginRegistry.plugins[pluginIndex] = pluginModule; + var publishedEvents = pluginModule.eventTypes; + for (var eventName in publishedEvents) { + !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? false ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0; + } + } +} + +/** + * Publishes an event so that it can be dispatched by the supplied plugin. + * + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private + */ +function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { + !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? false ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0; + EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; + + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName(phasedRegistrationName, pluginModule, eventName); + } + } + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); + return true; + } + return false; +} + +/** + * Publishes a registration name that is used to identify dispatched events and + * can be used with `EventPluginHub.putListener` to register listeners. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ +function publishRegistrationName(registrationName, pluginModule, eventName) { + !!EventPluginRegistry.registrationNameModules[registrationName] ? false ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0; + EventPluginRegistry.registrationNameModules[registrationName] = pluginModule; + EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; + + if (false) { + var lowerCasedName = registrationName.toLowerCase(); + EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName; + + if (registrationName === 'onDoubleClick') { + EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName; + } + } +} + +/** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ +var EventPluginRegistry = { + + /** + * Ordered list of injected plugins. + */ + plugins: [], + + /** + * Mapping from event name to dispatch config + */ + eventNameDispatchConfigs: {}, + + /** + * Mapping from registration name to plugin module + */ + registrationNameModules: {}, + + /** + * Mapping from registration name to event name + */ + registrationNameDependencies: {}, + + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in __DEV__. + * @type {Object} + */ + possibleRegistrationNames: false ? {} : null, + // Trust the developer to only use possibleRegistrationNames in __DEV__ + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + injectEventPluginOrder: function (injectedEventPluginOrder) { + !!eventPluginOrder ? false ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0; + // Clone the ordering so it cannot be dynamically mutated. + eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); + recomputePluginOrdering(); + }, + + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + injectEventPluginsByName: function (injectedNamesToPlugins) { + var isOrderingDirty = false; + for (var pluginName in injectedNamesToPlugins) { + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { + continue; + } + var pluginModule = injectedNamesToPlugins[pluginName]; + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { + !!namesToPlugins[pluginName] ? false ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0; + namesToPlugins[pluginName] = pluginModule; + isOrderingDirty = true; + } + } + if (isOrderingDirty) { + recomputePluginOrdering(); + } + }, + + /** + * Looks up the plugin for the supplied event. + * + * @param {object} event A synthetic event. + * @return {?object} The plugin that created the supplied event. + * @internal + */ + getPluginModuleForEvent: function (event) { + var dispatchConfig = event.dispatchConfig; + if (dispatchConfig.registrationName) { + return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; + } + if (dispatchConfig.phasedRegistrationNames !== undefined) { + // pulling phasedRegistrationNames out of dispatchConfig helps Flow see + // that it is not undefined. + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + + for (var phase in phasedRegistrationNames) { + if (!phasedRegistrationNames.hasOwnProperty(phase)) { + continue; + } + var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]]; + if (pluginModule) { + return pluginModule; + } + } + } + return null; + }, + + /** + * Exposed for unit testing. + * @private + */ + _resetEventPlugins: function () { + eventPluginOrder = null; + for (var pluginName in namesToPlugins) { + if (namesToPlugins.hasOwnProperty(pluginName)) { + delete namesToPlugins[pluginName]; + } + } + EventPluginRegistry.plugins.length = 0; + + var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; + for (var eventName in eventNameDispatchConfigs) { + if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { + delete eventNameDispatchConfigs[eventName]; + } + } + + var registrationNameModules = EventPluginRegistry.registrationNameModules; + for (var registrationName in registrationNameModules) { + if (registrationNameModules.hasOwnProperty(registrationName)) { + delete registrationNameModules[registrationName]; + } + } + + if (false) { + var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames; + for (var lowerCasedName in possibleRegistrationNames) { + if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) { + delete possibleRegistrationNames[lowerCasedName]; + } + } + } + } + +}; + +module.exports = EventPluginRegistry; + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var caughtError = null; + +/** + * Call a function while guarding against errors that happens within it. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} a First argument + * @param {*} b Second argument + */ +function invokeGuardedCallback(name, func, a) { + try { + func(a); + } catch (x) { + if (caughtError === null) { + caughtError = x; + } + } +} + +var ReactErrorUtils = { + invokeGuardedCallback: invokeGuardedCallback, + + /** + * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event + * handler are sure to be rethrown by rethrowCaughtError. + */ + invokeGuardedCallbackWithCatch: invokeGuardedCallback, + + /** + * During execution of guarded functions we will capture the first error which + * we will rethrow to be handled by the top level error handler. + */ + rethrowCaughtError: function () { + if (caughtError) { + var error = caughtError; + caughtError = null; + throw error; + } + } +}; + +if (false) { + /** + * To help development we can get better devtools integration by simulating a + * real browser event. + */ + if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') { + var fakeNode = document.createElement('react'); + ReactErrorUtils.invokeGuardedCallback = function (name, func, a) { + var boundFunc = func.bind(null, a); + var evtType = 'react-' + name; + fakeNode.addEventListener(evtType, boundFunc, false); + var evt = document.createEvent('Event'); + // $FlowFixMe https://github.com/facebook/flow/issues/2336 + evt.initEvent(evtType, false, false); + fakeNode.dispatchEvent(evt); + fakeNode.removeEventListener(evtType, boundFunc, false); + }; + } +} + +module.exports = ReactErrorUtils; + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Gets the target node from a native browser event by accounting for + * inconsistencies in browser DOM APIs. + * + * @param {object} nativeEvent Native browser event. + * @return {DOMEventTarget} Target node. + */ + +function getEventTarget(nativeEvent) { + var target = nativeEvent.target || nativeEvent.srcElement || window; + + // Normalize SVG <use> element events #4963 + if (target.correspondingUseElement) { + target = target.correspondingUseElement; + } + + // Safari may fire events on text nodes (Node.TEXT_NODE is 3). + // @see http://www.quirksmode.org/js/events_properties.html + return target.nodeType === 3 ? target.parentNode : target; +} + +module.exports = getEventTarget; + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(22); + +var useHasFeature; +if (ExecutionEnvironment.canUseDOM) { + useHasFeature = document.implementation && document.implementation.hasFeature && + // always returns true in newer browsers as per the standard. + // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature + document.implementation.hasFeature('', '') !== true; +} + +/** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @param {?boolean} capture Check if the capture phase is supported. + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ +function isEventSupported(eventNameSuffix, capture) { + if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { + return false; + } + + var eventName = 'on' + eventNameSuffix; + var isSupported = eventName in document; + + if (!isSupported) { + var element = document.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { + // This is the only way to test support for the `wheel` event in IE9+. + isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); + } + + return isSupported; +} + +module.exports = isEventSupported; + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ViewportMetrics = { + + currentScrollLeft: 0, + + currentScrollTop: 0, + + refreshScrollValues: function (scrollPosition) { + ViewportMetrics.currentScrollLeft = scrollPosition.x; + ViewportMetrics.currentScrollTop = scrollPosition.y; + } + +}; + +module.exports = ViewportMetrics; + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers + */ + +var modifierKeyToProp = { + 'Alt': 'altKey', + 'Control': 'ctrlKey', + 'Meta': 'metaKey', + 'Shift': 'shiftKey' +}; + +// IE8 does not implement getModifierState so we simply map it to the only +// modifier keys exposed by the event itself, does not support Lock-keys. +// Currently, all major browsers except Chrome seems to support Lock-keys. +function modifierStateGetter(keyArg) { + var syntheticEvent = this; + var nativeEvent = syntheticEvent.nativeEvent; + if (nativeEvent.getModifierState) { + return nativeEvent.getModifierState(keyArg); + } + var keyProp = modifierKeyToProp[keyArg]; + return keyProp ? !!nativeEvent[keyProp] : false; +} + +function getEventModifierState(nativeEvent) { + return modifierStateGetter; +} + +module.exports = getEventModifierState; + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMLazyTree = __webpack_require__(74); +var Danger = __webpack_require__(369); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactInstrumentation = __webpack_require__(26); + +var createMicrosoftUnsafeLocalFunction = __webpack_require__(152); +var setInnerHTML = __webpack_require__(105); +var setTextContent = __webpack_require__(230); + +function getNodeAfter(parentNode, node) { + // Special case for text components, which return [open, close] comments + // from getHostNode. + if (Array.isArray(node)) { + node = node[1]; + } + return node ? node.nextSibling : parentNode.firstChild; +} + +/** + * Inserts `childNode` as a child of `parentNode` at the `index`. + * + * @param {DOMElement} parentNode Parent node in which to insert. + * @param {DOMElement} childNode Child node to insert. + * @param {number} index Index at which to insert the child. + * @internal + */ +var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) { + // We rely exclusively on `insertBefore(node, null)` instead of also using + // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so + // we are careful to use `null`.) + parentNode.insertBefore(childNode, referenceNode); +}); + +function insertLazyTreeChildAt(parentNode, childTree, referenceNode) { + DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode); +} + +function moveChild(parentNode, childNode, referenceNode) { + if (Array.isArray(childNode)) { + moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode); + } else { + insertChildAt(parentNode, childNode, referenceNode); + } +} + +function removeChild(parentNode, childNode) { + if (Array.isArray(childNode)) { + var closingComment = childNode[1]; + childNode = childNode[0]; + removeDelimitedText(parentNode, childNode, closingComment); + parentNode.removeChild(closingComment); + } + parentNode.removeChild(childNode); +} + +function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) { + var node = openingComment; + while (true) { + var nextNode = node.nextSibling; + insertChildAt(parentNode, node, referenceNode); + if (node === closingComment) { + break; + } + node = nextNode; + } +} + +function removeDelimitedText(parentNode, startNode, closingComment) { + while (true) { + var node = startNode.nextSibling; + if (node === closingComment) { + // The closing comment is removed by ReactMultiChild. + break; + } else { + parentNode.removeChild(node); + } + } +} + +function replaceDelimitedText(openingComment, closingComment, stringText) { + var parentNode = openingComment.parentNode; + var nodeAfterComment = openingComment.nextSibling; + if (nodeAfterComment === closingComment) { + // There are no text nodes between the opening and closing comments; insert + // a new one if stringText isn't empty. + if (stringText) { + insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment); + } + } else { + if (stringText) { + // Set the text content of the first node after the opening comment, and + // remove all following nodes up until the closing comment. + setTextContent(nodeAfterComment, stringText); + removeDelimitedText(parentNode, nodeAfterComment, closingComment); + } else { + removeDelimitedText(parentNode, openingComment, closingComment); + } + } + + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, + type: 'replace text', + payload: stringText + }); + } +} + +var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup; +if (false) { + dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) { + Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup); + if (prevInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: prevInstance._debugID, + type: 'replace with', + payload: markup.toString() + }); + } else { + var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node); + if (nextInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: nextInstance._debugID, + type: 'mount', + payload: markup.toString() + }); + } + } + }; +} + +/** + * Operations for updating with DOM children. + */ +var DOMChildrenOperations = { + + dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup, + + replaceDelimitedText: replaceDelimitedText, + + /** + * Updates a component's children by processing a series of updates. The + * update configurations are each expected to have a `parentNode` property. + * + * @param {array<object>} updates List of update configurations. + * @internal + */ + processUpdates: function (parentNode, updates) { + if (false) { + var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID; + } + + for (var k = 0; k < updates.length; k++) { + var update = updates[k]; + switch (update.type) { + case 'INSERT_MARKUP': + insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode)); + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'insert child', + payload: { toIndex: update.toIndex, content: update.content.toString() } + }); + } + break; + case 'MOVE_EXISTING': + moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode)); + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'move child', + payload: { fromIndex: update.fromIndex, toIndex: update.toIndex } + }); + } + break; + case 'SET_MARKUP': + setInnerHTML(parentNode, update.content); + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'replace children', + payload: update.content.toString() + }); + } + break; + case 'TEXT_CONTENT': + setTextContent(parentNode, update.content); + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'replace text', + payload: update.content.toString() + }); + } + break; + case 'REMOVE_NODE': + removeChild(parentNode, update.fromNode); + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'remove child', + payload: { fromIndex: update.fromIndex } + }); + } + break; + } + } + } + +}; + +module.exports = DOMChildrenOperations; + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMNamespaces = { + html: 'http://www.w3.org/1999/xhtml', + mathml: 'http://www.w3.org/1998/Math/MathML', + svg: 'http://www.w3.org/2000/svg' +}; + +module.exports = DOMNamespaces; + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/* globals MSApp */ + + + +/** + * Create a function which has 'unsafe' privileges (required by windows8 apps) + */ + +var createMicrosoftUnsafeLocalFunction = function (func) { + if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { + return function (arg0, arg1, arg2, arg3) { + MSApp.execUnsafeLocalFunction(function () { + return func(arg0, arg1, arg2, arg3); + }); + }; + } else { + return func; + } +}; + +module.exports = createMicrosoftUnsafeLocalFunction; + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var React = __webpack_require__(52); +var ReactPropTypesSecret = __webpack_require__(387); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); + +var hasReadOnlyValue = { + 'button': true, + 'checkbox': true, + 'image': true, + 'hidden': true, + 'radio': true, + 'reset': true, + 'submit': true +}; + +function _assertSingleLink(inputProps) { + !(inputProps.checkedLink == null || inputProps.valueLink == null) ? false ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0; +} +function _assertValueLink(inputProps) { + _assertSingleLink(inputProps); + !(inputProps.value == null && inputProps.onChange == null) ? false ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\'t want to use valueLink.') : _prodInvariant('88') : void 0; +} + +function _assertCheckedLink(inputProps) { + _assertSingleLink(inputProps); + !(inputProps.checked == null && inputProps.onChange == null) ? false ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\'t want to use checkedLink') : _prodInvariant('89') : void 0; +} + +var propTypes = { + value: function (props, propName, componentName) { + if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) { + return null; + } + return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + }, + checked: function (props, propName, componentName) { + if (!props[propName] || props.onChange || props.readOnly || props.disabled) { + return null; + } + return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + }, + onChange: React.PropTypes.func +}; + +var loggedTypeFailures = {}; +function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +/** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ +var LinkedValueUtils = { + checkPropTypes: function (tagName, props, owner) { + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) { + var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret); + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var addendum = getDeclarationErrorAddendum(owner); + false ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0; + } + } + }, + + /** + * @param {object} inputProps Props for form component + * @return {*} current value of the input either from value prop or link. + */ + getValue: function (inputProps) { + if (inputProps.valueLink) { + _assertValueLink(inputProps); + return inputProps.valueLink.value; + } + return inputProps.value; + }, + + /** + * @param {object} inputProps Props for form component + * @return {*} current checked status of the input either from checked prop + * or link. + */ + getChecked: function (inputProps) { + if (inputProps.checkedLink) { + _assertCheckedLink(inputProps); + return inputProps.checkedLink.value; + } + return inputProps.checked; + }, + + /** + * @param {object} inputProps Props for form component + * @param {SyntheticEvent} event change event to handle + */ + executeOnChange: function (inputProps, event) { + if (inputProps.valueLink) { + _assertValueLink(inputProps); + return inputProps.valueLink.requestChange(event.target.value); + } else if (inputProps.checkedLink) { + _assertCheckedLink(inputProps); + return inputProps.checkedLink.requestChange(event.target.checked); + } else if (inputProps.onChange) { + return inputProps.onChange.call(undefined, event); + } + } +}; + +module.exports = LinkedValueUtils; + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var invariant = __webpack_require__(9); + +var injected = false; + +var ReactComponentEnvironment = { + + /** + * Optionally injectable hook for swapping out mount images in the middle of + * the tree. + */ + replaceNodeWithMarkup: null, + + /** + * Optionally injectable hook for processing a queue of child updates. Will + * later move into MultiChildComponents. + */ + processChildrenUpdates: null, + + injection: { + injectEnvironment: function (environment) { + !!injected ? false ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0; + ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup; + ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates; + injected = true; + } + } + +}; + +module.exports = ReactComponentEnvironment; + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Given a `prevElement` and `nextElement`, determines if the existing + * instance should be updated as opposed to being destroyed or replaced by a new + * instance. Both arguments are elements. This ensures that this logic can + * operate on stateless trees without any backing instance. + * + * @param {?object} prevElement + * @param {?object} nextElement + * @return {boolean} True if the existing instance should be updated. + * @protected + */ + +function shouldUpdateReactComponent(prevElement, nextElement) { + var prevEmpty = prevElement === null || prevElement === false; + var nextEmpty = nextElement === null || nextElement === false; + if (prevEmpty || nextEmpty) { + return prevEmpty === nextEmpty; + } + + var prevType = typeof prevElement; + var nextType = typeof nextElement; + if (prevType === 'string' || prevType === 'number') { + return nextType === 'string' || nextType === 'number'; + } else { + return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key; + } +} + +module.exports = shouldUpdateReactComponent; + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + +function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2' + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; +} + +/** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ +function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':' + }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); + + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); +} + +var KeyEscapeUtils = { + escape: escape, + unescape: unescape +}; + +module.exports = KeyEscapeUtils; + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(68); + +var ReactCurrentOwner = __webpack_require__(35); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); + +function isNative(fn) { + // Based on isNative() from Lodash + var funcToString = Function.prototype.toString; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var reIsNative = RegExp('^' + funcToString + // Take an example native function source for comparison + .call(hasOwnProperty + // Strip regex characters so we can use it for regex + ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&' + // Remove hasOwnProperty from the template to make it generic + ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + try { + var source = funcToString.call(fn); + return reIsNative.test(source); + } catch (err) { + return false; + } +} + +var canUseCollections = +// Array.from +typeof Array.from === 'function' && +// Map +typeof Map === 'function' && isNative(Map) && +// Map.prototype.keys +Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) && +// Set +typeof Set === 'function' && isNative(Set) && +// Set.prototype.keys +Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys); + +var setItem; +var getItem; +var removeItem; +var getItemIDs; +var addRoot; +var removeRoot; +var getRootIDs; + +if (canUseCollections) { + var itemMap = new Map(); + var rootIDSet = new Set(); + + setItem = function (id, item) { + itemMap.set(id, item); + }; + getItem = function (id) { + return itemMap.get(id); + }; + removeItem = function (id) { + itemMap['delete'](id); + }; + getItemIDs = function () { + return Array.from(itemMap.keys()); + }; + + addRoot = function (id) { + rootIDSet.add(id); + }; + removeRoot = function (id) { + rootIDSet['delete'](id); + }; + getRootIDs = function () { + return Array.from(rootIDSet.keys()); + }; +} else { + var itemByKey = {}; + var rootByKey = {}; + + // Use non-numeric keys to prevent V8 performance issues: + // https://github.com/facebook/react/pull/7232 + var getKeyFromID = function (id) { + return '.' + id; + }; + var getIDFromKey = function (key) { + return parseInt(key.substr(1), 10); + }; + + setItem = function (id, item) { + var key = getKeyFromID(id); + itemByKey[key] = item; + }; + getItem = function (id) { + var key = getKeyFromID(id); + return itemByKey[key]; + }; + removeItem = function (id) { + var key = getKeyFromID(id); + delete itemByKey[key]; + }; + getItemIDs = function () { + return Object.keys(itemByKey).map(getIDFromKey); + }; + + addRoot = function (id) { + var key = getKeyFromID(id); + rootByKey[key] = true; + }; + removeRoot = function (id) { + var key = getKeyFromID(id); + delete rootByKey[key]; + }; + getRootIDs = function () { + return Object.keys(rootByKey).map(getIDFromKey); + }; +} + +var unmountedIDs = []; + +function purgeDeep(id) { + var item = getItem(id); + if (item) { + var childIDs = item.childIDs; + + removeItem(id); + childIDs.forEach(purgeDeep); + } +} + +function describeComponentFrame(name, source, ownerName) { + return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); +} + +function getDisplayName(element) { + if (element == null) { + return '#empty'; + } else if (typeof element === 'string' || typeof element === 'number') { + return '#text'; + } else if (typeof element.type === 'string') { + return element.type; + } else { + return element.type.displayName || element.type.name || 'Unknown'; + } +} + +function describeID(id) { + var name = ReactComponentTreeHook.getDisplayName(id); + var element = ReactComponentTreeHook.getElement(id); + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var ownerName; + if (ownerID) { + ownerName = ReactComponentTreeHook.getDisplayName(ownerID); + } + false ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0; + return describeComponentFrame(name, element && element._source, ownerName); +} + +var ReactComponentTreeHook = { + onSetChildren: function (id, nextChildIDs) { + var item = getItem(id); + !item ? false ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; + item.childIDs = nextChildIDs; + + for (var i = 0; i < nextChildIDs.length; i++) { + var nextChildID = nextChildIDs[i]; + var nextChild = getItem(nextChildID); + !nextChild ? false ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0; + !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? false ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0; + !nextChild.isMounted ? false ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0; + if (nextChild.parentID == null) { + nextChild.parentID = id; + // TODO: This shouldn't be necessary but mounting a new root during in + // componentWillMount currently causes not-yet-mounted components to + // be purged from our tree data so their parent id is missing. + } + !(nextChild.parentID === id) ? false ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0; + } + }, + onBeforeMountComponent: function (id, element, parentID) { + var item = { + element: element, + parentID: parentID, + text: null, + childIDs: [], + isMounted: false, + updateCount: 0 + }; + setItem(id, item); + }, + onBeforeUpdateComponent: function (id, element) { + var item = getItem(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.element = element; + }, + onMountComponent: function (id) { + var item = getItem(id); + !item ? false ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; + item.isMounted = true; + var isRoot = item.parentID === 0; + if (isRoot) { + addRoot(id); + } + }, + onUpdateComponent: function (id) { + var item = getItem(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.updateCount++; + }, + onUnmountComponent: function (id) { + var item = getItem(id); + if (item) { + // We need to check if it exists. + // `item` might not exist if it is inside an error boundary, and a sibling + // error boundary child threw while mounting. Then this instance never + // got a chance to mount, but it still gets an unmounting event during + // the error boundary cleanup. + item.isMounted = false; + var isRoot = item.parentID === 0; + if (isRoot) { + removeRoot(id); + } + } + unmountedIDs.push(id); + }, + purgeUnmountedComponents: function () { + if (ReactComponentTreeHook._preventPurging) { + // Should only be used for testing. + return; + } + + for (var i = 0; i < unmountedIDs.length; i++) { + var id = unmountedIDs[i]; + purgeDeep(id); + } + unmountedIDs.length = 0; + }, + isMounted: function (id) { + var item = getItem(id); + return item ? item.isMounted : false; + }, + getCurrentStackAddendum: function (topElement) { + var info = ''; + if (topElement) { + var name = getDisplayName(topElement); + var owner = topElement._owner; + info += describeComponentFrame(name, topElement._source, owner && owner.getName()); + } + + var currentOwner = ReactCurrentOwner.current; + var id = currentOwner && currentOwner._debugID; + + info += ReactComponentTreeHook.getStackAddendumByID(id); + return info; + }, + getStackAddendumByID: function (id) { + var info = ''; + while (id) { + info += describeID(id); + id = ReactComponentTreeHook.getParentID(id); + } + return info; + }, + getChildIDs: function (id) { + var item = getItem(id); + return item ? item.childIDs : []; + }, + getDisplayName: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (!element) { + return null; + } + return getDisplayName(element); + }, + getElement: function (id) { + var item = getItem(id); + return item ? item.element : null; + }, + getOwnerID: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (!element || !element._owner) { + return null; + } + return element._owner._debugID; + }, + getParentID: function (id) { + var item = getItem(id); + return item ? item.parentID : null; + }, + getSource: function (id) { + var item = getItem(id); + var element = item ? item.element : null; + var source = element != null ? element._source : null; + return source; + }, + getText: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (typeof element === 'string') { + return element; + } else if (typeof element === 'number') { + return '' + element; + } else { + return null; + } + }, + getUpdateCount: function (id) { + var item = getItem(id); + return item ? item.updateCount : 0; + }, + + + getRootIDs: getRootIDs, + getRegisteredIDs: getItemIDs, + + pushNonStandardWarningStack: function (isCreatingElement, currentSource) { + if (typeof console.reactStack !== 'function') { + return; + } + + var stack = []; + var currentOwner = ReactCurrentOwner.current; + var id = currentOwner && currentOwner._debugID; + + try { + if (isCreatingElement) { + stack.push({ + name: id ? ReactComponentTreeHook.getDisplayName(id) : null, + fileName: currentSource ? currentSource.fileName : null, + lineNumber: currentSource ? currentSource.lineNumber : null + }); + } + + while (id) { + var element = ReactComponentTreeHook.getElement(id); + var parentID = ReactComponentTreeHook.getParentID(id); + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null; + var source = element && element._source; + stack.push({ + name: ownerName, + fileName: source ? source.fileName : null, + lineNumber: source ? source.lineNumber : null + }); + id = parentID; + } + } catch (err) { + // Internal state is messed up. + // Stop building the stack (it's just a nice to have). + } + + console.reactStack(stack); + }, + popNonStandardWarningStack: function () { + if (typeof console.reactStackEnd !== 'function') { + return; + } + console.reactStackEnd(); + } +}; + +module.exports = ReactComponentTreeHook; + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var ReactCurrentOwner = __webpack_require__(35); +var ReactInstanceMap = __webpack_require__(87); +var ReactInstrumentation = __webpack_require__(26); +var ReactUpdates = __webpack_require__(28); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); + +function enqueueUpdate(internalInstance) { + ReactUpdates.enqueueUpdate(internalInstance); +} + +function formatUnexpectedArgument(arg) { + var type = typeof arg; + if (type !== 'object') { + return type; + } + var displayName = arg.constructor && arg.constructor.name || type; + var keys = Object.keys(arg); + if (keys.length > 0 && keys.length < 20) { + return displayName + ' (keys: ' + keys.join(', ') + ')'; + } + return displayName; +} + +function getInternalInstanceReadyForUpdate(publicInstance, callerName) { + var internalInstance = ReactInstanceMap.get(publicInstance); + if (!internalInstance) { + if (false) { + var ctor = publicInstance.constructor; + // Only warn when we have a callerName. Otherwise we should be silent. + // We're probably calling from enqueueCallback. We don't want to warn + // there because we already warned for the corresponding lifecycle method. + process.env.NODE_ENV !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0; + } + return null; + } + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0; + } + + return internalInstance; +} + +/** + * ReactUpdateQueue allows for state updates to be scheduled into a later + * reconciliation step. + */ +var ReactUpdateQueue = { + + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + if (false) { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0; + owner._warnedAboutRefsInRender = true; + } + } + var internalInstance = ReactInstanceMap.get(publicInstance); + if (internalInstance) { + // During componentWillMount and render this will still be null but after + // that will always render to something. At least for now. So we can use + // this hack. + return !!internalInstance._renderedComponent; + } else { + return false; + } + }, + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @param {string} callerName Name of the calling function in the public API. + * @internal + */ + enqueueCallback: function (publicInstance, callback, callerName) { + ReactUpdateQueue.validateCallback(callback, callerName); + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); + + // Previously we would throw an error if we didn't have an internal + // instance. Since we want to make it a no-op instead, we mirror the same + // behavior we have in other enqueue* methods. + // We also need to ignore callbacks in componentWillMount. See + // enqueueUpdates. + if (!internalInstance) { + return null; + } + + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + // TODO: The callback here is ignored when setState is called from + // componentWillMount. Either fix it or disallow doing so completely in + // favor of getInitialState. Alternatively, we can disallow + // componentWillMount during server-side rendering. + enqueueUpdate(internalInstance); + }, + + enqueueCallbackInternal: function (internalInstance, callback) { + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + enqueueUpdate(internalInstance); + }, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function (publicInstance) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate'); + + if (!internalInstance) { + return; + } + + internalInstance._pendingForceUpdate = true; + + enqueueUpdate(internalInstance); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); + + if (!internalInstance) { + return; + } + + internalInstance._pendingStateQueue = [completeState]; + internalInstance._pendingReplaceState = true; + + enqueueUpdate(internalInstance); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function (publicInstance, partialState) { + if (false) { + ReactInstrumentation.debugTool.onSetState(); + process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0; + } + + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState'); + + if (!internalInstance) { + return; + } + + var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []); + queue.push(partialState); + + enqueueUpdate(internalInstance); + }, + + enqueueElementInternal: function (internalInstance, nextElement, nextContext) { + internalInstance._pendingElement = nextElement; + // TODO: introduce _pendingContext instead of setting it directly. + internalInstance._context = nextContext; + enqueueUpdate(internalInstance); + }, + + validateCallback: function (callback, callerName) { + !(!callback || typeof callback === 'function') ? false ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0; + } + +}; + +module.exports = ReactUpdateQueue; + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var emptyFunction = __webpack_require__(24); +var warning = __webpack_require__(11); + +var validateDOMNesting = emptyFunction; + +if (false) { + // This validation code was written based on the HTML5 parsing spec: + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + // + // Note: this does not catch all invalid nesting, nor does it try to (as it's + // not clear what practical benefit doing so provides); instead, we warn only + // for cases where the parser will give a parse tree differing from what React + // intended. For example, <b><div></div></b> is invalid but we don't warn + // because it still parses correctly; we do warn for other cases like nested + // <p> tags where the beginning of the second element implicitly closes the + // first, causing a confusing mess. + + // https://html.spec.whatwg.org/multipage/syntax.html#special + var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; + + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', + + // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point + // TODO: Distinguish by namespace here -- for <title>, including it here + // errs on the side of fewer warnings + 'foreignObject', 'desc', 'title']; + + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope + var buttonScopeTags = inScopeTags.concat(['button']); + + // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags + var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; + + var emptyAncestorInfo = { + current: null, + + formTag: null, + aTagInScope: null, + buttonTagInScope: null, + nobrTagInScope: null, + pTagInButtonScope: null, + + listItemTagAutoclosing: null, + dlItemTagAutoclosing: null + }; + + var updatedAncestorInfo = function (oldInfo, tag, instance) { + var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); + var info = { tag: tag, instance: instance }; + + if (inScopeTags.indexOf(tag) !== -1) { + ancestorInfo.aTagInScope = null; + ancestorInfo.buttonTagInScope = null; + ancestorInfo.nobrTagInScope = null; + } + if (buttonScopeTags.indexOf(tag) !== -1) { + ancestorInfo.pTagInButtonScope = null; + } + + // See rules for 'li', 'dd', 'dt' start tags in + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { + ancestorInfo.listItemTagAutoclosing = null; + ancestorInfo.dlItemTagAutoclosing = null; + } + + ancestorInfo.current = info; + + if (tag === 'form') { + ancestorInfo.formTag = info; + } + if (tag === 'a') { + ancestorInfo.aTagInScope = info; + } + if (tag === 'button') { + ancestorInfo.buttonTagInScope = info; + } + if (tag === 'nobr') { + ancestorInfo.nobrTagInScope = info; + } + if (tag === 'p') { + ancestorInfo.pTagInButtonScope = info; + } + if (tag === 'li') { + ancestorInfo.listItemTagAutoclosing = info; + } + if (tag === 'dd' || tag === 'dt') { + ancestorInfo.dlItemTagAutoclosing = info; + } + + return ancestorInfo; + }; + + /** + * Returns whether + */ + var isTagValidWithParent = function (tag, parentTag) { + // First, let's check if we're in an unusual parsing mode... + switch (parentTag) { + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect + case 'select': + return tag === 'option' || tag === 'optgroup' || tag === '#text'; + case 'optgroup': + return tag === 'option' || tag === '#text'; + // Strictly speaking, seeing an <option> doesn't mean we're in a <select> + // but + case 'option': + return tag === '#text'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption + // No special behavior since these rules fall back to "in body" mode for + // all except special table nodes which cause bad parsing behavior anyway. + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr + case 'tr': + return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody + case 'tbody': + case 'thead': + case 'tfoot': + return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup + case 'colgroup': + return tag === 'col' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable + case 'table': + return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead + case 'head': + return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element + case 'html': + return tag === 'head' || tag === 'body'; + case '#document': + return tag === 'html'; + } + + // Probably in the "in body" parsing mode, so we outlaw only tag combos + // where the parsing rules cause implicit opens or closes to be added. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + switch (tag) { + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6'; + + case 'rp': + case 'rt': + return impliedEndTags.indexOf(parentTag) === -1; + + case 'body': + case 'caption': + case 'col': + case 'colgroup': + case 'frame': + case 'head': + case 'html': + case 'tbody': + case 'td': + case 'tfoot': + case 'th': + case 'thead': + case 'tr': + // These tags are only valid with a few parents that have special child + // parsing rules -- if we're down here, then none of those matched and + // so we allow it only if we don't know what the parent is, as all other + // cases are invalid. + return parentTag == null; + } + + return true; + }; + + /** + * Returns whether + */ + var findInvalidAncestorForTag = function (tag, ancestorInfo) { + switch (tag) { + case 'address': + case 'article': + case 'aside': + case 'blockquote': + case 'center': + case 'details': + case 'dialog': + case 'dir': + case 'div': + case 'dl': + case 'fieldset': + case 'figcaption': + case 'figure': + case 'footer': + case 'header': + case 'hgroup': + case 'main': + case 'menu': + case 'nav': + case 'ol': + case 'p': + case 'section': + case 'summary': + case 'ul': + + case 'pre': + case 'listing': + + case 'table': + + case 'hr': + + case 'xmp': + + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ancestorInfo.pTagInButtonScope; + + case 'form': + return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; + + case 'li': + return ancestorInfo.listItemTagAutoclosing; + + case 'dd': + case 'dt': + return ancestorInfo.dlItemTagAutoclosing; + + case 'button': + return ancestorInfo.buttonTagInScope; + + case 'a': + // Spec says something about storing a list of markers, but it sounds + // equivalent to this check. + return ancestorInfo.aTagInScope; + + case 'nobr': + return ancestorInfo.nobrTagInScope; + } + + return null; + }; + + /** + * Given a ReactCompositeComponent instance, return a list of its recursive + * owners, starting at the root and ending with the instance itself. + */ + var findOwnerStack = function (instance) { + if (!instance) { + return []; + } + + var stack = []; + do { + stack.push(instance); + } while (instance = instance._currentElement._owner); + stack.reverse(); + return stack; + }; + + var didWarn = {}; + + validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + + if (childText != null) { + process.env.NODE_ENV !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0; + childTag = '#text'; + } + + var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; + var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); + var problematic = invalidParent || invalidAncestor; + + if (problematic) { + var ancestorTag = problematic.tag; + var ancestorInstance = problematic.instance; + + var childOwner = childInstance && childInstance._currentElement._owner; + var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner; + + var childOwners = findOwnerStack(childOwner); + var ancestorOwners = findOwnerStack(ancestorOwner); + + var minStackLen = Math.min(childOwners.length, ancestorOwners.length); + var i; + + var deepestCommon = -1; + for (i = 0; i < minStackLen; i++) { + if (childOwners[i] === ancestorOwners[i]) { + deepestCommon = i; + } else { + break; + } + } + + var UNKNOWN = '(unknown)'; + var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) { + return inst.getName() || UNKNOWN; + }); + var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) { + return inst.getName() || UNKNOWN; + }); + var ownerInfo = [].concat( + // If the parent and child instances have a common owner ancestor, start + // with that -- otherwise we just start with the parent's owners. + deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag, + // If we're warning about an invalid (non-parent) ancestry, add '...' + invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > '); + + var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo; + if (didWarn[warnKey]) { + return; + } + didWarn[warnKey] = true; + + var tagDisplayName = childTag; + var whitespaceInfo = ''; + if (childTag === '#text') { + if (/\S/.test(childText)) { + tagDisplayName = 'Text nodes'; + } else { + tagDisplayName = 'Whitespace text nodes'; + whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.'; + } + } else { + tagDisplayName = '<' + childTag + '>'; + } + + if (invalidParent) { + var info = ''; + if (ancestorTag === 'table' && childTag === 'tr') { + info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.'; + } + process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0; + } else { + process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0; + } + } + }; + + validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo; + + // For testing + validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo); + }; +} + +module.exports = validateDOMNesting; + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * `charCode` represents the actual "character code" and is safe to use with + * `String.fromCharCode`. As such, only keys that correspond to printable + * characters produce a valid `charCode`, the only exception to this is Enter. + * The Tab-key is considered non-printable and does not have a `charCode`, + * presumably because it does not produce a tab-character in browsers. + * + * @param {object} nativeEvent Native browser event. + * @return {number} Normalized `charCode` property. + */ + +function getEventCharCode(nativeEvent) { + var charCode; + var keyCode = nativeEvent.keyCode; + + if ('charCode' in nativeEvent) { + charCode = nativeEvent.charCode; + + // FF does not set `charCode` for the Enter-key, check against `keyCode`. + if (charCode === 0 && keyCode === 13) { + charCode = 13; + } + } else { + // IE8 does not implement `charCode`, but `keyCode` has the correct value. + charCode = keyCode; + } + + // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. + // Must not discard the (non-)printable Enter-key. + if (charCode >= 32 || charCode === 13) { + return charCode; + } + + return 0; +} + +module.exports = getEventCharCode; + +/***/ }), +/* 161 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(431); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_0__Router__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(248); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_1__Link__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(438); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexLink", function() { return __WEBPACK_IMPORTED_MODULE_2__IndexLink__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(439); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_3__withRouter__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(440); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRedirect", function() { return __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(441); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRoute", function() { return __WEBPACK_IMPORTED_MODULE_5__IndexRoute__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(249); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(442); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(42); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createRoutes", function() { return __WEBPACK_IMPORTED_MODULE_8__RouteUtils__["b"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(163); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "RouterContext", function() { return __WEBPACK_IMPORTED_MODULE_9__RouterContext__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(165); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "locationShape", function() { return __WEBPACK_IMPORTED_MODULE_10__PropTypes__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "routerShape", function() { return __WEBPACK_IMPORTED_MODULE_10__PropTypes__["b"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(443); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "match", function() { return __WEBPACK_IMPORTED_MODULE_11__match__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(253); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useRouterHistory", function() { return __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(76); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formatPattern", function() { return __WEBPACK_IMPORTED_MODULE_13__PatternUtils__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = __webpack_require__(448); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyRouterMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(449); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "browserHistory", function() { return __WEBPACK_IMPORTED_MODULE_15__browserHistory__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(452); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hashHistory", function() { return __WEBPACK_IMPORTED_MODULE_16__hashHistory__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(250); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createMemoryHistory", function() { return __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__["a"]; }); +/* components */ + + + + + + + + + +/* components (configuration) */ + + + + + + + + + + +/* utils */ + + + + + + + + + + + + + + + +/* histories */ + + + + + + + + +/***/ }), +/* 162 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = loopAsync; +/* harmony export (immutable) */ __webpack_exports__["b"] = mapAsync; +function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var sync = false, + hasNext = false, + doneArgs = void 0; + + function done() { + isDone = true; + if (sync) { + // Iterate instead of recursing if possible. + doneArgs = [].concat(Array.prototype.slice.call(arguments)); + return; + } + + callback.apply(this, arguments); + } + + function next() { + if (isDone) { + return; + } + + hasNext = true; + if (sync) { + // Iterate instead of recursing if possible. + return; + } + + sync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work.call(this, currentTurn++, next, done); + } + + sync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(this, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + } + + next(); +} + +function mapAsync(array, work, callback) { + var length = array.length; + var values = []; + + if (length === 0) return callback(null, values); + + var isDone = false, + doneCount = 0; + + function done(index, error, value) { + if (isDone) return; + + if (error) { + isDone = true; + callback(error); + } else { + values[index] = value; + + isDone = ++doneCount === length; + + if (isDone) callback(null, values); + } + } + + array.forEach(function (item, index) { + work(item, index, function (error, value) { + done(index, error, value); + }); + }); +} + +/***/ }), +/* 163 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getRouteParams__ = __webpack_require__(437); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(164); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(42); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + + + + + + + + +var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_1_react___default.a.PropTypes, + array = _React$PropTypes.array, + func = _React$PropTypes.func, + object = _React$PropTypes.object; + +/** + * A <RouterContext> renders the component tree for a given router state + * and sets the history object and the current location in context. + */ + +var RouterContext = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({ + displayName: 'RouterContext', + + + mixins: [__WEBPACK_IMPORTED_MODULE_3__ContextUtils__["a" /* ContextProvider */]('router')], + + propTypes: { + router: object.isRequired, + location: object.isRequired, + routes: array.isRequired, + params: object.isRequired, + components: array.isRequired, + createElement: func.isRequired + }, + + getDefaultProps: function getDefaultProps() { + return { + createElement: __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement + }; + }, + + + childContextTypes: { + router: object.isRequired + }, + + getChildContext: function getChildContext() { + return { + router: this.props.router + }; + }, + createElement: function createElement(component, props) { + return component == null ? null : this.props.createElement(component, props); + }, + render: function render() { + var _this = this; + + var _props = this.props, + location = _props.location, + routes = _props.routes, + params = _props.params, + components = _props.components, + router = _props.router; + + var element = null; + + if (components) { + element = components.reduceRight(function (element, components, index) { + if (components == null) return element; // Don't create new children; use the grandchildren. + + var route = routes[index]; + var routeParams = __WEBPACK_IMPORTED_MODULE_2__getRouteParams__["a" /* default */](route, params); + var props = { + location: location, + params: params, + route: route, + router: router, + routeParams: routeParams, + routes: routes + }; + + if (__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["c" /* isReactChildren */](element)) { + props.children = element; + } else if (element) { + for (var prop in element) { + if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop]; + } + } + + if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) === 'object') { + var elements = {}; + + for (var key in components) { + if (Object.prototype.hasOwnProperty.call(components, key)) { + // Pass through the key as a prop to createElement to allow + // custom createElement functions to know which named component + // they're rendering, for e.g. matching up to fetched data. + elements[key] = _this.createElement(components[key], _extends({ + key: key }, props)); + } + } + + return elements; + } + + return _this.createElement(components, props); + }, element); + } + + !(element === null || element === false || __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element)) ? false ? invariant(false, 'The root route must render a single element') : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; + + return element; + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (RouterContext); + +/***/ }), +/* 164 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = ContextProvider; +/* harmony export (immutable) */ __webpack_exports__["b"] = ContextSubscriber; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); + + +// Works around issues with context updates failing to propagate. +// Caveat: the context value is expected to never change its identity. +// https://github.com/facebook/react/issues/2517 +// https://github.com/reactjs/react-router/issues/470 + +var contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape({ + subscribe: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired, + eventIndex: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].number.isRequired +}); + +function makeContextName(name) { + return '@@contextSubscriber/' + name; +} + +function ContextProvider(name) { + var _childContextTypes, _ref2; + + var contextName = makeContextName(name); + var listenersKey = contextName + '/listeners'; + var eventIndexKey = contextName + '/eventIndex'; + var subscribeKey = contextName + '/subscribe'; + + return _ref2 = { + childContextTypes: (_childContextTypes = {}, _childContextTypes[contextName] = contextProviderShape.isRequired, _childContextTypes), + + getChildContext: function getChildContext() { + var _ref; + + return _ref = {}, _ref[contextName] = { + eventIndex: this[eventIndexKey], + subscribe: this[subscribeKey] + }, _ref; + }, + componentWillMount: function componentWillMount() { + this[listenersKey] = []; + this[eventIndexKey] = 0; + }, + componentWillReceiveProps: function componentWillReceiveProps() { + this[eventIndexKey]++; + }, + componentDidUpdate: function componentDidUpdate() { + var _this = this; + + this[listenersKey].forEach(function (listener) { + return listener(_this[eventIndexKey]); + }); + } + }, _ref2[subscribeKey] = function (listener) { + var _this2 = this; + + // No need to immediately call listener here. + this[listenersKey].push(listener); + + return function () { + _this2[listenersKey] = _this2[listenersKey].filter(function (item) { + return item !== listener; + }); + }; + }, _ref2; +} + +function ContextSubscriber(name) { + var _contextTypes, _ref4; + + var contextName = makeContextName(name); + var lastRenderedEventIndexKey = contextName + '/lastRenderedEventIndex'; + var handleContextUpdateKey = contextName + '/handleContextUpdate'; + var unsubscribeKey = contextName + '/unsubscribe'; + + return _ref4 = { + contextTypes: (_contextTypes = {}, _contextTypes[contextName] = contextProviderShape, _contextTypes), + + getInitialState: function getInitialState() { + var _ref3; + + if (!this.context[contextName]) { + return {}; + } + + return _ref3 = {}, _ref3[lastRenderedEventIndexKey] = this.context[contextName].eventIndex, _ref3; + }, + componentDidMount: function componentDidMount() { + if (!this.context[contextName]) { + return; + } + + this[unsubscribeKey] = this.context[contextName].subscribe(this[handleContextUpdateKey]); + }, + componentWillReceiveProps: function componentWillReceiveProps() { + var _setState; + + if (!this.context[contextName]) { + return; + } + + this.setState((_setState = {}, _setState[lastRenderedEventIndexKey] = this.context[contextName].eventIndex, _setState)); + }, + componentWillUnmount: function componentWillUnmount() { + if (!this[unsubscribeKey]) { + return; + } + + this[unsubscribeKey](); + this[unsubscribeKey] = null; + } + }, _ref4[handleContextUpdateKey] = function (eventIndex) { + if (eventIndex !== this.state[lastRenderedEventIndexKey]) { + var _setState2; + + this.setState((_setState2 = {}, _setState2[lastRenderedEventIndexKey] = eventIndex, _setState2)); + } + }, _ref4; +} + +/***/ }), +/* 165 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return routerShape; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return locationShape; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); + + +var func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + object = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object, + shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape, + string = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string; + + +var routerShape = shape({ + push: func.isRequired, + replace: func.isRequired, + go: func.isRequired, + goBack: func.isRequired, + goForward: func.isRequired, + setRouteLeaveHook: func.isRequired, + isActive: func.isRequired +}); + +var locationShape = shape({ + pathname: string.isRequired, + search: string.isRequired, + state: object, + action: string.isRequired, + key: string +}); + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + + +var REACT_STATICS = { + childContextTypes: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + mixins: true, + propTypes: true, + type: true +}; + +var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + arguments: true, + arity: true +}; + +var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function'; + +module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { + if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components + var keys = Object.getOwnPropertyNames(sourceComponent); + + /* istanbul ignore else */ + if (isGetOwnPropertySymbolsAvailable) { + keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); + } + + for (var i = 0; i < keys.length; ++i) { + if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) { + try { + targetComponent[keys[i]] = sourceComponent[keys[i]]; + } catch (error) { + + } + } + } + } + + return targetComponent; +}; + + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var runTransitionHook = function runTransitionHook(hook, location, callback) { + var result = hook(location, callback); + + if (hook.length < 2) { + // Assume the hook runs synchronously and automatically + // call the callback with the return value. + callback(result); + } else { + false ? (0, _warning2.default)(result === undefined, 'You should not "return" in a transition hook with a callback argument; ' + 'call the callback instead') : void 0; + } +}; + +exports.default = runTransitionHook; + +/***/ }), +/* 168 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _AsyncUtils = __webpack_require__(447); + +var _PathUtils = __webpack_require__(43); + +var _runTransitionHook = __webpack_require__(167); + +var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + +var _Actions = __webpack_require__(109); + +var _LocationUtils = __webpack_require__(77); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createHistory = function createHistory() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var getCurrentLocation = options.getCurrentLocation; + var getUserConfirmation = options.getUserConfirmation; + var pushLocation = options.pushLocation; + var replaceLocation = options.replaceLocation; + var go = options.go; + var keyLength = options.keyLength; + + + var currentLocation = void 0; + var pendingLocation = void 0; + var beforeListeners = []; + var listeners = []; + var allKeys = []; + + var getCurrentIndex = function getCurrentIndex() { + if (pendingLocation && pendingLocation.action === _Actions.POP) return allKeys.indexOf(pendingLocation.key); + + if (currentLocation) return allKeys.indexOf(currentLocation.key); + + return -1; + }; + + var updateLocation = function updateLocation(nextLocation) { + var currentIndex = getCurrentIndex(); + + currentLocation = nextLocation; + + if (currentLocation.action === _Actions.PUSH) { + allKeys = [].concat(allKeys.slice(0, currentIndex + 1), [currentLocation.key]); + } else if (currentLocation.action === _Actions.REPLACE) { + allKeys[currentIndex] = currentLocation.key; + } + + listeners.forEach(function (listener) { + return listener(currentLocation); + }); + }; + + var listenBefore = function listenBefore(listener) { + beforeListeners.push(listener); + + return function () { + return beforeListeners = beforeListeners.filter(function (item) { + return item !== listener; + }); + }; + }; + + var listen = function listen(listener) { + listeners.push(listener); + + return function () { + return listeners = listeners.filter(function (item) { + return item !== listener; + }); + }; + }; + + var confirmTransitionTo = function confirmTransitionTo(location, callback) { + (0, _AsyncUtils.loopAsync)(beforeListeners.length, function (index, next, done) { + (0, _runTransitionHook2.default)(beforeListeners[index], location, function (result) { + return result != null ? done(result) : next(); + }); + }, function (message) { + if (getUserConfirmation && typeof message === 'string') { + getUserConfirmation(message, function (ok) { + return callback(ok !== false); + }); + } else { + callback(message !== false); + } + }); + }; + + var transitionTo = function transitionTo(nextLocation) { + if (currentLocation && (0, _LocationUtils.locationsAreEqual)(currentLocation, nextLocation) || pendingLocation && (0, _LocationUtils.locationsAreEqual)(pendingLocation, nextLocation)) return; // Nothing to do + + pendingLocation = nextLocation; + + confirmTransitionTo(nextLocation, function (ok) { + if (pendingLocation !== nextLocation) return; // Transition was interrupted during confirmation + + pendingLocation = null; + + if (ok) { + // Treat PUSH to same path like REPLACE to be consistent with browsers + if (nextLocation.action === _Actions.PUSH) { + var prevPath = (0, _PathUtils.createPath)(currentLocation); + var nextPath = (0, _PathUtils.createPath)(nextLocation); + + if (nextPath === prevPath && (0, _LocationUtils.statesAreEqual)(currentLocation.state, nextLocation.state)) nextLocation.action = _Actions.REPLACE; + } + + if (nextLocation.action === _Actions.POP) { + updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.PUSH) { + if (pushLocation(nextLocation) !== false) updateLocation(nextLocation); + } else if (nextLocation.action === _Actions.REPLACE) { + if (replaceLocation(nextLocation) !== false) updateLocation(nextLocation); + } + } else if (currentLocation && nextLocation.action === _Actions.POP) { + var prevIndex = allKeys.indexOf(currentLocation.key); + var nextIndex = allKeys.indexOf(nextLocation.key); + + if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL + } + }); + }; + + var push = function push(input) { + return transitionTo(createLocation(input, _Actions.PUSH)); + }; + + var replace = function replace(input) { + return transitionTo(createLocation(input, _Actions.REPLACE)); + }; + + var goBack = function goBack() { + return go(-1); + }; + + var goForward = function goForward() { + return go(1); + }; + + var createKey = function createKey() { + return Math.random().toString(36).substr(2, keyLength || 6); + }; + + var createHref = function createHref(location) { + return (0, _PathUtils.createPath)(location); + }; + + var createLocation = function createLocation(location, action) { + var key = arguments.length <= 2 || arguments[2] === undefined ? createKey() : arguments[2]; + return (0, _LocationUtils.createLocation)(location, action, key); + }; + + return { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + transitionTo: transitionTo, + push: push, + replace: replace, + go: go, + goBack: goBack, + goForward: goForward, + createKey: createKey, + createPath: _PathUtils.createPath, + createHref: createHref, + createLocation: createLocation + }; +}; + +exports.default = createHistory; + +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.go = exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getUserConfirmation = exports.getCurrentLocation = undefined; + +var _LocationUtils = __webpack_require__(77); + +var _DOMUtils = __webpack_require__(110); + +var _DOMStateStorage = __webpack_require__(254); + +var _PathUtils = __webpack_require__(43); + +var _ExecutionEnvironment = __webpack_require__(169); + +var PopStateEvent = 'popstate'; +var HashChangeEvent = 'hashchange'; + +var needsHashchangeListener = _ExecutionEnvironment.canUseDOM && !(0, _DOMUtils.supportsPopstateOnHashchange)(); + +var _createLocation = function _createLocation(historyState) { + var key = historyState && historyState.key; + + return (0, _LocationUtils.createLocation)({ + pathname: window.location.pathname, + search: window.location.search, + hash: window.location.hash, + state: key ? (0, _DOMStateStorage.readState)(key) : undefined + }, undefined, key); +}; + +var getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() { + var historyState = void 0; + try { + historyState = window.history.state || {}; + } catch (error) { + // IE 11 sometimes throws when accessing window.history.state + // See https://github.com/ReactTraining/history/pull/289 + historyState = {}; + } + + return _createLocation(historyState); +}; + +var getUserConfirmation = exports.getUserConfirmation = function getUserConfirmation(message, callback) { + return callback(window.confirm(message)); +}; // eslint-disable-line no-alert + +var startListener = exports.startListener = function startListener(listener) { + var handlePopState = function handlePopState(event) { + if (event.state !== undefined) // Ignore extraneous popstate events in WebKit + listener(_createLocation(event.state)); + }; + + (0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState); + + var handleUnpoppedHashChange = function handleUnpoppedHashChange() { + return listener(getCurrentLocation()); + }; + + if (needsHashchangeListener) { + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + + return function () { + (0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState); + + if (needsHashchangeListener) { + (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleUnpoppedHashChange); + } + }; +}; + +var updateLocation = function updateLocation(location, updateState) { + var state = location.state; + var key = location.key; + + + if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state); + + updateState({ key: key }, (0, _PathUtils.createPath)(location)); +}; + +var pushLocation = exports.pushLocation = function pushLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.pushState(state, null, path); + }); +}; + +var replaceLocation = exports.replaceLocation = function replaceLocation(location) { + return updateLocation(location, function (state, path) { + return window.history.replaceState(state, null, path); + }); +}; + +var go = exports.go = function go(n) { + if (n) window.history.go(n); +}; + +/***/ }), +/* 171 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(258); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(55); + + + + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */](value) || __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) != objectTag) { + return false; + } + var proto = __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */](value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +/* harmony default export */ __webpack_exports__["a"] = (isPlainObject); + + +/***/ }), +/* 172 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_INSERT", function() { return ARRAY_INSERT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_MOVE", function() { return ARRAY_MOVE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_POP", function() { return ARRAY_POP; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_PUSH", function() { return ARRAY_PUSH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_REMOVE", function() { return ARRAY_REMOVE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_REMOVE_ALL", function() { return ARRAY_REMOVE_ALL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_SHIFT", function() { return ARRAY_SHIFT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_SPLICE", function() { return ARRAY_SPLICE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_UNSHIFT", function() { return ARRAY_UNSHIFT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_SWAP", function() { return ARRAY_SWAP; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AUTOFILL", function() { return AUTOFILL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BLUR", function() { return BLUR; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CHANGE", function() { return CHANGE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_SUBMIT", function() { return CLEAR_SUBMIT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_ASYNC_ERROR", function() { return CLEAR_ASYNC_ERROR; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DESTROY", function() { return DESTROY; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOCUS", function() { return FOCUS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INITIALIZE", function() { return INITIALIZE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REGISTER_FIELD", function() { return REGISTER_FIELD; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RESET", function() { return RESET; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SET_SUBMIT_FAILED", function() { return SET_SUBMIT_FAILED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SET_SUBMIT_SUCCEEDED", function() { return SET_SUBMIT_SUCCEEDED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "START_ASYNC_VALIDATION", function() { return START_ASYNC_VALIDATION; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "START_SUBMIT", function() { return START_SUBMIT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STOP_ASYNC_VALIDATION", function() { return STOP_ASYNC_VALIDATION; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STOP_SUBMIT", function() { return STOP_SUBMIT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUBMIT", function() { return SUBMIT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TOUCH", function() { return TOUCH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNREGISTER_FIELD", function() { return UNREGISTER_FIELD; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNTOUCH", function() { return UNTOUCH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_SYNC_ERRORS", function() { return UPDATE_SYNC_ERRORS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_SYNC_WARNINGS", function() { return UPDATE_SYNC_WARNINGS; }); +var ARRAY_INSERT = '@@redux-form/ARRAY_INSERT'; +var ARRAY_MOVE = '@@redux-form/ARRAY_MOVE'; +var ARRAY_POP = '@@redux-form/ARRAY_POP'; +var ARRAY_PUSH = '@@redux-form/ARRAY_PUSH'; +var ARRAY_REMOVE = '@@redux-form/ARRAY_REMOVE'; +var ARRAY_REMOVE_ALL = '@@redux-form/ARRAY_REMOVE_ALL'; +var ARRAY_SHIFT = '@@redux-form/ARRAY_SHIFT'; +var ARRAY_SPLICE = '@@redux-form/ARRAY_SPLICE'; +var ARRAY_UNSHIFT = '@@redux-form/ARRAY_UNSHIFT'; +var ARRAY_SWAP = '@@redux-form/ARRAY_SWAP'; +var AUTOFILL = '@@redux-form/AUTOFILL'; +var BLUR = '@@redux-form/BLUR'; +var CHANGE = '@@redux-form/CHANGE'; +var CLEAR_SUBMIT = '@@redux-form/CLEAR_SUBMIT'; +var CLEAR_ASYNC_ERROR = '@redux-form/CLEAR_ASYNC_ERROR'; +var DESTROY = '@@redux-form/DESTROY'; +var FOCUS = '@@redux-form/FOCUS'; +var INITIALIZE = '@@redux-form/INITIALIZE'; +var REGISTER_FIELD = '@@redux-form/REGISTER_FIELD'; +var RESET = '@@redux-form/RESET'; +var SET_SUBMIT_FAILED = '@@redux-form/SET_SUBMIT_FAILED'; +var SET_SUBMIT_SUCCEEDED = '@@redux-form/SET_SUBMIT_SUCCEEDED'; +var START_ASYNC_VALIDATION = '@@redux-form/START_ASYNC_VALIDATION'; +var START_SUBMIT = '@@redux-form/START_SUBMIT'; +var STOP_ASYNC_VALIDATION = '@@redux-form/STOP_ASYNC_VALIDATION'; +var STOP_SUBMIT = '@@redux-form/STOP_SUBMIT'; +var SUBMIT = '@@redux-form/SUBMIT'; +var TOUCH = '@@redux-form/TOUCH'; +var UNREGISTER_FIELD = '@@redux-form/UNREGISTER_FIELD'; +var UNTOUCH = '@@redux-form/UNTOUCH'; +var UPDATE_SYNC_ERRORS = '@@redux-form/UPDATE_SYNC_ERRORS'; +var UPDATE_SYNC_WARNINGS = '@@redux-form/UPDATE_SYNC_WARNINGS'; + +/***/ }), +/* 173 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__ = __webpack_require__(495); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__ = __webpack_require__(511); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__ = __webpack_require__(513); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__ = __webpack_require__(514); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__ = __webpack_require__(515); + + + + + + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__["a" /* default */]; +MapCache.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__["a" /* default */]; +MapCache.prototype.get = __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__["a" /* default */]; +MapCache.prototype.has = __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__["a" /* default */]; +MapCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (MapCache); + + +/***/ }), +/* 174 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(45); + + + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" /* default */](value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +/* harmony default export */ __webpack_exports__["a"] = (isFunction); + + +/***/ }), +/* 175 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(56); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29); + + + +/* Built-in method references that are verified to be native. */ +var Map = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Map'); + +/* harmony default export */ __webpack_exports__["a"] = (Map); + + +/***/ }), +/* 176 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(116); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stackClear_js__ = __webpack_require__(520); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__ = __webpack_require__(521); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stackGet_js__ = __webpack_require__(522); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stackHas_js__ = __webpack_require__(523); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stackSet_js__ = __webpack_require__(524); + + + + + + + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */](entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = __WEBPACK_IMPORTED_MODULE_1__stackClear_js__["a" /* default */]; +Stack.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__["a" /* default */]; +Stack.prototype.get = __WEBPACK_IMPORTED_MODULE_3__stackGet_js__["a" /* default */]; +Stack.prototype.has = __WEBPACK_IMPORTED_MODULE_4__stackHas_js__["a" /* default */]; +Stack.prototype.set = __WEBPACK_IMPORTED_MODULE_5__stackSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (Stack); + + +/***/ }), +/* 177 */ +/***/ (function(module, exports) { + +module.exports = function(originalModule) { + if(!originalModule.webpackPolyfill) { + var module = Object.create(originalModule); + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + Object.defineProperty(module, "exports", { + enumerable: true, + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), +/* 178 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/* harmony default export */ __webpack_exports__["a"] = (isPrototype); + + +/***/ }), +/* 179 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__ = __webpack_require__(532); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(55); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */](function() { return arguments; }()) ? __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */] : function(value) { + return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +/* harmony default export */ __webpack_exports__["a"] = (isArguments); + + +/***/ }), +/* 180 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/* harmony default export */ __webpack_exports__["a"] = (isLength); + + +/***/ }), +/* 181 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__ = __webpack_require__(534); + + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isBuffer); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(177)(module))) + +/***/ }), +/* 182 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__ = __webpack_require__(535); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(536); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(537); + + + + +/* Node.js helper references. */ +var nodeIsTypedArray = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */](nodeIsTypedArray) : __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isTypedArray); + + +/***/ }), +/* 183 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/* harmony default export */ __webpack_exports__["a"] = (isIndex); + + +/***/ }), +/* 184 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +/* harmony default export */ __webpack_exports__["a"] = (identity); + + +/***/ }), +/* 185 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(279); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__ = __webpack_require__(554); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(120); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */](object) ? __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */](object) : __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__["a" /* default */](object); +} + +/* harmony default export */ __webpack_exports__["a"] = (keys); + + +/***/ }), +/* 186 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__ = __webpack_require__(559); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(55); + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && !__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](other))) { + return value !== value && other !== other; + } + return __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__["a" /* default */](value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsEqual); + + +/***/ }), +/* 187 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(114); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */](value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" /* default */](value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (isKey); + + +/***/ }), +/* 188 */ +/***/ (function(module, exports) { + +module.exports = isPromise; + +function isPromise(obj) { + return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; +} + + +/***/ }), +/* 189 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hasError__ = __webpack_require__(602); + + +var createIsValid = function createIsValid(structure) { + var getIn = structure.getIn, + keys = structure.keys; + + var hasError = __WEBPACK_IMPORTED_MODULE_0__hasError__["a" /* default */](structure); + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + var ignoreSubmitErrors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + return function (state) { + var formState = getFormState(state); + var syncError = getIn(formState, form + '.syncError'); + if (syncError) { + return false; + } + if (!ignoreSubmitErrors) { + var error = getIn(formState, form + '.error'); + if (error) { + return false; + } + } + var syncErrors = getIn(formState, form + '.syncErrors'); + var asyncErrors = getIn(formState, form + '.asyncErrors'); + var submitErrors = ignoreSubmitErrors ? undefined : getIn(formState, form + '.submitErrors'); + if (!syncErrors && !asyncErrors && !submitErrors) { + return true; + } + + var registeredFields = getIn(formState, form + '.registeredFields'); + if (!registeredFields) { + return true; + } + + return !keys(registeredFields).filter(function (name) { + return getIn(registeredFields, '[\'' + name + '\'].count') > 0; + }).some(function (name) { + return hasError(getIn(registeredFields, '[\'' + name + '\']'), syncErrors, asyncErrors, submitErrors); + }); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsValid); + +/***/ }), +/* 190 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(291); + + + +var customizer = function customizer(objectValue, otherValue, indexOrkey, object, other, stack) { + // https://lodash.com/docs/4.17.4#isEqualWith + if (stack) { + // Shallow compares + // For 1st level, stack === undefined. + // -> Do nothing (and implicitly return undefined so that it goes to compare 2nd level) + // For 2nd level and up, stack !== undefined. + // -> Compare by === operator + return objectValue === otherValue; + } +}; + +var shallowCompare = function shallowCompare(instance, nextProps, nextState) { + return !__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](instance.props, nextProps, customizer) || !__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](instance.state, nextState, customizer); +}; + +/* harmony default export */ __webpack_exports__["a"] = (shallowCompare); + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(34) + , dPs = __webpack_require__(637) + , enumBugKeys = __webpack_require__(142) + , IE_PROTO = __webpack_require__(140)('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(135)('iframe') + , i = enumBugKeys.length + , lt = '<' + , gt = '>' + , iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(297).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties){ + var result; + if(O !== null){ + Empty[PROTOTYPE] = anObject(O); + result = new Empty; + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(23); + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(25) + , core = __webpack_require__(18) + , LIBRARY = __webpack_require__(122) + , wksExt = __webpack_require__(192) + , defineProperty = __webpack_require__(33).f; +module.exports = function(name){ + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); +}; + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(655), __esModule: true }; + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(196) + , ITERATOR = __webpack_require__(23)('iterator') + , Iterators = __webpack_require__(80); +module.exports = __webpack_require__(18).getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(85) + , TAG = __webpack_require__(23)('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function(it, key){ + try { + return it[key]; + } catch(e){ /* empty */ } +}; + +module.exports = function(it){ + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + iconSize: 24, + + desktopGutter: 24, + desktopGutterMore: 32, + desktopGutterLess: 16, + desktopGutterMini: 8, + desktopKeylineIncrement: 64, + desktopDropDownMenuItemHeight: 32, + desktopDropDownMenuFontSize: 15, + desktopDrawerMenuItemHeight: 48, + desktopSubheaderHeight: 48, + desktopToolbarHeight: 56 +}; + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +// helper to capitalize strings + +exports.default = function (str) { + return str.charAt(0).toUpperCase() + str.slice(1); +}; + +module.exports = exports["default"]; + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (value) { + if (Array.isArray(value)) value = value.join(','); + + return value.match(/-webkit-|-moz-|-ms-/) !== null; +}; + +module.exports = exports['default']; + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _Subheader = __webpack_require__(314); + +var _Subheader2 = _interopRequireDefault(_Subheader); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var List = function (_Component) { + (0, _inherits3.default)(List, _Component); + + function List() { + (0, _classCallCheck3.default)(this, List); + return (0, _possibleConstructorReturn3.default)(this, (List.__proto__ || (0, _getPrototypeOf2.default)(List)).apply(this, arguments)); + } + + (0, _createClass3.default)(List, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var hasSubheader = false; + + var firstChild = _react.Children.toArray(children)[0]; + if ((0, _react.isValidElement)(firstChild) && firstChild.type === _Subheader2.default) { + hasSubheader = true; + } + + var styles = { + root: { + padding: (hasSubheader ? 0 : 8) + 'px 0px 8px 0px' + } + }; + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + children + ); + } + }]); + return List; +}(_react.Component); + +List.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? List.propTypes = { + /** + * These are usually `ListItem`s that are passed to + * be part of the list. + */ + children: _react.PropTypes.node, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = List; + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + once: function once(el, type, callback) { + var typeArray = type ? type.split(' ') : []; + var recursiveFunction = function recursiveFunction(event) { + event.target.removeEventListener(event.type, recursiveFunction); + return callback(event); + }; + + for (var i = typeArray.length - 1; i >= 0; i--) { + this.on(el, typeArray[i], recursiveFunction); + } + }, + on: function on(el, type, callback) { + if (el.addEventListener) { + el.addEventListener(type, callback); + } else { + // IE8+ Support + el.attachEvent('on' + type, function () { + callback.call(el); + }); + } + }, + off: function off(el, type, callback) { + if (el.removeEventListener) { + el.removeEventListener(type, callback); + } else { + // IE8+ Support + el.detachEvent('on' + type, callback); + } + }, + isKeyboard: function isKeyboard(event) { + return ['keydown', 'keypress', 'keyup'].indexOf(event.type) !== -1; + } +}; + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(60); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _autoPrefix = __webpack_require__(95); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _ScaleIn = __webpack_require__(707); + +var _ScaleIn2 = _interopRequireDefault(_ScaleIn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var pulsateDuration = 750; + +var FocusRipple = function (_Component) { + (0, _inherits3.default)(FocusRipple, _Component); + + function FocusRipple() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, FocusRipple); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FocusRipple.__proto__ || (0, _getPrototypeOf2.default)(FocusRipple)).call.apply(_ref, [this].concat(args))), _this), _this.pulsate = function () { + var innerCircle = _reactDom2.default.findDOMNode(_this.refs.innerCircle); + if (!innerCircle) return; + + var startScale = 'scale(1)'; + var endScale = 'scale(0.85)'; + var currentScale = innerCircle.style.transform || startScale; + var nextScale = currentScale === startScale ? endScale : startScale; + + _autoPrefix2.default.set(innerCircle.style, 'transform', nextScale); + _this.timeout = setTimeout(_this.pulsate, pulsateDuration); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(FocusRipple, [{ + key: 'componentDidMount', + value: function componentDidMount() { + if (this.props.show) { + this.setRippleSize(); + this.pulsate(); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + if (this.props.show) { + this.setRippleSize(); + this.pulsate(); + } else { + if (this.timeout) clearTimeout(this.timeout); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.timeout); + } + }, { + key: 'getRippleElement', + value: function getRippleElement(props) { + var color = props.color, + innerStyle = props.innerStyle, + opacity = props.opacity; + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + ripple = _context$muiTheme.ripple; + + + var innerStyles = (0, _simpleAssign2.default)({ + position: 'absolute', + height: '100%', + width: '100%', + borderRadius: '50%', + opacity: opacity ? opacity : 0.16, + backgroundColor: color || ripple.color, + transition: _transitions2.default.easeOut(pulsateDuration + 'ms', 'transform', null, _transitions2.default.easeInOutFunction) + }, innerStyle); + + return _react2.default.createElement('div', { ref: 'innerCircle', style: prepareStyles((0, _simpleAssign2.default)({}, innerStyles)) }); + } + }, { + key: 'setRippleSize', + value: function setRippleSize() { + var el = _reactDom2.default.findDOMNode(this.refs.innerCircle); + var height = el.offsetHeight; + var width = el.offsetWidth; + var size = Math.max(height, width); + + var oldTop = 0; + // For browsers that don't support endsWith() + if (el.style.top.indexOf('px', el.style.top.length - 2) !== -1) { + oldTop = parseInt(el.style.top); + } + el.style.height = size + 'px'; + el.style.top = height / 2 - size / 2 + oldTop + 'px'; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + show = _props.show, + style = _props.style; + + + var mergedRootStyles = (0, _simpleAssign2.default)({ + height: '100%', + width: '100%', + position: 'absolute', + top: 0, + left: 0 + }, style); + + var ripple = show ? this.getRippleElement(this.props) : null; + + return _react2.default.createElement( + _ScaleIn2.default, + { + maxScale: 0.85, + style: mergedRootStyles + }, + ripple + ); + } + }]); + return FocusRipple; +}(_react.Component); + +FocusRipple.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? FocusRipple.propTypes = { + color: _react.PropTypes.string, + innerStyle: _react.PropTypes.object, + opacity: _react.PropTypes.number, + show: _react.PropTypes.bool, + style: _react.PropTypes.object +} : void 0; +exports.default = FocusRipple; + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _toArray2 = __webpack_require__(317); + +var _toArray3 = _interopRequireDefault(_toArray2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(60); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _ClickAwayListener = __webpack_require__(204); + +var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener); + +var _keycode = __webpack_require__(27); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _propTypes = __webpack_require__(38); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _List = __webpack_require__(200); + +var _List2 = _interopRequireDefault(_List); + +var _menuUtils = __webpack_require__(746); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var desktop = props.desktop, + maxHeight = props.maxHeight, + width = props.width; + var muiTheme = context.muiTheme; + + + var styles = { + root: { + // Nested div bacause the List scales x faster than it scales y + zIndex: muiTheme.zIndex.menu, + maxHeight: maxHeight, + overflowY: maxHeight ? 'auto' : null + }, + divider: { + marginTop: 7, + marginBottom: 8 + }, + list: { + display: 'table-cell', + paddingBottom: desktop ? 16 : 8, + paddingTop: desktop ? 16 : 8, + userSelect: 'none', + width: width + }, + selectedMenuItem: { + color: muiTheme.menuItem.selectedTextColor + } + }; + + return styles; +} + +var Menu = function (_Component) { + (0, _inherits3.default)(Menu, _Component); + + function Menu(props, context) { + (0, _classCallCheck3.default)(this, Menu); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Menu.__proto__ || (0, _getPrototypeOf2.default)(Menu)).call(this, props, context)); + + _initialiseProps.call(_this); + + var filteredChildren = _this.getFilteredChildren(props.children); + var selectedIndex = _this.getSelectedIndex(props, filteredChildren); + + var newFocusIndex = props.disableAutoFocus ? -1 : selectedIndex >= 0 ? selectedIndex : 0; + if (newFocusIndex !== -1 && props.onMenuItemFocusChange) { + props.onMenuItemFocusChange(null, newFocusIndex); + } + _this.state = { + focusIndex: newFocusIndex, + isKeyboardFocused: props.initiallyKeyboardFocused, + keyWidth: props.desktop ? 64 : 56 + }; + + _this.hotKeyHolder = new _menuUtils.HotKeyHolder(); + return _this; + } + + (0, _createClass3.default)(Menu, [{ + key: 'componentDidMount', + value: function componentDidMount() { + if (this.props.autoWidth) { + this.setWidth(); + } + this.setScollPosition(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var filteredChildren = this.getFilteredChildren(nextProps.children); + var selectedIndex = this.getSelectedIndex(nextProps, filteredChildren); + + var newFocusIndex = nextProps.disableAutoFocus ? -1 : selectedIndex >= 0 ? selectedIndex : 0; + if (newFocusIndex !== this.state.focusIndex && this.props.onMenuItemFocusChange) { + this.props.onMenuItemFocusChange(null, newFocusIndex); + } + this.setState({ + focusIndex: newFocusIndex, + keyWidth: nextProps.desktop ? 64 : 56 + }); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + if (this.props.autoWidth) this.setWidth(); + } + }, { + key: 'getValueLink', + + + // Do not use outside of this component, it will be removed once valueLink is deprecated + value: function getValueLink(props) { + return props.valueLink || { + value: props.value, + requestChange: props.onChange + }; + } + }, { + key: 'setKeyboardFocused', + value: function setKeyboardFocused(keyboardFocused) { + this.setState({ + isKeyboardFocused: keyboardFocused + }); + } + }, { + key: 'getFilteredChildren', + value: function getFilteredChildren(children) { + var filteredChildren = []; + _react2.default.Children.forEach(children, function (child) { + if (child) { + filteredChildren.push(child); + } + }); + return filteredChildren; + } + }, { + key: 'cloneMenuItem', + value: function cloneMenuItem(child, childIndex, styles, index) { + var _this2 = this; + + var _props = this.props, + desktop = _props.desktop, + menuItemStyle = _props.menuItemStyle, + selectedMenuItemStyle = _props.selectedMenuItemStyle; + + + var selected = this.isChildSelected(child, this.props); + var selectedChildrenStyles = {}; + + if (selected) { + selectedChildrenStyles = (0, _simpleAssign2.default)(styles.selectedMenuItem, selectedMenuItemStyle); + } + + var mergedChildrenStyles = (0, _simpleAssign2.default)({}, child.props.style, menuItemStyle, selectedChildrenStyles); + + var isFocused = childIndex === this.state.focusIndex; + var focusState = 'none'; + if (isFocused) { + focusState = this.state.isKeyboardFocused ? 'keyboard-focused' : 'focused'; + } + + return _react2.default.cloneElement(child, { + desktop: desktop, + focusState: focusState, + onTouchTap: function onTouchTap(event) { + _this2.handleMenuItemTouchTap(event, child, index); + if (child.props.onTouchTap) child.props.onTouchTap(event); + }, + ref: isFocused ? 'focusedMenuItem' : null, + style: mergedChildrenStyles + }); + } + }, { + key: 'decrementKeyboardFocusIndex', + value: function decrementKeyboardFocusIndex(event) { + var index = this.state.focusIndex; + + index--; + if (index < 0) index = 0; + + this.setFocusIndex(event, index, true); + } + }, { + key: 'getMenuItemCount', + value: function getMenuItemCount(filteredChildren) { + var menuItemCount = 0; + filteredChildren.forEach(function (child) { + var childIsADivider = child.type && child.type.muiName === 'Divider'; + var childIsDisabled = child.props.disabled; + if (!childIsADivider && !childIsDisabled) menuItemCount++; + }); + return menuItemCount; + } + }, { + key: 'getSelectedIndex', + value: function getSelectedIndex(props, filteredChildren) { + var _this3 = this; + + var selectedIndex = -1; + var menuItemIndex = 0; + + filteredChildren.forEach(function (child) { + var childIsADivider = child.type && child.type.muiName === 'Divider'; + + if (_this3.isChildSelected(child, props)) selectedIndex = menuItemIndex; + if (!childIsADivider) menuItemIndex++; + }); + + return selectedIndex; + } + }, { + key: 'setFocusIndexStartsWith', + value: function setFocusIndexStartsWith(event, keys) { + var foundIndex = -1; + _react2.default.Children.forEach(this.props.children, function (child, index) { + if (foundIndex >= 0) { + return; + } + var primaryText = child.props.primaryText; + + if (typeof primaryText === 'string' && new RegExp('^' + keys, 'i').test(primaryText)) { + foundIndex = index; + } + }); + if (foundIndex >= 0) { + this.setFocusIndex(event, foundIndex, true); + return true; + } + return false; + } + }, { + key: 'handleMenuItemTouchTap', + value: function handleMenuItemTouchTap(event, item, index) { + var children = this.props.children; + var multiple = this.props.multiple; + var valueLink = this.getValueLink(this.props); + var menuValue = valueLink.value; + var itemValue = item.props.value; + var focusIndex = _react2.default.isValidElement(children) ? 0 : children.indexOf(item); + + this.setFocusIndex(event, focusIndex, false); + + if (multiple) { + var itemIndex = menuValue.indexOf(itemValue); + + var _menuValue = (0, _toArray3.default)(menuValue), + newMenuValue = _menuValue; + + if (itemIndex === -1) { + newMenuValue.push(itemValue); + } else { + newMenuValue.splice(itemIndex, 1); + } + + valueLink.requestChange(event, newMenuValue); + } else if (!multiple && itemValue !== menuValue) { + valueLink.requestChange(event, itemValue); + } + + this.props.onItemTouchTap(event, item, index); + } + }, { + key: 'incrementKeyboardFocusIndex', + value: function incrementKeyboardFocusIndex(event, filteredChildren) { + var index = this.state.focusIndex; + var maxIndex = this.getMenuItemCount(filteredChildren) - 1; + + index++; + if (index > maxIndex) index = maxIndex; + + this.setFocusIndex(event, index, true); + } + }, { + key: 'isChildSelected', + value: function isChildSelected(child, props) { + var menuValue = this.getValueLink(props).value; + var childValue = child.props.value; + + if (props.multiple) { + return menuValue.length && menuValue.indexOf(childValue) !== -1; + } else { + return child.props.hasOwnProperty('value') && menuValue === childValue; + } + } + }, { + key: 'setFocusIndex', + value: function setFocusIndex(event, newIndex, isKeyboardFocused) { + if (this.props.onMenuItemFocusChange) { + // Do this even if `newIndex === this.state.focusIndex` to allow users + // to detect up-arrow on the first MenuItem or down-arrow on the last. + this.props.onMenuItemFocusChange(event, newIndex); + } + this.setState({ + focusIndex: newIndex, + isKeyboardFocused: isKeyboardFocused + }); + } + }, { + key: 'setScollPosition', + value: function setScollPosition() { + var desktop = this.props.desktop; + var focusedMenuItem = this.refs.focusedMenuItem; + var menuItemHeight = desktop ? 32 : 48; + + if (focusedMenuItem) { + var selectedOffSet = _reactDom2.default.findDOMNode(focusedMenuItem).offsetTop; + + // Make the focused item be the 2nd item in the list the user sees + var scrollTop = selectedOffSet - menuItemHeight; + if (scrollTop < menuItemHeight) scrollTop = 0; + + _reactDom2.default.findDOMNode(this.refs.scrollContainer).scrollTop = scrollTop; + } + } + }, { + key: 'cancelScrollEvent', + value: function cancelScrollEvent(event) { + event.stopPropagation(); + event.preventDefault(); + return false; + } + }, { + key: 'setWidth', + value: function setWidth() { + var el = _reactDom2.default.findDOMNode(this); + var listEl = _reactDom2.default.findDOMNode(this.refs.list); + var elWidth = el.offsetWidth; + var keyWidth = this.state.keyWidth; + var minWidth = keyWidth * 1.5; + var keyIncrements = elWidth / keyWidth; + var newWidth = void 0; + + keyIncrements = keyIncrements <= 1.5 ? 1.5 : Math.ceil(keyIncrements); + newWidth = keyIncrements * keyWidth; + + if (newWidth < minWidth) newWidth = minWidth; + + el.style.width = newWidth + 'px'; + listEl.style.width = newWidth + 'px'; + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + + var _props2 = this.props, + autoWidth = _props2.autoWidth, + children = _props2.children, + desktop = _props2.desktop, + disableAutoFocus = _props2.disableAutoFocus, + initiallyKeyboardFocused = _props2.initiallyKeyboardFocused, + listStyle = _props2.listStyle, + maxHeight = _props2.maxHeight, + multiple = _props2.multiple, + onItemTouchTap = _props2.onItemTouchTap, + onEscKeyDown = _props2.onEscKeyDown, + onMenuItemFocusChange = _props2.onMenuItemFocusChange, + selectedMenuItemStyle = _props2.selectedMenuItemStyle, + menuItemStyle = _props2.menuItemStyle, + style = _props2.style, + value = _props2.value, + valueLink = _props2.valueLink, + width = _props2.width, + other = (0, _objectWithoutProperties3.default)(_props2, ['autoWidth', 'children', 'desktop', 'disableAutoFocus', 'initiallyKeyboardFocused', 'listStyle', 'maxHeight', 'multiple', 'onItemTouchTap', 'onEscKeyDown', 'onMenuItemFocusChange', 'selectedMenuItemStyle', 'menuItemStyle', 'style', 'value', 'valueLink', 'width']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style); + var mergedListStyles = (0, _simpleAssign2.default)(styles.list, listStyle); + + var filteredChildren = this.getFilteredChildren(children); + + var menuItemIndex = 0; + var newChildren = _react2.default.Children.map(filteredChildren, function (child, index) { + var childIsDisabled = child.props.disabled; + var childName = child.type ? child.type.muiName : ''; + var newChild = child; + + switch (childName) { + case 'MenuItem': + newChild = childIsDisabled ? _react2.default.cloneElement(child, { desktop: desktop }) : _this4.cloneMenuItem(child, menuItemIndex, styles, index); + break; + + case 'Divider': + newChild = _react2.default.cloneElement(child, { + style: (0, _simpleAssign2.default)({}, styles.divider, child.props.style) + }); + break; + } + + if (childName === 'MenuItem' && !childIsDisabled) { + menuItemIndex++; + } + + return newChild; + }); + + return _react2.default.createElement( + _ClickAwayListener2.default, + { onClickAway: this.handleClickAway }, + _react2.default.createElement( + 'div', + { + onKeyDown: this.handleKeyDown, + onWheel: this.handleOnWheel, + style: prepareStyles(mergedRootStyles), + ref: 'scrollContainer' + }, + _react2.default.createElement( + _List2.default, + (0, _extends3.default)({}, other, { + ref: 'list', + style: mergedListStyles + }), + newChildren + ) + ) + ); + } + }]); + return Menu; +}(_react.Component); + +Menu.defaultProps = { + autoWidth: true, + desktop: false, + disableAutoFocus: false, + initiallyKeyboardFocused: false, + maxHeight: null, + multiple: false, + onChange: function onChange() {}, + onEscKeyDown: function onEscKeyDown() {}, + onItemTouchTap: function onItemTouchTap() {}, + onKeyDown: function onKeyDown() {} +}; +Menu.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +var _initialiseProps = function _initialiseProps() { + var _this5 = this; + + this.handleClickAway = function (event) { + if (event.defaultPrevented) { + return; + } + + _this5.setFocusIndex(event, -1, false); + }; + + this.handleKeyDown = function (event) { + var filteredChildren = _this5.getFilteredChildren(_this5.props.children); + var key = (0, _keycode2.default)(event); + switch (key) { + case 'down': + event.preventDefault(); + _this5.incrementKeyboardFocusIndex(event, filteredChildren); + break; + case 'esc': + _this5.props.onEscKeyDown(event); + break; + case 'tab': + event.preventDefault(); + if (event.shiftKey) { + _this5.decrementKeyboardFocusIndex(event); + } else { + _this5.incrementKeyboardFocusIndex(event, filteredChildren); + } + break; + case 'up': + event.preventDefault(); + _this5.decrementKeyboardFocusIndex(event); + break; + default: + if (key && key.length === 1) { + var hotKeys = _this5.hotKeyHolder.append(key); + if (_this5.setFocusIndexStartsWith(event, hotKeys)) { + event.preventDefault(); + } + } + } + _this5.props.onKeyDown(event); + }; + + this.handleOnWheel = function (event) { + var scrollContainer = _this5.refs.scrollContainer; + // Only scroll lock if the the Menu is scrollable. + if (scrollContainer.scrollHeight <= scrollContainer.clientHeight) return; + + var scrollTop = scrollContainer.scrollTop, + scrollHeight = scrollContainer.scrollHeight, + clientHeight = scrollContainer.clientHeight; + + var wheelDelta = event.deltaY; + var isDeltaPositive = wheelDelta > 0; + + if (isDeltaPositive && wheelDelta > scrollHeight - clientHeight - scrollTop) { + scrollContainer.scrollTop = scrollHeight; + return _this5.cancelScrollEvent(event); + } else if (!isDeltaPositive && -wheelDelta > scrollTop) { + scrollContainer.scrollTop = 0; + return _this5.cancelScrollEvent(event); + } + }; +}; + + false ? Menu.propTypes = { + /** + * If true, the width of the menu will be set automatically + * according to the widths of its children, + * using proper keyline increments (64px for desktop, + * 56px otherwise). + */ + autoWidth: _react.PropTypes.bool, + /** + * The content of the menu. This is usually used to pass `MenuItem` + * elements. + */ + children: _react.PropTypes.node, + /** + * If true, the menu item will render with compact desktop styles. + */ + desktop: _react.PropTypes.bool, + /** + * If true, the menu will not be auto-focused. + */ + disableAutoFocus: _react.PropTypes.bool, + /** + * If true, the menu will be keyboard-focused initially. + */ + initiallyKeyboardFocused: _react.PropTypes.bool, + /** + * Override the inline-styles of the underlying `List` element. + */ + listStyle: _react.PropTypes.object, + /** + * The maximum height of the menu in pixels. If specified, + * the menu will be scrollable if it is taller than the provided + * height. + */ + maxHeight: _react.PropTypes.number, + /** + * Override the inline-styles of menu items. + */ + menuItemStyle: _react.PropTypes.object, + /** + * If true, `value` must be an array and the menu will support + * multiple selections. + */ + multiple: _react.PropTypes.bool, + /** + * Callback function fired when a menu item with `value` not + * equal to the current `value` of the menu is touch-tapped. + * + * @param {object} event TouchTap event targeting the menu item. + * @param {any} value If `multiple` is true, the menu's `value` + * array with either the menu item's `value` added (if + * it wasn't already selected) or omitted (if it was already selected). + * Otherwise, the `value` of the menu item. + */ + onChange: _react.PropTypes.func, + /** + * Callback function fired when the menu is focused and the *Esc* key + * is pressed. + * + * @param {object} event `keydown` event targeting the menu. + */ + onEscKeyDown: _react.PropTypes.func, + /** + * Callback function fired when a menu item is touch-tapped. + * + * @param {object} event TouchTap event targeting the menu item. + * @param {object} menuItem The menu item. + * @param {number} index The index of the menu item. + */ + onItemTouchTap: _react.PropTypes.func, + /** @ignore */ + onKeyDown: _react.PropTypes.func, + /** + * Callback function fired when the focus on a `MenuItem` is changed. + * There will be some "duplicate" changes reported if two different + * focusing event happen, for example if a `MenuItem` is focused via + * the keyboard and then it is clicked on. + * + * @param {object} event The event that triggered the focus change. + * The event can be null since the focus can be changed for non-event + * reasons such as prop changes. + * @param {number} newFocusIndex The index of the newly focused + * `MenuItem` or `-1` if focus was lost. + */ + onMenuItemFocusChange: _react.PropTypes.func, + /** + * Override the inline-styles of selected menu items. + */ + selectedMenuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * If `multiple` is true, an array of the `value`s of the selected + * menu items. Otherwise, the `value` of the selected menu item. + * If provided, the menu will be a controlled component. + * This component also supports valueLink. + */ + value: _react.PropTypes.any, + /** + * ValueLink for the menu's `value`. + */ + valueLink: _react.PropTypes.object, + /** + * The width of the menu. If not specified, the menu's width + * will be set according to the widths of its children, using + * proper keyline increments (64px for desktop, 56px otherwise). + */ + width: _propTypes2.default.stringOrNumber +} : void 0; +exports.default = Menu; + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _events = __webpack_require__(201); + +var _events2 = _interopRequireDefault(_events); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isDescendant = function isDescendant(el, target) { + if (target !== null) { + return el === target || isDescendant(el, target.parentNode); + } + return false; +}; + +var clickAwayEvents = ['mouseup', 'touchend']; +var bind = function bind(callback) { + return clickAwayEvents.forEach(function (event) { + return _events2.default.on(document, event, callback); + }); +}; +var unbind = function unbind(callback) { + return clickAwayEvents.forEach(function (event) { + return _events2.default.off(document, event, callback); + }); +}; + +var ClickAwayListener = function (_Component) { + (0, _inherits3.default)(ClickAwayListener, _Component); + + function ClickAwayListener() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClickAwayListener); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClickAwayListener.__proto__ || (0, _getPrototypeOf2.default)(ClickAwayListener)).call.apply(_ref, [this].concat(args))), _this), _this.handleClickAway = function (event) { + if (event.defaultPrevented) { + return; + } + + // IE11 support, which trigger the handleClickAway even after the unbind + if (_this.isCurrentlyMounted) { + var el = _reactDom2.default.findDOMNode(_this); + + if (document.documentElement.contains(event.target) && !isDescendant(el, event.target)) { + _this.props.onClickAway(event); + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClickAwayListener, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.isCurrentlyMounted = true; + if (this.props.onClickAway) { + bind(this.handleClickAway); + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps) { + if (prevProps.onClickAway !== this.props.onClickAway) { + unbind(this.handleClickAway); + if (this.props.onClickAway) { + bind(this.handleClickAway); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.isCurrentlyMounted = false; + unbind(this.handleClickAway); + } + }, { + key: 'render', + value: function render() { + return this.props.children; + } + }]); + return ClickAwayListener; +}(_react.Component); + + false ? ClickAwayListener.propTypes = { + children: _react.PropTypes.element, + onClickAway: _react.PropTypes.func +} : void 0; +exports.default = ClickAwayListener; + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Checkbox = __webpack_require__(760); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Checkbox2.default; + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(39); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(27); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _FocusRipple = __webpack_require__(202); + +var _FocusRipple2 = _interopRequireDefault(_FocusRipple); + +var _TouchRipple = __webpack_require__(316); + +var _TouchRipple2 = _interopRequireDefault(_TouchRipple); + +var _Paper = __webpack_require__(31); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var baseTheme = context.muiTheme.baseTheme; + + + return { + root: { + cursor: props.disabled ? 'not-allowed' : 'pointer', + position: 'relative', + overflow: 'visible', + display: 'table', + height: 'auto', + width: '100%' + }, + input: { + position: 'absolute', + cursor: 'inherit', + pointerEvents: 'all', + opacity: 0, + width: '100%', + height: '100%', + zIndex: 2, + left: 0, + boxSizing: 'border-box', + padding: 0, + margin: 0 + }, + controls: { + display: 'flex', + width: '100%', + height: '100%' + }, + label: { + float: 'left', + position: 'relative', + display: 'block', + width: 'calc(100% - 60px)', + lineHeight: '24px', + color: baseTheme.palette.textColor, + fontFamily: baseTheme.fontFamily + }, + wrap: { + transition: _transitions2.default.easeOut(), + float: 'left', + position: 'relative', + display: 'block', + flexShrink: 0, + width: 60 - baseTheme.spacing.desktopGutterLess, + marginRight: props.labelPosition === 'right' ? baseTheme.spacing.desktopGutterLess : 0, + marginLeft: props.labelPosition === 'left' ? baseTheme.spacing.desktopGutterLess : 0 + }, + ripple: { + color: props.rippleColor || baseTheme.palette.primary1Color, + height: '200%', + width: '200%', + top: -12, + left: -12 + } + }; +} + +var EnhancedSwitch = function (_Component) { + (0, _inherits3.default)(EnhancedSwitch, _Component); + + function EnhancedSwitch() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, EnhancedSwitch); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedSwitch.__proto__ || (0, _getPrototypeOf2.default)(EnhancedSwitch)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + isKeyboardFocused: false + }, _this.handleChange = function (event) { + _this.tabPressed = false; + _this.setState({ + isKeyboardFocused: false + }); + + var isInputChecked = _this.refs.checkbox.checked; + + if (!_this.props.hasOwnProperty('checked') && _this.props.onParentShouldUpdate) { + _this.props.onParentShouldUpdate(isInputChecked); + } + + if (_this.props.onSwitch) { + _this.props.onSwitch(event, isInputChecked); + } + }, _this.handleKeyDown = function (event) { + var code = (0, _keycode2.default)(event); + + if (code === 'tab') { + _this.tabPressed = true; + } + if (_this.state.isKeyboardFocused && code === 'space') { + _this.handleChange(event); + } + }, _this.handleKeyUp = function (event) { + if (_this.state.isKeyboardFocused && (0, _keycode2.default)(event) === 'space') { + _this.handleChange(event); + } + }, _this.handleMouseDown = function (event) { + // only listen to left clicks + if (event.button === 0) { + _this.refs.touchRipple.start(event); + } + }, _this.handleMouseUp = function () { + _this.refs.touchRipple.end(); + }, _this.handleMouseLeave = function () { + _this.refs.touchRipple.end(); + }, _this.handleTouchStart = function (event) { + _this.refs.touchRipple.start(event); + }, _this.handleTouchEnd = function () { + _this.refs.touchRipple.end(); + }, _this.handleBlur = function (event) { + _this.setState({ + isKeyboardFocused: false + }); + + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleFocus = function (event) { + // setTimeout is needed becuase the focus event fires first + // Wait so that we can capture if this was a keyboard focus + // or touch focus + setTimeout(function () { + if (_this.tabPressed) { + _this.setState({ + isKeyboardFocused: true + }); + } + }, 150); + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(EnhancedSwitch, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var inputNode = this.refs.checkbox; + if ((!this.props.switched || inputNode.checked !== this.props.switched) && this.props.onParentShouldUpdate) { + this.props.onParentShouldUpdate(inputNode.checked); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var hasCheckedProp = nextProps.hasOwnProperty('checked'); + var hasToggledProp = nextProps.hasOwnProperty('toggled'); + var hasNewDefaultProp = nextProps.hasOwnProperty('defaultChecked') && nextProps.defaultChecked !== this.props.defaultChecked; + + if (hasCheckedProp || hasToggledProp || hasNewDefaultProp) { + var switched = nextProps.checked || nextProps.toggled || nextProps.defaultChecked || false; + + this.setState({ + switched: switched + }); + + if (this.props.onParentShouldUpdate && switched !== this.props.switched) { + this.props.onParentShouldUpdate(switched); + } + } + } + }, { + key: 'isSwitched', + value: function isSwitched() { + return this.refs.checkbox.checked; + } + + // no callback here because there is no event + + }, { + key: 'setSwitched', + value: function setSwitched(newSwitchedValue) { + if (!this.props.hasOwnProperty('checked') || this.props.checked === false) { + if (this.props.onParentShouldUpdate) { + this.props.onParentShouldUpdate(newSwitchedValue); + } + this.refs.checkbox.checked = newSwitchedValue; + } else { + false ? (0, _warning2.default)(false, 'Material-UI: Cannot call set method while checked is defined as a property.') : void 0; + } + } + }, { + key: 'getValue', + value: function getValue() { + return this.refs.checkbox.value; + } + + // Checkbox inputs only use SPACE to change their state. Using ENTER will + // update the ui but not the input. + + + /** + * Because both the ripples and the checkbox input cannot share pointer + * events, the checkbox input takes control of pointer events and calls + * ripple animations manually. + */ + + }, { + key: 'render', + value: function render() { + var _props = this.props, + name = _props.name, + value = _props.value, + iconStyle = _props.iconStyle, + inputStyle = _props.inputStyle, + inputType = _props.inputType, + label = _props.label, + labelStyle = _props.labelStyle, + labelPosition = _props.labelPosition, + onSwitch = _props.onSwitch, + onBlur = _props.onBlur, + onFocus = _props.onFocus, + onMouseUp = _props.onMouseUp, + onMouseDown = _props.onMouseDown, + onMouseLeave = _props.onMouseLeave, + onTouchStart = _props.onTouchStart, + onTouchEnd = _props.onTouchEnd, + onParentShouldUpdate = _props.onParentShouldUpdate, + disabled = _props.disabled, + disableTouchRipple = _props.disableTouchRipple, + disableFocusRipple = _props.disableFocusRipple, + className = _props.className, + rippleColor = _props.rippleColor, + rippleStyle = _props.rippleStyle, + style = _props.style, + switched = _props.switched, + switchElement = _props.switchElement, + thumbStyle = _props.thumbStyle, + trackStyle = _props.trackStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['name', 'value', 'iconStyle', 'inputStyle', 'inputType', 'label', 'labelStyle', 'labelPosition', 'onSwitch', 'onBlur', 'onFocus', 'onMouseUp', 'onMouseDown', 'onMouseLeave', 'onTouchStart', 'onTouchEnd', 'onParentShouldUpdate', 'disabled', 'disableTouchRipple', 'disableFocusRipple', 'className', 'rippleColor', 'rippleStyle', 'style', 'switched', 'switchElement', 'thumbStyle', 'trackStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var wrapStyles = (0, _simpleAssign2.default)(styles.wrap, iconStyle); + var mergedRippleStyle = (0, _simpleAssign2.default)(styles.ripple, rippleStyle); + + if (thumbStyle) { + wrapStyles.marginLeft /= 2; + wrapStyles.marginRight /= 2; + } + + var labelElement = label && _react2.default.createElement( + 'label', + { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) }, + label + ); + + var showTouchRipple = !disabled && !disableTouchRipple; + var showFocusRipple = !disabled && !disableFocusRipple; + + var touchRipple = _react2.default.createElement(_TouchRipple2.default, { + ref: 'touchRipple', + key: 'touchRipple', + style: mergedRippleStyle, + color: mergedRippleStyle.color, + muiTheme: this.context.muiTheme, + centerRipple: true + }); + + var focusRipple = _react2.default.createElement(_FocusRipple2.default, { + key: 'focusRipple', + innerStyle: mergedRippleStyle, + color: mergedRippleStyle.color, + muiTheme: this.context.muiTheme, + show: this.state.isKeyboardFocused + }); + + var ripples = [showTouchRipple ? touchRipple : null, showFocusRipple ? focusRipple : null]; + + var inputElement = _react2.default.createElement('input', (0, _extends3.default)({}, other, { + ref: 'checkbox', + type: inputType, + style: prepareStyles((0, _simpleAssign2.default)(styles.input, inputStyle)), + name: name, + value: value, + disabled: disabled, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onChange: this.handleChange, + onMouseUp: showTouchRipple && this.handleMouseUp, + onMouseDown: showTouchRipple && this.handleMouseDown, + onMouseLeave: showTouchRipple && this.handleMouseLeave, + onTouchStart: showTouchRipple && this.handleTouchStart, + onTouchEnd: showTouchRipple && this.handleTouchEnd + })); + + // If toggle component (indicated by whether the style includes thumb) manually lay out + // elements in order to nest ripple elements + var switchOrThumbElement = !thumbStyle ? _react2.default.createElement( + 'div', + { style: prepareStyles(wrapStyles) }, + switchElement, + ripples + ) : _react2.default.createElement( + 'div', + { style: prepareStyles(wrapStyles) }, + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, trackStyle)) }), + _react2.default.createElement( + _Paper2.default, + { style: thumbStyle, zDepth: 1, circle: true }, + ' ', + ripples, + ' ' + ) + ); + + var elementsInOrder = labelPosition === 'right' ? _react2.default.createElement( + 'div', + { style: styles.controls }, + switchOrThumbElement, + labelElement + ) : _react2.default.createElement( + 'div', + { style: styles.controls }, + labelElement, + switchOrThumbElement + ); + + return _react2.default.createElement( + 'div', + { ref: 'root', className: className, style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyDown: this.handleKeyDown, + onKeyUp: this.handleKeyUp + }), + inputElement, + elementsInOrder + ); + } + }]); + return EnhancedSwitch; +}(_react.Component); + +EnhancedSwitch.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? EnhancedSwitch.propTypes = { + checked: _react.PropTypes.bool, + className: _react.PropTypes.string, + defaultChecked: _react.PropTypes.bool, + disableFocusRipple: _react.PropTypes.bool, + disableTouchRipple: _react.PropTypes.bool, + disabled: _react.PropTypes.bool, + iconStyle: _react.PropTypes.object, + inputStyle: _react.PropTypes.object, + inputType: _react.PropTypes.string.isRequired, + label: _react.PropTypes.node, + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + labelStyle: _react.PropTypes.object, + name: _react.PropTypes.string, + onBlur: _react.PropTypes.func, + onFocus: _react.PropTypes.func, + onMouseDown: _react.PropTypes.func, + onMouseLeave: _react.PropTypes.func, + onMouseUp: _react.PropTypes.func, + onParentShouldUpdate: _react.PropTypes.func, + onSwitch: _react.PropTypes.func, + onTouchEnd: _react.PropTypes.func, + onTouchStart: _react.PropTypes.func, + rippleColor: _react.PropTypes.string, + rippleStyle: _react.PropTypes.object, + style: _react.PropTypes.object, + switchElement: _react.PropTypes.element.isRequired, + switched: _react.PropTypes.bool.isRequired, + thumbStyle: _react.PropTypes.object, + trackStyle: _react.PropTypes.object, + value: _react.PropTypes.any +} : void 0; +exports.default = EnhancedSwitch; + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactAddonsTransitionGroup = __webpack_require__(128); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +var _SlideInChild = __webpack_require__(778); + +var _SlideInChild2 = _interopRequireDefault(_SlideInChild); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SlideIn = function (_Component) { + (0, _inherits3.default)(SlideIn, _Component); + + function SlideIn() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, SlideIn); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = SlideIn.__proto__ || (0, _getPrototypeOf2.default)(SlideIn)).call.apply(_ref, [this].concat(args))), _this), _this.getLeaveDirection = function () { + return _this.props.direction; + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(SlideIn, [{ + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + enterDelay = _props.enterDelay, + children = _props.children, + childStyle = _props.childStyle, + direction = _props.direction, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['enterDelay', 'children', 'childStyle', 'direction', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'relative', + overflow: 'hidden', + height: '100%' + }, style); + + var newChildren = _react2.default.Children.map(children, function (child) { + return _react2.default.createElement( + _SlideInChild2.default, + { + key: child.key, + direction: direction, + enterDelay: enterDelay, + getLeaveDirection: _this2.getLeaveDirection, + style: childStyle + }, + child + ); + }, this); + + return _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + (0, _extends3.default)({}, other, { + style: prepareStyles(mergedRootStyles), + component: 'div' + }), + newChildren + ); + } + }]); + return SlideIn; +}(_react.Component); + +SlideIn.defaultProps = { + enterDelay: 0, + direction: 'left' +}; +SlideIn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? SlideIn.propTypes = { + childStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + direction: _react.PropTypes.oneOf(['left', 'right', 'up', 'down']), + enterDelay: _react.PropTypes.number, + style: _react.PropTypes.object +} : void 0; +exports.default = SlideIn; + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Dialog = __webpack_require__(780); + +var _Dialog2 = _interopRequireDefault(_Dialog); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Dialog2.default; + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Toggle = __webpack_require__(814); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Toggle2.default; + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createProfile = createProfile; +exports.setProfileEnabled = setProfileEnabled; +exports.removeProfile = removeProfile; +exports.updateProfileSettings = updateProfileSettings; + +var _ActionTypes = __webpack_require__(79); + +var types = _interopRequireWildcard(_ActionTypes); + +var _notification = __webpack_require__(824); + +var _notification2 = _interopRequireDefault(_notification); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function createProfile(name, description) { + return function (dispatch) { + dispatch((0, _notification2.default)('Profile created')); + dispatch({ + type: types.PROFILE_CREATE, + name: name, + description: description + }); + }; +} + +function setProfileEnabled(name) { + return function (dispatch) { + dispatch((0, _notification2.default)('Profile set to ' + name)); + dispatch({ + type: types.PROFILE_SET_ENABLED, + name: name + }); + }; +} + +function removeProfile(name) { + return function (dispatch) { + dispatch((0, _notification2.default)('Profile created')); + dispatch({ + type: types.PROFILE_REMOVE, + name: name + }); + }; +} + +function updateProfileSettings(profileName, shop, key, value) { + return function (dispatch) { + dispatch((0, _notification2.default)('Settings saved')); + var obj = {}; + obj[key] = value; + dispatch({ + type: types.PROFILE_UPDATE_SETTINGS, + name: profileName, + value: obj, + shop: shop + }); + }; +} + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tableRowColumn = context.muiTheme.tableRowColumn; + + + var styles = { + root: { + paddingLeft: tableRowColumn.spacing, + paddingRight: tableRowColumn.spacing, + height: tableRowColumn.height, + textAlign: 'left', + fontSize: 13, + overflow: 'hidden', + whiteSpace: 'nowrap', + textOverflow: 'ellipsis' + } + }; + + if (_react2.default.Children.count(props.children) === 1 && !isNaN(props.children)) { + styles.textAlign = 'right'; + } + + return styles; +} + +var TableRowColumn = function (_Component) { + (0, _inherits3.default)(TableRowColumn, _Component); + + function TableRowColumn() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TableRowColumn); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableRowColumn.__proto__ || (0, _getPrototypeOf2.default)(TableRowColumn)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.onClick = function (event) { + if (_this.props.onClick) { + _this.props.onClick(event, _this.props.columnNumber); + } + }, _this.onMouseEnter = function (event) { + if (_this.props.hoverable) { + _this.setState({ hovered: true }); + if (_this.props.onHover) { + _this.props.onHover(event, _this.props.columnNumber); + } + } + }, _this.onMouseLeave = function (event) { + if (_this.props.hoverable) { + _this.setState({ hovered: false }); + if (_this.props.onHoverExit) { + _this.props.onHoverExit(event, _this.props.columnNumber); + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TableRowColumn, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + columnNumber = _props.columnNumber, + hoverable = _props.hoverable, + onClick = _props.onClick, + onHover = _props.onHover, + onHoverExit = _props.onHoverExit, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'columnNumber', 'hoverable', 'onClick', 'onHover', 'onHoverExit', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var handlers = { + onClick: this.onClick, + onMouseEnter: this.onMouseEnter, + onMouseLeave: this.onMouseLeave + }; + + return _react2.default.createElement( + 'td', + (0, _extends3.default)({ + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }, handlers, other), + children + ); + } + }]); + return TableRowColumn; +}(_react.Component); + +TableRowColumn.defaultProps = { + hoverable: false +}; +TableRowColumn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TableRowColumn.propTypes = { + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * @ignore + * Number to identify the header row. This property + * is automatically populated when used with TableHeader. + */ + columnNumber: _react.PropTypes.number, + /** + * @ignore + * If true, this column responds to hover events. + */ + hoverable: _react.PropTypes.bool, + /** @ignore */ + onClick: _react.PropTypes.func, + /** @ignore */ + onHover: _react.PropTypes.func, + /** + * @ignore + * Callback function for hover exit event. + */ + onHoverExit: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableRowColumn; + +/***/ }), +/* 212 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(41) && !__webpack_require__(66)(function(){ + return Object.defineProperty(__webpack_require__(135)('div'), 'a', {get: function(){ return 7; }}).a != 7; +}); + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(50) + , toIObject = __webpack_require__(51) + , arrayIndexOf = __webpack_require__(341)(false) + , IE_PROTO = __webpack_require__(140)('IE_PROTO'); + +module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(names.length > i)if(has(O, key = names[i++])){ + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(85); +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); +}; + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(68), + _assign = __webpack_require__(13); + +var ReactNoopUpdateQueue = __webpack_require__(216); + +var canDefineProperty = __webpack_require__(217); +var emptyObject = __webpack_require__(101); +var invariant = __webpack_require__(9); +var lowPriorityWarning = __webpack_require__(343); + +/** + * Base class helpers for the updating state of a component. + */ +function ReactComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; +} + +ReactComponent.prototype.isReactComponent = {}; + +/** + * Sets a subset of the state. Always use this to mutate + * state. You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * There is no guarantee that calls to `setState` will run synchronously, + * as they may eventually be batched together. You can provide an optional + * callback that will be executed when the call to setState is actually + * completed. + * + * When a function is provided to setState, it will be called at some point in + * the future (not synchronously). It will be called with the up to date + * component arguments (state, props, context). These values can be different + * from this.* because your function may be called after receiveProps but before + * shouldComponentUpdate, and this new state, props, and context will not yet be + * assigned to this. + * + * @param {object|function} partialState Next partial state or function to + * produce next partial state to be merged with current state. + * @param {?function} callback Called after state is updated. + * @final + * @protected + */ +ReactComponent.prototype.setState = function (partialState, callback) { + !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? false ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0; + this.updater.enqueueSetState(this, partialState); + if (callback) { + this.updater.enqueueCallback(this, callback, 'setState'); + } +}; + +/** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {?function} callback Called after update is complete. + * @final + * @protected + */ +ReactComponent.prototype.forceUpdate = function (callback) { + this.updater.enqueueForceUpdate(this); + if (callback) { + this.updater.enqueueCallback(this, callback, 'forceUpdate'); + } +}; + +/** + * Deprecated APIs. These APIs used to exist on classic React classes but since + * we would like to deprecate them, we're not going to move them over to this + * modern base class. Instead, we define a getter that warns if it's accessed. + */ +if (false) { + var deprecatedAPIs = { + isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], + replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] + }; + var defineDeprecationWarning = function (methodName, info) { + if (canDefineProperty) { + Object.defineProperty(ReactComponent.prototype, methodName, { + get: function () { + lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); + return undefined; + } + }); + } + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } +} + +/** + * Base class helpers for the updating state of a component. + */ +function ReactPureComponent(props, context, updater) { + // Duplicated from ReactComponent. + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; +} + +function ComponentDummy() {} +ComponentDummy.prototype = ReactComponent.prototype; +ReactPureComponent.prototype = new ComponentDummy(); +ReactPureComponent.prototype.constructor = ReactPureComponent; +// Avoid an extra prototype jump for these methods. +_assign(ReactPureComponent.prototype, ReactComponent.prototype); +ReactPureComponent.prototype.isPureReactComponent = true; + +module.exports = { + Component: ReactComponent, + PureComponent: ReactPureComponent +}; + +/***/ }), +/* 216 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var warning = __webpack_require__(11); + +function warnNoop(publicInstance, callerName) { + if (false) { + var constructor = publicInstance.constructor; + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; + } +} + +/** + * This is the abstract API for an update queue. + */ +var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + return false; + }, + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + enqueueCallback: function (publicInstance, callback) {}, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function (publicInstance) { + warnNoop(publicInstance, 'forceUpdate'); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState) { + warnNoop(publicInstance, 'replaceState'); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function (publicInstance, partialState) { + warnNoop(publicInstance, 'setState'); + } +}; + +module.exports = ReactNoopUpdateQueue; + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var canDefineProperty = false; +if (false) { + try { + // $FlowFixMe https://github.com/facebook/flow/issues/285 + Object.defineProperty({}, 'x', { get: function () {} }); + canDefineProperty = true; + } catch (x) { + // IE will fail on defineProperty + } +} + +module.exports = canDefineProperty; + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var PooledClass = __webpack_require__(344); +var ReactElement = __webpack_require__(53); + +var emptyFunction = __webpack_require__(24); +var traverseAllChildren = __webpack_require__(220); + +var twoArgumentPooler = PooledClass.twoArgumentPooler; +var fourArgumentPooler = PooledClass.fourArgumentPooler; + +var userProvidedKeyEscapeRegex = /\/+/g; +function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); +} + +/** + * PooledClass representing the bookkeeping associated with performing a child + * traversal. Allows avoiding binding callbacks. + * + * @constructor ForEachBookKeeping + * @param {!function} forEachFunction Function to perform traversal with. + * @param {?*} forEachContext Context to perform context with. + */ +function ForEachBookKeeping(forEachFunction, forEachContext) { + this.func = forEachFunction; + this.context = forEachContext; + this.count = 0; +} +ForEachBookKeeping.prototype.destructor = function () { + this.func = null; + this.context = null; + this.count = 0; +}; +PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); + +function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + + func.call(context, child, bookKeeping.count++); +} + +/** + * Iterates through children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ +function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + ForEachBookKeeping.release(traverseContext); +} + +/** + * PooledClass representing the bookkeeping associated with performing a child + * mapping. Allows avoiding binding callbacks. + * + * @constructor MapBookKeeping + * @param {!*} mapResult Object containing the ordered map of results. + * @param {!function} mapFunction Function to perform mapping with. + * @param {?*} mapContext Context to perform mapping with. + */ +function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { + this.result = mapResult; + this.keyPrefix = keyPrefix; + this.func = mapFunction; + this.context = mapContext; + this.count = 0; +} +MapBookKeeping.prototype.destructor = function () { + this.result = null; + this.keyPrefix = null; + this.func = null; + this.context = null; + this.count = 0; +}; +PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); + +function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; + + + var mappedChild = func.call(context, child, bookKeeping.count++); + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); + } else if (mappedChild != null) { + if (ReactElement.isValidElement(mappedChild)) { + mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); + } + result.push(mappedChild); + } +} + +function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + MapBookKeeping.release(traverseContext); +} + +/** + * Maps children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ +function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; +} + +function forEachSingleChildDummy(traverseContext, child, name) { + return null; +} + +/** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ +function countChildren(children, context) { + return traverseAllChildren(children, forEachSingleChildDummy, null); +} + +/** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray + */ +function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); + return result; +} + +var ReactChildren = { + forEach: forEachChildren, + map: mapChildren, + mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, + count: countChildren, + toArray: toArray +}; + +module.exports = ReactChildren; + +/***/ }), +/* 219 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +// The Symbol used to tag the ReactElement type. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. + +var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; + +module.exports = REACT_ELEMENT_TYPE; + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(68); + +var ReactCurrentOwner = __webpack_require__(35); +var REACT_ELEMENT_TYPE = __webpack_require__(219); + +var getIteratorFn = __webpack_require__(345); +var invariant = __webpack_require__(9); +var KeyEscapeUtils = __webpack_require__(221); +var warning = __webpack_require__(11); + +var SEPARATOR = '.'; +var SUBSEPARATOR = ':'; + +/** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ + +/** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + +var didWarnAboutMaps = false; + +/** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ +function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); +} + +/** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if (children === null || type === 'string' || type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { + callback(traverseContext, children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + if (false) { + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } + } + } else if (type === 'object') { + var addendum = ''; + if (false) { + addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; + if (children._isReactElement) { + addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } + } + } + var childrenString = String(children); + true ? false ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; + } + } + + return subtreeCount; +} + +/** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); +} + +module.exports = traverseAllChildren; + +/***/ }), +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + +function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2' + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; +} + +/** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ +function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':' + }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); + + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); +} + +var KeyEscapeUtils = { + escape: escape, + unescape: unescape +}; + +module.exports = KeyEscapeUtils; + +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +// React 15.5 references this module, and assumes PropTypes are still callable in production. +// Therefore we re-export development-only version with all the PropTypes checks here. +// However if one is migrating to the `prop-types` npm library, they will go through the +// `index.js` entry point, and it will branch depending on the environment. +var factory = __webpack_require__(348); +module.exports = function(isValidElement) { + // It is still allowed in 15.5. + var throwOnDirectAccess = false; + return factory(isValidElement, throwOnDirectAccess); +}; + + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMComponentFlags = { + hasCachedChildNodes: 1 << 0 +}; + +module.exports = ReactDOMComponentFlags; + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var invariant = __webpack_require__(9); + +/** + * Accumulates items that must not be null or undefined into the first one. This + * is used to conserve memory by avoiding array allocations, and thus sacrifices + * API cleanness. Since `current` can be null before being passed in and not + * null after this function, make sure to assign it back to `current`: + * + * `a = accumulateInto(a, b);` + * + * This API should be sparingly used. Try `accumulate` for something cleaner. + * + * @return {*|array<*>} An accumulation of items. + */ + +function accumulateInto(current, next) { + !(next != null) ? false ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0; + + if (current == null) { + return next; + } + + // Both are not empty. Warning: Never call x.concat(y) when you are not + // certain that x is an Array (x could be a string with concat method). + if (Array.isArray(current)) { + if (Array.isArray(next)) { + current.push.apply(current, next); + return current; + } + current.push(next); + return current; + } + + if (Array.isArray(next)) { + // A bit too dangerous to mutate `next`. + return [current].concat(next); + } + + return [current, next]; +} + +module.exports = accumulateInto; + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * @param {array} arr an "accumulation" of items which is either an Array or + * a single item. Useful when paired with the `accumulate` module. This is a + * simple utility that allows us to reason about a collection of items, but + * handling the case when there is exactly one item (and we do not need to + * allocate an array). + */ + +function forEachAccumulated(arr, cb, scope) { + if (Array.isArray(arr)) { + arr.forEach(cb, scope); + } else if (arr) { + cb.call(scope, arr); + } +} + +module.exports = forEachAccumulated; + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(22); + +var contentKey = null; + +/** + * Gets the key used to access text content on a DOM node. + * + * @return {?string} Key used to access text content. + * @internal + */ +function getTextContentAccessor() { + if (!contentKey && ExecutionEnvironment.canUseDOM) { + // Prefer textContent to innerText because many browsers support both but + // SVG <text> elements don't support innerText even when <div> does. + contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText'; + } + return contentKey; +} + +module.exports = getTextContentAccessor; + +/***/ }), +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var PooledClass = __webpack_require__(54); + +var invariant = __webpack_require__(9); + +/** + * A specialized pseudo-event module to help keep track of components waiting to + * be notified when their DOM representations are available for use. + * + * This implements `PooledClass`, so you should never need to instantiate this. + * Instead, use `CallbackQueue.getPooled()`. + * + * @class ReactMountReady + * @implements PooledClass + * @internal + */ + +var CallbackQueue = function () { + function CallbackQueue(arg) { + _classCallCheck(this, CallbackQueue); + + this._callbacks = null; + this._contexts = null; + this._arg = arg; + } + + /** + * Enqueues a callback to be invoked when `notifyAll` is invoked. + * + * @param {function} callback Invoked when `notifyAll` is invoked. + * @param {?object} context Context to call `callback` with. + * @internal + */ + + + CallbackQueue.prototype.enqueue = function enqueue(callback, context) { + this._callbacks = this._callbacks || []; + this._callbacks.push(callback); + this._contexts = this._contexts || []; + this._contexts.push(context); + }; + + /** + * Invokes all enqueued callbacks and clears the queue. This is invoked after + * the DOM representation of a component has been created or updated. + * + * @internal + */ + + + CallbackQueue.prototype.notifyAll = function notifyAll() { + var callbacks = this._callbacks; + var contexts = this._contexts; + var arg = this._arg; + if (callbacks && contexts) { + !(callbacks.length === contexts.length) ? false ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0; + this._callbacks = null; + this._contexts = null; + for (var i = 0; i < callbacks.length; i++) { + callbacks[i].call(contexts[i], arg); + } + callbacks.length = 0; + contexts.length = 0; + } + }; + + CallbackQueue.prototype.checkpoint = function checkpoint() { + return this._callbacks ? this._callbacks.length : 0; + }; + + CallbackQueue.prototype.rollback = function rollback(len) { + if (this._callbacks && this._contexts) { + this._callbacks.length = len; + this._contexts.length = len; + } + }; + + /** + * Resets the internal queue. + * + * @internal + */ + + + CallbackQueue.prototype.reset = function reset() { + this._callbacks = null; + this._contexts = null; + }; + + /** + * `PooledClass` looks for this. + */ + + + CallbackQueue.prototype.destructor = function destructor() { + this.reset(); + }; + + return CallbackQueue; +}(); + +module.exports = PooledClass.addPoolingTo(CallbackQueue); + +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactFeatureFlags = { + // When true, call console.time() before and .timeEnd() after each top-level + // render (both initial renders and updates). Useful when looking at prod-mode + // timeline profiles in Chrome, for example. + logTopLevelRenders: false +}; + +module.exports = ReactFeatureFlags; + +/***/ }), +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + */ + +var supportedInputTypes = { + 'color': true, + 'date': true, + 'datetime': true, + 'datetime-local': true, + 'email': true, + 'month': true, + 'number': true, + 'password': true, + 'range': true, + 'search': true, + 'tel': true, + 'text': true, + 'time': true, + 'url': true, + 'week': true +}; + +function isTextInputElement(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + + if (nodeName === 'input') { + return !!supportedInputTypes[elem.type]; + } + + if (nodeName === 'textarea') { + return true; + } + + return false; +} + +module.exports = isTextInputElement; + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(22); +var escapeTextContentForBrowser = __webpack_require__(106); +var setInnerHTML = __webpack_require__(105); + +/** + * Set the textContent property of a node, ensuring that whitespace is preserved + * even in IE8. innerText is a poor substitute for textContent and, among many + * issues, inserts <br> instead of the literal newline chars. innerHTML behaves + * as it should. + * + * @param {DOMElement} node + * @param {string} text + * @internal + */ +var setTextContent = function (node, text) { + if (text) { + var firstChild = node.firstChild; + + if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) { + firstChild.nodeValue = text; + return; + } + } + node.textContent = text; +}; + +if (ExecutionEnvironment.canUseDOM) { + if (!('textContent' in document.documentElement)) { + setTextContent = function (node, text) { + if (node.nodeType === 3) { + node.nodeValue = text; + return; + } + setInnerHTML(node, escapeTextContentForBrowser(text)); + }; + } +} + +module.exports = setTextContent; + +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * @param {DOMElement} node input/textarea to focus + */ + +function focusNode(node) { + // IE8 can throw "Can't move focus to the control because it is invisible, + // not enabled, or of a type that does not accept the focus." for all kinds of + // reasons that are too expensive and fragile to test. + try { + node.focus(); + } catch (e) {} +} + +module.exports = focusNode; + +/***/ }), +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * CSS properties which accept numbers but are not in units of "px". + */ + +var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridRow: true, + gridColumn: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true +}; + +/** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ +function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); +} + +/** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ +var prefixes = ['Webkit', 'ms', 'Moz', 'O']; + +// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an +// infinite loop, because it iterates over the newly added props too. +Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); +}); + +/** + * Most style properties can be unset by doing .style[prop] = '' but IE8 + * doesn't like doing that with shorthand properties so for the properties that + * IE8 breaks on, which are listed here, we instead unset each of the + * individual properties. See http://bugs.jquery.com/ticket/12385. + * The 4-value 'clock' properties like margin, padding, border-width seem to + * behave without any problems. Curiously, list-style works too without any + * special prodding. + */ +var shorthandPropertyExpansions = { + background: { + backgroundAttachment: true, + backgroundColor: true, + backgroundImage: true, + backgroundPositionX: true, + backgroundPositionY: true, + backgroundRepeat: true + }, + backgroundPosition: { + backgroundPositionX: true, + backgroundPositionY: true + }, + border: { + borderWidth: true, + borderStyle: true, + borderColor: true + }, + borderBottom: { + borderBottomWidth: true, + borderBottomStyle: true, + borderBottomColor: true + }, + borderLeft: { + borderLeftWidth: true, + borderLeftStyle: true, + borderLeftColor: true + }, + borderRight: { + borderRightWidth: true, + borderRightStyle: true, + borderRightColor: true + }, + borderTop: { + borderTopWidth: true, + borderTopStyle: true, + borderTopColor: true + }, + font: { + fontStyle: true, + fontVariant: true, + fontWeight: true, + fontSize: true, + lineHeight: true, + fontFamily: true + }, + outline: { + outlineWidth: true, + outlineStyle: true, + outlineColor: true + } +}; + +var CSSProperty = { + isUnitlessNumber: isUnitlessNumber, + shorthandPropertyExpansions: shorthandPropertyExpansions +}; + +module.exports = CSSProperty; + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMProperty = __webpack_require__(69); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactInstrumentation = __webpack_require__(26); + +var quoteAttributeValueForBrowser = __webpack_require__(383); +var warning = __webpack_require__(11); + +var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); +var illegalAttributeNameCache = {}; +var validatedAttributeNameCache = {}; + +function isAttributeNameSafe(attributeName) { + if (validatedAttributeNameCache.hasOwnProperty(attributeName)) { + return true; + } + if (illegalAttributeNameCache.hasOwnProperty(attributeName)) { + return false; + } + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + illegalAttributeNameCache[attributeName] = true; + false ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0; + return false; +} + +function shouldIgnoreValue(propertyInfo, value) { + return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false; +} + +/** + * Operations for dealing with DOM properties. + */ +var DOMPropertyOperations = { + + /** + * Creates markup for the ID property. + * + * @param {string} id Unescaped ID. + * @return {string} Markup string. + */ + createMarkupForID: function (id) { + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id); + }, + + setAttributeForID: function (node, id) { + node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id); + }, + + createMarkupForRoot: function () { + return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""'; + }, + + setAttributeForRoot: function (node) { + node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, ''); + }, + + /** + * Creates markup for a property. + * + * @param {string} name + * @param {*} value + * @return {?string} Markup string, or null if the property was invalid. + */ + createMarkupForProperty: function (name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + if (shouldIgnoreValue(propertyInfo, value)) { + return ''; + } + var attributeName = propertyInfo.attributeName; + if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) { + return attributeName + '=""'; + } + return attributeName + '=' + quoteAttributeValueForBrowser(value); + } else if (DOMProperty.isCustomAttribute(name)) { + if (value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + } + return null; + }, + + /** + * Creates markup for a custom property. + * + * @param {string} name + * @param {*} value + * @return {string} Markup string, or empty string if the property was invalid. + */ + createMarkupForCustomAttribute: function (name, value) { + if (!isAttributeNameSafe(name) || value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + }, + + /** + * Sets the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + * @param {*} value + */ + setValueForProperty: function (node, name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; + if (mutationMethod) { + mutationMethod(node, value); + } else if (shouldIgnoreValue(propertyInfo, value)) { + this.deleteValueForProperty(node, name); + return; + } else if (propertyInfo.mustUseProperty) { + // Contrary to `setAttribute`, object properties are properly + // `toString`ed by IE8/9. + node[propertyInfo.propertyName] = value; + } else { + var attributeName = propertyInfo.attributeName; + var namespace = propertyInfo.attributeNamespace; + // `setAttribute` with objects becomes only `[object]` in IE8/9, + // ('' + value) makes it output the correct toString()-value. + if (namespace) { + node.setAttributeNS(namespace, attributeName, '' + value); + } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) { + node.setAttribute(attributeName, ''); + } else { + node.setAttribute(attributeName, '' + value); + } + } + } else if (DOMProperty.isCustomAttribute(name)) { + DOMPropertyOperations.setValueForAttribute(node, name, value); + return; + } + + if (false) { + var payload = {}; + payload[name] = value; + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'update attribute', + payload: payload + }); + } + }, + + setValueForAttribute: function (node, name, value) { + if (!isAttributeNameSafe(name)) { + return; + } + if (value == null) { + node.removeAttribute(name); + } else { + node.setAttribute(name, '' + value); + } + + if (false) { + var payload = {}; + payload[name] = value; + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'update attribute', + payload: payload + }); + } + }, + + /** + * Deletes an attributes from a node. + * + * @param {DOMElement} node + * @param {string} name + */ + deleteValueForAttribute: function (node, name) { + node.removeAttribute(name); + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'remove attribute', + payload: name + }); + } + }, + + /** + * Deletes the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + */ + deleteValueForProperty: function (node, name) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; + if (mutationMethod) { + mutationMethod(node, undefined); + } else if (propertyInfo.mustUseProperty) { + var propName = propertyInfo.propertyName; + if (propertyInfo.hasBooleanValue) { + node[propName] = false; + } else { + node[propName] = ''; + } + } else { + node.removeAttribute(propertyInfo.attributeName); + } + } else if (DOMProperty.isCustomAttribute(name)) { + node.removeAttribute(name); + } + + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'remove attribute', + payload: name + }); + } + } + +}; + +module.exports = DOMPropertyOperations; + +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var LinkedValueUtils = __webpack_require__(153); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactUpdates = __webpack_require__(28); + +var warning = __webpack_require__(11); + +var didWarnValueLink = false; +var didWarnValueDefaultValue = false; + +function updateOptionsIfPendingUpdateAndMounted() { + if (this._rootNodeID && this._wrapperState.pendingUpdate) { + this._wrapperState.pendingUpdate = false; + + var props = this._currentElement.props; + var value = LinkedValueUtils.getValue(props); + + if (value != null) { + updateOptions(this, Boolean(props.multiple), value); + } + } +} + +function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +var valuePropNames = ['value', 'defaultValue']; + +/** + * Validation function for `value` and `defaultValue`. + * @private + */ +function checkSelectPropTypes(inst, props) { + var owner = inst._currentElement._owner; + LinkedValueUtils.checkPropTypes('select', props, owner); + + if (props.valueLink !== undefined && !didWarnValueLink) { + false ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnValueLink = true; + } + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + if (props[propName] == null) { + continue; + } + var isArray = Array.isArray(props[propName]); + if (props.multiple && !isArray) { + false ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0; + } else if (!props.multiple && isArray) { + false ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0; + } + } +} + +/** + * @param {ReactDOMComponent} inst + * @param {boolean} multiple + * @param {*} propValue A stringable (with `multiple`, a list of stringables). + * @private + */ +function updateOptions(inst, multiple, propValue) { + var selectedValue, i; + var options = ReactDOMComponentTree.getNodeFromInstance(inst).options; + + if (multiple) { + selectedValue = {}; + for (i = 0; i < propValue.length; i++) { + selectedValue['' + propValue[i]] = true; + } + for (i = 0; i < options.length; i++) { + var selected = selectedValue.hasOwnProperty(options[i].value); + if (options[i].selected !== selected) { + options[i].selected = selected; + } + } + } else { + // Do not set `select.value` as exact behavior isn't consistent across all + // browsers for all cases. + selectedValue = '' + propValue; + for (i = 0; i < options.length; i++) { + if (options[i].value === selectedValue) { + options[i].selected = true; + return; + } + } + if (options.length) { + options[0].selected = true; + } + } +} + +/** + * Implements a <select> host component that allows optionally setting the + * props `value` and `defaultValue`. If `multiple` is false, the prop must be a + * stringable. If `multiple` is true, the prop must be an array of stringables. + * + * If `value` is not supplied (or null/undefined), user actions that change the + * selected option will trigger updates to the rendered options. + * + * If it is supplied (and not null/undefined), the rendered options will not + * update in response to user actions. Instead, the `value` prop must change in + * order for the rendered options to update. + * + * If `defaultValue` is provided, any options with the supplied values will be + * selected. + */ +var ReactDOMSelect = { + getHostProps: function (inst, props) { + return _assign({}, props, { + onChange: inst._wrapperState.onChange, + value: undefined + }); + }, + + mountWrapper: function (inst, props) { + if (false) { + checkSelectPropTypes(inst, props); + } + + var value = LinkedValueUtils.getValue(props); + inst._wrapperState = { + pendingUpdate: false, + initialValue: value != null ? value : props.defaultValue, + listeners: null, + onChange: _handleChange.bind(inst), + wasMultiple: Boolean(props.multiple) + }; + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { + false ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0; + didWarnValueDefaultValue = true; + } + }, + + getSelectValueContext: function (inst) { + // ReactDOMOption looks at this initial value so the initial generated + // markup has correct `selected` attributes + return inst._wrapperState.initialValue; + }, + + postUpdateWrapper: function (inst) { + var props = inst._currentElement.props; + + // After the initial mount, we control selected-ness manually so don't pass + // this value down + inst._wrapperState.initialValue = undefined; + + var wasMultiple = inst._wrapperState.wasMultiple; + inst._wrapperState.wasMultiple = Boolean(props.multiple); + + var value = LinkedValueUtils.getValue(props); + if (value != null) { + inst._wrapperState.pendingUpdate = false; + updateOptions(inst, Boolean(props.multiple), value); + } else if (wasMultiple !== Boolean(props.multiple)) { + // For simplicity, reapply `defaultValue` if `multiple` is toggled. + if (props.defaultValue != null) { + updateOptions(inst, Boolean(props.multiple), props.defaultValue); + } else { + // Revert the select back to its default unselected state. + updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : ''); + } + } + } +}; + +function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); + + if (this._rootNodeID) { + this._wrapperState.pendingUpdate = true; + } + ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this); + return returnValue; +} + +module.exports = ReactDOMSelect; + +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); + +var ReactCompositeComponent = __webpack_require__(392); +var ReactEmptyComponent = __webpack_require__(237); +var ReactHostComponent = __webpack_require__(238); + +var getNextDebugID = __webpack_require__(393); +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); + +// To avoid a cyclic dependency, we create the final class in this module +var ReactCompositeComponentWrapper = function (element) { + this.construct(element); +}; +_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, { + _instantiateReactComponent: instantiateReactComponent +}); + +function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +/** + * Check if the type reference is a known internal type. I.e. not a user + * provided composite type. + * + * @param {function} type + * @return {boolean} Returns true if this is a valid internal type. + */ +function isInternalComponentType(type) { + return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function'; +} + +/** + * Given a ReactNode, create an instance that will actually be mounted. + * + * @param {ReactNode} node + * @param {boolean} shouldHaveDebugID + * @return {object} A new instance of the element's constructor. + * @protected + */ +function instantiateReactComponent(node, shouldHaveDebugID) { + var instance; + + if (node === null || node === false) { + instance = ReactEmptyComponent.create(instantiateReactComponent); + } else if (typeof node === 'object') { + var element = node; + var type = element.type; + if (typeof type !== 'function' && typeof type !== 'string') { + var info = ''; + if (false) { + if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { + info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.'; + } + } + info += getDeclarationErrorAddendum(element._owner); + true ? false ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0; + } + + // Special case string values + if (typeof element.type === 'string') { + instance = ReactHostComponent.createInternalComponent(element); + } else if (isInternalComponentType(element.type)) { + // This is temporarily available for custom components that are not string + // representations. I.e. ART. Once those are updated to use the string + // representation, we can drop this code path. + instance = new element.type(element); + + // We renamed this. Allow the old name for compat. :( + if (!instance.getHostNode) { + instance.getHostNode = instance.getNativeNode; + } + } else { + instance = new ReactCompositeComponentWrapper(element); + } + } else if (typeof node === 'string' || typeof node === 'number') { + instance = ReactHostComponent.createInstanceForText(node); + } else { + true ? false ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0; + } + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0; + } + + // These two fields are used by the DOM and ART diffing algorithms + // respectively. Instead of using expandos on components, we should be + // storing the state needed by the diffing algorithms elsewhere. + instance._mountIndex = 0; + instance._mountImage = null; + + if (false) { + instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0; + } + + // Internal instances should fully constructed at this point, so they should + // not get any new fields added to them at this point. + if (false) { + if (Object.preventExtensions) { + Object.preventExtensions(instance); + } + } + + return instance; +} + +module.exports = instantiateReactComponent; + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var React = __webpack_require__(52); + +var invariant = __webpack_require__(9); + +var ReactNodeTypes = { + HOST: 0, + COMPOSITE: 1, + EMPTY: 2, + + getType: function (node) { + if (node === null || node === false) { + return ReactNodeTypes.EMPTY; + } else if (React.isValidElement(node)) { + if (typeof node.type === 'function') { + return ReactNodeTypes.COMPOSITE; + } else { + return ReactNodeTypes.HOST; + } + } + true ? false ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0; + } +}; + +module.exports = ReactNodeTypes; + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var emptyComponentFactory; + +var ReactEmptyComponentInjection = { + injectEmptyComponentFactory: function (factory) { + emptyComponentFactory = factory; + } +}; + +var ReactEmptyComponent = { + create: function (instantiate) { + return emptyComponentFactory(instantiate); + } +}; + +ReactEmptyComponent.injection = ReactEmptyComponentInjection; + +module.exports = ReactEmptyComponent; + +/***/ }), +/* 238 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var invariant = __webpack_require__(9); + +var genericComponentClass = null; +var textComponentClass = null; + +var ReactHostComponentInjection = { + // This accepts a class that receives the tag string. This is a catch all + // that can render any kind of tag. + injectGenericComponentClass: function (componentClass) { + genericComponentClass = componentClass; + }, + // This accepts a text component class that takes the text string to be + // rendered as props. + injectTextComponentClass: function (componentClass) { + textComponentClass = componentClass; + } +}; + +/** + * Get a host internal component class for a specific tag. + * + * @param {ReactElement} element The element to create. + * @return {function} The internal class constructor function. + */ +function createInternalComponent(element) { + !genericComponentClass ? false ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0; + return new genericComponentClass(element); +} + +/** + * @param {ReactText} text + * @return {ReactComponent} + */ +function createInstanceForText(text) { + return new textComponentClass(text); +} + +/** + * @param {ReactComponent} component + * @return {boolean} + */ +function isTextComponent(component) { + return component instanceof textComponentClass; +} + +var ReactHostComponent = { + createInternalComponent: createInternalComponent, + createInstanceForText: createInstanceForText, + isTextComponent: isTextComponent, + injection: ReactHostComponentInjection +}; + +module.exports = ReactHostComponent; + +/***/ }), +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var ReactCurrentOwner = __webpack_require__(35); +var REACT_ELEMENT_TYPE = __webpack_require__(394); + +var getIteratorFn = __webpack_require__(395); +var invariant = __webpack_require__(9); +var KeyEscapeUtils = __webpack_require__(156); +var warning = __webpack_require__(11); + +var SEPARATOR = '.'; +var SUBSEPARATOR = ':'; + +/** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ + +/** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + +var didWarnAboutMaps = false; + +/** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ +function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); +} + +/** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if (children === null || type === 'string' || type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { + callback(traverseContext, children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + if (false) { + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } + } + } else if (type === 'object') { + var addendum = ''; + if (false) { + addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; + if (children._isReactElement) { + addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } + } + } + var childrenString = String(children); + true ? false ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; + } + } + + return subtreeCount; +} + +/** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); +} + +module.exports = traverseAllChildren; + +/***/ }), +/* 240 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @typechecks + */ + +var emptyFunction = __webpack_require__(24); + +/** + * Upstream version of event listener. Does not take into account specific + * nature of platform. + */ +var EventListener = { + /** + * Listen to DOM events during the bubble phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + listen: function listen(target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, false); + return { + remove: function remove() { + target.removeEventListener(eventType, callback, false); + } + }; + } else if (target.attachEvent) { + target.attachEvent('on' + eventType, callback); + return { + remove: function remove() { + target.detachEvent('on' + eventType, callback); + } + }; + } + }, + + /** + * Listen to DOM events during the capture phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + capture: function capture(target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, true); + return { + remove: function remove() { + target.removeEventListener(eventType, callback, true); + } + }; + } else { + if (false) { + console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.'); + } + return { + remove: emptyFunction + }; + } + }, + + registerDefault: function registerDefault() {} +}; + +module.exports = EventListener; + +/***/ }), +/* 241 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMSelection = __webpack_require__(407); + +var containsNode = __webpack_require__(409); +var focusNode = __webpack_require__(231); +var getActiveElement = __webpack_require__(242); + +function isInDocument(node) { + return containsNode(document.documentElement, node); +} + +/** + * @ReactInputSelection: React input selection module. Based on Selection.js, + * but modified to be suitable for react and has a couple of bug fixes (doesn't + * assume buttons have range selections allowed). + * Input selection module for React. + */ +var ReactInputSelection = { + + hasSelectionCapabilities: function (elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true'); + }, + + getSelectionInformation: function () { + var focusedElem = getActiveElement(); + return { + focusedElem: focusedElem, + selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null + }; + }, + + /** + * @restoreSelection: If any selection information was potentially lost, + * restore it. This is useful when performing operations that could remove dom + * nodes and place them back in, resulting in focus being lost. + */ + restoreSelection: function (priorSelectionInformation) { + var curFocusedElem = getActiveElement(); + var priorFocusedElem = priorSelectionInformation.focusedElem; + var priorSelectionRange = priorSelectionInformation.selectionRange; + if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { + if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) { + ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange); + } + focusNode(priorFocusedElem); + } + }, + + /** + * @getSelection: Gets the selection bounds of a focused textarea, input or + * contentEditable node. + * -@input: Look up selection bounds of this input + * -@return {start: selectionStart, end: selectionEnd} + */ + getSelection: function (input) { + var selection; + + if ('selectionStart' in input) { + // Modern browser with input or textarea. + selection = { + start: input.selectionStart, + end: input.selectionEnd + }; + } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { + // IE8 input. + var range = document.selection.createRange(); + // There can only be one selection per document in IE, so it must + // be in our element. + if (range.parentElement() === input) { + selection = { + start: -range.moveStart('character', -input.value.length), + end: -range.moveEnd('character', -input.value.length) + }; + } + } else { + // Content editable or old IE textarea. + selection = ReactDOMSelection.getOffsets(input); + } + + return selection || { start: 0, end: 0 }; + }, + + /** + * @setSelection: Sets the selection bounds of a textarea or input and focuses + * the input. + * -@input Set selection bounds of this input or textarea + * -@offsets Object of same form that is returned from get* + */ + setSelection: function (input, offsets) { + var start = offsets.start; + var end = offsets.end; + if (end === undefined) { + end = start; + } + + if ('selectionStart' in input) { + input.selectionStart = start; + input.selectionEnd = Math.min(end, input.value.length); + } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { + var range = input.createTextRange(); + range.collapse(true); + range.moveStart('character', start); + range.moveEnd('character', end - start); + range.select(); + } else { + ReactDOMSelection.setOffsets(input, offsets); + } + } +}; + +module.exports = ReactInputSelection; + +/***/ }), +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +/* eslint-disable fb-www/typeof-undefined */ + +/** + * Same as document.activeElement but wraps in a try-catch block. In IE it is + * not safe to call document.activeElement if there is nothing focused. + * + * The activeElement will be null only if the document or document body is not + * yet defined. + * + * @param {?DOMDocument} doc Defaults to current document. + * @return {?DOMElement} + */ +function getActiveElement(doc) /*?DOMElement*/{ + doc = doc || (typeof document !== 'undefined' ? document : undefined); + if (typeof doc === 'undefined') { + return null; + } + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } +} + +module.exports = getActiveElement; + +/***/ }), +/* 243 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var DOMLazyTree = __webpack_require__(74); +var DOMProperty = __webpack_require__(69); +var React = __webpack_require__(52); +var ReactBrowserEventEmitter = __webpack_require__(107); +var ReactCurrentOwner = __webpack_require__(35); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactDOMContainerInfo = __webpack_require__(424); +var ReactDOMFeatureFlags = __webpack_require__(425); +var ReactFeatureFlags = __webpack_require__(228); +var ReactInstanceMap = __webpack_require__(87); +var ReactInstrumentation = __webpack_require__(26); +var ReactMarkupChecksum = __webpack_require__(426); +var ReactReconciler = __webpack_require__(72); +var ReactUpdateQueue = __webpack_require__(158); +var ReactUpdates = __webpack_require__(28); + +var emptyObject = __webpack_require__(101); +var instantiateReactComponent = __webpack_require__(235); +var invariant = __webpack_require__(9); +var setInnerHTML = __webpack_require__(105); +var shouldUpdateReactComponent = __webpack_require__(155); +var warning = __webpack_require__(11); + +var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; +var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME; + +var ELEMENT_NODE_TYPE = 1; +var DOC_NODE_TYPE = 9; +var DOCUMENT_FRAGMENT_NODE_TYPE = 11; + +var instancesByReactRootID = {}; + +/** + * Finds the index of the first character + * that's not common between the two given strings. + * + * @return {number} the index of the character where the strings diverge + */ +function firstDifferenceIndex(string1, string2) { + var minLen = Math.min(string1.length, string2.length); + for (var i = 0; i < minLen; i++) { + if (string1.charAt(i) !== string2.charAt(i)) { + return i; + } + } + return string1.length === string2.length ? -1 : minLen; +} + +/** + * @param {DOMElement|DOMDocument} container DOM element that may contain + * a React component + * @return {?*} DOM element that may have the reactRoot ID, or null. + */ +function getReactRootElementInContainer(container) { + if (!container) { + return null; + } + + if (container.nodeType === DOC_NODE_TYPE) { + return container.documentElement; + } else { + return container.firstChild; + } +} + +function internalGetID(node) { + // If node is something like a window, document, or text node, none of + // which support attributes or a .getAttribute method, gracefully return + // the empty string, as if the attribute were missing. + return node.getAttribute && node.getAttribute(ATTR_NAME) || ''; +} + +/** + * Mounts this component and inserts it into the DOM. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {DOMElement} container DOM element to mount into. + * @param {ReactReconcileTransaction} transaction + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ +function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) { + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var wrappedElement = wrapperInstance._currentElement.props.child; + var type = wrappedElement.type; + markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name); + console.time(markerName); + } + + var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */ + ); + + if (markerName) { + console.timeEnd(markerName); + } + + wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance; + ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction); +} + +/** + * Batched mount. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {DOMElement} container DOM element to mount into. + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ +function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) { + var transaction = ReactUpdates.ReactReconcileTransaction.getPooled( + /* useCreateElement */ + !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement); + transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context); + ReactUpdates.ReactReconcileTransaction.release(transaction); +} + +/** + * Unmounts a component and removes it from the DOM. + * + * @param {ReactComponent} instance React component instance. + * @param {DOMElement} container DOM element to unmount from. + * @final + * @internal + * @see {ReactMount.unmountComponentAtNode} + */ +function unmountComponentFromNode(instance, container, safely) { + if (false) { + ReactInstrumentation.debugTool.onBeginFlush(); + } + ReactReconciler.unmountComponent(instance, safely); + if (false) { + ReactInstrumentation.debugTool.onEndFlush(); + } + + if (container.nodeType === DOC_NODE_TYPE) { + container = container.documentElement; + } + + // http://jsperf.com/emptying-a-node + while (container.lastChild) { + container.removeChild(container.lastChild); + } +} + +/** + * True if the supplied DOM node has a direct React-rendered child that is + * not a React root element. Useful for warning in `render`, + * `unmountComponentAtNode`, etc. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM element contains a direct child that was + * rendered by React but is not a root element. + * @internal + */ +function hasNonRootReactChild(container) { + var rootEl = getReactRootElementInContainer(container); + if (rootEl) { + var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl); + return !!(inst && inst._hostParent); + } +} + +/** + * True if the supplied DOM node is a React DOM element and + * it has been rendered by another copy of React. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM has been rendered by another copy of React + * @internal + */ +function nodeIsRenderedByOtherInstance(container) { + var rootEl = getReactRootElementInContainer(container); + return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl)); +} + +/** + * True if the supplied DOM node is a valid node element. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM is a valid DOM node. + * @internal + */ +function isValidContainer(node) { + return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)); +} + +/** + * True if the supplied DOM node is a valid React node element. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM is a valid React DOM node. + * @internal + */ +function isReactNode(node) { + return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME)); +} + +function getHostRootInstanceInContainer(container) { + var rootEl = getReactRootElementInContainer(container); + var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl); + return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null; +} + +function getTopLevelWrapperInContainer(container) { + var root = getHostRootInstanceInContainer(container); + return root ? root._hostContainerInfo._topLevelWrapper : null; +} + +/** + * Temporary (?) hack so that we can store all top-level pending updates on + * composites instead of having to worry about different types of components + * here. + */ +var topLevelRootCounter = 1; +var TopLevelWrapper = function () { + this.rootID = topLevelRootCounter++; +}; +TopLevelWrapper.prototype.isReactComponent = {}; +if (false) { + TopLevelWrapper.displayName = 'TopLevelWrapper'; +} +TopLevelWrapper.prototype.render = function () { + return this.props.child; +}; +TopLevelWrapper.isReactTopLevelWrapper = true; + +/** + * Mounting is the process of initializing a React component by creating its + * representative DOM elements and inserting them into a supplied `container`. + * Any prior content inside `container` is destroyed in the process. + * + * ReactMount.render( + * component, + * document.getElementById('container') + * ); + * + * <div id="container"> <-- Supplied `container`. + * <div data-reactid=".3"> <-- Rendered reactRoot of React + * // ... component. + * </div> + * </div> + * + * Inside of `container`, the first element rendered is the "reactRoot". + */ +var ReactMount = { + + TopLevelWrapper: TopLevelWrapper, + + /** + * Used by devtools. The keys are not important. + */ + _instancesByReactRootID: instancesByReactRootID, + + /** + * This is a hook provided to support rendering React components while + * ensuring that the apparent scroll position of its `container` does not + * change. + * + * @param {DOMElement} container The `container` being rendered into. + * @param {function} renderCallback This must be called once to do the render. + */ + scrollMonitor: function (container, renderCallback) { + renderCallback(); + }, + + /** + * Take a component that's already mounted into the DOM and replace its props + * @param {ReactComponent} prevComponent component instance already in the DOM + * @param {ReactElement} nextElement component instance to render + * @param {DOMElement} container container to render into + * @param {?function} callback function triggered on completion + */ + _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) { + ReactMount.scrollMonitor(container, function () { + ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext); + if (callback) { + ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback); + } + }); + + return prevComponent; + }, + + /** + * Render a new component into the DOM. Hooked by hooks! + * + * @param {ReactElement} nextElement element to render + * @param {DOMElement} container container to render into + * @param {boolean} shouldReuseMarkup if we should skip the markup insertion + * @return {ReactComponent} nextComponent + */ + _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. + false ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0; + + !isValidContainer(container) ? false ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0; + + ReactBrowserEventEmitter.ensureScrollValueMonitoring(); + var componentInstance = instantiateReactComponent(nextElement, false); + + // The initial render is synchronous but any updates that happen during + // rendering, in componentWillMount or componentDidMount, will be batched + // according to the current batching strategy. + + ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context); + + var wrapperID = componentInstance._instance.rootID; + instancesByReactRootID[wrapperID] = componentInstance; + + return componentInstance; + }, + + /** + * Renders a React component into the DOM in the supplied `container`. + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. + * + * @param {ReactComponent} parentComponent The conceptual parent of this render tree. + * @param {ReactElement} nextElement Component element to render. + * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion + * @return {ReactComponent} Component instance rendered in `container`. + */ + renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { + !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? false ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0; + return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback); + }, + + _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { + ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render'); + !React.isValidElement(nextElement) ? false ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : + // Check if it quacks like an element + nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0; + + false ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0; + + var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement }); + + var nextContext; + if (parentComponent) { + var parentInst = ReactInstanceMap.get(parentComponent); + nextContext = parentInst._processChildContext(parentInst._context); + } else { + nextContext = emptyObject; + } + + var prevComponent = getTopLevelWrapperInContainer(container); + + if (prevComponent) { + var prevWrappedElement = prevComponent._currentElement; + var prevElement = prevWrappedElement.props.child; + if (shouldUpdateReactComponent(prevElement, nextElement)) { + var publicInst = prevComponent._renderedComponent.getPublicInstance(); + var updatedCallback = callback && function () { + callback.call(publicInst); + }; + ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback); + return publicInst; + } else { + ReactMount.unmountComponentAtNode(container); + } + } + + var reactRootElement = getReactRootElementInContainer(container); + var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement); + var containerHasNonRootReactChild = hasNonRootReactChild(container); + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0; + + if (!containerHasReactMarkup || reactRootElement.nextSibling) { + var rootElementSibling = reactRootElement; + while (rootElementSibling) { + if (internalGetID(rootElementSibling)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0; + break; + } + rootElementSibling = rootElementSibling.nextSibling; + } + } + } + + var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild; + var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance(); + if (callback) { + callback.call(component); + } + return component; + }, + + /** + * Renders a React component into the DOM in the supplied `container`. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. + * + * @param {ReactElement} nextElement Component element to render. + * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion + * @return {ReactComponent} Component instance rendered in `container`. + */ + render: function (nextElement, container, callback) { + return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback); + }, + + /** + * Unmounts and destroys the React component rendered in the `container`. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode + * + * @param {DOMElement} container DOM element containing a React component. + * @return {boolean} True if a component was found in and unmounted from + * `container` + */ + unmountComponentAtNode: function (container) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (Strictly speaking, unmounting won't cause a + // render but we still don't expect to be in a render call here.) + false ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0; + + !isValidContainer(container) ? false ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0; + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0; + } + + var prevComponent = getTopLevelWrapperInContainer(container); + if (!prevComponent) { + // Check if the node being unmounted was rendered by React, but isn't a + // root node. + var containerHasNonRootReactChild = hasNonRootReactChild(container); + + // Check if the container itself is a React root node. + var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME); + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0; + } + + return false; + } + delete instancesByReactRootID[prevComponent._instance.rootID]; + ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false); + return true; + }, + + _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) { + !isValidContainer(container) ? false ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0; + + if (shouldReuseMarkup) { + var rootElement = getReactRootElementInContainer(container); + if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) { + ReactDOMComponentTree.precacheNode(instance, rootElement); + return; + } else { + var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + + var rootMarkup = rootElement.outerHTML; + rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum); + + var normalizedMarkup = markup; + if (false) { + // because rootMarkup is retrieved from the DOM, various normalizations + // will have occurred which will not be present in `markup`. Here, + // insert markup into a <div> or <iframe> depending on the container + // type to perform the same normalizations before comparing. + var normalizer; + if (container.nodeType === ELEMENT_NODE_TYPE) { + normalizer = document.createElement('div'); + normalizer.innerHTML = markup; + normalizedMarkup = normalizer.innerHTML; + } else { + normalizer = document.createElement('iframe'); + document.body.appendChild(normalizer); + normalizer.contentDocument.write(markup); + normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML; + document.body.removeChild(normalizer); + } + } + + var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup); + var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20); + + !(container.nodeType !== DOC_NODE_TYPE) ? false ? invariant(false, 'You\'re trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s', difference) : _prodInvariant('42', difference) : void 0; + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : void 0; + } + } + } + + !(container.nodeType !== DOC_NODE_TYPE) ? false ? invariant(false, 'You\'re trying to render a component to the document but you didn\'t use server rendering. We can\'t do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('43') : void 0; + + if (transaction.useCreateElement) { + while (container.lastChild) { + container.removeChild(container.lastChild); + } + DOMLazyTree.insertTreeBefore(container, markup, null); + } else { + setInnerHTML(container, markup); + ReactDOMComponentTree.precacheNode(instance, container.firstChild); + } + + if (false) { + var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild); + if (hostNode._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: hostNode._debugID, + type: 'mount', + payload: markup.toString() + }); + } + } + } +}; + +module.exports = ReactMount; + +/***/ }), +/* 244 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactNodeTypes = __webpack_require__(236); + +function getHostComponentFromComposite(inst) { + var type; + + while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) { + inst = inst._renderedComponent; + } + + if (type === ReactNodeTypes.HOST) { + return inst._renderedComponent; + } else if (type === ReactNodeTypes.EMPTY) { + return null; + } +} + +module.exports = getHostComponentFromComposite; + +/***/ }), +/* 245 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = createTransitionManager; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(75); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(432); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(433); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(434); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(435); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(436); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + + + + +function hasAnyProperties(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return true; + }return false; +} + +function createTransitionManager(history, routes) { + var state = {}; + + // Signature should be (location, indexOnly), but needs to support (path, + // query, indexOnly) + function isActive(location, indexOnly) { + location = history.createLocation(location); + + return __WEBPACK_IMPORTED_MODULE_3__isActive__["a" /* default */](location, indexOnly, state.location, state.routes, state.params); + } + + var partialNextState = void 0; + + function match(location, callback) { + if (partialNextState && partialNextState.location === location) { + // Continue from where we left off. + finishMatch(partialNextState, callback); + } else { + __WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */](routes, location, function (error, nextState) { + if (error) { + callback(error); + } else if (nextState) { + finishMatch(_extends({}, nextState, { location: location }), callback); + } else { + callback(); + } + }); + } + } + + function finishMatch(nextState, callback) { + var _computeChangedRoutes = __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */](state, nextState), + leaveRoutes = _computeChangedRoutes.leaveRoutes, + changeRoutes = _computeChangedRoutes.changeRoutes, + enterRoutes = _computeChangedRoutes.enterRoutes; + + __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["c" /* runLeaveHooks */](leaveRoutes, state); + + // Tear down confirmation hooks for left routes + leaveRoutes.filter(function (route) { + return enterRoutes.indexOf(route) === -1; + }).forEach(removeListenBeforeHooksForRoute); + + // change and enter hooks are run in series + __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["a" /* runChangeHooks */](changeRoutes, state, nextState, function (error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["b" /* runEnterHooks */](enterRoutes, nextState, finishEnterHooks); + }); + + function finishEnterHooks(error, redirectInfo) { + if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo); + + // TODO: Fetch components after state is updated. + __WEBPACK_IMPORTED_MODULE_4__getComponents__["a" /* default */](nextState, function (error, components) { + if (error) { + callback(error); + } else { + // TODO: Make match a pure function and have some other API + // for "match and update state". + callback(null, null, state = _extends({}, nextState, { components: components })); + } + }); + } + + function handleErrorOrRedirect(error, redirectInfo) { + if (error) callback(error);else callback(null, redirectInfo); + } + } + + var RouteGuid = 1; + + function getRouteID(route) { + var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + return route.__id__ || create && (route.__id__ = RouteGuid++); + } + + var RouteHooks = Object.create(null); + + function getRouteHooksForRoutes(routes) { + return routes.map(function (route) { + return RouteHooks[getRouteID(route)]; + }).filter(function (hook) { + return hook; + }); + } + + function transitionHook(location, callback) { + __WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */](routes, location, function (error, nextState) { + if (nextState == null) { + // TODO: We didn't actually match anything, but hang + // onto error/nextState so we don't have to matchRoutes + // again in the listen callback. + callback(); + return; + } + + // Cache some state here so we don't have to + // matchRoutes() again in the listen callback. + partialNextState = _extends({}, nextState, { location: location }); + + var hooks = getRouteHooksForRoutes(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */](state, partialNextState).leaveRoutes); + + var result = void 0; + for (var i = 0, len = hooks.length; result == null && i < len; ++i) { + // Passing the location arg here indicates to + // the user that this is a transition hook. + result = hooks[i](location); + } + + callback(result); + }); + } + + /* istanbul ignore next: untestable with Karma */ + function beforeUnloadHook() { + // Synchronously check to see if any route hooks want + // to prevent the current window/tab from closing. + if (state.routes) { + var hooks = getRouteHooksForRoutes(state.routes); + + var message = void 0; + for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) { + // Passing no args indicates to the user that this is a + // beforeunload hook. We don't know the next location. + message = hooks[i](); + } + + return message; + } + } + + var unlistenBefore = void 0, + unlistenBeforeUnload = void 0; + + function removeListenBeforeHooksForRoute(route) { + var routeID = getRouteID(route); + if (!routeID) { + return; + } + + delete RouteHooks[routeID]; + + if (!hasAnyProperties(RouteHooks)) { + // teardown transition & beforeunload hooks + if (unlistenBefore) { + unlistenBefore(); + unlistenBefore = null; + } + + if (unlistenBeforeUnload) { + unlistenBeforeUnload(); + unlistenBeforeUnload = null; + } + } + } + + /** + * Registers the given hook function to run before leaving the given route. + * + * During a normal transition, the hook function receives the next location + * as its only argument and can return either a prompt message (string) to show the user, + * to make sure they want to leave the page; or `false`, to prevent the transition. + * Any other return value will have no effect. + * + * During the beforeunload event (in browsers) the hook receives no arguments. + * In this case it must return a prompt message to prevent the transition. + * + * Returns a function that may be used to unbind the listener. + */ + function listenBeforeLeavingRoute(route, hook) { + var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks); + var routeID = getRouteID(route, true); + + RouteHooks[routeID] = hook; + + if (thereWereNoRouteHooks) { + // setup transition & beforeunload hooks + unlistenBefore = history.listenBefore(transitionHook); + + if (history.listenBeforeUnload) unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook); + } + + return function () { + removeListenBeforeHooksForRoute(route); + }; + } + + /** + * This is the API for stateful environments. As the location + * changes, we update state and call the listener. We can also + * gracefully handle errors and redirects. + */ + function listen(listener) { + function historyListener(location) { + if (state.location === location) { + listener(null, state); + } else { + match(location, function (error, redirectLocation, nextState) { + if (error) { + listener(error); + } else if (redirectLocation) { + history.replace(redirectLocation); + } else if (nextState) { + listener(null, nextState); + } else { + false ? warning(false, 'Location "%s" did not match any routes', location.pathname + location.search + location.hash) : void 0; + } + }); + } + } + + // TODO: Only use a single history listener. Otherwise we'll end up with + // multiple concurrent calls to match. + + // Set up the history listener first in case the initial match redirects. + var unsubscribe = history.listen(historyListener); + + if (state.location) { + // Picking up on a matchContext. + listener(null, state); + } else { + historyListener(history.getCurrentLocation()); + } + + return unsubscribe; + } + + return { + isActive: isActive, + match: match, + listenBeforeLeavingRoute: listenBeforeLeavingRoute, + listen: listen + }; +} + +/***/ }), +/* 246 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = isPromise; +function isPromise(obj) { + return obj && typeof obj.then === 'function'; +} + +/***/ }), +/* 247 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["b"] = createRouterObject; +/* harmony export (immutable) */ __webpack_exports__["a"] = assignRouterState; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function createRouterObject(history, transitionManager, state) { + var router = _extends({}, history, { + setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute, + isActive: transitionManager.isActive + }); + + return assignRouterState(router, state); +} + +function assignRouterState(router, _ref) { + var location = _ref.location, + params = _ref.params, + routes = _ref.routes; + + router.location = location; + router.params = params; + router.routes = routes; + + return router; +} + +/***/ }), +/* 248 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PropTypes__ = __webpack_require__(165); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(164); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + + +var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes, + bool = _React$PropTypes.bool, + object = _React$PropTypes.object, + string = _React$PropTypes.string, + func = _React$PropTypes.func, + oneOfType = _React$PropTypes.oneOfType; + + +function isLeftClickEvent(event) { + return event.button === 0; +} + +function isModifiedEvent(event) { + return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); +} + +// TODO: De-duplicate against hasAnyProperties in createTransitionManager. +function isEmptyObject(object) { + for (var p in object) { + if (Object.prototype.hasOwnProperty.call(object, p)) return false; + }return true; +} + +function resolveToLocation(to, router) { + return typeof to === 'function' ? to(router.location) : to; +} + +/** + * A <Link> is used to create an <a> element that links to a route. + * When that route is active, the link gets the value of its + * activeClassName prop. + * + * For example, assuming you have the following route: + * + * <Route path="/posts/:postID" component={Post} /> + * + * You could use the following component to link to that route: + * + * <Link to={`/posts/${post.id}`} /> + * + * Links may pass along location state and/or query string parameters + * in the state/query props, respectively. + * + * <Link ... query={{ show: true }} state={{ the: 'state' }} /> + */ +var Link = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ + displayName: 'Link', + + + mixins: [__WEBPACK_IMPORTED_MODULE_3__ContextUtils__["b" /* ContextSubscriber */]('router')], + + contextTypes: { + router: __WEBPACK_IMPORTED_MODULE_2__PropTypes__["b" /* routerShape */] + }, + + propTypes: { + to: oneOfType([string, object, func]), + query: object, + hash: string, + state: object, + activeStyle: object, + activeClassName: string, + onlyActiveOnIndex: bool.isRequired, + onClick: func, + target: string + }, + + getDefaultProps: function getDefaultProps() { + return { + onlyActiveOnIndex: false, + style: {} + }; + }, + handleClick: function handleClick(event) { + if (this.props.onClick) this.props.onClick(event); + + if (event.defaultPrevented) return; + + var router = this.context.router; + + !router ? false ? invariant(false, '<Link>s rendered outside of a router context cannot navigate.') : __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(false) : void 0; + + if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; + + // If target prop is set (e.g. to "_blank"), let browser handle link. + /* istanbul ignore if: untestable with Karma */ + if (this.props.target) return; + + event.preventDefault(); + + router.push(resolveToLocation(this.props.to, router)); + }, + render: function render() { + var _props = this.props, + to = _props.to, + activeClassName = _props.activeClassName, + activeStyle = _props.activeStyle, + onlyActiveOnIndex = _props.onlyActiveOnIndex, + props = _objectWithoutProperties(_props, ['to', 'activeClassName', 'activeStyle', 'onlyActiveOnIndex']); + + // Ignore if rendered outside the context of router to simplify unit testing. + + + var router = this.context.router; + + + if (router) { + // If user does not specify a `to` prop, return an empty anchor tag. + if (!to) { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', props); + } + + var toLocation = resolveToLocation(to, router); + props.href = router.createHref(toLocation); + + if (activeClassName || activeStyle != null && !isEmptyObject(activeStyle)) { + if (router.isActive(toLocation, onlyActiveOnIndex)) { + if (activeClassName) { + if (props.className) { + props.className += ' ' + activeClassName; + } else { + props.className = activeClassName; + } + } + + if (activeStyle) props.style = _extends({}, props.style, activeStyle); + } + } + } + + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('a', _extends({}, props, { onClick: this.handleClick })); + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (Link); + +/***/ }), +/* 249 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RouteUtils__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PatternUtils__ = __webpack_require__(76); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(89); + + + + + + +var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes, + string = _React$PropTypes.string, + object = _React$PropTypes.object; + +/** + * A <Redirect> is used to declare another URL path a client should + * be sent to when they request a given URL. + * + * Redirects are placed alongside routes in the route configuration + * and are traversed in the same manner. + */ +/* eslint-disable react/require-render-return */ + +var Redirect = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ + displayName: 'Redirect', + + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element) { + var route = __WEBPACK_IMPORTED_MODULE_2__RouteUtils__["a" /* createRouteFromReactElement */](element); + + if (route.from) route.path = route.from; + + route.onEnter = function (nextState, replace) { + var location = nextState.location, + params = nextState.params; + + + var pathname = void 0; + if (route.to.charAt(0) === '/') { + pathname = __WEBPACK_IMPORTED_MODULE_3__PatternUtils__["a" /* formatPattern */](route.to, params); + } else if (!route.to) { + pathname = location.pathname; + } else { + var routeIndex = nextState.routes.indexOf(route); + var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); + var pattern = parentPattern.replace(/\/*$/, '/') + route.to; + pathname = __WEBPACK_IMPORTED_MODULE_3__PatternUtils__["a" /* formatPattern */](pattern, params); + } + + replace({ + pathname: pathname, + query: route.query || location.query, + state: route.state || location.state + }); + }; + + return route; + }, + getRoutePattern: function getRoutePattern(routes, routeIndex) { + var parentPattern = ''; + + for (var i = routeIndex; i >= 0; i--) { + var route = routes[i]; + var pattern = route.path || ''; + + parentPattern = pattern.replace(/\/*$/, '/') + parentPattern; + + if (pattern.indexOf('/') === 0) break; + } + + return '/' + parentPattern; + } + }, + + propTypes: { + path: string, + from: string, // Alias for path + to: string.isRequired, + query: object, + state: object, + onEnter: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */] + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true ? false ? invariant(false, '<Redirect> elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(false) : void 0; + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (Redirect); + +/***/ }), +/* 250 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = createMemoryHistory; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(251); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(252); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = __webpack_require__(446); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__); + + + + +function createMemoryHistory(options) { + // signatures and type checking differ between `useQueries` and + // `createMemoryHistory`, have to create `memoryHistory` first because + // `useQueries` doesn't understand the signature + var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default.a(options); + var createHistory = function createHistory() { + return memoryHistory; + }; + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default.a(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default.a(createHistory))(options); + return history; +} + +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _queryString = __webpack_require__(444); + +var _runTransitionHook = __webpack_require__(167); + +var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + +var _LocationUtils = __webpack_require__(77); + +var _PathUtils = __webpack_require__(43); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var defaultStringifyQuery = function defaultStringifyQuery(query) { + return (0, _queryString.stringify)(query).replace(/%20/g, '+'); +}; + +var defaultParseQueryString = _queryString.parse; + +/** + * Returns a new createHistory function that may be used to create + * history objects that know how to handle URL queries. + */ +var useQueries = function useQueries(createHistory) { + return function () { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + var history = createHistory(options); + var stringifyQuery = options.stringifyQuery; + var parseQueryString = options.parseQueryString; + + + if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; + + if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString; + + var decodeQuery = function decodeQuery(location) { + if (!location) return location; + + if (location.query == null) location.query = parseQueryString(location.search.substring(1)); + + return location; + }; + + var encodeQuery = function encodeQuery(location, query) { + if (query == null) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var queryString = stringifyQuery(query); + var search = queryString ? '?' + queryString : ''; + + return _extends({}, object, { + search: search + }); + }; + + // Override all read methods with query-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return decodeQuery(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, decodeQuery(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(decodeQuery(location)); + }); + }; + + // Override all write methods with query-aware versions. + var push = function push(location) { + return history.push(encodeQuery(location, location.query)); + }; + + var replace = function replace(location) { + return history.replace(encodeQuery(location, location.query)); + }; + + var createPath = function createPath(location) { + return history.createPath(encodeQuery(location, location.query)); + }; + + var createHref = function createHref(location) { + return history.createHref(encodeQuery(location, location.query)); + }; + + var createLocation = function createLocation(location) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var newLocation = history.createLocation.apply(history, [encodeQuery(location, location.query)].concat(args)); + + if (location.query) newLocation.query = (0, _LocationUtils.createQuery)(location.query); + + return decodeQuery(newLocation); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation + }); + }; +}; + +exports.default = useQueries; + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _runTransitionHook = __webpack_require__(167); + +var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); + +var _PathUtils = __webpack_require__(43); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var useBasename = function useBasename(createHistory) { + return function () { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + var history = createHistory(options); + var basename = options.basename; + + + var addBasename = function addBasename(location) { + if (!location) return location; + + if (basename && location.basename == null) { + if (location.pathname.indexOf(basename) === 0) { + location.pathname = location.pathname.substring(basename.length); + location.basename = basename; + + if (location.pathname === '') location.pathname = '/'; + } else { + location.basename = ''; + } + } + + return location; + }; + + var prependBasename = function prependBasename(location) { + if (!basename) return location; + + var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location; + var pname = object.pathname; + var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/'; + var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname; + var pathname = normalizedBasename + normalizedPathname; + + return _extends({}, object, { + pathname: pathname + }); + }; + + // Override all read methods with basename-aware versions. + var getCurrentLocation = function getCurrentLocation() { + return addBasename(history.getCurrentLocation()); + }; + + var listenBefore = function listenBefore(hook) { + return history.listenBefore(function (location, callback) { + return (0, _runTransitionHook2.default)(hook, addBasename(location), callback); + }); + }; + + var listen = function listen(listener) { + return history.listen(function (location) { + return listener(addBasename(location)); + }); + }; + + // Override all write methods with basename-aware versions. + var push = function push(location) { + return history.push(prependBasename(location)); + }; + + var replace = function replace(location) { + return history.replace(prependBasename(location)); + }; + + var createPath = function createPath(location) { + return history.createPath(prependBasename(location)); + }; + + var createHref = function createHref(location) { + return history.createHref(prependBasename(location)); + }; + + var createLocation = function createLocation(location) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args))); + }; + + return _extends({}, history, { + getCurrentLocation: getCurrentLocation, + listenBefore: listenBefore, + listen: listen, + push: push, + replace: replace, + createPath: createPath, + createHref: createHref, + createLocation: createLocation + }); + }; +}; + +exports.default = useBasename; + +/***/ }), +/* 253 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = useRouterHistory; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(251); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(252); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__); + + + +function useRouterHistory(createHistory) { + return function (options) { + var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default.a(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default.a(createHistory))(options); + return history; + }; +} + +/***/ }), +/* 254 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.readState = exports.saveState = undefined; + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var QuotaExceededErrors = { + QuotaExceededError: true, + QUOTA_EXCEEDED_ERR: true +}; + +var SecurityErrors = { + SecurityError: true +}; + +var KeyPrefix = '@@History/'; + +var createKey = function createKey(key) { + return KeyPrefix + key; +}; + +var saveState = exports.saveState = function saveState(key, state) { + if (!window.sessionStorage) { + // Session storage is not available or hidden. + // sessionStorage is undefined in Internet Explorer when served via file protocol. + false ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available') : void 0; + + return; + } + + try { + if (state == null) { + window.sessionStorage.removeItem(createKey(key)); + } else { + window.sessionStorage.setItem(createKey(key), JSON.stringify(state)); + } + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + false ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available due to security settings') : void 0; + + return; + } + + if (QuotaExceededErrors[error.name] && window.sessionStorage.length === 0) { + // Safari "private mode" throws QuotaExceededError. + false ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : void 0; + + return; + } + + throw error; + } +}; + +var readState = exports.readState = function readState(key) { + var json = void 0; + try { + json = window.sessionStorage.getItem(createKey(key)); + } catch (error) { + if (SecurityErrors[error.name]) { + // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any + // attempt to access window.sessionStorage. + false ? (0, _warning2.default)(false, '[history] Unable to read state; sessionStorage is not available due to security settings') : void 0; + + return undefined; + } + } + + if (json) { + try { + return JSON.parse(json); + } catch (error) { + // Ignore invalid JSON. + } + } + + return undefined; +}; + +/***/ }), +/* 255 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(253); + + +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +/* harmony default export */ __webpack_exports__["a"] = (function (createHistory) { + var history = void 0; + if (canUseDOM) history = __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__["a" /* default */](createHistory)(); + return history; +}); + +/***/ }), +/* 256 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionTypes; }); +/* harmony export (immutable) */ __webpack_exports__["b"] = createStore; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(457); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__); + + + +/** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ +var ActionTypes = { + INIT: '@@redux/INIT' +}; + +/** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} enhancer The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ +function createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error('Expected the enhancer to be a function.'); + } + + return enhancer(createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error('Expected the reducer to be a function.'); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + function getState() { + return currentState; + } + + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error('Expected listener to be a function.'); + } + + var isSubscribed = true; + + ensureCanMutateNextListeners(); + nextListeners.push(listener); + + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + isSubscribed = false; + + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + }; + } + + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + function dispatch(action) { + if (!__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */](action)) { + throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); + } + + if (typeof action.type === 'undefined') { + throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?'); + } + + if (isDispatching) { + throw new Error('Reducers may not dispatch actions.'); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = currentListeners = nextListeners; + for (var i = 0; i < listeners.length; i++) { + listeners[i](); + } + + return action; + } + + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error('Expected the nextReducer to be a function.'); + } + + currentReducer = nextReducer; + dispatch({ type: ActionTypes.INIT }); + } + + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/zenparsing/es-observable + */ + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return _ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object') { + throw new TypeError('Expected the observer to be an object.'); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { unsubscribe: unsubscribe }; + } + }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () { + return this; + }, _ref; + } + + // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + dispatch({ type: ActionTypes.INIT }); + + return _ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer + }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2; +} + +/***/ }), +/* 257 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/* harmony default export */ __webpack_exports__["a"] = (freeGlobal); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(44))) + +/***/ }), +/* 258 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(259); + + +/** Built-in value references. */ +var getPrototype = __WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */](Object.getPrototypeOf, Object); + +/* harmony default export */ __webpack_exports__["a"] = (getPrototype); + + +/***/ }), +/* 259 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (overArg); + + +/***/ }), +/* 260 */ +/***/ (function(module, exports) { + +module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), +/* 261 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export default */ +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ +} + +/***/ }), +/* 262 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = compose; +/** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ + +function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + var last = funcs[funcs.length - 1]; + var rest = funcs.slice(0, -1); + return function () { + return rest.reduceRight(function (composed, f) { + return f(composed); + }, last.apply(undefined, arguments)); + }; +} + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _react = __webpack_require__(0); + +exports["default"] = _react.PropTypes.shape({ + subscribe: _react.PropTypes.func.isRequired, + dispatch: _react.PropTypes.func.isRequired, + getState: _react.PropTypes.func.isRequired +}); + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = warning; +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ +} + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(469); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; + + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var repeat = exports.repeat = function repeat(str, times) { + return new Array(times + 1).join(str); +}; + +var pad = exports.pad = function pad(num, maxLength) { + return repeat("0", maxLength - num.toString().length) + num; +}; + +var formatTime = exports.formatTime = function formatTime(time) { + return pad(time.getHours(), 2) + ":" + pad(time.getMinutes(), 2) + ":" + pad(time.getSeconds(), 2) + "." + pad(time.getMilliseconds(), 3); +}; + +// Use performance API if it's available in order to get better precision +var timer = exports.timer = typeof performance !== "undefined" && performance !== null && typeof performance.now === "function" ? performance : Date; + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +exports.routerReducer = routerReducer; +/** + * This action type will be dispatched when your history + * receives a location change. + */ +var LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE'; + +var initialState = { + locationBeforeTransitions: null +}; + +/** + * This reducer will update the state with the most recent location history + * has transitioned to. This may not be in sync with the router, particularly + * if you have asynchronously-loaded routes, so reading from and relying on + * this state is discouraged. + */ +function routerReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + type = _ref.type, + payload = _ref.payload; + + if (type === LOCATION_CHANGE) { + return _extends({}, state, { locationBeforeTransitions: payload }); + } + + return state; +} + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** + * This action type will be dispatched by the history actions below. + * If you're writing a middleware to watch for navigation events, be sure to + * look for actions of this type. + */ +var CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; + +function updateLocation(method) { + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return { + type: CALL_HISTORY_METHOD, + payload: { method: method, args: args } + }; + }; +} + +/** + * These actions correspond to the history API. + * The associated routerMiddleware will capture these events before they get to + * your reducer and reissue them as the matching function on your history. + */ +var push = exports.push = updateLocation('push'); +var replace = exports.replace = updateLocation('replace'); +var go = exports.go = updateLocation('go'); +var goBack = exports.goBack = updateLocation('goBack'); +var goForward = exports.goForward = updateLocation('goForward'); + +var routerActions = exports.routerActions = { push: push, replace: replace, go: go, goBack: goBack, goForward: goForward }; + +/***/ }), +/* 269 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayMap); + + +/***/ }), +/* 270 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (copyArray); + + +/***/ }), +/* 271 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__ = __webpack_require__(493); + + +/** Used to match property names within property paths. */ +var reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__["a" /* default */](function(string) { + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ __webpack_exports__["a"] = (stringToPath); + + +/***/ }), +/* 272 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/* harmony default export */ __webpack_exports__["a"] = (toSource); + + +/***/ }), +/* 273 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseToString_js__ = __webpack_require__(516); + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : __WEBPACK_IMPORTED_MODULE_0__baseToString_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (toString); + + +/***/ }), +/* 274 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(119); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(91); + + + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */](object[key], value)) || + (value === undefined && !(key in object))) { + __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](object, key, value); + } +} + +/* harmony default export */ __webpack_exports__["a"] = (assignMergeValue); + + +/***/ }), +/* 275 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(56); + + +var defineProperty = (function() { + try { + var func = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +/* harmony default export */ __webpack_exports__["a"] = (defineProperty); + + +/***/ }), +/* 276 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__ = __webpack_require__(525); + + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__["a" /* default */](); + +/* harmony default export */ __webpack_exports__["a"] = (baseFor); + + +/***/ }), +/* 277 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29); + + +/** Built-in value references. */ +var Uint8Array = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Uint8Array; + +/* harmony default export */ __webpack_exports__["a"] = (Uint8Array); + + +/***/ }), +/* 278 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(279); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__ = __webpack_require__(542); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(120); + + + + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */](object) ? __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */](object, true) : __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__["a" /* default */](object); +} + +/* harmony default export */ __webpack_exports__["a"] = (keysIn); + + +/***/ }), +/* 279 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__ = __webpack_require__(541); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(179); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__ = __webpack_require__(181); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isIndex_js__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__ = __webpack_require__(182); + + + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = __WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value), + isArg = !isArr && __WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */](value), + isBuff = !isArr && !isArg && __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__["a" /* default */](value), + isType = !isArr && !isArg && !isBuff && __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__["a" /* default */](value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__["a" /* default */](value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + __WEBPACK_IMPORTED_MODULE_4__isIndex_js__["a" /* default */](key, length) + ))) { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayLikeKeys); + + +/***/ }), +/* 280 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(119); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__ = __webpack_require__(553); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(556); + + + + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */](iteratee, 3); + + __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__["a" /* default */](object, function(value, key, object) { + __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapValues); + + +/***/ }), +/* 281 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SetCache_js__ = __webpack_require__(560); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arraySome_js__ = __webpack_require__(563); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cacheHas_js__ = __webpack_require__(564); + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new __WEBPACK_IMPORTED_MODULE_0__SetCache_js__["a" /* default */] : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!__WEBPACK_IMPORTED_MODULE_1__arraySome_js__["a" /* default */](other, function(othValue, othIndex) { + if (!__WEBPACK_IMPORTED_MODULE_2__cacheHas_js__["a" /* default */](seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (equalArrays); + + +/***/ }), +/* 282 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(45); + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isStrictComparable); + + +/***/ }), +/* 283 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (matchesStrictComparable); + + +/***/ }), +/* 284 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(285); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toKey_js__ = __webpack_require__(92); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = __WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */](path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[__WEBPACK_IMPORTED_MODULE_1__toKey_js__["a" /* default */](path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseGet); + + +/***/ }), +/* 285 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isKey_js__ = __webpack_require__(187); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__ = __webpack_require__(271); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(273); + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */](value)) { + return value; + } + return __WEBPACK_IMPORTED_MODULE_1__isKey_js__["a" /* default */](value, object) ? [value] : __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */](value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (castPath); + + +/***/ }), +/* 286 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmit", function() { return clearSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearAsyncError", function() { return clearAsyncError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncErrors", function() { return updateSyncErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncWarnings", function() { return updateSyncWarnings; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(172); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + +var arrayInsert = function arrayInsert(form, field, index, value) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], meta: { form: form, field: field, index: index }, payload: value }; +}; + +var arrayMove = function arrayMove(form, field, from, to) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], meta: { form: form, field: field, from: from, to: to } }; +}; + +var arrayPop = function arrayPop(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], meta: { form: form, field: field } }; +}; + +var arrayPush = function arrayPush(form, field, value) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], meta: { form: form, field: field }, payload: value }; +}; + +var arrayRemove = function arrayRemove(form, field, index) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], meta: { form: form, field: field, index: index } }; +}; + +var arrayRemoveAll = function arrayRemoveAll(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], meta: { form: form, field: field } }; +}; + +var arrayShift = function arrayShift(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], meta: { form: form, field: field } }; +}; + +var arraySplice = function arraySplice(form, field, index, removeNum, value) { + var action = { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], + meta: { form: form, field: field, index: index, removeNum: removeNum } + }; + if (value !== undefined) { + action.payload = value; + } + return action; +}; + +var arraySwap = function arraySwap(form, field, indexA, indexB) { + if (indexA === indexB) { + throw new Error('Swap indices cannot be equal'); + } + if (indexA < 0 || indexB < 0) { + throw new Error('Swap indices cannot be negative'); + } + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], meta: { form: form, field: field, indexA: indexA, indexB: indexB } }; +}; + +var arrayUnshift = function arrayUnshift(form, field, value) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], meta: { form: form, field: field }, payload: value }; +}; + +var autofill = function autofill(form, field, value) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], meta: { form: form, field: field }, payload: value }; +}; + +var blur = function blur(form, field, value, touch) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], meta: { form: form, field: field, touch: touch }, payload: value }; +}; + +var change = function change(form, field, value, touch, persistentSubmitErrors) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], meta: { form: form, field: field, touch: touch, persistentSubmitErrors: persistentSubmitErrors }, payload: value }; +}; + +var clearSubmit = function clearSubmit(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], meta: { form: form } }; +}; + +var clearAsyncError = function clearAsyncError(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], meta: { form: form, field: field } }; +}; + +var destroy = function destroy() { + for (var _len = arguments.length, form = Array(_len), _key = 0; _key < _len; _key++) { + form[_key] = arguments[_key]; + } + + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"], meta: { form: form } }; +}; + +var focus = function focus(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], meta: { form: form, field: field } }; +}; + +var initialize = function initialize(form, values, keepDirty) { + var otherMeta = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + if (keepDirty instanceof Object) { + otherMeta = keepDirty; + keepDirty = false; + } + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], meta: _extends({ form: form, keepDirty: keepDirty }, otherMeta), payload: values }; +}; + +var registerField = function registerField(form, name, type) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], meta: { form: form }, payload: { name: name, type: type } }; +}; + +var reset = function reset(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], meta: { form: form } }; +}; + +var startAsyncValidation = function startAsyncValidation(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], meta: { form: form, field: field } }; +}; + +var startSubmit = function startSubmit(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], meta: { form: form } }; +}; + +var stopAsyncValidation = function stopAsyncValidation(form, errors) { + var action = { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], + meta: { form: form }, + payload: errors + }; + if (errors && Object.keys(errors).length) { + action.error = true; + } + return action; +}; + +var stopSubmit = function stopSubmit(form, errors) { + var action = { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], + meta: { form: form }, + payload: errors + }; + if (errors && Object.keys(errors).length) { + action.error = true; + } + return action; +}; + +var submit = function submit(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], meta: { form: form } }; +}; + +var setSubmitFailed = function setSubmitFailed(form) { + for (var _len2 = arguments.length, fields = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + fields[_key2 - 1] = arguments[_key2]; + } + + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], meta: { form: form, fields: fields }, error: true }; +}; + +var setSubmitSucceeded = function setSubmitSucceeded(form) { + for (var _len3 = arguments.length, fields = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { + fields[_key3 - 1] = arguments[_key3]; + } + + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], meta: { form: form, fields: fields }, error: false }; +}; + +var touch = function touch(form) { + for (var _len4 = arguments.length, fields = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { + fields[_key4 - 1] = arguments[_key4]; + } + + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], meta: { form: form, fields: fields } }; +}; + +var unregisterField = function unregisterField(form, name) { + var destroyOnUnmount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], meta: { form: form }, payload: { name: name, destroyOnUnmount: destroyOnUnmount } }; +}; + +var untouch = function untouch(form) { + for (var _len5 = arguments.length, fields = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { + fields[_key5 - 1] = arguments[_key5]; + } + + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], meta: { form: form, fields: fields } }; +}; + +var updateSyncErrors = function updateSyncErrors(form) { + var syncErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var error = arguments[2]; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], meta: { form: form }, payload: { syncErrors: syncErrors, error: error } }; +}; + +var updateSyncWarnings = function updateSyncWarnings(form) { + var syncWarnings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var warning = arguments[2]; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], meta: { form: form }, payload: { syncWarnings: syncWarnings, warning: warning } }; +}; + +/***/ }), +/* 287 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error__ = __webpack_require__(591); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_es6_error__); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + +var SubmissionError = function (_ExtendableError) { + _inherits(SubmissionError, _ExtendableError); + + function SubmissionError(errors) { + _classCallCheck(this, SubmissionError); + + var _this = _possibleConstructorReturn(this, (SubmissionError.__proto__ || Object.getPrototypeOf(SubmissionError)).call(this, 'Submit Validation Failed')); + + _this.errors = errors; + return _this; + } + + return SubmissionError; +}(__WEBPACK_IMPORTED_MODULE_0_es6_error___default.a); + +/* harmony default export */ __webpack_exports__["a"] = (SubmissionError); + +/***/ }), +/* 288 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(289); + + +var silenceEvent = function silenceEvent(event) { + var is = __WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */](event); + if (is) { + event.preventDefault(); + } + return is; +}; + +/* harmony default export */ __webpack_exports__["a"] = (silenceEvent); + +/***/ }), +/* 289 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var isEvent = function isEvent(candidate) { + return !!(candidate && candidate.stopPropagation && candidate.preventDefault); +}; + +/* harmony default export */ __webpack_exports__["a"] = (isEvent); + +/***/ }), +/* 290 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(113); + + + +var getIn = function getIn(state, field) { + if (!state) { + return state; + } + + var path = __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field); + var length = path.length; + if (!length) { + return undefined; + } + + var result = state; + for (var i = 0; i < length && !!result; ++i) { + result = result[path[i]]; + } + + return result; +}; + +/* harmony default export */ __webpack_exports__["a"] = (getIn); + +/***/ }), +/* 291 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(186); + + +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */](value, other, undefined, customizer) : !!result; +} + +/* harmony default export */ __webpack_exports__["a"] = (isEqualWith); + + +/***/ }), +/* 292 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var processProps = function processProps(type, props, _value) { + var value = props.value; + + if (type === 'checkbox') { + return _extends({}, props, { + checked: !!value + }); + } + if (type === 'radio') { + return _extends({}, props, { + checked: value === _value, + value: _value + }); + } + if (type === 'select-multiple') { + return _extends({}, props, { + value: value || [] + }); + } + if (type === 'file') { + return _extends({}, props, { + value: value || undefined + }); + } + return props; +}; + +var createFieldProps = function createFieldProps(_ref2, name, _ref) { + var getIn = _ref2.getIn, + toJS = _ref2.toJS; + + var asyncError = _ref.asyncError, + asyncValidating = _ref.asyncValidating, + onBlur = _ref.onBlur, + onChange = _ref.onChange, + onDrop = _ref.onDrop, + onDragStart = _ref.onDragStart, + dirty = _ref.dirty, + dispatch = _ref.dispatch, + onFocus = _ref.onFocus, + form = _ref.form, + format = _ref.format, + parse = _ref.parse, + pristine = _ref.pristine, + props = _ref.props, + state = _ref.state, + submitError = _ref.submitError, + submitFailed = _ref.submitFailed, + submitting = _ref.submitting, + syncError = _ref.syncError, + syncWarning = _ref.syncWarning, + validate = _ref.validate, + value = _ref.value, + _value = _ref._value, + warn = _ref.warn, + custom = _objectWithoutProperties(_ref, ['asyncError', 'asyncValidating', 'onBlur', 'onChange', 'onDrop', 'onDragStart', 'dirty', 'dispatch', 'onFocus', 'form', 'format', 'parse', 'pristine', 'props', 'state', 'submitError', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'validate', 'value', '_value', 'warn']); + + var error = syncError || asyncError || submitError; + var warning = syncWarning; + + var formatFieldValue = function formatFieldValue(value, format) { + if (format === null) { + return value; + } + var defaultFormattedValue = value == null ? '' : value; + return format ? format(value, name) : defaultFormattedValue; + }; + + var formattedFieldValue = formatFieldValue(value, format); + + return { + input: processProps(custom.type, { + name: name, + onBlur: onBlur, + onChange: onChange, + onDragStart: onDragStart, + onDrop: onDrop, + onFocus: onFocus, + value: formattedFieldValue + }, _value), + meta: _extends({}, toJS(state), { + active: !!(state && getIn(state, 'active')), + asyncValidating: asyncValidating, + autofilled: !!(state && getIn(state, 'autofilled')), + dirty: dirty, + dispatch: dispatch, + error: error, + form: form, + warning: warning, + invalid: !!error, + pristine: pristine, + submitting: !!submitting, + submitFailed: !!submitFailed, + touched: !!(state && getIn(state, 'touched')), + valid: !error, + visited: !!(state && getIn(state, 'visited')) + }), + custom: _extends({}, custom, props) + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFieldProps); + +/***/ }), +/* 293 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getValue__ = __webpack_require__(605); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isReactNative__ = __webpack_require__(606); + + + +var onChangeValue = function onChangeValue(event, _ref) { + var name = _ref.name, + parse = _ref.parse, + normalize = _ref.normalize; + + // read value from input + var value = __WEBPACK_IMPORTED_MODULE_0__getValue__["a" /* default */](event, __WEBPACK_IMPORTED_MODULE_1__isReactNative__["a" /* default */]); + + // parse value if we have a parser + if (parse) { + value = parse(value, name); + } + + // normalize value + if (normalize) { + value = normalize(name, value); + } + + return value; +}; + +/* harmony default export */ __webpack_exports__["a"] = (onChangeValue); + +/***/ }), +/* 294 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createIsPristine = function createIsPristine(_ref) { + var deepEqual = _ref.deepEqual, + empty = _ref.empty, + getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + var initial = getIn(formState, form + '.initial') || empty; + var values = getIn(formState, form + '.values') || initial; + return deepEqual(initial, values); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsPristine); + +/***/ }), +/* 295 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(122) + , $export = __webpack_require__(32) + , redefine = __webpack_require__(296) + , hide = __webpack_require__(49) + , has = __webpack_require__(50) + , Iterators = __webpack_require__(80) + , $iterCreate = __webpack_require__(636) + , setToStringTag = __webpack_require__(123) + , getPrototypeOf = __webpack_require__(298) + , ITERATOR = __webpack_require__(23)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + +var returnThis = function(){ return this; }; + +module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; + // Fix native + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(49); + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(25).document && document.documentElement; + +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(50) + , toObject = __webpack_require__(86) + , IE_PROTO = __webpack_require__(140)('IE_PROTO') + , ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function(O){ + O = toObject(O); + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(typeof O.constructor == 'function' && O instanceof O.constructor){ + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(213) + , hiddenKeys = __webpack_require__(142).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ + return $keys(O, hiddenKeys); +}; + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(100) + , createDesc = __webpack_require__(84) + , toIObject = __webpack_require__(51) + , toPrimitive = __webpack_require__(136) + , has = __webpack_require__(50) + , IE8_DOM_DEFINE = __webpack_require__(212) + , gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(41) ? gOPD : function getOwnPropertyDescriptor(O, P){ + O = toIObject(O); + P = toPrimitive(P, true); + if(IE8_DOM_DEFINE)try { + return gOPD(O, P); + } catch(e){ /* empty */ } + if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); +}; + +/***/ }), +/* 301 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(32) + , core = __webpack_require__(18) + , fails = __webpack_require__(66); +module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); +}; + +/***/ }), +/* 303 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _getMuiTheme = __webpack_require__(125); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MuiThemeProvider = function (_Component) { + (0, _inherits3.default)(MuiThemeProvider, _Component); + + function MuiThemeProvider() { + (0, _classCallCheck3.default)(this, MuiThemeProvider); + return (0, _possibleConstructorReturn3.default)(this, (MuiThemeProvider.__proto__ || (0, _getPrototypeOf2.default)(MuiThemeProvider)).apply(this, arguments)); + } + + (0, _createClass3.default)(MuiThemeProvider, [{ + key: 'getChildContext', + value: function getChildContext() { + return { + muiTheme: this.props.muiTheme || (0, _getMuiTheme2.default)() + }; + } + }, { + key: 'render', + value: function render() { + return this.props.children; + } + }]); + return MuiThemeProvider; +}(_react.Component); + +MuiThemeProvider.childContextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? MuiThemeProvider.propTypes = { + children: _react.PropTypes.element, + muiTheme: _react.PropTypes.object +} : void 0; +exports.default = MuiThemeProvider; + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(664), __esModule: true }; + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(34); +module.exports = function(iterator, fn, value, entries){ + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch(e){ + var ret = iterator['return']; + if(ret !== undefined)anObject(ret.call(iterator)); + throw e; + } +}; + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(80) + , ITERATOR = __webpack_require__(23)('iterator') + , ArrayProto = Array.prototype; + +module.exports = function(it){ + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + +/***/ }), +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(23)('iterator') + , SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function(){ SAFE_CLOSING = true; }; + Array.from(riter, function(){ throw 2; }); +} catch(e){ /* empty */ } + +module.exports = function(exec, skipClosing){ + if(!skipClosing && !SAFE_CLOSING)return false; + var safe = false; + try { + var arr = [7] + , iter = arr[ITERATOR](); + iter.next = function(){ return {done: safe = true}; }; + arr[ITERATOR] = function(){ return iter; }; + exec(arr); + } catch(e){ /* empty */ } + return safe; +}; + +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _colors = __webpack_require__(47); + +var _colorManipulator = __webpack_require__(58); + +var _spacing = __webpack_require__(197); + +var _spacing2 = _interopRequireDefault(_spacing); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Light Theme is the default theme used in material-ui. It is guaranteed to + * have all theme variables needed for every component. Variables not defined + * in a custom theme will default to these values. + */ +exports.default = { + spacing: _spacing2.default, + fontFamily: 'Roboto, sans-serif', + palette: { + primary1Color: _colors.cyan500, + primary2Color: _colors.cyan700, + primary3Color: _colors.grey400, + accent1Color: _colors.pinkA200, + accent2Color: _colors.grey100, + accent3Color: _colors.grey500, + textColor: _colors.darkBlack, + secondaryTextColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.54), + alternateTextColor: _colors.white, + canvasColor: _colors.white, + borderColor: _colors.grey300, + disabledColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.3), + pickerHeaderColor: _colors.cyan500, + clockCircleColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.07), + shadowColor: _colors.fullBlack + } +}; /** + * NB: If you update this file, please also update `docs/src/app/customization/Themes.js` + */ + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + menu: 1000, + appBar: 1100, + drawerOverlay: 1200, + drawer: 1300, + dialogOverlay: 1400, + dialog: 1500, + layer: 2000, + popover: 2100, + snackbar: 2900, + tooltip: 3000 +}; + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { "Webkit": { "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "backfaceVisibility": true, "perspective": true, "perspectiveOrigin": true, "transformStyle": true, "transformOriginZ": true, "animation": true, "animationDelay": true, "animationDirection": true, "animationFillMode": true, "animationDuration": true, "animationIterationCount": true, "animationName": true, "animationPlayState": true, "animationTimingFunction": true, "appearance": true, "userSelect": true, "fontKerning": true, "textEmphasisPosition": true, "textEmphasis": true, "textEmphasisStyle": true, "textEmphasisColor": true, "boxDecorationBreak": true, "clipPath": true, "maskImage": true, "maskMode": true, "maskRepeat": true, "maskPosition": true, "maskClip": true, "maskOrigin": true, "maskSize": true, "maskComposite": true, "mask": true, "maskBorderSource": true, "maskBorderMode": true, "maskBorderSlice": true, "maskBorderWidth": true, "maskBorderOutset": true, "maskBorderRepeat": true, "maskBorder": true, "maskType": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "filter": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true, "flex": true, "flexBasis": true, "flexDirection": true, "flexGrow": true, "flexFlow": true, "flexShrink": true, "flexWrap": true, "alignContent": true, "alignItems": true, "alignSelf": true, "justifyContent": true, "order": true, "transition": true, "transitionDelay": true, "transitionDuration": true, "transitionProperty": true, "transitionTimingFunction": true, "backdropFilter": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "shapeImageThreshold": true, "shapeImageMargin": true, "shapeImageOutside": true, "hyphens": true, "flowInto": true, "flowFrom": true, "regionFragment": true, "textSizeAdjust": true }, "Moz": { "appearance": true, "userSelect": true, "boxSizing": true, "textAlignLast": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "tabSize": true, "hyphens": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true }, "ms": { "flex": true, "flexBasis": false, "flexDirection": true, "flexGrow": false, "flexFlow": true, "flexShrink": false, "flexWrap": true, "alignContent": false, "alignItems": false, "alignSelf": false, "justifyContent": false, "order": false, "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "userSelect": true, "wrapFlow": true, "wrapThrough": true, "wrapMargin": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "touchAction": true, "hyphens": true, "flowInto": true, "flowFrom": true, "breakBefore": true, "breakAfter": true, "breakInside": true, "regionFragment": true, "gridTemplateColumns": true, "gridTemplateRows": true, "gridTemplateAreas": true, "gridTemplate": true, "gridAutoColumns": true, "gridAutoRows": true, "gridAutoFlow": true, "grid": true, "gridRowStart": true, "gridColumnStart": true, "gridRowEnd": true, "gridRow": true, "gridColumn": true, "gridColumnEnd": true, "gridColumnGap": true, "gridRowGap": true, "gridArea": true, "gridGap": true, "textSizeAdjust": true } }; +module.exports = exports["default"]; + +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sortPrefixedStyle; + +var _isPrefixedProperty = __webpack_require__(671); + +var _isPrefixedProperty2 = _interopRequireDefault(_isPrefixedProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sortPrefixedStyle(style) { + return Object.keys(style).sort(function (left, right) { + if ((0, _isPrefixedProperty2.default)(left) && !(0, _isPrefixedProperty2.default)(right)) { + return -1; + } else if (!(0, _isPrefixedProperty2.default)(left) && (0, _isPrefixedProperty2.default)(right)) { + return 1; + } + return 0; + }).reduce(function (sortedStyle, prop) { + sortedStyle[prop] = style[prop]; + return sortedStyle; + }, {}); +} +module.exports = exports['default']; + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var uppercasePattern = /[A-Z]/g; +var msPattern = /^ms-/; +var cache = {}; + +function hyphenateStyleName(string) { + return string in cache + ? cache[string] + : cache[string] = string + .replace(uppercasePattern, '-$&') + .toLowerCase() + .replace(msPattern, '-ms-'); +} + +module.exports = hyphenateStyleName; + + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _colors = __webpack_require__(47); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Typography = function Typography() { + (0, _classCallCheck3.default)(this, Typography); + + // text colors + this.textFullBlack = _colors.fullBlack; + this.textDarkBlack = _colors.darkBlack; + this.textLightBlack = _colors.lightBlack; + this.textMinBlack = _colors.minBlack; + this.textFullWhite = _colors.fullWhite; + this.textDarkWhite = _colors.darkWhite; + this.textLightWhite = _colors.lightWhite; + + // font weight + this.fontWeightLight = 300; + this.fontWeightNormal = 400; + this.fontWeightMedium = 500; + + this.fontStyleButtonFontSize = 14; +}; + +exports.default = new Typography(); + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Subheader = __webpack_require__(704); + +var _Subheader2 = _interopRequireDefault(_Subheader); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Subheader2.default; + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(60); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _colorManipulator = __webpack_require__(58); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _EnhancedButton = __webpack_require__(61); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _IconButton = __webpack_require__(81); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _expandLess = __webpack_require__(715); + +var _expandLess2 = _interopRequireDefault(_expandLess); + +var _expandMore = __webpack_require__(722); + +var _expandMore2 = _interopRequireDefault(_expandMore); + +var _NestedList = __webpack_require__(723); + +var _NestedList2 = _interopRequireDefault(_NestedList); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var insetChildren = props.insetChildren, + leftAvatar = props.leftAvatar, + leftCheckbox = props.leftCheckbox, + leftIcon = props.leftIcon, + nestedLevel = props.nestedLevel, + rightAvatar = props.rightAvatar, + rightIcon = props.rightIcon, + rightIconButton = props.rightIconButton, + rightToggle = props.rightToggle, + secondaryText = props.secondaryText, + secondaryTextLines = props.secondaryTextLines; + var muiTheme = context.muiTheme; + var listItem = muiTheme.listItem; + + + var textColor = muiTheme.baseTheme.palette.textColor; + var hoverColor = props.hoverColor || (0, _colorManipulator.fade)(textColor, 0.1); + var singleAvatar = !secondaryText && (leftAvatar || rightAvatar); + var singleNoAvatar = !secondaryText && !(leftAvatar || rightAvatar); + var twoLine = secondaryText && secondaryTextLines === 1; + var threeLine = secondaryText && secondaryTextLines > 1; + + var styles = { + root: { + backgroundColor: (state.isKeyboardFocused || state.hovered) && !state.rightIconButtonHovered && !state.rightIconButtonKeyboardFocused ? hoverColor : null, + color: textColor, + display: 'block', + fontSize: 16, + lineHeight: '16px', + position: 'relative', + transition: _transitions2.default.easeOut() + }, + + // This inner div is needed so that ripples will span the entire container + innerDiv: { + marginLeft: nestedLevel * listItem.nestedLevelDepth, + paddingLeft: leftIcon || leftAvatar || leftCheckbox || insetChildren ? 72 : 16, + paddingRight: rightIcon || rightAvatar || rightIconButton ? 56 : rightToggle ? 72 : 16, + paddingBottom: singleAvatar ? 20 : 16, + paddingTop: singleNoAvatar || threeLine ? 16 : 20, + position: 'relative' + }, + + icons: { + height: 24, + width: 24, + display: 'block', + position: 'absolute', + top: twoLine ? 12 : singleAvatar ? 4 : 0, + margin: 12 + }, + + leftIcon: { + left: 4 + }, + + rightIcon: { + right: 4 + }, + + avatars: { + position: 'absolute', + top: singleAvatar ? 8 : 16 + }, + + label: { + cursor: 'pointer' + }, + + leftAvatar: { + left: 16 + }, + + rightAvatar: { + right: 16 + }, + + leftCheckbox: { + position: 'absolute', + display: 'block', + width: 24, + top: twoLine ? 24 : singleAvatar ? 16 : 12, + left: 16 + }, + + primaryText: {}, + + rightIconButton: { + position: 'absolute', + display: 'block', + top: twoLine ? 12 : singleAvatar ? 4 : 0, + right: 4 + }, + + rightToggle: { + position: 'absolute', + display: 'block', + width: 54, + top: twoLine ? 25 : singleAvatar ? 17 : 13, + right: 8 + }, + + secondaryText: { + fontSize: 14, + lineHeight: threeLine ? '18px' : '16px', + height: threeLine ? 36 : 16, + margin: 0, + marginTop: 4, + color: listItem.secondaryTextColor, + + // needed for 2 and 3 line ellipsis + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: threeLine ? null : 'nowrap', + display: threeLine ? '-webkit-box' : null, + WebkitLineClamp: threeLine ? 2 : null, + WebkitBoxOrient: threeLine ? 'vertical' : null + } + }; + + return styles; +} + +var ListItem = function (_Component) { + (0, _inherits3.default)(ListItem, _Component); + + function ListItem() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ListItem); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ListItem.__proto__ || (0, _getPrototypeOf2.default)(ListItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + open: false, + rightIconButtonHovered: false, + rightIconButtonKeyboardFocused: false, + touch: false + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + _this.props.onKeyboardFocus(event, isKeyboardFocused); + }, _this.handleMouseEnter = function (event) { + if (!_this.state.touch) _this.setState({ hovered: true }); + _this.props.onMouseEnter(event); + }, _this.handleMouseLeave = function (event) { + _this.setState({ hovered: false }); + _this.props.onMouseLeave(event); + }, _this.handleNestedListToggle = function (event) { + event.stopPropagation(); + + if (_this.props.open === null) { + _this.setState({ open: !_this.state.open }, function () { + _this.props.onNestedListToggle(_this); + }); + } else { + // Exposing `this` in the callback is quite a bad API. + // I'm doing a one level deep clone to expose a fake state.open. + _this.props.onNestedListToggle((0, _extends3.default)({}, _this, { + state: { + open: !_this.state.open + } + })); + } + }, _this.handleRightIconButtonKeyboardFocus = function (event, isKeyboardFocused) { + if (isKeyboardFocused) { + _this.setState({ + isKeyboardFocused: false, + rightIconButtonKeyboardFocused: isKeyboardFocused + }); + } + + var iconButton = _this.props.rightIconButton; + + if (iconButton && iconButton.props.onKeyboardFocus) iconButton.props.onKeyboardFocus(event, isKeyboardFocused); + }, _this.handleRightIconButtonMouseLeave = function (event) { + var iconButton = _this.props.rightIconButton; + _this.setState({ rightIconButtonHovered: false }); + if (iconButton && iconButton.props.onMouseLeave) iconButton.props.onMouseLeave(event); + }, _this.handleRightIconButtonMouseEnter = function (event) { + var iconButton = _this.props.rightIconButton; + _this.setState({ rightIconButtonHovered: true }); + if (iconButton && iconButton.props.onMouseEnter) iconButton.props.onMouseEnter(event); + }, _this.handleRightIconButtonMouseUp = function (event) { + var iconButton = _this.props.rightIconButton; + event.stopPropagation(); + if (iconButton && iconButton.props.onMouseUp) iconButton.props.onMouseUp(event); + }, _this.handleRightIconButtonTouchTap = function (event) { + var iconButton = _this.props.rightIconButton; + + // Stop the event from bubbling up to the list-item + event.stopPropagation(); + if (iconButton && iconButton.props.onTouchTap) iconButton.props.onTouchTap(event); + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); + _this.props.onTouchStart(event); + }, _this.handleTouchEnd = function (event) { + _this.setState({ touch: true }); + _this.props.onTouchEnd(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ListItem, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + open: this.props.open === null ? this.props.initiallyOpen === true : this.props.open + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + // update the state when the component is controlled. + if (nextProps.open !== null) this.setState({ open: nextProps.open }); + if (nextProps.disabled && this.state.hovered) this.setState({ hovered: false }); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + + // This method is needed by the `MenuItem` component. + + }, { + key: 'applyFocusState', + value: function applyFocusState(focusState) { + var button = this.refs.enhancedButton; + + if (button) { + var buttonEl = _reactDom2.default.findDOMNode(button); + + switch (focusState) { + case 'none': + buttonEl.blur(); + break; + case 'focused': + buttonEl.focus(); + break; + case 'keyboard-focused': + button.setKeyboardFocus(); + buttonEl.focus(); + break; + } + } + } + }, { + key: 'createDisabledElement', + value: function createDisabledElement(styles, contentChildren, additionalProps) { + var _props = this.props, + innerDivStyle = _props.innerDivStyle, + style = _props.style; + + + var mergedDivStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, style); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, additionalProps, { + style: this.context.muiTheme.prepareStyles(mergedDivStyles) + }), + contentChildren + ); + } + }, { + key: 'createLabelElement', + value: function createLabelElement(styles, contentChildren, additionalProps) { + var _props2 = this.props, + innerDivStyle = _props2.innerDivStyle, + style = _props2.style; + + + var mergedLabelStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, styles.label, style); + + return _react2.default.createElement( + 'label', + (0, _extends3.default)({}, additionalProps, { + style: this.context.muiTheme.prepareStyles(mergedLabelStyles) + }), + contentChildren + ); + } + }, { + key: 'createTextElement', + value: function createTextElement(styles, data, key) { + var prepareStyles = this.context.muiTheme.prepareStyles; + + if (_react2.default.isValidElement(data)) { + var style = (0, _simpleAssign2.default)({}, styles, data.props.style); + if (typeof data.type === 'string') { + // if element is a native dom node + style = prepareStyles(style); + } + return _react2.default.cloneElement(data, { + key: key, + style: style + }); + } + + return _react2.default.createElement( + 'div', + { key: key, style: prepareStyles(styles) }, + data + ); + } + }, { + key: 'pushElement', + value: function pushElement(children, element, baseStyles, additionalProps) { + if (element) { + var styles = (0, _simpleAssign2.default)({}, baseStyles, element.props.style); + children.push(_react2.default.cloneElement(element, (0, _extends3.default)({ + key: children.length, + style: styles + }, additionalProps))); + } + } + }, { + key: 'render', + value: function render() { + var _props3 = this.props, + autoGenerateNestedIndicator = _props3.autoGenerateNestedIndicator, + children = _props3.children, + disabled = _props3.disabled, + disableKeyboardFocus = _props3.disableKeyboardFocus, + hoverColor = _props3.hoverColor, + initiallyOpen = _props3.initiallyOpen, + innerDivStyle = _props3.innerDivStyle, + insetChildren = _props3.insetChildren, + leftAvatar = _props3.leftAvatar, + leftCheckbox = _props3.leftCheckbox, + leftIcon = _props3.leftIcon, + nestedItems = _props3.nestedItems, + nestedLevel = _props3.nestedLevel, + nestedListStyle = _props3.nestedListStyle, + onKeyboardFocus = _props3.onKeyboardFocus, + onMouseEnter = _props3.onMouseEnter, + onMouseLeave = _props3.onMouseLeave, + onNestedListToggle = _props3.onNestedListToggle, + onTouchStart = _props3.onTouchStart, + onTouchTap = _props3.onTouchTap, + rightAvatar = _props3.rightAvatar, + rightIcon = _props3.rightIcon, + rightIconButton = _props3.rightIconButton, + rightToggle = _props3.rightToggle, + primaryText = _props3.primaryText, + primaryTogglesNestedList = _props3.primaryTogglesNestedList, + secondaryText = _props3.secondaryText, + secondaryTextLines = _props3.secondaryTextLines, + style = _props3.style, + other = (0, _objectWithoutProperties3.default)(_props3, ['autoGenerateNestedIndicator', 'children', 'disabled', 'disableKeyboardFocus', 'hoverColor', 'initiallyOpen', 'innerDivStyle', 'insetChildren', 'leftAvatar', 'leftCheckbox', 'leftIcon', 'nestedItems', 'nestedLevel', 'nestedListStyle', 'onKeyboardFocus', 'onMouseEnter', 'onMouseLeave', 'onNestedListToggle', 'onTouchStart', 'onTouchTap', 'rightAvatar', 'rightIcon', 'rightIconButton', 'rightToggle', 'primaryText', 'primaryTogglesNestedList', 'secondaryText', 'secondaryTextLines', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var contentChildren = [children]; + + if (leftIcon) { + var additionalProps = { + color: leftIcon.props.color || this.context.muiTheme.listItem.leftIconColor + }; + this.pushElement(contentChildren, leftIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.leftIcon), additionalProps); + } + + if (rightIcon) { + var _additionalProps = { + color: rightIcon.props.color || this.context.muiTheme.listItem.rightIconColor + }; + this.pushElement(contentChildren, rightIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.rightIcon), _additionalProps); + } + + if (leftAvatar) { + this.pushElement(contentChildren, leftAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.leftAvatar)); + } + + if (rightAvatar) { + this.pushElement(contentChildren, rightAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.rightAvatar)); + } + + if (leftCheckbox) { + this.pushElement(contentChildren, leftCheckbox, (0, _simpleAssign2.default)({}, styles.leftCheckbox)); + } + + // RightIconButtonElement + var hasNestListItems = nestedItems.length; + var hasRightElement = rightAvatar || rightIcon || rightIconButton || rightToggle; + var needsNestedIndicator = hasNestListItems && autoGenerateNestedIndicator && !hasRightElement; + + if (rightIconButton || needsNestedIndicator) { + var rightIconButtonElement = rightIconButton; + var rightIconButtonHandlers = { + onKeyboardFocus: this.handleRightIconButtonKeyboardFocus, + onMouseEnter: this.handleRightIconButtonMouseEnter, + onMouseLeave: this.handleRightIconButtonMouseLeave, + onTouchTap: this.handleRightIconButtonTouchTap, + onMouseDown: this.handleRightIconButtonMouseUp, + onMouseUp: this.handleRightIconButtonMouseUp + }; + + // Create a nested list indicator icon if we don't have an icon on the right + if (needsNestedIndicator) { + rightIconButtonElement = this.state.open ? _react2.default.createElement( + _IconButton2.default, + null, + _react2.default.createElement(_expandLess2.default, null) + ) : _react2.default.createElement( + _IconButton2.default, + null, + _react2.default.createElement(_expandMore2.default, null) + ); + rightIconButtonHandlers.onTouchTap = this.handleNestedListToggle; + } + + this.pushElement(contentChildren, rightIconButtonElement, (0, _simpleAssign2.default)({}, styles.rightIconButton), rightIconButtonHandlers); + } + + if (rightToggle) { + this.pushElement(contentChildren, rightToggle, (0, _simpleAssign2.default)({}, styles.rightToggle)); + } + + if (primaryText) { + var primaryTextElement = this.createTextElement(styles.primaryText, primaryText, 'primaryText'); + contentChildren.push(primaryTextElement); + } + + if (secondaryText) { + var secondaryTextElement = this.createTextElement(styles.secondaryText, secondaryText, 'secondaryText'); + contentChildren.push(secondaryTextElement); + } + + var nestedList = nestedItems.length ? _react2.default.createElement( + _NestedList2.default, + { nestedLevel: nestedLevel, open: this.state.open, style: nestedListStyle }, + nestedItems + ) : undefined; + + var simpleLabel = !primaryTogglesNestedList && (leftCheckbox || rightToggle); + + return _react2.default.createElement( + 'div', + null, + simpleLabel ? this.createLabelElement(styles, contentChildren, other) : disabled ? this.createDisabledElement(styles, contentChildren, other) : _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({ + containerElement: 'span' + }, other, { + disableKeyboardFocus: disableKeyboardFocus || this.state.rightIconButtonKeyboardFocused, + onKeyboardFocus: this.handleKeyboardFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd, + onTouchTap: primaryTogglesNestedList ? this.handleNestedListToggle : onTouchTap, + ref: 'enhancedButton', + style: (0, _simpleAssign2.default)({}, styles.root, style) + }), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.innerDiv, innerDivStyle)) }, + contentChildren + ) + ), + nestedList + ); + } + }]); + return ListItem; +}(_react.Component); + +ListItem.muiName = 'ListItem'; +ListItem.defaultProps = { + autoGenerateNestedIndicator: true, + disableKeyboardFocus: false, + disabled: false, + initiallyOpen: false, + insetChildren: false, + nestedItems: [], + nestedLevel: 0, + onKeyboardFocus: function onKeyboardFocus() {}, + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + onNestedListToggle: function onNestedListToggle() {}, + onTouchEnd: function onTouchEnd() {}, + onTouchStart: function onTouchStart() {}, + open: null, + primaryTogglesNestedList: false, + secondaryTextLines: 1 +}; +ListItem.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ListItem.propTypes = { + /** + * If true, generate a nested-list-indicator icon when nested list + * items are detected. Note that an indicator will not be created + * if a `rightIcon` or `rightIconButton` has been provided to + * the element. + */ + autoGenerateNestedIndicator: _react.PropTypes.bool, + /** + * Children passed into the `ListItem`. + */ + children: _react.PropTypes.node, + /** + * If true, the element will not be able to be focused by the keyboard. + */ + disableKeyboardFocus: _react.PropTypes.bool, + /** + * If true, the element will not be clickable + * and will not display hover effects. + * This is automatically disabled if either `leftCheckbox` + * or `rightToggle` is set. + */ + disabled: _react.PropTypes.bool, + /** + * Override the hover background color. + */ + hoverColor: _react.PropTypes.string, + /** + * If true, the nested `ListItem`s are initially displayed. + */ + initiallyOpen: _react.PropTypes.bool, + /** + * Override the inline-styles of the inner div element. + */ + innerDivStyle: _react.PropTypes.object, + /** + * If true, the children will be indented by 72px. + * This is useful if there is no left avatar or left icon. + */ + insetChildren: _react.PropTypes.bool, + /** + * This is the `Avatar` element to be displayed on the left side. + */ + leftAvatar: _react.PropTypes.element, + /** + * This is the `Checkbox` element to be displayed on the left side. + */ + leftCheckbox: _react.PropTypes.element, + /** + * This is the `SvgIcon` or `FontIcon` to be displayed on the left side. + */ + leftIcon: _react.PropTypes.element, + /** + * An array of `ListItem`s to nest underneath the current `ListItem`. + */ + nestedItems: _react.PropTypes.arrayOf(_react.PropTypes.element), + /** + * Controls how deep a `ListItem` appears. + * This property is automatically managed, so modify at your own risk. + */ + nestedLevel: _react.PropTypes.number, + /** + * Override the inline-styles of the nested items' `NestedList`. + */ + nestedListStyle: _react.PropTypes.object, + /** + * Callback function fired when the `ListItem` is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the `ListItem`. + * @param {boolean} isKeyboardFocused If true, the `ListItem` is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Callbak function fired when the `ListItem` toggles its nested list. + * + * @param {object} listItem The `ListItem`. + */ + onNestedListToggle: _react.PropTypes.func, + /** @ignore */ + onTouchEnd: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** @ignore */ + onTouchTap: _react.PropTypes.func, + /** + * Control toggle state of nested list. + */ + open: _react.PropTypes.bool, + /** + * This is the block element that contains the primary text. + * If a string is passed in, a div tag will be rendered. + */ + primaryText: _react.PropTypes.node, + /** + * If true, clicking or tapping the primary text of the `ListItem` + * toggles the nested list. + */ + primaryTogglesNestedList: _react.PropTypes.bool, + /** + * This is the `Avatar` element to be displayed on the right side. + */ + rightAvatar: _react.PropTypes.element, + /** + * This is the `SvgIcon` or `FontIcon` to be displayed on the right side. + */ + rightIcon: _react.PropTypes.element, + /** + * This is the `IconButton` to be displayed on the right side. + * Hovering over this button will remove the `ListItem` hover. + * Also, clicking on this button will not trigger a + * ripple on the `ListItem`; the event will be stopped and prevented + * from bubbling up to cause a `ListItem` click. + */ + rightIconButton: _react.PropTypes.element, + /** + * This is the `Toggle` element to display on the right side. + */ + rightToggle: _react.PropTypes.element, + /** + * This is the block element that contains the secondary text. + * If a string is passed in, a div tag will be rendered. + */ + secondaryText: _react.PropTypes.node, + /** + * Can be 1 or 2. This is the number of secondary + * text lines before ellipsis will show. + */ + secondaryTextLines: _react.PropTypes.oneOf([1, 2]), + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = ListItem; + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _toConsumableArray2 = __webpack_require__(94); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _toArray2 = __webpack_require__(317); + +var _toArray3 = _interopRequireDefault(_toArray2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactAddonsTransitionGroup = __webpack_require__(128); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +var _dom = __webpack_require__(318); + +var _dom2 = _interopRequireDefault(_dom); + +var _CircleRipple = __webpack_require__(712); + +var _CircleRipple2 = _interopRequireDefault(_CircleRipple); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Remove the first element of the array +var shift = function shift(_ref) { + var _ref2 = (0, _toArray3.default)(_ref), + newArray = _ref2.slice(1); + + return newArray; +}; + +var TouchRipple = function (_Component) { + (0, _inherits3.default)(TouchRipple, _Component); + + function TouchRipple(props, context) { + (0, _classCallCheck3.default)(this, TouchRipple); + + // Touch start produces a mouse down event for compat reasons. To avoid + // showing ripples twice we skip showing a ripple for the first mouse down + // after a touch start. Note we don't store ignoreNextMouseDown in this.state + // to avoid re-rendering when we change it. + var _this = (0, _possibleConstructorReturn3.default)(this, (TouchRipple.__proto__ || (0, _getPrototypeOf2.default)(TouchRipple)).call(this, props, context)); + + _this.handleMouseDown = function (event) { + // only listen to left clicks + if (event.button === 0) { + _this.start(event, false); + } + }; + + _this.handleMouseUp = function () { + _this.end(); + }; + + _this.handleMouseLeave = function () { + _this.end(); + }; + + _this.handleTouchStart = function (event) { + event.stopPropagation(); + // If the user is swiping (not just tapping), save the position so we can + // abort ripples if the user appears to be scrolling. + if (_this.props.abortOnScroll && event.touches) { + _this.startListeningForScrollAbort(event); + _this.startTime = Date.now(); + } + _this.start(event, true); + }; + + _this.handleTouchEnd = function () { + _this.end(); + }; + + _this.handleTouchMove = function (event) { + // Stop trying to abort if we're already 300ms into the animation + var timeSinceStart = Math.abs(Date.now() - _this.startTime); + if (timeSinceStart > 300) { + _this.stopListeningForScrollAbort(); + return; + } + + // If the user is scrolling... + var deltaY = Math.abs(event.touches[0].clientY - _this.firstTouchY); + var deltaX = Math.abs(event.touches[0].clientX - _this.firstTouchX); + // Call it a scroll after an arbitrary 6px (feels reasonable in testing) + if (deltaY > 6 || deltaX > 6) { + var currentRipples = _this.state.ripples; + var ripple = currentRipples[0]; + // This clone will replace the ripple in ReactTransitionGroup with a + // version that will disappear immediately when removed from the DOM + var abortedRipple = _react2.default.cloneElement(ripple, { aborted: true }); + // Remove the old ripple and replace it with the new updated one + currentRipples = shift(currentRipples); + currentRipples = [].concat((0, _toConsumableArray3.default)(currentRipples), [abortedRipple]); + _this.setState({ ripples: currentRipples }, function () { + // Call end after we've set the ripple to abort otherwise the setState + // in end() merges with this and the ripple abort fails + _this.end(); + }); + } + }; + + _this.ignoreNextMouseDown = false; + + _this.state = { + // This prop allows us to only render the ReactTransitionGroup + // on the first click of the component, making the inital render faster. + hasRipples: false, + nextKey: 0, + ripples: [] + }; + return _this; + } + + (0, _createClass3.default)(TouchRipple, [{ + key: 'start', + value: function start(event, isRippleTouchGenerated) { + var theme = this.context.muiTheme.ripple; + + if (this.ignoreNextMouseDown && !isRippleTouchGenerated) { + this.ignoreNextMouseDown = false; + return; + } + + var ripples = this.state.ripples; + + // Add a ripple to the ripples array + ripples = [].concat((0, _toConsumableArray3.default)(ripples), [_react2.default.createElement(_CircleRipple2.default, { + key: this.state.nextKey, + style: !this.props.centerRipple ? this.getRippleStyle(event) : {}, + color: this.props.color || theme.color, + opacity: this.props.opacity, + touchGenerated: isRippleTouchGenerated + })]); + + this.ignoreNextMouseDown = isRippleTouchGenerated; + this.setState({ + hasRipples: true, + nextKey: this.state.nextKey + 1, + ripples: ripples + }); + } + }, { + key: 'end', + value: function end() { + var currentRipples = this.state.ripples; + this.setState({ + ripples: shift(currentRipples) + }); + if (this.props.abortOnScroll) { + this.stopListeningForScrollAbort(); + } + } + + // Check if the user seems to be scrolling and abort the animation if so + + }, { + key: 'startListeningForScrollAbort', + value: function startListeningForScrollAbort(event) { + this.firstTouchY = event.touches[0].clientY; + this.firstTouchX = event.touches[0].clientX; + // Note that when scolling Chrome throttles this event to every 200ms + // Also note we don't listen for scroll events directly as there's no general + // way to cover cases like scrolling within containers on the page + document.body.addEventListener('touchmove', this.handleTouchMove); + } + }, { + key: 'stopListeningForScrollAbort', + value: function stopListeningForScrollAbort() { + document.body.removeEventListener('touchmove', this.handleTouchMove); + } + }, { + key: 'getRippleStyle', + value: function getRippleStyle(event) { + var el = _reactDom2.default.findDOMNode(this); + var elHeight = el.offsetHeight; + var elWidth = el.offsetWidth; + var offset = _dom2.default.offset(el); + var isTouchEvent = event.touches && event.touches.length; + var pageX = isTouchEvent ? event.touches[0].pageX : event.pageX; + var pageY = isTouchEvent ? event.touches[0].pageY : event.pageY; + var pointerX = pageX - offset.left; + var pointerY = pageY - offset.top; + var topLeftDiag = this.calcDiag(pointerX, pointerY); + var topRightDiag = this.calcDiag(elWidth - pointerX, pointerY); + var botRightDiag = this.calcDiag(elWidth - pointerX, elHeight - pointerY); + var botLeftDiag = this.calcDiag(pointerX, elHeight - pointerY); + var rippleRadius = Math.max(topLeftDiag, topRightDiag, botRightDiag, botLeftDiag); + var rippleSize = rippleRadius * 2; + var left = pointerX - rippleRadius; + var top = pointerY - rippleRadius; + + return { + directionInvariant: true, + height: rippleSize, + width: rippleSize, + top: top, + left: left + }; + } + }, { + key: 'calcDiag', + value: function calcDiag(a, b) { + return Math.sqrt(a * a + b * b); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + style = _props.style; + var _state = this.state, + hasRipples = _state.hasRipples, + ripples = _state.ripples; + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var rippleGroup = void 0; + + if (hasRipples) { + var mergedStyles = (0, _simpleAssign2.default)({ + height: '100%', + width: '100%', + position: 'absolute', + top: 0, + left: 0, + overflow: 'hidden', + pointerEvents: 'none' + }, style); + + rippleGroup = _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + { style: prepareStyles(mergedStyles) }, + ripples + ); + } + + return _react2.default.createElement( + 'div', + { + onMouseUp: this.handleMouseUp, + onMouseDown: this.handleMouseDown, + onMouseLeave: this.handleMouseLeave, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd + }, + rippleGroup, + children + ); + } + }]); + return TouchRipple; +}(_react.Component); + +TouchRipple.defaultProps = { + abortOnScroll: true +}; +TouchRipple.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TouchRipple.propTypes = { + abortOnScroll: _react.PropTypes.bool, + centerRipple: _react.PropTypes.bool, + children: _react.PropTypes.node, + color: _react.PropTypes.string, + opacity: _react.PropTypes.number, + style: _react.PropTypes.object +} : void 0; +exports.default = TouchRipple; + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _from = __webpack_require__(304); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + return Array.isArray(arr) ? arr : (0, _from2.default)(arr); +}; + +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + isDescendant: function isDescendant(parent, child) { + var node = child.parentNode; + + while (node !== null) { + if (node === parent) return true; + node = node.parentNode; + } + + return false; + }, + offset: function offset(el) { + var rect = el.getBoundingClientRect(); + return { + top: rect.top + document.body.scrollTop, + left: rect.left + document.body.scrollLeft + }; + } +}; + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _FontIcon = __webpack_require__(714); + +var _FontIcon2 = _interopRequireDefault(_FontIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _FontIcon2.default; + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var verticalPosition = props.verticalPosition; + var horizontalPosition = props.horizontalPosition; + var touchMarginOffset = props.touch ? 10 : 0; + var touchOffsetTop = props.touch ? -20 : -10; + var offset = verticalPosition === 'bottom' ? 14 + touchMarginOffset : -14 - touchMarginOffset; + + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + zIndex = _context$muiTheme.zIndex, + tooltip = _context$muiTheme.tooltip; + + + var styles = { + root: { + position: 'absolute', + fontFamily: baseTheme.fontFamily, + fontSize: '10px', + lineHeight: '22px', + padding: '0 8px', + zIndex: zIndex.tooltip, + color: tooltip.color, + overflow: 'hidden', + top: -10000, + borderRadius: 2, + userSelect: 'none', + opacity: 0, + right: horizontalPosition === 'left' ? 12 : null, + left: horizontalPosition === 'center' ? (state.offsetWidth - 48) / 2 * -1 : null, + transition: _transitions2.default.easeOut('0ms', 'top', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') + }, + label: { + position: 'relative', + whiteSpace: 'nowrap' + }, + ripple: { + position: 'absolute', + left: horizontalPosition === 'center' ? '50%' : horizontalPosition === 'left' ? '100%' : '0%', + top: verticalPosition === 'bottom' ? 0 : '100%', + transform: 'translate(-50%, -50%)', + borderRadius: '50%', + backgroundColor: 'transparent', + transition: _transitions2.default.easeOut('0ms', 'width', '450ms') + ', ' + _transitions2.default.easeOut('0ms', 'height', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') + }, + rootWhenShown: { + top: verticalPosition === 'top' ? touchOffsetTop : 36, + opacity: 0.9, + transform: 'translate(0px, ' + offset + 'px)', + transition: _transitions2.default.easeOut('0ms', 'top', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') + }, + rootWhenTouched: { + fontSize: '14px', + lineHeight: '32px', + padding: '0 16px' + }, + rippleWhenShown: { + backgroundColor: tooltip.rippleBackgroundColor, + transition: _transitions2.default.easeOut('450ms', 'width', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'height', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') + } + }; + + return styles; +} + +var Tooltip = function (_Component) { + (0, _inherits3.default)(Tooltip, _Component); + + function Tooltip() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Tooltip); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tooltip.__proto__ || (0, _getPrototypeOf2.default)(Tooltip)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + offsetWidth: null + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Tooltip, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setRippleSize(); + this.setTooltipPosition(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps() { + this.setTooltipPosition(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.setRippleSize(); + } + }, { + key: 'setRippleSize', + value: function setRippleSize() { + var ripple = this.refs.ripple; + var tooltip = this.refs.tooltip; + var tooltipWidth = parseInt(tooltip.offsetWidth, 10) / (this.props.horizontalPosition === 'center' ? 2 : 1); + var tooltipHeight = parseInt(tooltip.offsetHeight, 10); + + var rippleDiameter = Math.ceil(Math.sqrt(Math.pow(tooltipHeight, 2) + Math.pow(tooltipWidth, 2)) * 2); + if (this.props.show) { + ripple.style.height = rippleDiameter + 'px'; + ripple.style.width = rippleDiameter + 'px'; + } else { + ripple.style.width = '0px'; + ripple.style.height = '0px'; + } + } + }, { + key: 'setTooltipPosition', + value: function setTooltipPosition() { + this.setState({ offsetWidth: this.refs.tooltip.offsetWidth }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + horizontalPosition = _props.horizontalPosition, + label = _props.label, + show = _props.show, + touch = _props.touch, + verticalPosition = _props.verticalPosition, + other = (0, _objectWithoutProperties3.default)(_props, ['horizontalPosition', 'label', 'show', 'touch', 'verticalPosition']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { + ref: 'tooltip', + style: prepareStyles((0, _simpleAssign2.default)(styles.root, this.props.show && styles.rootWhenShown, this.props.touch && styles.rootWhenTouched, this.props.style)) + }), + _react2.default.createElement('div', { + ref: 'ripple', + style: prepareStyles((0, _simpleAssign2.default)(styles.ripple, this.props.show && styles.rippleWhenShown)) + }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + label + ) + ); + } + }]); + return Tooltip; +}(_react.Component); + +Tooltip.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Tooltip.propTypes = { + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + horizontalPosition: _react.PropTypes.oneOf(['left', 'right', 'center']), + label: _react.PropTypes.node.isRequired, + show: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + touch: _react.PropTypes.bool, + verticalPosition: _react.PropTypes.oneOf(['top', 'bottom']) +} : void 0; +exports.default = Tooltip; + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var createHelper = function createHelper(func, helperName) { + var setDisplayName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var noArgs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + if (false) { + var _ret = function () { + /* eslint-disable global-require */ + var wrapDisplayName = require('./wrapDisplayName').default; + /* eslint-enable global-require */ + + if (noArgs) { + return { + v: function v(BaseComponent) { + var Component = func(BaseComponent); + Component.displayName = wrapDisplayName(BaseComponent, helperName); + return Component; + } + }; + } + + return { + v: function v() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return function (BaseComponent) { + var Component = func.apply(undefined, args)(BaseComponent); + Component.displayName = wrapDisplayName(BaseComponent, helperName); + return Component; + }; + } + }; + }(); + + if (typeof _ret === "object") return _ret.v; + } + + return func; +}; + +exports.default = createHelper; + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _AutoLockScrolling = __webpack_require__(731); + +var _AutoLockScrolling2 = _interopRequireDefault(_AutoLockScrolling); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var overlay = context.muiTheme.overlay; + + + var style = { + root: { + position: 'fixed', + height: '100%', + width: '100%', + top: 0, + left: '-100%', + opacity: 0, + backgroundColor: overlay.backgroundColor, + WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)', // Remove mobile color flashing (deprecated) + + // Two ways to promote overlay to its own render layer + willChange: 'opacity', + transform: 'translateZ(0)', + + transition: props.transitionEnabled && _transitions2.default.easeOut('0ms', 'left', '400ms') + ', ' + _transitions2.default.easeOut('400ms', 'opacity') + } + }; + + if (props.show) { + (0, _simpleAssign2.default)(style.root, { + left: 0, + opacity: 1, + transition: _transitions2.default.easeOut('0ms', 'left') + ', ' + _transitions2.default.easeOut('400ms', 'opacity') + }); + } + + return style; +} + +var Overlay = function (_Component) { + (0, _inherits3.default)(Overlay, _Component); + + function Overlay() { + (0, _classCallCheck3.default)(this, Overlay); + return (0, _possibleConstructorReturn3.default)(this, (Overlay.__proto__ || (0, _getPrototypeOf2.default)(Overlay)).apply(this, arguments)); + } + + (0, _createClass3.default)(Overlay, [{ + key: 'setOpacity', + value: function setOpacity(opacity) { + this.refs.overlay.style.opacity = opacity; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + autoLockScrolling = _props.autoLockScrolling, + show = _props.show, + style = _props.style, + transitionEnabled = _props.transitionEnabled, + other = (0, _objectWithoutProperties3.default)(_props, ['autoLockScrolling', 'show', 'style', 'transitionEnabled']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { ref: 'overlay', style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + autoLockScrolling && _react2.default.createElement(_AutoLockScrolling2.default, { lock: show }) + ); + } + }]); + return Overlay; +}(_react.Component); + +Overlay.defaultProps = { + autoLockScrolling: true, + style: {}, + transitionEnabled: true +}; +Overlay.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Overlay.propTypes = { + autoLockScrolling: _react.PropTypes.bool, + show: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + transitionEnabled: _react.PropTypes.bool +} : void 0; +exports.default = Overlay; + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SHOP_NAME = undefined; + +var _keys = __webpack_require__(59); + +var _keys2 = _interopRequireDefault(_keys); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _Tab = __webpack_require__(740); + +var _Tab2 = _interopRequireDefault(_Tab); + +var _reactRedux = __webpack_require__(21); + +var _FontIcon = __webpack_require__(319); + +var _FontIcon2 = _interopRequireDefault(_FontIcon); + +var _IconButton = __webpack_require__(81); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _colors = __webpack_require__(47); + +var _Menus = __webpack_require__(82); + +var menus = _interopRequireWildcard(_Menus); + +var _Billing = __webpack_require__(741); + +var _Billing2 = _interopRequireDefault(_Billing); + +var _Options = __webpack_require__(815); + +var _Options2 = _interopRequireDefault(_Options); + +var _Sizes = __webpack_require__(816); + +var _Sizes2 = _interopRequireDefault(_Sizes); + +var _Layout = __webpack_require__(333); + +var _Layout2 = _interopRequireDefault(_Layout); + +var _menu = __webpack_require__(823); + +var _profiles = __webpack_require__(210); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SHOP_NAME = exports.SHOP_NAME = 'Supreme'; + +var Supreme = function (_Component) { + (0, _inherits3.default)(Supreme, _Component); + + function Supreme() { + (0, _classCallCheck3.default)(this, Supreme); + return (0, _possibleConstructorReturn3.default)(this, (Supreme.__proto__ || (0, _getPrototypeOf2.default)(Supreme)).apply(this, arguments)); + } + + (0, _createClass3.default)(Supreme, [{ + key: 'getContainerForMenu', + value: function getContainerForMenu(menu) { + var _this2 = this; + + switch (menu) { + case menus.MENU_BILLING: + return _react2.default.createElement(_Billing2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + case menus.MENU_OPTIONS: + return _react2.default.createElement(_Options2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + case menus.MENU_SIZES: + return _react2.default.createElement(_Sizes2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + default: + return null; + } + } + }, { + key: 'strToNumberReducer', + value: function strToNumberReducer(menu, key, value) { + // Don't process values for billing + if (typeof value === 'string' && !isNaN(value) && menu !== menus.MENU_BILLING) { + return +value; + } + return value; + } + }, { + key: 'transform', + value: function transform(menu, obj, reducer) { + var keys = (0, _keys2.default)(obj); + var newObj = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = obj[key]; + newObj[key] = reducer(menu, key, value); + } + return newObj; + } + }, { + key: 'onSubmit', + value: function onSubmit(menu, data) { + var newObj = this.transform(menu, data, this.strToNumberReducer); + this.props.updateSettings(this.props.currentProfile, SHOP_NAME, menu, newObj); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + if (this.props.menu == null) { + this.props.changeMenu(Supreme.getDefaultMenu()); + } + } + }, { + key: 'getIconForTabMenu', + value: function getIconForTabMenu(menu) { + var isIncomplete = !this.props.settings[SHOP_NAME] || !this.props.settings[SHOP_NAME][menu]; + var color = isIncomplete ? _colors.red300 : 'white'; + var tip = isIncomplete ? 'This tab hasn\'t been configured yet' : ''; + return _react2.default.createElement( + _IconButton2.default, + { iconStyle: { color: color }, tooltip: tip, tooltipPosition: 'top-center', tooltipStyles: { color: 'white' } }, + _react2.default.createElement( + _FontIcon2.default, + { style: { color: color }, className: 'material-icons' }, + isIncomplete ? 'error' : 'done' + ) + ); + } + }, { + key: 'getTabs', + value: function getTabs() { + var _this3 = this; + + return [_react2.default.createElement(_Tab2.default, { + label: 'Billing', + key: 1, + icon: this.getIconForTabMenu(menus.MENU_BILLING), + value: menus.MENU_BILLING, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_BILLING); + } + }), _react2.default.createElement(_Tab2.default, { + label: 'Options', + key: 2, + icon: this.getIconForTabMenu(menus.MENU_OPTIONS), + value: menus.MENU_OPTIONS, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_OPTIONS); + } + }), _react2.default.createElement(_Tab2.default, { + label: 'Sizes', + key: 3, + icon: this.getIconForTabMenu(menus.MENU_SIZES), + value: menus.MENU_SIZES, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_SIZES); + } + })]; + } + }, { + key: 'render', + value: function render() { + var menu = this.props.menu; + + return _react2.default.createElement( + _Layout2.default, + { title: menu || 'Loading...', tabs: this.getTabs(), currentTab: menu }, + this.getContainerForMenu(menu) + ); + } + }], [{ + key: 'getDefaultMenu', + value: function getDefaultMenu() { + return menus.MENU_BILLING; + } + }]); + return Supreme; +}(_react.Component); + +function mapStateToProps(state) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + menu: state.menu.currentMenu, + settings: settings, + currentProfile: currentProfile + }; +} + +function mapDispatchToProps(dispatch) { + return { + changeMenu: function changeMenu(menu) { + return dispatch((0, _menu.changeMenu)(menu)); + }, + updateSettings: function updateSettings(currentProfile, shop, key, value) { + return dispatch((0, _profiles.updateProfileSettings)(currentProfile, shop, key, value)); + } + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Supreme); + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(60); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _Popover = __webpack_require__(130); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _check = __webpack_require__(745); + +var _check2 = _interopRequireDefault(_check); + +var _ListItem = __webpack_require__(315); + +var _ListItem2 = _interopRequireDefault(_ListItem); + +var _Menu = __webpack_require__(203); + +var _Menu2 = _interopRequireDefault(_Menu); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var nestedMenuStyle = { + position: 'relative' +}; + +function getStyles(props, context) { + var disabledColor = context.muiTheme.baseTheme.palette.disabledColor; + var textColor = context.muiTheme.baseTheme.palette.textColor; + var indent = props.desktop ? 64 : 72; + var sidePadding = props.desktop ? 24 : 16; + + var styles = { + root: { + color: props.disabled ? disabledColor : textColor, + cursor: props.disabled ? 'not-allowed' : 'pointer', + minHeight: props.desktop ? '32px' : '48px', + lineHeight: props.desktop ? '32px' : '48px', + fontSize: props.desktop ? 15 : 16, + whiteSpace: 'nowrap' + }, + + innerDivStyle: { + paddingLeft: props.leftIcon || props.insetChildren || props.checked ? indent : sidePadding, + paddingRight: props.rightIcon ? indent : sidePadding, + paddingBottom: 0, + paddingTop: 0 + }, + + secondaryText: { + float: 'right' + }, + + leftIconDesktop: { + margin: 0, + left: 24, + top: 4 + }, + + rightIconDesktop: { + margin: 0, + right: 24, + top: 4, + fill: context.muiTheme.menuItem.rightIconDesktopFill + } + }; + + return styles; +} + +var MenuItem = function (_Component) { + (0, _inherits3.default)(MenuItem, _Component); + + function MenuItem() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, MenuItem); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuItem.__proto__ || (0, _getPrototypeOf2.default)(MenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.cloneMenuItem = function (item) { + return _react2.default.cloneElement(item, { + onTouchTap: function onTouchTap(event) { + if (!item.props.menuItems) { + _this.handleRequestClose(); + } + + if (item.props.onTouchTap) { + item.props.onTouchTap(event); + } + } + }); + }, _this.handleTouchTap = function (event) { + event.preventDefault(); + + _this.setState({ + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this) + }); + + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + }, _this.handleRequestClose = function () { + _this.setState({ + open: false, + anchorEl: null + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(MenuItem, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.applyFocusState(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.state.open && nextProps.focusState === 'none') { + this.handleRequestClose(); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.applyFocusState(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + if (this.state.open) { + this.setState({ + open: false + }); + } + } + }, { + key: 'applyFocusState', + value: function applyFocusState() { + this.refs.listItem.applyFocusState(this.props.focusState); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + checked = _props.checked, + children = _props.children, + desktop = _props.desktop, + disabled = _props.disabled, + focusState = _props.focusState, + innerDivStyle = _props.innerDivStyle, + insetChildren = _props.insetChildren, + leftIcon = _props.leftIcon, + menuItems = _props.menuItems, + rightIcon = _props.rightIcon, + secondaryText = _props.secondaryText, + style = _props.style, + animation = _props.animation, + value = _props.value, + other = (0, _objectWithoutProperties3.default)(_props, ['checked', 'children', 'desktop', 'disabled', 'focusState', 'innerDivStyle', 'insetChildren', 'leftIcon', 'menuItems', 'rightIcon', 'secondaryText', 'style', 'animation', 'value']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style); + var mergedInnerDivStyles = (0, _simpleAssign2.default)(styles.innerDivStyle, innerDivStyle); + + // Left Icon + var leftIconElement = leftIcon ? leftIcon : checked ? _react2.default.createElement(_check2.default, null) : null; + if (leftIconElement) { + var mergedLeftIconStyles = desktop ? (0, _simpleAssign2.default)(styles.leftIconDesktop, leftIconElement.props.style) : leftIconElement.props.style; + leftIconElement = _react2.default.cloneElement(leftIconElement, { style: mergedLeftIconStyles }); + } + + // Right Icon + var rightIconElement = void 0; + if (rightIcon) { + var mergedRightIconStyles = desktop ? (0, _simpleAssign2.default)(styles.rightIconDesktop, rightIcon.props.style) : rightIcon.props.style; + rightIconElement = _react2.default.cloneElement(rightIcon, { style: mergedRightIconStyles }); + } + + // Secondary Text + var secondaryTextElement = void 0; + if (secondaryText) { + var secondaryTextIsAnElement = _react2.default.isValidElement(secondaryText); + var mergedSecondaryTextStyles = secondaryTextIsAnElement ? (0, _simpleAssign2.default)(styles.secondaryText, secondaryText.props.style) : null; + + secondaryTextElement = secondaryTextIsAnElement ? _react2.default.cloneElement(secondaryText, { style: mergedSecondaryTextStyles }) : _react2.default.createElement( + 'div', + { style: prepareStyles(styles.secondaryText) }, + secondaryText + ); + } + var childMenuPopover = void 0; + if (menuItems) { + childMenuPopover = _react2.default.createElement( + _Popover2.default, + { + animation: animation, + anchorOrigin: { horizontal: 'right', vertical: 'top' }, + anchorEl: this.state.anchorEl, + open: this.state.open, + useLayerForClickAway: false, + onRequestClose: this.handleRequestClose + }, + _react2.default.createElement( + _Menu2.default, + { desktop: desktop, disabled: disabled, style: nestedMenuStyle }, + _react2.default.Children.map(menuItems, this.cloneMenuItem) + ) + ); + other.onTouchTap = this.handleTouchTap; + } + + return _react2.default.createElement( + _ListItem2.default, + (0, _extends3.default)({}, other, { + disabled: disabled, + hoverColor: this.context.muiTheme.menuItem.hoverColor, + innerDivStyle: mergedInnerDivStyles, + insetChildren: insetChildren, + leftIcon: leftIconElement, + ref: 'listItem', + rightIcon: rightIconElement, + style: mergedRootStyles + }), + children, + secondaryTextElement, + childMenuPopover + ); + } + }]); + return MenuItem; +}(_react.Component); + +MenuItem.muiName = 'MenuItem'; +MenuItem.defaultProps = { + checked: false, + desktop: false, + disabled: false, + focusState: 'none', + insetChildren: false +}; +MenuItem.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? MenuItem.propTypes = { + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * If true, a left check mark will be rendered. + */ + checked: _react.PropTypes.bool, + /** + * Elements passed as children to the underlying `ListItem`. + */ + children: _react.PropTypes.node, + /** + * @ignore + * If true, the menu item will render with compact desktop + * styles. + */ + desktop: _react.PropTypes.bool, + /** + * If true, the menu item will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * The focus state of the menu item. This prop is used to set the focus + * state of the underlying `ListItem`. + */ + focusState: _react.PropTypes.oneOf(['none', 'focused', 'keyboard-focused']), + /** + * Override the inline-styles of the inner div. + */ + innerDivStyle: _react.PropTypes.object, + /** + * If true, the children will be indented. + * This is only needed when there is no `leftIcon`. + */ + insetChildren: _react.PropTypes.bool, + /** + * The `SvgIcon` or `FontIcon` to be displayed on the left side. + */ + leftIcon: _react.PropTypes.element, + /** + * `MenuItem` elements to nest within the menu item. + */ + menuItems: _react.PropTypes.node, + /** + * Callback function fired when the menu item is touch-tapped. + * + * @param {object} event TouchTap event targeting the menu item. + */ + onTouchTap: _react.PropTypes.func, + /** + * Can be used to render primary text within the menu item. + */ + primaryText: _react.PropTypes.node, + /** + * The `SvgIcon` or `FontIcon` to be displayed on the right side. + */ + rightIcon: _react.PropTypes.element, + /** + * Can be used to render secondary text within the menu item. + */ + secondaryText: _react.PropTypes.node, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The value of the menu item. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = MenuItem; + +/***/ }), +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _reactDom = __webpack_require__(16); + +var _dom = __webpack_require__(318); + +var _dom2 = _interopRequireDefault(_dom); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// heavily inspired by https://github.com/Khan/react-components/blob/master/js/layered-component-mixin.jsx +var RenderToLayer = function (_Component) { + (0, _inherits3.default)(RenderToLayer, _Component); + + function RenderToLayer() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RenderToLayer); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RenderToLayer.__proto__ || (0, _getPrototypeOf2.default)(RenderToLayer)).call.apply(_ref, [this].concat(args))), _this), _this.onClickAway = function (event) { + if (event.defaultPrevented) { + return; + } + + if (!_this.props.componentClickAway) { + return; + } + + if (!_this.props.open) { + return; + } + + var el = _this.layer; + if (event.target !== el && event.target === window || document.documentElement.contains(event.target) && !_dom2.default.isDescendant(el, event.target)) { + _this.props.componentClickAway(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(RenderToLayer, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.renderLayer(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.renderLayer(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.unrenderLayer(); + } + }, { + key: 'getLayer', + value: function getLayer() { + return this.layer; + } + }, { + key: 'unrenderLayer', + value: function unrenderLayer() { + if (!this.layer) { + return; + } + + if (this.props.useLayerForClickAway) { + this.layer.style.position = 'relative'; + this.layer.removeEventListener('touchstart', this.onClickAway); + this.layer.removeEventListener('click', this.onClickAway); + } else { + window.removeEventListener('touchstart', this.onClickAway); + window.removeEventListener('click', this.onClickAway); + } + + (0, _reactDom.unmountComponentAtNode)(this.layer); + document.body.removeChild(this.layer); + this.layer = null; + } + + /** + * By calling this method in componentDidMount() and + * componentDidUpdate(), you're effectively creating a "wormhole" that + * funnels React's hierarchical updates through to a DOM node on an + * entirely different part of the page. + */ + + }, { + key: 'renderLayer', + value: function renderLayer() { + var _this2 = this; + + var _props = this.props, + open = _props.open, + render = _props.render; + + + if (open) { + if (!this.layer) { + this.layer = document.createElement('div'); + document.body.appendChild(this.layer); + + if (this.props.useLayerForClickAway) { + this.layer.addEventListener('touchstart', this.onClickAway); + this.layer.addEventListener('click', this.onClickAway); + this.layer.style.position = 'fixed'; + this.layer.style.top = 0; + this.layer.style.bottom = 0; + this.layer.style.left = 0; + this.layer.style.right = 0; + this.layer.style.zIndex = this.context.muiTheme.zIndex.layer; + } else { + setTimeout(function () { + window.addEventListener('touchstart', _this2.onClickAway); + window.addEventListener('click', _this2.onClickAway); + }, 0); + } + } + + var layerElement = render(); + this.layerElement = (0, _reactDom.unstable_renderSubtreeIntoContainer)(this, layerElement, this.layer); + } else { + this.unrenderLayer(); + } + } + }, { + key: 'render', + value: function render() { + return null; + } + }]); + return RenderToLayer; +}(_react.Component); + +RenderToLayer.defaultProps = { + useLayerForClickAway: true +}; +RenderToLayer.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? RenderToLayer.propTypes = { + componentClickAway: _react.PropTypes.func, + open: _react.PropTypes.bool.isRequired, + render: _react.PropTypes.func.isRequired, + useLayerForClickAway: _react.PropTypes.bool +} : void 0; +exports.default = RenderToLayer; + +/***/ }), +/* 326 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _Paper = __webpack_require__(31); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _propTypes = __webpack_require__(38); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var targetOrigin = props.targetOrigin; + var open = state.open; + var muiTheme = context.muiTheme; + + var horizontal = targetOrigin.horizontal.replace('middle', 'vertical'); + + return { + root: { + position: 'fixed', + zIndex: muiTheme.zIndex.popover, + opacity: open ? 1 : 0, + transform: open ? 'scaleY(1)' : 'scaleY(0)', + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('450ms', ['transform', 'opacity']), + maxHeight: '100%' + } + }; +} + +var PopoverAnimationVertical = function (_Component) { + (0, _inherits3.default)(PopoverAnimationVertical, _Component); + + function PopoverAnimationVertical() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, PopoverAnimationVertical); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PopoverAnimationVertical.__proto__ || (0, _getPrototypeOf2.default)(PopoverAnimationVertical)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(PopoverAnimationVertical, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setState({ open: true }); // eslint-disable-line react/no-did-mount-set-state + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + open: nextProps.open + }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + className = _props.className, + style = _props.style, + zDepth = _props.zDepth; + + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _Paper2.default, + { + style: (0, _simpleAssign2.default)(styles.root, style), + zDepth: zDepth, + className: className + }, + this.props.children + ); + } + }]); + return PopoverAnimationVertical; +}(_react.Component); + +PopoverAnimationVertical.defaultProps = { + style: {}, + zDepth: 1 +}; +PopoverAnimationVertical.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? PopoverAnimationVertical.propTypes = { + children: _react.PropTypes.node, + className: _react.PropTypes.string, + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + targetOrigin: _propTypes2.default.origin.isRequired, + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = PopoverAnimationVertical; + +/***/ }), +/* 327 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.RadioButtonGroup = exports.RadioButton = undefined; + +var _RadioButton2 = __webpack_require__(782); + +var _RadioButton3 = _interopRequireDefault(_RadioButton2); + +var _RadioButtonGroup2 = __webpack_require__(785); + +var _RadioButtonGroup3 = _interopRequireDefault(_RadioButtonGroup2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.RadioButton = _RadioButton3.default; +exports.RadioButtonGroup = _RadioButtonGroup3.default; +exports.default = _RadioButton3.default; + +/***/ }), +/* 328 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _isIterable2 = __webpack_require__(806); + +var _isIterable3 = _interopRequireDefault(_isIterable2); + +var _getIterator2 = __webpack_require__(329); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if ((0, _isIterable3.default)(Object(arr))) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + +/***/ }), +/* 329 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(809), __esModule: true }; + +/***/ }), +/* 330 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _slicedToArray2 = __webpack_require__(328); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _timeUtils = __webpack_require__(98); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var styles = { + root: { + directionInvariant: true, + display: 'inline-block', + position: 'absolute', + width: 32, + height: 32, + borderRadius: '100%', + left: 'calc(50% - 16px)', + top: 10, + textAlign: 'center', + paddingTop: 5, + userSelect: 'none', /* Chrome all / Safari all */ + fontSize: '1.1em', + pointerEvents: 'none', + boxSizing: 'border-box' + } + }; + + var muiTheme = context.muiTheme; + + + var pos = props.value; + + if (props.type === 'hour') { + pos %= 12; + } else { + pos = pos / 5; + } + + var positions = [[0, 5], [54.5, 16.6], [94.4, 59.5], [109, 114], [94.4, 168.5], [54.5, 208.4], [0, 223], [-54.5, 208.4], [-94.4, 168.5], [-109, 114], [-94.4, 59.5], [-54.5, 19.6]]; + + var innerPositions = [[0, 40], [36.9, 49.9], [64, 77], [74, 114], [64, 151], [37, 178], [0, 188], [-37, 178], [-64, 151], [-74, 114], [-64, 77], [-37, 50]]; + + if (props.isSelected) { + styles.root.backgroundColor = muiTheme.timePicker.accentColor; + styles.root.color = muiTheme.timePicker.selectTextColor; + } + + var transformPos = positions[pos]; + + if ((0, _timeUtils.isInner)(props)) { + styles.root.width = 28; + styles.root.height = 28; + styles.root.left = 'calc(50% - 14px)'; + transformPos = innerPositions[pos]; + } + + var _transformPos = transformPos, + _transformPos2 = (0, _slicedToArray3.default)(_transformPos, 2), + x = _transformPos2[0], + y = _transformPos2[1]; + + styles.root.transform = 'translate(' + x + 'px, ' + y + 'px)'; + + return styles; +} + +var ClockNumber = function (_Component) { + (0, _inherits3.default)(ClockNumber, _Component); + + function ClockNumber() { + (0, _classCallCheck3.default)(this, ClockNumber); + return (0, _possibleConstructorReturn3.default)(this, (ClockNumber.__proto__ || (0, _getPrototypeOf2.default)(ClockNumber)).apply(this, arguments)); + } + + (0, _createClass3.default)(ClockNumber, [{ + key: 'render', + value: function render() { + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var clockNumber = this.props.value === 0 ? '00' : this.props.value; + + return _react2.default.createElement( + 'span', + { style: prepareStyles(styles.root) }, + clockNumber + ); + } + }]); + return ClockNumber; +}(_react.Component); + +ClockNumber.defaultProps = { + value: 0, + type: 'minute', + isSelected: false +}; +ClockNumber.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ClockNumber.propTypes = { + isSelected: _react.PropTypes.bool, + onSelected: _react.PropTypes.func, + type: _react.PropTypes.oneOf(['hour', 'minute']), + value: _react.PropTypes.number +} : void 0; +exports.default = ClockNumber; + +/***/ }), +/* 331 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _timeUtils = __webpack_require__(98); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function calcAngle(value, base) { + value %= base; + var angle = 360 / base * value; + return angle; +} + +function getStyles(props, context, state) { + var hasSelected = props.hasSelected, + type = props.type, + value = props.value; + var inner = state.inner; + var timePicker = context.muiTheme.timePicker; + + var angle = type === 'hour' ? calcAngle(value, 12) : calcAngle(value, 60); + + var styles = { + root: { + height: inner ? '30%' : '40%', + background: timePicker.accentColor, + width: 2, + left: 'calc(50% - 1px)', + position: 'absolute', + bottom: '50%', + transformOrigin: 'bottom', + pointerEvents: 'none', + transform: 'rotateZ(' + angle + 'deg)' + }, + mark: { + boxSizing: 'content-box', + background: timePicker.selectTextColor, + border: '4px solid ' + timePicker.accentColor, + display: hasSelected && 'none', + width: 7, + height: 7, + position: 'absolute', + top: -5, + left: -6, + borderRadius: '100%' + } + }; + + return styles; +} + +var ClockPointer = function (_Component) { + (0, _inherits3.default)(ClockPointer, _Component); + + function ClockPointer() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClockPointer); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockPointer.__proto__ || (0, _getPrototypeOf2.default)(ClockPointer)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + inner: false + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClockPointer, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + inner: (0, _timeUtils.isInner)(this.props) + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + inner: (0, _timeUtils.isInner)(nextProps) + }); + } + }, { + key: 'render', + value: function render() { + if (this.props.value === null) { + return _react2.default.createElement('span', null); + } + + var styles = getStyles(this.props, this.context, this.state); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement('div', { style: prepareStyles(styles.mark) }) + ); + } + }]); + return ClockPointer; +}(_react.Component); + +ClockPointer.defaultProps = { + hasSelected: false, + value: null, + type: 'minute' +}; +ClockPointer.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ClockPointer.propTypes = { + hasSelected: _react.PropTypes.bool, + type: _react.PropTypes.oneOf(['hour', 'minute']), + value: _react.PropTypes.number +} : void 0; +exports.default = ClockPointer; + +/***/ }), +/* 332 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var countries = exports.countries = [{ "text": "USA", "value": "USA" }, { "text": "CANADA", "value": "CANADA" }, { "text": "JAPAN", "value": "JAPAN" }, { "text": "UK", "value": "GB" }, { "text": "UK (N. IRELAND)", "value": "NB" }, { "text": "AUSTRIA", "value": "AT" }, { "text": "BELARUS", "value": "BY" }, { "text": "BELGIUM", "value": "BE" }, { "text": "BULGARIA", "value": "BG" }, { "text": "CROATIA", "value": "HR" }, { "text": "CZECH REPUBLIC", "value": "CZ" }, { "text": "DENMARK", "value": "DK" }, { "text": "ESTONIA", "value": "EE" }, { "text": "FINLAND", "value": "FI" }, { "text": "FRANCE", "value": "FR" }, { "text": "GERMANY", "value": "DE" }, { "text": "GREECE", "value": "GR" }, { "text": "HUNGARY", "value": "HU" }, { "text": "ICELAND", "value": "IS" }, { "text": "IRELAND", "value": "IE" }, { "text": "ITALY", "value": "IT" }, { "text": "LATVIA", "value": "LV" }, { "text": "LITHUANIA", "value": "LT" }, { "text": "LUXEMBOURG", "value": "LU" }, { "text": "MONACO", "value": "MC" }, { "text": "NETHERLANDS", "value": "NL" }, { "text": "NORWAY", "value": "NO" }, { "text": "POLAND", "value": "PL" }, { "text": "PORTUGAL", "value": "PT" }, { "text": "ROMANIA", "value": "RO" }, { "text": "RUSSIA", "value": "RU" }, { "text": "SLOVAKIA", "value": "SK" }, { "text": "SLOVENIA", "value": "SI" }, { "text": "SPAIN", "value": "ES" }, { "text": "SWEDEN", "value": "SE" }, { "text": "SWITZERLAND", "value": "CH" }, { "text": "TURKEY", "value": "TR" }]; +var sizes = exports.sizes = ["Small", "Medium", "Large", "XLarge"]; +var sizesPants = exports.sizesPants = [28, 30, 32, 34, 36, 38, 40]; +var shoeSizes = exports.shoeSizes = [4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5]; +var usaRegions = exports.usaRegions = [{ "text": "AL", "value": "AL" }, { "text": "AK", "value": "AK" }, { "text": "AS", "value": "AS" }, { "text": "AZ", "value": "AZ" }, { "text": "AR", "value": "AR" }, { "text": "CA", "value": "CA" }, { "text": "CO", "value": "CO" }, { "text": "CT", "value": "CT" }, { "text": "DE", "value": "DE" }, { "text": "DC", "value": "DC" }, { "text": "FM", "value": "FM" }, { "text": "FL", "value": "FL" }, { "text": "GA", "value": "GA" }, { "text": "GU", "value": "GU" }, { "text": "HI", "value": "HI" }, { "text": "ID", "value": "ID" }, { "text": "IL", "value": "IL" }, { "text": "IN", "value": "IN" }, { "text": "IA", "value": "IA" }, { "text": "KS", "value": "KS" }, { "text": "KY", "value": "KY" }, { "text": "LA", "value": "LA" }, { "text": "ME", "value": "ME" }, { "text": "MH", "value": "MH" }, { "text": "MD", "value": "MD" }, { "text": "MA", "value": "MA" }, { "text": "MI", "value": "MI" }, { "text": "MN", "value": "MN" }, { "text": "MS", "value": "MS" }, { "text": "MO", "value": "MO" }, { "text": "MT", "value": "MT" }, { "text": "NE", "value": "NE" }, { "text": "NV", "value": "NV" }, { "text": "NH", "value": "NH" }, { "text": "NJ", "value": "NJ" }, { "text": "NM", "value": "NM" }, { "text": "NY", "value": "NY" }, { "text": "NC", "value": "NC" }, { "text": "ND", "value": "ND" }, { "text": "MP", "value": "MP" }, { "text": "OH", "value": "OH" }, { "text": "OK", "value": "OK" }, { "text": "OR", "value": "OR" }, { "text": "PW", "value": "PW" }, { "text": "PA", "value": "PA" }, { "text": "PR", "value": "PR" }, { "text": "RI", "value": "RI" }, { "text": "SC", "value": "SC" }, { "text": "SD", "value": "SD" }, { "text": "TN", "value": "TN" }, { "text": "TX", "value": "TX" }, { "text": "UT", "value": "UT" }, { "text": "VT", "value": "VT" }, { "text": "VI", "value": "VI" }, { "text": "VA", "value": "VA" }, { "text": "WA", "value": "WA" }, { "text": "WV", "value": "WV" }, { "text": "WI", "value": "WI" }, { "text": "WY", "value": "WY" }]; +var canadaRegions = exports.canadaRegions = [{ "text": "AB", "value": "AB" }, { "text": "BC", "value": "BC" }, { "text": "MB", "value": "MB" }, { "text": "NB", "value": "NB" }, { "text": "NL", "value": "NL" }, { "text": "NT", "value": "NT" }, { "text": "NS", "value": "NS" }, { "text": "NU", "value": "NU" }, { "text": "ON", "value": "ON" }, { "text": "PE", "value": "PE" }, { "text": "QC", "value": "QC" }, { "text": "SK", "value": "SK" }, { "text": "YT", "value": "YT" }]; +var japanRegions = exports.japanRegions = [{ "text": " 北海道", "value": " 北海道" }, { "text": " 青森県", "value": " 青森県" }, { "text": " 岩手県", "value": " 岩手県" }, { "text": " 宮城県", "value": " 宮城県" }, { "text": " 秋田県", "value": " 秋田県" }, { "text": " 山形県", "value": " 山形県" }, { "text": " 福島県", "value": " 福島県" }, { "text": " 茨城県", "value": " 茨城県" }, { "text": " 栃木県", "value": " 栃木県" }, { "text": " 群馬県", "value": " 群馬県" }, { "text": " 埼玉県", "value": " 埼玉県" }, { "text": " 千葉県", "value": " 千葉県" }, { "text": " 東京都", "value": " 東京都" }, { "text": " 神奈川県", "value": " 神奈川県" }, { "text": " 新潟県", "value": " 新潟県" }, { "text": " 富山県", "value": " 富山県" }, { "text": " 石川県", "value": " 石川県" }, { "text": " 福井県", "value": " 福井県" }, { "text": " 山梨県", "value": " 山梨県" }, { "text": " 長野県", "value": " 長野県" }, { "text": " 岐阜県", "value": " 岐阜県" }, { "text": " 静岡県", "value": " 静岡県" }, { "text": " 愛知県", "value": " 愛知県" }, { "text": " 三重県", "value": " 三重県" }, { "text": " 滋賀県", "value": " 滋賀県" }, { "text": " 京都府", "value": " 京都府" }, { "text": " 大阪府", "value": " 大阪府" }, { "text": " 兵庫県", "value": " 兵庫県" }, { "text": " 奈良県", "value": " 奈良県" }, { "text": " 和歌山県", "value": " 和歌山県" }, { "text": " 鳥取県", "value": " 鳥取県" }, { "text": " 島根県", "value": " 島根県" }, { "text": " 岡山県", "value": " 岡山県" }, { "text": " 広島県", "value": " 広島県" }, { "text": " 山口県", "value": " 山口県" }, { "text": " 徳島県", "value": " 徳島県" }, { "text": " 香川県", "value": " 香川県" }, { "text": " 愛媛県", "value": " 愛媛県" }, { "text": " 高知県", "value": " 高知県" }, { "text": " 福岡県", "value": " 福岡県" }, { "text": " 佐賀県", "value": " 佐賀県" }, { "text": " 長崎県", "value": " 長崎県" }, { "text": " 熊本県", "value": " 熊本県" }, { "text": " 大分県", "value": " 大分県" }, { "text": " 宮崎県", "value": " 宮崎県" }, { "text": " 鹿児島県", "value": " 鹿児島県" }, { "text": " 沖縄県", "value": " 沖縄県" }]; + +/***/ }), +/* 333 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _assign = __webpack_require__(48); + +var _assign2 = _interopRequireDefault(_assign); + +exports.default = Layout; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _AppBar = __webpack_require__(817); + +var _AppBar2 = _interopRequireDefault(_AppBar); + +var _Tabs = __webpack_require__(820); + +var _Tabs2 = _interopRequireDefault(_Tabs); + +var _Paper = __webpack_require__(31); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _Styles = __webpack_require__(62); + +var _Styles2 = _interopRequireDefault(_Styles); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function Layout(props) { + var children = props.children, + title = props.title, + contentStyle = props.contentStyle, + tabs = props.tabs, + currentTab = props.currentTab; + + + var appBarStyles = (0, _assign2.default)({}, _Styles2.default.appBar); + + if (tabs) { + appBarStyles.marginBottom = 64; + } + + return _react2.default.createElement( + 'div', + { style: _Styles2.default.container }, + _react2.default.createElement( + _AppBar2.default, + { title: title, showMenuIconButton: false, style: appBarStyles }, + tabs && _react2.default.createElement( + 'div', + { style: { width: '100%' } }, + _react2.default.createElement( + _Tabs2.default, + { style: _Styles2.default.tabs, value: currentTab }, + tabs + ) + ) + ), + _react2.default.createElement( + 'div', + { style: { width: '100%' } }, + _react2.default.createElement( + 'div', + { style: (0, _assign2.default)({}, _Styles2.default.content, contentStyle) }, + _react2.default.createElement( + _Paper2.default, + { style: _Styles2.default.paper }, + children + ) + ) + ) + ); +} + +Layout.propTypes = { + children: _react.PropTypes.node, + title: _react.PropTypes.string.isRequired, + contentStyle: _react.PropTypes.object, + tabs: _react.PropTypes.arrayOf(_react.PropTypes.node), + currentTab: _react.PropTypes.any +}; + +/***/ }), +/* 334 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _Tooltip = __webpack_require__(320); + +var _Tooltip2 = _interopRequireDefault(_Tooltip); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tableHeaderColumn = context.muiTheme.tableHeaderColumn; + + + return { + root: { + fontWeight: 'normal', + fontSize: 12, + paddingLeft: tableHeaderColumn.spacing, + paddingRight: tableHeaderColumn.spacing, + height: tableHeaderColumn.height, + textAlign: 'left', + whiteSpace: 'nowrap', + textOverflow: 'ellipsis', + color: tableHeaderColumn.textColor, + position: 'relative' + }, + tooltip: { + boxSizing: 'border-box', + marginTop: tableHeaderColumn.height / 2 + } + }; +} + +var TableHeaderColumn = function (_Component) { + (0, _inherits3.default)(TableHeaderColumn, _Component); + + function TableHeaderColumn() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TableHeaderColumn); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableHeaderColumn.__proto__ || (0, _getPrototypeOf2.default)(TableHeaderColumn)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.onMouseEnter = function () { + if (_this.props.tooltip !== undefined) { + _this.setState({ hovered: true }); + } + }, _this.onMouseLeave = function () { + if (_this.props.tooltip !== undefined) { + _this.setState({ hovered: false }); + } + }, _this.onClick = function (event) { + if (_this.props.onClick) { + _this.props.onClick(event, _this.props.columnNumber); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TableHeaderColumn, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + columnNumber = _props.columnNumber, + hoverable = _props.hoverable, + onClick = _props.onClick, + onHover = _props.onHover, + onHoverExit = _props.onHoverExit, + style = _props.style, + tooltip = _props.tooltip, + tooltipStyle = _props.tooltipStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'columnNumber', 'hoverable', 'onClick', 'onHover', 'onHoverExit', 'style', 'tooltip', 'tooltipStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var handlers = { + onMouseEnter: this.onMouseEnter, + onMouseLeave: this.onMouseLeave, + onClick: this.onClick + }; + + var tooltipNode = void 0; + + if (tooltip !== undefined) { + tooltipNode = _react2.default.createElement(_Tooltip2.default, { + label: tooltip, + show: this.state.hovered, + style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyle) + }); + } + + return _react2.default.createElement( + 'th', + (0, _extends3.default)({ + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }, handlers, other), + tooltipNode, + children + ); + } + }]); + return TableHeaderColumn; +}(_react.Component); + +TableHeaderColumn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TableHeaderColumn.propTypes = { + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Number to identify the header row. This property + * is automatically populated when used with TableHeader. + */ + columnNumber: _react.PropTypes.number, + /** + * @ignore + * Not used here but we need to remove it from the root element. + */ + hoverable: _react.PropTypes.bool, + /** @ignore */ + onClick: _react.PropTypes.func, + /** + * @ignore + * Not used here but we need to remove it from the root element. + */ + onHover: _react.PropTypes.func, + /** + * @ignore + * Not used here but we need to remove it from the root element. + */ + onHoverExit: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The string to supply to the tooltip. If not + * string is supplied no tooltip will be shown. + */ + tooltip: _react.PropTypes.string, + /** + * Additional styling that can be applied to the tooltip. + */ + tooltipStyle: _react.PropTypes.object +} : void 0; +exports.default = TableHeaderColumn; + +/***/ }), +/* 335 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(845), __esModule: true }; + +/***/ }), +/* 336 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(64) + , invoke = __webpack_require__(850) + , html = __webpack_require__(297) + , cel = __webpack_require__(135) + , global = __webpack_require__(25) + , process = global.process + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; +var run = function(){ + var id = +this; + if(queue.hasOwnProperty(id)){ + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function(event){ + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if(!setTask || !clearTask){ + setTask = function setImmediate(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id){ + delete queue[id]; + }; + // Node.js 0.8- + if(__webpack_require__(85)(process) == 'process'){ + defer = function(id){ + process.nextTick(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if(MessageChannel){ + channel = new MessageChannel; + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ + defer = function(id){ + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if(ONREADYSTATECHANGE in cel('script')){ + defer = function(id){ + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function(id){ + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + +/***/ }), +/* 337 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _assign = __webpack_require__(48); + +var _assign2 = _interopRequireDefault(_assign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactRouter = __webpack_require__(161); + +var _redux = __webpack_require__(111); + +var _reactRedux = __webpack_require__(21); + +var _reduxLogger = __webpack_require__(476); + +var _reduxLogger2 = _interopRequireDefault(_reduxLogger); + +var _reactRouterRedux = __webpack_require__(481); + +var _reactTapEventPlugin = __webpack_require__(484); + +var _reactTapEventPlugin2 = _interopRequireDefault(_reactTapEventPlugin); + +var _reduxForm = __webpack_require__(90); + +var _reduxThunk = __webpack_require__(628); + +var _reduxThunk2 = _interopRequireDefault(_reduxThunk); + +var _reducers = __webpack_require__(629); + +var reducers = _interopRequireWildcard(_reducers); + +var _routes = __webpack_require__(651); + +var _routes2 = _interopRequireDefault(_routes); + +var _StorageManager = __webpack_require__(840); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var VERSION = '0.0.1'; + +(0, _reactTapEventPlugin2.default)(); + +var middleware = [_reduxThunk2.default, (0, _reactRouterRedux.routerMiddleware)(_reactRouter.browserHistory)]; +if (false) { + middleware.push((0, _reduxLogger2.default)()); +} + +var savedState = (0, _StorageManager.loadSavedState)(VERSION); +var appReducer = (0, _redux.combineReducers)((0, _assign2.default)({}, reducers, { + routing: _reactRouterRedux.routerReducer, + form: _reduxForm.reducer +})); + +var rootReducer = function rootReducer(state, action) { + if (action.type === 'PROFILE_CHANGE') { + return appReducer(undefined, action); + } + return appReducer(state, action); +}; +var store = (0, _redux.createStore)(rootReducer, savedState, _redux.applyMiddleware.apply(undefined, middleware)); + +// Save state in localStorage automatically +store.subscribe(function () { + var state = store.getState(); + if (state) { + (function () { + (0, _StorageManager.saveState)({ menu: state.menu, profiles: state.profiles }, VERSION); + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined') { + (0, _StorageManager.saveToChromeStorage)('settings', settings || {}); + } + })(); + } +}); + +var history = (0, _reactRouterRedux.syncHistoryWithStore)(_reactRouter.hashHistory, store); + +_reactDom2.default.render(_react2.default.createElement( + _reactRedux.Provider, + { store: store }, + _react2.default.createElement( + _reactRouter.Router, + { history: history }, + (0, _routes2.default)(store) + ) +), document.getElementById('app')); + +/***/ }), +/* 338 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(339); +module.exports = __webpack_require__(18).Object.assign; + +/***/ }), +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(32); + +$export($export.S + $export.F, 'Object', {assign: __webpack_require__(340)}); + +/***/ }), +/* 340 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(67) + , gOPS = __webpack_require__(143) + , pIE = __webpack_require__(100) + , toObject = __webpack_require__(86) + , IObject = __webpack_require__(214) + , $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(66)(function(){ + var A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function(k){ B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source){ // eslint-disable-line no-unused-vars + var T = toObject(target) + , aLen = arguments.length + , index = 1 + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) + , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; + } return T; +} : $assign; + +/***/ }), +/* 341 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(51) + , toLength = __webpack_require__(138) + , toIndex = __webpack_require__(342); +module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; + // Array#includes uses SameValueZero equality algorithm + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + +/***/ }), +/* 342 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(139) + , max = Math.max + , min = Math.min; +module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + +/***/ }), +/* 343 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var lowPriorityWarning = function () {}; + +if (false) { + var printWarning = function (format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.warn(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarning = function (condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; +} + +module.exports = lowPriorityWarning; + +/***/ }), +/* 344 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(68); + +var invariant = __webpack_require__(9); + +/** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ +var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; + +var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } +}; + +var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } +}; + +var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } +}; + +var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) ? false ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } +}; + +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; + +/** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ +var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; +}; + +var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler +}; + +module.exports = PooledClass; + +/***/ }), +/* 345 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/* global Symbol */ + +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + +/** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ +function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } +} + +module.exports = getIteratorFn; + +/***/ }), +/* 346 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactElement = __webpack_require__(53); + +/** + * Create a factory that creates HTML tag elements. + * + * @private + */ +var createDOMFactory = ReactElement.createFactory; +if (false) { + var ReactElementValidator = require('./ReactElementValidator'); + createDOMFactory = ReactElementValidator.createFactory; +} + +/** + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. + * + * @public + */ +var ReactDOMFactories = { + a: createDOMFactory('a'), + abbr: createDOMFactory('abbr'), + address: createDOMFactory('address'), + area: createDOMFactory('area'), + article: createDOMFactory('article'), + aside: createDOMFactory('aside'), + audio: createDOMFactory('audio'), + b: createDOMFactory('b'), + base: createDOMFactory('base'), + bdi: createDOMFactory('bdi'), + bdo: createDOMFactory('bdo'), + big: createDOMFactory('big'), + blockquote: createDOMFactory('blockquote'), + body: createDOMFactory('body'), + br: createDOMFactory('br'), + button: createDOMFactory('button'), + canvas: createDOMFactory('canvas'), + caption: createDOMFactory('caption'), + cite: createDOMFactory('cite'), + code: createDOMFactory('code'), + col: createDOMFactory('col'), + colgroup: createDOMFactory('colgroup'), + data: createDOMFactory('data'), + datalist: createDOMFactory('datalist'), + dd: createDOMFactory('dd'), + del: createDOMFactory('del'), + details: createDOMFactory('details'), + dfn: createDOMFactory('dfn'), + dialog: createDOMFactory('dialog'), + div: createDOMFactory('div'), + dl: createDOMFactory('dl'), + dt: createDOMFactory('dt'), + em: createDOMFactory('em'), + embed: createDOMFactory('embed'), + fieldset: createDOMFactory('fieldset'), + figcaption: createDOMFactory('figcaption'), + figure: createDOMFactory('figure'), + footer: createDOMFactory('footer'), + form: createDOMFactory('form'), + h1: createDOMFactory('h1'), + h2: createDOMFactory('h2'), + h3: createDOMFactory('h3'), + h4: createDOMFactory('h4'), + h5: createDOMFactory('h5'), + h6: createDOMFactory('h6'), + head: createDOMFactory('head'), + header: createDOMFactory('header'), + hgroup: createDOMFactory('hgroup'), + hr: createDOMFactory('hr'), + html: createDOMFactory('html'), + i: createDOMFactory('i'), + iframe: createDOMFactory('iframe'), + img: createDOMFactory('img'), + input: createDOMFactory('input'), + ins: createDOMFactory('ins'), + kbd: createDOMFactory('kbd'), + keygen: createDOMFactory('keygen'), + label: createDOMFactory('label'), + legend: createDOMFactory('legend'), + li: createDOMFactory('li'), + link: createDOMFactory('link'), + main: createDOMFactory('main'), + map: createDOMFactory('map'), + mark: createDOMFactory('mark'), + menu: createDOMFactory('menu'), + menuitem: createDOMFactory('menuitem'), + meta: createDOMFactory('meta'), + meter: createDOMFactory('meter'), + nav: createDOMFactory('nav'), + noscript: createDOMFactory('noscript'), + object: createDOMFactory('object'), + ol: createDOMFactory('ol'), + optgroup: createDOMFactory('optgroup'), + option: createDOMFactory('option'), + output: createDOMFactory('output'), + p: createDOMFactory('p'), + param: createDOMFactory('param'), + picture: createDOMFactory('picture'), + pre: createDOMFactory('pre'), + progress: createDOMFactory('progress'), + q: createDOMFactory('q'), + rp: createDOMFactory('rp'), + rt: createDOMFactory('rt'), + ruby: createDOMFactory('ruby'), + s: createDOMFactory('s'), + samp: createDOMFactory('samp'), + script: createDOMFactory('script'), + section: createDOMFactory('section'), + select: createDOMFactory('select'), + small: createDOMFactory('small'), + source: createDOMFactory('source'), + span: createDOMFactory('span'), + strong: createDOMFactory('strong'), + style: createDOMFactory('style'), + sub: createDOMFactory('sub'), + summary: createDOMFactory('summary'), + sup: createDOMFactory('sup'), + table: createDOMFactory('table'), + tbody: createDOMFactory('tbody'), + td: createDOMFactory('td'), + textarea: createDOMFactory('textarea'), + tfoot: createDOMFactory('tfoot'), + th: createDOMFactory('th'), + thead: createDOMFactory('thead'), + time: createDOMFactory('time'), + title: createDOMFactory('title'), + tr: createDOMFactory('tr'), + track: createDOMFactory('track'), + u: createDOMFactory('u'), + ul: createDOMFactory('ul'), + 'var': createDOMFactory('var'), + video: createDOMFactory('video'), + wbr: createDOMFactory('wbr'), + + // SVG + circle: createDOMFactory('circle'), + clipPath: createDOMFactory('clipPath'), + defs: createDOMFactory('defs'), + ellipse: createDOMFactory('ellipse'), + g: createDOMFactory('g'), + image: createDOMFactory('image'), + line: createDOMFactory('line'), + linearGradient: createDOMFactory('linearGradient'), + mask: createDOMFactory('mask'), + path: createDOMFactory('path'), + pattern: createDOMFactory('pattern'), + polygon: createDOMFactory('polygon'), + polyline: createDOMFactory('polyline'), + radialGradient: createDOMFactory('radialGradient'), + rect: createDOMFactory('rect'), + stop: createDOMFactory('stop'), + svg: createDOMFactory('svg'), + text: createDOMFactory('text'), + tspan: createDOMFactory('tspan') +}; + +module.exports = ReactDOMFactories; + +/***/ }), +/* 347 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _require = __webpack_require__(53), + isValidElement = _require.isValidElement; + +var factory = __webpack_require__(222); + +module.exports = factory(isValidElement); + +/***/ }), +/* 348 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +var emptyFunction = __webpack_require__(24); +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); + +var ReactPropTypesSecret = __webpack_require__(349); +var checkPropTypes = __webpack_require__(350); + +module.exports = function(isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (false) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + } else if (false) { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', + propFullName, + componentName + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); + } + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + false ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + false ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } + + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (typeof checker !== 'function') { + warning( + false, + 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + + 'received %s at index %s.', + getPostfixForTypeWarning(checker), + i + ); + return emptyFunction.thatReturnsNull; + } + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { + return null; + } + } + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + default: + return type; + } + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + + +/***/ }), +/* 349 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + + +/***/ }), +/* 350 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +if (false) { + var invariant = require('fbjs/lib/invariant'); + var warning = require('fbjs/lib/warning'); + var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret'); + var loggedTypeFailures = {}; +} + +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ +function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (false) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + } + } + } + } +} + +module.exports = checkPropTypes; + + +/***/ }), +/* 351 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +module.exports = '15.6.1'; + +/***/ }), +/* 352 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _require = __webpack_require__(215), + Component = _require.Component; + +var _require2 = __webpack_require__(53), + isValidElement = _require2.isValidElement; + +var ReactNoopUpdateQueue = __webpack_require__(216); +var factory = __webpack_require__(353); + +module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue); + +/***/ }), +/* 353 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var emptyObject = __webpack_require__(101); +var _invariant = __webpack_require__(9); + +if (false) { + var warning = require('fbjs/lib/warning'); +} + +var MIXINS_KEY = 'mixins'; + +// Helper function to allow the creation of anonymous functions which do not +// have .name set to the name of the variable being assigned to. +function identity(fn) { + return fn; +} + +var ReactPropTypeLocationNames; +if (false) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; +} else { + ReactPropTypeLocationNames = {}; +} + +function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { + /** + * Policies that describe methods in `ReactClassInterface`. + */ + + var injectedMixins = []; + + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE' + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function(Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function(Constructor, childContextTypes) { + if (false) { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign( + {}, + Constructor.childContextTypes, + childContextTypes + ); + }, + contextTypes: function(Constructor, contextTypes) { + if (false) { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign( + {}, + Constructor.contextTypes, + contextTypes + ); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function(Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function(Constructor, propTypes) { + if (false) { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function() {} + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + if (false) { + warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName + ); + } + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) + ? ReactClassInterface[name] + : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name + ); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name + ); + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (false) { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + if (process.env.NODE_ENV !== 'production') { + warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec + ); + } + } + + return; + } + + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.' + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.' + ); + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && + !isReactClassMethod && + !isAlreadyDefined && + spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || + specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + + 'when mixing in component specs.', + specPolicy, + name + ); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (false) { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name + ); + + var isInherited = name in Constructor; + _invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name + ); + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key + ); + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (false) { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function(newThis) { + for ( + var _len = arguments.length, + args = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + if (process.env.NODE_ENV !== 'production') { + warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName + ); + } + } else if (!args.length) { + if (process.env.NODE_ENV !== 'production') { + warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName + ); + } + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + var IsMountedPreMixin = { + componentDidMount: function() { + this.__isMounted = true; + } + }; + + var IsMountedPostMixin = { + componentWillUnmount: function() { + this.__isMounted = false; + } + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function(newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function() { + if (false) { + warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || + this.name || + 'Component' + ); + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; + } + }; + + var ReactClassComponent = function() {}; + _assign( + ReactClassComponent.prototype, + ReactComponent.prototype, + ReactClassMixin + ); + + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function(props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (false) { + warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory' + ); + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (false) { + // We allow auto-mocks to proceed as if they're returning null. + if ( + initialState === undefined && + this.getInitialState._isMockFunction + ) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent' + ); + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedPreMixin); + mixSpecIntoComponent(Constructor, spec); + mixSpecIntoComponent(Constructor, IsMountedPostMixin); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (false) { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.' + ); + + if (false) { + warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component' + ); + warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component' + ); + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; +} + +module.exports = factory; + + +/***/ }), +/* 354 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + +var _prodInvariant = __webpack_require__(68); + +var ReactElement = __webpack_require__(53); + +var invariant = __webpack_require__(9); + +/** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. + */ +function onlyChild(children) { + !ReactElement.isValidElement(children) ? false ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0; + return children; +} + +module.exports = onlyChild; + +/***/ }), +/* 355 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ + + + +var ReactDOMComponentTree = __webpack_require__(14); +var ReactDefaultInjection = __webpack_require__(356); +var ReactMount = __webpack_require__(243); +var ReactReconciler = __webpack_require__(72); +var ReactUpdates = __webpack_require__(28); +var ReactVersion = __webpack_require__(428); + +var findDOMNode = __webpack_require__(429); +var getHostComponentFromComposite = __webpack_require__(244); +var renderSubtreeIntoContainer = __webpack_require__(430); +var warning = __webpack_require__(11); + +ReactDefaultInjection.inject(); + +var ReactDOM = { + findDOMNode: findDOMNode, + render: ReactMount.render, + unmountComponentAtNode: ReactMount.unmountComponentAtNode, + version: ReactVersion, + + /* eslint-disable camelcase */ + unstable_batchedUpdates: ReactUpdates.batchedUpdates, + unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer +}; + +// Inject the runtime into a devtools global hook regardless of browser. +// Allows for debugging when the hook is injected on the page. +if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { + __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ + ComponentTree: { + getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode, + getNodeFromInstance: function (inst) { + // inst is an internal instance (but could be a composite) + if (inst._renderedComponent) { + inst = getHostComponentFromComposite(inst); + } + if (inst) { + return ReactDOMComponentTree.getNodeFromInstance(inst); + } else { + return null; + } + } + }, + Mount: ReactMount, + Reconciler: ReactReconciler + }); +} + +if (false) { + var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment'); + if (ExecutionEnvironment.canUseDOM && window.top === window.self) { + + // First check if devtools is not installed + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + // If we're in Chrome or Firefox, provide a download link if not installed. + if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) { + // Firefox does not have the issue with devtools loaded over file:// + var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1; + console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools'); + } + } + + var testFunc = function testFn() {}; + process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0; + + // If we're in IE8, check to see if we are in compatibility mode and provide + // information on preventing compatibility mode + var ieCompatibilityMode = document.documentMode && document.documentMode < 8; + + process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0; + + var expectedFeatures = [ + // shims + Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim]; + + for (var i = 0; i < expectedFeatures.length; i++) { + if (!expectedFeatures[i]) { + process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0; + break; + } + } + } +} + +if (false) { + var ReactInstrumentation = require('./ReactInstrumentation'); + var ReactDOMUnknownPropertyHook = require('./ReactDOMUnknownPropertyHook'); + var ReactDOMNullInputValuePropHook = require('./ReactDOMNullInputValuePropHook'); + var ReactDOMInvalidARIAHook = require('./ReactDOMInvalidARIAHook'); + + ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook); + ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook); + ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook); +} + +module.exports = ReactDOM; + +/***/ }), +/* 356 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ARIADOMPropertyConfig = __webpack_require__(357); +var BeforeInputEventPlugin = __webpack_require__(358); +var ChangeEventPlugin = __webpack_require__(362); +var DefaultEventPluginOrder = __webpack_require__(365); +var EnterLeaveEventPlugin = __webpack_require__(366); +var HTMLDOMPropertyConfig = __webpack_require__(367); +var ReactComponentBrowserEnvironment = __webpack_require__(368); +var ReactDOMComponent = __webpack_require__(374); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactDOMEmptyComponent = __webpack_require__(399); +var ReactDOMTreeTraversal = __webpack_require__(400); +var ReactDOMTextComponent = __webpack_require__(401); +var ReactDefaultBatchingStrategy = __webpack_require__(402); +var ReactEventListener = __webpack_require__(403); +var ReactInjection = __webpack_require__(405); +var ReactReconcileTransaction = __webpack_require__(406); +var SVGDOMPropertyConfig = __webpack_require__(412); +var SelectEventPlugin = __webpack_require__(413); +var SimpleEventPlugin = __webpack_require__(414); + +var alreadyInjected = false; + +function inject() { + if (alreadyInjected) { + // TODO: This is currently true because these injections are shared between + // the client and the server package. They should be built independently + // and not share any injection state. Then this problem will be solved. + return; + } + alreadyInjected = true; + + ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); + + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); + ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree); + ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal); + + /** + * Some important event plugins included by default (without having to require + * them). + */ + ReactInjection.EventPluginHub.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin + }); + + ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent); + + ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent); + + ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); + + ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) { + return new ReactDOMEmptyComponent(instantiate); + }); + + ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); + ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); + + ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); +} + +module.exports = { + inject: inject +}; + +/***/ }), +/* 357 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ARIADOMPropertyConfig = { + Properties: { + // Global States and Properties + 'aria-current': 0, // state + 'aria-details': 0, + 'aria-disabled': 0, // state + 'aria-hidden': 0, // state + 'aria-invalid': 0, // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0 + }, + DOMAttributeNames: {}, + DOMPropertyNames: {} +}; + +module.exports = ARIADOMPropertyConfig; + +/***/ }), +/* 358 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPropagators = __webpack_require__(70); +var ExecutionEnvironment = __webpack_require__(22); +var FallbackCompositionState = __webpack_require__(359); +var SyntheticCompositionEvent = __webpack_require__(360); +var SyntheticInputEvent = __webpack_require__(361); + +var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space +var START_KEYCODE = 229; + +var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; + +var documentMode = null; +if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; +} + +// Webkit offers a very useful `textInput` event that can be used to +// directly represent `beforeInput`. The IE `textinput` event is not as +// useful, so we don't use it. +var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); + +// In IE9+, we have access to composition events, but the data supplied +// by the native compositionend event may be incorrect. Japanese ideographic +// spaces, for instance (\u3000) are not recorded correctly. +var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); + +/** + * Opera <= 12 includes TextEvent in window, but does not fire + * text input events. Rely on keypress instead. + */ +function isPresto() { + var opera = window.opera; + return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12; +} + +var SPACEBAR_CODE = 32; +var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); + +// Events and their corresponding property names. +var eventTypes = { + beforeInput: { + phasedRegistrationNames: { + bubbled: 'onBeforeInput', + captured: 'onBeforeInputCapture' + }, + dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste'] + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: 'onCompositionEnd', + captured: 'onCompositionEndCapture' + }, + dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: 'onCompositionStart', + captured: 'onCompositionStartCapture' + }, + dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: 'onCompositionUpdate', + captured: 'onCompositionUpdateCapture' + }, + dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + } +}; + +// Track whether we've ever handled a keypress on the space key. +var hasSpaceKeypress = false; + +/** + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. + */ +function isKeypressCommand(nativeEvent) { + return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && + // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey); +} + +/** + * Translate native top level events into event types. + * + * @param {string} topLevelType + * @return {object} + */ +function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case 'topCompositionStart': + return eventTypes.compositionStart; + case 'topCompositionEnd': + return eventTypes.compositionEnd; + case 'topCompositionUpdate': + return eventTypes.compositionUpdate; + } +} + +/** + * Does our fallback best-guess model think this event signifies that + * composition has begun? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ +function isFallbackCompositionStart(topLevelType, nativeEvent) { + return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; +} + +/** + * Does our fallback mode think that this event is the end of composition? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ +function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case 'topKeyUp': + // Command keys insert or clear IME input. + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; + case 'topKeyDown': + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return nativeEvent.keyCode !== START_KEYCODE; + case 'topKeyPress': + case 'topMouseDown': + case 'topBlur': + // Events are not possible without cancelling IME. + return true; + default: + return false; + } +} + +/** + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. + * + * @param {object} nativeEvent + * @return {?string} + */ +function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; + } + return null; +} + +// Track the current IME composition fallback object, if any. +var currentComposition = null; + +/** + * @return {?object} A SyntheticCompositionEvent. + */ +function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var eventType; + var fallbackData; + + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!currentComposition) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionStart; + } + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionEnd; + } + + if (!eventType) { + return null; + } + + if (useFallbackCompositionData) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!currentComposition && eventType === eventTypes.compositionStart) { + currentComposition = FallbackCompositionState.getPooled(nativeEventTarget); + } else if (eventType === eventTypes.compositionEnd) { + if (currentComposition) { + fallbackData = currentComposition.getData(); + } + } + } + + var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget); + + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + if (customData !== null) { + event.data = customData; + } + } + + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; +} + +/** + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. + */ +function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case 'topCompositionEnd': + return getDataFromCustomEvent(nativeEvent); + case 'topKeyPress': + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + if (which !== SPACEBAR_CODE) { + return null; + } + + hasSpaceKeypress = true; + return SPACEBAR_CHAR; + + case 'topTextInput': + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; + + // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to blacklist it. + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } + + return chars; + + default: + // For other native event types, do nothing. + return null; + } +} + +/** + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. + */ +function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + // If composition event is available, we extract a string only at + // compositionevent, otherwise extract it at fallback events. + if (currentComposition) { + if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { + var chars = currentComposition.getData(); + FallbackCompositionState.release(currentComposition); + currentComposition = null; + return chars; + } + return null; + } + + switch (topLevelType) { + case 'topPaste': + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + case 'topKeyPress': + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { + return String.fromCharCode(nativeEvent.which); + } + return null; + case 'topCompositionEnd': + return useFallbackCompositionData ? null : nativeEvent.data; + default: + return null; + } +} + +/** + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. + * + * @return {?object} A SyntheticInputEvent. + */ +function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var chars; + + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); + } + + // If no characters are being inserted, no BeforeInput event should + // be fired. + if (!chars) { + return null; + } + + var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget); + + event.data = chars; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; +} + +/** + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. + * + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. + */ +var BeforeInputEventPlugin = { + + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)]; + } +}; + +module.exports = BeforeInputEventPlugin; + +/***/ }), +/* 359 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var PooledClass = __webpack_require__(54); + +var getTextContentAccessor = __webpack_require__(226); + +/** + * This helper class stores information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * @param {DOMEventTarget} root + */ +function FallbackCompositionState(root) { + this._root = root; + this._startText = this.getText(); + this._fallbackText = null; +} + +_assign(FallbackCompositionState.prototype, { + destructor: function () { + this._root = null; + this._startText = null; + this._fallbackText = null; + }, + + /** + * Get current text of input. + * + * @return {string} + */ + getText: function () { + if ('value' in this._root) { + return this._root.value; + } + return this._root[getTextContentAccessor()]; + }, + + /** + * Determine the differing substring between the initially stored + * text content and the current content. + * + * @return {string} + */ + getData: function () { + if (this._fallbackText) { + return this._fallbackText; + } + + var start; + var startValue = this._startText; + var startLength = startValue.length; + var end; + var endValue = this.getText(); + var endLength = endValue.length; + + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } + } + + var minEnd = startLength - start; + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } + + var sliceTail = end > 1 ? 1 - end : undefined; + this._fallbackText = endValue.slice(start, sliceTail); + return this._fallbackText; + } +}); + +PooledClass.addPoolingTo(FallbackCompositionState); + +module.exports = FallbackCompositionState; + +/***/ }), +/* 360 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(36); + +/** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ +var CompositionEventInterface = { + data: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface); + +module.exports = SyntheticCompositionEvent; + +/***/ }), +/* 361 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(36); + +/** + * @interface Event + * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 + * /#events-inputevents + */ +var InputEventInterface = { + data: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface); + +module.exports = SyntheticInputEvent; + +/***/ }), +/* 362 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPluginHub = __webpack_require__(71); +var EventPropagators = __webpack_require__(70); +var ExecutionEnvironment = __webpack_require__(22); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactUpdates = __webpack_require__(28); +var SyntheticEvent = __webpack_require__(36); + +var getEventTarget = __webpack_require__(146); +var isEventSupported = __webpack_require__(147); +var isTextInputElement = __webpack_require__(229); + +var eventTypes = { + change: { + phasedRegistrationNames: { + bubbled: 'onChange', + captured: 'onChangeCapture' + }, + dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange'] + } +}; + +/** + * For IE shims + */ +var activeElement = null; +var activeElementInst = null; +var activeElementValue = null; +var activeElementValueProp = null; + +/** + * SECTION: handle `change` event + */ +function shouldUseChangeEvent(elem) { + var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; +} + +var doesChangeEventBubble = false; +if (ExecutionEnvironment.canUseDOM) { + // See `handleChange` comment below + doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8); +} + +function manualDispatchChangeEvent(nativeEvent) { + var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); + EventPropagators.accumulateTwoPhaseDispatches(event); + + // If change and propertychange bubbled, we'd just bind to it like all the + // other events and have it go through ReactBrowserEventEmitter. Since it + // doesn't, we manually listen for the events and so we have to enqueue and + // process the abstract event manually. + // + // Batching is necessary here in order to ensure that all event handlers run + // before the next rerender (including event handlers attached to ancestor + // elements instead of directly on the input). Without this, controlled + // components don't work properly in conjunction with event bubbling because + // the component is rerendered and the value reverted before all the event + // handlers can run. See https://github.com/facebook/react/issues/708. + ReactUpdates.batchedUpdates(runEventInBatch, event); +} + +function runEventInBatch(event) { + EventPluginHub.enqueueEvents(event); + EventPluginHub.processEventQueue(false); +} + +function startWatchingForChangeEventIE8(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElement.attachEvent('onchange', manualDispatchChangeEvent); +} + +function stopWatchingForChangeEventIE8() { + if (!activeElement) { + return; + } + activeElement.detachEvent('onchange', manualDispatchChangeEvent); + activeElement = null; + activeElementInst = null; +} + +function getTargetInstForChangeEvent(topLevelType, targetInst) { + if (topLevelType === 'topChange') { + return targetInst; + } +} +function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { + if (topLevelType === 'topFocus') { + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForChangeEventIE8(); + startWatchingForChangeEventIE8(target, targetInst); + } else if (topLevelType === 'topBlur') { + stopWatchingForChangeEventIE8(); + } +} + +/** + * SECTION: handle `input` event + */ +var isInputEventSupported = false; +if (ExecutionEnvironment.canUseDOM) { + // IE9 claims to support the input event but fails to trigger it when + // deleting text, so we ignore its input events. + // IE10+ fire input events to often, such when a placeholder + // changes or when an input with a placeholder is focused. + isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11); +} + +/** + * (For IE <=11) Replacement getter/setter for the `value` property that gets + * set on the active element. + */ +var newValueProp = { + get: function () { + return activeElementValueProp.get.call(this); + }, + set: function (val) { + // Cast to a string so we can do equality checks. + activeElementValue = '' + val; + activeElementValueProp.set.call(this, val); + } +}; + +/** + * (For IE <=11) Starts tracking propertychange events on the passed-in element + * and override the value property so that we can distinguish user events from + * value changes in JS. + */ +function startWatchingForValueChange(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElementValue = target.value; + activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value'); + + // Not guarded in a canDefineProperty check: IE8 supports defineProperty only + // on DOM elements + Object.defineProperty(activeElement, 'value', newValueProp); + if (activeElement.attachEvent) { + activeElement.attachEvent('onpropertychange', handlePropertyChange); + } else { + activeElement.addEventListener('propertychange', handlePropertyChange, false); + } +} + +/** + * (For IE <=11) Removes the event listeners from the currently-tracked element, + * if any exists. + */ +function stopWatchingForValueChange() { + if (!activeElement) { + return; + } + + // delete restores the original property definition + delete activeElement.value; + + if (activeElement.detachEvent) { + activeElement.detachEvent('onpropertychange', handlePropertyChange); + } else { + activeElement.removeEventListener('propertychange', handlePropertyChange, false); + } + + activeElement = null; + activeElementInst = null; + activeElementValue = null; + activeElementValueProp = null; +} + +/** + * (For IE <=11) Handles a propertychange event, sending a `change` event if + * the value of the active element has changed. + */ +function handlePropertyChange(nativeEvent) { + if (nativeEvent.propertyName !== 'value') { + return; + } + var value = nativeEvent.srcElement.value; + if (value === activeElementValue) { + return; + } + activeElementValue = value; + + manualDispatchChangeEvent(nativeEvent); +} + +/** + * If a `change` event should be fired, returns the target's ID. + */ +function getTargetInstForInputEvent(topLevelType, targetInst) { + if (topLevelType === 'topInput') { + // In modern browsers (i.e., not IE8 or IE9), the input event is exactly + // what we want so fall through here and trigger an abstract event + return targetInst; + } +} + +function handleEventsForInputEventIE(topLevelType, target, targetInst) { + if (topLevelType === 'topFocus') { + // In IE8, we can capture almost all .value changes by adding a + // propertychange handler and looking for events with propertyName + // equal to 'value' + // In IE9-11, propertychange fires for most input events but is buggy and + // doesn't fire when text is deleted, but conveniently, selectionchange + // appears to fire in all of the remaining cases so we catch those and + // forward the event if the value has changed + // In either case, we don't want to call the event handler if the value + // is changed from JS so we redefine a setter for `.value` that updates + // our activeElementValue variable, allowing us to ignore those changes + // + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForValueChange(); + startWatchingForValueChange(target, targetInst); + } else if (topLevelType === 'topBlur') { + stopWatchingForValueChange(); + } +} + +// For IE8 and IE9. +function getTargetInstForInputEventIE(topLevelType, targetInst) { + if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { + // On the selectionchange event, the target is just document which isn't + // helpful for us so just check activeElement instead. + // + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire + // propertychange on the first input event after setting `value` from a + // script and fires only keydown, keypress, keyup. Catching keyup usually + // gets it and catching keydown lets us fire an event for the first + // keystroke if user does a key repeat (it'll be a little delayed: right + // before the second keystroke). Other input methods (e.g., paste) seem to + // fire selectionchange normally. + if (activeElement && activeElement.value !== activeElementValue) { + activeElementValue = activeElement.value; + return activeElementInst; + } + } +} + +/** + * SECTION: handle `click` event + */ +function shouldUseClickEvent(elem) { + // Use the `click` event to detect changes to checkbox and radio inputs. + // This approach works across all browsers, whereas `change` does not fire + // until `blur` in IE8. + return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); +} + +function getTargetInstForClickEvent(topLevelType, targetInst) { + if (topLevelType === 'topClick') { + return targetInst; + } +} + +/** + * This plugin creates an `onChange` event that normalizes change events + * across form elements. This event fires at a time when it's possible to + * change the element's value without seeing a flicker. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - select + */ +var ChangeEventPlugin = { + + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + + var getTargetInstFunc, handleEventFunc; + if (shouldUseChangeEvent(targetNode)) { + if (doesChangeEventBubble) { + getTargetInstFunc = getTargetInstForChangeEvent; + } else { + handleEventFunc = handleEventsForChangeEventIE8; + } + } else if (isTextInputElement(targetNode)) { + if (isInputEventSupported) { + getTargetInstFunc = getTargetInstForInputEvent; + } else { + getTargetInstFunc = getTargetInstForInputEventIE; + handleEventFunc = handleEventsForInputEventIE; + } + } else if (shouldUseClickEvent(targetNode)) { + getTargetInstFunc = getTargetInstForClickEvent; + } + + if (getTargetInstFunc) { + var inst = getTargetInstFunc(topLevelType, targetInst); + if (inst) { + var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget); + event.type = 'change'; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + } + + if (handleEventFunc) { + handleEventFunc(topLevelType, targetNode, targetInst); + } + } + +}; + +module.exports = ChangeEventPlugin; + +/***/ }), +/* 363 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactOwner = __webpack_require__(364); + +var ReactRef = {}; + +function attachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(component.getPublicInstance()); + } else { + // Legacy ref + ReactOwner.addComponentAsRefTo(component, ref, owner); + } +} + +function detachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(null); + } else { + // Legacy ref + ReactOwner.removeComponentAsRefFrom(component, ref, owner); + } +} + +ReactRef.attachRefs = function (instance, element) { + if (element === null || typeof element !== 'object') { + return; + } + var ref = element.ref; + if (ref != null) { + attachRef(ref, instance, element._owner); + } +}; + +ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { + // If either the owner or a `ref` has changed, make sure the newest owner + // has stored a reference to `this`, and the previous owner (if different) + // has forgotten the reference to `this`. We use the element instead + // of the public this.props because the post processing cannot determine + // a ref. The ref conceptually lives on the element. + + // TODO: Should this even be possible? The owner cannot change because + // it's forbidden by shouldUpdateReactComponent. The ref can change + // if you swap the keys of but not the refs. Reconsider where this check + // is made. It probably belongs where the key checking and + // instantiateReactComponent is done. + + var prevRef = null; + var prevOwner = null; + if (prevElement !== null && typeof prevElement === 'object') { + prevRef = prevElement.ref; + prevOwner = prevElement._owner; + } + + var nextRef = null; + var nextOwner = null; + if (nextElement !== null && typeof nextElement === 'object') { + nextRef = nextElement.ref; + nextOwner = nextElement._owner; + } + + return prevRef !== nextRef || + // If owner changes but we have an unchanged function ref, don't update refs + typeof nextRef === 'string' && nextOwner !== prevOwner; +}; + +ReactRef.detachRefs = function (instance, element) { + if (element === null || typeof element !== 'object') { + return; + } + var ref = element.ref; + if (ref != null) { + detachRef(ref, instance, element._owner); + } +}; + +module.exports = ReactRef; + +/***/ }), +/* 364 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var invariant = __webpack_require__(9); + +/** + * @param {?object} object + * @return {boolean} True if `object` is a valid owner. + * @final + */ +function isValidOwner(object) { + return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); +} + +/** + * ReactOwners are capable of storing references to owned components. + * + * All components are capable of //being// referenced by owner components, but + * only ReactOwner components are capable of //referencing// owned components. + * The named reference is known as a "ref". + * + * Refs are available when mounted and updated during reconciliation. + * + * var MyComponent = React.createClass({ + * render: function() { + * return ( + * <div onClick={this.handleClick}> + * <CustomComponent ref="custom" /> + * </div> + * ); + * }, + * handleClick: function() { + * this.refs.custom.handleClick(); + * }, + * componentDidMount: function() { + * this.refs.custom.initialize(); + * } + * }); + * + * Refs should rarely be used. When refs are used, they should only be done to + * control data that is not handled by React's data flow. + * + * @class ReactOwner + */ +var ReactOwner = { + /** + * Adds a component by ref to an owner component. + * + * @param {ReactComponent} component Component to reference. + * @param {string} ref Name by which to refer to the component. + * @param {ReactOwner} owner Component on which to record the ref. + * @final + * @internal + */ + addComponentAsRefTo: function (component, ref, owner) { + !isValidOwner(owner) ? false ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0; + owner.attachRef(ref, component); + }, + + /** + * Removes a component by ref from an owner component. + * + * @param {ReactComponent} component Component to dereference. + * @param {string} ref Name of the ref to remove. + * @param {ReactOwner} owner Component on which the ref is recorded. + * @final + * @internal + */ + removeComponentAsRefFrom: function (component, ref, owner) { + !isValidOwner(owner) ? false ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0; + var ownerPublicInstance = owner.getPublicInstance(); + // Check that `component`'s owner is still alive and that `component` is still the current ref + // because we do not want to detach the ref if another component stole it. + if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) { + owner.detachRef(ref); + } + } + +}; + +module.exports = ReactOwner; + +/***/ }), +/* 365 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ + +var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; + +module.exports = DefaultEventPluginOrder; + +/***/ }), +/* 366 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPropagators = __webpack_require__(70); +var ReactDOMComponentTree = __webpack_require__(14); +var SyntheticMouseEvent = __webpack_require__(104); + +var eventTypes = { + mouseEnter: { + registrationName: 'onMouseEnter', + dependencies: ['topMouseOut', 'topMouseOver'] + }, + mouseLeave: { + registrationName: 'onMouseLeave', + dependencies: ['topMouseOut', 'topMouseOver'] + } +}; + +var EnterLeaveEventPlugin = { + + eventTypes: eventTypes, + + /** + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. + */ + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { + return null; + } + if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { + // Must not be a mouse in or mouse out - ignoring. + return null; + } + + var win; + if (nativeEventTarget.window === nativeEventTarget) { + // `nativeEventTarget` is probably a window object. + win = nativeEventTarget; + } else { + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = nativeEventTarget.ownerDocument; + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; + } + } + + var from; + var to; + if (topLevelType === 'topMouseOut') { + from = targetInst; + var related = nativeEvent.relatedTarget || nativeEvent.toElement; + to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; + } else { + // Moving to a node from outside the window. + from = null; + to = targetInst; + } + + if (from === to) { + // Nothing pertains to our managed components. + return null; + } + + var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from); + var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to); + + var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget); + leave.type = 'mouseleave'; + leave.target = fromNode; + leave.relatedTarget = toNode; + + var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget); + enter.type = 'mouseenter'; + enter.target = toNode; + enter.relatedTarget = fromNode; + + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to); + + return [leave, enter]; + } + +}; + +module.exports = EnterLeaveEventPlugin; + +/***/ }), +/* 367 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMProperty = __webpack_require__(69); + +var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; +var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; +var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; +var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; +var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; + +var HTMLDOMPropertyConfig = { + isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')), + Properties: { + /** + * Standard Properties + */ + accept: 0, + acceptCharset: 0, + accessKey: 0, + action: 0, + allowFullScreen: HAS_BOOLEAN_VALUE, + allowTransparency: 0, + alt: 0, + // specifies target context for links with `preload` type + as: 0, + async: HAS_BOOLEAN_VALUE, + autoComplete: 0, + // autoFocus is polyfilled/normalized by AutoFocusUtils + // autoFocus: HAS_BOOLEAN_VALUE, + autoPlay: HAS_BOOLEAN_VALUE, + capture: HAS_BOOLEAN_VALUE, + cellPadding: 0, + cellSpacing: 0, + charSet: 0, + challenge: 0, + checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + cite: 0, + classID: 0, + className: 0, + cols: HAS_POSITIVE_NUMERIC_VALUE, + colSpan: 0, + content: 0, + contentEditable: 0, + contextMenu: 0, + controls: HAS_BOOLEAN_VALUE, + coords: 0, + crossOrigin: 0, + data: 0, // For `<object />` acts as `src`. + dateTime: 0, + 'default': HAS_BOOLEAN_VALUE, + defer: HAS_BOOLEAN_VALUE, + dir: 0, + disabled: HAS_BOOLEAN_VALUE, + download: HAS_OVERLOADED_BOOLEAN_VALUE, + draggable: 0, + encType: 0, + form: 0, + formAction: 0, + formEncType: 0, + formMethod: 0, + formNoValidate: HAS_BOOLEAN_VALUE, + formTarget: 0, + frameBorder: 0, + headers: 0, + height: 0, + hidden: HAS_BOOLEAN_VALUE, + high: 0, + href: 0, + hrefLang: 0, + htmlFor: 0, + httpEquiv: 0, + icon: 0, + id: 0, + inputMode: 0, + integrity: 0, + is: 0, + keyParams: 0, + keyType: 0, + kind: 0, + label: 0, + lang: 0, + list: 0, + loop: HAS_BOOLEAN_VALUE, + low: 0, + manifest: 0, + marginHeight: 0, + marginWidth: 0, + max: 0, + maxLength: 0, + media: 0, + mediaGroup: 0, + method: 0, + min: 0, + minLength: 0, + // Caution; `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. + multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + name: 0, + nonce: 0, + noValidate: HAS_BOOLEAN_VALUE, + open: HAS_BOOLEAN_VALUE, + optimum: 0, + pattern: 0, + placeholder: 0, + playsInline: HAS_BOOLEAN_VALUE, + poster: 0, + preload: 0, + profile: 0, + radioGroup: 0, + readOnly: HAS_BOOLEAN_VALUE, + referrerPolicy: 0, + rel: 0, + required: HAS_BOOLEAN_VALUE, + reversed: HAS_BOOLEAN_VALUE, + role: 0, + rows: HAS_POSITIVE_NUMERIC_VALUE, + rowSpan: HAS_NUMERIC_VALUE, + sandbox: 0, + scope: 0, + scoped: HAS_BOOLEAN_VALUE, + scrolling: 0, + seamless: HAS_BOOLEAN_VALUE, + selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + shape: 0, + size: HAS_POSITIVE_NUMERIC_VALUE, + sizes: 0, + span: HAS_POSITIVE_NUMERIC_VALUE, + spellCheck: 0, + src: 0, + srcDoc: 0, + srcLang: 0, + srcSet: 0, + start: HAS_NUMERIC_VALUE, + step: 0, + style: 0, + summary: 0, + tabIndex: 0, + target: 0, + title: 0, + // Setting .type throws on non-<input> tags + type: 0, + useMap: 0, + value: 0, + width: 0, + wmode: 0, + wrap: 0, + + /** + * RDFa Properties + */ + about: 0, + datatype: 0, + inlist: 0, + prefix: 0, + // property is also supported for OpenGraph in meta tags. + property: 0, + resource: 0, + 'typeof': 0, + vocab: 0, + + /** + * Non-standard Properties + */ + // autoCapitalize and autoCorrect are supported in Mobile Safari for + // keyboard hints. + autoCapitalize: 0, + autoCorrect: 0, + // autoSave allows WebKit/Blink to persist values of input fields on page reloads + autoSave: 0, + // color is for Safari mask-icon link + color: 0, + // itemProp, itemScope, itemType are for + // Microdata support. See http://schema.org/docs/gs.html + itemProp: 0, + itemScope: HAS_BOOLEAN_VALUE, + itemType: 0, + // itemID and itemRef are for Microdata support as well but + // only specified in the WHATWG spec document. See + // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api + itemID: 0, + itemRef: 0, + // results show looking glass icon and recent searches on input + // search fields in WebKit/Blink + results: 0, + // IE-only attribute that specifies security restrictions on an iframe + // as an alternative to the sandbox attribute on IE<10 + security: 0, + // IE-only attribute that controls focus behavior + unselectable: 0 + }, + DOMAttributeNames: { + acceptCharset: 'accept-charset', + className: 'class', + htmlFor: 'for', + httpEquiv: 'http-equiv' + }, + DOMPropertyNames: {} +}; + +module.exports = HTMLDOMPropertyConfig; + +/***/ }), +/* 368 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMChildrenOperations = __webpack_require__(150); +var ReactDOMIDOperations = __webpack_require__(373); + +/** + * Abstracts away all functionality of the reconciler that requires knowledge of + * the browser context. TODO: These callers should be refactored to avoid the + * need for this injection. + */ +var ReactComponentBrowserEnvironment = { + + processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, + + replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup + +}; + +module.exports = ReactComponentBrowserEnvironment; + +/***/ }), +/* 369 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var DOMLazyTree = __webpack_require__(74); +var ExecutionEnvironment = __webpack_require__(22); + +var createNodesFromMarkup = __webpack_require__(370); +var emptyFunction = __webpack_require__(24); +var invariant = __webpack_require__(9); + +var Danger = { + + /** + * Replaces a node with a string of markup at its current position within its + * parent. The markup must render into a single root node. + * + * @param {DOMElement} oldChild Child node to replace. + * @param {string} markup Markup to render in place of the child node. + * @internal + */ + dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) { + !ExecutionEnvironment.canUseDOM ? false ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0; + !markup ? false ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0; + !(oldChild.nodeName !== 'HTML') ? false ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0; + + if (typeof markup === 'string') { + var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; + oldChild.parentNode.replaceChild(newChild, oldChild); + } else { + DOMLazyTree.replaceChildWithTree(oldChild, markup); + } + } + +}; + +module.exports = Danger; + +/***/ }), +/* 370 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +/*eslint-disable fb-www/unsafe-html*/ + +var ExecutionEnvironment = __webpack_require__(22); + +var createArrayFromMixed = __webpack_require__(371); +var getMarkupWrap = __webpack_require__(372); +var invariant = __webpack_require__(9); + +/** + * Dummy container used to render all markup. + */ +var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Pattern used by `getNodeName`. + */ +var nodeNamePattern = /^\s*<(\w+)/; + +/** + * Extracts the `nodeName` of the first element in a string of markup. + * + * @param {string} markup String of markup. + * @return {?string} Node name of the supplied markup. + */ +function getNodeName(markup) { + var nodeNameMatch = markup.match(nodeNamePattern); + return nodeNameMatch && nodeNameMatch[1].toLowerCase(); +} + +/** + * Creates an array containing the nodes rendered from the supplied markup. The + * optionally supplied `handleScript` function will be invoked once for each + * <script> element that is rendered. If no `handleScript` function is supplied, + * an exception is thrown if any <script> elements are rendered. + * + * @param {string} markup A string of valid HTML markup. + * @param {?function} handleScript Invoked once for each rendered <script>. + * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. + */ +function createNodesFromMarkup(markup, handleScript) { + var node = dummyNode; + !!!dummyNode ? false ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0; + var nodeName = getNodeName(markup); + + var wrap = nodeName && getMarkupWrap(nodeName); + if (wrap) { + node.innerHTML = wrap[1] + markup + wrap[2]; + + var wrapDepth = wrap[0]; + while (wrapDepth--) { + node = node.lastChild; + } + } else { + node.innerHTML = markup; + } + + var scripts = node.getElementsByTagName('script'); + if (scripts.length) { + !handleScript ? false ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0; + createArrayFromMixed(scripts).forEach(handleScript); + } + + var nodes = Array.from(node.childNodes); + while (node.lastChild) { + node.removeChild(node.lastChild); + } + return nodes; +} + +module.exports = createNodesFromMarkup; + +/***/ }), +/* 371 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var invariant = __webpack_require__(9); + +/** + * Convert array-like objects to arrays. + * + * This API assumes the caller knows the contents of the data type. For less + * well defined inputs use createArrayFromMixed. + * + * @param {object|function|filelist} obj + * @return {array} + */ +function toArray(obj) { + var length = obj.length; + + // Some browsers builtin objects can report typeof 'function' (e.g. NodeList + // in old versions of Safari). + !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? false ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0; + + !(typeof length === 'number') ? false ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0; + + !(length === 0 || length - 1 in obj) ? false ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0; + + !(typeof obj.callee !== 'function') ? false ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0; + + // Old IE doesn't give collections access to hasOwnProperty. Assume inputs + // without method will throw during the slice call and skip straight to the + // fallback. + if (obj.hasOwnProperty) { + try { + return Array.prototype.slice.call(obj); + } catch (e) { + // IE < 9 does not support Array#slice on collections objects + } + } + + // Fall back to copying key by key. This assumes all keys have a value, + // so will not preserve sparsely populated inputs. + var ret = Array(length); + for (var ii = 0; ii < length; ii++) { + ret[ii] = obj[ii]; + } + return ret; +} + +/** + * Perform a heuristic test to determine if an object is "array-like". + * + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." + * + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} + */ +function hasArrayNature(obj) { + return ( + // not null/false + !!obj && ( + // arrays are objects, NodeLists are functions in Safari + typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + 'length' in obj && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + typeof obj.nodeType != 'number' && ( + // a real array + Array.isArray(obj) || + // arguments + 'callee' in obj || + // HTMLCollection/NodeList + 'item' in obj) + ); +} + +/** + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. + * + * This is mostly useful idiomatically: + * + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} + */ +function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + return toArray(obj); + } +} + +module.exports = createArrayFromMixed; + +/***/ }), +/* 372 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/*eslint-disable fb-www/unsafe-html */ + +var ExecutionEnvironment = __webpack_require__(22); + +var invariant = __webpack_require__(9); + +/** + * Dummy container used to detect which wraps are necessary. + */ +var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Some browsers cannot use `innerHTML` to render certain elements standalone, + * so we wrap them, render the wrapped nodes, then extract the desired node. + * + * In IE8, certain elements cannot render alone, so wrap all elements ('*'). + */ + +var shouldWrap = {}; + +var selectWrap = [1, '<select multiple="true">', '</select>']; +var tableWrap = [1, '<table>', '</table>']; +var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; + +var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>']; + +var markupWrap = { + '*': [1, '?<div>', '</div>'], + + 'area': [1, '<map>', '</map>'], + 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], + 'legend': [1, '<fieldset>', '</fieldset>'], + 'param': [1, '<object>', '</object>'], + 'tr': [2, '<table><tbody>', '</tbody></table>'], + + 'optgroup': selectWrap, + 'option': selectWrap, + + 'caption': tableWrap, + 'colgroup': tableWrap, + 'tbody': tableWrap, + 'tfoot': tableWrap, + 'thead': tableWrap, + + 'td': trWrap, + 'th': trWrap +}; + +// Initialize the SVG elements since we know they'll always need to be wrapped +// consistently. If they are created inside a <div> they will be initialized in +// the wrong namespace (and will not display). +var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan']; +svgElements.forEach(function (nodeName) { + markupWrap[nodeName] = svgWrap; + shouldWrap[nodeName] = true; +}); + +/** + * Gets the markup wrap configuration for the supplied `nodeName`. + * + * NOTE: This lazily detects which wraps are necessary for the current browser. + * + * @param {string} nodeName Lowercase `nodeName`. + * @return {?array} Markup wrap configuration, if applicable. + */ +function getMarkupWrap(nodeName) { + !!!dummyNode ? false ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0; + if (!markupWrap.hasOwnProperty(nodeName)) { + nodeName = '*'; + } + if (!shouldWrap.hasOwnProperty(nodeName)) { + if (nodeName === '*') { + dummyNode.innerHTML = '<link />'; + } else { + dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; + } + shouldWrap[nodeName] = !dummyNode.firstChild; + } + return shouldWrap[nodeName] ? markupWrap[nodeName] : null; +} + +module.exports = getMarkupWrap; + +/***/ }), +/* 373 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMChildrenOperations = __webpack_require__(150); +var ReactDOMComponentTree = __webpack_require__(14); + +/** + * Operations used to process updates to DOM nodes. + */ +var ReactDOMIDOperations = { + + /** + * Updates a component's children by processing a series of updates. + * + * @param {array<object>} updates List of update configurations. + * @internal + */ + dangerouslyProcessChildrenUpdates: function (parentInst, updates) { + var node = ReactDOMComponentTree.getNodeFromInstance(parentInst); + DOMChildrenOperations.processUpdates(node, updates); + } +}; + +module.exports = ReactDOMIDOperations; + +/***/ }), +/* 374 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/* global hasOwnProperty:true */ + + + +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); + +var AutoFocusUtils = __webpack_require__(375); +var CSSPropertyOperations = __webpack_require__(376); +var DOMLazyTree = __webpack_require__(74); +var DOMNamespaces = __webpack_require__(151); +var DOMProperty = __webpack_require__(69); +var DOMPropertyOperations = __webpack_require__(233); +var EventPluginHub = __webpack_require__(71); +var EventPluginRegistry = __webpack_require__(144); +var ReactBrowserEventEmitter = __webpack_require__(107); +var ReactDOMComponentFlags = __webpack_require__(223); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactDOMInput = __webpack_require__(386); +var ReactDOMOption = __webpack_require__(388); +var ReactDOMSelect = __webpack_require__(234); +var ReactDOMTextarea = __webpack_require__(389); +var ReactInstrumentation = __webpack_require__(26); +var ReactMultiChild = __webpack_require__(390); +var ReactServerRenderingTransaction = __webpack_require__(397); + +var emptyFunction = __webpack_require__(24); +var escapeTextContentForBrowser = __webpack_require__(106); +var invariant = __webpack_require__(9); +var isEventSupported = __webpack_require__(147); +var shallowEqual = __webpack_require__(88); +var validateDOMNesting = __webpack_require__(159); +var warning = __webpack_require__(11); + +var Flags = ReactDOMComponentFlags; +var deleteListener = EventPluginHub.deleteListener; +var getNode = ReactDOMComponentTree.getNodeFromInstance; +var listenTo = ReactBrowserEventEmitter.listenTo; +var registrationNameModules = EventPluginRegistry.registrationNameModules; + +// For quickly matching children type, to test if can be treated as content. +var CONTENT_TYPES = { 'string': true, 'number': true }; + +var STYLE = 'style'; +var HTML = '__html'; +var RESERVED_PROPS = { + children: null, + dangerouslySetInnerHTML: null, + suppressContentEditableWarning: null +}; + +// Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE). +var DOC_FRAGMENT_TYPE = 11; + +function getDeclarationErrorAddendum(internalInstance) { + if (internalInstance) { + var owner = internalInstance._currentElement._owner || null; + if (owner) { + var name = owner.getName(); + if (name) { + return ' This DOM node was rendered by `' + name + '`.'; + } + } + } + return ''; +} + +function friendlyStringify(obj) { + if (typeof obj === 'object') { + if (Array.isArray(obj)) { + return '[' + obj.map(friendlyStringify).join(', ') + ']'; + } else { + var pairs = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key); + pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key])); + } + } + return '{' + pairs.join(', ') + '}'; + } + } else if (typeof obj === 'string') { + return JSON.stringify(obj); + } else if (typeof obj === 'function') { + return '[function object]'; + } + // Differs from JSON.stringify in that undefined because undefined and that + // inf and nan don't become null + return String(obj); +} + +var styleMutationWarning = {}; + +function checkAndWarnForMutatedStyle(style1, style2, component) { + if (style1 == null || style2 == null) { + return; + } + if (shallowEqual(style1, style2)) { + return; + } + + var componentName = component._tag; + var owner = component._currentElement._owner; + var ownerName; + if (owner) { + ownerName = owner.getName(); + } + + var hash = ownerName + '|' + componentName; + + if (styleMutationWarning.hasOwnProperty(hash)) { + return; + } + + styleMutationWarning[hash] = true; + + false ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0; +} + +/** + * @param {object} component + * @param {?object} props + */ +function assertValidProps(component, props) { + if (!props) { + return; + } + // Note the use of `==` which checks for null or undefined. + if (voidElementTags[component._tag]) { + !(props.children == null && props.dangerouslySetInnerHTML == null) ? false ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0; + } + if (props.dangerouslySetInnerHTML != null) { + !(props.children == null) ? false ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0; + !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? false ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0; + } + if (false) { + process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0; + } + !(props.style == null || typeof props.style === 'object') ? false ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0; +} + +function enqueuePutListener(inst, registrationName, listener, transaction) { + if (transaction instanceof ReactServerRenderingTransaction) { + return; + } + if (false) { + // IE8 has no API for event capturing and the `onScroll` event doesn't + // bubble. + process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0; + } + var containerInfo = inst._hostContainerInfo; + var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE; + var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument; + listenTo(registrationName, doc); + transaction.getReactMountReady().enqueue(putListener, { + inst: inst, + registrationName: registrationName, + listener: listener + }); +} + +function putListener() { + var listenerToPut = this; + EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener); +} + +function inputPostMount() { + var inst = this; + ReactDOMInput.postMountWrapper(inst); +} + +function textareaPostMount() { + var inst = this; + ReactDOMTextarea.postMountWrapper(inst); +} + +function optionPostMount() { + var inst = this; + ReactDOMOption.postMountWrapper(inst); +} + +var setAndValidateContentChildDev = emptyFunction; +if (false) { + setAndValidateContentChildDev = function (content) { + var hasExistingContent = this._contentDebugID != null; + var debugID = this._debugID; + // This ID represents the inlined child that has no backing instance: + var contentDebugID = -debugID; + + if (content == null) { + if (hasExistingContent) { + ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID); + } + this._contentDebugID = null; + return; + } + + validateDOMNesting(null, String(content), this, this._ancestorInfo); + this._contentDebugID = contentDebugID; + if (hasExistingContent) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content); + ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID); + } else { + ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID); + ReactInstrumentation.debugTool.onMountComponent(contentDebugID); + ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]); + } + }; +} + +// There are so many media events, it makes sense to just +// maintain a list rather than create a `trapBubbledEvent` for each +var mediaEvents = { + topAbort: 'abort', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topSeeked: 'seeked', + topSeeking: 'seeking', + topStalled: 'stalled', + topSuspend: 'suspend', + topTimeUpdate: 'timeupdate', + topVolumeChange: 'volumechange', + topWaiting: 'waiting' +}; + +function trapBubbledEventsLocal() { + var inst = this; + // If a component renders to null or if another component fatals and causes + // the state of the tree to be corrupted, `node` here can be null. + !inst._rootNodeID ? false ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0; + var node = getNode(inst); + !node ? false ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0; + + switch (inst._tag) { + case 'iframe': + case 'object': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; + break; + case 'video': + case 'audio': + + inst._wrapperState.listeners = []; + // Create listener for each media event + for (var event in mediaEvents) { + if (mediaEvents.hasOwnProperty(event)) { + inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node)); + } + } + break; + case 'source': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)]; + break; + case 'img': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; + break; + case 'form': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)]; + break; + case 'input': + case 'select': + case 'textarea': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)]; + break; + } +} + +function postUpdateSelectWrapper() { + ReactDOMSelect.postUpdateWrapper(this); +} + +// For HTML, certain tags should omit their close tag. We keep a whitelist for +// those special-case tags. + +var omittedCloseTags = { + 'area': true, + 'base': true, + 'br': true, + 'col': true, + 'embed': true, + 'hr': true, + 'img': true, + 'input': true, + 'keygen': true, + 'link': true, + 'meta': true, + 'param': true, + 'source': true, + 'track': true, + 'wbr': true +}; + +var newlineEatingTags = { + 'listing': true, + 'pre': true, + 'textarea': true +}; + +// For HTML, certain tags cannot have children. This has the same purpose as +// `omittedCloseTags` except that `menuitem` should still have its closing tag. + +var voidElementTags = _assign({ + 'menuitem': true +}, omittedCloseTags); + +// We accept any tag to be rendered but since this gets injected into arbitrary +// HTML, we want to make sure that it's a safe tag. +// http://www.w3.org/TR/REC-xml/#NT-Name + +var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset +var validatedTagCache = {}; +var hasOwnProperty = {}.hasOwnProperty; + +function validateDangerousTag(tag) { + if (!hasOwnProperty.call(validatedTagCache, tag)) { + !VALID_TAG_REGEX.test(tag) ? false ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0; + validatedTagCache[tag] = true; + } +} + +function isCustomComponent(tagName, props) { + return tagName.indexOf('-') >= 0 || props.is != null; +} + +var globalIdCounter = 1; + +/** + * Creates a new React class that is idempotent and capable of containing other + * React components. It accepts event listeners and DOM properties that are + * valid according to `DOMProperty`. + * + * - Event listeners: `onClick`, `onMouseDown`, etc. + * - DOM properties: `className`, `name`, `title`, etc. + * + * The `style` property functions differently from the DOM API. It accepts an + * object mapping of style properties to values. + * + * @constructor ReactDOMComponent + * @extends ReactMultiChild + */ +function ReactDOMComponent(element) { + var tag = element.type; + validateDangerousTag(tag); + this._currentElement = element; + this._tag = tag.toLowerCase(); + this._namespaceURI = null; + this._renderedChildren = null; + this._previousStyle = null; + this._previousStyleCopy = null; + this._hostNode = null; + this._hostParent = null; + this._rootNodeID = 0; + this._domID = 0; + this._hostContainerInfo = null; + this._wrapperState = null; + this._topLevelWrapper = null; + this._flags = 0; + if (false) { + this._ancestorInfo = null; + setAndValidateContentChildDev.call(this, null); + } +} + +ReactDOMComponent.displayName = 'ReactDOMComponent'; + +ReactDOMComponent.Mixin = { + + /** + * Generates root tag markup then recurses. This method has side effects and + * is not idempotent. + * + * @internal + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?ReactDOMComponent} the parent component instance + * @param {?object} info about the host container + * @param {object} context + * @return {string} The computed markup. + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + this._rootNodeID = globalIdCounter++; + this._domID = hostContainerInfo._idCounter++; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var props = this._currentElement.props; + + switch (this._tag) { + case 'audio': + case 'form': + case 'iframe': + case 'img': + case 'link': + case 'object': + case 'source': + case 'video': + this._wrapperState = { + listeners: null + }; + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'input': + ReactDOMInput.mountWrapper(this, props, hostParent); + props = ReactDOMInput.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'option': + ReactDOMOption.mountWrapper(this, props, hostParent); + props = ReactDOMOption.getHostProps(this, props); + break; + case 'select': + ReactDOMSelect.mountWrapper(this, props, hostParent); + props = ReactDOMSelect.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'textarea': + ReactDOMTextarea.mountWrapper(this, props, hostParent); + props = ReactDOMTextarea.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + } + + assertValidProps(this, props); + + // We create tags in the namespace of their parent container, except HTML + // tags get no namespace. + var namespaceURI; + var parentTag; + if (hostParent != null) { + namespaceURI = hostParent._namespaceURI; + parentTag = hostParent._tag; + } else if (hostContainerInfo._tag) { + namespaceURI = hostContainerInfo._namespaceURI; + parentTag = hostContainerInfo._tag; + } + if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') { + namespaceURI = DOMNamespaces.html; + } + if (namespaceURI === DOMNamespaces.html) { + if (this._tag === 'svg') { + namespaceURI = DOMNamespaces.svg; + } else if (this._tag === 'math') { + namespaceURI = DOMNamespaces.mathml; + } + } + this._namespaceURI = namespaceURI; + + if (false) { + var parentInfo; + if (hostParent != null) { + parentInfo = hostParent._ancestorInfo; + } else if (hostContainerInfo._tag) { + parentInfo = hostContainerInfo._ancestorInfo; + } + if (parentInfo) { + // parentInfo should always be present except for the top-level + // component when server rendering + validateDOMNesting(this._tag, null, this, parentInfo); + } + this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this); + } + + var mountImage; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var el; + if (namespaceURI === DOMNamespaces.html) { + if (this._tag === 'script') { + // Create the script via .innerHTML so its "parser-inserted" flag is + // set to true and it does not execute + var div = ownerDocument.createElement('div'); + var type = this._currentElement.type; + div.innerHTML = '<' + type + '></' + type + '>'; + el = div.removeChild(div.firstChild); + } else if (props.is) { + el = ownerDocument.createElement(this._currentElement.type, props.is); + } else { + // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug. + // See discussion in https://github.com/facebook/react/pull/6896 + // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 + el = ownerDocument.createElement(this._currentElement.type); + } + } else { + el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type); + } + ReactDOMComponentTree.precacheNode(this, el); + this._flags |= Flags.hasCachedChildNodes; + if (!this._hostParent) { + DOMPropertyOperations.setAttributeForRoot(el); + } + this._updateDOMProperties(null, props, transaction); + var lazyTree = DOMLazyTree(el); + this._createInitialChildren(transaction, props, context, lazyTree); + mountImage = lazyTree; + } else { + var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props); + var tagContent = this._createContentMarkup(transaction, props, context); + if (!tagContent && omittedCloseTags[this._tag]) { + mountImage = tagOpen + '/>'; + } else { + mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>'; + } + } + + switch (this._tag) { + case 'input': + transaction.getReactMountReady().enqueue(inputPostMount, this); + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'textarea': + transaction.getReactMountReady().enqueue(textareaPostMount, this); + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'select': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'button': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'option': + transaction.getReactMountReady().enqueue(optionPostMount, this); + break; + } + + return mountImage; + }, + + /** + * Creates markup for the open tag and all attributes. + * + * This method has side effects because events get registered. + * + * Iterating over object properties is faster than iterating over arrays. + * @see http://jsperf.com/obj-vs-arr-iteration + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props + * @return {string} Markup of opening tag. + */ + _createOpenTagMarkupAndPutListeners: function (transaction, props) { + var ret = '<' + this._currentElement.type; + + for (var propKey in props) { + if (!props.hasOwnProperty(propKey)) { + continue; + } + var propValue = props[propKey]; + if (propValue == null) { + continue; + } + if (registrationNameModules.hasOwnProperty(propKey)) { + if (propValue) { + enqueuePutListener(this, propKey, propValue, transaction); + } + } else { + if (propKey === STYLE) { + if (propValue) { + if (false) { + // See `_updateDOMProperties`. style block + this._previousStyle = propValue; + } + propValue = this._previousStyleCopy = _assign({}, props.style); + } + propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this); + } + var markup = null; + if (this._tag != null && isCustomComponent(this._tag, props)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue); + } + } else { + markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue); + } + if (markup) { + ret += ' ' + markup; + } + } + } + + // For static pages, no need to put React ID and checksum. Saves lots of + // bytes. + if (transaction.renderToStaticMarkup) { + return ret; + } + + if (!this._hostParent) { + ret += ' ' + DOMPropertyOperations.createMarkupForRoot(); + } + ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID); + return ret; + }, + + /** + * Creates markup for the content between the tags. + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props + * @param {object} context + * @return {string} Content markup. + */ + _createContentMarkup: function (transaction, props, context) { + var ret = ''; + + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + ret = innerHTML.__html; + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + if (contentToUse != null) { + // TODO: Validate that text is allowed as a child of this node + ret = escapeTextContentForBrowser(contentToUse); + if (false) { + setAndValidateContentChildDev.call(this, contentToUse); + } + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + ret = mountImages.join(''); + } + } + if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + return '\n' + ret; + } else { + return ret; + } + }, + + _createInitialChildren: function (transaction, props, context, lazyTree) { + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + DOMLazyTree.queueHTML(lazyTree, innerHTML.__html); + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + // TODO: Validate that text is allowed as a child of this node + if (contentToUse != null) { + // Avoid setting textContent when the text is empty. In IE11 setting + // textContent on a text area will cause the placeholder to not + // show within the textarea until it has been focused and blurred again. + // https://github.com/facebook/react/issues/6731#issuecomment-254874553 + if (contentToUse !== '') { + if (false) { + setAndValidateContentChildDev.call(this, contentToUse); + } + DOMLazyTree.queueText(lazyTree, contentToUse); + } + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + for (var i = 0; i < mountImages.length; i++) { + DOMLazyTree.queueChild(lazyTree, mountImages[i]); + } + } + } + }, + + /** + * Receives a next element and updates the component. + * + * @internal + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} context + */ + receiveComponent: function (nextElement, transaction, context) { + var prevElement = this._currentElement; + this._currentElement = nextElement; + this.updateComponent(transaction, prevElement, nextElement, context); + }, + + /** + * Updates a DOM component after it has already been allocated and + * attached to the DOM. Reconciles the root DOM node, then recurses. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevElement + * @param {ReactElement} nextElement + * @internal + * @overridable + */ + updateComponent: function (transaction, prevElement, nextElement, context) { + var lastProps = prevElement.props; + var nextProps = this._currentElement.props; + + switch (this._tag) { + case 'input': + lastProps = ReactDOMInput.getHostProps(this, lastProps); + nextProps = ReactDOMInput.getHostProps(this, nextProps); + break; + case 'option': + lastProps = ReactDOMOption.getHostProps(this, lastProps); + nextProps = ReactDOMOption.getHostProps(this, nextProps); + break; + case 'select': + lastProps = ReactDOMSelect.getHostProps(this, lastProps); + nextProps = ReactDOMSelect.getHostProps(this, nextProps); + break; + case 'textarea': + lastProps = ReactDOMTextarea.getHostProps(this, lastProps); + nextProps = ReactDOMTextarea.getHostProps(this, nextProps); + break; + } + + assertValidProps(this, nextProps); + this._updateDOMProperties(lastProps, nextProps, transaction); + this._updateDOMChildren(lastProps, nextProps, transaction, context); + + switch (this._tag) { + case 'input': + // Update the wrapper around inputs *after* updating props. This has to + // happen after `_updateDOMProperties`. Otherwise HTML5 input validations + // raise warnings and prevent the new value from being assigned. + ReactDOMInput.updateWrapper(this); + break; + case 'textarea': + ReactDOMTextarea.updateWrapper(this); + break; + case 'select': + // <select> value update needs to occur after <option> children + // reconciliation + transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this); + break; + } + }, + + /** + * Reconciles the properties by detecting differences in property values and + * updating the DOM as necessary. This function is probably the single most + * critical path for performance optimization. + * + * TODO: Benchmark whether checking for changed values in memory actually + * improves performance (especially statically positioned elements). + * TODO: Benchmark the effects of putting this at the top since 99% of props + * do not change for a given reconciliation. + * TODO: Benchmark areas that can be improved with caching. + * + * @private + * @param {object} lastProps + * @param {object} nextProps + * @param {?DOMElement} node + */ + _updateDOMProperties: function (lastProps, nextProps, transaction) { + var propKey; + var styleName; + var styleUpdates; + for (propKey in lastProps) { + if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) { + continue; + } + if (propKey === STYLE) { + var lastStyle = this._previousStyleCopy; + for (styleName in lastStyle) { + if (lastStyle.hasOwnProperty(styleName)) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + this._previousStyleCopy = null; + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (lastProps[propKey]) { + // Only call deleteListener if there was a listener previously or + // else willDeleteListener gets called when there wasn't actually a + // listener (e.g., onClick={null}) + deleteListener(this, propKey); + } + } else if (isCustomComponent(this._tag, lastProps)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey); + } + } + for (propKey in nextProps) { + var nextProp = nextProps[propKey]; + var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined; + if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) { + continue; + } + if (propKey === STYLE) { + if (nextProp) { + if (false) { + checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this); + this._previousStyle = nextProp; + } + nextProp = this._previousStyleCopy = _assign({}, nextProp); + } else { + this._previousStyleCopy = null; + } + if (lastProp) { + // Unset styles on `lastProp` but not on `nextProp`. + for (styleName in lastProp) { + if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + // Update styles that changed since `lastProp`. + for (styleName in nextProp) { + if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = nextProp[styleName]; + } + } + } else { + // Relies on `updateStylesByID` not mutating `styleUpdates`. + styleUpdates = nextProp; + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp) { + enqueuePutListener(this, propKey, nextProp, transaction); + } else if (lastProp) { + deleteListener(this, propKey); + } + } else if (isCustomComponent(this._tag, nextProps)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + var node = getNode(this); + // If we're updating to null or undefined, we should remove the property + // from the DOM node instead of inadvertently setting to a string. This + // brings us in line with the same behavior we have on initial render. + if (nextProp != null) { + DOMPropertyOperations.setValueForProperty(node, propKey, nextProp); + } else { + DOMPropertyOperations.deleteValueForProperty(node, propKey); + } + } + } + if (styleUpdates) { + CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this); + } + }, + + /** + * Reconciles the children with the various properties that affect the + * children content. + * + * @param {object} lastProps + * @param {object} nextProps + * @param {ReactReconcileTransaction} transaction + * @param {object} context + */ + _updateDOMChildren: function (lastProps, nextProps, transaction, context) { + var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; + var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; + + var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html; + var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html; + + // Note the use of `!=` which checks for null or undefined. + var lastChildren = lastContent != null ? null : lastProps.children; + var nextChildren = nextContent != null ? null : nextProps.children; + + // If we're switching from children to content/html or vice versa, remove + // the old content + var lastHasContentOrHtml = lastContent != null || lastHtml != null; + var nextHasContentOrHtml = nextContent != null || nextHtml != null; + if (lastChildren != null && nextChildren == null) { + this.updateChildren(null, transaction, context); + } else if (lastHasContentOrHtml && !nextHasContentOrHtml) { + this.updateTextContent(''); + if (false) { + ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); + } + } + + if (nextContent != null) { + if (lastContent !== nextContent) { + this.updateTextContent('' + nextContent); + if (false) { + setAndValidateContentChildDev.call(this, nextContent); + } + } + } else if (nextHtml != null) { + if (lastHtml !== nextHtml) { + this.updateMarkup('' + nextHtml); + } + if (false) { + ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); + } + } else if (nextChildren != null) { + if (false) { + setAndValidateContentChildDev.call(this, null); + } + + this.updateChildren(nextChildren, transaction, context); + } + }, + + getHostNode: function () { + return getNode(this); + }, + + /** + * Destroys all event registrations for this instance. Does not remove from + * the DOM. That must be done by the parent. + * + * @internal + */ + unmountComponent: function (safely) { + switch (this._tag) { + case 'audio': + case 'form': + case 'iframe': + case 'img': + case 'link': + case 'object': + case 'source': + case 'video': + var listeners = this._wrapperState.listeners; + if (listeners) { + for (var i = 0; i < listeners.length; i++) { + listeners[i].remove(); + } + } + break; + case 'html': + case 'head': + case 'body': + /** + * Components like <html> <head> and <body> can't be removed or added + * easily in a cross-browser way, however it's valuable to be able to + * take advantage of React's reconciliation for styling and <title> + * management. So we just document it and throw in dangerous cases. + */ + true ? false ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0; + break; + } + + this.unmountChildren(safely); + ReactDOMComponentTree.uncacheNode(this); + EventPluginHub.deleteAllListeners(this); + this._rootNodeID = 0; + this._domID = 0; + this._wrapperState = null; + + if (false) { + setAndValidateContentChildDev.call(this, null); + } + }, + + getPublicInstance: function () { + return getNode(this); + } + +}; + +_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin); + +module.exports = ReactDOMComponent; + +/***/ }), +/* 375 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMComponentTree = __webpack_require__(14); + +var focusNode = __webpack_require__(231); + +var AutoFocusUtils = { + focusDOMComponent: function () { + focusNode(ReactDOMComponentTree.getNodeFromInstance(this)); + } +}; + +module.exports = AutoFocusUtils; + +/***/ }), +/* 376 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var CSSProperty = __webpack_require__(232); +var ExecutionEnvironment = __webpack_require__(22); +var ReactInstrumentation = __webpack_require__(26); + +var camelizeStyleName = __webpack_require__(377); +var dangerousStyleValue = __webpack_require__(379); +var hyphenateStyleName = __webpack_require__(380); +var memoizeStringOnly = __webpack_require__(382); +var warning = __webpack_require__(11); + +var processStyleName = memoizeStringOnly(function (styleName) { + return hyphenateStyleName(styleName); +}); + +var hasShorthandPropertyBug = false; +var styleFloatAccessor = 'cssFloat'; +if (ExecutionEnvironment.canUseDOM) { + var tempStyle = document.createElement('div').style; + try { + // IE8 throws "Invalid argument." if resetting shorthand style properties. + tempStyle.font = ''; + } catch (e) { + hasShorthandPropertyBug = true; + } + // IE8 only supports accessing cssFloat (standard) as styleFloat + if (document.documentElement.style.cssFloat === undefined) { + styleFloatAccessor = 'styleFloat'; + } +} + +if (false) { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + + // style values shouldn't contain a semicolon + var badStyleValueWithSemicolonPattern = /;\s*$/; + + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + + var warnHyphenatedStyleName = function (name, owner) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0; + }; + + var warnBadVendoredStyleName = function (name, owner) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0; + }; + + var warnStyleValueWithSemicolon = function (name, value, owner) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0; + }; + + var warnStyleValueIsNaN = function (name, value, owner) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0; + }; + + var checkRenderMessage = function (owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + }; + + /** + * @param {string} name + * @param {*} value + * @param {ReactDOMComponent} component + */ + var warnValidStyle = function (name, value, component) { + var owner; + if (component) { + owner = component._currentElement._owner; + } + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name, owner); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name, owner); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value, owner); + } + + if (typeof value === 'number' && isNaN(value)) { + warnStyleValueIsNaN(name, value, owner); + } + }; +} + +/** + * Operations for dealing with CSS properties. + */ +var CSSPropertyOperations = { + + /** + * Serializes a mapping of style properties for use as inline styles: + * + * > createMarkupForStyles({width: '200px', height: 0}) + * "width:200px;height:0;" + * + * Undefined values are ignored so that declarative programming is easier. + * The result should be HTML-escaped before insertion into the DOM. + * + * @param {object} styles + * @param {ReactDOMComponent} component + * @return {?string} + */ + createMarkupForStyles: function (styles, component) { + var serialized = ''; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + var styleValue = styles[styleName]; + if (false) { + warnValidStyle(styleName, styleValue, component); + } + if (styleValue != null) { + serialized += processStyleName(styleName) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, component) + ';'; + } + } + return serialized || null; + }, + + /** + * Sets the value for multiple styles on a node. If a value is specified as + * '' (empty string), the corresponding style property will be unset. + * + * @param {DOMElement} node + * @param {object} styles + * @param {ReactDOMComponent} component + */ + setValueForStyles: function (node, styles, component) { + if (false) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: component._debugID, + type: 'update styles', + payload: styles + }); + } + + var style = node.style; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + if (false) { + warnValidStyle(styleName, styles[styleName], component); + } + var styleValue = dangerousStyleValue(styleName, styles[styleName], component); + if (styleName === 'float' || styleName === 'cssFloat') { + styleName = styleFloatAccessor; + } + if (styleValue) { + style[styleName] = styleValue; + } else { + var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; + if (expansion) { + // Shorthand property that IE8 won't like unsetting, so unset each + // component to placate it + for (var individualStyleName in expansion) { + style[individualStyleName] = ''; + } + } else { + style[styleName] = ''; + } + } + } + } + +}; + +module.exports = CSSPropertyOperations; + +/***/ }), +/* 377 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + + +var camelize = __webpack_require__(378); + +var msPattern = /^-ms-/; + +/** + * Camelcases a hyphenated CSS property name, for example: + * + * > camelizeStyleName('background-color') + * < "backgroundColor" + * > camelizeStyleName('-moz-transition') + * < "MozTransition" + * > camelizeStyleName('-ms-transition') + * < "msTransition" + * + * As Andi Smith suggests + * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + * is converted to lowercase `ms`. + * + * @param {string} string + * @return {string} + */ +function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); +} + +module.exports = camelizeStyleName; + +/***/ }), +/* 378 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var _hyphenPattern = /-(.)/g; + +/** + * Camelcases a hyphenated string, for example: + * + * > camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ +function camelize(string) { + return string.replace(_hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); +} + +module.exports = camelize; + +/***/ }), +/* 379 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var CSSProperty = __webpack_require__(232); +var warning = __webpack_require__(11); + +var isUnitlessNumber = CSSProperty.isUnitlessNumber; +var styleWarnings = {}; + +/** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @param {ReactDOMComponent} component + * @return {string} Normalized style value with dimensions applied. + */ +function dangerousStyleValue(name, value, component) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + if (isEmpty) { + return ''; + } + + var isNonNumeric = isNaN(value); + if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { + return '' + value; // cast to string + } + + if (typeof value === 'string') { + if (false) { + // Allow '0' to pass through without warning. 0 is already special and + // doesn't require units, so we don't need to warn about it. + if (component && value !== '0') { + var owner = component._currentElement._owner; + var ownerName = owner ? owner.getName() : null; + if (ownerName && !styleWarnings[ownerName]) { + styleWarnings[ownerName] = {}; + } + var warned = false; + if (ownerName) { + var warnings = styleWarnings[ownerName]; + warned = warnings[name]; + if (!warned) { + warnings[name] = true; + } + } + if (!warned) { + process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0; + } + } + } + value = value.trim(); + } + return value + 'px'; +} + +module.exports = dangerousStyleValue; + +/***/ }), +/* 380 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + + +var hyphenate = __webpack_require__(381); + +var msPattern = /^ms-/; + +/** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + * + * @param {string} string + * @return {string} + */ +function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, '-ms-'); +} + +module.exports = hyphenateStyleName; + +/***/ }), +/* 381 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var _uppercasePattern = /([A-Z])/g; + +/** + * Hyphenates a camelcased string, for example: + * + * > hyphenate('backgroundColor') + * < "background-color" + * + * For CSS style names, use `hyphenateStyleName` instead which works properly + * with all vendor prefixes, including `ms`. + * + * @param {string} string + * @return {string} + */ +function hyphenate(string) { + return string.replace(_uppercasePattern, '-$1').toLowerCase(); +} + +module.exports = hyphenate; + +/***/ }), +/* 382 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + * @typechecks static-only + */ + + + +/** + * Memoizes the return value of a function that accepts one string argument. + */ + +function memoizeStringOnly(callback) { + var cache = {}; + return function (string) { + if (!cache.hasOwnProperty(string)) { + cache[string] = callback.call(this, string); + } + return cache[string]; + }; +} + +module.exports = memoizeStringOnly; + +/***/ }), +/* 383 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var escapeTextContentForBrowser = __webpack_require__(106); + +/** + * Escapes attribute value to prevent scripting attacks. + * + * @param {*} value Value to escape. + * @return {string} An escaped string. + */ +function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextContentForBrowser(value) + '"'; +} + +module.exports = quoteAttributeValueForBrowser; + +/***/ }), +/* 384 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPluginHub = __webpack_require__(71); + +function runEventQueueInBatch(events) { + EventPluginHub.enqueueEvents(events); + EventPluginHub.processEventQueue(false); +} + +var ReactEventEmitterMixin = { + + /** + * Streams a fired top-level event to `EventPluginHub` where plugins have the + * opportunity to create `ReactEvent`s to be dispatched. + */ + handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); + runEventQueueInBatch(events); + } +}; + +module.exports = ReactEventEmitterMixin; + +/***/ }), +/* 385 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(22); + +/** + * Generate a mapping of standard vendor prefixes using the defined style property and event name. + * + * @param {string} styleProp + * @param {string} eventName + * @returns {object} + */ +function makePrefixMap(styleProp, eventName) { + var prefixes = {}; + + prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); + prefixes['Webkit' + styleProp] = 'webkit' + eventName; + prefixes['Moz' + styleProp] = 'moz' + eventName; + prefixes['ms' + styleProp] = 'MS' + eventName; + prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); + + return prefixes; +} + +/** + * A list of event names to a configurable list of vendor prefixes. + */ +var vendorPrefixes = { + animationend: makePrefixMap('Animation', 'AnimationEnd'), + animationiteration: makePrefixMap('Animation', 'AnimationIteration'), + animationstart: makePrefixMap('Animation', 'AnimationStart'), + transitionend: makePrefixMap('Transition', 'TransitionEnd') +}; + +/** + * Event names that have already been detected and prefixed (if applicable). + */ +var prefixedEventNames = {}; + +/** + * Element to check for prefixes on. + */ +var style = {}; + +/** + * Bootstrap if a DOM exists. + */ +if (ExecutionEnvironment.canUseDOM) { + style = document.createElement('div').style; + + // On some platforms, in particular some releases of Android 4.x, + // the un-prefixed "animation" and "transition" properties are defined on the + // style object but the events that fire will still be prefixed, so we need + // to check if the un-prefixed events are usable, and if not remove them from the map. + if (!('AnimationEvent' in window)) { + delete vendorPrefixes.animationend.animation; + delete vendorPrefixes.animationiteration.animation; + delete vendorPrefixes.animationstart.animation; + } + + // Same as above + if (!('TransitionEvent' in window)) { + delete vendorPrefixes.transitionend.transition; + } +} + +/** + * Attempts to determine the correct vendor prefixed event name. + * + * @param {string} eventName + * @returns {string} + */ +function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) { + return prefixedEventNames[eventName]; + } else if (!vendorPrefixes[eventName]) { + return eventName; + } + + var prefixMap = vendorPrefixes[eventName]; + + for (var styleProp in prefixMap) { + if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { + return prefixedEventNames[eventName] = prefixMap[styleProp]; + } + } + + return ''; +} + +module.exports = getVendorPrefixedEventName; + +/***/ }), +/* 386 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); + +var DOMPropertyOperations = __webpack_require__(233); +var LinkedValueUtils = __webpack_require__(153); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactUpdates = __webpack_require__(28); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); + +var didWarnValueLink = false; +var didWarnCheckedLink = false; +var didWarnValueDefaultValue = false; +var didWarnCheckedDefaultChecked = false; +var didWarnControlledToUncontrolled = false; +var didWarnUncontrolledToControlled = false; + +function forceUpdateIfMounted() { + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMInput.updateWrapper(this); + } +} + +function isControlled(props) { + var usesChecked = props.type === 'checkbox' || props.type === 'radio'; + return usesChecked ? props.checked != null : props.value != null; +} + +/** + * Implements an <input> host component that allows setting these optional + * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. + * + * If `checked` or `value` are not supplied (or null/undefined), user actions + * that affect the checked state or value will trigger updates to the element. + * + * If they are supplied (and not null/undefined), the rendered element will not + * trigger updates to the element. Instead, the props must change in order for + * the rendered element to be updated. + * + * The rendered element will be initialized as unchecked (or `defaultChecked`) + * with an empty value (or `defaultValue`). + * + * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + */ +var ReactDOMInput = { + getHostProps: function (inst, props) { + var value = LinkedValueUtils.getValue(props); + var checked = LinkedValueUtils.getChecked(props); + + var hostProps = _assign({ + // Make sure we set .type before any other properties (setting .value + // before .type means .value is lost in IE11 and below) + type: undefined, + // Make sure we set .step before .value (setting .value before .step + // means .value is rounded on mount, based upon step precision) + step: undefined, + // Make sure we set .min & .max before .value (to ensure proper order + // in corner cases such as min or max deriving from value, e.g. Issue #7170) + min: undefined, + max: undefined + }, props, { + defaultChecked: undefined, + defaultValue: undefined, + value: value != null ? value : inst._wrapperState.initialValue, + checked: checked != null ? checked : inst._wrapperState.initialChecked, + onChange: inst._wrapperState.onChange + }); + + return hostProps; + }, + + mountWrapper: function (inst, props) { + if (false) { + LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner); + + var owner = inst._currentElement._owner; + + if (props.valueLink !== undefined && !didWarnValueLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnValueLink = true; + } + if (props.checkedLink !== undefined && !didWarnCheckedLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnCheckedLink = true; + } + if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnCheckedDefaultChecked = true; + } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnValueDefaultValue = true; + } + } + + var defaultValue = props.defaultValue; + inst._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: props.value != null ? props.value : defaultValue, + listeners: null, + onChange: _handleChange.bind(inst) + }; + + if (false) { + inst._wrapperState.controlled = isControlled(props); + } + }, + + updateWrapper: function (inst) { + var props = inst._currentElement.props; + + if (false) { + var controlled = isControlled(props); + var owner = inst._currentElement._owner; + + if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnUncontrolledToControlled = true; + } + if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnControlledToUncontrolled = true; + } + } + + // TODO: Shouldn't this be getChecked(props)? + var checked = props.checked; + if (checked != null) { + DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false); + } + + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var value = LinkedValueUtils.getValue(props); + if (value != null) { + + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = '' + value; + + // To avoid side effects (such as losing text selection), only set value if changed + if (newValue !== node.value) { + node.value = newValue; + } + } else { + if (props.value == null && props.defaultValue != null) { + // In Chrome, assigning defaultValue to certain input types triggers input validation. + // For number inputs, the display value loses trailing decimal points. For email inputs, + // Chrome raises "The specified value <x> is not a valid email address". + // + // Here we check to see if the defaultValue has actually changed, avoiding these problems + // when the user is inputting text + // + // https://github.com/facebook/react/issues/7253 + if (node.defaultValue !== '' + props.defaultValue) { + node.defaultValue = '' + props.defaultValue; + } + } + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + }, + + postMountWrapper: function (inst) { + var props = inst._currentElement.props; + + // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + + // Detach value from defaultValue. We won't do anything if we're working on + // submit or reset inputs as those values & defaultValues are linked. They + // are not resetable nodes so this operation doesn't matter and actually + // removes browser-default values (eg "Submit Query") when no value is + // provided. + + switch (props.type) { + case 'submit': + case 'reset': + break; + case 'color': + case 'date': + case 'datetime': + case 'datetime-local': + case 'month': + case 'time': + case 'week': + // This fixes the no-show issue on iOS Safari and Android Chrome: + // https://github.com/facebook/react/issues/7233 + node.value = ''; + node.value = node.defaultValue; + break; + default: + node.value = node.value; + break; + } + + // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug + // this is needed to work around a chrome bug where setting defaultChecked + // will sometimes influence the value of checked (even after detachment). + // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 + // We need to temporarily unset name to avoid disrupting radio button groups. + var name = node.name; + if (name !== '') { + node.name = ''; + } + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !node.defaultChecked; + if (name !== '') { + node.name = name; + } + } +}; + +function _handleChange(event) { + var props = this._currentElement.props; + + var returnValue = LinkedValueUtils.executeOnChange(props, event); + + // Here we use asap to wait until all updates have propagated, which + // is important when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + ReactUpdates.asap(forceUpdateIfMounted, this); + + var name = props.name; + if (props.type === 'radio' && name != null) { + var rootNode = ReactDOMComponentTree.getNodeFromInstance(this); + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } + + // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form, let's just use the global + // `querySelectorAll` to ensure we don't miss anything. + var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); + + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } + // This will throw if radio buttons rendered by different copies of React + // and the same name are rendered into the same form (same as #1939). + // That's probably okay; we don't support it just as we don't support + // mixing React radio buttons with non-React ones. + var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode); + !otherInstance ? false ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0; + // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + ReactUpdates.asap(forceUpdateIfMounted, otherInstance); + } + } + + return returnValue; +} + +module.exports = ReactDOMInput; + +/***/ }), +/* 387 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + +/***/ }), +/* 388 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var React = __webpack_require__(52); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactDOMSelect = __webpack_require__(234); + +var warning = __webpack_require__(11); +var didWarnInvalidOptionChildren = false; + +function flattenChildren(children) { + var content = ''; + + // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + if (typeof child === 'string' || typeof child === 'number') { + content += child; + } else if (!didWarnInvalidOptionChildren) { + didWarnInvalidOptionChildren = true; + false ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0; + } + }); + + return content; +} + +/** + * Implements an <option> host component that warns when `selected` is set. + */ +var ReactDOMOption = { + mountWrapper: function (inst, props, hostParent) { + // TODO (yungsters): Remove support for `selected` in <option>. + if (false) { + process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0; + } + + // Look up whether this option is 'selected' + var selectValue = null; + if (hostParent != null) { + var selectParent = hostParent; + + if (selectParent._tag === 'optgroup') { + selectParent = selectParent._hostParent; + } + + if (selectParent != null && selectParent._tag === 'select') { + selectValue = ReactDOMSelect.getSelectValueContext(selectParent); + } + } + + // If the value is null (e.g., no specified value or after initial mount) + // or missing (e.g., for <datalist>), we don't change props.selected + var selected = null; + if (selectValue != null) { + var value; + if (props.value != null) { + value = props.value + ''; + } else { + value = flattenChildren(props.children); + } + selected = false; + if (Array.isArray(selectValue)) { + // multiple + for (var i = 0; i < selectValue.length; i++) { + if ('' + selectValue[i] === value) { + selected = true; + break; + } + } + } else { + selected = '' + selectValue === value; + } + } + + inst._wrapperState = { selected: selected }; + }, + + postMountWrapper: function (inst) { + // value="" should make a value attribute (#6219) + var props = inst._currentElement.props; + if (props.value != null) { + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + node.setAttribute('value', props.value); + } + }, + + getHostProps: function (inst, props) { + var hostProps = _assign({ selected: undefined, children: undefined }, props); + + // Read state only from initial mount because <select> updates value + // manually; we need the initial state only for server rendering + if (inst._wrapperState.selected != null) { + hostProps.selected = inst._wrapperState.selected; + } + + var content = flattenChildren(props.children); + + if (content) { + hostProps.children = content; + } + + return hostProps; + } + +}; + +module.exports = ReactDOMOption; + +/***/ }), +/* 389 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); + +var LinkedValueUtils = __webpack_require__(153); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactUpdates = __webpack_require__(28); + +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); + +var didWarnValueLink = false; +var didWarnValDefaultVal = false; + +function forceUpdateIfMounted() { + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMTextarea.updateWrapper(this); + } +} + +/** + * Implements a <textarea> host component that allows setting `value`, and + * `defaultValue`. This differs from the traditional DOM API because value is + * usually set as PCDATA children. + * + * If `value` is not supplied (or null/undefined), user actions that affect the + * value will trigger updates to the element. + * + * If `value` is supplied (and not null/undefined), the rendered element will + * not trigger updates to the element. Instead, the `value` prop must change in + * order for the rendered element to be updated. + * + * The rendered element will be initialized with an empty value, the prop + * `defaultValue` if specified, or the children content (deprecated). + */ +var ReactDOMTextarea = { + getHostProps: function (inst, props) { + !(props.dangerouslySetInnerHTML == null) ? false ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0; + + // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. We could add a check in setTextContent + // to only set the value if/when the value differs from the node value (which would + // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution. + // The value can be a boolean or object so that's why it's forced to be a string. + var hostProps = _assign({}, props, { + value: undefined, + defaultValue: undefined, + children: '' + inst._wrapperState.initialValue, + onChange: inst._wrapperState.onChange + }); + + return hostProps; + }, + + mountWrapper: function (inst, props) { + if (false) { + LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner); + if (props.valueLink !== undefined && !didWarnValueLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnValueLink = true; + } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0; + didWarnValDefaultVal = true; + } + } + + var value = LinkedValueUtils.getValue(props); + var initialValue = value; + + // Only bother fetching default value if we're going to use it + if (value == null) { + var defaultValue = props.defaultValue; + // TODO (yungsters): Remove support for children content in <textarea>. + var children = props.children; + if (children != null) { + if (false) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0; + } + !(defaultValue == null) ? false ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0; + if (Array.isArray(children)) { + !(children.length <= 1) ? false ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0; + children = children[0]; + } + + defaultValue = '' + children; + } + if (defaultValue == null) { + defaultValue = ''; + } + initialValue = defaultValue; + } + + inst._wrapperState = { + initialValue: '' + initialValue, + listeners: null, + onChange: _handleChange.bind(inst) + }; + }, + + updateWrapper: function (inst) { + var props = inst._currentElement.props; + + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var value = LinkedValueUtils.getValue(props); + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = '' + value; + + // To avoid side effects (such as losing text selection), only set value if changed + if (newValue !== node.value) { + node.value = newValue; + } + if (props.defaultValue == null) { + node.defaultValue = newValue; + } + } + if (props.defaultValue != null) { + node.defaultValue = props.defaultValue; + } + }, + + postMountWrapper: function (inst) { + // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var textContent = node.textContent; + + // Only set node.value if textContent is equal to the expected + // initial value. In IE10/IE11 there is a bug where the placeholder attribute + // will populate textContent as well. + // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ + if (textContent === inst._wrapperState.initialValue) { + node.value = textContent; + } + } +}; + +function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); + ReactUpdates.asap(forceUpdateIfMounted, this); + return returnValue; +} + +module.exports = ReactDOMTextarea; + +/***/ }), +/* 390 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var ReactComponentEnvironment = __webpack_require__(154); +var ReactInstanceMap = __webpack_require__(87); +var ReactInstrumentation = __webpack_require__(26); + +var ReactCurrentOwner = __webpack_require__(35); +var ReactReconciler = __webpack_require__(72); +var ReactChildReconciler = __webpack_require__(391); + +var emptyFunction = __webpack_require__(24); +var flattenChildren = __webpack_require__(396); +var invariant = __webpack_require__(9); + +/** + * Make an update for markup to be rendered and inserted at a supplied index. + * + * @param {string} markup Markup that renders into an element. + * @param {number} toIndex Destination index. + * @private + */ +function makeInsertMarkup(markup, afterNode, toIndex) { + // NOTE: Null values reduce hidden classes. + return { + type: 'INSERT_MARKUP', + content: markup, + fromIndex: null, + fromNode: null, + toIndex: toIndex, + afterNode: afterNode + }; +} + +/** + * Make an update for moving an existing element to another index. + * + * @param {number} fromIndex Source index of the existing element. + * @param {number} toIndex Destination index of the element. + * @private + */ +function makeMove(child, afterNode, toIndex) { + // NOTE: Null values reduce hidden classes. + return { + type: 'MOVE_EXISTING', + content: null, + fromIndex: child._mountIndex, + fromNode: ReactReconciler.getHostNode(child), + toIndex: toIndex, + afterNode: afterNode + }; +} + +/** + * Make an update for removing an element at an index. + * + * @param {number} fromIndex Index of the element to remove. + * @private + */ +function makeRemove(child, node) { + // NOTE: Null values reduce hidden classes. + return { + type: 'REMOVE_NODE', + content: null, + fromIndex: child._mountIndex, + fromNode: node, + toIndex: null, + afterNode: null + }; +} + +/** + * Make an update for setting the markup of a node. + * + * @param {string} markup Markup that renders into an element. + * @private + */ +function makeSetMarkup(markup) { + // NOTE: Null values reduce hidden classes. + return { + type: 'SET_MARKUP', + content: markup, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null + }; +} + +/** + * Make an update for setting the text content. + * + * @param {string} textContent Text content to set. + * @private + */ +function makeTextContent(textContent) { + // NOTE: Null values reduce hidden classes. + return { + type: 'TEXT_CONTENT', + content: textContent, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null + }; +} + +/** + * Push an update, if any, onto the queue. Creates a new queue if none is + * passed and always returns the queue. Mutative. + */ +function enqueue(queue, update) { + if (update) { + queue = queue || []; + queue.push(update); + } + return queue; +} + +/** + * Processes any enqueued updates. + * + * @private + */ +function processQueue(inst, updateQueue) { + ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue); +} + +var setChildrenForInstrumentation = emptyFunction; +if (false) { + var getDebugID = function (inst) { + if (!inst._debugID) { + // Check for ART-like instances. TODO: This is silly/gross. + var internal; + if (internal = ReactInstanceMap.get(inst)) { + inst = internal; + } + } + return inst._debugID; + }; + setChildrenForInstrumentation = function (children) { + var debugID = getDebugID(this); + // TODO: React Native empty components are also multichild. + // This means they still get into this method but don't have _debugID. + if (debugID !== 0) { + ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) { + return children[key]._debugID; + }) : []); + } + }; +} + +/** + * ReactMultiChild are capable of reconciling multiple children. + * + * @class ReactMultiChild + * @internal + */ +var ReactMultiChild = { + + /** + * Provides common functionality for components that must reconcile multiple + * children. This is used by `ReactDOMComponent` to mount, update, and + * unmount child components. + * + * @lends {ReactMultiChild.prototype} + */ + Mixin: { + + _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) { + if (false) { + var selfDebugID = getDebugID(this); + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID); + } finally { + ReactCurrentOwner.current = null; + } + } + } + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); + }, + + _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) { + var nextChildren; + var selfDebugID = 0; + if (false) { + selfDebugID = getDebugID(this); + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); + } finally { + ReactCurrentOwner.current = null; + } + ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); + return nextChildren; + } + } + nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); + ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); + return nextChildren; + }, + + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildren Nested child maps. + * @return {array} An array of mounted representations. + * @internal + */ + mountChildren: function (nestedChildren, transaction, context) { + var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context); + this._renderedChildren = children; + + var mountImages = []; + var index = 0; + for (var name in children) { + if (children.hasOwnProperty(name)) { + var child = children[name]; + var selfDebugID = 0; + if (false) { + selfDebugID = getDebugID(this); + } + var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID); + child._mountIndex = index++; + mountImages.push(mountImage); + } + } + + if (false) { + setChildrenForInstrumentation.call(this, children); + } + + return mountImages; + }, + + /** + * Replaces any rendered children with a text content string. + * + * @param {string} nextContent String of content. + * @internal + */ + updateTextContent: function (nextContent) { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren, false); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + true ? false ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; + } + } + // Set new text content. + var updates = [makeTextContent(nextContent)]; + processQueue(this, updates); + }, + + /** + * Replaces any rendered children with a markup string. + * + * @param {string} nextMarkup String of markup. + * @internal + */ + updateMarkup: function (nextMarkup) { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren, false); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + true ? false ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; + } + } + var updates = [makeSetMarkup(nextMarkup)]; + processQueue(this, updates); + }, + + /** + * Updates the rendered children with new children. + * + * @param {?object} nextNestedChildrenElements Nested child element maps. + * @param {ReactReconcileTransaction} transaction + * @internal + */ + updateChildren: function (nextNestedChildrenElements, transaction, context) { + // Hook used by React ART + this._updateChildren(nextNestedChildrenElements, transaction, context); + }, + + /** + * @param {?object} nextNestedChildrenElements Nested child element maps. + * @param {ReactReconcileTransaction} transaction + * @final + * @protected + */ + _updateChildren: function (nextNestedChildrenElements, transaction, context) { + var prevChildren = this._renderedChildren; + var removedNodes = {}; + var mountImages = []; + var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context); + if (!nextChildren && !prevChildren) { + return; + } + var updates = null; + var name; + // `nextIndex` will increment for each child in `nextChildren`, but + // `lastIndex` will be the last index visited in `prevChildren`. + var nextIndex = 0; + var lastIndex = 0; + // `nextMountIndex` will increment for each newly mounted child. + var nextMountIndex = 0; + var lastPlacedNode = null; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + var prevChild = prevChildren && prevChildren[name]; + var nextChild = nextChildren[name]; + if (prevChild === nextChild) { + updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex)); + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + prevChild._mountIndex = nextIndex; + } else { + if (prevChild) { + // Update `lastIndex` before `_mountIndex` gets unset by unmounting. + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + // The `removedNodes` loop below will actually remove the child. + } + // The child must be instantiated before it's mounted. + updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context)); + nextMountIndex++; + } + nextIndex++; + lastPlacedNode = ReactReconciler.getHostNode(nextChild); + } + // Remove children that are no longer present. + for (name in removedNodes) { + if (removedNodes.hasOwnProperty(name)) { + updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name])); + } + } + if (updates) { + processQueue(this, updates); + } + this._renderedChildren = nextChildren; + + if (false) { + setChildrenForInstrumentation.call(this, nextChildren); + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. It does not actually perform any + * backend operations. + * + * @internal + */ + unmountChildren: function (safely) { + var renderedChildren = this._renderedChildren; + ReactChildReconciler.unmountChildren(renderedChildren, safely); + this._renderedChildren = null; + }, + + /** + * Moves a child component to the supplied index. + * + * @param {ReactComponent} child Component to move. + * @param {number} toIndex Destination index of the element. + * @param {number} lastIndex Last index visited of the siblings of `child`. + * @protected + */ + moveChild: function (child, afterNode, toIndex, lastIndex) { + // If the index of `child` is less than `lastIndex`, then it needs to + // be moved. Otherwise, we do not need to move it because a child will be + // inserted or moved before `child`. + if (child._mountIndex < lastIndex) { + return makeMove(child, afterNode, toIndex); + } + }, + + /** + * Creates a child component. + * + * @param {ReactComponent} child Component to create. + * @param {string} mountImage Markup to insert. + * @protected + */ + createChild: function (child, afterNode, mountImage) { + return makeInsertMarkup(mountImage, afterNode, child._mountIndex); + }, + + /** + * Removes a child component. + * + * @param {ReactComponent} child Child to remove. + * @protected + */ + removeChild: function (child, node) { + return makeRemove(child, node); + }, + + /** + * Mounts a child with the supplied name. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to mount. + * @param {string} name Name of the child. + * @param {number} index Index at which to insert the child. + * @param {ReactReconcileTransaction} transaction + * @private + */ + _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) { + child._mountIndex = index; + return this.createChild(child, afterNode, mountImage); + }, + + /** + * Unmounts a rendered child. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to unmount. + * @private + */ + _unmountChild: function (child, node) { + var update = this.removeChild(child, node); + child._mountIndex = null; + return update; + } + + } + +}; + +module.exports = ReactMultiChild; + +/***/ }), +/* 391 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactReconciler = __webpack_require__(72); + +var instantiateReactComponent = __webpack_require__(235); +var KeyEscapeUtils = __webpack_require__(156); +var shouldUpdateReactComponent = __webpack_require__(155); +var traverseAllChildren = __webpack_require__(239); +var warning = __webpack_require__(11); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && Object({"NODE_ENV":'production'}) && 'production' === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(157); +} + +function instantiateChild(childInstances, child, name, selfDebugID) { + // We found a component instance. + var keyUnique = childInstances[name] === undefined; + if (false) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook'); + } + if (!keyUnique) { + process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; + } + } + if (child != null && keyUnique) { + childInstances[name] = instantiateReactComponent(child, true); + } +} + +/** + * ReactChildReconciler provides helpers for initializing or updating a set of + * children. Its output is suitable for passing it onto ReactMultiChild which + * does diffed reordering and insertion. + */ +var ReactChildReconciler = { + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildNodes Nested child maps. + * @return {?object} A set of child instances. + * @internal + */ + instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots + ) { + if (nestedChildNodes == null) { + return null; + } + var childInstances = {}; + + if (false) { + traverseAllChildren(nestedChildNodes, function (childInsts, child, name) { + return instantiateChild(childInsts, child, name, selfDebugID); + }, childInstances); + } else { + traverseAllChildren(nestedChildNodes, instantiateChild, childInstances); + } + return childInstances; + }, + + /** + * Updates the rendered children and returns a new set of children. + * + * @param {?object} prevChildren Previously initialized set of children. + * @param {?object} nextChildren Flat child element maps. + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @return {?object} A new set of child instances. + * @internal + */ + updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots + ) { + // We currently don't have a way to track moves here but if we use iterators + // instead of for..in we can zip the iterators and check if an item has + // moved. + // TODO: If nothing has changed, return the prevChildren object so that we + // can quickly bailout if nothing has changed. + if (!nextChildren && !prevChildren) { + return; + } + var name; + var prevChild; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + prevChild = prevChildren && prevChildren[name]; + var prevElement = prevChild && prevChild._currentElement; + var nextElement = nextChildren[name]; + if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) { + ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context); + nextChildren[name] = prevChild; + } else { + if (prevChild) { + removedNodes[name] = ReactReconciler.getHostNode(prevChild); + ReactReconciler.unmountComponent(prevChild, false); + } + // The child must be instantiated before it's mounted. + var nextChildInstance = instantiateReactComponent(nextElement, true); + nextChildren[name] = nextChildInstance; + // Creating mount image now ensures refs are resolved in right order + // (see https://github.com/facebook/react/pull/7101 for explanation). + var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID); + mountImages.push(nextChildMountImage); + } + } + // Unmount children that are no longer present. + for (name in prevChildren) { + if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { + prevChild = prevChildren[name]; + removedNodes[name] = ReactReconciler.getHostNode(prevChild); + ReactReconciler.unmountComponent(prevChild, false); + } + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. + * + * @param {?object} renderedChildren Previously initialized set of children. + * @internal + */ + unmountChildren: function (renderedChildren, safely) { + for (var name in renderedChildren) { + if (renderedChildren.hasOwnProperty(name)) { + var renderedChild = renderedChildren[name]; + ReactReconciler.unmountComponent(renderedChild, safely); + } + } + } + +}; + +module.exports = ReactChildReconciler; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(108))) + +/***/ }), +/* 392 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); + +var React = __webpack_require__(52); +var ReactComponentEnvironment = __webpack_require__(154); +var ReactCurrentOwner = __webpack_require__(35); +var ReactErrorUtils = __webpack_require__(145); +var ReactInstanceMap = __webpack_require__(87); +var ReactInstrumentation = __webpack_require__(26); +var ReactNodeTypes = __webpack_require__(236); +var ReactReconciler = __webpack_require__(72); + +if (false) { + var checkReactTypeSpec = require('./checkReactTypeSpec'); +} + +var emptyObject = __webpack_require__(101); +var invariant = __webpack_require__(9); +var shallowEqual = __webpack_require__(88); +var shouldUpdateReactComponent = __webpack_require__(155); +var warning = __webpack_require__(11); + +var CompositeTypes = { + ImpureClass: 0, + PureClass: 1, + StatelessFunctional: 2 +}; + +function StatelessComponent(Component) {} +StatelessComponent.prototype.render = function () { + var Component = ReactInstanceMap.get(this)._currentElement.type; + var element = Component(this.props, this.context, this.updater); + warnIfInvalidElement(Component, element); + return element; +}; + +function warnIfInvalidElement(Component, element) { + if (false) { + process.env.NODE_ENV !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0; + } +} + +function shouldConstruct(Component) { + return !!(Component.prototype && Component.prototype.isReactComponent); +} + +function isPureComponent(Component) { + return !!(Component.prototype && Component.prototype.isPureReactComponent); +} + +// Separated into a function to contain deoptimizations caused by try/finally. +function measureLifeCyclePerf(fn, debugID, timerType) { + if (debugID === 0) { + // Top-level wrappers (see ReactMount) and empty components (see + // ReactDOMEmptyComponent) are invisible to hooks and devtools. + // Both are implementation details that should go away in the future. + return fn(); + } + + ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType); + try { + return fn(); + } finally { + ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType); + } +} + +/** + * ------------------ The Life-Cycle of a Composite Component ------------------ + * + * - constructor: Initialization of state. The instance is now retained. + * - componentWillMount + * - render + * - [children's constructors] + * - [children's componentWillMount and render] + * - [children's componentDidMount] + * - componentDidMount + * + * Update Phases: + * - componentWillReceiveProps (only called if parent updated) + * - shouldComponentUpdate + * - componentWillUpdate + * - render + * - [children's constructors or receive props phases] + * - componentDidUpdate + * + * - componentWillUnmount + * - [children's componentWillUnmount] + * - [children destroyed] + * - (destroyed): The instance is now blank, released by React and ready for GC. + * + * ----------------------------------------------------------------------------- + */ + +/** + * An incrementing ID assigned to each component when it is mounted. This is + * used to enforce the order in which `ReactUpdates` updates dirty components. + * + * @private + */ +var nextMountID = 1; + +/** + * @lends {ReactCompositeComponent.prototype} + */ +var ReactCompositeComponent = { + + /** + * Base constructor for all composite component. + * + * @param {ReactElement} element + * @final + * @internal + */ + construct: function (element) { + this._currentElement = element; + this._rootNodeID = 0; + this._compositeType = null; + this._instance = null; + this._hostParent = null; + this._hostContainerInfo = null; + + // See ReactUpdateQueue + this._updateBatchNumber = null; + this._pendingElement = null; + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + this._renderedNodeType = null; + this._renderedComponent = null; + this._context = null; + this._mountOrder = 0; + this._topLevelWrapper = null; + + // See ReactUpdates and ReactUpdateQueue. + this._pendingCallbacks = null; + + // ComponentWillUnmount shall only be called once + this._calledComponentWillUnmount = false; + + if (false) { + this._warnedAboutRefsInRender = false; + } + }, + + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?object} hostParent + * @param {?object} hostContainerInfo + * @param {?object} context + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + var _this = this; + + this._context = context; + this._mountOrder = nextMountID++; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var publicProps = this._currentElement.props; + var publicContext = this._processContext(context); + + var Component = this._currentElement.type; + + var updateQueue = transaction.getUpdateQueue(); + + // Initialize the public class + var doConstruct = shouldConstruct(Component); + var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue); + var renderedElement; + + // Support functional components + if (!doConstruct && (inst == null || inst.render == null)) { + renderedElement = inst; + warnIfInvalidElement(Component, renderedElement); + !(inst === null || inst === false || React.isValidElement(inst)) ? false ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0; + inst = new StatelessComponent(Component); + this._compositeType = CompositeTypes.StatelessFunctional; + } else { + if (isPureComponent(Component)) { + this._compositeType = CompositeTypes.PureClass; + } else { + this._compositeType = CompositeTypes.ImpureClass; + } + } + + if (false) { + // This will throw later in _renderValidatedComponent, but add an early + // warning now to help debugging + if (inst.render == null) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0; + } + + var propsMutated = inst.props !== publicProps; + var componentName = Component.displayName || Component.name || 'Component'; + + process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName) : void 0; + } + + // These should be set up in the constructor, but as a convenience for + // simpler class abstractions, we set them up after the fact. + inst.props = publicProps; + inst.context = publicContext; + inst.refs = emptyObject; + inst.updater = updateQueue; + + this._instance = inst; + + // Store a reference from the instance back to the internal representation + ReactInstanceMap.set(inst, this); + + if (false) { + // Since plain JS classes are defined without any special initialization + // logic, we can not catch common errors early. Therefore, we have to + // catch them here, at initialization time, instead. + process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0; + } + + var initialState = inst.state; + if (initialState === undefined) { + inst.state = initialState = null; + } + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? false ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0; + + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + var markup; + if (inst.unstable_handleError) { + markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context); + } else { + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } + + if (inst.componentDidMount) { + if (false) { + transaction.getReactMountReady().enqueue(function () { + measureLifeCyclePerf(function () { + return inst.componentDidMount(); + }, _this._debugID, 'componentDidMount'); + }); + } else { + transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); + } + } + + return markup; + }, + + _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) { + if (false) { + ReactCurrentOwner.current = this; + try { + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); + } finally { + ReactCurrentOwner.current = null; + } + } else { + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); + } + }, + + _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) { + var Component = this._currentElement.type; + + if (doConstruct) { + if (false) { + return measureLifeCyclePerf(function () { + return new Component(publicProps, publicContext, updateQueue); + }, this._debugID, 'ctor'); + } else { + return new Component(publicProps, publicContext, updateQueue); + } + } + + // This can still be an instance in case of factory components + // but we'll count this as time spent rendering as the more common case. + if (false) { + return measureLifeCyclePerf(function () { + return Component(publicProps, publicContext, updateQueue); + }, this._debugID, 'render'); + } else { + return Component(publicProps, publicContext, updateQueue); + } + }, + + performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { + var markup; + var checkpoint = transaction.checkpoint(); + try { + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } catch (e) { + // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint + transaction.rollback(checkpoint); + this._instance.unstable_handleError(e); + if (this._pendingStateQueue) { + this._instance.state = this._processPendingState(this._instance.props, this._instance.context); + } + checkpoint = transaction.checkpoint(); + + this._renderedComponent.unmountComponent(true); + transaction.rollback(checkpoint); + + // Try again - we've informed the component about the error, so they can render an error message this time. + // If this throws again, the error will bubble up (and can be caught by a higher error boundary). + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } + return markup; + }, + + performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { + var inst = this._instance; + + var debugID = 0; + if (false) { + debugID = this._debugID; + } + + if (inst.componentWillMount) { + if (false) { + measureLifeCyclePerf(function () { + return inst.componentWillMount(); + }, debugID, 'componentWillMount'); + } else { + inst.componentWillMount(); + } + // When mounting, calls to `setState` by `componentWillMount` will set + // `this._pendingStateQueue` without triggering a re-render. + if (this._pendingStateQueue) { + inst.state = this._processPendingState(inst.props, inst.context); + } + } + + // If not a stateless component, we now render + if (renderedElement === undefined) { + renderedElement = this._renderValidatedComponent(); + } + + var nodeType = ReactNodeTypes.getType(renderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ + ); + this._renderedComponent = child; + + var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID); + + if (false) { + if (debugID !== 0) { + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); + } + } + + return markup; + }, + + getHostNode: function () { + return ReactReconciler.getHostNode(this._renderedComponent); + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function (safely) { + if (!this._renderedComponent) { + return; + } + + var inst = this._instance; + + if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) { + inst._calledComponentWillUnmount = true; + + if (safely) { + var name = this.getName() + '.componentWillUnmount()'; + ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst)); + } else { + if (false) { + measureLifeCyclePerf(function () { + return inst.componentWillUnmount(); + }, this._debugID, 'componentWillUnmount'); + } else { + inst.componentWillUnmount(); + } + } + } + + if (this._renderedComponent) { + ReactReconciler.unmountComponent(this._renderedComponent, safely); + this._renderedNodeType = null; + this._renderedComponent = null; + this._instance = null; + } + + // Reset pending fields + // Even if this component is scheduled for another update in ReactUpdates, + // it would still be ignored because these fields are reset. + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + this._pendingCallbacks = null; + this._pendingElement = null; + + // These fields do not really need to be reset since this object is no + // longer accessible. + this._context = null; + this._rootNodeID = 0; + this._topLevelWrapper = null; + + // Delete the reference from the instance to this internal representation + // which allow the internals to be properly cleaned up even if the user + // leaks a reference to the public instance. + ReactInstanceMap.remove(inst); + + // Some existing components rely on inst.props even after they've been + // destroyed (in event handlers). + // TODO: inst.props = null; + // TODO: inst.state = null; + // TODO: inst.context = null; + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes` + * + * @param {object} context + * @return {?object} + * @private + */ + _maskContext: function (context) { + var Component = this._currentElement.type; + var contextTypes = Component.contextTypes; + if (!contextTypes) { + return emptyObject; + } + var maskedContext = {}; + for (var contextName in contextTypes) { + maskedContext[contextName] = context[contextName]; + } + return maskedContext; + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes`, and asserts that they are valid. + * + * @param {object} context + * @return {?object} + * @private + */ + _processContext: function (context) { + var maskedContext = this._maskContext(context); + if (false) { + var Component = this._currentElement.type; + if (Component.contextTypes) { + this._checkContextTypes(Component.contextTypes, maskedContext, 'context'); + } + } + return maskedContext; + }, + + /** + * @param {object} currentContext + * @return {object} + * @private + */ + _processChildContext: function (currentContext) { + var Component = this._currentElement.type; + var inst = this._instance; + var childContext; + + if (inst.getChildContext) { + if (false) { + ReactInstrumentation.debugTool.onBeginProcessingChildContext(); + try { + childContext = inst.getChildContext(); + } finally { + ReactInstrumentation.debugTool.onEndProcessingChildContext(); + } + } else { + childContext = inst.getChildContext(); + } + } + + if (childContext) { + !(typeof Component.childContextTypes === 'object') ? false ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0; + if (false) { + this._checkContextTypes(Component.childContextTypes, childContext, 'childContext'); + } + for (var name in childContext) { + !(name in Component.childContextTypes) ? false ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0; + } + return _assign({}, currentContext, childContext); + } + return currentContext; + }, + + /** + * Assert that the context types are valid + * + * @param {object} typeSpecs Map of context field to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @private + */ + _checkContextTypes: function (typeSpecs, values, location) { + if (false) { + checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID); + } + }, + + receiveComponent: function (nextElement, transaction, nextContext) { + var prevElement = this._currentElement; + var prevContext = this._context; + + this._pendingElement = null; + + this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); + }, + + /** + * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate` + * is set, update the component. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function (transaction) { + if (this._pendingElement != null) { + ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context); + } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) { + this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context); + } else { + this._updateBatchNumber = null; + } + }, + + /** + * Perform an update to a mounted component. The componentWillReceiveProps and + * shouldComponentUpdate methods are called, then (assuming the update isn't + * skipped) the remaining update lifecycle methods are called and the DOM + * representation is updated. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevParentElement + * @param {ReactElement} nextParentElement + * @internal + * @overridable + */ + updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) { + var inst = this._instance; + !(inst != null) ? false ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0; + + var willReceive = false; + var nextContext; + + // Determine if the context has changed or not + if (this._context === nextUnmaskedContext) { + nextContext = inst.context; + } else { + nextContext = this._processContext(nextUnmaskedContext); + willReceive = true; + } + + var prevProps = prevParentElement.props; + var nextProps = nextParentElement.props; + + // Not a simple state update but a props update + if (prevParentElement !== nextParentElement) { + willReceive = true; + } + + // An update here will schedule an update but immediately set + // _pendingStateQueue which will ensure that any state updates gets + // immediately reconciled instead of waiting for the next batch. + if (willReceive && inst.componentWillReceiveProps) { + if (false) { + measureLifeCyclePerf(function () { + return inst.componentWillReceiveProps(nextProps, nextContext); + }, this._debugID, 'componentWillReceiveProps'); + } else { + inst.componentWillReceiveProps(nextProps, nextContext); + } + } + + var nextState = this._processPendingState(nextProps, nextContext); + var shouldUpdate = true; + + if (!this._pendingForceUpdate) { + if (inst.shouldComponentUpdate) { + if (false) { + shouldUpdate = measureLifeCyclePerf(function () { + return inst.shouldComponentUpdate(nextProps, nextState, nextContext); + }, this._debugID, 'shouldComponentUpdate'); + } else { + shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext); + } + } else { + if (this._compositeType === CompositeTypes.PureClass) { + shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState); + } + } + } + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0; + } + + this._updateBatchNumber = null; + if (shouldUpdate) { + this._pendingForceUpdate = false; + // Will set `this.props`, `this.state` and `this.context`. + this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext); + } else { + // If it's determined that a component should not update, we still want + // to set props and state but we shortcut the rest of the update. + this._currentElement = nextParentElement; + this._context = nextUnmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + } + }, + + _processPendingState: function (props, context) { + var inst = this._instance; + var queue = this._pendingStateQueue; + var replace = this._pendingReplaceState; + this._pendingReplaceState = false; + this._pendingStateQueue = null; + + if (!queue) { + return inst.state; + } + + if (replace && queue.length === 1) { + return queue[0]; + } + + var nextState = _assign({}, replace ? queue[0] : inst.state); + for (var i = replace ? 1 : 0; i < queue.length; i++) { + var partial = queue[i]; + _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial); + } + + return nextState; + }, + + /** + * Merges new props and state, notifies delegate methods of update and + * performs update. + * + * @param {ReactElement} nextElement Next element + * @param {object} nextProps Next public object to set as properties. + * @param {?object} nextState Next object to set as state. + * @param {?object} nextContext Next public object to set as context. + * @param {ReactReconcileTransaction} transaction + * @param {?object} unmaskedContext + * @private + */ + _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) { + var _this2 = this; + + var inst = this._instance; + + var hasComponentDidUpdate = Boolean(inst.componentDidUpdate); + var prevProps; + var prevState; + var prevContext; + if (hasComponentDidUpdate) { + prevProps = inst.props; + prevState = inst.state; + prevContext = inst.context; + } + + if (inst.componentWillUpdate) { + if (false) { + measureLifeCyclePerf(function () { + return inst.componentWillUpdate(nextProps, nextState, nextContext); + }, this._debugID, 'componentWillUpdate'); + } else { + inst.componentWillUpdate(nextProps, nextState, nextContext); + } + } + + this._currentElement = nextElement; + this._context = unmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + + this._updateRenderedComponent(transaction, unmaskedContext); + + if (hasComponentDidUpdate) { + if (false) { + transaction.getReactMountReady().enqueue(function () { + measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate'); + }); + } else { + transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); + } + } + }, + + /** + * Call the component's `render` method and update the DOM accordingly. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + _updateRenderedComponent: function (transaction, context) { + var prevComponentInstance = this._renderedComponent; + var prevRenderedElement = prevComponentInstance._currentElement; + var nextRenderedElement = this._renderValidatedComponent(); + + var debugID = 0; + if (false) { + debugID = this._debugID; + } + + if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { + ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context)); + } else { + var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance); + ReactReconciler.unmountComponent(prevComponentInstance, false); + + var nodeType = ReactNodeTypes.getType(nextRenderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ + ); + this._renderedComponent = child; + + var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID); + + if (false) { + if (debugID !== 0) { + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); + } + } + + this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance); + } + }, + + /** + * Overridden in shallow rendering. + * + * @protected + */ + _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) { + ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance); + }, + + /** + * @protected + */ + _renderValidatedComponentWithoutOwnerOrContext: function () { + var inst = this._instance; + var renderedElement; + + if (false) { + renderedElement = measureLifeCyclePerf(function () { + return inst.render(); + }, this._debugID, 'render'); + } else { + renderedElement = inst.render(); + } + + if (false) { + // We allow auto-mocks to proceed as if they're returning null. + if (renderedElement === undefined && inst.render._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + renderedElement = null; + } + } + + return renderedElement; + }, + + /** + * @private + */ + _renderValidatedComponent: function () { + var renderedElement; + if ('production' !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) { + ReactCurrentOwner.current = this; + try { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } finally { + ReactCurrentOwner.current = null; + } + } else { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } + !( + // TODO: An `isValidNode` function would probably be more appropriate + renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? false ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0; + + return renderedElement; + }, + + /** + * Lazily allocates the refs object and stores `component` as `ref`. + * + * @param {string} ref Reference name. + * @param {component} component Component to store as `ref`. + * @final + * @private + */ + attachRef: function (ref, component) { + var inst = this.getPublicInstance(); + !(inst != null) ? false ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0; + var publicComponentInstance = component.getPublicInstance(); + if (false) { + var componentName = component && component.getName ? component.getName() : 'a component'; + process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0; + } + var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs; + refs[ref] = publicComponentInstance; + }, + + /** + * Detaches a reference name. + * + * @param {string} ref Name to dereference. + * @final + * @private + */ + detachRef: function (ref) { + var refs = this.getPublicInstance().refs; + delete refs[ref]; + }, + + /** + * Get a text description of the component that can be used to identify it + * in error messages. + * @return {string} The name or null. + * @internal + */ + getName: function () { + var type = this._currentElement.type; + var constructor = this._instance && this._instance.constructor; + return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null; + }, + + /** + * Get the publicly accessible representation of this component - i.e. what + * is exposed by refs and returned by render. Can be null for stateless + * components. + * + * @return {ReactComponent} the public component instance. + * @internal + */ + getPublicInstance: function () { + var inst = this._instance; + if (this._compositeType === CompositeTypes.StatelessFunctional) { + return null; + } + return inst; + }, + + // Stub + _instantiateReactComponent: null + +}; + +module.exports = ReactCompositeComponent; + +/***/ }), +/* 393 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var nextDebugID = 1; + +function getNextDebugID() { + return nextDebugID++; +} + +module.exports = getNextDebugID; + +/***/ }), +/* 394 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +// The Symbol used to tag the ReactElement type. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. + +var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; + +module.exports = REACT_ELEMENT_TYPE; + +/***/ }), +/* 395 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/* global Symbol */ + +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + +/** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ +function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } +} + +module.exports = getIteratorFn; + +/***/ }), +/* 396 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var KeyEscapeUtils = __webpack_require__(156); +var traverseAllChildren = __webpack_require__(239); +var warning = __webpack_require__(11); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && Object({"NODE_ENV":'production'}) && 'production' === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(157); +} + +/** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + * @param {number=} selfDebugID Optional debugID of the current internal instance. + */ +function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + // We found a component instance. + if (traverseContext && typeof traverseContext === 'object') { + var result = traverseContext; + var keyUnique = result[name] === undefined; + if (false) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = require('react/lib/ReactComponentTreeHook'); + } + if (!keyUnique) { + process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; + } + } + if (keyUnique && child != null) { + result[name] = child; + } + } +} + +/** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ +function flattenChildren(children, selfDebugID) { + if (children == null) { + return children; + } + var result = {}; + + if (false) { + traverseAllChildren(children, function (traverseContext, child, name) { + return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); + }, result); + } else { + traverseAllChildren(children, flattenSingleChildIntoContext, result); + } + return result; +} + +module.exports = flattenChildren; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(108))) + +/***/ }), +/* 397 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var PooledClass = __webpack_require__(54); +var Transaction = __webpack_require__(103); +var ReactInstrumentation = __webpack_require__(26); +var ReactServerUpdateQueue = __webpack_require__(398); + +/** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ +var TRANSACTION_WRAPPERS = []; + +if (false) { + TRANSACTION_WRAPPERS.push({ + initialize: ReactInstrumentation.debugTool.onBeginFlush, + close: ReactInstrumentation.debugTool.onEndFlush + }); +} + +var noopCallbackQueue = { + enqueue: function () {} +}; + +/** + * @class ReactServerRenderingTransaction + * @param {boolean} renderToStaticMarkup + */ +function ReactServerRenderingTransaction(renderToStaticMarkup) { + this.reinitializeTransaction(); + this.renderToStaticMarkup = renderToStaticMarkup; + this.useCreateElement = false; + this.updateQueue = new ReactServerUpdateQueue(this); +} + +var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array} Empty list of operation wrap procedures. + */ + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function () { + return noopCallbackQueue; + }, + + /** + * @return {object} The queue to collect React async events. + */ + getUpdateQueue: function () { + return this.updateQueue; + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be reused. + */ + destructor: function () {}, + + checkpoint: function () {}, + + rollback: function () {} +}; + +_assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin); + +PooledClass.addPoolingTo(ReactServerRenderingTransaction); + +module.exports = ReactServerRenderingTransaction; + +/***/ }), +/* 398 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var ReactUpdateQueue = __webpack_require__(158); + +var warning = __webpack_require__(11); + +function warnNoop(publicInstance, callerName) { + if (false) { + var constructor = publicInstance.constructor; + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; + } +} + +/** + * This is the update queue used for server rendering. + * It delegates to ReactUpdateQueue while server rendering is in progress and + * switches to ReactNoopUpdateQueue after the transaction has completed. + * @class ReactServerUpdateQueue + * @param {Transaction} transaction + */ + +var ReactServerUpdateQueue = function () { + function ReactServerUpdateQueue(transaction) { + _classCallCheck(this, ReactServerUpdateQueue); + + this.transaction = transaction; + } + + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + + + ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) { + return false; + }; + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName); + } + }; + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueForceUpdate(publicInstance); + } else { + warnNoop(publicInstance, 'forceUpdate'); + } + }; + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object|function} completeState Next state. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState); + } else { + warnNoop(publicInstance, 'replaceState'); + } + }; + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object|function} partialState Next partial state to be merged with state. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueSetState(publicInstance, partialState); + } else { + warnNoop(publicInstance, 'setState'); + } + }; + + return ReactServerUpdateQueue; +}(); + +module.exports = ReactServerUpdateQueue; + +/***/ }), +/* 399 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var DOMLazyTree = __webpack_require__(74); +var ReactDOMComponentTree = __webpack_require__(14); + +var ReactDOMEmptyComponent = function (instantiate) { + // ReactCompositeComponent uses this: + this._currentElement = null; + // ReactDOMComponentTree uses these: + this._hostNode = null; + this._hostParent = null; + this._hostContainerInfo = null; + this._domID = 0; +}; +_assign(ReactDOMEmptyComponent.prototype, { + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + var domID = hostContainerInfo._idCounter++; + this._domID = domID; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var nodeValue = ' react-empty: ' + this._domID + ' '; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var node = ownerDocument.createComment(nodeValue); + ReactDOMComponentTree.precacheNode(this, node); + return DOMLazyTree(node); + } else { + if (transaction.renderToStaticMarkup) { + // Normally we'd insert a comment node, but since this is a situation + // where React won't take over (static pages), we can simply return + // nothing. + return ''; + } + return '<!--' + nodeValue + '-->'; + } + }, + receiveComponent: function () {}, + getHostNode: function () { + return ReactDOMComponentTree.getNodeFromInstance(this); + }, + unmountComponent: function () { + ReactDOMComponentTree.uncacheNode(this); + } +}); + +module.exports = ReactDOMEmptyComponent; + +/***/ }), +/* 400 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var invariant = __webpack_require__(9); + +/** + * Return the lowest common ancestor of A and B, or null if they are in + * different trees. + */ +function getLowestCommonAncestor(instA, instB) { + !('_hostNode' in instA) ? false ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; + !('_hostNode' in instB) ? false ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; + + var depthA = 0; + for (var tempA = instA; tempA; tempA = tempA._hostParent) { + depthA++; + } + var depthB = 0; + for (var tempB = instB; tempB; tempB = tempB._hostParent) { + depthB++; + } + + // If A is deeper, crawl up. + while (depthA - depthB > 0) { + instA = instA._hostParent; + depthA--; + } + + // If B is deeper, crawl up. + while (depthB - depthA > 0) { + instB = instB._hostParent; + depthB--; + } + + // Walk in lockstep until we find a match. + var depth = depthA; + while (depth--) { + if (instA === instB) { + return instA; + } + instA = instA._hostParent; + instB = instB._hostParent; + } + return null; +} + +/** + * Return if A is an ancestor of B. + */ +function isAncestor(instA, instB) { + !('_hostNode' in instA) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; + !('_hostNode' in instB) ? false ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; + + while (instB) { + if (instB === instA) { + return true; + } + instB = instB._hostParent; + } + return false; +} + +/** + * Return the parent instance of the passed-in instance. + */ +function getParentInstance(inst) { + !('_hostNode' in inst) ? false ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0; + + return inst._hostParent; +} + +/** + * Simulates the traversal of a two-phase, capture/bubble event dispatch. + */ +function traverseTwoPhase(inst, fn, arg) { + var path = []; + while (inst) { + path.push(inst); + inst = inst._hostParent; + } + var i; + for (i = path.length; i-- > 0;) { + fn(path[i], 'captured', arg); + } + for (i = 0; i < path.length; i++) { + fn(path[i], 'bubbled', arg); + } +} + +/** + * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that + * should would receive a `mouseEnter` or `mouseLeave` event. + * + * Does not invoke the callback on the nearest common ancestor because nothing + * "entered" or "left" that element. + */ +function traverseEnterLeave(from, to, fn, argFrom, argTo) { + var common = from && to ? getLowestCommonAncestor(from, to) : null; + var pathFrom = []; + while (from && from !== common) { + pathFrom.push(from); + from = from._hostParent; + } + var pathTo = []; + while (to && to !== common) { + pathTo.push(to); + to = to._hostParent; + } + var i; + for (i = 0; i < pathFrom.length; i++) { + fn(pathFrom[i], 'bubbled', argFrom); + } + for (i = pathTo.length; i-- > 0;) { + fn(pathTo[i], 'captured', argTo); + } +} + +module.exports = { + isAncestor: isAncestor, + getLowestCommonAncestor: getLowestCommonAncestor, + getParentInstance: getParentInstance, + traverseTwoPhase: traverseTwoPhase, + traverseEnterLeave: traverseEnterLeave +}; + +/***/ }), +/* 401 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12), + _assign = __webpack_require__(13); + +var DOMChildrenOperations = __webpack_require__(150); +var DOMLazyTree = __webpack_require__(74); +var ReactDOMComponentTree = __webpack_require__(14); + +var escapeTextContentForBrowser = __webpack_require__(106); +var invariant = __webpack_require__(9); +var validateDOMNesting = __webpack_require__(159); + +/** + * Text nodes violate a couple assumptions that React makes about components: + * + * - When mounting text into the DOM, adjacent text nodes are merged. + * - Text nodes cannot be assigned a React root ID. + * + * This component is used to wrap strings between comment nodes so that they + * can undergo the same reconciliation that is applied to elements. + * + * TODO: Investigate representing React components in the DOM with text nodes. + * + * @class ReactDOMTextComponent + * @extends ReactComponent + * @internal + */ +var ReactDOMTextComponent = function (text) { + // TODO: This is really a ReactText (ReactNode), not a ReactElement + this._currentElement = text; + this._stringText = '' + text; + // ReactDOMComponentTree uses these: + this._hostNode = null; + this._hostParent = null; + + // Properties + this._domID = 0; + this._mountIndex = 0; + this._closingComment = null; + this._commentNodes = null; +}; + +_assign(ReactDOMTextComponent.prototype, { + + /** + * Creates the markup for this text node. This node is not intended to have + * any features besides containing text content. + * + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {string} Markup for this text node. + * @internal + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + if (false) { + var parentInfo; + if (hostParent != null) { + parentInfo = hostParent._ancestorInfo; + } else if (hostContainerInfo != null) { + parentInfo = hostContainerInfo._ancestorInfo; + } + if (parentInfo) { + // parentInfo should always be present except for the top-level + // component when server rendering + validateDOMNesting(null, this._stringText, this, parentInfo); + } + } + + var domID = hostContainerInfo._idCounter++; + var openingValue = ' react-text: ' + domID + ' '; + var closingValue = ' /react-text '; + this._domID = domID; + this._hostParent = hostParent; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var openingComment = ownerDocument.createComment(openingValue); + var closingComment = ownerDocument.createComment(closingValue); + var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment()); + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment)); + if (this._stringText) { + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText))); + } + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment)); + ReactDOMComponentTree.precacheNode(this, openingComment); + this._closingComment = closingComment; + return lazyTree; + } else { + var escapedText = escapeTextContentForBrowser(this._stringText); + + if (transaction.renderToStaticMarkup) { + // Normally we'd wrap this between comment nodes for the reasons stated + // above, but since this is a situation where React won't take over + // (static pages), we can simply return the text as it is. + return escapedText; + } + + return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->'; + } + }, + + /** + * Updates this component by updating the text content. + * + * @param {ReactText} nextText The next text content + * @param {ReactReconcileTransaction} transaction + * @internal + */ + receiveComponent: function (nextText, transaction) { + if (nextText !== this._currentElement) { + this._currentElement = nextText; + var nextStringText = '' + nextText; + if (nextStringText !== this._stringText) { + // TODO: Save this as pending props and use performUpdateIfNecessary + // and/or updateComponent to do the actual update for consistency with + // other component types? + this._stringText = nextStringText; + var commentNodes = this.getHostNode(); + DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText); + } + } + }, + + getHostNode: function () { + var hostNode = this._commentNodes; + if (hostNode) { + return hostNode; + } + if (!this._closingComment) { + var openingComment = ReactDOMComponentTree.getNodeFromInstance(this); + var node = openingComment.nextSibling; + while (true) { + !(node != null) ? false ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0; + if (node.nodeType === 8 && node.nodeValue === ' /react-text ') { + this._closingComment = node; + break; + } + node = node.nextSibling; + } + } + hostNode = [this._hostNode, this._closingComment]; + this._commentNodes = hostNode; + return hostNode; + }, + + unmountComponent: function () { + this._closingComment = null; + this._commentNodes = null; + ReactDOMComponentTree.uncacheNode(this); + } + +}); + +module.exports = ReactDOMTextComponent; + +/***/ }), +/* 402 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var ReactUpdates = __webpack_require__(28); +var Transaction = __webpack_require__(103); + +var emptyFunction = __webpack_require__(24); + +var RESET_BATCHED_UPDATES = { + initialize: emptyFunction, + close: function () { + ReactDefaultBatchingStrategy.isBatchingUpdates = false; + } +}; + +var FLUSH_BATCHED_UPDATES = { + initialize: emptyFunction, + close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates) +}; + +var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES]; + +function ReactDefaultBatchingStrategyTransaction() { + this.reinitializeTransaction(); +} + +_assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, { + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + } +}); + +var transaction = new ReactDefaultBatchingStrategyTransaction(); + +var ReactDefaultBatchingStrategy = { + isBatchingUpdates: false, + + /** + * Call the provided function in a context within which calls to `setState` + * and friends are batched such that components aren't updated unnecessarily. + */ + batchedUpdates: function (callback, a, b, c, d, e) { + var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; + + ReactDefaultBatchingStrategy.isBatchingUpdates = true; + + // The code is written this way to avoid extra allocations + if (alreadyBatchingUpdates) { + return callback(a, b, c, d, e); + } else { + return transaction.perform(callback, null, a, b, c, d, e); + } + } +}; + +module.exports = ReactDefaultBatchingStrategy; + +/***/ }), +/* 403 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var EventListener = __webpack_require__(240); +var ExecutionEnvironment = __webpack_require__(22); +var PooledClass = __webpack_require__(54); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactUpdates = __webpack_require__(28); + +var getEventTarget = __webpack_require__(146); +var getUnboundedScrollPosition = __webpack_require__(404); + +/** + * Find the deepest React component completely containing the root of the + * passed-in instance (for use when entire React trees are nested within each + * other). If React trees are not nested, returns null. + */ +function findParent(inst) { + // TODO: It may be a good idea to cache this to prevent unnecessary DOM + // traversal, but caching is difficult to do correctly without using a + // mutation observer to listen for all DOM changes. + while (inst._hostParent) { + inst = inst._hostParent; + } + var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst); + var container = rootNode.parentNode; + return ReactDOMComponentTree.getClosestInstanceFromNode(container); +} + +// Used to store ancestor hierarchy in top level callback +function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { + this.topLevelType = topLevelType; + this.nativeEvent = nativeEvent; + this.ancestors = []; +} +_assign(TopLevelCallbackBookKeeping.prototype, { + destructor: function () { + this.topLevelType = null; + this.nativeEvent = null; + this.ancestors.length = 0; + } +}); +PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler); + +function handleTopLevelImpl(bookKeeping) { + var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent); + var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget); + + // Loop through the hierarchy, in case there's any nested components. + // It's important that we build the array of ancestors before calling any + // event handlers, because event handlers can modify the DOM, leading to + // inconsistencies with ReactMount's node cache. See #1105. + var ancestor = targetInst; + do { + bookKeeping.ancestors.push(ancestor); + ancestor = ancestor && findParent(ancestor); + } while (ancestor); + + for (var i = 0; i < bookKeeping.ancestors.length; i++) { + targetInst = bookKeeping.ancestors[i]; + ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); + } +} + +function scrollValueMonitor(cb) { + var scrollPosition = getUnboundedScrollPosition(window); + cb(scrollPosition); +} + +var ReactEventListener = { + _enabled: true, + _handleTopLevel: null, + + WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, + + setHandleTopLevel: function (handleTopLevel) { + ReactEventListener._handleTopLevel = handleTopLevel; + }, + + setEnabled: function (enabled) { + ReactEventListener._enabled = !!enabled; + }, + + isEnabled: function () { + return ReactEventListener._enabled; + }, + + /** + * Traps top-level events by using event bubbling. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} element Element on which to attach listener. + * @return {?object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapBubbledEvent: function (topLevelType, handlerBaseName, element) { + if (!element) { + return null; + } + return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); + }, + + /** + * Traps a top-level event by using event capturing. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} element Element on which to attach listener. + * @return {?object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapCapturedEvent: function (topLevelType, handlerBaseName, element) { + if (!element) { + return null; + } + return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); + }, + + monitorScrollValue: function (refresh) { + var callback = scrollValueMonitor.bind(null, refresh); + EventListener.listen(window, 'scroll', callback); + }, + + dispatchEvent: function (topLevelType, nativeEvent) { + if (!ReactEventListener._enabled) { + return; + } + + var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent); + try { + // Event queue being processed in the same cycle allows + // `preventDefault`. + ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping); + } finally { + TopLevelCallbackBookKeeping.release(bookKeeping); + } + } +}; + +module.exports = ReactEventListener; + +/***/ }), +/* 404 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + + +/** + * Gets the scroll position of the supplied element or window. + * + * The return values are unbounded, unlike `getScrollPosition`. This means they + * may be negative or exceed the element boundaries (which is possible using + * inertial scrolling). + * + * @param {DOMWindow|DOMElement} scrollable + * @return {object} Map with `x` and `y` keys. + */ + +function getUnboundedScrollPosition(scrollable) { + if (scrollable.Window && scrollable instanceof scrollable.Window) { + return { + x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft, + y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop + }; + } + return { + x: scrollable.scrollLeft, + y: scrollable.scrollTop + }; +} + +module.exports = getUnboundedScrollPosition; + +/***/ }), +/* 405 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMProperty = __webpack_require__(69); +var EventPluginHub = __webpack_require__(71); +var EventPluginUtils = __webpack_require__(102); +var ReactComponentEnvironment = __webpack_require__(154); +var ReactEmptyComponent = __webpack_require__(237); +var ReactBrowserEventEmitter = __webpack_require__(107); +var ReactHostComponent = __webpack_require__(238); +var ReactUpdates = __webpack_require__(28); + +var ReactInjection = { + Component: ReactComponentEnvironment.injection, + DOMProperty: DOMProperty.injection, + EmptyComponent: ReactEmptyComponent.injection, + EventPluginHub: EventPluginHub.injection, + EventPluginUtils: EventPluginUtils.injection, + EventEmitter: ReactBrowserEventEmitter.injection, + HostComponent: ReactHostComponent.injection, + Updates: ReactUpdates.injection +}; + +module.exports = ReactInjection; + +/***/ }), +/* 406 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +var CallbackQueue = __webpack_require__(227); +var PooledClass = __webpack_require__(54); +var ReactBrowserEventEmitter = __webpack_require__(107); +var ReactInputSelection = __webpack_require__(241); +var ReactInstrumentation = __webpack_require__(26); +var Transaction = __webpack_require__(103); +var ReactUpdateQueue = __webpack_require__(158); + +/** + * Ensures that, when possible, the selection range (currently selected text + * input) is not disturbed by performing the transaction. + */ +var SELECTION_RESTORATION = { + /** + * @return {Selection} Selection information. + */ + initialize: ReactInputSelection.getSelectionInformation, + /** + * @param {Selection} sel Selection information returned from `initialize`. + */ + close: ReactInputSelection.restoreSelection +}; + +/** + * Suppresses events (blur/focus) that could be inadvertently dispatched due to + * high level DOM manipulations (like temporarily removing a text input from the + * DOM). + */ +var EVENT_SUPPRESSION = { + /** + * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before + * the reconciliation. + */ + initialize: function () { + var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); + ReactBrowserEventEmitter.setEnabled(false); + return currentlyEnabled; + }, + + /** + * @param {boolean} previouslyEnabled Enabled status of + * `ReactBrowserEventEmitter` before the reconciliation occurred. `close` + * restores the previous value. + */ + close: function (previouslyEnabled) { + ReactBrowserEventEmitter.setEnabled(previouslyEnabled); + } +}; + +/** + * Provides a queue for collecting `componentDidMount` and + * `componentDidUpdate` callbacks during the transaction. + */ +var ON_DOM_READY_QUEUEING = { + /** + * Initializes the internal `onDOMReady` queue. + */ + initialize: function () { + this.reactMountReady.reset(); + }, + + /** + * After DOM is flushed, invoke all registered `onDOMReady` callbacks. + */ + close: function () { + this.reactMountReady.notifyAll(); + } +}; + +/** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ +var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING]; + +if (false) { + TRANSACTION_WRAPPERS.push({ + initialize: ReactInstrumentation.debugTool.onBeginFlush, + close: ReactInstrumentation.debugTool.onEndFlush + }); +} + +/** + * Currently: + * - The order that these are listed in the transaction is critical: + * - Suppresses events. + * - Restores selection range. + * + * Future: + * - Restore document/overflow scroll positions that were unintentionally + * modified via DOM insertions above the top viewport boundary. + * - Implement/integrate with customized constraint based layout system and keep + * track of which dimensions must be remeasured. + * + * @class ReactReconcileTransaction + */ +function ReactReconcileTransaction(useCreateElement) { + this.reinitializeTransaction(); + // Only server-side rendering really needs this option (see + // `ReactServerRendering`), but server-side uses + // `ReactServerRenderingTransaction` instead. This option is here so that it's + // accessible and defaults to false when `ReactDOMComponent` and + // `ReactDOMTextComponent` checks it in `mountComponent`.` + this.renderToStaticMarkup = false; + this.reactMountReady = CallbackQueue.getPooled(null); + this.useCreateElement = useCreateElement; +} + +var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array<object>} List of operation wrap procedures. + * TODO: convert to array<TransactionWrapper> + */ + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function () { + return this.reactMountReady; + }, + + /** + * @return {object} The queue to collect React async events. + */ + getUpdateQueue: function () { + return ReactUpdateQueue; + }, + + /** + * Save current transaction state -- if the return value from this method is + * passed to `rollback`, the transaction will be reset to that state. + */ + checkpoint: function () { + // reactMountReady is the our only stateful wrapper + return this.reactMountReady.checkpoint(); + }, + + rollback: function (checkpoint) { + this.reactMountReady.rollback(checkpoint); + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be reused. + */ + destructor: function () { + CallbackQueue.release(this.reactMountReady); + this.reactMountReady = null; + } +}; + +_assign(ReactReconcileTransaction.prototype, Transaction, Mixin); + +PooledClass.addPoolingTo(ReactReconcileTransaction); + +module.exports = ReactReconcileTransaction; + +/***/ }), +/* 407 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(22); + +var getNodeForCharacterOffset = __webpack_require__(408); +var getTextContentAccessor = __webpack_require__(226); + +/** + * While `isCollapsed` is available on the Selection object and `collapsed` + * is available on the Range object, IE11 sometimes gets them wrong. + * If the anchor/focus nodes and offsets are the same, the range is collapsed. + */ +function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { + return anchorNode === focusNode && anchorOffset === focusOffset; +} + +/** + * Get the appropriate anchor and focus node/offset pairs for IE. + * + * The catch here is that IE's selection API doesn't provide information + * about whether the selection is forward or backward, so we have to + * behave as though it's always forward. + * + * IE text differs from modern selection in that it behaves as though + * block elements end with a new line. This means character offsets will + * differ between the two APIs. + * + * @param {DOMElement} node + * @return {object} + */ +function getIEOffsets(node) { + var selection = document.selection; + var selectedRange = selection.createRange(); + var selectedLength = selectedRange.text.length; + + // Duplicate selection so we can move range without breaking user selection. + var fromStart = selectedRange.duplicate(); + fromStart.moveToElementText(node); + fromStart.setEndPoint('EndToStart', selectedRange); + + var startOffset = fromStart.text.length; + var endOffset = startOffset + selectedLength; + + return { + start: startOffset, + end: endOffset + }; +} + +/** + * @param {DOMElement} node + * @return {?object} + */ +function getModernOffsets(node) { + var selection = window.getSelection && window.getSelection(); + + if (!selection || selection.rangeCount === 0) { + return null; + } + + var anchorNode = selection.anchorNode; + var anchorOffset = selection.anchorOffset; + var focusNode = selection.focusNode; + var focusOffset = selection.focusOffset; + + var currentRange = selection.getRangeAt(0); + + // In Firefox, range.startContainer and range.endContainer can be "anonymous + // divs", e.g. the up/down buttons on an <input type="number">. Anonymous + // divs do not seem to expose properties, triggering a "Permission denied + // error" if any of its properties are accessed. The only seemingly possible + // way to avoid erroring is to access a property that typically works for + // non-anonymous divs and catch any error that may otherwise arise. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 + try { + /* eslint-disable no-unused-expressions */ + currentRange.startContainer.nodeType; + currentRange.endContainer.nodeType; + /* eslint-enable no-unused-expressions */ + } catch (e) { + return null; + } + + // If the node and offset values are the same, the selection is collapsed. + // `Selection.isCollapsed` is available natively, but IE sometimes gets + // this value wrong. + var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset); + + var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length; + + var tempRange = currentRange.cloneRange(); + tempRange.selectNodeContents(node); + tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); + + var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset); + + var start = isTempRangeCollapsed ? 0 : tempRange.toString().length; + var end = start + rangeLength; + + // Detect whether the selection is backward. + var detectionRange = document.createRange(); + detectionRange.setStart(anchorNode, anchorOffset); + detectionRange.setEnd(focusNode, focusOffset); + var isBackward = detectionRange.collapsed; + + return { + start: isBackward ? end : start, + end: isBackward ? start : end + }; +} + +/** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ +function setIEOffsets(node, offsets) { + var range = document.selection.createRange().duplicate(); + var start, end; + + if (offsets.end === undefined) { + start = offsets.start; + end = start; + } else if (offsets.start > offsets.end) { + start = offsets.end; + end = offsets.start; + } else { + start = offsets.start; + end = offsets.end; + } + + range.moveToElementText(node); + range.moveStart('character', start); + range.setEndPoint('EndToStart', range); + range.moveEnd('character', end - start); + range.select(); +} + +/** + * In modern non-IE browsers, we can support both forward and backward + * selections. + * + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programmatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. + * + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ +function setModernOffsets(node, offsets) { + if (!window.getSelection) { + return; + } + + var selection = window.getSelection(); + var length = node[getTextContentAccessor()].length; + var start = Math.min(offsets.start, length); + var end = offsets.end === undefined ? start : Math.min(offsets.end, length); + + // IE 11 uses modern selection, but doesn't support the extend method. + // Flip backward selections, so we can set with a single range. + if (!selection.extend && start > end) { + var temp = end; + end = start; + start = temp; + } + + var startMarker = getNodeForCharacterOffset(node, start); + var endMarker = getNodeForCharacterOffset(node, end); + + if (startMarker && endMarker) { + var range = document.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + + if (start > end) { + selection.addRange(range); + selection.extend(endMarker.node, endMarker.offset); + } else { + range.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range); + } + } +} + +var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window); + +var ReactDOMSelection = { + /** + * @param {DOMElement} node + */ + getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, + + /** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets +}; + +module.exports = ReactDOMSelection; + +/***/ }), +/* 408 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Given any node return the first leaf node without children. + * + * @param {DOMElement|DOMTextNode} node + * @return {DOMElement|DOMTextNode} + */ + +function getLeafNode(node) { + while (node && node.firstChild) { + node = node.firstChild; + } + return node; +} + +/** + * Get the next sibling within a container. This will walk up the + * DOM if a node's siblings have been exhausted. + * + * @param {DOMElement|DOMTextNode} node + * @return {?DOMElement|DOMTextNode} + */ +function getSiblingNode(node) { + while (node) { + if (node.nextSibling) { + return node.nextSibling; + } + node = node.parentNode; + } +} + +/** + * Get object describing the nodes which contain characters at offset. + * + * @param {DOMElement|DOMTextNode} root + * @param {number} offset + * @return {?object} + */ +function getNodeForCharacterOffset(root, offset) { + var node = getLeafNode(root); + var nodeStart = 0; + var nodeEnd = 0; + + while (node) { + if (node.nodeType === 3) { + nodeEnd = nodeStart + node.textContent.length; + + if (nodeStart <= offset && nodeEnd >= offset) { + return { + node: node, + offset: offset - nodeStart + }; + } + + nodeStart = nodeEnd; + } + + node = getLeafNode(getSiblingNode(node)); + } +} + +module.exports = getNodeForCharacterOffset; + +/***/ }), +/* 409 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + +var isTextNode = __webpack_require__(410); + +/*eslint-disable no-bitwise */ + +/** + * Checks if a given DOM node contains or is another DOM node. + */ +function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } +} + +module.exports = containsNode; + +/***/ }), +/* 410 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var isNode = __webpack_require__(411); + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM text node. + */ +function isTextNode(object) { + return isNode(object) && object.nodeType == 3; +} + +module.exports = isTextNode; + +/***/ }), +/* 411 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM node. + */ +function isNode(object) { + var doc = object ? object.ownerDocument || object : document; + var defaultView = doc.defaultView || window; + return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); +} + +module.exports = isNode; + +/***/ }), +/* 412 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var NS = { + xlink: 'http://www.w3.org/1999/xlink', + xml: 'http://www.w3.org/XML/1998/namespace' +}; + +// We use attributes for everything SVG so let's avoid some duplication and run +// code instead. +// The following are all specified in the HTML config already so we exclude here. +// - class (as className) +// - color +// - height +// - id +// - lang +// - max +// - media +// - method +// - min +// - name +// - style +// - target +// - type +// - width +var ATTRS = { + accentHeight: 'accent-height', + accumulate: 0, + additive: 0, + alignmentBaseline: 'alignment-baseline', + allowReorder: 'allowReorder', + alphabetic: 0, + amplitude: 0, + arabicForm: 'arabic-form', + ascent: 0, + attributeName: 'attributeName', + attributeType: 'attributeType', + autoReverse: 'autoReverse', + azimuth: 0, + baseFrequency: 'baseFrequency', + baseProfile: 'baseProfile', + baselineShift: 'baseline-shift', + bbox: 0, + begin: 0, + bias: 0, + by: 0, + calcMode: 'calcMode', + capHeight: 'cap-height', + clip: 0, + clipPath: 'clip-path', + clipRule: 'clip-rule', + clipPathUnits: 'clipPathUnits', + colorInterpolation: 'color-interpolation', + colorInterpolationFilters: 'color-interpolation-filters', + colorProfile: 'color-profile', + colorRendering: 'color-rendering', + contentScriptType: 'contentScriptType', + contentStyleType: 'contentStyleType', + cursor: 0, + cx: 0, + cy: 0, + d: 0, + decelerate: 0, + descent: 0, + diffuseConstant: 'diffuseConstant', + direction: 0, + display: 0, + divisor: 0, + dominantBaseline: 'dominant-baseline', + dur: 0, + dx: 0, + dy: 0, + edgeMode: 'edgeMode', + elevation: 0, + enableBackground: 'enable-background', + end: 0, + exponent: 0, + externalResourcesRequired: 'externalResourcesRequired', + fill: 0, + fillOpacity: 'fill-opacity', + fillRule: 'fill-rule', + filter: 0, + filterRes: 'filterRes', + filterUnits: 'filterUnits', + floodColor: 'flood-color', + floodOpacity: 'flood-opacity', + focusable: 0, + fontFamily: 'font-family', + fontSize: 'font-size', + fontSizeAdjust: 'font-size-adjust', + fontStretch: 'font-stretch', + fontStyle: 'font-style', + fontVariant: 'font-variant', + fontWeight: 'font-weight', + format: 0, + from: 0, + fx: 0, + fy: 0, + g1: 0, + g2: 0, + glyphName: 'glyph-name', + glyphOrientationHorizontal: 'glyph-orientation-horizontal', + glyphOrientationVertical: 'glyph-orientation-vertical', + glyphRef: 'glyphRef', + gradientTransform: 'gradientTransform', + gradientUnits: 'gradientUnits', + hanging: 0, + horizAdvX: 'horiz-adv-x', + horizOriginX: 'horiz-origin-x', + ideographic: 0, + imageRendering: 'image-rendering', + 'in': 0, + in2: 0, + intercept: 0, + k: 0, + k1: 0, + k2: 0, + k3: 0, + k4: 0, + kernelMatrix: 'kernelMatrix', + kernelUnitLength: 'kernelUnitLength', + kerning: 0, + keyPoints: 'keyPoints', + keySplines: 'keySplines', + keyTimes: 'keyTimes', + lengthAdjust: 'lengthAdjust', + letterSpacing: 'letter-spacing', + lightingColor: 'lighting-color', + limitingConeAngle: 'limitingConeAngle', + local: 0, + markerEnd: 'marker-end', + markerMid: 'marker-mid', + markerStart: 'marker-start', + markerHeight: 'markerHeight', + markerUnits: 'markerUnits', + markerWidth: 'markerWidth', + mask: 0, + maskContentUnits: 'maskContentUnits', + maskUnits: 'maskUnits', + mathematical: 0, + mode: 0, + numOctaves: 'numOctaves', + offset: 0, + opacity: 0, + operator: 0, + order: 0, + orient: 0, + orientation: 0, + origin: 0, + overflow: 0, + overlinePosition: 'overline-position', + overlineThickness: 'overline-thickness', + paintOrder: 'paint-order', + panose1: 'panose-1', + pathLength: 'pathLength', + patternContentUnits: 'patternContentUnits', + patternTransform: 'patternTransform', + patternUnits: 'patternUnits', + pointerEvents: 'pointer-events', + points: 0, + pointsAtX: 'pointsAtX', + pointsAtY: 'pointsAtY', + pointsAtZ: 'pointsAtZ', + preserveAlpha: 'preserveAlpha', + preserveAspectRatio: 'preserveAspectRatio', + primitiveUnits: 'primitiveUnits', + r: 0, + radius: 0, + refX: 'refX', + refY: 'refY', + renderingIntent: 'rendering-intent', + repeatCount: 'repeatCount', + repeatDur: 'repeatDur', + requiredExtensions: 'requiredExtensions', + requiredFeatures: 'requiredFeatures', + restart: 0, + result: 0, + rotate: 0, + rx: 0, + ry: 0, + scale: 0, + seed: 0, + shapeRendering: 'shape-rendering', + slope: 0, + spacing: 0, + specularConstant: 'specularConstant', + specularExponent: 'specularExponent', + speed: 0, + spreadMethod: 'spreadMethod', + startOffset: 'startOffset', + stdDeviation: 'stdDeviation', + stemh: 0, + stemv: 0, + stitchTiles: 'stitchTiles', + stopColor: 'stop-color', + stopOpacity: 'stop-opacity', + strikethroughPosition: 'strikethrough-position', + strikethroughThickness: 'strikethrough-thickness', + string: 0, + stroke: 0, + strokeDasharray: 'stroke-dasharray', + strokeDashoffset: 'stroke-dashoffset', + strokeLinecap: 'stroke-linecap', + strokeLinejoin: 'stroke-linejoin', + strokeMiterlimit: 'stroke-miterlimit', + strokeOpacity: 'stroke-opacity', + strokeWidth: 'stroke-width', + surfaceScale: 'surfaceScale', + systemLanguage: 'systemLanguage', + tableValues: 'tableValues', + targetX: 'targetX', + targetY: 'targetY', + textAnchor: 'text-anchor', + textDecoration: 'text-decoration', + textRendering: 'text-rendering', + textLength: 'textLength', + to: 0, + transform: 0, + u1: 0, + u2: 0, + underlinePosition: 'underline-position', + underlineThickness: 'underline-thickness', + unicode: 0, + unicodeBidi: 'unicode-bidi', + unicodeRange: 'unicode-range', + unitsPerEm: 'units-per-em', + vAlphabetic: 'v-alphabetic', + vHanging: 'v-hanging', + vIdeographic: 'v-ideographic', + vMathematical: 'v-mathematical', + values: 0, + vectorEffect: 'vector-effect', + version: 0, + vertAdvY: 'vert-adv-y', + vertOriginX: 'vert-origin-x', + vertOriginY: 'vert-origin-y', + viewBox: 'viewBox', + viewTarget: 'viewTarget', + visibility: 0, + widths: 0, + wordSpacing: 'word-spacing', + writingMode: 'writing-mode', + x: 0, + xHeight: 'x-height', + x1: 0, + x2: 0, + xChannelSelector: 'xChannelSelector', + xlinkActuate: 'xlink:actuate', + xlinkArcrole: 'xlink:arcrole', + xlinkHref: 'xlink:href', + xlinkRole: 'xlink:role', + xlinkShow: 'xlink:show', + xlinkTitle: 'xlink:title', + xlinkType: 'xlink:type', + xmlBase: 'xml:base', + xmlns: 0, + xmlnsXlink: 'xmlns:xlink', + xmlLang: 'xml:lang', + xmlSpace: 'xml:space', + y: 0, + y1: 0, + y2: 0, + yChannelSelector: 'yChannelSelector', + z: 0, + zoomAndPan: 'zoomAndPan' +}; + +var SVGDOMPropertyConfig = { + Properties: {}, + DOMAttributeNamespaces: { + xlinkActuate: NS.xlink, + xlinkArcrole: NS.xlink, + xlinkHref: NS.xlink, + xlinkRole: NS.xlink, + xlinkShow: NS.xlink, + xlinkTitle: NS.xlink, + xlinkType: NS.xlink, + xmlBase: NS.xml, + xmlLang: NS.xml, + xmlSpace: NS.xml + }, + DOMAttributeNames: {} +}; + +Object.keys(ATTRS).forEach(function (key) { + SVGDOMPropertyConfig.Properties[key] = 0; + if (ATTRS[key]) { + SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key]; + } +}); + +module.exports = SVGDOMPropertyConfig; + +/***/ }), +/* 413 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPropagators = __webpack_require__(70); +var ExecutionEnvironment = __webpack_require__(22); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactInputSelection = __webpack_require__(241); +var SyntheticEvent = __webpack_require__(36); + +var getActiveElement = __webpack_require__(242); +var isTextInputElement = __webpack_require__(229); +var shallowEqual = __webpack_require__(88); + +var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; + +var eventTypes = { + select: { + phasedRegistrationNames: { + bubbled: 'onSelect', + captured: 'onSelectCapture' + }, + dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange'] + } +}; + +var activeElement = null; +var activeElementInst = null; +var lastSelection = null; +var mouseDown = false; + +// Track whether a listener exists for this plugin. If none exist, we do +// not extract events. See #3639. +var hasListener = false; + +/** + * Get an object which is a unique representation of the current selection. + * + * The return value will not be consistent across nodes or browsers, but + * two identical selections on the same node will return identical objects. + * + * @param {DOMElement} node + * @return {object} + */ +function getSelection(node) { + if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) { + return { + start: node.selectionStart, + end: node.selectionEnd + }; + } else if (window.getSelection) { + var selection = window.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset + }; + } else if (document.selection) { + var range = document.selection.createRange(); + return { + parentElement: range.parentElement(), + text: range.text, + top: range.boundingTop, + left: range.boundingLeft + }; + } +} + +/** + * Poll selection to see whether it's changed. + * + * @param {object} nativeEvent + * @return {?SyntheticEvent} + */ +function constructSelectEvent(nativeEvent, nativeEventTarget) { + // Ensure we have the right element, and that the user is not dragging a + // selection (this matches native `select` event behavior). In HTML5, select + // fires only on input and textarea thus if there's no focused element we + // won't dispatch. + if (mouseDown || activeElement == null || activeElement !== getActiveElement()) { + return null; + } + + // Only fire when selection has actually changed. + var currentSelection = getSelection(activeElement); + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; + + var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget); + + syntheticEvent.type = 'select'; + syntheticEvent.target = activeElement; + + EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent); + + return syntheticEvent; + } + + return null; +} + +/** + * This plugin creates an `onSelect` event that normalizes select events + * across form elements. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - contentEditable + * + * This differs from native browser implementations in the following ways: + * - Fires on contentEditable fields as well as inputs. + * - Fires for collapsed selection. + * - Fires after user input. + */ +var SelectEventPlugin = { + + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (!hasListener) { + return null; + } + + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + + switch (topLevelType) { + // Track the input node that has focus. + case 'topFocus': + if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { + activeElement = targetNode; + activeElementInst = targetInst; + lastSelection = null; + } + break; + case 'topBlur': + activeElement = null; + activeElementInst = null; + lastSelection = null; + break; + + // Don't fire the event while the user is dragging. This matches the + // semantics of the native select event. + case 'topMouseDown': + mouseDown = true; + break; + case 'topContextMenu': + case 'topMouseUp': + mouseDown = false; + return constructSelectEvent(nativeEvent, nativeEventTarget); + + // Chrome and IE fire non-standard event when selection is changed (and + // sometimes when it hasn't). IE's event fires out of order with respect + // to key and input events on deletion, so we discard it. + // + // Firefox doesn't support selectionchange, so check selection status + // after each key entry. The selection changes after keydown and before + // keyup, but we check on keydown as well in the case of holding down a + // key, when multiple keydown events are fired but only one keyup is. + // This is also our approach for IE handling, for the reason above. + case 'topSelectionChange': + if (skipSelectionChangeEvent) { + break; + } + // falls through + case 'topKeyDown': + case 'topKeyUp': + return constructSelectEvent(nativeEvent, nativeEventTarget); + } + + return null; + }, + + didPutListener: function (inst, registrationName, listener) { + if (registrationName === 'onSelect') { + hasListener = true; + } + } +}; + +module.exports = SelectEventPlugin; + +/***/ }), +/* 414 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var EventListener = __webpack_require__(240); +var EventPropagators = __webpack_require__(70); +var ReactDOMComponentTree = __webpack_require__(14); +var SyntheticAnimationEvent = __webpack_require__(415); +var SyntheticClipboardEvent = __webpack_require__(416); +var SyntheticEvent = __webpack_require__(36); +var SyntheticFocusEvent = __webpack_require__(417); +var SyntheticKeyboardEvent = __webpack_require__(418); +var SyntheticMouseEvent = __webpack_require__(104); +var SyntheticDragEvent = __webpack_require__(420); +var SyntheticTouchEvent = __webpack_require__(421); +var SyntheticTransitionEvent = __webpack_require__(422); +var SyntheticUIEvent = __webpack_require__(73); +var SyntheticWheelEvent = __webpack_require__(423); + +var emptyFunction = __webpack_require__(24); +var getEventCharCode = __webpack_require__(160); +var invariant = __webpack_require__(9); + +/** + * Turns + * ['abort', ...] + * into + * eventTypes = { + * 'abort': { + * phasedRegistrationNames: { + * bubbled: 'onAbort', + * captured: 'onAbortCapture', + * }, + * dependencies: ['topAbort'], + * }, + * ... + * }; + * topLevelEventsToDispatchConfig = { + * 'topAbort': { sameConfig } + * }; + */ +var eventTypes = {}; +var topLevelEventsToDispatchConfig = {}; +['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) { + var capitalizedEvent = event[0].toUpperCase() + event.slice(1); + var onEvent = 'on' + capitalizedEvent; + var topEvent = 'top' + capitalizedEvent; + + var type = { + phasedRegistrationNames: { + bubbled: onEvent, + captured: onEvent + 'Capture' + }, + dependencies: [topEvent] + }; + eventTypes[event] = type; + topLevelEventsToDispatchConfig[topEvent] = type; +}); + +var onClickListeners = {}; + +function getDictionaryKey(inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 + return '.' + inst._rootNodeID; +} + +function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; +} + +var SimpleEventPlugin = { + + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + if (!dispatchConfig) { + return null; + } + var EventConstructor; + switch (topLevelType) { + case 'topAbort': + case 'topCanPlay': + case 'topCanPlayThrough': + case 'topDurationChange': + case 'topEmptied': + case 'topEncrypted': + case 'topEnded': + case 'topError': + case 'topInput': + case 'topInvalid': + case 'topLoad': + case 'topLoadedData': + case 'topLoadedMetadata': + case 'topLoadStart': + case 'topPause': + case 'topPlay': + case 'topPlaying': + case 'topProgress': + case 'topRateChange': + case 'topReset': + case 'topSeeked': + case 'topSeeking': + case 'topStalled': + case 'topSubmit': + case 'topSuspend': + case 'topTimeUpdate': + case 'topVolumeChange': + case 'topWaiting': + // HTML Events + // @see http://www.w3.org/TR/html5/index.html#events-0 + EventConstructor = SyntheticEvent; + break; + case 'topKeyPress': + // Firefox creates a keypress event for function keys too. This removes + // the unwanted keypress events. Enter is however both printable and + // non-printable. One would expect Tab to be as well (but it isn't). + if (getEventCharCode(nativeEvent) === 0) { + return null; + } + /* falls through */ + case 'topKeyDown': + case 'topKeyUp': + EventConstructor = SyntheticKeyboardEvent; + break; + case 'topBlur': + case 'topFocus': + EventConstructor = SyntheticFocusEvent; + break; + case 'topClick': + // Firefox creates a click event on right mouse clicks. This removes the + // unwanted click events. + if (nativeEvent.button === 2) { + return null; + } + /* falls through */ + case 'topDoubleClick': + case 'topMouseDown': + case 'topMouseMove': + case 'topMouseUp': + // TODO: Disabled elements should not respond to mouse events + /* falls through */ + case 'topMouseOut': + case 'topMouseOver': + case 'topContextMenu': + EventConstructor = SyntheticMouseEvent; + break; + case 'topDrag': + case 'topDragEnd': + case 'topDragEnter': + case 'topDragExit': + case 'topDragLeave': + case 'topDragOver': + case 'topDragStart': + case 'topDrop': + EventConstructor = SyntheticDragEvent; + break; + case 'topTouchCancel': + case 'topTouchEnd': + case 'topTouchMove': + case 'topTouchStart': + EventConstructor = SyntheticTouchEvent; + break; + case 'topAnimationEnd': + case 'topAnimationIteration': + case 'topAnimationStart': + EventConstructor = SyntheticAnimationEvent; + break; + case 'topTransitionEnd': + EventConstructor = SyntheticTransitionEvent; + break; + case 'topScroll': + EventConstructor = SyntheticUIEvent; + break; + case 'topWheel': + EventConstructor = SyntheticWheelEvent; + break; + case 'topCopy': + case 'topCut': + case 'topPaste': + EventConstructor = SyntheticClipboardEvent; + break; + } + !EventConstructor ? false ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0; + var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget); + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + }, + + didPutListener: function (inst, registrationName, listener) { + // Mobile Safari does not fire properly bubble click events on + // non-interactive elements, which means delegated click listeners do not + // fire. The workaround for this bug involves attaching an empty click + // listener on the target node. + // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + if (registrationName === 'onClick' && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + if (!onClickListeners[key]) { + onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction); + } + } + }, + + willDeleteListener: function (inst, registrationName) { + if (registrationName === 'onClick' && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + onClickListeners[key].remove(); + delete onClickListeners[key]; + } + } + +}; + +module.exports = SimpleEventPlugin; + +/***/ }), +/* 415 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(36); + +/** + * @interface Event + * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface + * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent + */ +var AnimationEventInterface = { + animationName: null, + elapsedTime: null, + pseudoElement: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface); + +module.exports = SyntheticAnimationEvent; + +/***/ }), +/* 416 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(36); + +/** + * @interface Event + * @see http://www.w3.org/TR/clipboard-apis/ + */ +var ClipboardEventInterface = { + clipboardData: function (event) { + return 'clipboardData' in event ? event.clipboardData : window.clipboardData; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); + +module.exports = SyntheticClipboardEvent; + +/***/ }), +/* 417 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticUIEvent = __webpack_require__(73); + +/** + * @interface FocusEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var FocusEventInterface = { + relatedTarget: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); + +module.exports = SyntheticFocusEvent; + +/***/ }), +/* 418 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticUIEvent = __webpack_require__(73); + +var getEventCharCode = __webpack_require__(160); +var getEventKey = __webpack_require__(419); +var getEventModifierState = __webpack_require__(149); + +/** + * @interface KeyboardEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var KeyboardEventInterface = { + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + // Legacy Interface + charCode: function (event) { + // `charCode` is the result of a KeyPress event and represents the value of + // the actual printable character. + + // KeyPress is deprecated, but its replacement is not yet final and not + // implemented in any major browser. Only KeyPress has charCode. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + return 0; + }, + keyCode: function (event) { + // `keyCode` is the result of a KeyDown/Up event and represents the value of + // physical keyboard key. + + // The actual meaning of the value depends on the users' keyboard layout + // which cannot be detected. Assuming that it is a US keyboard layout + // provides a surprisingly accurate mapping for US and European users. + // Due to this, it is left to the user to implement at this time. + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + }, + which: function (event) { + // `which` is an alias for either `keyCode` or `charCode` depending on the + // type of the event. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); + +module.exports = SyntheticKeyboardEvent; + +/***/ }), +/* 419 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var getEventCharCode = __webpack_require__(160); + +/** + * Normalization of deprecated HTML5 `key` values + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ +var normalizeKey = { + 'Esc': 'Escape', + 'Spacebar': ' ', + 'Left': 'ArrowLeft', + 'Up': 'ArrowUp', + 'Right': 'ArrowRight', + 'Down': 'ArrowDown', + 'Del': 'Delete', + 'Win': 'OS', + 'Menu': 'ContextMenu', + 'Apps': 'ContextMenu', + 'Scroll': 'ScrollLock', + 'MozPrintableKey': 'Unidentified' +}; + +/** + * Translation from legacy `keyCode` to HTML5 `key` + * Only special keys supported, all others depend on keyboard layout or browser + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ +var translateToKey = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6', + 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta' +}; + +/** + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `key` property. + */ +function getEventKey(nativeEvent) { + if (nativeEvent.key) { + // Normalize inconsistent values reported by browsers due to + // implementations of a working draft specification. + + // FireFox implements `key` but returns `MozPrintableKey` for all + // printable characters (normalized to `Unidentified`), ignore it. + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + if (key !== 'Unidentified') { + return key; + } + } + + // Browser does not implement `key`, polyfill as much of it as we can. + if (nativeEvent.type === 'keypress') { + var charCode = getEventCharCode(nativeEvent); + + // The enter-key is technically both printable and non-printable and can + // thus be captured by `keypress`, no other non-printable key should. + return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); + } + if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { + // While user keyboard layout determines the actual meaning of each + // `keyCode` value, almost all function keys have a universal value. + return translateToKey[nativeEvent.keyCode] || 'Unidentified'; + } + return ''; +} + +module.exports = getEventKey; + +/***/ }), +/* 420 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticMouseEvent = __webpack_require__(104); + +/** + * @interface DragEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var DragEventInterface = { + dataTransfer: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); + +module.exports = SyntheticDragEvent; + +/***/ }), +/* 421 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticUIEvent = __webpack_require__(73); + +var getEventModifierState = __webpack_require__(149); + +/** + * @interface TouchEvent + * @see http://www.w3.org/TR/touch-events/ + */ +var TouchEventInterface = { + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); + +module.exports = SyntheticTouchEvent; + +/***/ }), +/* 422 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(36); + +/** + * @interface Event + * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- + * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent + */ +var TransitionEventInterface = { + propertyName: null, + elapsedTime: null, + pseudoElement: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface); + +module.exports = SyntheticTransitionEvent; + +/***/ }), +/* 423 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticMouseEvent = __webpack_require__(104); + +/** + * @interface WheelEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var WheelEventInterface = { + deltaX: function (event) { + return 'deltaX' in event ? event.deltaX : + // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + 'wheelDeltaX' in event ? -event.wheelDeltaX : 0; + }, + deltaY: function (event) { + return 'deltaY' in event ? event.deltaY : + // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + 'wheelDeltaY' in event ? -event.wheelDeltaY : + // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + 'wheelDelta' in event ? -event.wheelDelta : 0; + }, + deltaZ: null, + + // Browsers without "deltaMode" is reporting in raw wheel delta where one + // notch on the scroll is always +/- 120, roughly equivalent to pixels. + // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or + // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. + deltaMode: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticMouseEvent} + */ +function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); + +module.exports = SyntheticWheelEvent; + +/***/ }), +/* 424 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var validateDOMNesting = __webpack_require__(159); + +var DOC_NODE_TYPE = 9; + +function ReactDOMContainerInfo(topLevelWrapper, node) { + var info = { + _topLevelWrapper: topLevelWrapper, + _idCounter: 1, + _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null, + _node: node, + _tag: node ? node.nodeName.toLowerCase() : null, + _namespaceURI: node ? node.namespaceURI : null + }; + if (false) { + info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null; + } + return info; +} + +module.exports = ReactDOMContainerInfo; + +/***/ }), +/* 425 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMFeatureFlags = { + useCreateElement: true, + useFiber: false +}; + +module.exports = ReactDOMFeatureFlags; + +/***/ }), +/* 426 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var adler32 = __webpack_require__(427); + +var TAG_END = /\/?>/; +var COMMENT_START = /^<\!\-\-/; + +var ReactMarkupChecksum = { + CHECKSUM_ATTR_NAME: 'data-react-checksum', + + /** + * @param {string} markup Markup string + * @return {string} Markup string with checksum attribute attached + */ + addChecksumToMarkup: function (markup) { + var checksum = adler32(markup); + + // Add checksum (handle both parent tags, comments and self-closing tags) + if (COMMENT_START.test(markup)) { + return markup; + } else { + return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&'); + } + }, + + /** + * @param {string} markup to use + * @param {DOMElement} element root React element + * @returns {boolean} whether or not the markup is the same + */ + canReuseMarkup: function (markup, element) { + var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + existingChecksum = existingChecksum && parseInt(existingChecksum, 10); + var markupChecksum = adler32(markup); + return markupChecksum === existingChecksum; + } +}; + +module.exports = ReactMarkupChecksum; + +/***/ }), +/* 427 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var MOD = 65521; + +// adler32 is not cryptographically strong, and is only used to sanity check that +// markup generated on the server matches the markup generated on the client. +// This implementation (a modified version of the SheetJS version) has been optimized +// for our use case, at the expense of conforming to the adler32 specification +// for non-ascii inputs. +function adler32(data) { + var a = 1; + var b = 0; + var i = 0; + var l = data.length; + var m = l & ~0x3; + while (i < m) { + var n = Math.min(i + 4096, m); + for (; i < n; i += 4) { + b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3)); + } + a %= MOD; + b %= MOD; + } + for (; i < l; i++) { + b += a += data.charCodeAt(i); + } + a %= MOD; + b %= MOD; + return a | b << 16; +} + +module.exports = adler32; + +/***/ }), +/* 428 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +module.exports = '15.4.2'; + +/***/ }), +/* 429 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(12); + +var ReactCurrentOwner = __webpack_require__(35); +var ReactDOMComponentTree = __webpack_require__(14); +var ReactInstanceMap = __webpack_require__(87); + +var getHostComponentFromComposite = __webpack_require__(244); +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); + +/** + * Returns the DOM node rendered by this element. + * + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode + * + * @param {ReactComponent|DOMElement} componentOrElement + * @return {?DOMElement} The root node of this element. + */ +function findDOMNode(componentOrElement) { + if (false) { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0; + owner._warnedAboutRefsInRender = true; + } + } + if (componentOrElement == null) { + return null; + } + if (componentOrElement.nodeType === 1) { + return componentOrElement; + } + + var inst = ReactInstanceMap.get(componentOrElement); + if (inst) { + inst = getHostComponentFromComposite(inst); + return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null; + } + + if (typeof componentOrElement.render === 'function') { + true ? false ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0; + } else { + true ? false ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0; + } +} + +module.exports = findDOMNode; + +/***/ }), +/* 430 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactMount = __webpack_require__(243); + +module.exports = ReactMount.renderSubtreeIntoContainer; + +/***/ }), +/* 431 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createTransitionManager__ = __webpack_require__(245); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__ = __webpack_require__(89); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouterContext__ = __webpack_require__(163); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouteUtils__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterUtils__ = __webpack_require__(247); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__routerWarning__ = __webpack_require__(75); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + + + + + + + +var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_1_react___default.a.PropTypes, + func = _React$PropTypes.func, + object = _React$PropTypes.object; + +/** + * A <Router> is a high-level API for automatically setting up + * a router that renders a <RouterContext> with all the props + * it needs each time the URL changes. + */ + +var Router = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({ + displayName: 'Router', + + + propTypes: { + history: object, + children: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["d" /* routes */], + routes: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["d" /* routes */], // alias for children + render: func, + createElement: func, + onError: func, + onUpdate: func, + + // PRIVATE: For client-side rehydration of server match. + matchContext: object + }, + + getDefaultProps: function getDefaultProps() { + return { + render: function render(props) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__RouterContext__["a" /* default */], props); + } + }; + }, + getInitialState: function getInitialState() { + return { + location: null, + routes: null, + params: null, + components: null + }; + }, + handleError: function handleError(error) { + if (this.props.onError) { + this.props.onError.call(this, error); + } else { + // Throw errors by default so we don't silently swallow them! + throw error; // This error probably occurred in getChildRoutes or getComponents. + } + }, + createRouterObject: function createRouterObject(state) { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.router; + } + + var history = this.props.history; + + return __WEBPACK_IMPORTED_MODULE_6__RouterUtils__["b" /* createRouterObject */](history, this.transitionManager, state); + }, + createTransitionManager: function createTransitionManager() { + var matchContext = this.props.matchContext; + + if (matchContext) { + return matchContext.transitionManager; + } + + var history = this.props.history; + var _props = this.props, + routes = _props.routes, + children = _props.children; + + + !history.getCurrentLocation ? false ? invariant(false, 'You have provided a history object created with history v4.x or v2.x ' + 'and earlier. This version of React Router is only compatible with v3 ' + 'history objects. Please change to history v3.x.') : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; + + return __WEBPACK_IMPORTED_MODULE_2__createTransitionManager__["a" /* default */](history, __WEBPACK_IMPORTED_MODULE_5__RouteUtils__["b" /* createRoutes */](routes || children)); + }, + componentWillMount: function componentWillMount() { + var _this = this; + + this.transitionManager = this.createTransitionManager(); + this.router = this.createRouterObject(this.state); + + this._unlisten = this.transitionManager.listen(function (error, state) { + if (error) { + _this.handleError(error); + } else { + // Keep the identity of this.router because of a caveat in ContextUtils: + // they only work if the object identity is preserved. + __WEBPACK_IMPORTED_MODULE_6__RouterUtils__["a" /* assignRouterState */](_this.router, state); + _this.setState(state, _this.props.onUpdate); + } + }); + }, + + + /* istanbul ignore next: sanity check */ + componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + false ? warning(nextProps.history === this.props.history, 'You cannot change <Router history>; it will be ignored') : void 0; + + false ? warning((nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), 'You cannot change <Router routes>; it will be ignored') : void 0; + }, + componentWillUnmount: function componentWillUnmount() { + if (this._unlisten) this._unlisten(); + }, + render: function render() { + var _state = this.state, + location = _state.location, + routes = _state.routes, + params = _state.params, + components = _state.components; + + var _props2 = this.props, + createElement = _props2.createElement, + render = _props2.render, + props = _objectWithoutProperties(_props2, ['createElement', 'render']); + + if (location == null) return null; // Async match + + // Only forward non-Router-specific props to routing context, as those are + // the only ones that might be custom routing context props. + Object.keys(Router.propTypes).forEach(function (propType) { + return delete props[propType]; + }); + + return render(_extends({}, props, { + router: this.router, + location: location, + routes: routes, + params: params, + components: components, + createElement: createElement + })); + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (Router); + +/***/ }), +/* 432 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(76); + + +function routeParamsChanged(route, prevState, nextState) { + if (!route.path) return false; + + var paramNames = __WEBPACK_IMPORTED_MODULE_0__PatternUtils__["b" /* getParamNames */](route.path); + + return paramNames.some(function (paramName) { + return prevState.params[paramName] !== nextState.params[paramName]; + }); +} + +/** + * Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by + * the change from prevState to nextState. We leave routes if either + * 1) they are not in the next state or 2) they are in the next state + * but their params have changed (i.e. /users/123 => /users/456). + * + * leaveRoutes are ordered starting at the leaf route of the tree + * we're leaving up to the common parent route. enterRoutes are ordered + * from the top of the tree we're entering down to the leaf route. + * + * changeRoutes are any routes that didn't leave or enter during + * the transition. + */ +function computeChangedRoutes(prevState, nextState) { + var prevRoutes = prevState && prevState.routes; + var nextRoutes = nextState.routes; + + var leaveRoutes = void 0, + changeRoutes = void 0, + enterRoutes = void 0; + if (prevRoutes) { + (function () { + var parentIsLeaving = false; + leaveRoutes = prevRoutes.filter(function (route) { + if (parentIsLeaving) { + return true; + } else { + var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); + if (isLeaving) parentIsLeaving = true; + return isLeaving; + } + }); + + // onLeave hooks start at the leaf route. + leaveRoutes.reverse(); + + enterRoutes = []; + changeRoutes = []; + + nextRoutes.forEach(function (route) { + var isNew = prevRoutes.indexOf(route) === -1; + var paramsChanged = leaveRoutes.indexOf(route) !== -1; + + if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route); + }); + })(); + } else { + leaveRoutes = []; + changeRoutes = []; + enterRoutes = nextRoutes; + } + + return { + leaveRoutes: leaveRoutes, + changeRoutes: changeRoutes, + enterRoutes: enterRoutes + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (computeChangedRoutes); + +/***/ }), +/* 433 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["b"] = runEnterHooks; +/* harmony export (immutable) */ __webpack_exports__["a"] = runChangeHooks; +/* harmony export (immutable) */ __webpack_exports__["c"] = runLeaveHooks; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(162); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + + +var PendingHooks = function PendingHooks() { + var _this = this; + + _classCallCheck(this, PendingHooks); + + this.hooks = []; + + this.add = function (hook) { + return _this.hooks.push(hook); + }; + + this.remove = function (hook) { + return _this.hooks = _this.hooks.filter(function (h) { + return h !== hook; + }); + }; + + this.has = function (hook) { + return _this.hooks.indexOf(hook) !== -1; + }; + + this.clear = function () { + return _this.hooks = []; + }; +}; + +var enterHooks = new PendingHooks(); +var changeHooks = new PendingHooks(); + +function createTransitionHook(hook, route, asyncArity, pendingHooks) { + var isSync = hook.length < asyncArity; + + var transitionHook = function transitionHook() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + hook.apply(route, args); + + if (isSync) { + var callback = args[args.length - 1]; + // Assume hook executes synchronously and + // automatically call the callback. + callback(); + } + }; + + pendingHooks.add(transitionHook); + + return transitionHook; +} + +function getEnterHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks)); + return hooks; + }, []); +} + +function getChangeHooks(routes) { + return routes.reduce(function (hooks, route) { + if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks)); + return hooks; + }, []); +} + +function runTransitionHooks(length, iter, callback) { + if (!length) { + callback(); + return; + } + + var redirectInfo = void 0; + function replace(location) { + redirectInfo = location; + } + + __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */](length, function (index, next, done) { + iter(index, replace, function (error) { + if (error || redirectInfo) { + done(error, redirectInfo); // No need to continue. + } else { + next(); + } + }); + }, callback); +} + +/** + * Runs all onEnter hooks in the given array of routes in order + * with onEnter(nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ +function runEnterHooks(routes, nextState, callback) { + enterHooks.clear(); + var hooks = getEnterHooks(routes); + return runTransitionHooks(hooks.length, function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (enterHooks.has(hooks[index])) { + next.apply(undefined, arguments); + enterHooks.remove(hooks[index]); + } + }; + hooks[index](nextState, replace, wrappedNext); + }, callback); +} + +/** + * Runs all onChange hooks in the given array of routes in order + * with onChange(prevState, nextState, replace, callback) and calls + * callback(error, redirectInfo) when finished. The first hook + * to use replace short-circuits the loop. + * + * If a hook needs to run asynchronously, it may use the callback + * function. However, doing so will cause the transition to pause, + * which could lead to a non-responsive UI if the hook is slow. + */ +function runChangeHooks(routes, state, nextState, callback) { + changeHooks.clear(); + var hooks = getChangeHooks(routes); + return runTransitionHooks(hooks.length, function (index, replace, next) { + var wrappedNext = function wrappedNext() { + if (changeHooks.has(hooks[index])) { + next.apply(undefined, arguments); + changeHooks.remove(hooks[index]); + } + }; + hooks[index](state, nextState, replace, wrappedNext); + }, callback); +} + +/** + * Runs all onLeave hooks in the given array of routes in order. + */ +function runLeaveHooks(routes, prevState) { + for (var i = 0, len = routes.length; i < len; ++i) { + if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState); + } +} + +/***/ }), +/* 434 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = isActive; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(76); +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + + + +function deepEqual(a, b) { + if (a == b) return true; + + if (a == null || b == null) return false; + + if (Array.isArray(a)) { + return Array.isArray(b) && a.length === b.length && a.every(function (item, index) { + return deepEqual(item, b[index]); + }); + } + + if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') { + for (var p in a) { + if (!Object.prototype.hasOwnProperty.call(a, p)) { + continue; + } + + if (a[p] === undefined) { + if (b[p] !== undefined) { + return false; + } + } else if (!Object.prototype.hasOwnProperty.call(b, p)) { + return false; + } else if (!deepEqual(a[p], b[p])) { + return false; + } + } + + return true; + } + + return String(a) === String(b); +} + +/** + * Returns true if the current pathname matches the supplied one, net of + * leading and trailing slash normalization. This is sufficient for an + * indexOnly route match. + */ +function pathIsActive(pathname, currentPathname) { + // Normalize leading slash for consistency. Leading slash on pathname has + // already been normalized in isActive. See caveat there. + if (currentPathname.charAt(0) !== '/') { + currentPathname = '/' + currentPathname; + } + + // Normalize the end of both path names too. Maybe `/foo/` shouldn't show + // `/foo` as active, but in this case, we would already have failed the + // match. + if (pathname.charAt(pathname.length - 1) !== '/') { + pathname += '/'; + } + if (currentPathname.charAt(currentPathname.length - 1) !== '/') { + currentPathname += '/'; + } + + return currentPathname === pathname; +} + +/** + * Returns true if the given pathname matches the active routes and params. + */ +function routeIsActive(pathname, routes, params) { + var remainingPathname = pathname, + paramNames = [], + paramValues = []; + + // for...of would work here but it's probably slower post-transpilation. + for (var i = 0, len = routes.length; i < len; ++i) { + var route = routes[i]; + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = pathname; + paramNames = []; + paramValues = []; + } + + if (remainingPathname !== null && pattern) { + var matched = __WEBPACK_IMPORTED_MODULE_0__PatternUtils__["c" /* matchPattern */](pattern, remainingPathname); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + + if (remainingPathname === '') { + // We have an exact match on the route. Just check that all the params + // match. + // FIXME: This doesn't work on repeated params. + return paramNames.every(function (paramName, index) { + return String(paramValues[index]) === String(params[paramName]); + }); + } + } + } + + return false; +} + +/** + * Returns true if all key/value pairs in the given query are + * currently active. + */ +function queryIsActive(query, activeQuery) { + if (activeQuery == null) return query == null; + + if (query == null) return true; + + return deepEqual(query, activeQuery); +} + +/** + * Returns true if a <Link> to the given pathname/query combination is + * currently active. + */ +function isActive(_ref, indexOnly, currentLocation, routes, params) { + var pathname = _ref.pathname, + query = _ref.query; + + if (currentLocation == null) return false; + + // TODO: This is a bit ugly. It keeps around support for treating pathnames + // without preceding slashes as absolute paths, but possibly also works + // around the same quirks with basenames as in matchRoutes. + if (pathname.charAt(0) !== '/') { + pathname = '/' + pathname; + } + + if (!pathIsActive(pathname, currentLocation.pathname)) { + // The path check is necessary and sufficient for indexOnly, but otherwise + // we still need to check the routes. + if (indexOnly || !routeIsActive(pathname, routes, params)) { + return false; + } + } + + return queryIsActive(query, currentLocation.query); +} + +/***/ }), +/* 435 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(162); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(246); + + + +function getComponentsForRoute(nextState, route, callback) { + if (route.component || route.components) { + callback(null, route.component || route.components); + return; + } + + var getComponent = route.getComponent || route.getComponents; + if (getComponent) { + var componentReturn = getComponent.call(route, nextState, callback); + if (__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */](componentReturn)) componentReturn.then(function (component) { + return callback(null, component); + }, callback); + } else { + callback(); + } +} + +/** + * Asynchronously fetches all components needed for the given router + * state and calls callback(error, components) when finished. + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getComponents method. + */ +function getComponents(nextState, callback) { + __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["b" /* mapAsync */](nextState.routes, function (route, index, callback) { + getComponentsForRoute(nextState, route, callback); + }, callback); +} + +/* harmony default export */ __webpack_exports__["a"] = (getComponents); + +/***/ }), +/* 436 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = matchRoutes; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(162); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(246); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(76); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(75); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(42); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + + + + + + + +function getChildRoutes(route, location, paramNames, paramValues, callback) { + if (route.childRoutes) { + return [null, route.childRoutes]; + } + if (!route.getChildRoutes) { + return []; + } + + var sync = true, + result = void 0; + + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues) + }; + + var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) { + childRoutes = !error && __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](childRoutes); + if (sync) { + result = [error, childRoutes]; + return; + } + + callback(error, childRoutes); + }); + + if (__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */](childRoutesReturn)) childRoutesReturn.then(function (childRoutes) { + return callback(null, __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](childRoutes)); + }, callback); + + sync = false; + return result; // Might be undefined. +} + +function getIndexRoute(route, location, paramNames, paramValues, callback) { + if (route.indexRoute) { + callback(null, route.indexRoute); + } else if (route.getIndexRoute) { + var partialNextState = { + location: location, + params: createParams(paramNames, paramValues) + }; + + var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) { + callback(error, !error && __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](indexRoute)[0]); + }); + + if (__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */](indexRoutesReturn)) indexRoutesReturn.then(function (indexRoute) { + return callback(null, __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](indexRoute)[0]); + }, callback); + } else if (route.childRoutes || route.getChildRoutes) { + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + return; + } + + var pathless = childRoutes.filter(function (childRoute) { + return !childRoute.path; + }); + + __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */](pathless.length, function (index, next, done) { + getIndexRoute(pathless[index], location, paramNames, paramValues, function (error, indexRoute) { + if (error || indexRoute) { + var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]); + done(error, routes); + } else { + next(); + } + }); + }, function (err, routes) { + callback(null, routes); + }); + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } +} + +function assignParams(params, paramNames, paramValues) { + return paramNames.reduce(function (params, paramName, index) { + var paramValue = paramValues && paramValues[index]; + + if (Array.isArray(params[paramName])) { + params[paramName].push(paramValue); + } else if (paramName in params) { + params[paramName] = [params[paramName], paramValue]; + } else { + params[paramName] = paramValue; + } + + return params; + }, params); +} + +function createParams(paramNames, paramValues) { + return assignParams({}, paramNames, paramValues); +} + +function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) { + var pattern = route.path || ''; + + if (pattern.charAt(0) === '/') { + remainingPathname = location.pathname; + paramNames = []; + paramValues = []; + } + + // Only try to match the path if the route actually has a pattern, and if + // we're not just searching for potential nested absolute paths. + if (remainingPathname !== null && pattern) { + try { + var matched = __WEBPACK_IMPORTED_MODULE_2__PatternUtils__["c" /* matchPattern */](pattern, remainingPathname); + if (matched) { + remainingPathname = matched.remainingPathname; + paramNames = [].concat(paramNames, matched.paramNames); + paramValues = [].concat(paramValues, matched.paramValues); + } else { + remainingPathname = null; + } + } catch (error) { + callback(error); + } + + // By assumption, pattern is non-empty here, which is the prerequisite for + // actually terminating a match. + if (remainingPathname === '') { + var _ret = function () { + var match = { + routes: [route], + params: createParams(paramNames, paramValues) + }; + + getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) { + if (error) { + callback(error); + } else { + if (Array.isArray(indexRoute)) { + var _match$routes; + + false ? warning(indexRoute.every(function (route) { + return !route.path; + }), 'Index routes should not have paths') : void 0; + (_match$routes = match.routes).push.apply(_match$routes, indexRoute); + } else if (indexRoute) { + false ? warning(!indexRoute.path, 'Index routes should not have paths') : void 0; + match.routes.push(indexRoute); + } + + callback(null, match); + } + }); + + return { + v: void 0 + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } + } + + if (remainingPathname != null || route.childRoutes) { + // Either a) this route matched at least some of the path or b) + // we don't have to load this route's children asynchronously. In + // either case continue checking for matches in the subtree. + var onChildRoutes = function onChildRoutes(error, childRoutes) { + if (error) { + callback(error); + } else if (childRoutes) { + // Check the child routes to see if any of them match. + matchRoutes(childRoutes, location, function (error, match) { + if (error) { + callback(error); + } else if (match) { + // A child route matched! Augment the match and pass it up the stack. + match.routes.unshift(route); + callback(null, match); + } else { + callback(); + } + }, remainingPathname, paramNames, paramValues); + } else { + callback(); + } + }; + + var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes); + if (result) { + onChildRoutes.apply(undefined, result); + } + } else { + callback(); + } +} + +/** + * Asynchronously matches the given location to a set of routes and calls + * callback(error, state) when finished. The state object will have the + * following properties: + * + * - routes An array of routes that matched, in hierarchical order + * - params An object of URL parameters + * + * Note: This operation may finish synchronously if no routes have an + * asynchronous getChildRoutes method. + */ +function matchRoutes(routes, location, callback, remainingPathname) { + var paramNames = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; + var paramValues = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; + + if (remainingPathname === undefined) { + // TODO: This is a little bit ugly, but it works around a quirk in history + // that strips the leading slash from pathnames when using basenames with + // trailing slashes. + if (location.pathname.charAt(0) !== '/') { + location = _extends({}, location, { + pathname: '/' + location.pathname + }); + } + remainingPathname = location.pathname; + } + + __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */](routes.length, function (index, next, done) { + matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) { + if (error || match) { + done(error, match); + } else { + next(); + } + }); + }, callback); +} + +/***/ }), +/* 437 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(76); + + +/** + * Extracts an object of params the given route cares about from + * the given params object. + */ +function getRouteParams(route, params) { + var routeParams = {}; + + if (!route.path) return routeParams; + + __WEBPACK_IMPORTED_MODULE_0__PatternUtils__["b" /* getParamNames */](route.path).forEach(function (p) { + if (Object.prototype.hasOwnProperty.call(params, p)) { + routeParams[p] = params[p]; + } + }); + + return routeParams; +} + +/* harmony default export */ __webpack_exports__["a"] = (getRouteParams); + +/***/ }), +/* 438 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(248); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + +/** + * An <IndexLink> is used to link to an <IndexRoute>. + */ +var IndexLink = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ + displayName: 'IndexLink', + render: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__Link__["a" /* default */], _extends({}, this.props, { onlyActiveOnIndex: true })); + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (IndexLink); + +/***/ }), +/* 439 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = withRouter; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(164); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(165); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + + + +function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; +} + +function withRouter(WrappedComponent, options) { + var withRef = options && options.withRef; + + var WithRouter = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({ + displayName: 'WithRouter', + + mixins: [__WEBPACK_IMPORTED_MODULE_3__ContextUtils__["b" /* ContextSubscriber */]('router')], + + contextTypes: { router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__["b" /* routerShape */] }, + propTypes: { router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__["b" /* routerShape */] }, + + getWrappedInstance: function getWrappedInstance() { + !withRef ? false ? invariant(false, 'To access the wrapped instance, you need to specify ' + '`{ withRef: true }` as the second argument of the withRouter() call.') : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0; + + return this.wrappedInstance; + }, + render: function render() { + var _this = this; + + var router = this.props.router || this.context.router; + if (!router) { + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(WrappedComponent, this.props); + } + + var params = router.params, + location = router.location, + routes = router.routes; + + var props = _extends({}, this.props, { router: router, params: params, location: location, routes: routes }); + + if (withRef) { + props.ref = function (c) { + _this.wrappedInstance = c; + }; + } + + return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(WrappedComponent, props); + } + }); + + WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')'; + WithRouter.WrappedComponent = WrappedComponent; + + return __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default.a(WithRouter, WrappedComponent); +} + +/***/ }), +/* 440 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__routerWarning__ = __webpack_require__(75); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Redirect__ = __webpack_require__(249); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(89); + + + + + + +var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes, + string = _React$PropTypes.string, + object = _React$PropTypes.object; + +/** + * An <IndexRedirect> is used to redirect from an indexRoute. + */ +/* eslint-disable react/require-render-return */ + +var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ + displayName: 'IndexRedirect', + + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = __WEBPACK_IMPORTED_MODULE_3__Redirect__["a" /* default */].createRouteFromReactElement(element); + } else { + false ? warning(false, 'An <IndexRedirect> does not make sense at the root of your route config') : void 0; + } + } + }, + + propTypes: { + to: string.isRequired, + query: object, + state: object, + onEnter: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */], + children: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */] + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true ? false ? invariant(false, '<IndexRedirect> elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_2_invariant___default.a(false) : void 0; + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (IndexRedirect); + +/***/ }), +/* 441 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__routerWarning__ = __webpack_require__(75); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(89); + + + + + + +var func = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes.func; + +/** + * An <IndexRoute> is used to specify its parent's <Route indexRoute> in + * a JSX route config. + */ +/* eslint-disable react/require-render-return */ + +var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ + displayName: 'IndexRoute', + + + statics: { + createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { + /* istanbul ignore else: sanity check */ + if (parentRoute) { + parentRoute.indexRoute = __WEBPACK_IMPORTED_MODULE_3__RouteUtils__["a" /* createRouteFromReactElement */](element); + } else { + false ? warning(false, 'An <IndexRoute> does not make sense at the root of your route config') : void 0; + } + } + }, + + propTypes: { + path: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */], + component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["a" /* component */], + components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["b" /* components */], + getComponent: func, + getComponents: func + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true ? false ? invariant(false, '<IndexRoute> elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_2_invariant___default.a(false) : void 0; + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (IndexRoute); + +/***/ }), +/* 442 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RouteUtils__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__ = __webpack_require__(89); + + + + + +var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes, + string = _React$PropTypes.string, + func = _React$PropTypes.func; + +/** + * A <Route> is used to declare which components are rendered to the + * page when the URL matches a given pattern. + * + * Routes are arranged in a nested tree structure. When a new URL is + * requested, the tree is searched depth-first to find a route whose + * path matches the URL. When one is found, all routes in the tree + * that lead to it are considered "active" and their components are + * rendered into the DOM, nested in the same order as in the tree. + */ +/* eslint-disable react/require-render-return */ + +var Route = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({ + displayName: 'Route', + + + statics: { + createRouteFromReactElement: __WEBPACK_IMPORTED_MODULE_2__RouteUtils__["a" /* createRouteFromReactElement */] + }, + + propTypes: { + path: string, + component: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["a" /* component */], + components: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["b" /* components */], + getComponent: func, + getComponents: func + }, + + /* istanbul ignore next: sanity check */ + render: function render() { + true ? false ? invariant(false, '<Route> elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(false) : void 0; + } +}); + +/* harmony default export */ __webpack_exports__["a"] = (Route); + +/***/ }), +/* 443 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(109); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(250); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(245); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(247); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + + + + + +/** + * A high-level API to be used for server-side rendering. + * + * This function matches a location to a set of routes and calls + * callback(error, redirectLocation, renderProps) when finished. + * + * Note: You probably don't want to use this in a browser unless you're using + * server-side rendering with async routes. + */ +function match(_ref, callback) { + var history = _ref.history, + routes = _ref.routes, + location = _ref.location, + options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']); + + !(history || location) ? false ? invariant(false, 'match needs a history or a location') : __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(false) : void 0; + + history = history ? history : __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__["a" /* default */](options); + var transitionManager = __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__["a" /* default */](history, __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](routes)); + + if (location) { + // Allow match({ location: '/the/path', ... }) + location = history.createLocation(location); + } else { + location = history.getCurrentLocation(); + } + + transitionManager.match(location, function (error, redirectLocation, nextState) { + var renderProps = void 0; + + if (nextState) { + var router = __WEBPACK_IMPORTED_MODULE_5__RouterUtils__["b" /* createRouterObject */](history, transitionManager, nextState); + renderProps = _extends({}, nextState, { + router: router, + matchContext: { transitionManager: transitionManager, router: router } + }); + } + + callback(error, redirectLocation && history.createLocation(redirectLocation, __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__["REPLACE"]), renderProps); + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (match); + +/***/ }), +/* 444 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strictUriEncode = __webpack_require__(445); +var objectAssign = __webpack_require__(13); + +function encoderForArrayFormat(opts) { + switch (opts.arrayFormat) { + case 'index': + return function (key, value, index) { + return value === null ? [ + encode(key, opts), + '[', + index, + ']' + ].join('') : [ + encode(key, opts), + '[', + encode(index, opts), + ']=', + encode(value, opts) + ].join(''); + }; + + case 'bracket': + return function (key, value) { + return value === null ? encode(key, opts) : [ + encode(key, opts), + '[]=', + encode(value, opts) + ].join(''); + }; + + default: + return function (key, value) { + return value === null ? encode(key, opts) : [ + encode(key, opts), + '=', + encode(value, opts) + ].join(''); + }; + } +} + +function parserForArrayFormat(opts) { + var result; + + switch (opts.arrayFormat) { + case 'index': + return function (key, value, accumulator) { + result = /\[(\d*)]$/.exec(key); + + key = key.replace(/\[\d*]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = {}; + } + + accumulator[key][result[1]] = value; + }; + + case 'bracket': + return function (key, value, accumulator) { + result = /(\[])$/.exec(key); + + key = key.replace(/\[]$/, ''); + + if (!result || accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + + default: + return function (key, value, accumulator) { + if (accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + } +} + +function encode(value, opts) { + if (opts.encode) { + return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); + } + + return value; +} + +function keysSorter(input) { + if (Array.isArray(input)) { + return input.sort(); + } else if (typeof input === 'object') { + return keysSorter(Object.keys(input)).sort(function (a, b) { + return Number(a) - Number(b); + }).map(function (key) { + return input[key]; + }); + } + + return input; +} + +exports.extract = function (str) { + return str.split('?')[1] || ''; +}; + +exports.parse = function (str, opts) { + opts = objectAssign({arrayFormat: 'none'}, opts); + + var formatter = parserForArrayFormat(opts); + + // Create an object with no prototype + // https://github.com/sindresorhus/query-string/issues/47 + var ret = Object.create(null); + + if (typeof str !== 'string') { + return ret; + } + + str = str.trim().replace(/^(\?|#|&)/, ''); + + if (!str) { + return ret; + } + + str.split('&').forEach(function (param) { + var parts = param.replace(/\+/g, ' ').split('='); + // Firefox (pre 40) decodes `%3D` to `=` + // https://github.com/sindresorhus/query-string/pull/37 + var key = parts.shift(); + var val = parts.length > 0 ? parts.join('=') : undefined; + + // missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + val = val === undefined ? null : decodeURIComponent(val); + + formatter(decodeURIComponent(key), val, ret); + }); + + return Object.keys(ret).sort().reduce(function (result, key) { + var val = ret[key]; + if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) { + // Sort object keys, not values + result[key] = keysSorter(val); + } else { + result[key] = val; + } + + return result; + }, Object.create(null)); +}; + +exports.stringify = function (obj, opts) { + var defaults = { + encode: true, + strict: true, + arrayFormat: 'none' + }; + + opts = objectAssign(defaults, opts); + + var formatter = encoderForArrayFormat(opts); + + return obj ? Object.keys(obj).sort().map(function (key) { + var val = obj[key]; + + if (val === undefined) { + return ''; + } + + if (val === null) { + return encode(key, opts); + } + + if (Array.isArray(val)) { + var result = []; + + val.slice().forEach(function (val2) { + if (val2 === undefined) { + return; + } + + result.push(formatter(key, val2, result.length)); + }); + + return result.join('&'); + } + + return encode(key, opts) + '=' + encode(val, opts); + }).filter(function (x) { + return x.length > 0; + }).join('&') : ''; +}; + + +/***/ }), +/* 445 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); +}; + + +/***/ }), +/* 446 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +var _invariant = __webpack_require__(17); + +var _invariant2 = _interopRequireDefault(_invariant); + +var _LocationUtils = __webpack_require__(77); + +var _PathUtils = __webpack_require__(43); + +var _createHistory = __webpack_require__(168); + +var _createHistory2 = _interopRequireDefault(_createHistory); + +var _Actions = __webpack_require__(109); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createStateStorage = function createStateStorage(entries) { + return entries.filter(function (entry) { + return entry.state; + }).reduce(function (memo, entry) { + memo[entry.key] = entry.state; + return memo; + }, {}); +}; + +var createMemoryHistory = function createMemoryHistory() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + if (Array.isArray(options)) { + options = { entries: options }; + } else if (typeof options === 'string') { + options = { entries: [options] }; + } + + var getCurrentLocation = function getCurrentLocation() { + var entry = entries[current]; + var path = (0, _PathUtils.createPath)(entry); + + var key = void 0, + state = void 0; + if (entry.key) { + key = entry.key; + state = readState(key); + } + + var init = (0, _PathUtils.parsePath)(path); + + return (0, _LocationUtils.createLocation)(_extends({}, init, { state: state }), undefined, key); + }; + + var canGo = function canGo(n) { + var index = current + n; + return index >= 0 && index < entries.length; + }; + + var go = function go(n) { + if (!n) return; + + if (!canGo(n)) { + false ? (0, _warning2.default)(false, 'Cannot go(%s) there is not enough history', n) : void 0; + + return; + } + + current += n; + var currentLocation = getCurrentLocation(); + + // Change action to POP + history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP })); + }; + + var pushLocation = function pushLocation(location) { + current += 1; + + if (current < entries.length) entries.splice(current); + + entries.push(location); + + saveState(location.key, location.state); + }; + + var replaceLocation = function replaceLocation(location) { + entries[current] = location; + saveState(location.key, location.state); + }; + + var history = (0, _createHistory2.default)(_extends({}, options, { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go + })); + + var _options = options; + var entries = _options.entries; + var current = _options.current; + + + if (typeof entries === 'string') { + entries = [entries]; + } else if (!Array.isArray(entries)) { + entries = ['/']; + } + + entries = entries.map(function (entry) { + return (0, _LocationUtils.createLocation)(entry); + }); + + if (current == null) { + current = entries.length - 1; + } else { + !(current >= 0 && current < entries.length) ? false ? (0, _invariant2.default)(false, 'Current index must be >= 0 and < %s, was %s', entries.length, current) : (0, _invariant2.default)(false) : void 0; + } + + var storage = createStateStorage(entries); + + var saveState = function saveState(key, state) { + return storage[key] = state; + }; + + var readState = function readState(key) { + return storage[key]; + }; + + return _extends({}, history, { + canGo: canGo + }); +}; + +exports.default = createMemoryHistory; + +/***/ }), +/* 447 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var loopAsync = exports.loopAsync = function loopAsync(turns, work, callback) { + var currentTurn = 0, + isDone = false; + var isSync = false, + hasNext = false, + doneArgs = void 0; + + var done = function done() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + isDone = true; + + if (isSync) { + // Iterate instead of recursing if possible. + doneArgs = args; + return; + } + + callback.apply(undefined, args); + }; + + var next = function next() { + if (isDone) return; + + hasNext = true; + + if (isSync) return; // Iterate instead of recursing if possible. + + isSync = true; + + while (!isDone && currentTurn < turns && hasNext) { + hasNext = false; + work(currentTurn++, next, done); + } + + isSync = false; + + if (isDone) { + // This means the loop finished synchronously. + callback.apply(undefined, doneArgs); + return; + } + + if (currentTurn >= turns && hasNext) { + isDone = true; + callback(); + } + }; + + next(); +}; + +/***/ }), +/* 448 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(163); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(75); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + +/* harmony default export */ __webpack_exports__["a"] = (function () { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + if (false) { + middlewares.forEach(function (middleware, index) { + process.env.NODE_ENV !== 'production' ? warning(middleware.renderRouterContext || middleware.renderRouteComponent, 'The middleware specified at index ' + index + ' does not appear to be ' + 'a valid React Router middleware.') : void 0; + }); + } + + var withContext = middlewares.map(function (middleware) { + return middleware.renderRouterContext; + }).filter(Boolean); + var withComponent = middlewares.map(function (middleware) { + return middleware.renderRouteComponent; + }).filter(Boolean); + + var makeCreateElement = function makeCreateElement() { + var baseCreateElement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : __WEBPACK_IMPORTED_MODULE_0_react__["createElement"]; + return function (Component, props) { + return withComponent.reduceRight(function (previous, renderRouteComponent) { + return renderRouteComponent(previous, props); + }, baseCreateElement(Component, props)); + }; + }; + + return function (renderProps) { + return withContext.reduceRight(function (previous, renderRouterContext) { + return renderRouterContext(previous, renderProps); + }, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__RouterContext__["a" /* default */], _extends({}, renderProps, { + createElement: makeCreateElement(renderProps.createElement) + }))); + }; +}); + +/***/ }), +/* 449 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = __webpack_require__(450); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(255); + + +/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a)); + +/***/ }), +/* 450 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _invariant = __webpack_require__(17); + +var _invariant2 = _interopRequireDefault(_invariant); + +var _ExecutionEnvironment = __webpack_require__(169); + +var _BrowserProtocol = __webpack_require__(170); + +var BrowserProtocol = _interopRequireWildcard(_BrowserProtocol); + +var _RefreshProtocol = __webpack_require__(451); + +var RefreshProtocol = _interopRequireWildcard(_RefreshProtocol); + +var _DOMUtils = __webpack_require__(110); + +var _createHistory = __webpack_require__(168); + +var _createHistory2 = _interopRequireDefault(_createHistory); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Creates and returns a history object that uses HTML5's history API + * (pushState, replaceState, and the popstate event) to manage history. + * This is the recommended method of managing history in browsers because + * it provides the cleanest URLs. + * + * Note: In browsers that do not support the HTML5 history API full + * page reloads will be used to preserve clean URLs. You can force this + * behavior using { forceRefresh: true } in options. + */ +var createBrowserHistory = function createBrowserHistory() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + !_ExecutionEnvironment.canUseDOM ? false ? (0, _invariant2.default)(false, 'Browser history needs a DOM') : (0, _invariant2.default)(false) : void 0; + + var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)(); + var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol; + + var getUserConfirmation = Protocol.getUserConfirmation; + var getCurrentLocation = Protocol.getCurrentLocation; + var pushLocation = Protocol.pushLocation; + var replaceLocation = Protocol.replaceLocation; + var go = Protocol.go; + + + var history = (0, _createHistory2.default)(_extends({ + getUserConfirmation: getUserConfirmation }, options, { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: go + })); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) stopListener = BrowserProtocol.startListener(history.transitionTo); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen + }); +}; + +exports.default = createBrowserHistory; + +/***/ }), +/* 451 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.replaceLocation = exports.pushLocation = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined; + +var _BrowserProtocol = __webpack_require__(170); + +Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + } +}); +Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + } +}); + +var _LocationUtils = __webpack_require__(77); + +var _PathUtils = __webpack_require__(43); + +var getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() { + return (0, _LocationUtils.createLocation)(window.location); +}; + +var pushLocation = exports.pushLocation = function pushLocation(location) { + window.location.href = (0, _PathUtils.createPath)(location); + return false; // Don't update location +}; + +var replaceLocation = exports.replaceLocation = function replaceLocation(location) { + window.location.replace((0, _PathUtils.createPath)(location)); + return false; // Don't update location +}; + +/***/ }), +/* 452 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = __webpack_require__(453); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(255); + + +/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a)); + +/***/ }), +/* 453 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +var _invariant = __webpack_require__(17); + +var _invariant2 = _interopRequireDefault(_invariant); + +var _ExecutionEnvironment = __webpack_require__(169); + +var _DOMUtils = __webpack_require__(110); + +var _HashProtocol = __webpack_require__(454); + +var HashProtocol = _interopRequireWildcard(_HashProtocol); + +var _createHistory = __webpack_require__(168); + +var _createHistory2 = _interopRequireDefault(_createHistory); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DefaultQueryKey = '_k'; + +var addLeadingSlash = function addLeadingSlash(path) { + return path.charAt(0) === '/' ? path : '/' + path; +}; + +var HashPathCoders = { + hashbang: { + encodePath: function encodePath(path) { + return path.charAt(0) === '!' ? path : '!' + path; + }, + decodePath: function decodePath(path) { + return path.charAt(0) === '!' ? path.substring(1) : path; + } + }, + noslash: { + encodePath: function encodePath(path) { + return path.charAt(0) === '/' ? path.substring(1) : path; + }, + decodePath: addLeadingSlash + }, + slash: { + encodePath: addLeadingSlash, + decodePath: addLeadingSlash + } +}; + +var createHashHistory = function createHashHistory() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + !_ExecutionEnvironment.canUseDOM ? false ? (0, _invariant2.default)(false, 'Hash history needs a DOM') : (0, _invariant2.default)(false) : void 0; + + var queryKey = options.queryKey; + var hashType = options.hashType; + + + false ? (0, _warning2.default)(queryKey !== false, 'Using { queryKey: false } no longer works. Instead, just don\'t ' + 'use location state if you don\'t want a key in your URL query string') : void 0; + + if (typeof queryKey !== 'string') queryKey = DefaultQueryKey; + + if (hashType == null) hashType = 'slash'; + + if (!(hashType in HashPathCoders)) { + false ? (0, _warning2.default)(false, 'Invalid hash type: %s', hashType) : void 0; + + hashType = 'slash'; + } + + var pathCoder = HashPathCoders[hashType]; + + var getUserConfirmation = HashProtocol.getUserConfirmation; + + + var getCurrentLocation = function getCurrentLocation() { + return HashProtocol.getCurrentLocation(pathCoder, queryKey); + }; + + var pushLocation = function pushLocation(location) { + return HashProtocol.pushLocation(location, pathCoder, queryKey); + }; + + var replaceLocation = function replaceLocation(location) { + return HashProtocol.replaceLocation(location, pathCoder, queryKey); + }; + + var history = (0, _createHistory2.default)(_extends({ + getUserConfirmation: getUserConfirmation }, options, { + getCurrentLocation: getCurrentLocation, + pushLocation: pushLocation, + replaceLocation: replaceLocation, + go: HashProtocol.go + })); + + var listenerCount = 0, + stopListener = void 0; + + var startListener = function startListener(listener, before) { + if (++listenerCount === 1) stopListener = HashProtocol.startListener(history.transitionTo, pathCoder, queryKey); + + var unlisten = before ? history.listenBefore(listener) : history.listen(listener); + + return function () { + unlisten(); + + if (--listenerCount === 0) stopListener(); + }; + }; + + var listenBefore = function listenBefore(listener) { + return startListener(listener, true); + }; + + var listen = function listen(listener) { + return startListener(listener, false); + }; + + var goIsSupportedWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)(); + + var go = function go(n) { + false ? (0, _warning2.default)(goIsSupportedWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0; + + history.go(n); + }; + + var createHref = function createHref(path) { + return '#' + pathCoder.encodePath(history.createHref(path)); + }; + + return _extends({}, history, { + listenBefore: listenBefore, + listen: listen, + go: go, + createHref: createHref + }); +}; + +exports.default = createHashHistory; + +/***/ }), +/* 454 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined; + +var _BrowserProtocol = __webpack_require__(170); + +Object.defineProperty(exports, 'getUserConfirmation', { + enumerable: true, + get: function get() { + return _BrowserProtocol.getUserConfirmation; + } +}); +Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _BrowserProtocol.go; + } +}); + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +var _LocationUtils = __webpack_require__(77); + +var _DOMUtils = __webpack_require__(110); + +var _DOMStateStorage = __webpack_require__(254); + +var _PathUtils = __webpack_require__(43); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var HashChangeEvent = 'hashchange'; + +var getHashPath = function getHashPath() { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + var href = window.location.href; + var hashIndex = href.indexOf('#'); + return hashIndex === -1 ? '' : href.substring(hashIndex + 1); +}; + +var pushHashPath = function pushHashPath(path) { + return window.location.hash = path; +}; + +var replaceHashPath = function replaceHashPath(path) { + var hashIndex = window.location.href.indexOf('#'); + + window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path); +}; + +var getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation(pathCoder, queryKey) { + var path = pathCoder.decodePath(getHashPath()); + var key = (0, _PathUtils.getQueryStringValueFromPath)(path, queryKey); + + var state = void 0; + if (key) { + path = (0, _PathUtils.stripQueryStringValueFromPath)(path, queryKey); + state = (0, _DOMStateStorage.readState)(key); + } + + var init = (0, _PathUtils.parsePath)(path); + init.state = state; + + return (0, _LocationUtils.createLocation)(init, undefined, key); +}; + +var prevLocation = void 0; + +var startListener = exports.startListener = function startListener(listener, pathCoder, queryKey) { + var handleHashChange = function handleHashChange() { + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) { + // Always be sure we have a properly-encoded hash. + replaceHashPath(encodedPath); + } else { + var currentLocation = getCurrentLocation(pathCoder, queryKey); + + if (prevLocation && currentLocation.key && prevLocation.key === currentLocation.key) return; // Ignore extraneous hashchange events + + prevLocation = currentLocation; + + listener(currentLocation); + } + }; + + // Ensure the hash is encoded properly. + var path = getHashPath(); + var encodedPath = pathCoder.encodePath(path); + + if (path !== encodedPath) replaceHashPath(encodedPath); + + (0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange); + + return function () { + return (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange); + }; +}; + +var updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) { + var state = location.state; + var key = location.key; + + + var path = pathCoder.encodePath((0, _PathUtils.createPath)(location)); + + if (state !== undefined) { + path = (0, _PathUtils.addQueryStringValueToPath)(path, queryKey, key); + (0, _DOMStateStorage.saveState)(key, state); + } + + prevLocation = location; + + updateHash(path); +}; + +var pushLocation = exports.pushLocation = function pushLocation(location, pathCoder, queryKey) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) { + pushHashPath(path); + } else { + false ? (0, _warning2.default)(false, 'You cannot PUSH the same path using hash history') : void 0; + } + }); +}; + +var replaceLocation = exports.replaceLocation = function replaceLocation(location, pathCoder, queryKey) { + return updateLocation(location, pathCoder, queryKey, function (path) { + if (getHashPath() !== path) replaceHashPath(path); + }); +}; + +/***/ }), +/* 455 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112); + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (getRawTag); + + +/***/ }), +/* 456 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (objectToString); + + +/***/ }), +/* 457 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(458); + + +/***/ }), +/* 458 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global, module) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _ponyfill = __webpack_require__(459); + +var _ponyfill2 = _interopRequireDefault(_ponyfill); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var root; /* global window */ + + +if (typeof self !== 'undefined') { + root = self; +} else if (typeof window !== 'undefined') { + root = window; +} else if (typeof global !== 'undefined') { + root = global; +} else if (true) { + root = module; +} else { + root = Function('return this')(); +} + +var result = (0, _ponyfill2['default'])(root); +exports['default'] = result; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(44), __webpack_require__(260)(module))) + +/***/ }), +/* 459 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports['default'] = symbolObservablePonyfill; +function symbolObservablePonyfill(root) { + var result; + var _Symbol = root.Symbol; + + if (typeof _Symbol === 'function') { + if (_Symbol.observable) { + result = _Symbol.observable; + } else { + result = _Symbol('observable'); + _Symbol.observable = result; + } + } else { + result = '@@observable'; + } + + return result; +}; + +/***/ }), +/* 460 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = combineReducers; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(256); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(261); + + + + +function getUndefinedStateErrorMessage(key, action) { + var actionType = action && action.type; + var actionName = actionType && '"' + actionType.toString() + '"' || 'an action'; + + return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.'; +} + +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; + } + + if (!__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */](inputState)) { + return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"'); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + + if (unexpectedKeys.length > 0) { + return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.'); + } +} + +function assertReducerSanity(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT }); + + if (typeof initialState === 'undefined') { + throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.'); + } + + var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); + if (typeof reducer(undefined, { type: type }) === 'undefined') { + throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.'); + } + }); +} + +/** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ +function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (false) { + if (typeof reducers[key] === 'undefined') { + warning('No reducer provided for key "' + key + '"'); + } + } + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + var finalReducerKeys = Object.keys(finalReducers); + + if (false) { + var unexpectedKeyCache = {}; + } + + var sanityError; + try { + assertReducerSanity(finalReducers); + } catch (e) { + sanityError = e; + } + + return function combination() { + var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var action = arguments[1]; + + if (sanityError) { + throw sanityError; + } + + if (false) { + var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); + if (warningMessage) { + warning(warningMessage); + } + } + + var hasChanged = false; + var nextState = {}; + for (var i = 0; i < finalReducerKeys.length; i++) { + var key = finalReducerKeys[i]; + var reducer = finalReducers[key]; + var previousStateForKey = state[key]; + var nextStateForKey = reducer(previousStateForKey, action); + if (typeof nextStateForKey === 'undefined') { + var errorMessage = getUndefinedStateErrorMessage(key, action); + throw new Error(errorMessage); + } + nextState[key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + return hasChanged ? nextState : state; + }; +} + +/***/ }), +/* 461 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = bindActionCreators; +function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(undefined, arguments)); + }; +} + +/** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass a single function as the first argument, + * and get a function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ +function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?'); + } + + var keys = Object.keys(actionCreators); + var boundActionCreators = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var actionCreator = actionCreators[key]; + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + return boundActionCreators; +} + +/***/ }), +/* 462 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(262); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + +/** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ +function applyMiddleware() { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function (reducer, preloadedState, enhancer) { + var store = createStore(reducer, preloadedState, enhancer); + var _dispatch = store.dispatch; + var chain = []; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch(action) { + return _dispatch(action); + } + }; + chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__["a" /* default */].apply(undefined, chain)(store.dispatch); + + return _extends({}, store, { + dispatch: _dispatch + }); + }; + }; +} + +/***/ }), +/* 463 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = undefined; + +var _react = __webpack_require__(0); + +var _storeShape = __webpack_require__(263); + +var _storeShape2 = _interopRequireDefault(_storeShape); + +var _warning = __webpack_require__(264); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var didWarnAboutReceivingStore = false; +function warnAboutReceivingStore() { + if (didWarnAboutReceivingStore) { + return; + } + didWarnAboutReceivingStore = true; + + (0, _warning2["default"])('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.'); +} + +var Provider = function (_Component) { + _inherits(Provider, _Component); + + Provider.prototype.getChildContext = function getChildContext() { + return { store: this.store }; + }; + + function Provider(props, context) { + _classCallCheck(this, Provider); + + var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); + + _this.store = props.store; + return _this; + } + + Provider.prototype.render = function render() { + return _react.Children.only(this.props.children); + }; + + return Provider; +}(_react.Component); + +exports["default"] = Provider; + + +if (false) { + Provider.prototype.componentWillReceiveProps = function (nextProps) { + var store = this.store; + var nextStore = nextProps.store; + + + if (store !== nextStore) { + warnAboutReceivingStore(); + } + }; +} + +Provider.propTypes = { + store: _storeShape2["default"].isRequired, + children: _react.PropTypes.element.isRequired +}; +Provider.childContextTypes = { + store: _storeShape2["default"].isRequired +}; + +/***/ }), +/* 464 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +exports["default"] = connect; + +var _react = __webpack_require__(0); + +var _storeShape = __webpack_require__(263); + +var _storeShape2 = _interopRequireDefault(_storeShape); + +var _shallowEqual = __webpack_require__(465); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _wrapActionCreators = __webpack_require__(466); + +var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators); + +var _warning = __webpack_require__(264); + +var _warning2 = _interopRequireDefault(_warning); + +var _isPlainObject = __webpack_require__(467); + +var _isPlainObject2 = _interopRequireDefault(_isPlainObject); + +var _hoistNonReactStatics = __webpack_require__(166); + +var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); + +var _invariant = __webpack_require__(17); + +var _invariant2 = _interopRequireDefault(_invariant); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var defaultMapStateToProps = function defaultMapStateToProps(state) { + return {}; +}; // eslint-disable-line no-unused-vars +var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) { + return { dispatch: dispatch }; +}; +var defaultMergeProps = function defaultMergeProps(stateProps, dispatchProps, parentProps) { + return _extends({}, parentProps, stateProps, dispatchProps); +}; + +function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; +} + +var errorObject = { value: null }; +function tryCatch(fn, ctx) { + try { + return fn.apply(ctx); + } catch (e) { + errorObject.value = e; + return errorObject; + } +} + +// Helps track hot reloading. +var nextVersion = 0; + +function connect(mapStateToProps, mapDispatchToProps, mergeProps) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + var shouldSubscribe = Boolean(mapStateToProps); + var mapState = mapStateToProps || defaultMapStateToProps; + + var mapDispatch = void 0; + if (typeof mapDispatchToProps === 'function') { + mapDispatch = mapDispatchToProps; + } else if (!mapDispatchToProps) { + mapDispatch = defaultMapDispatchToProps; + } else { + mapDispatch = (0, _wrapActionCreators2["default"])(mapDispatchToProps); + } + + var finalMergeProps = mergeProps || defaultMergeProps; + var _options$pure = options.pure, + pure = _options$pure === undefined ? true : _options$pure, + _options$withRef = options.withRef, + withRef = _options$withRef === undefined ? false : _options$withRef; + + var checkMergedEquals = pure && finalMergeProps !== defaultMergeProps; + + // Helps track hot reloading. + var version = nextVersion++; + + return function wrapWithConnect(WrappedComponent) { + var connectDisplayName = 'Connect(' + getDisplayName(WrappedComponent) + ')'; + + function checkStateShape(props, methodName) { + if (!(0, _isPlainObject2["default"])(props)) { + (0, _warning2["default"])(methodName + '() in ' + connectDisplayName + ' must return a plain object. ' + ('Instead received ' + props + '.')); + } + } + + function computeMergedProps(stateProps, dispatchProps, parentProps) { + var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps); + if (false) { + checkStateShape(mergedProps, 'mergeProps'); + } + return mergedProps; + } + + var Connect = function (_Component) { + _inherits(Connect, _Component); + + Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() { + return !pure || this.haveOwnPropsChanged || this.hasStoreStateChanged; + }; + + function Connect(props, context) { + _classCallCheck(this, Connect); + + var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); + + _this.version = version; + _this.store = props.store || context.store; + + (0, _invariant2["default"])(_this.store, 'Could not find "store" in either the context or ' + ('props of "' + connectDisplayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + connectDisplayName + '".')); + + var storeState = _this.store.getState(); + _this.state = { storeState: storeState }; + _this.clearCache(); + return _this; + } + + Connect.prototype.computeStateProps = function computeStateProps(store, props) { + if (!this.finalMapStateToProps) { + return this.configureFinalMapState(store, props); + } + + var state = store.getState(); + var stateProps = this.doStatePropsDependOnOwnProps ? this.finalMapStateToProps(state, props) : this.finalMapStateToProps(state); + + if (false) { + checkStateShape(stateProps, 'mapStateToProps'); + } + return stateProps; + }; + + Connect.prototype.configureFinalMapState = function configureFinalMapState(store, props) { + var mappedState = mapState(store.getState(), props); + var isFactory = typeof mappedState === 'function'; + + this.finalMapStateToProps = isFactory ? mappedState : mapState; + this.doStatePropsDependOnOwnProps = this.finalMapStateToProps.length !== 1; + + if (isFactory) { + return this.computeStateProps(store, props); + } + + if (false) { + checkStateShape(mappedState, 'mapStateToProps'); + } + return mappedState; + }; + + Connect.prototype.computeDispatchProps = function computeDispatchProps(store, props) { + if (!this.finalMapDispatchToProps) { + return this.configureFinalMapDispatch(store, props); + } + + var dispatch = store.dispatch; + + var dispatchProps = this.doDispatchPropsDependOnOwnProps ? this.finalMapDispatchToProps(dispatch, props) : this.finalMapDispatchToProps(dispatch); + + if (false) { + checkStateShape(dispatchProps, 'mapDispatchToProps'); + } + return dispatchProps; + }; + + Connect.prototype.configureFinalMapDispatch = function configureFinalMapDispatch(store, props) { + var mappedDispatch = mapDispatch(store.dispatch, props); + var isFactory = typeof mappedDispatch === 'function'; + + this.finalMapDispatchToProps = isFactory ? mappedDispatch : mapDispatch; + this.doDispatchPropsDependOnOwnProps = this.finalMapDispatchToProps.length !== 1; + + if (isFactory) { + return this.computeDispatchProps(store, props); + } + + if (false) { + checkStateShape(mappedDispatch, 'mapDispatchToProps'); + } + return mappedDispatch; + }; + + Connect.prototype.updateStatePropsIfNeeded = function updateStatePropsIfNeeded() { + var nextStateProps = this.computeStateProps(this.store, this.props); + if (this.stateProps && (0, _shallowEqual2["default"])(nextStateProps, this.stateProps)) { + return false; + } + + this.stateProps = nextStateProps; + return true; + }; + + Connect.prototype.updateDispatchPropsIfNeeded = function updateDispatchPropsIfNeeded() { + var nextDispatchProps = this.computeDispatchProps(this.store, this.props); + if (this.dispatchProps && (0, _shallowEqual2["default"])(nextDispatchProps, this.dispatchProps)) { + return false; + } + + this.dispatchProps = nextDispatchProps; + return true; + }; + + Connect.prototype.updateMergedPropsIfNeeded = function updateMergedPropsIfNeeded() { + var nextMergedProps = computeMergedProps(this.stateProps, this.dispatchProps, this.props); + if (this.mergedProps && checkMergedEquals && (0, _shallowEqual2["default"])(nextMergedProps, this.mergedProps)) { + return false; + } + + this.mergedProps = nextMergedProps; + return true; + }; + + Connect.prototype.isSubscribed = function isSubscribed() { + return typeof this.unsubscribe === 'function'; + }; + + Connect.prototype.trySubscribe = function trySubscribe() { + if (shouldSubscribe && !this.unsubscribe) { + this.unsubscribe = this.store.subscribe(this.handleChange.bind(this)); + this.handleChange(); + } + }; + + Connect.prototype.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + } + }; + + Connect.prototype.componentDidMount = function componentDidMount() { + this.trySubscribe(); + }; + + Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + if (!pure || !(0, _shallowEqual2["default"])(nextProps, this.props)) { + this.haveOwnPropsChanged = true; + } + }; + + Connect.prototype.componentWillUnmount = function componentWillUnmount() { + this.tryUnsubscribe(); + this.clearCache(); + }; + + Connect.prototype.clearCache = function clearCache() { + this.dispatchProps = null; + this.stateProps = null; + this.mergedProps = null; + this.haveOwnPropsChanged = true; + this.hasStoreStateChanged = true; + this.haveStatePropsBeenPrecalculated = false; + this.statePropsPrecalculationError = null; + this.renderedElement = null; + this.finalMapDispatchToProps = null; + this.finalMapStateToProps = null; + }; + + Connect.prototype.handleChange = function handleChange() { + if (!this.unsubscribe) { + return; + } + + var storeState = this.store.getState(); + var prevStoreState = this.state.storeState; + if (pure && prevStoreState === storeState) { + return; + } + + if (pure && !this.doStatePropsDependOnOwnProps) { + var haveStatePropsChanged = tryCatch(this.updateStatePropsIfNeeded, this); + if (!haveStatePropsChanged) { + return; + } + if (haveStatePropsChanged === errorObject) { + this.statePropsPrecalculationError = errorObject.value; + } + this.haveStatePropsBeenPrecalculated = true; + } + + this.hasStoreStateChanged = true; + this.setState({ storeState: storeState }); + }; + + Connect.prototype.getWrappedInstance = function getWrappedInstance() { + (0, _invariant2["default"])(withRef, 'To access the wrapped instance, you need to specify ' + '{ withRef: true } as the fourth argument of the connect() call.'); + + return this.refs.wrappedInstance; + }; + + Connect.prototype.render = function render() { + var haveOwnPropsChanged = this.haveOwnPropsChanged, + hasStoreStateChanged = this.hasStoreStateChanged, + haveStatePropsBeenPrecalculated = this.haveStatePropsBeenPrecalculated, + statePropsPrecalculationError = this.statePropsPrecalculationError, + renderedElement = this.renderedElement; + + + this.haveOwnPropsChanged = false; + this.hasStoreStateChanged = false; + this.haveStatePropsBeenPrecalculated = false; + this.statePropsPrecalculationError = null; + + if (statePropsPrecalculationError) { + throw statePropsPrecalculationError; + } + + var shouldUpdateStateProps = true; + var shouldUpdateDispatchProps = true; + if (pure && renderedElement) { + shouldUpdateStateProps = hasStoreStateChanged || haveOwnPropsChanged && this.doStatePropsDependOnOwnProps; + shouldUpdateDispatchProps = haveOwnPropsChanged && this.doDispatchPropsDependOnOwnProps; + } + + var haveStatePropsChanged = false; + var haveDispatchPropsChanged = false; + if (haveStatePropsBeenPrecalculated) { + haveStatePropsChanged = true; + } else if (shouldUpdateStateProps) { + haveStatePropsChanged = this.updateStatePropsIfNeeded(); + } + if (shouldUpdateDispatchProps) { + haveDispatchPropsChanged = this.updateDispatchPropsIfNeeded(); + } + + var haveMergedPropsChanged = true; + if (haveStatePropsChanged || haveDispatchPropsChanged || haveOwnPropsChanged) { + haveMergedPropsChanged = this.updateMergedPropsIfNeeded(); + } else { + haveMergedPropsChanged = false; + } + + if (!haveMergedPropsChanged && renderedElement) { + return renderedElement; + } + + if (withRef) { + this.renderedElement = (0, _react.createElement)(WrappedComponent, _extends({}, this.mergedProps, { + ref: 'wrappedInstance' + })); + } else { + this.renderedElement = (0, _react.createElement)(WrappedComponent, this.mergedProps); + } + + return this.renderedElement; + }; + + return Connect; + }(_react.Component); + + Connect.displayName = connectDisplayName; + Connect.WrappedComponent = WrappedComponent; + Connect.contextTypes = { + store: _storeShape2["default"] + }; + Connect.propTypes = { + store: _storeShape2["default"] + }; + + if (false) { + Connect.prototype.componentWillUpdate = function componentWillUpdate() { + if (this.version === version) { + return; + } + + // We are hot reloading! + this.version = version; + this.trySubscribe(); + this.clearCache(); + }; + } + + return (0, _hoistNonReactStatics2["default"])(Connect, WrappedComponent); + }; +} + +/***/ }), +/* 465 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = shallowEqual; +function shallowEqual(objA, objB) { + if (objA === objB) { + return true; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + var hasOwn = Object.prototype.hasOwnProperty; + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { + return false; + } + } + + return true; +} + +/***/ }), +/* 466 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = wrapActionCreators; + +var _redux = __webpack_require__(111); + +function wrapActionCreators(actionCreators) { + return function (dispatch) { + return (0, _redux.bindActionCreators)(actionCreators, dispatch); + }; +} + +/***/ }), +/* 467 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(468), + getPrototype = __webpack_require__(473), + isObjectLike = __webpack_require__(475); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +module.exports = isPlainObject; + + +/***/ }), +/* 468 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(265), + getRawTag = __webpack_require__(471), + objectToString = __webpack_require__(472); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; + + +/***/ }), +/* 469 */ +/***/ (function(module, exports, __webpack_require__) { + +var freeGlobal = __webpack_require__(470); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + + +/***/ }), +/* 470 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(44))) + +/***/ }), +/* 471 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(265); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; + + +/***/ }), +/* 472 */ +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; + + +/***/ }), +/* 473 */ +/***/ (function(module, exports, __webpack_require__) { + +var overArg = __webpack_require__(474); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; + + +/***/ }), +/* 474 */ +/***/ (function(module, exports) { + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; + + +/***/ }), +/* 475 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; + + +/***/ }), +/* 476 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _core = __webpack_require__(477); + +var _helpers = __webpack_require__(266); + +var _defaults = __webpack_require__(480); + +var _defaults2 = _interopRequireDefault(_defaults); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Creates logger with following options + * + * @namespace + * @param {object} options - options for logger + * @param {string | function | object} options.level - console[level] + * @param {boolean} options.duration - print duration of each action? + * @param {boolean} options.timestamp - print timestamp with each action? + * @param {object} options.colors - custom colors + * @param {object} options.logger - implementation of the `console` API + * @param {boolean} options.logErrors - should errors in action execution be caught, logged, and re-thrown? + * @param {boolean} options.collapsed - is group collapsed? + * @param {boolean} options.predicate - condition which resolves logger behavior + * @param {function} options.stateTransformer - transform state before print + * @param {function} options.actionTransformer - transform action before print + * @param {function} options.errorTransformer - transform error before print + * + * @returns {function} logger middleware + */ +function createLogger() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + var loggerOptions = _extends({}, _defaults2.default, options); + + var logger = loggerOptions.logger; + var transformer = loggerOptions.transformer; + var stateTransformer = loggerOptions.stateTransformer; + var errorTransformer = loggerOptions.errorTransformer; + var predicate = loggerOptions.predicate; + var logErrors = loggerOptions.logErrors; + var diffPredicate = loggerOptions.diffPredicate; + + // Return if 'console' object is not defined + + if (typeof logger === 'undefined') { + return function () { + return function (next) { + return function (action) { + return next(action); + }; + }; + }; + } + + if (transformer) { + console.error('Option \'transformer\' is deprecated, use \'stateTransformer\' instead!'); // eslint-disable-line no-console + } + + var logBuffer = []; + + return function (_ref) { + var getState = _ref.getState; + return function (next) { + return function (action) { + // Exit early if predicate function returns 'false' + if (typeof predicate === 'function' && !predicate(getState, action)) { + return next(action); + } + + var logEntry = {}; + logBuffer.push(logEntry); + + logEntry.started = _helpers.timer.now(); + logEntry.startedTime = new Date(); + logEntry.prevState = stateTransformer(getState()); + logEntry.action = action; + + var returnedValue = undefined; + if (logErrors) { + try { + returnedValue = next(action); + } catch (e) { + logEntry.error = errorTransformer(e); + } + } else { + returnedValue = next(action); + } + + logEntry.took = _helpers.timer.now() - logEntry.started; + logEntry.nextState = stateTransformer(getState()); + + var diff = loggerOptions.diff && typeof diffPredicate === 'function' ? diffPredicate(getState, action) : loggerOptions.diff; + + (0, _core.printBuffer)(logBuffer, _extends({}, loggerOptions, { diff: diff })); + logBuffer.length = 0; + + if (logEntry.error) throw logEntry.error; + return returnedValue; + }; + }; + }; +} + +exports.default = createLogger; +module.exports = exports['default']; + +/***/ }), +/* 477 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.printBuffer = printBuffer; + +var _helpers = __webpack_require__(266); + +var _diff = __webpack_require__(478); + +var _diff2 = _interopRequireDefault(_diff); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } + +/** + * Get log level string based on supplied params + * + * @param {string | function | object} level - console[level] + * @param {object} action - selected action + * @param {array} payload - selected payload + * @param {string} type - log entry type + * + * @returns {string} level + */ +function getLogLevel(level, action, payload, type) { + switch (typeof level === 'undefined' ? 'undefined' : _typeof(level)) { + case 'object': + return typeof level[type] === 'function' ? level[type].apply(level, _toConsumableArray(payload)) : level[type]; + case 'function': + return level(action); + default: + return level; + } +} + +function defaultTitleFormatter(options) { + var timestamp = options.timestamp; + var duration = options.duration; + + return function (action, time, took) { + var parts = ['action']; + if (timestamp) { + parts.push('@ ' + time); + } + parts.push(action.type); + if (duration) { + parts.push('(in ' + took.toFixed(2) + ' ms)'); + } + return parts.join(' '); + }; +} + +function printBuffer(buffer, options) { + var logger = options.logger; + var actionTransformer = options.actionTransformer; + var _options$titleFormatt = options.titleFormatter; + var titleFormatter = _options$titleFormatt === undefined ? defaultTitleFormatter(options) : _options$titleFormatt; + var collapsed = options.collapsed; + var colors = options.colors; + var level = options.level; + var diff = options.diff; + + buffer.forEach(function (logEntry, key) { + var started = logEntry.started; + var startedTime = logEntry.startedTime; + var action = logEntry.action; + var prevState = logEntry.prevState; + var error = logEntry.error; + var took = logEntry.took; + var nextState = logEntry.nextState; + + var nextEntry = buffer[key + 1]; + + if (nextEntry) { + nextState = nextEntry.prevState; + took = nextEntry.started - started; + } + + // Message + var formattedAction = actionTransformer(action); + var isCollapsed = typeof collapsed === 'function' ? collapsed(function () { + return nextState; + }, action) : collapsed; + + var formattedTime = (0, _helpers.formatTime)(startedTime); + var titleCSS = colors.title ? 'color: ' + colors.title(formattedAction) + ';' : null; + var title = titleFormatter(formattedAction, formattedTime, took); + + // Render + try { + if (isCollapsed) { + if (colors.title) logger.groupCollapsed('%c ' + title, titleCSS);else logger.groupCollapsed(title); + } else { + if (colors.title) logger.group('%c ' + title, titleCSS);else logger.group(title); + } + } catch (e) { + logger.log(title); + } + + var prevStateLevel = getLogLevel(level, formattedAction, [prevState], 'prevState'); + var actionLevel = getLogLevel(level, formattedAction, [formattedAction], 'action'); + var errorLevel = getLogLevel(level, formattedAction, [error, prevState], 'error'); + var nextStateLevel = getLogLevel(level, formattedAction, [nextState], 'nextState'); + + if (prevStateLevel) { + if (colors.prevState) logger[prevStateLevel]('%c prev state', 'color: ' + colors.prevState(prevState) + '; font-weight: bold', prevState);else logger[prevStateLevel]('prev state', prevState); + } + + if (actionLevel) { + if (colors.action) logger[actionLevel]('%c action', 'color: ' + colors.action(formattedAction) + '; font-weight: bold', formattedAction);else logger[actionLevel]('action', formattedAction); + } + + if (error && errorLevel) { + if (colors.error) logger[errorLevel]('%c error', 'color: ' + colors.error(error, prevState) + '; font-weight: bold', error);else logger[errorLevel]('error', error); + } + + if (nextStateLevel) { + if (colors.nextState) logger[nextStateLevel]('%c next state', 'color: ' + colors.nextState(nextState) + '; font-weight: bold', nextState);else logger[nextStateLevel]('next state', nextState); + } + + if (diff) { + (0, _diff2.default)(prevState, nextState, logger, isCollapsed); + } + + try { + logger.groupEnd(); + } catch (e) { + logger.log('—— log end ——'); + } + }); +} + +/***/ }), +/* 478 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = diffLogger; + +var _deepDiff = __webpack_require__(479); + +var _deepDiff2 = _interopRequireDefault(_deepDiff); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// https://github.com/flitbit/diff#differences +var dictionary = { + 'E': { + color: '#2196F3', + text: 'CHANGED:' + }, + 'N': { + color: '#4CAF50', + text: 'ADDED:' + }, + 'D': { + color: '#F44336', + text: 'DELETED:' + }, + 'A': { + color: '#2196F3', + text: 'ARRAY:' + } +}; + +function style(kind) { + return 'color: ' + dictionary[kind].color + '; font-weight: bold'; +} + +function render(diff) { + var kind = diff.kind; + var path = diff.path; + var lhs = diff.lhs; + var rhs = diff.rhs; + var index = diff.index; + var item = diff.item; + + switch (kind) { + case 'E': + return path.join('.') + ' ' + lhs + ' → ' + rhs; + case 'N': + return path.join('.') + ' ' + rhs; + case 'D': + return '' + path.join('.'); + case 'A': + return [path.join('.') + '[' + index + ']', item]; + default: + return null; + } +} + +function diffLogger(prevState, newState, logger, isCollapsed) { + var diff = (0, _deepDiff2.default)(prevState, newState); + + try { + if (isCollapsed) { + logger.groupCollapsed('diff'); + } else { + logger.group('diff'); + } + } catch (e) { + logger.log('diff'); + } + + if (diff) { + diff.forEach(function (elem) { + var kind = elem.kind; + + var output = render(elem); + + logger.log('%c ' + dictionary[kind].text, style(kind), output); + }); + } else { + logger.log('—— no diff ——'); + } + + try { + logger.groupEnd(); + } catch (e) { + logger.log('—— diff end —— '); + } +} +module.exports = exports['default']; + +/***/ }), +/* 479 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + * deep-diff. + * Licensed under the MIT License. + */ +;(function(root, factory) { + 'use strict'; + if (true) { + // AMD. Register as an anonymous module. + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() { + return factory(); + }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.DeepDiff = factory(); + } +}(this, function(undefined) { + 'use strict'; + + var $scope, conflict, conflictResolution = []; + if (typeof global === 'object' && global) { + $scope = global; + } else if (typeof window !== 'undefined') { + $scope = window; + } else { + $scope = {}; + } + conflict = $scope.DeepDiff; + if (conflict) { + conflictResolution.push( + function() { + if ('undefined' !== typeof conflict && $scope.DeepDiff === accumulateDiff) { + $scope.DeepDiff = conflict; + conflict = undefined; + } + }); + } + + // nodejs compatible on server side and in the browser. + function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + + function Diff(kind, path) { + Object.defineProperty(this, 'kind', { + value: kind, + enumerable: true + }); + if (path && path.length) { + Object.defineProperty(this, 'path', { + value: path, + enumerable: true + }); + } + } + + function DiffEdit(path, origin, value) { + DiffEdit.super_.call(this, 'E', path); + Object.defineProperty(this, 'lhs', { + value: origin, + enumerable: true + }); + Object.defineProperty(this, 'rhs', { + value: value, + enumerable: true + }); + } + inherits(DiffEdit, Diff); + + function DiffNew(path, value) { + DiffNew.super_.call(this, 'N', path); + Object.defineProperty(this, 'rhs', { + value: value, + enumerable: true + }); + } + inherits(DiffNew, Diff); + + function DiffDeleted(path, value) { + DiffDeleted.super_.call(this, 'D', path); + Object.defineProperty(this, 'lhs', { + value: value, + enumerable: true + }); + } + inherits(DiffDeleted, Diff); + + function DiffArray(path, index, item) { + DiffArray.super_.call(this, 'A', path); + Object.defineProperty(this, 'index', { + value: index, + enumerable: true + }); + Object.defineProperty(this, 'item', { + value: item, + enumerable: true + }); + } + inherits(DiffArray, Diff); + + function arrayRemove(arr, from, to) { + var rest = arr.slice((to || from) + 1 || arr.length); + arr.length = from < 0 ? arr.length + from : from; + arr.push.apply(arr, rest); + return arr; + } + + function realTypeOf(subject) { + var type = typeof subject; + if (type !== 'object') { + return type; + } + + if (subject === Math) { + return 'math'; + } else if (subject === null) { + return 'null'; + } else if (Array.isArray(subject)) { + return 'array'; + } else if (Object.prototype.toString.call(subject) === '[object Date]') { + return 'date'; + } else if (typeof subject.toString !== 'undefined' && /^\/.*\//.test(subject.toString())) { + return 'regexp'; + } + return 'object'; + } + + function deepDiff(lhs, rhs, changes, prefilter, path, key, stack) { + path = path || []; + var currentPath = path.slice(0); + if (typeof key !== 'undefined') { + if (prefilter) { + if (typeof(prefilter) === 'function' && prefilter(currentPath, key)) { return; } + else if (typeof(prefilter) === 'object') { + if (prefilter.prefilter && prefilter.prefilter(currentPath, key)) { return; } + if (prefilter.normalize) { + var alt = prefilter.normalize(currentPath, key, lhs, rhs); + if (alt) { + lhs = alt[0]; + rhs = alt[1]; + } + } + } + } + currentPath.push(key); + } + + // Use string comparison for regexes + if (realTypeOf(lhs) === 'regexp' && realTypeOf(rhs) === 'regexp') { + lhs = lhs.toString(); + rhs = rhs.toString(); + } + + var ltype = typeof lhs; + var rtype = typeof rhs; + if (ltype === 'undefined') { + if (rtype !== 'undefined') { + changes(new DiffNew(currentPath, rhs)); + } + } else if (rtype === 'undefined') { + changes(new DiffDeleted(currentPath, lhs)); + } else if (realTypeOf(lhs) !== realTypeOf(rhs)) { + changes(new DiffEdit(currentPath, lhs, rhs)); + } else if (Object.prototype.toString.call(lhs) === '[object Date]' && Object.prototype.toString.call(rhs) === '[object Date]' && ((lhs - rhs) !== 0)) { + changes(new DiffEdit(currentPath, lhs, rhs)); + } else if (ltype === 'object' && lhs !== null && rhs !== null) { + stack = stack || []; + if (stack.indexOf(lhs) < 0) { + stack.push(lhs); + if (Array.isArray(lhs)) { + var i, len = lhs.length; + for (i = 0; i < lhs.length; i++) { + if (i >= rhs.length) { + changes(new DiffArray(currentPath, i, new DiffDeleted(undefined, lhs[i]))); + } else { + deepDiff(lhs[i], rhs[i], changes, prefilter, currentPath, i, stack); + } + } + while (i < rhs.length) { + changes(new DiffArray(currentPath, i, new DiffNew(undefined, rhs[i++]))); + } + } else { + var akeys = Object.keys(lhs); + var pkeys = Object.keys(rhs); + akeys.forEach(function(k, i) { + var other = pkeys.indexOf(k); + if (other >= 0) { + deepDiff(lhs[k], rhs[k], changes, prefilter, currentPath, k, stack); + pkeys = arrayRemove(pkeys, other); + } else { + deepDiff(lhs[k], undefined, changes, prefilter, currentPath, k, stack); + } + }); + pkeys.forEach(function(k) { + deepDiff(undefined, rhs[k], changes, prefilter, currentPath, k, stack); + }); + } + stack.length = stack.length - 1; + } + } else if (lhs !== rhs) { + if (!(ltype === 'number' && isNaN(lhs) && isNaN(rhs))) { + changes(new DiffEdit(currentPath, lhs, rhs)); + } + } + } + + function accumulateDiff(lhs, rhs, prefilter, accum) { + accum = accum || []; + deepDiff(lhs, rhs, + function(diff) { + if (diff) { + accum.push(diff); + } + }, + prefilter); + return (accum.length) ? accum : undefined; + } + + function applyArrayChange(arr, index, change) { + if (change.path && change.path.length) { + var it = arr[index], + i, u = change.path.length - 1; + for (i = 0; i < u; i++) { + it = it[change.path[i]]; + } + switch (change.kind) { + case 'A': + applyArrayChange(it[change.path[i]], change.index, change.item); + break; + case 'D': + delete it[change.path[i]]; + break; + case 'E': + case 'N': + it[change.path[i]] = change.rhs; + break; + } + } else { + switch (change.kind) { + case 'A': + applyArrayChange(arr[index], change.index, change.item); + break; + case 'D': + arr = arrayRemove(arr, index); + break; + case 'E': + case 'N': + arr[index] = change.rhs; + break; + } + } + return arr; + } + + function applyChange(target, source, change) { + if (target && source && change && change.kind) { + var it = target, + i = -1, + last = change.path ? change.path.length - 1 : 0; + while (++i < last) { + if (typeof it[change.path[i]] === 'undefined') { + it[change.path[i]] = (typeof change.path[i] === 'number') ? [] : {}; + } + it = it[change.path[i]]; + } + switch (change.kind) { + case 'A': + applyArrayChange(change.path ? it[change.path[i]] : it, change.index, change.item); + break; + case 'D': + delete it[change.path[i]]; + break; + case 'E': + case 'N': + it[change.path[i]] = change.rhs; + break; + } + } + } + + function revertArrayChange(arr, index, change) { + if (change.path && change.path.length) { + // the structure of the object at the index has changed... + var it = arr[index], + i, u = change.path.length - 1; + for (i = 0; i < u; i++) { + it = it[change.path[i]]; + } + switch (change.kind) { + case 'A': + revertArrayChange(it[change.path[i]], change.index, change.item); + break; + case 'D': + it[change.path[i]] = change.lhs; + break; + case 'E': + it[change.path[i]] = change.lhs; + break; + case 'N': + delete it[change.path[i]]; + break; + } + } else { + // the array item is different... + switch (change.kind) { + case 'A': + revertArrayChange(arr[index], change.index, change.item); + break; + case 'D': + arr[index] = change.lhs; + break; + case 'E': + arr[index] = change.lhs; + break; + case 'N': + arr = arrayRemove(arr, index); + break; + } + } + return arr; + } + + function revertChange(target, source, change) { + if (target && source && change && change.kind) { + var it = target, + i, u; + u = change.path.length - 1; + for (i = 0; i < u; i++) { + if (typeof it[change.path[i]] === 'undefined') { + it[change.path[i]] = {}; + } + it = it[change.path[i]]; + } + switch (change.kind) { + case 'A': + // Array was modified... + // it will be an array... + revertArrayChange(it[change.path[i]], change.index, change.item); + break; + case 'D': + // Item was deleted... + it[change.path[i]] = change.lhs; + break; + case 'E': + // Item was edited... + it[change.path[i]] = change.lhs; + break; + case 'N': + // Item is new... + delete it[change.path[i]]; + break; + } + } + } + + function applyDiff(target, source, filter) { + if (target && source) { + var onChange = function(change) { + if (!filter || filter(target, source, change)) { + applyChange(target, source, change); + } + }; + deepDiff(target, source, onChange); + } + } + + Object.defineProperties(accumulateDiff, { + + diff: { + value: accumulateDiff, + enumerable: true + }, + observableDiff: { + value: deepDiff, + enumerable: true + }, + applyDiff: { + value: applyDiff, + enumerable: true + }, + applyChange: { + value: applyChange, + enumerable: true + }, + revertChange: { + value: revertChange, + enumerable: true + }, + isConflict: { + value: function() { + return 'undefined' !== typeof conflict; + }, + enumerable: true + }, + noConflict: { + value: function() { + if (conflictResolution) { + conflictResolution.forEach(function(it) { + it(); + }); + conflictResolution = null; + } + return accumulateDiff; + }, + enumerable: true + } + }); + + return accumulateDiff; +})); + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(44))) + +/***/ }), +/* 480 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + level: "log", + logger: console, + logErrors: true, + collapsed: undefined, + predicate: undefined, + duration: false, + timestamp: true, + stateTransformer: function stateTransformer(state) { + return state; + }, + actionTransformer: function actionTransformer(action) { + return action; + }, + errorTransformer: function errorTransformer(error) { + return error; + }, + colors: { + title: function title() { + return "inherit"; + }, + prevState: function prevState() { + return "#9E9E9E"; + }, + action: function action() { + return "#03A9F4"; + }, + nextState: function nextState() { + return "#4CAF50"; + }, + error: function error() { + return "#F20404"; + } + }, + diff: false, + diffPredicate: undefined, + + // Deprecated options + transformer: undefined +}; +module.exports = exports['default']; + +/***/ }), +/* 481 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.routerMiddleware = exports.routerActions = exports.goForward = exports.goBack = exports.go = exports.replace = exports.push = exports.CALL_HISTORY_METHOD = exports.routerReducer = exports.LOCATION_CHANGE = exports.syncHistoryWithStore = undefined; + +var _reducer = __webpack_require__(267); + +Object.defineProperty(exports, 'LOCATION_CHANGE', { + enumerable: true, + get: function get() { + return _reducer.LOCATION_CHANGE; + } +}); +Object.defineProperty(exports, 'routerReducer', { + enumerable: true, + get: function get() { + return _reducer.routerReducer; + } +}); + +var _actions = __webpack_require__(268); + +Object.defineProperty(exports, 'CALL_HISTORY_METHOD', { + enumerable: true, + get: function get() { + return _actions.CALL_HISTORY_METHOD; + } +}); +Object.defineProperty(exports, 'push', { + enumerable: true, + get: function get() { + return _actions.push; + } +}); +Object.defineProperty(exports, 'replace', { + enumerable: true, + get: function get() { + return _actions.replace; + } +}); +Object.defineProperty(exports, 'go', { + enumerable: true, + get: function get() { + return _actions.go; + } +}); +Object.defineProperty(exports, 'goBack', { + enumerable: true, + get: function get() { + return _actions.goBack; + } +}); +Object.defineProperty(exports, 'goForward', { + enumerable: true, + get: function get() { + return _actions.goForward; + } +}); +Object.defineProperty(exports, 'routerActions', { + enumerable: true, + get: function get() { + return _actions.routerActions; + } +}); + +var _sync = __webpack_require__(482); + +var _sync2 = _interopRequireDefault(_sync); + +var _middleware = __webpack_require__(483); + +var _middleware2 = _interopRequireDefault(_middleware); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +exports.syncHistoryWithStore = _sync2['default']; +exports.routerMiddleware = _middleware2['default']; + +/***/ }), +/* 482 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +exports['default'] = syncHistoryWithStore; + +var _reducer = __webpack_require__(267); + +var defaultSelectLocationState = function defaultSelectLocationState(state) { + return state.routing; +}; + +/** + * This function synchronizes your history state with the Redux store. + * Location changes flow from history to the store. An enhanced history is + * returned with a listen method that responds to store updates for location. + * + * When this history is provided to the router, this means the location data + * will flow like this: + * history.push -> store.dispatch -> enhancedHistory.listen -> router + * This ensures that when the store state changes due to a replay or other + * event, the router will be updated appropriately and can transition to the + * correct router state. + */ +function syncHistoryWithStore(history, store) { + var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + _ref$selectLocationSt = _ref.selectLocationState, + selectLocationState = _ref$selectLocationSt === undefined ? defaultSelectLocationState : _ref$selectLocationSt, + _ref$adjustUrlOnRepla = _ref.adjustUrlOnReplay, + adjustUrlOnReplay = _ref$adjustUrlOnRepla === undefined ? true : _ref$adjustUrlOnRepla; + + // Ensure that the reducer is mounted on the store and functioning properly. + if (typeof selectLocationState(store.getState()) === 'undefined') { + throw new Error('Expected the routing state to be available either as `state.routing` ' + 'or as the custom expression you can specify as `selectLocationState` ' + 'in the `syncHistoryWithStore()` options. ' + 'Ensure you have added the `routerReducer` to your store\'s ' + 'reducers via `combineReducers` or whatever method you use to isolate ' + 'your reducers.'); + } + + var initialLocation = void 0; + var isTimeTraveling = void 0; + var unsubscribeFromStore = void 0; + var unsubscribeFromHistory = void 0; + var currentLocation = void 0; + + // What does the store say about current location? + var getLocationInStore = function getLocationInStore(useInitialIfEmpty) { + var locationState = selectLocationState(store.getState()); + return locationState.locationBeforeTransitions || (useInitialIfEmpty ? initialLocation : undefined); + }; + + // Init initialLocation with potential location in store + initialLocation = getLocationInStore(); + + // If the store is replayed, update the URL in the browser to match. + if (adjustUrlOnReplay) { + var handleStoreChange = function handleStoreChange() { + var locationInStore = getLocationInStore(true); + if (currentLocation === locationInStore || initialLocation === locationInStore) { + return; + } + + // Update address bar to reflect store state + isTimeTraveling = true; + currentLocation = locationInStore; + history.transitionTo(_extends({}, locationInStore, { + action: 'PUSH' + })); + isTimeTraveling = false; + }; + + unsubscribeFromStore = store.subscribe(handleStoreChange); + handleStoreChange(); + } + + // Whenever location changes, dispatch an action to get it in the store + var handleLocationChange = function handleLocationChange(location) { + // ... unless we just caused that location change + if (isTimeTraveling) { + return; + } + + // Remember where we are + currentLocation = location; + + // Are we being called for the first time? + if (!initialLocation) { + // Remember as a fallback in case state is reset + initialLocation = location; + + // Respect persisted location, if any + if (getLocationInStore()) { + return; + } + } + + // Tell the store to update by dispatching an action + store.dispatch({ + type: _reducer.LOCATION_CHANGE, + payload: location + }); + }; + unsubscribeFromHistory = history.listen(handleLocationChange); + + // support history 3.x + if (history.getCurrentLocation) { + handleLocationChange(history.getCurrentLocation()); + } + + // The enhanced history uses store as source of truth + return _extends({}, history, { + // The listeners are subscribed to the store instead of history + listen: function listen(listener) { + // Copy of last location. + var lastPublishedLocation = getLocationInStore(true); + + // Keep track of whether we unsubscribed, as Redux store + // only applies changes in subscriptions on next dispatch + var unsubscribed = false; + var unsubscribeFromStore = store.subscribe(function () { + var currentLocation = getLocationInStore(true); + if (currentLocation === lastPublishedLocation) { + return; + } + lastPublishedLocation = currentLocation; + if (!unsubscribed) { + listener(lastPublishedLocation); + } + }); + + // History listeners expect a synchronous call. Make the first call to the + // listener after subscribing to the store, in case the listener causes a + // location change (e.g. when it redirects) + listener(lastPublishedLocation); + + // Let user unsubscribe later + return function () { + unsubscribed = true; + unsubscribeFromStore(); + }; + }, + + + // It also provides a way to destroy internal listeners + unsubscribe: function unsubscribe() { + if (adjustUrlOnReplay) { + unsubscribeFromStore(); + } + unsubscribeFromHistory(); + } + }); +} + +/***/ }), +/* 483 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports['default'] = routerMiddleware; + +var _actions = __webpack_require__(268); + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +/** + * This middleware captures CALL_HISTORY_METHOD actions to redirect to the + * provided history object. This will prevent these actions from reaching your + * reducer or any middleware that comes after this one. + */ +function routerMiddleware(history) { + return function () { + return function (next) { + return function (action) { + if (action.type !== _actions.CALL_HISTORY_METHOD) { + return next(action); + } + + var _action$payload = action.payload, + method = _action$payload.method, + args = _action$payload.args; + + history[method].apply(history, _toConsumableArray(args)); + }; + }; + }; +} + +/***/ }), +/* 484 */ +/***/ (function(module, exports, __webpack_require__) { + +var invariant = __webpack_require__(9); +var defaultClickRejectionStrategy = __webpack_require__(485); + +var alreadyInjected = false; + +module.exports = function injectTapEventPlugin (strategyOverrides) { + strategyOverrides = strategyOverrides || {} + var shouldRejectClick = strategyOverrides.shouldRejectClick || defaultClickRejectionStrategy; + + if (false) { + invariant( + !alreadyInjected, + 'injectTapEventPlugin(): Can only be called once per application lifecycle.\n\n\ +It is recommended to call injectTapEventPlugin() just before you call \ +ReactDOM.render(). If you are using an external library which calls injectTapEventPlugin() \ +itself, please contact the maintainer as it shouldn\'t be called in library code and \ +should be injected by the application.' + ) + } + + alreadyInjected = true; + + __webpack_require__(71).injection.injectEventPluginsByName({ + 'TapEventPlugin': __webpack_require__(486)(shouldRejectClick) + }); +}; + + +/***/ }), +/* 485 */ +/***/ (function(module, exports) { + +module.exports = function(lastTouchEvent, clickTimestamp) { + if (lastTouchEvent && (clickTimestamp - lastTouchEvent) < 750) { + return true; + } +}; + + +/***/ }), +/* 486 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @providesModule TapEventPlugin + * @typechecks static-only + */ + + + +var EventConstants = __webpack_require__(487); +var EventPluginUtils = __webpack_require__(102); +var EventPropagators = __webpack_require__(70); +var SyntheticUIEvent = __webpack_require__(73); +var TouchEventUtils = __webpack_require__(488); +var ViewportMetrics = __webpack_require__(148); + +var keyOf = __webpack_require__(489); +var topLevelTypes = EventConstants.topLevelTypes; + +var isStartish = EventPluginUtils.isStartish; +var isEndish = EventPluginUtils.isEndish; + +var isTouch = function(topLevelType) { + var touchTypes = [ + 'topTouchCancel', + 'topTouchEnd', + 'topTouchStart', + 'topTouchMove' + ]; + return touchTypes.indexOf(topLevelType) >= 0; +} + +/** + * Number of pixels that are tolerated in between a `touchStart` and `touchEnd` + * in order to still be considered a 'tap' event. + */ +var tapMoveThreshold = 10; +var ignoreMouseThreshold = 750; +var startCoords = {x: null, y: null}; +var lastTouchEvent = null; + +var Axis = { + x: {page: 'pageX', client: 'clientX', envScroll: 'currentPageScrollLeft'}, + y: {page: 'pageY', client: 'clientY', envScroll: 'currentPageScrollTop'} +}; + +function getAxisCoordOfEvent(axis, nativeEvent) { + var singleTouch = TouchEventUtils.extractSingleTouch(nativeEvent); + if (singleTouch) { + return singleTouch[axis.page]; + } + return axis.page in nativeEvent ? + nativeEvent[axis.page] : + nativeEvent[axis.client] + ViewportMetrics[axis.envScroll]; +} + +function getDistance(coords, nativeEvent) { + var pageX = getAxisCoordOfEvent(Axis.x, nativeEvent); + var pageY = getAxisCoordOfEvent(Axis.y, nativeEvent); + return Math.pow( + Math.pow(pageX - coords.x, 2) + Math.pow(pageY - coords.y, 2), + 0.5 + ); +} + +var touchEvents = [ + 'topTouchStart', + 'topTouchCancel', + 'topTouchEnd', + 'topTouchMove', +]; + +var dependencies = [ + 'topMouseDown', + 'topMouseMove', + 'topMouseUp', +].concat(touchEvents); + +var eventTypes = { + touchTap: { + phasedRegistrationNames: { + bubbled: keyOf({onTouchTap: null}), + captured: keyOf({onTouchTapCapture: null}) + }, + dependencies: dependencies + } +}; + +var now = (function() { + if (Date.now) { + return Date.now; + } else { + // IE8 support: http://stackoverflow.com/questions/9430357/please-explain-why-and-how-new-date-works-as-workaround-for-date-now-in + return function () { + return +new Date; + } + } +})(); + +function createTapEventPlugin(shouldRejectClick) { + return { + + tapMoveThreshold: tapMoveThreshold, + + ignoreMouseThreshold: ignoreMouseThreshold, + + eventTypes: eventTypes, + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} targetInst The listening component root node. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + targetInst, + nativeEvent, + nativeEventTarget + ) { + + if (!isStartish(topLevelType) && !isEndish(topLevelType)) { + return null; + } + + if (isTouch(topLevelType)) { + lastTouchEvent = now(); + } else { + if (shouldRejectClick(lastTouchEvent, now())) { + return null; + } + } + + var event = null; + var distance = getDistance(startCoords, nativeEvent); + if (isEndish(topLevelType) && distance < tapMoveThreshold) { + event = SyntheticUIEvent.getPooled( + eventTypes.touchTap, + targetInst, + nativeEvent, + nativeEventTarget + ); + } + if (isStartish(topLevelType)) { + startCoords.x = getAxisCoordOfEvent(Axis.x, nativeEvent); + startCoords.y = getAxisCoordOfEvent(Axis.y, nativeEvent); + } else if (isEndish(topLevelType)) { + startCoords.x = 0; + startCoords.y = 0; + } + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + + }; +} + +module.exports = createTapEventPlugin; + + +/***/ }), +/* 487 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Types of raw signals from the browser caught at the top level. + */ +var topLevelTypes = { + topAbort: null, + topAnimationEnd: null, + topAnimationIteration: null, + topAnimationStart: null, + topBlur: null, + topCanPlay: null, + topCanPlayThrough: null, + topChange: null, + topClick: null, + topCompositionEnd: null, + topCompositionStart: null, + topCompositionUpdate: null, + topContextMenu: null, + topCopy: null, + topCut: null, + topDoubleClick: null, + topDrag: null, + topDragEnd: null, + topDragEnter: null, + topDragExit: null, + topDragLeave: null, + topDragOver: null, + topDragStart: null, + topDrop: null, + topDurationChange: null, + topEmptied: null, + topEncrypted: null, + topEnded: null, + topError: null, + topFocus: null, + topInput: null, + topInvalid: null, + topKeyDown: null, + topKeyPress: null, + topKeyUp: null, + topLoad: null, + topLoadedData: null, + topLoadedMetadata: null, + topLoadStart: null, + topMouseDown: null, + topMouseMove: null, + topMouseOut: null, + topMouseOver: null, + topMouseUp: null, + topPaste: null, + topPause: null, + topPlay: null, + topPlaying: null, + topProgress: null, + topRateChange: null, + topReset: null, + topScroll: null, + topSeeked: null, + topSeeking: null, + topSelectionChange: null, + topStalled: null, + topSubmit: null, + topSuspend: null, + topTextInput: null, + topTimeUpdate: null, + topTouchCancel: null, + topTouchEnd: null, + topTouchMove: null, + topTouchStart: null, + topTransitionEnd: null, + topVolumeChange: null, + topWaiting: null, + topWheel: null +}; + +var EventConstants = { + topLevelTypes: topLevelTypes +}; + +module.exports = EventConstants; + +/***/ }), +/* 488 */ +/***/ (function(module, exports) { + +/** + * Copyright 2013-2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @providesModule TouchEventUtils + */ + +var TouchEventUtils = { + /** + * Utility function for common case of extracting out the primary touch from a + * touch event. + * - `touchEnd` events usually do not have the `touches` property. + * http://stackoverflow.com/questions/3666929/ + * mobile-sarai-touchend-event-not-firing-when-last-touch-is-removed + * + * @param {Event} nativeEvent Native event that may or may not be a touch. + * @return {TouchesObject?} an object with pageX and pageY or null. + */ + extractSingleTouch: function(nativeEvent) { + var touches = nativeEvent.touches; + var changedTouches = nativeEvent.changedTouches; + var hasTouches = touches && touches.length > 0; + var hasChangedTouches = changedTouches && changedTouches.length > 0; + + return !hasTouches && hasChangedTouches ? changedTouches[0] : + hasTouches ? touches[0] : + nativeEvent; + } +}; + +module.exports = TouchEventUtils; + + +/***/ }), +/* 489 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/** + * Allows extraction of a minified key. Let's the build system minify keys + * without losing the ability to dynamically use key strings as values + * themselves. Pass in an object with a single key/val pair and it will return + * you the string key of that single record. Suppose you want to grab the + * value for a key 'className' inside of an object. Key/val minification may + * have aliased that key to be 'xa12'. keyOf({className: null}) will return + * 'xa12' in that case. Resolve keys you want to use once at startup time, then + * reuse those resolutions. + */ +var keyOf = function keyOf(oneKeyObj) { + var key; + for (key in oneKeyObj) { + if (!oneKeyObj.hasOwnProperty(key)) { + continue; + } + return key; + } + return null; +}; + +module.exports = keyOf; + +/***/ }), +/* 490 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reducer__ = __webpack_require__(491); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__reduxForm__ = __webpack_require__(517); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Field__ = __webpack_require__(603); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Fields__ = __webpack_require__(608); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__FieldArray__ = __webpack_require__(610); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__formValueSelector__ = __webpack_require__(613); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__values__ = __webpack_require__(614); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__selectors_getFormValues__ = __webpack_require__(615); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__selectors_getFormInitialValues__ = __webpack_require__(616); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__selectors_getFormSyncErrors__ = __webpack_require__(617); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__selectors_getFormAsyncErrors__ = __webpack_require__(618); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__selectors_getFormSubmitErrors__ = __webpack_require__(619); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__selectors_isDirty__ = __webpack_require__(620); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__selectors_isInvalid__ = __webpack_require__(621); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__selectors_isPristine__ = __webpack_require__(294); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__selectors_isValid__ = __webpack_require__(189); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__selectors_isSubmitting__ = __webpack_require__(622); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__selectors_hasSubmitSucceeded__ = __webpack_require__(623); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__selectors_hasSubmitFailed__ = __webpack_require__(624); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__Form__ = __webpack_require__(625); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__FormSection__ = __webpack_require__(626); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__SubmissionError__ = __webpack_require__(287); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__propTypes__ = __webpack_require__(627); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__actions__ = __webpack_require__(286); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__actionTypes__ = __webpack_require__(172); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + + + + + + + + + + + + + + + + + + + + + + + +var createAll = function createAll(structure) { + return _extends({ + // separate out field actions + actionTypes: __WEBPACK_IMPORTED_MODULE_24__actionTypes__ + }, __WEBPACK_IMPORTED_MODULE_23__actions__, { + Field: __WEBPACK_IMPORTED_MODULE_2__Field__["a" /* default */](structure), + Fields: __WEBPACK_IMPORTED_MODULE_3__Fields__["a" /* default */](structure), + FieldArray: __WEBPACK_IMPORTED_MODULE_4__FieldArray__["a" /* default */](structure), + Form: __WEBPACK_IMPORTED_MODULE_19__Form__["a" /* default */], + FormSection: __WEBPACK_IMPORTED_MODULE_20__FormSection__["a" /* default */], + formValueSelector: __WEBPACK_IMPORTED_MODULE_5__formValueSelector__["a" /* default */](structure), + getFormValues: __WEBPACK_IMPORTED_MODULE_7__selectors_getFormValues__["a" /* default */](structure), + getFormInitialValues: __WEBPACK_IMPORTED_MODULE_8__selectors_getFormInitialValues__["a" /* default */](structure), + getFormSyncErrors: __WEBPACK_IMPORTED_MODULE_9__selectors_getFormSyncErrors__["a" /* default */](structure), + getFormAsyncErrors: __WEBPACK_IMPORTED_MODULE_10__selectors_getFormAsyncErrors__["a" /* default */](structure), + getFormSubmitErrors: __WEBPACK_IMPORTED_MODULE_11__selectors_getFormSubmitErrors__["a" /* default */](structure), + isDirty: __WEBPACK_IMPORTED_MODULE_12__selectors_isDirty__["a" /* default */](structure), + isInvalid: __WEBPACK_IMPORTED_MODULE_13__selectors_isInvalid__["a" /* default */](structure), + isPristine: __WEBPACK_IMPORTED_MODULE_14__selectors_isPristine__["a" /* default */](structure), + isValid: __WEBPACK_IMPORTED_MODULE_15__selectors_isValid__["a" /* default */](structure), + isSubmitting: __WEBPACK_IMPORTED_MODULE_16__selectors_isSubmitting__["a" /* default */](structure), + hasSubmitSucceeded: __WEBPACK_IMPORTED_MODULE_17__selectors_hasSubmitSucceeded__["a" /* default */](structure), + hasSubmitFailed: __WEBPACK_IMPORTED_MODULE_18__selectors_hasSubmitFailed__["a" /* default */](structure), + propTypes: __WEBPACK_IMPORTED_MODULE_22__propTypes__["a" /* default */], + reduxForm: __WEBPACK_IMPORTED_MODULE_1__reduxForm__["a" /* default */](structure), + reducer: __WEBPACK_IMPORTED_MODULE_0__reducer__["a" /* default */](structure), + SubmissionError: __WEBPACK_IMPORTED_MODULE_21__SubmissionError__["a" /* default */], + values: __WEBPACK_IMPORTED_MODULE_6__values__["a" /* default */](structure) + }); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createAll); + +/***/ }), +/* 491 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(172); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__ = __webpack_require__(492); +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + +var createReducer = function createReducer(structure) { + var _behaviors; + + var deepEqual = structure.deepEqual, + empty = structure.empty, + getIn = structure.getIn, + setIn = structure.setIn, + deleteIn = structure.deleteIn, + fromJS = structure.fromJS, + keys = structure.keys, + size = structure.size, + splice = structure.splice; + + var deleteInWithCleanUp = __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__["a" /* default */](structure); + var doSplice = function doSplice(state, key, field, index, removeNum, value, force) { + var existing = getIn(state, key + '.' + field); + return existing || force ? setIn(state, key + '.' + field, splice(existing, index, removeNum, value)) : state; + }; + var rootKeys = ['values', 'fields', 'submitErrors', 'asyncErrors']; + var arraySplice = function arraySplice(state, field, index, removeNum, value) { + var result = state; + var nonValuesValue = value != null ? empty : undefined; + result = doSplice(result, 'values', field, index, removeNum, value, true); + result = doSplice(result, 'fields', field, index, removeNum, nonValuesValue); + result = doSplice(result, 'submitErrors', field, index, removeNum, nonValuesValue); + result = doSplice(result, 'asyncErrors', field, index, removeNum, nonValuesValue); + return result; + }; + + var behaviors = (_behaviors = {}, _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], function (state, _ref) { + var _ref$meta = _ref.meta, + field = _ref$meta.field, + index = _ref$meta.index, + payload = _ref.payload; + + return arraySplice(state, field, index, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], function (state, _ref2) { + var _ref2$meta = _ref2.meta, + field = _ref2$meta.field, + from = _ref2$meta.from, + to = _ref2$meta.to; + + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + var result = state; + if (length) { + rootKeys.forEach(function (key) { + var path = key + '.' + field; + if (getIn(result, path)) { + var value = getIn(result, path + '[' + from + ']'); + result = setIn(result, path, splice(getIn(result, path), from, 1)); // remove + result = setIn(result, path, splice(getIn(result, path), to, 0, value)); // insert + } + }); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], function (state, _ref3) { + var field = _ref3.meta.field; + + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return length ? arraySplice(state, field, length - 1, 1) : state; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], function (state, _ref4) { + var field = _ref4.meta.field, + payload = _ref4.payload; + + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return arraySplice(state, field, length, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], function (state, _ref5) { + var _ref5$meta = _ref5.meta, + field = _ref5$meta.field, + index = _ref5$meta.index; + + return arraySplice(state, field, index, 1); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], function (state, _ref6) { + var field = _ref6.meta.field; + + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return length ? arraySplice(state, field, 0, length) : state; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], function (state, _ref7) { + var field = _ref7.meta.field; + + return arraySplice(state, field, 0, 1); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], function (state, _ref8) { + var _ref8$meta = _ref8.meta, + field = _ref8$meta.field, + index = _ref8$meta.index, + removeNum = _ref8$meta.removeNum, + payload = _ref8.payload; + + return arraySplice(state, field, index, removeNum, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], function (state, _ref9) { + var _ref9$meta = _ref9.meta, + field = _ref9$meta.field, + indexA = _ref9$meta.indexA, + indexB = _ref9$meta.indexB; + + var result = state; + rootKeys.forEach(function (key) { + var valueA = getIn(result, key + '.' + field + '[' + indexA + ']'); + var valueB = getIn(result, key + '.' + field + '[' + indexB + ']'); + if (valueA !== undefined || valueB !== undefined) { + result = setIn(result, key + '.' + field + '[' + indexA + ']', valueB); + result = setIn(result, key + '.' + field + '[' + indexB + ']', valueA); + } + }); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], function (state, _ref10) { + var field = _ref10.meta.field, + payload = _ref10.payload; + + return arraySplice(state, field, 0, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], function (state, _ref11) { + var field = _ref11.meta.field, + payload = _ref11.payload; + + var result = state; + result = deleteInWithCleanUp(result, 'asyncErrors.' + field); + result = deleteInWithCleanUp(result, 'submitErrors.' + field); + result = setIn(result, 'fields.' + field + '.autofilled', true); + result = setIn(result, 'values.' + field, payload); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], function (state, _ref12) { + var _ref12$meta = _ref12.meta, + field = _ref12$meta.field, + touch = _ref12$meta.touch, + payload = _ref12.payload; + + var result = state; + var initial = getIn(result, 'initial.' + field); + if (initial === undefined && payload === '') { + result = deleteInWithCleanUp(result, 'values.' + field); + } else if (payload !== undefined) { + result = setIn(result, 'values.' + field, payload); + } + if (field === getIn(result, 'active')) { + result = deleteIn(result, 'active'); + } + result = deleteIn(result, 'fields.' + field + '.active'); + if (touch) { + result = setIn(result, 'fields.' + field + '.touched', true); + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], function (state, _ref13) { + var _ref13$meta = _ref13.meta, + field = _ref13$meta.field, + touch = _ref13$meta.touch, + persistentSubmitErrors = _ref13$meta.persistentSubmitErrors, + payload = _ref13.payload; + + var result = state; + var initial = getIn(result, 'initial.' + field); + if (initial === undefined && payload === '') { + result = deleteInWithCleanUp(result, 'values.' + field); + } else if (payload !== undefined) { + result = setIn(result, 'values.' + field, payload); + } + result = deleteInWithCleanUp(result, 'asyncErrors.' + field); + if (!persistentSubmitErrors) { + result = deleteInWithCleanUp(result, 'submitErrors.' + field); + } + result = deleteInWithCleanUp(result, 'fields.' + field + '.autofilled'); + if (touch) { + result = setIn(result, 'fields.' + field + '.touched', true); + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], function (state) { + return deleteIn(state, 'triggerSubmit'); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], function (state, _ref14) { + var field = _ref14.meta.field; + + return deleteIn(state, 'asyncErrors.' + field); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], function (state, _ref15) { + var field = _ref15.meta.field; + + var result = state; + var previouslyActive = getIn(state, 'active'); + result = deleteIn(result, 'fields.' + previouslyActive + '.active'); + result = setIn(result, 'fields.' + field + '.visited', true); + result = setIn(result, 'fields.' + field + '.active', true); + result = setIn(result, 'active', field); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], function (state, _ref16) { + var payload = _ref16.payload, + _ref16$meta = _ref16.meta, + keepDirty = _ref16$meta.keepDirty, + keepSubmitSucceeded = _ref16$meta.keepSubmitSucceeded; + + var mapData = fromJS(payload); + var result = empty; // clean all field state + + // persist old warnings, they will get recalculated if the new form values are different from the old values + var warning = getIn(state, 'warning'); + if (warning) { + result = setIn(result, 'warning', warning); + } + var syncWarnings = getIn(state, 'syncWarnings'); + if (syncWarnings) { + result = setIn(result, 'syncWarnings', syncWarnings); + } + + // persist old errors, they will get recalculated if the new form values are different from the old values + var error = getIn(state, 'error'); + if (error) { + result = setIn(result, 'error', error); + } + var syncErrors = getIn(state, 'syncErrors'); + if (syncErrors) { + result = setIn(result, 'syncErrors', syncErrors); + } + + var registeredFields = getIn(state, 'registeredFields'); + if (registeredFields) { + result = setIn(result, 'registeredFields', registeredFields); + } + var newValues = mapData; + if (keepDirty && registeredFields) { + (function () { + // + // Keep the value of dirty fields while updating the value of + // pristine fields. This way, apps can reinitialize forms while + // avoiding stomping on user edits. + // + // Note 1: The initialize action replaces all initial values + // regardless of keepDirty. + // + // Note 2: When a field is dirty, keepDirty is enabled, and the field + // value is the same as the new initial value for the field, the + // initialize action causes the field to become pristine. That effect + // is what we want. + // + var previousValues = getIn(state, 'values'); + var previousInitialValues = getIn(state, 'initial'); + keys(registeredFields).forEach(function (name) { + var previousInitialValue = getIn(previousInitialValues, name); + var previousValue = getIn(previousValues, name); + if (!deepEqual(previousValue, previousInitialValue)) { + // This field was dirty. Restore the dirty value. + newValues = setIn(newValues, name, previousValue); + } + }); + })(); + } + if (keepSubmitSucceeded && getIn(state, 'submitSucceeded')) { + result = setIn(result, 'submitSucceeded', true); + } + result = setIn(result, 'values', newValues); + result = setIn(result, 'initial', mapData); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], function (state, _ref17) { + var _ref17$payload = _ref17.payload, + name = _ref17$payload.name, + type = _ref17$payload.type; + + var key = 'registeredFields[\'' + name + '\']'; + var field = getIn(state, key); + if (field) { + var count = getIn(field, 'count') + 1; + field = setIn(field, 'count', count); + } else { + field = fromJS({ name: name, type: type, count: 1 }); + } + return setIn(state, key, field); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], function (state) { + var result = empty; + var registeredFields = getIn(state, 'registeredFields'); + if (registeredFields) { + result = setIn(result, 'registeredFields', registeredFields); + } + var values = getIn(state, 'initial'); + if (values) { + result = setIn(result, 'values', values); + result = setIn(result, 'initial', values); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], function (state) { + return setIn(state, 'triggerSubmit', true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], function (state, _ref18) { + var field = _ref18.meta.field; + + return setIn(state, 'asyncValidating', field || true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], function (state) { + return setIn(state, 'submitting', true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], function (state, _ref19) { + var payload = _ref19.payload; + + var result = state; + result = deleteIn(result, 'asyncValidating'); + if (payload && Object.keys(payload).length) { + var _error = payload._error, + fieldErrors = _objectWithoutProperties(payload, ['_error']); + + if (_error) { + result = setIn(result, 'error', _error); + } + if (Object.keys(fieldErrors).length) { + result = setIn(result, 'asyncErrors', fromJS(fieldErrors)); + } else { + result = deleteIn(result, 'asyncErrors'); + } + } else { + result = deleteIn(result, 'error'); + result = deleteIn(result, 'asyncErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], function (state, _ref20) { + var payload = _ref20.payload; + + var result = state; + result = deleteIn(result, 'submitting'); + result = deleteIn(result, 'submitFailed'); + result = deleteIn(result, 'submitSucceeded'); + if (payload && Object.keys(payload).length) { + var _error = payload._error, + fieldErrors = _objectWithoutProperties(payload, ['_error']); + + if (_error) { + result = setIn(result, 'error', _error); + } else { + result = deleteIn(result, 'error'); + } + if (Object.keys(fieldErrors).length) { + result = setIn(result, 'submitErrors', fromJS(fieldErrors)); + } else { + result = deleteIn(result, 'submitErrors'); + } + result = setIn(result, 'submitFailed', true); + } else { + result = setIn(result, 'submitSucceeded', true); + result = deleteIn(result, 'error'); + result = deleteIn(result, 'submitErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], function (state, _ref21) { + var fields = _ref21.meta.fields; + + var result = state; + result = setIn(result, 'submitFailed', true); + result = deleteIn(result, 'submitSucceeded'); + result = deleteIn(result, 'submitting'); + fields.forEach(function (field) { + return result = setIn(result, 'fields.' + field + '.touched', true); + }); + if (fields.length) { + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], function (state) { + var result = state; + result = deleteIn(result, 'submitFailed'); + result = setIn(result, 'submitSucceeded', true); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], function (state, _ref22) { + var fields = _ref22.meta.fields; + + var result = state; + fields.forEach(function (field) { + return result = setIn(result, 'fields.' + field + '.touched', true); + }); + result = setIn(result, 'anyTouched', true); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], function (state, _ref23) { + var _ref23$payload = _ref23.payload, + name = _ref23$payload.name, + destroyOnUnmount = _ref23$payload.destroyOnUnmount; + + var result = state; + var key = 'registeredFields[\'' + name + '\']'; + var field = getIn(result, key); + if (!field) { + return result; + } + + var count = getIn(field, 'count') - 1; + if (count <= 0 && destroyOnUnmount) { + result = deleteIn(result, key); + if (deepEqual(getIn(result, 'registeredFields'), empty)) { + result = deleteIn(result, 'registeredFields'); + } + } else { + field = setIn(field, 'count', count); + result = setIn(result, key, field); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], function (state, _ref24) { + var fields = _ref24.meta.fields; + + var result = state; + fields.forEach(function (field) { + return result = deleteIn(result, 'fields.' + field + '.touched'); + }); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], function (state, _ref25) { + var _ref25$payload = _ref25.payload, + syncErrors = _ref25$payload.syncErrors, + error = _ref25$payload.error; + + var result = state; + if (error) { + result = setIn(result, 'error', error); + result = setIn(result, 'syncError', true); + } else { + result = deleteIn(result, 'error'); + result = deleteIn(result, 'syncError'); + } + if (Object.keys(syncErrors).length) { + result = setIn(result, 'syncErrors', syncErrors); + } else { + result = deleteIn(result, 'syncErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], function (state, _ref26) { + var _ref26$payload = _ref26.payload, + syncWarnings = _ref26$payload.syncWarnings, + warning = _ref26$payload.warning; + + var result = state; + if (warning) { + result = setIn(result, 'warning', warning); + } else { + result = deleteIn(result, 'warning'); + } + if (Object.keys(syncWarnings).length) { + result = setIn(result, 'syncWarnings', syncWarnings); + } else { + result = deleteIn(result, 'syncWarnings'); + } + return result; + }), _behaviors); + + var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments[1]; + + var behavior = behaviors[action.type]; + return behavior ? behavior(state, action) : state; + }; + + var byForm = function byForm(reducer) { + return function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var form = action && action.meta && action.meta.form; + if (!form) { + return state; + } + if (action.type === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"]) { + return action.meta.form.reduce(function (result, form) { + return deleteInWithCleanUp(result, form); + }, state); + } + var formState = getIn(state, form); + var result = reducer(formState, action); + return result === formState ? state : setIn(state, form, result); + }; + }; + + /** + * Adds additional functionality to the reducer + */ + function decorate(target) { + target.plugin = function plugin(reducers) { + var _this = this; + + // use 'function' keyword to enable 'this' + return decorate(function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return Object.keys(reducers).reduce(function (accumulator, key) { + var previousState = getIn(accumulator, key); + var nextState = reducers[key](previousState, action, getIn(state, key)); + return nextState === previousState ? accumulator : setIn(accumulator, key, nextState); + }, _this(state, action)); + }); + }; + + return target; + } + + return decorate(byForm(reducer)); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createReducer); + +/***/ }), +/* 492 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(113); + + + +var createDeleteInWithCleanUp = function createDeleteInWithCleanUp(_ref) { + var deepEqual = _ref.deepEqual, + empty = _ref.empty, + getIn = _ref.getIn, + deleteIn = _ref.deleteIn, + setIn = _ref.setIn; + + + var deleteInWithCleanUp = function deleteInWithCleanUp(state, path) { + if (path[path.length - 1] === ']') { + // array path + var pathTokens = __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](path); + pathTokens.pop(); + var parent = getIn(state, pathTokens.join('.')); + return parent ? setIn(state, path, undefined) : state; + } + var result = deleteIn(state, path); + var dotIndex = path.lastIndexOf('.'); + if (dotIndex > 0) { + var parentPath = path.substring(0, dotIndex); + if (parentPath[parentPath.length - 1] !== ']') { + var _parent = getIn(result, parentPath); + if (deepEqual(_parent, empty)) { + return deleteInWithCleanUp(result, parentPath); + } + } + } + return result; + }; + + return deleteInWithCleanUp; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createDeleteInWithCleanUp); + +/***/ }), +/* 493 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoize_js__ = __webpack_require__(494); + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = __WEBPACK_IMPORTED_MODULE_0__memoize_js__["a" /* default */](func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (memoizeCapped); + + +/***/ }), +/* 494 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(173); + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]); + return memoized; +} + +// Expose `MapCache`. +memoize.Cache = __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (memoize); + + +/***/ }), +/* 495 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Hash_js__ = __webpack_require__(496); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ListCache_js__ = __webpack_require__(116); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Map_js__ = __webpack_require__(175); + + + + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new __WEBPACK_IMPORTED_MODULE_0__Hash_js__["a" /* default */], + 'map': new (__WEBPACK_IMPORTED_MODULE_2__Map_js__["a" /* default */] || __WEBPACK_IMPORTED_MODULE_1__ListCache_js__["a" /* default */]), + 'string': new __WEBPACK_IMPORTED_MODULE_0__Hash_js__["a" /* default */] + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheClear); + + +/***/ }), +/* 496 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hashClear_js__ = __webpack_require__(497); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__ = __webpack_require__(502); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hashGet_js__ = __webpack_require__(503); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__hashHas_js__ = __webpack_require__(504); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__hashSet_js__ = __webpack_require__(505); + + + + + + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__hashClear_js__["a" /* default */]; +Hash.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__["a" /* default */]; +Hash.prototype.get = __WEBPACK_IMPORTED_MODULE_2__hashGet_js__["a" /* default */]; +Hash.prototype.has = __WEBPACK_IMPORTED_MODULE_3__hashHas_js__["a" /* default */]; +Hash.prototype.set = __WEBPACK_IMPORTED_MODULE_4__hashSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (Hash); + + +/***/ }), +/* 497 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(115); + + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */](null) : {}; + this.size = 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashClear); + + +/***/ }), +/* 498 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isMasked_js__ = __webpack_require__(499); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toSource_js__ = __webpack_require__(272); + + + + + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!__WEBPACK_IMPORTED_MODULE_2__isObject_js__["a" /* default */](value) || __WEBPACK_IMPORTED_MODULE_1__isMasked_js__["a" /* default */](value)) { + return false; + } + var pattern = __WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */](value) ? reIsNative : reIsHostCtor; + return pattern.test(__WEBPACK_IMPORTED_MODULE_3__toSource_js__["a" /* default */](value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsNative); + + +/***/ }), +/* 499 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__ = __webpack_require__(500); + + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(__WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */].keys && __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */].keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/* harmony default export */ __webpack_exports__["a"] = (isMasked); + + +/***/ }), +/* 500 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29); + + +/** Used to detect overreaching core-js shims. */ +var coreJsData = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */]['__core-js_shared__']; + +/* harmony default export */ __webpack_exports__["a"] = (coreJsData); + + +/***/ }), +/* 501 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/* harmony default export */ __webpack_exports__["a"] = (getValue); + + +/***/ }), +/* 502 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashDelete); + + +/***/ }), +/* 503 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(115); + + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */]) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashGet); + + +/***/ }), +/* 504 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(115); + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +/* harmony default export */ __webpack_exports__["a"] = (hashHas); + + +/***/ }), +/* 505 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(115); + + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashSet); + + +/***/ }), +/* 506 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheClear); + + +/***/ }), +/* 507 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(117); + + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheDelete); + + +/***/ }), +/* 508 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(117); + + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheGet); + + +/***/ }), +/* 509 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(117); + + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](this.__data__, key) > -1; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheHas); + + +/***/ }), +/* 510 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(117); + + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheSet); + + +/***/ }), +/* 511 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(118); + + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheDelete); + + +/***/ }), +/* 512 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/* harmony default export */ __webpack_exports__["a"] = (isKeyable); + + +/***/ }), +/* 513 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(118); + + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key).get(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheGet); + + +/***/ }), +/* 514 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(118); + + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key).has(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheHas); + + +/***/ }), +/* 515 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(118); + + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheSet); + + +/***/ }), +/* 516 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(269); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(114); + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value)) { + // Recursively convert values (susceptible to call stack limits). + return __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */](value, baseToString) + ''; + } + if (__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */](value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseToString); + + +/***/ }), +/* 517 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__ = __webpack_require__(518); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__ = __webpack_require__(280); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_redux__ = __webpack_require__(111); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_is_promise__ = __webpack_require__(188); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_is_promise__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util_getDisplayName__ = __webpack_require__(589); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__actions__ = __webpack_require__(286); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__handleSubmit__ = __webpack_require__(590); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__events_silenceEvent__ = __webpack_require__(288); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__events_silenceEvents__ = __webpack_require__(592); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__asyncValidation__ = __webpack_require__(593); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__defaultShouldAsyncValidate__ = __webpack_require__(594); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__defaultShouldValidate__ = __webpack_require__(595); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__structure_plain__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__generateValidator__ = __webpack_require__(601); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__selectors_isValid__ = __webpack_require__(189); + + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + + + + + + + + + + + + + + + +var isClassComponent = function isClassComponent(Component) { + return Boolean(Component && Component.prototype && _typeof(Component.prototype.isReactComponent) === 'object'); +}; + +// extract field-specific actions + +var arrayInsert = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayInsert"], + arrayMove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayMove"], + arrayPop = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPop"], + arrayPush = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPush"], + arrayRemove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemove"], + arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemoveAll"], + arrayShift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayShift"], + arraySplice = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySplice"], + arraySwap = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySwap"], + arrayUnshift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayUnshift"], + blur = __WEBPACK_IMPORTED_MODULE_8__actions__["blur"], + change = __WEBPACK_IMPORTED_MODULE_8__actions__["change"], + focus = __WEBPACK_IMPORTED_MODULE_8__actions__["focus"], + formActions = _objectWithoutProperties(__WEBPACK_IMPORTED_MODULE_8__actions__, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'blur', 'change', 'focus']); + +var arrayActions = { + arrayInsert: arrayInsert, + arrayMove: arrayMove, + arrayPop: arrayPop, + arrayPush: arrayPush, + arrayRemove: arrayRemove, + arrayRemoveAll: arrayRemoveAll, + arrayShift: arrayShift, + arraySplice: arraySplice, + arraySwap: arraySwap, + arrayUnshift: arrayUnshift +}; + +var propsToNotUpdateFor = [].concat(_toConsumableArray(Object.keys(__WEBPACK_IMPORTED_MODULE_8__actions__)), ['array', 'asyncErrors', 'initialized', 'initialValues', 'syncErrors', 'syncWarnings', 'values', 'registeredFields']); + +var checkSubmit = function checkSubmit(submit) { + if (!submit || typeof submit !== 'function') { + throw new Error('You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop'); + } + return submit; +}; + +/** + * The decorator that is the main API to redux-form + */ +var createReduxForm = function createReduxForm(structure) { + var deepEqual = structure.deepEqual, + empty = structure.empty, + getIn = structure.getIn, + setIn = structure.setIn, + keys = structure.keys, + fromJS = structure.fromJS; + + var isValid = __WEBPACK_IMPORTED_MODULE_17__selectors_isValid__["a" /* default */](structure); + return function (initialConfig) { + var config = _extends({ + touchOnBlur: true, + touchOnChange: false, + persistentSubmitErrors: false, + destroyOnUnmount: true, + shouldAsyncValidate: __WEBPACK_IMPORTED_MODULE_13__defaultShouldAsyncValidate__["a" /* default */], + shouldValidate: __WEBPACK_IMPORTED_MODULE_14__defaultShouldValidate__["a" /* default */], + enableReinitialize: false, + keepDirtyOnReinitialize: false, + getFormState: function getFormState(state) { + return getIn(state, 'form'); + }, + pure: true, + forceUnregisterOnUnmount: false + }, initialConfig); + + return function (WrappedComponent) { + var Form = function (_Component) { + _inherits(Form, _Component); + + function Form(props) { + _classCallCheck(this, Form); + + var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props)); + + _this.submit = _this.submit.bind(_this); + _this.reset = _this.reset.bind(_this); + _this.asyncValidate = _this.asyncValidate.bind(_this); + _this.getValues = _this.getValues.bind(_this); + _this.register = _this.register.bind(_this); + _this.unregister = _this.unregister.bind(_this); + _this.submitCompleted = _this.submitCompleted.bind(_this); + _this.submitFailed = _this.submitFailed.bind(_this); + _this.fieldValidators = {}; + _this.lastFieldValidatorKeys = []; + _this.fieldWarners = {}; + _this.lastFieldWarnerKeys = []; + return _this; + } + + _createClass(Form, [{ + key: 'getChildContext', + value: function getChildContext() { + var _this2 = this; + + return { + _reduxForm: _extends({}, this.props, { + getFormState: function getFormState(state) { + return getIn(_this2.props.getFormState(state), _this2.props.form); + }, + asyncValidate: this.asyncValidate, + getValues: this.getValues, + sectionPrefix: undefined, + register: this.register, + unregister: this.unregister, + registerInnerOnSubmit: function registerInnerOnSubmit(innerOnSubmit) { + return _this2.innerOnSubmit = innerOnSubmit; + } + }) + }; + } + }, { + key: 'initIfNeeded', + value: function initIfNeeded(nextProps) { + var enableReinitialize = this.props.enableReinitialize; + + if (nextProps) { + if ((enableReinitialize || !nextProps.initialized) && !deepEqual(this.props.initialValues, nextProps.initialValues)) { + var keepDirty = nextProps.initialized && this.props.keepDirtyOnReinitialize; + this.props.initialize(nextProps.initialValues, keepDirty); + } + } else if (this.props.initialValues && (!this.props.initialized || enableReinitialize)) { + this.props.initialize(this.props.initialValues, this.props.keepDirtyOnReinitialize); + } + } + }, { + key: 'updateSyncErrorsIfNeeded', + value: function updateSyncErrorsIfNeeded(nextSyncErrors, nextError) { + var _props = this.props, + error = _props.error, + syncErrors = _props.syncErrors, + updateSyncErrors = _props.updateSyncErrors; + + var noErrors = (!syncErrors || !Object.keys(syncErrors).length) && !error; + var nextNoErrors = (!nextSyncErrors || !Object.keys(nextSyncErrors).length) && !nextError; + if (!(noErrors && nextNoErrors) && (!__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(syncErrors, nextSyncErrors) || !__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(error, nextError))) { + updateSyncErrors(nextSyncErrors, nextError); + } + } + }, { + key: 'submitIfNeeded', + value: function submitIfNeeded(nextProps) { + var _props2 = this.props, + clearSubmit = _props2.clearSubmit, + triggerSubmit = _props2.triggerSubmit; + + if (!triggerSubmit && nextProps.triggerSubmit) { + clearSubmit(); + this.submit(); + } + } + }, { + key: 'validateIfNeeded', + value: function validateIfNeeded(nextProps) { + var _props3 = this.props, + shouldValidate = _props3.shouldValidate, + validate = _props3.validate, + values = _props3.values; + + var fieldLevelValidate = this.generateValidator(); + if (validate || fieldLevelValidate) { + var initialRender = nextProps === undefined; + var fieldValidatorKeys = Object.keys(this.fieldValidators); + var shouldValidateResult = shouldValidate({ + values: values, + nextProps: nextProps, + props: this.props, + initialRender: initialRender, + lastFieldValidatorKeys: this.lastFieldValidatorKeys, + fieldValidatorKeys: fieldValidatorKeys, + structure: structure + }); + + if (shouldValidateResult) { + var propsToValidate = initialRender ? this.props : nextProps; + + var _merge2 = __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */](validate ? validate(propsToValidate.values, propsToValidate) || {} : {}, fieldLevelValidate ? fieldLevelValidate(propsToValidate.values, propsToValidate) || {} : {}), + _error = _merge2._error, + nextSyncErrors = _objectWithoutProperties(_merge2, ['_error']); + + this.lastFieldValidatorKeys = fieldValidatorKeys; + this.updateSyncErrorsIfNeeded(nextSyncErrors, _error); + } + } + } + }, { + key: 'updateSyncWarningsIfNeeded', + value: function updateSyncWarningsIfNeeded(nextSyncWarnings, nextWarning) { + var _props4 = this.props, + warning = _props4.warning, + syncWarnings = _props4.syncWarnings, + updateSyncWarnings = _props4.updateSyncWarnings; + + var noWarnings = (!syncWarnings || !Object.keys(syncWarnings).length) && !warning; + var nextNoWarnings = (!nextSyncWarnings || !Object.keys(nextSyncWarnings).length) && !nextWarning; + if (!(noWarnings && nextNoWarnings) && (!__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(syncWarnings, nextSyncWarnings) || !__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(warning, nextWarning))) { + updateSyncWarnings(nextSyncWarnings, nextWarning); + } + } + }, { + key: 'warnIfNeeded', + value: function warnIfNeeded(nextProps) { + var _props5 = this.props, + shouldValidate = _props5.shouldValidate, + warn = _props5.warn, + values = _props5.values; + + var fieldLevelWarn = this.generateWarner(); + if (warn || fieldLevelWarn) { + var initialRender = nextProps === undefined; + var fieldWarnerKeys = Object.keys(this.fieldWarners); + var shouldWarnResult = shouldValidate({ + values: values, + nextProps: nextProps, + props: this.props, + initialRender: initialRender, + lastFieldValidatorKeys: this.lastFieldWarnerKeys, + fieldValidatorKeys: fieldWarnerKeys, + structure: structure + }); + + if (shouldWarnResult) { + var propsToWarn = initialRender ? this.props : nextProps; + + var _merge3 = __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */](warn ? warn(propsToWarn.values, propsToWarn) : {}, fieldLevelWarn ? fieldLevelWarn(propsToWarn.values, propsToWarn) : {}), + _warning = _merge3._warning, + nextSyncWarnings = _objectWithoutProperties(_merge3, ['_warning']); + + this.lastFieldWarnerKeys = fieldWarnerKeys; + this.updateSyncWarningsIfNeeded(nextSyncWarnings, _warning); + } + } + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + this.initIfNeeded(); + this.validateIfNeeded(); + this.warnIfNeeded(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.initIfNeeded(nextProps); + this.validateIfNeeded(nextProps); + this.warnIfNeeded(nextProps); + this.submitIfNeeded(nextProps); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this3 = this; + + if (!config.pure) return true; + return Object.keys(nextProps).some(function (prop) { + // useful to debug rerenders + // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { + // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) + // } + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); + }); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + var _props6 = this.props, + destroyOnUnmount = _props6.destroyOnUnmount, + destroy = _props6.destroy; + + if (destroyOnUnmount) { + this.destroyed = true; + destroy(); + } + } + }, { + key: 'getValues', + value: function getValues() { + return this.props.values; + } + }, { + key: 'isValid', + value: function isValid() { + return this.props.valid; + } + }, { + key: 'isPristine', + value: function isPristine() { + return this.props.pristine; + } + }, { + key: 'register', + value: function register(name, type, getValidator, getWarner) { + this.props.registerField(name, type); + if (getValidator) { + this.fieldValidators[name] = getValidator; + } + if (getWarner) { + this.fieldWarners[name] = getWarner; + } + } + }, { + key: 'unregister', + value: function unregister(name) { + if (!this.destroyed) { + if (this.props.destroyOnUnmount || this.props.forceUnregisterOnUnmount) { + this.props.unregisterField(name); + delete this.fieldValidators[name]; + delete this.fieldWarners[name]; + } else { + this.props.unregisterField(name, false); + } + } + } + }, { + key: 'getFieldList', + value: function getFieldList(options) { + var registeredFields = this.props.registeredFields; + var list = []; + if (!registeredFields) { + return list; + } + var keySeq = keys(registeredFields); + if (options && options.excludeFieldArray) { + keySeq = keySeq.filter(function (name) { + return getIn(registeredFields, '[\'' + name + '\'].type') !== 'FieldArray'; + }); + } + return fromJS(keySeq.reduce(function (acc, key) { + acc.push(key); + return acc; + }, list)); + } + }, { + key: 'generateValidator', + value: function generateValidator() { + var _this4 = this; + + var validators = {}; + Object.keys(this.fieldValidators).forEach(function (name) { + var validator = _this4.fieldValidators[name](); + if (validator) { + validators[name] = validator; + } + }); + return Object.keys(validators).length ? __WEBPACK_IMPORTED_MODULE_16__generateValidator__["a" /* default */](validators, structure) : undefined; + } + }, { + key: 'generateWarner', + value: function generateWarner() { + var _this5 = this; + + var warners = {}; + Object.keys(this.fieldWarners).forEach(function (name) { + var warner = _this5.fieldWarners[name](); + if (warner) { + warners[name] = warner; + } + }); + return Object.keys(warners).length ? __WEBPACK_IMPORTED_MODULE_16__generateValidator__["a" /* default */](warners, structure) : undefined; + } + }, { + key: 'asyncValidate', + value: function asyncValidate(name, value) { + var _this6 = this; + + var _props7 = this.props, + asyncBlurFields = _props7.asyncBlurFields, + asyncErrors = _props7.asyncErrors, + asyncValidate = _props7.asyncValidate, + dispatch = _props7.dispatch, + initialized = _props7.initialized, + pristine = _props7.pristine, + shouldAsyncValidate = _props7.shouldAsyncValidate, + startAsyncValidation = _props7.startAsyncValidation, + stopAsyncValidation = _props7.stopAsyncValidation, + syncErrors = _props7.syncErrors, + values = _props7.values; + + var submitting = !name; + if (asyncValidate) { + var _ret = function () { + var valuesToValidate = submitting ? values : setIn(values, name, value); + var syncValidationPasses = submitting || !getIn(syncErrors, name); + var isBlurredField = !submitting && (!asyncBlurFields || ~asyncBlurFields.indexOf(name.replace(/\[[0-9]+\]/g, '[]'))); + if ((isBlurredField || submitting) && shouldAsyncValidate({ + asyncErrors: asyncErrors, + initialized: initialized, + trigger: submitting ? 'submit' : 'blur', + blurredField: name, + pristine: pristine, + syncValidationPasses: syncValidationPasses + })) { + return { + v: __WEBPACK_IMPORTED_MODULE_12__asyncValidation__["a" /* default */](function () { + return asyncValidate(valuesToValidate, dispatch, _this6.props, name); + }, startAsyncValidation, stopAsyncValidation, name) + }; + } + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } + } + }, { + key: 'submitCompleted', + value: function submitCompleted(result) { + delete this.submitPromise; + return result; + } + }, { + key: 'submitFailed', + value: function submitFailed(error) { + delete this.submitPromise; + throw error; + } + }, { + key: 'listenToSubmit', + value: function listenToSubmit(promise) { + if (!__WEBPACK_IMPORTED_MODULE_6_is_promise___default.a(promise)) { + return promise; + } + this.submitPromise = promise; + return promise.then(this.submitCompleted, this.submitFailed); + } + }, { + key: 'submit', + value: function submit(submitOrEvent) { + var _this7 = this; + + var onSubmit = this.props.onSubmit; + + + if (!submitOrEvent || __WEBPACK_IMPORTED_MODULE_10__events_silenceEvent__["a" /* default */](submitOrEvent)) { + // submitOrEvent is an event: fire submit if not already submitting + if (!this.submitPromise) { + if (this.innerOnSubmit) { + // will call "submitOrEvent is the submit function" block below + return this.innerOnSubmit(); + } else { + return this.listenToSubmit(__WEBPACK_IMPORTED_MODULE_9__handleSubmit__["a" /* default */](checkSubmit(onSubmit), this.props, this.props.validExceptSubmit, this.asyncValidate, this.getFieldList({ excludeFieldArray: true }))); + } + } + } else { + // submitOrEvent is the submit function: return deferred submit thunk + return __WEBPACK_IMPORTED_MODULE_11__events_silenceEvents__["a" /* default */](function () { + return !_this7.submitPromise && _this7.listenToSubmit(__WEBPACK_IMPORTED_MODULE_9__handleSubmit__["a" /* default */](checkSubmit(submitOrEvent), _this7.props, _this7.props.validExceptSubmit, _this7.asyncValidate, _this7.getFieldList({ excludeFieldArray: true }))); + }); + } + } + }, { + key: 'reset', + value: function reset() { + this.props.reset(); + } + }, { + key: 'render', + value: function render() { + // remove some redux-form config-only props + /* eslint-disable no-unused-vars */ + var _props8 = this.props, + anyTouched = _props8.anyTouched, + arrayInsert = _props8.arrayInsert, + arrayMove = _props8.arrayMove, + arrayPop = _props8.arrayPop, + arrayPush = _props8.arrayPush, + arrayRemove = _props8.arrayRemove, + arrayRemoveAll = _props8.arrayRemoveAll, + arrayShift = _props8.arrayShift, + arraySplice = _props8.arraySplice, + arraySwap = _props8.arraySwap, + arrayUnshift = _props8.arrayUnshift, + asyncErrors = _props8.asyncErrors, + asyncValidate = _props8.asyncValidate, + asyncValidating = _props8.asyncValidating, + blur = _props8.blur, + change = _props8.change, + destroy = _props8.destroy, + destroyOnUnmount = _props8.destroyOnUnmount, + forceUnregisterOnUnmount = _props8.forceUnregisterOnUnmount, + dirty = _props8.dirty, + dispatch = _props8.dispatch, + enableReinitialize = _props8.enableReinitialize, + error = _props8.error, + focus = _props8.focus, + form = _props8.form, + getFormState = _props8.getFormState, + initialize = _props8.initialize, + initialized = _props8.initialized, + initialValues = _props8.initialValues, + invalid = _props8.invalid, + keepDirtyOnReinitialize = _props8.keepDirtyOnReinitialize, + pristine = _props8.pristine, + propNamespace = _props8.propNamespace, + registeredFields = _props8.registeredFields, + registerField = _props8.registerField, + reset = _props8.reset, + setSubmitFailed = _props8.setSubmitFailed, + setSubmitSucceeded = _props8.setSubmitSucceeded, + shouldAsyncValidate = _props8.shouldAsyncValidate, + shouldValidate = _props8.shouldValidate, + startAsyncValidation = _props8.startAsyncValidation, + startSubmit = _props8.startSubmit, + stopAsyncValidation = _props8.stopAsyncValidation, + stopSubmit = _props8.stopSubmit, + submitting = _props8.submitting, + submitFailed = _props8.submitFailed, + submitSucceeded = _props8.submitSucceeded, + touch = _props8.touch, + touchOnBlur = _props8.touchOnBlur, + touchOnChange = _props8.touchOnChange, + persistentSubmitErrors = _props8.persistentSubmitErrors, + syncErrors = _props8.syncErrors, + syncWarnings = _props8.syncWarnings, + unregisterField = _props8.unregisterField, + untouch = _props8.untouch, + updateSyncErrors = _props8.updateSyncErrors, + updateSyncWarnings = _props8.updateSyncWarnings, + valid = _props8.valid, + validExceptSubmit = _props8.validExceptSubmit, + values = _props8.values, + warning = _props8.warning, + rest = _objectWithoutProperties(_props8, ['anyTouched', 'arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'blur', 'change', 'destroy', 'destroyOnUnmount', 'forceUnregisterOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'focus', 'form', 'getFormState', 'initialize', 'initialized', 'initialValues', 'invalid', 'keepDirtyOnReinitialize', 'pristine', 'propNamespace', 'registeredFields', 'registerField', 'reset', 'setSubmitFailed', 'setSubmitSucceeded', 'shouldAsyncValidate', 'shouldValidate', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitting', 'submitFailed', 'submitSucceeded', 'touch', 'touchOnBlur', 'touchOnChange', 'persistentSubmitErrors', 'syncErrors', 'syncWarnings', 'unregisterField', 'untouch', 'updateSyncErrors', 'updateSyncWarnings', 'valid', 'validExceptSubmit', 'values', 'warning']); + /* eslint-enable no-unused-vars */ + + + var reduxFormProps = _extends({ + anyTouched: anyTouched, + asyncValidate: this.asyncValidate, + asyncValidating: asyncValidating + }, __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"]({ blur: blur, change: change }, dispatch), { + destroy: destroy, + dirty: dirty, + dispatch: dispatch, + error: error, + form: form, + handleSubmit: this.submit, + initialize: initialize, + initialized: initialized, + initialValues: initialValues, + invalid: invalid, + pristine: pristine, + reset: reset, + submitting: submitting, + submitFailed: submitFailed, + submitSucceeded: submitSucceeded, + touch: touch, + untouch: untouch, + valid: valid, + warning: warning + }); + var propsToPass = _extends({}, propNamespace ? _defineProperty({}, propNamespace, reduxFormProps) : reduxFormProps, rest); + if (isClassComponent(WrappedComponent)) { + propsToPass.ref = 'wrapped'; + } + return __WEBPACK_IMPORTED_MODULE_2_react__["createElement"](WrappedComponent, propsToPass); + } + }]); + + return Form; + }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); + + Form.displayName = 'Form(' + __WEBPACK_IMPORTED_MODULE_7__util_getDisplayName__["a" /* default */](WrappedComponent) + ')'; + Form.WrappedComponent = WrappedComponent; + Form.childContextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].object.isRequired + }; + Form.propTypes = { + destroyOnUnmount: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + forceUnregisterOnUnmount: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + form: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].string.isRequired, + initialValues: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].object, + getFormState: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + onSubmitFail: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + onSubmitSuccess: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + propNameSpace: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].string, + validate: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + warn: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + touchOnBlur: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + touchOnChange: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + triggerSubmit: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + persistentSubmitErrors: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + registeredFields: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].any + }; + + var connector = __WEBPACK_IMPORTED_MODULE_4_react_redux__["connect"](function (state, props) { + var form = props.form, + getFormState = props.getFormState, + initialValues = props.initialValues, + enableReinitialize = props.enableReinitialize, + keepDirtyOnReinitialize = props.keepDirtyOnReinitialize; + + var formState = getIn(getFormState(state) || empty, form) || empty; + var stateInitial = getIn(formState, 'initial'); + var initialized = !!stateInitial; + + var shouldUpdateInitialValues = enableReinitialize && initialized && !deepEqual(initialValues, stateInitial); + var shouldResetValues = shouldUpdateInitialValues && !keepDirtyOnReinitialize; + + var initial = initialValues || stateInitial || empty; + + if (shouldUpdateInitialValues) { + initial = stateInitial || empty; + } + + var values = getIn(formState, 'values') || initial; + + if (shouldResetValues) { + values = initial; + } + + var pristine = shouldResetValues || deepEqual(initial, values); + var asyncErrors = getIn(formState, 'asyncErrors'); + var syncErrors = getIn(formState, 'syncErrors') || {}; + var syncWarnings = getIn(formState, 'syncWarnings') || {}; + var registeredFields = getIn(formState, 'registeredFields'); + var valid = isValid(form, getFormState, false)(state); + var validExceptSubmit = isValid(form, getFormState, true)(state); + var anyTouched = !!getIn(formState, 'anyTouched'); + var submitting = !!getIn(formState, 'submitting'); + var submitFailed = !!getIn(formState, 'submitFailed'); + var submitSucceeded = !!getIn(formState, 'submitSucceeded'); + var error = getIn(formState, 'error'); + var warning = getIn(formState, 'warning'); + var triggerSubmit = getIn(formState, 'triggerSubmit'); + return { + anyTouched: anyTouched, + asyncErrors: asyncErrors, + asyncValidating: getIn(formState, 'asyncValidating') || false, + dirty: !pristine, + error: error, + initialized: initialized, + invalid: !valid, + pristine: pristine, + registeredFields: registeredFields, + submitting: submitting, + submitFailed: submitFailed, + submitSucceeded: submitSucceeded, + syncErrors: syncErrors, + syncWarnings: syncWarnings, + triggerSubmit: triggerSubmit, + values: values, + valid: valid, + validExceptSubmit: validExceptSubmit, + warning: warning + }; + }, function (dispatch, initialProps) { + var bindForm = function bindForm(actionCreator) { + return actionCreator.bind(null, initialProps.form); + }; + + // Bind the first parameter on `props.form` + var boundFormACs = __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */](formActions, bindForm); + var boundArrayACs = __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */](arrayActions, bindForm); + var boundBlur = function boundBlur(field, value) { + return blur(initialProps.form, field, value, !!initialProps.touchOnBlur); + }; + var boundChange = function boundChange(field, value) { + return change(initialProps.form, field, value, !!initialProps.touchOnChange, !!initialProps.persistentSubmitErrors); + }; + var boundFocus = bindForm(focus); + + // Wrap action creators with `dispatch` + var connectedFormACs = __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundFormACs, dispatch); + var connectedArrayACs = { + insert: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayInsert, dispatch), + move: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayMove, dispatch), + pop: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayPop, dispatch), + push: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayPush, dispatch), + remove: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayRemove, dispatch), + removeAll: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayRemoveAll, dispatch), + shift: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayShift, dispatch), + splice: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arraySplice, dispatch), + swap: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arraySwap, dispatch), + unshift: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayUnshift, dispatch) + }; + + var computedActions = _extends({}, connectedFormACs, boundArrayACs, { + blur: boundBlur, + change: boundChange, + array: connectedArrayACs, + focus: boundFocus, + dispatch: dispatch + }); + + return function () { + return computedActions; + }; + }, undefined, { withRef: true }); + var ConnectedForm = __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default.a(connector(Form), WrappedComponent); + ConnectedForm.defaultProps = config; + + // build outer component to expose instance api + return function (_Component2) { + _inherits(ReduxForm, _Component2); + + function ReduxForm() { + _classCallCheck(this, ReduxForm); + + return _possibleConstructorReturn(this, (ReduxForm.__proto__ || Object.getPrototypeOf(ReduxForm)).apply(this, arguments)); + } + + _createClass(ReduxForm, [{ + key: 'submit', + value: function submit() { + return this.refs.wrapped.getWrappedInstance().submit(); + } + }, { + key: 'reset', + value: function reset() { + return this.refs.wrapped.getWrappedInstance().reset(); + } + }, { + key: 'render', + value: function render() { + var _props9 = this.props, + initialValues = _props9.initialValues, + rest = _objectWithoutProperties(_props9, ['initialValues']); + + return __WEBPACK_IMPORTED_MODULE_2_react__["createElement"](ConnectedForm, _extends({}, rest, { + ref: 'wrapped', + // convert initialValues if need to + initialValues: fromJS(initialValues) + })); + } + }, { + key: 'valid', + get: function get() { + return this.refs.wrapped.getWrappedInstance().isValid(); + } + }, { + key: 'invalid', + get: function get() { + return !this.valid; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.wrapped.getWrappedInstance().isPristine(); + } + }, { + key: 'dirty', + get: function get() { + return !this.pristine; + } + }, { + key: 'values', + get: function get() { + return this.refs.wrapped.getWrappedInstance().getValues(); + } + }, { + key: 'fieldList', + get: function get() { + // mainly provided for testing + return this.refs.wrapped.getWrappedInstance().getFieldList(); + } + }, { + key: 'wrappedInstance', + get: function get() { + // for testine + return this.refs.wrapped.getWrappedInstance().refs.wrapped; + } + }]); + + return ReduxForm; + }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createReduxForm); + +/***/ }), +/* 518 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__ = __webpack_require__(519); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(544); + + + +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */](function(object, source, srcIndex) { + __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__["a" /* default */](object, source, srcIndex); +}); + +/* harmony default export */ __webpack_exports__["a"] = (merge); + + +/***/ }), +/* 519 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__ = __webpack_require__(274); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseFor_js__ = __webpack_require__(276); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__ = __webpack_require__(526); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isObject_js__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keysIn_js__ = __webpack_require__(278); + + + + + + + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + __WEBPACK_IMPORTED_MODULE_2__baseFor_js__["a" /* default */](source, function(srcValue, key) { + if (__WEBPACK_IMPORTED_MODULE_4__isObject_js__["a" /* default */](srcValue)) { + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__["a" /* default */](object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__["a" /* default */](object, key, newValue); + } + }, __WEBPACK_IMPORTED_MODULE_5__keysIn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMerge); + + +/***/ }), +/* 520 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(116); + + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */]; + this.size = 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (stackClear); + + +/***/ }), +/* 521 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (stackDelete); + + +/***/ }), +/* 522 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (stackGet); + + +/***/ }), +/* 523 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (stackHas); + + +/***/ }), +/* 524 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(116); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(175); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MapCache_js__ = __webpack_require__(173); + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */]) { + var pairs = data.__data__; + if (!__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new __WEBPACK_IMPORTED_MODULE_2__MapCache_js__["a" /* default */](pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (stackSet); + + +/***/ }), +/* 525 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (createBaseFor); + + +/***/ }), +/* 526 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__ = __webpack_require__(274); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__ = __webpack_require__(527); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__ = __webpack_require__(528); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__copyArray_js__ = __webpack_require__(270); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__ = __webpack_require__(530); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArguments_js__ = __webpack_require__(179); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__ = __webpack_require__(533); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__ = __webpack_require__(181); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__isFunction_js__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__isObject_js__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__ = __webpack_require__(182); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__ = __webpack_require__(538); + + + + + + + + + + + + + + + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */](object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = __WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */](srcValue), + isBuff = !isArr && __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__["a" /* default */](srcValue), + isTyped = !isArr && !isBuff && __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__["a" /* default */](srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */](objValue)) { + newValue = objValue; + } + else if (__WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__["a" /* default */](objValue)) { + newValue = __WEBPACK_IMPORTED_MODULE_3__copyArray_js__["a" /* default */](objValue); + } + else if (isBuff) { + isCommon = false; + newValue = __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__["a" /* default */](srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__["a" /* default */](srcValue, true); + } + else { + newValue = []; + } + } + else if (__WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__["a" /* default */](srcValue) || __WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */](srcValue)) { + newValue = objValue; + if (__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */](objValue)) { + newValue = __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__["a" /* default */](objValue); + } + else if (!__WEBPACK_IMPORTED_MODULE_10__isObject_js__["a" /* default */](objValue) || (srcIndex && __WEBPACK_IMPORTED_MODULE_9__isFunction_js__["a" /* default */](objValue))) { + newValue = __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__["a" /* default */](srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */](object, key, newValue); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMergeDeep); + + +/***/ }), +/* 527 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29); + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneBuffer); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(177)(module))) + +/***/ }), +/* 528 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__ = __webpack_require__(529); + + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__["a" /* default */](typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneTypedArray); + + +/***/ }), +/* 529 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__ = __webpack_require__(277); + + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](result).set(new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](arrayBuffer)); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneArrayBuffer); + + +/***/ }), +/* 530 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(531); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(258); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isPrototype_js__ = __webpack_require__(178); + + + + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !__WEBPACK_IMPORTED_MODULE_2__isPrototype_js__["a" /* default */](object)) + ? __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */](object)) + : {}; +} + +/* harmony default export */ __webpack_exports__["a"] = (initCloneObject); + + +/***/ }), +/* 531 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(45); + + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +/* harmony default export */ __webpack_exports__["a"] = (baseCreate); + + +/***/ }), +/* 532 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(55); + + + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) == argsTag; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsArguments); + + +/***/ }), +/* 533 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(120); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(55); + + + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isArrayLikeObject); + + +/***/ }), +/* 534 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (stubFalse); + + +/***/ }), +/* 535 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(180); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(55); + + + + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */](value) && + __WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */](value.length) && !!typedArrayTags[__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value)]; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsTypedArray); + + +/***/ }), +/* 536 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseUnary); + + +/***/ }), +/* 537 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(257); + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */].process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* harmony default export */ __webpack_exports__["a"] = (nodeUtil); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(177)(module))) + +/***/ }), +/* 538 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(539); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keysIn_js__ = __webpack_require__(278); + + + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return __WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */](value, __WEBPACK_IMPORTED_MODULE_1__keysIn_js__["a" /* default */](value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (toPlainObject); + + +/***/ }), +/* 539 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignValue_js__ = __webpack_require__(540); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__ = __webpack_require__(119); + + + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__["a" /* default */](object, key, newValue); + } else { + __WEBPACK_IMPORTED_MODULE_0__assignValue_js__["a" /* default */](object, key, newValue); + } + } + return object; +} + +/* harmony default export */ __webpack_exports__["a"] = (copyObject); + + +/***/ }), +/* 540 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(119); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(91); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && __WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */](objValue, value)) || + (value === undefined && !(key in object))) { + __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](object, key, value); + } +} + +/* harmony default export */ __webpack_exports__["a"] = (assignValue); + + +/***/ }), +/* 541 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseTimes); + + +/***/ }), +/* 542 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__ = __webpack_require__(543); + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](object)) { + return __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__["a" /* default */](object); + } + var isProto = __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__["a" /* default */](object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseKeysIn); + + +/***/ }), +/* 543 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (nativeKeysIn); + + +/***/ }), +/* 544 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(545); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(552); + + + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return __WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */](function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */](sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (createAssigner); + + +/***/ }), +/* 545 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(184); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__overRest_js__ = __webpack_require__(546); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setToString_js__ = __webpack_require__(548); + + + + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return __WEBPACK_IMPORTED_MODULE_2__setToString_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__overRest_js__["a" /* default */](func, start, __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */]), func + ''); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseRest); + + +/***/ }), +/* 546 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(547); + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return __WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */](func, this, otherArgs); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (overRest); + + +/***/ }), +/* 547 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/* harmony default export */ __webpack_exports__["a"] = (apply); + + +/***/ }), +/* 548 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__ = __webpack_require__(549); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shortOut_js__ = __webpack_require__(551); + + + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = __WEBPACK_IMPORTED_MODULE_1__shortOut_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (setToString); + + +/***/ }), +/* 549 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(550); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__ = __webpack_require__(275); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(184); + + + + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */] : function(func, string) { + return __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */](func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': __WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */](string), + 'writable': true + }); +}; + +/* harmony default export */ __webpack_exports__["a"] = (baseSetToString); + + +/***/ }), +/* 550 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (constant); + + +/***/ }), +/* 551 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (shortOut); + + +/***/ }), +/* 552 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(91); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(120); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isIndex_js__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isObject_js__ = __webpack_require__(45); + + + + + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!__WEBPACK_IMPORTED_MODULE_3__isObject_js__["a" /* default */](object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */](object) && __WEBPACK_IMPORTED_MODULE_2__isIndex_js__["a" /* default */](index, object.length)) + : (type == 'string' && index in object) + ) { + return __WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */](object[index], value); + } + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (isIterateeCall); + + +/***/ }), +/* 553 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFor_js__ = __webpack_require__(276); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(185); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && __WEBPACK_IMPORTED_MODULE_0__baseFor_js__["a" /* default */](object, iteratee, __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseForOwn); + + +/***/ }), +/* 554 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPrototype_js__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__ = __webpack_require__(555); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!__WEBPACK_IMPORTED_MODULE_0__isPrototype_js__["a" /* default */](object)) { + return __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__["a" /* default */](object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseKeys); + + +/***/ }), +/* 555 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(259); + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = __WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */](Object.keys, Object); + +/* harmony default export */ __webpack_exports__["a"] = (nativeKeys); + + +/***/ }), +/* 556 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__ = __webpack_require__(557); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__ = __webpack_require__(581); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(184); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__property_js__ = __webpack_require__(586); + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */]; + } + if (typeof value == 'object') { + return __WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */](value) + ? __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__["a" /* default */](value[0], value[1]) + : __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__["a" /* default */](value); + } + return __WEBPACK_IMPORTED_MODULE_4__property_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIteratee); + + +/***/ }), +/* 557 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__ = __webpack_require__(558); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__ = __webpack_require__(580); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__ = __webpack_require__(283); + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__["a" /* default */](source); + if (matchData.length == 1 && matchData[0][2]) { + return __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__["a" /* default */](matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__["a" /* default */](object, source, matchData); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMatches); + + +/***/ }), +/* 558 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__ = __webpack_require__(186); + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__["a" /* default */](srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsMatch); + + +/***/ }), +/* 559 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__ = __webpack_require__(281); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__ = __webpack_require__(565); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__ = __webpack_require__(568); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getTag_js__ = __webpack_require__(575); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__ = __webpack_require__(181); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__ = __webpack_require__(182); + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = __WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */](object), + othIsArr = __WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */](other), + objTag = objIsArr ? arrayTag : __WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */](object), + othTag = othIsArr ? arrayTag : __WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */](other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */](object)) { + if (!__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */](other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return (objIsArr || __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__["a" /* default */](object)) + ? __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__["a" /* default */](object, other, bitmask, customizer, equalFunc, stack) + : __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__["a" /* default */](object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__["a" /* default */](object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsEqualDeep); + + +/***/ }), +/* 560 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(173); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__ = __webpack_require__(561); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__ = __webpack_require__(562); + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__["a" /* default */]; +SetCache.prototype.has = __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (SetCache); + + +/***/ }), +/* 561 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (setCacheAdd); + + +/***/ }), +/* 562 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (setCacheHas); + + +/***/ }), +/* 563 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (arraySome); + + +/***/ }), +/* 564 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (cacheHas); + + +/***/ }), +/* 565 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__ = __webpack_require__(277); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__eq_js__ = __webpack_require__(91); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__ = __webpack_require__(281); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__ = __webpack_require__(566); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__setToArray_js__ = __webpack_require__(567); + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](object), new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return __WEBPACK_IMPORTED_MODULE_2__eq_js__["a" /* default */](+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__["a" /* default */]; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = __WEBPACK_IMPORTED_MODULE_5__setToArray_js__["a" /* default */]); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__["a" /* default */](convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (equalByTag); + + +/***/ }), +/* 566 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapToArray); + + +/***/ }), +/* 567 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (setToArray); + + +/***/ }), +/* 568 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__ = __webpack_require__(569); + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */](object), + objLength = objProps.length, + othProps = __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */](other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (equalObjects); + + +/***/ }), +/* 569 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__ = __webpack_require__(570); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__ = __webpack_require__(572); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(185); + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__["a" /* default */](object, __WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (getAllKeys); + + +/***/ }), +/* 570 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__ = __webpack_require__(571); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(30); + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return __WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */](object) ? result : __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__["a" /* default */](result, symbolsFunc(object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseGetAllKeys); + + +/***/ }), +/* 571 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayPush); + + +/***/ }), +/* 572 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(573); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubArray_js__ = __webpack_require__(574); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? __WEBPACK_IMPORTED_MODULE_1__stubArray_js__["a" /* default */] : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */](nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ __webpack_exports__["a"] = (getSymbols); + + +/***/ }), +/* 573 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayFilter); + + +/***/ }), +/* 574 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ __webpack_exports__["a"] = (stubArray); + + +/***/ }), +/* 575 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DataView_js__ = __webpack_require__(576); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(175); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Promise_js__ = __webpack_require__(577); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Set_js__ = __webpack_require__(578); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__ = __webpack_require__(579); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toSource_js__ = __webpack_require__(272); + + + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */]), + mapCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]), + promiseCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */]), + setCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]), + weakMapCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */]; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */](new ArrayBuffer(1))) != dataViewTag) || + (__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]) != mapTag) || + (__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */] && getTag(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */].resolve()) != promiseTag) || + (__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]) != setTag) || + (__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]) != weakMapTag)) { + getTag = function(value) { + var result = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */](value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (getTag); + + +/***/ }), +/* 576 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(56); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29); + + + +/* Built-in method references that are verified to be native. */ +var DataView = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'DataView'); + +/* harmony default export */ __webpack_exports__["a"] = (DataView); + + +/***/ }), +/* 577 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(56); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29); + + + +/* Built-in method references that are verified to be native. */ +var Promise = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Promise'); + +/* harmony default export */ __webpack_exports__["a"] = (Promise); + + +/***/ }), +/* 578 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(56); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29); + + + +/* Built-in method references that are verified to be native. */ +var Set = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Set'); + +/* harmony default export */ __webpack_exports__["a"] = (Set); + + +/***/ }), +/* 579 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(56); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29); + + + +/* Built-in method references that are verified to be native. */ +var WeakMap = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'WeakMap'); + +/* harmony default export */ __webpack_exports__["a"] = (WeakMap); + + +/***/ }), +/* 580 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__ = __webpack_require__(282); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(185); + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */](object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__["a" /* default */](value)]; + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (getMatchData); + + +/***/ }), +/* 581 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(186); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__get_js__ = __webpack_require__(582); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hasIn_js__ = __webpack_require__(583); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isKey_js__ = __webpack_require__(187); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__ = __webpack_require__(282); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__ = __webpack_require__(283); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toKey_js__ = __webpack_require__(92); + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (__WEBPACK_IMPORTED_MODULE_3__isKey_js__["a" /* default */](path) && __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__["a" /* default */](srcValue)) { + return __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_6__toKey_js__["a" /* default */](path), srcValue); + } + return function(object) { + var objValue = __WEBPACK_IMPORTED_MODULE_1__get_js__["a" /* default */](object, path); + return (objValue === undefined && objValue === srcValue) + ? __WEBPACK_IMPORTED_MODULE_2__hasIn_js__["a" /* default */](object, path) + : __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */](srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMatchesProperty); + + +/***/ }), +/* 582 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(284); + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : __WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */](object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ __webpack_exports__["a"] = (get); + + +/***/ }), +/* 583 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__ = __webpack_require__(584); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasPath_js__ = __webpack_require__(585); + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && __WEBPACK_IMPORTED_MODULE_1__hasPath_js__["a" /* default */](object, path, __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (hasIn); + + +/***/ }), +/* 584 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseHasIn); + + +/***/ }), +/* 585 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(285); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(179); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isIndex_js__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isLength_js__ = __webpack_require__(180); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(92); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = __WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */](path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */](path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && __WEBPACK_IMPORTED_MODULE_4__isLength_js__["a" /* default */](length) && __WEBPACK_IMPORTED_MODULE_3__isIndex_js__["a" /* default */](key, length) && + (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](object) || __WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */](object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (hasPath); + + +/***/ }), +/* 586 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__ = __webpack_require__(587); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__ = __webpack_require__(588); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isKey_js__ = __webpack_require__(187); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toKey_js__ = __webpack_require__(92); + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return __WEBPACK_IMPORTED_MODULE_2__isKey_js__["a" /* default */](path) ? __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__toKey_js__["a" /* default */](path)) : __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__["a" /* default */](path); +} + +/* harmony default export */ __webpack_exports__["a"] = (property); + + +/***/ }), +/* 587 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseProperty); + + +/***/ }), +/* 588 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(284); + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return __WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */](object, path); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (basePropertyDeep); + + +/***/ }), +/* 589 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var getDisplayName = function getDisplayName(Comp) { + return Comp.displayName || Comp.name || 'Component'; +}; + +/* harmony default export */ __webpack_exports__["a"] = (getDisplayName); + +/***/ }), +/* 590 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(188); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubmissionError__ = __webpack_require__(287); +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + + + + +var handleSubmit = function handleSubmit(submit, props, valid, asyncValidate, fields) { + var dispatch = props.dispatch, + onSubmitFail = props.onSubmitFail, + onSubmitSuccess = props.onSubmitSuccess, + startSubmit = props.startSubmit, + stopSubmit = props.stopSubmit, + setSubmitFailed = props.setSubmitFailed, + setSubmitSucceeded = props.setSubmitSucceeded, + syncErrors = props.syncErrors, + touch = props.touch, + values = props.values, + persistentSubmitErrors = props.persistentSubmitErrors; + + + touch.apply(undefined, _toConsumableArray(fields)); // mark all fields as touched + + if (valid || persistentSubmitErrors) { + var _ret = function () { + var doSubmit = function doSubmit() { + var result = void 0; + try { + result = submit(values, dispatch, props); + } catch (submitError) { + var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; + stopSubmit(error); + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(error, dispatch, submitError, props); + } + if (error || onSubmitFail) { + // if you've provided an onSubmitFail callback, don't re-throw the error + return error; + } else { + throw submitError; + } + } + if (__WEBPACK_IMPORTED_MODULE_0_is_promise___default.a(result)) { + startSubmit(); + return result.then(function (submitResult) { + stopSubmit(); + setSubmitSucceeded(); + if (onSubmitSuccess) { + onSubmitSuccess(submitResult, dispatch, props); + } + return submitResult; + }, function (submitError) { + var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; + stopSubmit(error); + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(error, dispatch, submitError, props); + } + if (error || onSubmitFail) { + // if you've provided an onSubmitFail callback, don't re-throw the error + return error; + } else { + throw submitError; + } + }); + } else { + setSubmitSucceeded(); + if (onSubmitSuccess) { + onSubmitSuccess(result, dispatch, props); + } + } + return result; + }; + + var asyncValidateResult = asyncValidate && asyncValidate(); + if (asyncValidateResult) { + return { + v: asyncValidateResult.then(function (asyncErrors) { + if (asyncErrors) { + throw asyncErrors; + } + return doSubmit(); + }).catch(function (asyncErrors) { + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(asyncErrors, dispatch, null, props); + } + return Promise.reject(asyncErrors); + }) + }; + } else { + return { + v: doSubmit() + }; + } + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } else { + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(syncErrors, dispatch, null, props); + } + return syncErrors; + } +}; + +/* harmony default export */ __webpack_exports__["a"] = (handleSubmit); + +/***/ }), +/* 591 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +function _extendableBuiltin(cls) { + function ExtendableBuiltin() { + cls.apply(this, arguments); + } + + ExtendableBuiltin.prototype = Object.create(cls.prototype, { + constructor: { + value: cls, + enumerable: false, + writable: true, + configurable: true + } + }); + + if (Object.setPrototypeOf) { + Object.setPrototypeOf(ExtendableBuiltin, cls); + } else { + ExtendableBuiltin.__proto__ = cls; + } + + return ExtendableBuiltin; +} + +var ExtendableError = function (_extendableBuiltin2) { + _inherits(ExtendableError, _extendableBuiltin2); + + function ExtendableError() { + var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + + _classCallCheck(this, ExtendableError); + + // extending Error is weird and does not propagate `message` + var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message)); + + Object.defineProperty(_this, 'message', { + configurable: true, + enumerable: false, + value: message, + writable: true + }); + + Object.defineProperty(_this, 'name', { + configurable: true, + enumerable: false, + value: _this.constructor.name, + writable: true + }); + + if (Error.hasOwnProperty('captureStackTrace')) { + Error.captureStackTrace(_this, _this.constructor); + return _possibleConstructorReturn(_this); + } + + Object.defineProperty(_this, 'stack', { + configurable: true, + enumerable: false, + value: new Error(message).stack, + writable: true + }); + return _this; + } + + return ExtendableError; +}(_extendableBuiltin(Error)); + +exports.default = ExtendableError; +module.exports = exports['default']; + + +/***/ }), +/* 592 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__silenceEvent__ = __webpack_require__(288); + + +var silenceEvents = function silenceEvents(fn) { + return function (event) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return __WEBPACK_IMPORTED_MODULE_0__silenceEvent__["a" /* default */](event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args)); + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (silenceEvents); + +/***/ }), +/* 593 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(188); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); + + +var asyncValidation = function asyncValidation(fn, start, stop, field) { + start(field); + var promise = fn(); + if (!__WEBPACK_IMPORTED_MODULE_0_is_promise___default.a(promise)) { + throw new Error('asyncValidate function passed to reduxForm must return a promise'); + } + var handleErrors = function handleErrors(rejected) { + return function (errors) { + if (errors && Object.keys(errors).length) { + stop(errors); + return errors; + } else if (rejected) { + stop(); + throw new Error('Asynchronous validation promise was rejected without errors.'); + } + stop(); + return Promise.resolve(); + }; + }; + return promise.then(handleErrors(false), handleErrors(true)); +}; + +/* harmony default export */ __webpack_exports__["a"] = (asyncValidation); + +/***/ }), +/* 594 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var defaultShouldAsyncValidate = function defaultShouldAsyncValidate(_ref) { + var initialized = _ref.initialized, + trigger = _ref.trigger, + pristine = _ref.pristine, + syncValidationPasses = _ref.syncValidationPasses; + + if (!syncValidationPasses) { + return false; + } + switch (trigger) { + case 'blur': + // blurring + return true; + case 'submit': + // submitting, so only async validate if form is dirty or was never initialized + // conversely, DON'T async validate if the form is pristine just as it was initialized + return !pristine || !initialized; + default: + return false; + } +}; + +/* harmony default export */ __webpack_exports__["a"] = (defaultShouldAsyncValidate); + +/***/ }), +/* 595 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var defaultShouldValidate = function defaultShouldValidate(_ref) { + var values = _ref.values, + nextProps = _ref.nextProps, + initialRender = _ref.initialRender, + lastFieldValidatorKeys = _ref.lastFieldValidatorKeys, + fieldValidatorKeys = _ref.fieldValidatorKeys, + structure = _ref.structure; + + if (initialRender) { + return true; + } + return !structure.deepEqual(values, nextProps.values) || !structure.deepEqual(lastFieldValidatorKeys, fieldValidatorKeys); +}; + +/* harmony default export */ __webpack_exports__["a"] = (defaultShouldValidate); + +/***/ }), +/* 596 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var splice = function splice(array, index, removeNum, value) { + array = array || []; + + if (index < array.length) { + if (value === undefined && !removeNum) { + // inserting undefined + var _copy2 = [].concat(_toConsumableArray(array)); + _copy2.splice(index, 0, null); + _copy2[index] = undefined; + return _copy2; + } + if (value != null) { + var _copy3 = [].concat(_toConsumableArray(array)); + _copy3.splice(index, removeNum, value); // removing and adding + return _copy3; + } + var _copy = [].concat(_toConsumableArray(array)); + _copy.splice(index, removeNum); // removing + return _copy; + } + if (removeNum) { + // trying to remove non-existant item: return original array + return array; + } + // trying to add outside of range: just set value + var copy = [].concat(_toConsumableArray(array)); + copy[index] = value; + return copy; +}; + +/* harmony default export */ __webpack_exports__["a"] = (splice); + +/***/ }), +/* 597 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(113); + + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var setInWithPath = function setInWithPath(state, value, path, pathIndex) { + if (pathIndex >= path.length) { + return value; + } + + var first = path[pathIndex]; + var next = setInWithPath(state && state[first], value, path, pathIndex + 1); + + if (!state) { + var initialized = isNaN(first) ? {} : []; + initialized[first] = next; + return initialized; + } + + if (Array.isArray(state)) { + var copy = [].concat(state); + copy[first] = next; + return copy; + } + + return _extends({}, state, _defineProperty({}, first, next)); +}; + +var setIn = function setIn(state, field, value) { + return setInWithPath(state, value, __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field), 0); +}; + +/* harmony default export */ __webpack_exports__["a"] = (setIn); + +/***/ }), +/* 598 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(291); + + + +var customizer = function customizer(obj, other) { + if (obj === other) return true; + if ((obj == null || obj === '' || obj === false) && (other == null || other === '' || other === false)) return true; + + if (obj && other && obj._error !== other._error) return false; + if (obj && other && obj._warning !== other._warning) return false; +}; + +var deepEqual = function deepEqual(a, b) { + return __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](a, b, customizer); +}; + +/* harmony default export */ __webpack_exports__["a"] = (deepEqual); + +/***/ }), +/* 599 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(113); + + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var deleteInWithPath = function deleteInWithPath(state, first) { + for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + rest[_key - 2] = arguments[_key]; + } + + if (state === undefined || first === undefined) { + return state; + } + if (rest.length) { + if (Array.isArray(state)) { + if (first < state.length) { + var result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); + if (result !== state[first]) { + var copy = [].concat(_toConsumableArray(state)); + copy[first] = result; + return copy; + } + } + return state; + } + if (first in state) { + var _result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); + return state[first] === _result ? state : _extends({}, state, _defineProperty({}, first, _result)); + } + return state; + } + if (Array.isArray(state)) { + if (isNaN(first)) { + throw new Error('Cannot delete non-numerical index from an array'); + } + if (first < state.length) { + var _copy = [].concat(_toConsumableArray(state)); + _copy.splice(first, 1); + return _copy; + } + return state; + } + if (first in state) { + var _copy2 = _extends({}, state); + delete _copy2[first]; + return _copy2; + } + return state; +}; + +var deleteIn = function deleteIn(state, field) { + return deleteInWithPath.apply(undefined, [state].concat(_toConsumableArray(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field)))); +}; + +/* harmony default export */ __webpack_exports__["a"] = (deleteIn); + +/***/ }), +/* 600 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var keys = function keys(value) { + return value ? Object.keys(value) : []; +}; + +/* harmony default export */ __webpack_exports__["a"] = (keys); + +/***/ }), +/* 601 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain__ = __webpack_require__(46); + + +var toArray = function toArray(value) { + return Array.isArray(value) ? value : [value]; +}; + +var getError = function getError(value, values, props, validators) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = toArray(validators)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var validator = _step.value; + + var error = validator(value, values, props); + if (error) { + return error; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } +}; + +var generateValidator = function generateValidator(validators, _ref) { + var getIn = _ref.getIn; + return function (values, props) { + var errors = {}; + Object.keys(validators).forEach(function (name) { + var value = getIn(values, name); + var error = getError(value, values, props, validators[name]); + if (error) { + errors = __WEBPACK_IMPORTED_MODULE_0__structure_plain__["a" /* default */].setIn(errors, name, error); + } + }); + return errors; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (generateValidator); + +/***/ }), +/* 602 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain_getIn__ = __webpack_require__(290); + + +var getErrorKeys = function getErrorKeys(name, type) { + switch (type) { + case 'Field': + return [name, name + '._error']; + case 'FieldArray': + return [name + '._error']; + } +}; + +var createHasError = function createHasError(_ref) { + var getIn = _ref.getIn; + + var hasError = function hasError(field, syncErrors, asyncErrors, submitErrors) { + if (!syncErrors && !asyncErrors && !submitErrors) { + return false; + } + + var name = getIn(field, 'name'); + var type = getIn(field, 'type'); + return getErrorKeys(name, type).some(function (key) { + return __WEBPACK_IMPORTED_MODULE_0__structure_plain_getIn__["a" /* default */](syncErrors, key) || getIn(asyncErrors, key) || getIn(submitErrors, key); + }); + }; + return hasError; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createHasError); + +/***/ }), +/* 603 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedField__ = __webpack_require__(604); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(190); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(121); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + +var createField = function createField(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + setIn = _ref.setIn, + toJS = _ref.toJS; + + + var ConnectedField = __WEBPACK_IMPORTED_MODULE_2__ConnectedField__["a" /* default */]({ + deepEqual: deepEqual, + getIn: getIn, + toJS: toJS + }); + + var Field = function (_Component) { + _inherits(Field, _Component); + + function Field(props, context) { + _classCallCheck(this, Field); + + var _this = _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Field must be inside a component decorated with reduxForm()'); + } + + _this.normalize = _this.normalize.bind(_this); + return _this; + } + + _createClass(Field, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; + + this.context._reduxForm.register(this.name, 'Field', function () { + return _this2.props.validate; + }, function () { + return _this2.props.warn; + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.name !== nextProps.name) { + // unregister old name + this.context._reduxForm.unregister(this.name); + // register new name + this.context._reduxForm.register(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, nextProps.name), 'Field'); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context._reduxForm.unregister(this.name); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Field'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'normalize', + value: function normalize(name, value) { + var normalize = this.props.normalize; + + if (!normalize) { + return value; + } + var previousValues = this.context._reduxForm.getValues(); + var previousValue = this.value; + var nextValues = setIn(previousValues, name, value); + return normalize(value, previousValue, nextValues, previousValues); + } + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedField, _extends({}, this.props, { + name: this.name, + normalize: this.normalize, + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'name', + get: function get() { + return __WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, this.props.name); + } + }, { + key: 'dirty', + get: function get() { + return !this.pristine; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.connected.getWrappedInstance().isPristine(); + } + }, { + key: 'value', + get: function get() { + return this.refs.connected && this.refs.connected.getWrappedInstance().getValue(); + } + }]); + + return Field; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + Field.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + format: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + normalize: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onBlur: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onChange: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onFocus: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onDragStart: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onDrop: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + parse: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + Field.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + + return Field; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createField); + +/***/ }), +/* 604 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createFieldProps__ = __webpack_require__(292); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__structure_plain__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(293); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__ = __webpack_require__(607); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + + +var propsToNotUpdateFor = ['_reduxForm']; + +var createConnectedField = function createConnectedField(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS; + + + var getSyncError = function getSyncError(syncErrors, name) { + var error = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncErrors, name); + // Because the error for this field might not be at a level in the error structure where + // it can be set directly, it might need to be unwrapped from the _error property + return error && error._error ? error._error : error; + }; + + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + var warning = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncWarnings, name); + // Because the warning for this field might not be at a level in the warning structure where + // it can be set directly, it might need to be unwrapped from the _warning property + return warning && warning._warning ? warning._warning : warning; + }; + + var ConnectedField = function (_Component) { + _inherits(ConnectedField, _Component); + + function ConnectedField(props) { + _classCallCheck(this, ConnectedField); + + var _this = _possibleConstructorReturn(this, (ConnectedField.__proto__ || Object.getPrototypeOf(ConnectedField)).call(this, props)); + + _this.handleChange = _this.handleChange.bind(_this); + _this.handleFocus = _this.handleFocus.bind(_this); + _this.handleBlur = _this.handleBlur.bind(_this); + _this.handleDragStart = _this.handleDragStart.bind(_this); + _this.handleDrop = _this.handleDrop.bind(_this); + return _this; + } + + _createClass(ConnectedField, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this2 = this; + + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); + }); + } + }, { + key: 'isPristine', + value: function isPristine() { + return this.props.pristine; + } + }, { + key: 'getValue', + value: function getValue() { + return this.props.value; + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'handleChange', + value: function handleChange(event) { + var _props = this.props, + name = _props.name, + dispatch = _props.dispatch, + parse = _props.parse, + normalize = _props.normalize, + onChange = _props.onChange, + _reduxForm = _props._reduxForm, + previousValue = _props.value; + + var newValue = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); + + var defaultPrevented = false; + if (onChange) { + onChange(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + }), newValue, previousValue); + } + if (!defaultPrevented) { + // dispatch change action + dispatch(_reduxForm.change(name, newValue)); + } + } + }, { + key: 'handleFocus', + value: function handleFocus(event) { + var _props2 = this.props, + name = _props2.name, + dispatch = _props2.dispatch, + onFocus = _props2.onFocus, + _reduxForm = _props2._reduxForm; + + + var defaultPrevented = false; + if (onFocus) { + onFocus(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + })); + } + + if (!defaultPrevented) { + dispatch(_reduxForm.focus(name)); + } + } + }, { + key: 'handleBlur', + value: function handleBlur(event) { + var _props3 = this.props, + name = _props3.name, + dispatch = _props3.dispatch, + parse = _props3.parse, + normalize = _props3.normalize, + onBlur = _props3.onBlur, + _reduxForm = _props3._reduxForm, + _value = _props3._value, + previousValue = _props3.value; + + var newValue = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); + + // for checkbox and radio, if the value property of checkbox or radio equals + // the value passed by blur event, then fire blur action with previousValue. + if (newValue === _value && _value !== undefined) { + newValue = previousValue; + } + + var defaultPrevented = false; + if (onBlur) { + onBlur(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + }), newValue, previousValue); + } + + if (!defaultPrevented) { + // dispatch blur action + dispatch(_reduxForm.blur(name, newValue)); + + // call post-blur callback + if (_reduxForm.asyncValidate) { + _reduxForm.asyncValidate(name, newValue); + } + } + } + }, { + key: 'handleDragStart', + value: function handleDragStart(event) { + var _props4 = this.props, + onDragStart = _props4.onDragStart, + value = _props4.value; + + event.dataTransfer.setData(__WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */], value == null ? '' : value); + + if (onDragStart) { + onDragStart(event); + } + } + }, { + key: 'handleDrop', + value: function handleDrop(event) { + var _props5 = this.props, + name = _props5.name, + dispatch = _props5.dispatch, + onDrop = _props5.onDrop, + _reduxForm = _props5._reduxForm, + previousValue = _props5.value; + + var newValue = event.dataTransfer.getData(__WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */]); + + var defaultPrevented = false; + if (onDrop) { + onDrop(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + }), newValue, previousValue); + } + + if (!defaultPrevented) { + // dispatch change action + dispatch(_reduxForm.change(name, newValue)); + event.preventDefault(); + } + } + }, { + key: 'render', + value: function render() { + var _props6 = this.props, + component = _props6.component, + withRef = _props6.withRef, + name = _props6.name, + _reduxForm = _props6._reduxForm, + normalize = _props6.normalize, + onBlur = _props6.onBlur, + onChange = _props6.onChange, + onFocus = _props6.onFocus, + onDragStart = _props6.onDragStart, + onDrop = _props6.onDrop, + rest = _objectWithoutProperties(_props6, ['component', 'withRef', 'name', '_reduxForm', 'normalize', 'onBlur', 'onChange', 'onFocus', 'onDragStart', 'onDrop']); + + var _createFieldProps = __WEBPACK_IMPORTED_MODULE_2__createFieldProps__["a" /* default */]({ getIn: getIn, toJS: toJS }, name, _extends({}, rest, { + form: _reduxForm.form, + onBlur: this.handleBlur, + onChange: this.handleChange, + onDrop: this.handleDrop, + onDragStart: this.handleDragStart, + onFocus: this.handleFocus + })), + custom = _createFieldProps.custom, + props = _objectWithoutProperties(_createFieldProps, ['custom']); + + if (withRef) { + custom.ref = 'renderedComponent'; + } + if (typeof component === 'string') { + var input = props.input, + meta = props.meta; // eslint-disable-line no-unused-vars + // flatten input into other props + + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, input, custom)); + } else { + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, props, custom)); + } + } + }]); + + return ConnectedField; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + ConnectedField.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + + var connector = __WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"](function (state, ownProps) { + var name = ownProps.name, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; + + var formState = getFormState(state); + var initialState = getIn(formState, 'initial.' + name); + var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var submitting = getIn(formState, 'submitting'); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var pristine = value === initial; + return { + asyncError: getIn(formState, 'asyncErrors.' + name), + asyncValidating: getIn(formState, 'asyncValidating') === name, + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name), + submitFailed: getIn(formState, 'submitFailed'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + _value: ownProps.value // save value passed in (for checkboxes) + }; + }, undefined, undefined, { withRef: true }); + return connector(ConnectedField); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createConnectedField); + +/***/ }), +/* 605 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(289); + + +var getSelectedValues = function getSelectedValues(options) { + var result = []; + if (options) { + for (var index = 0; index < options.length; index++) { + var option = options[index]; + if (option.selected) { + result.push(option.value); + } + } + } + return result; +}; + +var getValue = function getValue(event, isReactNative) { + if (__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */](event)) { + if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) { + return event.nativeEvent.text; + } + if (isReactNative && event.nativeEvent !== undefined) { + return event.nativeEvent.text; + } + var _event$target = event.target, + type = _event$target.type, + value = _event$target.value, + checked = _event$target.checked, + files = _event$target.files, + dataTransfer = event.dataTransfer; + + if (type === 'checkbox') { + return checked; + } + if (type === 'file') { + return files || dataTransfer && dataTransfer.files; + } + if (type === 'select-multiple') { + return getSelectedValues(event.target.options); + } + return value; + } + return event; +}; + +/* harmony default export */ __webpack_exports__["a"] = (getValue); + +/***/ }), +/* 606 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var isReactNative = typeof window !== 'undefined' && window.navigator && window.navigator.product && window.navigator.product === 'ReactNative'; + +/* harmony default export */ __webpack_exports__["a"] = (isReactNative); + +/***/ }), +/* 607 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dataKey; }); +var dataKey = 'text'; + +/***/ }), +/* 608 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedFields__ = __webpack_require__(609); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(190); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__structure_plain__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_prefixName__ = __webpack_require__(121); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + + +var validateNameProp = function validateNameProp(prop) { + if (!prop) { + return new Error('No "names" prop was specified <Fields/>'); + } + if (!Array.isArray(prop) && !prop._isFieldArray) { + return new Error('Invalid prop "names" supplied to <Fields/>. Must be either an array of strings or the fields array generated by FieldArray.'); + } +}; + +var createFields = function createFields(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS, + size = _ref.size; + + + var ConnectedFields = __WEBPACK_IMPORTED_MODULE_2__ConnectedFields__["a" /* default */]({ + deepEqual: deepEqual, + getIn: getIn, + toJS: toJS, + size: size + }); + + var Fields = function (_Component) { + _inherits(Fields, _Component); + + function Fields(props, context) { + _classCallCheck(this, Fields); + + var _this = _possibleConstructorReturn(this, (Fields.__proto__ || Object.getPrototypeOf(Fields)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Fields must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(Fields, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var error = validateNameProp(this.props.names); + if (error) { + throw error; + } + var context = this.context; + var register = context._reduxForm.register; + + this.names.forEach(function (name) { + return register(name, 'Field'); + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; + + if (!__WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].deepEqual(this.props.names, nextProps.names)) { + (function () { + var context = _this2.context; + var _context$_reduxForm = context._reduxForm, + register = _context$_reduxForm.register, + unregister = _context$_reduxForm.unregister; + // unregister old name + + _this2.props.names.forEach(function (name) { + return unregister(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name)); + }); + // register new name + nextProps.names.forEach(function (name) { + return register(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name), 'Field'); + }); + })(); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + var context = this.context; + var unregister = context._reduxForm.unregister; + + this.props.names.forEach(function (name) { + return unregister(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name)); + }); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Fields'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'render', + value: function render() { + var context = this.context; + + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedFields, _extends({}, this.props, { + names: this.props.names.map(function (name) { + return __WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name); + }), + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'names', + get: function get() { + var context = this.context; + + return this.props.names.map(function (name) { + return __WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name); + }); + } + }, { + key: 'dirty', + get: function get() { + return this.refs.connected.getWrappedInstance().isDirty(); + } + }, { + key: 'pristine', + get: function get() { + return !this.dirty; + } + }, { + key: 'values', + get: function get() { + return this.refs.connected && this.refs.connected.getWrappedInstance().getValues(); + } + }]); + + return Fields; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + Fields.propTypes = { + names: function names(props, propName) { + return validateNameProp(props[propName]); + }, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + format: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + parse: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + Fields.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + + return Fields; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFields); + +/***/ }), +/* 609 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createFieldProps__ = __webpack_require__(292); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__structure_plain__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(293); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + +var propsToNotUpdateFor = ['_reduxForm']; + +var createConnectedFields = function createConnectedFields(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS, + size = _ref.size; + + + var getSyncError = function getSyncError(syncErrors, name) { + var error = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncErrors, name); + // Because the error for this field might not be at a level in the error structure where + // it can be set directly, it might need to be unwrapped from the _error property + return error && error._error ? error._error : error; + }; + + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + var warning = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncWarnings, name); + // Because the warning for this field might not be at a level in the warning structure where + // it can be set directly, it might need to be unwrapped from the _warning property + return warning && warning._warning ? warning._warning : warning; + }; + + var ConnectedFields = function (_Component) { + _inherits(ConnectedFields, _Component); + + function ConnectedFields(props) { + _classCallCheck(this, ConnectedFields); + + var _this = _possibleConstructorReturn(this, (ConnectedFields.__proto__ || Object.getPrototypeOf(ConnectedFields)).call(this, props)); + + _this.handleChange = _this.handleChange.bind(_this); + _this.handleFocus = _this.handleFocus.bind(_this); + _this.handleBlur = _this.handleBlur.bind(_this); + + _this.onChangeFns = props.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this.handleChange(name, event); + }; + return acc; + }, {}); + + _this.onFocusFns = props.names.reduce(function (acc, name) { + acc[name] = function () { + return _this.handleFocus(name); + }; + return acc; + }, {}); + + _this.onBlurFns = props.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this.handleBlur(name, event); + }; + return acc; + }, {}); + return _this; + } + + _createClass(ConnectedFields, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; + + if (this.props.names !== nextProps.names && (size(this.props.names) !== size(nextProps.names) || nextProps.names.some(function (nextName) { + return !_this2.props._fields[nextName]; + }))) { + + // names is changed. The cached event handlers need to be updated + this.onChangeFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this2.handleChange(name, event); + }; + return acc; + }, {}); + + this.onFocusFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function () { + return _this2.handleFocus(name); + }; + return acc; + }, {}); + + this.onBlurFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this2.handleBlur(name, event); + }; + return acc; + }, {}); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this3 = this; + + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); + }); + } + }, { + key: 'isDirty', + value: function isDirty() { + var _fields = this.props._fields; + + return Object.keys(_fields).some(function (name) { + return _fields[name].dirty; + }); + } + }, { + key: 'getValues', + value: function getValues() { + var _fields = this.props._fields; + + return Object.keys(_fields).reduce(function (accumulator, name) { + return __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].setIn(accumulator, name, _fields[name].value); + }, {}); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'handleChange', + value: function handleChange(name, event) { + var _props = this.props, + dispatch = _props.dispatch, + parse = _props.parse, + normalize = _props.normalize, + _reduxForm = _props._reduxForm; + + var value = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); + + dispatch(_reduxForm.change(name, value)); + } + }, { + key: 'handleFocus', + value: function handleFocus(name) { + var _props2 = this.props, + dispatch = _props2.dispatch, + _reduxForm = _props2._reduxForm; + + dispatch(_reduxForm.focus(name)); + } + }, { + key: 'handleBlur', + value: function handleBlur(name, event) { + var _props3 = this.props, + dispatch = _props3.dispatch, + parse = _props3.parse, + normalize = _props3.normalize, + _reduxForm = _props3._reduxForm; + + var value = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); + + // dispatch blur action + dispatch(_reduxForm.blur(name, value)); + + // call post-blur callback + if (_reduxForm.asyncValidate) { + _reduxForm.asyncValidate(name, value); + } + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + + var _props4 = this.props, + component = _props4.component, + withRef = _props4.withRef, + _fields = _props4._fields, + _reduxForm = _props4._reduxForm, + rest = _objectWithoutProperties(_props4, ['component', 'withRef', '_fields', '_reduxForm']); + + var sectionPrefix = _reduxForm.sectionPrefix; + + var _Object$keys$reduce = Object.keys(_fields).reduce(function (accumulator, name) { + var connectedProps = _fields[name]; + + var _createFieldProps = __WEBPACK_IMPORTED_MODULE_2__createFieldProps__["a" /* default */]({ getIn: getIn, toJS: toJS }, name, _extends({}, connectedProps, rest, { + onBlur: _this4.onBlurFns[name], + onChange: _this4.onChangeFns[name], + onFocus: _this4.onFocusFns[name] + })), + custom = _createFieldProps.custom, + fieldProps = _objectWithoutProperties(_createFieldProps, ['custom']); + + accumulator.custom = custom; + var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; + return __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].setIn(accumulator, fieldName, fieldProps); + }, {}), + custom = _Object$keys$reduce.custom, + props = _objectWithoutProperties(_Object$keys$reduce, ['custom']); + + if (withRef) { + props.ref = 'renderedComponent'; + } + + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, props, custom)); + } + }]); + + return ConnectedFields; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + ConnectedFields.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + _fields: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object.isRequired, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + + var connector = __WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"](function (state, ownProps) { + var names = ownProps.names, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; + + var formState = getFormState(state); + return { + _fields: names.reduce(function (accumulator, name) { + var initialState = getIn(formState, 'initial.' + name); + var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var submitting = getIn(formState, 'submitting'); + var pristine = value === initial; + accumulator[name] = { + asyncError: getIn(formState, 'asyncErrors.' + name), + asyncValidating: getIn(formState, 'asyncValidating') === name, + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name), + submitFailed: getIn(formState, 'submitFailed'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + _value: ownProps.value // save value passed in (for checkboxes) + }; + return accumulator; + }, {}) + }; + }, undefined, undefined, { withRef: true }); + return connector(ConnectedFields); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createConnectedFields); + +/***/ }), +/* 610 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedFieldArray__ = __webpack_require__(611); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(190); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(121); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + + + + + + +var toArray = function toArray(value) { + return Array.isArray(value) ? value : [value]; +}; + +var wrapError = function wrapError(fn, key) { + return fn && function () { + var validators = toArray(fn); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = validators[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var validator = _step.value; + + var result = validator.apply(undefined, arguments); + if (result) { + return _defineProperty({}, key, result); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + }; +}; + +var createFieldArray = function createFieldArray(_ref2) { + var deepEqual = _ref2.deepEqual, + getIn = _ref2.getIn, + size = _ref2.size; + + + var ConnectedFieldArray = __WEBPACK_IMPORTED_MODULE_2__ConnectedFieldArray__["a" /* default */]({ deepEqual: deepEqual, getIn: getIn, size: size }); + + var FieldArray = function (_Component) { + _inherits(FieldArray, _Component); + + function FieldArray(props, context) { + _classCallCheck(this, FieldArray); + + var _this = _possibleConstructorReturn(this, (FieldArray.__proto__ || Object.getPrototypeOf(FieldArray)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('FieldArray must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(FieldArray, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; + + this.context._reduxForm.register(this.name, 'FieldArray', function () { + return wrapError(_this2.props.validate, '_error'); + }, function () { + return wrapError(_this2.props.warn, '_warning'); + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.name !== nextProps.name) { + // unregister old name + this.context._reduxForm.unregister(this.name); + // register new name + this.context._reduxForm.register(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, nextProps.name), 'FieldArray'); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context._reduxForm.unregister(this.name); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to FieldArray'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedFieldArray, _extends({}, this.props, { + name: this.name, + syncError: this.syncError, + syncWarning: this.syncWarning, + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'name', + get: function get() { + return __WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, this.props.name); + } + }, { + key: 'dirty', + get: function get() { + return this.refs.connected.getWrappedInstance().dirty; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.connected.getWrappedInstance().pristine; + } + }, { + key: 'value', + get: function get() { + return this.refs.connected.getWrappedInstance().value; + } + }]); + + return FieldArray; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + FieldArray.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + FieldArray.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + + return FieldArray; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFieldArray); + +/***/ }), +/* 611 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__ = __webpack_require__(280); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux__ = __webpack_require__(111); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createFieldArrayProps__ = __webpack_require__(612); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__structure_plain__ = __webpack_require__(46); + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + + +var propsToNotUpdateFor = ['_reduxForm', 'value']; + +var createConnectedFieldArray = function createConnectedFieldArray(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + size = _ref.size; + + + var getSyncError = function getSyncError(syncErrors, name) { + // For an array, the error can _ONLY_ be under _error. + // This is why this getSyncError is not the same as the + // one in Field. + return __WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error'); + }; + + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + // For an array, the warning can _ONLY_ be under _warning. + // This is why this getSyncError is not the same as the + // one in Field. + return __WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].getIn(syncWarnings, name + '._warning'); + }; + + var ConnectedFieldArray = function (_Component) { + _inherits(ConnectedFieldArray, _Component); + + function ConnectedFieldArray() { + _classCallCheck(this, ConnectedFieldArray); + + var _this = _possibleConstructorReturn(this, (ConnectedFieldArray.__proto__ || Object.getPrototypeOf(ConnectedFieldArray)).call(this)); + + _this.getValue = _this.getValue.bind(_this); + return _this; + } + + _createClass(ConnectedFieldArray, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this2 = this; + + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + // useful to debug rerenders + // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { + // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) + // } + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); + }); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'getValue', + value: function getValue(index) { + return this.props.value && getIn(this.props.value, index); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + component = _props.component, + withRef = _props.withRef, + name = _props.name, + _reduxForm = _props._reduxForm, + validate = _props.validate, + warn = _props.warn, + rest = _objectWithoutProperties(_props, ['component', 'withRef', 'name', '_reduxForm', 'validate', 'warn']); + + var props = __WEBPACK_IMPORTED_MODULE_4__createFieldArrayProps__["a" /* default */](getIn, name, _reduxForm.sectionPrefix, this.getValue, rest); + if (withRef) { + props.ref = 'renderedComponent'; + } + return __WEBPACK_IMPORTED_MODULE_1_react__["createElement"](component, props); + } + }, { + key: 'dirty', + get: function get() { + return this.props.dirty; + } + }, { + key: 'pristine', + get: function get() { + return this.props.pristine; + } + }, { + key: 'value', + get: function get() { + return this.props.value; + } + }]); + + return ConnectedFieldArray; + }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); + + ConnectedFieldArray.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].string]).isRequired, + props: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].object + }; + + ConnectedFieldArray.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].object + }; + + var connector = __WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"](function (state, ownProps) { + var name = ownProps.name, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; + + var formState = getFormState(state); + var initial = getIn(formState, 'initial.' + name) || initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var submitting = getIn(formState, 'submitting'); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var pristine = deepEqual(value, initial); + return { + asyncError: getIn(formState, 'asyncErrors.' + name + '._error'), + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name + '._error'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + length: size(value) + }; + }, function (dispatch, ownProps) { + var name = ownProps.name, + _reduxForm = ownProps._reduxForm; + var arrayInsert = _reduxForm.arrayInsert, + arrayMove = _reduxForm.arrayMove, + arrayPop = _reduxForm.arrayPop, + arrayPush = _reduxForm.arrayPush, + arrayRemove = _reduxForm.arrayRemove, + arrayRemoveAll = _reduxForm.arrayRemoveAll, + arrayShift = _reduxForm.arrayShift, + arraySplice = _reduxForm.arraySplice, + arraySwap = _reduxForm.arraySwap, + arrayUnshift = _reduxForm.arrayUnshift; + + return __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__["a" /* default */]({ + arrayInsert: arrayInsert, + arrayMove: arrayMove, + arrayPop: arrayPop, + arrayPush: arrayPush, + arrayRemove: arrayRemove, + arrayRemoveAll: arrayRemoveAll, + arrayShift: arrayShift, + arraySplice: arraySplice, + arraySwap: arraySwap, + arrayUnshift: arrayUnshift + }, function (actionCreator) { + return __WEBPACK_IMPORTED_MODULE_3_redux__["bindActionCreators"](actionCreator.bind(null, name), dispatch); + }); + }, undefined, { withRef: true }); + return connector(ConnectedFieldArray); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createConnectedFieldArray); + +/***/ }), +/* 612 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var createFieldArrayProps = function createFieldArrayProps(getIn, name, sectionPrefix, getValue, _ref) { + var arrayInsert = _ref.arrayInsert, + arrayMove = _ref.arrayMove, + arrayPop = _ref.arrayPop, + arrayPush = _ref.arrayPush, + arrayRemove = _ref.arrayRemove, + arrayRemoveAll = _ref.arrayRemoveAll, + arrayShift = _ref.arrayShift, + arraySplice = _ref.arraySplice, + arraySwap = _ref.arraySwap, + arrayUnshift = _ref.arrayUnshift, + asyncError = _ref.asyncError, + dirty = _ref.dirty, + length = _ref.length, + pristine = _ref.pristine, + submitError = _ref.submitError, + state = _ref.state, + submitFailed = _ref.submitFailed, + submitting = _ref.submitting, + syncError = _ref.syncError, + syncWarning = _ref.syncWarning, + value = _ref.value, + props = _ref.props, + rest = _objectWithoutProperties(_ref, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncError', 'dirty', 'length', 'pristine', 'submitError', 'state', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'value', 'props']); + + var error = syncError || asyncError || submitError; + var warning = syncWarning; + var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; + var finalProps = _extends({ + fields: { + _isFieldArray: true, + forEach: function forEach(callback) { + return (value || []).forEach(function (item, index) { + return callback(fieldName + '[' + index + ']', index, finalProps.fields); + }); + }, + get: getValue, + getAll: function getAll() { + return value; + }, + insert: arrayInsert, + length: length, + map: function map(callback) { + return (value || []).map(function (item, index) { + return callback(fieldName + '[' + index + ']', index, finalProps.fields); + }); + }, + move: arrayMove, + name: name, + pop: function pop() { + arrayPop(); + return getIn(value, length - 1); + }, + push: arrayPush, + reduce: function reduce(callback, initial) { + return (value || []).reduce(function (accumulator, item, index) { + return callback(accumulator, fieldName + '[' + index + ']', index, finalProps.fields); + }, initial); + }, + remove: arrayRemove, + removeAll: arrayRemoveAll, + shift: function shift() { + arrayShift(); + return getIn(value, 0); + }, + swap: arraySwap, + unshift: arrayUnshift + }, + meta: { + dirty: dirty, + error: error, + warning: warning, + invalid: !!error, + pristine: pristine, + submitting: submitting, + touched: !!(state && getIn(state, 'touched')), + valid: !error + } + }, props, rest); + return finalProps; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFieldArrayProps); + +/***/ }), +/* 613 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(46); + + + +var createFormValueSelector = function createFormValueSelector(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + + __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(form, 'Form value must be specified'); + return function (state) { + for (var _len = arguments.length, fields = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + fields[_key - 1] = arguments[_key]; + } + + __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(fields.length, 'No fields specified'); + return fields.length === 1 ? + // only selecting one field, so return its value + getIn(getFormState(state), form + '.values.' + fields[0]) : + // selecting many fields, so return an object of field values + fields.reduce(function (accumulator, field) { + var value = getIn(getFormState(state), form + '.values.' + field); + return value === undefined ? accumulator : __WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */].setIn(accumulator, field, value); + }, {}); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFormValueSelector); + +/***/ }), +/* 614 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(21); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_redux__); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + + +var createValues = function createValues(_ref) { + var getIn = _ref.getIn; + return function (config) { + var _prop$getFormState$co = _extends({ + prop: 'values', + getFormState: function getFormState(state) { + return getIn(state, 'form'); + } + }, config), + form = _prop$getFormState$co.form, + prop = _prop$getFormState$co.prop, + getFormState = _prop$getFormState$co.getFormState; + + return __WEBPACK_IMPORTED_MODULE_0_react_redux__["connect"](function (state) { + return _defineProperty({}, prop, getIn(getFormState(state), form + '.values')); + }, function () { + return {}; + } // ignore dispatch + ); + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createValues); + +/***/ }), +/* 615 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormValues = function createGetFormValues(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.values'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormValues); + +/***/ }), +/* 616 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormInitialValues = function createGetFormInitialValues(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.initial'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormInitialValues); + +/***/ }), +/* 617 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormSyncErrors = function createGetFormSyncErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.syncErrors'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncErrors); + +/***/ }), +/* 618 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormAsyncErrors = function createGetFormAsyncErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.asyncErrors'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormAsyncErrors); + +/***/ }), +/* 619 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormSubmitErrors = function createGetFormSubmitErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.submitErrors'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormSubmitErrors); + +/***/ }), +/* 620 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPristine__ = __webpack_require__(294); + + +var createIsDirty = function createIsDirty(structure) { + return function (form, getFormState) { + var isPristine = __WEBPACK_IMPORTED_MODULE_0__isPristine__["a" /* default */](structure)(form, getFormState); + return function (state) { + return !isPristine(state); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsDirty); + +/***/ }), +/* 621 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isValid__ = __webpack_require__(189); + + +var createIsInvalid = function createIsInvalid(structure) { + return function (form, getFormState) { + var isValid = __WEBPACK_IMPORTED_MODULE_0__isValid__["a" /* default */](structure)(form, getFormState); + return function (state) { + return !isValid(state); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsInvalid); + +/***/ }), +/* 622 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createIsSubmitting = function createIsSubmitting(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitting') || false; + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsSubmitting); + +/***/ }), +/* 623 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createHasSubmitSucceeded = function createHasSubmitSucceeded(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitSucceeded') || false; + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitSucceeded); + +/***/ }), +/* 624 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createHasSubmitFailed = function createHasSubmitFailed(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitFailed') || false; + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitFailed); + +/***/ }), +/* 625 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + +var Form = function (_Component) { + _inherits(Form, _Component); + + function Form(props, context) { + _classCallCheck(this, Form); + + var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Form must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(Form, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit); + } + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('form', this.props); + } + }]); + + return Form; +}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + +Form.propTypes = { + onSubmit: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired +}; +Form.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object +}; + +/* harmony default export */ __webpack_exports__["a"] = (Form); + +/***/ }), +/* 626 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_prefixName__ = __webpack_require__(121); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + +var FormSection = function (_Component) { + _inherits(FormSection, _Component); + + function FormSection(props, context) { + _classCallCheck(this, FormSection); + + var _this = _possibleConstructorReturn(this, (FormSection.__proto__ || Object.getPrototypeOf(FormSection)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('FormSection must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(FormSection, [{ + key: 'getChildContext', + value: function getChildContext() { + var context = this.context, + name = this.props.name; + + return { + _reduxForm: _extends({}, context._reduxForm, { + sectionPrefix: __WEBPACK_IMPORTED_MODULE_1__util_prefixName__["a" /* default */](context, name) + }) + }; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + name = _props.name, + component = _props.component, + rest = _objectWithoutProperties(_props, ['children', 'name', 'component']); + + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(children)) { + return children; + } + + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, rest, { + children: children + })); + } + }]); + + return FormSection; +}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + +FormSection.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]) +}; + +FormSection.defaultProps = { + component: 'div' +}; + +FormSection.childContextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object.isRequired +}; + +FormSection.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object +}; + +/* harmony default export */ __webpack_exports__["a"] = (FormSection); + +/***/ }), +/* 627 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); + +var any = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].any, + bool = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].bool, + func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape; + + +var propTypes = { + // State: + asyncValidating: bool.isRequired, // true if async validation is running + dirty: bool.isRequired, // true if any values are different from initialValues + error: any, // form-wide error from '_error' key in validation result + warning: any, // form-wide warning from '_warning' key in validation result + invalid: bool.isRequired, // true if there are any validation errors + initialized: bool.isRequired, // true if the form has been initialized + pristine: bool.isRequired, // true if the values are the same as initialValues + submitting: bool.isRequired, // true if the form is in the process of being submitted + submitFailed: bool.isRequired, // true if the form was submitted and failed for any reason + submitSucceeded: bool.isRequired, // true if the form was successfully submitted + valid: bool.isRequired, // true if there are no validation errors + // Actions: + array: shape({ + insert: func.isRequired, // function to insert a value into an array field + move: func.isRequired, // function to move a value within an array field + pop: func.isRequired, // function to pop a value off of an array field + push: func.isRequired, // function to push a value onto an array field + remove: func.isRequired, // function to remove a value from an array field + removeAll: func.isRequired, // function to remove all the values from an array field + shift: func.isRequired, // function to shift a value out of an array field + splice: func.isRequired, // function to splice a value into an array field + swap: func.isRequired, // function to swap values in an array field + unshift: func.isRequired // function to unshift a value into an array field + }), + asyncValidate: func.isRequired, // function to trigger async validation + blur: func.isRequired, // action to mark a field as blurred + change: func.isRequired, // action to change the value of a field + destroy: func.isRequired, // action to destroy the form's data in Redux + dispatch: func.isRequired, // the Redux dispatch action + handleSubmit: func.isRequired, // function to submit the form + initialize: func.isRequired, // action to initialize form data + reset: func.isRequired, // action to reset the form data to previously initialized values + touch: func.isRequired, // action to mark fields as touched + untouch: func.isRequired // action to mark fields as untouched +}; + +/* harmony default export */ __webpack_exports__["a"] = (propTypes); + +/***/ }), +/* 628 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +function createThunkMiddleware(extraArgument) { + return function (_ref) { + var dispatch = _ref.dispatch, + getState = _ref.getState; + return function (next) { + return function (action) { + if (typeof action === 'function') { + return action(dispatch, getState, extraArgument); + } + + return next(action); + }; + }; + }; +} + +var thunk = createThunkMiddleware(); +thunk.withExtraArgument = createThunkMiddleware; + +exports['default'] = thunk; + +/***/ }), +/* 629 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _menu = __webpack_require__(630); + +Object.defineProperty(exports, 'menu', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_menu).default; + } +}); + +var _notification = __webpack_require__(631); + +Object.defineProperty(exports, 'notification', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_notification).default; + } +}); + +var _profiles = __webpack_require__(632); + +Object.defineProperty(exports, 'profiles', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_profiles).default; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), +/* 630 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _assign = __webpack_require__(48); + +var _assign2 = _interopRequireDefault(_assign); + +exports.default = menu; + +var _ActionTypes = __webpack_require__(79); + +var types = _interopRequireWildcard(_ActionTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function menu() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + currentMenu: null + }; + var action = arguments[1]; + + switch (action.type) { + case types.CHANGE_MENU: + return (0, _assign2.default)({}, state, { + currentMenu: action.menu + }); + default: + return state; + } +} + +/***/ }), +/* 631 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = notification; + +var _ActionTypes = __webpack_require__(79); + +var types = _interopRequireWildcard(_ActionTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function notification() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + message: null + }; + var action = arguments[1]; + + switch (action.type) { + case types.NOTIFICATION_ADD: + return { message: action.message }; + default: + return state; + } +} + +/***/ }), +/* 632 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = __webpack_require__(57); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _assign = __webpack_require__(48); + +var _assign2 = _interopRequireDefault(_assign); + +exports.default = profiles; + +var _ActionTypes = __webpack_require__(79); + +var types = _interopRequireWildcard(_ActionTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function profiles() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { + currentProfile: 'default', + profiles: [{ + name: 'default', + description: 'Default profile', + settings: {} + }] + }; + var action = arguments[1]; + + if (action.type === types.PROFILE_CREATE) { + var list = state.profiles.map(function (x) { + return (0, _assign2.default)({}, x); + }); + list.push({ + name: action.name, + description: action.description, + settings: {} + }); + return (0, _assign2.default)({}, state, { profiles: list }); + } else if (action.type === types.PROFILE_SET_ENABLED) { + if (!state.profiles.filter(function (x) { + return x.name === action.name; + })) { + return state; + } + return (0, _assign2.default)({}, state, { currentProfile: action.name }); + } else if (action.type === types.PROFILE_REMOVE) { + if (action.name === 'default') { + return state; + } + return (0, _assign2.default)({}, state, { + profiles: state.profiles.filter(function (x) { + return x.name !== action.name; + }), + currentProfile: state.currentProfile === action.name ? 'default' : state.currentProfile + }); + } else if (action.type === types.PROFILE_UPDATE_SETTINGS) { + var _ret = function () { + var profile = state.profiles.filter(function (x) { + return x.name === action.name; + })[0]; + if (!profile) { + return { + v: state + }; + } + + var settingsObj = (0, _assign2.default)({}, profile.settings); + settingsObj[action.shop] = (0, _assign2.default)({}, profile.settings[action.shop], action.value); + var profileList = state.profiles.map(function (x) { + if (x.name === action.name) { + return (0, _assign2.default)({}, x, { settings: settingsObj }); + } + return x; + }); + return { + v: (0, _assign2.default)({}, state, { profiles: profileList }) + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + } + return state; +} + +/***/ }), +/* 633 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(634), __esModule: true }; + +/***/ }), +/* 634 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(93); +__webpack_require__(124); +module.exports = __webpack_require__(192).f('iterator'); + +/***/ }), +/* 635 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(139) + , defined = __webpack_require__(137); +// true -> String#at +// false -> String#codePointAt +module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + +/***/ }), +/* 636 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(191) + , descriptor = __webpack_require__(84) + , setToStringTag = __webpack_require__(123) + , IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(49)(IteratorPrototype, __webpack_require__(23)('iterator'), function(){ return this; }); + +module.exports = function(Constructor, NAME, next){ + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + +/***/ }), +/* 637 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(33) + , anObject = __webpack_require__(34) + , getKeys = __webpack_require__(67); + +module.exports = __webpack_require__(41) ? Object.defineProperties : function defineProperties(O, Properties){ + anObject(O); + var keys = getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + +/***/ }), +/* 638 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(639) + , step = __webpack_require__(640) + , Iterators = __webpack_require__(80) + , toIObject = __webpack_require__(51); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(295)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + +/***/ }), +/* 639 */ +/***/ (function(module, exports) { + +module.exports = function(){ /* empty */ }; + +/***/ }), +/* 640 */ +/***/ (function(module, exports) { + +module.exports = function(done, value){ + return {value: value, done: !!done}; +}; + +/***/ }), +/* 641 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(642), __esModule: true }; + +/***/ }), +/* 642 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(643); +__webpack_require__(301); +__webpack_require__(649); +__webpack_require__(650); +module.exports = __webpack_require__(18).Symbol; + +/***/ }), +/* 643 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(25) + , has = __webpack_require__(50) + , DESCRIPTORS = __webpack_require__(41) + , $export = __webpack_require__(32) + , redefine = __webpack_require__(296) + , META = __webpack_require__(644).KEY + , $fails = __webpack_require__(66) + , shared = __webpack_require__(141) + , setToStringTag = __webpack_require__(123) + , uid = __webpack_require__(99) + , wks = __webpack_require__(23) + , wksExt = __webpack_require__(192) + , wksDefine = __webpack_require__(193) + , keyOf = __webpack_require__(645) + , enumKeys = __webpack_require__(646) + , isArray = __webpack_require__(647) + , anObject = __webpack_require__(34) + , toIObject = __webpack_require__(51) + , toPrimitive = __webpack_require__(136) + , createDesc = __webpack_require__(84) + , _create = __webpack_require__(191) + , gOPNExt = __webpack_require__(648) + , $GOPD = __webpack_require__(300) + , $DP = __webpack_require__(33) + , $keys = __webpack_require__(67) + , gOPD = $GOPD.f + , dP = $DP.f + , gOPN = gOPNExt.f + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , PROTOTYPE = 'prototype' + , HIDDEN = wks('_hidden') + , TO_PRIMITIVE = wks('toPrimitive') + , isEnum = {}.propertyIsEnumerable + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , OPSymbols = shared('op-symbols') + , ObjectProto = Object[PROTOTYPE] + , USE_NATIVE = typeof $Symbol == 'function' + , QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(dP({}, 'a', { + get: function(){ return dP(this, 'a', {value: 7}).a; } + })).a != 7; +}) ? function(it, key, D){ + var protoDesc = gOPD(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + dP(it, key, D); + if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ + return typeof it == 'symbol'; +} : function(it){ + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D){ + if(it === ObjectProto)$defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if(has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key = toPrimitive(key, true)); + if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + it = toIObject(it); + key = toPrimitive(key, true); + if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; + var D = gOPD(it, key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = gOPN(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var IS_OP = it === ObjectProto + , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if(!USE_NATIVE){ + $Symbol = function Symbol(){ + if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function(value){ + if(this === ObjectProto)$set.call(OPSymbols, value); + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString(){ + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(299).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(100).f = $propertyIsEnumerable; + __webpack_require__(143).f = $getOwnPropertySymbols; + + if(DESCRIPTORS && !__webpack_require__(122)){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function(name){ + return wrap(wks(name)); + } +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); + +for(var symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); + +for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + if(isSymbol(key))return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , replacer, $replacer; + while(arguments.length > i)args.push(arguments[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(49)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + +/***/ }), +/* 644 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(99)('meta') + , isObject = __webpack_require__(65) + , has = __webpack_require__(50) + , setDesc = __webpack_require__(33).f + , id = 0; +var isExtensible = Object.isExtensible || function(){ + return true; +}; +var FREEZE = !__webpack_require__(66)(function(){ + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function(it){ + setDesc(it, META, {value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + }}); +}; +var fastKey = function(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add metadata + if(!create)return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function(it, create){ + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return true; + // not necessary to add metadata + if(!create)return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function(it){ + if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + +/***/ }), +/* 645 */ +/***/ (function(module, exports, __webpack_require__) { + +var getKeys = __webpack_require__(67) + , toIObject = __webpack_require__(51); +module.exports = function(object, el){ + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; +}; + +/***/ }), +/* 646 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(67) + , gOPS = __webpack_require__(143) + , pIE = __webpack_require__(100); +module.exports = function(it){ + var result = getKeys(it) + , getSymbols = gOPS.f; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = pIE.f + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); + } return result; +}; + +/***/ }), +/* 647 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(85); +module.exports = Array.isArray || function isArray(arg){ + return cof(arg) == 'Array'; +}; + +/***/ }), +/* 648 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(51) + , gOPN = __webpack_require__(299).f + , toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function(it){ + try { + return gOPN(it); + } catch(e){ + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it){ + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 649 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(193)('asyncIterator'); + +/***/ }), +/* 650 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(193)('observable'); + +/***/ }), +/* 651 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRouter = __webpack_require__(161); + +var _App = __webpack_require__(652); + +var _App2 = _interopRequireDefault(_App); + +var _Supreme = __webpack_require__(323); + +var _Supreme2 = _interopRequireDefault(_Supreme); + +var _Profile = __webpack_require__(830); + +var _Profile2 = _interopRequireDefault(_Profile); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + return _react2.default.createElement( + _reactRouter.Route, + { component: _App2.default }, + _react2.default.createElement(_reactRouter.Route, { path: 'supreme/', component: _Supreme2.default }), + _react2.default.createElement(_reactRouter.Route, { path: 'profiles/', component: _Profile2.default }), + _react2.default.createElement(_reactRouter.Redirect, { from: '/', to: 'supreme/' }) + ); +}; + +/***/ }), +/* 652 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _MuiThemeProvider = __webpack_require__(303); + +var _MuiThemeProvider2 = _interopRequireDefault(_MuiThemeProvider); + +var _AppDrawer = __webpack_require__(702); + +var _AppDrawer2 = _interopRequireDefault(_AppDrawer); + +var _NotificationBar = __webpack_require__(825); + +var _NotificationBar2 = _interopRequireDefault(_NotificationBar); + +var _Styles = __webpack_require__(62); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var App = function (_Component) { + (0, _inherits3.default)(App, _Component); + + function App() { + (0, _classCallCheck3.default)(this, App); + return (0, _possibleConstructorReturn3.default)(this, (App.__proto__ || (0, _getPrototypeOf2.default)(App)).apply(this, arguments)); + } + + (0, _createClass3.default)(App, [{ + key: 'render', + value: function render() { + var children = this.props.children; + + return _react2.default.createElement( + _MuiThemeProvider2.default, + { muiTheme: (0, _Styles.getTheme)() }, + _react2.default.createElement( + 'div', + { style: { height: '100%' } }, + _react2.default.createElement(_AppDrawer2.default, this.props), + _react2.default.createElement( + 'div', + { style: { paddingLeft: 256, height: '100%' } }, + children + ), + _react2.default.createElement(_NotificationBar2.default, null) + ) + ); + } + }]); + return App; +}(_react.Component); + +App.propTypes = { + children: _react.PropTypes.element +}; + +exports.default = App; + +/***/ }), +/* 653 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(654); +module.exports = __webpack_require__(18).Object.getPrototypeOf; + +/***/ }), +/* 654 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(86) + , $getPrototypeOf = __webpack_require__(298); + +__webpack_require__(302)('getPrototypeOf', function(){ + return function getPrototypeOf(it){ + return $getPrototypeOf(toObject(it)); + }; +}); + +/***/ }), +/* 655 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(656); +var $Object = __webpack_require__(18).Object; +module.exports = function defineProperty(it, key, desc){ + return $Object.defineProperty(it, key, desc); +}; + +/***/ }), +/* 656 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(32); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(41), 'Object', {defineProperty: __webpack_require__(33).f}); + +/***/ }), +/* 657 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(658), __esModule: true }; + +/***/ }), +/* 658 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(659); +module.exports = __webpack_require__(18).Object.setPrototypeOf; + +/***/ }), +/* 659 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(32); +$export($export.S, 'Object', {setPrototypeOf: __webpack_require__(660).set}); + +/***/ }), +/* 660 */ +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(65) + , anObject = __webpack_require__(34); +var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = __webpack_require__(64)(Function.call, __webpack_require__(300).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + +/***/ }), +/* 661 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(662), __esModule: true }; + +/***/ }), +/* 662 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(663); +var $Object = __webpack_require__(18).Object; +module.exports = function create(P, D){ + return $Object.create(P, D); +}; + +/***/ }), +/* 663 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(32) +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', {create: __webpack_require__(191)}); + +/***/ }), +/* 664 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(93); +__webpack_require__(665); +module.exports = __webpack_require__(18).Array.from; + +/***/ }), +/* 665 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(64) + , $export = __webpack_require__(32) + , toObject = __webpack_require__(86) + , call = __webpack_require__(305) + , isArrayIter = __webpack_require__(306) + , toLength = __webpack_require__(138) + , createProperty = __webpack_require__(666) + , getIterFn = __webpack_require__(195); + +$export($export.S + $export.F * !__webpack_require__(307)(function(iter){ Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ + var O = toObject(arrayLike) + , C = typeof this == 'function' ? this : Array + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , index = 0 + , iterFn = getIterFn(O) + , length, result, step, iterator; + if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ + for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for(result = new C(length); length > index; index++){ + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + + +/***/ }), +/* 666 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(33) + , createDesc = __webpack_require__(84); + +module.exports = function(object, index, value){ + if(index in object)$defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + +/***/ }), +/* 667 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, module) {/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ +function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; +} + +/** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ +function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; +} + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array ? array.length : 0; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + this.__data__ = new ListCache(entries); +} + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; +} + +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + return this.__data__['delete'](key); +} + +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; +} + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (typeof key == 'number' && value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, isDeep, isFull, customizer, key, object, stack) { + var result; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + if (isHostObject(value)) { + return object ? value : {}; + } + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (!isArr) { + var props = isFull ? getAllKeys(value) : keys(value); + } + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + }); + return result; +} + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +function baseCreate(proto) { + return isObject(proto) ? objectCreate(proto) : {}; +} + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +/** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + return objectToString.call(value); +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; +} + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + if (!(isArray(source) || isTypedArray(source))) { + var props = baseKeysIn(source); + } + arrayEach(props || source, function(srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; + } + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }); +} + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + newValue = srcValue; + if (isArray(srcValue) || isTypedArray(srcValue)) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else { + isCommon = false; + newValue = baseClone(srcValue, true); + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + isCommon = false; + newValue = baseClone(srcValue, true); + } + else { + newValue = objValue; + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; +} + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var result = new buffer.constructor(buffer.length); + buffer.copy(result); + return result; +} + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ +function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); +} + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ +function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); +} + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; +} + +/** + * Copies own symbol properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Creates an array of the own enumerable symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge < 14, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || + objectToString.call(value) != objectTag || isHostObject(value)) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return (typeof Ctor == 'function' && + Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); +} + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return copyObject(value, keysIn(value)); +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); +}); + +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = merge; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(44), __webpack_require__(260)(module))) + +/***/ }), +/* 668 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = __webpack_require__(57); + +var _typeof3 = _interopRequireDefault(_typeof2); + +exports.default = function (muiTheme) { + var isClient = typeof navigator !== 'undefined'; + var userAgent = muiTheme.userAgent; + + if (userAgent === undefined && isClient) { + userAgent = navigator.userAgent; + } + + if (userAgent === undefined && !hasWarnedAboutUserAgent) { + false ? (0, _warning2.default)(false, 'Material-UI: userAgent should be supplied in the muiTheme context\n for server-side rendering.') : void 0; + + hasWarnedAboutUserAgent = true; + } + + if (userAgent === false) { + // Disabled autoprefixer + return null; + } else if (userAgent === 'all' || userAgent === undefined) { + // Prefix for all user agent + return function (style) { + var isFlex = ['flex', 'inline-flex'].indexOf(style.display) !== -1; + var stylePrefixed = _inlineStylePrefixer2.default.prefixAll(style); + + if (isFlex) { + var display = stylePrefixed.display; + if (isClient) { + // We can't apply this join with react-dom: + // #https://github.com/facebook/react/issues/6467 + stylePrefixed.display = display[display.length - 1]; + } else { + stylePrefixed.display = display.join('; display: '); + } + } + + return stylePrefixed; + }; + } else { + var _ret = function () { + var prefixer = new _inlineStylePrefixer2.default({ + userAgent: userAgent + }); + + return { + v: function v(style) { + return prefixer.prefix(style); + } + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + } +}; + +var _inlineStylePrefixer = __webpack_require__(669); + +var _inlineStylePrefixer2 = _interopRequireDefault(_inlineStylePrefixer); + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var hasWarnedAboutUserAgent = false; + +/***/ }), +/* 669 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +// special flexbox specifications + + +var _prefixAll2 = __webpack_require__(670); + +var _prefixAll3 = _interopRequireDefault(_prefixAll2); + +var _getBrowserInformation = __webpack_require__(681); + +var _getBrowserInformation2 = _interopRequireDefault(_getBrowserInformation); + +var _getPrefixedKeyframes = __webpack_require__(684); + +var _getPrefixedKeyframes2 = _interopRequireDefault(_getPrefixedKeyframes); + +var _capitalizeString = __webpack_require__(198); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _sortPrefixedStyle = __webpack_require__(311); + +var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); + +var _prefixProps = __webpack_require__(685); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +var _position = __webpack_require__(686); + +var _position2 = _interopRequireDefault(_position); + +var _calc = __webpack_require__(687); + +var _calc2 = _interopRequireDefault(_calc); + +var _zoomCursor = __webpack_require__(688); + +var _zoomCursor2 = _interopRequireDefault(_zoomCursor); + +var _grabCursor = __webpack_require__(689); + +var _grabCursor2 = _interopRequireDefault(_grabCursor); + +var _flex = __webpack_require__(690); + +var _flex2 = _interopRequireDefault(_flex); + +var _sizing = __webpack_require__(691); + +var _sizing2 = _interopRequireDefault(_sizing); + +var _gradient = __webpack_require__(692); + +var _gradient2 = _interopRequireDefault(_gradient); + +var _transition = __webpack_require__(693); + +var _transition2 = _interopRequireDefault(_transition); + +var _flexboxIE = __webpack_require__(695); + +var _flexboxIE2 = _interopRequireDefault(_flexboxIE); + +var _flexboxOld = __webpack_require__(696); + +var _flexboxOld2 = _interopRequireDefault(_flexboxOld); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var plugins = [_position2.default, _calc2.default, _zoomCursor2.default, _grabCursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, +// this must be run AFTER the flexbox specs +_flex2.default]; + +var Prefixer = function () { + /** + * Instantiante a new prefixer + * @param {string} userAgent - userAgent to gather prefix information according to caniuse.com + * @param {string} keepUnprefixed - keeps unprefixed properties and values + */ + + function Prefixer() { + var _this = this; + + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + _classCallCheck(this, Prefixer); + + var defaultUserAgent = typeof navigator !== 'undefined' ? navigator.userAgent : undefined; + + this._userAgent = options.userAgent || defaultUserAgent; + this._keepUnprefixed = options.keepUnprefixed || false; + + this._browserInfo = (0, _getBrowserInformation2.default)(this._userAgent); + + // Checks if the userAgent was resolved correctly + if (this._browserInfo && this._browserInfo.prefix) { + // set additional prefix information + this.cssPrefix = this._browserInfo.prefix.css; + this.jsPrefix = this._browserInfo.prefix.inline; + this.prefixedKeyframes = (0, _getPrefixedKeyframes2.default)(this._browserInfo); + } else { + this._usePrefixAllFallback = true; + return false; + } + + var data = this._browserInfo.browser && _prefixProps2.default[this._browserInfo.browser]; + if (data) { + this._requiresPrefix = Object.keys(data).filter(function (key) { + return data[key] >= _this._browserInfo.version; + }).reduce(function (result, name) { + result[name] = true; + return result; + }, {}); + this._hasPropsRequiringPrefix = Object.keys(this._requiresPrefix).length > 0; + } else { + this._usePrefixAllFallback = true; + } + } + + /** + * Returns a prefixed version of the style object + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ + + + _createClass(Prefixer, [{ + key: 'prefix', + value: function prefix(styles) { + var _this2 = this; + + // use prefixAll as fallback if userAgent can not be resolved + if (this._usePrefixAllFallback) { + return (0, _prefixAll3.default)(styles); + } + + // only add prefixes if needed + if (!this._hasPropsRequiringPrefix) { + return styles; + } + + Object.keys(styles).forEach(function (property) { + var value = styles[property]; + if (value instanceof Object && !Array.isArray(value)) { + // recurse through nested style objects + styles[property] = _this2.prefix(value); + } else { + // add prefixes if needed + if (_this2._requiresPrefix[property]) { + styles[_this2.jsPrefix + (0, _capitalizeString2.default)(property)] = value; + if (!_this2._keepUnprefixed) { + delete styles[property]; + } + } + } + }); + + Object.keys(styles).forEach(function (property) { + [].concat(styles[property]).forEach(function (value) { + // resolve plugins + plugins.forEach(function (plugin) { + // generates a new plugin interface with current data + assignStyles(styles, plugin({ + property: property, + value: value, + styles: styles, + browserInfo: _this2._browserInfo, + prefix: { + js: _this2.jsPrefix, + css: _this2.cssPrefix, + keyframes: _this2.prefixedKeyframes + }, + keepUnprefixed: _this2._keepUnprefixed, + requiresPrefix: _this2._requiresPrefix + }), value, _this2._keepUnprefixed); + }); + }); + }); + + return (0, _sortPrefixedStyle2.default)(styles); + } + + /** + * Returns a prefixed version of the style object using all vendor prefixes + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ + + }], [{ + key: 'prefixAll', + value: function prefixAll(styles) { + return (0, _prefixAll3.default)(styles); + } + }]); + + return Prefixer; +}(); + +exports.default = Prefixer; + + +function assignStyles(base) { + var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var value = arguments[2]; + var keepUnprefixed = arguments[3]; + + Object.keys(extend).forEach(function (property) { + var baseValue = base[property]; + if (Array.isArray(baseValue)) { + [].concat(extend[property]).forEach(function (val) { + if (base[property].indexOf(val) === -1) { + base[property].splice(baseValue.indexOf(value), keepUnprefixed ? 0 : 1, val); + } + }); + } else { + base[property] = extend[property]; + } + }); +} +module.exports = exports['default']; + +/***/ }), +/* 670 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = prefixAll; + +var _prefixProps = __webpack_require__(310); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +var _capitalizeString = __webpack_require__(198); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _sortPrefixedStyle = __webpack_require__(311); + +var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); + +var _position = __webpack_require__(672); + +var _position2 = _interopRequireDefault(_position); + +var _calc = __webpack_require__(673); + +var _calc2 = _interopRequireDefault(_calc); + +var _cursor = __webpack_require__(674); + +var _cursor2 = _interopRequireDefault(_cursor); + +var _flex = __webpack_require__(675); + +var _flex2 = _interopRequireDefault(_flex); + +var _sizing = __webpack_require__(676); + +var _sizing2 = _interopRequireDefault(_sizing); + +var _gradient = __webpack_require__(677); + +var _gradient2 = _interopRequireDefault(_gradient); + +var _transition = __webpack_require__(678); + +var _transition2 = _interopRequireDefault(_transition); + +var _flexboxIE = __webpack_require__(679); + +var _flexboxIE2 = _interopRequireDefault(_flexboxIE); + +var _flexboxOld = __webpack_require__(680); + +var _flexboxOld2 = _interopRequireDefault(_flexboxOld); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// special flexbox specifications + + +var plugins = [_position2.default, _calc2.default, _cursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, _flex2.default]; + +/** + * Returns a prefixed version of the style object using all vendor prefixes + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ +function prefixAll(styles) { + Object.keys(styles).forEach(function (property) { + var value = styles[property]; + if (value instanceof Object && !Array.isArray(value)) { + // recurse through nested style objects + styles[property] = prefixAll(value); + } else { + Object.keys(_prefixProps2.default).forEach(function (prefix) { + var properties = _prefixProps2.default[prefix]; + // add prefixes if needed + if (properties[property]) { + styles[prefix + (0, _capitalizeString2.default)(property)] = value; + } + }); + } + }); + + Object.keys(styles).forEach(function (property) { + [].concat(styles[property]).forEach(function (value, index) { + // resolve every special plugins + plugins.forEach(function (plugin) { + return assignStyles(styles, plugin(property, value)); + }); + }); + }); + + return (0, _sortPrefixedStyle2.default)(styles); +} + +function assignStyles(base) { + var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + Object.keys(extend).forEach(function (property) { + var baseValue = base[property]; + if (Array.isArray(baseValue)) { + [].concat(extend[property]).forEach(function (value) { + var valueIndex = baseValue.indexOf(value); + if (valueIndex > -1) { + base[property].splice(valueIndex, 1); + } + base[property].push(value); + }); + } else { + base[property] = extend[property]; + } + }); +} +module.exports = exports['default']; + +/***/ }), +/* 671 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (property) { + return property.match(/^(Webkit|Moz|O|ms)/) !== null; +}; + +module.exports = exports["default"]; + +/***/ }), +/* 672 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = position; +function position(property, value) { + if (property === 'position' && value === 'sticky') { + return { position: ['-webkit-sticky', 'sticky'] }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 673 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = calc; + +var _joinPrefixedValue = __webpack_require__(126); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +var _isPrefixedValue = __webpack_require__(199); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function calc(property, value) { + if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('calc(') > -1) { + return (0, _joinPrefixedValue2.default)(property, value, function (prefix, value) { + return value.replace(/calc\(/g, prefix + 'calc('); + }); + } +} +module.exports = exports['default']; + +/***/ }), +/* 674 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cursor; + +var _joinPrefixedValue = __webpack_require__(126); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { + 'zoom-in': true, + 'zoom-out': true, + grab: true, + grabbing: true +}; + +function cursor(property, value) { + if (property === 'cursor' && values[value]) { + return (0, _joinPrefixedValue2.default)(property, value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 675 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flex; +var values = { flex: true, 'inline-flex': true }; + +function flex(property, value) { + if (property === 'display' && values[value]) { + return { + display: ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value] + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 676 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sizing; + +var _joinPrefixedValue = __webpack_require__(126); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var properties = { + maxHeight: true, + maxWidth: true, + width: true, + height: true, + columnWidth: true, + minWidth: true, + minHeight: true +}; +var values = { + 'min-content': true, + 'max-content': true, + 'fill-available': true, + 'fit-content': true, + 'contain-floats': true +}; + +function sizing(property, value) { + if (properties[property] && values[value]) { + return (0, _joinPrefixedValue2.default)(property, value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 677 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gradient; + +var _joinPrefixedValue = __webpack_require__(126); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +var _isPrefixedValue = __webpack_require__(199); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; + +function gradient(property, value) { + if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.match(values) !== null) { + return (0, _joinPrefixedValue2.default)(property, value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 678 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = transition; + +var _hyphenateStyleName = __webpack_require__(312); + +var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); + +var _capitalizeString = __webpack_require__(198); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _isPrefixedValue = __webpack_require__(199); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +var _prefixProps = __webpack_require__(310); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { + transition: true, + transitionProperty: true, + WebkitTransition: true, + WebkitTransitionProperty: true +}; + +function transition(property, value) { + // also check for already prefixed transitions + if (typeof value === 'string' && properties[property]) { + var _ref2; + + var outputValue = prefixValue(value); + var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (value) { + return value.match(/-moz-|-ms-/) === null; + }).join(','); + + // if the property is already prefixed + if (property.indexOf('Webkit') > -1) { + return _defineProperty({}, property, webkitOutput); + } + + return _ref2 = {}, _defineProperty(_ref2, 'Webkit' + (0, _capitalizeString2.default)(property), webkitOutput), _defineProperty(_ref2, property, outputValue), _ref2; + } +} + +function prefixValue(value) { + if ((0, _isPrefixedValue2.default)(value)) { + return value; + } + + // only split multi values, not cubic beziers + var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); + + // iterate each single value and check for transitioned properties + // that need to be prefixed as well + multipleValues.forEach(function (val, index) { + multipleValues[index] = Object.keys(_prefixProps2.default).reduce(function (out, prefix) { + var dashCasePrefix = '-' + prefix.toLowerCase() + '-'; + + Object.keys(_prefixProps2.default[prefix]).forEach(function (prop) { + var dashCaseProperty = (0, _hyphenateStyleName2.default)(prop); + + if (val.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') { + // join all prefixes and create a new value + out = val.replace(dashCaseProperty, dashCasePrefix + dashCaseProperty) + ',' + out; + } + }); + return out; + }, val); + }); + + return multipleValues.join(','); +} +module.exports = exports['default']; + +/***/ }), +/* 679 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxIE; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'distribute', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end' +}; +var alternativeProps = { + alignContent: 'msFlexLinePack', + alignSelf: 'msFlexItemAlign', + alignItems: 'msFlexAlign', + justifyContent: 'msFlexPack', + order: 'msFlexOrder', + flexGrow: 'msFlexPositive', + flexShrink: 'msFlexNegative', + flexBasis: 'msPreferredSize' +}; + +function flexboxIE(property, value) { + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 680 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxOld; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'justify', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + 'wrap-reverse': 'multiple', + wrap: 'multiple' +}; + +var alternativeProps = { + alignItems: 'WebkitBoxAlign', + justifyContent: 'WebkitBoxPack', + flexWrap: 'WebkitBoxLines' +}; + +function flexboxOld(property, value) { + if (property === 'flexDirection' && typeof value === 'string') { + return { + WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', + WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 681 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _bowser = __webpack_require__(682); + +var _bowser2 = _interopRequireDefault(_bowser); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var vendorPrefixes = { + Webkit: ['chrome', 'safari', 'ios', 'android', 'phantom', 'opera', 'webos', 'blackberry', 'bada', 'tizen', 'chromium', 'vivaldi'], + Moz: ['firefox', 'seamonkey', 'sailfish'], + ms: ['msie', 'msedge'] +}; +var browsers = { + chrome: [['chrome'], ['chromium']], + safari: [['safari']], + firefox: [['firefox']], + edge: [['msedge']], + opera: [['opera'], ['vivaldi']], + ios_saf: [['ios', 'mobile'], ['ios', 'tablet']], + ie: [['msie']], + op_mini: [['opera', 'mobile'], ['opera', 'tablet']], + and_uc: [['android', 'mobile'], ['android', 'tablet']], + android: [['android', 'mobile'], ['android', 'tablet']] +}; + +var browserByInfo = function browserByInfo(info) { + if (info.firefox) { + return 'firefox'; + } + var name = ''; + + Object.keys(browsers).forEach(function (browser) { + browsers[browser].forEach(function (condition) { + var match = 0; + condition.forEach(function (single) { + if (info[single]) { + match += 1; + } + }); + if (condition.length === match) { + name = browser; + } + }); + }); + + return name; +}; + +/** + * Uses bowser to get default browser information such as version and name + * Evaluates bowser info and adds vendorPrefix information + * @param {string} userAgent - userAgent that gets evaluated + */ + +exports.default = function (userAgent) { + if (!userAgent) { + return false; + } + var info = _bowser2.default._detect(userAgent); + + Object.keys(vendorPrefixes).forEach(function (prefix) { + vendorPrefixes[prefix].forEach(function (browser) { + if (info[browser]) { + info.prefix = { + inline: prefix, + css: '-' + prefix.toLowerCase() + '-' + }; + } + }); + }); + + info.browser = browserByInfo(info); + + // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN + info.version = info.version ? parseFloat(info.version) : parseInt(parseFloat(info.osversion), 10); + info.osversion = parseFloat(info.osversion); + + // iOS forces all browsers to use Safari under the hood + // as the Safari version seems to match the iOS version + // we just explicitely use the osversion instead + // https://github.com/rofrischmann/inline-style-prefixer/issues/72 + if (info.browser === 'ios_saf' && info.version > info.osversion) { + info.version = info.osversion; + info.safari = true; + } + + // seperate native android chrome + // https://github.com/rofrischmann/inline-style-prefixer/issues/45 + if (info.browser === 'android' && info.chrome && info.version > 37) { + info.browser = 'and_chr'; + } + + // For android < 4.4 we want to check the osversion + // not the chrome version, see issue #26 + // https://github.com/rofrischmann/inline-style-prefixer/issues/26 + if (info.browser === 'android' && info.osversion < 5) { + info.version = info.osversion; + } + + return info; +}; + +module.exports = exports['default']; + +/***/ }), +/* 682 */ +/***/ (function(module, exports, __webpack_require__) { + +/*! + * Bowser - a browser detector + * https://github.com/ded/bowser + * MIT License | (c) Dustin Diaz 2015 + */ + +!function (root, name, definition) { + if (typeof module != 'undefined' && module.exports) module.exports = definition() + else if (true) __webpack_require__(683)(name, definition) + else root[name] = definition() +}(this, 'bowser', function () { + /** + * See useragents.js for examples of navigator.userAgent + */ + + var t = true + + function detect(ua) { + + function getFirstMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[1]) || ''; + } + + function getSecondMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[2]) || ''; + } + + var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase() + , likeAndroid = /like android/i.test(ua) + , android = !likeAndroid && /android/i.test(ua) + , nexusMobile = /nexus\s*[0-6]\s*/i.test(ua) + , nexusTablet = !nexusMobile && /nexus\s*[0-9]+/i.test(ua) + , chromeos = /CrOS/.test(ua) + , silk = /silk/i.test(ua) + , sailfish = /sailfish/i.test(ua) + , tizen = /tizen/i.test(ua) + , webos = /(web|hpw)os/i.test(ua) + , windowsphone = /windows phone/i.test(ua) + , samsungBrowser = /SamsungBrowser/i.test(ua) + , windows = !windowsphone && /windows/i.test(ua) + , mac = !iosdevice && !silk && /macintosh/i.test(ua) + , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua) + , edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i) + , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i) + , tablet = /tablet/i.test(ua) + , mobile = !tablet && /[^-]mobi/i.test(ua) + , xbox = /xbox/i.test(ua) + , result + + if (/opera/i.test(ua)) { + // an old Opera + result = { + name: 'Opera' + , opera: t + , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i) + } + } else if (/opr|opios/i.test(ua)) { + // a new Opera + result = { + name: 'Opera' + , opera: t + , version: getFirstMatch(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i) || versionIdentifier + } + } + else if (/SamsungBrowser/i.test(ua)) { + result = { + name: 'Samsung Internet for Android' + , samsungBrowser: t + , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/coast/i.test(ua)) { + result = { + name: 'Opera Coast' + , coast: t + , version: versionIdentifier || getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/yabrowser/i.test(ua)) { + result = { + name: 'Yandex Browser' + , yandexbrowser: t + , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/ucbrowser/i.test(ua)) { + result = { + name: 'UC Browser' + , ucbrowser: t + , version: getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/mxios/i.test(ua)) { + result = { + name: 'Maxthon' + , maxthon: t + , version: getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/epiphany/i.test(ua)) { + result = { + name: 'Epiphany' + , epiphany: t + , version: getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/puffin/i.test(ua)) { + result = { + name: 'Puffin' + , puffin: t + , version: getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i) + } + } + else if (/sleipnir/i.test(ua)) { + result = { + name: 'Sleipnir' + , sleipnir: t + , version: getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/k-meleon/i.test(ua)) { + result = { + name: 'K-Meleon' + , kMeleon: t + , version: getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (windowsphone) { + result = { + name: 'Windows Phone' + , windowsphone: t + } + if (edgeVersion) { + result.msedge = t + result.version = edgeVersion + } + else { + result.msie = t + result.version = getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i) + } + } + else if (/msie|trident/i.test(ua)) { + result = { + name: 'Internet Explorer' + , msie: t + , version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i) + } + } else if (chromeos) { + result = { + name: 'Chrome' + , chromeos: t + , chromeBook: t + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } else if (/chrome.+? edge/i.test(ua)) { + result = { + name: 'Microsoft Edge' + , msedge: t + , version: edgeVersion + } + } + else if (/vivaldi/i.test(ua)) { + result = { + name: 'Vivaldi' + , vivaldi: t + , version: getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i) || versionIdentifier + } + } + else if (sailfish) { + result = { + name: 'Sailfish' + , sailfish: t + , version: getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i) + } + } + else if (/seamonkey\//i.test(ua)) { + result = { + name: 'SeaMonkey' + , seamonkey: t + , version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i) + } + } + else if (/firefox|iceweasel|fxios/i.test(ua)) { + result = { + name: 'Firefox' + , firefox: t + , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i) + } + if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) { + result.firefoxos = t + } + } + else if (silk) { + result = { + name: 'Amazon Silk' + , silk: t + , version : getFirstMatch(/silk\/(\d+(\.\d+)?)/i) + } + } + else if (/phantom/i.test(ua)) { + result = { + name: 'PhantomJS' + , phantom: t + , version: getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i) + } + } + else if (/slimerjs/i.test(ua)) { + result = { + name: 'SlimerJS' + , slimer: t + , version: getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i) + } + } + else if (/blackberry|\bbb\d+/i.test(ua) || /rim\stablet/i.test(ua)) { + result = { + name: 'BlackBerry' + , blackberry: t + , version: versionIdentifier || getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i) + } + } + else if (webos) { + result = { + name: 'WebOS' + , webos: t + , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i) + }; + /touchpad\//i.test(ua) && (result.touchpad = t) + } + else if (/bada/i.test(ua)) { + result = { + name: 'Bada' + , bada: t + , version: getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i) + }; + } + else if (tizen) { + result = { + name: 'Tizen' + , tizen: t + , version: getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || versionIdentifier + }; + } + else if (/qupzilla/i.test(ua)) { + result = { + name: 'QupZilla' + , qupzilla: t + , version: getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || versionIdentifier + } + } + else if (/chromium/i.test(ua)) { + result = { + name: 'Chromium' + , chromium: t + , version: getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || versionIdentifier + } + } + else if (/chrome|crios|crmo/i.test(ua)) { + result = { + name: 'Chrome' + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } + else if (android) { + result = { + name: 'Android' + , version: versionIdentifier + } + } + else if (/safari|applewebkit/i.test(ua)) { + result = { + name: 'Safari' + , safari: t + } + if (versionIdentifier) { + result.version = versionIdentifier + } + } + else if (iosdevice) { + result = { + name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod' + } + // WTF: version is not part of user agent in web apps + if (versionIdentifier) { + result.version = versionIdentifier + } + } + else if(/googlebot/i.test(ua)) { + result = { + name: 'Googlebot' + , googlebot: t + , version: getFirstMatch(/googlebot\/(\d+(\.\d+))/i) || versionIdentifier + } + } + else { + result = { + name: getFirstMatch(/^(.*)\/(.*) /), + version: getSecondMatch(/^(.*)\/(.*) /) + }; + } + + // set webkit or gecko flag for browsers based on these engines + if (!result.msedge && /(apple)?webkit/i.test(ua)) { + if (/(apple)?webkit\/537\.36/i.test(ua)) { + result.name = result.name || "Blink" + result.blink = t + } else { + result.name = result.name || "Webkit" + result.webkit = t + } + if (!result.version && versionIdentifier) { + result.version = versionIdentifier + } + } else if (!result.opera && /gecko\//i.test(ua)) { + result.name = result.name || "Gecko" + result.gecko = t + result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i) + } + + // set OS flags for platforms that have multiple browsers + if (!result.windowsphone && !result.msedge && (android || result.silk)) { + result.android = t + } else if (!result.windowsphone && !result.msedge && iosdevice) { + result[iosdevice] = t + result.ios = t + } else if (mac) { + result.mac = t + } else if (xbox) { + result.xbox = t + } else if (windows) { + result.windows = t + } else if (linux) { + result.linux = t + } + + // OS version extraction + var osVersion = ''; + if (result.windowsphone) { + osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i); + } else if (iosdevice) { + osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i); + osVersion = osVersion.replace(/[_\s]/g, '.'); + } else if (android) { + osVersion = getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i); + } else if (result.webos) { + osVersion = getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i); + } else if (result.blackberry) { + osVersion = getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i); + } else if (result.bada) { + osVersion = getFirstMatch(/bada\/(\d+(\.\d+)*)/i); + } else if (result.tizen) { + osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i); + } + if (osVersion) { + result.osversion = osVersion; + } + + // device type extraction + var osMajorVersion = osVersion.split('.')[0]; + if ( + tablet + || nexusTablet + || iosdevice == 'ipad' + || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile))) + || result.silk + ) { + result.tablet = t + } else if ( + mobile + || iosdevice == 'iphone' + || iosdevice == 'ipod' + || android + || nexusMobile + || result.blackberry + || result.webos + || result.bada + ) { + result.mobile = t + } + + // Graded Browser Support + // http://developer.yahoo.com/yui/articles/gbs + if (result.msedge || + (result.msie && result.version >= 10) || + (result.yandexbrowser && result.version >= 15) || + (result.vivaldi && result.version >= 1.0) || + (result.chrome && result.version >= 20) || + (result.samsungBrowser && result.version >= 4) || + (result.firefox && result.version >= 20.0) || + (result.safari && result.version >= 6) || + (result.opera && result.version >= 10.0) || + (result.ios && result.osversion && result.osversion.split(".")[0] >= 6) || + (result.blackberry && result.version >= 10.1) + || (result.chromium && result.version >= 20) + ) { + result.a = t; + } + else if ((result.msie && result.version < 10) || + (result.chrome && result.version < 20) || + (result.firefox && result.version < 20.0) || + (result.safari && result.version < 6) || + (result.opera && result.version < 10.0) || + (result.ios && result.osversion && result.osversion.split(".")[0] < 6) + || (result.chromium && result.version < 20) + ) { + result.c = t + } else result.x = t + + return result + } + + var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '') + + bowser.test = function (browserList) { + for (var i = 0; i < browserList.length; ++i) { + var browserItem = browserList[i]; + if (typeof browserItem=== 'string') { + if (browserItem in bowser) { + return true; + } + } + } + return false; + } + + /** + * Get version precisions count + * + * @example + * getVersionPrecision("1.10.3") // 3 + * + * @param {string} version + * @return {number} + */ + function getVersionPrecision(version) { + return version.split(".").length; + } + + /** + * Array::map polyfill + * + * @param {Array} arr + * @param {Function} iterator + * @return {Array} + */ + function map(arr, iterator) { + var result = [], i; + if (Array.prototype.map) { + return Array.prototype.map.call(arr, iterator); + } + for (i = 0; i < arr.length; i++) { + result.push(iterator(arr[i])); + } + return result; + } + + /** + * Calculate browser version weight + * + * @example + * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1 + * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1 + * compareVersions(['1.10.2.1', '1.10.2.1']); // 0 + * compareVersions(['1.10.2.1', '1.0800.2']); // -1 + * + * @param {Array<String>} versions versions to compare + * @return {Number} comparison result + */ + function compareVersions(versions) { + // 1) get common precision for both versions, for example for "10.0" and "9" it should be 2 + var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1])); + var chunks = map(versions, function (version) { + var delta = precision - getVersionPrecision(version); + + // 2) "9" -> "9.0" (for precision = 2) + version = version + new Array(delta + 1).join(".0"); + + // 3) "9.0" -> ["000000000"", "000000009"] + return map(version.split("."), function (chunk) { + return new Array(20 - chunk.length).join("0") + chunk; + }).reverse(); + }); + + // iterate in reverse order by reversed chunks array + while (--precision >= 0) { + // 4) compare: "000000009" > "000000010" = false (but "9" > "10" = true) + if (chunks[0][precision] > chunks[1][precision]) { + return 1; + } + else if (chunks[0][precision] === chunks[1][precision]) { + if (precision === 0) { + // all version chunks are same + return 0; + } + } + else { + return -1; + } + } + } + + /** + * Check if browser is unsupported + * + * @example + * bowser.isUnsupportedBrowser({ + * msie: "10", + * firefox: "23", + * chrome: "29", + * safari: "5.1", + * opera: "16", + * phantom: "534" + * }); + * + * @param {Object} minVersions map of minimal version to browser + * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map + * @param {String} [ua] user agent string + * @return {Boolean} + */ + function isUnsupportedBrowser(minVersions, strictMode, ua) { + var _bowser = bowser; + + // make strictMode param optional with ua param usage + if (typeof strictMode === 'string') { + ua = strictMode; + strictMode = void(0); + } + + if (strictMode === void(0)) { + strictMode = false; + } + if (ua) { + _bowser = detect(ua); + } + + var version = "" + _bowser.version; + for (var browser in minVersions) { + if (minVersions.hasOwnProperty(browser)) { + if (_bowser[browser]) { + if (typeof minVersions[browser] !== 'string') { + throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions)); + } + + // browser version and min supported version. + return compareVersions([version, minVersions[browser]]) < 0; + } + } + } + + return strictMode; // not found + } + + /** + * Check if browser is supported + * + * @param {Object} minVersions map of minimal version to browser + * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map + * @param {String} [ua] user agent string + * @return {Boolean} + */ + function check(minVersions, strictMode, ua) { + return !isUnsupportedBrowser(minVersions, strictMode, ua); + } + + bowser.isUnsupportedBrowser = isUnsupportedBrowser; + bowser.compareVersions = compareVersions; + bowser.check = check; + + /* + * Set our detect method to the main bowser object so we can + * reuse it to test other user agents. + * This is needed to implement future tests. + */ + bowser._detect = detect; + + return bowser +}); + + +/***/ }), +/* 683 */ +/***/ (function(module, exports) { + +module.exports = function() { + throw new Error("define cannot be used indirect"); +}; + + +/***/ }), +/* 684 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (_ref) { + var browser = _ref.browser; + var version = _ref.version; + var prefix = _ref.prefix; + + var prefixedKeyframes = 'keyframes'; + + if (browser === 'chrome' && version < 43 || (browser === 'safari' || browser === 'ios_saf') && version < 9 || browser === 'opera' && version < 30 || browser === 'android' && version <= 4.4 || browser === 'and_uc') { + prefixedKeyframes = prefix.css + prefixedKeyframes; + } + return prefixedKeyframes; +}; + +module.exports = exports['default']; + +/***/ }), +/* 685 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { "chrome": { "transform": 35, "transformOrigin": 35, "transformOriginX": 35, "transformOriginY": 35, "backfaceVisibility": 35, "perspective": 35, "perspectiveOrigin": 35, "transformStyle": 35, "transformOriginZ": 35, "animation": 42, "animationDelay": 42, "animationDirection": 42, "animationFillMode": 42, "animationDuration": 42, "animationIterationCount": 42, "animationName": 42, "animationPlayState": 42, "animationTimingFunction": 42, "appearance": 55, "userSelect": 55, "fontKerning": 32, "textEmphasisPosition": 55, "textEmphasis": 55, "textEmphasisStyle": 55, "textEmphasisColor": 55, "boxDecorationBreak": 55, "clipPath": 55, "maskImage": 55, "maskMode": 55, "maskRepeat": 55, "maskPosition": 55, "maskClip": 55, "maskOrigin": 55, "maskSize": 55, "maskComposite": 55, "mask": 55, "maskBorderSource": 55, "maskBorderMode": 55, "maskBorderSlice": 55, "maskBorderWidth": 55, "maskBorderOutset": 55, "maskBorderRepeat": 55, "maskBorder": 55, "maskType": 55, "textDecorationStyle": 55, "textDecorationSkip": 55, "textDecorationLine": 55, "textDecorationColor": 55, "filter": 52, "fontFeatureSettings": 47, "breakAfter": 49, "breakBefore": 49, "breakInside": 49, "columnCount": 49, "columnFill": 49, "columnGap": 49, "columnRule": 49, "columnRuleColor": 49, "columnRuleStyle": 49, "columnRuleWidth": 49, "columns": 49, "columnSpan": 49, "columnWidth": 49 }, "safari": { "flex": 8, "flexBasis": 8, "flexDirection": 8, "flexGrow": 8, "flexFlow": 8, "flexShrink": 8, "flexWrap": 8, "alignContent": 8, "alignItems": 8, "alignSelf": 8, "justifyContent": 8, "order": 8, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8, "transformOrigin": 8, "transformOriginX": 8, "transformOriginY": 8, "backfaceVisibility": 8, "perspective": 8, "perspectiveOrigin": 8, "transformStyle": 8, "transformOriginZ": 8, "animation": 8, "animationDelay": 8, "animationDirection": 8, "animationFillMode": 8, "animationDuration": 8, "animationIterationCount": 8, "animationName": 8, "animationPlayState": 8, "animationTimingFunction": 8, "appearance": 10, "userSelect": 10, "backdropFilter": 10, "fontKerning": 9, "scrollSnapType": 10, "scrollSnapPointsX": 10, "scrollSnapPointsY": 10, "scrollSnapDestination": 10, "scrollSnapCoordinate": 10, "textEmphasisPosition": 7, "textEmphasis": 7, "textEmphasisStyle": 7, "textEmphasisColor": 7, "boxDecorationBreak": 10, "clipPath": 10, "maskImage": 10, "maskMode": 10, "maskRepeat": 10, "maskPosition": 10, "maskClip": 10, "maskOrigin": 10, "maskSize": 10, "maskComposite": 10, "mask": 10, "maskBorderSource": 10, "maskBorderMode": 10, "maskBorderSlice": 10, "maskBorderWidth": 10, "maskBorderOutset": 10, "maskBorderRepeat": 10, "maskBorder": 10, "maskType": 10, "textDecorationStyle": 10, "textDecorationSkip": 10, "textDecorationLine": 10, "textDecorationColor": 10, "shapeImageThreshold": 10, "shapeImageMargin": 10, "shapeImageOutside": 10, "filter": 9, "hyphens": 10, "flowInto": 10, "flowFrom": 10, "breakBefore": 8, "breakAfter": 8, "breakInside": 8, "regionFragment": 10, "columnCount": 8, "columnFill": 8, "columnGap": 8, "columnRule": 8, "columnRuleColor": 8, "columnRuleStyle": 8, "columnRuleWidth": 8, "columns": 8, "columnSpan": 8, "columnWidth": 8 }, "firefox": { "appearance": 51, "userSelect": 51, "boxSizing": 28, "textAlignLast": 48, "textDecorationStyle": 35, "textDecorationSkip": 35, "textDecorationLine": 35, "textDecorationColor": 35, "tabSize": 51, "hyphens": 42, "fontFeatureSettings": 33, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "opera": { "flex": 16, "flexBasis": 16, "flexDirection": 16, "flexGrow": 16, "flexFlow": 16, "flexShrink": 16, "flexWrap": 16, "alignContent": 16, "alignItems": 16, "alignSelf": 16, "justifyContent": 16, "order": 16, "transform": 22, "transformOrigin": 22, "transformOriginX": 22, "transformOriginY": 22, "backfaceVisibility": 22, "perspective": 22, "perspectiveOrigin": 22, "transformStyle": 22, "transformOriginZ": 22, "animation": 29, "animationDelay": 29, "animationDirection": 29, "animationFillMode": 29, "animationDuration": 29, "animationIterationCount": 29, "animationName": 29, "animationPlayState": 29, "animationTimingFunction": 29, "appearance": 41, "userSelect": 41, "fontKerning": 19, "textEmphasisPosition": 41, "textEmphasis": 41, "textEmphasisStyle": 41, "textEmphasisColor": 41, "boxDecorationBreak": 41, "clipPath": 41, "maskImage": 41, "maskMode": 41, "maskRepeat": 41, "maskPosition": 41, "maskClip": 41, "maskOrigin": 41, "maskSize": 41, "maskComposite": 41, "mask": 41, "maskBorderSource": 41, "maskBorderMode": 41, "maskBorderSlice": 41, "maskBorderWidth": 41, "maskBorderOutset": 41, "maskBorderRepeat": 41, "maskBorder": 41, "maskType": 41, "textDecorationStyle": 41, "textDecorationSkip": 41, "textDecorationLine": 41, "textDecorationColor": 41, "filter": 39, "fontFeatureSettings": 34, "breakAfter": 36, "breakBefore": 36, "breakInside": 36, "columnCount": 36, "columnFill": 36, "columnGap": 36, "columnRule": 36, "columnRuleColor": 36, "columnRuleStyle": 36, "columnRuleWidth": 36, "columns": 36, "columnSpan": 36, "columnWidth": 36 }, "ie": { "flex": 10, "flexDirection": 10, "flexFlow": 10, "flexWrap": 10, "transform": 9, "transformOrigin": 9, "transformOriginX": 9, "transformOriginY": 9, "userSelect": 11, "wrapFlow": 11, "wrapThrough": 11, "wrapMargin": 11, "scrollSnapType": 11, "scrollSnapPointsX": 11, "scrollSnapPointsY": 11, "scrollSnapDestination": 11, "scrollSnapCoordinate": 11, "touchAction": 10, "hyphens": 11, "flowInto": 11, "flowFrom": 11, "breakBefore": 11, "breakAfter": 11, "breakInside": 11, "regionFragment": 11, "gridTemplateColumns": 11, "gridTemplateRows": 11, "gridTemplateAreas": 11, "gridTemplate": 11, "gridAutoColumns": 11, "gridAutoRows": 11, "gridAutoFlow": 11, "grid": 11, "gridRowStart": 11, "gridColumnStart": 11, "gridRowEnd": 11, "gridRow": 11, "gridColumn": 11, "gridColumnEnd": 11, "gridColumnGap": 11, "gridRowGap": 11, "gridArea": 11, "gridGap": 11, "textSizeAdjust": 11 }, "edge": { "userSelect": 14, "wrapFlow": 14, "wrapThrough": 14, "wrapMargin": 14, "scrollSnapType": 14, "scrollSnapPointsX": 14, "scrollSnapPointsY": 14, "scrollSnapDestination": 14, "scrollSnapCoordinate": 14, "hyphens": 14, "flowInto": 14, "flowFrom": 14, "breakBefore": 14, "breakAfter": 14, "breakInside": 14, "regionFragment": 14, "gridTemplateColumns": 14, "gridTemplateRows": 14, "gridTemplateAreas": 14, "gridTemplate": 14, "gridAutoColumns": 14, "gridAutoRows": 14, "gridAutoFlow": 14, "grid": 14, "gridRowStart": 14, "gridColumnStart": 14, "gridRowEnd": 14, "gridRow": 14, "gridColumn": 14, "gridColumnEnd": 14, "gridColumnGap": 14, "gridRowGap": 14, "gridArea": 14, "gridGap": 14 }, "ios_saf": { "flex": 8.1, "flexBasis": 8.1, "flexDirection": 8.1, "flexGrow": 8.1, "flexFlow": 8.1, "flexShrink": 8.1, "flexWrap": 8.1, "alignContent": 8.1, "alignItems": 8.1, "alignSelf": 8.1, "justifyContent": 8.1, "order": 8.1, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8.1, "transformOrigin": 8.1, "transformOriginX": 8.1, "transformOriginY": 8.1, "backfaceVisibility": 8.1, "perspective": 8.1, "perspectiveOrigin": 8.1, "transformStyle": 8.1, "transformOriginZ": 8.1, "animation": 8.1, "animationDelay": 8.1, "animationDirection": 8.1, "animationFillMode": 8.1, "animationDuration": 8.1, "animationIterationCount": 8.1, "animationName": 8.1, "animationPlayState": 8.1, "animationTimingFunction": 8.1, "appearance": 9.3, "userSelect": 9.3, "backdropFilter": 9.3, "fontKerning": 9.3, "scrollSnapType": 9.3, "scrollSnapPointsX": 9.3, "scrollSnapPointsY": 9.3, "scrollSnapDestination": 9.3, "scrollSnapCoordinate": 9.3, "boxDecorationBreak": 9.3, "clipPath": 9.3, "maskImage": 9.3, "maskMode": 9.3, "maskRepeat": 9.3, "maskPosition": 9.3, "maskClip": 9.3, "maskOrigin": 9.3, "maskSize": 9.3, "maskComposite": 9.3, "mask": 9.3, "maskBorderSource": 9.3, "maskBorderMode": 9.3, "maskBorderSlice": 9.3, "maskBorderWidth": 9.3, "maskBorderOutset": 9.3, "maskBorderRepeat": 9.3, "maskBorder": 9.3, "maskType": 9.3, "textSizeAdjust": 9.3, "textDecorationStyle": 9.3, "textDecorationSkip": 9.3, "textDecorationLine": 9.3, "textDecorationColor": 9.3, "shapeImageThreshold": 9.3, "shapeImageMargin": 9.3, "shapeImageOutside": 9.3, "filter": 9, "hyphens": 9.3, "flowInto": 9.3, "flowFrom": 9.3, "breakBefore": 8.1, "breakAfter": 8.1, "breakInside": 8.1, "regionFragment": 9.3, "columnCount": 8.1, "columnFill": 8.1, "columnGap": 8.1, "columnRule": 8.1, "columnRuleColor": 8.1, "columnRuleStyle": 8.1, "columnRuleWidth": 8.1, "columns": 8.1, "columnSpan": 8.1, "columnWidth": 8.1 }, "android": { "flex": 4.2, "flexBasis": 4.2, "flexDirection": 4.2, "flexGrow": 4.2, "flexFlow": 4.2, "flexShrink": 4.2, "flexWrap": 4.2, "alignContent": 4.2, "alignItems": 4.2, "alignSelf": 4.2, "justifyContent": 4.2, "order": 4.2, "transition": 4.2, "transitionDelay": 4.2, "transitionDuration": 4.2, "transitionProperty": 4.2, "transitionTimingFunction": 4.2, "transform": 4.4, "transformOrigin": 4.4, "transformOriginX": 4.4, "transformOriginY": 4.4, "backfaceVisibility": 4.4, "perspective": 4.4, "perspectiveOrigin": 4.4, "transformStyle": 4.4, "transformOriginZ": 4.4, "animation": 4.4, "animationDelay": 4.4, "animationDirection": 4.4, "animationFillMode": 4.4, "animationDuration": 4.4, "animationIterationCount": 4.4, "animationName": 4.4, "animationPlayState": 4.4, "animationTimingFunction": 4.4, "appearance": 51, "userSelect": 51, "fontKerning": 4.4, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "filter": 51, "fontFeatureSettings": 4.4, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "and_chr": { "appearance": 51, "userSelect": 51, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "textDecorationStyle": 51, "textDecorationSkip": 51, "textDecorationLine": 51, "textDecorationColor": 51, "filter": 51 }, "and_uc": { "flex": 9.9, "flexBasis": 9.9, "flexDirection": 9.9, "flexGrow": 9.9, "flexFlow": 9.9, "flexShrink": 9.9, "flexWrap": 9.9, "alignContent": 9.9, "alignItems": 9.9, "alignSelf": 9.9, "justifyContent": 9.9, "order": 9.9, "transition": 9.9, "transitionDelay": 9.9, "transitionDuration": 9.9, "transitionProperty": 9.9, "transitionTimingFunction": 9.9, "transform": 9.9, "transformOrigin": 9.9, "transformOriginX": 9.9, "transformOriginY": 9.9, "backfaceVisibility": 9.9, "perspective": 9.9, "perspectiveOrigin": 9.9, "transformStyle": 9.9, "transformOriginZ": 9.9, "animation": 9.9, "animationDelay": 9.9, "animationDirection": 9.9, "animationFillMode": 9.9, "animationDuration": 9.9, "animationIterationCount": 9.9, "animationName": 9.9, "animationPlayState": 9.9, "animationTimingFunction": 9.9, "appearance": 9.9, "userSelect": 9.9, "fontKerning": 9.9, "textEmphasisPosition": 9.9, "textEmphasis": 9.9, "textEmphasisStyle": 9.9, "textEmphasisColor": 9.9, "maskImage": 9.9, "maskMode": 9.9, "maskRepeat": 9.9, "maskPosition": 9.9, "maskClip": 9.9, "maskOrigin": 9.9, "maskSize": 9.9, "maskComposite": 9.9, "mask": 9.9, "maskBorderSource": 9.9, "maskBorderMode": 9.9, "maskBorderSlice": 9.9, "maskBorderWidth": 9.9, "maskBorderOutset": 9.9, "maskBorderRepeat": 9.9, "maskBorder": 9.9, "maskType": 9.9, "textSizeAdjust": 9.9, "filter": 9.9, "hyphens": 9.9, "flowInto": 9.9, "flowFrom": 9.9, "breakBefore": 9.9, "breakAfter": 9.9, "breakInside": 9.9, "regionFragment": 9.9, "fontFeatureSettings": 9.9, "columnCount": 9.9, "columnFill": 9.9, "columnGap": 9.9, "columnRule": 9.9, "columnRuleColor": 9.9, "columnRuleStyle": 9.9, "columnRuleWidth": 9.9, "columns": 9.9, "columnSpan": 9.9, "columnWidth": 9.9 }, "op_mini": {} }; +module.exports = exports["default"]; + +/***/ }), +/* 686 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = position; + +var _getPrefixedValue = __webpack_require__(37); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function position(_ref) { + var property = _ref.property; + var value = _ref.value; + var browser = _ref.browserInfo.browser; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'position' && value === 'sticky' && (browser === 'safari' || browser === 'ios_saf')) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 687 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = calc; + +var _getPrefixedValue = __webpack_require__(37); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function calc(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (typeof value === 'string' && value.indexOf('calc(') > -1 && (browser === 'firefox' && version < 15 || browser === 'chrome' && version < 25 || browser === 'safari' && version < 6.1 || browser === 'ios_saf' && version < 7)) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(value.replace(/calc\(/g, css + 'calc('), value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 688 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = zoomCursor; + +var _getPrefixedValue = __webpack_require__(37); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { 'zoom-in': true, 'zoom-out': true }; + +function zoomCursor(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'cursor' && values[value] && (browser === 'firefox' && version < 24 || browser === 'chrome' && version < 37 || browser === 'safari' && version < 9 || browser === 'opera' && version < 24)) { + return { + cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 689 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = grabCursor; + +var _getPrefixedValue = __webpack_require__(37); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { grab: true, grabbing: true }; + +function grabCursor(_ref) { + var property = _ref.property; + var value = _ref.value; + var browser = _ref.browserInfo.browser; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + // adds prefixes for firefox, chrome, safari, and opera regardless of version until a reliable brwoser support info can be found (see: https://github.com/rofrischmann/inline-style-prefixer/issues/79) + if (property === 'cursor' && values[value] && (browser === 'firefox' || browser === 'chrome' || browser === 'safari' || browser === 'opera')) { + return { + cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 690 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flex; + +var _getPrefixedValue = __webpack_require__(37); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { flex: true, 'inline-flex': true }; + +function flex(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'display' && values[value] && (browser === 'chrome' && version < 29 && version > 20 || (browser === 'safari' || browser === 'ios_saf') && version < 9 && version > 6 || browser === 'opera' && (version == 15 || version == 16))) { + return { + display: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 691 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sizing; + +var _getPrefixedValue = __webpack_require__(37); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { + maxHeight: true, + maxWidth: true, + width: true, + height: true, + columnWidth: true, + minWidth: true, + minHeight: true +}; +var values = { + 'min-content': true, + 'max-content': true, + 'fill-available': true, + 'fit-content': true, + 'contain-floats': true +}; + +function sizing(_ref) { + var property = _ref.property; + var value = _ref.value; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + // This might change in the future + // Keep an eye on it + if (properties[property] && values[value]) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 692 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gradient; + +var _getPrefixedValue = __webpack_require__(37); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; + +function gradient(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (typeof value === 'string' && value.match(values) !== null && (browser === 'firefox' && version < 16 || browser === 'chrome' && version < 26 || (browser === 'safari' || browser === 'ios_saf') && version < 7 || (browser === 'opera' || browser === 'op_mini') && version < 12.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 693 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + +exports.default = transition; + +var _hyphenateStyleName = __webpack_require__(312); + +var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); + +var _unprefixProperty = __webpack_require__(694); + +var _unprefixProperty2 = _interopRequireDefault(_unprefixProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { transition: true, transitionProperty: true }; + +function transition(_ref) { + var property = _ref.property; + var value = _ref.value; + var css = _ref.prefix.css; + var requiresPrefix = _ref.requiresPrefix; + var keepUnprefixed = _ref.keepUnprefixed; + + // also check for already prefixed transitions + var unprefixedProperty = (0, _unprefixProperty2.default)(property); + + if (typeof value === 'string' && properties[unprefixedProperty]) { + var _ret = function () { + // TODO: memoize this array + var requiresPrefixDashCased = Object.keys(requiresPrefix).map(function (prop) { + return (0, _hyphenateStyleName2.default)(prop); + }); + + // only split multi values, not cubic beziers + var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); + + requiresPrefixDashCased.forEach(function (prop) { + multipleValues.forEach(function (val, index) { + if (val.indexOf(prop) > -1 && prop !== 'order') { + multipleValues[index] = val.replace(prop, css + prop) + (keepUnprefixed ? ',' + val : ''); + } + }); + }); + + return { + v: _defineProperty({}, property, multipleValues.join(',')) + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } +} +module.exports = exports['default']; + +/***/ }), +/* 694 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (property) { + var unprefixed = property.replace(/^(ms|Webkit|Moz|O)/, ''); + return unprefixed.charAt(0).toLowerCase() + unprefixed.slice(1); +}; + +module.exports = exports['default']; + +/***/ }), +/* 695 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxIE; + +var _getPrefixedValue = __webpack_require__(37); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'distribute', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + flex: 'flexbox', + 'inline-flex': 'inline-flexbox' +}; +var alternativeProps = { + alignContent: 'msFlexLinePack', + alignSelf: 'msFlexItemAlign', + alignItems: 'msFlexAlign', + justifyContent: 'msFlexPack', + order: 'msFlexOrder', + flexGrow: 'msFlexPositive', + flexShrink: 'msFlexNegative', + flexBasis: 'msPreferredSize' +}; + +function flexboxIE(_ref) { + var property = _ref.property; + var value = _ref.value; + var styles = _ref.styles; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if ((alternativeProps[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'ie_mob' || browser === 'ie') && version == 10) { + if (!keepUnprefixed && !Array.isArray(styles[property])) { + delete styles[property]; + } + if (property === 'display' && alternativeValues[value]) { + return { + display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } + } +} +module.exports = exports['default']; + +/***/ }), +/* 696 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxOld; + +var _getPrefixedValue = __webpack_require__(37); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'justify', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + 'wrap-reverse': 'multiple', + wrap: 'multiple', + flex: 'box', + 'inline-flex': 'inline-box' +}; + +var alternativeProps = { + alignItems: 'WebkitBoxAlign', + justifyContent: 'WebkitBoxPack', + flexWrap: 'WebkitBoxLines' +}; + +var otherProps = ['alignContent', 'alignSelf', 'order', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection']; +var properties = Object.keys(alternativeProps).concat(otherProps); + +function flexboxOld(_ref) { + var property = _ref.property; + var value = _ref.value; + var styles = _ref.styles; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'firefox' && version < 22 || browser === 'chrome' && version < 21 || (browser === 'safari' || browser === 'ios_saf') && version <= 6.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { + if (!keepUnprefixed && !Array.isArray(styles[property])) { + delete styles[property]; + } + if (property === 'flexDirection' && typeof value === 'string') { + return { + WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', + WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' + }; + } + if (property === 'display' && alternativeValues[value]) { + return { + display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } + } +} +module.exports = exports['default']; + +/***/ }), +/* 697 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = callOnce; + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CALLED_ONCE = 'muiPrepared'; + +function callOnce() { + if (false) { + return function (style) { + if (style[CALLED_ONCE]) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: You cannot call prepareStyles() on the same style object more than once.') : void 0; + } + style[CALLED_ONCE] = true; + return style; + }; + } +} + +/***/ }), +/* 698 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(59); + +var _keys2 = _interopRequireDefault(_keys); + +exports.default = rtl; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var reTranslate = /((^|\s)translate(3d|X)?\()(\-?[\d]+)/; +var reSkew = /((^|\s)skew(x|y)?\()\s*(\-?[\d]+)(deg|rad|grad)(,\s*(\-?[\d]+)(deg|rad|grad))?/; + +/** + * This function ensures that `style` supports both ltr and rtl directions by + * checking `styleConstants` in `muiTheme` and replacing attribute keys if + * necessary. + */ +function rtl(muiTheme) { + if (muiTheme.isRtl) { + return function (style) { + if (style.directionInvariant === true) { + return style; + } + + var flippedAttributes = { + // Keys and their replacements. + right: 'left', + left: 'right', + marginRight: 'marginLeft', + marginLeft: 'marginRight', + paddingRight: 'paddingLeft', + paddingLeft: 'paddingRight', + borderRight: 'borderLeft', + borderLeft: 'borderRight' + }; + + var newStyle = {}; + + (0, _keys2.default)(style).forEach(function (attribute) { + var value = style[attribute]; + var key = attribute; + + if (flippedAttributes.hasOwnProperty(attribute)) { + key = flippedAttributes[attribute]; + } + + switch (attribute) { + case 'float': + case 'textAlign': + if (value === 'right') { + value = 'left'; + } else if (value === 'left') { + value = 'right'; + } + break; + + case 'direction': + if (value === 'ltr') { + value = 'rtl'; + } else if (value === 'rtl') { + value = 'ltr'; + } + break; + + case 'transform': + if (!value) break; + var matches = void 0; + if (matches = value.match(reTranslate)) { + value = value.replace(matches[0], matches[1] + -parseFloat(matches[4])); + } + if (matches = value.match(reSkew)) { + value = value.replace(matches[0], matches[1] + -parseFloat(matches[4]) + matches[5] + matches[6] ? ', ' + (-parseFloat(matches[7]) + matches[8]) : ''); + } + break; + + case 'transformOrigin': + if (!value) break; + if (value.indexOf('right') > -1) { + value = value.replace('right', 'left'); + } else if (value.indexOf('left') > -1) { + value = value.replace('left', 'right'); + } + break; + } + + newStyle[key] = value; + }); + + return newStyle; + }; + } +} + +/***/ }), +/* 699 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(700); +module.exports = __webpack_require__(18).Object.keys; + +/***/ }), +/* 700 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(86) + , $keys = __webpack_require__(67); + +__webpack_require__(302)('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; +}); + +/***/ }), +/* 701 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = compose; +function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(undefined, arguments)); + }; + }); +} + +/***/ }), +/* 702 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(59); + +var _keys2 = _interopRequireDefault(_keys); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRedux = __webpack_require__(21); + +var _reactRouter = __webpack_require__(161); + +var _List = __webpack_require__(703); + +var _Drawer = __webpack_require__(725); + +var _Drawer2 = _interopRequireDefault(_Drawer); + +var _Subheader = __webpack_require__(314); + +var _Subheader2 = _interopRequireDefault(_Subheader); + +var _code = __webpack_require__(733); + +var _code2 = _interopRequireDefault(_code); + +var _shop = __webpack_require__(734); + +var _shop2 = _interopRequireDefault(_shop); + +var _accountCircle = __webpack_require__(735); + +var _accountCircle2 = _interopRequireDefault(_accountCircle); + +var _error = __webpack_require__(736); + +var _error2 = _interopRequireDefault(_error); + +var _Styles = __webpack_require__(62); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _Supreme = __webpack_require__(323); + +var _Menus = __webpack_require__(82); + +var Menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SelectableList = (0, _List.makeSelectable)(_List.List); + +function openUrlInNewTab(url) { + var win = window.open(url, '_blank'); + win.focus(); +} + +function getIconForShop(settings, shopName) { + var menus = (0, _keys2.default)(Menus).map(function (x) { + return Menus[x]; + }); + var isIncomplete = !settings[shopName] || menus.some(function (x) { + return !settings[shopName][x]; + }); + if (isIncomplete) { + return _react2.default.createElement(_error2.default, null); + } + return _react2.default.createElement(_shop2.default, null); +} + +function AppDrawer(props) { + var location = props.location, + currentProfile = props.currentProfile, + settings = props.settings; + + var paths = location.pathname.split('/').filter(function (x) { + return !!x; + }); + var currentPage = paths[0]; + return _react2.default.createElement( + _Drawer2.default, + { open: true }, + _react2.default.createElement( + 'div', + { style: _Styles2.default.logo }, + 'Supreme Auto Checkout' + ), + _react2.default.createElement( + SelectableList, + { value: currentPage }, + _react2.default.createElement( + _Subheader2.default, + null, + 'Shops' + ), + _react2.default.createElement(_List.ListItem, { + value: 'supreme', + primaryText: 'Supreme', + containerElement: _react2.default.createElement(_reactRouter.Link, { to: '/supreme/' }), + leftIcon: getIconForShop(settings, _Supreme.SHOP_NAME) + }), + _react2.default.createElement( + _Subheader2.default, + null, + 'Settings' + ), + _react2.default.createElement(_List.ListItem, { + value: 'profiles', + primaryText: 'Profiles (' + currentProfile + ')', + containerElement: _react2.default.createElement(_reactRouter.Link, { to: '/profiles/' }), + leftIcon: _react2.default.createElement(_accountCircle2.default, null) + }), + _react2.default.createElement( + _Subheader2.default, + null, + 'Other' + ), + _react2.default.createElement(_List.ListItem, { + value: 'about', + primaryText: 'Github', + onTouchTap: function onTouchTap() { + return openUrlInNewTab('https://github.com/val92130/Supreme-Auto-Checkout'); + }, + leftIcon: _react2.default.createElement(_code2.default, null) + }) + ) + ); +} + +AppDrawer.propTypes = { + location: _react.PropTypes.shape({ + pathname: _react.PropTypes.string.isRequired + }), + currentProfile: _react.PropTypes.string +}; + +function mapStateToProps(state) { + var currentProfile = state.profiles.currentProfile; + return { + settings: state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings, + currentProfile: currentProfile + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps)(AppDrawer); + +/***/ }), +/* 703 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.makeSelectable = exports.ListItem = exports.List = undefined; + +var _List2 = __webpack_require__(200); + +var _List3 = _interopRequireDefault(_List2); + +var _ListItem2 = __webpack_require__(315); + +var _ListItem3 = _interopRequireDefault(_ListItem2); + +var _makeSelectable2 = __webpack_require__(724); + +var _makeSelectable3 = _interopRequireDefault(_makeSelectable2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.List = _List3.default; +exports.ListItem = _ListItem3.default; +exports.makeSelectable = _makeSelectable3.default; +exports.default = _List3.default; + +/***/ }), +/* 704 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Subheader = function Subheader(props, context) { + var children = props.children, + inset = props.inset, + style = props.style, + other = (0, _objectWithoutProperties3.default)(props, ['children', 'inset', 'style']); + var _context$muiTheme = context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + subheader = _context$muiTheme.subheader; + + + var styles = { + root: { + boxSizing: 'border-box', + color: subheader.color, + fontSize: 14, + fontWeight: subheader.fontWeight, + lineHeight: '48px', + paddingLeft: inset ? 72 : 16, + width: '100%' + } + }; + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + children + ); +}; + +Subheader.muiName = 'Subheader'; + + false ? Subheader.propTypes = { + /** + * Node that will be placed inside the `Subheader`. + */ + children: _react.PropTypes.node, + /** + * If true, the `Subheader` will be indented. + */ + inset: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +Subheader.defaultProps = { + inset: false +}; + +Subheader.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +exports.default = Subheader; + +/***/ }), +/* 705 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(706).create; + +/***/ }), +/* 706 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(68); + +var ReactChildren = __webpack_require__(218); +var ReactElement = __webpack_require__(53); + +var emptyFunction = __webpack_require__(24); +var invariant = __webpack_require__(9); +var warning = __webpack_require__(11); + +/** + * We used to allow keyed objects to serve as a collection of ReactElements, + * or nested sets. This allowed us a way to explicitly key a set or fragment of + * components. This is now being replaced with an opaque data structure. + * The upgrade path is to call React.addons.createFragment({ key: value }) to + * create a keyed fragment. The resulting data structure is an array. + */ + +var numericPropertyRegex = /^\d+$/; + +var warnedAboutNumeric = false; + +var ReactFragment = { + /** + * Wrap a keyed object in an opaque proxy that warns you if you access any + * of its properties. + * See https://facebook.github.io/react/docs/create-fragment.html + */ + create: function (object) { + if (typeof object !== 'object' || !object || Array.isArray(object)) { + false ? warning(false, 'React.addons.createFragment only accepts a single object. Got: %s', object) : void 0; + return object; + } + if (ReactElement.isValidElement(object)) { + false ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : void 0; + return object; + } + + !(object.nodeType !== 1) ? false ? invariant(false, 'React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.') : _prodInvariant('0') : void 0; + + var result = []; + + for (var key in object) { + if (false) { + if (!warnedAboutNumeric && numericPropertyRegex.test(key)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment(...): Child objects should have ' + 'non-numeric keys so ordering is preserved.') : void 0; + warnedAboutNumeric = true; + } + } + ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument); + } + + return result; + } +}; + +module.exports = ReactFragment; + +/***/ }), +/* 707 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactAddonsTransitionGroup = __webpack_require__(128); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +var _ScaleInChild = __webpack_require__(711); + +var _ScaleInChild2 = _interopRequireDefault(_ScaleInChild); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ScaleIn = function (_Component) { + (0, _inherits3.default)(ScaleIn, _Component); + + function ScaleIn() { + (0, _classCallCheck3.default)(this, ScaleIn); + return (0, _possibleConstructorReturn3.default)(this, (ScaleIn.__proto__ || (0, _getPrototypeOf2.default)(ScaleIn)).apply(this, arguments)); + } + + (0, _createClass3.default)(ScaleIn, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + childStyle = _props.childStyle, + enterDelay = _props.enterDelay, + maxScale = _props.maxScale, + minScale = _props.minScale, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'childStyle', 'enterDelay', 'maxScale', 'minScale', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'relative', + overflow: 'hidden', + height: '100%' + }, style); + + var newChildren = _react2.default.Children.map(children, function (child) { + return _react2.default.createElement( + _ScaleInChild2.default, + { + key: child.key, + enterDelay: enterDelay, + maxScale: maxScale, + minScale: minScale, + style: childStyle + }, + child + ); + }); + + return _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + (0, _extends3.default)({}, other, { + style: prepareStyles(mergedRootStyles), + component: 'div' + }), + newChildren + ); + } + }]); + return ScaleIn; +}(_react.Component); + +ScaleIn.defaultProps = { + enterDelay: 0 +}; +ScaleIn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ScaleIn.propTypes = { + childStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + enterDelay: _react.PropTypes.number, + maxScale: _react.PropTypes.number, + minScale: _react.PropTypes.number, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = ScaleIn; + +/***/ }), +/* 708 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(13); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var React = __webpack_require__(52); +var ReactTransitionChildMapping = __webpack_require__(709); + +var propTypesFactory = __webpack_require__(222); +var PropTypes = propTypesFactory(React.isValidElement); + +var emptyFunction = __webpack_require__(24); + +/** + * A basis for animations. When children are declaratively added or removed, + * special lifecycle hooks are called. + * See https://facebook.github.io/react/docs/animation.html#low-level-api-reacttransitiongroup + */ + +var ReactTransitionGroup = function (_React$Component) { + _inherits(ReactTransitionGroup, _React$Component); + + function ReactTransitionGroup() { + var _temp, _this, _ret; + + _classCallCheck(this, ReactTransitionGroup); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { + // TODO: can we get useful debug information to show at this point? + children: ReactTransitionChildMapping.getChildMapping(_this.props.children) + }, _this.performAppear = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + + if (component.componentWillAppear) { + component.componentWillAppear(_this._handleDoneAppearing.bind(_this, key)); + } else { + _this._handleDoneAppearing(key); + } + }, _this._handleDoneAppearing = function (key) { + var component = _this.refs[key]; + if (component.componentDidAppear) { + component.componentDidAppear(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully appeared. Remove it. + _this.performLeave(key); + } + }, _this.performEnter = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + + if (component.componentWillEnter) { + component.componentWillEnter(_this._handleDoneEntering.bind(_this, key)); + } else { + _this._handleDoneEntering(key); + } + }, _this._handleDoneEntering = function (key) { + var component = _this.refs[key]; + if (component.componentDidEnter) { + component.componentDidEnter(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully entered. Remove it. + _this.performLeave(key); + } + }, _this.performLeave = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + if (component.componentWillLeave) { + component.componentWillLeave(_this._handleDoneLeaving.bind(_this, key)); + } else { + // Note that this is somewhat dangerous b/c it calls setState() + // again, effectively mutating the component before all the work + // is done. + _this._handleDoneLeaving(key); + } + }, _this._handleDoneLeaving = function (key) { + var component = _this.refs[key]; + + if (component.componentDidLeave) { + component.componentDidLeave(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) { + // This entered again before it fully left. Add it again. + _this.performEnter(key); + } else { + _this.setState(function (state) { + var newChildren = _assign({}, state.children); + delete newChildren[key]; + return { children: newChildren }; + }); + } + }, _temp), _possibleConstructorReturn(_this, _ret); + } + + ReactTransitionGroup.prototype.componentWillMount = function componentWillMount() { + this.currentlyTransitioningKeys = {}; + this.keysToEnter = []; + this.keysToLeave = []; + }; + + ReactTransitionGroup.prototype.componentDidMount = function componentDidMount() { + var initialChildMapping = this.state.children; + for (var key in initialChildMapping) { + if (initialChildMapping[key]) { + this.performAppear(key); + } + } + }; + + ReactTransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + var nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children); + var prevChildMapping = this.state.children; + + this.setState({ + children: ReactTransitionChildMapping.mergeChildMappings(prevChildMapping, nextChildMapping) + }); + + var key; + + for (key in nextChildMapping) { + var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); + if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) { + this.keysToEnter.push(key); + } + } + + for (key in prevChildMapping) { + var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key); + if (prevChildMapping[key] && !hasNext && !this.currentlyTransitioningKeys[key]) { + this.keysToLeave.push(key); + } + } + + // If we want to someday check for reordering, we could do it here. + }; + + ReactTransitionGroup.prototype.componentDidUpdate = function componentDidUpdate() { + var keysToEnter = this.keysToEnter; + this.keysToEnter = []; + keysToEnter.forEach(this.performEnter); + + var keysToLeave = this.keysToLeave; + this.keysToLeave = []; + keysToLeave.forEach(this.performLeave); + }; + + ReactTransitionGroup.prototype.render = function render() { + // TODO: we could get rid of the need for the wrapper node + // by cloning a single child + var childrenToRender = []; + for (var key in this.state.children) { + var child = this.state.children[key]; + if (child) { + // You may need to apply reactive updates to a child as it is leaving. + // The normal React way to do it won't work since the child will have + // already been removed. In case you need this behavior you can provide + // a childFactory function to wrap every child, even the ones that are + // leaving. + childrenToRender.push(React.cloneElement(this.props.childFactory(child), { + ref: key, + key: key + })); + } + } + + // Do not forward ReactTransitionGroup props to primitive DOM nodes + var props = _assign({}, this.props); + delete props.transitionLeave; + delete props.transitionName; + delete props.transitionAppear; + delete props.transitionEnter; + delete props.childFactory; + delete props.transitionLeaveTimeout; + delete props.transitionEnterTimeout; + delete props.transitionAppearTimeout; + delete props.component; + + return React.createElement(this.props.component, props, childrenToRender); + }; + + return ReactTransitionGroup; +}(React.Component); + +ReactTransitionGroup.displayName = 'ReactTransitionGroup'; +ReactTransitionGroup.propTypes = { + component: PropTypes.any, + childFactory: PropTypes.func +}; +ReactTransitionGroup.defaultProps = { + component: 'span', + childFactory: emptyFunction.thatReturnsArgument +}; + + +module.exports = ReactTransitionGroup; + +/***/ }), +/* 709 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var flattenChildren = __webpack_require__(710); + +var ReactTransitionChildMapping = { + /** + * Given `this.props.children`, return an object mapping key to child. Just + * simple syntactic sugar around flattenChildren(). + * + * @param {*} children `this.props.children` + * @param {number=} selfDebugID Optional debugID of the current internal instance. + * @return {object} Mapping of key to child + */ + getChildMapping: function (children, selfDebugID) { + if (!children) { + return children; + } + + if (false) { + return flattenChildren(children, selfDebugID); + } + + return flattenChildren(children); + }, + + /** + * When you're adding or removing children some may be added or removed in the + * same render pass. We want to show *both* since we want to simultaneously + * animate elements in and out. This function takes a previous set of keys + * and a new set of keys and merges them with its best guess of the correct + * ordering. In the future we may expose some of the utilities in + * ReactMultiChild to make this easy, but for now React itself does not + * directly have this concept of the union of prevChildren and nextChildren + * so we implement it here. + * + * @param {object} prev prev children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @param {object} next next children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @return {object} a key set that contains all keys in `prev` and all keys + * in `next` in a reasonable order. + */ + mergeChildMappings: function (prev, next) { + prev = prev || {}; + next = next || {}; + + function getValueForKey(key) { + if (next.hasOwnProperty(key)) { + return next[key]; + } else { + return prev[key]; + } + } + + // For each key of `next`, the list of keys to insert before that key in + // the combined list + var nextKeysPending = {}; + + var pendingKeys = []; + for (var prevKey in prev) { + if (next.hasOwnProperty(prevKey)) { + if (pendingKeys.length) { + nextKeysPending[prevKey] = pendingKeys; + pendingKeys = []; + } + } else { + pendingKeys.push(prevKey); + } + } + + var i; + var childMapping = {}; + for (var nextKey in next) { + if (nextKeysPending.hasOwnProperty(nextKey)) { + for (i = 0; i < nextKeysPending[nextKey].length; i++) { + var pendingNextKey = nextKeysPending[nextKey][i]; + childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); + } + } + childMapping[nextKey] = getValueForKey(nextKey); + } + + // Finally, add the keys which didn't appear before any key in `next` + for (i = 0; i < pendingKeys.length; i++) { + childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + } + + return childMapping; + } +}; + +module.exports = ReactTransitionChildMapping; + +/***/ }), +/* 710 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var KeyEscapeUtils = __webpack_require__(221); +var traverseAllChildren = __webpack_require__(220); +var warning = __webpack_require__(11); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && Object({"NODE_ENV":'production'}) && 'production' === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(157); +} + +/** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + * @param {number=} selfDebugID Optional debugID of the current internal instance. + */ +function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + // We found a component instance. + if (traverseContext && typeof traverseContext === 'object') { + var result = traverseContext; + var keyUnique = result[name] === undefined; + if (false) { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = require('./ReactComponentTreeHook'); + } + if (!keyUnique) { + process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; + } + } + if (keyUnique && child != null) { + result[name] = child; + } + } +} + +/** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ +function flattenChildren(children, selfDebugID) { + if (children == null) { + return children; + } + var result = {}; + + if (false) { + traverseAllChildren(children, function (traverseContext, child, name) { + return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); + }, result); + } else { + traverseAllChildren(children, flattenSingleChildIntoContext, result); + } + return result; +} + +module.exports = flattenChildren; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(108))) + +/***/ }), +/* 711 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _autoPrefix = __webpack_require__(95); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ScaleInChild = function (_Component) { + (0, _inherits3.default)(ScaleInChild, _Component); + + function ScaleInChild() { + (0, _classCallCheck3.default)(this, ScaleInChild); + return (0, _possibleConstructorReturn3.default)(this, (ScaleInChild.__proto__ || (0, _getPrototypeOf2.default)(ScaleInChild)).apply(this, arguments)); + } + + (0, _createClass3.default)(ScaleInChild, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentDidAppear', + value: function componentDidAppear() { + this.animate(); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + this.animate(); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.minScale + ')'); + + this.leaveTimer = setTimeout(callback, 450); + } + }, { + key: 'animate', + value: function animate() { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '1'; + _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.maxScale + ')'); + } + }, { + key: 'initializeAnimation', + value: function initializeAnimation(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'scale(0)'); + + this.enterTimer = setTimeout(callback, this.props.enterDelay); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + enterDelay = _props.enterDelay, + maxScale = _props.maxScale, + minScale = _props.minScale, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'maxScale', 'minScale', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'absolute', + height: '100%', + width: '100%', + top: 0, + left: 0, + transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) + }, style); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }), + children + ); + } + }]); + return ScaleInChild; +}(_react.Component); + +ScaleInChild.defaultProps = { + enterDelay: 0, + maxScale: 1, + minScale: 0 +}; +ScaleInChild.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ScaleInChild.propTypes = { + children: _react.PropTypes.node, + enterDelay: _react.PropTypes.number, + maxScale: _react.PropTypes.number, + minScale: _react.PropTypes.number, + style: _react.PropTypes.object +} : void 0; +exports.default = ScaleInChild; + +/***/ }), +/* 712 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(60); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _autoPrefix = __webpack_require__(95); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CircleRipple = function (_Component) { + (0, _inherits3.default)(CircleRipple, _Component); + + function CircleRipple() { + (0, _classCallCheck3.default)(this, CircleRipple); + return (0, _possibleConstructorReturn3.default)(this, (CircleRipple.__proto__ || (0, _getPrototypeOf2.default)(CircleRipple)).apply(this, arguments)); + } + + (0, _createClass3.default)(CircleRipple, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + return !(0, _shallowEqual2.default)(this.props, nextProps); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentDidAppear', + value: function componentDidAppear() { + this.animate(); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + this.animate(); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = 0; + // If the animation is aborted, remove from the DOM immediately + var removeAfter = this.props.aborted ? 0 : 2000; + this.enterTimer = setTimeout(callback, removeAfter); + } + }, { + key: 'animate', + value: function animate() { + var style = _reactDom2.default.findDOMNode(this).style; + var transitionValue = _transitions2.default.easeOut('2s', 'opacity') + ', ' + _transitions2.default.easeOut('1s', 'transform'); + _autoPrefix2.default.set(style, 'transition', transitionValue); + _autoPrefix2.default.set(style, 'transform', 'scale(1)'); + } + }, { + key: 'initializeAnimation', + value: function initializeAnimation(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = this.props.opacity; + _autoPrefix2.default.set(style, 'transform', 'scale(0)'); + this.leaveTimer = setTimeout(callback, 0); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + aborted = _props.aborted, + color = _props.color, + opacity = _props.opacity, + style = _props.style, + touchGenerated = _props.touchGenerated, + other = (0, _objectWithoutProperties3.default)(_props, ['aborted', 'color', 'opacity', 'style', 'touchGenerated']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedStyles = (0, _simpleAssign2.default)({ + position: 'absolute', + top: 0, + left: 0, + height: '100%', + width: '100%', + borderRadius: '50%', + backgroundColor: color + }, style); + + return _react2.default.createElement('div', (0, _extends3.default)({}, other, { style: prepareStyles(mergedStyles) })); + } + }]); + return CircleRipple; +}(_react.Component); + +CircleRipple.defaultProps = { + opacity: 0.1, + aborted: false +}; +CircleRipple.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? CircleRipple.propTypes = { + aborted: _react.PropTypes.bool, + color: _react.PropTypes.string, + opacity: _react.PropTypes.number, + style: _react.PropTypes.object, + touchGenerated: _react.PropTypes.bool +} : void 0; +exports.default = CircleRipple; + +/***/ }), +/* 713 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _propTypes = __webpack_require__(38); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _EnhancedButton = __webpack_require__(61); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _FontIcon = __webpack_require__(319); + +var _FontIcon2 = _interopRequireDefault(_FontIcon); + +var _Tooltip = __webpack_require__(320); + +var _Tooltip2 = _interopRequireDefault(_Tooltip); + +var _childUtils = __webpack_require__(127); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var baseTheme = context.muiTheme.baseTheme; + + + return { + root: { + boxSizing: 'border-box', + overflow: 'visible', + transition: _transitions2.default.easeOut(), + padding: baseTheme.spacing.iconSize / 2, + width: baseTheme.spacing.iconSize * 2, + height: baseTheme.spacing.iconSize * 2, + fontSize: 0 + }, + tooltip: { + boxSizing: 'border-box' + }, + disabled: { + color: baseTheme.palette.disabledColor, + fill: baseTheme.palette.disabledColor, + cursor: 'not-allowed' + } + }; +} + +var IconButton = function (_Component) { + (0, _inherits3.default)(IconButton, _Component); + + function IconButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, IconButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = IconButton.__proto__ || (0, _getPrototypeOf2.default)(IconButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + // Not to be confonded with the touch property. + // This state is to determined if it's a mobile device. + touch: false, + tooltipShown: false + }, _this.handleBlur = function (event) { + _this.hideTooltip(); + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleFocus = function (event) { + _this.showTooltip(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleMouseLeave = function (event) { + if (!_this.button.isKeyboardFocused()) { + _this.hideTooltip(); + } + _this.setState({ hovered: false }); + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseOut = function (event) { + if (_this.props.disabled) _this.hideTooltip(); + if (_this.props.onMouseOut) _this.props.onMouseOut(event); + }, _this.handleMouseEnter = function (event) { + _this.showTooltip(); + + // Cancel hover styles for touch devices + if (!_this.state.touch) { + _this.setState({ hovered: true }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); + + if (_this.props.onTouchStart) { + _this.props.onTouchStart(event); + } + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + var _this$props = _this.props, + disabled = _this$props.disabled, + onFocus = _this$props.onFocus, + onBlur = _this$props.onBlur, + onKeyboardFocus = _this$props.onKeyboardFocus; + + if (isKeyboardFocused && !disabled) { + _this.showTooltip(); + if (onFocus) { + onFocus(event); + } + } else { + _this.hideTooltip(); + if (onBlur) { + onBlur(event); + } + } + + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + if (onKeyboardFocus) { + onKeyboardFocus(event, isKeyboardFocused); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(IconButton, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.disabled) { + this.setState({ hovered: false }); + } + } + }, { + key: 'setKeyboardFocus', + value: function setKeyboardFocus() { + this.button.setKeyboardFocus(); + } + }, { + key: 'showTooltip', + value: function showTooltip() { + if (this.props.tooltip) { + this.setState({ tooltipShown: true }); + } + } + }, { + key: 'hideTooltip', + value: function hideTooltip() { + if (this.props.tooltip) this.setState({ tooltipShown: false }); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + disabled = _props.disabled, + hoveredStyle = _props.hoveredStyle, + disableTouchRipple = _props.disableTouchRipple, + children = _props.children, + iconClassName = _props.iconClassName, + style = _props.style, + tooltip = _props.tooltip, + tooltipPositionProp = _props.tooltipPosition, + tooltipStyles = _props.tooltipStyles, + touch = _props.touch, + iconStyle = _props.iconStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['disabled', 'hoveredStyle', 'disableTouchRipple', 'children', 'iconClassName', 'style', 'tooltip', 'tooltipPosition', 'tooltipStyles', 'touch', 'iconStyle']); + + var fonticon = void 0; + + var styles = getStyles(this.props, this.context); + var tooltipPosition = tooltipPositionProp.split('-'); + + var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled; + + var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style, hovered ? hoveredStyle : {}); + + var tooltipElement = tooltip ? _react2.default.createElement(_Tooltip2.default, { + label: tooltip, + show: this.state.tooltipShown, + touch: touch, + style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyles), + verticalPosition: tooltipPosition[0], + horizontalPosition: tooltipPosition[1] + }) : null; + + if (iconClassName) { + var iconHoverColor = iconStyle.iconHoverColor, + iconStyleFontIcon = (0, _objectWithoutProperties3.default)(iconStyle, ['iconHoverColor']); + + + fonticon = _react2.default.createElement( + _FontIcon2.default, + { + className: iconClassName, + hoverColor: disabled ? null : iconHoverColor, + style: (0, _simpleAssign2.default)({}, disabled && styles.disabled, iconStyleFontIcon), + color: this.context.muiTheme.baseTheme.palette.textColor + }, + children + ); + } + + var childrenStyle = disabled ? (0, _simpleAssign2.default)({}, iconStyle, styles.disabled) : iconStyle; + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({ + ref: function ref(_ref2) { + return _this2.button = _ref2; + } + }, other, { + centerRipple: true, + disabled: disabled, + onTouchStart: this.handleTouchStart, + style: mergedRootStyles, + disableTouchRipple: disableTouchRipple, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onMouseOut: this.handleMouseOut, + onKeyboardFocus: this.handleKeyboardFocus + }), + tooltipElement, + fonticon, + (0, _childUtils.extendChildren)(children, { + style: childrenStyle + }) + ); + } + }]); + return IconButton; +}(_react.Component); + +IconButton.muiName = 'IconButton'; +IconButton.defaultProps = { + disabled: false, + disableTouchRipple: false, + iconStyle: {}, + tooltipPosition: 'bottom-center', + touch: false +}; +IconButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? IconButton.propTypes = { + /** + * Can be used to pass a `FontIcon` element as the icon for the button. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the element's ripple effect will be disabled. + */ + disableTouchRipple: _react.PropTypes.bool, + /** + * If true, the element will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element when the component is hovered. + */ + hoveredStyle: _react.PropTypes.object, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * The CSS class name of the icon. Used for setting the icon with a stylesheet. + */ + iconClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the icon element. + * Note: you can specify iconHoverColor as a String inside this object. + */ + iconStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Callback function fired when the element is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the element. + * @param {boolean} keyboardFocused Indicates whether the element is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onMouseOut: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The text to supply to the element's tooltip. + */ + tooltip: _react.PropTypes.node, + /** + * The vertical and horizontal positions, respectively, of the element's tooltip. + * Possible values are: "bottom-center", "top-center", "bottom-right", "top-right", + * "bottom-left", and "top-left". + */ + tooltipPosition: _propTypes2.default.cornersAndCenter, + /** + * Override the inline-styles of the tooltip element. + */ + tooltipStyles: _react.PropTypes.object, + /** + * If true, increase the tooltip element's size. Useful for increasing tooltip + * readability on mobile devices. + */ + touch: _react.PropTypes.bool +} : void 0; +exports.default = IconButton; + +/***/ }), +/* 714 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var color = props.color, + hoverColor = props.hoverColor; + var baseTheme = context.muiTheme.baseTheme; + + var offColor = color || baseTheme.palette.textColor; + var onColor = hoverColor || offColor; + + return { + root: { + color: state.hovered ? onColor : offColor, + position: 'relative', + fontSize: baseTheme.spacing.iconSize, + display: 'inline-block', + userSelect: 'none', + transition: _transitions2.default.easeOut() + } + }; +} + +var FontIcon = function (_Component) { + (0, _inherits3.default)(FontIcon, _Component); + + function FontIcon() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, FontIcon); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FontIcon.__proto__ || (0, _getPrototypeOf2.default)(FontIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.handleMouseLeave = function (event) { + // hover is needed only when a hoverColor is defined + if (_this.props.hoverColor !== undefined) { + _this.setState({ hovered: false }); + } + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseEnter = function (event) { + // hover is needed only when a hoverColor is defined + if (_this.props.hoverColor !== undefined) { + _this.setState({ hovered: true }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(FontIcon, [{ + key: 'render', + value: function render() { + var _props = this.props, + hoverColor = _props.hoverColor, + onMouseLeave = _props.onMouseLeave, + onMouseEnter = _props.onMouseEnter, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['hoverColor', 'onMouseLeave', 'onMouseEnter', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement('span', (0, _extends3.default)({}, other, { + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + })); + } + }]); + return FontIcon; +}(_react.Component); + +FontIcon.muiName = 'FontIcon'; +FontIcon.defaultProps = { + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {} +}; +FontIcon.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? FontIcon.propTypes = { + /** + * This is the font color of the font icon. If not specified, + * this component will default to muiTheme.palette.textColor. + */ + color: _react.PropTypes.string, + /** + * This is the icon color when the mouse hovers over the icon. + */ + hoverColor: _react.PropTypes.string, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = FontIcon; + +/***/ }), +/* 715 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationExpandLess = function NavigationExpandLess(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z' }) + ); +}; +NavigationExpandLess = (0, _pure2.default)(NavigationExpandLess); +NavigationExpandLess.displayName = 'NavigationExpandLess'; +NavigationExpandLess.muiName = 'SvgIcon'; + +exports.default = NavigationExpandLess; + +/***/ }), +/* 716 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _react = __webpack_require__(0); + +var _createHelper = __webpack_require__(321); + +var _createHelper2 = _interopRequireDefault(_createHelper); + +var _createEagerFactory = __webpack_require__(717); + +var _createEagerFactory2 = _interopRequireDefault(_createEagerFactory); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var shouldUpdate = function shouldUpdate(test) { + return function (BaseComponent) { + var factory = (0, _createEagerFactory2.default)(BaseComponent); + return function (_Component) { + _inherits(_class, _Component); + + function _class() { + _classCallCheck(this, _class); + + return _possibleConstructorReturn(this, _Component.apply(this, arguments)); + } + + _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return test(this.props, nextProps); + }; + + _class.prototype.render = function render() { + return factory(this.props); + }; + + return _class; + }(_react.Component); + }; +}; + +exports.default = (0, _createHelper2.default)(shouldUpdate, 'shouldUpdate'); + +/***/ }), +/* 717 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _createEagerElementUtil = __webpack_require__(718); + +var _createEagerElementUtil2 = _interopRequireDefault(_createEagerElementUtil); + +var _isReferentiallyTransparentFunctionComponent = __webpack_require__(719); + +var _isReferentiallyTransparentFunctionComponent2 = _interopRequireDefault(_isReferentiallyTransparentFunctionComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createFactory = function createFactory(type) { + var isReferentiallyTransparent = (0, _isReferentiallyTransparentFunctionComponent2.default)(type); + return function (p, c) { + return (0, _createEagerElementUtil2.default)(false, isReferentiallyTransparent, type, p, c); + }; +}; + +exports.default = createFactory; + +/***/ }), +/* 718 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createEagerElementUtil = function createEagerElementUtil(hasKey, isReferentiallyTransparent, type, props, children) { + if (!hasKey && isReferentiallyTransparent) { + if (children) { + return type(_extends({}, props, { children: children })); + } + return type(props); + } + + var Component = type; + + if (children) { + return _react2.default.createElement( + Component, + props, + children + ); + } + + return _react2.default.createElement(Component, props); +}; + +exports.default = createEagerElementUtil; + +/***/ }), +/* 719 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _isClassComponent = __webpack_require__(720); + +var _isClassComponent2 = _interopRequireDefault(_isClassComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isReferentiallyTransparentFunctionComponent = function isReferentiallyTransparentFunctionComponent(Component) { + return Boolean(typeof Component === 'function' && !(0, _isClassComponent2.default)(Component) && !Component.defaultProps && !Component.contextTypes && ('production' === 'production' || !Component.propTypes)); +}; + +exports.default = isReferentiallyTransparentFunctionComponent; + +/***/ }), +/* 720 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var isClassComponent = function isClassComponent(Component) { + return Boolean(Component && Component.prototype && typeof Component.prototype.isReactComponent === 'object'); +}; + +exports.default = isClassComponent; + +/***/ }), +/* 721 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SvgIcon = function (_Component) { + (0, _inherits3.default)(SvgIcon, _Component); + + function SvgIcon() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, SvgIcon); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = SvgIcon.__proto__ || (0, _getPrototypeOf2.default)(SvgIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.handleMouseLeave = function (event) { + _this.setState({ hovered: false }); + _this.props.onMouseLeave(event); + }, _this.handleMouseEnter = function (event) { + _this.setState({ hovered: true }); + _this.props.onMouseEnter(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(SvgIcon, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + color = _props.color, + hoverColor = _props.hoverColor, + onMouseEnter = _props.onMouseEnter, + onMouseLeave = _props.onMouseLeave, + style = _props.style, + viewBox = _props.viewBox, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'color', 'hoverColor', 'onMouseEnter', 'onMouseLeave', 'style', 'viewBox']); + var _context$muiTheme = this.context.muiTheme, + svgIcon = _context$muiTheme.svgIcon, + prepareStyles = _context$muiTheme.prepareStyles; + + + var offColor = color ? color : 'currentColor'; + var onColor = hoverColor ? hoverColor : offColor; + + var mergedStyles = (0, _simpleAssign2.default)({ + display: 'inline-block', + color: svgIcon.color, + fill: this.state.hovered ? onColor : offColor, + height: 24, + width: 24, + userSelect: 'none', + transition: _transitions2.default.easeOut() + }, style); + + return _react2.default.createElement( + 'svg', + (0, _extends3.default)({}, other, { + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + style: prepareStyles(mergedStyles), + viewBox: viewBox + }), + children + ); + } + }]); + return SvgIcon; +}(_react.Component); + +SvgIcon.muiName = 'SvgIcon'; +SvgIcon.defaultProps = { + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + viewBox: '0 0 24 24' +}; +SvgIcon.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? SvgIcon.propTypes = { + /** + * Elements passed into the SVG Icon. + */ + children: _react.PropTypes.node, + /** + * This is the fill color of the svg icon. + * If not specified, this component will default + * to muiTheme.palette.textColor. + */ + color: _react.PropTypes.string, + /** + * This is the icon color when the mouse hovers over the icon. + */ + hoverColor: _react.PropTypes.string, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Allows you to redefine what the coordinates + * without units mean inside an svg element. For example, + * if the SVG element is 500 (width) by 200 (height), and you + * pass viewBox="0 0 50 20", this means that the coordinates inside + * the svg will go from the top left corner (0,0) to bottom right (50,20) + * and each unit will be worth 10px. + */ + viewBox: _react.PropTypes.string +} : void 0; +exports.default = SvgIcon; + +/***/ }), +/* 722 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationExpandMore = function NavigationExpandMore(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z' }) + ); +}; +NavigationExpandMore = (0, _pure2.default)(NavigationExpandMore); +NavigationExpandMore.displayName = 'NavigationExpandMore'; +NavigationExpandMore.muiName = 'SvgIcon'; + +exports.default = NavigationExpandMore; + +/***/ }), +/* 723 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _List = __webpack_require__(200); + +var _List2 = _interopRequireDefault(_List); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NestedList = function NestedList(props) { + var children = props.children, + open = props.open, + nestedLevel = props.nestedLevel, + style = props.style; + + + if (!open) { + return null; + } + + return _react2.default.createElement( + _List2.default, + { style: style }, + _react.Children.map(children, function (child) { + return (0, _react.isValidElement)(child) ? (0, _react.cloneElement)(child, { + nestedLevel: nestedLevel + 1 + }) : child; + }) + ); +}; + + false ? NestedList.propTypes = { + children: _react.PropTypes.node, + nestedLevel: _react.PropTypes.number.isRequired, + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +exports.default = NestedList; + +/***/ }), +/* 724 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.makeSelectable = undefined; + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _colorManipulator = __webpack_require__(58); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var makeSelectable = exports.makeSelectable = function makeSelectable(MyComponent) { + var _class, _temp2; + + return _temp2 = _class = function (_Component) { + (0, _inherits3.default)(_class, _Component); + + function _class() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, _class); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = _class.__proto__ || (0, _getPrototypeOf2.default)(_class)).call.apply(_ref, [this].concat(args))), _this), _this.hasSelectedDescendant = function (previousValue, child) { + if (_react2.default.isValidElement(child) && child.props.nestedItems && child.props.nestedItems.length > 0) { + return child.props.nestedItems.reduce(_this.hasSelectedDescendant, previousValue); + } + return previousValue || _this.isChildSelected(child, _this.props); + }, _this.handleItemTouchTap = function (event, item) { + var itemValue = item.props.value; + + if (itemValue !== _this.props.value) { + if (_this.props.onChange) { + _this.props.onChange(event, itemValue); + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(_class, [{ + key: 'extendChild', + value: function extendChild(child, styles, selectedItemStyle) { + var _this2 = this; + + if (child && child.type && child.type.muiName === 'ListItem') { + var selected = this.isChildSelected(child, this.props); + var selectedChildrenStyles = void 0; + if (selected) { + selectedChildrenStyles = (0, _simpleAssign2.default)({}, styles, selectedItemStyle); + } + + var mergedChildrenStyles = (0, _simpleAssign2.default)({}, child.props.style, selectedChildrenStyles); + + this.keyIndex += 1; + + return _react2.default.cloneElement(child, { + onTouchTap: function onTouchTap(event) { + _this2.handleItemTouchTap(event, child); + if (child.props.onTouchTap) { + child.props.onTouchTap(event); + } + }, + key: this.keyIndex, + style: mergedChildrenStyles, + nestedItems: child.props.nestedItems.map(function (child) { + return _this2.extendChild(child, styles, selectedItemStyle); + }), + initiallyOpen: this.isInitiallyOpen(child) + }); + } else { + return child; + } + } + }, { + key: 'isInitiallyOpen', + value: function isInitiallyOpen(child) { + if (child.props.initiallyOpen) { + return child.props.initiallyOpen; + } + return this.hasSelectedDescendant(false, child); + } + }, { + key: 'isChildSelected', + value: function isChildSelected(child, props) { + return props.value === child.props.value; + } + }, { + key: 'render', + value: function render() { + var _this3 = this; + + var _props = this.props, + children = _props.children, + selectedItemStyle = _props.selectedItemStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'selectedItemStyle']); + + + this.keyIndex = 0; + var styles = {}; + + if (!selectedItemStyle) { + var textColor = this.context.muiTheme.baseTheme.palette.textColor; + styles.backgroundColor = (0, _colorManipulator.fade)(textColor, 0.2); + } + + return _react2.default.createElement( + MyComponent, + (0, _extends3.default)({}, other, this.state), + _react.Children.map(children, function (child) { + return _this3.extendChild(child, styles, selectedItemStyle); + }) + ); + } + }]); + return _class; + }(_react.Component), _class.propTypes = { + children: _react.PropTypes.node, + onChange: _react.PropTypes.func, + selectedItemStyle: _react.PropTypes.object, + value: _react.PropTypes.any + }, _class.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired + }, _temp2; +}; + +exports.default = makeSelectable; + +/***/ }), +/* 725 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Drawer = __webpack_require__(726); + +var _Drawer2 = _interopRequireDefault(_Drawer); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Drawer2.default; + +/***/ }), +/* 726 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactEventListener = __webpack_require__(39); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(27); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _autoPrefix = __webpack_require__(95); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _Overlay = __webpack_require__(322); + +var _Overlay2 = _interopRequireDefault(_Overlay); + +var _Paper = __webpack_require__(31); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _propTypes = __webpack_require__(38); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var openNavEventHandler = null; + +var Drawer = function (_Component) { + (0, _inherits3.default)(Drawer, _Component); + + function Drawer() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Drawer); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Drawer.__proto__ || (0, _getPrototypeOf2.default)(Drawer)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapOverlay = function (event) { + event.preventDefault(); + _this.close('clickaway'); + }, _this.handleKeyUp = function (event) { + if (_this.state.open && !_this.props.docked && (0, _keycode2.default)(event) === 'esc') { + _this.close('escape'); + } + }, _this.onBodyTouchStart = function (event) { + var swipeAreaWidth = _this.props.swipeAreaWidth; + + var touchStartX = event.touches[0].pageX; + var touchStartY = event.touches[0].pageY; + + // Open only if swiping from far left (or right) while closed + if (swipeAreaWidth !== null && !_this.state.open) { + if (_this.props.openSecondary) { + // If openSecondary is true calculate from the far right + if (touchStartX < document.body.offsetWidth - swipeAreaWidth) return; + } else { + // If openSecondary is false calculate from the far left + if (touchStartX > swipeAreaWidth) return; + } + } + + if (!_this.state.open && (openNavEventHandler !== _this.onBodyTouchStart || _this.props.disableSwipeToOpen)) { + return; + } + + _this.maybeSwiping = true; + _this.touchStartX = touchStartX; + _this.touchStartY = touchStartY; + + document.body.addEventListener('touchmove', _this.onBodyTouchMove); + document.body.addEventListener('touchend', _this.onBodyTouchEnd); + document.body.addEventListener('touchcancel', _this.onBodyTouchEnd); + }, _this.onBodyTouchMove = function (event) { + var currentX = event.touches[0].pageX; + var currentY = event.touches[0].pageY; + + if (_this.state.swiping) { + event.preventDefault(); + _this.setPosition(_this.getTranslateX(currentX)); + } else if (_this.maybeSwiping) { + var dXAbs = Math.abs(currentX - _this.touchStartX); + var dYAbs = Math.abs(currentY - _this.touchStartY); + // If the user has moved his thumb ten pixels in either direction, + // we can safely make an assumption about whether he was intending + // to swipe or scroll. + var threshold = 10; + + if (dXAbs > threshold && dYAbs <= threshold) { + _this.swipeStartX = currentX; + _this.setState({ + swiping: _this.state.open ? 'closing' : 'opening' + }); + _this.setPosition(_this.getTranslateX(currentX)); + } else if (dXAbs <= threshold && dYAbs > threshold) { + _this.onBodyTouchEnd(); + } + } + }, _this.onBodyTouchEnd = function (event) { + if (_this.state.swiping) { + var currentX = event.changedTouches[0].pageX; + var translateRatio = _this.getTranslateX(currentX) / _this.getMaxTranslateX(); + + _this.maybeSwiping = false; + var swiping = _this.state.swiping; + _this.setState({ + swiping: null + }); + + // We have to open or close after setting swiping to null, + // because only then CSS transition is enabled. + if (translateRatio > 0.5) { + if (swiping === 'opening') { + _this.setPosition(_this.getMaxTranslateX()); + } else { + _this.close('swipe'); + } + } else { + if (swiping === 'opening') { + _this.open('swipe'); + } else { + _this.setPosition(0); + } + } + } else { + _this.maybeSwiping = false; + } + + document.body.removeEventListener('touchmove', _this.onBodyTouchMove); + document.body.removeEventListener('touchend', _this.onBodyTouchEnd); + document.body.removeEventListener('touchcancel', _this.onBodyTouchEnd); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Drawer, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.maybeSwiping = false; + this.touchStartX = null; + this.touchStartY = null; + this.swipeStartX = null; + + this.setState({ + open: this.props.open !== null ? this.props.open : this.props.docked, + swiping: null + }); + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + this.enableSwipeHandling(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + // If controlled then the open prop takes precedence. + if (nextProps.open !== null) { + this.setState({ + open: nextProps.open + }); + // Otherwise, if docked is changed, change the open state for when uncontrolled. + } else if (this.props.docked !== nextProps.docked) { + this.setState({ + open: nextProps.docked + }); + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.enableSwipeHandling(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.disableSwipeHandling(); + } + }, { + key: 'getStyles', + value: function getStyles() { + var muiTheme = this.context.muiTheme; + var theme = muiTheme.drawer; + + var x = this.getTranslateMultiplier() * (this.state.open ? 0 : this.getMaxTranslateX()); + + var styles = { + root: { + height: '100%', + width: this.props.width || theme.width, + position: 'fixed', + zIndex: muiTheme.zIndex.drawer, + left: 0, + top: 0, + transform: 'translate(' + x + 'px, 0)', + transition: !this.state.swiping && _transitions2.default.easeOut(null, 'transform', null), + backgroundColor: theme.color, + overflow: 'auto', + WebkitOverflowScrolling: 'touch' }, + overlay: { + zIndex: muiTheme.zIndex.drawerOverlay, + pointerEvents: this.state.open ? 'auto' : 'none' }, + rootWhenOpenRight: { + left: 'auto', + right: 0 + } + }; + + return styles; + } + }, { + key: 'shouldShow', + value: function shouldShow() { + return this.state.open || !!this.state.swiping; // component is swiping + } + }, { + key: 'close', + value: function close(reason) { + if (this.props.open === null) this.setState({ open: false }); + if (this.props.onRequestChange) this.props.onRequestChange(false, reason); + return this; + } + }, { + key: 'open', + value: function open(reason) { + if (this.props.open === null) this.setState({ open: true }); + if (this.props.onRequestChange) this.props.onRequestChange(true, reason); + return this; + } + }, { + key: 'getMaxTranslateX', + value: function getMaxTranslateX() { + var width = this.props.width || this.context.muiTheme.drawer.width; + return width + 10; + } + }, { + key: 'getTranslateMultiplier', + value: function getTranslateMultiplier() { + return this.props.openSecondary ? 1 : -1; + } + }, { + key: 'enableSwipeHandling', + value: function enableSwipeHandling() { + if (!this.props.docked) { + document.body.addEventListener('touchstart', this.onBodyTouchStart); + if (!openNavEventHandler) { + openNavEventHandler = this.onBodyTouchStart; + } + } else { + this.disableSwipeHandling(); + } + } + }, { + key: 'disableSwipeHandling', + value: function disableSwipeHandling() { + document.body.removeEventListener('touchstart', this.onBodyTouchStart); + if (openNavEventHandler === this.onBodyTouchStart) { + openNavEventHandler = null; + } + } + }, { + key: 'setPosition', + value: function setPosition(translateX) { + var drawer = _reactDom2.default.findDOMNode(this.refs.clickAwayableElement); + var transformCSS = 'translate(' + this.getTranslateMultiplier() * translateX + 'px, 0)'; + this.refs.overlay.setOpacity(1 - translateX / this.getMaxTranslateX()); + _autoPrefix2.default.set(drawer.style, 'transform', transformCSS); + } + }, { + key: 'getTranslateX', + value: function getTranslateX(currentX) { + return Math.min(Math.max(this.state.swiping === 'closing' ? this.getTranslateMultiplier() * (currentX - this.swipeStartX) : this.getMaxTranslateX() - this.getTranslateMultiplier() * (this.swipeStartX - currentX), 0), this.getMaxTranslateX()); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + containerClassName = _props.containerClassName, + containerStyle = _props.containerStyle, + docked = _props.docked, + openSecondary = _props.openSecondary, + overlayClassName = _props.overlayClassName, + overlayStyle = _props.overlayStyle, + style = _props.style, + zDepth = _props.zDepth; + + + var styles = this.getStyles(); + + var overlay = void 0; + if (!docked) { + overlay = _react2.default.createElement(_Overlay2.default, { + ref: 'overlay', + show: this.shouldShow(), + className: overlayClassName, + style: (0, _simpleAssign2.default)(styles.overlay, overlayStyle), + transitionEnabled: !this.state.swiping, + onTouchTap: this.handleTouchTapOverlay + }); + } + + return _react2.default.createElement( + 'div', + { + className: className, + style: style + }, + _react2.default.createElement(_reactEventListener2.default, { target: 'window', onKeyUp: this.handleKeyUp }), + overlay, + _react2.default.createElement( + _Paper2.default, + { + ref: 'clickAwayableElement', + zDepth: zDepth, + rounded: false, + transitionEnabled: !this.state.swiping, + className: containerClassName, + style: (0, _simpleAssign2.default)(styles.root, openSecondary && styles.rootWhenOpenRight, containerStyle) + }, + children + ) + ); + } + }]); + return Drawer; +}(_react.Component); + +Drawer.defaultProps = { + disableSwipeToOpen: false, + docked: true, + open: null, + openSecondary: false, + swipeAreaWidth: 30, + width: null, + zDepth: 2 +}; +Drawer.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Drawer.propTypes = { + /** + * The contents of the `Drawer` + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The CSS class name of the container element. + */ + containerClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the container element. + */ + containerStyle: _react.PropTypes.object, + /** + * If true, swiping sideways when the `Drawer` is closed will not open it. + */ + disableSwipeToOpen: _react.PropTypes.bool, + /** + * If true, the `Drawer` will be docked. In this state, the overlay won't show and + * clicking on a menu item will not close the `Drawer`. + */ + docked: _react.PropTypes.bool, + /** + * Callback function fired when the `open` state of the `Drawer` is requested to be changed. + * + * @param {boolean} open If true, the `Drawer` was requested to be opened. + * @param {string} reason The reason for the open or close request. Possible values are + * 'swipe' for open requests; 'clickaway' (on overlay clicks), + * 'escape' (on escape key press), and 'swipe' for close requests. + */ + onRequestChange: _react.PropTypes.func, + /** + * If true, the `Drawer` is opened. Providing a value will turn the `Drawer` + * into a controlled component. + */ + open: _react.PropTypes.bool, + /** + * If true, the `Drawer` is positioned to open from the opposite side. + */ + openSecondary: _react.PropTypes.bool, + /** + * The CSS class name to add to the `Overlay` component that is rendered behind the `Drawer`. + */ + overlayClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the `Overlay` component that is rendered behind the `Drawer`. + */ + overlayStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The width of the left most (or right most) area in pixels where the `Drawer` can be + * swiped open from. Setting this to `null` spans that area to the entire page + * (**CAUTION!** Setting this property to `null` might cause issues with sliders and + * swipeable `Tabs`: use at your own risk). + */ + swipeAreaWidth: _react.PropTypes.number, + /** + * The width of the `Drawer` in pixels. Defaults to using the values from theme. + */ + width: _react.PropTypes.number, + /** + * The zDepth of the `Drawer`. + */ + zDepth: _propTypes2.default.zDepth + +} : void 0; +exports.default = Drawer; + +/***/ }), +/* 727 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(728); + +/***/ }), +/* 728 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var shallowEqual = __webpack_require__(88); + +/** + * Does a shallow comparison for props and state. + * See ReactComponentWithPureRenderMixin + * See also https://facebook.github.io/react/docs/shallow-compare.html + */ +function shallowCompare(instance, nextProps, nextState) { + return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState); +} + +module.exports = shallowCompare; + +/***/ }), +/* 729 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.passiveOption = exports.detachEvent = exports.attachEvent = exports.removeEventListener = exports.addEventListener = exports.canUseDOM = undefined; + +var _defineProperty = __webpack_require__(730); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Inspired by https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/ExecutionEnvironment.js +var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +var addEventListener = exports.addEventListener = canUseDOM && 'addEventListener' in window; +var removeEventListener = exports.removeEventListener = canUseDOM && 'removeEventListener' in window; + +// IE8+ Support +var attachEvent = exports.attachEvent = canUseDOM && 'attachEvent' in window; +var detachEvent = exports.detachEvent = canUseDOM && 'detachEvent' in window; + +// Passive options +// Inspired by https://github.com/Modernizr/Modernizr/blob/master/feature-detects/dom/passiveeventlisteners.js +var passiveOption = exports.passiveOption = function () { + var cache = null; + + return function () { + if (cache !== null) { + return cache; + } + + var supportsPassiveOption = false; + + try { + window.addEventListener('test', null, (0, _defineProperty2.default)({}, 'passive', { + get: function get() { + supportsPassiveOption = true; + } + })); + } catch (e) {} // eslint-disable-line no-empty + + cache = supportsPassiveOption; + + return supportsPassiveOption; + }(); +}(); + +/***/ }), +/* 730 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _defineProperty = __webpack_require__(194); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +exports.default = defineProperty; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// weak + +function defineProperty(o, p, attr) { + return (0, _defineProperty2.default)(o, p, attr); +} + +/***/ }), +/* 731 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var originalBodyOverflow = null; +var lockingCounter = 0; + +var AutoLockScrolling = function (_Component) { + (0, _inherits3.default)(AutoLockScrolling, _Component); + + function AutoLockScrolling() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, AutoLockScrolling); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoLockScrolling.__proto__ || (0, _getPrototypeOf2.default)(AutoLockScrolling)).call.apply(_ref, [this].concat(args))), _this), _this.locked = false, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(AutoLockScrolling, [{ + key: 'componentDidMount', + value: function componentDidMount() { + if (this.props.lock === true) { + this.preventScrolling(); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.lock !== nextProps.lock) { + if (nextProps.lock) { + this.preventScrolling(); + } else { + this.allowScrolling(); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.allowScrolling(); + } + + // force to only lock/unlock once + + }, { + key: 'preventScrolling', + value: function preventScrolling() { + if (this.locked === true) { + return; + } + + lockingCounter = lockingCounter + 1; + this.locked = true; + + // only lock the first time the component is mounted. + if (lockingCounter === 1) { + var body = document.getElementsByTagName('body')[0]; + originalBodyOverflow = body.style.overflow; + body.style.overflow = 'hidden'; + } + } + }, { + key: 'allowScrolling', + value: function allowScrolling() { + if (this.locked === true) { + lockingCounter = lockingCounter - 1; + this.locked = false; + } + + if (lockingCounter === 0 && originalBodyOverflow !== null) { + var body = document.getElementsByTagName('body')[0]; + body.style.overflow = originalBodyOverflow || ''; + originalBodyOverflow = null; + } + } + }, { + key: 'render', + value: function render() { + return null; + } + }]); + return AutoLockScrolling; +}(_react.Component); + + false ? AutoLockScrolling.propTypes = { + lock: _react.PropTypes.bool.isRequired +} : void 0; +exports.default = AutoLockScrolling; + +/***/ }), +/* 732 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(38); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var rounded = props.rounded, + circle = props.circle, + transitionEnabled = props.transitionEnabled, + zDepth = props.zDepth; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + paper = _context$muiTheme.paper; + + + return { + root: { + color: paper.color, + backgroundColor: paper.backgroundColor, + transition: transitionEnabled && _transitions2.default.easeOut(), + boxSizing: 'border-box', + fontFamily: baseTheme.fontFamily, + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + boxShadow: paper.zDepthShadows[zDepth - 1], // No shadow for 0 depth papers + borderRadius: circle ? '50%' : rounded ? '2px' : '0px' + } + }; +} + +var Paper = function (_Component) { + (0, _inherits3.default)(Paper, _Component); + + function Paper() { + (0, _classCallCheck3.default)(this, Paper); + return (0, _possibleConstructorReturn3.default)(this, (Paper.__proto__ || (0, _getPrototypeOf2.default)(Paper)).apply(this, arguments)); + } + + (0, _createClass3.default)(Paper, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + circle = _props.circle, + rounded = _props.rounded, + style = _props.style, + transitionEnabled = _props.transitionEnabled, + zDepth = _props.zDepth, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'circle', 'rounded', 'style', 'transitionEnabled', 'zDepth']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + children + ); + } + }]); + return Paper; +}(_react.Component); + +Paper.defaultProps = { + circle: false, + rounded: true, + transitionEnabled: true, + zDepth: 1 +}; +Paper.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Paper.propTypes = { + /** + * Children passed into the paper element. + */ + children: _react.PropTypes.node, + /** + * Set to true to generate a circlular paper container. + */ + circle: _react.PropTypes.bool, + /** + * By default, the paper container will have a border radius. + * Set this to false to generate a container with sharp corners. + */ + rounded: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Set to false to disable CSS transitions for the paper element. + */ + transitionEnabled: _react.PropTypes.bool, + /** + * This number represents the zDepth of the paper shadow. + */ + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = Paper; + +/***/ }), +/* 733 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ActionCode = function ActionCode(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z' }) + ); +}; +ActionCode = (0, _pure2.default)(ActionCode); +ActionCode.displayName = 'ActionCode'; +ActionCode.muiName = 'SvgIcon'; + +exports.default = ActionCode; + +/***/ }), +/* 734 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ActionShop = function ActionShop(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M16 6V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H2v13c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6h-6zm-6-2h4v2h-4V4zM9 18V9l7.5 4L9 18z' }) + ); +}; +ActionShop = (0, _pure2.default)(ActionShop); +ActionShop.displayName = 'ActionShop'; +ActionShop.muiName = 'SvgIcon'; + +exports.default = ActionShop; + +/***/ }), +/* 735 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ActionAccountCircle = function ActionAccountCircle(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z' }) + ); +}; +ActionAccountCircle = (0, _pure2.default)(ActionAccountCircle); +ActionAccountCircle.displayName = 'ActionAccountCircle'; +ActionAccountCircle.muiName = 'SvgIcon'; + +exports.default = ActionAccountCircle; + +/***/ }), +/* 736 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var AlertError = function AlertError(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z' }) + ); +}; +AlertError = (0, _pure2.default)(AlertError); +AlertError.displayName = 'AlertError'; +AlertError.muiName = 'SvgIcon'; + +exports.default = AlertError; + +/***/ }), +/* 737 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zIndex = exports.typography = exports.transitions = exports.spacing = exports.muiThemeable = exports.getMuiTheme = exports.LightRawTheme = exports.lightBaseTheme = exports.DarkRawTheme = exports.darkBaseTheme = exports.colors = exports.MuiThemeProvider = undefined; + +var _MuiThemeProvider2 = __webpack_require__(303); + +var _MuiThemeProvider3 = _interopRequireDefault(_MuiThemeProvider2); + +var _colors2 = __webpack_require__(47); + +var _colors = _interopRequireWildcard(_colors2); + +var _darkBaseTheme2 = __webpack_require__(738); + +var _darkBaseTheme3 = _interopRequireDefault(_darkBaseTheme2); + +var _lightBaseTheme2 = __webpack_require__(308); + +var _lightBaseTheme3 = _interopRequireDefault(_lightBaseTheme2); + +var _getMuiTheme2 = __webpack_require__(125); + +var _getMuiTheme3 = _interopRequireDefault(_getMuiTheme2); + +var _muiThemeable2 = __webpack_require__(739); + +var _muiThemeable3 = _interopRequireDefault(_muiThemeable2); + +var _spacing2 = __webpack_require__(197); + +var _spacing3 = _interopRequireDefault(_spacing2); + +var _transitions2 = __webpack_require__(10); + +var _transitions3 = _interopRequireDefault(_transitions2); + +var _typography2 = __webpack_require__(313); + +var _typography3 = _interopRequireDefault(_typography2); + +var _zIndex2 = __webpack_require__(309); + +var _zIndex3 = _interopRequireDefault(_zIndex2); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.MuiThemeProvider = _MuiThemeProvider3.default; +exports.colors = _colors; +exports.darkBaseTheme = _darkBaseTheme3.default; +exports.DarkRawTheme = _darkBaseTheme3.default; +exports.lightBaseTheme = _lightBaseTheme3.default; +exports.LightRawTheme = _lightBaseTheme3.default; +exports.getMuiTheme = _getMuiTheme3.default; +exports.muiThemeable = _muiThemeable3.default; +exports.spacing = _spacing3.default; +exports.transitions = _transitions3.default; +exports.typography = _typography3.default; +exports.zIndex = _zIndex3.default; + +/***/ }), +/* 738 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _colors = __webpack_require__(47); + +var _colorManipulator = __webpack_require__(58); + +var _spacing = __webpack_require__(197); + +var _spacing2 = _interopRequireDefault(_spacing); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = { + spacing: _spacing2.default, + fontFamily: 'Roboto, sans-serif', + palette: { + primary1Color: _colors.cyan700, + primary2Color: _colors.cyan700, + primary3Color: _colors.grey600, + accent1Color: _colors.pinkA200, + accent2Color: _colors.pinkA400, + accent3Color: _colors.pinkA100, + textColor: _colors.fullWhite, + secondaryTextColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.7), + alternateTextColor: '#303030', + canvasColor: '#303030', + borderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), + disabledColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), + pickerHeaderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12), + clockCircleColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12) + } +}; + +/***/ }), +/* 739 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +exports.default = muiThemeable; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _getMuiTheme = __webpack_require__(125); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DEFAULT_THEME = void 0; + +function getDefaultTheme() { + if (!DEFAULT_THEME) { + DEFAULT_THEME = (0, _getMuiTheme2.default)(); + } + return DEFAULT_THEME; +} + +function muiThemeable() { + return function (Component) { + var MuiComponent = function MuiComponent(props, context) { + var _context$muiTheme = context.muiTheme, + muiTheme = _context$muiTheme === undefined ? getDefaultTheme() : _context$muiTheme; + + + return _react2.default.createElement(Component, (0, _extends3.default)({ muiTheme: muiTheme }, props)); + }; + + MuiComponent.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired + }; + + return MuiComponent; + }; +} + +/***/ }), +/* 740 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _EnhancedButton = __webpack_require__(61); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tabs = context.muiTheme.tabs; + + + return { + root: { + color: props.selected ? tabs.selectedTextColor : tabs.textColor, + fontWeight: 500, + fontSize: 14, + width: props.width, + textTransform: 'uppercase', + padding: 0 + }, + button: { + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + justifyContent: 'center', + height: props.label && props.icon ? 72 : 48 + } + }; +} + +var Tab = function (_Component) { + (0, _inherits3.default)(Tab, _Component); + + function Tab() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Tab); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tab.__proto__ || (0, _getPrototypeOf2.default)(Tab)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(_this.props.value, event, _this); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Tab, [{ + key: 'render', + value: function render() { + var _props = this.props, + icon = _props.icon, + index = _props.index, + onActive = _props.onActive, + onTouchTap = _props.onTouchTap, + selected = _props.selected, + label = _props.label, + buttonStyle = _props.buttonStyle, + style = _props.style, + value = _props.value, + width = _props.width, + other = (0, _objectWithoutProperties3.default)(_props, ['icon', 'index', 'onActive', 'onTouchTap', 'selected', 'label', 'buttonStyle', 'style', 'value', 'width']); + + + var styles = getStyles(this.props, this.context); + + var iconElement = void 0; + if (icon && _react2.default.isValidElement(icon)) { + var iconProps = { + style: { + fontSize: 24, + color: styles.root.color, + marginBottom: label ? 5 : 0 + } + }; + // If it's svg icon set color via props + if (icon.type.muiName !== 'FontIcon') { + iconProps.color = styles.root.color; + } + iconElement = _react2.default.cloneElement(icon, iconProps); + } + + var rippleOpacity = 0.3; + var rippleColor = this.context.muiTheme.tabs.selectedTextColor; + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + style: (0, _simpleAssign2.default)(styles.root, style), + focusRippleColor: rippleColor, + touchRippleColor: rippleColor, + focusRippleOpacity: rippleOpacity, + touchRippleOpacity: rippleOpacity, + onTouchTap: this.handleTouchTap + }), + _react2.default.createElement( + 'div', + { style: (0, _simpleAssign2.default)(styles.button, buttonStyle) }, + iconElement, + label + ) + ); + } + }]); + return Tab; +}(_react.Component); + +Tab.muiName = 'Tab'; +Tab.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Tab.propTypes = { + /** + * Override the inline-styles of the button element. + */ + buttonStyle: _react.PropTypes.object, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Sets the icon of the tab, you can pass `FontIcon` or `SvgIcon` elements. + */ + icon: _react.PropTypes.node, + /** + * @ignore + */ + index: _react.PropTypes.any, + /** + * Sets the text value of the tab item to the string specified. + */ + label: _react.PropTypes.node, + /** + * Fired when the active tab changes by touch or tap. + * Use this event to specify any functionality when an active tab changes. + * For example - we are using this to route to home when the third tab becomes active. + * This function will always recieve the active tab as it\'s first argument. + */ + onActive: _react.PropTypes.func, + /** + * @ignore + * This property is overriden by the Tabs component. + */ + onTouchTap: _react.PropTypes.func, + /** + * @ignore + * Defines if the current tab is selected or not. + * The Tabs component is responsible for setting this property. + */ + selected: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * If value prop passed to Tabs component, this value prop is also required. + * It assigns a value to the tab so that it can be selected by the Tabs. + */ + value: _react.PropTypes.any, + /** + * @ignore + * This property is overriden by the Tabs component. + */ + width: _react.PropTypes.string +} : void 0; +exports.default = Tab; + +/***/ }), +/* 741 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reduxForm = __webpack_require__(90); + +var _reactRedux = __webpack_require__(21); + +var _MenuItem = __webpack_require__(129); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +var _RaisedButton = __webpack_require__(96); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _reduxFormMaterialUi = __webpack_require__(131); + +var _Styles = __webpack_require__(62); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _Utils = __webpack_require__(332); + +var Utils = _interopRequireWildcard(_Utils); + +var _FormValidators = __webpack_require__(133); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Menus = __webpack_require__(82); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStatesForCountry(country) { + switch (country) { + case 'USA': + return Utils.usaRegions; + case 'JAPAN': + return Utils.japanRegions; + case 'CANADA': + return Utils.canadaRegions; + default: + return []; + } +} + +var Billing = function Billing(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting, + country = props.country; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'biling-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_name', + validate: Validators.fullName, + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Firstname and Lastname', + hintText: 'Firstname and Lastname', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_email', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Email', + hintText: 'Email', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.email] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_tel', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Phone number', + hintText: 'Phone number', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'bo', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Address', + hintText: 'Address', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_city', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'City', + hintText: 'City', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'order_billing_country', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Country', + hintText: 'Country', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.countries.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); + }) + ) + ), + ['JAPAN', 'USA', 'CANADA'].indexOf(country) !== -1 && _react2.default.createElement( + _reduxForm.Field, + { + name: 'order_billing_state', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'State', + hintText: 'State', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + getStatesForCountry(country).map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_zip', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Zip', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_type', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Credit card type', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + _react2.default.createElement(_MenuItem2.default, { value: 'visa', primaryText: 'Visa' }), + _react2.default.createElement(_MenuItem2.default, { value: 'american_express', primaryText: 'American Express' }), + _react2.default.createElement(_MenuItem2.default, { value: 'master', primaryText: 'Mastercard' }), + _react2.default.createElement(_MenuItem2.default, { value: 'solo', primaryText: 'Solo' }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'cnb', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Credit Card Number', + hintText: 'Credit Card Number', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_month', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Expiry month', + hintText: 'Expiry month', + validate: [Validators.required], + style: _Styles2.default.fields.text + }, + Array.apply(null, new Array(12)).map(function (x, i) { + var month = ++i < 10 ? '0' + i : i; + return _react2.default.createElement(_MenuItem2.default, { key: month, value: month, primaryText: month }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_year', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Expiry year', + hintText: 'Expiry year', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Array.apply(null, new Array(5)).map(function (x, i) { + var year = new Date().getFullYear() + i; + return _react2.default.createElement(_MenuItem2.default, { key: year, value: year, primaryText: year }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'vval', + component: _reduxFormMaterialUi.TextField, + hintText: 'CCV', + floatingLabelText: 'CCV', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; + +var BillingForm = (0, _reduxForm.reduxForm)({ + form: 'billing' +})(Billing); + +Billing.propTypes = { + shop: _react.PropTypes.string.isRequired +}; +var selector = (0, _reduxForm.formValueSelector)('billing'); + +function mapStateToProps(state, ownProps) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + initialValues: (settings[ownProps.shop] || {})[menus.MENU_BILLING] || {}, + country: selector(state, 'order_billing_country') + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps)(BillingForm); + +/***/ }), +/* 742 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +module.exports = throttle; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(44))) + +/***/ }), +/* 743 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(38); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _Paper = __webpack_require__(31); + +var _Paper2 = _interopRequireDefault(_Paper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var targetOrigin = props.targetOrigin; + var open = state.open; + var muiTheme = context.muiTheme; + + var horizontal = targetOrigin.horizontal.replace('middle', 'vertical'); + + return { + root: { + position: 'fixed', + zIndex: muiTheme.zIndex.popover, + opacity: open ? 1 : 0, + transform: open ? 'scale(1, 1)' : 'scale(0, 0)', + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity']), + maxHeight: '100%' + }, + horizontal: { + maxHeight: '100%', + overflowY: 'auto', + transform: open ? 'scaleX(1)' : 'scaleX(0)', + opacity: open ? 1 : 0, + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity']) + }, + vertical: { + opacity: open ? 1 : 0, + transform: open ? 'scaleY(1)' : 'scaleY(0)', + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('500ms', ['transform', 'opacity']) + } + }; +} + +var PopoverAnimationDefault = function (_Component) { + (0, _inherits3.default)(PopoverAnimationDefault, _Component); + + function PopoverAnimationDefault() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, PopoverAnimationDefault); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PopoverAnimationDefault.__proto__ || (0, _getPrototypeOf2.default)(PopoverAnimationDefault)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(PopoverAnimationDefault, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setState({ open: true }); // eslint-disable-line react/no-did-mount-set-state + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + open: nextProps.open + }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + className = _props.className, + style = _props.style, + zDepth = _props.zDepth; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _Paper2.default, + { + style: (0, _simpleAssign2.default)(styles.root, style), + zDepth: zDepth, + className: className + }, + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.horizontal) }, + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.vertical) }, + this.props.children + ) + ) + ); + } + }]); + return PopoverAnimationDefault; +}(_react.Component); + +PopoverAnimationDefault.defaultProps = { + style: {}, + zDepth: 1 +}; +PopoverAnimationDefault.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? PopoverAnimationDefault.propTypes = { + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + targetOrigin: _propTypes2.default.origin.isRequired, + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = PopoverAnimationDefault; + +/***/ }), +/* 744 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** +* Returns a number of pixels from the top of the screen for given dom element. +* +* @param {object} dom element +* @returns {number} A position from the top of the screen in pixels +*/ +var getOffsetTop = exports.getOffsetTop = function getOffsetTop(elem) { + var yPos = elem.offsetTop; + var tempEl = elem.offsetParent; + + while (tempEl != null) { + yPos += tempEl.offsetTop; + tempEl = tempEl.offsetParent; + } + + return yPos; +}; + +var isIOS = exports.isIOS = function isIOS() { + return (/iPad|iPhone|iPod/.test(window.navigator.userAgent) && !window.MSStream + ); +}; + +/***/ }), +/* 745 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationCheck = function NavigationCheck(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' }) + ); +}; +NavigationCheck = (0, _pure2.default)(NavigationCheck); +NavigationCheck.displayName = 'NavigationCheck'; +NavigationCheck.muiName = 'SvgIcon'; + +exports.default = NavigationCheck; + +/***/ }), +/* 746 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.HotKeyHolder = undefined; + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var HotKeyHolder = exports.HotKeyHolder = function () { + function HotKeyHolder() { + var _this = this; + + (0, _classCallCheck3.default)(this, HotKeyHolder); + + this.clear = function () { + _this.timerId = null; + _this.lastKeys = null; + }; + } + + (0, _createClass3.default)(HotKeyHolder, [{ + key: 'append', + value: function append(key) { + clearTimeout(this.timerId); + this.timerId = setTimeout(this.clear, 500); + return this.lastKeys = (this.lastKeys || '') + key; + } + }]); + return HotKeyHolder; +}(); + +/***/ }), +/* 747 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _colorManipulator = __webpack_require__(58); + +var _childUtils = __webpack_require__(127); + +var _EnhancedButton = __webpack_require__(61); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _Paper = __webpack_require__(31); + +var _Paper2 = _interopRequireDefault(_Paper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validateLabel(props, propName, componentName) { + if (false) { + if (!props.children && props.label !== 0 && !props.label && !props.icon) { + return new Error('Required prop label or children or icon was not specified in ' + componentName + '.'); + } + } +} + +function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + button = _context$muiTheme.button, + raisedButton = _context$muiTheme.raisedButton; + var disabled = props.disabled, + disabledBackgroundColor = props.disabledBackgroundColor, + disabledLabelColor = props.disabledLabelColor, + fullWidth = props.fullWidth, + icon = props.icon, + label = props.label, + labelPosition = props.labelPosition, + primary = props.primary, + secondary = props.secondary, + style = props.style; + + + var amount = primary || secondary ? 0.4 : 0.08; + + var backgroundColor = raisedButton.color; + var labelColor = raisedButton.textColor; + + if (disabled) { + backgroundColor = disabledBackgroundColor || raisedButton.disabledColor; + labelColor = disabledLabelColor || raisedButton.disabledTextColor; + } else if (primary) { + backgroundColor = raisedButton.primaryColor; + labelColor = raisedButton.primaryTextColor; + } else if (secondary) { + backgroundColor = raisedButton.secondaryColor; + labelColor = raisedButton.secondaryTextColor; + } else { + if (props.backgroundColor) { + backgroundColor = props.backgroundColor; + } + if (props.labelColor) { + labelColor = props.labelColor; + } + } + + var buttonHeight = style && style.height || button.height; + var borderRadius = 2; + + return { + root: { + display: 'inline-block', + transition: _transitions2.default.easeOut(), + minWidth: fullWidth ? '100%' : button.minWidth + }, + button: { + height: buttonHeight, + lineHeight: buttonHeight + 'px', + width: '100%', + padding: 0, + borderRadius: borderRadius, + transition: _transitions2.default.easeOut(), + backgroundColor: backgroundColor, + // That's the default value for a button but not a link + textAlign: 'center' + }, + label: { + position: 'relative', + opacity: 1, + fontSize: raisedButton.fontSize, + letterSpacing: 0, + textTransform: raisedButton.textTransform || button.textTransform || 'uppercase', + fontWeight: raisedButton.fontWeight, + margin: 0, + userSelect: 'none', + paddingLeft: icon && labelPosition !== 'before' ? 8 : baseTheme.spacing.desktopGutterLess, + paddingRight: icon && labelPosition === 'before' ? 8 : baseTheme.spacing.desktopGutterLess, + color: labelColor + }, + icon: { + verticalAlign: 'middle', + marginLeft: label && labelPosition !== 'before' ? 12 : 0, + marginRight: label && labelPosition === 'before' ? 12 : 0 + }, + overlay: { + height: buttonHeight, + borderRadius: borderRadius, + backgroundColor: (state.keyboardFocused || state.hovered) && !disabled && (0, _colorManipulator.fade)(labelColor, amount), + transition: _transitions2.default.easeOut(), + top: 0 + }, + ripple: { + color: labelColor, + opacity: !(primary || secondary) ? 0.1 : 0.16 + } + }; +} + +var RaisedButton = function (_Component) { + (0, _inherits3.default)(RaisedButton, _Component); + + function RaisedButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RaisedButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RaisedButton.__proto__ || (0, _getPrototypeOf2.default)(RaisedButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + keyboardFocused: false, + touched: false, + initialZDepth: 0, + zDepth: 0 + }, _this.handleMouseDown = function (event) { + // only listen to left clicks + if (event.button === 0) { + _this.setState({ + zDepth: _this.state.initialZDepth + 1 + }); + } + if (_this.props.onMouseDown) { + _this.props.onMouseDown(event); + } + }, _this.handleMouseUp = function (event) { + _this.setState({ + zDepth: _this.state.initialZDepth + }); + if (_this.props.onMouseUp) { + _this.props.onMouseUp(event); + } + }, _this.handleMouseLeave = function (event) { + if (!_this.state.keyboardFocused) { + _this.setState({ + zDepth: _this.state.initialZDepth, + hovered: false + }); + } + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseEnter = function (event) { + if (!_this.state.keyboardFocused && !_this.state.touched) { + _this.setState({ + hovered: true + }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _this.handleTouchStart = function (event) { + _this.setState({ + touched: true, + zDepth: _this.state.initialZDepth + 1 + }); + + if (_this.props.onTouchStart) { + _this.props.onTouchStart(event); + } + }, _this.handleTouchEnd = function (event) { + _this.setState({ + touched: true, + zDepth: _this.state.initialZDepth + }); + + if (_this.props.onTouchEnd) { + _this.props.onTouchEnd(event); + } + }, _this.handleKeyboardFocus = function (event, keyboardFocused) { + var zDepth = keyboardFocused && !_this.props.disabled ? _this.state.initialZDepth + 1 : _this.state.initialZDepth; + + _this.setState({ + zDepth: zDepth, + keyboardFocused: keyboardFocused + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(RaisedButton, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var zDepth = this.props.disabled ? 0 : 1; + this.setState({ + zDepth: zDepth, + initialZDepth: zDepth + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var zDepth = nextProps.disabled ? 0 : 1; + var nextState = { + zDepth: zDepth, + initialZDepth: zDepth + }; + + if (nextProps.disabled) { + nextState.hovered = false; + } + + this.setState(nextState); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + backgroundColor = _props.backgroundColor, + buttonStyle = _props.buttonStyle, + children = _props.children, + className = _props.className, + disabled = _props.disabled, + disabledBackgroundColor = _props.disabledBackgroundColor, + disabledLabelColor = _props.disabledLabelColor, + fullWidth = _props.fullWidth, + icon = _props.icon, + label = _props.label, + labelColor = _props.labelColor, + labelPosition = _props.labelPosition, + labelStyle = _props.labelStyle, + overlayStyle = _props.overlayStyle, + primary = _props.primary, + rippleStyle = _props.rippleStyle, + secondary = _props.secondary, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['backgroundColor', 'buttonStyle', 'children', 'className', 'disabled', 'disabledBackgroundColor', 'disabledLabelColor', 'fullWidth', 'icon', 'label', 'labelColor', 'labelPosition', 'labelStyle', 'overlayStyle', 'primary', 'rippleStyle', 'secondary', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var mergedRippleStyles = (0, _simpleAssign2.default)({}, styles.ripple, rippleStyle); + + var buttonEventHandlers = disabled ? {} : { + onMouseDown: this.handleMouseDown, + onMouseUp: this.handleMouseUp, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd, + onKeyboardFocus: this.handleKeyboardFocus + }; + + var labelElement = label && _react2.default.createElement( + 'span', + { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) }, + label + ); + + var iconCloned = icon && (0, _react.cloneElement)(icon, { + color: icon.props.color || styles.label.color, + style: (0, _simpleAssign2.default)(styles.icon, icon.props.style) + }); + + // Place label before or after children. + var childrenFragment = labelPosition === 'before' ? { + labelElement: labelElement, + iconCloned: iconCloned, + children: children + } : { + children: children, + iconCloned: iconCloned, + labelElement: labelElement + }; + + var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment); + + return _react2.default.createElement( + _Paper2.default, + { + className: className, + style: (0, _simpleAssign2.default)(styles.root, style), + zDepth: this.state.zDepth + }, + _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, buttonEventHandlers, { + ref: 'container', + disabled: disabled, + style: (0, _simpleAssign2.default)(styles.button, buttonStyle), + focusRippleColor: mergedRippleStyles.color, + touchRippleColor: mergedRippleStyles.color, + focusRippleOpacity: mergedRippleStyles.opacity, + touchRippleOpacity: mergedRippleStyles.opacity + }), + _react2.default.createElement( + 'div', + { + ref: 'overlay', + style: prepareStyles((0, _simpleAssign2.default)(styles.overlay, overlayStyle)) + }, + enhancedButtonChildren + ) + ) + ); + } + }]); + return RaisedButton; +}(_react.Component); + +RaisedButton.muiName = 'RaisedButton'; +RaisedButton.defaultProps = { + disabled: false, + labelPosition: 'after', + fullWidth: false, + primary: false, + secondary: false +}; +RaisedButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? RaisedButton.propTypes = { + /** + * Override the default background color for the button, + * but not the default disabled background color + * (use `disabledBackgroundColor` for this). + */ + backgroundColor: _react.PropTypes.string, + /** + * Override the inline-styles of the button element. + */ + buttonStyle: _react.PropTypes.object, + /** + * The content of the button. + * If a label is provided via the `label` prop, the text within the label + * will be displayed in addition to the content provided here. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the button will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the default background color for the button + * when it is disabled. + */ + disabledBackgroundColor: _react.PropTypes.string, + /** + * The color of the button's label when the button is disabled. + */ + disabledLabelColor: _react.PropTypes.string, + /** + * If true, the button will take up the full width of its container. + */ + fullWidth: _react.PropTypes.bool, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * An icon to be displayed within the button. + */ + icon: _react.PropTypes.node, + /** + * The label to be displayed within the button. + * If content is provided via the `children` prop, that content will be + * displayed in addition to the label provided here. + */ + label: validateLabel, + /** + * The color of the button's label. + */ + labelColor: _react.PropTypes.string, + /** + * The position of the button's label relative to the button's `children`. + */ + labelPosition: _react.PropTypes.oneOf(['before', 'after']), + /** + * Override the inline-styles of the button's label element. + */ + labelStyle: _react.PropTypes.object, + /** @ignore */ + onMouseDown: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onMouseUp: _react.PropTypes.func, + /** @ignore */ + onTouchEnd: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * Override the inline style of the button overlay. + */ + overlayStyle: _react.PropTypes.object, + /** + * If true, the button will use the theme's primary color. + */ + primary: _react.PropTypes.bool, + /** + * Override the inline style of the ripple element. + */ + rippleStyle: _react.PropTypes.object, + /** + * If true, the button will use the theme's secondary color. + * If both `secondary` and `primary` are true, the button will use + * the theme's primary color. + */ + secondary: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = RaisedButton; + +/***/ }), +/* 748 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _AutoComplete = __webpack_require__(749); + +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); + +var _createComponent = __webpack_require__(40); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(63); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_AutoComplete2.default, function (_ref) { + var _ref$input = _ref.input, + onChange = _ref$input.onChange, + value = _ref$input.value, + _onNewRequest = _ref.onNewRequest, + dataSourceConfig = _ref.dataSourceConfig, + props = _objectWithoutProperties(_ref, ['input', 'onNewRequest', 'dataSourceConfig']); + + return _extends({}, (0, _mapError2.default)(props), { + dataSourceConfig: dataSourceConfig, + searchText: dataSourceConfig ? value[dataSourceConfig.text] : value, + onNewRequest: function onNewRequest(value) { + onChange((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && dataSourceConfig ? value[dataSourceConfig.value] : value); + if (_onNewRequest) { + _onNewRequest(value); + } + }, + onUpdateInput: function onUpdateInput(value) { + if (!dataSourceConfig) { + onChange(value); + } + } + }); +}); + +/***/ }), +/* 749 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _AutoComplete = __webpack_require__(750); + +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _AutoComplete2.default; + +/***/ }), +/* 750 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _typeof2 = __webpack_require__(57); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _keycode = __webpack_require__(27); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _TextField = __webpack_require__(97); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _Menu = __webpack_require__(756); + +var _Menu2 = _interopRequireDefault(_Menu); + +var _MenuItem = __webpack_require__(129); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +var _Divider = __webpack_require__(757); + +var _Divider2 = _interopRequireDefault(_Divider); + +var _Popover = __webpack_require__(130); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _propTypes = __webpack_require__(38); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var anchorEl = state.anchorEl; + var fullWidth = props.fullWidth; + + + var styles = { + root: { + display: 'inline-block', + position: 'relative', + width: fullWidth ? '100%' : 256 + }, + menu: { + width: '100%' + }, + list: { + display: 'block', + width: fullWidth ? '100%' : 256 + }, + innerDiv: { + overflow: 'hidden' + } + }; + + if (anchorEl && fullWidth) { + styles.popover = { + width: anchorEl.clientWidth + }; + } + + return styles; +} + +var AutoComplete = function (_Component) { + (0, _inherits3.default)(AutoComplete, _Component); + + function AutoComplete() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, AutoComplete); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoComplete.__proto__ || (0, _getPrototypeOf2.default)(AutoComplete)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + anchorEl: null, + focusTextField: true, + open: false, + searchText: undefined + }, _this.handleRequestClose = function () { + // Only take into account the Popover clickAway when we are + // not focusing the TextField. + if (!_this.state.focusTextField) { + _this.close(); + } + }, _this.handleMouseDown = function (event) { + // Keep the TextField focused + event.preventDefault(); + }, _this.handleItemTouchTap = function (event, child) { + var dataSource = _this.props.dataSource; + + var index = parseInt(child.key, 10); + var chosenRequest = dataSource[index]; + var searchText = _this.chosenRequestText(chosenRequest); + + _this.setState({ + searchText: searchText + }, function () { + _this.props.onUpdateInput(searchText, _this.props.dataSource, { + source: 'touchTap' + }); + + _this.timerTouchTapCloseId = setTimeout(function () { + _this.timerTouchTapCloseId = null; + _this.close(); + _this.props.onNewRequest(chosenRequest, index); + }, _this.props.menuCloseDelay); + }); + }, _this.chosenRequestText = function (chosenRequest) { + if (typeof chosenRequest === 'string') { + return chosenRequest; + } else { + return chosenRequest[_this.props.dataSourceConfig.text]; + } + }, _this.handleEscKeyDown = function () { + _this.close(); + }, _this.handleKeyDown = function (event) { + if (_this.props.onKeyDown) _this.props.onKeyDown(event); + + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.close(); + var searchText = _this.state.searchText; + if (searchText !== '') { + _this.props.onNewRequest(searchText, -1); + } + break; + + case 'esc': + _this.close(); + break; + + case 'down': + event.preventDefault(); + _this.setState({ + open: true, + focusTextField: false, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }); + break; + + default: + break; + } + }, _this.handleChange = function (event) { + var searchText = event.target.value; + + // Make sure that we have a new searchText. + // Fix an issue with a Cordova Webview + if (searchText === _this.state.searchText) { + return; + } + + _this.setState({ + searchText: searchText, + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }, function () { + _this.props.onUpdateInput(searchText, _this.props.dataSource, { + source: 'change' + }); + }); + }, _this.handleBlur = function (event) { + if (_this.state.focusTextField && _this.timerTouchTapCloseId === null) { + _this.timerBlurClose = setTimeout(function () { + _this.close(); + }, 0); + } + + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleFocus = function (event) { + if (!_this.state.open && _this.props.openOnFocus) { + _this.setState({ + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }); + } + + _this.setState({ + focusTextField: true + }); + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(AutoComplete, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.requestsList = []; + this.setState({ + open: this.props.open, + searchText: this.props.searchText + }); + this.timerTouchTapCloseId = null; + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.searchText !== nextProps.searchText) { + this.setState({ + searchText: nextProps.searchText + }); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.timerTouchTapCloseId); + clearTimeout(this.timerBlurClose); + } + }, { + key: 'close', + value: function close() { + this.setState({ + open: false, + anchorEl: null + }); + + if (this.props.onClose) { + this.props.onClose(); + } + } + }, { + key: 'blur', + value: function blur() { + this.refs.searchTextField.blur(); + } + }, { + key: 'focus', + value: function focus() { + this.refs.searchTextField.focus(); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + anchorOrigin = _props.anchorOrigin, + animated = _props.animated, + animation = _props.animation, + dataSource = _props.dataSource, + dataSourceConfig = _props.dataSourceConfig, + disableFocusRipple = _props.disableFocusRipple, + errorStyle = _props.errorStyle, + floatingLabelText = _props.floatingLabelText, + filter = _props.filter, + fullWidth = _props.fullWidth, + style = _props.style, + hintText = _props.hintText, + maxSearchResults = _props.maxSearchResults, + menuCloseDelay = _props.menuCloseDelay, + textFieldStyle = _props.textFieldStyle, + menuStyle = _props.menuStyle, + menuProps = _props.menuProps, + listStyle = _props.listStyle, + targetOrigin = _props.targetOrigin, + onClose = _props.onClose, + onNewRequest = _props.onNewRequest, + onUpdateInput = _props.onUpdateInput, + openOnFocus = _props.openOnFocus, + popoverProps = _props.popoverProps, + searchTextProp = _props.searchText, + other = (0, _objectWithoutProperties3.default)(_props, ['anchorOrigin', 'animated', 'animation', 'dataSource', 'dataSourceConfig', 'disableFocusRipple', 'errorStyle', 'floatingLabelText', 'filter', 'fullWidth', 'style', 'hintText', 'maxSearchResults', 'menuCloseDelay', 'textFieldStyle', 'menuStyle', 'menuProps', 'listStyle', 'targetOrigin', 'onClose', 'onNewRequest', 'onUpdateInput', 'openOnFocus', 'popoverProps', 'searchText']); + + var _ref2 = popoverProps || {}, + popoverStyle = _ref2.style, + popoverOther = (0, _objectWithoutProperties3.default)(_ref2, ['style']); + + var _state = this.state, + open = _state.open, + anchorEl = _state.anchorEl, + searchText = _state.searchText, + focusTextField = _state.focusTextField; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + var requestsList = []; + + dataSource.every(function (item, index) { + switch (typeof item === 'undefined' ? 'undefined' : (0, _typeof3.default)(item)) { + case 'string': + if (filter(searchText, item, item)) { + requestsList.push({ + text: item, + value: _react2.default.createElement(_MenuItem2.default, { + innerDivStyle: styles.innerDiv, + value: item, + primaryText: item, + disableFocusRipple: disableFocusRipple, + key: index + }) + }); + } + break; + + case 'object': + if (item && typeof item[_this2.props.dataSourceConfig.text] === 'string') { + var itemText = item[_this2.props.dataSourceConfig.text]; + if (!_this2.props.filter(searchText, itemText, item)) break; + + var itemValue = item[_this2.props.dataSourceConfig.value]; + if (itemValue.type && (itemValue.type.muiName === _MenuItem2.default.muiName || itemValue.type.muiName === _Divider2.default.muiName)) { + requestsList.push({ + text: itemText, + value: _react2.default.cloneElement(itemValue, { + key: index, + disableFocusRipple: disableFocusRipple + }) + }); + } else { + requestsList.push({ + text: itemText, + value: _react2.default.createElement(_MenuItem2.default, { + innerDivStyle: styles.innerDiv, + primaryText: itemText, + disableFocusRipple: disableFocusRipple, + key: index + }) + }); + } + } + break; + + default: + // Do nothing + } + + return !(maxSearchResults && maxSearchResults > 0 && requestsList.length === maxSearchResults); + }); + + this.requestsList = requestsList; + + var menu = open && requestsList.length > 0 && _react2.default.createElement( + _Menu2.default, + (0, _extends3.default)({}, menuProps, { + ref: 'menu', + autoWidth: false, + disableAutoFocus: focusTextField, + onEscKeyDown: this.handleEscKeyDown, + initiallyKeyboardFocused: true, + onItemTouchTap: this.handleItemTouchTap, + onMouseDown: this.handleMouseDown, + style: (0, _simpleAssign2.default)(styles.menu, menuStyle), + listStyle: (0, _simpleAssign2.default)(styles.list, listStyle) + }), + requestsList.map(function (i) { + return i.value; + }) + ); + + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + ref: 'searchTextField', + autoComplete: 'off', + value: searchText, + onChange: this.handleChange, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onKeyDown: this.handleKeyDown, + floatingLabelText: floatingLabelText, + hintText: hintText, + fullWidth: fullWidth, + multiLine: false, + errorStyle: errorStyle, + style: textFieldStyle + })), + _react2.default.createElement( + _Popover2.default, + (0, _extends3.default)({ + style: (0, _simpleAssign2.default)({}, styles.popover, popoverStyle), + canAutoPosition: false, + anchorOrigin: anchorOrigin, + targetOrigin: targetOrigin, + open: open, + anchorEl: anchorEl, + useLayerForClickAway: false, + onRequestClose: this.handleRequestClose, + animated: animated, + animation: animation + }, popoverOther), + menu + ) + ); + } + }]); + return AutoComplete; +}(_react.Component); + +AutoComplete.defaultProps = { + anchorOrigin: { + vertical: 'bottom', + horizontal: 'left' + }, + animated: true, + dataSourceConfig: { + text: 'text', + value: 'value' + }, + disableFocusRipple: true, + filter: function filter(searchText, key) { + return searchText !== '' && key.indexOf(searchText) !== -1; + }, + fullWidth: false, + open: false, + openOnFocus: false, + onUpdateInput: function onUpdateInput() {}, + onNewRequest: function onNewRequest() {}, + searchText: '', + menuCloseDelay: 300, + targetOrigin: { + vertical: 'top', + horizontal: 'left' + } +}; +AutoComplete.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? AutoComplete.propTypes = { + /** + * Location of the anchor for the auto complete. + */ + anchorOrigin: _propTypes2.default.origin, + /** + * If true, the auto complete is animated as it is toggled. + */ + animated: _react.PropTypes.bool, + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * Array of strings or nodes used to populate the list. + */ + dataSource: _react.PropTypes.array.isRequired, + /** + * Config for objects list dataSource. + * + * @typedef {Object} dataSourceConfig + * + * @property {string} text `dataSource` element key used to find a string to be matched for search + * and shown as a `TextField` input value after choosing the result. + * @property {string} value `dataSource` element key used to find a string to be shown in search results. + */ + dataSourceConfig: _react.PropTypes.object, + /** + * Disables focus ripple when true. + */ + disableFocusRipple: _react.PropTypes.bool, + /** + * Override style prop for error. + */ + errorStyle: _react.PropTypes.object, + /** + * The error content to display. + */ + errorText: _react.PropTypes.node, + /** + * Callback function used to filter the auto complete. + * + * @param {string} searchText The text to search for within `dataSource`. + * @param {string} key `dataSource` element, or `text` property on that element if it's not a string. + * @returns {boolean} `true` indicates the auto complete list will include `key` when the input is `searchText`. + */ + filter: _react.PropTypes.func, + /** + * The content to use for adding floating label element. + */ + floatingLabelText: _react.PropTypes.node, + /** + * If true, the field receives the property `width: 100%`. + */ + fullWidth: _react.PropTypes.bool, + /** + * The hint content to display. + */ + hintText: _react.PropTypes.node, + /** + * Override style for list. + */ + listStyle: _react.PropTypes.object, + /** + * The max number of search results to be shown. + * By default it shows all the items which matches filter. + */ + maxSearchResults: _react.PropTypes.number, + /** + * Delay for closing time of the menu. + */ + menuCloseDelay: _react.PropTypes.number, + /** + * Props to be passed to menu. + */ + menuProps: _react.PropTypes.object, + /** + * Override style for menu. + */ + menuStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function fired when the menu is closed. + */ + onClose: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** @ignore */ + onKeyDown: _react.PropTypes.func, + /** + * Callback function that is fired when a list item is selected, or enter is pressed in the `TextField`. + * + * @param {string} chosenRequest Either the `TextField` input value, if enter is pressed in the `TextField`, + * or the text value of the corresponding list item that was selected. + * @param {number} index The index in `dataSource` of the list item selected, or `-1` if enter is pressed in the + * `TextField`. + */ + onNewRequest: _react.PropTypes.func, + /** + * Callback function that is fired when the user updates the `TextField`. + * + * @param {string} searchText The auto-complete's `searchText` value. + * @param {array} dataSource The auto-complete's `dataSource` array. + * @param {object} params Additional information linked the update. + */ + onUpdateInput: _react.PropTypes.func, + /** + * Auto complete menu is open if true. + */ + open: _react.PropTypes.bool, + /** + * If true, the list item is showed when a focus event triggers. + */ + openOnFocus: _react.PropTypes.bool, + /** + * Props to be passed to popover. + */ + popoverProps: _react.PropTypes.object, + /** + * Text being input to auto complete. + */ + searchText: _react.PropTypes.string, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Origin for location of target. + */ + targetOrigin: _propTypes2.default.origin, + /** + * Override the inline-styles of AutoComplete's TextField element. + */ + textFieldStyle: _react.PropTypes.object +} : void 0; + + +AutoComplete.levenshteinDistance = function (searchText, key) { + var current = []; + var prev = void 0; + var value = void 0; + + for (var i = 0; i <= key.length; i++) { + for (var j = 0; j <= searchText.length; j++) { + if (i && j) { + if (searchText.charAt(j - 1) === key.charAt(i - 1)) value = prev;else value = Math.min(current[j], current[j - 1], prev) + 1; + } else { + value = i + j; + } + prev = current[j]; + current[j] = value; + } + } + return current.pop(); +}; + +AutoComplete.noFilter = function () { + return true; +}; + +AutoComplete.defaultFilter = AutoComplete.caseSensitiveFilter = function (searchText, key) { + return searchText !== '' && key.indexOf(searchText) !== -1; +}; + +AutoComplete.caseInsensitiveFilter = function (searchText, key) { + return key.toLowerCase().indexOf(searchText.toLowerCase()) !== -1; +}; + +AutoComplete.levenshteinDistanceFilter = function (distanceLessThan) { + if (distanceLessThan === undefined) { + return AutoComplete.levenshteinDistance; + } else if (typeof distanceLessThan !== 'number') { + throw 'Error: AutoComplete.levenshteinDistanceFilter is a filter generator, not a filter!'; + } + + return function (s, k) { + return AutoComplete.levenshteinDistance(s, k) < distanceLessThan; + }; +}; + +AutoComplete.fuzzyFilter = function (searchText, key) { + var compareString = key.toLowerCase(); + searchText = searchText.toLowerCase(); + + var searchTextIndex = 0; + for (var index = 0; index < key.length; index++) { + if (compareString[index] === searchText[searchTextIndex]) { + searchTextIndex += 1; + } + } + + return searchTextIndex === searchText.length; +}; + +AutoComplete.Item = _MenuItem2.default; +AutoComplete.Divider = _Divider2.default; + +exports.default = AutoComplete; + +/***/ }), +/* 751 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(60); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _EnhancedTextarea = __webpack_require__(752); + +var _EnhancedTextarea2 = _interopRequireDefault(_EnhancedTextarea); + +var _TextFieldHint = __webpack_require__(753); + +var _TextFieldHint2 = _interopRequireDefault(_TextFieldHint); + +var _TextFieldLabel = __webpack_require__(754); + +var _TextFieldLabel2 = _interopRequireDefault(_TextFieldLabel); + +var _TextFieldUnderline = __webpack_require__(755); + +var _TextFieldUnderline2 = _interopRequireDefault(_TextFieldUnderline); + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var getStyles = function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + _context$muiTheme$tex = _context$muiTheme.textField, + floatingLabelColor = _context$muiTheme$tex.floatingLabelColor, + focusColor = _context$muiTheme$tex.focusColor, + textColor = _context$muiTheme$tex.textColor, + disabledTextColor = _context$muiTheme$tex.disabledTextColor, + backgroundColor = _context$muiTheme$tex.backgroundColor, + errorColor = _context$muiTheme$tex.errorColor; + + + var styles = { + root: { + fontSize: 16, + lineHeight: '24px', + width: props.fullWidth ? '100%' : 256, + height: (props.rows - 1) * 24 + (props.floatingLabelText ? 72 : 48), + display: 'inline-block', + position: 'relative', + backgroundColor: backgroundColor, + fontFamily: baseTheme.fontFamily, + transition: _transitions2.default.easeOut('200ms', 'height'), + cursor: props.disabled ? 'not-allowed' : 'auto' + }, + error: { + position: 'relative', + bottom: 2, + fontSize: 12, + lineHeight: '12px', + color: errorColor, + transition: _transitions2.default.easeOut() + }, + floatingLabel: { + color: props.disabled ? disabledTextColor : floatingLabelColor, + pointerEvents: 'none' + }, + input: { + padding: 0, + position: 'relative', + width: '100%', + border: 'none', + outline: 'none', + backgroundColor: 'rgba(0,0,0,0)', + color: props.disabled ? disabledTextColor : textColor, + cursor: 'inherit', + font: 'inherit', + WebkitTapHighlightColor: 'rgba(0,0,0,0)' }, + inputNative: { + appearance: 'textfield' } + }; + + styles.textarea = (0, _simpleAssign2.default)({}, styles.input, { + marginTop: props.floatingLabelText ? 36 : 12, + marginBottom: props.floatingLabelText ? -36 : -12, + boxSizing: 'border-box', + font: 'inherit' + }); + + // Do not assign a height to the textarea as he handles it on his own. + styles.input.height = '100%'; + + if (state.isFocused) { + styles.floatingLabel.color = focusColor; + } + + if (props.floatingLabelText) { + styles.input.boxSizing = 'border-box'; + + if (!props.multiLine) { + styles.input.marginTop = 14; + } + + if (state.errorText) { + styles.error.bottom = !props.multiLine ? styles.error.fontSize + 3 : 3; + } + } + + if (state.errorText) { + if (state.isFocused) { + styles.floatingLabel.color = styles.error.color; + } + } + + return styles; +}; + +/** + * Check if a value is valid to be displayed inside an input. + * + * @param The value to check. + * @returns True if the string provided is valid, false otherwise. + */ +function isValid(value) { + return value !== '' && value !== undefined && value !== null; +} + +var TextField = function (_Component) { + (0, _inherits3.default)(TextField, _Component); + + function TextField() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TextField); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TextField.__proto__ || (0, _getPrototypeOf2.default)(TextField)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + isFocused: false, + errorText: undefined, + hasValue: false + }, _this.handleInputBlur = function (event) { + _this.setState({ isFocused: false }); + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleInputChange = function (event) { + _this.setState({ hasValue: isValid(event.target.value) }); + if (_this.props.onChange) { + _this.props.onChange(event, event.target.value); + } + }, _this.handleInputFocus = function (event) { + if (_this.props.disabled) { + return; + } + _this.setState({ isFocused: true }); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleHeightChange = function (event, height) { + var newHeight = height + 24; + if (_this.props.floatingLabelText) { + newHeight += 24; + } + _reactDom2.default.findDOMNode(_this).style.height = newHeight + 'px'; + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TextField, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + children = _props.children, + name = _props.name, + hintText = _props.hintText, + floatingLabelText = _props.floatingLabelText, + id = _props.id; + + + var propsLeaf = children ? children.props : this.props; + + this.setState({ + errorText: this.props.errorText, + hasValue: isValid(propsLeaf.value) || isValid(propsLeaf.defaultValue) + }); + + false ? (0, _warning2.default)(name || hintText || floatingLabelText || id, 'Material-UI: We don\'t have enough information\n to build a robust unique id for the TextField component. Please provide an id or a name.') : void 0; + + var uniqueId = name + '-' + hintText + '-' + floatingLabelText + '-' + Math.floor(Math.random() * 0xFFFF); + this.uniqueId = uniqueId.replace(/[^A-Za-z0-9-]/gi, ''); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.errorText !== this.props.errorText) { + this.setState({ + errorText: nextProps.errorText + }); + } + + if (nextProps.children && nextProps.children.props) { + nextProps = nextProps.children.props; + } + + if (nextProps.hasOwnProperty('value')) { + var hasValue = isValid(nextProps.value); + + this.setState({ + hasValue: hasValue + }); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + }, { + key: 'blur', + value: function blur() { + if (this.input) { + this.getInputNode().blur(); + } + } + }, { + key: 'focus', + value: function focus() { + if (this.input) { + this.getInputNode().focus(); + } + } + }, { + key: 'select', + value: function select() { + if (this.input) { + this.getInputNode().select(); + } + } + }, { + key: 'getValue', + value: function getValue() { + return this.input ? this.getInputNode().value : undefined; + } + }, { + key: 'getInputNode', + value: function getInputNode() { + return this.props.children || this.props.multiLine ? this.input.getInputNode() : _reactDom2.default.findDOMNode(this.input); + } + }, { + key: '_isControlled', + value: function _isControlled() { + return this.props.hasOwnProperty('value'); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props2 = this.props, + children = _props2.children, + className = _props2.className, + disabled = _props2.disabled, + errorStyle = _props2.errorStyle, + errorText = _props2.errorText, + floatingLabelFixed = _props2.floatingLabelFixed, + floatingLabelFocusStyle = _props2.floatingLabelFocusStyle, + floatingLabelShrinkStyle = _props2.floatingLabelShrinkStyle, + floatingLabelStyle = _props2.floatingLabelStyle, + floatingLabelText = _props2.floatingLabelText, + fullWidth = _props2.fullWidth, + hintText = _props2.hintText, + hintStyle = _props2.hintStyle, + id = _props2.id, + inputStyle = _props2.inputStyle, + multiLine = _props2.multiLine, + onBlur = _props2.onBlur, + onChange = _props2.onChange, + onFocus = _props2.onFocus, + style = _props2.style, + type = _props2.type, + underlineDisabledStyle = _props2.underlineDisabledStyle, + underlineFocusStyle = _props2.underlineFocusStyle, + underlineShow = _props2.underlineShow, + underlineStyle = _props2.underlineStyle, + rows = _props2.rows, + rowsMax = _props2.rowsMax, + textareaStyle = _props2.textareaStyle, + other = (0, _objectWithoutProperties3.default)(_props2, ['children', 'className', 'disabled', 'errorStyle', 'errorText', 'floatingLabelFixed', 'floatingLabelFocusStyle', 'floatingLabelShrinkStyle', 'floatingLabelStyle', 'floatingLabelText', 'fullWidth', 'hintText', 'hintStyle', 'id', 'inputStyle', 'multiLine', 'onBlur', 'onChange', 'onFocus', 'style', 'type', 'underlineDisabledStyle', 'underlineFocusStyle', 'underlineShow', 'underlineStyle', 'rows', 'rowsMax', 'textareaStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var inputId = id || this.uniqueId; + + var errorTextElement = this.state.errorText && _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.error, errorStyle)) }, + this.state.errorText + ); + + var floatingLabelTextElement = floatingLabelText && _react2.default.createElement( + _TextFieldLabel2.default, + { + muiTheme: this.context.muiTheme, + style: (0, _simpleAssign2.default)(styles.floatingLabel, floatingLabelStyle, this.state.isFocused ? floatingLabelFocusStyle : null), + shrinkStyle: floatingLabelShrinkStyle, + htmlFor: inputId, + shrink: this.state.hasValue || this.state.isFocused || floatingLabelFixed, + disabled: disabled + }, + floatingLabelText + ); + + var inputProps = { + id: inputId, + ref: function ref(elem) { + return _this2.input = elem; + }, + disabled: this.props.disabled, + onBlur: this.handleInputBlur, + onChange: this.handleInputChange, + onFocus: this.handleInputFocus + }; + + var childStyleMerged = (0, _simpleAssign2.default)(styles.input, inputStyle); + + var inputElement = void 0; + if (children) { + inputElement = _react2.default.cloneElement(children, (0, _extends3.default)({}, inputProps, children.props, { + style: (0, _simpleAssign2.default)(childStyleMerged, children.props.style) + })); + } else { + inputElement = multiLine ? _react2.default.createElement(_EnhancedTextarea2.default, (0, _extends3.default)({ + style: childStyleMerged, + textareaStyle: (0, _simpleAssign2.default)(styles.textarea, styles.inputNative, textareaStyle), + rows: rows, + rowsMax: rowsMax + }, other, inputProps, { + onHeightChange: this.handleHeightChange + })) : _react2.default.createElement('input', (0, _extends3.default)({ + type: type, + style: prepareStyles((0, _simpleAssign2.default)(styles.inputNative, childStyleMerged)) + }, other, inputProps)); + } + + var rootProps = {}; + + if (children) { + rootProps = other; + } + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, rootProps, { + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }), + floatingLabelTextElement, + hintText ? _react2.default.createElement(_TextFieldHint2.default, { + muiTheme: this.context.muiTheme, + show: !(this.state.hasValue || floatingLabelText && !this.state.isFocused) || !this.state.hasValue && floatingLabelText && floatingLabelFixed && !this.state.isFocused, + style: hintStyle, + text: hintText + }) : null, + inputElement, + underlineShow ? _react2.default.createElement(_TextFieldUnderline2.default, { + disabled: disabled, + disabledStyle: underlineDisabledStyle, + error: !!this.state.errorText, + errorStyle: errorStyle, + focus: this.state.isFocused, + focusStyle: underlineFocusStyle, + muiTheme: this.context.muiTheme, + style: underlineStyle + }) : null, + errorTextElement + ); + } + }]); + return TextField; +}(_react.Component); + +TextField.defaultProps = { + disabled: false, + floatingLabelFixed: false, + multiLine: false, + fullWidth: false, + type: 'text', + underlineShow: true, + rows: 1 +}; +TextField.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TextField.propTypes = { + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The text string to use for the default value. + */ + defaultValue: _react.PropTypes.any, + /** + * Disables the text field if set to true. + */ + disabled: _react.PropTypes.bool, + /** + * The style object to use to override error styles. + */ + errorStyle: _react.PropTypes.object, + /** + * The error content to display. + */ + errorText: _react.PropTypes.node, + /** + * If true, the floating label will float even when there is no value. + */ + floatingLabelFixed: _react.PropTypes.bool, + /** + * The style object to use to override floating label styles when focused. + */ + floatingLabelFocusStyle: _react.PropTypes.object, + /** + * The style object to use to override floating label styles when shrunk. + */ + floatingLabelShrinkStyle: _react.PropTypes.object, + /** + * The style object to use to override floating label styles. + */ + floatingLabelStyle: _react.PropTypes.object, + /** + * The content to use for the floating label element. + */ + floatingLabelText: _react.PropTypes.node, + /** + * If true, the field receives the property width 100%. + */ + fullWidth: _react.PropTypes.bool, + /** + * Override the inline-styles of the TextField's hint text element. + */ + hintStyle: _react.PropTypes.object, + /** + * The hint content to display. + */ + hintText: _react.PropTypes.node, + /** + * The id prop for the text field. + */ + id: _react.PropTypes.string, + /** + * Override the inline-styles of the TextField's input element. + * When multiLine is false: define the style of the input element. + * When multiLine is true: define the style of the container of the textarea. + */ + inputStyle: _react.PropTypes.object, + /** + * If true, a textarea element will be rendered. + * The textarea also grows and shrinks according to the number of lines. + */ + multiLine: _react.PropTypes.bool, + /** + * Name applied to the input. + */ + name: _react.PropTypes.string, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function that is fired when the textfield's value changes. + * + * @param {object} event Change event targeting the text field. + * @param {string} newValue The new value of the text field. + */ + onChange: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Number of rows to display when multiLine option is set to true. + */ + rows: _react.PropTypes.number, + /** + * Maximum number of rows to display when + * multiLine option is set to true. + */ + rowsMax: _react.PropTypes.number, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of the TextField's textarea element. + * The TextField use either a textarea or an input, + * this property has effects only when multiLine is true. + */ + textareaStyle: _react.PropTypes.object, + /** + * Specifies the type of input to display + * such as "password" or "text". + */ + type: _react.PropTypes.string, + /** + * Override the inline-styles of the + * TextField's underline element when disabled. + */ + underlineDisabledStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the TextField's + * underline element when focussed. + */ + underlineFocusStyle: _react.PropTypes.object, + /** + * If true, shows the underline for the text field. + */ + underlineShow: _react.PropTypes.bool, + /** + * Override the inline-styles of the TextField's underline element. + */ + underlineStyle: _react.PropTypes.object, + /** + * The value of the text field. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = TextField; + +/***/ }), +/* 752 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(39); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var rowsHeight = 24; + +function getStyles(props, context, state) { + return { + root: { + position: 'relative' }, + textarea: { + height: state.height, + width: '100%', + resize: 'none', + font: 'inherit', + padding: 0, + cursor: 'inherit' + }, + shadow: { + resize: 'none', + // Overflow also needed to here to remove the extra row + // added to textareas in Firefox. + overflow: 'hidden', + // Visibility needed to hide the extra text area on ipads + visibility: 'hidden', + position: 'absolute', + height: 'initial' + } + }; +} + +var EnhancedTextarea = function (_Component) { + (0, _inherits3.default)(EnhancedTextarea, _Component); + + function EnhancedTextarea() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, EnhancedTextarea); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedTextarea.__proto__ || (0, _getPrototypeOf2.default)(EnhancedTextarea)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + height: null + }, _this.handleResize = function (event) { + _this.syncHeightWithShadow(undefined, event); + }, _this.handleChange = function (event) { + _this.syncHeightWithShadow(event.target.value); + + if (_this.props.hasOwnProperty('valueLink')) { + _this.props.valueLink.requestChange(event.target.value); + } + + if (_this.props.onChange) { + _this.props.onChange(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(EnhancedTextarea, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + height: this.props.rows * rowsHeight + }); + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + this.syncHeightWithShadow(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== this.props.value) { + this.syncHeightWithShadow(nextProps.value); + } + } + }, { + key: 'getInputNode', + value: function getInputNode() { + return this.refs.input; + } + }, { + key: 'setValue', + value: function setValue(value) { + this.getInputNode().value = value; + this.syncHeightWithShadow(value); + } + }, { + key: 'syncHeightWithShadow', + value: function syncHeightWithShadow(newValue, event) { + var shadow = this.refs.shadow; + + if (newValue !== undefined) { + shadow.value = newValue; + } + + var newHeight = shadow.scrollHeight; + + // Guarding for jsdom, where scrollHeight isn't present. + // See https://github.com/tmpvar/jsdom/issues/1013 + if (newHeight === undefined) return; + + if (this.props.rowsMax >= this.props.rows) { + newHeight = Math.min(this.props.rowsMax * rowsHeight, newHeight); + } + + newHeight = Math.max(newHeight, rowsHeight); + + if (this.state.height !== newHeight) { + this.setState({ + height: newHeight + }); + + if (this.props.onHeightChange) { + this.props.onHeightChange(event, newHeight); + } + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + onChange = _props.onChange, + onHeightChange = _props.onHeightChange, + rows = _props.rows, + rowsMax = _props.rowsMax, + shadowStyle = _props.shadowStyle, + style = _props.style, + textareaStyle = _props.textareaStyle, + valueLink = _props.valueLink, + other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'onHeightChange', 'rows', 'rowsMax', 'shadowStyle', 'style', 'textareaStyle', 'valueLink']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var rootStyles = (0, _simpleAssign2.default)(styles.root, style); + var textareaStyles = (0, _simpleAssign2.default)(styles.textarea, textareaStyle); + var shadowStyles = (0, _simpleAssign2.default)({}, textareaStyles, styles.shadow, shadowStyle); + + if (this.props.hasOwnProperty('valueLink')) { + other.value = this.props.valueLink.value; + } + + return _react2.default.createElement( + 'div', + { style: prepareStyles(rootStyles) }, + _react2.default.createElement(_reactEventListener2.default, { target: 'window', onResize: this.handleResize }), + _react2.default.createElement('textarea', { + ref: 'shadow', + style: prepareStyles(shadowStyles), + tabIndex: '-1', + rows: this.props.rows, + defaultValue: this.props.defaultValue, + readOnly: true, + value: this.props.value, + valueLink: this.props.valueLink + }), + _react2.default.createElement('textarea', (0, _extends3.default)({}, other, { + ref: 'input', + rows: this.props.rows, + style: prepareStyles(textareaStyles), + onChange: this.handleChange + })) + ); + } + }]); + return EnhancedTextarea; +}(_react.Component); + +EnhancedTextarea.defaultProps = { + rows: 1 +}; +EnhancedTextarea.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? EnhancedTextarea.propTypes = { + defaultValue: _react.PropTypes.any, + disabled: _react.PropTypes.bool, + onChange: _react.PropTypes.func, + onHeightChange: _react.PropTypes.func, + rows: _react.PropTypes.number, + rowsMax: _react.PropTypes.number, + shadowStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + textareaStyle: _react.PropTypes.object, + value: _react.PropTypes.string, + valueLink: _react.PropTypes.object +} : void 0; +exports.default = EnhancedTextarea; + +/***/ }), +/* 753 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props) { + var hintColor = props.muiTheme.textField.hintColor, + show = props.show; + + + return { + root: { + position: 'absolute', + opacity: show ? 1 : 0, + color: hintColor, + transition: _transitions2.default.easeOut(), + bottom: 12 + } + }; +} + +var TextFieldHint = function TextFieldHint(props) { + var prepareStyles = props.muiTheme.prepareStyles, + style = props.style, + text = props.text; + + + var styles = getStyles(props); + + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + text + ); +}; + + false ? TextFieldHint.propTypes = { + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * True if the hint text should be visible. + */ + show: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The hint text displayed. + */ + text: _react.PropTypes.node +} : void 0; + +TextFieldHint.defaultProps = { + show: true +}; + +exports.default = TextFieldHint; + +/***/ }), +/* 754 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props) { + var defaultStyles = { + position: 'absolute', + lineHeight: '22px', + top: 38, + transition: _transitions2.default.easeOut(), + zIndex: 1, // Needed to display label above Chrome's autocomplete field background + transform: 'scale(1) translate(0, 0)', + transformOrigin: 'left top', + pointerEvents: 'auto', + userSelect: 'none' + }; + + var shrinkStyles = props.shrink ? (0, _simpleAssign2.default)({ + transform: 'scale(0.75) translate(0, -28px)', + pointerEvents: 'none' + }, props.shrinkStyle) : null; + + return { + root: (0, _simpleAssign2.default)(defaultStyles, props.style, shrinkStyles) + }; +} + +var TextFieldLabel = function TextFieldLabel(props) { + var muiTheme = props.muiTheme, + className = props.className, + children = props.children, + htmlFor = props.htmlFor, + onTouchTap = props.onTouchTap; + var prepareStyles = muiTheme.prepareStyles; + + var styles = getStyles(props); + + return _react2.default.createElement( + 'label', + { + className: className, + style: prepareStyles(styles.root), + htmlFor: htmlFor, + onTouchTap: onTouchTap + }, + children + ); +}; + + false ? TextFieldLabel.propTypes = { + /** + * The label contents. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Disables the label if set to true. + */ + disabled: _react.PropTypes.bool, + /** + * The id of the target element that this label should refer to. + */ + htmlFor: _react.PropTypes.string, + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * Callback function for when the label is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the text field label. + */ + onTouchTap: _react.PropTypes.func, + /** + * True if the floating label should shrink. + */ + shrink: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element when shrunk. + */ + shrinkStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +TextFieldLabel.defaultProps = { + disabled: false, + shrink: false +}; + +exports.default = TextFieldLabel; + +/***/ }), +/* 755 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var propTypes = { + /** + * True if the parent `TextField` is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` is disabled. + */ + disabledStyle: _react.PropTypes.object, + /** + * True if the parent `TextField` has an error. + */ + error: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` has an error. + */ + errorStyle: _react.PropTypes.object, + /** + * True if the parent `TextField` is focused. + */ + focus: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` is focused. + */ + focusStyle: _react.PropTypes.object, + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +}; + +var defaultProps = { + disabled: false, + disabledStyle: {}, + error: false, + errorStyle: {}, + focus: false, + focusStyle: {}, + style: {} +}; + +var TextFieldUnderline = function TextFieldUnderline(props) { + var disabled = props.disabled, + disabledStyle = props.disabledStyle, + error = props.error, + errorStyle = props.errorStyle, + focus = props.focus, + focusStyle = props.focusStyle, + muiTheme = props.muiTheme, + style = props.style; + var errorStyleColor = errorStyle.color; + var prepareStyles = muiTheme.prepareStyles, + _muiTheme$textField = muiTheme.textField, + borderColor = _muiTheme$textField.borderColor, + disabledTextColor = _muiTheme$textField.disabledTextColor, + errorColor = _muiTheme$textField.errorColor, + focusColor = _muiTheme$textField.focusColor; + + + var styles = { + root: { + borderTop: 'none', + borderLeft: 'none', + borderRight: 'none', + borderBottom: 'solid 1px', + borderColor: borderColor, + bottom: 8, + boxSizing: 'content-box', + margin: 0, + position: 'absolute', + width: '100%' + }, + disabled: { + borderBottom: 'dotted 2px', + borderColor: disabledTextColor + }, + focus: { + borderBottom: 'solid 2px', + borderColor: focusColor, + transform: 'scaleX(0)', + transition: _transitions2.default.easeOut() + }, + error: { + borderColor: errorStyleColor ? errorStyleColor : errorColor, + transform: 'scaleX(1)' + } + }; + + var underline = (0, _simpleAssign2.default)({}, styles.root, style); + var focusedUnderline = (0, _simpleAssign2.default)({}, underline, styles.focus, focusStyle); + + if (disabled) underline = (0, _simpleAssign2.default)({}, underline, styles.disabled, disabledStyle); + if (focus) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, { transform: 'scaleX(1)' }); + if (error) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, styles.error); + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement('hr', { style: prepareStyles(underline) }), + _react2.default.createElement('hr', { style: prepareStyles(focusedUnderline) }) + ); +}; + + false ? TextFieldUnderline.propTypes = propTypes : void 0; +TextFieldUnderline.defaultProps = defaultProps; + +exports.default = TextFieldUnderline; + +/***/ }), +/* 756 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.MenuItem = exports.Menu = undefined; + +var _Menu2 = __webpack_require__(203); + +var _Menu3 = _interopRequireDefault(_Menu2); + +var _MenuItem2 = __webpack_require__(129); + +var _MenuItem3 = _interopRequireDefault(_MenuItem2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.Menu = _Menu3.default; +exports.MenuItem = _MenuItem3.default; +exports.default = _Menu3.default; + +/***/ }), +/* 757 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Divider = __webpack_require__(758); + +var _Divider2 = _interopRequireDefault(_Divider); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Divider2.default; + +/***/ }), +/* 758 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Divider = function Divider(props, context) { + var inset = props.inset, + style = props.style, + other = (0, _objectWithoutProperties3.default)(props, ['inset', 'style']); + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + prepareStyles = _context$muiTheme.prepareStyles; + + + var styles = { + root: { + margin: 0, + marginTop: -1, + marginLeft: inset ? 72 : 0, + height: 1, + border: 'none', + backgroundColor: baseTheme.palette.borderColor + } + }; + + return _react2.default.createElement('hr', (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) })); +}; + +Divider.muiName = 'Divider'; + + false ? Divider.propTypes = { + /** + * If true, the `Divider` will be indented. + */ + inset: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +Divider.defaultProps = { + inset: false +}; + +Divider.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +exports.default = Divider; + +/***/ }), +/* 759 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _Checkbox = __webpack_require__(205); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +var _createComponent = __webpack_require__(40); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_Checkbox2.default, function (_ref) { + var _ref$input = _ref.input, + onChange = _ref$input.onChange, + value = _ref$input.value, + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']), + meta = _ref.meta, + _onCheck = _ref.onCheck, + defaultChecked = _ref.defaultChecked, + props = _objectWithoutProperties(_ref, ['input', 'meta', 'onCheck', 'defaultChecked']); + + return _extends({}, inputProps, props, { + checked: value ? true : false, + onCheck: function onCheck(event, isInputChecked) { + onChange(isInputChecked); + if (_onCheck) { + _onCheck(isInputChecked); + } + } + }); +}); + +/***/ }), +/* 760 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _EnhancedSwitch = __webpack_require__(206); + +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _checkBoxOutlineBlank = __webpack_require__(761); + +var _checkBoxOutlineBlank2 = _interopRequireDefault(_checkBoxOutlineBlank); + +var _checkBox = __webpack_require__(762); + +var _checkBox2 = _interopRequireDefault(_checkBox); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var checkbox = context.muiTheme.checkbox; + + var checkboxSize = 24; + + return { + icon: { + height: checkboxSize, + width: checkboxSize + }, + check: { + position: 'absolute', + opacity: 0, + transform: 'scale(0)', + transitionOrigin: '50% 50%', + transition: _transitions2.default.easeOut('450ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('0ms', 'transform', '450ms'), + fill: checkbox.checkedColor + }, + checkWhenSwitched: { + opacity: 1, + transform: 'scale(1)', + transition: _transitions2.default.easeOut('0ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('800ms', 'transform', '0ms') + }, + checkWhenDisabled: { + fill: checkbox.disabledColor + }, + box: { + position: 'absolute', + opacity: 1, + fill: checkbox.boxColor, + transition: _transitions2.default.easeOut('1000ms', 'opacity', '200ms') + }, + boxWhenSwitched: { + opacity: 0, + transition: _transitions2.default.easeOut('650ms', 'opacity', '150ms'), + fill: checkbox.checkedColor + }, + boxWhenDisabled: { + fill: props.checked ? 'transparent' : checkbox.disabledColor + }, + label: { + color: props.disabled ? checkbox.labelDisabledColor : checkbox.labelColor + } + }; +} + +var Checkbox = function (_Component) { + (0, _inherits3.default)(Checkbox, _Component); + + function Checkbox() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Checkbox); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Checkbox.__proto__ || (0, _getPrototypeOf2.default)(Checkbox)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + switched: false + }, _this.handleStateChange = function (newSwitched) { + _this.setState({ + switched: newSwitched + }); + }, _this.handleCheck = function (event, isInputChecked) { + if (_this.props.onCheck) { + _this.props.onCheck(event, isInputChecked); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Checkbox, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + checked = _props.checked, + defaultChecked = _props.defaultChecked, + valueLink = _props.valueLink; + + + if (checked || defaultChecked || valueLink && valueLink.value) { + this.setState({ + switched: true + }); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.checked !== nextProps.checked) { + this.setState({ + switched: nextProps.checked + }); + } + } + }, { + key: 'isChecked', + value: function isChecked() { + return this.refs.enhancedSwitch.isSwitched(); + } + }, { + key: 'setChecked', + value: function setChecked(newCheckedValue) { + this.refs.enhancedSwitch.setSwitched(newCheckedValue); + } + }, { + key: 'render', + value: function render() { + var _props2 = this.props, + iconStyle = _props2.iconStyle, + onCheck = _props2.onCheck, + checkedIcon = _props2.checkedIcon, + uncheckedIcon = _props2.uncheckedIcon, + other = (0, _objectWithoutProperties3.default)(_props2, ['iconStyle', 'onCheck', 'checkedIcon', 'uncheckedIcon']); + + var styles = getStyles(this.props, this.context); + var boxStyles = (0, _simpleAssign2.default)(styles.box, this.state.switched && styles.boxWhenSwitched, iconStyle, this.props.disabled && styles.boxWhenDisabled); + var checkStyles = (0, _simpleAssign2.default)(styles.check, this.state.switched && styles.checkWhenSwitched, iconStyle, this.props.disabled && styles.checkWhenDisabled); + + var checkedElement = checkedIcon ? _react2.default.cloneElement(checkedIcon, { + style: (0, _simpleAssign2.default)(checkStyles, checkedIcon.props.style) + }) : _react2.default.createElement(_checkBox2.default, { + style: checkStyles + }); + + var unCheckedElement = uncheckedIcon ? _react2.default.cloneElement(uncheckedIcon, { + style: (0, _simpleAssign2.default)(boxStyles, uncheckedIcon.props.style) + }) : _react2.default.createElement(_checkBoxOutlineBlank2.default, { + style: boxStyles + }); + + var checkboxElement = _react2.default.createElement( + 'div', + null, + unCheckedElement, + checkedElement + ); + + var rippleColor = this.state.switched ? checkStyles.fill : boxStyles.fill; + var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle); + + var labelStyle = (0, _simpleAssign2.default)(styles.label, this.props.labelStyle); + + var enhancedSwitchProps = { + ref: 'enhancedSwitch', + inputType: 'checkbox', + switched: this.state.switched, + switchElement: checkboxElement, + rippleColor: rippleColor, + iconStyle: mergedIconStyle, + onSwitch: this.handleCheck, + labelStyle: labelStyle, + onParentShouldUpdate: this.handleStateChange, + labelPosition: this.props.labelPosition + }; + + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps)); + } + }]); + return Checkbox; +}(_react.Component); + +Checkbox.defaultProps = { + labelPosition: 'right', + disabled: false +}; +Checkbox.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Checkbox.propTypes = { + /** + * Checkbox is checked if true. + */ + checked: _react.PropTypes.bool, + /** + * The SvgIcon to use for the checked state. + * This is useful to create icon toggles. + */ + checkedIcon: _react.PropTypes.element, + /** + * The default state of our checkbox component. + * **Warning:** This cannot be used in conjunction with `checked`. + * Decide between using a controlled or uncontrolled input element and remove one of these props. + * More info: https://fb.me/react-controlled-components + */ + defaultChecked: _react.PropTypes.bool, + /** + * Disabled if true. + */ + disabled: _react.PropTypes.bool, + /** + * Overrides the inline-styles of the icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Overrides the inline-styles of the input element. + */ + inputStyle: _react.PropTypes.object, + /** + * Where the label will be placed next to the checkbox. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * Overrides the inline-styles of the Checkbox element label. + */ + labelStyle: _react.PropTypes.object, + /** + * Callback function that is fired when the checkbox is checked. + * + * @param {object} event `change` event targeting the underlying checkbox `input`. + * @param {boolean} isInputChecked The `checked` value of the underlying checkbox `input`. + */ + onCheck: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The SvgIcon to use for the unchecked state. + * This is useful to create icon toggles. + */ + uncheckedIcon: _react.PropTypes.element, + /** + * ValueLink for when using controlled checkbox. + */ + valueLink: _react.PropTypes.object +} : void 0; +exports.default = Checkbox; + +/***/ }), +/* 761 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ToggleCheckBoxOutlineBlank = function ToggleCheckBoxOutlineBlank(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z' }) + ); +}; +ToggleCheckBoxOutlineBlank = (0, _pure2.default)(ToggleCheckBoxOutlineBlank); +ToggleCheckBoxOutlineBlank.displayName = 'ToggleCheckBoxOutlineBlank'; +ToggleCheckBoxOutlineBlank.muiName = 'SvgIcon'; + +exports.default = ToggleCheckBoxOutlineBlank; + +/***/ }), +/* 762 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ToggleCheckBox = function ToggleCheckBox(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z' }) + ); +}; +ToggleCheckBox = (0, _pure2.default)(ToggleCheckBox); +ToggleCheckBox.displayName = 'ToggleCheckBox'; +ToggleCheckBox.muiName = 'SvgIcon'; + +exports.default = ToggleCheckBox; + +/***/ }), +/* 763 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _DatePicker = __webpack_require__(764); + +var _DatePicker2 = _interopRequireDefault(_DatePicker); + +var _createComponent = __webpack_require__(40); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(63); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_DatePicker2.default, function (_ref) { + var _ref$input = _ref.input, + onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onBlur']), + defaultDate = _ref.defaultDate, + _onChange = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'defaultDate', 'onChange']); + + return _extends({}, inputProps, (0, _mapError2.default)(props), { + onChange: function onChange(event, value) { + inputProps.onChange(value); + if (_onChange) { + _onChange(value); + } + } + }); +}); + +/***/ }), +/* 764 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _DatePicker = __webpack_require__(765); + +var _DatePicker2 = _interopRequireDefault(_DatePicker); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _DatePicker2.default; + +/***/ }), +/* 765 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _dateUtils = __webpack_require__(83); + +var _DatePickerDialog = __webpack_require__(766); + +var _DatePickerDialog2 = _interopRequireDefault(_DatePickerDialog); + +var _TextField = __webpack_require__(97); + +var _TextField2 = _interopRequireDefault(_TextField); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DatePicker = function (_Component) { + (0, _inherits3.default)(DatePicker, _Component); + + function DatePicker() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DatePicker); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePicker.__proto__ || (0, _getPrototypeOf2.default)(DatePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + date: undefined + }, _this.handleAccept = function (date) { + if (!_this.isControlled()) { + _this.setState({ + date: date + }); + } + if (_this.props.onChange) { + _this.props.onChange(null, date); + } + }, _this.handleFocus = function (event) { + event.target.blur(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + + if (!_this.props.disabled) { + setTimeout(function () { + _this.openDialog(); + }, 0); + } + }, _this.formatDate = function (date) { + if (_this.props.locale) { + var DateTimeFormat = _this.props.DateTimeFormat || _dateUtils.dateTimeFormat; + return new DateTimeFormat(_this.props.locale, { + day: 'numeric', + month: 'numeric', + year: 'numeric' + }).format(date); + } else { + return (0, _dateUtils.formatIso)(date); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DatePicker, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + date: this.isControlled() ? this.getControlledDate() : this.props.defaultDate + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.isControlled()) { + var newDate = this.getControlledDate(nextProps); + if (!(0, _dateUtils.isEqualDate)(this.state.date, newDate)) { + this.setState({ + date: newDate + }); + } + } + } + }, { + key: 'getDate', + value: function getDate() { + return this.state.date; + } + + /** + * Open the date-picker dialog programmatically from a parent. + */ + + }, { + key: 'openDialog', + value: function openDialog() { + /** + * if the date is not selected then set it to new date + * (get the current system date while doing so) + * else set it to the currently selected date + */ + if (this.state.date !== undefined) { + this.setState({ + dialogDate: this.getDate() + }, this.refs.dialogWindow.show); + } else { + this.setState({ + dialogDate: new Date() + }, this.refs.dialogWindow.show); + } + } + + /** + * Alias for `openDialog()` for an api consistent with TextField. + */ + + }, { + key: 'focus', + value: function focus() { + this.openDialog(); + } + }, { + key: 'isControlled', + value: function isControlled() { + return this.props.hasOwnProperty('value'); + } + }, { + key: 'getControlledDate', + value: function getControlledDate() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; + + if (props.value instanceof Date) { + return props.value; + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + autoOk = _props.autoOk, + cancelLabel = _props.cancelLabel, + className = _props.className, + container = _props.container, + defaultDate = _props.defaultDate, + dialogContainerStyle = _props.dialogContainerStyle, + disableYearSelection = _props.disableYearSelection, + firstDayOfWeek = _props.firstDayOfWeek, + formatDateProp = _props.formatDate, + locale = _props.locale, + maxDate = _props.maxDate, + minDate = _props.minDate, + mode = _props.mode, + okLabel = _props.okLabel, + onDismiss = _props.onDismiss, + onFocus = _props.onFocus, + onShow = _props.onShow, + onTouchTap = _props.onTouchTap, + shouldDisableDate = _props.shouldDisableDate, + style = _props.style, + textFieldStyle = _props.textFieldStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'className', 'container', 'defaultDate', 'dialogContainerStyle', 'disableYearSelection', 'firstDayOfWeek', 'formatDate', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onDismiss', 'onFocus', 'onShow', 'onTouchTap', 'shouldDisableDate', 'style', 'textFieldStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var formatDate = formatDateProp || this.formatDate; + + return _react2.default.createElement( + 'div', + { className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + onFocus: this.handleFocus, + onTouchTap: this.handleTouchTap, + ref: 'input', + style: textFieldStyle, + value: this.state.date ? formatDate(this.state.date) : '' + })), + _react2.default.createElement(_DatePickerDialog2.default, { + DateTimeFormat: DateTimeFormat, + autoOk: autoOk, + cancelLabel: cancelLabel, + container: container, + containerStyle: dialogContainerStyle, + disableYearSelection: disableYearSelection, + firstDayOfWeek: firstDayOfWeek, + initialDate: this.state.dialogDate, + locale: locale, + maxDate: maxDate, + minDate: minDate, + mode: mode, + okLabel: okLabel, + onAccept: this.handleAccept, + onShow: onShow, + onDismiss: onDismiss, + ref: 'dialogWindow', + shouldDisableDate: shouldDisableDate + }) + ); + } + }]); + return DatePicker; +}(_react.Component); + +DatePicker.defaultProps = { + autoOk: false, + container: 'dialog', + disabled: false, + disableYearSelection: false, + firstDayOfWeek: 1, + style: {} +}; +DatePicker.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DatePicker.propTypes = { + /** + * Constructor for date formatting for the specified `locale`. + * The constructor must follow this specification: ECMAScript Internationalization API 1.0 (ECMA-402). + * `Intl.DateTimeFormat` is supported by most modern browsers, see http://caniuse.com/#search=intl, + * otherwise https://github.com/andyearnshaw/Intl.js is a good polyfill. + * + * By default, a built-in `DateTimeFormat` is used which supports the 'en-US' `locale`. + */ + DateTimeFormat: _react.PropTypes.func, + /** + * If true, automatically accept and close the picker on select a date. + */ + autoOk: _react.PropTypes.bool, + /** + * Override the default text of the 'Cancel' button. + */ + cancelLabel: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Used to control how the Date Picker will be displayed when the input field is focused. + * `dialog` (default) displays the DatePicker as a dialog with a modal. + * `inline` displays the DatePicker below the input field (similar to auto complete). + */ + container: _react.PropTypes.oneOf(['dialog', 'inline']), + /** + * This is the initial date value of the component. + * If either `value` or `valueLink` is provided they will override this + * prop with `value` taking precedence. + */ + defaultDate: _react.PropTypes.object, + /** + * Override the inline-styles of DatePickerDialog's Container element. + */ + dialogContainerStyle: _react.PropTypes.object, + /** + * Disables the year selection in the date picker. + */ + disableYearSelection: _react.PropTypes.bool, + /** + * Disables the DatePicker. + */ + disabled: _react.PropTypes.bool, + /** + * Used to change the first day of week. It varies from + * Saturday to Monday between different locales. + * The allowed range is 0 (Sunday) to 6 (Saturday). + * The default is `1`, Monday, as per ISO 8601. + */ + firstDayOfWeek: _react.PropTypes.number, + /** + * This function is called to format the date displayed in the input field, and should return a string. + * By default if no `locale` and `DateTimeFormat` is provided date objects are formatted to ISO 8601 YYYY-MM-DD. + * + * @param {object} date Date object to be formatted. + * @returns {any} The formatted date. + */ + formatDate: _react.PropTypes.func, + /** + * Locale used for formatting the `DatePicker` date strings. Other than for 'en-US', you + * must provide a `DateTimeFormat` that supports the chosen `locale`. + */ + locale: _react.PropTypes.string, + /** + * The ending of a range of valid dates. The range includes the endDate. + * The default value is current date + 100 years. + */ + maxDate: _react.PropTypes.object, + /** + * The beginning of a range of valid dates. The range includes the startDate. + * The default value is current date - 100 years. + */ + minDate: _react.PropTypes.object, + /** + * Tells the component to display the picker in portrait or landscape mode. + */ + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + /** + * Override the default text of the 'OK' button. + */ + okLabel: _react.PropTypes.node, + /** + * Callback function that is fired when the date value changes. + * + * @param {null} null Since there is no particular event associated with the change, + * the first argument will always be null. + * @param {object} date The new date. + */ + onChange: _react.PropTypes.func, + /** + * Callback function that is fired when the Date Picker's dialog is dismissed. + */ + onDismiss: _react.PropTypes.func, + /** + * Callback function that is fired when the Date Picker's `TextField` gains focus. + */ + onFocus: _react.PropTypes.func, + /** + * Callback function that is fired when the Date Picker's dialog is shown. + */ + onShow: _react.PropTypes.func, + /** + * Callback function that is fired when a touch tap event occurs on the Date Picker's `TextField`. + * + * @param {object} event TouchTap event targeting the `TextField`. + */ + onTouchTap: _react.PropTypes.func, + /** + * Callback function used to determine if a day's entry should be disabled on the calendar. + * + * @param {object} day Date object of a day. + * @returns {boolean} Indicates whether the day should be disabled. + */ + shouldDisableDate: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of DatePicker's TextField element. + */ + textFieldStyle: _react.PropTypes.object, + /** + * Sets the date for the Date Picker programmatically. + */ + value: _react.PropTypes.object +} : void 0; +exports.default = DatePicker; + +/***/ }), +/* 766 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(39); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(27); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _Calendar = __webpack_require__(767); + +var _Calendar2 = _interopRequireDefault(_Calendar); + +var _Dialog = __webpack_require__(208); + +var _Dialog2 = _interopRequireDefault(_Dialog); + +var _Popover = __webpack_require__(130); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _PopoverAnimationVertical = __webpack_require__(326); + +var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical); + +var _dateUtils = __webpack_require__(83); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DatePickerDialog = function (_Component) { + (0, _inherits3.default)(DatePickerDialog, _Component); + + function DatePickerDialog() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DatePickerDialog); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(DatePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.show = function () { + if (_this.props.onShow && !_this.state.open) { + _this.props.onShow(); + } + + _this.setState({ + open: true + }); + }, _this.dismiss = function () { + if (_this.props.onDismiss && _this.state.open) { + _this.props.onDismiss(); + } + + _this.setState({ + open: false + }); + }, _this.handleTouchTapDay = function () { + if (_this.props.autoOk) { + setTimeout(_this.handleTouchTapOk, 300); + } + }, _this.handleTouchTapCancel = function () { + _this.dismiss(); + }, _this.handleRequestClose = function () { + _this.dismiss(); + }, _this.handleTouchTapOk = function () { + if (_this.props.onAccept && !_this.refs.calendar.isSelectedDateDisabled()) { + _this.props.onAccept(_this.refs.calendar.getSelectedDate()); + } + + _this.setState({ + open: false + }); + }, _this.handleWindowKeyUp = function (event) { + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.handleTouchTapOk(); + break; + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DatePickerDialog, [{ + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + autoOk = _props.autoOk, + cancelLabel = _props.cancelLabel, + container = _props.container, + containerStyle = _props.containerStyle, + disableYearSelection = _props.disableYearSelection, + initialDate = _props.initialDate, + firstDayOfWeek = _props.firstDayOfWeek, + locale = _props.locale, + maxDate = _props.maxDate, + minDate = _props.minDate, + mode = _props.mode, + okLabel = _props.okLabel, + onAccept = _props.onAccept, + onDismiss = _props.onDismiss, + onShow = _props.onShow, + shouldDisableDate = _props.shouldDisableDate, + style = _props.style, + animation = _props.animation, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'container', 'containerStyle', 'disableYearSelection', 'initialDate', 'firstDayOfWeek', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onAccept', 'onDismiss', 'onShow', 'shouldDisableDate', 'style', 'animation']); + var open = this.state.open; + + + var styles = { + dialogContent: { + width: mode === 'landscape' ? 479 : 310 + }, + dialogBodyContent: { + padding: 0, + minHeight: mode === 'landscape' ? 330 : 434, + minWidth: mode === 'landscape' ? 479 : 310 + } + }; + + var Container = container === 'inline' ? _Popover2.default : _Dialog2.default; + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { ref: 'root' }), + _react2.default.createElement( + Container, + { + anchorEl: this.refs.root // For Popover + , animation: animation || _PopoverAnimationVertical2.default // For Popover + , bodyStyle: styles.dialogBodyContent, + contentStyle: styles.dialogContent, + ref: 'dialog', + repositionOnUpdate: true, + open: open, + onRequestClose: this.handleRequestClose, + style: (0, _simpleAssign2.default)(styles.dialogBodyContent, containerStyle) + }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyUp: this.handleWindowKeyUp + }), + _react2.default.createElement(_Calendar2.default, { + autoOk: autoOk, + DateTimeFormat: DateTimeFormat, + cancelLabel: cancelLabel, + disableYearSelection: disableYearSelection, + firstDayOfWeek: firstDayOfWeek, + initialDate: initialDate, + locale: locale, + onTouchTapDay: this.handleTouchTapDay, + maxDate: maxDate, + minDate: minDate, + mode: mode, + open: open, + ref: 'calendar', + onTouchTapCancel: this.handleTouchTapCancel, + onTouchTapOk: this.handleTouchTapOk, + okLabel: okLabel, + shouldDisableDate: shouldDisableDate + }) + ) + ); + } + }]); + return DatePickerDialog; +}(_react.Component); + +DatePickerDialog.defaultProps = { + DateTimeFormat: _dateUtils.dateTimeFormat, + cancelLabel: 'Cancel', + container: 'dialog', + locale: 'en-US', + okLabel: 'OK' +}; +DatePickerDialog.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DatePickerDialog.propTypes = { + DateTimeFormat: _react.PropTypes.func, + animation: _react.PropTypes.func, + autoOk: _react.PropTypes.bool, + cancelLabel: _react.PropTypes.node, + container: _react.PropTypes.oneOf(['dialog', 'inline']), + containerStyle: _react.PropTypes.object, + disableYearSelection: _react.PropTypes.bool, + firstDayOfWeek: _react.PropTypes.number, + initialDate: _react.PropTypes.object, + locale: _react.PropTypes.string, + maxDate: _react.PropTypes.object, + minDate: _react.PropTypes.object, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + okLabel: _react.PropTypes.node, + onAccept: _react.PropTypes.func, + onDismiss: _react.PropTypes.func, + onShow: _react.PropTypes.func, + open: _react.PropTypes.bool, + shouldDisableDate: _react.PropTypes.func, + style: _react.PropTypes.object +} : void 0; +exports.default = DatePickerDialog; + +/***/ }), +/* 767 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _toConsumableArray2 = __webpack_require__(94); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(39); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(27); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _CalendarActionButtons = __webpack_require__(768); + +var _CalendarActionButtons2 = _interopRequireDefault(_CalendarActionButtons); + +var _CalendarMonth = __webpack_require__(771); + +var _CalendarMonth2 = _interopRequireDefault(_CalendarMonth); + +var _CalendarYear = __webpack_require__(773); + +var _CalendarYear2 = _interopRequireDefault(_CalendarYear); + +var _CalendarToolbar = __webpack_require__(775); + +var _CalendarToolbar2 = _interopRequireDefault(_CalendarToolbar); + +var _DateDisplay = __webpack_require__(779); + +var _DateDisplay2 = _interopRequireDefault(_DateDisplay); + +var _SlideIn = __webpack_require__(207); + +var _SlideIn2 = _interopRequireDefault(_SlideIn); + +var _dateUtils = __webpack_require__(83); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var daysArray = [].concat((0, _toConsumableArray3.default)(Array(7))); + +var Calendar = function (_Component) { + (0, _inherits3.default)(Calendar, _Component); + + function Calendar() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Calendar); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Calendar.__proto__ || (0, _getPrototypeOf2.default)(Calendar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + displayDate: undefined, + displayMonthDay: true, + selectedDate: undefined, + transitionDirection: 'left', + transitionEnter: true + }, _this.handleTouchTapDay = function (event, date) { + _this.setSelectedDate(date); + if (_this.props.onTouchTapDay) _this.props.onTouchTapDay(event, date); + }, _this.handleMonthChange = function (months) { + _this.setState({ + transitionDirection: months >= 0 ? 'left' : 'right', + displayDate: (0, _dateUtils.addMonths)(_this.state.displayDate, months) + }); + }, _this.handleTouchTapYear = function (event, year) { + var date = (0, _dateUtils.cloneDate)(_this.state.selectedDate); + date.setFullYear(year); + _this.setSelectedDate(date, event); + _this.handleTouchTapDateDisplayMonthDay(); + }, _this.handleTouchTapDateDisplayMonthDay = function () { + _this.setState({ + displayMonthDay: true + }); + }, _this.handleTouchTapDateDisplayYear = function () { + _this.setState({ + displayMonthDay: false + }); + }, _this.handleWindowKeyDown = function (event) { + if (_this.props.open) { + switch ((0, _keycode2.default)(event)) { + case 'up': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(-1); + } else if (event.shiftKey) { + _this.addSelectedMonths(-1); + } else { + _this.addSelectedDays(-7); + } + break; + + case 'down': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(1); + } else if (event.shiftKey) { + _this.addSelectedMonths(1); + } else { + _this.addSelectedDays(7); + } + break; + + case 'right': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(1); + } else if (event.shiftKey) { + _this.addSelectedMonths(1); + } else { + _this.addSelectedDays(1); + } + break; + + case 'left': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(-1); + } else if (event.shiftKey) { + _this.addSelectedMonths(-1); + } else { + _this.addSelectedDays(-1); + } + break; + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Calendar, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + displayDate: (0, _dateUtils.getFirstDayOfMonth)(this.props.initialDate), + selectedDate: this.props.initialDate + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.initialDate !== this.props.initialDate) { + var date = nextProps.initialDate || new Date(); + this.setState({ + displayDate: (0, _dateUtils.getFirstDayOfMonth)(date), + selectedDate: date + }); + } + } + }, { + key: 'getSelectedDate', + value: function getSelectedDate() { + return this.state.selectedDate; + } + }, { + key: 'isSelectedDateDisabled', + value: function isSelectedDateDisabled() { + if (!this.state.displayMonthDay) { + return false; + } + + return this.refs.calendar.isSelectedDateDisabled(); + } + }, { + key: 'addSelectedDays', + value: function addSelectedDays(days) { + this.setSelectedDate((0, _dateUtils.addDays)(this.state.selectedDate, days)); + } + }, { + key: 'addSelectedMonths', + value: function addSelectedMonths(months) { + this.setSelectedDate((0, _dateUtils.addMonths)(this.state.selectedDate, months)); + } + }, { + key: 'addSelectedYears', + value: function addSelectedYears(years) { + this.setSelectedDate((0, _dateUtils.addYears)(this.state.selectedDate, years)); + } + }, { + key: 'setDisplayDate', + value: function setDisplayDate(date, newSelectedDate) { + var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(date); + var direction = newDisplayDate > this.state.displayDate ? 'left' : 'right'; + + if (newDisplayDate !== this.state.displayDate) { + this.setState({ + displayDate: newDisplayDate, + transitionDirection: direction, + selectedDate: newSelectedDate || this.state.selectedDate + }); + } + } + }, { + key: 'setSelectedDate', + value: function setSelectedDate(date) { + var adjustedDate = date; + if ((0, _dateUtils.isBeforeDate)(date, this.props.minDate)) { + adjustedDate = this.props.minDate; + } else if ((0, _dateUtils.isAfterDate)(date, this.props.maxDate)) { + adjustedDate = this.props.maxDate; + } + + var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(adjustedDate); + if (newDisplayDate !== this.state.displayDate) { + this.setDisplayDate(newDisplayDate, adjustedDate); + } else { + this.setState({ + selectedDate: adjustedDate + }); + } + } + }, { + key: 'getToolbarInteractions', + value: function getToolbarInteractions() { + return { + prevMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.minDate) > 0, + nextMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.maxDate) < 0 + }; + } + }, { + key: 'yearSelector', + value: function yearSelector() { + if (!this.props.disableYearSelection) { + return _react2.default.createElement(_CalendarYear2.default, { + key: 'years', + DateTimeFormat: this.props.DateTimeFormat, + locale: this.props.locale, + onTouchTapYear: this.handleTouchTapYear, + selectedDate: this.state.selectedDate, + minDate: this.props.minDate, + maxDate: this.props.maxDate + }); + } + } + }, { + key: 'render', + value: function render() { + var prepareStyles = this.context.muiTheme.prepareStyles; + + var toolbarInteractions = this.getToolbarInteractions(); + var isLandscape = this.props.mode === 'landscape'; + var calendarTextColor = this.context.muiTheme.datePicker.calendarTextColor; + + + var styles = { + root: { + color: calendarTextColor, + userSelect: 'none', + width: isLandscape ? 479 : 310 + }, + calendar: { + display: 'flex', + flexDirection: 'column' + }, + calendarContainer: { + display: 'flex', + alignContent: 'space-between', + justifyContent: 'space-between', + flexDirection: 'column', + fontSize: 12, + fontWeight: 400, + padding: '0px 8px', + transition: _transitions2.default.easeOut() + }, + yearContainer: { + display: 'flex', + justifyContent: 'space-between', + flexDirection: 'column', + height: 272, + marginTop: 10, + overflow: 'hidden', + width: 310 + }, + weekTitle: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'space-between', + fontWeight: '500', + height: 20, + lineHeight: '15px', + opacity: '0.5', + textAlign: 'center' + }, + weekTitleDay: { + width: 42 + }, + transitionSlide: { + height: 214 + } + }; + + var weekTitleDayStyle = prepareStyles(styles.weekTitleDay); + + var _props = this.props, + minDate = _props.minDate, + maxDate = _props.maxDate, + cancelLabel = _props.cancelLabel, + DateTimeFormat = _props.DateTimeFormat, + firstDayOfWeek = _props.firstDayOfWeek, + locale = _props.locale, + okLabel = _props.okLabel, + onTouchTapCancel = _props.onTouchTapCancel, + onTouchTapOk = _props.onTouchTapOk; + + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyDown: this.handleWindowKeyDown + }), + _react2.default.createElement(_DateDisplay2.default, { + DateTimeFormat: DateTimeFormat, + disableYearSelection: this.props.disableYearSelection, + onTouchTapMonthDay: this.handleTouchTapDateDisplayMonthDay, + onTouchTapYear: this.handleTouchTapDateDisplayYear, + locale: locale, + monthDaySelected: this.state.displayMonthDay, + mode: this.props.mode, + selectedDate: this.state.selectedDate + }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.calendar) }, + this.state.displayMonthDay && _react2.default.createElement( + 'div', + { style: prepareStyles(styles.calendarContainer) }, + _react2.default.createElement(_CalendarToolbar2.default, { + DateTimeFormat: DateTimeFormat, + locale: locale, + displayDate: this.state.displayDate, + onMonthChange: this.handleMonthChange, + prevMonth: toolbarInteractions.prevMonth, + nextMonth: toolbarInteractions.nextMonth + }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.weekTitle) }, + daysArray.map(function (event, i) { + return _react2.default.createElement( + 'span', + { key: i, style: weekTitleDayStyle }, + (0, _dateUtils.localizedWeekday)(DateTimeFormat, locale, i, firstDayOfWeek) + ); + }) + ), + _react2.default.createElement( + _SlideIn2.default, + { direction: this.state.transitionDirection, style: styles.transitionSlide }, + _react2.default.createElement(_CalendarMonth2.default, { + DateTimeFormat: DateTimeFormat, + locale: locale, + displayDate: this.state.displayDate, + firstDayOfWeek: this.props.firstDayOfWeek, + key: this.state.displayDate.toDateString(), + minDate: minDate, + maxDate: maxDate, + onTouchTapDay: this.handleTouchTapDay, + ref: 'calendar', + selectedDate: this.state.selectedDate, + shouldDisableDate: this.props.shouldDisableDate + }) + ) + ), + !this.state.displayMonthDay && _react2.default.createElement( + 'div', + { style: prepareStyles(styles.yearContainer) }, + this.yearSelector() + ), + okLabel && _react2.default.createElement(_CalendarActionButtons2.default, { + autoOk: this.props.autoOk, + cancelLabel: cancelLabel, + okLabel: okLabel, + onTouchTapCancel: onTouchTapCancel, + onTouchTapOk: onTouchTapOk + }) + ) + ); + } + }]); + return Calendar; +}(_react.Component); + +Calendar.defaultProps = { + DateTimeFormat: _dateUtils.dateTimeFormat, + disableYearSelection: false, + initialDate: new Date(), + locale: 'en-US', + minDate: (0, _dateUtils.addYears)(new Date(), -100), + maxDate: (0, _dateUtils.addYears)(new Date(), 100) +}; +Calendar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Calendar.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + autoOk: _react.PropTypes.bool, + cancelLabel: _react.PropTypes.node, + disableYearSelection: _react.PropTypes.bool, + firstDayOfWeek: _react.PropTypes.number, + initialDate: _react.PropTypes.object, + locale: _react.PropTypes.string.isRequired, + maxDate: _react.PropTypes.object, + minDate: _react.PropTypes.object, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + okLabel: _react.PropTypes.node, + onTouchTapCancel: _react.PropTypes.func, + onTouchTapDay: _react.PropTypes.func, + onTouchTapOk: _react.PropTypes.func, + open: _react.PropTypes.bool, + shouldDisableDate: _react.PropTypes.func +} : void 0; +exports.default = Calendar; + +/***/ }), +/* 768 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _FlatButton = __webpack_require__(132); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CalendarActionButton = function (_Component) { + (0, _inherits3.default)(CalendarActionButton, _Component); + + function CalendarActionButton() { + (0, _classCallCheck3.default)(this, CalendarActionButton); + return (0, _possibleConstructorReturn3.default)(this, (CalendarActionButton.__proto__ || (0, _getPrototypeOf2.default)(CalendarActionButton)).apply(this, arguments)); + } + + (0, _createClass3.default)(CalendarActionButton, [{ + key: 'render', + value: function render() { + var _props = this.props, + cancelLabel = _props.cancelLabel, + okLabel = _props.okLabel; + + + var styles = { + root: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'flex-end', + margin: 0, + maxHeight: 48, + padding: 0 + }, + flatButtons: { + fontsize: 14, + margin: '4px 8px 8px 0px', + maxHeight: 36, + minWidth: 64, + padding: 0 + } + }; + + return _react2.default.createElement( + 'div', + { style: styles.root }, + _react2.default.createElement(_FlatButton2.default, { + label: cancelLabel, + onTouchTap: this.props.onTouchTapCancel, + primary: true, + style: styles.flatButtons + }), + !this.props.autoOk && _react2.default.createElement(_FlatButton2.default, { + disabled: this.refs.calendar !== undefined && this.refs.calendar.isSelectedDateDisabled(), + label: okLabel, + onTouchTap: this.props.onTouchTapOk, + primary: true, + style: styles.flatButtons + }) + ); + } + }]); + return CalendarActionButton; +}(_react.Component); + + false ? CalendarActionButton.propTypes = { + autoOk: _react.PropTypes.bool, + cancelLabel: _react.PropTypes.node, + okLabel: _react.PropTypes.node, + onTouchTapCancel: _react.PropTypes.func, + onTouchTapOk: _react.PropTypes.func +} : void 0; +exports.default = CalendarActionButton; + +/***/ }), +/* 769 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _childUtils = __webpack_require__(127); + +var _colorManipulator = __webpack_require__(58); + +var _EnhancedButton = __webpack_require__(61); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _FlatButtonLabel = __webpack_require__(770); + +var _FlatButtonLabel2 = _interopRequireDefault(_FlatButtonLabel); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validateLabel(props, propName, componentName) { + if (false) { + if (!props.children && props.label !== 0 && !props.label && !props.icon) { + return new Error('Required prop label or children or icon was not specified in ' + componentName + '.'); + } + } +} + +var FlatButton = function (_Component) { + (0, _inherits3.default)(FlatButton, _Component); + + function FlatButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, FlatButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FlatButton.__proto__ || (0, _getPrototypeOf2.default)(FlatButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + touch: false + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + _this.props.onKeyboardFocus(event, isKeyboardFocused); + }, _this.handleMouseEnter = function (event) { + // Cancel hover styles for touch devices + if (!_this.state.touch) _this.setState({ hovered: true }); + _this.props.onMouseEnter(event); + }, _this.handleMouseLeave = function (event) { + _this.setState({ hovered: false }); + _this.props.onMouseLeave(event); + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); + _this.props.onTouchStart(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(FlatButton, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.disabled) { + this.setState({ + hovered: false + }); + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + disabled = _props.disabled, + hoverColor = _props.hoverColor, + backgroundColor = _props.backgroundColor, + icon = _props.icon, + label = _props.label, + labelStyle = _props.labelStyle, + labelPosition = _props.labelPosition, + primary = _props.primary, + rippleColor = _props.rippleColor, + secondary = _props.secondary, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'disabled', 'hoverColor', 'backgroundColor', 'icon', 'label', 'labelStyle', 'labelPosition', 'primary', 'rippleColor', 'secondary', 'style']); + var _context$muiTheme = this.context.muiTheme, + _context$muiTheme$but = _context$muiTheme.button, + buttonHeight = _context$muiTheme$but.height, + buttonMinWidth = _context$muiTheme$but.minWidth, + buttonTextTransform = _context$muiTheme$but.textTransform, + _context$muiTheme$fla = _context$muiTheme.flatButton, + buttonFilterColor = _context$muiTheme$fla.buttonFilterColor, + buttonColor = _context$muiTheme$fla.color, + disabledTextColor = _context$muiTheme$fla.disabledTextColor, + fontSize = _context$muiTheme$fla.fontSize, + fontWeight = _context$muiTheme$fla.fontWeight, + primaryTextColor = _context$muiTheme$fla.primaryTextColor, + secondaryTextColor = _context$muiTheme$fla.secondaryTextColor, + textColor = _context$muiTheme$fla.textColor, + _context$muiTheme$fla2 = _context$muiTheme$fla.textTransform, + textTransform = _context$muiTheme$fla2 === undefined ? buttonTextTransform || 'uppercase' : _context$muiTheme$fla2; + + var defaultTextColor = disabled ? disabledTextColor : primary ? primaryTextColor : secondary ? secondaryTextColor : textColor; + + var defaultHoverColor = (0, _colorManipulator.fade)(buttonFilterColor, 0.2); + var defaultRippleColor = buttonFilterColor; + var buttonHoverColor = hoverColor || defaultHoverColor; + var buttonRippleColor = rippleColor || defaultRippleColor; + var buttonBackgroundColor = backgroundColor || buttonColor; + var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled; + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + height: buttonHeight, + lineHeight: buttonHeight + 'px', + minWidth: buttonMinWidth, + color: defaultTextColor, + transition: _transitions2.default.easeOut(), + borderRadius: 2, + userSelect: 'none', + overflow: 'hidden', + backgroundColor: hovered ? buttonHoverColor : buttonBackgroundColor, + padding: 0, + margin: 0, + textAlign: 'center' + }, style); + + var iconCloned = void 0; + var labelStyleIcon = {}; + + if (icon) { + var iconStyles = (0, _simpleAssign2.default)({ + verticalAlign: 'middle', + marginLeft: label && labelPosition !== 'before' ? 12 : 0, + marginRight: label && labelPosition === 'before' ? 12 : 0 + }, icon.props.style); + iconCloned = _react2.default.cloneElement(icon, { + color: icon.props.color || mergedRootStyles.color, + style: iconStyles + }); + + if (labelPosition === 'before') { + labelStyleIcon.paddingRight = 8; + } else { + labelStyleIcon.paddingLeft = 8; + } + } + + var mergedLabelStyles = (0, _simpleAssign2.default)({ + letterSpacing: 0, + textTransform: textTransform, + fontWeight: fontWeight, + fontSize: fontSize + }, labelStyleIcon, labelStyle); + + var labelElement = label ? _react2.default.createElement(_FlatButtonLabel2.default, { label: label, style: mergedLabelStyles }) : undefined; + + // Place label before or after children. + var childrenFragment = labelPosition === 'before' ? { + labelElement: labelElement, + iconCloned: iconCloned, + children: children + } : { + children: children, + iconCloned: iconCloned, + labelElement: labelElement + }; + + var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment); + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + disabled: disabled, + focusRippleColor: buttonRippleColor, + focusRippleOpacity: 0.3, + onKeyboardFocus: this.handleKeyboardFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onTouchStart: this.handleTouchStart, + style: mergedRootStyles, + touchRippleColor: buttonRippleColor, + touchRippleOpacity: 0.3 + }), + enhancedButtonChildren + ); + } + }]); + return FlatButton; +}(_react.Component); + +FlatButton.muiName = 'FlatButton'; +FlatButton.defaultProps = { + disabled: false, + labelStyle: {}, + labelPosition: 'after', + onKeyboardFocus: function onKeyboardFocus() {}, + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + onTouchStart: function onTouchStart() {}, + primary: false, + secondary: false +}; +FlatButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? FlatButton.propTypes = { + /** + * Color of button when mouse is not hovering over it. + */ + backgroundColor: _react.PropTypes.string, + /** + * This is what will be displayed inside the button. + * If a label is specified, the text within the label prop will + * be displayed. Otherwise, the component will expect children + * which will then be displayed. (In our example, + * we are nesting an `<input type="file" />` and a `span` + * that acts as our label to be displayed.) This only + * applies to flat and raised buttons. + */ + children: _react.PropTypes.node, + /** + * Disables the button if set to true. + */ + disabled: _react.PropTypes.bool, + /** + * Color of button when mouse hovers over. + */ + hoverColor: _react.PropTypes.string, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * Use this property to display an icon. + */ + icon: _react.PropTypes.node, + /** + * Label for the button. + */ + label: validateLabel, + /** + * Place label before or after the passed children. + */ + labelPosition: _react.PropTypes.oneOf(['before', 'after']), + /** + * Override the inline-styles of the button's label element. + */ + labelStyle: _react.PropTypes.object, + /** + * Callback function fired when the element is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the element. + * @param {boolean} isKeyboardFocused Indicates whether the element is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * If true, colors button according to + * primaryTextColor from the Theme. + */ + primary: _react.PropTypes.bool, + /** + * Color for the ripple after button is clicked. + */ + rippleColor: _react.PropTypes.string, + /** + * If true, colors button according to secondaryTextColor from the theme. + * The primary prop has precendent if set to true. + */ + secondary: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = FlatButton; + +/***/ }), +/* 770 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var baseTheme = context.muiTheme.baseTheme; + + + return { + root: { + position: 'relative', + paddingLeft: baseTheme.spacing.desktopGutterLess, + paddingRight: baseTheme.spacing.desktopGutterLess, + verticalAlign: 'middle' + } + }; +} + +var FlatButtonLabel = function (_Component) { + (0, _inherits3.default)(FlatButtonLabel, _Component); + + function FlatButtonLabel() { + (0, _classCallCheck3.default)(this, FlatButtonLabel); + return (0, _possibleConstructorReturn3.default)(this, (FlatButtonLabel.__proto__ || (0, _getPrototypeOf2.default)(FlatButtonLabel)).apply(this, arguments)); + } + + (0, _createClass3.default)(FlatButtonLabel, [{ + key: 'render', + value: function render() { + var _props = this.props, + label = _props.label, + style = _props.style; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + 'span', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + label + ); + } + }]); + return FlatButtonLabel; +}(_react.Component); + +FlatButtonLabel.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? FlatButtonLabel.propTypes = { + label: _react.PropTypes.node, + style: _react.PropTypes.object +} : void 0; +exports.default = FlatButtonLabel; + +/***/ }), +/* 771 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _dateUtils = __webpack_require__(83); + +var _DayButton = __webpack_require__(772); + +var _DayButton2 = _interopRequireDefault(_DayButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + root: { + display: 'flex', + flexDirection: 'column', + justifyContent: 'flex-start', + fontWeight: 400, + height: 228, + lineHeight: 2, + position: 'relative', + textAlign: 'center', + MozPaddingStart: 0 + }, + week: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'space-around', + height: 34, + marginBottom: 2 + } +}; + +var CalendarMonth = function (_Component) { + (0, _inherits3.default)(CalendarMonth, _Component); + + function CalendarMonth() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, CalendarMonth); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarMonth.__proto__ || (0, _getPrototypeOf2.default)(CalendarMonth)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapDay = function (event, date) { + if (_this.props.onTouchTapDay) { + _this.props.onTouchTapDay(event, date); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(CalendarMonth, [{ + key: 'isSelectedDateDisabled', + value: function isSelectedDateDisabled() { + return this.selectedDateDisabled; + } + }, { + key: 'shouldDisableDate', + value: function shouldDisableDate(day) { + if (day === null) return false; + var disabled = !(0, _dateUtils.isBetweenDates)(day, this.props.minDate, this.props.maxDate); + if (!disabled && this.props.shouldDisableDate) disabled = this.props.shouldDisableDate(day); + + return disabled; + } + }, { + key: 'getWeekElements', + value: function getWeekElements() { + var _this2 = this; + + var weekArray = (0, _dateUtils.getWeekArray)(this.props.displayDate, this.props.firstDayOfWeek); + + return weekArray.map(function (week, i) { + return _react2.default.createElement( + 'div', + { key: i, style: styles.week }, + _this2.getDayElements(week, i) + ); + }, this); + } + }, { + key: 'getDayElements', + value: function getDayElements(week, i) { + var _this3 = this; + + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + locale = _props.locale, + selectedDate = _props.selectedDate; + + + return week.map(function (day, j) { + var isSameDate = (0, _dateUtils.isEqualDate)(selectedDate, day); + var disabled = _this3.shouldDisableDate(day); + var selected = !disabled && isSameDate; + + if (isSameDate) { + _this3.selectedDateDisabled = disabled; + } + + return _react2.default.createElement(_DayButton2.default, { + DateTimeFormat: DateTimeFormat, + locale: locale, + date: day, + disabled: disabled, + key: 'db' + (i + j), + onTouchTap: _this3.handleTouchTapDay, + selected: selected + }); + }, this); + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement( + 'div', + { style: styles.root }, + this.getWeekElements() + ); + } + }]); + return CalendarMonth; +}(_react.Component); + + false ? CalendarMonth.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + autoOk: _react.PropTypes.bool, + displayDate: _react.PropTypes.object.isRequired, + firstDayOfWeek: _react.PropTypes.number, + locale: _react.PropTypes.string.isRequired, + maxDate: _react.PropTypes.object, + minDate: _react.PropTypes.object, + onTouchTapDay: _react.PropTypes.func, + selectedDate: _react.PropTypes.object.isRequired, + shouldDisableDate: _react.PropTypes.func +} : void 0; +exports.default = CalendarMonth; + +/***/ }), +/* 772 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _dateUtils = __webpack_require__(83); + +var _EnhancedButton = __webpack_require__(61); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var date = props.date, + disabled = props.disabled, + selected = props.selected; + var hover = state.hover; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + datePicker = _context$muiTheme.datePicker; + + + var labelColor = baseTheme.palette.textColor; + var buttonStateOpacity = 0; + var buttonStateTransform = 'scale(0)'; + + if (hover || selected) { + labelColor = datePicker.selectTextColor; + buttonStateOpacity = selected ? 1 : 0.6; + buttonStateTransform = 'scale(1)'; + } else if ((0, _dateUtils.isEqualDate)(date, new Date())) { + labelColor = datePicker.color; + } + + return { + root: { + boxSizing: 'border-box', + fontWeight: '400', + opacity: disabled && '0.4', + padding: '4px 0px', + position: 'relative', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + width: 42 + }, + label: { + color: labelColor, + fontWeight: '400', + position: 'relative' + }, + buttonState: { + backgroundColor: datePicker.selectColor, + borderRadius: '50%', + height: 34, + left: 4, + opacity: buttonStateOpacity, + position: 'absolute', + top: 0, + transform: buttonStateTransform, + transition: _transitions2.default.easeOut(), + width: 34 + } + }; +} + +var DayButton = function (_Component) { + (0, _inherits3.default)(DayButton, _Component); + + function DayButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DayButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DayButton.__proto__ || (0, _getPrototypeOf2.default)(DayButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hover: false + }, _this.handleMouseEnter = function () { + if (!_this.props.disabled) { + _this.setState({ hover: true }); + } + }, _this.handleMouseLeave = function () { + if (!_this.props.disabled) { + _this.setState({ hover: false }); + } + }, _this.handleTouchTap = function (event) { + if (!_this.props.disabled && _this.props.onTouchTap) { + _this.props.onTouchTap(event, _this.props.date); + } + }, _this.handleKeyboardFocus = function (event, keyboardFocused) { + if (!_this.props.disabled && _this.props.onKeyboardFocus) { + _this.props.onKeyboardFocus(event, keyboardFocused, _this.props.date); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DayButton, [{ + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + date = _props.date, + disabled = _props.disabled, + locale = _props.locale, + onTouchTap = _props.onTouchTap, + selected = _props.selected, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'date', 'disabled', 'locale', 'onTouchTap', 'selected']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return date ? _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + disabled: disabled, + disableFocusRipple: true, + disableTouchRipple: true, + onKeyboardFocus: this.handleKeyboardFocus, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onTouchTap: this.handleTouchTap, + style: styles.root + }), + _react2.default.createElement('div', { style: prepareStyles(styles.buttonState) }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + new DateTimeFormat(locale, { + day: 'numeric' + }).format(date) + ) + ) : _react2.default.createElement('span', { style: prepareStyles(styles.root) }); + } + }]); + return DayButton; +}(_react.Component); + +DayButton.defaultProps = { + selected: false, + disabled: false +}; +DayButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DayButton.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + date: _react.PropTypes.object, + disabled: _react.PropTypes.bool, + locale: _react.PropTypes.string.isRequired, + onKeyboardFocus: _react.PropTypes.func, + onTouchTap: _react.PropTypes.func, + selected: _react.PropTypes.bool +} : void 0; +exports.default = DayButton; + +/***/ }), +/* 773 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _YearButton = __webpack_require__(774); + +var _YearButton2 = _interopRequireDefault(_YearButton); + +var _dateUtils = __webpack_require__(83); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CalendarYear = function (_Component) { + (0, _inherits3.default)(CalendarYear, _Component); + + function CalendarYear() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, CalendarYear); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarYear.__proto__ || (0, _getPrototypeOf2.default)(CalendarYear)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapYear = function (event, year) { + if (_this.props.onTouchTapYear) { + _this.props.onTouchTapYear(event, year); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(CalendarYear, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.scrollToSelectedYear(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.scrollToSelectedYear(); + } + }, { + key: 'getYears', + value: function getYears() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + locale = _props.locale, + minDate = _props.minDate, + maxDate = _props.maxDate, + selectedDate = _props.selectedDate; + + + var minYear = minDate.getFullYear(); + var maxYear = maxDate.getFullYear(); + var years = []; + var dateCheck = (0, _dateUtils.cloneDate)(selectedDate); + + for (var year = minYear; year <= maxYear; year++) { + dateCheck.setFullYear(year); + var selected = selectedDate.getFullYear() === year; + var selectedProps = {}; + if (selected) { + selectedProps.ref = 'selectedYearButton'; + } + + var yearFormated = new DateTimeFormat(locale, { + year: 'numeric' + }).format(dateCheck); + + var yearButton = _react2.default.createElement( + _YearButton2.default, + (0, _extends3.default)({ + key: 'yb' + year, + onTouchTap: this.handleTouchTapYear, + selected: selected, + year: year + }, selectedProps), + yearFormated + ); + + years.push(yearButton); + } + + return years; + } + }, { + key: 'scrollToSelectedYear', + value: function scrollToSelectedYear() { + if (this.refs.selectedYearButton === undefined) { + return; + } + + var container = _reactDom2.default.findDOMNode(this); + var yearButtonNode = _reactDom2.default.findDOMNode(this.refs.selectedYearButton); + + var containerHeight = container.clientHeight; + var yearButtonNodeHeight = yearButtonNode.clientHeight || 32; + + var scrollYOffset = yearButtonNode.offsetTop + yearButtonNodeHeight / 2 - containerHeight / 2; + container.scrollTop = scrollYOffset; + } + }, { + key: 'render', + value: function render() { + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + calendarYearBackgroundColor = _context$muiTheme.datePicker.calendarYearBackgroundColor; + + + var styles = { + root: { + backgroundColor: calendarYearBackgroundColor, + height: 'inherit', + lineHeight: '35px', + overflowX: 'hidden', + overflowY: 'scroll', + position: 'relative' + }, + child: { + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + minHeight: '100%' + } + }; + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.child) }, + this.getYears() + ) + ); + } + }]); + return CalendarYear; +}(_react.Component); + +CalendarYear.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? CalendarYear.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + locale: _react.PropTypes.string.isRequired, + maxDate: _react.PropTypes.object.isRequired, + minDate: _react.PropTypes.object.isRequired, + onTouchTapYear: _react.PropTypes.func, + selectedDate: _react.PropTypes.object.isRequired, + wordings: _react.PropTypes.object +} : void 0; +exports.default = CalendarYear; + +/***/ }), +/* 774 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _EnhancedButton = __webpack_require__(61); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var selected = props.selected, + year = props.year; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + datePicker = _context$muiTheme.datePicker; + var hover = state.hover; + + + return { + root: { + boxSizing: 'border-box', + color: year === new Date().getFullYear() && datePicker.color, + display: 'block', + fontSize: 14, + margin: '0 auto', + position: 'relative', + textAlign: 'center', + lineHeight: 'inherit', + WebkitTapHighlightColor: 'rgba(0,0,0,0)' }, + label: { + alignSelf: 'center', + color: hover || selected ? datePicker.color : baseTheme.palette.textColor, + fontSize: selected ? 26 : 17, + fontWeight: hover ? 450 : selected ? 500 : 400, + position: 'relative', + top: -1 + } + }; +} + +var YearButton = function (_Component) { + (0, _inherits3.default)(YearButton, _Component); + + function YearButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, YearButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = YearButton.__proto__ || (0, _getPrototypeOf2.default)(YearButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hover: false + }, _this.handleMouseEnter = function () { + _this.setState({ hover: true }); + }, _this.handleMouseLeave = function () { + _this.setState({ hover: false }); + }, _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event, _this.props.year); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(YearButton, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + onTouchTap = _props.onTouchTap, + selected = _props.selected, + year = _props.year, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'onTouchTap', 'selected', 'year']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + disableFocusRipple: true, + disableTouchRipple: true, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onTouchTap: this.handleTouchTap, + style: styles.root + }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + children + ) + ); + } + }]); + return YearButton; +}(_react.Component); + +YearButton.defaultProps = { + selected: false +}; +YearButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? YearButton.propTypes = { + children: _react.PropTypes.node.isRequired, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + onTouchTap: _react.PropTypes.func, + selected: _react.PropTypes.bool, + year: _react.PropTypes.number.isRequired +} : void 0; +exports.default = YearButton; + +/***/ }), +/* 775 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _IconButton = __webpack_require__(81); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _chevronLeft = __webpack_require__(776); + +var _chevronLeft2 = _interopRequireDefault(_chevronLeft); + +var _chevronRight = __webpack_require__(777); + +var _chevronRight2 = _interopRequireDefault(_chevronRight); + +var _SlideIn = __webpack_require__(207); + +var _SlideIn2 = _interopRequireDefault(_SlideIn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + root: { + display: 'flex', + justifyContent: 'space-between', + backgroundColor: 'inherit', + height: 48 + }, + titleDiv: { + fontSize: 14, + fontWeight: '500', + textAlign: 'center', + width: '100%' + }, + titleText: { + height: 'inherit', + paddingTop: 12 + } +}; + +var CalendarToolbar = function (_Component) { + (0, _inherits3.default)(CalendarToolbar, _Component); + + function CalendarToolbar() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, CalendarToolbar); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarToolbar.__proto__ || (0, _getPrototypeOf2.default)(CalendarToolbar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + transitionDirection: 'up' + }, _this.handleTouchTapPrevMonth = function () { + if (_this.props.onMonthChange) { + _this.props.onMonthChange(-1); + } + }, _this.handleTouchTapNextMonth = function () { + if (_this.props.onMonthChange) { + _this.props.onMonthChange(1); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(CalendarToolbar, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.displayDate !== this.props.displayDate) { + var direction = nextProps.displayDate > this.props.displayDate ? 'left' : 'right'; + this.setState({ + transitionDirection: direction + }); + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + locale = _props.locale, + displayDate = _props.displayDate; + + + var dateTimeFormatted = new DateTimeFormat(locale, { + month: 'long', + year: 'numeric' + }).format(displayDate); + + return _react2.default.createElement( + 'div', + { style: styles.root }, + _react2.default.createElement( + _IconButton2.default, + { + disabled: !this.props.prevMonth, + onTouchTap: this.handleTouchTapPrevMonth + }, + _react2.default.createElement(_chevronLeft2.default, null) + ), + _react2.default.createElement( + _SlideIn2.default, + { + direction: this.state.transitionDirection, + style: styles.titleDiv + }, + _react2.default.createElement( + 'div', + { key: dateTimeFormatted, style: styles.titleText }, + dateTimeFormatted + ) + ), + _react2.default.createElement( + _IconButton2.default, + { + disabled: !this.props.nextMonth, + onTouchTap: this.handleTouchTapNextMonth + }, + _react2.default.createElement(_chevronRight2.default, null) + ) + ); + } + }]); + return CalendarToolbar; +}(_react.Component); + +CalendarToolbar.defaultProps = { + nextMonth: true, + prevMonth: true +}; + false ? CalendarToolbar.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + displayDate: _react.PropTypes.object.isRequired, + locale: _react.PropTypes.string.isRequired, + nextMonth: _react.PropTypes.bool, + onMonthChange: _react.PropTypes.func, + prevMonth: _react.PropTypes.bool +} : void 0; +exports.default = CalendarToolbar; + +/***/ }), +/* 776 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationChevronLeft = function NavigationChevronLeft(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z' }) + ); +}; +NavigationChevronLeft = (0, _pure2.default)(NavigationChevronLeft); +NavigationChevronLeft.displayName = 'NavigationChevronLeft'; +NavigationChevronLeft.muiName = 'SvgIcon'; + +exports.default = NavigationChevronLeft; + +/***/ }), +/* 777 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationChevronRight = function NavigationChevronRight(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z' }) + ); +}; +NavigationChevronRight = (0, _pure2.default)(NavigationChevronRight); +NavigationChevronRight.displayName = 'NavigationChevronRight'; +NavigationChevronRight.muiName = 'SvgIcon'; + +exports.default = NavigationChevronRight; + +/***/ }), +/* 778 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _autoPrefix = __webpack_require__(95); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SlideInChild = function (_Component) { + (0, _inherits3.default)(SlideInChild, _Component); + + function SlideInChild() { + (0, _classCallCheck3.default)(this, SlideInChild); + return (0, _possibleConstructorReturn3.default)(this, (SlideInChild.__proto__ || (0, _getPrototypeOf2.default)(SlideInChild)).apply(this, arguments)); + } + + (0, _createClass3.default)(SlideInChild, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + var x = this.props.direction === 'left' ? '100%' : this.props.direction === 'right' ? '-100%' : '0'; + var y = this.props.direction === 'up' ? '100%' : this.props.direction === 'down' ? '-100%' : '0'; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'translate(' + x + ', ' + y + ')'); + + this.enterTimer = setTimeout(callback, this.props.enterDelay); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = '1'; + _autoPrefix2.default.set(style, 'transform', 'translate(0,0)'); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + var direction = this.props.getLeaveDirection(); + var x = direction === 'left' ? '-100%' : direction === 'right' ? '100%' : '0'; + var y = direction === 'up' ? '-100%' : direction === 'down' ? '100%' : '0'; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'translate(' + x + ', ' + y + ')'); + + this.leaveTimer = setTimeout(callback, 450); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + enterDelay = _props.enterDelay, + getLeaveDirection = _props.getLeaveDirection, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'getLeaveDirection', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'absolute', + height: '100%', + width: '100%', + top: 0, + left: 0, + transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) + }, style); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }), + children + ); + } + }]); + return SlideInChild; +}(_react.Component); + +SlideInChild.defaultProps = { + enterDelay: 0 +}; +SlideInChild.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? SlideInChild.propTypes = { + children: _react.PropTypes.node, + direction: _react.PropTypes.string, + enterDelay: _react.PropTypes.number, + // This callback is needed bacause the direction could change when leaving the DOM + getLeaveDirection: _react.PropTypes.func.isRequired, + style: _react.PropTypes.object +} : void 0; +exports.default = SlideInChild; + +/***/ }), +/* 779 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _SlideIn = __webpack_require__(207); + +var _SlideIn2 = _interopRequireDefault(_SlideIn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var datePicker = context.muiTheme.datePicker; + var selectedYear = state.selectedYear; + + var isLandscape = props.mode === 'landscape'; + + var styles = { + root: { + width: isLandscape ? 165 : '100%', + height: isLandscape ? 330 : 'auto', + float: isLandscape ? 'left' : 'none', + fontWeight: 700, + display: 'inline-block', + backgroundColor: datePicker.selectColor, + borderTopLeftRadius: 2, + borderTopRightRadius: isLandscape ? 0 : 2, + borderBottomLeftRadius: isLandscape ? 2 : 0, + color: datePicker.textColor, + padding: 20, + boxSizing: 'border-box' + }, + monthDay: { + display: 'block', + fontSize: 36, + lineHeight: '36px', + height: props.mode === 'landscape' ? '100%' : 38, + opacity: selectedYear ? 0.7 : 1, + transition: _transitions2.default.easeOut(), + width: '100%', + fontWeight: '500' + }, + monthDayTitle: { + cursor: !selectedYear ? 'default' : 'pointer', + width: '100%', + display: 'block' + }, + year: { + margin: 0, + fontSize: 16, + fontWeight: '500', + lineHeight: '16px', + height: 16, + opacity: selectedYear ? 1 : 0.7, + transition: _transitions2.default.easeOut(), + marginBottom: 10 + }, + yearTitle: { + cursor: props.disableYearSelection ? 'not-allowed' : !selectedYear ? 'pointer' : 'default' + } + }; + + return styles; +} + +var DateDisplay = function (_Component) { + (0, _inherits3.default)(DateDisplay, _Component); + + function DateDisplay() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DateDisplay); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DateDisplay.__proto__ || (0, _getPrototypeOf2.default)(DateDisplay)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + selectedYear: false, + transitionDirection: 'up' + }, _this.handleTouchTapMonthDay = function () { + if (_this.props.onTouchTapMonthDay && _this.state.selectedYear) { + _this.props.onTouchTapMonthDay(); + } + + _this.setState({ selectedYear: false }); + }, _this.handleTouchTapYear = function () { + if (_this.props.onTouchTapYear && !_this.props.disableYearSelection && !_this.state.selectedYear) { + _this.props.onTouchTapYear(); + } + + if (!_this.props.disableYearSelection) { + _this.setState({ selectedYear: true }); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DateDisplay, [{ + key: 'componentWillMount', + value: function componentWillMount() { + if (!this.props.monthDaySelected) { + this.setState({ selectedYear: true }); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.selectedDate !== this.props.selectedDate) { + var direction = nextProps.selectedDate > this.props.selectedDate ? 'up' : 'down'; + this.setState({ + transitionDirection: direction + }); + } + + if (nextProps.monthDaySelected !== undefined) { + this.setState({ + selectedYear: !nextProps.monthDaySelected + }); + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + disableYearSelection = _props.disableYearSelection, + locale = _props.locale, + mode = _props.mode, + monthDaySelected = _props.monthDaySelected, + onTouchTapMonthDay = _props.onTouchTapMonthDay, + onTouchTapYear = _props.onTouchTapYear, + selectedDate = _props.selectedDate, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'disableYearSelection', 'locale', 'mode', 'monthDaySelected', 'onTouchTapMonthDay', 'onTouchTapYear', 'selectedDate', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + var year = new DateTimeFormat(locale, { + year: 'numeric' + }).format(selectedDate); + + var dateTime = new DateTimeFormat(locale, { + month: 'short', + weekday: 'short', + day: '2-digit' + }).format(selectedDate); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(styles.root, style) }), + _react2.default.createElement( + _SlideIn2.default, + { style: styles.year, direction: this.state.transitionDirection }, + _react2.default.createElement( + 'div', + { key: year, style: styles.yearTitle, onTouchTap: this.handleTouchTapYear }, + year + ) + ), + _react2.default.createElement( + _SlideIn2.default, + { style: styles.monthDay, direction: this.state.transitionDirection }, + _react2.default.createElement( + 'div', + { + key: dateTime, + onTouchTap: this.handleTouchTapMonthDay, + style: styles.monthDayTitle + }, + dateTime + ) + ) + ); + } + }]); + return DateDisplay; +}(_react.Component); + +DateDisplay.defaultProps = { + disableYearSelection: false, + monthDaySelected: true +}; +DateDisplay.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DateDisplay.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + disableYearSelection: _react.PropTypes.bool, + locale: _react.PropTypes.string.isRequired, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + monthDaySelected: _react.PropTypes.bool, + onTouchTapMonthDay: _react.PropTypes.func, + onTouchTapYear: _react.PropTypes.func, + selectedDate: _react.PropTypes.object.isRequired, + style: _react.PropTypes.object +} : void 0; +exports.default = DateDisplay; + +/***/ }), +/* 780 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactEventListener = __webpack_require__(39); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(27); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _Overlay = __webpack_require__(322); + +var _Overlay2 = _interopRequireDefault(_Overlay); + +var _RenderToLayer = __webpack_require__(325); + +var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer); + +var _Paper = __webpack_require__(31); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _reactAddonsTransitionGroup = __webpack_require__(128); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TransitionItem = function (_Component) { + (0, _inherits3.default)(TransitionItem, _Component); + + function TransitionItem() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TransitionItem); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TransitionItem.__proto__ || (0, _getPrototypeOf2.default)(TransitionItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + style: {} + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TransitionItem, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimeout); + clearTimeout(this.leaveTimeout); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.componentWillAppear(callback); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + var spacing = this.context.muiTheme.baseTheme.spacing; + + this.setState({ + style: { + opacity: 1, + transform: 'translate(0, ' + spacing.desktopKeylineIncrement + 'px)' + } + }); + + this.enterTimeout = setTimeout(callback, 450); // matches transition duration + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + this.setState({ + style: { + opacity: 0, + transform: 'translate(0, 0)' + } + }); + + this.leaveTimeout = setTimeout(callback, 450); // matches transition duration + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + style = _props.style, + children = _props.children, + other = (0, _objectWithoutProperties3.default)(_props, ['style', 'children']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, this.state.style, style)) }), + children + ); + } + }]); + return TransitionItem; +}(_react.Component); + +TransitionItem.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TransitionItem.propTypes = { + children: _react.PropTypes.node, + style: _react.PropTypes.object +} : void 0; + + +function getStyles(props, context) { + var autoScrollBodyContent = props.autoScrollBodyContent, + open = props.open; + var _context$muiTheme = context.muiTheme, + _context$muiTheme$bas = _context$muiTheme.baseTheme, + spacing = _context$muiTheme$bas.spacing, + palette = _context$muiTheme$bas.palette, + dialog = _context$muiTheme.dialog, + zIndex = _context$muiTheme.zIndex; + + + var gutter = spacing.desktopGutter; + var borderScroll = '1px solid ' + palette.borderColor; + + return { + root: { + position: 'fixed', + boxSizing: 'border-box', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + zIndex: zIndex.dialog, + top: 0, + left: open ? 0 : -10000, + width: '100%', + height: '100%', + transition: open ? _transitions2.default.easeOut('0ms', 'left', '0ms') : _transitions2.default.easeOut('0ms', 'left', '450ms') + }, + content: { + boxSizing: 'border-box', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + transition: _transitions2.default.easeOut(), + position: 'relative', + width: '75%', + maxWidth: spacing.desktopKeylineIncrement * 12, + margin: '0 auto', + zIndex: zIndex.dialog + }, + actionsContainer: { + boxSizing: 'border-box', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + padding: 8, + width: '100%', + textAlign: 'right', + marginTop: autoScrollBodyContent ? -1 : 0, + borderTop: autoScrollBodyContent ? borderScroll : 'none' + }, + overlay: { + zIndex: zIndex.dialogOverlay + }, + title: { + margin: 0, + padding: gutter + 'px ' + gutter + 'px 20px ' + gutter + 'px', + color: palette.textColor, + fontSize: dialog.titleFontSize, + lineHeight: '32px', + fontWeight: 400, + marginBottom: autoScrollBodyContent ? -1 : 0, + borderBottom: autoScrollBodyContent ? borderScroll : 'none' + }, + body: { + fontSize: dialog.bodyFontSize, + color: dialog.bodyColor, + padding: (props.title ? 0 : gutter) + 'px ' + gutter + 'px ' + gutter + 'px', + boxSizing: 'border-box', + overflowY: autoScrollBodyContent ? 'auto' : 'hidden' + } + }; +} + +var DialogInline = function (_Component2) { + (0, _inherits3.default)(DialogInline, _Component2); + + function DialogInline() { + var _ref2; + + var _temp2, _this2, _ret2; + + (0, _classCallCheck3.default)(this, DialogInline); + + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + return _ret2 = (_temp2 = (_this2 = (0, _possibleConstructorReturn3.default)(this, (_ref2 = DialogInline.__proto__ || (0, _getPrototypeOf2.default)(DialogInline)).call.apply(_ref2, [this].concat(args))), _this2), _this2.handleTouchTapOverlay = function () { + _this2.requestClose(false); + }, _this2.handleKeyUp = function (event) { + if ((0, _keycode2.default)(event) === 'esc') { + _this2.requestClose(false); + } + }, _this2.handleResize = function () { + _this2.positionDialog(); + }, _temp2), (0, _possibleConstructorReturn3.default)(_this2, _ret2); + } + + (0, _createClass3.default)(DialogInline, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.positionDialog(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.positionDialog(); + } + }, { + key: 'positionDialog', + value: function positionDialog() { + var _props2 = this.props, + actions = _props2.actions, + autoDetectWindowHeight = _props2.autoDetectWindowHeight, + autoScrollBodyContent = _props2.autoScrollBodyContent, + bodyStyle = _props2.bodyStyle, + open = _props2.open, + repositionOnUpdate = _props2.repositionOnUpdate, + title = _props2.title; + + + if (!open) { + return; + } + + var clientHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; + var container = _reactDom2.default.findDOMNode(this); + var dialogWindow = _reactDom2.default.findDOMNode(this.refs.dialogWindow); + var dialogContent = _reactDom2.default.findDOMNode(this.refs.dialogContent); + var minPaddingTop = 16; + + // Reset the height in case the window was resized. + dialogWindow.style.height = ''; + dialogContent.style.height = ''; + + var dialogWindowHeight = dialogWindow.offsetHeight; + var paddingTop = (clientHeight - dialogWindowHeight) / 2 - 64; + if (paddingTop < minPaddingTop) paddingTop = minPaddingTop; + + // Vertically center the dialog window, but make sure it doesn't + // transition to that position. + if (repositionOnUpdate || !container.style.paddingTop) { + container.style.paddingTop = paddingTop + 'px'; + } + + // Force a height if the dialog is taller than clientHeight + if (autoDetectWindowHeight || autoScrollBodyContent) { + var styles = getStyles(this.props, this.context); + styles.body = (0, _simpleAssign2.default)(styles.body, bodyStyle); + var maxDialogContentHeight = clientHeight - 2 * 64; + + if (title) maxDialogContentHeight -= dialogContent.previousSibling.offsetHeight; + + if (_react2.default.Children.count(actions)) { + maxDialogContentHeight -= dialogContent.nextSibling.offsetHeight; + } + + dialogContent.style.maxHeight = maxDialogContentHeight + 'px'; + } + } + }, { + key: 'requestClose', + value: function requestClose(buttonClicked) { + if (!buttonClicked && this.props.modal) { + return; + } + + if (this.props.onRequestClose) { + this.props.onRequestClose(!!buttonClicked); + } + } + }, { + key: 'render', + value: function render() { + var _props3 = this.props, + actions = _props3.actions, + actionsContainerClassName = _props3.actionsContainerClassName, + actionsContainerStyle = _props3.actionsContainerStyle, + bodyClassName = _props3.bodyClassName, + bodyStyle = _props3.bodyStyle, + children = _props3.children, + className = _props3.className, + contentClassName = _props3.contentClassName, + contentStyle = _props3.contentStyle, + overlayClassName = _props3.overlayClassName, + overlayStyle = _props3.overlayStyle, + open = _props3.open, + titleClassName = _props3.titleClassName, + titleStyle = _props3.titleStyle, + title = _props3.title, + style = _props3.style; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + styles.root = (0, _simpleAssign2.default)(styles.root, style); + styles.content = (0, _simpleAssign2.default)(styles.content, contentStyle); + styles.body = (0, _simpleAssign2.default)(styles.body, bodyStyle); + styles.actionsContainer = (0, _simpleAssign2.default)(styles.actionsContainer, actionsContainerStyle); + styles.overlay = (0, _simpleAssign2.default)(styles.overlay, overlayStyle); + styles.title = (0, _simpleAssign2.default)(styles.title, titleStyle); + + var actionsContainer = _react2.default.Children.count(actions) > 0 && _react2.default.createElement( + 'div', + { className: actionsContainerClassName, style: prepareStyles(styles.actionsContainer) }, + _react2.default.Children.toArray(actions) + ); + + var titleElement = title; + if (_react2.default.isValidElement(title)) { + titleElement = _react2.default.cloneElement(title, { + className: title.props.className || titleClassName, + style: prepareStyles((0, _simpleAssign2.default)(styles.title, title.props.style)) + }); + } else if (typeof title === 'string') { + titleElement = _react2.default.createElement( + 'h3', + { className: titleClassName, style: prepareStyles(styles.title) }, + title + ); + } + + return _react2.default.createElement( + 'div', + { className: className, style: prepareStyles(styles.root) }, + open && _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyUp: this.handleKeyUp, + onResize: this.handleResize + }), + _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + { + component: 'div', + ref: 'dialogWindow', + transitionAppear: true, + transitionAppearTimeout: 450, + transitionEnter: true, + transitionEnterTimeout: 450 + }, + open && _react2.default.createElement( + TransitionItem, + { + className: contentClassName, + style: styles.content + }, + _react2.default.createElement( + _Paper2.default, + { zDepth: 4 }, + titleElement, + _react2.default.createElement( + 'div', + { + ref: 'dialogContent', + className: bodyClassName, + style: prepareStyles(styles.body) + }, + children + ), + actionsContainer + ) + ) + ), + _react2.default.createElement(_Overlay2.default, { + show: open, + className: overlayClassName, + style: styles.overlay, + onTouchTap: this.handleTouchTapOverlay + }) + ); + } + }]); + return DialogInline; +}(_react.Component); + +DialogInline.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DialogInline.propTypes = { + actions: _react.PropTypes.node, + actionsContainerClassName: _react.PropTypes.string, + actionsContainerStyle: _react.PropTypes.object, + autoDetectWindowHeight: _react.PropTypes.bool, + autoScrollBodyContent: _react.PropTypes.bool, + bodyClassName: _react.PropTypes.string, + bodyStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + className: _react.PropTypes.string, + contentClassName: _react.PropTypes.string, + contentStyle: _react.PropTypes.object, + modal: _react.PropTypes.bool, + onRequestClose: _react.PropTypes.func, + open: _react.PropTypes.bool.isRequired, + overlayClassName: _react.PropTypes.string, + overlayStyle: _react.PropTypes.object, + repositionOnUpdate: _react.PropTypes.bool, + style: _react.PropTypes.object, + title: _react.PropTypes.node, + titleClassName: _react.PropTypes.string, + titleStyle: _react.PropTypes.object +} : void 0; + +var Dialog = function (_Component3) { + (0, _inherits3.default)(Dialog, _Component3); + + function Dialog() { + var _ref3; + + var _temp3, _this3, _ret3; + + (0, _classCallCheck3.default)(this, Dialog); + + for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + + return _ret3 = (_temp3 = (_this3 = (0, _possibleConstructorReturn3.default)(this, (_ref3 = Dialog.__proto__ || (0, _getPrototypeOf2.default)(Dialog)).call.apply(_ref3, [this].concat(args))), _this3), _this3.renderLayer = function () { + return _react2.default.createElement(DialogInline, _this3.props); + }, _temp3), (0, _possibleConstructorReturn3.default)(_this3, _ret3); + } + + (0, _createClass3.default)(Dialog, [{ + key: 'render', + value: function render() { + return _react2.default.createElement(_RenderToLayer2.default, { render: this.renderLayer, open: true, useLayerForClickAway: false }); + } + }]); + return Dialog; +}(_react.Component); + +Dialog.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +Dialog.defaultProps = { + autoDetectWindowHeight: true, + autoScrollBodyContent: false, + modal: false, + repositionOnUpdate: true +}; + false ? Dialog.propTypes = { + /** + * Action buttons to display below the Dialog content (`children`). + * This property accepts either a React element, or an array of React elements. + */ + actions: _react.PropTypes.node, + /** + * The `className` to add to the actions container's root element. + */ + actionsContainerClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the actions container's root element. + */ + actionsContainerStyle: _react.PropTypes.object, + /** + * If set to true, the height of the `Dialog` will be auto detected. A max height + * will be enforced so that the content does not extend beyond the viewport. + */ + autoDetectWindowHeight: _react.PropTypes.bool, + /** + * If set to true, the body content of the `Dialog` will be scrollable. + */ + autoScrollBodyContent: _react.PropTypes.bool, + /** + * The `className` to add to the content's root element under the title. + */ + bodyClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the content's root element under the title. + */ + bodyStyle: _react.PropTypes.object, + /** + * The contents of the `Dialog`. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The `className` to add to the content container. + */ + contentClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the content container. + */ + contentStyle: _react.PropTypes.object, + /** + * Force the user to use one of the actions in the `Dialog`. + * Clicking outside the `Dialog` will not trigger the `onRequestClose`. + */ + modal: _react.PropTypes.bool, + /** + * Fired when the `Dialog` is requested to be closed by a click outside the `Dialog` or on the buttons. + * + * @param {bool} buttonClicked Determines whether a button click triggered this request. + */ + onRequestClose: _react.PropTypes.func, + /** + * Controls whether the Dialog is opened or not. + */ + open: _react.PropTypes.bool.isRequired, + /** + * The `className` to add to the `Overlay` component that is rendered behind the `Dialog`. + */ + overlayClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the `Overlay` component that is rendered behind the `Dialog`. + */ + overlayStyle: _react.PropTypes.object, + /** + * Determines whether the `Dialog` should be repositioned when it's contents are updated. + */ + repositionOnUpdate: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The title to display on the `Dialog`. Could be number, string, element or an array containing these types. + */ + title: _react.PropTypes.node, + /** + * The `className` to add to the title's root container element. + */ + titleClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the title's root container element. + */ + titleStyle: _react.PropTypes.object +} : void 0; +exports.default = Dialog; + +/***/ }), +/* 781 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _RadioButton = __webpack_require__(327); + +var _createComponent = __webpack_require__(40); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(63); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var mapValueToValueSelected = function mapValueToValueSelected(_ref, errorProp) { + var inputProps = _objectWithoutProperties(_ref.input, []), + props = _objectWithoutProperties(_ref, ['input']); + + return (0, _mapError2.default)(_extends({}, props, { + input: _extends({}, inputProps, { valueSelected: inputProps.value }) + }), errorProp); +}; + +exports.default = (0, _createComponent2.default)(_RadioButton.RadioButtonGroup, mapValueToValueSelected); + +/***/ }), +/* 782 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _EnhancedSwitch = __webpack_require__(206); + +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + +var _radioButtonUnchecked = __webpack_require__(783); + +var _radioButtonUnchecked2 = _interopRequireDefault(_radioButtonUnchecked); + +var _radioButtonChecked = __webpack_require__(784); + +var _radioButtonChecked2 = _interopRequireDefault(_radioButtonChecked); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var radioButton = context.muiTheme.radioButton; + + + return { + icon: { + height: radioButton.size, + width: radioButton.size + }, + target: { + transition: _transitions2.default.easeOut(), + position: 'absolute', + opacity: 1, + transform: 'scale(1)', + fill: radioButton.borderColor + }, + fill: { + position: 'absolute', + opacity: 1, + transform: 'scale(0)', + transformOrigin: '50% 50%', + transition: _transitions2.default.easeOut(), + fill: radioButton.checkedColor + }, + targetWhenChecked: { + opacity: 0, + transform: 'scale(0)' + }, + fillWhenChecked: { + opacity: 1, + transform: 'scale(1)' + }, + targetWhenDisabled: { + fill: radioButton.disabledColor + }, + fillWhenDisabled: { + fill: radioButton.disabledColor + }, + label: { + color: props.disabled ? radioButton.labelDisabledColor : radioButton.labelColor + }, + ripple: { + color: props.checked ? radioButton.checkedColor : radioButton.borderColor + } + }; +} + +var RadioButton = function (_Component) { + (0, _inherits3.default)(RadioButton, _Component); + + function RadioButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RadioButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RadioButton.__proto__ || (0, _getPrototypeOf2.default)(RadioButton)).call.apply(_ref, [this].concat(args))), _this), _this.handleSwitch = function (event) { + if (_this.props.onCheck) { + _this.props.onCheck(event, _this.props.value); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + // Only called when selected, not when unselected. + + + (0, _createClass3.default)(RadioButton, [{ + key: 'isChecked', + value: function isChecked() { + return this.refs.enhancedSwitch.isSwitched(); + } + + // Use RadioButtonGroup.setSelectedValue(newSelectionValue) to set a + // RadioButton's checked value. + + }, { + key: 'setChecked', + value: function setChecked(newCheckedValue) { + this.refs.enhancedSwitch.setSwitched(newCheckedValue); + } + }, { + key: 'getValue', + value: function getValue() { + return this.refs.enhancedSwitch.getValue(); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + checkedIcon = _props.checkedIcon, + checked = _props.checked, + iconStyle = _props.iconStyle, + labelStyle = _props.labelStyle, + labelPosition = _props.labelPosition, + onCheck = _props.onCheck, + uncheckedIcon = _props.uncheckedIcon, + disabled = _props.disabled, + other = (0, _objectWithoutProperties3.default)(_props, ['checkedIcon', 'checked', 'iconStyle', 'labelStyle', 'labelPosition', 'onCheck', 'uncheckedIcon', 'disabled']); + + + var styles = getStyles(this.props, this.context); + + var uncheckedStyles = (0, _simpleAssign2.default)(styles.target, checked && styles.targetWhenChecked, iconStyle, disabled && styles.targetWhenDisabled); + + var checkedStyles = (0, _simpleAssign2.default)(styles.fill, checked && styles.fillWhenChecked, iconStyle, disabled && styles.fillWhenDisabled); + + var uncheckedElement = _react2.default.isValidElement(uncheckedIcon) ? _react2.default.cloneElement(uncheckedIcon, { + style: (0, _simpleAssign2.default)(uncheckedStyles, uncheckedIcon.props.style) + }) : _react2.default.createElement(_radioButtonUnchecked2.default, { style: uncheckedStyles }); + + var checkedElement = _react2.default.isValidElement(checkedIcon) ? _react2.default.cloneElement(checkedIcon, { + style: (0, _simpleAssign2.default)(checkedStyles, checkedIcon.props.style) + }) : _react2.default.createElement(_radioButtonChecked2.default, { style: checkedStyles }); + + var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle); + var mergedLabelStyle = (0, _simpleAssign2.default)(styles.label, labelStyle); + + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, { + ref: 'enhancedSwitch', + inputType: 'radio', + checked: checked, + switched: checked, + disabled: disabled, + rippleColor: styles.ripple.color, + iconStyle: mergedIconStyle, + labelStyle: mergedLabelStyle, + labelPosition: labelPosition, + onSwitch: this.handleSwitch, + switchElement: _react2.default.createElement( + 'div', + null, + uncheckedElement, + checkedElement + ) + })); + } + }]); + return RadioButton; +}(_react.Component); + +RadioButton.defaultProps = { + checked: false, + disabled: false, + labelPosition: 'right' +}; +RadioButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? RadioButton.propTypes = { + /** + * @ignore + * checked if true + * Used internally by `RadioButtonGroup`. + */ + checked: _react.PropTypes.bool, + /** + * The icon element to show when the radio button is checked. + */ + checkedIcon: _react.PropTypes.element, + /** + * If true, the radio button is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the input element. + */ + inputStyle: _react.PropTypes.object, + /** + * @ignore + * Used internally by `RadioButtonGroup`. Use the `labelPosition` property of `RadioButtonGroup` instead. + * Where the label will be placed next to the radio button. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * Override the inline-styles of the label element. + */ + labelStyle: _react.PropTypes.object, + /** + * @ignore + * Callback function fired when the radio button is checked. Note that this + * function will not be called if the radio button is part of a + * radio button group: in this case, use the `onChange` property of + * `RadioButtonGroup`. + * + * @param {object} event `change` event targeting the element. + * @param {string} value The element's `value`. + */ + onCheck: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The icon element to show when the radio button is unchecked. + */ + uncheckedIcon: _react.PropTypes.element, + /** + * The value of the radio button. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = RadioButton; + +/***/ }), +/* 783 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ToggleRadioButtonUnchecked = function ToggleRadioButtonUnchecked(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z' }) + ); +}; +ToggleRadioButtonUnchecked = (0, _pure2.default)(ToggleRadioButtonUnchecked); +ToggleRadioButtonUnchecked.displayName = 'ToggleRadioButtonUnchecked'; +ToggleRadioButtonUnchecked.muiName = 'SvgIcon'; + +exports.default = ToggleRadioButtonUnchecked; + +/***/ }), +/* 784 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ToggleRadioButtonChecked = function ToggleRadioButtonChecked(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z' }) + ); +}; +ToggleRadioButtonChecked = (0, _pure2.default)(ToggleRadioButtonChecked); +ToggleRadioButtonChecked.displayName = 'ToggleRadioButtonChecked'; +ToggleRadioButtonChecked.muiName = 'SvgIcon'; + +exports.default = ToggleRadioButtonChecked; + +/***/ }), +/* 785 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _RadioButton = __webpack_require__(327); + +var _RadioButton2 = _interopRequireDefault(_RadioButton); + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var RadioButtonGroup = function (_Component) { + (0, _inherits3.default)(RadioButtonGroup, _Component); + + function RadioButtonGroup() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RadioButtonGroup); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RadioButtonGroup.__proto__ || (0, _getPrototypeOf2.default)(RadioButtonGroup)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + numberCheckedRadioButtons: 0, + selected: '' + }, _this.handleChange = function (event, newSelection) { + _this.updateRadioButtons(newSelection); + + // Successful update + if (_this.state.numberCheckedRadioButtons === 0) { + if (_this.props.onChange) _this.props.onChange(event, newSelection); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(RadioButtonGroup, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; + + var cnt = 0; + var selected = ''; + var _props = this.props, + valueSelected = _props.valueSelected, + defaultSelected = _props.defaultSelected; + + if (valueSelected !== undefined) { + selected = valueSelected; + } else if (defaultSelected !== undefined) { + selected = defaultSelected; + } + + _react2.default.Children.forEach(this.props.children, function (option) { + if (_this2.hasCheckAttribute(option)) cnt++; + }, this); + + this.setState({ + numberCheckedRadioButtons: cnt, + selected: selected + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.hasOwnProperty('valueSelected')) { + this.setState({ + selected: nextProps.valueSelected + }); + } + } + }, { + key: 'hasCheckAttribute', + value: function hasCheckAttribute(radioButton) { + return radioButton.props.hasOwnProperty('checked') && radioButton.props.checked; + } + }, { + key: 'updateRadioButtons', + value: function updateRadioButtons(newSelection) { + if (this.state.numberCheckedRadioButtons === 0) { + this.setState({ selected: newSelection }); + } else { + false ? (0, _warning2.default)(false, 'Material-UI: Cannot select a different radio button while another radio button\n has the \'checked\' property set to true.') : void 0; + } + } + }, { + key: 'getSelectedValue', + value: function getSelectedValue() { + return this.state.selected; + } + }, { + key: 'setSelectedValue', + value: function setSelectedValue(newSelectionValue) { + this.updateRadioButtons(newSelectionValue); + } + }, { + key: 'clearValue', + value: function clearValue() { + this.setSelectedValue(''); + } + }, { + key: 'render', + value: function render() { + var _this3 = this; + + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var options = _react2.default.Children.map(this.props.children, function (option) { + var _option$props = option.props, + name = _option$props.name, + value = _option$props.value, + label = _option$props.label, + onCheck = _option$props.onCheck, + other = (0, _objectWithoutProperties3.default)(_option$props, ['name', 'value', 'label', 'onCheck']); + + + return _react2.default.createElement(_RadioButton2.default, (0, _extends3.default)({}, other, { + ref: option.props.value, + name: _this3.props.name, + key: option.props.value, + value: option.props.value, + label: option.props.label, + labelPosition: _this3.props.labelPosition, + onCheck: _this3.handleChange, + checked: option.props.value === _this3.state.selected + })); + }, this); + + return _react2.default.createElement( + 'div', + { + style: prepareStyles((0, _simpleAssign2.default)({}, this.props.style)), + className: this.props.className + }, + options + ); + } + }]); + return RadioButtonGroup; +}(_react.Component); + +RadioButtonGroup.defaultProps = { + style: {} +}; +RadioButtonGroup.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? RadioButtonGroup.propTypes = { + /** + * Should be used to pass `RadioButton` components. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The `value` property of the radio button that will be + * selected by default. This takes precedence over the `checked` property + * of the `RadioButton` elements. + */ + defaultSelected: _react.PropTypes.any, + /** + * Where the label will be placed for all child radio buttons. + * This takes precedence over the `labelPosition` property of the + * `RadioButton` elements. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * The name that will be applied to all child radio buttons. + */ + name: _react.PropTypes.string.isRequired, + /** + * Callback function that is fired when a radio button has + * been checked. + * + * @param {object} event `change` event targeting the selected + * radio button. + * @param {*} value The `value` of the selected radio button. + */ + onChange: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The `value` of the currently selected radio button. + */ + valueSelected: _react.PropTypes.any +} : void 0; +exports.default = RadioButtonGroup; + +/***/ }), +/* 786 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _SelectField = __webpack_require__(787); + +var _SelectField2 = _interopRequireDefault(_SelectField); + +var _createComponent = __webpack_require__(40); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(63); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_SelectField2.default, function (_ref) { + var _ref$input = _ref.input, + _onChange = _ref$input.onChange, + value = _ref$input.value, + _onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value', 'onBlur']), + onChangeFromField = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'onChange']); + + return _extends({}, (0, _mapError2.default)(props), inputProps, { + value: value, + onChange: function onChange(event, index, value) { + _onChange(value); + if (onChangeFromField) { + onChangeFromField(value); + } + }, + onBlur: function onBlur() { + return _onBlur(value); + } + }); +}); + +/***/ }), +/* 787 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _SelectField = __webpack_require__(788); + +var _SelectField2 = _interopRequireDefault(_SelectField); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _SelectField2.default; + +/***/ }), +/* 788 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _TextField = __webpack_require__(97); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _DropDownMenu = __webpack_require__(789); + +var _DropDownMenu2 = _interopRequireDefault(_DropDownMenu); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props) { + return { + label: { + paddingLeft: 0, + top: props.floatingLabelText ? 6 : -4 + }, + icon: { + right: 0, + top: props.floatingLabelText ? 8 : 0 + }, + hideDropDownUnderline: { + borderTop: 'none' + }, + dropDownMenu: { + display: 'block' + } + }; +} + +var SelectField = function (_Component) { + (0, _inherits3.default)(SelectField, _Component); + + function SelectField() { + (0, _classCallCheck3.default)(this, SelectField); + return (0, _possibleConstructorReturn3.default)(this, (SelectField.__proto__ || (0, _getPrototypeOf2.default)(SelectField)).apply(this, arguments)); + } + + (0, _createClass3.default)(SelectField, [{ + key: 'render', + value: function render() { + var _props = this.props, + autoWidth = _props.autoWidth, + children = _props.children, + style = _props.style, + labelStyle = _props.labelStyle, + iconStyle = _props.iconStyle, + id = _props.id, + underlineDisabledStyle = _props.underlineDisabledStyle, + underlineFocusStyle = _props.underlineFocusStyle, + menuItemStyle = _props.menuItemStyle, + selectedMenuItemStyle = _props.selectedMenuItemStyle, + underlineStyle = _props.underlineStyle, + errorStyle = _props.errorStyle, + disabled = _props.disabled, + floatingLabelFixed = _props.floatingLabelFixed, + floatingLabelText = _props.floatingLabelText, + floatingLabelStyle = _props.floatingLabelStyle, + hintStyle = _props.hintStyle, + hintText = _props.hintText, + fullWidth = _props.fullWidth, + errorText = _props.errorText, + listStyle = _props.listStyle, + maxHeight = _props.maxHeight, + menuStyle = _props.menuStyle, + onFocus = _props.onFocus, + onBlur = _props.onBlur, + onChange = _props.onChange, + value = _props.value, + other = (0, _objectWithoutProperties3.default)(_props, ['autoWidth', 'children', 'style', 'labelStyle', 'iconStyle', 'id', 'underlineDisabledStyle', 'underlineFocusStyle', 'menuItemStyle', 'selectedMenuItemStyle', 'underlineStyle', 'errorStyle', 'disabled', 'floatingLabelFixed', 'floatingLabelText', 'floatingLabelStyle', 'hintStyle', 'hintText', 'fullWidth', 'errorText', 'listStyle', 'maxHeight', 'menuStyle', 'onFocus', 'onBlur', 'onChange', 'value']); + + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + _TextField2.default, + (0, _extends3.default)({}, other, { + style: style, + disabled: disabled, + floatingLabelFixed: floatingLabelFixed, + floatingLabelText: floatingLabelText, + floatingLabelStyle: floatingLabelStyle, + hintStyle: hintStyle, + hintText: !hintText && !floatingLabelText ? ' ' : hintText, + fullWidth: fullWidth, + errorText: errorText, + underlineStyle: underlineStyle, + errorStyle: errorStyle, + onFocus: onFocus, + onBlur: onBlur, + id: id, + underlineDisabledStyle: underlineDisabledStyle, + underlineFocusStyle: underlineFocusStyle + }), + _react2.default.createElement( + _DropDownMenu2.default, + { + disabled: disabled, + style: (0, _simpleAssign2.default)(styles.dropDownMenu, menuStyle), + labelStyle: (0, _simpleAssign2.default)(styles.label, labelStyle), + iconStyle: (0, _simpleAssign2.default)(styles.icon, iconStyle), + menuItemStyle: menuItemStyle, + selectedMenuItemStyle: selectedMenuItemStyle, + underlineStyle: styles.hideDropDownUnderline, + listStyle: listStyle, + autoWidth: autoWidth, + value: value, + onChange: onChange, + maxHeight: maxHeight + }, + children + ) + ); + } + }]); + return SelectField; +}(_react.Component); + +SelectField.defaultProps = { + autoWidth: false, + disabled: false, + fullWidth: false +}; +SelectField.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? SelectField.propTypes = { + /** + * If true, the width will automatically be set according to the + * items inside the menu. + * To control the width in CSS instead, leave this prop set to `false`. + */ + autoWidth: _react.PropTypes.bool, + /** + * The `MenuItem` elements to populate the select field with. + * If the menu items have a `label` prop, that value will + * represent the selected menu item in the rendered select field. + */ + children: _react.PropTypes.node, + /** + * If true, the select field will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the error element. + */ + errorStyle: _react.PropTypes.object, + /** + * The error content to display. + */ + errorText: _react.PropTypes.node, + /** + * If true, the floating label will float even when no value is selected. + */ + floatingLabelFixed: _react.PropTypes.bool, + /** + * Override the inline-styles of the floating label. + */ + floatingLabelStyle: _react.PropTypes.object, + /** + * The content of the floating label. + */ + floatingLabelText: _react.PropTypes.node, + /** + * If true, the select field will take up the full width of its container. + */ + fullWidth: _react.PropTypes.bool, + /** + * Override the inline-styles of the hint element. + */ + hintStyle: _react.PropTypes.object, + /** + * The hint content to display. + */ + hintText: _react.PropTypes.node, + /** + * Override the inline-styles of the icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * The id prop for the text field. + */ + id: _react.PropTypes.string, + /** + * Override the label style when the select field is inactive. + */ + labelStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the underlying `List` element. + */ + listStyle: _react.PropTypes.object, + /** + * Override the default max-height of the underlying `DropDownMenu` element. + */ + maxHeight: _react.PropTypes.number, + /** + * Override the inline-styles of menu items. + */ + menuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the underlying `DropDownMenu` element. + */ + menuStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function fired when a menu item is selected. + * + * @param {object} event TouchTap event targeting the menu item + * that was selected. + * @param {number} key The index of the selected menu item. + * @param {any} payload The `value` prop of the selected menu item. + */ + onChange: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Override the inline-styles of selected menu items. + */ + selectedMenuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of the underline element when the select + * field is disabled. + */ + underlineDisabledStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the underline element when the select field + * is focused. + */ + underlineFocusStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the underline element. + */ + underlineStyle: _react.PropTypes.object, + /** + * The value that is currently selected. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = SelectField; + +/***/ }), +/* 789 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.MenuItem = exports.DropDownMenu = undefined; + +var _DropDownMenu2 = __webpack_require__(790); + +var _DropDownMenu3 = _interopRequireDefault(_DropDownMenu2); + +var _MenuItem2 = __webpack_require__(324); + +var _MenuItem3 = _interopRequireDefault(_MenuItem2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.DropDownMenu = _DropDownMenu3.default; +exports.MenuItem = _MenuItem3.default; +exports.default = _DropDownMenu3.default; + +/***/ }), +/* 790 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _arrowDropDown = __webpack_require__(791); + +var _arrowDropDown2 = _interopRequireDefault(_arrowDropDown); + +var _Menu = __webpack_require__(203); + +var _Menu2 = _interopRequireDefault(_Menu); + +var _ClearFix = __webpack_require__(792); + +var _ClearFix2 = _interopRequireDefault(_ClearFix); + +var _Popover = __webpack_require__(130); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _PopoverAnimationVertical = __webpack_require__(326); + +var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical); + +var _keycode = __webpack_require__(27); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _events = __webpack_require__(201); + +var _events2 = _interopRequireDefault(_events); + +var _IconButton = __webpack_require__(81); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var anchorOrigin = { + vertical: 'top', + horizontal: 'left' +}; + +function getStyles(props, context) { + var disabled = props.disabled; + + var spacing = context.muiTheme.baseTheme.spacing; + var palette = context.muiTheme.baseTheme.palette; + var accentColor = context.muiTheme.dropDownMenu.accentColor; + return { + control: { + cursor: disabled ? 'not-allowed' : 'pointer', + height: '100%', + position: 'relative', + width: '100%' + }, + icon: { + fill: accentColor, + position: 'absolute', + right: spacing.desktopGutterLess, + top: (spacing.iconSize - 24) / 2 + spacing.desktopGutterMini / 2 + }, + iconChildren: { + fill: 'inherit' + }, + label: { + color: disabled ? palette.disabledColor : palette.textColor, + lineHeight: spacing.desktopToolbarHeight + 'px', + overflow: 'hidden', + opacity: 1, + position: 'relative', + paddingLeft: spacing.desktopGutter, + paddingRight: spacing.iconSize * 2 + spacing.desktopGutterMini, + textOverflow: 'ellipsis', + top: 0, + whiteSpace: 'nowrap' + }, + labelWhenOpen: { + opacity: 0, + top: spacing.desktopToolbarHeight / 8 + }, + root: { + display: 'inline-block', + fontSize: spacing.desktopDropDownMenuFontSize, + height: spacing.desktopSubheaderHeight, + fontFamily: context.muiTheme.baseTheme.fontFamily, + outline: 'none', + position: 'relative', + transition: _transitions2.default.easeOut() + }, + rootWhenOpen: { + opacity: 1 + }, + underline: { + borderTop: 'solid 1px ' + accentColor, + bottom: 1, + left: 0, + margin: '-1px ' + spacing.desktopGutter + 'px', + right: 0, + position: 'absolute' + } + }; +} + +var DropDownMenu = function (_Component) { + (0, _inherits3.default)(DropDownMenu, _Component); + + function DropDownMenu() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DropDownMenu); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DropDownMenu.__proto__ || (0, _getPrototypeOf2.default)(DropDownMenu)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.rootNode = undefined, _this.arrowNode = undefined, _this.handleTouchTapControl = function (event) { + event.preventDefault(); + if (!_this.props.disabled) { + _this.setState({ + open: !_this.state.open, + anchorEl: _this.rootNode + }); + } + }, _this.handleRequestCloseMenu = function () { + _this.close(false); + }, _this.handleEscKeyDownMenu = function () { + _this.close(true); + }, _this.handleKeyDown = function (event) { + switch ((0, _keycode2.default)(event)) { + case 'up': + case 'down': + case 'space': + case 'enter': + event.preventDefault(); + _this.setState({ + open: true, + anchorEl: _this.rootNode + }); + break; + } + }, _this.handleItemTouchTap = function (event, child, index) { + event.persist(); + _this.setState({ + open: false + }, function () { + if (_this.props.onChange) { + _this.props.onChange(event, index, child.props.value); + } + + _this.close(_events2.default.isKeyboard(event)); + }); + }, _this.close = function (isKeyboard) { + _this.setState({ + open: false + }, function () { + if (_this.props.onClose) { + _this.props.onClose(); + } + + if (isKeyboard) { + var dropArrow = _this.arrowNode; + var dropNode = _reactDom2.default.findDOMNode(dropArrow); + dropNode.focus(); + dropArrow.setKeyboardFocus(true); + } + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + // The nested styles for drop-down-menu are modified by toolbar and possibly + // other user components, so it will give full access to its js styles rather + // than just the parent. + + + (0, _createClass3.default)(DropDownMenu, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var _this2 = this; + + if (this.props.autoWidth) { + this.setWidth(); + } + if (this.props.openImmediately) { + // TODO: Temporary fix to make openImmediately work with popover. + /* eslint-disable react/no-did-mount-set-state */ + setTimeout(function () { + return _this2.setState({ + open: true, + anchorEl: _this2.rootNode + }); + }, 0); + /* eslint-enable react/no-did-mount-set-state */ + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps() { + if (this.props.autoWidth) { + this.setWidth(); + } + } + }, { + key: 'getInputNode', + + + /** + * This method is deprecated but still here because the TextField + * need it in order to work. TODO: That will be addressed later. + */ + value: function getInputNode() { + var _this3 = this; + + var rootNode = this.rootNode; + + rootNode.focus = function () { + if (!_this3.props.disabled) { + _this3.setState({ + open: !_this3.state.open, + anchorEl: _this3.rootNode + }); + } + }; + + return rootNode; + } + }, { + key: 'setWidth', + value: function setWidth() { + var el = this.rootNode; + if (!this.props.style || !this.props.style.hasOwnProperty('width')) { + el.style.width = 'auto'; + } + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + + var _props = this.props, + animated = _props.animated, + animation = _props.animation, + autoWidth = _props.autoWidth, + children = _props.children, + className = _props.className, + iconStyle = _props.iconStyle, + labelStyle = _props.labelStyle, + listStyle = _props.listStyle, + maxHeight = _props.maxHeight, + menuStyleProp = _props.menuStyle, + onClose = _props.onClose, + openImmediately = _props.openImmediately, + menuItemStyle = _props.menuItemStyle, + selectedMenuItemStyle = _props.selectedMenuItemStyle, + style = _props.style, + underlineStyle = _props.underlineStyle, + value = _props.value, + other = (0, _objectWithoutProperties3.default)(_props, ['animated', 'animation', 'autoWidth', 'children', 'className', 'iconStyle', 'labelStyle', 'listStyle', 'maxHeight', 'menuStyle', 'onClose', 'openImmediately', 'menuItemStyle', 'selectedMenuItemStyle', 'style', 'underlineStyle', 'value']); + var _state = this.state, + anchorEl = _state.anchorEl, + open = _state.open; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var displayValue = ''; + _react2.default.Children.forEach(children, function (child) { + if (child && value === child.props.value) { + // This will need to be improved (in case primaryText is a node) + displayValue = child.props.label || child.props.primaryText; + } + }); + + var menuStyle = void 0; + if (anchorEl && !autoWidth) { + menuStyle = (0, _simpleAssign2.default)({ + width: anchorEl.clientWidth + }, menuStyleProp); + } else { + menuStyle = menuStyleProp; + } + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { + ref: function ref(node) { + _this4.rootNode = node; + }, + className: className, + style: prepareStyles((0, _simpleAssign2.default)({}, styles.root, open && styles.rootWhenOpen, style)) + }), + _react2.default.createElement( + _ClearFix2.default, + { style: styles.control, onTouchTap: this.handleTouchTapControl }, + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.label, open && styles.labelWhenOpen, labelStyle)) }, + displayValue + ), + _react2.default.createElement( + _IconButton2.default, + { + tabIndex: this.props.disabled ? -1 : undefined, + onKeyDown: this.handleKeyDown, + ref: function ref(node) { + _this4.arrowNode = node; + }, + style: (0, _simpleAssign2.default)({}, styles.icon, iconStyle), + iconStyle: styles.iconChildren + }, + _react2.default.createElement(_arrowDropDown2.default, null) + ), + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.underline, underlineStyle)) }) + ), + _react2.default.createElement( + _Popover2.default, + { + anchorOrigin: anchorOrigin, + anchorEl: anchorEl, + animation: animation || _PopoverAnimationVertical2.default, + open: open, + animated: animated, + onRequestClose: this.handleRequestCloseMenu + }, + _react2.default.createElement( + _Menu2.default, + { + maxHeight: maxHeight, + desktop: true, + value: value, + onEscKeyDown: this.handleEscKeyDownMenu, + style: menuStyle, + listStyle: listStyle, + onItemTouchTap: this.handleItemTouchTap, + menuItemStyle: menuItemStyle, + selectedMenuItemStyle: selectedMenuItemStyle + }, + children + ) + ) + ); + } + }]); + return DropDownMenu; +}(_react.Component); + +DropDownMenu.muiName = 'DropDownMenu'; +DropDownMenu.defaultProps = { + animated: true, + autoWidth: true, + disabled: false, + openImmediately: false, + maxHeight: 500 +}; +DropDownMenu.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? DropDownMenu.propTypes = { + /** + * If true, the popover will apply transitions when + * it gets added to the DOM. + */ + animated: _react.PropTypes.bool, + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * The width will automatically be set according to the items inside the menu. + * To control this width in css instead, set this prop to `false`. + */ + autoWidth: _react.PropTypes.bool, + /** + * The `MenuItem`s to populate the `Menu` with. If the `MenuItems` have the + * prop `label` that value will be used to render the representation of that + * item within the field. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Disables the menu. + */ + disabled: _react.PropTypes.bool, + /** + * Overrides the styles of icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Overrides the styles of label when the `DropDownMenu` is inactive. + */ + labelStyle: _react.PropTypes.object, + /** + * The style object to use to override underlying list style. + */ + listStyle: _react.PropTypes.object, + /** + * The maximum height of the `Menu` when it is displayed. + */ + maxHeight: _react.PropTypes.number, + /** + * Override the inline-styles of menu items. + */ + menuItemStyle: _react.PropTypes.object, + /** + * Overrides the styles of `Menu` when the `DropDownMenu` is displayed. + */ + menuStyle: _react.PropTypes.object, + /** + * Callback function fired when a menu item is clicked, other than the one currently selected. + * + * @param {object} event TouchTap event targeting the menu item that was clicked. + * @param {number} key The index of the clicked menu item in the `children` collection. + * @param {any} payload The `value` prop of the clicked menu item. + */ + onChange: _react.PropTypes.func, + /** + * Callback function fired when the menu is closed. + */ + onClose: _react.PropTypes.func, + /** + * Set to true to have the `DropDownMenu` automatically open on mount. + */ + openImmediately: _react.PropTypes.bool, + /** + * Override the inline-styles of selected menu items. + */ + selectedMenuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Overrides the inline-styles of the underline. + */ + underlineStyle: _react.PropTypes.object, + /** + * The value that is currently selected. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = DropDownMenu; + +/***/ }), +/* 791 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationArrowDropDown = function NavigationArrowDropDown(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M7 10l5 5 5-5z' }) + ); +}; +NavigationArrowDropDown = (0, _pure2.default)(NavigationArrowDropDown); +NavigationArrowDropDown.displayName = 'NavigationArrowDropDown'; +NavigationArrowDropDown.muiName = 'SvgIcon'; + +exports.default = NavigationArrowDropDown; + +/***/ }), +/* 792 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _BeforeAfterWrapper = __webpack_require__(793); + +var _BeforeAfterWrapper2 = _interopRequireDefault(_BeforeAfterWrapper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + before: { + content: "' '", + display: 'table' + }, + after: { + content: "' '", + clear: 'both', + display: 'table' + } +}; + +var ClearFix = function ClearFix(_ref) { + var style = _ref.style, + children = _ref.children, + other = (0, _objectWithoutProperties3.default)(_ref, ['style', 'children']); + return _react2.default.createElement( + _BeforeAfterWrapper2.default, + (0, _extends3.default)({}, other, { + beforeStyle: styles.before, + afterStyle: styles.after, + style: style + }), + children + ); +}; + +ClearFix.muiName = 'ClearFix'; + + false ? ClearFix.propTypes = { + children: _react.PropTypes.node, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +exports.default = ClearFix; + +/***/ }), +/* 793 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * BeforeAfterWrapper + * An alternative for the ::before and ::after css pseudo-elements for + * components whose styles are defined in javascript instead of css. + * + * Usage: For the element that we want to apply before and after elements to, + * wrap its children with BeforeAfterWrapper. For example: + * + * <Paper> + * <Paper> <div> // See notice + * <BeforeAfterWrapper> renders <div/> // before element + * [children of paper] ------> [children of paper] + * </BeforeAfterWrapper> <div/> // after element + * </Paper> </div> + * </Paper> + * + * Notice: Notice that this div bundles together our elements. If the element + * that we want to apply before and after elements is a HTML tag (i.e. a + * div, p, or button tag), we can avoid this extra nesting by passing using + * the BeforeAfterWrapper in place of said tag like so: + * + * <p> + * <BeforeAfterWrapper> do this instead <BeforeAfterWrapper elementType='p'> + * [children of p] ------> [children of p] + * </BeforeAfterWrapper> </BeforeAfterWrapper> + * </p> + * + * BeforeAfterWrapper features spread functionality. This means that we can + * pass HTML tag properties directly into the BeforeAfterWrapper tag. + * + * When using BeforeAfterWrapper, ensure that the parent of the beforeElement + * and afterElement have a defined style position. + */ + +var styles = { + box: { + boxSizing: 'border-box' + } +}; + +var BeforeAfterWrapper = function (_Component) { + (0, _inherits3.default)(BeforeAfterWrapper, _Component); + + function BeforeAfterWrapper() { + (0, _classCallCheck3.default)(this, BeforeAfterWrapper); + return (0, _possibleConstructorReturn3.default)(this, (BeforeAfterWrapper.__proto__ || (0, _getPrototypeOf2.default)(BeforeAfterWrapper)).apply(this, arguments)); + } + + (0, _createClass3.default)(BeforeAfterWrapper, [{ + key: 'render', + value: function render() { + var _props = this.props, + beforeStyle = _props.beforeStyle, + afterStyle = _props.afterStyle, + beforeElementType = _props.beforeElementType, + afterElementType = _props.afterElementType, + elementType = _props.elementType, + other = (0, _objectWithoutProperties3.default)(_props, ['beforeStyle', 'afterStyle', 'beforeElementType', 'afterElementType', 'elementType']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var beforeElement = void 0; + var afterElement = void 0; + + if (beforeStyle) { + beforeElement = _react2.default.createElement(this.props.beforeElementType, { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.box, beforeStyle)), + key: '::before' + }); + } + + if (afterStyle) { + afterElement = _react2.default.createElement(this.props.afterElementType, { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.box, afterStyle)), + key: '::after' + }); + } + + var children = [beforeElement, this.props.children, afterElement]; + + var props = other; + props.style = prepareStyles((0, _simpleAssign2.default)({}, this.props.style)); + + return _react2.default.createElement(this.props.elementType, props, children); + } + }]); + return BeforeAfterWrapper; +}(_react.Component); + +BeforeAfterWrapper.defaultProps = { + beforeElementType: 'div', + afterElementType: 'div', + elementType: 'div' +}; +BeforeAfterWrapper.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? BeforeAfterWrapper.propTypes = { + afterElementType: _react.PropTypes.string, + afterStyle: _react.PropTypes.object, + beforeElementType: _react.PropTypes.string, + beforeStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + elementType: _react.PropTypes.string, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = BeforeAfterWrapper; + +/***/ }), +/* 794 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _Slider = __webpack_require__(795); + +var _Slider2 = _interopRequireDefault(_Slider); + +var _createComponent = __webpack_require__(40); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(63); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_Slider2.default, function (_ref) { + var _ref$input = _ref.input, + onDragStart = _ref$input.onDragStart, + _onChange = _ref$input.onChange, + inputProps = _objectWithoutProperties(_ref$input, ['onDragStart', 'onChange']), + onChangeFromField = _ref.onChange, + defaultValue = _ref.defaultValue, + props = _objectWithoutProperties(_ref, ['input', 'onChange', 'defaultValue']); + + return _extends({}, (0, _mapError2.default)(_extends({}, props, { input: inputProps }), 'error'), { + onChange: function onChange(event, value) { + _onChange(value); + if (onChangeFromField) { + onChangeFromField(value); + } + } + }); +}); + +/***/ }), +/* 795 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Slider = __webpack_require__(796); + +var _Slider2 = _interopRequireDefault(_Slider); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Slider2.default; + +/***/ }), +/* 796 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _defineProperty2 = __webpack_require__(797); + +var _defineProperty3 = _interopRequireDefault(_defineProperty2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _keycode = __webpack_require__(27); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _FocusRipple = __webpack_require__(202); + +var _FocusRipple2 = _interopRequireDefault(_FocusRipple); + +var _deprecatedPropType = __webpack_require__(798); + +var _deprecatedPropType2 = _interopRequireDefault(_deprecatedPropType); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Verifies min/max range. + * @param {Object} props Properties of the React component. + * @param {String} propName Name of the property to validate. + * @param {String} componentName Name of the component whose property is being validated. + * @returns {Object} Returns an Error if min >= max otherwise null. + */ +var minMaxPropType = function minMaxPropType(props, propName, componentName) { + for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { + rest[_key - 3] = arguments[_key]; + } + + var error = _react.PropTypes.number.apply(_react.PropTypes, [props, propName, componentName].concat(rest)); + if (error !== null) { + return error; + } + + if (props.min >= props.max) { + var errorMsg = propName === 'min' ? 'min should be less than max' : 'max should be greater than min'; + return new Error(errorMsg); + } +}; + +/** + * Verifies value is within the min/max range. + * @param {Object} props Properties of the React component. + * @param {String} propName Name of the property to validate. + * @param {String} componentName Name of the component whose property is being validated. + * @returns {Object} Returns an Error if the value is not within the range otherwise null. + */ +var valueInRangePropType = function valueInRangePropType(props, propName, componentName) { + for (var _len2 = arguments.length, rest = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) { + rest[_key2 - 3] = arguments[_key2]; + } + + var error = _react.PropTypes.number.apply(_react.PropTypes, [props, propName, componentName].concat(rest)); + if (error !== null) { + return error; + } + + var value = props[propName]; + if (value < props.min || props.max < value) { + return new Error(propName + ' should be within the range specified by min and max'); + } +}; + +var crossAxisProperty = { + x: 'height', + 'x-reverse': 'height', + y: 'width', + 'y-reverse': 'width' +}; + +var crossAxisOffsetProperty = { + x: 'top', + 'x-reverse': 'top', + y: 'left', + 'y-reverse': 'left' +}; + +var mainAxisProperty = { + x: 'width', + 'x-reverse': 'width', + y: 'height', + 'y-reverse': 'height' +}; + +var mainAxisMarginFromEnd = { + x: 'marginRight', + 'x-reverse': 'marginLeft', + y: 'marginTop', + 'y-reverse': 'marginBottom' +}; + +var mainAxisMarginFromStart = { + x: 'marginLeft', + 'x-reverse': 'marginRight', + y: 'marginBottom', + 'y-reverse': 'marginTop' +}; + +var mainAxisOffsetProperty = { + x: 'left', + 'x-reverse': 'right', + y: 'bottom', + 'y-reverse': 'top' +}; + +var mainAxisClientProperty = { + x: 'clientWidth', + 'x-reverse': 'clientWidth', + y: 'clientHeight', + 'y-reverse': 'clientHeight' +}; + +var mainAxisClientOffsetProperty = { + x: 'clientX', + 'x-reverse': 'clientX', + y: 'clientY', + 'y-reverse': 'clientY' +}; + +var reverseMainAxisOffsetProperty = { + x: 'right', + 'x-reverse': 'left', + y: 'top', + 'y-reverse': 'bottom' +}; + +var isMouseControlInverted = function isMouseControlInverted(axis) { + return axis === 'x-reverse' || axis === 'y'; +}; + +function getPercent(value, min, max) { + var percent = (value - min) / (max - min); + if (isNaN(percent)) { + percent = 0; + } + + return percent; +} + +var getStyles = function getStyles(props, context, state) { + var _slider, _track, _filledAndRemaining, _handle, _objectAssign2, _objectAssign3; + + var axis = props.axis, + disabled = props.disabled, + max = props.max, + min = props.min; + var _context$muiTheme$sli = context.muiTheme.slider, + handleColorZero = _context$muiTheme$sli.handleColorZero, + handleFillColor = _context$muiTheme$sli.handleFillColor, + handleSize = _context$muiTheme$sli.handleSize, + handleSizeDisabled = _context$muiTheme$sli.handleSizeDisabled, + handleSizeActive = _context$muiTheme$sli.handleSizeActive, + trackSize = _context$muiTheme$sli.trackSize, + trackColor = _context$muiTheme$sli.trackColor, + trackColorSelected = _context$muiTheme$sli.trackColorSelected, + rippleColor = _context$muiTheme$sli.rippleColor, + selectionColor = _context$muiTheme$sli.selectionColor; + + + var fillGutter = handleSize / 2; + var disabledGutter = trackSize + handleSizeDisabled / 2; + var calcDisabledSpacing = disabled ? ' - ' + disabledGutter + 'px' : ''; + var percent = getPercent(state.value, min, max); + + var styles = { + slider: (_slider = { + touchCallout: 'none', + userSelect: 'none', + cursor: 'default' + }, (0, _defineProperty3.default)(_slider, crossAxisProperty[axis], handleSizeActive), (0, _defineProperty3.default)(_slider, mainAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_slider, 'position', 'relative'), (0, _defineProperty3.default)(_slider, 'marginTop', 24), (0, _defineProperty3.default)(_slider, 'marginBottom', 48), _slider), + track: (_track = { + position: 'absolute' + }, (0, _defineProperty3.default)(_track, crossAxisOffsetProperty[axis], (handleSizeActive - trackSize) / 2), (0, _defineProperty3.default)(_track, mainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_track, mainAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_track, crossAxisProperty[axis], trackSize), _track), + filledAndRemaining: (_filledAndRemaining = { + position: 'absolute' + }, (0, _defineProperty3.default)(_filledAndRemaining, crossAxisOffsetProperty, 0), (0, _defineProperty3.default)(_filledAndRemaining, crossAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_filledAndRemaining, 'transition', _transitions2.default.easeOut(null, 'margin')), _filledAndRemaining), + handle: (_handle = { + boxSizing: 'border-box', + position: 'absolute', + cursor: 'pointer', + pointerEvents: 'inherit' + }, (0, _defineProperty3.default)(_handle, crossAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_handle, mainAxisOffsetProperty[axis], percent === 0 ? '0%' : percent * 100 + '%'), (0, _defineProperty3.default)(_handle, 'zIndex', 1), (0, _defineProperty3.default)(_handle, 'margin', { + x: trackSize / 2 + 'px 0 0 0', + 'x-reverse': trackSize / 2 + 'px 0 0 0', + y: '0 0 0 ' + trackSize / 2 + 'px', + 'y-reverse': '0 0 0 ' + trackSize / 2 + 'px' + }[axis]), (0, _defineProperty3.default)(_handle, 'width', handleSize), (0, _defineProperty3.default)(_handle, 'height', handleSize), (0, _defineProperty3.default)(_handle, 'backgroundColor', selectionColor), (0, _defineProperty3.default)(_handle, 'backgroundClip', 'padding-box'), (0, _defineProperty3.default)(_handle, 'border', '0px solid transparent'), (0, _defineProperty3.default)(_handle, 'borderRadius', '50%'), (0, _defineProperty3.default)(_handle, 'transform', { + x: 'translate(-50%, -50%)', + 'x-reverse': 'translate(50%, -50%)', + y: 'translate(-50%, 50%)', + 'y-reverse': 'translate(-50%, -50%)' + }[axis]), (0, _defineProperty3.default)(_handle, 'transition', _transitions2.default.easeOut('450ms', 'background') + ', ' + _transitions2.default.easeOut('450ms', 'border-color') + ', ' + _transitions2.default.easeOut('450ms', 'width') + ', ' + _transitions2.default.easeOut('450ms', 'height')), (0, _defineProperty3.default)(_handle, 'overflow', 'visible'), (0, _defineProperty3.default)(_handle, 'outline', 'none'), _handle), + handleWhenDisabled: { + boxSizing: 'content-box', + cursor: 'not-allowed', + backgroundColor: trackColor, + width: handleSizeDisabled, + height: handleSizeDisabled, + border: 'none' + }, + handleWhenPercentZero: { + border: trackSize + 'px solid ' + handleColorZero, + backgroundColor: handleFillColor, + boxShadow: 'none' + }, + handleWhenPercentZeroAndDisabled: { + cursor: 'not-allowed', + width: handleSizeDisabled, + height: handleSizeDisabled + }, + handleWhenPercentZeroAndFocused: { + border: trackSize + 'px solid ' + trackColorSelected + }, + handleWhenActive: { + width: handleSizeActive, + height: handleSizeActive + }, + ripple: { + height: handleSize, + width: handleSize, + overflow: 'visible' + }, + rippleWhenPercentZero: { + top: -trackSize, + left: -trackSize + }, + rippleInner: { + height: '300%', + width: '300%', + top: -handleSize, + left: -handleSize + }, + rippleColor: { + fill: percent === 0 ? handleColorZero : rippleColor + } + }; + styles.filled = (0, _simpleAssign2.default)({}, styles.filledAndRemaining, (_objectAssign2 = {}, (0, _defineProperty3.default)(_objectAssign2, mainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_objectAssign2, 'backgroundColor', disabled ? trackColor : selectionColor), (0, _defineProperty3.default)(_objectAssign2, mainAxisMarginFromEnd[axis], fillGutter), (0, _defineProperty3.default)(_objectAssign2, mainAxisProperty[axis], 'calc(' + percent * 100 + '%' + calcDisabledSpacing + ')'), _objectAssign2)); + styles.remaining = (0, _simpleAssign2.default)({}, styles.filledAndRemaining, (_objectAssign3 = {}, (0, _defineProperty3.default)(_objectAssign3, reverseMainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_objectAssign3, 'backgroundColor', (state.hovered || state.focused) && !disabled ? trackColorSelected : trackColor), (0, _defineProperty3.default)(_objectAssign3, mainAxisMarginFromStart[axis], fillGutter), (0, _defineProperty3.default)(_objectAssign3, mainAxisProperty[axis], 'calc(' + (1 - percent) * 100 + '%' + calcDisabledSpacing + ')'), _objectAssign3)); + + return styles; +}; + +var Slider = function (_Component) { + (0, _inherits3.default)(Slider, _Component); + + function Slider() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Slider); + + for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Slider.__proto__ || (0, _getPrototypeOf2.default)(Slider)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + active: false, + dragging: false, + focused: false, + hovered: false, + value: 0 + }, _this.track = null, _this.handle = null, _this.handleKeyDown = function (event) { + var _this$props = _this.props, + axis = _this$props.axis, + min = _this$props.min, + max = _this$props.max, + step = _this$props.step; + + + var action = void 0; + + switch ((0, _keycode2.default)(event)) { + case 'page down': + case 'down': + if (axis === 'y-reverse') { + action = 'increase'; + } else { + action = 'decrease'; + } + break; + case 'left': + if (axis === 'x-reverse') { + action = 'increase'; + } else { + action = 'decrease'; + } + break; + case 'page up': + case 'up': + if (axis === 'y-reverse') { + action = 'decrease'; + } else { + action = 'increase'; + } + break; + case 'right': + if (axis === 'x-reverse') { + action = 'decrease'; + } else { + action = 'increase'; + } + break; + case 'home': + action = 'min'; + break; + case 'end': + action = 'max'; + break; + } + + if (action) { + var newValue = void 0; + + // Cancel scroll + event.preventDefault(); + + switch (action) { + case 'decrease': + newValue = _this.state.value - step; + break; + case 'increase': + newValue = _this.state.value + step; + break; + case 'min': + newValue = min; + break; + case 'max': + newValue = max; + break; + } + + // We need to use toFixed() because of float point errors. + // For example, 0.01 + 0.06 = 0.06999999999999999 + newValue = parseFloat(newValue.toFixed(5)); + + if (newValue > max) { + newValue = max; + } else if (newValue < min) { + newValue = min; + } + + if (_this.state.value !== newValue) { + _this.setState({ + value: newValue + }); + + if (_this.props.onChange) { + _this.props.onChange(event, newValue); + } + } + } + }, _this.handleDragMouseMove = function (event) { + _this.onDragUpdate(event, 'mouse'); + }, _this.handleTouchMove = function (event) { + _this.onDragUpdate(event, 'touch'); + }, _this.handleMouseEnd = function (event) { + document.removeEventListener('mousemove', _this.handleDragMouseMove); + document.removeEventListener('mouseup', _this.handleMouseEnd); + + _this.onDragStop(event); + }, _this.handleTouchEnd = function (event) { + document.removeEventListener('touchmove', _this.handleTouchMove); + document.removeEventListener('touchup', _this.handleTouchEnd); + document.removeEventListener('touchend', _this.handleTouchEnd); + document.removeEventListener('touchcancel', _this.handleTouchEnd); + + _this.onDragStop(event); + }, _this.handleTouchStart = function (event) { + if (_this.props.disabled) { + return; + } + + var position = void 0; + if (isMouseControlInverted(_this.props.axis)) { + position = _this.getTrackOffset() - event.touches[0][mainAxisClientOffsetProperty[_this.props.axis]]; + } else { + position = event.touches[0][mainAxisClientOffsetProperty[_this.props.axis]] - _this.getTrackOffset(); + } + _this.setValueFromPosition(event, position); + + document.addEventListener('touchmove', _this.handleTouchMove); + document.addEventListener('touchup', _this.handleTouchEnd); + document.addEventListener('touchend', _this.handleTouchEnd); + document.addEventListener('touchcancel', _this.handleTouchEnd); + + _this.onDragStart(event); + + // Cancel scroll and context menu + event.preventDefault(); + }, _this.handleFocus = function (event) { + _this.setState({ + focused: true + }); + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleBlur = function (event) { + _this.setState({ + focused: false, + active: false + }); + + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleMouseDown = function (event) { + if (_this.props.disabled) { + return; + } + + var position = void 0; + if (isMouseControlInverted(_this.props.axis)) { + position = _this.getTrackOffset() - event[mainAxisClientOffsetProperty[_this.props.axis]]; + } else { + position = event[mainAxisClientOffsetProperty[_this.props.axis]] - _this.getTrackOffset(); + } + _this.setValueFromPosition(event, position); + + document.addEventListener('mousemove', _this.handleDragMouseMove); + document.addEventListener('mouseup', _this.handleMouseEnd); + + // Cancel text selection + event.preventDefault(); + + // Set focus manually since we called preventDefault() + _this.handle.focus(); + + _this.onDragStart(event); + }, _this.handleMouseUp = function () { + if (!_this.props.disabled) { + _this.setState({ + active: false + }); + } + }, _this.handleMouseEnter = function () { + _this.setState({ + hovered: true + }); + }, _this.handleMouseLeave = function () { + _this.setState({ + hovered: false + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Slider, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + valueProp = _props.value, + defaultValue = _props.defaultValue, + min = _props.min, + max = _props.max; + + + var value = valueProp; + if (value === undefined) { + value = defaultValue !== undefined ? defaultValue : min; + } + + if (value > max) { + value = max; + } else if (value < min) { + value = min; + } + + this.setState({ + value: value + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== undefined && !this.state.dragging) { + this.setState({ + value: nextProps.value + }); + } + } + }, { + key: 'getValue', + value: function getValue() { + false ? (0, _warning2.default)(false, 'Material-UI Slider: getValue() method is deprecated.\n Use the onChange callbacks instead.\n It will be removed with v0.17.0.') : void 0; + + return this.state.value; + } + }, { + key: 'clearValue', + value: function clearValue() { + false ? (0, _warning2.default)(false, 'Material-UI Slider: clearValue() method is deprecated.\n Use the value property to control the component instead.\n It will be removed with v0.17.0.') : void 0; + + this.setState({ + value: this.props.min + }); + } + }, { + key: 'getTrackOffset', + value: function getTrackOffset() { + return this.track.getBoundingClientRect()[mainAxisOffsetProperty[this.props.axis]]; + } + }, { + key: 'onDragStart', + value: function onDragStart(event) { + this.setState({ + dragging: true, + active: true + }); + + if (this.props.onDragStart) { + this.props.onDragStart(event); + } + } + }, { + key: 'onDragUpdate', + value: function onDragUpdate(event, type) { + var _this2 = this; + + if (this.dragRunning) { + return; + } + this.dragRunning = true; + + requestAnimationFrame(function () { + _this2.dragRunning = false; + + var source = type === 'touch' ? event.touches[0] : event; + + var position = void 0; + if (isMouseControlInverted(_this2.props.axis)) { + position = _this2.getTrackOffset() - source[mainAxisClientOffsetProperty[_this2.props.axis]]; + } else { + position = source[mainAxisClientOffsetProperty[_this2.props.axis]] - _this2.getTrackOffset(); + } + + if (!_this2.props.disabled) { + _this2.setValueFromPosition(event, position); + } + }); + } + }, { + key: 'onDragStop', + value: function onDragStop(event) { + this.setState({ + dragging: false, + active: false + }); + + if (this.props.onDragStop) { + this.props.onDragStop(event); + } + } + }, { + key: 'setValueFromPosition', + value: function setValueFromPosition(event, position) { + var positionMax = this.track[mainAxisClientProperty[this.props.axis]]; + if (position < 0) { + position = 0; + } else if (position > positionMax) { + position = positionMax; + } + + var _props2 = this.props, + step = _props2.step, + min = _props2.min, + max = _props2.max; + + + var value = void 0; + value = position / positionMax * (max - min); + value = Math.round(value / step) * step + min; + value = parseFloat(value.toFixed(5)); + + if (value > max) { + value = max; + } else if (value < min) { + value = min; + } + + if (this.state.value !== value) { + this.setState({ + value: value + }); + + if (this.props.onChange) { + this.props.onChange(event, value); + } + } + } + }, { + key: 'render', + value: function render() { + var _this3 = this; + + var _props3 = this.props, + axis = _props3.axis, + description = _props3.description, + disabled = _props3.disabled, + disableFocusRipple = _props3.disableFocusRipple, + error = _props3.error, + max = _props3.max, + min = _props3.min, + name = _props3.name, + onBlur = _props3.onBlur, + onChange = _props3.onChange, + onDragStart = _props3.onDragStart, + onDragStop = _props3.onDragStop, + onFocus = _props3.onFocus, + required = _props3.required, + sliderStyle = _props3.sliderStyle, + step = _props3.step, + style = _props3.style, + other = (0, _objectWithoutProperties3.default)(_props3, ['axis', 'description', 'disabled', 'disableFocusRipple', 'error', 'max', 'min', 'name', 'onBlur', 'onChange', 'onDragStart', 'onDragStop', 'onFocus', 'required', 'sliderStyle', 'step', 'style']); + var _state = this.state, + active = _state.active, + focused = _state.focused, + hovered = _state.hovered, + value = _state.value; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var percent = getPercent(value, min, max); + + var handleStyles = {}; + if (percent === 0) { + handleStyles = (0, _simpleAssign2.default)({}, styles.handle, styles.handleWhenPercentZero, active && styles.handleWhenActive, (hovered || focused) && !disabled && styles.handleWhenPercentZeroAndFocused, disabled && styles.handleWhenPercentZeroAndDisabled); + } else { + handleStyles = (0, _simpleAssign2.default)({}, styles.handle, active && styles.handleWhenActive, disabled && styles.handleWhenDisabled); + } + + var rippleStyle = (0, _simpleAssign2.default)({}, styles.ripple, percent === 0 && styles.rippleWhenPercentZero); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, style)) }), + _react2.default.createElement( + 'span', + null, + description + ), + _react2.default.createElement( + 'span', + null, + error + ), + _react2.default.createElement( + 'div', + { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.slider, sliderStyle)), + onFocus: this.handleFocus, + onBlur: this.handleBlur, + onMouseDown: this.handleMouseDown, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onMouseUp: this.handleMouseUp, + onTouchStart: this.handleTouchStart, + onKeyDown: !disabled && this.handleKeyDown + }, + _react2.default.createElement( + 'div', + { ref: function ref(node) { + return _this3.track = node; + }, style: prepareStyles(styles.track) }, + _react2.default.createElement('div', { style: prepareStyles(styles.filled) }), + _react2.default.createElement('div', { style: prepareStyles(styles.remaining) }), + _react2.default.createElement( + 'div', + { + ref: function ref(node) { + return _this3.handle = node; + }, + style: prepareStyles(handleStyles), + tabIndex: 0 + }, + !disabled && !disableFocusRipple && _react2.default.createElement(_FocusRipple2.default, { + style: rippleStyle, + innerStyle: styles.rippleInner, + show: (hovered || focused) && !active, + color: styles.rippleColor.fill + }) + ) + ) + ), + _react2.default.createElement('input', { + type: 'hidden', + name: name, + value: value, + required: required, + min: min, + max: max, + step: step + }) + ); + } + }]); + return Slider; +}(_react.Component); + +Slider.defaultProps = { + axis: 'x', + disabled: false, + disableFocusRipple: false, + max: 1, + min: 0, + required: true, + step: 0.01, + style: {} +}; +Slider.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Slider.propTypes = { + /** + * The axis on which the slider will slide. + */ + axis: _react.PropTypes.oneOf(['x', 'x-reverse', 'y', 'y-reverse']), + /** + * The default value of the slider. + */ + defaultValue: valueInRangePropType, + /** + * Describe the slider. + */ + description: (0, _deprecatedPropType2.default)(_react.PropTypes.node, 'Use a sibling node element instead. It will be removed with v0.17.0.'), + /** + * Disables focus ripple if set to true. + */ + disableFocusRipple: _react.PropTypes.bool, + /** + * If true, the slider will not be interactable. + */ + disabled: _react.PropTypes.bool, + /** + * An error message for the slider. + */ + error: (0, _deprecatedPropType2.default)(_react.PropTypes.node, 'Use a sibling node element instead. It will be removed with v0.17.0.'), + /** + * The maximum value the slider can slide to on + * a scale from 0 to 1 inclusive. Cannot be equal to min. + */ + max: minMaxPropType, + /** + * The minimum value the slider can slide to on a scale + * from 0 to 1 inclusive. Cannot be equal to max. + */ + min: minMaxPropType, + /** + * The name of the slider. Behaves like the name attribute + * of an input element. + */ + name: _react.PropTypes.string, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function that is fired when the slider's value changed. + * + * @param {object} event KeyDown event targeting the slider. + * @param {number} newValue The new value of the slider. + */ + onChange: _react.PropTypes.func, + /** + * Callback function that is fired when the slider has begun to move. + * + * @param {object} event MouseDown or TouchStart event targeting the slider. + */ + onDragStart: _react.PropTypes.func, + /** + * Callback function that is fired when the slide has stopped moving. + * + * @param {object} event MouseEnd or TouchEnd event targeting the slider. + */ + onDragStop: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Whether or not the slider is required in a form. + */ + required: _react.PropTypes.bool, + /** + * Override the inline-styles of the inner slider element. + */ + sliderStyle: _react.PropTypes.object, + /** + * The granularity the slider can step through values. + */ + step: _react.PropTypes.number, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The value of the slider. + */ + value: valueInRangePropType +} : void 0; +exports.default = Slider; + +/***/ }), +/* 797 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _defineProperty = __webpack_require__(194); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (obj, key, value) { + if (key in obj) { + (0, _defineProperty2.default)(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +}; + +/***/ }), +/* 798 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = deprecated; + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var warned = {}; /** + * This module is taken from https://github.com/react-bootstrap/react-prop-types. + * It's not a dependency to reduce build size / install time. + * It should be pretty stable. + */ +function deprecated(validator, reason) { + return function validate(props, propName, componentName, location, propFullName) { + var componentNameSafe = componentName || '<<anonymous>>'; + var propFullNameSafe = propFullName || propName; + + if (props[propName] != null) { + var messageKey = componentName + '.' + propName; + + false ? (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason)) : void 0; + + warned[messageKey] = true; + } + + for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { + args[_key - 5] = arguments[_key]; + } + + return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args)); + }; +} + +/***/ }), +/* 799 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _TextField = __webpack_require__(97); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _createComponent = __webpack_require__(40); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(63); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_TextField2.default, function (_ref) { + var defaultValue = _ref.defaultValue, + props = _objectWithoutProperties(_ref, ['defaultValue']); + + return (0, _mapError2.default)(props); +}); + +/***/ }), +/* 800 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _TimePicker = __webpack_require__(801); + +var _TimePicker2 = _interopRequireDefault(_TimePicker); + +var _createComponent = __webpack_require__(40); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(63); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_TimePicker2.default, function (_ref) { + var _ref$input = _ref.input, + onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onBlur']), + defaultTime = _ref.defaultTime, + _onChange = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'defaultTime', 'onChange']); + + return _extends({}, inputProps, (0, _mapError2.default)(props), { + onChange: function onChange(event, value) { + inputProps.onChange(value); + if (_onChange) { + _onChange(value); + } + } + }); +}); + +/***/ }), +/* 801 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _TimePicker = __webpack_require__(802); + +var _TimePicker2 = _interopRequireDefault(_TimePicker); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _TimePicker2.default; + +/***/ }), +/* 802 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _TimePickerDialog = __webpack_require__(803); + +var _TimePickerDialog2 = _interopRequireDefault(_TimePickerDialog); + +var _TextField = __webpack_require__(97); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _timeUtils = __webpack_require__(98); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var emptyTime = new Date(); +emptyTime.setHours(0); +emptyTime.setMinutes(0); +emptyTime.setSeconds(0); +emptyTime.setMilliseconds(0); + +var TimePicker = function (_Component) { + (0, _inherits3.default)(TimePicker, _Component); + + function TimePicker() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TimePicker); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimePicker.__proto__ || (0, _getPrototypeOf2.default)(TimePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + time: null, + dialogTime: new Date() + }, _this.handleAcceptDialog = function (time) { + _this.setState({ + time: time + }); + if (_this.props.onChange) _this.props.onChange(null, time); + }, _this.handleFocusInput = function (event) { + event.target.blur(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleTouchTapInput = function (event) { + event.preventDefault(); + + if (!_this.props.disabled) { + _this.openDialog(); + } + + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TimePicker, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + time: this.isControlled() ? this.getControlledTime() : this.props.defaultTime + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== this.props.value) { + this.setState({ + time: this.getControlledTime(nextProps) + }); + } + } + + /** + * Alias for `openDialog()` for an api consistent with TextField. + */ + + }, { + key: 'focus', + value: function focus() { + this.openDialog(); + } + }, { + key: 'openDialog', + value: function openDialog() { + this.setState({ + dialogTime: this.state.time + }); + this.refs.dialogWindow.show(); + } + }, { + key: 'isControlled', + value: function isControlled() { + return this.props.value !== null; + } + }, { + key: 'getControlledTime', + value: function getControlledTime() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; + + var result = null; + if (props.value instanceof Date) { + result = props.value; + } + return result; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + autoOk = _props.autoOk, + cancelLabel = _props.cancelLabel, + defaultTime = _props.defaultTime, + dialogBodyStyle = _props.dialogBodyStyle, + dialogStyle = _props.dialogStyle, + format = _props.format, + okLabel = _props.okLabel, + onFocus = _props.onFocus, + onTouchTap = _props.onTouchTap, + onShow = _props.onShow, + onDismiss = _props.onDismiss, + pedantic = _props.pedantic, + style = _props.style, + textFieldStyle = _props.textFieldStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['autoOk', 'cancelLabel', 'defaultTime', 'dialogBodyStyle', 'dialogStyle', 'format', 'okLabel', 'onFocus', 'onTouchTap', 'onShow', 'onDismiss', 'pedantic', 'style', 'textFieldStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + var time = this.state.time; + + + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + style: textFieldStyle, + ref: 'input', + value: time === emptyTime ? null : (0, _timeUtils.formatTime)(time, format, pedantic), + onFocus: this.handleFocusInput, + onTouchTap: this.handleTouchTapInput + })), + _react2.default.createElement(_TimePickerDialog2.default, { + ref: 'dialogWindow', + bodyStyle: dialogBodyStyle, + initialTime: this.state.dialogTime, + onAccept: this.handleAcceptDialog, + onShow: onShow, + onDismiss: onDismiss, + format: format, + okLabel: okLabel, + cancelLabel: cancelLabel, + autoOk: autoOk, + style: dialogStyle + }) + ); + } + }]); + return TimePicker; +}(_react.Component); + +TimePicker.defaultProps = { + autoOk: false, + cancelLabel: 'Cancel', + defaultTime: null, + disabled: false, + format: 'ampm', + okLabel: 'OK', + pedantic: false, + style: {}, + value: null +}; +TimePicker.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TimePicker.propTypes = { + /** + * If true, automatically accept and close the picker on set minutes. + */ + autoOk: _react.PropTypes.bool, + /** + * Override the label of the 'Cancel' button. + */ + cancelLabel: _react.PropTypes.node, + /** + * The initial time value of the TimePicker. + */ + defaultTime: _react.PropTypes.object, + /** + * Override the inline-styles of TimePickerDialog's body element. + */ + dialogBodyStyle: _react.PropTypes.object, + /** + * Override the inline-styles of TimePickerDialog's root element. + */ + dialogStyle: _react.PropTypes.object, + /** + * If true, the TimePicker is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Tells the component to display the picker in `ampm` (12hr) format or `24hr` format. + */ + format: _react.PropTypes.oneOf(['ampm', '24hr']), + /** + * Override the label of the 'OK' button. + */ + okLabel: _react.PropTypes.node, + /** + * Callback function that is fired when the time value changes. The time value is passed in a Date Object. + * Since there is no particular event associated with the change the first argument will always be null + * and the second argument will be the new Date instance. + */ + onChange: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker dialog is dismissed. + */ + onDismiss: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker `TextField` gains focus. + */ + onFocus: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker dialog is shown. + */ + onShow: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker is tapped or clicked. + */ + onTouchTap: _react.PropTypes.func, + /** + * If true, uses ("noon" / "midnight") instead of ("12 a.m." / "12 p.m."). + * + * It's technically more correct to refer to "12 noon" and "12 midnight" rather than "12 a.m." and "12 p.m." + * and it avoids confusion between different locales. By default (for compatibility reasons) TimePicker uses + * ("12 a.m." / "12 p.m."). + */ + pedantic: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of TimePicker's TextField element. + */ + textFieldStyle: _react.PropTypes.object, + /** + * Sets the time for the Time Picker programmatically. + */ + value: _react.PropTypes.object +} : void 0; +exports.default = TimePicker; + +/***/ }), +/* 803 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(39); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(27); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _Clock = __webpack_require__(804); + +var _Clock2 = _interopRequireDefault(_Clock); + +var _Dialog = __webpack_require__(208); + +var _Dialog2 = _interopRequireDefault(_Dialog); + +var _FlatButton = __webpack_require__(132); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TimePickerDialog = function (_Component) { + (0, _inherits3.default)(TimePickerDialog, _Component); + + function TimePickerDialog() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TimePickerDialog); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(TimePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.handleRequestClose = function () { + _this.dismiss(); + }, _this.handleTouchTapCancel = function () { + _this.dismiss(); + }, _this.handleTouchTapOK = function () { + if (_this.props.onAccept) { + _this.props.onAccept(_this.refs.clock.getSelectedTime()); + } + _this.setState({ + open: false + }); + }, _this.handleKeyUp = function (event) { + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.handleTouchTapOK(); + break; + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TimePickerDialog, [{ + key: 'show', + value: function show() { + if (this.props.onShow && !this.state.open) this.props.onShow(); + this.setState({ + open: true + }); + } + }, { + key: 'dismiss', + value: function dismiss() { + if (this.props.onDismiss && this.state.open) this.props.onDismiss(); + this.setState({ + open: false + }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + bodyStyle = _props.bodyStyle, + initialTime = _props.initialTime, + onAccept = _props.onAccept, + format = _props.format, + autoOk = _props.autoOk, + okLabel = _props.okLabel, + cancelLabel = _props.cancelLabel, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['bodyStyle', 'initialTime', 'onAccept', 'format', 'autoOk', 'okLabel', 'cancelLabel', 'style']); + + + var styles = { + root: { + fontSize: 14, + color: this.context.muiTheme.timePicker.clockColor + }, + dialogContent: { + width: 280 + }, + body: { + padding: 0 + } + }; + + var actions = [_react2.default.createElement(_FlatButton2.default, { + key: 0, + label: cancelLabel, + primary: true, + onTouchTap: this.handleTouchTapCancel + }), _react2.default.createElement(_FlatButton2.default, { + key: 1, + label: okLabel, + primary: true, + onTouchTap: this.handleTouchTapOK + })]; + + var onClockChangeMinutes = autoOk === true ? this.handleTouchTapOK : undefined; + var open = this.state.open; + + return _react2.default.createElement( + _Dialog2.default, + (0, _extends3.default)({}, other, { + style: (0, _simpleAssign2.default)(styles.root, style), + bodyStyle: (0, _simpleAssign2.default)(styles.body, bodyStyle), + actions: actions, + contentStyle: styles.dialogContent, + repositionOnUpdate: false, + open: open, + onRequestClose: this.handleRequestClose + }), + open && _react2.default.createElement(_reactEventListener2.default, { target: 'window', onKeyUp: this.handleKeyUp }), + open && _react2.default.createElement(_Clock2.default, { + ref: 'clock', + format: format, + initialTime: initialTime, + onChangeMinutes: onClockChangeMinutes + }) + ); + } + }]); + return TimePickerDialog; +}(_react.Component); + +TimePickerDialog.defaultProps = { + okLabel: 'OK', + cancelLabel: 'Cancel' +}; +TimePickerDialog.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TimePickerDialog.propTypes = { + autoOk: _react.PropTypes.bool, + bodyStyle: _react.PropTypes.object, + cancelLabel: _react.PropTypes.node, + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialTime: _react.PropTypes.object, + okLabel: _react.PropTypes.node, + onAccept: _react.PropTypes.func, + onDismiss: _react.PropTypes.func, + onShow: _react.PropTypes.func, + style: _react.PropTypes.object +} : void 0; +exports.default = TimePickerDialog; + +/***/ }), +/* 804 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _TimeDisplay = __webpack_require__(805); + +var _TimeDisplay2 = _interopRequireDefault(_TimeDisplay); + +var _ClockHours = __webpack_require__(811); + +var _ClockHours2 = _interopRequireDefault(_ClockHours); + +var _ClockMinutes = __webpack_require__(812); + +var _ClockMinutes2 = _interopRequireDefault(_ClockMinutes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Clock = function (_Component) { + (0, _inherits3.default)(Clock, _Component); + + function Clock() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Clock); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Clock.__proto__ || (0, _getPrototypeOf2.default)(Clock)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + selectedTime: null, + mode: 'hour' + }, _this.setMode = function (mode) { + setTimeout(function () { + _this.setState({ + mode: mode + }); + }, 100); + }, _this.handleSelectAffix = function (affix) { + if (affix === _this.getAffix()) return; + + var hours = _this.state.selectedTime.getHours(); + + if (affix === 'am') { + _this.handleChangeHours(hours - 12, affix); + return; + } + + _this.handleChangeHours(hours + 12, affix); + }, _this.handleChangeHours = function (hours, finished) { + var time = new Date(_this.state.selectedTime); + var affix = void 0; + + if (typeof finished === 'string') { + affix = finished; + finished = undefined; + } + if (!affix) { + affix = _this.getAffix(); + } + if (affix === 'pm' && hours < 12) { + hours += 12; + } + + time.setHours(hours); + _this.setState({ + selectedTime: time + }); + + if (finished) { + setTimeout(function () { + _this.setState({ + mode: 'minute' + }); + + var onChangeHours = _this.props.onChangeHours; + + if (onChangeHours) { + onChangeHours(time); + } + }, 100); + } + }, _this.handleChangeMinutes = function (minutes, finished) { + var time = new Date(_this.state.selectedTime); + time.setMinutes(minutes); + _this.setState({ + selectedTime: time + }); + + var onChangeMinutes = _this.props.onChangeMinutes; + + if (onChangeMinutes && finished) { + setTimeout(function () { + onChangeMinutes(time); + }, 0); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Clock, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + selectedTime: this.props.initialTime || new Date() + }); + } + }, { + key: 'getAffix', + value: function getAffix() { + if (this.props.format !== 'ampm') return ''; + + var hours = this.state.selectedTime.getHours(); + if (hours < 12) { + return 'am'; + } + + return 'pm'; + } + }, { + key: 'getSelectedTime', + value: function getSelectedTime() { + return this.state.selectedTime; + } + }, { + key: 'render', + value: function render() { + var clock = null; + + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + timePicker = _context$muiTheme.timePicker; + + + var styles = { + root: { + userSelect: 'none' + }, + container: { + height: 280, + padding: 10, + position: 'relative', + boxSizing: 'content-box' + }, + circle: { + position: 'absolute', + top: 20, + width: 260, + height: 260, + borderRadius: '100%', + backgroundColor: timePicker.clockCircleColor + } + }; + + if (this.state.mode === 'hour') { + clock = _react2.default.createElement(_ClockHours2.default, { + key: 'hours', + format: this.props.format, + onChange: this.handleChangeHours, + initialHours: this.state.selectedTime.getHours() + }); + } else { + clock = _react2.default.createElement(_ClockMinutes2.default, { + key: 'minutes', + onChange: this.handleChangeMinutes, + initialMinutes: this.state.selectedTime.getMinutes() + }); + } + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement(_TimeDisplay2.default, { + selectedTime: this.state.selectedTime, + mode: this.state.mode, + format: this.props.format, + affix: this.getAffix(), + onSelectAffix: this.handleSelectAffix, + onSelectHour: this.setMode.bind(this, 'hour'), + onSelectMin: this.setMode.bind(this, 'minute') + }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.container) }, + _react2.default.createElement('div', { style: prepareStyles(styles.circle) }), + clock + ) + ); + } + }]); + return Clock; +}(_react.Component); + +Clock.defaultProps = { + initialTime: new Date() +}; +Clock.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Clock.propTypes = { + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialTime: _react.PropTypes.object, + onChangeHours: _react.PropTypes.func, + onChangeMinutes: _react.PropTypes.func +} : void 0; +exports.default = Clock; + +/***/ }), +/* 805 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _slicedToArray2 = __webpack_require__(328); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TimeDisplay = function (_Component) { + (0, _inherits3.default)(TimeDisplay, _Component); + + function TimeDisplay() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TimeDisplay); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimeDisplay.__proto__ || (0, _getPrototypeOf2.default)(TimeDisplay)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + transitionDirection: 'up' + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TimeDisplay, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.selectedTime !== this.props.selectedTime) { + var direction = nextProps.selectedTime > this.props.selectedTime ? 'up' : 'down'; + + this.setState({ + transitionDirection: direction + }); + } + } + }, { + key: 'sanitizeTime', + value: function sanitizeTime() { + var hour = this.props.selectedTime.getHours(); + var min = this.props.selectedTime.getMinutes().toString(); + + if (this.props.format === 'ampm') { + hour %= 12; + hour = hour || 12; + } + + hour = hour.toString(); + if (hour.length < 2) hour = '0' + hour; + if (min.length < 2) min = '0' + min; + + return [hour, min]; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + affix = _props.affix, + format = _props.format, + mode = _props.mode, + onSelectAffix = _props.onSelectAffix, + onSelectHour = _props.onSelectHour, + onSelectMin = _props.onSelectMin, + selectedTime = _props.selectedTime, + other = (0, _objectWithoutProperties3.default)(_props, ['affix', 'format', 'mode', 'onSelectAffix', 'onSelectHour', 'onSelectMin', 'selectedTime']); + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + timePicker = _context$muiTheme.timePicker; + + + var styles = { + root: { + padding: '14px 0', + borderTopLeftRadius: 2, + borderTopRightRadius: 2, + backgroundColor: timePicker.headerColor, + color: timePicker.textColor + }, + text: { + margin: '6px 0', + lineHeight: '58px', + height: 58, + fontSize: 58, + display: 'flex', + justifyContent: 'center', + alignItems: 'baseline' + }, + time: { + margin: '0 10px' + }, + affix: { + flex: 1, + position: 'relative', + lineHeight: '17px', + height: 17, + fontSize: 17 + }, + affixTop: { + position: 'absolute', + top: -20, + left: 0 + }, + clickable: { + cursor: 'pointer' + }, + inactive: { + opacity: 0.7 + } + }; + + var _sanitizeTime = this.sanitizeTime(), + _sanitizeTime2 = (0, _slicedToArray3.default)(_sanitizeTime, 2), + hour = _sanitizeTime2[0], + min = _sanitizeTime2[1]; + + var buttons = []; + if (format === 'ampm') { + buttons = [_react2.default.createElement( + 'div', + { + key: 'pm', + style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, affix === 'pm' ? {} : styles.inactive)), + onTouchTap: function onTouchTap() { + return onSelectAffix('pm'); + } + }, + 'PM' + ), _react2.default.createElement( + 'div', + { + key: 'am', + style: prepareStyles((0, _simpleAssign2.default)({}, styles.affixTop, styles.clickable, affix === 'am' ? {} : styles.inactive)), + onTouchTap: function onTouchTap() { + return onSelectAffix('am'); + } + }, + 'AM' + )]; + } + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(styles.root) }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.text) }, + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.affix)) }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.time) }, + _react2.default.createElement( + 'span', + { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, mode === 'hour' ? {} : styles.inactive)), + onTouchTap: onSelectHour + }, + hour + ), + _react2.default.createElement( + 'span', + null, + ':' + ), + _react2.default.createElement( + 'span', + { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, mode === 'minute' ? {} : styles.inactive)), + onTouchTap: onSelectMin + }, + min + ) + ), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.affix)) }, + buttons + ) + ) + ); + } + }]); + return TimeDisplay; +}(_react.Component); + +TimeDisplay.defaultProps = { + affix: '', + mode: 'hour' +}; +TimeDisplay.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TimeDisplay.propTypes = { + affix: _react.PropTypes.oneOf(['', 'pm', 'am']), + format: _react.PropTypes.oneOf(['ampm', '24hr']), + mode: _react.PropTypes.oneOf(['hour', 'minute']), + onSelectAffix: _react.PropTypes.func, + onSelectHour: _react.PropTypes.func, + onSelectMin: _react.PropTypes.func, + selectedTime: _react.PropTypes.object.isRequired +} : void 0; +exports.default = TimeDisplay; + +/***/ }), +/* 806 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(807), __esModule: true }; + +/***/ }), +/* 807 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(124); +__webpack_require__(93); +module.exports = __webpack_require__(808); + +/***/ }), +/* 808 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(196) + , ITERATOR = __webpack_require__(23)('iterator') + , Iterators = __webpack_require__(80); +module.exports = __webpack_require__(18).isIterable = function(it){ + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + || Iterators.hasOwnProperty(classof(O)); +}; + +/***/ }), +/* 809 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(124); +__webpack_require__(93); +module.exports = __webpack_require__(810); + +/***/ }), +/* 810 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(34) + , get = __webpack_require__(195); +module.exports = __webpack_require__(18).getIterator = function(it){ + var iterFn = get(it); + if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; + +/***/ }), +/* 811 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(16); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _ClockNumber = __webpack_require__(330); + +var _ClockNumber2 = _interopRequireDefault(_ClockNumber); + +var _ClockPointer = __webpack_require__(331); + +var _ClockPointer2 = _interopRequireDefault(_ClockPointer); + +var _timeUtils = __webpack_require__(98); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ClockHours = function (_Component) { + (0, _inherits3.default)(ClockHours, _Component); + + function ClockHours() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClockHours); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockHours.__proto__ || (0, _getPrototypeOf2.default)(ClockHours)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) { + event.preventDefault(); + _this.setClock(event.nativeEvent, true); + }, _this.handleMove = function (event) { + event.preventDefault(); + if (_this.isMousePressed(event) !== 1) return; + _this.setClock(event.nativeEvent, false); + }, _this.handleTouchMove = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], false); + }, _this.handleTouchEnd = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], true); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClockHours, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var clockElement = _reactDom2.default.findDOMNode(this.refs.mask); + + this.center = { + x: clockElement.offsetWidth / 2, + y: clockElement.offsetHeight / 2 + }; + + this.basePoint = { + x: this.center.x, + y: 0 + }; + } + }, { + key: 'isMousePressed', + value: function isMousePressed(event) { + if (typeof event.buttons === 'undefined') { + return event.nativeEvent.which; + } + + return event.buttons; + } + }, { + key: 'setClock', + value: function setClock(event, finish) { + if (typeof event.offsetX === 'undefined') { + var offset = (0, _timeUtils.getTouchEventOffsetValues)(event); + + event.offsetX = offset.offsetX; + event.offsetY = offset.offsetY; + } + + var hours = this.getHours(event.offsetX, event.offsetY); + + this.props.onChange(hours, finish); + } + }, { + key: 'getHours', + value: function getHours(offsetX, offsetY) { + var step = 30; + var x = offsetX - this.center.x; + var y = offsetY - this.center.y; + var cx = this.basePoint.x - this.center.x; + var cy = this.basePoint.y - this.center.y; + + var atan = Math.atan2(cx, cy) - Math.atan2(x, y); + + var deg = (0, _timeUtils.rad2deg)(atan); + deg = Math.round(deg / step) * step; + deg %= 360; + + var value = Math.floor(deg / step) || 0; + + var delta = Math.pow(x, 2) + Math.pow(y, 2); + var distance = Math.sqrt(delta); + + value = value || 12; + if (this.props.format === '24hr') { + if (distance < 90) { + value += 12; + value %= 24; + } + } else { + value %= 12; + } + + return value; + } + }, { + key: 'getSelected', + value: function getSelected() { + var hour = this.props.initialHours; + + if (this.props.format === 'ampm') { + hour %= 12; + hour = hour || 12; + } + + return hour; + } + }, { + key: 'getHourNumbers', + value: function getHourNumbers() { + var _this2 = this; + + var style = { + pointerEvents: 'none' + }; + var hourSize = this.props.format === 'ampm' ? 12 : 24; + + var hours = []; + for (var i = 1; i <= hourSize; i++) { + hours.push(i % 24); + } + + return hours.map(function (hour) { + var isSelected = _this2.getSelected() === hour; + return _react2.default.createElement(_ClockNumber2.default, { + key: hour, + style: style, + isSelected: isSelected, + type: 'hour', + value: hour + }); + }); + } + }, { + key: 'render', + value: function render() { + var styles = { + root: { + height: '100%', + width: '100%', + borderRadius: '100%', + position: 'relative', + pointerEvents: 'none', + boxSizing: 'border-box' + }, + + hitMask: { + height: '100%', + width: '100%', + pointerEvents: 'auto' + } + }; + + var prepareStyles = this.context.muiTheme.prepareStyles; + + var hours = this.getSelected(); + var numbers = this.getHourNumbers(); + + return _react2.default.createElement( + 'div', + { ref: 'clock', style: prepareStyles(styles.root) }, + _react2.default.createElement(_ClockPointer2.default, { hasSelected: true, value: hours, type: 'hour' }), + numbers, + _react2.default.createElement('div', { + ref: 'mask', style: prepareStyles(styles.hitMask), onTouchMove: this.handleTouchMove, + onTouchEnd: this.handleTouchEnd, onMouseUp: this.handleUp, onMouseMove: this.handleMove + }) + ); + } + }]); + return ClockHours; +}(_react.Component); + +ClockHours.defaultProps = { + initialHours: new Date().getHours(), + onChange: function onChange() {}, + format: 'ampm' +}; +ClockHours.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ClockHours.propTypes = { + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialHours: _react.PropTypes.number, + onChange: _react.PropTypes.func +} : void 0; +exports.default = ClockHours; + +/***/ }), +/* 812 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _ClockNumber = __webpack_require__(330); + +var _ClockNumber2 = _interopRequireDefault(_ClockNumber); + +var _ClockPointer = __webpack_require__(331); + +var _ClockPointer2 = _interopRequireDefault(_ClockPointer); + +var _timeUtils = __webpack_require__(98); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ClockMinutes = function (_Component) { + (0, _inherits3.default)(ClockMinutes, _Component); + + function ClockMinutes() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClockMinutes); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockMinutes.__proto__ || (0, _getPrototypeOf2.default)(ClockMinutes)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) { + event.preventDefault(); + _this.setClock(event.nativeEvent, true); + }, _this.handleMove = function (event) { + event.preventDefault(); + if (_this.isMousePressed(event) !== 1) { + return; + } + _this.setClock(event.nativeEvent, false); + }, _this.handleTouch = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], event.type === 'touchend'); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClockMinutes, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var clockElement = this.refs.mask; + + this.center = { + x: clockElement.offsetWidth / 2, + y: clockElement.offsetHeight / 2 + }; + + this.basePoint = { + x: this.center.x, + y: 0 + }; + } + }, { + key: 'isMousePressed', + value: function isMousePressed(event) { + if (typeof event.buttons === 'undefined') { + return event.nativeEvent.which; + } + return event.buttons; + } + }, { + key: 'setClock', + value: function setClock(event, finish) { + if (typeof event.offsetX === 'undefined') { + var offset = (0, _timeUtils.getTouchEventOffsetValues)(event); + + event.offsetX = offset.offsetX; + event.offsetY = offset.offsetY; + } + + var minutes = this.getMinutes(event.offsetX, event.offsetY); + + this.props.onChange(minutes, finish); + } + }, { + key: 'getMinutes', + value: function getMinutes(offsetX, offsetY) { + var step = 6; + var x = offsetX - this.center.x; + var y = offsetY - this.center.y; + var cx = this.basePoint.x - this.center.x; + var cy = this.basePoint.y - this.center.y; + + var atan = Math.atan2(cx, cy) - Math.atan2(x, y); + + var deg = (0, _timeUtils.rad2deg)(atan); + deg = Math.round(deg / step) * step; + deg %= 360; + + var value = Math.floor(deg / step) || 0; + + return value; + } + }, { + key: 'getMinuteNumbers', + value: function getMinuteNumbers() { + var minutes = []; + for (var i = 0; i < 12; i++) { + minutes.push(i * 5); + } + var selectedMinutes = this.props.initialMinutes; + var hasSelected = false; + + var numbers = minutes.map(function (minute) { + var isSelected = selectedMinutes === minute; + if (isSelected) { + hasSelected = true; + } + return _react2.default.createElement(_ClockNumber2.default, { + key: minute, + isSelected: isSelected, + type: 'minute', + value: minute + }); + }); + + return { + numbers: numbers, + hasSelected: hasSelected, + selected: selectedMinutes + }; + } + }, { + key: 'render', + value: function render() { + var styles = { + root: { + height: '100%', + width: '100%', + borderRadius: '100%', + position: 'relative', + pointerEvents: 'none', + boxSizing: 'border-box' + }, + + hitMask: { + height: '100%', + width: '100%', + pointerEvents: 'auto' + } + }; + + var prepareStyles = this.context.muiTheme.prepareStyles; + + var minutes = this.getMinuteNumbers(); + + return _react2.default.createElement( + 'div', + { ref: 'clock', style: prepareStyles(styles.root) }, + _react2.default.createElement(_ClockPointer2.default, { value: minutes.selected, type: 'minute', hasSelected: minutes.hasSelected }), + minutes.numbers, + _react2.default.createElement('div', { + ref: 'mask', + style: prepareStyles(styles.hitMask), + onTouchMove: this.handleTouch, + onTouchEnd: this.handleTouch, + onMouseUp: this.handleUp, + onMouseMove: this.handleMove + }) + ); + } + }]); + return ClockMinutes; +}(_react.Component); + +ClockMinutes.defaultProps = { + initialMinutes: new Date().getMinutes(), + onChange: function onChange() {} +}; +ClockMinutes.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? ClockMinutes.propTypes = { + initialMinutes: _react.PropTypes.number, + onChange: _react.PropTypes.func +} : void 0; +exports.default = ClockMinutes; + +/***/ }), +/* 813 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _Toggle = __webpack_require__(209); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +var _createComponent = __webpack_require__(40); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_Toggle2.default, function (_ref) { + var _ref$input = _ref.input, + onChange = _ref$input.onChange, + value = _ref$input.value, + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']), + defaultToggled = _ref.defaultToggled, + meta = _ref.meta, + props = _objectWithoutProperties(_ref, ['input', 'defaultToggled', 'meta']); + + return _extends({}, inputProps, props, { + onToggle: onChange, + toggled: !!value + }); +}); + +/***/ }), +/* 814 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _Paper = __webpack_require__(31); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _EnhancedSwitch = __webpack_require__(206); + +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var disabled = props.disabled, + elementStyle = props.elementStyle, + trackSwitchedStyle = props.trackSwitchedStyle, + thumbSwitchedStyle = props.thumbSwitchedStyle, + trackStyle = props.trackStyle, + thumbStyle = props.thumbStyle, + iconStyle = props.iconStyle, + rippleStyle = props.rippleStyle, + labelStyle = props.labelStyle; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + toggle = _context$muiTheme.toggle; + + + var toggleSize = 20; + var toggleTrackWidth = 36; + var styles = { + icon: { + width: 36, + padding: '4px 0px 6px 2px' + }, + ripple: { + top: -10, + left: -10, + color: state.switched ? toggle.thumbOnColor : baseTheme.palette.textColor + }, + toggleElement: { + width: toggleTrackWidth + }, + track: { + transition: _transitions2.default.easeOut(), + width: '100%', + height: 14, + borderRadius: 30, + backgroundColor: toggle.trackOffColor + }, + thumb: { + transition: _transitions2.default.easeOut(), + position: 'absolute', + top: 1, + left: 0, + width: toggleSize, + height: toggleSize, + lineHeight: '24px', + borderRadius: '50%', + backgroundColor: toggle.thumbOffColor + }, + trackWhenSwitched: { + backgroundColor: toggle.trackOnColor + }, + thumbWhenSwitched: { + backgroundColor: toggle.thumbOnColor, + left: '100%' + }, + trackWhenDisabled: { + backgroundColor: toggle.trackDisabledColor + }, + thumbWhenDisabled: { + backgroundColor: toggle.thumbDisabledColor + }, + label: { + color: disabled ? toggle.labelDisabledColor : toggle.labelColor, + width: 'calc(100% - ' + (toggleTrackWidth + 10) + 'px)' + } + }; + + (0, _simpleAssign2.default)(styles.track, trackStyle, state.switched && styles.trackWhenSwitched, state.switched && trackSwitchedStyle, disabled && styles.trackWhenDisabled); + + (0, _simpleAssign2.default)(styles.thumb, thumbStyle, state.switched && styles.thumbWhenSwitched, state.switched && thumbSwitchedStyle, disabled && styles.thumbWhenDisabled); + + if (state.switched) { + styles.thumb.marginLeft = 0 - styles.thumb.width; + } + + (0, _simpleAssign2.default)(styles.icon, iconStyle); + + (0, _simpleAssign2.default)(styles.ripple, rippleStyle); + + (0, _simpleAssign2.default)(styles.label, labelStyle); + + (0, _simpleAssign2.default)(styles.toggleElement, elementStyle); + + return styles; +} + +var Toggle = function (_Component) { + (0, _inherits3.default)(Toggle, _Component); + + function Toggle() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Toggle); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Toggle.__proto__ || (0, _getPrototypeOf2.default)(Toggle)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + switched: false + }, _this.handleStateChange = function (newSwitched) { + _this.setState({ + switched: newSwitched + }); + }, _this.handleToggle = function (event, isInputChecked) { + if (_this.props.onToggle) { + _this.props.onToggle(event, isInputChecked); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Toggle, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + toggled = _props.toggled, + defaultToggled = _props.defaultToggled, + valueLink = _props.valueLink; + + + if (toggled || defaultToggled || valueLink && valueLink.value) { + this.setState({ + switched: true + }); + } + } + }, { + key: 'isToggled', + value: function isToggled() { + return this.refs.enhancedSwitch.isSwitched(); + } + }, { + key: 'setToggled', + value: function setToggled(newToggledValue) { + this.refs.enhancedSwitch.setSwitched(newToggledValue); + } + }, { + key: 'render', + value: function render() { + var _props2 = this.props, + defaultToggled = _props2.defaultToggled, + elementStyle = _props2.elementStyle, + onToggle = _props2.onToggle, + trackSwitchedStyle = _props2.trackSwitchedStyle, + thumbSwitchedStyle = _props2.thumbSwitchedStyle, + toggled = _props2.toggled, + other = (0, _objectWithoutProperties3.default)(_props2, ['defaultToggled', 'elementStyle', 'onToggle', 'trackSwitchedStyle', 'thumbSwitchedStyle', 'toggled']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + var toggleElement = _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.toggleElement)) }, + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.track)) }), + _react2.default.createElement(_Paper2.default, { style: styles.thumb, circle: true, zDepth: 1 }) + ); + + var enhancedSwitchProps = { + ref: 'enhancedSwitch', + inputType: 'checkbox', + switchElement: toggleElement, + rippleStyle: styles.ripple, + rippleColor: styles.ripple.color, + iconStyle: styles.icon, + trackStyle: styles.track, + thumbStyle: styles.thumb, + labelStyle: styles.label, + switched: this.state.switched, + onSwitch: this.handleToggle, + onParentShouldUpdate: this.handleStateChange, + labelPosition: this.props.labelPosition + }; + + if (this.props.hasOwnProperty('toggled')) { + enhancedSwitchProps.checked = toggled; + } else if (this.props.hasOwnProperty('defaultToggled')) { + enhancedSwitchProps.defaultChecked = defaultToggled; + } + + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps)); + } + }]); + return Toggle; +}(_react.Component); + +Toggle.defaultProps = { + defaultToggled: false, + disabled: false, + labelPosition: 'left' +}; +Toggle.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Toggle.propTypes = { + /** + * Determines whether the Toggle is initially turned on. + * **Warning:** This cannot be used in conjunction with `toggled`. + * Decide between using a controlled or uncontrolled input element and remove one of these props. + * More info: https://fb.me/react-controlled-components + */ + defaultToggled: _react.PropTypes.bool, + /** + * Will disable the toggle if true. + */ + disabled: _react.PropTypes.bool, + /** + * Overrides the inline-styles of the Toggle element. + */ + elementStyle: _react.PropTypes.object, + /** + * Overrides the inline-styles of the Icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Overrides the inline-styles of the input element. + */ + inputStyle: _react.PropTypes.object, + /** + * Label for toggle. + */ + label: _react.PropTypes.node, + /** + * Where the label will be placed next to the toggle. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * Overrides the inline-styles of the Toggle element label. + */ + labelStyle: _react.PropTypes.object, + /** + * Callback function that is fired when the toggle switch is toggled. + */ + onToggle: _react.PropTypes.func, + /** + * Override style of ripple. + */ + rippleStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override style for thumb. + */ + thumbStyle: _react.PropTypes.object, + /** + * Override the inline styles for thumb when the toggle switch is toggled on. + */ + thumbSwitchedStyle: _react.PropTypes.object, + /** + * Toggled if set to true. + */ + toggled: _react.PropTypes.bool, + /** + * Override style for track. + */ + trackStyle: _react.PropTypes.object, + /** + * Override the inline styles for track when the toggle switch is toggled on. + */ + trackSwitchedStyle: _react.PropTypes.object, + /** + * ValueLink prop for when using controlled toggle. + */ + valueLink: _react.PropTypes.object +} : void 0; +exports.default = Toggle; + +/***/ }), +/* 815 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _assign = __webpack_require__(48); + +var _assign2 = _interopRequireDefault(_assign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reduxForm = __webpack_require__(90); + +var _reactRedux = __webpack_require__(21); + +var _RaisedButton = __webpack_require__(96); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _reduxFormMaterialUi = __webpack_require__(131); + +var _Styles = __webpack_require__(62); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _FormValidators = __webpack_require__(133); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Menus = __webpack_require__(82); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var defaultValues = { + autoCheckout: false, + autoPay: false, + strictSize: true, + hideSoldOut: false, + captchaBypass: false, + addToCartDelay: 200, + checkoutDelay: 2000 +}; + +var Options = function Options(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'options-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'autoCheckout', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable auto checkout', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'autoPay', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable auto payment', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'strictSize', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable strict size checking', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'hideSoldOut', + component: _reduxFormMaterialUi.Toggle, + label: 'Hide sold out products', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'captchaBypass', + component: _reduxFormMaterialUi.Toggle, + label: 'Bypass captcha (beta)', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'addToCartDelay', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Add to cart delay (ms)', + hintText: 'Add to cart delay (ms)', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'checkoutDelay', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Checkout delay (ms)', + hintText: 'Checkout delay (ms)', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'maxPrice', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Maximum product price', + hintText: 'Maximum product price', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'minPrice', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Minimum product price', + hintText: 'Minimum product price', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; + +function mapStateToProps(state, ownProps) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + initialValues: (0, _assign2.default)({}, defaultValues, (settings[ownProps.shop] || {})[menus.MENU_OPTIONS] || {}) + }; +} + +Options.propTypes = { + shop: _react.PropTypes.string.isRequired +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({ + form: 'options' +})(Options)); + +/***/ }), +/* 816 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reduxForm = __webpack_require__(90); + +var _reactRedux = __webpack_require__(21); + +var _MenuItem = __webpack_require__(129); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +var _RaisedButton = __webpack_require__(96); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _reduxFormMaterialUi = __webpack_require__(131); + +var _Styles = __webpack_require__(62); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _Utils = __webpack_require__(332); + +var Utils = _interopRequireWildcard(_Utils); + +var _FormValidators = __webpack_require__(133); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Menus = __webpack_require__(82); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Sizes = function Sizes(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'biling-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'accessories', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Accessories', + hintText: 'Accessories', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 't-shirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'T-Shirts', + hintText: 'T-Shirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'pants', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Pants', + hintText: 'Pants', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizesPants.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shorts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shorts', + hintText: 'Shorts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizesPants.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'sweatshirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Sweatshirts', + hintText: 'Sweatshirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'tops-sweaters', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Tops/Sweaters', + hintText: 'Tops/Sweaters', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shirts', + hintText: 'Shirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'jackets', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Jackets', + hintText: 'Jackets', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shoes', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shoes', + hintText: 'Shoes', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.shoeSizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; + +Sizes.propTypes = { + shop: _react.PropTypes.string.isRequired +}; + +function mapStateToProps(state, ownProps) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + initialValues: (settings[ownProps.shop] || {})[menus.MENU_SIZES] || {} + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({ + form: 'sizes' +})(Sizes)); + +/***/ }), +/* 817 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _AppBar = __webpack_require__(818); + +var _AppBar2 = _interopRequireDefault(_AppBar); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _AppBar2.default; + +/***/ }), +/* 818 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _keys = __webpack_require__(59); + +var _keys2 = _interopRequireDefault(_keys); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +exports.getStyles = getStyles; + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _IconButton = __webpack_require__(81); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _menu = __webpack_require__(819); + +var _menu2 = _interopRequireDefault(_menu); + +var _Paper = __webpack_require__(31); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _propTypes = __webpack_require__(38); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var _context$muiTheme = context.muiTheme, + appBar = _context$muiTheme.appBar, + iconButtonSize = _context$muiTheme.button.iconButtonSize, + zIndex = _context$muiTheme.zIndex; + + + var flatButtonSize = 36; + + var styles = { + root: { + position: 'relative', + zIndex: zIndex.appBar, + width: '100%', + display: 'flex', + backgroundColor: appBar.color, + paddingLeft: appBar.padding, + paddingRight: appBar.padding + }, + title: { + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', + margin: 0, + paddingTop: 0, + letterSpacing: 0, + fontSize: 24, + fontWeight: appBar.titleFontWeight, + color: appBar.textColor, + height: appBar.height, + lineHeight: appBar.height + 'px' + }, + mainElement: { + boxFlex: 1, + flex: '1' + }, + iconButtonStyle: { + marginTop: (appBar.height - iconButtonSize) / 2, + marginRight: 8, + marginLeft: -16 + }, + iconButtonIconStyle: { + fill: appBar.textColor, + color: appBar.textColor + }, + flatButton: { + color: appBar.textColor, + marginTop: (iconButtonSize - flatButtonSize) / 2 + 1 + } + }; + + return styles; +} + +var AppBar = function (_Component) { + (0, _inherits3.default)(AppBar, _Component); + + function AppBar() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, AppBar); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AppBar.__proto__ || (0, _getPrototypeOf2.default)(AppBar)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapLeftIconButton = function (event) { + if (_this.props.onLeftIconButtonTouchTap) { + _this.props.onLeftIconButtonTouchTap(event); + } + }, _this.handleTouchTapRightIconButton = function (event) { + if (_this.props.onRightIconButtonTouchTap) { + _this.props.onRightIconButtonTouchTap(event); + } + }, _this.handleTitleTouchTap = function (event) { + if (_this.props.onTitleTouchTap) { + _this.props.onTitleTouchTap(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(AppBar, [{ + key: 'componentDidMount', + value: function componentDidMount() { + false ? (0, _warning2.default)(!this.props.iconElementLeft || !this.props.iconClassNameLeft, 'Material-UI: Properties iconElementLeft\n and iconClassNameLeft cannot be simultaneously defined. Please use one or the other.') : void 0; + + false ? (0, _warning2.default)(!this.props.iconElementRight || !this.props.iconClassNameRight, 'Material-UI: Properties iconElementRight\n and iconClassNameRight cannot be simultaneously defined. Please use one or the other.') : void 0; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + title = _props.title, + titleStyle = _props.titleStyle, + iconStyleLeft = _props.iconStyleLeft, + iconStyleRight = _props.iconStyleRight, + onTitleTouchTap = _props.onTitleTouchTap, + showMenuIconButton = _props.showMenuIconButton, + iconElementLeft = _props.iconElementLeft, + iconElementRight = _props.iconElementRight, + iconClassNameLeft = _props.iconClassNameLeft, + iconClassNameRight = _props.iconClassNameRight, + onLeftIconButtonTouchTap = _props.onLeftIconButtonTouchTap, + onRightIconButtonTouchTap = _props.onRightIconButtonTouchTap, + className = _props.className, + style = _props.style, + zDepth = _props.zDepth, + children = _props.children, + other = (0, _objectWithoutProperties3.default)(_props, ['title', 'titleStyle', 'iconStyleLeft', 'iconStyleRight', 'onTitleTouchTap', 'showMenuIconButton', 'iconElementLeft', 'iconElementRight', 'iconClassNameLeft', 'iconClassNameRight', 'onLeftIconButtonTouchTap', 'onRightIconButtonTouchTap', 'className', 'style', 'zDepth', 'children']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var menuElementLeft = void 0; + var menuElementRight = void 0; + + // If the title is a string, wrap in an h1 tag. + // If not, wrap in a div tag. + var titleComponent = typeof title === 'string' || title instanceof String ? 'h1' : 'div'; + + var titleElement = _react2.default.createElement(titleComponent, { + onTouchTap: this.handleTitleTouchTap, + style: prepareStyles((0, _simpleAssign2.default)(styles.title, styles.mainElement, titleStyle)) + }, title); + + var iconLeftStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, iconStyleLeft); + + if (showMenuIconButton) { + if (iconElementLeft) { + var iconElementLeftProps = {}; + + if (iconElementLeft.type.muiName === 'IconButton') { + var iconElemLeftChildren = iconElementLeft.props.children; + var iconButtonIconStyle = !(iconElemLeftChildren && iconElemLeftChildren.props && iconElemLeftChildren.props.color) ? styles.iconButtonIconStyle : null; + + iconElementLeftProps.iconStyle = (0, _simpleAssign2.default)({}, iconButtonIconStyle, iconElementLeft.props.iconStyle); + } + + if (!iconElementLeft.props.onTouchTap && this.props.onLeftIconButtonTouchTap) { + iconElementLeftProps.onTouchTap = this.handleTouchTapLeftIconButton; + } + + menuElementLeft = _react2.default.createElement( + 'div', + { style: prepareStyles(iconLeftStyle) }, + (0, _keys2.default)(iconElementLeftProps).length > 0 ? (0, _react.cloneElement)(iconElementLeft, iconElementLeftProps) : iconElementLeft + ); + } else { + menuElementLeft = _react2.default.createElement( + _IconButton2.default, + { + style: iconLeftStyle, + iconStyle: styles.iconButtonIconStyle, + iconClassName: iconClassNameLeft, + onTouchTap: this.handleTouchTapLeftIconButton + }, + iconClassNameLeft ? '' : _react2.default.createElement(_menu2.default, { style: (0, _simpleAssign2.default)({}, styles.iconButtonIconStyle) }) + ); + } + } + + var iconRightStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, { + marginRight: -16, + marginLeft: 'auto' + }, iconStyleRight); + + if (iconElementRight) { + var iconElementRightProps = {}; + + switch (iconElementRight.type.muiName) { + case 'IconMenu': + case 'IconButton': + var iconElemRightChildren = iconElementRight.props.children; + var _iconButtonIconStyle = !(iconElemRightChildren && iconElemRightChildren.props && iconElemRightChildren.props.color) ? styles.iconButtonIconStyle : null; + + iconElementRightProps.iconStyle = (0, _simpleAssign2.default)({}, _iconButtonIconStyle, iconElementRight.props.iconStyle); + break; + + case 'FlatButton': + iconElementRightProps.style = (0, _simpleAssign2.default)({}, styles.flatButton, iconElementRight.props.style); + break; + + default: + } + + if (!iconElementRight.props.onTouchTap && this.props.onRightIconButtonTouchTap) { + iconElementRightProps.onTouchTap = this.handleTouchTapRightIconButton; + } + + menuElementRight = _react2.default.createElement( + 'div', + { style: prepareStyles(iconRightStyle) }, + (0, _keys2.default)(iconElementRightProps).length > 0 ? (0, _react.cloneElement)(iconElementRight, iconElementRightProps) : iconElementRight + ); + } else if (iconClassNameRight) { + menuElementRight = _react2.default.createElement(_IconButton2.default, { + style: iconRightStyle, + iconStyle: styles.iconButtonIconStyle, + iconClassName: iconClassNameRight, + onTouchTap: this.handleTouchTapRightIconButton + }); + } + + return _react2.default.createElement( + _Paper2.default, + (0, _extends3.default)({}, other, { + rounded: false, + className: className, + style: (0, _simpleAssign2.default)({}, styles.root, style), + zDepth: zDepth + }), + menuElementLeft, + titleElement, + menuElementRight, + children + ); + } + }]); + return AppBar; +}(_react.Component); + +AppBar.muiName = 'AppBar'; +AppBar.defaultProps = { + showMenuIconButton: true, + title: '', + zDepth: 1 +}; +AppBar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? AppBar.propTypes = { + /** + * Can be used to render a tab inside an app bar for instance. + */ + children: _react.PropTypes.node, + /** + * Applied to the app bar's root element. + */ + className: _react.PropTypes.string, + /** + * The classname of the icon on the left of the app bar. + * If you are using a stylesheet for your icons, enter the class name for the icon to be used here. + */ + iconClassNameLeft: _react.PropTypes.string, + /** + * Similiar to the iconClassNameLeft prop except that + * it applies to the icon displayed on the right of the app bar. + */ + iconClassNameRight: _react.PropTypes.string, + /** + * The custom element to be displayed on the left side of the + * app bar such as an SvgIcon. + */ + iconElementLeft: _react.PropTypes.element, + /** + * Similiar to the iconElementLeft prop except that this element is displayed on the right of the app bar. + */ + iconElementRight: _react.PropTypes.element, + /** + * Override the inline-styles of the element displayed on the left side of the app bar. + */ + iconStyleLeft: _react.PropTypes.object, + /** + * Override the inline-styles of the element displayed on the right side of the app bar. + */ + iconStyleRight: _react.PropTypes.object, + /** + * Callback function for when the left icon is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the left `IconButton`. + */ + onLeftIconButtonTouchTap: _react.PropTypes.func, + /** + * Callback function for when the right icon is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the right `IconButton`. + */ + onRightIconButtonTouchTap: _react.PropTypes.func, + /** + * Callback function for when the title text is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the `title` node. + */ + onTitleTouchTap: _react.PropTypes.func, + /** + * Determines whether or not to display the Menu icon next to the title. + * Setting this prop to false will hide the icon. + */ + showMenuIconButton: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The title to display on the app bar. + */ + title: _react.PropTypes.node, + /** + * Override the inline-styles of the app bar's title element. + */ + titleStyle: _react.PropTypes.object, + /** + * The zDepth of the component. + * The shadow of the app bar is also dependent on this property. + */ + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = AppBar; + +/***/ }), +/* 819 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationMenu = function NavigationMenu(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z' }) + ); +}; +NavigationMenu = (0, _pure2.default)(NavigationMenu); +NavigationMenu.displayName = 'NavigationMenu'; +NavigationMenu.muiName = 'SvgIcon'; + +exports.default = NavigationMenu; + +/***/ }), +/* 820 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +var _TabTemplate = __webpack_require__(821); + +var _TabTemplate2 = _interopRequireDefault(_TabTemplate); + +var _InkBar = __webpack_require__(822); + +var _InkBar2 = _interopRequireDefault(_InkBar); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tabs = context.muiTheme.tabs; + + + return { + tabItemContainer: { + width: '100%', + backgroundColor: tabs.backgroundColor, + whiteSpace: 'nowrap', + display: 'flex' + } + }; +} + +var Tabs = function (_Component) { + (0, _inherits3.default)(Tabs, _Component); + + function Tabs() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Tabs); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tabs.__proto__ || (0, _getPrototypeOf2.default)(Tabs)).call.apply(_ref, [this].concat(args))), _this), _this.state = { selectedIndex: 0 }, _this.handleTabTouchTap = function (value, event, tab) { + var valueLink = _this.getValueLink(_this.props); + var index = tab.props.index; + + if (valueLink.value && valueLink.value !== value || _this.state.selectedIndex !== index) { + valueLink.requestChange(value, event, tab); + } + + _this.setState({ selectedIndex: index }); + + if (tab.props.onActive) { + tab.props.onActive(tab); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Tabs, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var valueLink = this.getValueLink(this.props); + var initialIndex = this.props.initialSelectedIndex; + + this.setState({ + selectedIndex: valueLink.value !== undefined ? this.getSelectedIndex(this.props) : initialIndex < this.getTabCount() ? initialIndex : 0 + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(newProps, nextContext) { + var valueLink = this.getValueLink(newProps); + var newState = { + muiTheme: nextContext.muiTheme || this.context.muiTheme + }; + + if (valueLink.value !== undefined) { + newState.selectedIndex = this.getSelectedIndex(newProps); + } + + this.setState(newState); + } + }, { + key: 'getTabs', + value: function getTabs() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; + + var tabs = []; + + _react.Children.forEach(props.children, function (tab) { + if ((0, _react.isValidElement)(tab)) { + tabs.push(tab); + } + }); + + return tabs; + } + }, { + key: 'getTabCount', + value: function getTabCount() { + return this.getTabs().length; + } + + // Do not use outside of this component, it will be removed once valueLink is deprecated + + }, { + key: 'getValueLink', + value: function getValueLink(props) { + return props.valueLink || { + value: props.value, + requestChange: props.onChange + }; + } + }, { + key: 'getSelectedIndex', + value: function getSelectedIndex(props) { + var valueLink = this.getValueLink(props); + var selectedIndex = -1; + + this.getTabs(props).forEach(function (tab, index) { + if (valueLink.value === tab.props.value) { + selectedIndex = index; + } + }); + + return selectedIndex; + } + }, { + key: 'getSelected', + value: function getSelected(tab, index) { + var valueLink = this.getValueLink(this.props); + return valueLink.value ? valueLink.value === tab.props.value : this.state.selectedIndex === index; + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + contentContainerClassName = _props.contentContainerClassName, + contentContainerStyle = _props.contentContainerStyle, + initialSelectedIndex = _props.initialSelectedIndex, + inkBarStyle = _props.inkBarStyle, + onChange = _props.onChange, + style = _props.style, + tabItemContainerStyle = _props.tabItemContainerStyle, + tabTemplate = _props.tabTemplate, + tabTemplateStyle = _props.tabTemplateStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['contentContainerClassName', 'contentContainerStyle', 'initialSelectedIndex', 'inkBarStyle', 'onChange', 'style', 'tabItemContainerStyle', 'tabTemplate', 'tabTemplateStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var valueLink = this.getValueLink(this.props); + var tabValue = valueLink.value; + var tabContent = []; + var width = 100 / this.getTabCount(); + + var tabs = this.getTabs().map(function (tab, index) { + false ? (0, _warning2.default)(tab.type && tab.type.muiName === 'Tab', 'Material-UI: Tabs only accepts Tab Components as children.\n Found ' + (tab.type.muiName || tab.type) + ' as child number ' + (index + 1) + ' of Tabs') : void 0; + + false ? (0, _warning2.default)(!tabValue || tab.props.value !== undefined, 'Material-UI: Tabs value prop has been passed, but Tab ' + index + '\n does not have a value prop. Needs value if Tabs is going\n to be a controlled component.') : void 0; + + tabContent.push(tab.props.children ? (0, _react.createElement)(tabTemplate || _TabTemplate2.default, { + key: index, + selected: _this2.getSelected(tab, index), + style: tabTemplateStyle + }, tab.props.children) : undefined); + + return (0, _react.cloneElement)(tab, { + key: index, + index: index, + selected: _this2.getSelected(tab, index), + width: width + '%', + onTouchTap: _this2.handleTabTouchTap + }); + }); + + var inkBar = this.state.selectedIndex !== -1 ? _react2.default.createElement(_InkBar2.default, { + left: width * this.state.selectedIndex + '%', + width: width + '%', + style: inkBarStyle + }) : null; + + var inkBarContainerWidth = tabItemContainerStyle ? tabItemContainerStyle.width : '100%'; + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({ style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, other), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.tabItemContainer, tabItemContainerStyle)) }, + tabs + ), + _react2.default.createElement( + 'div', + { style: { width: inkBarContainerWidth } }, + inkBar + ), + _react2.default.createElement( + 'div', + { + style: prepareStyles((0, _simpleAssign2.default)({}, contentContainerStyle)), + className: contentContainerClassName + }, + tabContent + ) + ); + } + }]); + return Tabs; +}(_react.Component); + +Tabs.defaultProps = { + initialSelectedIndex: 0, + onChange: function onChange() {} +}; +Tabs.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Tabs.propTypes = { + /** + * Should be used to pass `Tab` components. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The css class name of the content's container. + */ + contentContainerClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the content's container. + */ + contentContainerStyle: _react.PropTypes.object, + /** + * Specify initial visible tab index. + * If `initialSelectedIndex` is set but larger than the total amount of specified tabs, + * `initialSelectedIndex` will revert back to default. + * If `initialSelectedIndex` is set to any negative value, no tab will be selected intially. + */ + initialSelectedIndex: _react.PropTypes.number, + /** + * Override the inline-styles of the InkBar. + */ + inkBarStyle: _react.PropTypes.object, + /** + * Called when the selected value change. + */ + onChange: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of the tab-labels container. + */ + tabItemContainerStyle: _react.PropTypes.object, + /** + * Override the default tab template used to wrap the content of each tab element. + */ + tabTemplate: _react.PropTypes.func, + /** + * Override the inline-styles of the tab template. + */ + tabTemplateStyle: _react.PropTypes.object, + /** + * Makes Tabs controllable and selects the tab whose value prop matches this prop. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = Tabs; + +/***/ }), +/* 821 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + width: '100%', + position: 'relative', + textAlign: 'initial' +}; + +var TabTemplate = function TabTemplate(_ref) { + var children = _ref.children, + selected = _ref.selected, + style = _ref.style; + + var templateStyle = (0, _simpleAssign2.default)({}, styles, style); + if (!selected) { + templateStyle.height = 0; + templateStyle.overflow = 'hidden'; + } + + return _react2.default.createElement( + 'div', + { style: templateStyle }, + children + ); +}; + + false ? TabTemplate.propTypes = { + children: _react.PropTypes.node, + selected: _react.PropTypes.bool, + style: _react.PropTypes.object +} : void 0; + +exports.default = TabTemplate; + +/***/ }), +/* 822 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var inkBar = context.muiTheme.inkBar; + + + return { + root: { + left: props.left, + width: props.width, + bottom: 0, + display: 'block', + backgroundColor: props.color || inkBar.backgroundColor, + height: 2, + marginTop: -2, + position: 'relative', + transition: _transitions2.default.easeOut('1s', 'left') + } + }; +} + +var InkBar = function (_Component) { + (0, _inherits3.default)(InkBar, _Component); + + function InkBar() { + (0, _classCallCheck3.default)(this, InkBar); + return (0, _possibleConstructorReturn3.default)(this, (InkBar.__proto__ || (0, _getPrototypeOf2.default)(InkBar)).apply(this, arguments)); + } + + (0, _createClass3.default)(InkBar, [{ + key: 'render', + value: function render() { + var style = this.props.style; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }); + } + }]); + return InkBar; +}(_react.Component); + +InkBar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? InkBar.propTypes = { + color: _react.PropTypes.string, + left: _react.PropTypes.string.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + width: _react.PropTypes.string.isRequired +} : void 0; +exports.default = InkBar; + +/***/ }), +/* 823 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(59); + +var _keys2 = _interopRequireDefault(_keys); + +exports.changeMenu = changeMenu; + +var _ActionTypes = __webpack_require__(79); + +var types = _interopRequireWildcard(_ActionTypes); + +var _Menus = __webpack_require__(82); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function changeMenu(newMenu) { + var keys = (0, _keys2.default)(menus).map(function (x) { + return menus[x]; + }); + if (keys.indexOf(newMenu) !== -1) { + return { type: types.CHANGE_MENU, menu: newMenu }; + } + throw new Error('Invalid menu : ' + newMenu); +} + +/***/ }), +/* 824 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = addNotification; + +var _ActionTypes = __webpack_require__(79); + +var types = _interopRequireWildcard(_ActionTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function addNotification(message) { + return { + type: types.NOTIFICATION_ADD, + message: message + }; +} + +/***/ }), +/* 825 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRedux = __webpack_require__(21); + +var _Snackbar = __webpack_require__(826); + +var _Snackbar2 = _interopRequireDefault(_Snackbar); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function NotificationBar(props) { + var notification = props.notification; + + return _react2.default.createElement(_Snackbar2.default, { + open: notification.message !== null, + message: notification.message === null ? '...' : notification.message, + autoHideDuration: 4000, + bodyStyle: { height: 'auto', lineHeight: '20px', padding: 24, marginLeft: 256, whiteSpace: 'pre-line' } + }); +} + +NotificationBar.propTypes = { + notification: _react.PropTypes.shape({ + message: _react.PropTypes.string + }) +}; + +function mapStateToProps(state) { + return { + notification: state.notification + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps)(NotificationBar); + +/***/ }), +/* 826 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Snackbar = __webpack_require__(827); + +var _Snackbar2 = _interopRequireDefault(_Snackbar); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Snackbar2.default; + +/***/ }), +/* 827 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _ClickAwayListener = __webpack_require__(204); + +var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener); + +var _SnackbarBody = __webpack_require__(828); + +var _SnackbarBody2 = _interopRequireDefault(_SnackbarBody); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + desktopSubheaderHeight = _context$muiTheme.baseTheme.spacing.desktopSubheaderHeight, + zIndex = _context$muiTheme.zIndex; + var open = state.open; + + + var styles = { + root: { + position: 'fixed', + left: '50%', + display: 'flex', + bottom: 0, + zIndex: zIndex.snackbar, + visibility: open ? 'visible' : 'hidden', + transform: open ? 'translate(-50%, 0)' : 'translate(-50%, ' + desktopSubheaderHeight + 'px)', + transition: _transitions2.default.easeOut('400ms', 'transform') + ', ' + _transitions2.default.easeOut('400ms', 'visibility') + } + }; + + return styles; +} + +var Snackbar = function (_Component) { + (0, _inherits3.default)(Snackbar, _Component); + + function Snackbar() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Snackbar); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Snackbar.__proto__ || (0, _getPrototypeOf2.default)(Snackbar)).call.apply(_ref, [this].concat(args))), _this), _this.componentClickAway = function () { + if (_this.timerTransitionId) { + // If transitioning, don't close the snackbar. + return; + } + + if (_this.props.open !== null && _this.props.onRequestClose) { + _this.props.onRequestClose('clickaway'); + } else { + _this.setState({ open: false }); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Snackbar, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + open: this.props.open, + message: this.props.message, + action: this.props.action + }); + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + if (this.state.open) { + this.setAutoHideTimer(); + this.setTransitionTimer(); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; + + if (this.props.open && nextProps.open && (nextProps.message !== this.props.message || nextProps.action !== this.props.action)) { + this.setState({ + open: false + }); + + clearTimeout(this.timerOneAtTheTimeId); + this.timerOneAtTheTimeId = setTimeout(function () { + _this2.setState({ + message: nextProps.message, + action: nextProps.action, + open: true + }); + }, 400); + } else { + var open = nextProps.open; + + this.setState({ + open: open !== null ? open : this.state.open, + message: nextProps.message, + action: nextProps.action + }); + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps, prevState) { + if (prevState.open !== this.state.open) { + if (this.state.open) { + this.setAutoHideTimer(); + this.setTransitionTimer(); + } else { + clearTimeout(this.timerAutoHideId); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.timerAutoHideId); + clearTimeout(this.timerTransitionId); + clearTimeout(this.timerOneAtTheTimeId); + } + }, { + key: 'setAutoHideTimer', + + + // Timer that controls delay before snackbar auto hides + value: function setAutoHideTimer() { + var _this3 = this; + + var autoHideDuration = this.props.autoHideDuration; + + if (autoHideDuration > 0) { + clearTimeout(this.timerAutoHideId); + this.timerAutoHideId = setTimeout(function () { + if (_this3.props.open !== null && _this3.props.onRequestClose) { + _this3.props.onRequestClose('timeout'); + } else { + _this3.setState({ open: false }); + } + }, autoHideDuration); + } + } + + // Timer that controls delay before click-away events are captured (based on when animation completes) + + }, { + key: 'setTransitionTimer', + value: function setTransitionTimer() { + var _this4 = this; + + this.timerTransitionId = setTimeout(function () { + _this4.timerTransitionId = undefined; + }, 400); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + autoHideDuration = _props.autoHideDuration, + contentStyle = _props.contentStyle, + bodyStyle = _props.bodyStyle, + messageProp = _props.message, + onRequestClose = _props.onRequestClose, + onActionTouchTap = _props.onActionTouchTap, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['autoHideDuration', 'contentStyle', 'bodyStyle', 'message', 'onRequestClose', 'onActionTouchTap', 'style']); + var _state = this.state, + action = _state.action, + message = _state.message, + open = _state.open; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _ClickAwayListener2.default, + { onClickAway: open ? this.componentClickAway : null }, + _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + _react2.default.createElement(_SnackbarBody2.default, { + action: action, + contentStyle: contentStyle, + message: message, + open: open, + onActionTouchTap: onActionTouchTap, + style: bodyStyle + }) + ) + ); + } + }]); + return Snackbar; +}(_react.Component); + +Snackbar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Snackbar.propTypes = { + /** + * The label for the action on the snackbar. + */ + action: _react.PropTypes.node, + /** + * The number of milliseconds to wait before automatically dismissing. + * If no value is specified the snackbar will dismiss normally. + * If a value is provided the snackbar can still be dismissed normally. + * If a snackbar is dismissed before the timer expires, the timer will be cleared. + */ + autoHideDuration: _react.PropTypes.number, + /** + * Override the inline-styles of the body element. + */ + bodyStyle: _react.PropTypes.object, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Override the inline-styles of the content element. + */ + contentStyle: _react.PropTypes.object, + /** + * The message to be displayed. + * + * (Note: If the message is an element or array, and the `Snackbar` may re-render while it is still open, + * ensure that the same object remains as the `message` property if you want to avoid the `Snackbar` hiding and + * showing again) + */ + message: _react.PropTypes.node.isRequired, + /** + * Fired when the action button is touchtapped. + * + * @param {object} event Action button event. + */ + onActionTouchTap: _react.PropTypes.func, + /** + * Fired when the `Snackbar` is requested to be closed by a click outside the `Snackbar`, or after the + * `autoHideDuration` timer expires. + * + * Typically `onRequestClose` is used to set state in the parent component, which is used to control the `Snackbar` + * `open` prop. + * + * The `reason` parameter can optionally be used to control the response to `onRequestClose`, + * for example ignoring `clickaway`. + * + * @param {string} reason Can be:`"timeout"` (`autoHideDuration` expired) or: `"clickaway"` + */ + onRequestClose: _react.PropTypes.func, + /** + * Controls whether the `Snackbar` is opened or not. + */ + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = Snackbar; + +/***/ }), +/* 828 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SnackbarBody = undefined; + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(10); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _withWidth = __webpack_require__(829); + +var _withWidth2 = _interopRequireDefault(_withWidth); + +var _FlatButton = __webpack_require__(132); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var open = props.open, + width = props.width; + var _context$muiTheme = context.muiTheme, + _context$muiTheme$bas = _context$muiTheme.baseTheme, + _context$muiTheme$bas2 = _context$muiTheme$bas.spacing, + desktopGutter = _context$muiTheme$bas2.desktopGutter, + desktopSubheaderHeight = _context$muiTheme$bas2.desktopSubheaderHeight, + fontFamily = _context$muiTheme$bas.fontFamily, + _context$muiTheme$sna = _context$muiTheme.snackbar, + backgroundColor = _context$muiTheme$sna.backgroundColor, + textColor = _context$muiTheme$sna.textColor, + actionColor = _context$muiTheme$sna.actionColor; + + + var isSmall = width === _withWidth.SMALL; + + var styles = { + root: { + fontFamily: fontFamily, + backgroundColor: backgroundColor, + padding: '0 ' + desktopGutter + 'px', + height: desktopSubheaderHeight, + lineHeight: desktopSubheaderHeight + 'px', + borderRadius: isSmall ? 0 : 2, + maxWidth: isSmall ? 'inherit' : 568, + minWidth: isSmall ? 'inherit' : 288, + width: isSmall ? 'calc(100vw - ' + desktopGutter * 2 + 'px)' : 'auto', + flexGrow: isSmall ? 1 : 0 + }, + content: { + fontSize: 14, + color: textColor, + opacity: open ? 1 : 0, + transition: open ? _transitions2.default.easeOut('500ms', 'opacity', '100ms') : _transitions2.default.easeOut('400ms', 'opacity') + }, + action: { + color: actionColor, + float: 'right', + marginTop: 6, + marginRight: -16, + marginLeft: desktopGutter, + backgroundColor: 'transparent' + } + }; + + return styles; +} + +var SnackbarBody = exports.SnackbarBody = function SnackbarBody(props, context) { + var action = props.action, + contentStyle = props.contentStyle, + message = props.message, + open = props.open, + onActionTouchTap = props.onActionTouchTap, + style = props.style, + other = (0, _objectWithoutProperties3.default)(props, ['action', 'contentStyle', 'message', 'open', 'onActionTouchTap', 'style']); + var prepareStyles = context.muiTheme.prepareStyles; + + var styles = getStyles(props, context); + + var actionButton = action && _react2.default.createElement(_FlatButton2.default, { + style: styles.action, + label: action, + onTouchTap: onActionTouchTap + }); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.content, contentStyle)) }, + _react2.default.createElement( + 'span', + null, + message + ), + actionButton + ) + ); +}; + + false ? SnackbarBody.propTypes = { + /** + * The label for the action on the snackbar. + */ + action: _react.PropTypes.node, + /** + * Override the inline-styles of the content element. + */ + contentStyle: _react.PropTypes.object, + /** + * The message to be displayed. + * + * (Note: If the message is an element or array, and the `Snackbar` may re-render while it is still open, + * ensure that the same object remains as the `message` property if you want to avoid the `Snackbar` hiding and + * showing again) + */ + message: _react.PropTypes.node.isRequired, + /** + * Fired when the action button is touchtapped. + * + * @param {object} event Action button event. + */ + onActionTouchTap: _react.PropTypes.func, + /** + * @ignore + * Controls whether the `Snackbar` is opened or not. + */ + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * @ignore + * Width of the screen. + */ + width: _react.PropTypes.number.isRequired +} : void 0; + +SnackbarBody.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +exports.default = (0, _withWidth2.default)()(SnackbarBody); + +/***/ }), +/* 829 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.LARGE = exports.MEDIUM = exports.SMALL = undefined; + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +exports.default = withWidth; + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(39); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SMALL = exports.SMALL = 1; +var MEDIUM = exports.MEDIUM = 2; +var LARGE = exports.LARGE = 3; + +function withWidth() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var _options$largeWidth = options.largeWidth, + largeWidth = _options$largeWidth === undefined ? 992 : _options$largeWidth, + _options$mediumWidth = options.mediumWidth, + mediumWidth = _options$mediumWidth === undefined ? 768 : _options$mediumWidth, + _options$resizeInterv = options.resizeInterval, + resizeInterval = _options$resizeInterv === undefined ? 166 : _options$resizeInterv; + + + return function (MyComponent) { + return function (_Component) { + (0, _inherits3.default)(WithWidth, _Component); + + function WithWidth() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, WithWidth); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = WithWidth.__proto__ || (0, _getPrototypeOf2.default)(WithWidth)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + width: null + }, _this.handleResize = function () { + clearTimeout(_this.deferTimer); + _this.deferTimer = setTimeout(function () { + _this.updateWidth(); + }, resizeInterval); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(WithWidth, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.updateWidth(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.deferTimer); + } + }, { + key: 'updateWidth', + value: function updateWidth() { + var innerWidth = window.innerWidth; + var width = void 0; + + if (innerWidth >= largeWidth) { + width = LARGE; + } else if (innerWidth >= mediumWidth) { + width = MEDIUM; + } else { + // innerWidth < 768 + width = SMALL; + } + + if (width !== this.state.width) { + this.setState({ + width: width + }); + } + } + }, { + key: 'render', + value: function render() { + var width = this.state.width; + + /** + * When rendering the component on the server, + * we have no idea about the screen width. + * In order to prevent blinks and help the reconciliation + * we are not rendering the component. + * + * A better alternative would be to send client hints. + * But the browser support of this API is low: + * http://caniuse.com/#search=client%20hint + */ + if (width === null) { + return null; + } + + return _react2.default.createElement( + _reactEventListener2.default, + { target: 'window', onResize: this.handleResize }, + _react2.default.createElement(MyComponent, (0, _extends3.default)({ + width: width + }, this.props)) + ); + } + }]); + return WithWidth; + }(_react.Component); + }; +} + +/***/ }), +/* 830 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRedux = __webpack_require__(21); + +var _Table = __webpack_require__(831); + +var _colors = __webpack_require__(47); + +var _Dialog = __webpack_require__(208); + +var _Dialog2 = _interopRequireDefault(_Dialog); + +var _Toggle = __webpack_require__(209); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +var _IconButton = __webpack_require__(81); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _delete = __webpack_require__(837); + +var _delete2 = _interopRequireDefault(_delete); + +var _RaisedButton = __webpack_require__(96); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _profiles = __webpack_require__(210); + +var _Layout = __webpack_require__(333); + +var _Layout2 = _interopRequireDefault(_Layout); + +var _ProfileCreateForm = __webpack_require__(838); + +var _ProfileCreateForm2 = _interopRequireDefault(_ProfileCreateForm); + +var _ProfileToggle = __webpack_require__(839); + +var _ProfileToggle2 = _interopRequireDefault(_ProfileToggle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Profile = function (_Component) { + (0, _inherits3.default)(Profile, _Component); + + function Profile(props) { + (0, _classCallCheck3.default)(this, Profile); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Profile.__proto__ || (0, _getPrototypeOf2.default)(Profile)).call(this, props)); + + _this.state = { + createModalOpen: false + }; + return _this; + } + + (0, _createClass3.default)(Profile, [{ + key: 'onSetProfile', + value: function onSetProfile(profileName) { + this.props.setProfileEnabled(profileName); + } + }, { + key: 'requestCloseModal', + value: function requestCloseModal() { + this.setState({ + createModalOpen: false + }); + } + }, { + key: 'requestModalOpen', + value: function requestModalOpen() { + this.setState({ + createModalOpen: true + }); + } + }, { + key: 'onRequestDeleteProfile', + value: function onRequestDeleteProfile(name) { + this.props.removeProfile(name); + } + }, { + key: 'handleSubmit', + value: function handleSubmit(data) { + this.props.createProfile(data.name, data.description); + this.requestCloseModal(); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + profiles = _props.profiles, + currentProfile = _props.currentProfile; + + + return _react2.default.createElement( + _Layout2.default, + { title: 'Profiles' }, + _react2.default.createElement( + _Dialog2.default, + { + open: this.state.createModalOpen, + title: 'Create a new profile', + modal: false, + onRequestClose: this.handleClose + }, + _react2.default.createElement(_ProfileCreateForm2.default, { + onSubmit: function onSubmit(data) { + return _this2.handleSubmit(data); + }, + onRequestClose: function onRequestClose() { + return _this2.requestCloseModal(); + } + }) + ), + _react2.default.createElement(_RaisedButton2.default, { label: 'Add new', onTouchTap: function onTouchTap() { + return _this2.requestModalOpen(); + }, primary: true }), + _react2.default.createElement( + _Table.Table, + { selectable: false }, + _react2.default.createElement( + _Table.TableHeader, + { displaySelectAll: false, adjustForCheckbox: false }, + _react2.default.createElement( + _Table.TableRow, + null, + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Name' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Description' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Enabled' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Delete' + ) + ) + ), + _react2.default.createElement( + _Table.TableBody, + { displayRowCheckbox: false, stripedRows: true }, + profiles.map(function (x, i) { + return _react2.default.createElement( + _Table.TableRow, + { key: i }, + _react2.default.createElement( + _Table.TableRowColumn, + null, + x.name + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + x.description + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + _react2.default.createElement(_ProfileToggle2.default, { profile: x }) + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + _react2.default.createElement( + _IconButton2.default, + { onTouchTap: function onTouchTap() { + return _this2.onRequestDeleteProfile(x.name); + }, disabled: x.name === 'default' }, + _react2.default.createElement(_delete2.default, { color: _colors.red300 }) + ) + ) + ); + }) + ) + ) + ); + } + }]); + return Profile; +}(_react.Component); + +function mapStateToProps(state) { + return { + profiles: state.profiles.profiles, + currentProfile: state.profiles.currentProfile + }; +} + +function mapDispatchToProps(dispatch) { + return { + createProfile: function createProfile(name, description) { + return dispatch((0, _profiles.createProfile)(name, description)); + }, + setProfileEnabled: function setProfileEnabled(name) { + return dispatch((0, _profiles.setProfileEnabled)(name)); + }, + removeProfile: function removeProfile(name) { + return dispatch((0, _profiles.removeProfile)(name)); + } + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Profile); + +/***/ }), +/* 831 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.TableRowColumn = exports.TableRow = exports.TableHeaderColumn = exports.TableHeader = exports.TableFooter = exports.TableBody = exports.Table = undefined; + +var _Table2 = __webpack_require__(832); + +var _Table3 = _interopRequireDefault(_Table2); + +var _TableBody2 = __webpack_require__(833); + +var _TableBody3 = _interopRequireDefault(_TableBody2); + +var _TableFooter2 = __webpack_require__(834); + +var _TableFooter3 = _interopRequireDefault(_TableFooter2); + +var _TableHeader2 = __webpack_require__(835); + +var _TableHeader3 = _interopRequireDefault(_TableHeader2); + +var _TableHeaderColumn2 = __webpack_require__(334); + +var _TableHeaderColumn3 = _interopRequireDefault(_TableHeaderColumn2); + +var _TableRow2 = __webpack_require__(836); + +var _TableRow3 = _interopRequireDefault(_TableRow2); + +var _TableRowColumn2 = __webpack_require__(211); + +var _TableRowColumn3 = _interopRequireDefault(_TableRowColumn2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.Table = _Table3.default; +exports.TableBody = _TableBody3.default; +exports.TableFooter = _TableFooter3.default; +exports.TableHeader = _TableHeader3.default; +exports.TableHeaderColumn = _TableHeaderColumn3.default; +exports.TableRow = _TableRow3.default; +exports.TableRowColumn = _TableRowColumn3.default; +exports.default = _Table3.default; + +/***/ }), +/* 832 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _warning = __webpack_require__(15); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + table = _context$muiTheme.table; + + + return { + root: { + backgroundColor: table.backgroundColor, + width: '100%', + borderCollapse: 'collapse', + borderSpacing: 0, + tableLayout: 'fixed', + fontFamily: baseTheme.fontFamily + }, + bodyTable: { + height: props.fixedHeader || props.fixedFooter ? props.height : 'auto', + overflowX: 'hidden', + overflowY: 'auto' + }, + tableWrapper: { + height: props.fixedHeader || props.fixedFooter ? 'auto' : props.height, + overflow: 'auto' + } + }; +} + +var Table = function (_Component) { + (0, _inherits3.default)(Table, _Component); + + function Table() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Table); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Table.__proto__ || (0, _getPrototypeOf2.default)(Table)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + allRowsSelected: false + }, _this.onCellClick = function (rowNumber, columnNumber, event) { + if (_this.props.onCellClick) _this.props.onCellClick(rowNumber, columnNumber, event); + }, _this.onCellHover = function (rowNumber, columnNumber, event) { + if (_this.props.onCellHover) _this.props.onCellHover(rowNumber, columnNumber, event); + }, _this.onCellHoverExit = function (rowNumber, columnNumber, event) { + if (_this.props.onCellHoverExit) _this.props.onCellHoverExit(rowNumber, columnNumber, event); + }, _this.onRowHover = function (rowNumber) { + if (_this.props.onRowHover) _this.props.onRowHover(rowNumber); + }, _this.onRowHoverExit = function (rowNumber) { + if (_this.props.onRowHoverExit) _this.props.onRowHoverExit(rowNumber); + }, _this.onRowSelection = function (selectedRows) { + if (_this.state.allRowsSelected) _this.setState({ allRowsSelected: false }); + if (_this.props.onRowSelection) _this.props.onRowSelection(selectedRows); + }, _this.onSelectAll = function () { + if (_this.props.onRowSelection) { + if (!_this.state.allRowsSelected) { + _this.props.onRowSelection('all'); + } else { + _this.props.onRowSelection('none'); + } + } + + _this.setState({ allRowsSelected: !_this.state.allRowsSelected }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Table, [{ + key: 'componentWillMount', + value: function componentWillMount() { + if (this.props.allRowsSelected) { + this.setState({ allRowsSelected: true }); + } + } + }, { + key: 'isScrollbarVisible', + value: function isScrollbarVisible() { + var tableDivHeight = this.refs.tableDiv.clientHeight; + var tableBodyHeight = this.refs.tableBody.clientHeight; + + return tableBodyHeight > tableDivHeight; + } + }, { + key: 'createTableHeader', + value: function createTableHeader(base) { + return _react2.default.cloneElement(base, { + enableSelectAll: base.props.enableSelectAll && this.props.selectable && this.props.multiSelectable, + onSelectAll: this.onSelectAll, + selectAllSelected: this.state.allRowsSelected + }); + } + }, { + key: 'createTableBody', + value: function createTableBody(base) { + return _react2.default.cloneElement(base, { + allRowsSelected: this.state.allRowsSelected, + multiSelectable: this.props.multiSelectable, + onCellClick: this.onCellClick, + onCellHover: this.onCellHover, + onCellHoverExit: this.onCellHoverExit, + onRowHover: this.onRowHover, + onRowHoverExit: this.onRowHoverExit, + onRowSelection: this.onRowSelection, + selectable: this.props.selectable, + style: (0, _simpleAssign2.default)({ height: this.props.height }, base.props.style) + }); + } + }, { + key: 'createTableFooter', + value: function createTableFooter(base) { + return base; + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + children = _props.children, + className = _props.className, + fixedFooter = _props.fixedFooter, + fixedHeader = _props.fixedHeader, + style = _props.style, + wrapperStyle = _props.wrapperStyle, + headerStyle = _props.headerStyle, + bodyStyle = _props.bodyStyle, + footerStyle = _props.footerStyle; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var tHead = void 0; + var tFoot = void 0; + var tBody = void 0; + + _react2.default.Children.forEach(children, function (child) { + if (!_react2.default.isValidElement(child)) return; + + var muiName = child.type.muiName; + + if (muiName === 'TableBody') { + tBody = _this2.createTableBody(child); + } else if (muiName === 'TableHeader') { + tHead = _this2.createTableHeader(child); + } else if (muiName === 'TableFooter') { + tFoot = _this2.createTableFooter(child); + } else { + false ? (0, _warning2.default)(false, 'Material-UI: Children of the Table component must be TableBody or TableHeader or TableFooter.\n Nothing is rendered.') : void 0; + } + }); + + // If we could not find a table-header and a table-body, do not attempt to display anything. + if (!tBody && !tHead) return null; + + var mergedTableStyle = (0, _simpleAssign2.default)(styles.root, style); + var headerTable = void 0; + var footerTable = void 0; + var inlineHeader = void 0; + var inlineFooter = void 0; + + if (fixedHeader) { + headerTable = _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, headerStyle)) }, + _react2.default.createElement( + 'table', + { className: className, style: mergedTableStyle }, + tHead + ) + ); + } else { + inlineHeader = tHead; + } + + if (tFoot !== undefined) { + if (fixedFooter) { + footerTable = _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, footerStyle)) }, + _react2.default.createElement( + 'table', + { className: className, style: prepareStyles(mergedTableStyle) }, + tFoot + ) + ); + } else { + inlineFooter = tFoot; + } + } + + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.tableWrapper, wrapperStyle)) }, + headerTable, + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.bodyTable, bodyStyle)), ref: 'tableDiv' }, + _react2.default.createElement( + 'table', + { className: className, style: mergedTableStyle, ref: 'tableBody' }, + inlineHeader, + inlineFooter, + tBody + ) + ), + footerTable + ); + } + }]); + return Table; +}(_react.Component); + +Table.defaultProps = { + allRowsSelected: false, + fixedFooter: true, + fixedHeader: true, + height: 'inherit', + multiSelectable: false, + selectable: true +}; +Table.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? Table.propTypes = { + /** + * Set to true to indicate that all rows should be selected. + */ + allRowsSelected: _react.PropTypes.bool, + /** + * Override the inline-styles of the body's table element. + */ + bodyStyle: _react.PropTypes.object, + /** + * Children passed to table. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the footer will appear fixed below the table. + * The default value is true. + */ + fixedFooter: _react.PropTypes.bool, + /** + * If true, the header will appear fixed above the table. + * The default value is true. + */ + fixedHeader: _react.PropTypes.bool, + /** + * Override the inline-styles of the footer's table element. + */ + footerStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the header's table element. + */ + headerStyle: _react.PropTypes.object, + /** + * The height of the table. + */ + height: _react.PropTypes.string, + /** + * If true, multiple table rows can be selected. + * CTRL/CMD+Click and SHIFT+Click are valid actions. + * The default value is false. + */ + multiSelectable: _react.PropTypes.bool, + /** + * Called when a row cell is clicked. + * rowNumber is the row number and columnId is + * the column number or the column key. + */ + onCellClick: _react.PropTypes.func, + /** + * Called when a table cell is hovered. + * rowNumber is the row number of the hovered row + * and columnId is the column number or the column key of the cell. + */ + onCellHover: _react.PropTypes.func, + /** + * Called when a table cell is no longer hovered. + * rowNumber is the row number of the row and columnId + * is the column number or the column key of the cell. + */ + onCellHoverExit: _react.PropTypes.func, + /** + * Called when a table row is hovered. + * rowNumber is the row number of the hovered row. + */ + onRowHover: _react.PropTypes.func, + /** + * Called when a table row is no longer hovered. + * rowNumber is the row number of the row that is no longer hovered. + */ + onRowHoverExit: _react.PropTypes.func, + /** + * Called when a row is selected. + * selectedRows is an array of all row selections. + * IF all rows have been selected, the string "all" + * will be returned instead to indicate that all rows have been selected. + */ + onRowSelection: _react.PropTypes.func, + /** + * If true, table rows can be selected. + * If multiple row selection is desired, enable multiSelectable. + * The default value is true. + */ + selectable: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of the table's wrapper element. + */ + wrapperStyle: _react.PropTypes.object +} : void 0; +exports.default = Table; + +/***/ }), +/* 833 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getIterator2 = __webpack_require__(329); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _toConsumableArray2 = __webpack_require__(94); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _typeof2 = __webpack_require__(57); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _Checkbox = __webpack_require__(205); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +var _TableRowColumn = __webpack_require__(211); + +var _TableRowColumn2 = _interopRequireDefault(_TableRowColumn); + +var _ClickAwayListener = __webpack_require__(204); + +var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TableBody = function (_Component) { + (0, _inherits3.default)(TableBody, _Component); + + function TableBody() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TableBody); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableBody.__proto__ || (0, _getPrototypeOf2.default)(TableBody)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + selectedRows: [] + }, _this.handleClickAway = function () { + if (_this.props.deselectOnClickaway && _this.state.selectedRows.length) { + _this.setState({ + selectedRows: [] + }); + if (_this.props.onRowSelection) { + _this.props.onRowSelection([]); + } + } + }, _this.onRowClick = function (event, rowNumber) { + event.stopPropagation(); + + if (_this.props.selectable) { + // Prevent text selection while selecting rows. + window.getSelection().removeAllRanges(); + _this.processRowSelection(event, rowNumber); + } + }, _this.onCellClick = function (event, rowNumber, columnNumber) { + event.stopPropagation(); + if (_this.props.onCellClick) { + _this.props.onCellClick(rowNumber, _this.getColumnId(columnNumber), event); + } + }, _this.onCellHover = function (event, rowNumber, columnNumber) { + if (_this.props.onCellHover) { + _this.props.onCellHover(rowNumber, _this.getColumnId(columnNumber), event); + } + _this.onRowHover(event, rowNumber); + }, _this.onCellHoverExit = function (event, rowNumber, columnNumber) { + if (_this.props.onCellHoverExit) { + _this.props.onCellHoverExit(rowNumber, _this.getColumnId(columnNumber), event); + } + _this.onRowHoverExit(event, rowNumber); + }, _this.onRowHover = function (event, rowNumber) { + if (_this.props.onRowHover) { + _this.props.onRowHover(rowNumber); + } + }, _this.onRowHoverExit = function (event, rowNumber) { + if (_this.props.onRowHoverExit) { + _this.props.onRowHoverExit(rowNumber); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TableBody, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ selectedRows: this.calculatePreselectedRows(this.props) }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.allRowsSelected !== nextProps.allRowsSelected) { + if (!nextProps.allRowsSelected) { + this.setState({ + selectedRows: [] + }); + } else { + this.setState({ + selectedRows: this.calculatePreselectedRows(nextProps) + }); + } + } + } + }, { + key: 'createRows', + value: function createRows() { + var _this2 = this; + + var numChildren = _react2.default.Children.count(this.props.children); + var rowNumber = 0; + var handlers = { + onCellClick: this.onCellClick, + onCellHover: this.onCellHover, + onCellHoverExit: this.onCellHoverExit, + onRowHover: this.onRowHover, + onRowHoverExit: this.onRowHoverExit, + onRowClick: this.onRowClick + }; + + return _react2.default.Children.map(this.props.children, function (child) { + if (_react2.default.isValidElement(child)) { + var _ret2 = function () { + var props = { + hoverable: _this2.props.showRowHover, + selected: _this2.isRowSelected(rowNumber), + striped: _this2.props.stripedRows && rowNumber % 2 === 0, + rowNumber: rowNumber++ + }; + + if (rowNumber === numChildren) { + props.displayBorder = false; + } + + var children = [_this2.createRowCheckboxColumn(props)]; + + _react2.default.Children.forEach(child.props.children, function (child) { + children.push(child); + }); + + return { + v: _react2.default.cloneElement(child, (0, _extends3.default)({}, props, handlers), children) + }; + }(); + + if ((typeof _ret2 === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret2)) === "object") return _ret2.v; + } + }); + } + }, { + key: 'createRowCheckboxColumn', + value: function createRowCheckboxColumn(rowProps) { + if (!this.props.displayRowCheckbox) { + return null; + } + + var key = rowProps.rowNumber + '-cb'; + var disabled = !this.props.selectable; + var checkbox = _react2.default.createElement(_Checkbox2.default, { + ref: 'rowSelectCB', + name: key, + value: 'selected', + disabled: disabled, + checked: rowProps.selected + }); + + return _react2.default.createElement( + _TableRowColumn2.default, + { + key: key, + columnNumber: 0, + style: { + width: 24, + cursor: disabled ? 'not-allowed' : 'inherit' + } + }, + checkbox + ); + } + }, { + key: 'calculatePreselectedRows', + value: function calculatePreselectedRows(props) { + // Determine what rows are 'pre-selected'. + var preSelectedRows = []; + + if (props.selectable && props.preScanRows) { + (function () { + var index = 0; + _react2.default.Children.forEach(props.children, function (child) { + if (_react2.default.isValidElement(child)) { + if (child.props.selected && (preSelectedRows.length === 0 || props.multiSelectable)) { + preSelectedRows.push(index); + } + + index++; + } + }); + })(); + } + + return preSelectedRows; + } + }, { + key: 'isRowSelected', + value: function isRowSelected(rowNumber) { + if (this.props.allRowsSelected) { + return true; + } + + for (var i = 0; i < this.state.selectedRows.length; i++) { + var selection = this.state.selectedRows[i]; + + if ((typeof selection === 'undefined' ? 'undefined' : (0, _typeof3.default)(selection)) === 'object') { + if (this.isValueInRange(rowNumber, selection)) return true; + } else { + if (selection === rowNumber) return true; + } + } + + return false; + } + }, { + key: 'isValueInRange', + value: function isValueInRange(value, range) { + if (!range) return false; + + if (range.start <= value && value <= range.end || range.end <= value && value <= range.start) { + return true; + } + + return false; + } + }, { + key: 'processRowSelection', + value: function processRowSelection(event, rowNumber) { + var selectedRows = this.state.selectedRows; + + if (event.shiftKey && this.props.multiSelectable && selectedRows.length) { + var lastIndex = selectedRows.length - 1; + var lastSelection = selectedRows[lastIndex]; + + if ((typeof lastSelection === 'undefined' ? 'undefined' : (0, _typeof3.default)(lastSelection)) === 'object') { + lastSelection.end = rowNumber; + } else { + selectedRows.splice(lastIndex, 1, { start: lastSelection, end: rowNumber }); + } + } else if ((event.ctrlKey && !event.metaKey || event.metaKey && !event.ctrlKey) && this.props.multiSelectable) { + var idx = selectedRows.indexOf(rowNumber); + if (idx < 0) { + var foundRange = false; + for (var i = 0; i < selectedRows.length; i++) { + var range = selectedRows[i]; + if ((typeof range === 'undefined' ? 'undefined' : (0, _typeof3.default)(range)) !== 'object') continue; + + if (this.isValueInRange(rowNumber, range)) { + var _selectedRows; + + foundRange = true; + var values = this.splitRange(range, rowNumber); + (_selectedRows = selectedRows).splice.apply(_selectedRows, [i, 1].concat((0, _toConsumableArray3.default)(values))); + } + } + + if (!foundRange) selectedRows.push(rowNumber); + } else { + selectedRows.splice(idx, 1); + } + } else { + if (selectedRows.length === 1 && selectedRows[0] === rowNumber) { + selectedRows = []; + } else { + selectedRows = [rowNumber]; + } + } + + this.setState({ selectedRows: selectedRows }); + if (this.props.onRowSelection) this.props.onRowSelection(this.flattenRanges(selectedRows)); + } + }, { + key: 'splitRange', + value: function splitRange(range, splitPoint) { + var splitValues = []; + var startOffset = range.start - splitPoint; + var endOffset = range.end - splitPoint; + + // Process start half + splitValues.push.apply(splitValues, (0, _toConsumableArray3.default)(this.genRangeOfValues(splitPoint, startOffset))); + + // Process end half + splitValues.push.apply(splitValues, (0, _toConsumableArray3.default)(this.genRangeOfValues(splitPoint, endOffset))); + + return splitValues; + } + }, { + key: 'genRangeOfValues', + value: function genRangeOfValues(start, offset) { + var values = []; + var dir = offset > 0 ? -1 : 1; // This forces offset to approach 0 from either direction. + while (offset !== 0) { + values.push(start + offset); + offset += dir; + } + + return values; + } + }, { + key: 'flattenRanges', + value: function flattenRanges(selectedRows) { + var rows = []; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = (0, _getIterator3.default)(selectedRows), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var selection = _step.value; + + if ((typeof selection === 'undefined' ? 'undefined' : (0, _typeof3.default)(selection)) === 'object') { + var values = this.genRangeOfValues(selection.end, selection.start - selection.end); + rows.push.apply(rows, [selection.end].concat((0, _toConsumableArray3.default)(values))); + } else { + rows.push(selection); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return rows.sort(); + } + }, { + key: 'getColumnId', + value: function getColumnId(columnNumber) { + var columnId = columnNumber; + if (this.props.displayRowCheckbox) { + columnId--; + } + + return columnId; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + className = _props.className, + style = _props.style; + var prepareStyles = this.context.muiTheme.prepareStyles; + + + return _react2.default.createElement( + _ClickAwayListener2.default, + { onClickAway: this.handleClickAway }, + _react2.default.createElement( + 'tbody', + { className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, + this.createRows() + ) + ); + } + }]); + return TableBody; +}(_react.Component); + +TableBody.muiName = 'TableBody'; +TableBody.defaultProps = { + allRowsSelected: false, + deselectOnClickaway: true, + displayRowCheckbox: true, + multiSelectable: false, + preScanRows: true, + selectable: true, + style: {} +}; +TableBody.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TableBody.propTypes = { + /** + * @ignore + * Set to true to indicate that all rows should be selected. + */ + allRowsSelected: _react.PropTypes.bool, + /** + * Children passed to table body. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Controls whether or not to deselect all selected + * rows after clicking outside the table. + */ + deselectOnClickaway: _react.PropTypes.bool, + /** + * Controls the display of the row checkbox. The default value is true. + */ + displayRowCheckbox: _react.PropTypes.bool, + /** + * @ignore + * If true, multiple table rows can be selected. + * CTRL/CMD+Click and SHIFT+Click are valid actions. + * The default value is false. + */ + multiSelectable: _react.PropTypes.bool, + /** + * @ignore + * Callback function for when a cell is clicked. + */ + onCellClick: _react.PropTypes.func, + /** + * @ignore + * Called when a table cell is hovered. rowNumber + * is the row number of the hovered row and columnId + * is the column number or the column key of the cell. + */ + onCellHover: _react.PropTypes.func, + /** + * @ignore + * Called when a table cell is no longer hovered. + * rowNumber is the row number of the row and columnId + * is the column number or the column key of the cell. + */ + onCellHoverExit: _react.PropTypes.func, + /** + * @ignore + * Called when a table row is hovered. + * rowNumber is the row number of the hovered row. + */ + onRowHover: _react.PropTypes.func, + /** + * @ignore + * Called when a table row is no longer + * hovered. rowNumber is the row number of the row + * that is no longer hovered. + */ + onRowHoverExit: _react.PropTypes.func, + /** + * @ignore + * Called when a row is selected. selectedRows is an + * array of all row selections. IF all rows have been selected, + * the string "all" will be returned instead to indicate that + * all rows have been selected. + */ + onRowSelection: _react.PropTypes.func, + /** + * Controls whether or not the rows are pre-scanned to determine + * initial state. If your table has a large number of rows and + * you are experiencing a delay in rendering, turn off this property. + */ + preScanRows: _react.PropTypes.bool, + /** + * @ignore + * If true, table rows can be selected. If multiple + * row selection is desired, enable multiSelectable. + * The default value is true. + */ + selectable: _react.PropTypes.bool, + /** + * If true, table rows will be highlighted when + * the cursor is hovering over the row. The default + * value is false. + */ + showRowHover: _react.PropTypes.bool, + /** + * If true, every other table row starting + * with the first row will be striped. The default value is false. + */ + stripedRows: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableBody; + +/***/ }), +/* 834 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _toConsumableArray2 = __webpack_require__(94); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _TableRowColumn = __webpack_require__(211); + +var _TableRowColumn2 = _interopRequireDefault(_TableRowColumn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tableFooter = context.muiTheme.tableFooter; + + + return { + cell: { + borderTop: '1px solid ' + tableFooter.borderColor, + verticalAlign: 'bottom', + padding: 20, + textAlign: 'left', + whiteSpace: 'nowrap' + } + }; +} + +var TableFooter = function (_Component) { + (0, _inherits3.default)(TableFooter, _Component); + + function TableFooter() { + (0, _classCallCheck3.default)(this, TableFooter); + return (0, _possibleConstructorReturn3.default)(this, (TableFooter.__proto__ || (0, _getPrototypeOf2.default)(TableFooter)).apply(this, arguments)); + } + + (0, _createClass3.default)(TableFooter, [{ + key: 'render', + value: function render() { + var _props = this.props, + adjustForCheckbox = _props.adjustForCheckbox, + children = _props.children, + className = _props.className, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['adjustForCheckbox', 'children', 'className', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var footerRows = _react2.default.Children.map(children, function (child, rowNumber) { + var newChildProps = { + displayBorder: false, + key: 'f-' + rowNumber, + rowNumber: rowNumber, + style: (0, _simpleAssign2.default)({}, styles.cell, child.props.style) + }; + + var newDescendants = void 0; + + if (adjustForCheckbox) { + newDescendants = [_react2.default.createElement(_TableRowColumn2.default, { key: 'fpcb' + rowNumber, style: { width: 24 } })].concat((0, _toConsumableArray3.default)(_react2.default.Children.toArray(child.props.children))); + } else { + newDescendants = child.props.children; + } + + return _react2.default.cloneElement(child, newChildProps, newDescendants); + }); + + return _react2.default.createElement( + 'tfoot', + (0, _extends3.default)({ className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, other), + footerRows + ); + } + }]); + return TableFooter; +}(_react.Component); + +TableFooter.muiName = 'TableFooter'; +TableFooter.defaultProps = { + adjustForCheckbox: true, + style: {} +}; +TableFooter.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TableFooter.propTypes = { + /** + * @ignore + * Controls whether or not header rows should be adjusted + * for a checkbox column. If the select all checkbox is true, + * this property will not influence the number of columns. + * This is mainly useful for "super header" rows so that + * the checkbox column does not create an offset that needs + * to be accounted for manually. + */ + adjustForCheckbox: _react.PropTypes.bool, + /** + * Children passed to table footer. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableFooter; + +/***/ }), +/* 835 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _Checkbox = __webpack_require__(205); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +var _TableHeaderColumn = __webpack_require__(334); + +var _TableHeaderColumn2 = _interopRequireDefault(_TableHeaderColumn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tableHeader = context.muiTheme.tableHeader; + + + return { + root: { + borderBottom: '1px solid ' + tableHeader.borderColor + } + }; +} + +var TableHeader = function (_Component) { + (0, _inherits3.default)(TableHeader, _Component); + + function TableHeader() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TableHeader); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableHeader.__proto__ || (0, _getPrototypeOf2.default)(TableHeader)).call.apply(_ref, [this].concat(args))), _this), _this.handleCheckAll = function (event, checked) { + if (_this.props.onSelectAll) { + _this.props.onSelectAll(checked); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TableHeader, [{ + key: 'createSuperHeaderRows', + value: function createSuperHeaderRows() { + var numChildren = _react2.default.Children.count(this.props.children); + if (numChildren === 1) return undefined; + + var superHeaders = []; + for (var index = 0; index < numChildren - 1; index++) { + var child = this.props.children[index]; + + if (!_react2.default.isValidElement(child)) continue; + + var props = { + key: 'sh' + index, + rowNumber: index + }; + superHeaders.push(this.createSuperHeaderRow(child, props)); + } + + if (superHeaders.length) return superHeaders; + } + }, { + key: 'createSuperHeaderRow', + value: function createSuperHeaderRow(child, props) { + var children = []; + if (this.props.adjustForCheckbox) { + children.push(this.getCheckboxPlaceholder(props)); + } + _react2.default.Children.forEach(child.props.children, function (child) { + children.push(child); + }); + + return _react2.default.cloneElement(child, props, children); + } + }, { + key: 'createBaseHeaderRow', + value: function createBaseHeaderRow() { + var numChildren = _react2.default.Children.count(this.props.children); + var child = numChildren === 1 ? this.props.children : this.props.children[numChildren - 1]; + var props = { + key: 'h' + numChildren, + rowNumber: numChildren + }; + + var children = [this.getSelectAllCheckboxColumn(props)]; + _react2.default.Children.forEach(child.props.children, function (child) { + children.push(child); + }); + + return _react2.default.cloneElement(child, props, children); + } + }, { + key: 'getCheckboxPlaceholder', + value: function getCheckboxPlaceholder(props) { + if (!this.props.adjustForCheckbox) return null; + + var disabled = !this.props.enableSelectAll; + var key = 'hpcb' + props.rowNumber; + return _react2.default.createElement(_TableHeaderColumn2.default, { + key: key, + style: { + width: 24, + cursor: disabled ? 'not-allowed' : 'inherit' + } + }); + } + }, { + key: 'getSelectAllCheckboxColumn', + value: function getSelectAllCheckboxColumn(props) { + if (!this.props.displaySelectAll) return this.getCheckboxPlaceholder(props); + + var disabled = !this.props.enableSelectAll; + var checkbox = _react2.default.createElement(_Checkbox2.default, { + key: 'selectallcb', + name: 'selectallcb', + value: 'selected', + disabled: disabled, + checked: this.props.selectAllSelected, + onCheck: this.handleCheckAll + }); + + var key = 'hpcb' + props.rowNumber; + return _react2.default.createElement( + _TableHeaderColumn2.default, + { + key: key, + style: { + width: 24, + cursor: disabled ? 'not-allowed' : 'inherit' + } + }, + checkbox + ); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + className = _props.className, + style = _props.style; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var superHeaderRows = this.createSuperHeaderRows(); + var baseHeaderRow = this.createBaseHeaderRow(); + + return _react2.default.createElement( + 'thead', + { className: className, style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + superHeaderRows, + baseHeaderRow + ); + } + }]); + return TableHeader; +}(_react.Component); + +TableHeader.muiName = 'TableHeader'; +TableHeader.defaultProps = { + adjustForCheckbox: true, + displaySelectAll: true, + enableSelectAll: true, + selectAllSelected: false +}; +TableHeader.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TableHeader.propTypes = { + /** + * Controls whether or not header rows should be + * adjusted for a checkbox column. If the select all + * checkbox is true, this property will not influence + * the number of columns. This is mainly useful for + * "super header" rows so that the checkbox column + * does not create an offset that needs to be accounted + * for manually. + */ + adjustForCheckbox: _react.PropTypes.bool, + /** + * Children passed to table header. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Controls whether or not the select all checkbox is displayed. + */ + displaySelectAll: _react.PropTypes.bool, + /** + * If set to true, the select all button will be interactable. + * If set to false, the button will not be interactable. + * To hide the checkbox, set displaySelectAll to false. + */ + enableSelectAll: _react.PropTypes.bool, + /** + * @ignore + * Callback when select all has been checked. + */ + onSelectAll: _react.PropTypes.func, + /** + * @ignore + * True when select all has been checked. + */ + selectAllSelected: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableHeader; + +/***/ }), +/* 836 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(7); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(8); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(6); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var tableRow = context.muiTheme.tableRow; + + + var cellBgColor = 'inherit'; + if (props.hovered || state.hovered) { + cellBgColor = tableRow.hoverColor; + } else if (props.selected) { + cellBgColor = tableRow.selectedColor; + } else if (props.striped) { + cellBgColor = tableRow.stripeColor; + } + + return { + root: { + borderBottom: props.displayBorder && '1px solid ' + tableRow.borderColor, + color: tableRow.textColor, + height: tableRow.height + }, + cell: { + backgroundColor: cellBgColor + } + }; +} + +var TableRow = function (_Component) { + (0, _inherits3.default)(TableRow, _Component); + + function TableRow() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TableRow); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableRow.__proto__ || (0, _getPrototypeOf2.default)(TableRow)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.onCellClick = function (event, columnIndex) { + if (_this.props.selectable && _this.props.onCellClick) { + _this.props.onCellClick(event, _this.props.rowNumber, columnIndex); + } + event.ctrlKey = true; + _this.onRowClick(event); + }, _this.onCellHover = function (event, columnIndex) { + if (_this.props.hoverable) { + _this.setState({ hovered: true }); + if (_this.props.onCellHover) _this.props.onCellHover(event, _this.props.rowNumber, columnIndex); + _this.onRowHover(event); + } + }, _this.onCellHoverExit = function (event, columnIndex) { + if (_this.props.hoverable) { + _this.setState({ hovered: false }); + if (_this.props.onCellHoverExit) _this.props.onCellHoverExit(event, _this.props.rowNumber, columnIndex); + _this.onRowHoverExit(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TableRow, [{ + key: 'onRowClick', + value: function onRowClick(event) { + if (this.props.selectable && this.props.onRowClick) this.props.onRowClick(event, this.props.rowNumber); + } + }, { + key: 'onRowHover', + value: function onRowHover(event) { + if (this.props.onRowHover) this.props.onRowHover(event, this.props.rowNumber); + } + }, { + key: 'onRowHoverExit', + value: function onRowHoverExit(event) { + if (this.props.onRowHoverExit) this.props.onRowHoverExit(event, this.props.rowNumber); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + className = _props.className, + displayBorder = _props.displayBorder, + hoverable = _props.hoverable, + hovered = _props.hovered, + onCellClick = _props.onCellClick, + onCellHover = _props.onCellHover, + onCellHoverExit = _props.onCellHoverExit, + onRowClick = _props.onRowClick, + onRowHover = _props.onRowHover, + onRowHoverExit = _props.onRowHoverExit, + rowNumber = _props.rowNumber, + selectable = _props.selectable, + selected = _props.selected, + striped = _props.striped, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['className', 'displayBorder', 'hoverable', 'hovered', 'onCellClick', 'onCellHover', 'onCellHoverExit', 'onRowClick', 'onRowHover', 'onRowHoverExit', 'rowNumber', 'selectable', 'selected', 'striped', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + var rowColumns = _react2.default.Children.map(this.props.children, function (child, columnNumber) { + if (_react2.default.isValidElement(child)) { + return _react2.default.cloneElement(child, { + columnNumber: columnNumber, + hoverable: _this2.props.hoverable, + key: _this2.props.rowNumber + '-' + columnNumber, + onClick: _this2.onCellClick, + onHover: _this2.onCellHover, + onHoverExit: _this2.onCellHoverExit, + style: (0, _simpleAssign2.default)({}, styles.cell, child.props.style) + }); + } + }); + + return _react2.default.createElement( + 'tr', + (0, _extends3.default)({ + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }, other), + rowColumns + ); + } + }]); + return TableRow; +}(_react.Component); + +TableRow.defaultProps = { + displayBorder: true, + hoverable: false, + hovered: false, + selectable: true, + selected: false, + striped: false +}; +TableRow.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + false ? TableRow.propTypes = { + /** + * Children passed to table row. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, row border will be displayed for the row. + * If false, no border will be drawn. + */ + displayBorder: _react.PropTypes.bool, + /** + * Controls whether or not the row reponseds to hover events. + */ + hoverable: _react.PropTypes.bool, + /** + * Controls whether or not the row should be rendered as being + * hovered. This property is evaluated in addition to this.state.hovered + * and can be used to synchronize the hovered state with some other + * external events. + */ + hovered: _react.PropTypes.bool, + /** + * @ignore + * Called when a row cell is clicked. + * rowNumber is the row number and columnId is + * the column number or the column key. + */ + onCellClick: _react.PropTypes.func, + /** + * @ignore + * Called when a table cell is hovered. + * rowNumber is the row number of the hovered row + * and columnId is the column number or the column key of the cell. + */ + onCellHover: _react.PropTypes.func, + /** + * @ignore + * Called when a table cell is no longer hovered. + * rowNumber is the row number of the row and columnId + * is the column number or the column key of the cell. + */ + onCellHoverExit: _react.PropTypes.func, + /** + * @ignore + * Called when row is clicked. + */ + onRowClick: _react.PropTypes.func, + /** + * @ignore + * Called when a table row is hovered. + * rowNumber is the row number of the hovered row. + */ + onRowHover: _react.PropTypes.func, + /** + * @ignore + * Called when a table row is no longer hovered. + * rowNumber is the row number of the row that is no longer hovered. + */ + onRowHoverExit: _react.PropTypes.func, + /** + * Number to identify the row. This property is + * automatically populated when used with the TableBody component. + */ + rowNumber: _react.PropTypes.number, + /** + * If true, table rows can be selected. If multiple row + * selection is desired, enable multiSelectable. + * The default value is true. + */ + selectable: _react.PropTypes.bool, + /** + * Indicates that a particular row is selected. + * This property can be used to programmatically select rows. + */ + selected: _react.PropTypes.bool, + /** + * Indicates whether or not the row is striped. + */ + striped: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableRow; + +/***/ }), +/* 837 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(19); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(20); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ActionDelete = function ActionDelete(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z' }) + ); +}; +ActionDelete = (0, _pure2.default)(ActionDelete); +ActionDelete.displayName = 'ActionDelete'; +ActionDelete.muiName = 'SvgIcon'; + +exports.default = ActionDelete; + +/***/ }), +/* 838 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRedux = __webpack_require__(21); + +var _reduxForm = __webpack_require__(90); + +var _reduxFormMaterialUi = __webpack_require__(131); + +var _RaisedButton = __webpack_require__(96); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _FlatButton = __webpack_require__(132); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +var _FormValidators = __webpack_require__(133); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Styles = __webpack_require__(62); + +var _Styles2 = _interopRequireDefault(_Styles); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ProfileCreateForm = function (_Component) { + (0, _inherits3.default)(ProfileCreateForm, _Component); + + function ProfileCreateForm() { + (0, _classCallCheck3.default)(this, ProfileCreateForm); + return (0, _possibleConstructorReturn3.default)(this, (ProfileCreateForm.__proto__ || (0, _getPrototypeOf2.default)(ProfileCreateForm)).apply(this, arguments)); + } + + (0, _createClass3.default)(ProfileCreateForm, [{ + key: 'render', + value: function render() { + var _props = this.props, + handleSubmit = _props.handleSubmit, + pristine = _props.pristine, + submitting = _props.submitting, + onRequestClose = _props.onRequestClose, + profiles = _props.profiles; + + var buttonStyle = { + margin: 6, + float: 'right' + }; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'profile-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'name', + validate: [Validators.required, Validators.unique(profiles.map(function (x) { + return x.name; + }))], + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Name', + hintText: 'Name', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'description', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Description', + hintText: 'Description', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Add', + style: buttonStyle, + disabled: pristine || submitting, + type: 'submit' + }), + _react2.default.createElement(_FlatButton2.default, { + label: 'Cancel', + style: buttonStyle, + onTouchTap: function onTouchTap() { + if (onRequestClose) { + onRequestClose(); + } + } + }) + ) + ); + } + }]); + return ProfileCreateForm; +}(_react.Component); + +ProfileCreateForm.propTypes = { + onRequestClose: _react.PropTypes.function +}; + +function mapStateToProps(state) { + return { + profiles: state.profiles.profiles, + currentProfile: state.profiles.currentProfile + }; +} + +var Form = (0, _reduxForm.reduxForm)({ + form: 'profile-form' +})(ProfileCreateForm); + +exports.default = (0, _reactRedux.connect)(mapStateToProps)(Form); + +/***/ }), +/* 839 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(3); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(4); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(5); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(0); + +var _react2 = _interopRequireDefault(_react); + +var _reactRedux = __webpack_require__(21); + +var _Toggle = __webpack_require__(209); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +var _profiles = __webpack_require__(210); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ProfileToggle = function (_Component) { + (0, _inherits3.default)(ProfileToggle, _Component); + + function ProfileToggle() { + (0, _classCallCheck3.default)(this, ProfileToggle); + return (0, _possibleConstructorReturn3.default)(this, (ProfileToggle.__proto__ || (0, _getPrototypeOf2.default)(ProfileToggle)).apply(this, arguments)); + } + + (0, _createClass3.default)(ProfileToggle, [{ + key: 'onSetProfile', + value: function onSetProfile(profileName) { + this.props.setProfileEnabled(profileName); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + profile = _props.profile, + currentProfile = _props.currentProfile; + + return _react2.default.createElement(_Toggle2.default, { toggled: profile.name === currentProfile, onToggle: function onToggle() { + return _this2.onSetProfile(profile.name); + } }); + } + }]); + return ProfileToggle; +}(_react.Component); + +function mapStateToProps(state) { + return { + currentProfile: state.profiles.currentProfile + }; +} + +function mapDispatchToProps(dispatch) { + return { + setProfileEnabled: function setProfileEnabled(name) { + return dispatch((0, _profiles.setProfileEnabled)(name)); + } + }; +} + +ProfileToggle.PropTypes = { + profile: _react.PropTypes.object.isRequired +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ProfileToggle); + +/***/ }), +/* 840 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.saveState = exports.loadSavedState = exports.initializeLocalStorageState = undefined; + +var _regenerator = __webpack_require__(841); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _asyncToGenerator2 = __webpack_require__(844); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); + +var _promise = __webpack_require__(335); + +var _promise2 = _interopRequireDefault(_promise); + +var _stringify = __webpack_require__(854); + +var _stringify2 = _interopRequireDefault(_stringify); + +exports.saveToChromeStorage = saveToChromeStorage; +exports.getFromChromeStorage = getFromChromeStorage; + +var _Helpers = __webpack_require__(856); + +var Helpers = _interopRequireWildcard(_Helpers); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var initializeLocalStorageState = exports.initializeLocalStorageState = function initializeLocalStorageState(initialState, version) { + localStorage.setItem('state', (0, _stringify2.default)([{ value: initialState || {}, version: version }])); +}; + +var loadSavedState = exports.loadSavedState = function loadSavedState(version) { + try { + var items = JSON.parse(localStorage.getItem('state')) || []; + var state = items.filter(function (x) { + return x.version === version; + })[0]; + if (state) { + return state.value; + } + return {}; + } catch (err) { + initializeLocalStorageState({}, version); + return {}; + } +}; + +var saveState = exports.saveState = function saveState(state, version) { + try { + // If no state is saved, we create it using the current version number + if (!localStorage.getItem('state')) { + initializeLocalStorageState(state, version); + } else { + var currentState = JSON.parse(localStorage.getItem('state')); + var currentVersionState = currentState.filter(function (x) { + return x.version === version; + })[0]; + // If a state for the current version already exists, we update it + if (currentVersionState) { + currentVersionState.value = state; + } else { + currentState.push({ value: state, version: version }); + } + localStorage.setItem('state', (0, _stringify2.default)(currentState)); + } + } catch (err) { + console.info('Possible corrupted or incompatible state found in the localstorage, reinitializing the state...'); + initializeLocalStorageState({}, version); + } +}; + +function saveToChromeStorage(key, value) { + return new _promise2.default(function (resolve) { + var obj = {}; + obj[key] = value; + chrome.storage.local.set(obj, function () { + resolve(); + }); + }); +} + +function getFromChromeStorage(key) { + var _this = this; + + return new _promise2.default(function (resolve) { + chrome.storage.local.get(key, function () { + var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(settings) { + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + resolve(Helpers.isObjectEmpty(settings) ? {} : settings[key]); + + case 1: + case 'end': + return _context.stop(); + } + } + }, _callee, _this); + })); + + return function (_x) { + return _ref.apply(this, arguments); + }; + }()); + }); +} + +/***/ }), +/* 841 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(842); + + +/***/ }), +/* 842 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this; + +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; + +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; + +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; + +module.exports = __webpack_require__(843); + +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; + } +} + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(44))) + +/***/ }), +/* 843 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, process) {/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + if (typeof process === "object" && process.domain) { + invoke = process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + while (true) { + var delegate = context.delegate; + if (delegate) { + if (method === "return" || + (method === "throw" && delegate.iterator[method] === undefined)) { + // A return or throw (when the delegate iterator has no throw + // method) always terminates the yield* loop. + context.delegate = null; + + // If the delegate iterator has a return method, give it a + // chance to clean up. + var returnMethod = delegate.iterator["return"]; + if (returnMethod) { + var record = tryCatch(returnMethod, delegate.iterator, arg); + if (record.type === "throw") { + // If the return method threw an exception, let that + // exception prevail over the original return or throw. + method = "throw"; + arg = record.arg; + continue; + } + } + + if (method === "return") { + // Continue with the outer return, now that the delegate + // iterator has been terminated. + continue; + } + } + + var record = tryCatch( + delegate.iterator[method], + delegate.iterator, + arg + ); + + if (record.type === "throw") { + context.delegate = null; + + // Like returning generator.throw(uncaught), but without the + // overhead of an extra function call. + method = "throw"; + arg = record.arg; + continue; + } + + // Delegate generator ran and handled its own exceptions so + // regardless of what the method was, we continue as if it is + // "next" with an undefined arg. + method = "next"; + arg = undefined; + + var info = record.arg; + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + } else { + state = GenStateSuspendedYield; + return info; + } + + context.delegate = null; + } + + if (method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = arg; + + } else if (method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw arg; + } + + if (context.dispatchException(arg)) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + method = "next"; + arg = undefined; + } + + } else if (method === "return") { + context.abrupt("return", arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + var info = { + value: record.arg, + done: context.done + }; + + if (record.arg === ContinueSentinel) { + if (context.delegate && method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + arg = undefined; + } + } else { + return info; + } + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(arg) call above. + method = "throw"; + arg = record.arg; + } + } + }; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.next = finallyEntry.finallyLoc; + } else { + this.complete(record); + } + + return ContinueSentinel; + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = record.arg; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + return ContinueSentinel; + } + }; +})( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this +); + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(44), __webpack_require__(108))) + +/***/ }), +/* 844 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _promise = __webpack_require__(335); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new _promise2.default(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return _promise2.default.resolve(value).then(function (value) { + step("next", value); + }, function (err) { + step("throw", err); + }); + } + } + + return step("next"); + }); + }; +}; + +/***/ }), +/* 845 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(301); +__webpack_require__(93); +__webpack_require__(124); +__webpack_require__(846); +module.exports = __webpack_require__(18).Promise; + +/***/ }), +/* 846 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(122) + , global = __webpack_require__(25) + , ctx = __webpack_require__(64) + , classof = __webpack_require__(196) + , $export = __webpack_require__(32) + , isObject = __webpack_require__(65) + , aFunction = __webpack_require__(134) + , anInstance = __webpack_require__(847) + , forOf = __webpack_require__(848) + , speciesConstructor = __webpack_require__(849) + , task = __webpack_require__(336).set + , microtask = __webpack_require__(851)() + , PROMISE = 'Promise' + , TypeError = global.TypeError + , process = global.process + , $Promise = global[PROMISE] + , process = global.process + , isNode = classof(process) == 'process' + , empty = function(){ /* empty */ } + , Internal, GenericPromiseCapability, Wrapper; + +var USE_NATIVE = !!function(){ + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1) + , FakePromise = (promise.constructor = {})[__webpack_require__(23)('species')] = function(exec){ exec(empty, empty); }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch(e){ /* empty */ } +}(); + +// helpers +var sameConstructor = function(a, b){ + // with library wrapper special case + return a === b || a === $Promise && b === Wrapper; +}; +var isThenable = function(it){ + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var newPromiseCapability = function(C){ + return sameConstructor($Promise, C) + ? new PromiseCapability(C) + : new GenericPromiseCapability(C); +}; +var PromiseCapability = GenericPromiseCapability = function(C){ + var resolve, reject; + this.promise = new C(function($$resolve, $$reject){ + if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +}; +var perform = function(exec){ + try { + exec(); + } catch(e){ + return {error: e}; + } +}; +var notify = function(promise, isReject){ + if(promise._n)return; + promise._n = true; + var chain = promise._c; + microtask(function(){ + var value = promise._v + , ok = promise._s == 1 + , i = 0; + var run = function(reaction){ + var handler = ok ? reaction.ok : reaction.fail + , resolve = reaction.resolve + , reject = reaction.reject + , domain = reaction.domain + , result, then; + try { + if(handler){ + if(!ok){ + if(promise._h == 2)onHandleUnhandled(promise); + promise._h = 1; + } + if(handler === true)result = value; + else { + if(domain)domain.enter(); + result = handler(value); + if(domain)domain.exit(); + } + if(result === reaction.promise){ + reject(TypeError('Promise-chain cycle')); + } else if(then = isThenable(result)){ + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch(e){ + reject(e); + } + }; + while(chain.length > i)run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if(isReject && !promise._h)onUnhandled(promise); + }); +}; +var onUnhandled = function(promise){ + task.call(global, function(){ + var value = promise._v + , abrupt, handler, console; + if(isUnhandled(promise)){ + abrupt = perform(function(){ + if(isNode){ + process.emit('unhandledRejection', value, promise); + } else if(handler = global.onunhandledrejection){ + handler({promise: promise, reason: value}); + } else if((console = global.console) && console.error){ + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if(abrupt)throw abrupt.error; + }); +}; +var isUnhandled = function(promise){ + if(promise._h == 1)return false; + var chain = promise._a || promise._c + , i = 0 + , reaction; + while(chain.length > i){ + reaction = chain[i++]; + if(reaction.fail || !isUnhandled(reaction.promise))return false; + } return true; +}; +var onHandleUnhandled = function(promise){ + task.call(global, function(){ + var handler; + if(isNode){ + process.emit('rejectionHandled', promise); + } else if(handler = global.onrejectionhandled){ + handler({promise: promise, reason: promise._v}); + } + }); +}; +var $reject = function(value){ + var promise = this; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if(!promise._a)promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function(value){ + var promise = this + , then; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if(promise === value)throw TypeError("Promise can't be resolved itself"); + if(then = isThenable(value)){ + microtask(function(){ + var wrapper = {_w: promise, _d: false}; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch(e){ + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch(e){ + $reject.call({_w: promise, _d: false}, e); // wrap + } +}; + +// constructor polyfill +if(!USE_NATIVE){ + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor){ + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch(err){ + $reject.call(this, err); + } + }; + Internal = function Promise(executor){ + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(852)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected){ + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if(this._a)this._a.push(reaction); + if(this._s)notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function(onRejected){ + return this.then(undefined, onRejected); + } + }); + PromiseCapability = function(){ + var promise = new Internal; + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); +__webpack_require__(123)($Promise, PROMISE); +__webpack_require__(853)(PROMISE); +Wrapper = __webpack_require__(18)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r){ + var capability = newPromiseCapability(this) + , $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x){ + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; + var capability = newPromiseCapability(this) + , $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(307)(function(iter){ + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable){ + var C = this + , capability = newPromiseCapability(C) + , resolve = capability.resolve + , reject = capability.reject; + var abrupt = perform(function(){ + var values = [] + , index = 0 + , remaining = 1; + forOf(iterable, false, function(promise){ + var $index = index++ + , alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function(value){ + if(alreadyCalled)return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable){ + var C = this + , capability = newPromiseCapability(C) + , reject = capability.reject; + var abrupt = perform(function(){ + forOf(iterable, false, function(promise){ + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + } +}); + +/***/ }), +/* 847 */ +/***/ (function(module, exports) { + +module.exports = function(it, Constructor, name, forbiddenField){ + if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; + +/***/ }), +/* 848 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(64) + , call = __webpack_require__(305) + , isArrayIter = __webpack_require__(306) + , anObject = __webpack_require__(34) + , toLength = __webpack_require__(138) + , getIterFn = __webpack_require__(195) + , BREAK = {} + , RETURN = {}; +var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , index = 0 + , length, step, iterator, result; + if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if(result === BREAK || result === RETURN)return result; + } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ + result = call(iterator, f, step.value, entries); + if(result === BREAK || result === RETURN)return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + +/***/ }), +/* 849 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(34) + , aFunction = __webpack_require__(134) + , SPECIES = __webpack_require__(23)('species'); +module.exports = function(O, D){ + var C = anObject(O).constructor, S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + +/***/ }), +/* 850 */ +/***/ (function(module, exports) { + +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function(fn, args, that){ + var un = that === undefined; + switch(args.length){ + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + +/***/ }), +/* 851 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(25) + , macrotask = __webpack_require__(336).set + , Observer = global.MutationObserver || global.WebKitMutationObserver + , process = global.process + , Promise = global.Promise + , isNode = __webpack_require__(85)(process) == 'process'; + +module.exports = function(){ + var head, last, notify; + + var flush = function(){ + var parent, fn; + if(isNode && (parent = process.domain))parent.exit(); + while(head){ + fn = head.fn; + head = head.next; + try { + fn(); + } catch(e){ + if(head)notify(); + else last = undefined; + throw e; + } + } last = undefined; + if(parent)parent.enter(); + }; + + // Node.js + if(isNode){ + notify = function(){ + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if(Observer){ + var toggle = true + , node = document.createTextNode(''); + new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new + notify = function(){ + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if(Promise && Promise.resolve){ + var promise = Promise.resolve(); + notify = function(){ + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function(){ + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function(fn){ + var task = {fn: fn, next: undefined}; + if(last)last.next = task; + if(!head){ + head = task; + notify(); + } last = task; + }; +}; + +/***/ }), +/* 852 */ +/***/ (function(module, exports, __webpack_require__) { + +var hide = __webpack_require__(49); +module.exports = function(target, src, safe){ + for(var key in src){ + if(safe && target[key])target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; + +/***/ }), +/* 853 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(25) + , core = __webpack_require__(18) + , dP = __webpack_require__(33) + , DESCRIPTORS = __webpack_require__(41) + , SPECIES = __webpack_require__(23)('species'); + +module.exports = function(KEY){ + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + configurable: true, + get: function(){ return this; } + }); +}; + +/***/ }), +/* 854 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(855), __esModule: true }; + +/***/ }), +/* 855 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(18) + , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify}); +module.exports = function stringify(it){ // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); +}; + +/***/ }), +/* 856 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(59); + +var _keys2 = _interopRequireDefault(_keys); + +exports.isObjectEmpty = isObjectEmpty; +exports.getQueryStringValue = getQueryStringValue; +exports.pageHasNodeOfClass = pageHasNodeOfClass; +exports.hasStringInPath = hasStringInPath; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isObjectEmpty(obj) { + return (0, _keys2.default)(obj).length === 0 && obj.constructor === Object; +} + +function getQueryStringValue(key) { + return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1")); +} + +function pageHasNodeOfClass(className) { + return document.querySelectorAll('.' + className).length > 0; +} + +function hasStringInPath(value) { + return location.pathname.substring(1).split('/').filter(function (x) { + return !!x && x === value; + }).length > 0; +} + +/***/ }) +>>>>>>> Fix profiles, small updates +/******/ ]); \ No newline at end of file diff --git a/bot/build/extension.js b/bot/build/extension.js index 729ae56..72a0922 100644 --- a/bot/build/extension.js +++ b/bot/build/extension.js @@ -60,7 +60,7 @@ /******/ __webpack_require__.p = "/"; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 306); +/******/ return __webpack_require__(__webpack_require__.s = 313); /******/ }) /************************************************************************/ /******/ ([ @@ -237,10 +237,6 @@ process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); @@ -260,7 +256,7 @@ process.umask = function() { return 0; }; "use strict"; -module.exports = __webpack_require__(65); +module.exports = __webpack_require__(55); /***/ }), @@ -287,7 +283,7 @@ exports.default = function (instance, Constructor) { exports.__esModule = true; -var _defineProperty = __webpack_require__(137); +var _defineProperty = __webpack_require__(144); var _defineProperty2 = _interopRequireDefault(_defineProperty); @@ -315,7 +311,7 @@ exports.default = function () { /* 4 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(336), __esModule: true }; +module.exports = { "default": __webpack_require__(352), __esModule: true }; /***/ }), /* 5 */ @@ -326,7 +322,7 @@ module.exports = { "default": __webpack_require__(336), __esModule: true }; exports.__esModule = true; -var _typeof2 = __webpack_require__(76); +var _typeof2 = __webpack_require__(42); var _typeof3 = _interopRequireDefault(_typeof2); @@ -349,15 +345,15 @@ exports.default = function (self, call) { exports.__esModule = true; -var _setPrototypeOf = __webpack_require__(352); +var _setPrototypeOf = __webpack_require__(356); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); -var _create = __webpack_require__(356); +var _create = __webpack_require__(360); var _create2 = _interopRequireDefault(_create); -var _typeof2 = __webpack_require__(76); +var _typeof2 = __webpack_require__(42); var _typeof3 = _interopRequireDefault(_typeof2); @@ -525,7 +521,7 @@ module.exports = invariant; -var emptyFunction = __webpack_require__(23); +var emptyFunction = __webpack_require__(21); /** * Similar to invariant but only logs a warning if the condition is not met. @@ -537,43 +533,45 @@ var emptyFunction = __webpack_require__(23); var warning = emptyFunction; if (process.env.NODE_ENV !== 'production') { - var printWarning = function printWarning(format) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; + (function () { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } - warning = function warning(condition, format) { - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); - } + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. } - printWarning.apply(undefined, [format].concat(args)); - } - }; + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); } module.exports = warning; @@ -621,47 +619,6 @@ exports.default = { /***/ }), /* 13 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__splice__ = __webpack_require__(510); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getIn__ = __webpack_require__(511); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setIn__ = __webpack_require__(536); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepEqual__ = __webpack_require__(537); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__deleteIn__ = __webpack_require__(572); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys__ = __webpack_require__(573); - - - - - - - -var structure = { - allowsArrayErrors: true, - empty: {}, - emptyList: [], - getIn: __WEBPACK_IMPORTED_MODULE_1__getIn__["a" /* default */], - setIn: __WEBPACK_IMPORTED_MODULE_2__setIn__["a" /* default */], - deepEqual: __WEBPACK_IMPORTED_MODULE_3__deepEqual__["a" /* default */], - deleteIn: __WEBPACK_IMPORTED_MODULE_4__deleteIn__["a" /* default */], - fromJS: function fromJS(value) { - return value; - }, - keys: __WEBPACK_IMPORTED_MODULE_5__keys__["a" /* default */], - size: function size(array) { - return array ? array.length : 0; - }, - splice: __WEBPACK_IMPORTED_MODULE_0__splice__["a" /* default */], - toJS: function toJS(value) { - return value; - } -}; - -/* harmony default export */ __webpack_exports__["a"] = (structure); - -/***/ }), -/* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -705,7 +662,7 @@ function reactProdInvariant(code) { module.exports = reactProdInvariant; /***/ }), -/* 15 */ +/* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -802,7 +759,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { /***/ }), -/* 16 */ +/* 15 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -818,10 +775,10 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); -var DOMProperty = __webpack_require__(43); -var ReactDOMComponentFlags = __webpack_require__(220); +var DOMProperty = __webpack_require__(45); +var ReactDOMComponentFlags = __webpack_require__(224); var invariant = __webpack_require__(10); @@ -1003,25 +960,24 @@ module.exports = ReactDOMComponentTree; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 17 */ +/* 16 */ /***/ (function(module, exports) { -var core = module.exports = { version: '2.5.0' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - +var core = module.exports = {version: '2.4.0'}; +if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef /***/ }), -/* 18 */ +/* 17 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = __webpack_require__(383); +module.exports = __webpack_require__(388); /***/ }), -/* 19 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1062,117 +1018,7 @@ var ExecutionEnvironment = { module.exports = ExecutionEnvironment; /***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -if (process.env.NODE_ENV !== 'production') { - var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && - Symbol.for && - Symbol.for('react.element')) || - 0xeac7; - - var isValidElement = function(object) { - return typeof object === 'object' && - object !== null && - object.$$typeof === REACT_ELEMENT_TYPE; - }; - - // By explicitly using `prop-types` you are opting into new development behavior. - // http://fb.me/prop-types-in-prod - var throwOnDirectAccess = true; - module.exports = __webpack_require__(219)(isValidElement, throwOnDirectAccess); -} else { - // By explicitly using `prop-types` you are opting into new production behavior. - // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(471)(); -} - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -var store = __webpack_require__(132)('wks'); -var uid = __webpack_require__(92); -var Symbol = __webpack_require__(22).Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - -$exports.store = store; - - -/***/ }), -/* 22 */ -/***/ (function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - - -/***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - -function makeEmptyFunction(arg) { - return function () { - return arg; - }; -} - -/** - * This function accepts and discards inputs; it has no side effects. This is - * primarily useful idiomatically for overridable function endpoints which - * always need to be callable, since JS lacks a null-call idiom ala Cocoa. - */ -var emptyFunction = function emptyFunction() {}; - -emptyFunction.thatReturns = makeEmptyFunction; -emptyFunction.thatReturnsFalse = makeEmptyFunction(false); -emptyFunction.thatReturnsTrue = makeEmptyFunction(true); -emptyFunction.thatReturnsNull = makeEmptyFunction(null); -emptyFunction.thatReturnsThis = function () { - return this; -}; -emptyFunction.thatReturnsArgument = function (arg) { - return arg; -}; - -module.exports = emptyFunction; - -/***/ }), -/* 24 */ +/* 19 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1189,9 +1035,9 @@ module.exports = emptyFunction; -var _prodInvariant = __webpack_require__(66); +var _prodInvariant = __webpack_require__(56); -var ReactCurrentOwner = __webpack_require__(30); +var ReactCurrentOwner = __webpack_require__(29); var invariant = __webpack_require__(10); var warning = __webpack_require__(11); @@ -1556,6 +1402,124 @@ var ReactComponentTreeHook = { module.exports = ReactComponentTreeHook; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(136)('wks') + , uid = __webpack_require__(93) + , Symbol = __webpack_require__(24).Symbol + , USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function(name){ + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + +function makeEmptyFunction(arg) { + return function () { + return arg; + }; +} + +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +var emptyFunction = function emptyFunction() {}; + +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function () { + return this; +}; +emptyFunction.thatReturnsArgument = function (arg) { + return arg; +}; + +module.exports = emptyFunction; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _shouldUpdate = __webpack_require__(650); + +var _shouldUpdate2 = _interopRequireDefault(_shouldUpdate); + +var _shallowEqual = __webpack_require__(58); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _createHelper = __webpack_require__(292); + +var _createHelper2 = _interopRequireDefault(_createHelper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var pure = (0, _shouldUpdate2.default)(function (props, nextProps) { + return !(0, _shallowEqual2.default)(props, nextProps); +}); + +exports.default = (0, _createHelper2.default)(pure, 'pure', true, true); + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _SvgIcon = __webpack_require__(657); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _SvgIcon2.default; + +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); +if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { @@ -1579,7 +1543,7 @@ module.exports = ReactComponentTreeHook; var debugTool = null; if (process.env.NODE_ENV !== 'production') { - var ReactDebugTool = __webpack_require__(393); + var ReactDebugTool = __webpack_require__(398); debugTool = ReactDebugTool; } @@ -1656,156 +1620,6 @@ module.exports = warning; /***/ }), /* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(22); -var core = __webpack_require__(17); -var ctx = __webpack_require__(60); -var hide = __webpack_require__(47); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var IS_WRAP = type & $export.W; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE]; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; - var key, own, out; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - if (own && key in exports) continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function (C) { - var F = function (a, b, c) { - if (this instanceof C) { - switch (arguments.length) { - case 0: return new C(); - case 1: return new C(a); - case 2: return new C(a, b); - } return new C(a, b, c); - } return C.apply(this, arguments); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% - if (IS_PROTO) { - (exports.virtual || (exports.virtual = {}))[key] = out; - // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% - if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); - } - } -}; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _shouldUpdate = __webpack_require__(670); - -var _shouldUpdate2 = _interopRequireDefault(_shouldUpdate); - -var _shallowEqual = __webpack_require__(54); - -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); - -var _createHelper = __webpack_require__(290); - -var _createHelper2 = _interopRequireDefault(_createHelper); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var pure = (0, _shouldUpdate2.default)(function (props, nextProps) { - return !(0, _shallowEqual2.default)(props, nextProps); -}); - -exports.default = (0, _createHelper2.default)(pure, 'pure', true, true); - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; - -var _SvgIcon = __webpack_require__(677); - -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _SvgIcon2.default; - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - - -/** - * Keeps track of the current owner. - * - * The current owner is the component who should own any components that are - * currently being constructed. - */ -var ReactCurrentOwner = { - /** - * @internal - * @type {ReactComponent} - */ - current: null -}; - -module.exports = ReactCurrentOwner; - -/***/ }), -/* 31 */ /***/ (function(module, exports) { // Source: http://jsfiddle.net/vWx8V/ @@ -1957,7 +1771,64 @@ for (var alias in aliases) { /***/ }), -/* 32 */ +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.connect = exports.Provider = undefined; + +var _Provider = __webpack_require__(479); + +var _Provider2 = _interopRequireDefault(_Provider); + +var _connect = __webpack_require__(480); + +var _connect2 = _interopRequireDefault(_connect); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +exports.Provider = _Provider2["default"]; +exports.connect = _connect2["default"]; + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + */ +var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null +}; + +module.exports = ReactCurrentOwner; + +/***/ }), +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1973,13 +1844,13 @@ for (var alias in aliases) { -var _prodInvariant = __webpack_require__(14), - _assign = __webpack_require__(15); +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); -var CallbackQueue = __webpack_require__(224); -var PooledClass = __webpack_require__(53); -var ReactFeatureFlags = __webpack_require__(225); -var ReactReconciler = __webpack_require__(67); +var CallbackQueue = __webpack_require__(228); +var PooledClass = __webpack_require__(57); +var ReactFeatureFlags = __webpack_require__(229); +var ReactReconciler = __webpack_require__(69); var Transaction = __webpack_require__(102); var invariant = __webpack_require__(10); @@ -2214,34 +2085,11 @@ module.exports = ReactUpdates; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; -exports.connect = exports.Provider = undefined; - -var _Provider = __webpack_require__(475); - -var _Provider2 = _interopRequireDefault(_Provider); - -var _connect = __webpack_require__(476); - -var _connect2 = _interopRequireDefault(_connect); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -exports.Provider = _Provider2["default"]; -exports.connect = _connect2["default"]; - -/***/ }), -/* 34 */ +/* 31 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(251); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(254); /** Detect free variable `self`. */ @@ -2254,7 +2102,7 @@ var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || fr /***/ }), -/* 35 */ +/* 32 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -2287,40 +2135,104 @@ var isArray = Array.isArray; /***/ }), -/* 36 */ +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(24) + , core = __webpack_require__(16) + , ctx = __webpack_require__(64) + , hide = __webpack_require__(50) + , PROTOTYPE = 'prototype'; + +var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(a, b, c){ + if(this instanceof C){ + switch(arguments.length){ + case 0: return new C; + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if(IS_PROTO){ + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + +/***/ }), +/* 34 */ /***/ (function(module, exports, __webpack_require__) { -var anObject = __webpack_require__(37); -var IE8_DOM_DEFINE = __webpack_require__(194); -var toPrimitive = __webpack_require__(128); -var dP = Object.defineProperty; +var anObject = __webpack_require__(35) + , IE8_DOM_DEFINE = __webpack_require__(200) + , toPrimitive = __webpack_require__(132) + , dP = Object.defineProperty; -exports.f = __webpack_require__(42) ? Object.defineProperty : function defineProperty(O, P, Attributes) { +exports.f = __webpack_require__(41) ? Object.defineProperty : function defineProperty(O, P, Attributes){ anObject(O); P = toPrimitive(P, true); anObject(Attributes); - if (IE8_DOM_DEFINE) try { + if(IE8_DOM_DEFINE)try { return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; return O; }; - /***/ }), -/* 37 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(61); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); +var isObject = __webpack_require__(65); +module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; }; - /***/ }), -/* 38 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2336,11 +2248,11 @@ module.exports = function (it) { -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(14); -var PooledClass = __webpack_require__(53); +var PooledClass = __webpack_require__(57); -var emptyFunction = __webpack_require__(23); +var emptyFunction = __webpack_require__(21); var warning = __webpack_require__(11); var didWarnForAddedNewProperty = false; @@ -2428,6 +2340,7 @@ function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarg } _assign(SyntheticEvent.prototype, { + preventDefault: function () { this.defaultPrevented = true; var event = this.nativeEvent; @@ -2437,8 +2350,8 @@ _assign(SyntheticEvent.prototype, { if (event.preventDefault) { event.preventDefault(); - // eslint-disable-next-line valid-typeof } else if (typeof event.returnValue !== 'unknown') { + // eslint-disable-line valid-typeof event.returnValue = false; } this.isDefaultPrevented = emptyFunction.thatReturnsTrue; @@ -2452,8 +2365,8 @@ _assign(SyntheticEvent.prototype, { if (event.stopPropagation) { event.stopPropagation(); - // eslint-disable-next-line valid-typeof } else if (typeof event.cancelBubble !== 'unknown') { + // eslint-disable-line valid-typeof // The ChangeEventPlugin registers a "propertychange" event for // IE. This event does not support bubbling or cancelling, and // any references to cancelBubble throw "Member not found". A @@ -2502,6 +2415,7 @@ _assign(SyntheticEvent.prototype, { Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)); } } + }); SyntheticEvent.Interface = EventInterface; @@ -2517,7 +2431,7 @@ if (process.env.NODE_ENV !== 'production') { return new Proxy(constructor.apply(that, args), { set: function (target, prop, value) { if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) { - process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0; didWarnForAddedNewProperty = true; } target[prop] = value; @@ -2586,13 +2500,13 @@ function getPooledWarningPropertyDefinition(propName, getVal) { function warn(action, result) { var warningCondition = false; - process.env.NODE_ENV !== 'production' ? warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0; + process.env.NODE_ENV !== 'production' ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0; } } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 39 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2601,81 +2515,294 @@ function getPooledWarningPropertyDefinition(propName, getVal) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = undefined; +var red50 = exports.red50 = '#ffebee'; +var red100 = exports.red100 = '#ffcdd2'; +var red200 = exports.red200 = '#ef9a9a'; +var red300 = exports.red300 = '#e57373'; +var red400 = exports.red400 = '#ef5350'; +var red500 = exports.red500 = '#f44336'; +var red600 = exports.red600 = '#e53935'; +var red700 = exports.red700 = '#d32f2f'; +var red800 = exports.red800 = '#c62828'; +var red900 = exports.red900 = '#b71c1c'; +var redA100 = exports.redA100 = '#ff8a80'; +var redA200 = exports.redA200 = '#ff5252'; +var redA400 = exports.redA400 = '#ff1744'; +var redA700 = exports.redA700 = '#d50000'; -var _Paper = __webpack_require__(665); +var pink50 = exports.pink50 = '#fce4ec'; +var pink100 = exports.pink100 = '#f8bbd0'; +var pink200 = exports.pink200 = '#f48fb1'; +var pink300 = exports.pink300 = '#f06292'; +var pink400 = exports.pink400 = '#ec407a'; +var pink500 = exports.pink500 = '#e91e63'; +var pink600 = exports.pink600 = '#d81b60'; +var pink700 = exports.pink700 = '#c2185b'; +var pink800 = exports.pink800 = '#ad1457'; +var pink900 = exports.pink900 = '#880e4f'; +var pinkA100 = exports.pinkA100 = '#ff80ab'; +var pinkA200 = exports.pinkA200 = '#ff4081'; +var pinkA400 = exports.pinkA400 = '#f50057'; +var pinkA700 = exports.pinkA700 = '#c51162'; -var _Paper2 = _interopRequireDefault(_Paper); +var purple50 = exports.purple50 = '#f3e5f5'; +var purple100 = exports.purple100 = '#e1bee7'; +var purple200 = exports.purple200 = '#ce93d8'; +var purple300 = exports.purple300 = '#ba68c8'; +var purple400 = exports.purple400 = '#ab47bc'; +var purple500 = exports.purple500 = '#9c27b0'; +var purple600 = exports.purple600 = '#8e24aa'; +var purple700 = exports.purple700 = '#7b1fa2'; +var purple800 = exports.purple800 = '#6a1b9a'; +var purple900 = exports.purple900 = '#4a148c'; +var purpleA100 = exports.purpleA100 = '#ea80fc'; +var purpleA200 = exports.purpleA200 = '#e040fb'; +var purpleA400 = exports.purpleA400 = '#d500f9'; +var purpleA700 = exports.purpleA700 = '#aa00ff'; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var deepPurple50 = exports.deepPurple50 = '#ede7f6'; +var deepPurple100 = exports.deepPurple100 = '#d1c4e9'; +var deepPurple200 = exports.deepPurple200 = '#b39ddb'; +var deepPurple300 = exports.deepPurple300 = '#9575cd'; +var deepPurple400 = exports.deepPurple400 = '#7e57c2'; +var deepPurple500 = exports.deepPurple500 = '#673ab7'; +var deepPurple600 = exports.deepPurple600 = '#5e35b1'; +var deepPurple700 = exports.deepPurple700 = '#512da8'; +var deepPurple800 = exports.deepPurple800 = '#4527a0'; +var deepPurple900 = exports.deepPurple900 = '#311b92'; +var deepPurpleA100 = exports.deepPurpleA100 = '#b388ff'; +var deepPurpleA200 = exports.deepPurpleA200 = '#7c4dff'; +var deepPurpleA400 = exports.deepPurpleA400 = '#651fff'; +var deepPurpleA700 = exports.deepPurpleA700 = '#6200ea'; -exports.default = _Paper2.default; +var indigo50 = exports.indigo50 = '#e8eaf6'; +var indigo100 = exports.indigo100 = '#c5cae9'; +var indigo200 = exports.indigo200 = '#9fa8da'; +var indigo300 = exports.indigo300 = '#7986cb'; +var indigo400 = exports.indigo400 = '#5c6bc0'; +var indigo500 = exports.indigo500 = '#3f51b5'; +var indigo600 = exports.indigo600 = '#3949ab'; +var indigo700 = exports.indigo700 = '#303f9f'; +var indigo800 = exports.indigo800 = '#283593'; +var indigo900 = exports.indigo900 = '#1a237e'; +var indigoA100 = exports.indigoA100 = '#8c9eff'; +var indigoA200 = exports.indigoA200 = '#536dfe'; +var indigoA400 = exports.indigoA400 = '#3d5afe'; +var indigoA700 = exports.indigoA700 = '#304ffe'; -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { +var blue50 = exports.blue50 = '#e3f2fd'; +var blue100 = exports.blue100 = '#bbdefb'; +var blue200 = exports.blue200 = '#90caf9'; +var blue300 = exports.blue300 = '#64b5f6'; +var blue400 = exports.blue400 = '#42a5f5'; +var blue500 = exports.blue500 = '#2196f3'; +var blue600 = exports.blue600 = '#1e88e5'; +var blue700 = exports.blue700 = '#1976d2'; +var blue800 = exports.blue800 = '#1565c0'; +var blue900 = exports.blue900 = '#0d47a1'; +var blueA100 = exports.blueA100 = '#82b1ff'; +var blueA200 = exports.blueA200 = '#448aff'; +var blueA400 = exports.blueA400 = '#2979ff'; +var blueA700 = exports.blueA700 = '#2962ff'; -"use strict"; +var lightBlue50 = exports.lightBlue50 = '#e1f5fe'; +var lightBlue100 = exports.lightBlue100 = '#b3e5fc'; +var lightBlue200 = exports.lightBlue200 = '#81d4fa'; +var lightBlue300 = exports.lightBlue300 = '#4fc3f7'; +var lightBlue400 = exports.lightBlue400 = '#29b6f6'; +var lightBlue500 = exports.lightBlue500 = '#03a9f4'; +var lightBlue600 = exports.lightBlue600 = '#039be5'; +var lightBlue700 = exports.lightBlue700 = '#0288d1'; +var lightBlue800 = exports.lightBlue800 = '#0277bd'; +var lightBlue900 = exports.lightBlue900 = '#01579b'; +var lightBlueA100 = exports.lightBlueA100 = '#80d8ff'; +var lightBlueA200 = exports.lightBlueA200 = '#40c4ff'; +var lightBlueA400 = exports.lightBlueA400 = '#00b0ff'; +var lightBlueA700 = exports.lightBlueA700 = '#0091ea'; +var cyan50 = exports.cyan50 = '#e0f7fa'; +var cyan100 = exports.cyan100 = '#b2ebf2'; +var cyan200 = exports.cyan200 = '#80deea'; +var cyan300 = exports.cyan300 = '#4dd0e1'; +var cyan400 = exports.cyan400 = '#26c6da'; +var cyan500 = exports.cyan500 = '#00bcd4'; +var cyan600 = exports.cyan600 = '#00acc1'; +var cyan700 = exports.cyan700 = '#0097a7'; +var cyan800 = exports.cyan800 = '#00838f'; +var cyan900 = exports.cyan900 = '#006064'; +var cyanA100 = exports.cyanA100 = '#84ffff'; +var cyanA200 = exports.cyanA200 = '#18ffff'; +var cyanA400 = exports.cyanA400 = '#00e5ff'; +var cyanA700 = exports.cyanA700 = '#00b8d4'; -Object.defineProperty(exports, "__esModule", { - value: true -}); +var teal50 = exports.teal50 = '#e0f2f1'; +var teal100 = exports.teal100 = '#b2dfdb'; +var teal200 = exports.teal200 = '#80cbc4'; +var teal300 = exports.teal300 = '#4db6ac'; +var teal400 = exports.teal400 = '#26a69a'; +var teal500 = exports.teal500 = '#009688'; +var teal600 = exports.teal600 = '#00897b'; +var teal700 = exports.teal700 = '#00796b'; +var teal800 = exports.teal800 = '#00695c'; +var teal900 = exports.teal900 = '#004d40'; +var tealA100 = exports.tealA100 = '#a7ffeb'; +var tealA200 = exports.tealA200 = '#64ffda'; +var tealA400 = exports.tealA400 = '#1de9b6'; +var tealA700 = exports.tealA700 = '#00bfa5'; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var green50 = exports.green50 = '#e8f5e9'; +var green100 = exports.green100 = '#c8e6c9'; +var green200 = exports.green200 = '#a5d6a7'; +var green300 = exports.green300 = '#81c784'; +var green400 = exports.green400 = '#66bb6a'; +var green500 = exports.green500 = '#4caf50'; +var green600 = exports.green600 = '#43a047'; +var green700 = exports.green700 = '#388e3c'; +var green800 = exports.green800 = '#2e7d32'; +var green900 = exports.green900 = '#1b5e20'; +var greenA100 = exports.greenA100 = '#b9f6ca'; +var greenA200 = exports.greenA200 = '#69f0ae'; +var greenA400 = exports.greenA400 = '#00e676'; +var greenA700 = exports.greenA700 = '#00c853'; -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +var lightGreen50 = exports.lightGreen50 = '#f1f8e9'; +var lightGreen100 = exports.lightGreen100 = '#dcedc8'; +var lightGreen200 = exports.lightGreen200 = '#c5e1a5'; +var lightGreen300 = exports.lightGreen300 = '#aed581'; +var lightGreen400 = exports.lightGreen400 = '#9ccc65'; +var lightGreen500 = exports.lightGreen500 = '#8bc34a'; +var lightGreen600 = exports.lightGreen600 = '#7cb342'; +var lightGreen700 = exports.lightGreen700 = '#689f38'; +var lightGreen800 = exports.lightGreen800 = '#558b2f'; +var lightGreen900 = exports.lightGreen900 = '#33691e'; +var lightGreenA100 = exports.lightGreenA100 = '#ccff90'; +var lightGreenA200 = exports.lightGreenA200 = '#b2ff59'; +var lightGreenA400 = exports.lightGreenA400 = '#76ff03'; +var lightGreenA700 = exports.lightGreenA700 = '#64dd17'; -exports.default = createComponent; +var lime50 = exports.lime50 = '#f9fbe7'; +var lime100 = exports.lime100 = '#f0f4c3'; +var lime200 = exports.lime200 = '#e6ee9c'; +var lime300 = exports.lime300 = '#dce775'; +var lime400 = exports.lime400 = '#d4e157'; +var lime500 = exports.lime500 = '#cddc39'; +var lime600 = exports.lime600 = '#c0ca33'; +var lime700 = exports.lime700 = '#afb42b'; +var lime800 = exports.lime800 = '#9e9d24'; +var lime900 = exports.lime900 = '#827717'; +var limeA100 = exports.limeA100 = '#f4ff81'; +var limeA200 = exports.limeA200 = '#eeff41'; +var limeA400 = exports.limeA400 = '#c6ff00'; +var limeA700 = exports.limeA700 = '#aeea00'; -var _react = __webpack_require__(1); +var yellow50 = exports.yellow50 = '#fffde7'; +var yellow100 = exports.yellow100 = '#fff9c4'; +var yellow200 = exports.yellow200 = '#fff59d'; +var yellow300 = exports.yellow300 = '#fff176'; +var yellow400 = exports.yellow400 = '#ffee58'; +var yellow500 = exports.yellow500 = '#ffeb3b'; +var yellow600 = exports.yellow600 = '#fdd835'; +var yellow700 = exports.yellow700 = '#fbc02d'; +var yellow800 = exports.yellow800 = '#f9a825'; +var yellow900 = exports.yellow900 = '#f57f17'; +var yellowA100 = exports.yellowA100 = '#ffff8d'; +var yellowA200 = exports.yellowA200 = '#ffff00'; +var yellowA400 = exports.yellowA400 = '#ffea00'; +var yellowA700 = exports.yellowA700 = '#ffd600'; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +var amber50 = exports.amber50 = '#fff8e1'; +var amber100 = exports.amber100 = '#ffecb3'; +var amber200 = exports.amber200 = '#ffe082'; +var amber300 = exports.amber300 = '#ffd54f'; +var amber400 = exports.amber400 = '#ffca28'; +var amber500 = exports.amber500 = '#ffc107'; +var amber600 = exports.amber600 = '#ffb300'; +var amber700 = exports.amber700 = '#ffa000'; +var amber800 = exports.amber800 = '#ff8f00'; +var amber900 = exports.amber900 = '#ff6f00'; +var amberA100 = exports.amberA100 = '#ffe57f'; +var amberA200 = exports.amberA200 = '#ffd740'; +var amberA400 = exports.amberA400 = '#ffc400'; +var amberA700 = exports.amberA700 = '#ffab00'; -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +var orange50 = exports.orange50 = '#fff3e0'; +var orange100 = exports.orange100 = '#ffe0b2'; +var orange200 = exports.orange200 = '#ffcc80'; +var orange300 = exports.orange300 = '#ffb74d'; +var orange400 = exports.orange400 = '#ffa726'; +var orange500 = exports.orange500 = '#ff9800'; +var orange600 = exports.orange600 = '#fb8c00'; +var orange700 = exports.orange700 = '#f57c00'; +var orange800 = exports.orange800 = '#ef6c00'; +var orange900 = exports.orange900 = '#e65100'; +var orangeA100 = exports.orangeA100 = '#ffd180'; +var orangeA200 = exports.orangeA200 = '#ffab40'; +var orangeA400 = exports.orangeA400 = '#ff9100'; +var orangeA700 = exports.orangeA700 = '#ff6d00'; -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +var deepOrange50 = exports.deepOrange50 = '#fbe9e7'; +var deepOrange100 = exports.deepOrange100 = '#ffccbc'; +var deepOrange200 = exports.deepOrange200 = '#ffab91'; +var deepOrange300 = exports.deepOrange300 = '#ff8a65'; +var deepOrange400 = exports.deepOrange400 = '#ff7043'; +var deepOrange500 = exports.deepOrange500 = '#ff5722'; +var deepOrange600 = exports.deepOrange600 = '#f4511e'; +var deepOrange700 = exports.deepOrange700 = '#e64a19'; +var deepOrange800 = exports.deepOrange800 = '#d84315'; +var deepOrange900 = exports.deepOrange900 = '#bf360c'; +var deepOrangeA100 = exports.deepOrangeA100 = '#ff9e80'; +var deepOrangeA200 = exports.deepOrangeA200 = '#ff6e40'; +var deepOrangeA400 = exports.deepOrangeA400 = '#ff3d00'; +var deepOrangeA700 = exports.deepOrangeA700 = '#dd2c00'; -/** - * Creates a component class that renders the given Material UI component - * - * @param MaterialUIComponent The material ui component to render - * @param mapProps A mapping of props provided by redux-form to the props the Material UI - * component needs - */ -function createComponent(MaterialUIComponent, mapProps) { - var InputComponent = function (_Component) { - _inherits(InputComponent, _Component); +var brown50 = exports.brown50 = '#efebe9'; +var brown100 = exports.brown100 = '#d7ccc8'; +var brown200 = exports.brown200 = '#bcaaa4'; +var brown300 = exports.brown300 = '#a1887f'; +var brown400 = exports.brown400 = '#8d6e63'; +var brown500 = exports.brown500 = '#795548'; +var brown600 = exports.brown600 = '#6d4c41'; +var brown700 = exports.brown700 = '#5d4037'; +var brown800 = exports.brown800 = '#4e342e'; +var brown900 = exports.brown900 = '#3e2723'; - function InputComponent() { - _classCallCheck(this, InputComponent); - - return _possibleConstructorReturn(this, (InputComponent.__proto__ || Object.getPrototypeOf(InputComponent)).apply(this, arguments)); - } +var blueGrey50 = exports.blueGrey50 = '#eceff1'; +var blueGrey100 = exports.blueGrey100 = '#cfd8dc'; +var blueGrey200 = exports.blueGrey200 = '#b0bec5'; +var blueGrey300 = exports.blueGrey300 = '#90a4ae'; +var blueGrey400 = exports.blueGrey400 = '#78909c'; +var blueGrey500 = exports.blueGrey500 = '#607d8b'; +var blueGrey600 = exports.blueGrey600 = '#546e7a'; +var blueGrey700 = exports.blueGrey700 = '#455a64'; +var blueGrey800 = exports.blueGrey800 = '#37474f'; +var blueGrey900 = exports.blueGrey900 = '#263238'; - _createClass(InputComponent, [{ - key: 'getRenderedComponent', - value: function getRenderedComponent() { - return this.refs.component; - } - }, { - key: 'render', - value: function render() { - return (0, _react.createElement)(MaterialUIComponent, _extends({}, mapProps(this.props), { - ref: 'component' - })); - } - }]); +var grey50 = exports.grey50 = '#fafafa'; +var grey100 = exports.grey100 = '#f5f5f5'; +var grey200 = exports.grey200 = '#eeeeee'; +var grey300 = exports.grey300 = '#e0e0e0'; +var grey400 = exports.grey400 = '#bdbdbd'; +var grey500 = exports.grey500 = '#9e9e9e'; +var grey600 = exports.grey600 = '#757575'; +var grey700 = exports.grey700 = '#616161'; +var grey800 = exports.grey800 = '#424242'; +var grey900 = exports.grey900 = '#212121'; - return InputComponent; - }(_react.Component); +var black = exports.black = '#000000'; +var white = exports.white = '#ffffff'; - InputComponent.displayName = 'ReduxFormMaterialUI' + MaterialUIComponent.name; - return InputComponent; -} +var transparent = exports.transparent = 'rgba(0, 0, 0, 0)'; +var fullBlack = exports.fullBlack = 'rgba(0, 0, 0, 1)'; +var darkBlack = exports.darkBlack = 'rgba(0, 0, 0, 0.87)'; +var lightBlack = exports.lightBlack = 'rgba(0, 0, 0, 0.54)'; +var minBlack = exports.minBlack = 'rgba(0, 0, 0, 0.26)'; +var faintBlack = exports.faintBlack = 'rgba(0, 0, 0, 0.12)'; +var fullWhite = exports.fullWhite = 'rgba(255, 255, 255, 1)'; +var darkWhite = exports.darkWhite = 'rgba(255, 255, 255, 0.87)'; +var lightWhite = exports.lightWhite = 'rgba(255, 255, 255, 0.54)'; /***/ }), -/* 41 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2684,240 +2811,81 @@ function createComponent(MaterialUIComponent, mapProps) { Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = undefined; -exports.default = function (prefixedValue, value, keepUnprefixed) { - return keepUnprefixed ? [prefixedValue, value] : prefixedValue; -}; - -module.exports = exports["default"]; +var _Paper = __webpack_require__(645); -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { +var _Paper2 = _interopRequireDefault(_Paper); -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(62)(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +exports.default = _Paper2.default; /***/ }), -/* 43 */ +/* 39 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _prodInvariant = __webpack_require__(14); - -var invariant = __webpack_require__(10); - -function checkMask(value, bitmask) { - return (value & bitmask) === bitmask; -} - -var DOMPropertyInjection = { - /** - * Mapping from normalized, camelcased property names to a configuration that - * specifies how the associated DOM property should be accessed or rendered. - */ - MUST_USE_PROPERTY: 0x1, - HAS_BOOLEAN_VALUE: 0x4, - HAS_NUMERIC_VALUE: 0x8, - HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, - HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, - - /** - * Inject some specialized knowledge about the DOM. This takes a config object - * with the following properties: - * - * isCustomAttribute: function that given an attribute name will return true - * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* - * attributes where it's impossible to enumerate all of the possible - * attribute names, - * - * Properties: object mapping DOM property name to one of the - * DOMPropertyInjection constants or null. If your attribute isn't in here, - * it won't get written to the DOM. - * - * DOMAttributeNames: object mapping React attribute name to the DOM - * attribute name. Attribute names not specified use the **lowercase** - * normalized name. - * - * DOMAttributeNamespaces: object mapping React attribute name to the DOM - * attribute namespace URL. (Attribute names not specified use no namespace.) - * - * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. - * Property names not specified use the normalized name. - * - * DOMMutationMethods: Properties that require special mutation methods. If - * `value` is undefined, the mutation method should unset the property. - * - * @param {object} domPropertyConfig the config as described above. - */ - injectDOMPropertyConfig: function (domPropertyConfig) { - var Injection = DOMPropertyInjection; - var Properties = domPropertyConfig.Properties || {}; - var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; - var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; - var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; - var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; - - if (domPropertyConfig.isCustomAttribute) { - DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); - } - - for (var propName in Properties) { - !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0; - - var lowerCased = propName.toLowerCase(); - var propConfig = Properties[propName]; - - var propertyInfo = { - attributeName: lowerCased, - attributeNamespace: null, - propertyName: propName, - mutationMethod: null, - - mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), - hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), - hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), - hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), - hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) - }; - !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0; - - if (process.env.NODE_ENV !== 'production') { - DOMProperty.getPossibleStandardName[lowerCased] = propName; - } +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - if (DOMAttributeNames.hasOwnProperty(propName)) { - var attributeName = DOMAttributeNames[propName]; - propertyInfo.attributeName = attributeName; - if (process.env.NODE_ENV !== 'production') { - DOMProperty.getPossibleStandardName[attributeName] = propName; - } - } +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - if (DOMAttributeNamespaces.hasOwnProperty(propName)) { - propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; - } +exports.default = createComponent; - if (DOMPropertyNames.hasOwnProperty(propName)) { - propertyInfo.propertyName = DOMPropertyNames[propName]; - } +var _react = __webpack_require__(1); - if (DOMMutationMethods.hasOwnProperty(propName)) { - propertyInfo.mutationMethod = DOMMutationMethods[propName]; - } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - DOMProperty.properties[propName] = propertyInfo; - } - } -}; +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -/* eslint-disable max-len */ -var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; -/* eslint-enable max-len */ +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** - * DOMProperty exports lookup objects that can be used like functions: - * - * > DOMProperty.isValid['id'] - * true - * > DOMProperty.isValid['foobar'] - * undefined - * - * Although this may be confusing, it performs better in general. + * Creates a component class that renders the given Material UI component * - * @see http://jsperf.com/key-exists - * @see http://jsperf.com/key-missing + * @param MaterialUIComponent The material ui component to render + * @param mapProps A mapping of props provided by redux-form to the props the Material UI + * component needs */ -var DOMProperty = { - ID_ATTRIBUTE_NAME: 'data-reactid', - ROOT_ATTRIBUTE_NAME: 'data-reactroot', - - ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, - ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', - - /** - * Map from property "standard name" to an object with info about how to set - * the property in the DOM. Each object contains: - * - * attributeName: - * Used when rendering markup or with `*Attribute()`. - * attributeNamespace - * propertyName: - * Used on DOM node instances. (This includes properties that mutate due to - * external factors.) - * mutationMethod: - * If non-null, used instead of the property or `setAttribute()` after - * initial render. - * mustUseProperty: - * Whether the property must be accessed and mutated as an object property. - * hasBooleanValue: - * Whether the property should be removed when set to a falsey value. - * hasNumericValue: - * Whether the property must be numeric or parse as a numeric and should be - * removed when set to a falsey value. - * hasPositiveNumericValue: - * Whether the property must be positive numeric or parse as a positive - * numeric and should be removed when set to a falsey value. - * hasOverloadedBooleanValue: - * Whether the property can be used as a flag as well as with a value. - * Removed when strictly equal to false; present without a value when - * strictly equal to true; present with a value otherwise. - */ - properties: {}, +function createComponent(MaterialUIComponent, mapProps) { + var InputComponent = function (_Component) { + _inherits(InputComponent, _Component); - /** - * Mapping from lowercase property names to the properly cased version, used - * to warn in the case of missing properties. Available only in __DEV__. - * - * autofocus is predefined, because adding it to the property whitelist - * causes unintended side effects. - * - * @type {Object} - */ - getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null, + function InputComponent() { + _classCallCheck(this, InputComponent); - /** - * All of the isCustomAttribute() functions that have been injected. - */ - _isCustomAttributeFunctions: [], + return _possibleConstructorReturn(this, (InputComponent.__proto__ || Object.getPrototypeOf(InputComponent)).apply(this, arguments)); + } - /** - * Checks whether a property name is a custom attribute. - * @method - */ - isCustomAttribute: function (attributeName) { - for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { - var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; - if (isCustomAttributeFn(attributeName)) { - return true; + _createClass(InputComponent, [{ + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.component; } - } - return false; - }, + }, { + key: 'render', + value: function render() { + return (0, _react.createElement)(MaterialUIComponent, _extends({}, mapProps(this.props), { + ref: 'component' + })); + } + }]); - injection: DOMPropertyInjection -}; + return InputComponent; + }(_react.Component); -module.exports = DOMProperty; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + InputComponent.displayName = 'ReduxFormMaterialUI' + MaterialUIComponent.name; + return InputComponent; +} /***/ }), -/* 44 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2927,141 +2895,50 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _react = __webpack_require__(1); - -var horizontal = _react.PropTypes.oneOf(['left', 'middle', 'right']); -var vertical = _react.PropTypes.oneOf(['top', 'center', 'bottom']); - -exports.default = { - - corners: _react.PropTypes.oneOf(['bottom-left', 'bottom-right', 'top-left', 'top-right']), - - horizontal: horizontal, - - vertical: vertical, - - origin: _react.PropTypes.shape({ - horizontal: horizontal, - vertical: vertical - }), - - cornersAndCenter: _react.PropTypes.oneOf(['bottom-center', 'bottom-left', 'bottom-right', 'top-center', 'top-left', 'top-right']), - - stringOrNumber: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]), - - zDepth: _react.PropTypes.oneOf([0, 1, 2, 3, 4, 5]) - +exports.default = function (prefixedValue, value, keepUnprefixed) { + return keepUnprefixed ? [prefixedValue, value] : prefixedValue; }; -/***/ }), -/* 45 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -/* harmony default export */ __webpack_exports__["a"] = (isObject); - +module.exports = exports["default"]; /***/ }), -/* 46 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(66)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; +}); /***/ }), -/* 47 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { -var dP = __webpack_require__(36); -var createDesc = __webpack_require__(73); -module.exports = __webpack_require__(42) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; +"use strict"; -/***/ }), -/* 48 */ -/***/ (function(module, exports) { +exports.__esModule = true; -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; +var _iterator = __webpack_require__(335); +var _iterator2 = _interopRequireDefault(_iterator); -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { +var _symbol = __webpack_require__(337); -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(197); -var defined = __webpack_require__(126); -module.exports = function (it) { - return IObject(defined(it)); -}; +var _symbol2 = _interopRequireDefault(_symbol); +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -module.exports = { "default": __webpack_require__(332), __esModule: true }; +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; /***/ }), -/* 51 */ +/* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3077,15 +2954,15 @@ module.exports = { "default": __webpack_require__(332), __esModule: true }; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(14); -var ReactCurrentOwner = __webpack_require__(30); +var ReactCurrentOwner = __webpack_require__(29); var warning = __webpack_require__(11); var canDefineProperty = __webpack_require__(97); var hasOwnProperty = Object.prototype.hasOwnProperty; -var REACT_ELEMENT_TYPE = __webpack_require__(215); +var REACT_ELEMENT_TYPE = __webpack_require__(217); var RESERVED_PROPS = { key: true, @@ -3408,7 +3285,7 @@ module.exports = ReactElement; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 52 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3456,19 +3333,19 @@ var _react2 = _interopRequireDefault(_react); var _childUtils = __webpack_require__(100); -var _events = __webpack_require__(143); +var _events = __webpack_require__(148); var _events2 = _interopRequireDefault(_events); -var _keycode = __webpack_require__(31); +var _keycode = __webpack_require__(27); var _keycode2 = _interopRequireDefault(_keycode); -var _FocusRipple = __webpack_require__(144); +var _FocusRipple = __webpack_require__(149); var _FocusRipple2 = _interopRequireDefault(_FocusRipple); -var _TouchRipple = __webpack_require__(245); +var _TouchRipple = __webpack_require__(248); var _TouchRipple2 = _interopRequireDefault(_TouchRipple); @@ -3811,7 +3688,7 @@ exports.default = EnhancedButton; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 53 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3823,820 +3700,419 @@ exports.default = EnhancedButton; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * */ -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); var invariant = __webpack_require__(10); -/** - * Static poolers. Several custom versions for each potential number of - * arguments. A completely generic pooler is easy to implement, but would - * require accessing the `arguments` object. In each of these, `this` refers to - * the Class itself, not an instance. If any others are needed, simply add them - * here, or in their own files. - */ -var oneArgumentPooler = function (copyFieldsFrom) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, copyFieldsFrom); - return instance; - } else { - return new Klass(copyFieldsFrom); - } -}; +function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; +} -var twoArgumentPooler = function (a1, a2) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2); - return instance; - } else { - return new Klass(a1, a2); - } -}; +var DOMPropertyInjection = { + /** + * Mapping from normalized, camelcased property names to a configuration that + * specifies how the associated DOM property should be accessed or rendered. + */ + MUST_USE_PROPERTY: 0x1, + HAS_BOOLEAN_VALUE: 0x4, + HAS_NUMERIC_VALUE: 0x8, + HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, + HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, -var threeArgumentPooler = function (a1, a2, a3) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3); - return instance; - } else { - return new Klass(a1, a2, a3); - } -}; + /** + * Inject some specialized knowledge about the DOM. This takes a config object + * with the following properties: + * + * isCustomAttribute: function that given an attribute name will return true + * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* + * attributes where it's impossible to enumerate all of the possible + * attribute names, + * + * Properties: object mapping DOM property name to one of the + * DOMPropertyInjection constants or null. If your attribute isn't in here, + * it won't get written to the DOM. + * + * DOMAttributeNames: object mapping React attribute name to the DOM + * attribute name. Attribute names not specified use the **lowercase** + * normalized name. + * + * DOMAttributeNamespaces: object mapping React attribute name to the DOM + * attribute namespace URL. (Attribute names not specified use no namespace.) + * + * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. + * Property names not specified use the normalized name. + * + * DOMMutationMethods: Properties that require special mutation methods. If + * `value` is undefined, the mutation method should unset the property. + * + * @param {object} domPropertyConfig the config as described above. + */ + injectDOMPropertyConfig: function (domPropertyConfig) { + var Injection = DOMPropertyInjection; + var Properties = domPropertyConfig.Properties || {}; + var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; -var fourArgumentPooler = function (a1, a2, a3, a4) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3, a4); - return instance; - } else { - return new Klass(a1, a2, a3, a4); - } -}; + if (domPropertyConfig.isCustomAttribute) { + DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); + } -var standardReleaser = function (instance) { - var Klass = this; - !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; - instance.destructor(); - if (Klass.instancePool.length < Klass.poolSize) { - Klass.instancePool.push(instance); + for (var propName in Properties) { + !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0; + + var lowerCased = propName.toLowerCase(); + var propConfig = Properties[propName]; + + var propertyInfo = { + attributeName: lowerCased, + attributeNamespace: null, + propertyName: propName, + mutationMethod: null, + + mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), + hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), + hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), + hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), + hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) + }; + !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0; + + if (process.env.NODE_ENV !== 'production') { + DOMProperty.getPossibleStandardName[lowerCased] = propName; + } + + if (DOMAttributeNames.hasOwnProperty(propName)) { + var attributeName = DOMAttributeNames[propName]; + propertyInfo.attributeName = attributeName; + if (process.env.NODE_ENV !== 'production') { + DOMProperty.getPossibleStandardName[attributeName] = propName; + } + } + + if (DOMAttributeNamespaces.hasOwnProperty(propName)) { + propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; + } + + if (DOMPropertyNames.hasOwnProperty(propName)) { + propertyInfo.propertyName = DOMPropertyNames[propName]; + } + + if (DOMMutationMethods.hasOwnProperty(propName)) { + propertyInfo.mutationMethod = DOMMutationMethods[propName]; + } + + DOMProperty.properties[propName] = propertyInfo; + } } }; -var DEFAULT_POOL_SIZE = 10; -var DEFAULT_POOLER = oneArgumentPooler; +/* eslint-disable max-len */ +var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; +/* eslint-enable max-len */ /** - * Augments `CopyConstructor` to be a poolable class, augmenting only the class - * itself (statically) not adding any prototypical fields. Any CopyConstructor - * you give this may have a `poolSize` property, and will look for a - * prototypical `destructor` on instances. + * DOMProperty exports lookup objects that can be used like functions: * - * @param {Function} CopyConstructor Constructor that can be used to reset. - * @param {Function} pooler Customizable pooler. + * > DOMProperty.isValid['id'] + * true + * > DOMProperty.isValid['foobar'] + * undefined + * + * Although this may be confusing, it performs better in general. + * + * @see http://jsperf.com/key-exists + * @see http://jsperf.com/key-missing */ -var addPoolingTo = function (CopyConstructor, pooler) { - // Casting as any so that flow ignores the actual implementation and trusts - // it to match the type we declared - var NewKlass = CopyConstructor; - NewKlass.instancePool = []; - NewKlass.getPooled = pooler || DEFAULT_POOLER; - if (!NewKlass.poolSize) { - NewKlass.poolSize = DEFAULT_POOL_SIZE; - } - NewKlass.release = standardReleaser; - return NewKlass; -}; +var DOMProperty = { -var PooledClass = { - addPoolingTo: addPoolingTo, - oneArgumentPooler: oneArgumentPooler, - twoArgumentPooler: twoArgumentPooler, - threeArgumentPooler: threeArgumentPooler, - fourArgumentPooler: fourArgumentPooler + ID_ATTRIBUTE_NAME: 'data-reactid', + ROOT_ATTRIBUTE_NAME: 'data-reactroot', + + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', + + /** + * Map from property "standard name" to an object with info about how to set + * the property in the DOM. Each object contains: + * + * attributeName: + * Used when rendering markup or with `*Attribute()`. + * attributeNamespace + * propertyName: + * Used on DOM node instances. (This includes properties that mutate due to + * external factors.) + * mutationMethod: + * If non-null, used instead of the property or `setAttribute()` after + * initial render. + * mustUseProperty: + * Whether the property must be accessed and mutated as an object property. + * hasBooleanValue: + * Whether the property should be removed when set to a falsey value. + * hasNumericValue: + * Whether the property must be numeric or parse as a numeric and should be + * removed when set to a falsey value. + * hasPositiveNumericValue: + * Whether the property must be positive numeric or parse as a positive + * numeric and should be removed when set to a falsey value. + * hasOverloadedBooleanValue: + * Whether the property can be used as a flag as well as with a value. + * Removed when strictly equal to false; present without a value when + * strictly equal to true; present with a value otherwise. + */ + properties: {}, + + /** + * Mapping from lowercase property names to the properly cased version, used + * to warn in the case of missing properties. Available only in __DEV__. + * + * autofocus is predefined, because adding it to the property whitelist + * causes unintended side effects. + * + * @type {Object} + */ + getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null, + + /** + * All of the isCustomAttribute() functions that have been injected. + */ + _isCustomAttributeFunctions: [], + + /** + * Checks whether a property name is a custom attribute. + * @method + */ + isCustomAttribute: function (attributeName) { + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; + if (isCustomAttributeFn(attributeName)) { + return true; + } + } + return false; + }, + + injection: DOMPropertyInjection }; -module.exports = PooledClass; +module.exports = DOMProperty; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 54 */ +/* 46 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _shallowEqual = __webpack_require__(81); +var _react = __webpack_require__(1); -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); +var horizontal = _react.PropTypes.oneOf(['left', 'middle', 'right']); +var vertical = _react.PropTypes.oneOf(['top', 'center', 'bottom']); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +exports.default = { -exports.default = _shallowEqual2.default; + corners: _react.PropTypes.oneOf(['bottom-left', 'bottom-right', 'top-left', 'top-right']), + + horizontal: horizontal, + + vertical: vertical, + + origin: _react.PropTypes.shape({ + horizontal: horizontal, + vertical: vertical + }), + + cornersAndCenter: _react.PropTypes.oneOf(['bottom-center', 'bottom-left', 'bottom-right', 'top-center', 'top-left', 'top-right']), + + stringOrNumber: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]), + + zDepth: _react.PropTypes.oneOf([0, 1, 2, 3, 4, 5]) + +}; /***/ }), -/* 55 */ +/* 47 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ - * @since 4.0.0 + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * - * _.isObjectLike({}); + * _.isObject({}); * // => true * - * _.isObjectLike([1, 2, 3]); + * _.isObject([1, 2, 3]); * // => true * - * _.isObjectLike(_.noop); - * // => false + * _.isObject(_.noop); + * // => true * - * _.isObjectLike(null); + * _.isObject(null); * // => false */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); } -/* harmony default export */ __webpack_exports__["a"] = (isObjectLike); +/* harmony default export */ __webpack_exports__["a"] = (isObject); /***/ }), -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { +/* 48 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__splice__ = __webpack_require__(609); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getIn__ = __webpack_require__(285); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setIn__ = __webpack_require__(610); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepEqual__ = __webpack_require__(611); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__deleteIn__ = __webpack_require__(612); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys__ = __webpack_require__(613); -Object.defineProperty(exports, "__esModule", { - value: true -}); -var red50 = exports.red50 = '#ffebee'; -var red100 = exports.red100 = '#ffcdd2'; -var red200 = exports.red200 = '#ef9a9a'; -var red300 = exports.red300 = '#e57373'; -var red400 = exports.red400 = '#ef5350'; -var red500 = exports.red500 = '#f44336'; -var red600 = exports.red600 = '#e53935'; -var red700 = exports.red700 = '#d32f2f'; -var red800 = exports.red800 = '#c62828'; -var red900 = exports.red900 = '#b71c1c'; -var redA100 = exports.redA100 = '#ff8a80'; -var redA200 = exports.redA200 = '#ff5252'; -var redA400 = exports.redA400 = '#ff1744'; -var redA700 = exports.redA700 = '#d50000'; -var pink50 = exports.pink50 = '#fce4ec'; -var pink100 = exports.pink100 = '#f8bbd0'; -var pink200 = exports.pink200 = '#f48fb1'; -var pink300 = exports.pink300 = '#f06292'; -var pink400 = exports.pink400 = '#ec407a'; -var pink500 = exports.pink500 = '#e91e63'; -var pink600 = exports.pink600 = '#d81b60'; -var pink700 = exports.pink700 = '#c2185b'; -var pink800 = exports.pink800 = '#ad1457'; -var pink900 = exports.pink900 = '#880e4f'; -var pinkA100 = exports.pinkA100 = '#ff80ab'; -var pinkA200 = exports.pinkA200 = '#ff4081'; -var pinkA400 = exports.pinkA400 = '#f50057'; -var pinkA700 = exports.pinkA700 = '#c51162'; -var purple50 = exports.purple50 = '#f3e5f5'; -var purple100 = exports.purple100 = '#e1bee7'; -var purple200 = exports.purple200 = '#ce93d8'; -var purple300 = exports.purple300 = '#ba68c8'; -var purple400 = exports.purple400 = '#ab47bc'; -var purple500 = exports.purple500 = '#9c27b0'; -var purple600 = exports.purple600 = '#8e24aa'; -var purple700 = exports.purple700 = '#7b1fa2'; -var purple800 = exports.purple800 = '#6a1b9a'; -var purple900 = exports.purple900 = '#4a148c'; -var purpleA100 = exports.purpleA100 = '#ea80fc'; -var purpleA200 = exports.purpleA200 = '#e040fb'; -var purpleA400 = exports.purpleA400 = '#d500f9'; -var purpleA700 = exports.purpleA700 = '#aa00ff'; -var deepPurple50 = exports.deepPurple50 = '#ede7f6'; -var deepPurple100 = exports.deepPurple100 = '#d1c4e9'; -var deepPurple200 = exports.deepPurple200 = '#b39ddb'; -var deepPurple300 = exports.deepPurple300 = '#9575cd'; -var deepPurple400 = exports.deepPurple400 = '#7e57c2'; -var deepPurple500 = exports.deepPurple500 = '#673ab7'; -var deepPurple600 = exports.deepPurple600 = '#5e35b1'; -var deepPurple700 = exports.deepPurple700 = '#512da8'; -var deepPurple800 = exports.deepPurple800 = '#4527a0'; -var deepPurple900 = exports.deepPurple900 = '#311b92'; -var deepPurpleA100 = exports.deepPurpleA100 = '#b388ff'; -var deepPurpleA200 = exports.deepPurpleA200 = '#7c4dff'; -var deepPurpleA400 = exports.deepPurpleA400 = '#651fff'; -var deepPurpleA700 = exports.deepPurpleA700 = '#6200ea'; -var indigo50 = exports.indigo50 = '#e8eaf6'; -var indigo100 = exports.indigo100 = '#c5cae9'; -var indigo200 = exports.indigo200 = '#9fa8da'; -var indigo300 = exports.indigo300 = '#7986cb'; -var indigo400 = exports.indigo400 = '#5c6bc0'; -var indigo500 = exports.indigo500 = '#3f51b5'; -var indigo600 = exports.indigo600 = '#3949ab'; -var indigo700 = exports.indigo700 = '#303f9f'; -var indigo800 = exports.indigo800 = '#283593'; -var indigo900 = exports.indigo900 = '#1a237e'; -var indigoA100 = exports.indigoA100 = '#8c9eff'; -var indigoA200 = exports.indigoA200 = '#536dfe'; -var indigoA400 = exports.indigoA400 = '#3d5afe'; -var indigoA700 = exports.indigoA700 = '#304ffe'; -var blue50 = exports.blue50 = '#e3f2fd'; -var blue100 = exports.blue100 = '#bbdefb'; -var blue200 = exports.blue200 = '#90caf9'; -var blue300 = exports.blue300 = '#64b5f6'; -var blue400 = exports.blue400 = '#42a5f5'; -var blue500 = exports.blue500 = '#2196f3'; -var blue600 = exports.blue600 = '#1e88e5'; -var blue700 = exports.blue700 = '#1976d2'; -var blue800 = exports.blue800 = '#1565c0'; -var blue900 = exports.blue900 = '#0d47a1'; -var blueA100 = exports.blueA100 = '#82b1ff'; -var blueA200 = exports.blueA200 = '#448aff'; -var blueA400 = exports.blueA400 = '#2979ff'; -var blueA700 = exports.blueA700 = '#2962ff'; +var structure = { + empty: {}, + emptyList: [], + getIn: __WEBPACK_IMPORTED_MODULE_1__getIn__["a" /* default */], + setIn: __WEBPACK_IMPORTED_MODULE_2__setIn__["a" /* default */], + deepEqual: __WEBPACK_IMPORTED_MODULE_3__deepEqual__["a" /* default */], + deleteIn: __WEBPACK_IMPORTED_MODULE_4__deleteIn__["a" /* default */], + fromJS: function fromJS(value) { + return value; + }, + keys: __WEBPACK_IMPORTED_MODULE_5__keys__["a" /* default */], + size: function size(array) { + return array ? array.length : 0; + }, + splice: __WEBPACK_IMPORTED_MODULE_0__splice__["a" /* default */], + toJS: function toJS(value) { + return value; + } +}; -var lightBlue50 = exports.lightBlue50 = '#e1f5fe'; -var lightBlue100 = exports.lightBlue100 = '#b3e5fc'; -var lightBlue200 = exports.lightBlue200 = '#81d4fa'; -var lightBlue300 = exports.lightBlue300 = '#4fc3f7'; -var lightBlue400 = exports.lightBlue400 = '#29b6f6'; -var lightBlue500 = exports.lightBlue500 = '#03a9f4'; -var lightBlue600 = exports.lightBlue600 = '#039be5'; -var lightBlue700 = exports.lightBlue700 = '#0288d1'; -var lightBlue800 = exports.lightBlue800 = '#0277bd'; -var lightBlue900 = exports.lightBlue900 = '#01579b'; -var lightBlueA100 = exports.lightBlueA100 = '#80d8ff'; -var lightBlueA200 = exports.lightBlueA200 = '#40c4ff'; -var lightBlueA400 = exports.lightBlueA400 = '#00b0ff'; -var lightBlueA700 = exports.lightBlueA700 = '#0091ea'; +/* harmony default export */ __webpack_exports__["a"] = (structure); -var cyan50 = exports.cyan50 = '#e0f7fa'; -var cyan100 = exports.cyan100 = '#b2ebf2'; -var cyan200 = exports.cyan200 = '#80deea'; -var cyan300 = exports.cyan300 = '#4dd0e1'; -var cyan400 = exports.cyan400 = '#26c6da'; -var cyan500 = exports.cyan500 = '#00bcd4'; -var cyan600 = exports.cyan600 = '#00acc1'; -var cyan700 = exports.cyan700 = '#0097a7'; -var cyan800 = exports.cyan800 = '#00838f'; -var cyan900 = exports.cyan900 = '#006064'; -var cyanA100 = exports.cyanA100 = '#84ffff'; -var cyanA200 = exports.cyanA200 = '#18ffff'; -var cyanA400 = exports.cyanA400 = '#00e5ff'; -var cyanA700 = exports.cyanA700 = '#00b8d4'; +/***/ }), +/* 49 */ +/***/ (function(module, exports) { -var teal50 = exports.teal50 = '#e0f2f1'; -var teal100 = exports.teal100 = '#b2dfdb'; -var teal200 = exports.teal200 = '#80cbc4'; -var teal300 = exports.teal300 = '#4db6ac'; -var teal400 = exports.teal400 = '#26a69a'; -var teal500 = exports.teal500 = '#009688'; -var teal600 = exports.teal600 = '#00897b'; -var teal700 = exports.teal700 = '#00796b'; -var teal800 = exports.teal800 = '#00695c'; -var teal900 = exports.teal900 = '#004d40'; -var tealA100 = exports.tealA100 = '#a7ffeb'; -var tealA200 = exports.tealA200 = '#64ffda'; -var tealA400 = exports.tealA400 = '#1de9b6'; -var tealA700 = exports.tealA700 = '#00bfa5'; - -var green50 = exports.green50 = '#e8f5e9'; -var green100 = exports.green100 = '#c8e6c9'; -var green200 = exports.green200 = '#a5d6a7'; -var green300 = exports.green300 = '#81c784'; -var green400 = exports.green400 = '#66bb6a'; -var green500 = exports.green500 = '#4caf50'; -var green600 = exports.green600 = '#43a047'; -var green700 = exports.green700 = '#388e3c'; -var green800 = exports.green800 = '#2e7d32'; -var green900 = exports.green900 = '#1b5e20'; -var greenA100 = exports.greenA100 = '#b9f6ca'; -var greenA200 = exports.greenA200 = '#69f0ae'; -var greenA400 = exports.greenA400 = '#00e676'; -var greenA700 = exports.greenA700 = '#00c853'; - -var lightGreen50 = exports.lightGreen50 = '#f1f8e9'; -var lightGreen100 = exports.lightGreen100 = '#dcedc8'; -var lightGreen200 = exports.lightGreen200 = '#c5e1a5'; -var lightGreen300 = exports.lightGreen300 = '#aed581'; -var lightGreen400 = exports.lightGreen400 = '#9ccc65'; -var lightGreen500 = exports.lightGreen500 = '#8bc34a'; -var lightGreen600 = exports.lightGreen600 = '#7cb342'; -var lightGreen700 = exports.lightGreen700 = '#689f38'; -var lightGreen800 = exports.lightGreen800 = '#558b2f'; -var lightGreen900 = exports.lightGreen900 = '#33691e'; -var lightGreenA100 = exports.lightGreenA100 = '#ccff90'; -var lightGreenA200 = exports.lightGreenA200 = '#b2ff59'; -var lightGreenA400 = exports.lightGreenA400 = '#76ff03'; -var lightGreenA700 = exports.lightGreenA700 = '#64dd17'; - -var lime50 = exports.lime50 = '#f9fbe7'; -var lime100 = exports.lime100 = '#f0f4c3'; -var lime200 = exports.lime200 = '#e6ee9c'; -var lime300 = exports.lime300 = '#dce775'; -var lime400 = exports.lime400 = '#d4e157'; -var lime500 = exports.lime500 = '#cddc39'; -var lime600 = exports.lime600 = '#c0ca33'; -var lime700 = exports.lime700 = '#afb42b'; -var lime800 = exports.lime800 = '#9e9d24'; -var lime900 = exports.lime900 = '#827717'; -var limeA100 = exports.limeA100 = '#f4ff81'; -var limeA200 = exports.limeA200 = '#eeff41'; -var limeA400 = exports.limeA400 = '#c6ff00'; -var limeA700 = exports.limeA700 = '#aeea00'; - -var yellow50 = exports.yellow50 = '#fffde7'; -var yellow100 = exports.yellow100 = '#fff9c4'; -var yellow200 = exports.yellow200 = '#fff59d'; -var yellow300 = exports.yellow300 = '#fff176'; -var yellow400 = exports.yellow400 = '#ffee58'; -var yellow500 = exports.yellow500 = '#ffeb3b'; -var yellow600 = exports.yellow600 = '#fdd835'; -var yellow700 = exports.yellow700 = '#fbc02d'; -var yellow800 = exports.yellow800 = '#f9a825'; -var yellow900 = exports.yellow900 = '#f57f17'; -var yellowA100 = exports.yellowA100 = '#ffff8d'; -var yellowA200 = exports.yellowA200 = '#ffff00'; -var yellowA400 = exports.yellowA400 = '#ffea00'; -var yellowA700 = exports.yellowA700 = '#ffd600'; - -var amber50 = exports.amber50 = '#fff8e1'; -var amber100 = exports.amber100 = '#ffecb3'; -var amber200 = exports.amber200 = '#ffe082'; -var amber300 = exports.amber300 = '#ffd54f'; -var amber400 = exports.amber400 = '#ffca28'; -var amber500 = exports.amber500 = '#ffc107'; -var amber600 = exports.amber600 = '#ffb300'; -var amber700 = exports.amber700 = '#ffa000'; -var amber800 = exports.amber800 = '#ff8f00'; -var amber900 = exports.amber900 = '#ff6f00'; -var amberA100 = exports.amberA100 = '#ffe57f'; -var amberA200 = exports.amberA200 = '#ffd740'; -var amberA400 = exports.amberA400 = '#ffc400'; -var amberA700 = exports.amberA700 = '#ffab00'; - -var orange50 = exports.orange50 = '#fff3e0'; -var orange100 = exports.orange100 = '#ffe0b2'; -var orange200 = exports.orange200 = '#ffcc80'; -var orange300 = exports.orange300 = '#ffb74d'; -var orange400 = exports.orange400 = '#ffa726'; -var orange500 = exports.orange500 = '#ff9800'; -var orange600 = exports.orange600 = '#fb8c00'; -var orange700 = exports.orange700 = '#f57c00'; -var orange800 = exports.orange800 = '#ef6c00'; -var orange900 = exports.orange900 = '#e65100'; -var orangeA100 = exports.orangeA100 = '#ffd180'; -var orangeA200 = exports.orangeA200 = '#ffab40'; -var orangeA400 = exports.orangeA400 = '#ff9100'; -var orangeA700 = exports.orangeA700 = '#ff6d00'; - -var deepOrange50 = exports.deepOrange50 = '#fbe9e7'; -var deepOrange100 = exports.deepOrange100 = '#ffccbc'; -var deepOrange200 = exports.deepOrange200 = '#ffab91'; -var deepOrange300 = exports.deepOrange300 = '#ff8a65'; -var deepOrange400 = exports.deepOrange400 = '#ff7043'; -var deepOrange500 = exports.deepOrange500 = '#ff5722'; -var deepOrange600 = exports.deepOrange600 = '#f4511e'; -var deepOrange700 = exports.deepOrange700 = '#e64a19'; -var deepOrange800 = exports.deepOrange800 = '#d84315'; -var deepOrange900 = exports.deepOrange900 = '#bf360c'; -var deepOrangeA100 = exports.deepOrangeA100 = '#ff9e80'; -var deepOrangeA200 = exports.deepOrangeA200 = '#ff6e40'; -var deepOrangeA400 = exports.deepOrangeA400 = '#ff3d00'; -var deepOrangeA700 = exports.deepOrangeA700 = '#dd2c00'; - -var brown50 = exports.brown50 = '#efebe9'; -var brown100 = exports.brown100 = '#d7ccc8'; -var brown200 = exports.brown200 = '#bcaaa4'; -var brown300 = exports.brown300 = '#a1887f'; -var brown400 = exports.brown400 = '#8d6e63'; -var brown500 = exports.brown500 = '#795548'; -var brown600 = exports.brown600 = '#6d4c41'; -var brown700 = exports.brown700 = '#5d4037'; -var brown800 = exports.brown800 = '#4e342e'; -var brown900 = exports.brown900 = '#3e2723'; - -var blueGrey50 = exports.blueGrey50 = '#eceff1'; -var blueGrey100 = exports.blueGrey100 = '#cfd8dc'; -var blueGrey200 = exports.blueGrey200 = '#b0bec5'; -var blueGrey300 = exports.blueGrey300 = '#90a4ae'; -var blueGrey400 = exports.blueGrey400 = '#78909c'; -var blueGrey500 = exports.blueGrey500 = '#607d8b'; -var blueGrey600 = exports.blueGrey600 = '#546e7a'; -var blueGrey700 = exports.blueGrey700 = '#455a64'; -var blueGrey800 = exports.blueGrey800 = '#37474f'; -var blueGrey900 = exports.blueGrey900 = '#263238'; - -var grey50 = exports.grey50 = '#fafafa'; -var grey100 = exports.grey100 = '#f5f5f5'; -var grey200 = exports.grey200 = '#eeeeee'; -var grey300 = exports.grey300 = '#e0e0e0'; -var grey400 = exports.grey400 = '#bdbdbd'; -var grey500 = exports.grey500 = '#9e9e9e'; -var grey600 = exports.grey600 = '#757575'; -var grey700 = exports.grey700 = '#616161'; -var grey800 = exports.grey800 = '#424242'; -var grey900 = exports.grey900 = '#212121'; - -var black = exports.black = '#000000'; -var white = exports.white = '#ffffff'; - -var transparent = exports.transparent = 'rgba(0, 0, 0, 0)'; -var fullBlack = exports.fullBlack = 'rgba(0, 0, 0, 1)'; -var darkBlack = exports.darkBlack = 'rgba(0, 0, 0, 0.87)'; -var lightBlack = exports.lightBlack = 'rgba(0, 0, 0, 0.54)'; -var minBlack = exports.minBlack = 'rgba(0, 0, 0, 0.26)'; -var faintBlack = exports.faintBlack = 'rgba(0, 0, 0, 0.12)'; -var fullWhite = exports.fullWhite = 'rgba(255, 255, 255, 1)'; -var darkWhite = exports.darkWhite = 'rgba(255, 255, 255, 0.87)'; -var lightWhite = exports.lightWhite = 'rgba(255, 255, 255, 0.54)'; - -/***/ }), -/* 57 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(517); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__(520); - - - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = Object(__WEBPACK_IMPORTED_MODULE_1__getValue_js__["a" /* default */])(object, key); - return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */])(value) ? value : undefined; -} - -/* harmony default export */ __webpack_exports__["a"] = (getNative); +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; /***/ }), -/* 58 */ +/* 50 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _getPrototypeOf = __webpack_require__(4); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(2); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(3); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(5); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(6); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _typeof2 = __webpack_require__(76); - -var _typeof3 = _interopRequireDefault(_typeof2); - -var _keys = __webpack_require__(50); - -var _keys2 = _interopRequireDefault(_keys); - -var _objectWithoutProperties2 = __webpack_require__(9); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - -var _assign = __webpack_require__(99); - -var _assign2 = _interopRequireDefault(_assign); - -exports.withOptions = withOptions; - -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _shallowEqual = __webpack_require__(81); - -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); - -var _warning = __webpack_require__(26); - -var _warning2 = _interopRequireDefault(_warning); - -var _supports = __webpack_require__(663); - -var supports = _interopRequireWildcard(_supports); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var defaultEventOptions = { - capture: false, - passive: false +var dP = __webpack_require__(34) + , createDesc = __webpack_require__(75); +module.exports = __webpack_require__(41) ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); +} : function(object, key, value){ + object[key] = value; + return object; }; -/* eslint-disable prefer-spread */ - -function mergeDefaultEventOptions(options) { - return (0, _assign2.default)({}, defaultEventOptions, options); -} - -function getEventListenerArgs(eventName, callback, options) { - var args = [eventName, callback]; - args.push(supports.passiveOption ? options : options.capture); - return args; -} - -function on(target, eventName, callback, options) { - if (supports.addEventListener) { - target.addEventListener.apply(target, getEventListenerArgs(eventName, callback, options)); - } else if (supports.attachEvent) { - // IE8+ Support - target.attachEvent('on' + eventName, function () { - callback.call(target); - }); - } -} - -function off(target, eventName, callback, options) { - if (supports.removeEventListener) { - target.removeEventListener.apply(target, getEventListenerArgs(eventName, callback, options)); - } else if (supports.detachEvent) { - // IE8+ Support - target.detachEvent('on' + eventName, callback); - } -} - -function forEachListener(props, iteratee) { - var children = props.children, - target = props.target, - eventProps = (0, _objectWithoutProperties3.default)(props, ['children', 'target']); - - - (0, _keys2.default)(eventProps).forEach(function (name) { - if (name.substring(0, 2) !== 'on') { - return; - } - - var prop = eventProps[name]; - var type = typeof prop === 'undefined' ? 'undefined' : (0, _typeof3.default)(prop); - var isObject = type === 'object'; - var isFunction = type === 'function'; - - if (!isObject && !isFunction) { - return; - } - - var capture = name.substr(-7).toLowerCase() === 'capture'; - var eventName = name.substring(2).toLowerCase(); - eventName = capture ? eventName.substring(0, eventName.length - 7) : eventName; - - if (isObject) { - iteratee(eventName, prop.handler, prop.options); - } else { - iteratee(eventName, prop, mergeDefaultEventOptions({ capture: capture })); - } - }); -} - -function withOptions(handler, options) { - process.env.NODE_ENV !== "production" ? (0, _warning2.default)(options, 'react-event-listener: Should be specified options in withOptions.') : void 0; - - return { - handler: handler, - options: mergeDefaultEventOptions(options) - }; -} - -var EventListener = function (_Component) { - (0, _inherits3.default)(EventListener, _Component); - - function EventListener() { - (0, _classCallCheck3.default)(this, EventListener); - return (0, _possibleConstructorReturn3.default)(this, (EventListener.__proto__ || (0, _getPrototypeOf2.default)(EventListener)).apply(this, arguments)); - } - - (0, _createClass3.default)(EventListener, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.addListeners(); - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps) { - return !(0, _shallowEqual2.default)(this.props, nextProps); - } - }, { - key: 'componentWillUpdate', - value: function componentWillUpdate() { - this.removeListeners(); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate() { - this.addListeners(); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.removeListeners(); - } - }, { - key: 'addListeners', - value: function addListeners() { - this.applyListeners(on); - } - }, { - key: 'removeListeners', - value: function removeListeners() { - this.applyListeners(off); - } - }, { - key: 'applyListeners', - value: function applyListeners(onOrOff) { - var target = this.props.target; - - - if (target) { - var element = target; - - if (typeof target === 'string') { - element = window[target]; - } - - forEachListener(this.props, onOrOff.bind(null, element)); - } - } - }, { - key: 'render', - value: function render() { - return this.props.children || null; - } - }]); - return EventListener; -}(_react.Component); - -process.env.NODE_ENV !== "production" ? EventListener.propTypes = { - /** - * You can provide a single child too. - */ - children: _propTypes2.default.element, - /** - * The DOM target to listen to. - */ - target: _propTypes2.default.oneOfType([_propTypes2.default.object, _propTypes2.default.string]).isRequired -} : void 0; -exports.default = EventListener; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -var mapError = function mapError(_ref) { - var errorProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'errorText'; - var _ref$meta = _ref.meta; - _ref$meta = _ref$meta === undefined ? {} : _ref$meta; - - var touched = _ref$meta.touched, - error = _ref$meta.error, - warning = _ref$meta.warning, - input = _ref.input, - props = _objectWithoutProperties(_ref, ['meta', 'input']); +/* 51 */ +/***/ (function(module, exports) { - return touched && (error || warning) ? _extends({}, props, input, _defineProperty({}, errorProp, error || warning)) : _extends({}, input, props); +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function(it, key){ + return hasOwnProperty.call(it, key); }; -exports.default = mapError; - /***/ }), -/* 60 */ +/* 52 */ /***/ (function(module, exports, __webpack_require__) { -// optional / simple context binding -var aFunction = __webpack_require__(91); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(203) + , defined = __webpack_require__(129); +module.exports = function(it){ + return IObject(defined(it)); }; - /***/ }), -/* 61 */ -/***/ (function(module, exports) { +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; +"use strict"; -/***/ }), -/* 62 */ -/***/ (function(module, exports) { +exports.__esModule = true; -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; +var _from = __webpack_require__(212); +var _from2 = _interopRequireDefault(_from); -/***/ }), -/* 63 */ -/***/ (function(module, exports) { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -module.exports = {}; +exports.default = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + return arr2; + } else { + return (0, _from2.default)(arr); + } +}; /***/ }), -/* 64 */ +/* 54 */ /***/ (function(module, exports, __webpack_require__) { -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(196); -var enumBugKeys = __webpack_require__(133); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - +module.exports = { "default": __webpack_require__(364), __esModule: true }; /***/ }), -/* 65 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4652,26 +4128,26 @@ module.exports = Object.keys || function keys(O) { -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(14); -var ReactBaseClasses = __webpack_require__(213); -var ReactChildren = __webpack_require__(364); -var ReactDOMFactories = __webpack_require__(368); -var ReactElement = __webpack_require__(51); -var ReactPropTypes = __webpack_require__(372); -var ReactVersion = __webpack_require__(374); +var ReactBaseClasses = __webpack_require__(214); +var ReactChildren = __webpack_require__(216); +var ReactDOMFactories = __webpack_require__(372); +var ReactElement = __webpack_require__(43); +var ReactPropTypes = __webpack_require__(376); +var ReactVersion = __webpack_require__(378); -var createReactClass = __webpack_require__(375); -var onlyChild = __webpack_require__(377); +var createReactClass = __webpack_require__(379); +var onlyChild = __webpack_require__(381); var createElement = ReactElement.createElement; var createFactory = ReactElement.createFactory; var cloneElement = ReactElement.cloneElement; if (process.env.NODE_ENV !== 'production') { - var lowPriorityWarning = __webpack_require__(141); + var lowPriorityWarning = __webpack_require__(146); var canDefineProperty = __webpack_require__(97); - var ReactElementValidator = __webpack_require__(217); + var ReactElementValidator = __webpack_require__(221); var didWarnPropTypesDeprecated = false; createElement = ReactElementValidator.createElement; createFactory = ReactElementValidator.createFactory; @@ -4774,7 +4250,7 @@ module.exports = React; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 66 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4818,7 +4294,7 @@ function reactProdInvariant(code) { module.exports = reactProdInvariant; /***/ }), -/* 67 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4830,503 +4306,591 @@ module.exports = reactProdInvariant; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * */ -var ReactRef = __webpack_require__(391); -var ReactInstrumentation = __webpack_require__(25); +var _prodInvariant = __webpack_require__(13); -var warning = __webpack_require__(11); +var invariant = __webpack_require__(10); /** - * Helper to call ReactRef.attachRefs with this composite component, split out - * to avoid allocations in the transaction mount-ready queue. + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. */ -function attachRefs() { - ReactRef.attachRefs(this, this._currentElement); -} +var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; -var ReactReconciler = { - /** - * Initializes the component, renders markup, and registers event listeners. - * - * @param {ReactComponent} internalInstance - * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction - * @param {?object} the containing host component instance - * @param {?object} info about the host container - * @return {?string} Rendered markup to be inserted into the DOM. - * @final - * @internal - */ - mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots - { - if (process.env.NODE_ENV !== 'production') { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID); - } - } - var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID); - if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { - transaction.getReactMountReady().enqueue(attachRefs, internalInstance); - } - if (process.env.NODE_ENV !== 'production') { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); - } - } - return markup; - }, - - /** - * Returns a value that can be passed to - * ReactComponentEnvironment.replaceNodeWithMarkup. - */ - getHostNode: function (internalInstance) { - return internalInstance.getHostNode(); - }, - - /** - * Releases any resources allocated by `mountComponent`. - * - * @final - * @internal - */ - unmountComponent: function (internalInstance, safely) { - if (process.env.NODE_ENV !== 'production') { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID); - } - } - ReactRef.detachRefs(internalInstance, internalInstance._currentElement); - internalInstance.unmountComponent(safely); - if (process.env.NODE_ENV !== 'production') { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); - } - } - }, - - /** - * Update a component using a new element. - * - * @param {ReactComponent} internalInstance - * @param {ReactElement} nextElement - * @param {ReactReconcileTransaction} transaction - * @param {object} context - * @internal - */ - receiveComponent: function (internalInstance, nextElement, transaction, context) { - var prevElement = internalInstance._currentElement; - - if (nextElement === prevElement && context === internalInstance._context) { - // Since elements are immutable after the owner is rendered, - // we can do a cheap identity compare here to determine if this is a - // superfluous reconcile. It's possible for state to be mutable but such - // change should trigger an update of the owner which would recreate - // the element. We explicitly check for the existence of an owner since - // it's possible for an element created outside a composite to be - // deeply mutated and reused. - - // TODO: Bailing out early is just a perf optimization right? - // TODO: Removing the return statement should affect correctness? - return; - } - - if (process.env.NODE_ENV !== 'production') { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); - } - } - - var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); +var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } +}; - if (refsChanged) { - ReactRef.detachRefs(internalInstance, prevElement); - } +var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } +}; - internalInstance.receiveComponent(nextElement, transaction, context); +var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } +}; - if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) { - transaction.getReactMountReady().enqueue(attachRefs, internalInstance); - } +var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } +}; - if (process.env.NODE_ENV !== 'production') { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); - } - } - }, +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; - /** - * Flush any dirty changes in a component. - * - * @param {ReactComponent} internalInstance - * @param {ReactReconcileTransaction} transaction - * @internal - */ - performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) { - if (internalInstance._updateBatchNumber !== updateBatchNumber) { - // The component's enqueued batch number should always be the current - // batch or the following one. - process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0; - return; - } - if (process.env.NODE_ENV !== 'production') { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement); - } - } - internalInstance.performUpdateIfNecessary(transaction); - if (process.env.NODE_ENV !== 'production') { - if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); - } - } +/** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ +var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; } + NewKlass.release = standardReleaser; + return NewKlass; }; -module.exports = ReactReconciler; +var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler +}; + +module.exports = PooledClass; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 68 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** - * Copyright 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +exports.__esModule = true; + +var _shallowEqual = __webpack_require__(82); -var DOMNamespaces = __webpack_require__(151); -var setInnerHTML = __webpack_require__(104); +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); -var createMicrosoftUnsafeLocalFunction = __webpack_require__(152); -var setTextContent = __webpack_require__(229); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var ELEMENT_NODE_TYPE = 1; -var DOCUMENT_FRAGMENT_NODE_TYPE = 11; +exports.default = _shallowEqual2.default; + +/***/ }), +/* 59 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; /** - * In IE (8-11) and Edge, appending nodes with no children is dramatically - * faster than appending a full subtree, so we essentially queue up the - * .appendChild calls here and apply them so each node is added to its parent - * before any children are added. + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". * - * In other browsers, doing so is slower or neutral compared to the other order - * (in Firefox, twice as slow) so we only do this inversion in IE. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example * - * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode. + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false */ -var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent); - -function insertTreeChildren(tree) { - if (!enableLazy) { - return; - } - var node = tree.node; - var children = tree.children; - if (children.length) { - for (var i = 0; i < children.length; i++) { - insertTreeBefore(node, children[i], null); - } - } else if (tree.html != null) { - setInnerHTML(node, tree.html); - } else if (tree.text != null) { - setTextContent(node, tree.text); - } -} - -var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) { - // DocumentFragments aren't actually part of the DOM after insertion so - // appending children won't update the DOM. We need to ensure the fragment - // is properly populated first, breaking out of our lazy approach for just - // this level. Also, some <object> plugins (like Flash Player) will read - // <param> nodes immediately upon insertion into the DOM, so <object> - // must also be populated prior to insertion into the DOM. - if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) { - insertTreeChildren(tree); - parentNode.insertBefore(tree.node, referenceNode); - } else { - parentNode.insertBefore(tree.node, referenceNode); - insertTreeChildren(tree); - } -}); - -function replaceChildWithTree(oldNode, newTree) { - oldNode.parentNode.replaceChild(newTree.node, oldNode); - insertTreeChildren(newTree); -} - -function queueChild(parentTree, childTree) { - if (enableLazy) { - parentTree.children.push(childTree); - } else { - parentTree.node.appendChild(childTree.node); - } -} - -function queueHTML(tree, html) { - if (enableLazy) { - tree.html = html; - } else { - setInnerHTML(tree.node, html); - } -} - -function queueText(tree, text) { - if (enableLazy) { - tree.text = text; - } else { - setTextContent(tree.node, text); - } -} - -function toString() { - return this.node.nodeName; -} - -function DOMLazyTree(node) { - return { - node: node, - children: [], - html: null, - text: null, - toString: toString - }; +function isObjectLike(value) { + return value != null && typeof value == 'object'; } -DOMLazyTree.insertTreeBefore = insertTreeBefore; -DOMLazyTree.replaceChildWithTree = replaceChildWithTree; -DOMLazyTree.queueChild = queueChild; -DOMLazyTree.queueHTML = queueHTML; -DOMLazyTree.queueText = queueText; +/* harmony default export */ __webpack_exports__["a"] = (isObjectLike); -module.exports = DOMLazyTree; /***/ }), -/* 69 */ +/* 60 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(109); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(479); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(480); - - - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(511); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__(514); -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; -/** Built-in value references. */ -var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; /** - * The base implementation of `getTag` without fallbacks for buggy environments. + * Gets the native function at `key` of `object`. * * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? Object(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */])(value) - : Object(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */])(value); +function getNative(object, key) { + var value = __WEBPACK_IMPORTED_MODULE_1__getValue_js__["a" /* default */](object, key); + return __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */](value) ? value : undefined; } -/* harmony default export */ __webpack_exports__["a"] = (baseGetTag); +/* harmony default export */ __webpack_exports__["a"] = (getNative); /***/ }), -/* 70 */ +/* 61 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - +/* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.convertColorToString = convertColorToString; -exports.convertHexToRGB = convertHexToRGB; -exports.decomposeColor = decomposeColor; -exports.getContrastRatio = getContrastRatio; -exports.getLuminance = getLuminance; -exports.emphasize = emphasize; -exports.fade = fade; -exports.darken = darken; -exports.lighten = lighten; -/** - * Returns a number whose value is limited to the given range. - * - * @param {number} value The value to be clamped - * @param {number} min The lower boundary of the output range - * @param {number} max The upper boundary of the output range - * @returns {number} A number in the range [min, max] - */ -function clamp(value, min, max) { - if (value < min) { - return min; - } - if (value > max) { - return max; - } - return value; -} -/** - * Converts a color object with type and values to a string. - * - * @param {object} color - Decomposed color - * @param {string} color.type - One of, 'rgb', 'rgba', 'hsl', 'hsla' - * @param {array} color.values - [n,n,n] or [n,n,n,n] - * @returns {string} A CSS color string - */ -function convertColorToString(color) { - var type = color.type, - values = color.values; +var _getPrototypeOf = __webpack_require__(4); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - if (type.indexOf('rgb') > -1) { - // Only convert the first 3 values to int (i.e. not alpha) - for (var i = 0; i < 3; i++) { - values[i] = parseInt(values[i]); - } - } +var _classCallCheck2 = __webpack_require__(2); - var colorString = void 0; +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - if (type.indexOf('hsl') > -1) { - colorString = color.type + '(' + values[0] + ', ' + values[1] + '%, ' + values[2] + '%'; - } else { - colorString = color.type + '(' + values[0] + ', ' + values[1] + ', ' + values[2]; - } +var _createClass2 = __webpack_require__(3); - if (values.length === 4) { - colorString += ', ' + color.values[3] + ')'; - } else { - colorString += ')'; - } +var _createClass3 = _interopRequireDefault(_createClass2); - return colorString; -} +var _possibleConstructorReturn2 = __webpack_require__(5); -/** - * Converts a color from CSS hex format to CSS rgb format. - * - * @param {string} color - Hex color, i.e. #nnn or #nnnnnn - * @returns {string} A CSS rgb color string - */ -function convertHexToRGB(color) { - if (color.length === 4) { - var extendedColor = '#'; - for (var i = 1; i < color.length; i++) { - extendedColor += color.charAt(i) + color.charAt(i); - } - color = extendedColor; - } +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - var values = { - r: parseInt(color.substr(1, 2), 16), - g: parseInt(color.substr(3, 2), 16), - b: parseInt(color.substr(5, 2), 16) - }; +var _inherits2 = __webpack_require__(6); - return 'rgb(' + values.r + ', ' + values.g + ', ' + values.b + ')'; -} +var _inherits3 = _interopRequireDefault(_inherits2); -/** - * Returns an object with the type and values of a color. - * - * Note: Does not support rgb % values. - * - * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() - * @returns {{type: string, values: number[]}} A MUI color object - */ -function decomposeColor(color) { - if (color.charAt(0) === '#') { - return decomposeColor(convertHexToRGB(color)); - } +var _typeof2 = __webpack_require__(42); - var marker = color.indexOf('('); - var type = color.substring(0, marker); - var values = color.substring(marker + 1, color.length - 1).split(','); - values = values.map(function (value) { - return parseFloat(value); - }); +var _typeof3 = _interopRequireDefault(_typeof2); - return { type: type, values: values }; -} +var _keys = __webpack_require__(54); -/** - * Calculates the contrast ratio between two colors. - * - * Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef - * - * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() - * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() - * @returns {number} A contrast ratio value in the range 0 - 21 with 2 digit precision. - */ -function getContrastRatio(foreground, background) { - var lumA = getLuminance(foreground); - var lumB = getLuminance(background); - var contrastRatio = (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05); +var _keys2 = _interopRequireDefault(_keys); - return Number(contrastRatio.toFixed(2)); // Truncate at two digits -} +var _assign = __webpack_require__(99); -/** - * The relative brightness of any point in a color space, - * normalized to 0 for darkest black and 1 for lightest white. - * - * Formula: https://www.w3.org/WAI/GL/wiki/Relative_luminance - * - * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() - * @returns {number} The relative brightness of the color in the range 0 - 1 - */ -function getLuminance(color) { - color = decomposeColor(color); +var _assign2 = _interopRequireDefault(_assign); - if (color.type.indexOf('rgb') > -1) { - var rgb = color.values.map(function (val) { - val /= 255; // normalized - return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4); - }); - return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3)); // Truncate at 3 digits - } else if (color.type.indexOf('hsl') > -1) { - return color.values[2] / 100; - } -} +exports.withOptions = withOptions; -/** - * Darken or lighten a colour, depending on its luminance. - * Light colors are darkened, dark colors are lightened. - * - * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() - * @param {number} coefficient=0.15 - multiplier in the range 0 - 1 - * @returns {string} A CSS color string. Hex input values are returned as rgb - */ -function emphasize(color) { - var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15; +var _react = __webpack_require__(1); - return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient); -} +var _react2 = _interopRequireDefault(_react); -/** - * Set the absolute transparency of a color. +var _reactAddonsShallowCompare = __webpack_require__(641); + +var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); + +var _warning = __webpack_require__(26); + +var _warning2 = _interopRequireDefault(_warning); + +var _supports = __webpack_require__(643); + +var supports = _interopRequireWildcard(_supports); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable prefer-spread */ + +var defaultEventOptions = { + capture: false, + passive: false +}; + +function mergeDefaultEventOptions(options) { + return (0, _assign2.default)({}, defaultEventOptions, options); +} + +function getEventListenerArgs(eventName, callback, options) { + var args = [eventName, callback]; + args.push(supports.passiveOption ? options : options.capture); + return args; +} + +function on(target, eventName, callback, options) { + if (supports.addEventListener) { + target.addEventListener.apply(target, getEventListenerArgs(eventName, callback, options)); + } else if (supports.attachEvent) { + // IE8+ Support + target.attachEvent('on' + eventName, function () { + callback.call(target); + }); + } +} + +function off(target, eventName, callback, options) { + if (supports.removeEventListener) { + target.removeEventListener.apply(target, getEventListenerArgs(eventName, callback, options)); + } else if (supports.detachEvent) { + // IE8+ Support + target.detachEvent('on' + eventName, callback); + } +} + +var state = {}; + +function forEachListener(props, iteratee) { + (0, _keys2.default)(props).forEach(function (name) { + if (name.substring(0, 2) !== 'on') { + return; + } + + var prop = props[name]; + var type = typeof prop === 'undefined' ? 'undefined' : (0, _typeof3.default)(prop); + var isObject = type === 'object'; + var isFunction = type === 'function'; + + if (!isObject && !isFunction) { + return; + } + + var capture = name.substr(-7).toLowerCase() === 'capture'; + var eventName = name.substring(2).toLowerCase(); + eventName = capture ? eventName.substring(0, eventName.length - 7) : eventName; + + if (isObject) { + iteratee(eventName, prop.handler, prop.options); + } else { + iteratee(eventName, prop, mergeDefaultEventOptions({ capture: capture })); + } + }); +} + +function withOptions(handler, options) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(options, 'react-event-listener: Should be specified options in withOptions.') : void 0; + + return { + handler: handler, + options: mergeDefaultEventOptions(options) + }; +} + +var EventListener = function (_Component) { + (0, _inherits3.default)(EventListener, _Component); + + function EventListener() { + (0, _classCallCheck3.default)(this, EventListener); + return (0, _possibleConstructorReturn3.default)(this, (EventListener.__proto__ || (0, _getPrototypeOf2.default)(EventListener)).apply(this, arguments)); + } + + (0, _createClass3.default)(EventListener, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.addListeners(); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + return (0, _reactAddonsShallowCompare2.default)({ + props: this.props, + state: state + }, nextProps, state); + } + }, { + key: 'componentWillUpdate', + value: function componentWillUpdate() { + this.removeListeners(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.addListeners(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.removeListeners(); + } + }, { + key: 'addListeners', + value: function addListeners() { + this.applyListeners(on); + } + }, { + key: 'removeListeners', + value: function removeListeners() { + this.applyListeners(off); + } + }, { + key: 'applyListeners', + value: function applyListeners(onOrOff) { + var target = this.props.target; + + + if (target) { + var element = target; + + if (typeof target === 'string') { + element = window[target]; + } + + forEachListener(this.props, onOrOff.bind(null, element)); + } + } + }, { + key: 'render', + value: function render() { + return this.props.children || null; + } + }]); + return EventListener; +}(_react.Component); + +process.env.NODE_ENV !== "production" ? EventListener.propTypes = { + /** + * You can provide a single child too. + */ + children: _react.PropTypes.element, + /** + * The DOM target to listen to. + */ + target: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.string]) +} : void 0; +exports.default = EventListener; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.convertColorToString = convertColorToString; +exports.convertHexToRGB = convertHexToRGB; +exports.decomposeColor = decomposeColor; +exports.getContrastRatio = getContrastRatio; +exports.getLuminance = getLuminance; +exports.emphasize = emphasize; +exports.fade = fade; +exports.darken = darken; +exports.lighten = lighten; +/** + * Returns a number whose value is limited to the given range. + * + * @param {number} value The value to be clamped + * @param {number} min The lower boundary of the output range + * @param {number} max The upper boundary of the output range + * @returns {number} A number in the range [min, max] + */ +function clamp(value, min, max) { + if (value < min) { + return min; + } + if (value > max) { + return max; + } + return value; +} + +/** + * Converts a color object with type and values to a string. + * + * @param {object} color - Decomposed color + * @param {string} color.type - One of, 'rgb', 'rgba', 'hsl', 'hsla' + * @param {array} color.values - [n,n,n] or [n,n,n,n] + * @returns {string} A CSS color string + */ +function convertColorToString(color) { + var type = color.type, + values = color.values; + + + if (type.indexOf('rgb') > -1) { + // Only convert the first 3 values to int (i.e. not alpha) + for (var i = 0; i < 3; i++) { + values[i] = parseInt(values[i]); + } + } + + var colorString = void 0; + + if (type.indexOf('hsl') > -1) { + colorString = color.type + '(' + values[0] + ', ' + values[1] + '%, ' + values[2] + '%'; + } else { + colorString = color.type + '(' + values[0] + ', ' + values[1] + ', ' + values[2]; + } + + if (values.length === 4) { + colorString += ', ' + color.values[3] + ')'; + } else { + colorString += ')'; + } + + return colorString; +} + +/** + * Converts a color from CSS hex format to CSS rgb format. + * + * @param {string} color - Hex color, i.e. #nnn or #nnnnnn + * @returns {string} A CSS rgb color string + */ +function convertHexToRGB(color) { + if (color.length === 4) { + var extendedColor = '#'; + for (var i = 1; i < color.length; i++) { + extendedColor += color.charAt(i) + color.charAt(i); + } + color = extendedColor; + } + + var values = { + r: parseInt(color.substr(1, 2), 16), + g: parseInt(color.substr(3, 2), 16), + b: parseInt(color.substr(5, 2), 16) + }; + + return 'rgb(' + values.r + ', ' + values.g + ', ' + values.b + ')'; +} + +/** + * Returns an object with the type and values of a color. + * + * Note: Does not support rgb % values. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {{type: string, values: number[]}} A MUI color object + */ +function decomposeColor(color) { + if (color.charAt(0) === '#') { + return decomposeColor(convertHexToRGB(color)); + } + + var marker = color.indexOf('('); + var type = color.substring(0, marker); + var values = color.substring(marker + 1, color.length - 1).split(','); + values = values.map(function (value) { + return parseFloat(value); + }); + + return { type: type, values: values }; +} + +/** + * Calculates the contrast ratio between two colors. + * + * Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef + * + * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {number} A contrast ratio value in the range 0 - 21 with 2 digit precision. + */ +function getContrastRatio(foreground, background) { + var lumA = getLuminance(foreground); + var lumB = getLuminance(background); + var contrastRatio = (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05); + + return Number(contrastRatio.toFixed(2)); // Truncate at two digits +} + +/** + * The relative brightness of any point in a color space, + * normalized to 0 for darkest black and 1 for lightest white. + * + * Formula: https://www.w3.org/WAI/GL/wiki/Relative_luminance + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {number} The relative brightness of the color in the range 0 - 1 + */ +function getLuminance(color) { + color = decomposeColor(color); + + if (color.type.indexOf('rgb') > -1) { + var rgb = color.values.map(function (val) { + val /= 255; // normalized + return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4); + }); + return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3)); // Truncate at 3 digits + } else if (color.type.indexOf('hsl') > -1) { + return color.values[2] / 100; + } +} + +/** + * Darken or lighten a colour, depending on its luminance. + * Light colors are darkened, dark colors are lightened. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient=0.15 - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function emphasize(color) { + var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15; + + return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient); +} + +/** + * Set the absolute transparency of a color. * Any existing alpha values are overwritten. * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() @@ -5389,135 +4953,586 @@ function lighten(color, coefficient) { } /***/ }), -/* 71 */ +/* 63 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) { + Object.defineProperty(exports, "__esModule", { value: true }); -exports.dateTimeFormat = dateTimeFormat; -exports.addDays = addDays; -exports.addMonths = addMonths; -exports.addYears = addYears; -exports.cloneDate = cloneDate; -exports.cloneAsDate = cloneAsDate; -exports.getDaysInMonth = getDaysInMonth; -exports.getFirstDayOfMonth = getFirstDayOfMonth; -exports.getFirstDayOfWeek = getFirstDayOfWeek; -exports.getWeekArray = getWeekArray; -exports.localizedWeekday = localizedWeekday; -exports.formatIso = formatIso; -exports.isEqualDate = isEqualDate; -exports.isBeforeDate = isBeforeDate; -exports.isAfterDate = isAfterDate; -exports.isBetweenDates = isBetweenDates; -exports.monthDiff = monthDiff; -exports.yearDiff = yearDiff; -var _warning = __webpack_require__(26); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _warning2 = _interopRequireDefault(_warning); +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -var dayAbbreviation = ['S', 'M', 'T', 'W', 'T', 'F', 'S']; -var dayList = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; -var monthList = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; -var monthLongList = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; +var mapError = function mapError(_ref) { + var errorProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'errorText'; + var _ref$meta = _ref.meta; + _ref$meta = _ref$meta === undefined ? {} : _ref$meta; -function dateTimeFormat(locale, options) { - process.env.NODE_ENV !== "production" ? (0, _warning2.default)(locale === 'en-US', 'Material-UI: The ' + locale + ' locale is not supported by the built-in DateTimeFormat.\n Use the `DateTimeFormat` prop to supply an alternative implementation.') : void 0; + var touched = _ref$meta.touched, + error = _ref$meta.error, + warning = _ref$meta.warning, + input = _ref.input, + props = _objectWithoutProperties(_ref, ['meta', 'input']); - this.format = function (date) { - if (options.month === 'short' && options.weekday === 'short' && options.day === '2-digit') { - return dayList[date.getDay()] + ', ' + monthList[date.getMonth()] + ' ' + date.getDate(); - } else if (options.year === 'numeric' && options.month === 'numeric' && options.day === 'numeric') { - return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); - } else if (options.year === 'numeric' && options.month === 'long') { - return monthLongList[date.getMonth()] + ' ' + date.getFullYear(); - } else if (options.weekday === 'narrow') { - return dayAbbreviation[date.getDay()]; - } else if (options.year === 'numeric') { - return date.getFullYear().toString(); - } else if (options.day === 'numeric') { - return date.getDate(); - } else { - process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: Wrong usage of DateTimeFormat') : void 0; - } + return touched && (error || warning) ? _extends({}, props, input, _defineProperty({}, errorProp, error || warning)) : _extends({}, input, props); +}; + +exports.default = mapError; + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(130); +module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); }; -} +}; -function addDays(d, days) { - var newDate = cloneDate(d); - newDate.setDate(d.getDate() + days); - return newDate; -} +/***/ }), +/* 65 */ +/***/ (function(module, exports) { -function addMonths(d, months) { - var newDate = cloneDate(d); - newDate.setMonth(d.getMonth() + months); - return newDate; -} +module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; -function addYears(d, years) { - var newDate = cloneDate(d); - newDate.setFullYear(d.getFullYear() + years); - return newDate; -} +/***/ }), +/* 66 */ +/***/ (function(module, exports) { -function cloneDate(d) { - return new Date(d.getTime()); -} +module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } +}; -function cloneAsDate(d) { - var clonedDate = cloneDate(d); - clonedDate.setHours(0, 0, 0, 0); - return clonedDate; -} +/***/ }), +/* 67 */ +/***/ (function(module, exports) { -function getDaysInMonth(d) { - var resultDate = getFirstDayOfMonth(d); +module.exports = {}; - resultDate.setMonth(resultDate.getMonth() + 1); - resultDate.setDate(resultDate.getDate() - 1); +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { - return resultDate.getDate(); -} +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(202) + , enumBugKeys = __webpack_require__(137); -function getFirstDayOfMonth(d) { - return new Date(d.getFullYear(), d.getMonth(), 1); -} +module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); +}; -function getFirstDayOfWeek() { - var now = new Date(); - return new Date(now.setDate(now.getDate() - now.getDay())); -} +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { -function getWeekArray(d, firstDayOfWeek) { - var dayArray = []; - var daysInMonth = getDaysInMonth(d); - var weekArray = []; - var week = []; +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - for (var i = 1; i <= daysInMonth; i++) { - dayArray.push(new Date(d.getFullYear(), d.getMonth(), i)); - } - var addWeek = function addWeek(week) { - var emptyDays = 7 - week.length; - for (var _i = 0; _i < emptyDays; ++_i) { - week[weekArray.length ? 'push' : 'unshift'](null); - } - weekArray.push(week); - }; - dayArray.forEach(function (day) { - if (week.length > 0 && day.getDay() === firstDayOfWeek) { - addWeek(week); - week = []; +var ReactRef = __webpack_require__(396); +var ReactInstrumentation = __webpack_require__(25); + +var warning = __webpack_require__(11); + +/** + * Helper to call ReactRef.attachRefs with this composite component, split out + * to avoid allocations in the transaction mount-ready queue. + */ +function attachRefs() { + ReactRef.attachRefs(this, this._currentElement); +} + +var ReactReconciler = { + + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?object} the containing host component instance + * @param {?object} info about the host container + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots + ) { + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID); + } + } + var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID); + if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); + } + } + return markup; + }, + + /** + * Returns a value that can be passed to + * ReactComponentEnvironment.replaceNodeWithMarkup. + */ + getHostNode: function (internalInstance) { + return internalInstance.getHostNode(); + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function (internalInstance, safely) { + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID); + } + } + ReactRef.detachRefs(internalInstance, internalInstance._currentElement); + internalInstance.unmountComponent(safely); + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); + } + } + }, + + /** + * Update a component using a new element. + * + * @param {ReactComponent} internalInstance + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @internal + */ + receiveComponent: function (internalInstance, nextElement, transaction, context) { + var prevElement = internalInstance._currentElement; + + if (nextElement === prevElement && context === internalInstance._context) { + // Since elements are immutable after the owner is rendered, + // we can do a cheap identity compare here to determine if this is a + // superfluous reconcile. It's possible for state to be mutable but such + // change should trigger an update of the owner which would recreate + // the element. We explicitly check for the existence of an owner since + // it's possible for an element created outside a composite to be + // deeply mutated and reused. + + // TODO: Bailing out early is just a perf optimization right? + // TODO: Removing the return statement should affect correctness? + return; + } + + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); + } + } + + var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); + + if (refsChanged) { + ReactRef.detachRefs(internalInstance, prevElement); + } + + internalInstance.receiveComponent(nextElement, transaction, context); + + if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); + } + } + }, + + /** + * Flush any dirty changes in a component. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) { + if (internalInstance._updateBatchNumber !== updateBatchNumber) { + // The component's enqueued batch number should always be the current + // batch or the following one. + process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0; + return; + } + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement); + } + } + internalInstance.performUpdateIfNecessary(transaction); + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); + } + } + } + +}; + +module.exports = ReactReconciler; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMNamespaces = __webpack_require__(156); +var setInnerHTML = __webpack_require__(104); + +var createMicrosoftUnsafeLocalFunction = __webpack_require__(157); +var setTextContent = __webpack_require__(232); + +var ELEMENT_NODE_TYPE = 1; +var DOCUMENT_FRAGMENT_NODE_TYPE = 11; + +/** + * In IE (8-11) and Edge, appending nodes with no children is dramatically + * faster than appending a full subtree, so we essentially queue up the + * .appendChild calls here and apply them so each node is added to its parent + * before any children are added. + * + * In other browsers, doing so is slower or neutral compared to the other order + * (in Firefox, twice as slow) so we only do this inversion in IE. + * + * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode. + */ +var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent); + +function insertTreeChildren(tree) { + if (!enableLazy) { + return; + } + var node = tree.node; + var children = tree.children; + if (children.length) { + for (var i = 0; i < children.length; i++) { + insertTreeBefore(node, children[i], null); + } + } else if (tree.html != null) { + setInnerHTML(node, tree.html); + } else if (tree.text != null) { + setTextContent(node, tree.text); + } +} + +var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) { + // DocumentFragments aren't actually part of the DOM after insertion so + // appending children won't update the DOM. We need to ensure the fragment + // is properly populated first, breaking out of our lazy approach for just + // this level. Also, some <object> plugins (like Flash Player) will read + // <param> nodes immediately upon insertion into the DOM, so <object> + // must also be populated prior to insertion into the DOM. + if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) { + insertTreeChildren(tree); + parentNode.insertBefore(tree.node, referenceNode); + } else { + parentNode.insertBefore(tree.node, referenceNode); + insertTreeChildren(tree); + } +}); + +function replaceChildWithTree(oldNode, newTree) { + oldNode.parentNode.replaceChild(newTree.node, oldNode); + insertTreeChildren(newTree); +} + +function queueChild(parentTree, childTree) { + if (enableLazy) { + parentTree.children.push(childTree); + } else { + parentTree.node.appendChild(childTree.node); + } +} + +function queueHTML(tree, html) { + if (enableLazy) { + tree.html = html; + } else { + setInnerHTML(tree.node, html); + } +} + +function queueText(tree, text) { + if (enableLazy) { + tree.text = text; + } else { + setTextContent(tree.node, text); + } +} + +function toString() { + return this.node.nodeName; +} + +function DOMLazyTree(node) { + return { + node: node, + children: [], + html: null, + text: null, + toString: toString + }; +} + +DOMLazyTree.insertTreeBefore = insertTreeBefore; +DOMLazyTree.replaceChildWithTree = replaceChildWithTree; +DOMLazyTree.queueChild = queueChild; +DOMLazyTree.queueHTML = queueHTML; +DOMLazyTree.queueText = queueText; + +module.exports = DOMLazyTree; + +/***/ }), +/* 71 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(109); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(483); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(484); + + + + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */](value) + : __WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseGetTag); + + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _IconButton = __webpack_require__(501); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _IconButton2.default; + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.dateTimeFormat = dateTimeFormat; +exports.addDays = addDays; +exports.addMonths = addMonths; +exports.addYears = addYears; +exports.cloneDate = cloneDate; +exports.cloneAsDate = cloneAsDate; +exports.getDaysInMonth = getDaysInMonth; +exports.getFirstDayOfMonth = getFirstDayOfMonth; +exports.getFirstDayOfWeek = getFirstDayOfWeek; +exports.getWeekArray = getWeekArray; +exports.localizedWeekday = localizedWeekday; +exports.formatIso = formatIso; +exports.isEqualDate = isEqualDate; +exports.isBeforeDate = isBeforeDate; +exports.isAfterDate = isAfterDate; +exports.isBetweenDates = isBetweenDates; +exports.monthDiff = monthDiff; +exports.yearDiff = yearDiff; + +var _warning = __webpack_require__(26); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var dayAbbreviation = ['S', 'M', 'T', 'W', 'T', 'F', 'S']; +var dayList = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var monthList = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; +var monthLongList = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; + +function dateTimeFormat(locale, options) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(locale === 'en-US', 'Material-UI: The ' + locale + ' locale is not supported by the built-in DateTimeFormat.\n Use the `DateTimeFormat` prop to supply an alternative implementation.') : void 0; + + this.format = function (date) { + if (options.month === 'short' && options.weekday === 'short' && options.day === '2-digit') { + return dayList[date.getDay()] + ', ' + monthList[date.getMonth()] + ' ' + date.getDate(); + } else if (options.year === 'numeric' && options.month === 'numeric' && options.day === 'numeric') { + return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); + } else if (options.year === 'numeric' && options.month === 'long') { + return monthLongList[date.getMonth()] + ' ' + date.getFullYear(); + } else if (options.weekday === 'narrow') { + return dayAbbreviation[date.getDay()]; + } else if (options.year === 'numeric') { + return date.getFullYear().toString(); + } else if (options.day === 'numeric') { + return date.getDate(); + } else { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: Wrong usage of DateTimeFormat') : void 0; + } + }; +} + +function addDays(d, days) { + var newDate = cloneDate(d); + newDate.setDate(d.getDate() + days); + return newDate; +} + +function addMonths(d, months) { + var newDate = cloneDate(d); + newDate.setMonth(d.getMonth() + months); + return newDate; +} + +function addYears(d, years) { + var newDate = cloneDate(d); + newDate.setFullYear(d.getFullYear() + years); + return newDate; +} + +function cloneDate(d) { + return new Date(d.getTime()); +} + +function cloneAsDate(d) { + var clonedDate = cloneDate(d); + clonedDate.setHours(0, 0, 0, 0); + return clonedDate; +} + +function getDaysInMonth(d) { + var resultDate = getFirstDayOfMonth(d); + + resultDate.setMonth(resultDate.getMonth() + 1); + resultDate.setDate(resultDate.getDate() - 1); + + return resultDate.getDate(); +} + +function getFirstDayOfMonth(d) { + return new Date(d.getFullYear(), d.getMonth(), 1); +} + +function getFirstDayOfWeek() { + var now = new Date(); + return new Date(now.setDate(now.getDate() - now.getDay())); +} + +function getWeekArray(d, firstDayOfWeek) { + var dayArray = []; + var daysInMonth = getDaysInMonth(d); + var weekArray = []; + var week = []; + + for (var i = 1; i <= daysInMonth; i++) { + dayArray.push(new Date(d.getFullYear(), d.getMonth(), i)); + } + + var addWeek = function addWeek(week) { + var emptyDays = 7 - week.length; + for (var _i = 0; _i < emptyDays; ++_i) { + week[weekArray.length ? 'push' : 'unshift'](null); + } + weekArray.push(week); + }; + + dayArray.forEach(function (day) { + if (week.length > 0 && day.getDay() === firstDayOfWeek) { + addWeek(week); + week = []; } week.push(day); if (dayArray.indexOf(day) === dayArray.length - 1) { @@ -5576,94 +5591,63 @@ function yearDiff(d1, d2) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 72 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var $at = __webpack_require__(311)(true); +var $at = __webpack_require__(318)(true); // 21.1.3.27 String.prototype[@@iterator]() -__webpack_require__(193)(String, 'String', function (iterated) { +__webpack_require__(199)(String, 'String', function(iterated){ this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function () { - var O = this._t; - var index = this._i; - var point; - if (index >= O.length) return { value: undefined, done: true }; +}, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; point = $at(O, index); this._i += point.length; - return { value: point, done: false }; + return {value: point, done: false}; }); - /***/ }), -/* 73 */ +/* 75 */ /***/ (function(module, exports) { -module.exports = function (bitmap, value) { +module.exports = function(bitmap, value){ return { - enumerable: !(bitmap & 1), + enumerable : !(bitmap & 1), configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value + writable : !(bitmap & 4), + value : value }; }; - /***/ }), -/* 74 */ +/* 76 */ /***/ (function(module, exports) { var toString = {}.toString; -module.exports = function (it) { +module.exports = function(it){ return toString.call(it).slice(8, -1); }; - /***/ }), -/* 75 */ +/* 77 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) -var defined = __webpack_require__(126); -module.exports = function (it) { +var defined = __webpack_require__(129); +module.exports = function(it){ return Object(defined(it)); }; - -/***/ }), -/* 76 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _iterator = __webpack_require__(340); - -var _iterator2 = _interopRequireDefault(_iterator); - -var _symbol = __webpack_require__(342); - -var _symbol2 = _interopRequireDefault(_symbol); - -var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { - return typeof obj === "undefined" ? "undefined" : _typeof(obj); -} : function (obj) { - return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); -}; - /***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5679,11 +5663,11 @@ exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.d -var EventPluginHub = __webpack_require__(78); -var EventPluginUtils = __webpack_require__(145); +var EventPluginHub = __webpack_require__(79); +var EventPluginUtils = __webpack_require__(150); -var accumulateInto = __webpack_require__(221); -var forEachAccumulated = __webpack_require__(222); +var accumulateInto = __webpack_require__(225); +var forEachAccumulated = __webpack_require__(226); var warning = __webpack_require__(11); var getListener = EventPluginHub.getListener; @@ -5803,7 +5787,7 @@ module.exports = EventPropagators; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5819,14 +5803,14 @@ module.exports = EventPropagators; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); var EventPluginRegistry = __webpack_require__(101); -var EventPluginUtils = __webpack_require__(145); -var ReactErrorUtils = __webpack_require__(146); +var EventPluginUtils = __webpack_require__(150); +var ReactErrorUtils = __webpack_require__(151); -var accumulateInto = __webpack_require__(221); -var forEachAccumulated = __webpack_require__(222); +var accumulateInto = __webpack_require__(225); +var forEachAccumulated = __webpack_require__(226); var invariant = __webpack_require__(10); /** @@ -5914,10 +5898,12 @@ function shouldPreventMouseEvent(name, type, props) { * @public */ var EventPluginHub = { + /** * Methods for injecting dependencies. */ injection: { + /** * @param {array} InjectedEventPluginOrder * @public @@ -5928,6 +5914,7 @@ var EventPluginHub = { * @param {object} injectedNamesToPlugins Map from names to plugin modules. */ injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName + }, /** @@ -6077,13 +6064,14 @@ var EventPluginHub = { __getListenerBank: function () { return listenerBank; } + }; module.exports = EventPluginHub; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6099,9 +6087,9 @@ module.exports = EventPluginHub; -var SyntheticEvent = __webpack_require__(38); +var SyntheticEvent = __webpack_require__(36); -var getEventTarget = __webpack_require__(147); +var getEventTarget = __webpack_require__(152); /** * @interface UIEvent @@ -6147,7 +6135,7 @@ SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); module.exports = SyntheticUIEvent; /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6173,6 +6161,7 @@ module.exports = SyntheticUIEvent; // TODO: Replace this with ES6: var ReactInstanceMap = new Map(); var ReactInstanceMap = { + /** * This API should be called `delete` but we'd have to make sure to always * transform these to strings for IE support. When this transform is fully @@ -6193,12 +6182,13 @@ var ReactInstanceMap = { set: function (key, value) { key._reactInternalInstance = value; } + }; module.exports = ReactInstanceMap; /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6271,7 +6261,7 @@ function shallowEqual(objA, objB) { module.exports = shallowEqual; /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6329,26 +6319,6 @@ module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -/***/ }), -/* 83 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; - -var _IconButton = __webpack_require__(497); - -var _IconButton2 = _interopRequireDefault(_IconButton); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _IconButton2.default; - /***/ }), /* 84 */ /***/ (function(module, exports, __webpack_require__) { @@ -6362,23 +6332,12 @@ Object.defineProperty(exports, "__esModule", { var MENU_OPTIONS = exports.MENU_OPTIONS = 'Options'; var MENU_BILLING = exports.MENU_BILLING = 'Billing'; var MENU_SIZES = exports.MENU_SIZES = 'Sizes'; +var MENU_ATC = exports.MENU_ATC = 'AutoCop'; /***/ }), /* 85 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = formatName; -function formatName(context, name) { - var sectionPrefix = context._reduxForm.sectionPrefix; - - return !sectionPrefix ? name : sectionPrefix + "." + name; -} - -/***/ }), -/* 86 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - "use strict"; /** * Performs a @@ -6420,11 +6379,11 @@ function eq(value, other) { /***/ }), -/* 87 */ +/* 86 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(111); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(112); /** Used as references for various `Number` constants. */ @@ -6438,7 +6397,7 @@ var INFINITY = 1 / 0; * @returns {string|symbol} Returns the key. */ function toKey(value) { - if (typeof value == 'string' || Object(__WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */])(value)) { + if (typeof value == 'string' || __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */](value)) { return value; } var result = (value + ''); @@ -6448,6 +6407,26 @@ function toKey(value) { /* harmony default export */ __webpack_exports__["a"] = (toKey); +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _MenuItem = __webpack_require__(290); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _MenuItem2.default; + /***/ }), /* 88 */ /***/ (function(module, exports, __webpack_require__) { @@ -6460,7 +6439,27 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _TextField = __webpack_require__(690); +var _RaisedButton = __webpack_require__(665); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _RaisedButton2.default; + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _TextField = __webpack_require__(668); var _TextField2 = _interopRequireDefault(_TextField); @@ -6469,7 +6468,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.default = _TextField2.default; /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6570,97 +6569,137 @@ function isInner(props) { } /***/ }), -/* 90 */ -/***/ (function(module, exports) { +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = true; +"use strict"; -/***/ }), -/* 91 */ -/***/ (function(module, exports) { +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getTheme = getTheme; -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; +var _getMuiTheme = __webpack_require__(122); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + +var _colors = __webpack_require__(37); + +var _styles = __webpack_require__(762); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + paper: { + margin: _styles.spacing.desktopGutter, + padding: _styles.spacing.desktopGutter + }, + container: { + display: 'flex', + flexFlow: 'column', + alignItems: 'center', + minHeight: '100%', + backgroundColor: _colors.grey50 + }, + content: { + maxWidth: 1200, + margin: '0 auto', + zIndex: 101 + }, + tabs: { + marginLeft: -24, + marginRight: -24 + }, + appBar: { + flex: 'none', + display: 'block', + flexWrap: 'wrap', + zIndex: 100, + height: 64 + }, + logo: { + fontSize: 16, + color: _styles.typography.textFullWhite, + lineHeight: _styles.spacing.desktopKeylineIncrement + 'px', + fontWeight: _styles.typography.fontWeightLight, + backgroundColor: 'rgb(72, 72, 72)', + marginBottom: 8, + height: 64, + textAlign: 'center' + }, + fields: { + text: { + width: '100%' + } + }, + colors: { + main: 'rgb(72, 72, 72)', + drawer: 'rgb(250, 250, 250)', + tabs: 'rgb(137, 189, 191)' + }, + theme: { + palette: { + primary1Color: 'rgb(72, 72, 72)', + primary2Color: 'rgb(72, 72, 72)' + }, + drawer: { + color: 'rgb(250, 250, 250)' + } + } }; +function getTheme() { + return (0, _getMuiTheme2.default)(styles.theme); +} + +exports.default = styles; /***/ }), /* 92 */ /***/ (function(module, exports) { -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - +module.exports = true; /***/ }), /* 93 */ -/***/ (function(module, exports, __webpack_require__) { - -var def = __webpack_require__(36).f; -var has = __webpack_require__(48); -var TAG = __webpack_require__(21)('toStringTag'); +/***/ (function(module, exports) { -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +var id = 0 + , px = Math.random(); +module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; - /***/ }), /* 94 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(316); -var global = __webpack_require__(22); -var hide = __webpack_require__(47); -var Iterators = __webpack_require__(63); -var TO_STRING_TAG = __webpack_require__(21)('toStringTag'); - -var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + - 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + - 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + - 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + - 'TextTrackList,TouchList').split(','); - -for (var i = 0; i < DOMIterables.length; i++) { - var NAME = DOMIterables[i]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = Iterators.Array; -} +var def = __webpack_require__(34).f + , has = __webpack_require__(51) + , TAG = __webpack_require__(20)('toStringTag'); +module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); +}; /***/ }), /* 95 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -exports.__esModule = true; - -var _from = __webpack_require__(207); - -var _from2 = _interopRequireDefault(_from); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { - arr2[i] = arr[i]; - } +__webpack_require__(323); +var global = __webpack_require__(24) + , hide = __webpack_require__(50) + , Iterators = __webpack_require__(67) + , TO_STRING_TAG = __webpack_require__(20)('toStringTag'); - return arr2; - } else { - return (0, _from2.default)(arr); - } -}; +for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype; + if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} /***/ }), /* 96 */ @@ -6668,7 +6707,6 @@ exports.default = function (arr) { exports.f = {}.propertyIsEnumerable; - /***/ }), /* 97 */ /***/ (function(module, exports, __webpack_require__) { @@ -6731,7 +6769,7 @@ module.exports = emptyObject; /* 99 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(379), __esModule: true }; +module.exports = { "default": __webpack_require__(383), __esModule: true }; /***/ }), /* 100 */ @@ -6750,7 +6788,7 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactAddonsCreateFragment = __webpack_require__(382); +var _reactAddonsCreateFragment = __webpack_require__(386); var _reactAddonsCreateFragment2 = _interopRequireDefault(_reactAddonsCreateFragment); @@ -6809,7 +6847,7 @@ function extendChildren(children, extendedProps, extendedChildren) { -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); var invariant = __webpack_require__(10); @@ -6906,6 +6944,7 @@ function publishRegistrationName(registrationName, pluginModule, eventName) { * @see {EventPluginHub} */ var EventPluginRegistry = { + /** * Ordered list of injected plugins. */ @@ -7045,6 +7084,7 @@ var EventPluginRegistry = { } } } + }; module.exports = EventPluginRegistry; @@ -7068,7 +7108,7 @@ module.exports = EventPluginRegistry; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); var invariant = __webpack_require__(10); @@ -7165,8 +7205,6 @@ var TransactionImpl = { return !!this._isInTransaction; }, - /* eslint-disable space-before-function-paren */ - /** * Executes the function within a safety window. Use this for the top level * methods that result in large amounts of computation/mutations that would @@ -7185,7 +7223,6 @@ var TransactionImpl = { * @return {*} Return value from `method`. */ perform: function (method, scope, a, b, c, d, e, f) { - /* eslint-enable space-before-function-paren */ !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0; var errorThrown; var ret; @@ -7301,10 +7338,10 @@ module.exports = TransactionImpl; -var SyntheticUIEvent = __webpack_require__(79); -var ViewportMetrics = __webpack_require__(228); +var SyntheticUIEvent = __webpack_require__(80); +var ViewportMetrics = __webpack_require__(231); -var getEventModifierState = __webpack_require__(149); +var getEventModifierState = __webpack_require__(154); /** * @interface MouseEvent @@ -7378,13 +7415,13 @@ module.exports = SyntheticMouseEvent; -var ExecutionEnvironment = __webpack_require__(19); -var DOMNamespaces = __webpack_require__(151); +var ExecutionEnvironment = __webpack_require__(18); +var DOMNamespaces = __webpack_require__(156); var WHITESPACE_TEST = /^[ \r\n\t\f]/; var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; -var createMicrosoftUnsafeLocalFunction = __webpack_require__(152); +var createMicrosoftUnsafeLocalFunction = __webpack_require__(157); // SVG temp container for IE lacking innerHTML var reusableSVGContainer; @@ -7444,7 +7481,7 @@ if (ExecutionEnvironment.canUseDOM) { // in hopes that this is preserved even if "\uFEFF" is transformed to // the actual Unicode character (by Babel, for example). // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 - node.innerHTML = String.fromCharCode(0xfeff) + html; + node.innerHTML = String.fromCharCode(0xFEFF) + html; // deleteData leaves an empty `TextNode` which offsets the index of all // children. Definitely want to avoid this. @@ -7573,6 +7610,7 @@ function escapeHtml(string) { } // end code copied and modified from escape-html + /** * Escapes text to prevent scripting attacks. * @@ -7608,14 +7646,14 @@ module.exports = escapeTextContentForBrowser; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(14); var EventPluginRegistry = __webpack_require__(101); -var ReactEventEmitterMixin = __webpack_require__(417); -var ViewportMetrics = __webpack_require__(228); +var ReactEventEmitterMixin = __webpack_require__(422); +var ViewportMetrics = __webpack_require__(231); -var getVendorPrefixedEventName = __webpack_require__(418); -var isEventSupported = __webpack_require__(148); +var getVendorPrefixedEventName = __webpack_require__(423); +var isEventSupported = __webpack_require__(153); /** * Summary of `ReactBrowserEventEmitter` event handling: @@ -7773,6 +7811,7 @@ function getListeningForDocument(mountAt) { * @internal */ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { + /** * Injectable event backend */ @@ -7846,12 +7885,14 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt); } } else if (dependency === 'topScroll') { + if (isEventSupported('scroll', true)) { ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt); } else { ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); } } else if (dependency === 'topFocus' || dependency === 'topBlur') { + if (isEventSupported('focus', true)) { ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt); ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt); @@ -7916,6 +7957,7 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { isMonitoringScrollValue = true; } } + }); module.exports = ReactBrowserEventEmitter; @@ -7940,27 +7982,14 @@ exports.default = { /* 108 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - - - -module.exports = __webpack_require__(469); - +module.exports = __webpack_require__(474); /***/ }), /* 109 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(34); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(31); /** Built-in value references. */ @@ -7974,13 +8003,132 @@ var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(267); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyArray_js__ = __webpack_require__(268); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(35); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(111); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringToPath_js__ = __webpack_require__(269); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(87); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toString_js__ = __webpack_require__(271); +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionTypes", function() { return actionTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Field", function() { return Field; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fields", function() { return Fields; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FieldArray", function() { return FieldArray; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return Form; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormSection", function() { return FormSection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formValueSelector", function() { return formValueSelector; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormValues", function() { return getFormValues; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormInitialValues", function() { return getFormInitialValues; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncErrors", function() { return getFormSyncErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormAsyncErrors", function() { return getFormAsyncErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSubmitErrors", function() { return getFormSubmitErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDirty", function() { return isDirty; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInvalid", function() { return isInvalid; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPristine", function() { return isPristine; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValid", function() { return isValid; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSubmitting", function() { return isSubmitting; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitSucceeded", function() { return hasSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitFailed", function() { return hasSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return propTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduxForm", function() { return reduxForm; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubmissionError", function() { return SubmissionError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return values; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createAll__ = __webpack_require__(503); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(48); + + + +var _createAll = __WEBPACK_IMPORTED_MODULE_0__createAll__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]); + +var actionTypes = _createAll.actionTypes, + arrayInsert = _createAll.arrayInsert, + arrayMove = _createAll.arrayMove, + arrayPop = _createAll.arrayPop, + arrayPush = _createAll.arrayPush, + arrayRemove = _createAll.arrayRemove, + arrayRemoveAll = _createAll.arrayRemoveAll, + arrayShift = _createAll.arrayShift, + arraySplice = _createAll.arraySplice, + arraySwap = _createAll.arraySwap, + arrayUnshift = _createAll.arrayUnshift, + autofill = _createAll.autofill, + blur = _createAll.blur, + change = _createAll.change, + destroy = _createAll.destroy, + Field = _createAll.Field, + Fields = _createAll.Fields, + FieldArray = _createAll.FieldArray, + Form = _createAll.Form, + FormSection = _createAll.FormSection, + focus = _createAll.focus, + formValueSelector = _createAll.formValueSelector, + getFormValues = _createAll.getFormValues, + getFormInitialValues = _createAll.getFormInitialValues, + getFormSyncErrors = _createAll.getFormSyncErrors, + getFormAsyncErrors = _createAll.getFormAsyncErrors, + getFormSubmitErrors = _createAll.getFormSubmitErrors, + initialize = _createAll.initialize, + isDirty = _createAll.isDirty, + isInvalid = _createAll.isInvalid, + isPristine = _createAll.isPristine, + isValid = _createAll.isValid, + isSubmitting = _createAll.isSubmitting, + hasSubmitSucceeded = _createAll.hasSubmitSucceeded, + hasSubmitFailed = _createAll.hasSubmitFailed, + propTypes = _createAll.propTypes, + reducer = _createAll.reducer, + reduxForm = _createAll.reduxForm, + registerField = _createAll.registerField, + reset = _createAll.reset, + setSubmitFailed = _createAll.setSubmitFailed, + setSubmitSucceeded = _createAll.setSubmitSucceeded, + startAsyncValidation = _createAll.startAsyncValidation, + startSubmit = _createAll.startSubmit, + stopAsyncValidation = _createAll.stopAsyncValidation, + stopSubmit = _createAll.stopSubmit, + submit = _createAll.submit, + SubmissionError = _createAll.SubmissionError, + touch = _createAll.touch, + unregisterField = _createAll.unregisterField, + untouch = _createAll.untouch, + values = _createAll.values; + + +/***/ }), +/* 111 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(264); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyArray_js__ = __webpack_require__(265); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(112); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringToPath_js__ = __webpack_require__(266); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(86); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toString_js__ = __webpack_require__(268); @@ -8007,22 +8155,22 @@ var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; * // => ['a', '0', 'b', 'c'] */ function toPath(value) { - if (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value)) { - return Object(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(value, __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */]); + if (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value)) { + return __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */](value, __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */]); } - return Object(__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */])(value) ? [value] : Object(__WEBPACK_IMPORTED_MODULE_1__copyArray_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_4__stringToPath_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_6__toString_js__["a" /* default */])(value))); + return __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */](value) ? [value] : __WEBPACK_IMPORTED_MODULE_1__copyArray_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_4__stringToPath_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_6__toString_js__["a" /* default */](value))); } /* harmony default export */ __webpack_exports__["a"] = (toPath); /***/ }), -/* 111 */ +/* 112 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(69); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(71); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59); @@ -8048,36 +8196,36 @@ var symbolTag = '[object Symbol]'; */ function isSymbol(value) { return typeof value == 'symbol' || - (Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == symbolTag); + (__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) == symbolTag); } /* harmony default export */ __webpack_exports__["a"] = (isSymbol); /***/ }), -/* 112 */ +/* 113 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(57); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); /* Built-in method references that are verified to be native. */ -var nativeCreate = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(Object, 'create'); +var nativeCreate = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](Object, 'create'); /* harmony default export */ __webpack_exports__["a"] = (nativeCreate); /***/ }), -/* 113 */ +/* 114 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__ = __webpack_require__(525); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__ = __webpack_require__(526); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__ = __webpack_require__(527); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__ = __webpack_require__(528); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__ = __webpack_require__(529); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__ = __webpack_require__(519); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__ = __webpack_require__(520); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__ = __webpack_require__(521); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__ = __webpack_require__(522); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__ = __webpack_require__(523); @@ -8113,11 +8261,11 @@ ListCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__["a" /* /***/ }), -/* 114 */ +/* 115 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(86); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(85); /** @@ -8131,7 +8279,7 @@ ListCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__["a" /* function assocIndexOf(array, key) { var length = array.length; while (length--) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */])(array[length][0], key)) { + if (__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */](array[length][0], key)) { return length; } } @@ -8142,11 +8290,11 @@ function assocIndexOf(array, key) { /***/ }), -/* 115 */ +/* 116 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__ = __webpack_require__(531); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__ = __webpack_require__(525); /** @@ -8159,7 +8307,7 @@ function assocIndexOf(array, key) { */ function getMapData(map, key) { var data = map.__data__; - return Object(__WEBPACK_IMPORTED_MODULE_0__isKeyable_js__["a" /* default */])(key) + return __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__["a" /* default */](key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } @@ -8168,11 +8316,44 @@ function getMapData(map, key) { /***/ }), -/* 116 */ +/* 117 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__(270); + + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */]) { + __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */](object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +/* harmony default export */ __webpack_exports__["a"] = (baseAssignValue); + + +/***/ }), +/* 118 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(165); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(169); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(175); @@ -8203,67 +8384,26 @@ function getMapData(map, key) { * // => false */ function isArrayLike(value) { - return value != null && Object(__WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */])(value.length) && !Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(value); + return value != null && __WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */](value.length) && !__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */](value); } /* harmony default export */ __webpack_exports__["a"] = (isArrayLike); /***/ }), -/* 117 */ +/* 119 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__(278); - +/* harmony export (immutable) */ __webpack_exports__["a"] = formatName; +function formatName(context, name) { + var sectionPrefix = context._reduxForm.sectionPrefix; -/** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */]) { - Object(__WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */])(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } + return !sectionPrefix ? name : sectionPrefix + "." + name; } -/* harmony default export */ __webpack_exports__["a"] = (baseAssignValue); - - -/***/ }), -/* 118 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; - -var _MenuItem = __webpack_require__(288); - -var _MenuItem2 = _interopRequireDefault(_MenuItem); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _MenuItem2.default; - /***/ }), -/* 119 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8309,35 +8449,35 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(18); +var _reactDom = __webpack_require__(17); var _reactDom2 = _interopRequireDefault(_reactDom); -var _reactEventListener = __webpack_require__(58); +var _reactEventListener = __webpack_require__(61); var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -var _RenderToLayer = __webpack_require__(289); +var _RenderToLayer = __webpack_require__(291); var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer); -var _propTypes = __webpack_require__(44); +var _propTypes = __webpack_require__(46); var _propTypes2 = _interopRequireDefault(_propTypes); -var _Paper = __webpack_require__(39); +var _Paper = __webpack_require__(38); var _Paper2 = _interopRequireDefault(_Paper); -var _lodash = __webpack_require__(666); +var _lodash = __webpack_require__(646); var _lodash2 = _interopRequireDefault(_lodash); -var _PopoverAnimationDefault = __webpack_require__(667); +var _PopoverAnimationDefault = __webpack_require__(647); var _PopoverAnimationDefault2 = _interopRequireDefault(_PopoverAnimationDefault); -var _iOSHelpers = __webpack_require__(668); +var _iOSHelpers = __webpack_require__(648); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -8778,7 +8918,7 @@ exports.default = Popover; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 120 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8787,85 +8927,58 @@ exports.default = Popover; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getTheme = getTheme; +exports.Toggle = exports.TextField = exports.Slider = exports.SelectField = exports.RadioButtonGroup = exports.TimePicker = exports.DatePicker = exports.Checkbox = exports.AutoComplete = undefined; -var _getMuiTheme = __webpack_require__(121); +var _AutoComplete = __webpack_require__(666); -var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); -var _colors = __webpack_require__(56); +var _Checkbox = __webpack_require__(673); -var _styles = __webpack_require__(789); +var _Checkbox2 = _interopRequireDefault(_Checkbox); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _DatePicker = __webpack_require__(677); -var styles = { - paper: { - margin: _styles.spacing.desktopGutter, - padding: _styles.spacing.desktopGutter - }, - container: { - display: 'flex', - flexFlow: 'column', - alignItems: 'center', - minHeight: '100%', - backgroundColor: _colors.grey50 - }, - content: { - maxWidth: 1200, - margin: '0 auto', - zIndex: 101 - }, - tabs: { - marginLeft: -24, - marginRight: -24 - }, - appBar: { - flex: 'none', - display: 'block', - flexWrap: 'wrap', - zIndex: 100, - height: 64 - }, - logo: { - fontSize: 16, - color: _styles.typography.textFullWhite, - lineHeight: _styles.spacing.desktopKeylineIncrement + 'px', - fontWeight: _styles.typography.fontWeightLight, - backgroundColor: 'rgb(72, 72, 72)', - marginBottom: 8, - height: 64, - textAlign: 'center' - }, - fields: { - text: { - width: '100%' - } - }, - colors: { - main: 'rgb(72, 72, 72)', - drawer: 'rgb(250, 250, 250)', - tabs: 'rgb(137, 189, 191)' - }, - theme: { - palette: { - primary1Color: 'rgb(72, 72, 72)', - primary2Color: 'rgb(72, 72, 72)' - }, - drawer: { - color: 'rgb(250, 250, 250)' - } - } -}; +var _DatePicker2 = _interopRequireDefault(_DatePicker); -function getTheme() { - return (0, _getMuiTheme2.default)(styles.theme); -} +var _RadioButtonGroup = __webpack_require__(697); -exports.default = styles; +var _RadioButtonGroup2 = _interopRequireDefault(_RadioButtonGroup); + +var _SelectField = __webpack_require__(702); + +var _SelectField2 = _interopRequireDefault(_SelectField); + +var _Slider = __webpack_require__(710); + +var _Slider2 = _interopRequireDefault(_Slider); + +var _TextField = __webpack_require__(715); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _TimePicker = __webpack_require__(716); + +var _TimePicker2 = _interopRequireDefault(_TimePicker); + +var _Toggle = __webpack_require__(727); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.AutoComplete = _AutoComplete2.default; +exports.Checkbox = _Checkbox2.default; +exports.DatePicker = _DatePicker2.default; +exports.TimePicker = _TimePicker2.default; +exports.RadioButtonGroup = _RadioButtonGroup2.default; +exports.SelectField = _SelectField2.default; +exports.Slider = _Slider2.default; +exports.TextField = _TextField2.default; +exports.Toggle = _Toggle2.default; /***/ }), -/* 121 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8875,47 +8988,47 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _toConsumableArray2 = __webpack_require__(95); +var _toConsumableArray2 = __webpack_require__(53); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); exports.default = getMuiTheme; -var _lodash = __webpack_require__(756); +var _lodash = __webpack_require__(729); var _lodash2 = _interopRequireDefault(_lodash); -var _colorManipulator = __webpack_require__(70); +var _colorManipulator = __webpack_require__(62); -var _lightBaseTheme = __webpack_require__(299); +var _lightBaseTheme = __webpack_require__(305); var _lightBaseTheme2 = _interopRequireDefault(_lightBaseTheme); -var _zIndex = __webpack_require__(300); +var _zIndex = __webpack_require__(306); var _zIndex2 = _interopRequireDefault(_zIndex); -var _autoprefixer = __webpack_require__(757); +var _autoprefixer = __webpack_require__(730); var _autoprefixer2 = _interopRequireDefault(_autoprefixer); -var _callOnce = __webpack_require__(786); +var _callOnce = __webpack_require__(759); var _callOnce2 = _interopRequireDefault(_callOnce); -var _rtl = __webpack_require__(787); +var _rtl = __webpack_require__(760); var _rtl2 = _interopRequireDefault(_rtl); -var _compose = __webpack_require__(788); +var _compose = __webpack_require__(761); var _compose2 = _interopRequireDefault(_compose); -var _typography = __webpack_require__(304); +var _typography = __webpack_require__(310); var _typography2 = _interopRequireDefault(_typography); -var _colors = __webpack_require__(56); +var _colors = __webpack_require__(37); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -9250,7 +9363,7 @@ function getMuiTheme(muiTheme) { } /***/ }), -/* 122 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9276,14 +9389,125 @@ exports.default = function (property, value) { module.exports = exports['default']; /***/ }), -/* 123 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(308); +"use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.email = email; +exports.required = required; +exports.notEmpty = notEmpty; +exports.simpleText = simpleText; +exports.number = number; +exports.minValue = minValue; +exports.maxValue = maxValue; +exports.fullName = fullName; +exports.unique = unique; +exports.date = date; +exports.time24 = time24; + +var _Helpers = __webpack_require__(145); + +var Helpers = _interopRequireWildcard(_Helpers); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function email(input) { + var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return re.test(input) ? undefined : 'Please enter a valid email'; +} + +function required(value) { + var empty = typeof value !== 'number' && !value; + return empty ? 'Required field' : undefined; +} + +function notEmpty(arr) { + if (!Array.isArray(arr) || !arr.length) { + return 'This field must not be empty'; + } +} + +function simpleText(value) { + return value && !value.match(/^[0-9a-zA-Z_]{1,64}$/) ? 'Only use characters (a-z, A-Z, 0-9, _)' : undefined; +} + +function number(value) { + return value && (isNaN(Number(value)) || +value < 0) ? 'This field must be a positive number' : undefined; +} + +function minValue(min) { + return function (value) { + return value && value < min ? 'The value must be greater than ' + min : undefined; + }; +} + +function maxValue(max) { + return function (value) { + return value && value > max ? 'The value must be less than ' + max : undefined; + }; +} + +function fullName(value) { + return !value || value.split(' ').filter(function (x) { + return x !== ""; + }).length < 2 ? 'Please enter a valid full name (firstname + lastname)' : undefined; +} + +function unique(candidates) { + return function (value) { + if (candidates.indexOf(value) !== -1) { + return 'This value already exists and must be unique'; + } + return undefined; + }; +} + +function date(val) { + var d = new Date(val); + return isNaN(d.getTime()) ? 'Required date' : undefined; +} + +function time24(val) { + var msg = 'Invalid time'; + if (!Helpers.setTimeForToday(val)) { + return msg; + } +} + /***/ }), -/* 124 */ +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var CHANGE_MENU = exports.CHANGE_MENU = 'CHANGE_MENU'; +var NOTIFICATION_ADD = exports.NOTIFICATION_ADD = 'NOTIFICATION_ADD'; +var PROFILE_CREATE = exports.PROFILE_CREATE = 'PROFILE_CREATE'; +var PROFILE_UPDATE_SETTINGS = exports.PROFILE_UPDATE_SETTINGS = 'PROFILE_UPDATE_SETTINGS'; +var PROFILE_REMOVE = exports.PROFILE_REMOVE = 'PROFILE_REMOVE'; +var PROFILE_SET_ENABLED = exports.PROFILE_SET_ENABLED = 'PROFILE_SET_ENABLED'; +var ATC_PRODUCT_ADD = exports.ATC_PRODUCT_ADD = 'ATC_PRODUCT_ADD'; +var ATC_PRODUCT_REMOVE = exports.ATC_PRODUCT_REMOVE = 'ATC_PRODUCT_REMOVE'; +var ATC_SET_PRODUCT_ENABLED = exports.ATC_SET_PRODUCT_ENABLED = 'ATC_SET_PRODUCT_ENABLED'; + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(315); + + +/***/ }), +/* 127 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9291,7 +9515,7 @@ module.exports = __webpack_require__(308); exports.__esModule = true; -var _promise = __webpack_require__(191); +var _promise = __webpack_require__(197); var _promise2 = _interopRequireDefault(_promise); @@ -9327,81 +9551,86 @@ exports.default = function (fn) { }; /***/ }), -/* 125 */ +/* 128 */ /***/ (function(module, exports) { // 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { +var ceil = Math.ceil + , floor = Math.floor; +module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; - /***/ }), -/* 126 */ +/* 129 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); +module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); return it; }; +/***/ }), +/* 130 */ +/***/ (function(module, exports) { + +module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; +}; /***/ }), -/* 127 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(61); -var document = __webpack_require__(22).document; -// typeof document.createElement is 'object' in old IE -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { +var isObject = __webpack_require__(65) + , document = __webpack_require__(24).document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); +module.exports = function(it){ return is ? document.createElement(it) : {}; }; - /***/ }), -/* 128 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(61); +var isObject = __webpack_require__(65); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; +module.exports = function(it, S){ + if(!isObject(it))return it; var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; throw TypeError("Can't convert object to primitive value"); }; - /***/ }), -/* 129 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(37); -var dPs = __webpack_require__(313); -var enumBugKeys = __webpack_require__(133); -var IE_PROTO = __webpack_require__(131)('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; +var anObject = __webpack_require__(35) + , dPs = __webpack_require__(320) + , enumBugKeys = __webpack_require__(137) + , IE_PROTO = __webpack_require__(135)('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { +var createDict = function(){ // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(127)('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; + var iframe = __webpack_require__(131)('iframe') + , i = enumBugKeys.length + , lt = '<' + , gt = '>' + , iframeDocument; iframe.style.display = 'none'; - __webpack_require__(198).appendChild(iframe); + __webpack_require__(204).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); @@ -9410,15 +9639,15 @@ var createDict = function () { iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; -module.exports = Object.create || function create(O, Properties) { +module.exports = Object.create || function create(O, Properties){ var result; - if (O !== null) { + if(O !== null){ Empty[PROTOTYPE] = anObject(O); - result = new Empty(); + result = new Empty; Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; @@ -9428,42 +9657,39 @@ module.exports = Object.create || function create(O, Properties) { /***/ }), -/* 130 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength -var toInteger = __webpack_require__(125); -var min = Math.min; -module.exports = function (it) { +var toInteger = __webpack_require__(128) + , min = Math.min; +module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; - /***/ }), -/* 131 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { -var shared = __webpack_require__(132)('keys'); -var uid = __webpack_require__(92); -module.exports = function (key) { +var shared = __webpack_require__(136)('keys') + , uid = __webpack_require__(93); +module.exports = function(key){ return shared[key] || (shared[key] = uid(key)); }; - /***/ }), -/* 132 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { -var global = __webpack_require__(22); -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); -module.exports = function (key) { +var global = __webpack_require__(24) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); +module.exports = function(key){ return store[key] || (store[key] = {}); }; - /***/ }), -/* 133 */ +/* 137 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys @@ -9471,25 +9697,24 @@ module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); - /***/ }), -/* 134 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(74); -var TAG = __webpack_require__(21)('toStringTag'); -// ES3 wrong here -var ARG = cof(function () { return arguments; }()) == 'Arguments'; +var cof = __webpack_require__(76) + , TAG = __webpack_require__(20)('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error -var tryGet = function (it, key) { +var tryGet = function(it, key){ try { return it[key]; - } catch (e) { /* empty */ } + } catch(e){ /* empty */ } }; -module.exports = function (it) { +module.exports = function(it){ var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case @@ -9500,83 +9725,133 @@ module.exports = function (it) { : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; - /***/ }), -/* 135 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { -var classof = __webpack_require__(134); -var ITERATOR = __webpack_require__(21)('iterator'); -var Iterators = __webpack_require__(63); -module.exports = __webpack_require__(17).getIteratorMethod = function (it) { - if (it != undefined) return it[ITERATOR] +var classof = __webpack_require__(138) + , ITERATOR = __webpack_require__(20)('iterator') + , Iterators = __webpack_require__(67); +module.exports = __webpack_require__(16).getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; - /***/ }), -/* 136 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +exports.f = __webpack_require__(20); -// 25.4.1.5 NewPromiseCapability(C) -var aFunction = __webpack_require__(91); - -function PromiseCapability(C) { - var resolve, reject; - this.promise = new C(function ($$resolve, $$reject) { - if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); - resolve = $$resolve; - reject = $$reject; - }); - this.resolve = aFunction(resolve); - this.reject = aFunction(reject); -} +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports.f = function (C) { - return new PromiseCapability(C); +var global = __webpack_require__(24) + , core = __webpack_require__(16) + , LIBRARY = __webpack_require__(92) + , wksExt = __webpack_require__(140) + , defineProperty = __webpack_require__(34).f; +module.exports = function(name){ + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); }; +/***/ }), +/* 142 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; /***/ }), -/* 137 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(338), __esModule: true }; +module.exports = { "default": __webpack_require__(350), __esModule: true }; /***/ }), -/* 138 */ +/* 144 */ /***/ (function(module, exports, __webpack_require__) { -exports.f = __webpack_require__(21); - +module.exports = { "default": __webpack_require__(354), __esModule: true }; /***/ }), -/* 139 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { -var global = __webpack_require__(22); -var core = __webpack_require__(17); -var LIBRARY = __webpack_require__(90); -var wksExt = __webpack_require__(138); -var defineProperty = __webpack_require__(36).f; -module.exports = function (name) { - var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); - if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); -}; +"use strict"; -/***/ }), -/* 140 */ -/***/ (function(module, exports) { +Object.defineProperty(exports, "__esModule", { + value: true +}); -exports.f = Object.getOwnPropertySymbols; +var _keys = __webpack_require__(54); +var _keys2 = _interopRequireDefault(_keys); + +exports.isObjectEmpty = isObjectEmpty; +exports.getQueryStringValue = getQueryStringValue; +exports.pageHasNodeOfClass = pageHasNodeOfClass; +exports.hasStringInPath = hasStringInPath; +exports.pathCount = pathCount; +exports.setTimeForToday = setTimeForToday; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isObjectEmpty(obj) { + return (0, _keys2.default)(obj).length === 0 && obj.constructor === Object; +} + +function getQueryStringValue(key) { + var urlParams = new URLSearchParams(window.location.search); + return urlParams.get(key); +} + +function pageHasNodeOfClass(className) { + return document.getElementsByClassName(className).length > 0; +} + +function hasStringInPath(value) { + return location.pathname.substring(1).split('/').filter(function (x) { + return !!x && x === value; + }).length > 0; +} + +function pathCount() { + return location.pathname.substring(1).split('/').length; +} + +function setTimeForToday(time) { + var d = new Date(); + var split = time.split(':'); + if (!split.length || split.length > 3) { + return null; + } + var hour = +split[0]; + var minute = +split[1]; + var seconds = +split[2]; + if (isNaN(hour) || hour > 24) { + return null; + } + + if (isNaN(minute) || minute > 60 || hour === 24 && minute > 0) { + return null; + } + + if (isNaN(seconds) || seconds > 60) { + return null; + } + if (hour < 0 || minute < 0 || seconds < 0) return null; + d.setHours(hour); + d.setMinutes(minute); + d.setSeconds(seconds); + return d; +} /***/ }), -/* 141 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9647,7 +9922,7 @@ module.exports = lowPriorityWarning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 142 */ +/* 147 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9668,7 +9943,7 @@ module.exports = ReactPropTypesSecret; /***/ }), -/* 143 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9713,7 +9988,7 @@ exports.default = { }; /***/ }), -/* 144 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9751,11 +10026,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(18); +var _reactDom = __webpack_require__(17); var _reactDom2 = _interopRequireDefault(_reactDom); -var _shallowEqual = __webpack_require__(54); +var _shallowEqual = __webpack_require__(58); var _shallowEqual2 = _interopRequireDefault(_shallowEqual); @@ -9767,7 +10042,7 @@ var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _ScaleIn = __webpack_require__(468); +var _ScaleIn = __webpack_require__(473); var _ScaleIn2 = _interopRequireDefault(_ScaleIn); @@ -9915,7 +10190,7 @@ exports.default = FocusRipple; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 145 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9931,9 +10206,9 @@ exports.default = FocusRipple; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); -var ReactErrorUtils = __webpack_require__(146); +var ReactErrorUtils = __webpack_require__(151); var invariant = __webpack_require__(10); var warning = __webpack_require__(11); @@ -10147,7 +10422,7 @@ module.exports = EventPluginUtils; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 146 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10218,6 +10493,7 @@ if (process.env.NODE_ENV !== 'production') { var evtType = 'react-' + name; fakeNode.addEventListener(evtType, boundFunc, false); var evt = document.createEvent('Event'); + // $FlowFixMe https://github.com/facebook/flow/issues/2336 evt.initEvent(evtType, false, false); fakeNode.dispatchEvent(evt); fakeNode.removeEventListener(evtType, boundFunc, false); @@ -10229,7 +10505,7 @@ module.exports = ReactErrorUtils; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 147 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10269,7 +10545,7 @@ function getEventTarget(nativeEvent) { module.exports = getEventTarget; /***/ }), -/* 148 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10285,7 +10561,7 @@ module.exports = getEventTarget; -var ExecutionEnvironment = __webpack_require__(19); +var ExecutionEnvironment = __webpack_require__(18); var useHasFeature; if (ExecutionEnvironment.canUseDOM) { @@ -10334,7 +10610,7 @@ function isEventSupported(eventNameSuffix, capture) { module.exports = isEventSupported; /***/ }), -/* 149 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10356,10 +10632,10 @@ module.exports = isEventSupported; */ var modifierKeyToProp = { - Alt: 'altKey', - Control: 'ctrlKey', - Meta: 'metaKey', - Shift: 'shiftKey' + 'Alt': 'altKey', + 'Control': 'ctrlKey', + 'Meta': 'metaKey', + 'Shift': 'shiftKey' }; // IE8 does not implement getModifierState so we simply map it to the only @@ -10382,7 +10658,7 @@ function getEventModifierState(nativeEvent) { module.exports = getEventModifierState; /***/ }), -/* 150 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10398,14 +10674,14 @@ module.exports = getEventModifierState; -var DOMLazyTree = __webpack_require__(68); -var Danger = __webpack_require__(402); -var ReactDOMComponentTree = __webpack_require__(16); +var DOMLazyTree = __webpack_require__(70); +var Danger = __webpack_require__(407); +var ReactDOMComponentTree = __webpack_require__(15); var ReactInstrumentation = __webpack_require__(25); -var createMicrosoftUnsafeLocalFunction = __webpack_require__(152); +var createMicrosoftUnsafeLocalFunction = __webpack_require__(157); var setInnerHTML = __webpack_require__(104); -var setTextContent = __webpack_require__(229); +var setTextContent = __webpack_require__(232); function getNodeAfter(parentNode, node) { // Special case for text components, which return [open, close] comments @@ -10533,6 +10809,7 @@ if (process.env.NODE_ENV !== 'production') { * Operations for updating with DOM children. */ var DOMChildrenOperations = { + dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup, replaceDelimitedText: replaceDelimitedText, @@ -10558,10 +10835,7 @@ var DOMChildrenOperations = { ReactInstrumentation.debugTool.onHostOperation({ instanceID: parentNodeDebugID, type: 'insert child', - payload: { - toIndex: update.toIndex, - content: update.content.toString() - } + payload: { toIndex: update.toIndex, content: update.content.toString() } }); } break; @@ -10608,13 +10882,14 @@ var DOMChildrenOperations = { } } } + }; module.exports = DOMChildrenOperations; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 151 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10639,7 +10914,7 @@ var DOMNamespaces = { module.exports = DOMNamespaces; /***/ }), -/* 152 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10676,7 +10951,7 @@ var createMicrosoftUnsafeLocalFunction = function (func) { module.exports = createMicrosoftUnsafeLocalFunction; /***/ }), -/* 153 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10692,25 +10967,22 @@ module.exports = createMicrosoftUnsafeLocalFunction; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); -var ReactPropTypesSecret = __webpack_require__(233); -var propTypesFactory = __webpack_require__(218); - -var React = __webpack_require__(65); -var PropTypes = propTypesFactory(React.isValidElement); +var React = __webpack_require__(55); +var ReactPropTypesSecret = __webpack_require__(236); var invariant = __webpack_require__(10); var warning = __webpack_require__(11); var hasReadOnlyValue = { - button: true, - checkbox: true, - image: true, - hidden: true, - radio: true, - reset: true, - submit: true + 'button': true, + 'checkbox': true, + 'image': true, + 'hidden': true, + 'radio': true, + 'reset': true, + 'submit': true }; function _assertSingleLink(inputProps) { @@ -10739,7 +11011,7 @@ var propTypes = { } return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); }, - onChange: PropTypes.func + onChange: React.PropTypes.func }; var loggedTypeFailures = {}; @@ -10820,7 +11092,7 @@ module.exports = LinkedValueUtils; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 154 */ +/* 159 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10837,13 +11109,14 @@ module.exports = LinkedValueUtils; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); var invariant = __webpack_require__(10); var injected = false; var ReactComponentEnvironment = { + /** * Optionally injectable hook for swapping out mount images in the middle of * the tree. @@ -10864,13 +11137,14 @@ var ReactComponentEnvironment = { injected = true; } } + }; module.exports = ReactComponentEnvironment; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 155 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10917,7 +11191,7 @@ function shouldUpdateReactComponent(prevElement, nextElement) { module.exports = shouldUpdateReactComponent; /***/ }), -/* 156 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10981,7 +11255,7 @@ var KeyEscapeUtils = { module.exports = KeyEscapeUtils; /***/ }), -/* 157 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10997,12 +11271,12 @@ module.exports = KeyEscapeUtils; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); -var ReactCurrentOwner = __webpack_require__(30); -var ReactInstanceMap = __webpack_require__(80); +var ReactCurrentOwner = __webpack_require__(29); +var ReactInstanceMap = __webpack_require__(81); var ReactInstrumentation = __webpack_require__(25); -var ReactUpdates = __webpack_require__(32); +var ReactUpdates = __webpack_require__(30); var invariant = __webpack_require__(10); var warning = __webpack_require__(11); @@ -11038,7 +11312,7 @@ function getInternalInstanceReadyForUpdate(publicInstance, callerName) { } if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + "within `render` or another component's constructor). Render methods " + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0; + process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0; } return internalInstance; @@ -11049,6 +11323,7 @@ function getInternalInstanceReadyForUpdate(publicInstance, callerName) { * reconciliation step. */ var ReactUpdateQueue = { + /** * Checks whether or not this composite component is mounted. * @param {ReactClass} publicInstance The instance we want to test. @@ -11154,7 +11429,7 @@ var ReactUpdateQueue = { * @param {object} completeState Next state. * @internal */ - enqueueReplaceState: function (publicInstance, completeState, callback) { + enqueueReplaceState: function (publicInstance, completeState) { var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); if (!internalInstance) { @@ -11164,16 +11439,6 @@ var ReactUpdateQueue = { internalInstance._pendingStateQueue = [completeState]; internalInstance._pendingReplaceState = true; - // Future-proof 15.5 - if (callback !== undefined && callback !== null) { - ReactUpdateQueue.validateCallback(callback, 'replaceState'); - if (internalInstance._pendingCallbacks) { - internalInstance._pendingCallbacks.push(callback); - } else { - internalInstance._pendingCallbacks = [callback]; - } - } - enqueueUpdate(internalInstance); }, @@ -11215,13 +11480,14 @@ var ReactUpdateQueue = { validateCallback: function (callback, callerName) { !(!callback || typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0; } + }; module.exports = ReactUpdateQueue; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 158 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11237,9 +11503,9 @@ module.exports = ReactUpdateQueue; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(14); -var emptyFunction = __webpack_require__(23); +var emptyFunction = __webpack_require__(21); var warning = __webpack_require__(11); var validateDOMNesting = emptyFunction; @@ -11348,6 +11614,7 @@ if (process.env.NODE_ENV !== 'production') { // but case 'option': return tag === '#text'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption // No special behavior since these rules fall back to "in body" mode for @@ -11356,20 +11623,25 @@ if (process.env.NODE_ENV !== 'production') { // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr case 'tr': return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody case 'tbody': case 'thead': case 'tfoot': return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup case 'colgroup': return tag === 'col' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable case 'table': return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead case 'head': return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template'; + // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element case 'html': return tag === 'head' || tag === 'body'; @@ -11445,11 +11717,16 @@ if (process.env.NODE_ENV !== 'production') { case 'section': case 'summary': case 'ul': + case 'pre': case 'listing': + case 'table': + case 'hr': + case 'xmp': + case 'h1': case 'h2': case 'h3': @@ -11565,7 +11842,7 @@ if (process.env.NODE_ENV !== 'production') { tagDisplayName = 'Text nodes'; } else { tagDisplayName = 'Whitespace text nodes'; - whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.'; + whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.'; } } else { tagDisplayName = '<' + childTag + '>'; @@ -11598,7 +11875,7 @@ module.exports = validateDOMNesting; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 159 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11653,17 +11930,17 @@ function getEventCharCode(nativeEvent) { module.exports = getEventCharCode; /***/ }), -/* 160 */ +/* 165 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(250); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(484); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(485); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(486); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(256); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(255); +/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(253); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(488); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(489); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(490); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(259); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(258); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; }); @@ -11683,20 +11960,20 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); function isCrushed() {} if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') { - Object(__WEBPACK_IMPORTED_MODULE_5__utils_warning__["a" /* default */])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.'); + __WEBPACK_IMPORTED_MODULE_5__utils_warning__["a" /* default */]('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.'); } /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(0))) /***/ }), -/* 161 */ +/* 166 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(69); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(252); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(71); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(255); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(59); @@ -11746,10 +12023,10 @@ var objectCtorString = funcToString.call(Object); * // => true */ function isPlainObject(value) { - if (!Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) != objectTag) { + if (!__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */](value) || __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) != objectTag) { return false; } - var proto = Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(value); + var proto = __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */](value); if (proto === null) { return true; } @@ -11762,178 +12039,11 @@ function isPlainObject(value) { /***/ }), -/* 162 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionTypes", function() { return actionTypes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actions", function() { return actions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmitErrors", function() { return clearSubmitErrors; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actions__ = __webpack_require__(260); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__actionTypes__ = __webpack_require__(163); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultShouldAsyncValidate__ = __webpack_require__(261); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultShouldAsyncValidate", function() { return __WEBPACK_IMPORTED_MODULE_2__defaultShouldAsyncValidate__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultShouldValidate__ = __webpack_require__(262); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultShouldValidate", function() { return __WEBPACK_IMPORTED_MODULE_3__defaultShouldValidate__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Form__ = __webpack_require__(500); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return __WEBPACK_IMPORTED_MODULE_4__Form__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__FormSection__ = __webpack_require__(501); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FormSection", function() { return __WEBPACK_IMPORTED_MODULE_5__FormSection__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__SubmissionError__ = __webpack_require__(263); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SubmissionError", function() { return __WEBPACK_IMPORTED_MODULE_6__SubmissionError__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__propTypes__ = __webpack_require__(503); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fieldInputPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["b"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fieldMetaPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["c"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fieldPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["d"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["e"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Field__ = __webpack_require__(504); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Field", function() { return __WEBPACK_IMPORTED_MODULE_8__Field__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Fields__ = __webpack_require__(574); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Fields", function() { return __WEBPACK_IMPORTED_MODULE_9__Fields__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__FieldArray__ = __webpack_require__(577); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FieldArray", function() { return __WEBPACK_IMPORTED_MODULE_10__FieldArray__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__formValueSelector__ = __webpack_require__(595); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formValueSelector", function() { return __WEBPACK_IMPORTED_MODULE_11__formValueSelector__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__formValues__ = __webpack_require__(597); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formValues", function() { return __WEBPACK_IMPORTED_MODULE_12__formValues__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__getFormNames__ = __webpack_require__(599); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormNames", function() { return __WEBPACK_IMPORTED_MODULE_13__getFormNames__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__getFormValues__ = __webpack_require__(601); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormValues", function() { return __WEBPACK_IMPORTED_MODULE_14__getFormValues__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__getFormInitialValues__ = __webpack_require__(603); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormInitialValues", function() { return __WEBPACK_IMPORTED_MODULE_15__getFormInitialValues__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__getFormSyncErrors__ = __webpack_require__(605); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncErrors", function() { return __WEBPACK_IMPORTED_MODULE_16__getFormSyncErrors__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__getFormMeta__ = __webpack_require__(607); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormMeta", function() { return __WEBPACK_IMPORTED_MODULE_17__getFormMeta__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__getFormAsyncErrors__ = __webpack_require__(609); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormAsyncErrors", function() { return __WEBPACK_IMPORTED_MODULE_18__getFormAsyncErrors__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__getFormSyncWarnings__ = __webpack_require__(611); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncWarnings", function() { return __WEBPACK_IMPORTED_MODULE_19__getFormSyncWarnings__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__getFormSubmitErrors__ = __webpack_require__(613); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSubmitErrors", function() { return __WEBPACK_IMPORTED_MODULE_20__getFormSubmitErrors__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__isDirty__ = __webpack_require__(615); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isDirty", function() { return __WEBPACK_IMPORTED_MODULE_21__isDirty__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__isInvalid__ = __webpack_require__(617); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isInvalid", function() { return __WEBPACK_IMPORTED_MODULE_22__isInvalid__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__isPristine__ = __webpack_require__(620); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isPristine", function() { return __WEBPACK_IMPORTED_MODULE_23__isPristine__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__isValid__ = __webpack_require__(621); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isValid", function() { return __WEBPACK_IMPORTED_MODULE_24__isValid__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__isSubmitting__ = __webpack_require__(622); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isSubmitting", function() { return __WEBPACK_IMPORTED_MODULE_25__isSubmitting__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__hasSubmitSucceeded__ = __webpack_require__(624); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitSucceeded", function() { return __WEBPACK_IMPORTED_MODULE_26__hasSubmitSucceeded__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__hasSubmitFailed__ = __webpack_require__(626); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitFailed", function() { return __WEBPACK_IMPORTED_MODULE_27__hasSubmitFailed__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__reduxForm__ = __webpack_require__(628); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reduxForm", function() { return __WEBPACK_IMPORTED_MODULE_28__reduxForm__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__reducer__ = __webpack_require__(658); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return __WEBPACK_IMPORTED_MODULE_29__reducer__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__values__ = __webpack_require__(661); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return __WEBPACK_IMPORTED_MODULE_30__values__["a"]; }); - - - - - - - -// alias for propTypes - - - - - - - - - - - - - - - - - - - - - - - - -var actionTypes = __WEBPACK_IMPORTED_MODULE_1__actionTypes__; -var actions = __WEBPACK_IMPORTED_MODULE_0__actions__; -var arrayInsert = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayInsert"], - arrayMove = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayMove"], - arrayPop = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayPop"], - arrayPush = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayPush"], - arrayRemove = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayRemove"], - arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayRemoveAll"], - arrayShift = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayShift"], - arraySplice = __WEBPACK_IMPORTED_MODULE_0__actions__["arraySplice"], - arraySwap = __WEBPACK_IMPORTED_MODULE_0__actions__["arraySwap"], - arrayUnshift = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayUnshift"], - autofill = __WEBPACK_IMPORTED_MODULE_0__actions__["autofill"], - blur = __WEBPACK_IMPORTED_MODULE_0__actions__["blur"], - change = __WEBPACK_IMPORTED_MODULE_0__actions__["change"], - clearSubmitErrors = __WEBPACK_IMPORTED_MODULE_0__actions__["clearSubmitErrors"], - destroy = __WEBPACK_IMPORTED_MODULE_0__actions__["destroy"], - focus = __WEBPACK_IMPORTED_MODULE_0__actions__["focus"], - initialize = __WEBPACK_IMPORTED_MODULE_0__actions__["initialize"], - registerField = __WEBPACK_IMPORTED_MODULE_0__actions__["registerField"], - reset = __WEBPACK_IMPORTED_MODULE_0__actions__["reset"], - setSubmitFailed = __WEBPACK_IMPORTED_MODULE_0__actions__["setSubmitFailed"], - setSubmitSucceeded = __WEBPACK_IMPORTED_MODULE_0__actions__["setSubmitSucceeded"], - startAsyncValidation = __WEBPACK_IMPORTED_MODULE_0__actions__["startAsyncValidation"], - startSubmit = __WEBPACK_IMPORTED_MODULE_0__actions__["startSubmit"], - stopAsyncValidation = __WEBPACK_IMPORTED_MODULE_0__actions__["stopAsyncValidation"], - stopSubmit = __WEBPACK_IMPORTED_MODULE_0__actions__["stopSubmit"], - submit = __WEBPACK_IMPORTED_MODULE_0__actions__["submit"], - touch = __WEBPACK_IMPORTED_MODULE_0__actions__["touch"], - unregisterField = __WEBPACK_IMPORTED_MODULE_0__actions__["unregisterField"], - untouch = __WEBPACK_IMPORTED_MODULE_0__actions__["untouch"]; - - -/***/ }), -/* 163 */ +/* 167 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefix", function() { return prefix; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_INSERT", function() { return ARRAY_INSERT; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_MOVE", function() { return ARRAY_MOVE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_POP", function() { return ARRAY_POP; }); @@ -11948,7 +12058,6 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BLUR", function() { return BLUR; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CHANGE", function() { return CHANGE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_SUBMIT", function() { return CLEAR_SUBMIT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_SUBMIT_ERRORS", function() { return CLEAR_SUBMIT_ERRORS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_ASYNC_ERROR", function() { return CLEAR_ASYNC_ERROR; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DESTROY", function() { return DESTROY; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOCUS", function() { return FOCUS; }); @@ -11967,52 +12076,49 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNTOUCH", function() { return UNTOUCH; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_SYNC_ERRORS", function() { return UPDATE_SYNC_ERRORS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_SYNC_WARNINGS", function() { return UPDATE_SYNC_WARNINGS; }); -var prefix = '@@redux-form/'; - -var ARRAY_INSERT = prefix + 'ARRAY_INSERT'; -var ARRAY_MOVE = prefix + 'ARRAY_MOVE'; -var ARRAY_POP = prefix + 'ARRAY_POP'; -var ARRAY_PUSH = prefix + 'ARRAY_PUSH'; -var ARRAY_REMOVE = prefix + 'ARRAY_REMOVE'; -var ARRAY_REMOVE_ALL = prefix + 'ARRAY_REMOVE_ALL'; -var ARRAY_SHIFT = prefix + 'ARRAY_SHIFT'; -var ARRAY_SPLICE = prefix + 'ARRAY_SPLICE'; -var ARRAY_UNSHIFT = prefix + 'ARRAY_UNSHIFT'; -var ARRAY_SWAP = prefix + 'ARRAY_SWAP'; -var AUTOFILL = prefix + 'AUTOFILL'; -var BLUR = prefix + 'BLUR'; -var CHANGE = prefix + 'CHANGE'; -var CLEAR_SUBMIT = prefix + 'CLEAR_SUBMIT'; -var CLEAR_SUBMIT_ERRORS = prefix + 'CLEAR_SUBMIT_ERRORS'; -var CLEAR_ASYNC_ERROR = prefix + 'CLEAR_ASYNC_ERROR'; -var DESTROY = prefix + 'DESTROY'; -var FOCUS = prefix + 'FOCUS'; -var INITIALIZE = prefix + 'INITIALIZE'; -var REGISTER_FIELD = prefix + 'REGISTER_FIELD'; -var RESET = prefix + 'RESET'; -var SET_SUBMIT_FAILED = prefix + 'SET_SUBMIT_FAILED'; -var SET_SUBMIT_SUCCEEDED = prefix + 'SET_SUBMIT_SUCCEEDED'; -var START_ASYNC_VALIDATION = prefix + 'START_ASYNC_VALIDATION'; -var START_SUBMIT = prefix + 'START_SUBMIT'; -var STOP_ASYNC_VALIDATION = prefix + 'STOP_ASYNC_VALIDATION'; -var STOP_SUBMIT = prefix + 'STOP_SUBMIT'; -var SUBMIT = prefix + 'SUBMIT'; -var TOUCH = prefix + 'TOUCH'; -var UNREGISTER_FIELD = prefix + 'UNREGISTER_FIELD'; -var UNTOUCH = prefix + 'UNTOUCH'; -var UPDATE_SYNC_ERRORS = prefix + 'UPDATE_SYNC_ERRORS'; -var UPDATE_SYNC_WARNINGS = prefix + 'UPDATE_SYNC_WARNINGS'; +var ARRAY_INSERT = '@@redux-form/ARRAY_INSERT'; +var ARRAY_MOVE = '@@redux-form/ARRAY_MOVE'; +var ARRAY_POP = '@@redux-form/ARRAY_POP'; +var ARRAY_PUSH = '@@redux-form/ARRAY_PUSH'; +var ARRAY_REMOVE = '@@redux-form/ARRAY_REMOVE'; +var ARRAY_REMOVE_ALL = '@@redux-form/ARRAY_REMOVE_ALL'; +var ARRAY_SHIFT = '@@redux-form/ARRAY_SHIFT'; +var ARRAY_SPLICE = '@@redux-form/ARRAY_SPLICE'; +var ARRAY_UNSHIFT = '@@redux-form/ARRAY_UNSHIFT'; +var ARRAY_SWAP = '@@redux-form/ARRAY_SWAP'; +var AUTOFILL = '@@redux-form/AUTOFILL'; +var BLUR = '@@redux-form/BLUR'; +var CHANGE = '@@redux-form/CHANGE'; +var CLEAR_SUBMIT = '@@redux-form/CLEAR_SUBMIT'; +var CLEAR_ASYNC_ERROR = '@redux-form/CLEAR_ASYNC_ERROR'; +var DESTROY = '@@redux-form/DESTROY'; +var FOCUS = '@@redux-form/FOCUS'; +var INITIALIZE = '@@redux-form/INITIALIZE'; +var REGISTER_FIELD = '@@redux-form/REGISTER_FIELD'; +var RESET = '@@redux-form/RESET'; +var SET_SUBMIT_FAILED = '@@redux-form/SET_SUBMIT_FAILED'; +var SET_SUBMIT_SUCCEEDED = '@@redux-form/SET_SUBMIT_SUCCEEDED'; +var START_ASYNC_VALIDATION = '@@redux-form/START_ASYNC_VALIDATION'; +var START_SUBMIT = '@@redux-form/START_SUBMIT'; +var STOP_ASYNC_VALIDATION = '@@redux-form/STOP_ASYNC_VALIDATION'; +var STOP_SUBMIT = '@@redux-form/STOP_SUBMIT'; +var SUBMIT = '@@redux-form/SUBMIT'; +var TOUCH = '@@redux-form/TOUCH'; +var UNREGISTER_FIELD = '@@redux-form/UNREGISTER_FIELD'; +var UNTOUCH = '@@redux-form/UNTOUCH'; +var UPDATE_SYNC_ERRORS = '@@redux-form/UPDATE_SYNC_ERRORS'; +var UPDATE_SYNC_WARNINGS = '@@redux-form/UPDATE_SYNC_WARNINGS'; /***/ }), -/* 164 */ +/* 168 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__ = __webpack_require__(514); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__ = __webpack_require__(530); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__ = __webpack_require__(532); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__ = __webpack_require__(533); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__ = __webpack_require__(534); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__ = __webpack_require__(508); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__ = __webpack_require__(524); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__ = __webpack_require__(526); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__ = __webpack_require__(527); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__ = __webpack_require__(528); @@ -12048,12 +12154,12 @@ MapCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__["a" /* de /***/ }), -/* 165 */ +/* 169 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(69); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(71); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(47); @@ -12081,12 +12187,12 @@ var asyncTag = '[object AsyncFunction]', * // => false */ function isFunction(value) { - if (!Object(__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" /* default */])(value)) { + if (!__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" /* default */](value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value); + var tag = __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } @@ -12094,69 +12200,32 @@ function isFunction(value) { /***/ }), -/* 166 */ +/* 170 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(57); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(34); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(31); /* Built-in method references that are verified to be native. */ -var Map = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Map'); +var Map = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Map'); /* harmony default export */ __webpack_exports__["a"] = (Map); /***/ }), -/* 167 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__ = __webpack_require__(538); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(55); - - - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && !Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(other))) { - return value !== value && other !== other; - } - return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__["a" /* default */])(value, other, bitmask, customizer, baseIsEqual, stack); -} - -/* harmony default export */ __webpack_exports__["a"] = (baseIsEqual); - - -/***/ }), -/* 168 */ +/* 171 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(113); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stackClear_js__ = __webpack_require__(539); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__ = __webpack_require__(540); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stackGet_js__ = __webpack_require__(541); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stackHas_js__ = __webpack_require__(542); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stackSet_js__ = __webpack_require__(543); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(114); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stackClear_js__ = __webpack_require__(533); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__ = __webpack_require__(534); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stackGet_js__ = __webpack_require__(535); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stackHas_js__ = __webpack_require__(536); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stackSet_js__ = __webpack_require__(537); @@ -12187,59 +12256,67 @@ Stack.prototype.set = __WEBPACK_IMPORTED_MODULE_5__stackSet_js__["a" /* default /***/ }), -/* 169 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 172 */ +/***/ (function(module, exports) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(275); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__ = __webpack_require__(565); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(116); +module.exports = function(originalModule) { + if(!originalModule.webpackPolyfill) { + var module = Object.create(originalModule); + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + Object.defineProperty(module, "exports", { + enumerable: true, + }); + module.webpackPolyfill = 1; + } + return module; +}; +/***/ }), +/* 173 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/** Used for built-in method references. */ +var objectProto = Object.prototype; /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) + * Checks if `value` is likely a prototype object. * - * _.keys('hi'); - * // => ['0', '1'] + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ -function keys(object) { - return Object(__WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */])(object) ? Object(__WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */])(object) : Object(__WEBPACK_IMPORTED_MODULE_1__baseKeys_js__["a" /* default */])(object); +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; } -/* harmony default export */ __webpack_exports__["a"] = (keys); +/* harmony default export */ __webpack_exports__["a"] = (isPrototype); /***/ }), -/* 170 */ +/* 174 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__ = __webpack_require__(560); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__ = __webpack_require__(545); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59); @@ -12270,8 +12347,8 @@ var propertyIsEnumerable = objectProto.propertyIsEnumerable; * _.isArguments([1, 2, 3]); * // => false */ -var isArguments = Object(__WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */])(function() { return arguments; }()) ? __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */] : function(value) { - return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && hasOwnProperty.call(value, 'callee') && +var isArguments = __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */](function() { return arguments; }()) ? __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */] : function(value) { + return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; @@ -12279,12 +12356,54 @@ var isArguments = Object(__WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" / /***/ }), -/* 171 */ +/* 175 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/* harmony default export */ __webpack_exports__["a"] = (isLength); + + +/***/ }), +/* 176 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(34); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__ = __webpack_require__(561); +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__ = __webpack_require__(547); @@ -12327,37 +12446,44 @@ var isBuffer = nativeIsBuffer || __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__["a" /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(172)(module))) /***/ }), -/* 172 */ -/***/ (function(module, exports) { +/* 177 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -module.exports = function(originalModule) { - if(!originalModule.webpackPolyfill) { - var module = Object.create(originalModule); - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - Object.defineProperty(module, "exports", { - enumerable: true, - }); - module.webpackPolyfill = 1; - } - return module; -}; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__ = __webpack_require__(548); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(549); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(550); + + + + +/* Node.js helper references. */ +var nodeIsTypedArray = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */](nodeIsTypedArray) : __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isTypedArray); /***/ }), -/* 173 */ +/* 178 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -12386,116 +12512,124 @@ function isIndex(value, length) { /***/ }), -/* 174 */ +/* 179 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__ = __webpack_require__(562); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(563); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(564); - - - - -/* Node.js helper references. */ -var nodeIsTypedArray = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isTypedArray; - /** - * Checks if `value` is classified as a typed array. + * This method returns the first argument it receives. * * @static + * @since 0.1.0 * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. * @example * - * _.isTypedArray(new Uint8Array); - * // => true + * var object = { 'a': 1 }; * - * _.isTypedArray([]); - * // => false + * console.log(_.identity(object) === object); + * // => true */ -var isTypedArray = nodeIsTypedArray ? Object(__WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */])(nodeIsTypedArray) : __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__["a" /* default */]; +function identity(value) { + return value; +} -/* harmony default export */ __webpack_exports__["a"] = (isTypedArray); +/* harmony default export */ __webpack_exports__["a"] = (identity); /***/ }), -/* 175 */ +/* 180 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(274); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__ = __webpack_require__(567); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(118); + + + /** - * Checks if `value` is a valid array-like length. + * Creates an array of the own enumerable property names of `object`. * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. * * @static + * @since 0.1.0 * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. * @example * - * _.isLength(3); - * // => true + * function Foo() { + * this.a = 1; + * this.b = 2; + * } * - * _.isLength(Number.MIN_VALUE); - * // => false + * Foo.prototype.c = 3; * - * _.isLength(Infinity); - * // => false + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) * - * _.isLength('3'); - * // => false + * _.keys('hi'); + * // => ['0', '1'] */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +function keys(object) { + return __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */](object) ? __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */](object) : __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__["a" /* default */](object); } -/* harmony default export */ __webpack_exports__["a"] = (isLength); +/* harmony default export */ __webpack_exports__["a"] = (keys); /***/ }), -/* 176 */ +/* 181 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** Used for built-in method references. */ -var objectProto = Object.prototype; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__ = __webpack_require__(572); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59); + + /** - * Checks if `value` is likely a prototype object. + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && !__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](other))) { + return value !== value && other !== other; + } + return __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__["a" /* default */](value, other, bitmask, customizer, baseIsEqual, stack); } -/* harmony default export */ __webpack_exports__["a"] = (isPrototype); +/* harmony default export */ __webpack_exports__["a"] = (baseIsEqual); /***/ }), -/* 177 */ +/* 182 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(35); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(111); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(112); @@ -12512,12 +12646,12 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */])(value)) { + if (__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */](value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || Object(__WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" /* default */])(value)) { + value == null || __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" /* default */](value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || @@ -12528,46 +12662,29 @@ function isKey(value, object) { /***/ }), -/* 178 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 183 */ +/***/ (function(module, exports) { -"use strict"; -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} +module.exports = isPromise; -/* harmony default export */ __webpack_exports__["a"] = (identity); +function isPromise(obj) { + return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; +} /***/ }), -/* 179 */ +/* 184 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hasError__ = __webpack_require__(619); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hasError__ = __webpack_require__(615); var createIsValid = function createIsValid(structure) { var getIn = structure.getIn, keys = structure.keys; - var hasError = Object(__WEBPACK_IMPORTED_MODULE_0__hasError__["a" /* default */])(structure); + var hasError = __WEBPACK_IMPORTED_MODULE_0__hasError__["a" /* default */](structure); return function (form) { var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { return getIn(state, 'form'); @@ -12609,18 +12726,34 @@ var createIsValid = function createIsValid(structure) { /* harmony default export */ __webpack_exports__["a"] = (createIsValid); /***/ }), -/* 180 */ -/***/ (function(module, exports) { +/* 185 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -module.exports = isPromise; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(286); -function isPromise(obj) { - return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; -} +var customizer = function customizer(objectValue, otherValue, indexOrkey, object, other, stack) { + // https://lodash.com/docs/4.17.4#isEqualWith + if (stack) { + // Shallow compares + // For 1st level, stack === undefined. + // -> Do nothing (and implicitly return undefined so that it goes to compare 2nd level) + // For 2nd level and up, stack !== undefined. + // -> Compare by === operator + return objectValue === otherValue; + } +}; + +var shallowCompare = function shallowCompare(instance, nextProps, nextState) { + return !__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](instance.props, nextProps, customizer) || !__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](instance.state, nextState, customizer); +}; + +/* harmony default export */ __webpack_exports__["a"] = (shallowCompare); + /***/ }), -/* 181 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12638,7 +12771,7 @@ var _objectWithoutProperties2 = __webpack_require__(9); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var _toArray2 = __webpack_require__(246); +var _toArray2 = __webpack_require__(249); var _toArray3 = _interopRequireDefault(_toArray2); @@ -12670,31 +12803,31 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(18); +var _reactDom = __webpack_require__(17); var _reactDom2 = _interopRequireDefault(_reactDom); -var _shallowEqual = __webpack_require__(54); +var _shallowEqual = __webpack_require__(58); var _shallowEqual2 = _interopRequireDefault(_shallowEqual); -var _ClickAwayListener = __webpack_require__(684); +var _ClickAwayListener = __webpack_require__(294); var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener); -var _keycode = __webpack_require__(31); +var _keycode = __webpack_require__(27); var _keycode2 = _interopRequireDefault(_keycode); -var _propTypes = __webpack_require__(44); +var _propTypes = __webpack_require__(46); var _propTypes2 = _interopRequireDefault(_propTypes); -var _List = __webpack_require__(291); +var _List = __webpack_require__(293); var _List2 = _interopRequireDefault(_List); -var _menuUtils = __webpack_require__(685); +var _menuUtils = __webpack_require__(664); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -13307,7 +13440,7 @@ exports.default = Menu; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 182 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13318,76 +13451,16 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _RaisedButton = __webpack_require__(686); - -var _RaisedButton2 = _interopRequireDefault(_RaisedButton); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _RaisedButton2.default; - -/***/ }), -/* 183 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Toggle = exports.TextField = exports.Slider = exports.SelectField = exports.RadioButtonGroup = exports.TimePicker = exports.DatePicker = exports.Checkbox = exports.AutoComplete = undefined; - -var _AutoComplete = __webpack_require__(687); - -var _AutoComplete2 = _interopRequireDefault(_AutoComplete); - -var _Checkbox = __webpack_require__(698); +var _Checkbox = __webpack_require__(674); var _Checkbox2 = _interopRequireDefault(_Checkbox); -var _DatePicker = __webpack_require__(703); - -var _DatePicker2 = _interopRequireDefault(_DatePicker); - -var _RadioButtonGroup = __webpack_require__(723); - -var _RadioButtonGroup2 = _interopRequireDefault(_RadioButtonGroup); - -var _SelectField = __webpack_require__(728); - -var _SelectField2 = _interopRequireDefault(_SelectField); - -var _Slider = __webpack_require__(736); - -var _Slider2 = _interopRequireDefault(_Slider); - -var _TextField = __webpack_require__(741); - -var _TextField2 = _interopRequireDefault(_TextField); - -var _TimePicker = __webpack_require__(742); - -var _TimePicker2 = _interopRequireDefault(_TimePicker); - -var _Toggle = __webpack_require__(753); - -var _Toggle2 = _interopRequireDefault(_Toggle); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.AutoComplete = _AutoComplete2.default; -exports.Checkbox = _Checkbox2.default; -exports.DatePicker = _DatePicker2.default; -exports.TimePicker = _TimePicker2.default; -exports.RadioButtonGroup = _RadioButtonGroup2.default; -exports.SelectField = _SelectField2.default; -exports.Slider = _Slider2.default; -exports.TextField = _TextField2.default; -exports.Toggle = _Toggle2.default; +exports.default = _Checkbox2.default; /***/ }), -/* 184 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13433,11 +13506,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactEventListener = __webpack_require__(58); +var _reactEventListener = __webpack_require__(61); var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -var _keycode = __webpack_require__(31); +var _keycode = __webpack_require__(27); var _keycode2 = _interopRequireDefault(_keycode); @@ -13445,15 +13518,15 @@ var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _FocusRipple = __webpack_require__(144); +var _FocusRipple = __webpack_require__(149); var _FocusRipple2 = _interopRequireDefault(_FocusRipple); -var _TouchRipple = __webpack_require__(245); +var _TouchRipple = __webpack_require__(248); var _TouchRipple2 = _interopRequireDefault(_TouchRipple); -var _Paper = __webpack_require__(39); +var _Paper = __webpack_require__(38); var _Paper2 = _interopRequireDefault(_Paper); @@ -13845,7 +13918,27 @@ exports.default = EnhancedSwitch; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 185 */ +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _FlatButton = __webpack_require__(683); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _FlatButton2.default; + +/***/ }), +/* 190 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13895,7 +13988,7 @@ var _reactAddonsTransitionGroup = __webpack_require__(108); var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); -var _SlideInChild = __webpack_require__(718); +var _SlideInChild = __webpack_require__(692); var _SlideInChild2 = _interopRequireDefault(_SlideInChild); @@ -13986,7 +14079,27 @@ exports.default = SlideIn; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 186 */ +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Dialog = __webpack_require__(694); + +var _Dialog2 = _interopRequireDefault(_Dialog); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Dialog2.default; + +/***/ }), +/* 192 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14011,7 +14124,7 @@ exports.default = { }; /***/ }), -/* 187 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14029,7 +14142,7 @@ exports.default = function (str) { module.exports = exports["default"]; /***/ }), -/* 188 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14048,7 +14161,7 @@ exports.default = function (value) { module.exports = exports['default']; /***/ }), -/* 189 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14057,527 +14170,556 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.email = email; -exports.required = required; -exports.simpleText = simpleText; -exports.number = number; -exports.minValue = minValue; -exports.maxValue = maxValue; -exports.fullName = fullName; -function email(input) { - var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; - return re.test(input) ? undefined : 'Please enter a valid email'; -} +var countries = exports.countries = [{ "text": "USA", "value": "USA" }, { "text": "CANADA", "value": "CANADA" }, { "text": "JAPAN", "value": "JAPAN" }, { "text": "UK", "value": "GB" }, { "text": "UK (N. IRELAND)", "value": "NB" }, { "text": "AUSTRIA", "value": "AT" }, { "text": "BELARUS", "value": "BY" }, { "text": "BELGIUM", "value": "BE" }, { "text": "BULGARIA", "value": "BG" }, { "text": "CROATIA", "value": "HR" }, { "text": "CZECH REPUBLIC", "value": "CZ" }, { "text": "DENMARK", "value": "DK" }, { "text": "ESTONIA", "value": "EE" }, { "text": "FINLAND", "value": "FI" }, { "text": "FRANCE", "value": "FR" }, { "text": "GERMANY", "value": "DE" }, { "text": "GREECE", "value": "GR" }, { "text": "HUNGARY", "value": "HU" }, { "text": "ICELAND", "value": "IS" }, { "text": "IRELAND", "value": "IE" }, { "text": "ITALY", "value": "IT" }, { "text": "LATVIA", "value": "LV" }, { "text": "LITHUANIA", "value": "LT" }, { "text": "LUXEMBOURG", "value": "LU" }, { "text": "MONACO", "value": "MC" }, { "text": "NETHERLANDS", "value": "NL" }, { "text": "NORWAY", "value": "NO" }, { "text": "POLAND", "value": "PL" }, { "text": "PORTUGAL", "value": "PT" }, { "text": "ROMANIA", "value": "RO" }, { "text": "RUSSIA", "value": "RU" }, { "text": "SLOVAKIA", "value": "SK" }, { "text": "SLOVENIA", "value": "SI" }, { "text": "SPAIN", "value": "ES" }, { "text": "SWEDEN", "value": "SE" }, { "text": "SWITZERLAND", "value": "CH" }, { "text": "TURKEY", "value": "TR" }]; +var sizes = exports.sizes = ["Small", "Medium", "Large", "XLarge"]; +var sizesPants = exports.sizesPants = [28, 30, 32, 34, 36, 38, 40]; +var shoeSizes = exports.shoeSizes = [4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5]; +var skateSizes = exports.skateSizes = [7.5, 7.7, 7.75, 7.8, 7.875, 8, 8.06, 8.125, 8.13, 8.18, 8.2, 8.25, 8.375, 8.38, 8.5, 8.6, 8.625, 8.75, 8.8, 9, 9.25, 9.5, 10, 10]; +var usaRegions = exports.usaRegions = [{ "text": "AL", "value": "AL" }, { "text": "AK", "value": "AK" }, { "text": "AS", "value": "AS" }, { "text": "AZ", "value": "AZ" }, { "text": "AR", "value": "AR" }, { "text": "CA", "value": "CA" }, { "text": "CO", "value": "CO" }, { "text": "CT", "value": "CT" }, { "text": "DE", "value": "DE" }, { "text": "DC", "value": "DC" }, { "text": "FM", "value": "FM" }, { "text": "FL", "value": "FL" }, { "text": "GA", "value": "GA" }, { "text": "GU", "value": "GU" }, { "text": "HI", "value": "HI" }, { "text": "ID", "value": "ID" }, { "text": "IL", "value": "IL" }, { "text": "IN", "value": "IN" }, { "text": "IA", "value": "IA" }, { "text": "KS", "value": "KS" }, { "text": "KY", "value": "KY" }, { "text": "LA", "value": "LA" }, { "text": "ME", "value": "ME" }, { "text": "MH", "value": "MH" }, { "text": "MD", "value": "MD" }, { "text": "MA", "value": "MA" }, { "text": "MI", "value": "MI" }, { "text": "MN", "value": "MN" }, { "text": "MS", "value": "MS" }, { "text": "MO", "value": "MO" }, { "text": "MT", "value": "MT" }, { "text": "NE", "value": "NE" }, { "text": "NV", "value": "NV" }, { "text": "NH", "value": "NH" }, { "text": "NJ", "value": "NJ" }, { "text": "NM", "value": "NM" }, { "text": "NY", "value": "NY" }, { "text": "NC", "value": "NC" }, { "text": "ND", "value": "ND" }, { "text": "MP", "value": "MP" }, { "text": "OH", "value": "OH" }, { "text": "OK", "value": "OK" }, { "text": "OR", "value": "OR" }, { "text": "PW", "value": "PW" }, { "text": "PA", "value": "PA" }, { "text": "PR", "value": "PR" }, { "text": "RI", "value": "RI" }, { "text": "SC", "value": "SC" }, { "text": "SD", "value": "SD" }, { "text": "TN", "value": "TN" }, { "text": "TX", "value": "TX" }, { "text": "UT", "value": "UT" }, { "text": "VT", "value": "VT" }, { "text": "VI", "value": "VI" }, { "text": "VA", "value": "VA" }, { "text": "WA", "value": "WA" }, { "text": "WV", "value": "WV" }, { "text": "WI", "value": "WI" }, { "text": "WY", "value": "WY" }]; +var canadaRegions = exports.canadaRegions = [{ "text": "AB", "value": "AB" }, { "text": "BC", "value": "BC" }, { "text": "MB", "value": "MB" }, { "text": "NB", "value": "NB" }, { "text": "NL", "value": "NL" }, { "text": "NT", "value": "NT" }, { "text": "NS", "value": "NS" }, { "text": "NU", "value": "NU" }, { "text": "ON", "value": "ON" }, { "text": "PE", "value": "PE" }, { "text": "QC", "value": "QC" }, { "text": "SK", "value": "SK" }, { "text": "YT", "value": "YT" }]; +var japanRegions = exports.japanRegions = [{ "text": " 北海道", "value": " 北海道" }, { "text": " 青森県", "value": " 青森県" }, { "text": " 岩手県", "value": " 岩手県" }, { "text": " 宮城県", "value": " 宮城県" }, { "text": " 秋田県", "value": " 秋田県" }, { "text": " 山形県", "value": " 山形県" }, { "text": " 福島県", "value": " 福島県" }, { "text": " 茨城県", "value": " 茨城県" }, { "text": " 栃木県", "value": " 栃木県" }, { "text": " 群馬県", "value": " 群馬県" }, { "text": " 埼玉県", "value": " 埼玉県" }, { "text": " 千葉県", "value": " 千葉県" }, { "text": " 東京都", "value": " 東京都" }, { "text": " 神奈川県", "value": " 神奈川県" }, { "text": " 新潟県", "value": " 新潟県" }, { "text": " 富山県", "value": " 富山県" }, { "text": " 石川県", "value": " 石川県" }, { "text": " 福井県", "value": " 福井県" }, { "text": " 山梨県", "value": " 山梨県" }, { "text": " 長野県", "value": " 長野県" }, { "text": " 岐阜県", "value": " 岐阜県" }, { "text": " 静岡県", "value": " 静岡県" }, { "text": " 愛知県", "value": " 愛知県" }, { "text": " 三重県", "value": " 三重県" }, { "text": " 滋賀県", "value": " 滋賀県" }, { "text": " 京都府", "value": " 京都府" }, { "text": " 大阪府", "value": " 大阪府" }, { "text": " 兵庫県", "value": " 兵庫県" }, { "text": " 奈良県", "value": " 奈良県" }, { "text": " 和歌山県", "value": " 和歌山県" }, { "text": " 鳥取県", "value": " 鳥取県" }, { "text": " 島根県", "value": " 島根県" }, { "text": " 岡山県", "value": " 岡山県" }, { "text": " 広島県", "value": " 広島県" }, { "text": " 山口県", "value": " 山口県" }, { "text": " 徳島県", "value": " 徳島県" }, { "text": " 香川県", "value": " 香川県" }, { "text": " 愛媛県", "value": " 愛媛県" }, { "text": " 高知県", "value": " 高知県" }, { "text": " 福岡県", "value": " 福岡県" }, { "text": " 佐賀県", "value": " 佐賀県" }, { "text": " 長崎県", "value": " 長崎県" }, { "text": " 熊本県", "value": " 熊本県" }, { "text": " 大分県", "value": " 大分県" }, { "text": " 宮崎県", "value": " 宮崎県" }, { "text": " 鹿児島県", "value": " 鹿児島県" }, { "text": " 沖縄県", "value": " 沖縄県" }]; +var categories = exports.categories = ['accessories', 't-shirts', 'pants', 'shorts', 'sweatshirts', 'tops-sweaters', 'shirts', 'jackets', 'shoes', 'skate']; +var creditCards = exports.creditCards = [{ text: 'Visa', value: 'visa' }, { text: 'American Express', value: 'american_express' }, { text: 'Mastercard', value: 'master' }, { text: 'Solo', value: 'solo' }]; +var japanCreditCards = exports.japanCreditCards = creditCards.concat([{ text: 'JCB', value: 'jcb' }, { text: '代金引換', value: 'cod' }]).filter(function (x) { + return x.value !== 'solo'; +}); -function required(value) { - var empty = typeof value !== 'number' && !value; - return empty ? 'Required field' : undefined; -} +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { -function simpleText(value) { - return value && !value.match(/^[0-9a-zA-Z_]{1,64}$/) ? 'Only use characters (a-z, A-Z, 0-9, _)' : undefined; -} +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { -function number(value) { - return value && isNaN(Number(value)) ? 'This field must be a number' : undefined; -} +Object.defineProperty(exports, "__esModule", { + value: true +}); -function minValue(min) { - return function (value) { - return value && value < min ? 'The value must be greater than ' + min : undefined; - }; -} +var _extends2 = __webpack_require__(8); -function maxValue(max) { - return function (value) { - return value && value > max ? 'The value must be less than ' + max : undefined; +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tableRowColumn = context.muiTheme.tableRowColumn; + + + var styles = { + root: { + paddingLeft: tableRowColumn.spacing, + paddingRight: tableRowColumn.spacing, + height: tableRowColumn.height, + textAlign: 'left', + fontSize: 13, + overflow: 'hidden', + whiteSpace: 'nowrap', + textOverflow: 'ellipsis' + } }; -} -function fullName(value) { - return !value || value.split(' ').filter(function (x) { - return x !== ""; - }).length < 2 ? 'Please enter a valid full name (firstname + lastname)' : undefined; + if (_react2.default.Children.count(props.children) === 1 && !isNaN(props.children)) { + styles.textAlign = 'right'; + } + + return styles; } -/***/ }), -/* 190 */ -/***/ (function(module, exports, __webpack_require__) { +var TableRowColumn = function (_Component) { + (0, _inherits3.default)(TableRowColumn, _Component); -"use strict"; + function TableRowColumn() { + var _ref; + var _temp, _this, _ret; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var CHANGE_MENU = exports.CHANGE_MENU = 'CHANGE_MENU'; -var UPDATE_SETTINGS = exports.UPDATE_SETTINGS = 'UPDATE_SETTINGS'; -var NOTIFICATION_ADD = exports.NOTIFICATION_ADD = 'NOTIFICATION_ADD'; + (0, _classCallCheck3.default)(this, TableRowColumn); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableRowColumn.__proto__ || (0, _getPrototypeOf2.default)(TableRowColumn)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.onClick = function (event) { + if (_this.props.onClick) { + _this.props.onClick(event, _this.props.columnNumber); + } + }, _this.onMouseEnter = function (event) { + if (_this.props.hoverable) { + _this.setState({ hovered: true }); + if (_this.props.onHover) { + _this.props.onHover(event, _this.props.columnNumber); + } + } + }, _this.onMouseLeave = function (event) { + if (_this.props.hoverable) { + _this.setState({ hovered: false }); + if (_this.props.onHoverExit) { + _this.props.onHoverExit(event, _this.props.columnNumber); + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TableRowColumn, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + columnNumber = _props.columnNumber, + hoverable = _props.hoverable, + onClick = _props.onClick, + onHover = _props.onHover, + onHoverExit = _props.onHoverExit, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'columnNumber', 'hoverable', 'onClick', 'onHover', 'onHoverExit', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var handlers = { + onClick: this.onClick, + onMouseEnter: this.onMouseEnter, + onMouseLeave: this.onMouseLeave + }; + + return _react2.default.createElement( + 'td', + (0, _extends3.default)({ + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }, handlers, other), + children + ); + } + }]); + return TableRowColumn; +}(_react.Component); + +TableRowColumn.defaultProps = { + hoverable: false +}; +TableRowColumn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? TableRowColumn.propTypes = { + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * @ignore + * Number to identify the header row. This property + * is automatically populated when used with TableHeader. + */ + columnNumber: _react.PropTypes.number, + /** + * @ignore + * If true, this column responds to hover events. + */ + hoverable: _react.PropTypes.bool, + /** @ignore */ + onClick: _react.PropTypes.func, + /** @ignore */ + onHover: _react.PropTypes.func, + /** + * @ignore + * Callback function for hover exit event. + */ + onHoverExit: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableRowColumn; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 191 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(310), __esModule: true }; +module.exports = { "default": __webpack_require__(317), __esModule: true }; /***/ }), -/* 192 */ +/* 198 */ /***/ (function(module, exports) { /***/ }), -/* 193 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var LIBRARY = __webpack_require__(90); -var $export = __webpack_require__(27); -var redefine = __webpack_require__(195); -var hide = __webpack_require__(47); -var has = __webpack_require__(48); -var Iterators = __webpack_require__(63); -var $iterCreate = __webpack_require__(312); -var setToStringTag = __webpack_require__(93); -var getPrototypeOf = __webpack_require__(199); -var ITERATOR = __webpack_require__(21)('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; +var LIBRARY = __webpack_require__(92) + , $export = __webpack_require__(33) + , redefine = __webpack_require__(201) + , hide = __webpack_require__(50) + , has = __webpack_require__(51) + , Iterators = __webpack_require__(67) + , $iterCreate = __webpack_require__(319) + , setToStringTag = __webpack_require__(94) + , getPrototypeOf = __webpack_require__(205) + , ITERATOR = __webpack_require__(20)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; -var returnThis = function () { return this; }; +var returnThis = function(){ return this; }; -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { +module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ $iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; // Fix native - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines - if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { + if(DEF_VALUES && $native && $native.name !== VALUES){ VALUES_BUG = true; - $default = function values() { return $native.call(this); }; + $default = function values(){ return $native.call(this); }; } // Define iterator - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { + Iterators[TAG] = returnThis; + if(DEFAULT){ methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; - /***/ }), -/* 194 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = !__webpack_require__(42) && !__webpack_require__(62)(function () { - return Object.defineProperty(__webpack_require__(127)('div'), 'a', { get: function () { return 7; } }).a != 7; +module.exports = !__webpack_require__(41) && !__webpack_require__(66)(function(){ + return Object.defineProperty(__webpack_require__(131)('div'), 'a', {get: function(){ return 7; }}).a != 7; }); - /***/ }), -/* 195 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(47); - +module.exports = __webpack_require__(50); /***/ }), -/* 196 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { -var has = __webpack_require__(48); -var toIObject = __webpack_require__(49); -var arrayIndexOf = __webpack_require__(314)(false); -var IE_PROTO = __webpack_require__(131)('IE_PROTO'); +var has = __webpack_require__(51) + , toIObject = __webpack_require__(52) + , arrayIndexOf = __webpack_require__(321)(false) + , IE_PROTO = __webpack_require__(135)('IE_PROTO'); -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); +module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { + while(names.length > i)if(has(O, key = names[i++])){ ~arrayIndexOf(result, key) || result.push(key); } return result; }; - /***/ }), -/* 197 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(74); -// eslint-disable-next-line no-prototype-builtins -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { +var cof = __webpack_require__(76); +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; - /***/ }), -/* 198 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { -var document = __webpack_require__(22).document; -module.exports = document && document.documentElement; - +module.exports = __webpack_require__(24).document && document.documentElement; /***/ }), -/* 199 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(48); -var toObject = __webpack_require__(75); -var IE_PROTO = __webpack_require__(131)('IE_PROTO'); -var ObjectProto = Object.prototype; +var has = __webpack_require__(51) + , toObject = __webpack_require__(77) + , IE_PROTO = __webpack_require__(135)('IE_PROTO') + , ObjectProto = Object.prototype; -module.exports = Object.getPrototypeOf || function (O) { +module.exports = Object.getPrototypeOf || function(O){ O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(typeof O.constructor == 'function' && O instanceof O.constructor){ return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; - /***/ }), -/* 200 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error -var anObject = __webpack_require__(37); -module.exports = function (iterator, fn, value, entries) { +var anObject = __webpack_require__(35); +module.exports = function(iterator, fn, value, entries){ try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) - } catch (e) { + } catch(e){ var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); + if(ret !== undefined)anObject(ret.call(iterator)); throw e; } }; - /***/ }), -/* 201 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator -var Iterators = __webpack_require__(63); -var ITERATOR = __webpack_require__(21)('iterator'); -var ArrayProto = Array.prototype; +var Iterators = __webpack_require__(67) + , ITERATOR = __webpack_require__(20)('iterator') + , ArrayProto = Array.prototype; -module.exports = function (it) { +module.exports = function(it){ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; - -/***/ }), -/* 202 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.3.20 SpeciesConstructor(O, defaultConstructor) -var anObject = __webpack_require__(37); -var aFunction = __webpack_require__(91); -var SPECIES = __webpack_require__(21)('species'); -module.exports = function (O, D) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); -}; - - /***/ }), -/* 203 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(60); -var invoke = __webpack_require__(322); -var html = __webpack_require__(198); -var cel = __webpack_require__(127); -var global = __webpack_require__(22); -var process = global.process; -var setTask = global.setImmediate; -var clearTask = global.clearImmediate; -var MessageChannel = global.MessageChannel; -var Dispatch = global.Dispatch; -var counter = 0; -var queue = {}; -var ONREADYSTATECHANGE = 'onreadystatechange'; -var defer, channel, port; -var run = function () { +var ctx = __webpack_require__(64) + , invoke = __webpack_require__(330) + , html = __webpack_require__(204) + , cel = __webpack_require__(131) + , global = __webpack_require__(24) + , process = global.process + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; +var run = function(){ var id = +this; - // eslint-disable-next-line no-prototype-builtins - if (queue.hasOwnProperty(id)) { + if(queue.hasOwnProperty(id)){ var fn = queue[id]; delete queue[id]; fn(); } }; -var listener = function (event) { +var listener = function(event){ run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: -if (!setTask || !clearTask) { - setTask = function setImmediate(fn) { - var args = []; - var i = 1; - while (arguments.length > i) args.push(arguments[i++]); - queue[++counter] = function () { - // eslint-disable-next-line no-new-func +if(!setTask || !clearTask){ + setTask = function setImmediate(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; - clearTask = function clearImmediate(id) { + clearTask = function clearImmediate(id){ delete queue[id]; }; // Node.js 0.8- - if (__webpack_require__(74)(process) == 'process') { - defer = function (id) { + if(__webpack_require__(76)(process) == 'process'){ + defer = function(id){ process.nextTick(ctx(run, id, 1)); }; - // Sphere (JS game engine) Dispatch API - } else if (Dispatch && Dispatch.now) { - defer = function (id) { - Dispatch.now(ctx(run, id, 1)); - }; // Browsers with MessageChannel, includes WebWorkers - } else if (MessageChannel) { - channel = new MessageChannel(); - port = channel.port2; + } else if(MessageChannel){ + channel = new MessageChannel; + port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' - } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { - defer = function (id) { + } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ + defer = function(id){ global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- - } else if (ONREADYSTATECHANGE in cel('script')) { - defer = function (id) { - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + } else if(ONREADYSTATECHANGE in cel('script')){ + defer = function(id){ + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { - defer = function (id) { + defer = function(id){ setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { - set: setTask, + set: setTask, clear: clearTask }; - -/***/ }), -/* 204 */ -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return { e: false, v: exec() }; - } catch (e) { - return { e: true, v: e }; - } -}; - - -/***/ }), -/* 205 */ -/***/ (function(module, exports, __webpack_require__) { - -var newPromiseCapability = __webpack_require__(136); - -module.exports = function (C, x) { - var promiseCapability = newPromiseCapability.f(C); - var resolve = promiseCapability.resolve; - resolve(x); - return promiseCapability.promise; -}; - - /***/ }), -/* 206 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { -var ITERATOR = __webpack_require__(21)('iterator'); -var SAFE_CLOSING = false; +var ITERATOR = __webpack_require__(20)('iterator') + , SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); - riter['return'] = function () { SAFE_CLOSING = true; }; - // eslint-disable-next-line no-throw-literal - Array.from(riter, function () { throw 2; }); -} catch (e) { /* empty */ } + riter['return'] = function(){ SAFE_CLOSING = true; }; + Array.from(riter, function(){ throw 2; }); +} catch(e){ /* empty */ } -module.exports = function (exec, skipClosing) { - if (!skipClosing && !SAFE_CLOSING) return false; +module.exports = function(exec, skipClosing){ + if(!skipClosing && !SAFE_CLOSING)return false; var safe = false; try { - var arr = [7]; - var iter = arr[ITERATOR](); - iter.next = function () { return { done: safe = true }; }; - arr[ITERATOR] = function () { return iter; }; + var arr = [7] + , iter = arr[ITERATOR](); + iter.next = function(){ return {done: safe = true}; }; + arr[ITERATOR] = function(){ return iter; }; exec(arr); - } catch (e) { /* empty */ } + } catch(e){ /* empty */ } return safe; }; - -/***/ }), -/* 207 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(329), __esModule: true }; - -/***/ }), -/* 208 */ -/***/ (function(module, exports, __webpack_require__) { - -// most Object methods by ES6 should accept primitives -var $export = __webpack_require__(27); -var core = __webpack_require__(17); -var fails = __webpack_require__(62); -module.exports = function (KEY, exec) { - var fn = (core.Object || {})[KEY] || Object[KEY]; - var exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); -}; - - -/***/ }), -/* 209 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(334), __esModule: true }; - /***/ }), /* 210 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) -var $keys = __webpack_require__(196); -var hiddenKeys = __webpack_require__(133).concat('length', 'prototype'); +var $keys = __webpack_require__(202) + , hiddenKeys = __webpack_require__(137).concat('length', 'prototype'); -exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ return $keys(O, hiddenKeys); }; - /***/ }), /* 211 */ /***/ (function(module, exports, __webpack_require__) { -var pIE = __webpack_require__(96); -var createDesc = __webpack_require__(73); -var toIObject = __webpack_require__(49); -var toPrimitive = __webpack_require__(128); -var has = __webpack_require__(48); -var IE8_DOM_DEFINE = __webpack_require__(194); -var gOPD = Object.getOwnPropertyDescriptor; +var pIE = __webpack_require__(96) + , createDesc = __webpack_require__(75) + , toIObject = __webpack_require__(52) + , toPrimitive = __webpack_require__(132) + , has = __webpack_require__(51) + , IE8_DOM_DEFINE = __webpack_require__(200) + , gOPD = Object.getOwnPropertyDescriptor; -exports.f = __webpack_require__(42) ? gOPD : function getOwnPropertyDescriptor(O, P) { +exports.f = __webpack_require__(41) ? gOPD : function getOwnPropertyDescriptor(O, P){ O = toIObject(O); P = toPrimitive(P, true); - if (IE8_DOM_DEFINE) try { + if(IE8_DOM_DEFINE)try { return gOPD(O, P); - } catch (e) { /* empty */ } - if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); + } catch(e){ /* empty */ } + if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); }; - /***/ }), /* 212 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _keys = __webpack_require__(50); - -var _keys2 = _interopRequireDefault(_keys); - -exports.isObjectEmpty = isObjectEmpty; -exports.getQueryStringValue = getQueryStringValue; -exports.pageHasNodeOfClass = pageHasNodeOfClass; -exports.hasStringInPath = hasStringInPath; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isObjectEmpty(obj) { - return (0, _keys2.default)(obj).length === 0 && obj.constructor === Object; -} - -function getQueryStringValue(key) { - return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1")); -} +module.exports = { "default": __webpack_require__(347), __esModule: true }; -function pageHasNodeOfClass(className) { - return document.querySelectorAll('.' + className).length > 0; -} +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { -function hasStringInPath(value) { - return location.pathname.substring(1).split('/').filter(function (x) { - return !!x && x === value; - }).length > 0; -} +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(33) + , core = __webpack_require__(16) + , fails = __webpack_require__(66); +module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); +}; /***/ }), -/* 213 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14593,15 +14735,15 @@ function hasStringInPath(value) { -var _prodInvariant = __webpack_require__(66), - _assign = __webpack_require__(15); +var _prodInvariant = __webpack_require__(56), + _assign = __webpack_require__(14); -var ReactNoopUpdateQueue = __webpack_require__(214); +var ReactNoopUpdateQueue = __webpack_require__(215); var canDefineProperty = __webpack_require__(97); var emptyObject = __webpack_require__(98); var invariant = __webpack_require__(10); -var lowPriorityWarning = __webpack_require__(141); +var lowPriorityWarning = __webpack_require__(146); /** * Base class helpers for the updating state of a component. @@ -14726,7 +14868,7 @@ module.exports = { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 214 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14827,7 +14969,203 @@ module.exports = ReactNoopUpdateQueue; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 215 */ +/* 216 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var PooledClass = __webpack_require__(371); +var ReactElement = __webpack_require__(43); + +var emptyFunction = __webpack_require__(21); +var traverseAllChildren = __webpack_require__(218); + +var twoArgumentPooler = PooledClass.twoArgumentPooler; +var fourArgumentPooler = PooledClass.fourArgumentPooler; + +var userProvidedKeyEscapeRegex = /\/+/g; +function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); +} + +/** + * PooledClass representing the bookkeeping associated with performing a child + * traversal. Allows avoiding binding callbacks. + * + * @constructor ForEachBookKeeping + * @param {!function} forEachFunction Function to perform traversal with. + * @param {?*} forEachContext Context to perform context with. + */ +function ForEachBookKeeping(forEachFunction, forEachContext) { + this.func = forEachFunction; + this.context = forEachContext; + this.count = 0; +} +ForEachBookKeeping.prototype.destructor = function () { + this.func = null; + this.context = null; + this.count = 0; +}; +PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); + +function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + + func.call(context, child, bookKeeping.count++); +} + +/** + * Iterates through children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ +function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + ForEachBookKeeping.release(traverseContext); +} + +/** + * PooledClass representing the bookkeeping associated with performing a child + * mapping. Allows avoiding binding callbacks. + * + * @constructor MapBookKeeping + * @param {!*} mapResult Object containing the ordered map of results. + * @param {!function} mapFunction Function to perform mapping with. + * @param {?*} mapContext Context to perform mapping with. + */ +function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { + this.result = mapResult; + this.keyPrefix = keyPrefix; + this.func = mapFunction; + this.context = mapContext; + this.count = 0; +} +MapBookKeeping.prototype.destructor = function () { + this.result = null; + this.keyPrefix = null; + this.func = null; + this.context = null; + this.count = 0; +}; +PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); + +function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; + + + var mappedChild = func.call(context, child, bookKeeping.count++); + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); + } else if (mappedChild != null) { + if (ReactElement.isValidElement(mappedChild)) { + mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); + } + result.push(mappedChild); + } +} + +function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + MapBookKeeping.release(traverseContext); +} + +/** + * Maps children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ +function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; +} + +function forEachSingleChildDummy(traverseContext, child, name) { + return null; +} + +/** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ +function countChildren(children, context) { + return traverseAllChildren(children, forEachSingleChildDummy, null); +} + +/** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray + */ +function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); + return result; +} + +var ReactChildren = { + forEach: forEachChildren, + map: mapChildren, + mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, + count: countChildren, + toArray: toArray +}; + +module.exports = ReactChildren; + +/***/ }), +/* 217 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14852,7 +15190,189 @@ var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol module.exports = REACT_ELEMENT_TYPE; /***/ }), -/* 216 */ +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(56); + +var ReactCurrentOwner = __webpack_require__(29); +var REACT_ELEMENT_TYPE = __webpack_require__(217); + +var getIteratorFn = __webpack_require__(219); +var invariant = __webpack_require__(10); +var KeyEscapeUtils = __webpack_require__(220); +var warning = __webpack_require__(11); + +var SEPARATOR = '.'; +var SUBSEPARATOR = ':'; + +/** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ + +/** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + +var didWarnAboutMaps = false; + +/** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ +function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); +} + +/** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if (children === null || type === 'string' || type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { + callback(traverseContext, children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + if (process.env.NODE_ENV !== 'production') { + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } + } + } else if (type === 'object') { + var addendum = ''; + if (process.env.NODE_ENV !== 'production') { + addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; + if (children._isReactElement) { + addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } + } + } + var childrenString = String(children); + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; + } + } + + return subtreeCount; +} + +/** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); +} + +module.exports = traverseAllChildren; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 219 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14898,39 +15418,103 @@ function getIteratorFn(maybeIterable) { module.exports = getIteratorFn; /***/ }), -/* 217 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2014-present, Facebook, Inc. +/** + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * */ -/** - * ReactElementValidator provides a wrapper around a element factory - * which validates the props passed to the element. This is intended to be - * used only in DEV and could be replaced by a static type checker for languages - * that support it. - */ - - - -var ReactCurrentOwner = __webpack_require__(30); -var ReactComponentTreeHook = __webpack_require__(24); -var ReactElement = __webpack_require__(51); -var checkReactTypeSpec = __webpack_require__(369); + +/** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + +function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2' + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; +} + +/** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ +function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':' + }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); + + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); +} + +var KeyEscapeUtils = { + escape: escape, + unescape: unescape +}; + +module.exports = KeyEscapeUtils; + +/***/ }), +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ + + + +var ReactCurrentOwner = __webpack_require__(29); +var ReactComponentTreeHook = __webpack_require__(19); +var ReactElement = __webpack_require__(43); + +var checkReactTypeSpec = __webpack_require__(373); var canDefineProperty = __webpack_require__(97); -var getIteratorFn = __webpack_require__(216); +var getIteratorFn = __webpack_require__(219); var warning = __webpack_require__(11); -var lowPriorityWarning = __webpack_require__(141); +var lowPriorityWarning = __webpack_require__(146); function getDeclarationErrorAddendum() { if (ReactCurrentOwner.current) { @@ -15159,7 +15743,7 @@ module.exports = ReactElementValidator; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 218 */ +/* 222 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15178,7 +15762,7 @@ module.exports = ReactElementValidator; // Therefore we re-export development-only version with all the PropTypes checks here. // However if one is migrating to the `prop-types` npm library, they will go through the // `index.js` entry point, and it will branch depending on the environment. -var factory = __webpack_require__(219); +var factory = __webpack_require__(223); module.exports = function(isValidElement) { // It is still allowed in 15.5. var throwOnDirectAccess = false; @@ -15187,7 +15771,7 @@ module.exports = function(isValidElement) { /***/ }), -/* 219 */ +/* 223 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15202,12 +15786,12 @@ module.exports = function(isValidElement) { -var emptyFunction = __webpack_require__(23); +var emptyFunction = __webpack_require__(21); var invariant = __webpack_require__(10); var warning = __webpack_require__(11); -var ReactPropTypesSecret = __webpack_require__(142); -var checkPropTypes = __webpack_require__(373); +var ReactPropTypesSecret = __webpack_require__(147); +var checkPropTypes = __webpack_require__(377); module.exports = function(isValidElement, throwOnDirectAccess) { /* global Symbol */ @@ -15707,7 +16291,7 @@ module.exports = function(isValidElement, throwOnDirectAccess) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 220 */ +/* 224 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15730,7 +16314,7 @@ var ReactDOMComponentFlags = { module.exports = ReactDOMComponentFlags; /***/ }), -/* 221 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15747,7 +16331,7 @@ module.exports = ReactDOMComponentFlags; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); var invariant = __webpack_require__(10); @@ -15794,7 +16378,7 @@ module.exports = accumulateInto; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 222 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15830,7 +16414,7 @@ function forEachAccumulated(arr, cb, scope) { module.exports = forEachAccumulated; /***/ }), -/* 223 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15846,7 +16430,7 @@ module.exports = forEachAccumulated; -var ExecutionEnvironment = __webpack_require__(19); +var ExecutionEnvironment = __webpack_require__(18); var contentKey = null; @@ -15868,7 +16452,7 @@ function getTextContentAccessor() { module.exports = getTextContentAccessor; /***/ }), -/* 224 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15885,11 +16469,11 @@ module.exports = getTextContentAccessor; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var PooledClass = __webpack_require__(53); +var PooledClass = __webpack_require__(57); var invariant = __webpack_require__(10); @@ -15993,7 +16577,7 @@ module.exports = PooledClass.addPoolingTo(CallbackQueue); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 225 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16020,135 +16604,7 @@ var ReactFeatureFlags = { module.exports = ReactFeatureFlags; /***/ }), -/* 226 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - - -var ReactDOMComponentTree = __webpack_require__(16); - -function isCheckable(elem) { - var type = elem.type; - var nodeName = elem.nodeName; - return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio'); -} - -function getTracker(inst) { - return inst._wrapperState.valueTracker; -} - -function attachTracker(inst, tracker) { - inst._wrapperState.valueTracker = tracker; -} - -function detachTracker(inst) { - delete inst._wrapperState.valueTracker; -} - -function getValueFromNode(node) { - var value; - if (node) { - value = isCheckable(node) ? '' + node.checked : node.value; - } - return value; -} - -var inputValueTracking = { - // exposed for testing - _getTrackerFromNode: function (node) { - return getTracker(ReactDOMComponentTree.getInstanceFromNode(node)); - }, - - - track: function (inst) { - if (getTracker(inst)) { - return; - } - - var node = ReactDOMComponentTree.getNodeFromInstance(inst); - var valueField = isCheckable(node) ? 'checked' : 'value'; - var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); - - var currentValue = '' + node[valueField]; - - // if someone has already defined a value or Safari, then bail - // and don't track value will cause over reporting of changes, - // but it's better then a hard failure - // (needed for certain tests that spyOn input values and Safari) - if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') { - return; - } - - Object.defineProperty(node, valueField, { - enumerable: descriptor.enumerable, - configurable: true, - get: function () { - return descriptor.get.call(this); - }, - set: function (value) { - currentValue = '' + value; - descriptor.set.call(this, value); - } - }); - - attachTracker(inst, { - getValue: function () { - return currentValue; - }, - setValue: function (value) { - currentValue = '' + value; - }, - stopTracking: function () { - detachTracker(inst); - delete node[valueField]; - } - }); - }, - - updateValueIfChanged: function (inst) { - if (!inst) { - return false; - } - var tracker = getTracker(inst); - - if (!tracker) { - inputValueTracking.track(inst); - return true; - } - - var lastValue = tracker.getValue(); - var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst)); - - if (nextValue !== lastValue) { - tracker.setValue(nextValue); - return true; - } - - return false; - }, - stopTracking: function (inst) { - var tracker = getTracker(inst); - if (tracker) { - tracker.stopTracking(); - } - } -}; - -module.exports = inputValueTracking; - -/***/ }), -/* 227 */ +/* 230 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16170,21 +16626,21 @@ module.exports = inputValueTracking; */ var supportedInputTypes = { - color: true, - date: true, - datetime: true, + 'color': true, + 'date': true, + 'datetime': true, 'datetime-local': true, - email: true, - month: true, - number: true, - password: true, - range: true, - search: true, - tel: true, - text: true, - time: true, - url: true, - week: true + 'email': true, + 'month': true, + 'number': true, + 'password': true, + 'range': true, + 'search': true, + 'tel': true, + 'text': true, + 'time': true, + 'url': true, + 'week': true }; function isTextInputElement(elem) { @@ -16204,7 +16660,7 @@ function isTextInputElement(elem) { module.exports = isTextInputElement; /***/ }), -/* 228 */ +/* 231 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16221,6 +16677,7 @@ module.exports = isTextInputElement; var ViewportMetrics = { + currentScrollLeft: 0, currentScrollTop: 0, @@ -16229,12 +16686,13 @@ var ViewportMetrics = { ViewportMetrics.currentScrollLeft = scrollPosition.x; ViewportMetrics.currentScrollTop = scrollPosition.y; } + }; module.exports = ViewportMetrics; /***/ }), -/* 229 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16250,7 +16708,7 @@ module.exports = ViewportMetrics; -var ExecutionEnvironment = __webpack_require__(19); +var ExecutionEnvironment = __webpack_require__(18); var escapeTextContentForBrowser = __webpack_require__(105); var setInnerHTML = __webpack_require__(104); @@ -16291,7 +16749,7 @@ if (ExecutionEnvironment.canUseDOM) { module.exports = setTextContent; /***/ }), -/* 230 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16323,7 +16781,7 @@ function focusNode(node) { module.exports = focusNode; /***/ }), -/* 231 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16359,13 +16817,7 @@ var isUnitlessNumber = { flexNegative: true, flexOrder: true, gridRow: true, - gridRowEnd: true, - gridRowSpan: true, - gridRowStart: true, gridColumn: true, - gridColumnEnd: true, - gridColumnSpan: true, - gridColumnStart: true, fontWeight: true, lineClamp: true, lineHeight: true, @@ -16482,7 +16934,7 @@ var CSSProperty = { module.exports = CSSProperty; /***/ }), -/* 232 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16498,11 +16950,11 @@ module.exports = CSSProperty; -var DOMProperty = __webpack_require__(43); -var ReactDOMComponentTree = __webpack_require__(16); +var DOMProperty = __webpack_require__(45); +var ReactDOMComponentTree = __webpack_require__(15); var ReactInstrumentation = __webpack_require__(25); -var quoteAttributeValueForBrowser = __webpack_require__(416); +var quoteAttributeValueForBrowser = __webpack_require__(421); var warning = __webpack_require__(11); var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); @@ -16533,6 +16985,7 @@ function shouldIgnoreValue(propertyInfo, value) { * Operations for dealing with DOM properties. */ var DOMPropertyOperations = { + /** * Creates markup for the ID property. * @@ -16717,13 +17170,14 @@ var DOMPropertyOperations = { }); } } + }; module.exports = DOMPropertyOperations; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 233 */ +/* 236 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16745,7 +17199,7 @@ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), -/* 234 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16761,11 +17215,11 @@ module.exports = ReactPropTypesSecret; -var _assign = __webpack_require__(15); +var _assign = __webpack_require__(14); -var LinkedValueUtils = __webpack_require__(153); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactUpdates = __webpack_require__(32); +var LinkedValueUtils = __webpack_require__(158); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactUpdates = __webpack_require__(30); var warning = __webpack_require__(11); @@ -16951,7 +17405,7 @@ module.exports = ReactDOMSelect; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 235 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -16967,14 +17421,14 @@ module.exports = ReactDOMSelect; -var _prodInvariant = __webpack_require__(14), - _assign = __webpack_require__(15); +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); -var ReactCompositeComponent = __webpack_require__(424); -var ReactEmptyComponent = __webpack_require__(237); -var ReactHostComponent = __webpack_require__(238); +var ReactCompositeComponent = __webpack_require__(429); +var ReactEmptyComponent = __webpack_require__(240); +var ReactHostComponent = __webpack_require__(241); -var getNextDebugID = __webpack_require__(427); +var getNextDebugID = __webpack_require__(432); var invariant = __webpack_require__(10); var warning = __webpack_require__(11); @@ -16982,6 +17436,9 @@ var warning = __webpack_require__(11); var ReactCompositeComponentWrapper = function (element) { this.construct(element); }; +_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, { + _instantiateReactComponent: instantiateReactComponent +}); function getDeclarationErrorAddendum(owner) { if (owner) { @@ -17024,7 +17481,7 @@ function instantiateReactComponent(node, shouldHaveDebugID) { var info = ''; if (process.env.NODE_ENV !== 'production') { if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + "it's defined in."; + info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.'; } } info += getDeclarationErrorAddendum(element._owner); @@ -17078,15 +17535,11 @@ function instantiateReactComponent(node, shouldHaveDebugID) { return instance; } -_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, { - _instantiateReactComponent: instantiateReactComponent -}); - module.exports = instantiateReactComponent; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 236 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17103,9 +17556,9 @@ module.exports = instantiateReactComponent; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); -var React = __webpack_require__(65); +var React = __webpack_require__(55); var invariant = __webpack_require__(10); @@ -17132,7 +17585,7 @@ module.exports = ReactNodeTypes; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 237 */ +/* 240 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17167,7 +17620,7 @@ ReactEmptyComponent.injection = ReactEmptyComponentInjection; module.exports = ReactEmptyComponent; /***/ }), -/* 238 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17183,7 +17636,7 @@ module.exports = ReactEmptyComponent; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); var invariant = __webpack_require__(10); @@ -17241,7 +17694,7 @@ module.exports = ReactHostComponent; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 239 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17257,14 +17710,14 @@ module.exports = ReactHostComponent; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); -var ReactCurrentOwner = __webpack_require__(30); -var REACT_ELEMENT_TYPE = __webpack_require__(428); +var ReactCurrentOwner = __webpack_require__(29); +var REACT_ELEMENT_TYPE = __webpack_require__(433); -var getIteratorFn = __webpack_require__(429); +var getIteratorFn = __webpack_require__(434); var invariant = __webpack_require__(10); -var KeyEscapeUtils = __webpack_require__(156); +var KeyEscapeUtils = __webpack_require__(161); var warning = __webpack_require__(11); var SEPARATOR = '.'; @@ -17378,7 +17831,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) if (process.env.NODE_ENV !== 'production') { addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; if (children._isReactElement) { - addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.'; + addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.'; } if (ReactCurrentOwner.current) { var name = ReactCurrentOwner.current.getName(); @@ -17423,7 +17876,7 @@ module.exports = traverseAllChildren; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 240 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17431,16 +17884,23 @@ module.exports = traverseAllChildren; /** * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * @typechecks */ -var emptyFunction = __webpack_require__(23); +var emptyFunction = __webpack_require__(21); /** * Upstream version of event listener. Does not take into account specific @@ -17506,7 +17966,7 @@ module.exports = EventListener; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 241 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17522,11 +17982,11 @@ module.exports = EventListener; -var ReactDOMSelection = __webpack_require__(441); +var ReactDOMSelection = __webpack_require__(446); -var containsNode = __webpack_require__(443); -var focusNode = __webpack_require__(230); -var getActiveElement = __webpack_require__(242); +var containsNode = __webpack_require__(448); +var focusNode = __webpack_require__(233); +var getActiveElement = __webpack_require__(245); function isInDocument(node) { return containsNode(document.documentElement, node); @@ -17539,6 +17999,7 @@ function isInDocument(node) { * Input selection module for React. */ var ReactInputSelection = { + hasSelectionCapabilities: function (elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true'); @@ -17634,7 +18095,7 @@ var ReactInputSelection = { module.exports = ReactInputSelection; /***/ }), -/* 242 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17678,7 +18139,7 @@ function getActiveElement(doc) /*?DOMElement*/{ module.exports = getActiveElement; /***/ }), -/* 243 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -17694,29 +18155,29 @@ module.exports = getActiveElement; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13); -var DOMLazyTree = __webpack_require__(68); -var DOMProperty = __webpack_require__(43); -var React = __webpack_require__(65); +var DOMLazyTree = __webpack_require__(70); +var DOMProperty = __webpack_require__(45); +var React = __webpack_require__(55); var ReactBrowserEventEmitter = __webpack_require__(106); -var ReactCurrentOwner = __webpack_require__(30); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactDOMContainerInfo = __webpack_require__(458); -var ReactDOMFeatureFlags = __webpack_require__(459); -var ReactFeatureFlags = __webpack_require__(225); -var ReactInstanceMap = __webpack_require__(80); +var ReactCurrentOwner = __webpack_require__(29); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactDOMContainerInfo = __webpack_require__(463); +var ReactDOMFeatureFlags = __webpack_require__(464); +var ReactFeatureFlags = __webpack_require__(229); +var ReactInstanceMap = __webpack_require__(81); var ReactInstrumentation = __webpack_require__(25); -var ReactMarkupChecksum = __webpack_require__(460); -var ReactReconciler = __webpack_require__(67); -var ReactUpdateQueue = __webpack_require__(157); -var ReactUpdates = __webpack_require__(32); +var ReactMarkupChecksum = __webpack_require__(465); +var ReactReconciler = __webpack_require__(69); +var ReactUpdateQueue = __webpack_require__(162); +var ReactUpdates = __webpack_require__(30); var emptyObject = __webpack_require__(98); -var instantiateReactComponent = __webpack_require__(235); +var instantiateReactComponent = __webpack_require__(238); var invariant = __webpack_require__(10); var setInnerHTML = __webpack_require__(104); -var shouldUpdateReactComponent = __webpack_require__(155); +var shouldUpdateReactComponent = __webpack_require__(160); var warning = __webpack_require__(11); var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; @@ -17940,6 +18401,7 @@ TopLevelWrapper.isReactTopLevelWrapper = true; * Inside of `container`, the first element rendered is the "reactRoot". */ var ReactMount = { + TopLevelWrapper: TopLevelWrapper, /** @@ -18028,14 +18490,13 @@ var ReactMount = { _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render'); - !React.isValidElement(nextElement) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or <div />." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : // Check if it quacks like an element - nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or <div />." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0; + !React.isValidElement(nextElement) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : + // Check if it quacks like an element + nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0; process.env.NODE_ENV !== 'production' ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0; - var nextWrappedElement = React.createElement(TopLevelWrapper, { - child: nextElement - }); + var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement }); var nextContext; if (parentComponent) { @@ -18124,7 +18585,7 @@ var ReactMount = { !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0; if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0; } var prevComponent = getTopLevelWrapperInContainer(container); @@ -18137,7 +18598,7 @@ var ReactMount = { var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME); if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0; } return false; @@ -18222,7 +18683,7 @@ module.exports = ReactMount; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 244 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18238,7 +18699,7 @@ module.exports = ReactMount; -var ReactNodeTypes = __webpack_require__(236); +var ReactNodeTypes = __webpack_require__(239); function getHostComponentFromComposite(inst) { var type; @@ -18257,7 +18718,7 @@ function getHostComponentFromComposite(inst) { module.exports = getHostComponentFromComposite; /***/ }), -/* 245 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18267,7 +18728,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _toConsumableArray2 = __webpack_require__(95); +var _toConsumableArray2 = __webpack_require__(53); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); @@ -18291,7 +18752,7 @@ var _inherits2 = __webpack_require__(6); var _inherits3 = _interopRequireDefault(_inherits2); -var _toArray2 = __webpack_require__(246); +var _toArray2 = __webpack_require__(249); var _toArray3 = _interopRequireDefault(_toArray2); @@ -18303,7 +18764,7 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(18); +var _reactDom = __webpack_require__(17); var _reactDom2 = _interopRequireDefault(_reactDom); @@ -18311,11 +18772,11 @@ var _reactAddonsTransitionGroup = __webpack_require__(108); var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); -var _dom = __webpack_require__(247); +var _dom = __webpack_require__(250); var _dom2 = _interopRequireDefault(_dom); -var _CircleRipple = __webpack_require__(474); +var _CircleRipple = __webpack_require__(478); var _CircleRipple2 = _interopRequireDefault(_CircleRipple); @@ -18570,7 +19031,7 @@ exports.default = TouchRipple; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 246 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18578,7 +19039,7 @@ exports.default = TouchRipple; exports.__esModule = true; -var _from = __webpack_require__(207); +var _from = __webpack_require__(212); var _from2 = _interopRequireDefault(_from); @@ -18589,7 +19050,7 @@ exports.default = function (arr) { }; /***/ }), -/* 247 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18619,7 +19080,7 @@ exports.default = { }; /***/ }), -/* 248 */ +/* 251 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18627,20 +19088,16 @@ exports.default = { exports.__esModule = true; -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +var _react = __webpack_require__(1); -exports["default"] = _propTypes2["default"].shape({ - subscribe: _propTypes2["default"].func.isRequired, - dispatch: _propTypes2["default"].func.isRequired, - getState: _propTypes2["default"].func.isRequired +exports["default"] = _react.PropTypes.shape({ + subscribe: _react.PropTypes.func.isRequired, + dispatch: _react.PropTypes.func.isRequired, + getState: _react.PropTypes.func.isRequired }); /***/ }), -/* 249 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -18671,14 +19128,14 @@ function warning(message) { } /***/ }), -/* 250 */ +/* 253 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionTypes; }); /* harmony export (immutable) */ __webpack_exports__["b"] = createStore; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(161); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(481); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(485); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__); @@ -18691,33 +19148,34 @@ function warning(message) { */ var ActionTypes = { INIT: '@@redux/INIT' +}; - /** - * Creates a Redux store that holds the state tree. - * The only way to change the data in the store is to call `dispatch()` on it. - * - * There should only be a single store in your app. To specify how different - * parts of the state tree respond to actions, you may combine several reducers - * into a single reducer function by using `combineReducers`. - * - * @param {Function} reducer A function that returns the next state tree, given - * the current state tree and the action to handle. - * - * @param {any} [preloadedState] The initial state. You may optionally specify it - * to hydrate the state from the server in universal apps, or to restore a - * previously serialized user session. - * If you use `combineReducers` to produce the root reducer function, this must be - * an object with the same shape as `combineReducers` keys. - * - * @param {Function} [enhancer] The store enhancer. You may optionally specify it - * to enhance the store with third-party capabilities such as middleware, - * time travel, persistence, etc. The only store enhancer that ships with Redux - * is `applyMiddleware()`. - * - * @returns {Store} A Redux store that lets you read the state, dispatch actions - * and subscribe to changes. - */ -};function createStore(reducer, preloadedState, enhancer) { +/** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} enhancer The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ +function createStore(reducer, preloadedState, enhancer) { var _ref2; if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { @@ -18830,7 +19288,7 @@ var ActionTypes = { * return something else (for example, a Promise you can await). */ function dispatch(action) { - if (!Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */])(action)) { + if (!__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */](action)) { throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); } @@ -18851,8 +19309,7 @@ var ActionTypes = { var listeners = currentListeners = nextListeners; for (var i = 0; i < listeners.length; i++) { - var listener = listeners[i]; - listener(); + listeners[i](); } return action; @@ -18881,7 +19338,7 @@ var ActionTypes = { * Interoperability point for observable/reactive libraries. * @returns {observable} A minimal observable of state changes. * For more information, see the observable proposal: - * https://github.com/tc39/proposal-observable + * https://github.com/zenparsing/es-observable */ function observable() { var _ref; @@ -18930,7 +19387,7 @@ var ActionTypes = { } /***/ }), -/* 251 */ +/* 254 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -18939,24 +19396,24 @@ var freeGlobal = typeof global == 'object' && global && global.Object === Object /* harmony default export */ __webpack_exports__["a"] = (freeGlobal); -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(46))) +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(49))) /***/ }), -/* 252 */ +/* 255 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(253); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(256); /** Built-in value references. */ -var getPrototype = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.getPrototypeOf, Object); +var getPrototype = __WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */](Object.getPrototypeOf, Object); /* harmony default export */ __webpack_exports__["a"] = (getPrototype); /***/ }), -/* 253 */ +/* 256 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -18978,7 +19435,7 @@ function overArg(func, transform) { /***/ }), -/* 254 */ +/* 257 */ /***/ (function(module, exports) { module.exports = function(module) { @@ -19006,7 +19463,7 @@ module.exports = function(module) { /***/ }), -/* 255 */ +/* 258 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -19034,7 +19491,7 @@ function warning(message) { } /***/ }), -/* 256 */ +/* 259 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -19065,18 +19522,20 @@ function compose() { return funcs[0]; } - return funcs.reduce(function (a, b) { - return function () { - return a(b.apply(undefined, arguments)); - }; - }); + var last = funcs[funcs.length - 1]; + var rest = funcs.slice(0, -1); + return function () { + return rest.reduceRight(function (composed, f) { + return f(composed); + }, last.apply(undefined, arguments)); + }; } /***/ }), -/* 257 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(489); +var root = __webpack_require__(493); /** Built-in value references. */ var Symbol = root.Symbol; @@ -19085,7 +19544,7 @@ module.exports = Symbol; /***/ }), -/* 258 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -19142,7 +19601,7 @@ module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, /***/ }), -/* 259 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -19153,7 +19612,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _FontIcon = __webpack_require__(496); +var _FontIcon = __webpack_require__(500); var _FontIcon2 = _interopRequireDefault(_FontIcon); @@ -19162,632 +19621,304 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.default = _FontIcon2.default; /***/ }), -/* 260 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmit", function() { return clearSubmit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmitErrors", function() { return clearSubmitErrors; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearAsyncError", function() { return clearAsyncError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncErrors", function() { return updateSyncErrors; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncWarnings", function() { return updateSyncWarnings; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(163); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - +/* WEBPACK VAR INJECTION */(function(process) { -var arrayInsert = function arrayInsert(form, field, index, value) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], - meta: { form: form, field: field, index: index }, - payload: value - }; -}; +Object.defineProperty(exports, "__esModule", { + value: true +}); -var arrayMove = function arrayMove(form, field, from, to) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], - meta: { form: form, field: field, from: from, to: to } - }; -}; +var _extends2 = __webpack_require__(8); -var arrayPop = function arrayPop(form, field) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], - meta: { form: form, field: field } - }; -}; +var _extends3 = _interopRequireDefault(_extends2); -var arrayPush = function arrayPush(form, field, value) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], - meta: { form: form, field: field }, - payload: value - }; -}; +var _objectWithoutProperties2 = __webpack_require__(9); -var arrayRemove = function arrayRemove(form, field, index) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], - meta: { form: form, field: field, index: index } - }; -}; +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var arrayRemoveAll = function arrayRemoveAll(form, field) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], - meta: { form: form, field: field } - }; -}; +var _getPrototypeOf = __webpack_require__(4); -var arrayShift = function arrayShift(form, field) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], - meta: { form: form, field: field } - }; -}; +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -var arraySplice = function arraySplice(form, field, index, removeNum, value) { - var action = { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], - meta: { form: form, field: field, index: index, removeNum: removeNum } - }; - if (value !== undefined) { - action.payload = value; - } - return action; -}; +var _classCallCheck2 = __webpack_require__(2); -var arraySwap = function arraySwap(form, field, indexA, indexB) { - if (indexA === indexB) { - throw new Error('Swap indices cannot be equal'); - } - if (indexA < 0 || indexB < 0) { - throw new Error('Swap indices cannot be negative'); - } - return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], meta: { form: form, field: field, indexA: indexA, indexB: indexB } }; -}; +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var arrayUnshift = function arrayUnshift(form, field, value) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], - meta: { form: form, field: field }, - payload: value - }; -}; +var _createClass2 = __webpack_require__(3); -var autofill = function autofill(form, field, value) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], - meta: { form: form, field: field }, - payload: value - }; -}; +var _createClass3 = _interopRequireDefault(_createClass2); -var blur = function blur(form, field, value, touch) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], - meta: { form: form, field: field, touch: touch }, - payload: value - }; -}; +var _possibleConstructorReturn2 = __webpack_require__(5); -var change = function change(form, field, value, touch, persistentSubmitErrors) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], - meta: { form: form, field: field, touch: touch, persistentSubmitErrors: persistentSubmitErrors }, - payload: value - }; -}; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var clearSubmit = function clearSubmit(form) { - return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], meta: { form: form } }; -}; +var _inherits2 = __webpack_require__(6); -var clearSubmitErrors = function clearSubmitErrors(form) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT_ERRORS"], - meta: { form: form } - }; -}; +var _inherits3 = _interopRequireDefault(_inherits2); -var clearAsyncError = function clearAsyncError(form, field) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], - meta: { form: form, field: field } - }; -}; +var _simpleAssign = __webpack_require__(7); -var destroy = function destroy() { - for (var _len = arguments.length, form = Array(_len), _key = 0; _key < _len; _key++) { - form[_key] = arguments[_key]; - } +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"], meta: { form: form } }; -}; +var _react = __webpack_require__(1); -var focus = function focus(form, field) { - return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], meta: { form: form, field: field } }; -}; +var _react2 = _interopRequireDefault(_react); -var initialize = function initialize(form, values, keepDirty) { - var otherMeta = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; +var _transitions = __webpack_require__(12); - if (keepDirty instanceof Object) { - otherMeta = keepDirty; - keepDirty = false; - } - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], - meta: _extends({ form: form, keepDirty: keepDirty }, otherMeta), - payload: values - }; -}; +var _transitions2 = _interopRequireDefault(_transitions); -var registerField = function registerField(form, name, type) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], - meta: { form: form }, - payload: { name: name, type: type } - }; -}; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var reset = function reset(form) { - return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], meta: { form: form } }; -}; +function getStyles(props, context, state) { + var verticalPosition = props.verticalPosition; + var horizontalPosition = props.horizontalPosition; + var touchMarginOffset = props.touch ? 10 : 0; + var touchOffsetTop = props.touch ? -20 : -10; + var offset = verticalPosition === 'bottom' ? 14 + touchMarginOffset : -14 - touchMarginOffset; -var startAsyncValidation = function startAsyncValidation(form, field) { - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], - meta: { form: form, field: field } - }; -}; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + zIndex = _context$muiTheme.zIndex, + tooltip = _context$muiTheme.tooltip; -var startSubmit = function startSubmit(form) { - return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], meta: { form: form } }; -}; -var stopAsyncValidation = function stopAsyncValidation(form, errors) { - var action = { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], - meta: { form: form }, - payload: errors + var styles = { + root: { + position: 'absolute', + fontFamily: baseTheme.fontFamily, + fontSize: '10px', + lineHeight: '22px', + padding: '0 8px', + zIndex: zIndex.tooltip, + color: tooltip.color, + overflow: 'hidden', + top: -10000, + borderRadius: 2, + userSelect: 'none', + opacity: 0, + right: horizontalPosition === 'left' ? 12 : null, + left: horizontalPosition === 'center' ? (state.offsetWidth - 48) / 2 * -1 : null, + transition: _transitions2.default.easeOut('0ms', 'top', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') + }, + label: { + position: 'relative', + whiteSpace: 'nowrap' + }, + ripple: { + position: 'absolute', + left: horizontalPosition === 'center' ? '50%' : horizontalPosition === 'left' ? '100%' : '0%', + top: verticalPosition === 'bottom' ? 0 : '100%', + transform: 'translate(-50%, -50%)', + borderRadius: '50%', + backgroundColor: 'transparent', + transition: _transitions2.default.easeOut('0ms', 'width', '450ms') + ', ' + _transitions2.default.easeOut('0ms', 'height', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') + }, + rootWhenShown: { + top: verticalPosition === 'top' ? touchOffsetTop : 36, + opacity: 0.9, + transform: 'translate(0px, ' + offset + 'px)', + transition: _transitions2.default.easeOut('0ms', 'top', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') + }, + rootWhenTouched: { + fontSize: '14px', + lineHeight: '32px', + padding: '0 16px' + }, + rippleWhenShown: { + backgroundColor: tooltip.rippleBackgroundColor, + transition: _transitions2.default.easeOut('450ms', 'width', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'height', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') + } }; - if (errors && Object.keys(errors).length) { - action.error = true; - } - return action; -}; -var stopSubmit = function stopSubmit(form, errors) { - var action = { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], - meta: { form: form }, - payload: errors - }; - if (errors && Object.keys(errors).length) { - action.error = true; - } - return action; -}; + return styles; +} -var submit = function submit(form) { - return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], meta: { form: form } }; -}; +var Tooltip = function (_Component) { + (0, _inherits3.default)(Tooltip, _Component); -var setSubmitFailed = function setSubmitFailed(form) { - for (var _len2 = arguments.length, fields = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - fields[_key2 - 1] = arguments[_key2]; - } + function Tooltip() { + var _ref; - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], - meta: { form: form, fields: fields }, - error: true - }; -}; + var _temp, _this, _ret; -var setSubmitSucceeded = function setSubmitSucceeded(form) { - for (var _len3 = arguments.length, fields = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { - fields[_key3 - 1] = arguments[_key3]; - } + (0, _classCallCheck3.default)(this, Tooltip); - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], - meta: { form: form, fields: fields }, - error: false - }; -}; + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -var touch = function touch(form) { - for (var _len4 = arguments.length, fields = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { - fields[_key4 - 1] = arguments[_key4]; + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tooltip.__proto__ || (0, _getPrototypeOf2.default)(Tooltip)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + offsetWidth: null + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], - meta: { form: form, fields: fields } - }; -}; - -var unregisterField = function unregisterField(form, name) { - var destroyOnUnmount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], - meta: { form: form }, - payload: { name: name, destroyOnUnmount: destroyOnUnmount } - }; -}; + (0, _createClass3.default)(Tooltip, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setRippleSize(); + this.setTooltipPosition(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps() { + this.setTooltipPosition(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.setRippleSize(); + } + }, { + key: 'setRippleSize', + value: function setRippleSize() { + var ripple = this.refs.ripple; + var tooltip = this.refs.tooltip; + var tooltipWidth = parseInt(tooltip.offsetWidth, 10) / (this.props.horizontalPosition === 'center' ? 2 : 1); + var tooltipHeight = parseInt(tooltip.offsetHeight, 10); -var untouch = function untouch(form) { - for (var _len5 = arguments.length, fields = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { - fields[_key5 - 1] = arguments[_key5]; - } + var rippleDiameter = Math.ceil(Math.sqrt(Math.pow(tooltipHeight, 2) + Math.pow(tooltipWidth, 2)) * 2); + if (this.props.show) { + ripple.style.height = rippleDiameter + 'px'; + ripple.style.width = rippleDiameter + 'px'; + } else { + ripple.style.width = '0px'; + ripple.style.height = '0px'; + } + } + }, { + key: 'setTooltipPosition', + value: function setTooltipPosition() { + this.setState({ offsetWidth: this.refs.tooltip.offsetWidth }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + horizontalPosition = _props.horizontalPosition, + label = _props.label, + show = _props.show, + touch = _props.touch, + verticalPosition = _props.verticalPosition, + other = (0, _objectWithoutProperties3.default)(_props, ['horizontalPosition', 'label', 'show', 'touch', 'verticalPosition']); + var prepareStyles = this.context.muiTheme.prepareStyles; - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], - meta: { form: form, fields: fields } - }; -}; + var styles = getStyles(this.props, this.context, this.state); -var updateSyncErrors = function updateSyncErrors(form) { - var syncErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var error = arguments[2]; - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], - meta: { form: form }, - payload: { syncErrors: syncErrors, error: error } - }; -}; + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { + ref: 'tooltip', + style: prepareStyles((0, _simpleAssign2.default)(styles.root, this.props.show && styles.rootWhenShown, this.props.touch && styles.rootWhenTouched, this.props.style)) + }), + _react2.default.createElement('div', { + ref: 'ripple', + style: prepareStyles((0, _simpleAssign2.default)(styles.ripple, this.props.show && styles.rippleWhenShown)) + }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + label + ) + ); + } + }]); + return Tooltip; +}(_react.Component); -var updateSyncWarnings = function updateSyncWarnings(form) { - var syncWarnings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var warning = arguments[2]; - return { - type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], - meta: { form: form }, - payload: { syncWarnings: syncWarnings, warning: warning } - }; +Tooltip.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired }; +process.env.NODE_ENV !== "production" ? Tooltip.propTypes = { + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + horizontalPosition: _react.PropTypes.oneOf(['left', 'right', 'center']), + label: _react.PropTypes.node.isRequired, + show: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + touch: _react.PropTypes.bool, + verticalPosition: _react.PropTypes.oneOf(['top', 'bottom']) +} : void 0; +exports.default = Tooltip; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 261 */ +/* 264 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var defaultShouldAsyncValidate = function defaultShouldAsyncValidate(_ref) { - var initialized = _ref.initialized, - trigger = _ref.trigger, - pristine = _ref.pristine, - syncValidationPasses = _ref.syncValidationPasses; +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); - if (!syncValidationPasses) { - return false; - } - switch (trigger) { - case 'blur': - // blurring - return true; - case 'submit': - // submitting, so only async validate if form is dirty or was never initialized - // conversely, DON'T async validate if the form is pristine just as it was initialized - return !pristine || !initialized; - default: - return false; + while (++index < length) { + result[index] = iteratee(array[index], index, array); } -}; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayMap); -/* harmony default export */ __webpack_exports__["a"] = (defaultShouldAsyncValidate); /***/ }), -/* 262 */ +/* 265 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var defaultShouldValidate = function defaultShouldValidate(_ref) { - var values = _ref.values, - nextProps = _ref.nextProps, - initialRender = _ref.initialRender, - lastFieldValidatorKeys = _ref.lastFieldValidatorKeys, - fieldValidatorKeys = _ref.fieldValidatorKeys, - structure = _ref.structure; +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; - if (initialRender) { - return true; + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; } - return !structure.deepEqual(values, nextProps.values) || !structure.deepEqual(lastFieldValidatorKeys, fieldValidatorKeys); -}; + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (copyArray); -/* harmony default export */ __webpack_exports__["a"] = (defaultShouldValidate); /***/ }), -/* 263 */ +/* 266 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error__ = __webpack_require__(502); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_es6_error__); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__ = __webpack_require__(506); -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - - -var SubmissionError = function (_ExtendableError) { - _inherits(SubmissionError, _ExtendableError); - function SubmissionError(errors) { - _classCallCheck(this, SubmissionError); +/** Used to match property names within property paths. */ +var reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - var _this = _possibleConstructorReturn(this, (SubmissionError.__proto__ || Object.getPrototypeOf(SubmissionError)).call(this, 'Submit Validation Failed')); - - _this.errors = errors; - return _this; - } - - return SubmissionError; -}(__WEBPACK_IMPORTED_MODULE_0_es6_error___default.a); - -/* harmony default export */ __webpack_exports__["a"] = (SubmissionError); - -/***/ }), -/* 264 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -var processProps = function processProps(type, props, _value) { - var value = props.value; - - if (type === 'checkbox') { - return _extends({}, props, { - checked: !!value - }); - } - if (type === 'radio') { - return _extends({}, props, { - checked: value === _value, - value: _value - }); - } - if (type === 'select-multiple') { - return _extends({}, props, { - value: value || [] - }); - } - if (type === 'file') { - return _extends({}, props, { - value: value || undefined - }); - } - return props; -}; - -var createFieldProps = function createFieldProps(_ref2, name, _ref) { - var getIn = _ref2.getIn, - toJS = _ref2.toJS; - - var asyncError = _ref.asyncError, - asyncValidating = _ref.asyncValidating, - onBlur = _ref.onBlur, - onChange = _ref.onChange, - onDrop = _ref.onDrop, - onDragStart = _ref.onDragStart, - dirty = _ref.dirty, - dispatch = _ref.dispatch, - onFocus = _ref.onFocus, - form = _ref.form, - format = _ref.format, - initial = _ref.initial, - parse = _ref.parse, - pristine = _ref.pristine, - props = _ref.props, - state = _ref.state, - submitError = _ref.submitError, - submitFailed = _ref.submitFailed, - submitting = _ref.submitting, - syncError = _ref.syncError, - syncWarning = _ref.syncWarning, - validate = _ref.validate, - value = _ref.value, - _value = _ref._value, - warn = _ref.warn, - custom = _objectWithoutProperties(_ref, ['asyncError', 'asyncValidating', 'onBlur', 'onChange', 'onDrop', 'onDragStart', 'dirty', 'dispatch', 'onFocus', 'form', 'format', 'initial', 'parse', 'pristine', 'props', 'state', 'submitError', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'validate', 'value', '_value', 'warn']); - - var error = syncError || asyncError || submitError; - var warning = syncWarning; - - var formatFieldValue = function formatFieldValue(value, format) { - if (format === null) { - return value; - } - var defaultFormattedValue = value == null ? '' : value; - return format ? format(value, name) : defaultFormattedValue; - }; - - var formattedFieldValue = formatFieldValue(value, format); - - return { - input: processProps(custom.type, { - name: name, - onBlur: onBlur, - onChange: onChange, - onDragStart: onDragStart, - onDrop: onDrop, - onFocus: onFocus, - value: formattedFieldValue - }, _value), - meta: _extends({}, toJS(state), { - active: !!(state && getIn(state, 'active')), - asyncValidating: asyncValidating, - autofilled: !!(state && getIn(state, 'autofilled')), - dirty: dirty, - dispatch: dispatch, - error: error, - form: form, - initial: initial, - warning: warning, - invalid: !!error, - pristine: pristine, - submitting: !!submitting, - submitFailed: !!submitFailed, - touched: !!(state && getIn(state, 'touched')), - valid: !error, - visited: !!(state && getIn(state, 'visited')) - }), - custom: _extends({}, custom, props) - }; -}; - -/* harmony default export */ __webpack_exports__["a"] = (createFieldProps); - -/***/ }), -/* 265 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getValue__ = __webpack_require__(507); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isReactNative__ = __webpack_require__(508); - - - -var onChangeValue = function onChangeValue(event, _ref) { - var name = _ref.name, - parse = _ref.parse, - normalize = _ref.normalize; - - // read value from input - var value = Object(__WEBPACK_IMPORTED_MODULE_0__getValue__["a" /* default */])(event, __WEBPACK_IMPORTED_MODULE_1__isReactNative__["a" /* default */] - - // parse value if we have a parser - );if (parse) { - value = parse(value, name); - } - - // normalize value - if (normalize) { - value = normalize(name, value); - } - - return value; -}; - -/* harmony default export */ __webpack_exports__["a"] = (onChangeValue); - -/***/ }), -/* 266 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -var isEvent = function isEvent(candidate) { - return !!(candidate && candidate.stopPropagation && candidate.preventDefault); -}; - -/* harmony default export */ __webpack_exports__["a"] = (isEvent); - -/***/ }), -/* 267 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/* harmony default export */ __webpack_exports__["a"] = (arrayMap); - - -/***/ }), -/* 268 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -/* harmony default export */ __webpack_exports__["a"] = (copyArray); - - -/***/ }), -/* 269 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__ = __webpack_require__(512); - - -/** Used to match property names within property paths. */ -var reLeadingDot = /^\./, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. @@ -19796,7 +19927,7 @@ var reEscapeChar = /\\(\\)?/g; * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ -var stringToPath = Object(__WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__["a" /* default */])(function(string) { +var stringToPath = __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__["a" /* default */](function(string) { var result = []; if (reLeadingDot.test(string)) { result.push(''); @@ -19811,7 +19942,7 @@ var stringToPath = Object(__WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__["a" /* /***/ }), -/* 270 */ +/* 267 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -19844,11 +19975,11 @@ function toSource(func) { /***/ }), -/* 271 */ +/* 268 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseToString_js__ = __webpack_require__(535); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseToString_js__ = __webpack_require__(529); /** @@ -19873,179 +20004,151 @@ function toSource(func) { * // => '1,2,3' */ function toString(value) { - return value == null ? '' : Object(__WEBPACK_IMPORTED_MODULE_0__baseToString_js__["a" /* default */])(value); + return value == null ? '' : __WEBPACK_IMPORTED_MODULE_0__baseToString_js__["a" /* default */](value); } /* harmony default export */ __webpack_exports__["a"] = (toString); /***/ }), -/* 272 */ +/* 269 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(167); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(117); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(85); + /** - * This method is like `_.isEqual` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with up to - * six arguments: (objValue, othValue [, index|key, object, other, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } - * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. * - * _.isEqualWith(array, other, customizer); - * // => true + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ -function isEqualWith(value, other, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */])(value, other, undefined, customizer) : !!result; +function assignMergeValue(object, key, value) { + if ((value !== undefined && !__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */](object[key], value)) || + (value === undefined && !(key in object))) { + __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](object, key, value); + } } -/* harmony default export */ __webpack_exports__["a"] = (isEqualWith); +/* harmony default export */ __webpack_exports__["a"] = (assignMergeValue); /***/ }), -/* 273 */ +/* 270 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SetCache_js__ = __webpack_require__(544); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arraySome_js__ = __webpack_require__(547); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cacheHas_js__ = __webpack_require__(548); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); +var defineProperty = (function() { + try { + var func = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); +/* harmony default export */ __webpack_exports__["a"] = (defineProperty); + + +/***/ }), +/* 271 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__ = __webpack_require__(538); -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; +var baseFor = __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__["a" /* default */](); - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new __WEBPACK_IMPORTED_MODULE_0__SetCache_js__["a" /* default */] : undefined; +/* harmony default export */ __webpack_exports__["a"] = (baseFor); - stack.set(array, other); - stack.set(other, array); - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; +/***/ }), +/* 272 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!Object(__WEBPACK_IMPORTED_MODULE_1__arraySome_js__["a" /* default */])(other, function(othValue, othIndex) { - if (!Object(__WEBPACK_IMPORTED_MODULE_2__cacheHas_js__["a" /* default */])(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(31); -/* harmony default export */ __webpack_exports__["a"] = (equalArrays); + +/** Built-in value references. */ +var Uint8Array = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Uint8Array; + +/* harmony default export */ __webpack_exports__["a"] = (Uint8Array); /***/ }), -/* 274 */ +/* 273 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(34); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(274); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__ = __webpack_require__(555); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(118); -/** Built-in value references. */ -var Uint8Array = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Uint8Array; -/* harmony default export */ __webpack_exports__["a"] = (Uint8Array); + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */](object) ? __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */](object, true) : __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__["a" /* default */](object); +} + +/* harmony default export */ __webpack_exports__["a"] = (keysIn); /***/ }), -/* 275 */ +/* 274 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__ = __webpack_require__(559); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(170); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(35); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__ = __webpack_require__(171); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isIndex_js__ = __webpack_require__(173); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__ = __webpack_require__(554); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isIndex_js__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__ = __webpack_require__(177); @@ -20068,12 +20171,12 @@ var hasOwnProperty = objectProto.hasOwnProperty; * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { - var isArr = Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value), - isArg = !isArr && Object(__WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */])(value), - isBuff = !isArr && !isArg && Object(__WEBPACK_IMPORTED_MODULE_3__isBuffer_js__["a" /* default */])(value), - isType = !isArr && !isArg && !isBuff && Object(__WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__["a" /* default */])(value), + var isArr = __WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value), + isArg = !isArr && __WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */](value), + isBuff = !isArr && !isArg && __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__["a" /* default */](value), + isType = !isArr && !isArg && !isBuff && __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__["a" /* default */](value), skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? Object(__WEBPACK_IMPORTED_MODULE_0__baseTimes_js__["a" /* default */])(value.length, String) : [], + result = skipIndexes ? __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__["a" /* default */](value.length, String) : [], length = result.length; for (var key in value) { @@ -20086,7 +20189,7 @@ function arrayLikeKeys(value, inherited) { // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. - Object(__WEBPACK_IMPORTED_MODULE_4__isIndex_js__["a" /* default */])(key, length) + __WEBPACK_IMPORTED_MODULE_4__isIndex_js__["a" /* default */](key, length) ))) { result.push(key); } @@ -20098,40 +20201,13 @@ function arrayLikeKeys(value, inherited) { /***/ }), -/* 276 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(272); - - - -var customizer = function customizer(objectValue, otherValue, indexOrkey, object, other, stack) { - // https://lodash.com/docs/4.17.4#isEqualWith - if (stack) { - // Shallow compares - // For 1st level, stack === undefined. - // -> Do nothing (and implicitly return undefined so that it goes to compare 2nd level) - // For 2nd level and up, stack !== undefined. - // -> Compare by === operator - return objectValue === otherValue; - } -}; - -var shallowCompare = function shallowCompare(instance, nextProps, nextState) { - return !Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */])(instance.props, nextProps, customizer) || !Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */])(instance.state, nextState, customizer); -}; - -/* harmony default export */ __webpack_exports__["a"] = (shallowCompare); - -/***/ }), -/* 277 */ +/* 275 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(117); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__ = __webpack_require__(580); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(582); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__ = __webpack_require__(566); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(569); @@ -20166,10 +20242,10 @@ var shallowCompare = function shallowCompare(instance, nextProps, nextState) { */ function mapValues(object, iteratee) { var result = {}; - iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(iteratee, 3); + iteratee = __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */](iteratee, 3); - Object(__WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__["a" /* default */])(object, function(value, key, object) { - Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(result, key, iteratee(value, key, object)); + __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__["a" /* default */](object, function(value, key, object) { + __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](result, key, iteratee(value, key, object)); }); return result; } @@ -20178,73 +20254,123 @@ function mapValues(object, iteratee) { /***/ }), -/* 278 */ +/* 276 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(57); - - -var defineProperty = (function() { - try { - var func = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); - -/* harmony default export */ __webpack_exports__["a"] = (defineProperty); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SetCache_js__ = __webpack_require__(573); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arraySome_js__ = __webpack_require__(576); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cacheHas_js__ = __webpack_require__(577); -/***/ }), -/* 279 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__ = __webpack_require__(581); +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; /** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ -var baseFor = Object(__WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__["a" /* default */])(); - -/* harmony default export */ __webpack_exports__["a"] = (baseFor); - +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; -/***/ }), -/* 280 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new __WEBPACK_IMPORTED_MODULE_0__SetCache_js__["a" /* default */] : undefined; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(45); + stack.set(array, other); + stack.set(other, array); + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(value); + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!__WEBPACK_IMPORTED_MODULE_1__arraySome_js__["a" /* default */](other, function(othValue, othIndex) { + if (!__WEBPACK_IMPORTED_MODULE_2__cacheHas_js__["a" /* default */](seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (equalArrays); + + +/***/ }), +/* 277 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(47); + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](value); } /* harmony default export */ __webpack_exports__["a"] = (isStrictComparable); /***/ }), -/* 281 */ +/* 278 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -20271,12 +20397,12 @@ function matchesStrictComparable(key, srcValue) { /***/ }), -/* 282 */ +/* 279 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(283); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toKey_js__ = __webpack_require__(87); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(280); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toKey_js__ = __webpack_require__(86); @@ -20289,13 +20415,13 @@ function matchesStrictComparable(key, srcValue) { * @returns {*} Returns the resolved value. */ function baseGet(object, path) { - path = Object(__WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */])(path, object); + path = __WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */](path, object); var index = 0, length = path.length; while (object != null && index < length) { - object = object[Object(__WEBPACK_IMPORTED_MODULE_1__toKey_js__["a" /* default */])(path[index++])]; + object = object[__WEBPACK_IMPORTED_MODULE_1__toKey_js__["a" /* default */](path[index++])]; } return (index && index == length) ? object : undefined; } @@ -20304,14 +20430,14 @@ function baseGet(object, path) { /***/ }), -/* 283 */ +/* 280 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(35); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isKey_js__ = __webpack_require__(177); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__ = __webpack_require__(269); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(271); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isKey_js__ = __webpack_require__(182); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__ = __webpack_require__(266); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(268); @@ -20326,302 +20452,729 @@ function baseGet(object, path) { * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */])(value)) { + if (__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */](value)) { return value; } - return Object(__WEBPACK_IMPORTED_MODULE_1__isKey_js__["a" /* default */])(value, object) ? [value] : Object(__WEBPACK_IMPORTED_MODULE_2__stringToPath_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(value)); + return __WEBPACK_IMPORTED_MODULE_1__isKey_js__["a" /* default */](value, object) ? [value] : __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */](value)); } /* harmony default export */ __webpack_exports__["a"] = (castPath); /***/ }), -/* 284 */ +/* 281 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var createIsPristine = function createIsPristine(_ref) { - var deepEqual = _ref.deepEqual, - empty = _ref.empty, - getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - var formState = getFormState(state); - var initial = getIn(formState, form + '.initial') || empty; - var values = getIn(formState, form + '.values') || initial; - return deepEqual(initial, values); - }; - }; -}; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmit", function() { return clearSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearAsyncError", function() { return clearAsyncError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncErrors", function() { return updateSyncErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncWarnings", function() { return updateSyncWarnings; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(167); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -/* harmony default export */ __webpack_exports__["a"] = (createIsPristine); -/***/ }), -/* 285 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(117); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(86); +var arrayInsert = function arrayInsert(form, field, index, value) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], meta: { form: form, field: field, index: index }, payload: value }; +}; +var arrayMove = function arrayMove(form, field, from, to) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], meta: { form: form, field: field, from: from, to: to } }; +}; +var arrayPop = function arrayPop(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], meta: { form: form, field: field } }; +}; -/** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignMergeValue(object, key, value) { - if ((value !== undefined && !Object(__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */])(object[key], value)) || - (value === undefined && !(key in object))) { - Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(object, key, value); - } -} +var arrayPush = function arrayPush(form, field, value) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], meta: { form: form, field: field }, payload: value }; +}; -/* harmony default export */ __webpack_exports__["a"] = (assignMergeValue); +var arrayRemove = function arrayRemove(form, field, index) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], meta: { form: form, field: field, index: index } }; +}; +var arrayRemoveAll = function arrayRemoveAll(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], meta: { form: form, field: field } }; +}; -/***/ }), -/* 286 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var arrayShift = function arrayShift(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], meta: { form: form, field: field } }; +}; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(275); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__ = __webpack_require__(642); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(116); +var arraySplice = function arraySplice(form, field, index, removeNum, value) { + var action = { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], + meta: { form: form, field: field, index: index, removeNum: removeNum } + }; + if (value !== undefined) { + action.payload = value; + } + return action; +}; +var arraySwap = function arraySwap(form, field, indexA, indexB) { + if (indexA === indexB) { + throw new Error('Swap indices cannot be equal'); + } + if (indexA < 0 || indexB < 0) { + throw new Error('Swap indices cannot be negative'); + } + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], meta: { form: form, field: field, indexA: indexA, indexB: indexB } }; +}; +var arrayUnshift = function arrayUnshift(form, field, value) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], meta: { form: form, field: field }, payload: value }; +}; +var autofill = function autofill(form, field, value) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], meta: { form: form, field: field }, payload: value }; +}; -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return Object(__WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */])(object) ? Object(__WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */])(object, true) : Object(__WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__["a" /* default */])(object); -} +var blur = function blur(form, field, value, touch) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], meta: { form: form, field: field, touch: touch }, payload: value }; +}; -/* harmony default export */ __webpack_exports__["a"] = (keysIn); +var change = function change(form, field, value, touch, persistentSubmitErrors) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], meta: { form: form, field: field, touch: touch, persistentSubmitErrors: persistentSubmitErrors }, payload: value }; +}; +var clearSubmit = function clearSubmit(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], meta: { form: form } }; +}; -/***/ }), -/* 287 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var clearAsyncError = function clearAsyncError(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], meta: { form: form, field: field } }; +}; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(266); +var destroy = function destroy() { + for (var _len = arguments.length, form = Array(_len), _key = 0; _key < _len; _key++) { + form[_key] = arguments[_key]; + } + + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"], meta: { form: form } }; +}; +var focus = function focus(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], meta: { form: form, field: field } }; +}; -var silenceEvent = function silenceEvent(event) { - var is = Object(__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */])(event); - if (is) { - event.preventDefault(); +var initialize = function initialize(form, values, keepDirty) { + var otherMeta = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + if (keepDirty instanceof Object) { + otherMeta = keepDirty; + keepDirty = false; } - return is; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], meta: _extends({ form: form, keepDirty: keepDirty }, otherMeta), payload: values }; }; -/* harmony default export */ __webpack_exports__["a"] = (silenceEvent); +var registerField = function registerField(form, name, type) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], meta: { form: form }, payload: { name: name, type: type } }; +}; -/***/ }), -/* 288 */ -/***/ (function(module, exports, __webpack_require__) { +var reset = function reset(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], meta: { form: form } }; +}; -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { +var startAsyncValidation = function startAsyncValidation(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], meta: { form: form, field: field } }; +}; -Object.defineProperty(exports, "__esModule", { - value: true -}); +var startSubmit = function startSubmit(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], meta: { form: form } }; +}; -var _extends2 = __webpack_require__(8); +var stopAsyncValidation = function stopAsyncValidation(form, errors) { + var action = { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], + meta: { form: form }, + payload: errors + }; + if (errors && Object.keys(errors).length) { + action.error = true; + } + return action; +}; -var _extends3 = _interopRequireDefault(_extends2); +var stopSubmit = function stopSubmit(form, errors) { + var action = { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], + meta: { form: form }, + payload: errors + }; + if (errors && Object.keys(errors).length) { + action.error = true; + } + return action; +}; -var _objectWithoutProperties2 = __webpack_require__(9); +var submit = function submit(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], meta: { form: form } }; +}; -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); +var setSubmitFailed = function setSubmitFailed(form) { + for (var _len2 = arguments.length, fields = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + fields[_key2 - 1] = arguments[_key2]; + } -var _getPrototypeOf = __webpack_require__(4); + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], meta: { form: form, fields: fields }, error: true }; +}; -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var setSubmitSucceeded = function setSubmitSucceeded(form) { + for (var _len3 = arguments.length, fields = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { + fields[_key3 - 1] = arguments[_key3]; + } -var _classCallCheck2 = __webpack_require__(2); + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], meta: { form: form, fields: fields }, error: false }; +}; -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var touch = function touch(form) { + for (var _len4 = arguments.length, fields = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { + fields[_key4 - 1] = arguments[_key4]; + } -var _createClass2 = __webpack_require__(3); + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], meta: { form: form, fields: fields } }; +}; -var _createClass3 = _interopRequireDefault(_createClass2); +var unregisterField = function unregisterField(form, name) { + var destroyOnUnmount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], meta: { form: form }, payload: { name: name, destroyOnUnmount: destroyOnUnmount } }; +}; -var _possibleConstructorReturn2 = __webpack_require__(5); +var untouch = function untouch(form) { + for (var _len5 = arguments.length, fields = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { + fields[_key5 - 1] = arguments[_key5]; + } -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], meta: { form: form, fields: fields } }; +}; -var _inherits2 = __webpack_require__(6); +var updateSyncErrors = function updateSyncErrors(form) { + var syncErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var error = arguments[2]; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], meta: { form: form }, payload: { syncErrors: syncErrors, error: error } }; +}; -var _inherits3 = _interopRequireDefault(_inherits2); +var updateSyncWarnings = function updateSyncWarnings(form) { + var syncWarnings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var warning = arguments[2]; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], meta: { form: form }, payload: { syncWarnings: syncWarnings, warning: warning } }; +}; -var _simpleAssign = __webpack_require__(7); +/***/ }), +/* 282 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error__ = __webpack_require__(604); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_es6_error__); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var _react = __webpack_require__(1); +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -var _react2 = _interopRequireDefault(_react); +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -var _reactDom = __webpack_require__(18); -var _reactDom2 = _interopRequireDefault(_reactDom); -var _shallowEqual = __webpack_require__(54); +var SubmissionError = function (_ExtendableError) { + _inherits(SubmissionError, _ExtendableError); -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + function SubmissionError(errors) { + _classCallCheck(this, SubmissionError); -var _Popover = __webpack_require__(119); + var _this = _possibleConstructorReturn(this, (SubmissionError.__proto__ || Object.getPrototypeOf(SubmissionError)).call(this, 'Submit Validation Failed')); -var _Popover2 = _interopRequireDefault(_Popover); + _this.errors = errors; + return _this; + } -var _check = __webpack_require__(669); + return SubmissionError; +}(__WEBPACK_IMPORTED_MODULE_0_es6_error___default.a); -var _check2 = _interopRequireDefault(_check); +/* harmony default export */ __webpack_exports__["a"] = (SubmissionError); -var _ListItem = __webpack_require__(678); +/***/ }), +/* 283 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var _ListItem2 = _interopRequireDefault(_ListItem); +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(284); -var _Menu = __webpack_require__(181); -var _Menu2 = _interopRequireDefault(_Menu); +var silenceEvent = function silenceEvent(event) { + var is = __WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */](event); + if (is) { + event.preventDefault(); + } + return is; +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/* harmony default export */ __webpack_exports__["a"] = (silenceEvent); -var nestedMenuStyle = { - position: 'relative' +/***/ }), +/* 284 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var isEvent = function isEvent(candidate) { + return !!(candidate && candidate.stopPropagation && candidate.preventDefault); }; -function getStyles(props, context) { - var disabledColor = context.muiTheme.baseTheme.palette.disabledColor; - var textColor = context.muiTheme.baseTheme.palette.textColor; - var indent = props.desktop ? 64 : 72; - var sidePadding = props.desktop ? 24 : 16; +/* harmony default export */ __webpack_exports__["a"] = (isEvent); - var styles = { - root: { - color: props.disabled ? disabledColor : textColor, - cursor: props.disabled ? 'not-allowed' : 'pointer', - minHeight: props.desktop ? '32px' : '48px', - lineHeight: props.desktop ? '32px' : '48px', - fontSize: props.desktop ? 15 : 16, - whiteSpace: 'nowrap' - }, +/***/ }), +/* 285 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - innerDivStyle: { - paddingLeft: props.leftIcon || props.insetChildren || props.checked ? indent : sidePadding, - paddingRight: props.rightIcon ? indent : sidePadding, - paddingBottom: 0, - paddingTop: 0 - }, +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(111); - secondaryText: { - float: 'right' - }, - leftIconDesktop: { - margin: 0, - left: 24, - top: 4 - }, - rightIconDesktop: { - margin: 0, - right: 24, - top: 4, - fill: context.muiTheme.menuItem.rightIconDesktopFill - } - }; +var getIn = function getIn(state, field) { + if (!state) { + return state; + } - return styles; -} + var path = __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field); + var length = path.length; + if (!length) { + return undefined; + } -var MenuItem = function (_Component) { - (0, _inherits3.default)(MenuItem, _Component); + var result = state; + for (var i = 0; i < length && !!result; ++i) { + result = result[path[i]]; + } - function MenuItem() { - var _ref; + return result; +}; - var _temp, _this, _ret; +/* harmony default export */ __webpack_exports__["a"] = (getIn); - (0, _classCallCheck3.default)(this, MenuItem); +/***/ }), +/* 286 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(181); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuItem.__proto__ || (0, _getPrototypeOf2.default)(MenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - open: false - }, _this.cloneMenuItem = function (item) { - return _react2.default.cloneElement(item, { - onTouchTap: function onTouchTap(event) { - if (!item.props.menuItems) { - _this.handleRequestClose(); - } - if (item.props.onTouchTap) { - item.props.onTouchTap(event); - } - } - }); - }, _this.handleTouchTap = function (event) { - event.preventDefault(); +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */](value, other, undefined, customizer) : !!result; +} - _this.setState({ - open: true, - anchorEl: _reactDom2.default.findDOMNode(_this) - }); +/* harmony default export */ __webpack_exports__["a"] = (isEqualWith); - if (_this.props.onTouchTap) { - _this.props.onTouchTap(event); - } - }, _this.handleRequestClose = function () { - _this.setState({ - open: false, - anchorEl: null - }); - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - (0, _createClass3.default)(MenuItem, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.applyFocusState(); - } - }, { +/***/ }), +/* 287 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var processProps = function processProps(type, props, _value) { + var value = props.value; + + if (type === 'checkbox') { + return _extends({}, props, { + checked: !!value + }); + } + if (type === 'radio') { + return _extends({}, props, { + checked: value === _value, + value: _value + }); + } + if (type === 'select-multiple') { + return _extends({}, props, { + value: value || [] + }); + } + if (type === 'file') { + return _extends({}, props, { + value: value || undefined + }); + } + return props; +}; + +var createFieldProps = function createFieldProps(_ref2, name, _ref) { + var getIn = _ref2.getIn, + toJS = _ref2.toJS; + + var asyncError = _ref.asyncError, + asyncValidating = _ref.asyncValidating, + onBlur = _ref.onBlur, + onChange = _ref.onChange, + onDrop = _ref.onDrop, + onDragStart = _ref.onDragStart, + dirty = _ref.dirty, + dispatch = _ref.dispatch, + onFocus = _ref.onFocus, + form = _ref.form, + format = _ref.format, + parse = _ref.parse, + pristine = _ref.pristine, + props = _ref.props, + state = _ref.state, + submitError = _ref.submitError, + submitFailed = _ref.submitFailed, + submitting = _ref.submitting, + syncError = _ref.syncError, + syncWarning = _ref.syncWarning, + validate = _ref.validate, + value = _ref.value, + _value = _ref._value, + warn = _ref.warn, + custom = _objectWithoutProperties(_ref, ['asyncError', 'asyncValidating', 'onBlur', 'onChange', 'onDrop', 'onDragStart', 'dirty', 'dispatch', 'onFocus', 'form', 'format', 'parse', 'pristine', 'props', 'state', 'submitError', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'validate', 'value', '_value', 'warn']); + + var error = syncError || asyncError || submitError; + var warning = syncWarning; + + var formatFieldValue = function formatFieldValue(value, format) { + if (format === null) { + return value; + } + var defaultFormattedValue = value == null ? '' : value; + return format ? format(value, name) : defaultFormattedValue; + }; + + var formattedFieldValue = formatFieldValue(value, format); + + return { + input: processProps(custom.type, { + name: name, + onBlur: onBlur, + onChange: onChange, + onDragStart: onDragStart, + onDrop: onDrop, + onFocus: onFocus, + value: formattedFieldValue + }, _value), + meta: _extends({}, toJS(state), { + active: !!(state && getIn(state, 'active')), + asyncValidating: asyncValidating, + autofilled: !!(state && getIn(state, 'autofilled')), + dirty: dirty, + dispatch: dispatch, + error: error, + form: form, + warning: warning, + invalid: !!error, + pristine: pristine, + submitting: !!submitting, + submitFailed: !!submitFailed, + touched: !!(state && getIn(state, 'touched')), + valid: !error, + visited: !!(state && getIn(state, 'visited')) + }), + custom: _extends({}, custom, props) + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFieldProps); + +/***/ }), +/* 288 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getValue__ = __webpack_require__(618); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isReactNative__ = __webpack_require__(619); + + + +var onChangeValue = function onChangeValue(event, _ref) { + var name = _ref.name, + parse = _ref.parse, + normalize = _ref.normalize; + + // read value from input + var value = __WEBPACK_IMPORTED_MODULE_0__getValue__["a" /* default */](event, __WEBPACK_IMPORTED_MODULE_1__isReactNative__["a" /* default */]); + + // parse value if we have a parser + if (parse) { + value = parse(value, name); + } + + // normalize value + if (normalize) { + value = normalize(name, value); + } + + return value; +}; + +/* harmony default export */ __webpack_exports__["a"] = (onChangeValue); + +/***/ }), +/* 289 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createIsPristine = function createIsPristine(_ref) { + var deepEqual = _ref.deepEqual, + empty = _ref.empty, + getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + var initial = getIn(formState, form + '.initial') || empty; + var values = getIn(formState, form + '.values') || initial; + return deepEqual(initial, values); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsPristine); + +/***/ }), +/* 290 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(58); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _Popover = __webpack_require__(120); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _check = __webpack_require__(649); + +var _check2 = _interopRequireDefault(_check); + +var _ListItem = __webpack_require__(658); + +var _ListItem2 = _interopRequireDefault(_ListItem); + +var _Menu = __webpack_require__(186); + +var _Menu2 = _interopRequireDefault(_Menu); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var nestedMenuStyle = { + position: 'relative' +}; + +function getStyles(props, context) { + var disabledColor = context.muiTheme.baseTheme.palette.disabledColor; + var textColor = context.muiTheme.baseTheme.palette.textColor; + var indent = props.desktop ? 64 : 72; + var sidePadding = props.desktop ? 24 : 16; + + var styles = { + root: { + color: props.disabled ? disabledColor : textColor, + cursor: props.disabled ? 'not-allowed' : 'pointer', + minHeight: props.desktop ? '32px' : '48px', + lineHeight: props.desktop ? '32px' : '48px', + fontSize: props.desktop ? 15 : 16, + whiteSpace: 'nowrap' + }, + + innerDivStyle: { + paddingLeft: props.leftIcon || props.insetChildren || props.checked ? indent : sidePadding, + paddingRight: props.rightIcon ? indent : sidePadding, + paddingBottom: 0, + paddingTop: 0 + }, + + secondaryText: { + float: 'right' + }, + + leftIconDesktop: { + margin: 0, + left: 24, + top: 4 + }, + + rightIconDesktop: { + margin: 0, + right: 24, + top: 4, + fill: context.muiTheme.menuItem.rightIconDesktopFill + } + }; + + return styles; +} + +var MenuItem = function (_Component) { + (0, _inherits3.default)(MenuItem, _Component); + + function MenuItem() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, MenuItem); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuItem.__proto__ || (0, _getPrototypeOf2.default)(MenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.cloneMenuItem = function (item) { + return _react2.default.cloneElement(item, { + onTouchTap: function onTouchTap(event) { + if (!item.props.menuItems) { + _this.handleRequestClose(); + } + + if (item.props.onTouchTap) { + item.props.onTouchTap(event); + } + } + }); + }, _this.handleTouchTap = function (event) { + event.preventDefault(); + + _this.setState({ + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this) + }); + + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + }, _this.handleRequestClose = function () { + _this.setState({ + open: false, + anchorEl: null + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(MenuItem, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.applyFocusState(); + } + }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if (this.state.open && nextProps.focusState === 'none') { @@ -20832,7 +21385,7 @@ exports.default = MenuItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 289 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -20864,9 +21417,9 @@ var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(1); -var _reactDom = __webpack_require__(18); +var _reactDom = __webpack_require__(17); -var _dom = __webpack_require__(247); +var _dom = __webpack_require__(250); var _dom2 = _interopRequireDefault(_dom); @@ -21018,7 +21571,7 @@ exports.default = RenderToLayer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 290 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21032,7 +21585,7 @@ var createHelper = function createHelper(func, helperName) { if (process.env.NODE_ENV !== 'production' && setDisplayName) { var _ret = function () { /* eslint-disable global-require */ - var wrapDisplayName = __webpack_require__(671).default; + var wrapDisplayName = __webpack_require__(651).default; /* eslint-enable global-require */ if (noArgs) { @@ -21070,7 +21623,7 @@ exports.default = createHelper; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 291 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21116,7 +21669,7 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _Subheader = __webpack_require__(682); +var _Subheader = __webpack_require__(662); var _Subheader2 = _interopRequireDefault(_Subheader); @@ -21181,47 +21734,139 @@ exports.default = List; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 292 */ +/* 294 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - +/* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = undefined; -var _FlatButton = __webpack_require__(709); +var _getPrototypeOf = __webpack_require__(4); -var _FlatButton2 = _interopRequireDefault(_FlatButton); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _classCallCheck2 = __webpack_require__(2); -exports.default = _FlatButton2.default; +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -/***/ }), -/* 293 */ -/***/ (function(module, exports, __webpack_require__) { +var _createClass2 = __webpack_require__(3); -"use strict"; +var _createClass3 = _interopRequireDefault(_createClass2); +var _possibleConstructorReturn2 = __webpack_require__(5); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var _Dialog = __webpack_require__(720); +var _inherits2 = __webpack_require__(6); -var _Dialog2 = _interopRequireDefault(_Dialog); +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _events = __webpack_require__(148); + +var _events2 = _interopRequireDefault(_events); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = _Dialog2.default; +var isDescendant = function isDescendant(el, target) { + if (target !== null) { + return el === target || isDescendant(el, target.parentNode); + } + return false; +}; + +var clickAwayEvents = ['mouseup', 'touchend']; +var bind = function bind(callback) { + return clickAwayEvents.forEach(function (event) { + return _events2.default.on(document, event, callback); + }); +}; +var unbind = function unbind(callback) { + return clickAwayEvents.forEach(function (event) { + return _events2.default.off(document, event, callback); + }); +}; + +var ClickAwayListener = function (_Component) { + (0, _inherits3.default)(ClickAwayListener, _Component); + + function ClickAwayListener() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClickAwayListener); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClickAwayListener.__proto__ || (0, _getPrototypeOf2.default)(ClickAwayListener)).call.apply(_ref, [this].concat(args))), _this), _this.handleClickAway = function (event) { + if (event.defaultPrevented) { + return; + } + + // IE11 support, which trigger the handleClickAway even after the unbind + if (_this.isCurrentlyMounted) { + var el = _reactDom2.default.findDOMNode(_this); + + if (document.documentElement.contains(event.target) && !isDescendant(el, event.target)) { + _this.props.onClickAway(event); + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClickAwayListener, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.isCurrentlyMounted = true; + if (this.props.onClickAway) { + bind(this.handleClickAway); + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps) { + if (prevProps.onClickAway !== this.props.onClickAway) { + unbind(this.handleClickAway); + if (this.props.onClickAway) { + bind(this.handleClickAway); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.isCurrentlyMounted = false; + unbind(this.handleClickAway); + } + }, { + key: 'render', + value: function render() { + return this.props.children; + } + }]); + return ClickAwayListener; +}(_react.Component); + +process.env.NODE_ENV !== "production" ? ClickAwayListener.propTypes = { + children: _react.PropTypes.element, + onClickAway: _react.PropTypes.func +} : void 0; +exports.default = ClickAwayListener; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 294 */ +/* 295 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -21231,6 +21876,18 @@ Object.defineProperty(exports, "__esModule", { value: true }); +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _typeof2 = __webpack_require__(42); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + var _getPrototypeOf = __webpack_require__(4); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); @@ -21259,2247 +21916,1922 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _Paper = __webpack_require__(39); +var _reactDom = __webpack_require__(17); -var _Paper2 = _interopRequireDefault(_Paper); +var _reactDom2 = _interopRequireDefault(_reactDom); -var _transitions = __webpack_require__(12); +var _keycode = __webpack_require__(27); -var _transitions2 = _interopRequireDefault(_transitions); +var _keycode2 = _interopRequireDefault(_keycode); -var _propTypes = __webpack_require__(44); +var _TextField = __webpack_require__(89); -var _propTypes2 = _interopRequireDefault(_propTypes); +var _TextField2 = _interopRequireDefault(_TextField); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _Menu = __webpack_require__(670); -function getStyles(props, context, state) { - var targetOrigin = props.targetOrigin; - var open = state.open; - var muiTheme = context.muiTheme; +var _Menu2 = _interopRequireDefault(_Menu); - var horizontal = targetOrigin.horizontal.replace('middle', 'vertical'); +var _MenuItem = __webpack_require__(87); - return { - root: { - position: 'fixed', - zIndex: muiTheme.zIndex.popover, - opacity: open ? 1 : 0, - transform: open ? 'scaleY(1)' : 'scaleY(0)', - transformOrigin: horizontal + ' ' + targetOrigin.vertical, - transition: _transitions2.default.easeOut('450ms', ['transform', 'opacity']), - maxHeight: '100%' - } - }; -} +var _MenuItem2 = _interopRequireDefault(_MenuItem); -var PopoverAnimationVertical = function (_Component) { - (0, _inherits3.default)(PopoverAnimationVertical, _Component); +var _Divider = __webpack_require__(671); - function PopoverAnimationVertical() { - var _ref; +var _Divider2 = _interopRequireDefault(_Divider); - var _temp, _this, _ret; +var _Popover = __webpack_require__(120); - (0, _classCallCheck3.default)(this, PopoverAnimationVertical); +var _Popover2 = _interopRequireDefault(_Popover); - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PopoverAnimationVertical.__proto__ || (0, _getPrototypeOf2.default)(PopoverAnimationVertical)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - open: false - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - - (0, _createClass3.default)(PopoverAnimationVertical, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.setState({ open: true }); // eslint-disable-line react/no-did-mount-set-state - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - this.setState({ - open: nextProps.open - }); - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - className = _props.className, - style = _props.style, - zDepth = _props.zDepth; - - - var styles = getStyles(this.props, this.context, this.state); - - return _react2.default.createElement( - _Paper2.default, - { - style: (0, _simpleAssign2.default)(styles.root, style), - zDepth: zDepth, - className: className - }, - this.props.children - ); - } - }]); - return PopoverAnimationVertical; -}(_react.Component); - -PopoverAnimationVertical.defaultProps = { - style: {}, - zDepth: 1 -}; -PopoverAnimationVertical.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; -process.env.NODE_ENV !== "production" ? PopoverAnimationVertical.propTypes = { - children: _react.PropTypes.node, - className: _react.PropTypes.string, - open: _react.PropTypes.bool.isRequired, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - targetOrigin: _propTypes2.default.origin.isRequired, - zDepth: _propTypes2.default.zDepth -} : void 0; -exports.default = PopoverAnimationVertical; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +var _propTypes = __webpack_require__(46); -/***/ }), -/* 295 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = exports.RadioButtonGroup = exports.RadioButton = undefined; - -var _RadioButton2 = __webpack_require__(724); - -var _RadioButton3 = _interopRequireDefault(_RadioButton2); - -var _RadioButtonGroup2 = __webpack_require__(727); - -var _RadioButtonGroup3 = _interopRequireDefault(_RadioButtonGroup2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.RadioButton = _RadioButton3.default; -exports.RadioButtonGroup = _RadioButtonGroup3.default; -exports.default = _RadioButton3.default; - -/***/ }), -/* 296 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _isIterable2 = __webpack_require__(748); - -var _isIterable3 = _interopRequireDefault(_isIterable2); - -var _getIterator2 = __webpack_require__(209); - -var _getIterator3 = _interopRequireDefault(_getIterator2); +var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if ((0, _isIterable3.default)(Object(arr))) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; -}(); - -/***/ }), -/* 297 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _getPrototypeOf = __webpack_require__(4); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(2); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(3); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(5); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(6); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _slicedToArray2 = __webpack_require__(296); - -var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); - -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); - -var _timeUtils = __webpack_require__(89); +function getStyles(props, context, state) { + var anchorEl = state.anchorEl; + var fullWidth = props.fullWidth; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props, context) { var styles = { root: { - directionInvariant: true, display: 'inline-block', - position: 'absolute', - width: 32, - height: 32, - borderRadius: '100%', - left: 'calc(50% - 16px)', - top: 10, - textAlign: 'center', - paddingTop: 5, - userSelect: 'none', /* Chrome all / Safari all */ - fontSize: '1.1em', - pointerEvents: 'none', - boxSizing: 'border-box' + position: 'relative', + width: fullWidth ? '100%' : 256 + }, + menu: { + width: '100%' + }, + list: { + display: 'block', + width: fullWidth ? '100%' : 256 + }, + innerDiv: { + overflow: 'hidden' } }; - var muiTheme = context.muiTheme; - - - var pos = props.value; - - if (props.type === 'hour') { - pos %= 12; - } else { - pos = pos / 5; - } - - var positions = [[0, 5], [54.5, 16.6], [94.4, 59.5], [109, 114], [94.4, 168.5], [54.5, 208.4], [0, 223], [-54.5, 208.4], [-94.4, 168.5], [-109, 114], [-94.4, 59.5], [-54.5, 19.6]]; - - var innerPositions = [[0, 40], [36.9, 49.9], [64, 77], [74, 114], [64, 151], [37, 178], [0, 188], [-37, 178], [-64, 151], [-74, 114], [-64, 77], [-37, 50]]; - - if (props.isSelected) { - styles.root.backgroundColor = muiTheme.timePicker.accentColor; - styles.root.color = muiTheme.timePicker.selectTextColor; - } - - var transformPos = positions[pos]; - - if ((0, _timeUtils.isInner)(props)) { - styles.root.width = 28; - styles.root.height = 28; - styles.root.left = 'calc(50% - 14px)'; - transformPos = innerPositions[pos]; + if (anchorEl && fullWidth) { + styles.popover = { + width: anchorEl.clientWidth + }; } - var _transformPos = transformPos, - _transformPos2 = (0, _slicedToArray3.default)(_transformPos, 2), - x = _transformPos2[0], - y = _transformPos2[1]; - - styles.root.transform = 'translate(' + x + 'px, ' + y + 'px)'; - return styles; } -var ClockNumber = function (_Component) { - (0, _inherits3.default)(ClockNumber, _Component); +var AutoComplete = function (_Component) { + (0, _inherits3.default)(AutoComplete, _Component); - function ClockNumber() { - (0, _classCallCheck3.default)(this, ClockNumber); - return (0, _possibleConstructorReturn3.default)(this, (ClockNumber.__proto__ || (0, _getPrototypeOf2.default)(ClockNumber)).apply(this, arguments)); - } + function AutoComplete() { + var _ref; - (0, _createClass3.default)(ClockNumber, [{ - key: 'render', - value: function render() { - var prepareStyles = this.context.muiTheme.prepareStyles; + var _temp, _this, _ret; - var styles = getStyles(this.props, this.context); - var clockNumber = this.props.value === 0 ? '00' : this.props.value; + (0, _classCallCheck3.default)(this, AutoComplete); - return _react2.default.createElement( - 'span', - { style: prepareStyles(styles.root) }, - clockNumber - ); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; } - }]); - return ClockNumber; -}(_react.Component); - -ClockNumber.defaultProps = { - value: 0, - type: 'minute', - isSelected: false -}; -ClockNumber.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; -process.env.NODE_ENV !== "production" ? ClockNumber.propTypes = { - isSelected: _react.PropTypes.bool, - onSelected: _react.PropTypes.func, - type: _react.PropTypes.oneOf(['hour', 'minute']), - value: _react.PropTypes.number -} : void 0; -exports.default = ClockNumber; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 298 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _getPrototypeOf = __webpack_require__(4); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(2); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(3); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(5); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(6); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); -var _timeUtils = __webpack_require__(89); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoComplete.__proto__ || (0, _getPrototypeOf2.default)(AutoComplete)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + anchorEl: null, + focusTextField: true, + open: false, + searchText: undefined + }, _this.handleRequestClose = function () { + // Only take into account the Popover clickAway when we are + // not focusing the TextField. + if (!_this.state.focusTextField) { + _this.close(); + } + }, _this.handleMouseDown = function (event) { + // Keep the TextField focused + event.preventDefault(); + }, _this.handleItemTouchTap = function (event, child) { + var dataSource = _this.props.dataSource; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var index = parseInt(child.key, 10); + var chosenRequest = dataSource[index]; + var searchText = _this.chosenRequestText(chosenRequest); -function calcAngle(value, base) { - value %= base; - var angle = 360 / base * value; - return angle; -} + _this.setState({ + searchText: searchText + }, function () { + _this.props.onUpdateInput(searchText, _this.props.dataSource, { + source: 'touchTap' + }); -function getStyles(props, context, state) { - var hasSelected = props.hasSelected, - type = props.type, - value = props.value; - var inner = state.inner; - var timePicker = context.muiTheme.timePicker; + _this.timerTouchTapCloseId = setTimeout(function () { + _this.timerTouchTapCloseId = null; + _this.close(); + _this.props.onNewRequest(chosenRequest, index); + }, _this.props.menuCloseDelay); + }); + }, _this.chosenRequestText = function (chosenRequest) { + if (typeof chosenRequest === 'string') { + return chosenRequest; + } else { + return chosenRequest[_this.props.dataSourceConfig.text]; + } + }, _this.handleEscKeyDown = function () { + _this.close(); + }, _this.handleKeyDown = function (event) { + if (_this.props.onKeyDown) _this.props.onKeyDown(event); - var angle = type === 'hour' ? calcAngle(value, 12) : calcAngle(value, 60); + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.close(); + var searchText = _this.state.searchText; + if (searchText !== '') { + _this.props.onNewRequest(searchText, -1); + } + break; - var styles = { - root: { - height: inner ? '30%' : '40%', - background: timePicker.accentColor, - width: 2, - left: 'calc(50% - 1px)', - position: 'absolute', - bottom: '50%', - transformOrigin: 'bottom', - pointerEvents: 'none', - transform: 'rotateZ(' + angle + 'deg)' - }, - mark: { - boxSizing: 'content-box', - background: timePicker.selectTextColor, - border: '4px solid ' + timePicker.accentColor, - display: hasSelected && 'none', - width: 7, - height: 7, - position: 'absolute', - top: -5, - left: -6, - borderRadius: '100%' - } - }; + case 'esc': + _this.close(); + break; - return styles; -} + case 'down': + event.preventDefault(); + _this.setState({ + open: true, + focusTextField: false, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }); + break; -var ClockPointer = function (_Component) { - (0, _inherits3.default)(ClockPointer, _Component); + default: + break; + } + }, _this.handleChange = function (event) { + var searchText = event.target.value; - function ClockPointer() { - var _ref; + // Make sure that we have a new searchText. + // Fix an issue with a Cordova Webview + if (searchText === _this.state.searchText) { + return; + } - var _temp, _this, _ret; + _this.setState({ + searchText: searchText, + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }, function () { + _this.props.onUpdateInput(searchText, _this.props.dataSource, { + source: 'change' + }); + }); + }, _this.handleBlur = function (event) { + if (_this.state.focusTextField && _this.timerTouchTapCloseId === null) { + _this.timerBlurClose = setTimeout(function () { + _this.close(); + }, 0); + } - (0, _classCallCheck3.default)(this, ClockPointer); + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleFocus = function (event) { + if (!_this.state.open && _this.props.openOnFocus) { + _this.setState({ + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }); + } - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + _this.setState({ + focusTextField: true + }); - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockPointer.__proto__ || (0, _getPrototypeOf2.default)(ClockPointer)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - inner: false + if (_this.props.onFocus) { + _this.props.onFocus(event); + } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(ClockPointer, [{ + (0, _createClass3.default)(AutoComplete, [{ key: 'componentWillMount', value: function componentWillMount() { + this.requestsList = []; this.setState({ - inner: (0, _timeUtils.isInner)(this.props) + open: this.props.open, + searchText: this.props.searchText }); + this.timerTouchTapCloseId = null; } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { + if (this.props.searchText !== nextProps.searchText) { + this.setState({ + searchText: nextProps.searchText + }); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.timerTouchTapCloseId); + clearTimeout(this.timerBlurClose); + } + }, { + key: 'close', + value: function close() { this.setState({ - inner: (0, _timeUtils.isInner)(nextProps) + open: false, + anchorEl: null }); + + if (this.props.onClose) { + this.props.onClose(); + } } }, { - key: 'render', - value: function render() { - if (this.props.value === null) { - return _react2.default.createElement('span', null); - } + key: 'blur', + value: function blur() { + this.refs.searchTextField.blur(); + } + }, { + key: 'focus', + value: function focus() { + this.refs.searchTextField.focus(); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; - var styles = getStyles(this.props, this.context, this.state); + var _props = this.props, + anchorOrigin = _props.anchorOrigin, + animated = _props.animated, + animation = _props.animation, + dataSource = _props.dataSource, + dataSourceConfig = _props.dataSourceConfig, + disableFocusRipple = _props.disableFocusRipple, + errorStyle = _props.errorStyle, + floatingLabelText = _props.floatingLabelText, + filter = _props.filter, + fullWidth = _props.fullWidth, + style = _props.style, + hintText = _props.hintText, + maxSearchResults = _props.maxSearchResults, + menuCloseDelay = _props.menuCloseDelay, + textFieldStyle = _props.textFieldStyle, + menuStyle = _props.menuStyle, + menuProps = _props.menuProps, + listStyle = _props.listStyle, + targetOrigin = _props.targetOrigin, + onClose = _props.onClose, + onNewRequest = _props.onNewRequest, + onUpdateInput = _props.onUpdateInput, + openOnFocus = _props.openOnFocus, + popoverProps = _props.popoverProps, + searchTextProp = _props.searchText, + other = (0, _objectWithoutProperties3.default)(_props, ['anchorOrigin', 'animated', 'animation', 'dataSource', 'dataSourceConfig', 'disableFocusRipple', 'errorStyle', 'floatingLabelText', 'filter', 'fullWidth', 'style', 'hintText', 'maxSearchResults', 'menuCloseDelay', 'textFieldStyle', 'menuStyle', 'menuProps', 'listStyle', 'targetOrigin', 'onClose', 'onNewRequest', 'onUpdateInput', 'openOnFocus', 'popoverProps', 'searchText']); + + var _ref2 = popoverProps || {}, + popoverStyle = _ref2.style, + popoverOther = (0, _objectWithoutProperties3.default)(_ref2, ['style']); + + var _state = this.state, + open = _state.open, + anchorEl = _state.anchorEl, + searchText = _state.searchText, + focusTextField = _state.focusTextField; var prepareStyles = this.context.muiTheme.prepareStyles; + var styles = getStyles(this.props, this.context, this.state); + + var requestsList = []; + + dataSource.every(function (item, index) { + switch (typeof item === 'undefined' ? 'undefined' : (0, _typeof3.default)(item)) { + case 'string': + if (filter(searchText, item, item)) { + requestsList.push({ + text: item, + value: _react2.default.createElement(_MenuItem2.default, { + innerDivStyle: styles.innerDiv, + value: item, + primaryText: item, + disableFocusRipple: disableFocusRipple, + key: index + }) + }); + } + break; + + case 'object': + if (item && typeof item[_this2.props.dataSourceConfig.text] === 'string') { + var itemText = item[_this2.props.dataSourceConfig.text]; + if (!_this2.props.filter(searchText, itemText, item)) break; + + var itemValue = item[_this2.props.dataSourceConfig.value]; + if (itemValue.type && (itemValue.type.muiName === _MenuItem2.default.muiName || itemValue.type.muiName === _Divider2.default.muiName)) { + requestsList.push({ + text: itemText, + value: _react2.default.cloneElement(itemValue, { + key: index, + disableFocusRipple: disableFocusRipple + }) + }); + } else { + requestsList.push({ + text: itemText, + value: _react2.default.createElement(_MenuItem2.default, { + innerDivStyle: styles.innerDiv, + primaryText: itemText, + disableFocusRipple: disableFocusRipple, + key: index + }) + }); + } + } + break; + + default: + // Do nothing + } + + return !(maxSearchResults && maxSearchResults > 0 && requestsList.length === maxSearchResults); + }); + + this.requestsList = requestsList; + + var menu = open && requestsList.length > 0 && _react2.default.createElement( + _Menu2.default, + (0, _extends3.default)({}, menuProps, { + ref: 'menu', + autoWidth: false, + disableAutoFocus: focusTextField, + onEscKeyDown: this.handleEscKeyDown, + initiallyKeyboardFocused: true, + onItemTouchTap: this.handleItemTouchTap, + onMouseDown: this.handleMouseDown, + style: (0, _simpleAssign2.default)(styles.menu, menuStyle), + listStyle: (0, _simpleAssign2.default)(styles.list, listStyle) + }), + requestsList.map(function (i) { + return i.value; + }) + ); return _react2.default.createElement( 'div', - { style: prepareStyles(styles.root) }, - _react2.default.createElement('div', { style: prepareStyles(styles.mark) }) + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + ref: 'searchTextField', + autoComplete: 'off', + value: searchText, + onChange: this.handleChange, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onKeyDown: this.handleKeyDown, + floatingLabelText: floatingLabelText, + hintText: hintText, + fullWidth: fullWidth, + multiLine: false, + errorStyle: errorStyle, + style: textFieldStyle + })), + _react2.default.createElement( + _Popover2.default, + (0, _extends3.default)({ + style: (0, _simpleAssign2.default)({}, styles.popover, popoverStyle), + canAutoPosition: false, + anchorOrigin: anchorOrigin, + targetOrigin: targetOrigin, + open: open, + anchorEl: anchorEl, + useLayerForClickAway: false, + onRequestClose: this.handleRequestClose, + animated: animated, + animation: animation + }, popoverOther), + menu + ) ); } }]); - return ClockPointer; + return AutoComplete; }(_react.Component); -ClockPointer.defaultProps = { - hasSelected: false, - value: null, - type: 'minute' +AutoComplete.defaultProps = { + anchorOrigin: { + vertical: 'bottom', + horizontal: 'left' + }, + animated: true, + dataSourceConfig: { + text: 'text', + value: 'value' + }, + disableFocusRipple: true, + filter: function filter(searchText, key) { + return searchText !== '' && key.indexOf(searchText) !== -1; + }, + fullWidth: false, + open: false, + openOnFocus: false, + onUpdateInput: function onUpdateInput() {}, + onNewRequest: function onNewRequest() {}, + searchText: '', + menuCloseDelay: 300, + targetOrigin: { + vertical: 'top', + horizontal: 'left' + } }; -ClockPointer.contextTypes = { +AutoComplete.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; -process.env.NODE_ENV !== "production" ? ClockPointer.propTypes = { - hasSelected: _react.PropTypes.bool, - type: _react.PropTypes.oneOf(['hour', 'minute']), - value: _react.PropTypes.number +process.env.NODE_ENV !== "production" ? AutoComplete.propTypes = { + /** + * Location of the anchor for the auto complete. + */ + anchorOrigin: _propTypes2.default.origin, + /** + * If true, the auto complete is animated as it is toggled. + */ + animated: _react.PropTypes.bool, + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * Array of strings or nodes used to populate the list. + */ + dataSource: _react.PropTypes.array.isRequired, + /** + * Config for objects list dataSource. + * + * @typedef {Object} dataSourceConfig + * + * @property {string} text `dataSource` element key used to find a string to be matched for search + * and shown as a `TextField` input value after choosing the result. + * @property {string} value `dataSource` element key used to find a string to be shown in search results. + */ + dataSourceConfig: _react.PropTypes.object, + /** + * Disables focus ripple when true. + */ + disableFocusRipple: _react.PropTypes.bool, + /** + * Override style prop for error. + */ + errorStyle: _react.PropTypes.object, + /** + * The error content to display. + */ + errorText: _react.PropTypes.node, + /** + * Callback function used to filter the auto complete. + * + * @param {string} searchText The text to search for within `dataSource`. + * @param {string} key `dataSource` element, or `text` property on that element if it's not a string. + * @returns {boolean} `true` indicates the auto complete list will include `key` when the input is `searchText`. + */ + filter: _react.PropTypes.func, + /** + * The content to use for adding floating label element. + */ + floatingLabelText: _react.PropTypes.node, + /** + * If true, the field receives the property `width: 100%`. + */ + fullWidth: _react.PropTypes.bool, + /** + * The hint content to display. + */ + hintText: _react.PropTypes.node, + /** + * Override style for list. + */ + listStyle: _react.PropTypes.object, + /** + * The max number of search results to be shown. + * By default it shows all the items which matches filter. + */ + maxSearchResults: _react.PropTypes.number, + /** + * Delay for closing time of the menu. + */ + menuCloseDelay: _react.PropTypes.number, + /** + * Props to be passed to menu. + */ + menuProps: _react.PropTypes.object, + /** + * Override style for menu. + */ + menuStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function fired when the menu is closed. + */ + onClose: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** @ignore */ + onKeyDown: _react.PropTypes.func, + /** + * Callback function that is fired when a list item is selected, or enter is pressed in the `TextField`. + * + * @param {string} chosenRequest Either the `TextField` input value, if enter is pressed in the `TextField`, + * or the text value of the corresponding list item that was selected. + * @param {number} index The index in `dataSource` of the list item selected, or `-1` if enter is pressed in the + * `TextField`. + */ + onNewRequest: _react.PropTypes.func, + /** + * Callback function that is fired when the user updates the `TextField`. + * + * @param {string} searchText The auto-complete's `searchText` value. + * @param {array} dataSource The auto-complete's `dataSource` array. + * @param {object} params Additional information linked the update. + */ + onUpdateInput: _react.PropTypes.func, + /** + * Auto complete menu is open if true. + */ + open: _react.PropTypes.bool, + /** + * If true, the list item is showed when a focus event triggers. + */ + openOnFocus: _react.PropTypes.bool, + /** + * Props to be passed to popover. + */ + popoverProps: _react.PropTypes.object, + /** + * Text being input to auto complete. + */ + searchText: _react.PropTypes.string, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Origin for location of target. + */ + targetOrigin: _propTypes2.default.origin, + /** + * Override the inline-styles of AutoComplete's TextField element. + */ + textFieldStyle: _react.PropTypes.object } : void 0; -exports.default = ClockPointer; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -/***/ }), -/* 299 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; +AutoComplete.levenshteinDistance = function (searchText, key) { + var current = []; + var prev = void 0; + var value = void 0; + for (var i = 0; i <= key.length; i++) { + for (var j = 0; j <= searchText.length; j++) { + if (i && j) { + if (searchText.charAt(j - 1) === key.charAt(i - 1)) value = prev;else value = Math.min(current[j], current[j - 1], prev) + 1; + } else { + value = i + j; + } + prev = current[j]; + current[j] = value; + } + } + return current.pop(); +}; -Object.defineProperty(exports, "__esModule", { - value: true -}); +AutoComplete.noFilter = function () { + return true; +}; -var _colors = __webpack_require__(56); +AutoComplete.defaultFilter = AutoComplete.caseSensitiveFilter = function (searchText, key) { + return searchText !== '' && key.indexOf(searchText) !== -1; +}; -var _colorManipulator = __webpack_require__(70); +AutoComplete.caseInsensitiveFilter = function (searchText, key) { + return key.toLowerCase().indexOf(searchText.toLowerCase()) !== -1; +}; -var _spacing = __webpack_require__(186); +AutoComplete.levenshteinDistanceFilter = function (distanceLessThan) { + if (distanceLessThan === undefined) { + return AutoComplete.levenshteinDistance; + } else if (typeof distanceLessThan !== 'number') { + throw 'Error: AutoComplete.levenshteinDistanceFilter is a filter generator, not a filter!'; + } -var _spacing2 = _interopRequireDefault(_spacing); + return function (s, k) { + return AutoComplete.levenshteinDistance(s, k) < distanceLessThan; + }; +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +AutoComplete.fuzzyFilter = function (searchText, key) { + var compareString = key.toLowerCase(); + searchText = searchText.toLowerCase(); -/** - * Light Theme is the default theme used in material-ui. It is guaranteed to - * have all theme variables needed for every component. Variables not defined - * in a custom theme will default to these values. - */ -exports.default = { - spacing: _spacing2.default, - fontFamily: 'Roboto, sans-serif', - palette: { - primary1Color: _colors.cyan500, - primary2Color: _colors.cyan700, - primary3Color: _colors.grey400, - accent1Color: _colors.pinkA200, - accent2Color: _colors.grey100, - accent3Color: _colors.grey500, - textColor: _colors.darkBlack, - secondaryTextColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.54), - alternateTextColor: _colors.white, - canvasColor: _colors.white, - borderColor: _colors.grey300, - disabledColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.3), - pickerHeaderColor: _colors.cyan500, - clockCircleColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.07), - shadowColor: _colors.fullBlack + var searchTextIndex = 0; + for (var index = 0; index < key.length; index++) { + if (compareString[index] === searchText[searchTextIndex]) { + searchTextIndex += 1; + } } -}; /** - * NB: If you update this file, please also update `docs/src/app/customization/Themes.js` - */ - -/***/ }), -/* 300 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; + return searchTextIndex === searchText.length; +}; +AutoComplete.Item = _MenuItem2.default; +AutoComplete.Divider = _Divider2.default; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = { - menu: 1000, - appBar: 1100, - drawerOverlay: 1200, - drawer: 1300, - dialogOverlay: 1400, - dialog: 1500, - layer: 2000, - popover: 2100, - snackbar: 2900, - tooltip: 3000 -}; +exports.default = AutoComplete; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 301 */ +/* 296 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - +/* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = { "Webkit": { "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "backfaceVisibility": true, "perspective": true, "perspectiveOrigin": true, "transformStyle": true, "transformOriginZ": true, "animation": true, "animationDelay": true, "animationDirection": true, "animationFillMode": true, "animationDuration": true, "animationIterationCount": true, "animationName": true, "animationPlayState": true, "animationTimingFunction": true, "appearance": true, "userSelect": true, "fontKerning": true, "textEmphasisPosition": true, "textEmphasis": true, "textEmphasisStyle": true, "textEmphasisColor": true, "boxDecorationBreak": true, "clipPath": true, "maskImage": true, "maskMode": true, "maskRepeat": true, "maskPosition": true, "maskClip": true, "maskOrigin": true, "maskSize": true, "maskComposite": true, "mask": true, "maskBorderSource": true, "maskBorderMode": true, "maskBorderSlice": true, "maskBorderWidth": true, "maskBorderOutset": true, "maskBorderRepeat": true, "maskBorder": true, "maskType": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "filter": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true, "flex": true, "flexBasis": true, "flexDirection": true, "flexGrow": true, "flexFlow": true, "flexShrink": true, "flexWrap": true, "alignContent": true, "alignItems": true, "alignSelf": true, "justifyContent": true, "order": true, "transition": true, "transitionDelay": true, "transitionDuration": true, "transitionProperty": true, "transitionTimingFunction": true, "backdropFilter": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "shapeImageThreshold": true, "shapeImageMargin": true, "shapeImageOutside": true, "hyphens": true, "flowInto": true, "flowFrom": true, "regionFragment": true, "textSizeAdjust": true }, "Moz": { "appearance": true, "userSelect": true, "boxSizing": true, "textAlignLast": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "tabSize": true, "hyphens": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true }, "ms": { "flex": true, "flexBasis": false, "flexDirection": true, "flexGrow": false, "flexFlow": true, "flexShrink": false, "flexWrap": true, "alignContent": false, "alignItems": false, "alignSelf": false, "justifyContent": false, "order": false, "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "userSelect": true, "wrapFlow": true, "wrapThrough": true, "wrapMargin": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "touchAction": true, "hyphens": true, "flowInto": true, "flowFrom": true, "breakBefore": true, "breakAfter": true, "breakInside": true, "regionFragment": true, "gridTemplateColumns": true, "gridTemplateRows": true, "gridTemplateAreas": true, "gridTemplate": true, "gridAutoColumns": true, "gridAutoRows": true, "gridAutoFlow": true, "grid": true, "gridRowStart": true, "gridColumnStart": true, "gridRowEnd": true, "gridRow": true, "gridColumn": true, "gridColumnEnd": true, "gridColumnGap": true, "gridRowGap": true, "gridArea": true, "gridGap": true, "textSizeAdjust": true } }; -module.exports = exports["default"]; -/***/ }), -/* 302 */ -/***/ (function(module, exports, __webpack_require__) { +var _simpleAssign = __webpack_require__(7); -"use strict"; +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var _react = __webpack_require__(1); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = sortPrefixedStyle; +var _react2 = _interopRequireDefault(_react); -var _isPrefixedProperty = __webpack_require__(760); +var _transitions = __webpack_require__(12); -var _isPrefixedProperty2 = _interopRequireDefault(_isPrefixedProperty); +var _transitions2 = _interopRequireDefault(_transitions); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function sortPrefixedStyle(style) { - return Object.keys(style).sort(function (left, right) { - if ((0, _isPrefixedProperty2.default)(left) && !(0, _isPrefixedProperty2.default)(right)) { - return -1; - } else if (!(0, _isPrefixedProperty2.default)(left) && (0, _isPrefixedProperty2.default)(right)) { - return 1; +function getStyles(props) { + var hintColor = props.muiTheme.textField.hintColor, + show = props.show; + + + return { + root: { + position: 'absolute', + opacity: show ? 1 : 0, + color: hintColor, + transition: _transitions2.default.easeOut(), + bottom: 12 } - return 0; - }).reduce(function (sortedStyle, prop) { - sortedStyle[prop] = style[prop]; - return sortedStyle; - }, {}); + }; } -module.exports = exports['default']; -/***/ }), -/* 303 */ -/***/ (function(module, exports, __webpack_require__) { +var TextFieldHint = function TextFieldHint(props) { + var prepareStyles = props.muiTheme.prepareStyles, + style = props.style, + text = props.text; -"use strict"; + var styles = getStyles(props); -var uppercasePattern = /[A-Z]/g; -var msPattern = /^ms-/; -var cache = {}; + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + text + ); +}; -function hyphenateStyleName(string) { - return string in cache - ? cache[string] - : cache[string] = string - .replace(uppercasePattern, '-$&') - .toLowerCase() - .replace(msPattern, '-ms-'); -} +process.env.NODE_ENV !== "production" ? TextFieldHint.propTypes = { + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * True if the hint text should be visible. + */ + show: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The hint text displayed. + */ + text: _react.PropTypes.node +} : void 0; -module.exports = hyphenateStyleName; +TextFieldHint.defaultProps = { + show: true +}; +exports.default = TextFieldHint; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 304 */ +/* 297 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - +/* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); -var _classCallCheck2 = __webpack_require__(2); +var _simpleAssign = __webpack_require__(7); -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); -var _colors = __webpack_require__(56); +var _transitions2 = _interopRequireDefault(_transitions); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var Typography = function Typography() { - (0, _classCallCheck3.default)(this, Typography); +function getStyles(props) { + var defaultStyles = { + position: 'absolute', + lineHeight: '22px', + top: 38, + transition: _transitions2.default.easeOut(), + zIndex: 1, // Needed to display label above Chrome's autocomplete field background + transform: 'scale(1) translate(0, 0)', + transformOrigin: 'left top', + pointerEvents: 'auto', + userSelect: 'none' + }; - // text colors - this.textFullBlack = _colors.fullBlack; - this.textDarkBlack = _colors.darkBlack; - this.textLightBlack = _colors.lightBlack; - this.textMinBlack = _colors.minBlack; - this.textFullWhite = _colors.fullWhite; - this.textDarkWhite = _colors.darkWhite; - this.textLightWhite = _colors.lightWhite; + var shrinkStyles = props.shrink ? (0, _simpleAssign2.default)({ + transform: 'scale(0.75) translate(0, -28px)', + pointerEvents: 'none' + }, props.shrinkStyle) : null; - // font weight - this.fontWeightLight = 300; - this.fontWeightNormal = 400; - this.fontWeightMedium = 500; + return { + root: (0, _simpleAssign2.default)(defaultStyles, props.style, shrinkStyles) + }; +} - this.fontStyleButtonFontSize = 14; +var TextFieldLabel = function TextFieldLabel(props) { + var muiTheme = props.muiTheme, + className = props.className, + children = props.children, + htmlFor = props.htmlFor, + onTouchTap = props.onTouchTap; + var prepareStyles = muiTheme.prepareStyles; + + var styles = getStyles(props); + + return _react2.default.createElement( + 'label', + { + className: className, + style: prepareStyles(styles.root), + htmlFor: htmlFor, + onTouchTap: onTouchTap + }, + children + ); }; -exports.default = new Typography(); +process.env.NODE_ENV !== "production" ? TextFieldLabel.propTypes = { + /** + * The label contents. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Disables the label if set to true. + */ + disabled: _react.PropTypes.bool, + /** + * The id of the target element that this label should refer to. + */ + htmlFor: _react.PropTypes.string, + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * Callback function for when the label is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the text field label. + */ + onTouchTap: _react.PropTypes.func, + /** + * True if the floating label should shrink. + */ + shrink: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element when shrunk. + */ + shrinkStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +TextFieldLabel.defaultProps = { + disabled: false, + shrink: false +}; + +exports.default = TextFieldLabel; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 305 */ +/* 298 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - +/* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); -var countries = exports.countries = [{ "text": "USA", "value": "USA" }, { "text": "CANADA", "value": "CANADA" }, { "text": "JAPAN", "value": "JAPAN" }, { "text": "UK", "value": "GB" }, { "text": "UK (N. IRELAND)", "value": "NB" }, { "text": "AUSTRIA", "value": "AT" }, { "text": "BELARUS", "value": "BY" }, { "text": "BELGIUM", "value": "BE" }, { "text": "BULGARIA", "value": "BG" }, { "text": "CROATIA", "value": "HR" }, { "text": "CZECH REPUBLIC", "value": "CZ" }, { "text": "DENMARK", "value": "DK" }, { "text": "ESTONIA", "value": "EE" }, { "text": "FINLAND", "value": "FI" }, { "text": "FRANCE", "value": "FR" }, { "text": "GERMANY", "value": "DE" }, { "text": "GREECE", "value": "GR" }, { "text": "HUNGARY", "value": "HU" }, { "text": "ICELAND", "value": "IS" }, { "text": "IRELAND", "value": "IE" }, { "text": "ITALY", "value": "IT" }, { "text": "LATVIA", "value": "LV" }, { "text": "LITHUANIA", "value": "LT" }, { "text": "LUXEMBOURG", "value": "LU" }, { "text": "MONACO", "value": "MC" }, { "text": "NETHERLANDS", "value": "NL" }, { "text": "NORWAY", "value": "NO" }, { "text": "POLAND", "value": "PL" }, { "text": "PORTUGAL", "value": "PT" }, { "text": "ROMANIA", "value": "RO" }, { "text": "RUSSIA", "value": "RU" }, { "text": "SLOVAKIA", "value": "SK" }, { "text": "SLOVENIA", "value": "SI" }, { "text": "SPAIN", "value": "ES" }, { "text": "SWEDEN", "value": "SE" }, { "text": "SWITZERLAND", "value": "CH" }, { "text": "TURKEY", "value": "TR" }]; -var sizes = exports.sizes = ["Small", "Medium", "Large", "XLarge"]; -var sizesPants = exports.sizesPants = [28, 30, 32, 34, 36, 38, 40]; -var shoeSizes = exports.shoeSizes = [4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5]; -var usaRegions = exports.usaRegions = [{ "text": "AL", "value": "AL" }, { "text": "AK", "value": "AK" }, { "text": "AS", "value": "AS" }, { "text": "AZ", "value": "AZ" }, { "text": "AR", "value": "AR" }, { "text": "CA", "value": "CA" }, { "text": "CO", "value": "CO" }, { "text": "CT", "value": "CT" }, { "text": "DE", "value": "DE" }, { "text": "DC", "value": "DC" }, { "text": "FM", "value": "FM" }, { "text": "FL", "value": "FL" }, { "text": "GA", "value": "GA" }, { "text": "GU", "value": "GU" }, { "text": "HI", "value": "HI" }, { "text": "ID", "value": "ID" }, { "text": "IL", "value": "IL" }, { "text": "IN", "value": "IN" }, { "text": "IA", "value": "IA" }, { "text": "KS", "value": "KS" }, { "text": "KY", "value": "KY" }, { "text": "LA", "value": "LA" }, { "text": "ME", "value": "ME" }, { "text": "MH", "value": "MH" }, { "text": "MD", "value": "MD" }, { "text": "MA", "value": "MA" }, { "text": "MI", "value": "MI" }, { "text": "MN", "value": "MN" }, { "text": "MS", "value": "MS" }, { "text": "MO", "value": "MO" }, { "text": "MT", "value": "MT" }, { "text": "NE", "value": "NE" }, { "text": "NV", "value": "NV" }, { "text": "NH", "value": "NH" }, { "text": "NJ", "value": "NJ" }, { "text": "NM", "value": "NM" }, { "text": "NY", "value": "NY" }, { "text": "NC", "value": "NC" }, { "text": "ND", "value": "ND" }, { "text": "MP", "value": "MP" }, { "text": "OH", "value": "OH" }, { "text": "OK", "value": "OK" }, { "text": "OR", "value": "OR" }, { "text": "PW", "value": "PW" }, { "text": "PA", "value": "PA" }, { "text": "PR", "value": "PR" }, { "text": "RI", "value": "RI" }, { "text": "SC", "value": "SC" }, { "text": "SD", "value": "SD" }, { "text": "TN", "value": "TN" }, { "text": "TX", "value": "TX" }, { "text": "UT", "value": "UT" }, { "text": "VT", "value": "VT" }, { "text": "VI", "value": "VI" }, { "text": "VA", "value": "VA" }, { "text": "WA", "value": "WA" }, { "text": "WV", "value": "WV" }, { "text": "WI", "value": "WI" }, { "text": "WY", "value": "WY" }]; -var canadaRegions = exports.canadaRegions = [{ "text": "AB", "value": "AB" }, { "text": "BC", "value": "BC" }, { "text": "MB", "value": "MB" }, { "text": "NB", "value": "NB" }, { "text": "NL", "value": "NL" }, { "text": "NT", "value": "NT" }, { "text": "NS", "value": "NS" }, { "text": "NU", "value": "NU" }, { "text": "ON", "value": "ON" }, { "text": "PE", "value": "PE" }, { "text": "QC", "value": "QC" }, { "text": "SK", "value": "SK" }, { "text": "YT", "value": "YT" }]; -var japanRegions = exports.japanRegions = [{ "text": " 北海道", "value": " 北海道" }, { "text": " 青森県", "value": " 青森県" }, { "text": " 岩手県", "value": " 岩手県" }, { "text": " 宮城県", "value": " 宮城県" }, { "text": " 秋田県", "value": " 秋田県" }, { "text": " 山形県", "value": " 山形県" }, { "text": " 福島県", "value": " 福島県" }, { "text": " 茨城県", "value": " 茨城県" }, { "text": " 栃木県", "value": " 栃木県" }, { "text": " 群馬県", "value": " 群馬県" }, { "text": " 埼玉県", "value": " 埼玉県" }, { "text": " 千葉県", "value": " 千葉県" }, { "text": " 東京都", "value": " 東京都" }, { "text": " 神奈川県", "value": " 神奈川県" }, { "text": " 新潟県", "value": " 新潟県" }, { "text": " 富山県", "value": " 富山県" }, { "text": " 石川県", "value": " 石川県" }, { "text": " 福井県", "value": " 福井県" }, { "text": " 山梨県", "value": " 山梨県" }, { "text": " 長野県", "value": " 長野県" }, { "text": " 岐阜県", "value": " 岐阜県" }, { "text": " 静岡県", "value": " 静岡県" }, { "text": " 愛知県", "value": " 愛知県" }, { "text": " 三重県", "value": " 三重県" }, { "text": " 滋賀県", "value": " 滋賀県" }, { "text": " 京都府", "value": " 京都府" }, { "text": " 大阪府", "value": " 大阪府" }, { "text": " 兵庫県", "value": " 兵庫県" }, { "text": " 奈良県", "value": " 奈良県" }, { "text": " 和歌山県", "value": " 和歌山県" }, { "text": " 鳥取県", "value": " 鳥取県" }, { "text": " 島根県", "value": " 島根県" }, { "text": " 岡山県", "value": " 岡山県" }, { "text": " 広島県", "value": " 広島県" }, { "text": " 山口県", "value": " 山口県" }, { "text": " 徳島県", "value": " 徳島県" }, { "text": " 香川県", "value": " 香川県" }, { "text": " 愛媛県", "value": " 愛媛県" }, { "text": " 高知県", "value": " 高知県" }, { "text": " 福岡県", "value": " 福岡県" }, { "text": " 佐賀県", "value": " 佐賀県" }, { "text": " 長崎県", "value": " 長崎県" }, { "text": " 熊本県", "value": " 熊本県" }, { "text": " 大分県", "value": " 大分県" }, { "text": " 宮崎県", "value": " 宮崎県" }, { "text": " 鹿児島県", "value": " 鹿児島県" }, { "text": " 沖縄県", "value": " 沖縄県" }]; -/***/ }), -/* 306 */ -/***/ (function(module, exports, __webpack_require__) { +var _simpleAssign = __webpack_require__(7); -module.exports = __webpack_require__(307); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var _react = __webpack_require__(1); -/***/ }), -/* 307 */ -/***/ (function(module, exports, __webpack_require__) { +var _react2 = _interopRequireDefault(_react); -"use strict"; +var _transitions = __webpack_require__(12); +var _transitions2 = _interopRequireDefault(_transitions); -var _regenerator = __webpack_require__(123); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _regenerator2 = _interopRequireDefault(_regenerator); +var propTypes = { + /** + * True if the parent `TextField` is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` is disabled. + */ + disabledStyle: _react.PropTypes.object, + /** + * True if the parent `TextField` has an error. + */ + error: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` has an error. + */ + errorStyle: _react.PropTypes.object, + /** + * True if the parent `TextField` is focused. + */ + focus: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` is focused. + */ + focusStyle: _react.PropTypes.object, + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +}; -var _asyncToGenerator2 = __webpack_require__(124); +var defaultProps = { + disabled: false, + disabledStyle: {}, + error: false, + errorStyle: {}, + focus: false, + focusStyle: {}, + style: {} +}; -var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); +var TextFieldUnderline = function TextFieldUnderline(props) { + var disabled = props.disabled, + disabledStyle = props.disabledStyle, + error = props.error, + errorStyle = props.errorStyle, + focus = props.focus, + focusStyle = props.focusStyle, + muiTheme = props.muiTheme, + style = props.style; + var errorStyleColor = errorStyle.color; + var prepareStyles = muiTheme.prepareStyles, + _muiTheme$textField = muiTheme.textField, + borderColor = _muiTheme$textField.borderColor, + disabledTextColor = _muiTheme$textField.disabledTextColor, + errorColor = _muiTheme$textField.errorColor, + focusColor = _muiTheme$textField.focusColor; -var Start = function () { - var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() { - var settings, manager; - return _regenerator2.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return StorageManager.getFromChromeStorage('settings'); - case 2: - _context.t1 = _Supreme.SHOP_NAME; - _context.t0 = _context.sent[_context.t1]; + var styles = { + root: { + borderTop: 'none', + borderLeft: 'none', + borderRight: 'none', + borderBottom: 'solid 1px', + borderColor: borderColor, + bottom: 8, + boxSizing: 'content-box', + margin: 0, + position: 'absolute', + width: '100%' + }, + disabled: { + borderBottom: 'dotted 2px', + borderColor: disabledTextColor + }, + focus: { + borderBottom: 'solid 2px', + borderColor: focusColor, + transform: 'scaleX(0)', + transition: _transitions2.default.easeOut() + }, + error: { + borderColor: errorStyleColor ? errorStyleColor : errorColor, + transform: 'scaleX(1)' + } + }; - if (_context.t0) { - _context.next = 6; - break; - } + var underline = (0, _simpleAssign2.default)({}, styles.root, style); + var focusedUnderline = (0, _simpleAssign2.default)({}, underline, styles.focus, focusStyle); - _context.t0 = {}; + if (disabled) underline = (0, _simpleAssign2.default)({}, underline, styles.disabled, disabledStyle); + if (focus) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, { transform: 'scaleX(1)' }); + if (error) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, styles.error); - case 6: - settings = _context.t0; - manager = new _supreme2.default(settings.Options, settings.Sizes, settings.Billing); + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement('hr', { style: prepareStyles(underline) }), + _react2.default.createElement('hr', { style: prepareStyles(focusedUnderline) }) + ); +}; - manager.start(); +process.env.NODE_ENV !== "production" ? TextFieldUnderline.propTypes = propTypes : void 0; +TextFieldUnderline.defaultProps = defaultProps; - case 9: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - })); +exports.default = TextFieldUnderline; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - return function Start() { - return _ref.apply(this, arguments); - }; -}(); +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { -var _supreme = __webpack_require__(328); +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { -var _supreme2 = _interopRequireDefault(_supreme); +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _StorageManager = __webpack_require__(360); +var _getPrototypeOf = __webpack_require__(4); -var StorageManager = _interopRequireWildcard(_StorageManager); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -var _Supreme = __webpack_require__(363); +var _classCallCheck2 = __webpack_require__(2); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _createClass2 = __webpack_require__(3); -Start(); +var _createClass3 = _interopRequireDefault(_createClass2); -/***/ }), -/* 308 */ -/***/ (function(module, exports, __webpack_require__) { +var _possibleConstructorReturn2 = __webpack_require__(5); -/* WEBPACK VAR INJECTION */(function(global) {// This method of obtaining a reference to the global object needs to be -// kept identical to the way it is obtained in runtime.js -var g = - typeof global === "object" ? global : - typeof window === "object" ? window : - typeof self === "object" ? self : this; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -// Use `getOwnPropertyNames` because not all browsers support calling -// `hasOwnProperty` on the global `self` object in a worker. See #183. -var hadRuntime = g.regeneratorRuntime && - Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; +var _inherits2 = __webpack_require__(6); -// Save the old regeneratorRuntime in case it needs to be restored later. -var oldRuntime = hadRuntime && g.regeneratorRuntime; +var _inherits3 = _interopRequireDefault(_inherits2); -// Force reevalutation of runtime.js. -g.regeneratorRuntime = undefined; +var _simpleAssign = __webpack_require__(7); -module.exports = __webpack_require__(309); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -if (hadRuntime) { - // Restore the original runtime. - g.regeneratorRuntime = oldRuntime; -} else { - // Remove the global property added by runtime.js. - try { - delete g.regeneratorRuntime; - } catch(e) { - g.regeneratorRuntime = undefined; - } -} +var _react = __webpack_require__(1); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46))) +var _react2 = _interopRequireDefault(_react); -/***/ }), -/* 309 */ -/***/ (function(module, exports, __webpack_require__) { +var _Paper = __webpack_require__(38); -/* WEBPACK VAR INJECTION */(function(global) {/** - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * https://raw.github.com/facebook/regenerator/master/LICENSE file. An - * additional grant of patent rights can be found in the PATENTS file in - * the same directory. - */ +var _Paper2 = _interopRequireDefault(_Paper); -!(function(global) { - "use strict"; +var _transitions = __webpack_require__(12); - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; // More compressible than void 0. - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; +var _transitions2 = _interopRequireDefault(_transitions); - var inModule = typeof module === "object"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - // If regeneratorRuntime is defined globally and we're in a module, - // make the exports object identical to regeneratorRuntime. - module.exports = runtime; - } - // Don't bother evaluating the rest of this file if the runtime was - // already defined globally. - return; - } +var _propTypes = __webpack_require__(46); - // Define the runtime globally (as expected by generated code) as either - // module.exports (if we're in a module) or a new, empty object. - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; +var _propTypes2 = _interopRequireDefault(_propTypes); - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // The ._invoke method unifies the implementations of the .next, - // .throw, and .return methods. - generator._invoke = makeInvokeMethod(innerFn, self, context); +function getStyles(props, context, state) { + var targetOrigin = props.targetOrigin; + var open = state.open; + var muiTheme = context.muiTheme; - return generator; - } - runtime.wrap = wrap; + var horizontal = targetOrigin.horizontal.replace('middle', 'vertical'); - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; + return { + root: { + position: 'fixed', + zIndex: muiTheme.zIndex.popover, + opacity: open ? 1 : 0, + transform: open ? 'scaleY(1)' : 'scaleY(0)', + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('450ms', ['transform', 'opacity']), + maxHeight: '100%' } - } - - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; + }; +} - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; +var PopoverAnimationVertical = function (_Component) { + (0, _inherits3.default)(PopoverAnimationVertical, _Component); - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} + function PopoverAnimationVertical() { + var _ref; - // This is a polyfill for %IteratorPrototype% for environments that - // don't natively support it. - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function () { - return this; - }; + var _temp, _this, _ret; - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && - NativeIteratorPrototype !== Op && - hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - // This environment has a native %IteratorPrototype%; use it instead - // of the polyfill. - IteratorPrototype = NativeIteratorPrototype; - } + (0, _classCallCheck3.default)(this, PopoverAnimationVertical); - var Gp = GeneratorFunctionPrototype.prototype = - Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = - GeneratorFunction.displayName = "GeneratorFunction"; + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function(method) { - prototype[method] = function(arg) { - return this._invoke(method, arg); - }; - }); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PopoverAnimationVertical.__proto__ || (0, _getPrototypeOf2.default)(PopoverAnimationVertical)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor - ? ctor === GeneratorFunction || - // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" - : false; - }; - - runtime.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = "GeneratorFunction"; - } + (0, _createClass3.default)(PopoverAnimationVertical, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setState({ open: true }); // eslint-disable-line react/no-did-mount-set-state } - genFun.prototype = Object.create(Gp); - return genFun; - }; + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + open: nextProps.open + }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + className = _props.className, + style = _props.style, + zDepth = _props.zDepth; - // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `hasOwn.call(value, "__await")` to determine if the yielded value is - // meant to be awaited. - runtime.awrap = function(arg) { - return { __await: arg }; - }; - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && - typeof value === "object" && - hasOwn.call(value, "__await")) { - return Promise.resolve(value.__await).then(function(value) { - invoke("next", value, resolve, reject); - }, function(err) { - invoke("throw", err, resolve, reject); - }); - } + var styles = getStyles(this.props, this.context, this.state); - return Promise.resolve(value).then(function(unwrapped) { - // When a yielded Promise is resolved, its final value becomes - // the .value of the Promise<{value,done}> result for the - // current iteration. If the Promise is rejected, however, the - // result for this iteration will be rejected with the same - // reason. Note that rejections of yielded Promises are not - // thrown back into the generator function, as is the case - // when an awaited Promise is rejected. This difference in - // behavior between yield and await is important, because it - // allows the consumer to decide what to do with the yielded - // rejection (swallow it and continue, manually .throw it back - // into the generator, abandon iteration, whatever). With - // await, by contrast, there is no opportunity to examine the - // rejection reason outside the generator function, so the - // only option is to throw it from the await expression, and - // let the generator function handle the exception. - result.value = unwrapped; - resolve(result); - }, reject); - } + return _react2.default.createElement( + _Paper2.default, + { + style: (0, _simpleAssign2.default)(styles.root, style), + zDepth: zDepth, + className: className + }, + this.props.children + ); } + }]); + return PopoverAnimationVertical; +}(_react.Component); - if (typeof global.process === "object" && global.process.domain) { - invoke = global.process.domain.bind(invoke); - } +PopoverAnimationVertical.defaultProps = { + style: {}, + zDepth: 1 +}; +PopoverAnimationVertical.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? PopoverAnimationVertical.propTypes = { + children: _react.PropTypes.node, + className: _react.PropTypes.string, + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + targetOrigin: _propTypes2.default.origin.isRequired, + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = PopoverAnimationVertical; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - var previousPromise; +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise(function(resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } +"use strict"; - return previousPromise = - // If enqueue has been called before, then we want to wait until - // all previous Promises have been resolved before calling invoke, - // so that results are always delivered in the correct order. If - // enqueue has not been called before, then it is important to - // call invoke immediately, without waiting on a callback to fire, - // so that the async generator function has the opportunity to do - // any necessary setup in a predictable way. This predictability - // is why the Promise constructor synchronously invokes its - // executor callback, and why async functions synchronously - // execute code before the first await. Since we implement simple - // async functions in terms of async generators, it is especially - // important to get this right, even though it requires care. - previousPromise ? previousPromise.then( - callInvokeWithMethodAndArg, - // Avoid propagating failures to Promises returned by later - // invocations of the iterator. - callInvokeWithMethodAndArg - ) : callInvokeWithMethodAndArg(); - } - // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.RadioButtonGroup = exports.RadioButton = undefined; - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; - runtime.AsyncIterator = AsyncIterator; +var _RadioButton2 = __webpack_require__(698); - // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - runtime.async = function(innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator( - wrap(innerFn, outerFn, self, tryLocsList) - ); +var _RadioButton3 = _interopRequireDefault(_RadioButton2); - return runtime.isGeneratorFunction(outerFn) - ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function(result) { - return result.done ? result.value : iter.next(); - }); - }; +var _RadioButtonGroup2 = __webpack_require__(701); - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; +var _RadioButtonGroup3 = _interopRequireDefault(_RadioButtonGroup2); - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; - } +exports.RadioButton = _RadioButton3.default; +exports.RadioButtonGroup = _RadioButtonGroup3.default; +exports.default = _RadioButton3.default; - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); - } +/***/ }), +/* 301 */ +/***/ (function(module, exports, __webpack_require__) { - context.method = method; - context.arg = arg; +"use strict"; - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - if (context.method === "next") { - // Setting context._sent for legacy support of Babel's - // function.sent implementation. - context.sent = context._sent = context.arg; +exports.__esModule = true; - } else if (context.method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } +var _isIterable2 = __webpack_require__(722); - context.dispatchException(context.arg); +var _isIterable3 = _interopRequireDefault(_isIterable2); - } else if (context.method === "return") { - context.abrupt("return", context.arg); - } +var _getIterator2 = __webpack_require__(143); - state = GenStateExecuting; +var _getIterator3 = _interopRequireDefault(_getIterator2); - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done - ? GenStateCompleted - : GenStateSuspendedYield; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (record.arg === ContinueSentinel) { - continue; - } +exports.default = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; - return { - value: record.arg, - done: context.done - }; + try { + for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); - } else if (record.type === "throw") { - state = GenStateCompleted; - // Dispatch the exception by looping back around to the - // context.dispatchException(context.arg) call above. - context.method = "throw"; - context.arg = record.arg; - } + if (i && _arr.length === i) break; } - }; - } - - // Call delegate.iterator[context.method](context.arg) and handle the - // result, either by returning a { value, done } result from the - // delegate iterator, or by modifying context.method and context.arg, - // setting context.delegate to null, and returning the ContinueSentinel. - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. - context.delegate = null; - - if (context.method === "throw") { - if (delegate.iterator.return) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; - } - } - - context.method = "throw"; - context.arg = new TypeError( - "The iterator does not provide a 'throw' method"); + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; } - - return ContinueSentinel; } - var record = tryCatch(method, delegate.iterator, context.arg); + return _arr; + } - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if ((0, _isIterable3.default)(Object(arr))) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + }; +}(); - var info = record.arg; +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { - if (! info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { - if (info.done) { - // Assign the result of the finished delegate to the temporary - // variable specified by delegate.resultName (see delegateYield). - context[delegate.resultName] = info.value; +Object.defineProperty(exports, "__esModule", { + value: true +}); - // Resume execution at the desired location (see delegateYield). - context.next = delegate.nextLoc; +var _getPrototypeOf = __webpack_require__(4); - // If context.method was "throw" but the delegate handled the - // exception, let the outer generator proceed normally. If - // context.method was "next", forget context.arg since it has been - // "consumed" by the delegate iterator. If context.method was - // "return", allow the original .return call to continue in the - // outer generator. - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined; - } +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - } else { - // Re-yield the result returned by the delegate method. - return info; - } +var _classCallCheck2 = __webpack_require__(2); - // The delegate iterator is finished, so forget it and continue with - // the outer generator. - context.delegate = null; - return ContinueSentinel; - } +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - defineIteratorMethods(Gp); +var _createClass2 = __webpack_require__(3); - Gp[toStringTagSymbol] = "Generator"; +var _createClass3 = _interopRequireDefault(_createClass2); - // A Generator should always return itself as the iterator object when the - // @@iterator function is called on it. Some browsers' implementations of the - // iterator prototype chain incorrectly implement this, causing the Generator - // object to not be returned from this call. This ensures that doesn't happen. - // See https://github.com/facebook/regenerator/issues/274 for more details. - Gp[iteratorSymbol] = function() { - return this; - }; +var _possibleConstructorReturn2 = __webpack_require__(5); - Gp.toString = function() { - return "[object Generator]"; - }; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; +var _inherits2 = __webpack_require__(6); - if (1 in locs) { - entry.catchLoc = locs[1]; - } +var _inherits3 = _interopRequireDefault(_inherits2); - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } +var _slicedToArray2 = __webpack_require__(301); - this.tryEntries.push(entry); - } +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } +var _react = __webpack_require__(1); - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } +var _react2 = _interopRequireDefault(_react); - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); +var _timeUtils = __webpack_require__(90); - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; +function getStyles(props, context) { + var styles = { + root: { + directionInvariant: true, + display: 'inline-block', + position: 'absolute', + width: 32, + height: 32, + borderRadius: '100%', + left: 'calc(50% - 16px)', + top: 10, + textAlign: 'center', + paddingTop: 5, + userSelect: 'none', /* Chrome all / Safari all */ + fontSize: '1.1em', + pointerEvents: 'none', + boxSizing: 'border-box' + } }; - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } + var muiTheme = context.muiTheme; - if (typeof iterable.next === "function") { - return iterable; - } - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } + var pos = props.value; - next.value = undefined; - next.done = true; + if (props.type === 'hour') { + pos %= 12; + } else { + pos = pos / 5; + } - return next; - }; + var positions = [[0, 5], [54.5, 16.6], [94.4, 59.5], [109, 114], [94.4, 168.5], [54.5, 208.4], [0, 223], [-54.5, 208.4], [-94.4, 168.5], [-109, 114], [-94.4, 59.5], [-54.5, 19.6]]; - return next.next = next; - } - } + var innerPositions = [[0, 40], [36.9, 49.9], [64, 77], [74, 114], [64, 151], [37, 178], [0, 188], [-37, 178], [-64, 151], [-74, 114], [-64, 77], [-37, 50]]; - // Return an iterator with no values. - return { next: doneResult }; + if (props.isSelected) { + styles.root.backgroundColor = muiTheme.timePicker.accentColor; + styles.root.color = muiTheme.timePicker.selectTextColor; } - runtime.values = values; - function doneResult() { - return { value: undefined, done: true }; + var transformPos = positions[pos]; + + if ((0, _timeUtils.isInner)(props)) { + styles.root.width = 28; + styles.root.height = 28; + styles.root.left = 'calc(50% - 14px)'; + transformPos = innerPositions[pos]; } - Context.prototype = { - constructor: Context, + var _transformPos = transformPos, + _transformPos2 = (0, _slicedToArray3.default)(_transformPos, 2), + x = _transformPos2[0], + y = _transformPos2[1]; - reset: function(skipTempReset) { - this.prev = 0; - this.next = 0; - // Resetting context._sent for legacy support of Babel's - // function.sent implementation. - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; + styles.root.transform = 'translate(' + x + 'px, ' + y + 'px)'; - this.method = "next"; - this.arg = undefined; + return styles; +} - this.tryEntries.forEach(resetTryEntry); +var ClockNumber = function (_Component) { + (0, _inherits3.default)(ClockNumber, _Component); - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && - hasOwn.call(this, name) && - !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, + function ClockNumber() { + (0, _classCallCheck3.default)(this, ClockNumber); + return (0, _possibleConstructorReturn3.default)(this, (ClockNumber.__proto__ || (0, _getPrototypeOf2.default)(ClockNumber)).apply(this, arguments)); + } - stop: function() { - this.done = true; + (0, _createClass3.default)(ClockNumber, [{ + key: 'render', + value: function render() { + var prepareStyles = this.context.muiTheme.prepareStyles; - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } + var styles = getStyles(this.props, this.context); + var clockNumber = this.props.value === 0 ? '00' : this.props.value; - return this.rval; - }, + return _react2.default.createElement( + 'span', + { style: prepareStyles(styles.root) }, + clockNumber + ); + } + }]); + return ClockNumber; +}(_react.Component); - dispatchException: function(exception) { - if (this.done) { - throw exception; - } +ClockNumber.defaultProps = { + value: 0, + type: 'minute', + isSelected: false +}; +ClockNumber.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? ClockNumber.propTypes = { + isSelected: _react.PropTypes.bool, + onSelected: _react.PropTypes.func, + type: _react.PropTypes.oneOf(['hour', 'minute']), + value: _react.PropTypes.number +} : void 0; +exports.default = ClockNumber; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; +/***/ }), +/* 303 */ +/***/ (function(module, exports, __webpack_require__) { - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined; - } +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { - return !! caught; - } +Object.defineProperty(exports, "__esModule", { + value: true +}); - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; +var _getPrototypeOf = __webpack_require__(4); - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); +var _classCallCheck2 = __webpack_require__(2); - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } +var _createClass2 = __webpack_require__(3); - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } +var _createClass3 = _interopRequireDefault(_createClass2); - } else { - throw new Error("try statement without catch or finally"); - } - } - } - }, +var _possibleConstructorReturn2 = __webpack_require__(5); - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && - this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - if (finallyEntry && - (type === "break" || - type === "continue") && - finallyEntry.tryLoc <= arg && - arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } +var _inherits2 = __webpack_require__(6); - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; +var _inherits3 = _interopRequireDefault(_inherits2); - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } +var _react = __webpack_require__(1); - return this.complete(record); - }, +var _react2 = _interopRequireDefault(_react); - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } +var _timeUtils = __webpack_require__(90); - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - return ContinueSentinel; - }, +function calcAngle(value, base) { + value %= base; + var angle = 360 / base * value; + return angle; +} - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, +function getStyles(props, context, state) { + var hasSelected = props.hasSelected, + type = props.type, + value = props.value; + var inner = state.inner; + var timePicker = context.muiTheme.timePicker; - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } + var angle = type === 'hour' ? calcAngle(value, 12) : calcAngle(value, 60); - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); + var styles = { + root: { + height: inner ? '30%' : '40%', + background: timePicker.accentColor, + width: 2, + left: 'calc(50% - 1px)', + position: 'absolute', + bottom: '50%', + transformOrigin: 'bottom', + pointerEvents: 'none', + transform: 'rotateZ(' + angle + 'deg)' }, + mark: { + boxSizing: 'content-box', + background: timePicker.selectTextColor, + border: '4px solid ' + timePicker.accentColor, + display: hasSelected && 'none', + width: 7, + height: 7, + position: 'absolute', + top: -5, + left: -6, + borderRadius: '100%' + } + }; - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; + return styles; +} + +var ClockPointer = function (_Component) { + (0, _inherits3.default)(ClockPointer, _Component); + + function ClockPointer() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClockPointer); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockPointer.__proto__ || (0, _getPrototypeOf2.default)(ClockPointer)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + inner: false + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined; + (0, _createClass3.default)(ClockPointer, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + inner: (0, _timeUtils.isInner)(this.props) + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + inner: (0, _timeUtils.isInner)(nextProps) + }); + } + }, { + key: 'render', + value: function render() { + if (this.props.value === null) { + return _react2.default.createElement('span', null); } - return ContinueSentinel; + var styles = getStyles(this.props, this.context, this.state); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement('div', { style: prepareStyles(styles.mark) }) + ); } - }; -})( - // Among the various tricks for obtaining a reference to the global - // object, this seems to be the most reliable technique that does not - // use indirect eval (which violates Content Security Policy). - typeof global === "object" ? global : - typeof window === "object" ? window : - typeof self === "object" ? self : this -); + }]); + return ClockPointer; +}(_react.Component); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46))) +ClockPointer.defaultProps = { + hasSelected: false, + value: null, + type: 'minute' +}; +ClockPointer.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? ClockPointer.propTypes = { + hasSelected: _react.PropTypes.bool, + type: _react.PropTypes.oneOf(['hour', 'minute']), + value: _react.PropTypes.number +} : void 0; +exports.default = ClockPointer; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 310 */ +/* 304 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(192); -__webpack_require__(72); -__webpack_require__(94); -__webpack_require__(319); -__webpack_require__(326); -__webpack_require__(327); -module.exports = __webpack_require__(17).Promise; +"use strict"; -/***/ }), -/* 311 */ -/***/ (function(module, exports, __webpack_require__) { +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; -var toInteger = __webpack_require__(125); -var defined = __webpack_require__(126); -// true -> String#at -// false -> String#codePointAt -module.exports = function (TO_STRING) { - return function (that, pos) { - var s = String(defined(that)); - var i = toInteger(pos); - var l = s.length; - var a, b; - if (i < 0 || i >= l) return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; -}; +var _Toggle = __webpack_require__(728); + +var _Toggle2 = _interopRequireDefault(_Toggle); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Toggle2.default; /***/ }), -/* 312 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var create = __webpack_require__(129); -var descriptor = __webpack_require__(73); -var setToStringTag = __webpack_require__(93); -var IteratorPrototype = {}; -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__(47)(IteratorPrototype, __webpack_require__(21)('iterator'), function () { return this; }); +Object.defineProperty(exports, "__esModule", { + value: true +}); -module.exports = function (Constructor, NAME, next) { - Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); - setToStringTag(Constructor, NAME + ' Iterator'); -}; +var _colors = __webpack_require__(37); + +var _colorManipulator = __webpack_require__(62); +var _spacing = __webpack_require__(192); + +var _spacing2 = _interopRequireDefault(_spacing); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Light Theme is the default theme used in material-ui. It is guaranteed to + * have all theme variables needed for every component. Variables not defined + * in a custom theme will default to these values. + */ +exports.default = { + spacing: _spacing2.default, + fontFamily: 'Roboto, sans-serif', + palette: { + primary1Color: _colors.cyan500, + primary2Color: _colors.cyan700, + primary3Color: _colors.grey400, + accent1Color: _colors.pinkA200, + accent2Color: _colors.grey100, + accent3Color: _colors.grey500, + textColor: _colors.darkBlack, + secondaryTextColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.54), + alternateTextColor: _colors.white, + canvasColor: _colors.white, + borderColor: _colors.grey300, + disabledColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.3), + pickerHeaderColor: _colors.cyan500, + clockCircleColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.07), + shadowColor: _colors.fullBlack + } +}; /** + * NB: If you update this file, please also update `docs/src/app/customization/Themes.js` + */ /***/ }), -/* 313 */ +/* 306 */ /***/ (function(module, exports, __webpack_require__) { -var dP = __webpack_require__(36); -var anObject = __webpack_require__(37); -var getKeys = __webpack_require__(64); +"use strict"; -module.exports = __webpack_require__(42) ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = getKeys(Properties); - var length = keys.length; - var i = 0; - var P; - while (length > i) dP.f(O, P = keys[i++], Properties[P]); - return O; -}; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + menu: 1000, + appBar: 1100, + drawerOverlay: 1200, + drawer: 1300, + dialogOverlay: 1400, + dialog: 1500, + layer: 2000, + popover: 2100, + snackbar: 2900, + tooltip: 3000 +}; /***/ }), -/* 314 */ +/* 307 */ /***/ (function(module, exports, __webpack_require__) { -// false -> Array#indexOf -// true -> Array#includes -var toIObject = __webpack_require__(49); -var toLength = __webpack_require__(130); -var toAbsoluteIndex = __webpack_require__(315); -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; -}; +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { "Webkit": { "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "backfaceVisibility": true, "perspective": true, "perspectiveOrigin": true, "transformStyle": true, "transformOriginZ": true, "animation": true, "animationDelay": true, "animationDirection": true, "animationFillMode": true, "animationDuration": true, "animationIterationCount": true, "animationName": true, "animationPlayState": true, "animationTimingFunction": true, "appearance": true, "userSelect": true, "fontKerning": true, "textEmphasisPosition": true, "textEmphasis": true, "textEmphasisStyle": true, "textEmphasisColor": true, "boxDecorationBreak": true, "clipPath": true, "maskImage": true, "maskMode": true, "maskRepeat": true, "maskPosition": true, "maskClip": true, "maskOrigin": true, "maskSize": true, "maskComposite": true, "mask": true, "maskBorderSource": true, "maskBorderMode": true, "maskBorderSlice": true, "maskBorderWidth": true, "maskBorderOutset": true, "maskBorderRepeat": true, "maskBorder": true, "maskType": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "filter": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true, "flex": true, "flexBasis": true, "flexDirection": true, "flexGrow": true, "flexFlow": true, "flexShrink": true, "flexWrap": true, "alignContent": true, "alignItems": true, "alignSelf": true, "justifyContent": true, "order": true, "transition": true, "transitionDelay": true, "transitionDuration": true, "transitionProperty": true, "transitionTimingFunction": true, "backdropFilter": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "shapeImageThreshold": true, "shapeImageMargin": true, "shapeImageOutside": true, "hyphens": true, "flowInto": true, "flowFrom": true, "regionFragment": true, "textSizeAdjust": true }, "Moz": { "appearance": true, "userSelect": true, "boxSizing": true, "textAlignLast": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "tabSize": true, "hyphens": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true }, "ms": { "flex": true, "flexBasis": false, "flexDirection": true, "flexGrow": false, "flexFlow": true, "flexShrink": false, "flexWrap": true, "alignContent": false, "alignItems": false, "alignSelf": false, "justifyContent": false, "order": false, "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "userSelect": true, "wrapFlow": true, "wrapThrough": true, "wrapMargin": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "touchAction": true, "hyphens": true, "flowInto": true, "flowFrom": true, "breakBefore": true, "breakAfter": true, "breakInside": true, "regionFragment": true, "gridTemplateColumns": true, "gridTemplateRows": true, "gridTemplateAreas": true, "gridTemplate": true, "gridAutoColumns": true, "gridAutoRows": true, "gridAutoFlow": true, "grid": true, "gridRowStart": true, "gridColumnStart": true, "gridRowEnd": true, "gridRow": true, "gridColumn": true, "gridColumnEnd": true, "gridColumnGap": true, "gridRowGap": true, "gridArea": true, "gridGap": true, "textSizeAdjust": true } }; +module.exports = exports["default"]; /***/ }), -/* 315 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { -var toInteger = __webpack_require__(125); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sortPrefixedStyle; + +var _isPrefixedProperty = __webpack_require__(733); + +var _isPrefixedProperty2 = _interopRequireDefault(_isPrefixedProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function sortPrefixedStyle(style) { + return Object.keys(style).sort(function (left, right) { + if ((0, _isPrefixedProperty2.default)(left) && !(0, _isPrefixedProperty2.default)(right)) { + return -1; + } else if (!(0, _isPrefixedProperty2.default)(left) && (0, _isPrefixedProperty2.default)(right)) { + return 1; + } + return 0; + }).reduce(function (sortedStyle, prop) { + sortedStyle[prop] = style[prop]; + return sortedStyle; + }, {}); +} +module.exports = exports['default']; /***/ }), -/* 316 */ +/* 309 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var addToUnscopables = __webpack_require__(317); -var step = __webpack_require__(318); -var Iterators = __webpack_require__(63); -var toIObject = __webpack_require__(49); -// 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() -module.exports = __webpack_require__(193)(Array, 'Array', function (iterated, kind) { - this._t = toIObject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind -// 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function () { - var O = this._t; - var kind = this._k; - var index = this._i++; - if (!O || index >= O.length) { - this._t = undefined; - return step(1); - } - if (kind == 'keys') return step(0, index); - if (kind == 'values') return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'values'); +var uppercasePattern = /[A-Z]/g; +var msPattern = /^ms-/; +var cache = {}; -// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) -Iterators.Arguments = Iterators.Array; +function hyphenateStyleName(string) { + return string in cache + ? cache[string] + : cache[string] = string + .replace(uppercasePattern, '-$&') + .toLowerCase() + .replace(msPattern, '-ms-'); +} -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); +module.exports = hyphenateStyleName; /***/ }), -/* 317 */ -/***/ (function(module, exports) { +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = function () { /* empty */ }; +"use strict"; -/***/ }), -/* 318 */ -/***/ (function(module, exports) { +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _colors = __webpack_require__(37); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Typography = function Typography() { + (0, _classCallCheck3.default)(this, Typography); + + // text colors + this.textFullBlack = _colors.fullBlack; + this.textDarkBlack = _colors.darkBlack; + this.textLightBlack = _colors.lightBlack; + this.textMinBlack = _colors.minBlack; + this.textFullWhite = _colors.fullWhite; + this.textDarkWhite = _colors.darkWhite; + this.textLightWhite = _colors.lightWhite; + + // font weight + this.fontWeightLight = 300; + this.fontWeightNormal = 400; + this.fontWeightMedium = 500; -module.exports = function (done, value) { - return { value: value, done: !!done }; + this.fontStyleButtonFontSize = 14; }; +exports.default = new Typography(); /***/ }), -/* 319 */ +/* 311 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* WEBPACK VAR INJECTION */(function(process) { -var LIBRARY = __webpack_require__(90); -var global = __webpack_require__(22); -var ctx = __webpack_require__(60); -var classof = __webpack_require__(134); -var $export = __webpack_require__(27); -var isObject = __webpack_require__(61); -var aFunction = __webpack_require__(91); -var anInstance = __webpack_require__(320); -var forOf = __webpack_require__(321); -var speciesConstructor = __webpack_require__(202); -var task = __webpack_require__(203).set; -var microtask = __webpack_require__(323)(); -var newPromiseCapabilityModule = __webpack_require__(136); -var perform = __webpack_require__(204); -var promiseResolve = __webpack_require__(205); -var PROMISE = 'Promise'; -var TypeError = global.TypeError; -var process = global.process; -var $Promise = global[PROMISE]; -var isNode = classof(process) == 'process'; -var empty = function () { /* empty */ }; -var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; -var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; - -var USE_NATIVE = !!function () { - try { - // correct subclassing with @@species support - var promise = $Promise.resolve(1); - var FakePromise = (promise.constructor = {})[__webpack_require__(21)('species')] = function (exec) { - exec(empty, empty); - }; - // unhandled rejections tracking support, NodeJS Promise without it fails @@species test - return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; - } catch (e) { /* empty */ } -}(); +Object.defineProperty(exports, "__esModule", { + value: true +}); -// helpers -var sameConstructor = LIBRARY ? function (a, b) { - // with library wrapper special case - return a === b || a === $Promise && b === Wrapper; -} : function (a, b) { - return a === b; -}; -var isThenable = function (it) { - var then; - return isObject(it) && typeof (then = it.then) == 'function' ? then : false; -}; -var notify = function (promise, isReject) { - if (promise._n) return; - promise._n = true; - var chain = promise._c; - microtask(function () { - var value = promise._v; - var ok = promise._s == 1; - var i = 0; - var run = function (reaction) { - var handler = ok ? reaction.ok : reaction.fail; - var resolve = reaction.resolve; - var reject = reaction.reject; - var domain = reaction.domain; - var result, then; - try { - if (handler) { - if (!ok) { - if (promise._h == 2) onHandleUnhandled(promise); - promise._h = 1; - } - if (handler === true) result = value; - else { - if (domain) domain.enter(); - result = handler(value); - if (domain) domain.exit(); - } - if (result === reaction.promise) { - reject(TypeError('Promise-chain cycle')); - } else if (then = isThenable(result)) { - then.call(result, resolve, reject); - } else resolve(result); - } else reject(value); - } catch (e) { - reject(e); - } - }; - while (chain.length > i) run(chain[i++]); // variable length - can't use forEach - promise._c = []; - promise._n = false; - if (isReject && !promise._h) onUnhandled(promise); - }); -}; -var onUnhandled = function (promise) { - task.call(global, function () { - var value = promise._v; - var unhandled = isUnhandled(promise); - var result, handler, console; - if (unhandled) { - result = perform(function () { - if (isNode) { - process.emit('unhandledRejection', value, promise); - } else if (handler = global.onunhandledrejection) { - handler({ promise: promise, reason: value }); - } else if ((console = global.console) && console.error) { - console.error('Unhandled promise rejection', value); - } - }); - // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should - promise._h = isNode || isUnhandled(promise) ? 2 : 1; - } promise._a = undefined; - if (unhandled && result.e) throw result.v; - }); -}; -var isUnhandled = function (promise) { - if (promise._h == 1) return false; - var chain = promise._a || promise._c; - var i = 0; - var reaction; - while (chain.length > i) { - reaction = chain[i++]; - if (reaction.fail || !isUnhandled(reaction.promise)) return false; - } return true; -}; -var onHandleUnhandled = function (promise) { - task.call(global, function () { - var handler; - if (isNode) { - process.emit('rejectionHandled', promise); - } else if (handler = global.onrejectionhandled) { - handler({ promise: promise, reason: promise._v }); - } - }); -}; -var $reject = function (value) { - var promise = this; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; // unwrap - promise._v = value; - promise._s = 2; - if (!promise._a) promise._a = promise._c.slice(); - notify(promise, true); -}; -var $resolve = function (value) { - var promise = this; - var then; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; // unwrap - try { - if (promise === value) throw TypeError("Promise can't be resolved itself"); - if (then = isThenable(value)) { - microtask(function () { - var wrapper = { _w: promise, _d: false }; // wrap - try { - then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); - } catch (e) { - $reject.call(wrapper, e); - } - }); - } else { - promise._v = value; - promise._s = 1; - notify(promise, false); - } - } catch (e) { - $reject.call({ _w: promise, _d: false }, e); // wrap - } -}; +var _extends2 = __webpack_require__(8); -// constructor polyfill -if (!USE_NATIVE) { - // 25.4.3.1 Promise(executor) - $Promise = function Promise(executor) { - anInstance(this, $Promise, PROMISE, '_h'); - aFunction(executor); - Internal.call(this); - try { - executor(ctx($resolve, this, 1), ctx($reject, this, 1)); - } catch (err) { - $reject.call(this, err); - } - }; - // eslint-disable-next-line no-unused-vars - Internal = function Promise(executor) { - this._c = []; // <- awaiting reactions - this._a = undefined; // <- checked in isUnhandled reactions - this._s = 0; // <- state - this._d = false; // <- done - this._v = undefined; // <- value - this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled - this._n = false; // <- notify - }; - Internal.prototype = __webpack_require__(324)($Promise.prototype, { - // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) - then: function then(onFulfilled, onRejected) { - var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); - reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; - reaction.fail = typeof onRejected == 'function' && onRejected; - reaction.domain = isNode ? process.domain : undefined; - this._c.push(reaction); - if (this._a) this._a.push(reaction); - if (this._s) notify(this, false); - return reaction.promise; - }, - // 25.4.5.1 Promise.prototype.catch(onRejected) - 'catch': function (onRejected) { - return this.then(undefined, onRejected); - } - }); - OwnPromiseCapability = function () { - var promise = new Internal(); - this.promise = promise; - this.resolve = ctx($resolve, promise, 1); - this.reject = ctx($reject, promise, 1); - }; - newPromiseCapabilityModule.f = newPromiseCapability = function (C) { - return sameConstructor($Promise, C) - ? new OwnPromiseCapability(C) - : newGenericPromiseCapability(C); - }; -} - -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); -__webpack_require__(93)($Promise, PROMISE); -__webpack_require__(325)(PROMISE); -Wrapper = __webpack_require__(17)[PROMISE]; - -// statics -$export($export.S + $export.F * !USE_NATIVE, PROMISE, { - // 25.4.4.5 Promise.reject(r) - reject: function reject(r) { - var capability = newPromiseCapability(this); - var $$reject = capability.reject; - $$reject(r); - return capability.promise; - } -}); -$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { - // 25.4.4.6 Promise.resolve(x) - resolve: function resolve(x) { - // instanceof instead of internal slot check because we should fix it without replacement native Promise core - if (x instanceof $Promise && sameConstructor(x.constructor, this)) return x; - return promiseResolve(this, x); - } -}); -$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(206)(function (iter) { - $Promise.all(iter)['catch'](empty); -})), PROMISE, { - // 25.4.4.1 Promise.all(iterable) - all: function all(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var resolve = capability.resolve; - var reject = capability.reject; - var result = perform(function () { - var values = []; - var index = 0; - var remaining = 1; - forOf(iterable, false, function (promise) { - var $index = index++; - var alreadyCalled = false; - values.push(undefined); - remaining++; - C.resolve(promise).then(function (value) { - if (alreadyCalled) return; - alreadyCalled = true; - values[$index] = value; - --remaining || resolve(values); - }, reject); - }); - --remaining || resolve(values); - }); - if (result.e) reject(result.v); - return capability.promise; - }, - // 25.4.4.4 Promise.race(iterable) - race: function race(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var reject = capability.reject; - var result = perform(function () { - forOf(iterable, false, function (promise) { - C.resolve(promise).then(capability.resolve, reject); - }); - }); - if (result.e) reject(result.v); - return capability.promise; - } -}); +var _extends3 = _interopRequireDefault(_extends2); +var _objectWithoutProperties2 = __webpack_require__(9); -/***/ }), -/* 320 */ -/***/ (function(module, exports) { +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -module.exports = function (it, Constructor, name, forbiddenField) { - if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { - throw TypeError(name + ': incorrect invocation!'); - } return it; -}; +var _getPrototypeOf = __webpack_require__(4); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -/***/ }), -/* 321 */ -/***/ (function(module, exports, __webpack_require__) { +var _classCallCheck2 = __webpack_require__(2); -var ctx = __webpack_require__(60); -var call = __webpack_require__(200); -var isArrayIter = __webpack_require__(201); -var anObject = __webpack_require__(37); -var toLength = __webpack_require__(130); -var getIterFn = __webpack_require__(135); -var BREAK = {}; -var RETURN = {}; -var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); - var f = ctx(fn, that, entries ? 2 : 1); - var index = 0; - var length, step, iterator, result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); - // fast case for arrays with default iterator - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { - result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; - } -}; -exports.BREAK = BREAK; -exports.RETURN = RETURN; +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var _createClass2 = __webpack_require__(3); -/***/ }), -/* 322 */ -/***/ (function(module, exports) { +var _createClass3 = _interopRequireDefault(_createClass2); -// fast apply, http://jsperf.lnkit.com/fast-apply/5 -module.exports = function (fn, args, that) { - var un = that === undefined; - switch (args.length) { - case 0: return un ? fn() - : fn.call(that); - case 1: return un ? fn(args[0]) - : fn.call(that, args[0]); - case 2: return un ? fn(args[0], args[1]) - : fn.call(that, args[0], args[1]); - case 3: return un ? fn(args[0], args[1], args[2]) - : fn.call(that, args[0], args[1], args[2]); - case 4: return un ? fn(args[0], args[1], args[2], args[3]) - : fn.call(that, args[0], args[1], args[2], args[3]); - } return fn.apply(that, args); -}; +var _possibleConstructorReturn2 = __webpack_require__(5); +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -/***/ }), -/* 323 */ -/***/ (function(module, exports, __webpack_require__) { +var _inherits2 = __webpack_require__(6); -var global = __webpack_require__(22); -var macrotask = __webpack_require__(203).set; -var Observer = global.MutationObserver || global.WebKitMutationObserver; -var process = global.process; -var Promise = global.Promise; -var isNode = __webpack_require__(74)(process) == 'process'; +var _inherits3 = _interopRequireDefault(_inherits2); -module.exports = function () { - var head, last, notify; +var _simpleAssign = __webpack_require__(7); - var flush = function () { - var parent, fn; - if (isNode && (parent = process.domain)) parent.exit(); - while (head) { - fn = head.fn; - head = head.next; - try { - fn(); - } catch (e) { - if (head) notify(); - else last = undefined; - throw e; - } - } last = undefined; - if (parent) parent.enter(); - }; +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - // Node.js - if (isNode) { - notify = function () { - process.nextTick(flush); - }; - // browsers with MutationObserver - } else if (Observer) { - var toggle = true; - var node = document.createTextNode(''); - new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new - notify = function () { - node.data = toggle = !toggle; - }; - // environments with maybe non-completely correct, but existent Promise - } else if (Promise && Promise.resolve) { - var promise = Promise.resolve(); - notify = function () { - promise.then(flush); - }; - // for other environments - macrotask based on: - // - setImmediate - // - MessageChannel - // - window.postMessag - // - onreadystatechange - // - setTimeout - } else { - notify = function () { - // strange IE + webpack dev server bug - use .call(global) - macrotask.call(global, flush); - }; - } +var _react = __webpack_require__(1); - return function (fn) { - var task = { fn: fn, next: undefined }; - if (last) last.next = task; - if (!head) { - head = task; - notify(); - } last = task; - }; -}; +var _react2 = _interopRequireDefault(_react); +var _Tooltip = __webpack_require__(263); -/***/ }), -/* 324 */ -/***/ (function(module, exports, __webpack_require__) { +var _Tooltip2 = _interopRequireDefault(_Tooltip); -var hide = __webpack_require__(47); -module.exports = function (target, src, safe) { - for (var key in src) { - if (safe && target[key]) target[key] = src[key]; - else hide(target, key, src[key]); - } return target; -}; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function getStyles(props, context) { + var tableHeaderColumn = context.muiTheme.tableHeaderColumn; -/***/ }), -/* 325 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; + return { + root: { + fontWeight: 'normal', + fontSize: 12, + paddingLeft: tableHeaderColumn.spacing, + paddingRight: tableHeaderColumn.spacing, + height: tableHeaderColumn.height, + textAlign: 'left', + whiteSpace: 'nowrap', + textOverflow: 'ellipsis', + color: tableHeaderColumn.textColor, + position: 'relative' + }, + tooltip: { + boxSizing: 'border-box', + marginTop: tableHeaderColumn.height / 2 + } + }; +} -var global = __webpack_require__(22); -var core = __webpack_require__(17); -var dP = __webpack_require__(36); -var DESCRIPTORS = __webpack_require__(42); -var SPECIES = __webpack_require__(21)('species'); +var TableHeaderColumn = function (_Component) { + (0, _inherits3.default)(TableHeaderColumn, _Component); -module.exports = function (KEY) { - var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; - if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { - configurable: true, - get: function () { return this; } - }); -}; + function TableHeaderColumn() { + var _ref; + var _temp, _this, _ret; -/***/ }), -/* 326 */ -/***/ (function(module, exports, __webpack_require__) { + (0, _classCallCheck3.default)(this, TableHeaderColumn); -"use strict"; -// https://github.com/tc39/proposal-promise-finally + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -var $export = __webpack_require__(27); -var core = __webpack_require__(17); -var global = __webpack_require__(22); -var speciesConstructor = __webpack_require__(202); -var promiseResolve = __webpack_require__(205); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableHeaderColumn.__proto__ || (0, _getPrototypeOf2.default)(TableHeaderColumn)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.onMouseEnter = function () { + if (_this.props.tooltip !== undefined) { + _this.setState({ hovered: true }); + } + }, _this.onMouseLeave = function () { + if (_this.props.tooltip !== undefined) { + _this.setState({ hovered: false }); + } + }, _this.onClick = function (event) { + if (_this.props.onClick) { + _this.props.onClick(event, _this.props.columnNumber); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } -$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { - var C = speciesConstructor(this, core.Promise || global.Promise); - var isFunction = typeof onFinally == 'function'; - return this.then( - isFunction ? function (x) { - return promiseResolve(C, onFinally()).then(function () { return x; }); - } : onFinally, - isFunction ? function (e) { - return promiseResolve(C, onFinally()).then(function () { throw e; }); - } : onFinally - ); -} }); + (0, _createClass3.default)(TableHeaderColumn, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + columnNumber = _props.columnNumber, + hoverable = _props.hoverable, + onClick = _props.onClick, + onHover = _props.onHover, + onHoverExit = _props.onHoverExit, + style = _props.style, + tooltip = _props.tooltip, + tooltipStyle = _props.tooltipStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'columnNumber', 'hoverable', 'onClick', 'onHover', 'onHoverExit', 'style', 'tooltip', 'tooltipStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + var styles = getStyles(this.props, this.context); -/***/ }), -/* 327 */ -/***/ (function(module, exports, __webpack_require__) { + var handlers = { + onMouseEnter: this.onMouseEnter, + onMouseLeave: this.onMouseLeave, + onClick: this.onClick + }; -"use strict"; + var tooltipNode = void 0; -// https://github.com/tc39/proposal-promise-try -var $export = __webpack_require__(27); -var newPromiseCapability = __webpack_require__(136); -var perform = __webpack_require__(204); + if (tooltip !== undefined) { + tooltipNode = _react2.default.createElement(_Tooltip2.default, { + label: tooltip, + show: this.state.hovered, + style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyle) + }); + } -$export($export.S, 'Promise', { 'try': function (callbackfn) { - var promiseCapability = newPromiseCapability.f(this); - var result = perform(callbackfn); - (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); - return promiseCapability.promise; -} }); + return _react2.default.createElement( + 'th', + (0, _extends3.default)({ + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }, handlers, other), + tooltipNode, + children + ); + } + }]); + return TableHeaderColumn; +}(_react.Component); +TableHeaderColumn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? TableHeaderColumn.propTypes = { + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Number to identify the header row. This property + * is automatically populated when used with TableHeader. + */ + columnNumber: _react.PropTypes.number, + /** + * @ignore + * Not used here but we need to remove it from the root element. + */ + hoverable: _react.PropTypes.bool, + /** @ignore */ + onClick: _react.PropTypes.func, + /** + * @ignore + * Not used here but we need to remove it from the root element. + */ + onHover: _react.PropTypes.func, + /** + * @ignore + * Not used here but we need to remove it from the root element. + */ + onHoverExit: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The string to supply to the tooltip. If not + * string is supplied no tooltip will be shown. + */ + tooltip: _react.PropTypes.string, + /** + * Additional styling that can be applied to the tooltip. + */ + tooltipStyle: _react.PropTypes.object +} : void 0; +exports.default = TableHeaderColumn; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 328 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23508,1424 +23840,1474 @@ $export($export.S, 'Promise', { 'try': function (callbackfn) { Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = addNotification; -var _toConsumableArray2 = __webpack_require__(95); +var _ActionTypes = __webpack_require__(125); -var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); +var types = _interopRequireWildcard(_ActionTypes); -var _keys = __webpack_require__(50); +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -var _keys2 = _interopRequireDefault(_keys); +function addNotification(message) { + return { + type: types.NOTIFICATION_ADD, + message: message + }; +} + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { -var _getIterator2 = __webpack_require__(209); +module.exports = __webpack_require__(314); + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; -var _getIterator3 = _interopRequireDefault(_getIterator2); -var _regenerator = __webpack_require__(123); +var _regenerator = __webpack_require__(126); var _regenerator2 = _interopRequireDefault(_regenerator); -var _asyncToGenerator2 = __webpack_require__(124); +var _asyncToGenerator2 = __webpack_require__(127); var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); -var _getPrototypeOf = __webpack_require__(4); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var Start = function () { + var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() { + var settings, manager; + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return StorageManager.getFromChromeStorage('settings'); -var _classCallCheck2 = __webpack_require__(2); + case 2: + _context.t1 = _Supreme.SHOP_NAME; + _context.t0 = _context.sent[_context.t1]; -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + if (_context.t0) { + _context.next = 6; + break; + } -var _createClass2 = __webpack_require__(3); + _context.t0 = {}; -var _createClass3 = _interopRequireDefault(_createClass2); + case 6: + settings = _context.t0; + manager = new _supreme2.default(settings.Options, settings.Sizes, settings.Billing); -var _possibleConstructorReturn2 = __webpack_require__(5); + manager.start(); -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + case 9: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + })); -var _inherits2 = __webpack_require__(6); + return function Start() { + return _ref.apply(this, arguments); + }; +}(); -var _inherits3 = _interopRequireDefault(_inherits2); +var _supreme = __webpack_require__(334); -var _BaseManager2 = __webpack_require__(359); +var _supreme2 = _interopRequireDefault(_supreme); -var _BaseManager3 = _interopRequireDefault(_BaseManager2); +var _StorageManager = __webpack_require__(367); -var _Helpers = __webpack_require__(212); +var StorageManager = _interopRequireWildcard(_StorageManager); -var Helpers = _interopRequireWildcard(_Helpers); +var _Supreme = __webpack_require__(370); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var SupremeManager = function (_BaseManager) { - (0, _inherits3.default)(SupremeManager, _BaseManager); - - function SupremeManager(preferences, sizings, billing) { - (0, _classCallCheck3.default)(this, SupremeManager); +Start(); - var _this = (0, _possibleConstructorReturn3.default)(this, (SupremeManager.__proto__ || (0, _getPrototypeOf2.default)(SupremeManager)).call(this)); +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { - _this.preferences = preferences; - _this.sizings = sizings; - _this.billing = billing; - return _this; - } +/* WEBPACK VAR INJECTION */(function(global) {// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this; - /** - * This function is called whenever a new page change occurs - */ +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; - (0, _createClass3.default)(SupremeManager, [{ - key: 'onPageChange', - value: function () { - var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() { - var hideSoldOut, autoCheckout, autoPay; - return _regenerator2.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - this.processLinks(); +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; - // if stores are not configured yet.. +module.exports = __webpack_require__(316); - if (this.isConfigured()) { - _context.next = 4; - break; - } +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; + } +} - this.setNotificationBarText('Bot not yet configured'); - return _context.abrupt('return'); +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(49))) - case 4: - hideSoldOut = this.preferences.hideSoldOut; +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { - this.processSoldOutProducts(hideSoldOut); +/* WEBPACK VAR INJECTION */(function(global, process) {/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ - autoCheckout = this.preferences.autoCheckout; - autoPay = this.preferences.autoPay; +!(function(global) { + "use strict"; - this.setNotificationBarText('AutoCheckout ' + (autoCheckout ? 'enabled' : 'disabled') + ', AutoPay ' + (autoPay ? 'enabled' : 'disabled')); + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - if (this.preferences.autoCheckout) { - _context.next = 11; - break; - } + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } - return _context.abrupt('return'); + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; - case 11: - if (this.isProductPage()) { - this.processProduct(); - } else if (this.isCart()) { - this.processCart(); - } else if (this.isCheckout()) { - this.processCheckout(); - } + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); - case 12: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - })); + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); - function onPageChange() { - return _ref.apply(this, arguments); - } + return generator; + } + runtime.wrap = wrap; - return onPageChange; - }() - }, { - key: 'isConfigured', - value: function isConfigured() { - return ![this.preferences, this.sizings, this.billing].some(function (x) { - return x === undefined; - }); + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; } + } - /** - * Attach an event on product links of the page to reload the page instead of loading in ajax - */ + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; - }, { - key: 'processLinks', - value: function processLinks() { - var links = document.links; + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} - try { - for (var _iterator = (0, _getIterator3.default)(links), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var link = _step.value; + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; - link.addEventListener('click', function (e) { - window.location.href = this.href; - if (!e) e = window.event; + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } - if (e.stopPropagation) { - e.stopPropagation(); - } else { - e.cancelBubble = true; - } - }); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; } } - }, { - key: 'processSoldOutProducts', - value: function processSoldOutProducts(hideSoldOut) { - Array.prototype.forEach.call(document.getElementsByClassName('sold_out_tag'), function (x) { - return x.style.display = 'block'; - }); - if (hideSoldOut) { - var sold_outs = Array.prototype.filter.call(document.getElementsByTagName('article'), function (x) { - return x.getElementsByClassName('sold_out_tag').length; - }); - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; + genFun.prototype = Object.create(Gp); + return genFun; + }; - try { - for (var _iterator2 = (0, _getIterator3.default)(sold_outs), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var node = _step2.value; + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; - node.remove(); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); } + + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); } } - /** - * This function should be called when the user is on the 'cart' page, it will then redirect the user - * to the checkout page after the delay configured in the options - * @param {Object} preferencesStore Object that stores the preference options - */ - - }, { - key: 'processCart', - value: function processCart() { - this.timeout(function () { - document.location.href = '/checkout'; - }, 100, 'Going to checkout'); + if (typeof process === "object" && process.domain) { + invoke = process.domain.bind(invoke); } - /** - * This function should be called when the user is on the 'checkout' page, it will fill - * the checkout form with the values defined by the user in the options and then checkout after a delay - * @param {Object} preferencesStore Object that stores the preference options - * @param {Object} billingStore Object that stores the billings options - */ + var previousPromise; - }, { - key: 'processCheckout', - value: function processCheckout() { - var checkoutDelay = this.preferences.checkoutDelay; - var terms = document.getElementsByName('order[terms]'); - if (terms.length) { - terms[0].click(); + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); } - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - try { - for (var _iterator3 = (0, _getIterator3.default)((0, _keys2.default)(this.billing)), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var key = _step3.value; + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } - var el = document.getElementById(key); - if (el) { - el.value = this.billing[key]; - el.dispatchEvent(new Event('change')); - } - } + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } - // Process card number and CVV - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } + defineIteratorMethods(AsyncIterator.prototype); + runtime.AsyncIterator = AsyncIterator; - var card_field = document.getElementsByName('credit_card[nlb]'); - if (card_field) { - var f = card_field[0]; - f.value = this.billing['cnb']; - f.dispatchEvent(new Event('change')); - } + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; - var cvv_field = document.getElementsByName('credit_card[rvv]'); - if (cvv_field) { - var _f = cvv_field[0]; - _f.value = this.billing['vval']; - _f.dispatchEvent(new Event('change')); + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); } - if (this.preferences.captchaBypass) { - var captcha = document.querySelector('.g-recaptcha'); - if (captcha) { - captcha.remove(); + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); } - if (this.preferences.autoPay) { - this.timeout(function () { - var commitBtn = document.getElementsByName('commit')[0]; - if (commitBtn) { - commitBtn.click(); + + while (true) { + var delegate = context.delegate; + if (delegate) { + if (method === "return" || + (method === "throw" && delegate.iterator[method] === undefined)) { + // A return or throw (when the delegate iterator has no throw + // method) always terminates the yield* loop. + context.delegate = null; + + // If the delegate iterator has a return method, give it a + // chance to clean up. + var returnMethod = delegate.iterator["return"]; + if (returnMethod) { + var record = tryCatch(returnMethod, delegate.iterator, arg); + if (record.type === "throw") { + // If the return method threw an exception, let that + // exception prevail over the original return or throw. + method = "throw"; + arg = record.arg; + continue; + } + } + + if (method === "return") { + // Continue with the outer return, now that the delegate + // iterator has been terminated. + continue; + } } - }, checkoutDelay, 'Checking out'); - } - } - /** - * This function should be called when the user is on a product page, it will - * try to figure out if the product is sold out or not, and if not, it will find the best available size - * based on the user's preferences and then it will add the item to cart - */ + var record = tryCatch( + delegate.iterator[method], + delegate.iterator, + arg + ); - }, { - key: 'processProduct', - value: function processProduct() { - var _this2 = this; + if (record.type === "throw") { + context.delegate = null; - if (!this.isSoldOut()) { - var maxPrice = this.preferences.maxPrice; - var minPrice = this.preferences.minPrice; - var itemPrice = document.querySelector('[itemprop=price]'); - - if (itemPrice !== null) { - var price = +itemPrice.innerHTML.replace(/\D/g, ''); - if (!isNaN(price)) { - if (maxPrice !== undefined && price > maxPrice) { - this.setNotificationBarText('Product price is too high, not checking out'); - return; - } + // Like returning generator.throw(uncaught), but without the + // overhead of an extra function call. + method = "throw"; + arg = record.arg; + continue; + } - if (minPrice !== undefined && price < minPrice) { - this.setNotificationBarText('Product price is too low, not checking out'); - return; - } + // Delegate generator ran and handled its own exceptions so + // regardless of what the method was, we continue as if it is + // "next" with an undefined arg. + method = "next"; + arg = undefined; + + var info = record.arg; + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + } else { + state = GenStateSuspendedYield; + return info; } + + context.delegate = null; } - var submitBtn = document.querySelector('[name=commit]'); - var productCategory = this.getProductCategory(); - var sizesOptions = this.getSizesOptions(); + if (method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = arg; - // If sizes options are available - if (sizesOptions.length) { - var categorySize = this.sizings[productCategory]; - if (categorySize === undefined) { - this.setNotificationBarText('Unknown category "' + productCategory + '", cannot process'); - return; + } else if (method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw arg; } - var targetOption = sizesOptions.find(function (x) { - return _this2.sizeMatch(categorySize, x.text, productCategory); - }); - if (!targetOption) { - if (this.preferences.strictSize) { - this.setNotificationBarText('The desired size is not available'); - return; - } - targetOption = sizesOptions[0]; + if (context.dispatchException(arg)) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + method = "next"; + arg = undefined; } - targetOption.selected = true; + + } else if (method === "return") { + context.abrupt("return", arg); } - var atcDelay = this.preferences.addToCartDelay; - this.timeout(function () { - var process = function process() { - if (document.querySelector('.in-cart') && document.getElementById('cart')) { - setTimeout(function () { - window.location.href = '/checkout'; - }, 200); - } else { - submitBtn.click(); - _this2.timeout(function () { - return process(); - }, 500, 'Waiting for product to be in cart...'); - } + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + var info = { + value: record.arg, + done: context.done }; - process(); - }, atcDelay, 'Adding to cart'); - } - } + if (record.arg === ContinueSentinel) { + if (context.delegate && method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + arg = undefined; + } + } else { + return info; + } - /** - * Check if the user is currently on a product page - */ + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(arg) call above. + method = "throw"; + arg = record.arg; + } + } + }; + } - }, { - key: 'isProductPage', - value: function isProductPage() { - return Helpers.hasStringInPath('shop') && (Helpers.pageHasNodeOfClass('styles') || Helpers.pageHasNodeOfClass('price') || Helpers.pageHasNodeOfClass('style')); - } + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); - /** - * Check if the user is currently on the 'cart' page - */ + Gp[toStringTagSymbol] = "Generator"; - }, { - key: 'isCart', - value: function isCart() { - return Helpers.pageHasNodeOfClass('cart') && Helpers.hasStringInPath('cart'); - } + Gp.toString = function() { + return "[object Generator]"; + }; - /** - * Check if the user is currently at the checkout page - */ + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; - }, { - key: 'isCheckout', - value: function isCheckout() { - return Helpers.hasStringInPath('checkout'); + if (1 in locs) { + entry.catchLoc = locs[1]; } - /** - * Returns the product category when the user is on a product page - */ - - }, { - key: 'getProductCategory', - value: function getProductCategory() { - var category = Helpers.getQueryStringValue('atc-category'); - return category === "" ? location.pathname.substring(1).split('/')[1] : category; + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; } - /** - * Check if the current product is sold out - * @return {Boolean} - */ + this.tryEntries.push(entry); + } - }, { - key: 'isSoldOut', - value: function isSoldOut() { - return document.querySelector('input[name=commit]') === null; - } + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } - /** - * Return the available sizes for the current product - * @return {Array} - */ + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } - }, { - key: 'getSizesOptions', - value: function getSizesOptions() { - var sizes = document.getElementById('size'); - if (!sizes || !sizes.options) return []; - return [].concat((0, _toConsumableArray3.default)(sizes.options)); + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); } - }]); - return SupremeManager; -}(_BaseManager3.default); + keys.reverse(); -exports.default = SupremeManager; + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } -/***/ }), -/* 329 */ -/***/ (function(module, exports, __webpack_require__) { + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; -__webpack_require__(72); -__webpack_require__(330); -module.exports = __webpack_require__(17).Array.from; + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + if (typeof iterable.next === "function") { + return iterable; + } -/***/ }), -/* 330 */ -/***/ (function(module, exports, __webpack_require__) { + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } -"use strict"; + next.value = undefined; + next.done = true; -var ctx = __webpack_require__(60); -var $export = __webpack_require__(27); -var toObject = __webpack_require__(75); -var call = __webpack_require__(200); -var isArrayIter = __webpack_require__(201); -var toLength = __webpack_require__(130); -var createProperty = __webpack_require__(331); -var getIterFn = __webpack_require__(135); + return next; + }; -$export($export.S + $export.F * !__webpack_require__(206)(function (iter) { Array.from(iter); }), 'Array', { - // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) - from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { - var O = toObject(arrayLike); - var C = typeof this == 'function' ? this : Array; - var aLen = arguments.length; - var mapfn = aLen > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var index = 0; - var iterFn = getIterFn(O); - var length, result, step, iterator; - if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); - // if object isn't iterable or it's array with default iterator - use simple case - if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { - for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { - createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); - } - } else { - length = toLength(O.length); - for (result = new C(length); length > index; index++) { - createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + return next.next = next; } } - result.length = index; - return result; - } -}); - - -/***/ }), -/* 331 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; -var $defineProperty = __webpack_require__(36); -var createDesc = __webpack_require__(73); + function doneResult() { + return { value: undefined, done: true }; + } -module.exports = function (object, index, value) { - if (index in object) $defineProperty.f(object, index, createDesc(0, value)); - else object[index] = value; -}; + Context.prototype = { + constructor: Context, + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; -/***/ }), -/* 332 */ -/***/ (function(module, exports, __webpack_require__) { + this.tryEntries.forEach(resetTryEntry); -__webpack_require__(333); -module.exports = __webpack_require__(17).Object.keys; + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + stop: function() { + this.done = true; -/***/ }), -/* 333 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.14 Object.keys(O) -var toObject = __webpack_require__(75); -var $keys = __webpack_require__(64); - -__webpack_require__(208)('keys', function () { - return function keys(it) { - return $keys(toObject(it)); - }; -}); - - -/***/ }), -/* 334 */ -/***/ (function(module, exports, __webpack_require__) { + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } -__webpack_require__(94); -__webpack_require__(72); -module.exports = __webpack_require__(335); + return this.rval; + }, + dispatchException: function(exception) { + if (this.done) { + throw exception; + } -/***/ }), -/* 335 */ -/***/ (function(module, exports, __webpack_require__) { + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + return !!caught; + } -var anObject = __webpack_require__(37); -var get = __webpack_require__(135); -module.exports = __webpack_require__(17).getIterator = function (it) { - var iterFn = get(it); - if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); - return anObject(iterFn.call(it)); -}; + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } -/***/ }), -/* 336 */ -/***/ (function(module, exports, __webpack_require__) { + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); -__webpack_require__(337); -module.exports = __webpack_require__(17).Object.getPrototypeOf; + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } -/***/ }), -/* 337 */ -/***/ (function(module, exports, __webpack_require__) { + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } -// 19.1.2.9 Object.getPrototypeOf(O) -var toObject = __webpack_require__(75); -var $getPrototypeOf = __webpack_require__(199); + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, -__webpack_require__(208)('getPrototypeOf', function () { - return function getPrototypeOf(it) { - return $getPrototypeOf(toObject(it)); - }; -}); + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } -/***/ }), -/* 338 */ -/***/ (function(module, exports, __webpack_require__) { + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; -__webpack_require__(339); -var $Object = __webpack_require__(17).Object; -module.exports = function defineProperty(it, key, desc) { - return $Object.defineProperty(it, key, desc); -}; + if (finallyEntry) { + this.next = finallyEntry.finallyLoc; + } else { + this.complete(record); + } + return ContinueSentinel; + }, -/***/ }), -/* 339 */ -/***/ (function(module, exports, __webpack_require__) { + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } -var $export = __webpack_require__(27); -// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) -$export($export.S + $export.F * !__webpack_require__(42), 'Object', { defineProperty: __webpack_require__(36).f }); + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = record.arg; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + }, + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, -/***/ }), -/* 340 */ -/***/ (function(module, exports, __webpack_require__) { + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } -module.exports = { "default": __webpack_require__(341), __esModule: true }; + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, -/***/ }), -/* 341 */ -/***/ (function(module, exports, __webpack_require__) { + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; -__webpack_require__(72); -__webpack_require__(94); -module.exports = __webpack_require__(138).f('iterator'); + return ContinueSentinel; + } + }; +})( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this +); +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(49), __webpack_require__(0))) /***/ }), -/* 342 */ +/* 317 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(343), __esModule: true }; +__webpack_require__(198); +__webpack_require__(74); +__webpack_require__(95); +__webpack_require__(326); +module.exports = __webpack_require__(16).Promise; /***/ }), -/* 343 */ +/* 318 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(344); -__webpack_require__(192); -__webpack_require__(350); -__webpack_require__(351); -module.exports = __webpack_require__(17).Symbol; - +var toInteger = __webpack_require__(128) + , defined = __webpack_require__(129); +// true -> String#at +// false -> String#codePointAt +module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; /***/ }), -/* 344 */ +/* 319 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -// ECMAScript 6 symbols shim -var global = __webpack_require__(22); -var has = __webpack_require__(48); -var DESCRIPTORS = __webpack_require__(42); -var $export = __webpack_require__(27); -var redefine = __webpack_require__(195); -var META = __webpack_require__(345).KEY; -var $fails = __webpack_require__(62); -var shared = __webpack_require__(132); -var setToStringTag = __webpack_require__(93); -var uid = __webpack_require__(92); -var wks = __webpack_require__(21); -var wksExt = __webpack_require__(138); -var wksDefine = __webpack_require__(139); -var keyOf = __webpack_require__(346); -var enumKeys = __webpack_require__(347); -var isArray = __webpack_require__(348); -var anObject = __webpack_require__(37); -var toIObject = __webpack_require__(49); -var toPrimitive = __webpack_require__(128); -var createDesc = __webpack_require__(73); -var _create = __webpack_require__(129); -var gOPNExt = __webpack_require__(349); -var $GOPD = __webpack_require__(211); -var $DP = __webpack_require__(36); -var $keys = __webpack_require__(64); -var gOPD = $GOPD.f; -var dP = $DP.f; -var gOPN = gOPNExt.f; -var $Symbol = global.Symbol; -var $JSON = global.JSON; -var _stringify = $JSON && $JSON.stringify; -var PROTOTYPE = 'prototype'; -var HIDDEN = wks('_hidden'); -var TO_PRIMITIVE = wks('toPrimitive'); -var isEnum = {}.propertyIsEnumerable; -var SymbolRegistry = shared('symbol-registry'); -var AllSymbols = shared('symbols'); -var OPSymbols = shared('op-symbols'); -var ObjectProto = Object[PROTOTYPE]; -var USE_NATIVE = typeof $Symbol == 'function'; -var QObject = global.QObject; -// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 -var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; - -// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 -var setSymbolDesc = DESCRIPTORS && $fails(function () { - return _create(dP({}, 'a', { - get: function () { return dP(this, 'a', { value: 7 }).a; } - })).a != 7; -}) ? function (it, key, D) { - var protoDesc = gOPD(ObjectProto, key); - if (protoDesc) delete ObjectProto[key]; - dP(it, key, D); - if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); -} : dP; - -var wrap = function (tag) { - var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); - sym._k = tag; - return sym; -}; +var create = __webpack_require__(133) + , descriptor = __webpack_require__(75) + , setToStringTag = __webpack_require__(94) + , IteratorPrototype = {}; -var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { - return typeof it == 'symbol'; -} : function (it) { - return it instanceof $Symbol; -}; +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(50)(IteratorPrototype, __webpack_require__(20)('iterator'), function(){ return this; }); -var $defineProperty = function defineProperty(it, key, D) { - if (it === ObjectProto) $defineProperty(OPSymbols, key, D); - anObject(it); - key = toPrimitive(key, true); - anObject(D); - if (has(AllSymbols, key)) { - if (!D.enumerable) { - if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); - it[HIDDEN][key] = true; - } else { - if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; - D = _create(D, { enumerable: createDesc(0, false) }); - } return setSymbolDesc(it, key, D); - } return dP(it, key, D); -}; -var $defineProperties = function defineProperties(it, P) { - anObject(it); - var keys = enumKeys(P = toIObject(P)); - var i = 0; - var l = keys.length; - var key; - while (l > i) $defineProperty(it, key = keys[i++], P[key]); - return it; -}; -var $create = function create(it, P) { - return P === undefined ? _create(it) : $defineProperties(_create(it), P); -}; -var $propertyIsEnumerable = function propertyIsEnumerable(key) { - var E = isEnum.call(this, key = toPrimitive(key, true)); - if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; - return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; -}; -var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { - it = toIObject(it); - key = toPrimitive(key, true); - if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; - var D = gOPD(it, key); - if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; - return D; -}; -var $getOwnPropertyNames = function getOwnPropertyNames(it) { - var names = gOPN(toIObject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); - } return result; -}; -var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { - var IS_OP = it === ObjectProto; - var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); - } return result; +module.exports = function(Constructor, NAME, next){ + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); }; -// 19.4.1.1 Symbol([description]) -if (!USE_NATIVE) { - $Symbol = function Symbol() { - if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); - var tag = uid(arguments.length > 0 ? arguments[0] : undefined); - var $set = function (value) { - if (this === ObjectProto) $set.call(OPSymbols, value); - if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; - setSymbolDesc(this, tag, createDesc(1, value)); - }; - if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); - return wrap(tag); - }; - redefine($Symbol[PROTOTYPE], 'toString', function toString() { - return this._k; - }); - - $GOPD.f = $getOwnPropertyDescriptor; - $DP.f = $defineProperty; - __webpack_require__(210).f = gOPNExt.f = $getOwnPropertyNames; - __webpack_require__(96).f = $propertyIsEnumerable; - __webpack_require__(140).f = $getOwnPropertySymbols; - - if (DESCRIPTORS && !__webpack_require__(90)) { - redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); - } - - wksExt.f = function (name) { - return wrap(wks(name)); - }; -} - -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); - -for (var es6Symbols = ( - // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 - 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' -).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); - -for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); - -$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { - // 19.4.2.1 Symbol.for(key) - 'for': function (key) { - return has(SymbolRegistry, key += '') - ? SymbolRegistry[key] - : SymbolRegistry[key] = $Symbol(key); - }, - // 19.4.2.5 Symbol.keyFor(sym) - keyFor: function keyFor(key) { - if (isSymbol(key)) return keyOf(SymbolRegistry, key); - throw TypeError(key + ' is not a symbol!'); - }, - useSetter: function () { setter = true; }, - useSimple: function () { setter = false; } -}); - -$export($export.S + $export.F * !USE_NATIVE, 'Object', { - // 19.1.2.2 Object.create(O [, Properties]) - create: $create, - // 19.1.2.4 Object.defineProperty(O, P, Attributes) - defineProperty: $defineProperty, - // 19.1.2.3 Object.defineProperties(O, Properties) - defineProperties: $defineProperties, - // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) - getOwnPropertyDescriptor: $getOwnPropertyDescriptor, - // 19.1.2.7 Object.getOwnPropertyNames(O) - getOwnPropertyNames: $getOwnPropertyNames, - // 19.1.2.8 Object.getOwnPropertySymbols(O) - getOwnPropertySymbols: $getOwnPropertySymbols -}); - -// 24.3.2 JSON.stringify(value [, replacer [, space]]) -$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { - var S = $Symbol(); - // MS Edge converts symbol values to JSON as {} - // WebKit converts symbol values to JSON as null - // V8 throws on boxed symbols - return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; -})), 'JSON', { - stringify: function stringify(it) { - if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined - var args = [it]; - var i = 1; - var replacer, $replacer; - while (arguments.length > i) args.push(arguments[i++]); - replacer = args[1]; - if (typeof replacer == 'function') $replacer = replacer; - if ($replacer || !isArray(replacer)) replacer = function (key, value) { - if ($replacer) value = $replacer.call(this, key, value); - if (!isSymbol(value)) return value; - }; - args[1] = replacer; - return _stringify.apply($JSON, args); - } -}); - -// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) -$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(47)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); -// 19.4.3.5 Symbol.prototype[@@toStringTag] -setToStringTag($Symbol, 'Symbol'); -// 20.2.1.9 Math[@@toStringTag] -setToStringTag(Math, 'Math', true); -// 24.3.3 JSON[@@toStringTag] -setToStringTag(global.JSON, 'JSON', true); - - /***/ }), -/* 345 */ +/* 320 */ /***/ (function(module, exports, __webpack_require__) { -var META = __webpack_require__(92)('meta'); -var isObject = __webpack_require__(61); -var has = __webpack_require__(48); -var setDesc = __webpack_require__(36).f; -var id = 0; -var isExtensible = Object.isExtensible || function () { - return true; -}; -var FREEZE = !__webpack_require__(62)(function () { - return isExtensible(Object.preventExtensions({})); -}); -var setMeta = function (it) { - setDesc(it, META, { value: { - i: 'O' + ++id, // object ID - w: {} // weak collections IDs - } }); -}; -var fastKey = function (it, create) { - // return primitive with prefix - if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return 'F'; - // not necessary to add metadata - if (!create) return 'E'; - // add missing metadata - setMeta(it); - // return object ID - } return it[META].i; -}; -var getWeak = function (it, create) { - if (!has(it, META)) { - // can't set metadata to uncaught frozen object - if (!isExtensible(it)) return true; - // not necessary to add metadata - if (!create) return false; - // add missing metadata - setMeta(it); - // return hash weak collections IDs - } return it[META].w; -}; -// add metadata on freeze-family methods calling -var onFreeze = function (it) { - if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); - return it; -}; -var meta = module.exports = { - KEY: META, - NEED: false, - fastKey: fastKey, - getWeak: getWeak, - onFreeze: onFreeze -}; - - -/***/ }), -/* 346 */ -/***/ (function(module, exports, __webpack_require__) { +var dP = __webpack_require__(34) + , anObject = __webpack_require__(35) + , getKeys = __webpack_require__(68); -var getKeys = __webpack_require__(64); -var toIObject = __webpack_require__(49); -module.exports = function (object, el) { - var O = toIObject(object); - var keys = getKeys(O); - var length = keys.length; - var index = 0; - var key; - while (length > index) if (O[key = keys[index++]] === el) return key; +module.exports = __webpack_require__(41) ? Object.defineProperties : function defineProperties(O, Properties){ + anObject(O); + var keys = getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)dP.f(O, P = keys[i++], Properties[P]); + return O; }; - /***/ }), -/* 347 */ +/* 321 */ /***/ (function(module, exports, __webpack_require__) { -// all enumerable object keys, includes symbols -var getKeys = __webpack_require__(64); -var gOPS = __webpack_require__(140); -var pIE = __webpack_require__(96); -module.exports = function (it) { - var result = getKeys(it); - var getSymbols = gOPS.f; - if (getSymbols) { - var symbols = getSymbols(it); - var isEnum = pIE.f; - var i = 0; - var key; - while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); - } return result; +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(52) + , toLength = __webpack_require__(134) + , toIndex = __webpack_require__(322); +module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; + // Array#includes uses SameValueZero equality algorithm + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; }; - /***/ }), -/* 348 */ +/* 322 */ /***/ (function(module, exports, __webpack_require__) { -// 7.2.2 IsArray(argument) -var cof = __webpack_require__(74); -module.exports = Array.isArray || function isArray(arg) { - return cof(arg) == 'Array'; +var toInteger = __webpack_require__(128) + , max = Math.max + , min = Math.min; +module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); }; - /***/ }), -/* 349 */ +/* 323 */ /***/ (function(module, exports, __webpack_require__) { -// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window -var toIObject = __webpack_require__(49); -var gOPN = __webpack_require__(210).f; -var toString = {}.toString; +"use strict"; -var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames - ? Object.getOwnPropertyNames(window) : []; +var addToUnscopables = __webpack_require__(324) + , step = __webpack_require__(325) + , Iterators = __webpack_require__(67) + , toIObject = __webpack_require__(52); -var getWindowNames = function (it) { - try { - return gOPN(it); - } catch (e) { - return windowNames.slice(); +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(199)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); } -}; - -module.exports.f = function getOwnPropertyNames(it) { - return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); -}; - - -/***/ }), -/* 350 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(139)('asyncIterator'); - - -/***/ }), -/* 351 */ -/***/ (function(module, exports, __webpack_require__) { + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); -__webpack_require__(139)('observable'); +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); /***/ }), -/* 352 */ -/***/ (function(module, exports, __webpack_require__) { +/* 324 */ +/***/ (function(module, exports) { -module.exports = { "default": __webpack_require__(353), __esModule: true }; +module.exports = function(){ /* empty */ }; /***/ }), -/* 353 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(354); -module.exports = __webpack_require__(17).Object.setPrototypeOf; +/* 325 */ +/***/ (function(module, exports) { +module.exports = function(done, value){ + return {value: value, done: !!done}; +}; /***/ }), -/* 354 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { -// 19.1.3.19 Object.setPrototypeOf(O, proto) -var $export = __webpack_require__(27); -$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(355).set }); - +"use strict"; -/***/ }), -/* 355 */ -/***/ (function(module, exports, __webpack_require__) { +var LIBRARY = __webpack_require__(92) + , global = __webpack_require__(24) + , ctx = __webpack_require__(64) + , classof = __webpack_require__(138) + , $export = __webpack_require__(33) + , isObject = __webpack_require__(65) + , aFunction = __webpack_require__(130) + , anInstance = __webpack_require__(327) + , forOf = __webpack_require__(328) + , speciesConstructor = __webpack_require__(329) + , task = __webpack_require__(208).set + , microtask = __webpack_require__(331)() + , PROMISE = 'Promise' + , TypeError = global.TypeError + , process = global.process + , $Promise = global[PROMISE] + , process = global.process + , isNode = classof(process) == 'process' + , empty = function(){ /* empty */ } + , Internal, GenericPromiseCapability, Wrapper; + +var USE_NATIVE = !!function(){ + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1) + , FakePromise = (promise.constructor = {})[__webpack_require__(20)('species')] = function(exec){ exec(empty, empty); }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch(e){ /* empty */ } +}(); -// Works with __proto__ only. Old v8 can't work with null proto objects. -/* eslint-disable no-proto */ -var isObject = __webpack_require__(61); -var anObject = __webpack_require__(37); -var check = function (O, proto) { - anObject(O); - if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +// helpers +var sameConstructor = function(a, b){ + // with library wrapper special case + return a === b || a === $Promise && b === Wrapper; }; -module.exports = { - set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line - function (test, buggy, set) { +var isThenable = function(it){ + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var newPromiseCapability = function(C){ + return sameConstructor($Promise, C) + ? new PromiseCapability(C) + : new GenericPromiseCapability(C); +}; +var PromiseCapability = GenericPromiseCapability = function(C){ + var resolve, reject; + this.promise = new C(function($$resolve, $$reject){ + if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +}; +var perform = function(exec){ + try { + exec(); + } catch(e){ + return {error: e}; + } +}; +var notify = function(promise, isReject){ + if(promise._n)return; + promise._n = true; + var chain = promise._c; + microtask(function(){ + var value = promise._v + , ok = promise._s == 1 + , i = 0; + var run = function(reaction){ + var handler = ok ? reaction.ok : reaction.fail + , resolve = reaction.resolve + , reject = reaction.reject + , domain = reaction.domain + , result, then; try { - set = __webpack_require__(60)(Function.call, __webpack_require__(211).f(Object.prototype, '__proto__').set, 2); - set(test, []); - buggy = !(test instanceof Array); - } catch (e) { buggy = true; } - return function setPrototypeOf(O, proto) { - check(O, proto); - if (buggy) O.__proto__ = proto; - else set(O, proto); - return O; - }; - }({}, false) : undefined), - check: check + if(handler){ + if(!ok){ + if(promise._h == 2)onHandleUnhandled(promise); + promise._h = 1; + } + if(handler === true)result = value; + else { + if(domain)domain.enter(); + result = handler(value); + if(domain)domain.exit(); + } + if(result === reaction.promise){ + reject(TypeError('Promise-chain cycle')); + } else if(then = isThenable(result)){ + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch(e){ + reject(e); + } + }; + while(chain.length > i)run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if(isReject && !promise._h)onUnhandled(promise); + }); }; - - -/***/ }), -/* 356 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(357), __esModule: true }; - -/***/ }), -/* 357 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(358); -var $Object = __webpack_require__(17).Object; -module.exports = function create(P, D) { - return $Object.create(P, D); +var onUnhandled = function(promise){ + task.call(global, function(){ + var value = promise._v + , abrupt, handler, console; + if(isUnhandled(promise)){ + abrupt = perform(function(){ + if(isNode){ + process.emit('unhandledRejection', value, promise); + } else if(handler = global.onunhandledrejection){ + handler({promise: promise, reason: value}); + } else if((console = global.console) && console.error){ + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if(abrupt)throw abrupt.error; + }); }; - - -/***/ }), -/* 358 */ -/***/ (function(module, exports, __webpack_require__) { - -var $export = __webpack_require__(27); -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -$export($export.S, 'Object', { create: __webpack_require__(129) }); - - -/***/ }), -/* 359 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _classCallCheck2 = __webpack_require__(2); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(3); - -var _createClass3 = _interopRequireDefault(_createClass2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var BaseManager = function () { - function BaseManager() { - (0, _classCallCheck3.default)(this, BaseManager); - - this.notificationBar = this.createNotificationBar(); - } - - (0, _createClass3.default)(BaseManager, [{ - key: 'start', - value: function start() { - var _this = this; - - // Checks for page change by repeatedly checking the current page location and tracking change - (function () { - var currentPage = window.location.href; - setInterval(function () { - _this.updateNotificationBar(); - if (currentPage != window.location.href) { - currentPage = window.location.href; - setTimeout(function () { - return _this.onPageChange(); - }, 100); - } - }, 50); - _this.updateNotificationBar(); - _this.onPageChange(); - })(); - } - }, { - key: 'updateNotificationBar', - value: function updateNotificationBar() { - if (document.getElementById('sup-notif-bar')) return; - return this.createNotificationBar(); +var isUnhandled = function(promise){ + if(promise._h == 1)return false; + var chain = promise._a || promise._c + , i = 0 + , reaction; + while(chain.length > i){ + reaction = chain[i++]; + if(reaction.fail || !isUnhandled(reaction.promise))return false; + } return true; +}; +var onHandleUnhandled = function(promise){ + task.call(global, function(){ + var handler; + if(isNode){ + process.emit('rejectionHandled', promise); + } else if(handler = global.onrejectionhandled){ + handler({promise: promise, reason: promise._v}); } - - /** - * Helper timeout function to add a timer in the notification bar - * @param {Function} fn Function to be called after the delay - * @param {Number} ms Delay before calling the function - * @param {String} actionName Optional, an action name that will be displayed in the notification bar - */ - - }, { - key: 'timeout', - value: function timeout(fn, ms, actionName) { - var _this2 = this; - - var now = new Date(); - var shouldAbort = false; - var currentLocation = document.location.href; - - var interval = setInterval(function () { - if (currentLocation !== document.location.href) { - shouldAbort = true; - clearInterval(interval); - return; - } - var d = new Date(); - var diff = d.getTime() - now.getTime(); - _this2.setNotificationBarText((actionName || 'Action') + ' in : ' + (ms - diff) / 1000); - }, 100); - - setTimeout(function () { - clearInterval(interval); - if (shouldAbort || currentLocation !== document.location.href) { - return; + }); +}; +var $reject = function(value){ + var promise = this; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if(!promise._a)promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function(value){ + var promise = this + , then; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if(promise === value)throw TypeError("Promise can't be resolved itself"); + if(then = isThenable(value)){ + microtask(function(){ + var wrapper = {_w: promise, _d: false}; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch(e){ + $reject.call(wrapper, e); } - _this2.setNotificationBarText('Done'); - fn(); - }, ms); - } - }, { - key: 'createNotificationBar', - value: function createNotificationBar() { - var notificationBar = document.createElement("div"); - notificationBar.style.width = '100%'; - notificationBar.style.textAlign = 'center'; - notificationBar.style.backgroundColor = 'rgba(203, 255, 205, 0.38)'; - notificationBar.style.lineHeight = '50px'; - notificationBar.style.height = '50px'; - notificationBar.style.fontSize = 'medium'; - notificationBar.style.zIndex = '9999'; - notificationBar.style.position = 'absolute'; - notificationBar.style.left = 0; - notificationBar.style.top = 0; - notificationBar.id = "sup-notif-bar"; - document.body.prepend(notificationBar); - return notificationBar; + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); } + } catch(e){ + $reject.call({_w: promise, _d: false}, e); // wrap + } +}; - /** - * Sets top notification bar text - * @param {} text The new text for the notification bar - */ - - }, { - key: 'setNotificationBarText', - value: function setNotificationBarText(text) { - this.notificationBar.textContent = text; +// constructor polyfill +if(!USE_NATIVE){ + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor){ + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch(err){ + $reject.call(this, err); } - }, { - key: 'onPageChange', - value: function onPageChange() {} - }, { - key: 'sizeMatch', - value: function sizeMatch(sizeA, sizeB, category) { - sizeA = sizeA.toString().toLowerCase(); - sizeB = sizeB.toString().toLowerCase(); - if (!sizeB || !sizeA) return false; - - if (sizeA === sizeB) { - return true; - } - - if (category === "shoes") { - // Match sizes like UK10/US10.5' - var a = sizeA.split(/(?:\/)+/); - var b = sizeB.split(/(?:\/)+/); - - if (a.some(function (x) { - return b.indexOf(x) !== -1; - })) { - return true; - } - return a[0].replace(/\D/g, '') === b[0].replace(/\D/g, ''); - } - - if (!isNaN(sizeA) || !isNaN(sizeB)) return false; - - // Match sizes like 'S/M'; - var splitA = sizeA.split('/'); - var splitB = sizeB.split('/'); - - return splitA.some(function (x) { - return sizeB[0] === x[0]; - }) || splitB.some(function (x) { - return sizeA[0] === x[0]; - }); + }; + Internal = function Promise(executor){ + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(332)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected){ + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if(this._a)this._a.push(reaction); + if(this._s)notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function(onRejected){ + return this.then(undefined, onRejected); } - }]); - return BaseManager; -}(); - -exports.default = BaseManager; - -/***/ }), -/* 360 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; + }); + PromiseCapability = function(){ + var promise = new Internal; + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; +} +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); +__webpack_require__(94)($Promise, PROMISE); +__webpack_require__(333)(PROMISE); +Wrapper = __webpack_require__(16)[PROMISE]; -Object.defineProperty(exports, "__esModule", { - value: true +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r){ + var capability = newPromiseCapability(this) + , $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x){ + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; + var capability = newPromiseCapability(this) + , $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(209)(function(iter){ + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable){ + var C = this + , capability = newPromiseCapability(C) + , resolve = capability.resolve + , reject = capability.reject; + var abrupt = perform(function(){ + var values = [] + , index = 0 + , remaining = 1; + forOf(iterable, false, function(promise){ + var $index = index++ + , alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function(value){ + if(alreadyCalled)return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable){ + var C = this + , capability = newPromiseCapability(C) + , reject = capability.reject; + var abrupt = perform(function(){ + forOf(iterable, false, function(promise){ + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + } }); -exports.saveState = exports.loadSavedState = exports.initializeLocalStorageState = undefined; - -var _regenerator = __webpack_require__(123); - -var _regenerator2 = _interopRequireDefault(_regenerator); -var _asyncToGenerator2 = __webpack_require__(124); +/***/ }), +/* 327 */ +/***/ (function(module, exports) { -var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); +module.exports = function(it, Constructor, name, forbiddenField){ + if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; -var _promise = __webpack_require__(191); +/***/ }), +/* 328 */ +/***/ (function(module, exports, __webpack_require__) { -var _promise2 = _interopRequireDefault(_promise); +var ctx = __webpack_require__(64) + , call = __webpack_require__(206) + , isArrayIter = __webpack_require__(207) + , anObject = __webpack_require__(35) + , toLength = __webpack_require__(134) + , getIterFn = __webpack_require__(139) + , BREAK = {} + , RETURN = {}; +var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , index = 0 + , length, step, iterator, result; + if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if(result === BREAK || result === RETURN)return result; + } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ + result = call(iterator, f, step.value, entries); + if(result === BREAK || result === RETURN)return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; -var _stringify = __webpack_require__(361); +/***/ }), +/* 329 */ +/***/ (function(module, exports, __webpack_require__) { -var _stringify2 = _interopRequireDefault(_stringify); +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(35) + , aFunction = __webpack_require__(130) + , SPECIES = __webpack_require__(20)('species'); +module.exports = function(O, D){ + var C = anObject(O).constructor, S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; -exports.saveToChromeStorage = saveToChromeStorage; -exports.getFromChromeStorage = getFromChromeStorage; +/***/ }), +/* 330 */ +/***/ (function(module, exports) { -var _Helpers = __webpack_require__(212); +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function(fn, args, that){ + var un = that === undefined; + switch(args.length){ + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; -var Helpers = _interopRequireWildcard(_Helpers); +/***/ }), +/* 331 */ +/***/ (function(module, exports, __webpack_require__) { -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +var global = __webpack_require__(24) + , macrotask = __webpack_require__(208).set + , Observer = global.MutationObserver || global.WebKitMutationObserver + , process = global.process + , Promise = global.Promise + , isNode = __webpack_require__(76)(process) == 'process'; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +module.exports = function(){ + var head, last, notify; -var initializeLocalStorageState = exports.initializeLocalStorageState = function initializeLocalStorageState(initialState, version) { - localStorage.setItem('state', (0, _stringify2.default)([{ value: initialState || {}, version: version }])); -}; + var flush = function(){ + var parent, fn; + if(isNode && (parent = process.domain))parent.exit(); + while(head){ + fn = head.fn; + head = head.next; + try { + fn(); + } catch(e){ + if(head)notify(); + else last = undefined; + throw e; + } + } last = undefined; + if(parent)parent.enter(); + }; -var loadSavedState = exports.loadSavedState = function loadSavedState(version) { - try { - var items = JSON.parse(localStorage.getItem('state')) || []; - var state = items.filter(function (x) { - return x.version === version; - })[0]; - if (state) { - return state.value; - } - return {}; - } catch (err) { - initializeLocalStorageState({}, version); - return {}; + // Node.js + if(isNode){ + notify = function(){ + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if(Observer){ + var toggle = true + , node = document.createTextNode(''); + new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new + notify = function(){ + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if(Promise && Promise.resolve){ + var promise = Promise.resolve(); + notify = function(){ + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function(){ + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; } -}; -var saveState = exports.saveState = function saveState(state, version) { - try { - // If no state is saved, we create it using the current version number - if (!localStorage.getItem('state')) { - initializeLocalStorageState(state, version); - } else { - var currentState = JSON.parse(localStorage.getItem('state')); - var currentVersionState = currentState.filter(function (x) { - return x.version === version; - })[0]; - // If a state for the current version already exists, we update it - if (currentVersionState) { - currentVersionState.value = state; - } else { - currentState.push({ value: state, version: version }); - } - localStorage.setItem('state', (0, _stringify2.default)(currentState)); - } - } catch (err) { - console.info('Possible corrupted or incompatible state found in the localstorage, reinitializing the state...'); - initializeLocalStorageState({}, version); - } + return function(fn){ + var task = {fn: fn, next: undefined}; + if(last)last.next = task; + if(!head){ + head = task; + notify(); + } last = task; + }; }; -function saveToChromeStorage(key, value) { - return new _promise2.default(function (resolve) { - var obj = {}; - obj[key] = value; - chrome.storage.local.set(obj, function () { - resolve(); - }); - }); -} - -function getFromChromeStorage(key) { - var _this = this; - - return new _promise2.default(function (resolve) { - chrome.storage.local.get(key, function () { - var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(settings) { - return _regenerator2.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - resolve(Helpers.isObjectEmpty(settings) ? {} : settings[key]); - - case 1: - case 'end': - return _context.stop(); - } - } - }, _callee, _this); - })); - - return function (_x) { - return _ref.apply(this, arguments); - }; - }()); - }); -} - /***/ }), -/* 361 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(362), __esModule: true }; +var hide = __webpack_require__(50); +module.exports = function(target, src, safe){ + for(var key in src){ + if(safe && target[key])target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; /***/ }), -/* 362 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(17); -var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); -module.exports = function stringify(it) { // eslint-disable-line no-unused-vars - return $JSON.stringify.apply($JSON, arguments); -}; +"use strict"; + +var global = __webpack_require__(24) + , core = __webpack_require__(16) + , dP = __webpack_require__(34) + , DESCRIPTORS = __webpack_require__(41) + , SPECIES = __webpack_require__(20)('species'); +module.exports = function(KEY){ + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + configurable: true, + get: function(){ return this; } + }); +}; /***/ }), -/* 363 */ +/* 334 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24934,11 +25316,26 @@ module.exports = function stringify(it) { // eslint-disable-line no-unused-vars Object.defineProperty(exports, "__esModule", { value: true }); -exports.SHOP_NAME = undefined; -var _keys = __webpack_require__(50); +var _typeof2 = __webpack_require__(42); -var _keys2 = _interopRequireDefault(_keys); +var _typeof3 = _interopRequireDefault(_typeof2); + +var _toConsumableArray2 = __webpack_require__(53); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _getIterator2 = __webpack_require__(143); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _regenerator = __webpack_require__(126); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _asyncToGenerator2 = __webpack_require__(127); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); var _getPrototypeOf = __webpack_require__(4); @@ -24960,2110 +25357,1998 @@ var _inherits2 = __webpack_require__(6); var _inherits3 = _interopRequireDefault(_inherits2); -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); - -var _Tab = __webpack_require__(378); +var _BaseManager2 = __webpack_require__(363); -var _Tab2 = _interopRequireDefault(_Tab); +var _BaseManager3 = _interopRequireDefault(_BaseManager2); -var _reactRedux = __webpack_require__(33); +var _Helpers = __webpack_require__(145); -var _FontIcon = __webpack_require__(259); +var Helpers = _interopRequireWildcard(_Helpers); -var _FontIcon2 = _interopRequireDefault(_FontIcon); +var _InputProcessor = __webpack_require__(366); -var _IconButton = __webpack_require__(83); +var InputProcessor = _interopRequireWildcard(_InputProcessor); -var _IconButton2 = _interopRequireDefault(_IconButton); +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -var _colors = __webpack_require__(56); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _Menus = __webpack_require__(84); +var SupremeManager = function (_BaseManager) { + (0, _inherits3.default)(SupremeManager, _BaseManager); -var menus = _interopRequireWildcard(_Menus); + function SupremeManager(preferences, sizings, billing) { + (0, _classCallCheck3.default)(this, SupremeManager); -var _Billing = __webpack_require__(499); + var _this = (0, _possibleConstructorReturn3.default)(this, (SupremeManager.__proto__ || (0, _getPrototypeOf2.default)(SupremeManager)).call(this)); -var _Billing2 = _interopRequireDefault(_Billing); + _this.preferences = preferences; + _this.sizings = sizings; + _this.billing = billing; + return _this; + } -var _Options = __webpack_require__(793); + /** + * This function is called whenever a new page change occurs + */ -var _Options2 = _interopRequireDefault(_Options); -var _Sizes = __webpack_require__(794); + (0, _createClass3.default)(SupremeManager, [{ + key: 'onPageChange', + value: function () { + var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() { + var hideSoldOut, autoCheckout, autoPay; + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + this.processLinks(); -var _Sizes2 = _interopRequireDefault(_Sizes); + // if stores are not configured yet.. -var _Layout = __webpack_require__(795); + if (this.isConfigured()) { + _context.next = 4; + break; + } -var _Layout2 = _interopRequireDefault(_Layout); + this.setNotificationBarText('Bot not yet configured'); + return _context.abrupt('return'); -var _menu = __webpack_require__(802); + case 4: + hideSoldOut = this.preferences.hideSoldOut; -var _settings = __webpack_require__(803); + this.processSoldOutProducts(hideSoldOut); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + autoCheckout = this.preferences.autoCheckout; + autoPay = this.preferences.autoPay; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + this.setNotificationBarText('AutoCheckout ' + (autoCheckout ? 'enabled' : 'disabled') + ', AutoPay ' + (autoPay ? 'enabled' : 'disabled')); -var SHOP_NAME = exports.SHOP_NAME = 'Supreme'; + if (this.preferences.autoCheckout) { + _context.next = 11; + break; + } -var Supreme = function (_Component) { - (0, _inherits3.default)(Supreme, _Component); + return _context.abrupt('return'); - function Supreme() { - (0, _classCallCheck3.default)(this, Supreme); - return (0, _possibleConstructorReturn3.default)(this, (Supreme.__proto__ || (0, _getPrototypeOf2.default)(Supreme)).apply(this, arguments)); - } + case 11: + if (this.isProductPage()) { + this.processProduct(); + } else if (this.isCart()) { + this.processCart(); + } else if (this.isCheckout()) { + this.processCheckout(); + } else if (this.isShopCategoryPage()) { + this.processAtc(); + } - (0, _createClass3.default)(Supreme, [{ - key: 'getContainerForMenu', - value: function getContainerForMenu(menu) { - var _this2 = this; + case 12: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + })); - switch (menu) { - case menus.MENU_BILLING: - return _react2.default.createElement(_Billing2.default, { onSubmit: function onSubmit(data) { - return _this2.onSubmit(menu, data); - }, shop: SHOP_NAME }); - case menus.MENU_OPTIONS: - return _react2.default.createElement(_Options2.default, { onSubmit: function onSubmit(data) { - return _this2.onSubmit(menu, data); - }, shop: SHOP_NAME }); - case menus.MENU_SIZES: - return _react2.default.createElement(_Sizes2.default, { onSubmit: function onSubmit(data) { - return _this2.onSubmit(menu, data); - }, shop: SHOP_NAME }); - default: - return null; + function onPageChange() { + return _ref.apply(this, arguments); } + + return onPageChange; + }() + }, { + key: 'isConfigured', + value: function isConfigured() { + return ![this.preferences, this.sizings, this.billing].some(function (x) { + return x === undefined; + }); } + + /** + * Attach an event on product links of the page to reload the page instead of loading in ajax + */ + }, { - key: 'strToNumberReducer', - value: function strToNumberReducer(menu, key, value) { - // Don't process values for billing - if (typeof value === 'string' && !isNaN(value) && menu !== menus.MENU_BILLING) { - return +value; + key: 'processLinks', + value: function processLinks() { + var links = document.links; + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = (0, _getIterator3.default)(links), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var link = _step.value; + + link.addEventListener('click', function (e) { + window.location.href = this.href; + if (!e) e = window.event; + + if (e.stopPropagation) { + e.stopPropagation(); + } else { + e.cancelBubble = true; + } + }); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } } - return value; } }, { - key: 'transform', - value: function transform(menu, obj, reducer) { - var keys = (0, _keys2.default)(obj); - var newObj = {}; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = obj[key]; - newObj[key] = reducer(menu, key, value); + key: 'processSoldOutProducts', + value: function processSoldOutProducts(hideSoldOut) { + Array.prototype.forEach.call(document.getElementsByClassName('sold_out_tag'), function (x) { + return x.style.display = 'block'; + }); + if (hideSoldOut) { + var sold_outs = Array.prototype.filter.call(document.getElementsByTagName('article'), function (x) { + return x.getElementsByClassName('sold_out_tag').length; + }); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = (0, _getIterator3.default)(sold_outs), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var node = _step2.value; + + node.remove(); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } } - return newObj; } + + /** + * This function should be called when the user is on the 'cart' page, it will then redirect the user + * to the checkout page after the delay configured in the options + * @param {Object} preferencesStore Object that stores the preference options + */ + }, { - key: 'onSubmit', - value: function onSubmit(menu, data) { - var newObj = this.transform(menu, data, this.strToNumberReducer); - this.props.updateSettings(SHOP_NAME, menu, newObj); + key: 'processCart', + value: function processCart() { + this.timeout(function () { + document.location.href = '/checkout'; + }, 100, 'Going to checkout'); } + + /** + * This function should be called when the user is on the 'checkout' page, it will fill + * the checkout form with the values defined by the user in the options and then checkout after a delay + * @param {Object} preferencesStore Object that stores the preference options + * @param {Object} billingStore Object that stores the billings options + */ + }, { - key: 'componentWillMount', - value: function componentWillMount() { - if (this.props.menu == null) { - this.props.changeMenu(Supreme.getDefaultMenu()); + key: 'processCheckout', + value: function processCheckout() { + var checkoutDelay = this.preferences.checkoutDelay; + var inputs = [].concat((0, _toConsumableArray3.default)(document.querySelectorAll('input, textarea, select'))).filter(function (x) { + return ['hidden', 'submit', 'button', 'checkbox'].indexOf(x.type) === -1; + }); + var successFill = InputProcessor.processFields(inputs, this.billing); + + var terms = document.getElementsByName('order[terms]'); + if (terms.length) { + terms[0].click(); + } + + if (this.preferences.captchaBypass) { + var captcha = document.querySelector('.g-recaptcha'); + if (captcha) { + captcha.remove(); + } + } + if (this.preferences.autoPay) { + this.timeout(function () { + var commitBtn = document.getElementsByName('commit')[0]; + if (commitBtn) { + commitBtn.click(); + } + }, checkoutDelay, 'Checking out'); } } + + /** + * This function should be called when the user is on a product page, it will + * try to figure out if the product is sold out or not, and if not, it will find the best available size + * based on the user's preferences and then it will add the item to cart + */ + }, { - key: 'getIconForTabMenu', - value: function getIconForTabMenu(menu) { - var isIncomplete = !this.props.settings[SHOP_NAME] || !this.props.settings[SHOP_NAME][menu]; - var color = isIncomplete ? _colors.red300 : 'white'; - var tip = isIncomplete ? 'This tab hasn\'t been configured yet' : ''; - return _react2.default.createElement( - _IconButton2.default, - { iconStyle: { color: color }, tooltip: tip, tooltipPosition: 'top-center', tooltipStyles: { color: 'white' } }, - _react2.default.createElement( - _FontIcon2.default, - { style: { color: color }, className: 'material-icons' }, - isIncomplete ? 'error' : 'done' - ) - ); + key: 'processProduct', + value: function processProduct() { + var _this2 = this; + + if (!this.isSoldOut()) { + var _ret = function () { + var maxPrice = _this2.preferences.maxPrice; + var minPrice = _this2.preferences.minPrice; + var itemPrice = document.querySelector('[itemprop=price]'); + + if (itemPrice !== null) { + var price = +itemPrice.innerHTML.replace(/\D/g, ''); + if (!isNaN(price)) { + if (maxPrice !== undefined && price > maxPrice) { + _this2.setNotificationBarText('Product price is too high, not checking out'); + return { + v: void 0 + }; + } + + if (minPrice !== undefined && price < minPrice) { + _this2.setNotificationBarText('Product price is too low, not checking out'); + return { + v: void 0 + }; + } + } + } + + var submitBtn = document.querySelector('[name=commit]'); + var productCategory = _this2.getProductCategory(); + var sizesOptions = _this2.getSizesOptions(); + + // If sizes options are available + if (sizesOptions.length) { + var _ret2 = function () { + var categorySize = _this2.sizings[productCategory]; + if (categorySize === undefined) { + _this2.setNotificationBarText('Unknown category "' + productCategory + '", cannot process'); + return { + v: { + v: void 0 + } + }; + } + var targetOption = sizesOptions.find(function (x) { + return _this2.sizeMatch(categorySize, x.text, productCategory); + }); + + if (!targetOption) { + if (_this2.preferences.strictSize) { + _this2.setNotificationBarText('The desired size is not available'); + return { + v: { + v: void 0 + } + }; + } + targetOption = sizesOptions[0]; + } + targetOption.selected = true; + }(); + + if ((typeof _ret2 === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret2)) === "object") return _ret2.v; + } + + var atcDelay = _this2.preferences.addToCartDelay; + _this2.timeout(function () { + var process = function process() { + if (document.querySelector('.in-cart') && document.getElementById('cart')) { + setTimeout(function () { + window.location.href = '/checkout'; + }, 200); + } else { + submitBtn.click(); + _this2.timeout(function () { + return process(); + }, 500, 'Waiting for product to be in cart...'); + } + }; + + process(); + }, atcDelay, 'Adding to cart'); + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + } } }, { - key: 'getTabs', - value: function getTabs() { - var _this3 = this; + key: 'processAtc', + value: function processAtc() { + var queryString = Helpers.getQueryStringValue('atc-kw'); + if (!queryString) { + return; + } + var keywords = queryString.split(';'); + var kwColor = Helpers.getQueryStringValue('atc-color'); + var innerArticles = [].concat((0, _toConsumableArray3.default)(document.querySelectorAll('.inner-article'))); + var products = []; + for (var i = 0; i < innerArticles.length; i += 1) { + var h1 = innerArticles[i].querySelector('h1'); + var a = innerArticles[i].querySelector('a'); + var p = innerArticles[i].querySelector('p'); + if (h1 && a && h1.innerText && a.href) { + var product = { + matches: 0, + url: a.href + }; + var name = h1.innerText.toLowerCase().trim(); + var color = null; + if (p && p.innerText) { + color = p.innerText.toLowerCase().trim(); + } + for (var j = 0; j < keywords.length; j += 1) { + var keyword = keywords[j].toLowerCase().trim(); + var regexp = new RegExp(keyword); + // name matches + if (regexp.test(name)) { + if (kwColor && color) { + var regexColor = new RegExp(color); + if (regexColor.test(kwColor)) { + product.matches += 1; + } + } + product.matches += 1; + } + } - return [_react2.default.createElement(_Tab2.default, { - label: 'Billing', - key: 1, - icon: this.getIconForTabMenu(menus.MENU_BILLING), - value: menus.MENU_BILLING, - onClick: function onClick() { - return _this3.props.changeMenu(menus.MENU_BILLING); - } - }), _react2.default.createElement(_Tab2.default, { - label: 'Options', - key: 2, - icon: this.getIconForTabMenu(menus.MENU_OPTIONS), - value: menus.MENU_OPTIONS, - onClick: function onClick() { - return _this3.props.changeMenu(menus.MENU_OPTIONS); - } - }), _react2.default.createElement(_Tab2.default, { - label: 'Sizes', - key: 3, - icon: this.getIconForTabMenu(menus.MENU_SIZES), - value: menus.MENU_SIZES, - onClick: function onClick() { - return _this3.props.changeMenu(menus.MENU_SIZES); + products.push(product); } - })]; + } + var bestMatch = products.filter(function (x) { + return x.matches > 0; + }).sort(function (a, b) { + return b.matches - a.matches; + })[0]; + if (bestMatch) { + window.location.href = bestMatch.url; + } } }, { - key: 'render', - value: function render() { - var menu = this.props.menu; + key: 'isShopCategoryPage', + value: function isShopCategoryPage() { + return Helpers.hasStringInPath('shop') && Helpers.hasStringInPath('all') && Helpers.pathCount() === 3; + } - return _react2.default.createElement( - _Layout2.default, - { title: menu || 'Loading...', tabs: this.getTabs(), currentTab: menu }, - this.getContainerForMenu(menu) - ); + /** + * Check if the user is currently on a product page + */ + + }, { + key: 'isProductPage', + value: function isProductPage() { + return Helpers.hasStringInPath('shop') && (Helpers.pageHasNodeOfClass('styles') || Helpers.pageHasNodeOfClass('price') || Helpers.pageHasNodeOfClass('style')); } - }], [{ - key: 'getDefaultMenu', - value: function getDefaultMenu() { - return menus.MENU_BILLING; + + /** + * Check if the user is currently on the 'cart' page + */ + + }, { + key: 'isCart', + value: function isCart() { + return Helpers.pageHasNodeOfClass('cart') && Helpers.hasStringInPath('cart'); } - }]); - return Supreme; -}(_react.Component); -function mapStateToProps(state) { - return { - menu: state.menu.currentMenu, - settings: state.settings.values - }; -} + /** + * Check if the user is currently at the checkout page + */ -function mapDispatchToProps(dispatch) { - return { - changeMenu: function changeMenu(menu) { - return dispatch((0, _menu.changeMenu)(menu)); - }, - updateSettings: function updateSettings(shop, key, value) { - return dispatch((0, _settings.updateSettings)(shop, key, value)); + }, { + key: 'isCheckout', + value: function isCheckout() { + return Helpers.hasStringInPath('checkout'); } - }; -} -exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Supreme); + /** + * Returns the product category when the user is on a product page + */ + + }, { + key: 'getProductCategory', + value: function getProductCategory() { + var category = Helpers.getQueryStringValue('atc-category'); + return !category ? location.pathname.substring(1).split('/')[1] : category; + } + + /** + * Check if the current product is sold out + * @return {Boolean} + */ + + }, { + key: 'isSoldOut', + value: function isSoldOut() { + return document.querySelector('input[name=commit]') === null; + } + + /** + * Return the available sizes for the current product + * @return {Array} + */ + + }, { + key: 'getSizesOptions', + value: function getSizesOptions() { + var sizes = document.getElementById('size'); + if (!sizes || !sizes.options) return []; + return [].concat((0, _toConsumableArray3.default)(sizes.options)); + } + }]); + return SupremeManager; +}(_BaseManager3.default); + +exports.default = SupremeManager; /***/ }), -/* 364 */ +/* 335 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +module.exports = { "default": __webpack_require__(336), __esModule: true }; +/***/ }), +/* 336 */ +/***/ (function(module, exports, __webpack_require__) { +__webpack_require__(74); +__webpack_require__(95); +module.exports = __webpack_require__(140).f('iterator'); -var PooledClass = __webpack_require__(365); -var ReactElement = __webpack_require__(51); +/***/ }), +/* 337 */ +/***/ (function(module, exports, __webpack_require__) { -var emptyFunction = __webpack_require__(23); -var traverseAllChildren = __webpack_require__(366); +module.exports = { "default": __webpack_require__(338), __esModule: true }; -var twoArgumentPooler = PooledClass.twoArgumentPooler; -var fourArgumentPooler = PooledClass.fourArgumentPooler; +/***/ }), +/* 338 */ +/***/ (function(module, exports, __webpack_require__) { -var userProvidedKeyEscapeRegex = /\/+/g; -function escapeUserProvidedKey(text) { - return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); -} +__webpack_require__(339); +__webpack_require__(198); +__webpack_require__(345); +__webpack_require__(346); +module.exports = __webpack_require__(16).Symbol; -/** - * PooledClass representing the bookkeeping associated with performing a child - * traversal. Allows avoiding binding callbacks. - * - * @constructor ForEachBookKeeping - * @param {!function} forEachFunction Function to perform traversal with. - * @param {?*} forEachContext Context to perform context with. - */ -function ForEachBookKeeping(forEachFunction, forEachContext) { - this.func = forEachFunction; - this.context = forEachContext; - this.count = 0; -} -ForEachBookKeeping.prototype.destructor = function () { - this.func = null; - this.context = null; - this.count = 0; -}; -PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); +/***/ }), +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { -function forEachSingleChild(bookKeeping, child, name) { - var func = bookKeeping.func, - context = bookKeeping.context; +"use strict"; - func.call(context, child, bookKeeping.count++); -} +// ECMAScript 6 symbols shim +var global = __webpack_require__(24) + , has = __webpack_require__(51) + , DESCRIPTORS = __webpack_require__(41) + , $export = __webpack_require__(33) + , redefine = __webpack_require__(201) + , META = __webpack_require__(340).KEY + , $fails = __webpack_require__(66) + , shared = __webpack_require__(136) + , setToStringTag = __webpack_require__(94) + , uid = __webpack_require__(93) + , wks = __webpack_require__(20) + , wksExt = __webpack_require__(140) + , wksDefine = __webpack_require__(141) + , keyOf = __webpack_require__(341) + , enumKeys = __webpack_require__(342) + , isArray = __webpack_require__(343) + , anObject = __webpack_require__(35) + , toIObject = __webpack_require__(52) + , toPrimitive = __webpack_require__(132) + , createDesc = __webpack_require__(75) + , _create = __webpack_require__(133) + , gOPNExt = __webpack_require__(344) + , $GOPD = __webpack_require__(211) + , $DP = __webpack_require__(34) + , $keys = __webpack_require__(68) + , gOPD = $GOPD.f + , dP = $DP.f + , gOPN = gOPNExt.f + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , PROTOTYPE = 'prototype' + , HIDDEN = wks('_hidden') + , TO_PRIMITIVE = wks('toPrimitive') + , isEnum = {}.propertyIsEnumerable + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , OPSymbols = shared('op-symbols') + , ObjectProto = Object[PROTOTYPE] + , USE_NATIVE = typeof $Symbol == 'function' + , QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; -/** - * Iterates through children that are typically specified as `props.children`. - * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach - * - * The provided forEachFunc(child, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} forEachFunc - * @param {*} forEachContext Context for forEachContext. - */ -function forEachChildren(children, forEachFunc, forEachContext) { - if (children == null) { - return children; - } - var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); - traverseAllChildren(children, forEachSingleChild, traverseContext); - ForEachBookKeeping.release(traverseContext); -} +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(dP({}, 'a', { + get: function(){ return dP(this, 'a', {value: 7}).a; } + })).a != 7; +}) ? function(it, key, D){ + var protoDesc = gOPD(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + dP(it, key, D); + if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); +} : dP; -/** - * PooledClass representing the bookkeeping associated with performing a child - * mapping. Allows avoiding binding callbacks. - * - * @constructor MapBookKeeping - * @param {!*} mapResult Object containing the ordered map of results. - * @param {!function} mapFunction Function to perform mapping with. - * @param {?*} mapContext Context to perform mapping with. - */ -function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { - this.result = mapResult; - this.keyPrefix = keyPrefix; - this.func = mapFunction; - this.context = mapContext; - this.count = 0; -} -MapBookKeeping.prototype.destructor = function () { - this.result = null; - this.keyPrefix = null; - this.func = null; - this.context = null; - this.count = 0; +var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; }; -PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); -function mapSingleChildIntoContext(bookKeeping, child, childKey) { - var result = bookKeeping.result, - keyPrefix = bookKeeping.keyPrefix, - func = bookKeeping.func, - context = bookKeeping.context; +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ + return typeof it == 'symbol'; +} : function(it){ + return it instanceof $Symbol; +}; +var $defineProperty = function defineProperty(it, key, D){ + if(it === ObjectProto)$defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if(has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key = toPrimitive(key, true)); + if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + it = toIObject(it); + key = toPrimitive(key, true); + if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; + var D = gOPD(it, key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = gOPN(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var IS_OP = it === ObjectProto + , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); + } return result; +}; - var mappedChild = func.call(context, child, bookKeeping.count++); - if (Array.isArray(mappedChild)) { - mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); - } else if (mappedChild != null) { - if (ReactElement.isValidElement(mappedChild)) { - mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, - // Keep both the (mapped) and old keys if they differ, just as - // traverseAllChildren used to do for objects as children - keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); - } - result.push(mappedChild); - } -} +// 19.4.1.1 Symbol([description]) +if(!USE_NATIVE){ + $Symbol = function Symbol(){ + if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function(value){ + if(this === ObjectProto)$set.call(OPSymbols, value); + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString(){ + return this._k; + }); -function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { - var escapedPrefix = ''; - if (prefix != null) { - escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(210).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(96).f = $propertyIsEnumerable; + __webpack_require__(142).f = $getOwnPropertySymbols; + + if(DESCRIPTORS && !__webpack_require__(92)){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } - var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); - traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); - MapBookKeeping.release(traverseContext); -} -/** - * Maps children that are typically specified as `props.children`. - * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map - * - * The provided mapFunction(child, key, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} func The map function. - * @param {*} context Context for mapFunction. - * @return {object} Object containing the ordered map of results. - */ -function mapChildren(children, func, context) { - if (children == null) { - return children; + wksExt.f = function(name){ + return wrap(wks(name)); } - var result = []; - mapIntoWithKeyPrefixInternal(children, result, null, func, context); - return result; } -function forEachSingleChildDummy(traverseContext, child, name) { - return null; -} +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); -/** - * Count the number of children that are typically specified as - * `props.children`. - * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count - * - * @param {?*} children Children tree container. - * @return {number} The number of children. - */ -function countChildren(children, context) { - return traverseAllChildren(children, forEachSingleChildDummy, null); -} +for(var symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); -/** - * Flatten a children object (typically specified as `props.children`) and - * return an array with appropriately re-keyed children. - * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray - */ -function toArray(children) { - var result = []; - mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); - return result; -} +for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); -var ReactChildren = { - forEach: forEachChildren, - map: mapChildren, - mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, - count: countChildren, - toArray: toArray -}; +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + if(isSymbol(key))return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } +}); -module.exports = ReactChildren; +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , replacer, $replacer; + while(arguments.length > i)args.push(arguments[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(50)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); /***/ }), -/* 365 */ +/* 340 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - +var META = __webpack_require__(93)('meta') + , isObject = __webpack_require__(65) + , has = __webpack_require__(51) + , setDesc = __webpack_require__(34).f + , id = 0; +var isExtensible = Object.isExtensible || function(){ + return true; +}; +var FREEZE = !__webpack_require__(66)(function(){ + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function(it){ + setDesc(it, META, {value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + }}); +}; +var fastKey = function(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add metadata + if(!create)return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function(it, create){ + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return true; + // not necessary to add metadata + if(!create)return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function(it){ + if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; +/***/ }), +/* 341 */ +/***/ (function(module, exports, __webpack_require__) { -var _prodInvariant = __webpack_require__(66); +var getKeys = __webpack_require__(68) + , toIObject = __webpack_require__(52); +module.exports = function(object, el){ + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; +}; -var invariant = __webpack_require__(10); +/***/ }), +/* 342 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Static poolers. Several custom versions for each potential number of - * arguments. A completely generic pooler is easy to implement, but would - * require accessing the `arguments` object. In each of these, `this` refers to - * the Class itself, not an instance. If any others are needed, simply add them - * here, or in their own files. - */ -var oneArgumentPooler = function (copyFieldsFrom) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, copyFieldsFrom); - return instance; - } else { - return new Klass(copyFieldsFrom); - } +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(68) + , gOPS = __webpack_require__(142) + , pIE = __webpack_require__(96); +module.exports = function(it){ + var result = getKeys(it) + , getSymbols = gOPS.f; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = pIE.f + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); + } return result; }; -var twoArgumentPooler = function (a1, a2) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2); - return instance; - } else { - return new Klass(a1, a2); - } -}; +/***/ }), +/* 343 */ +/***/ (function(module, exports, __webpack_require__) { -var threeArgumentPooler = function (a1, a2, a3) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3); - return instance; - } else { - return new Klass(a1, a2, a3); - } +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(76); +module.exports = Array.isArray || function isArray(arg){ + return cof(arg) == 'Array'; }; -var fourArgumentPooler = function (a1, a2, a3, a4) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3, a4); - return instance; - } else { - return new Klass(a1, a2, a3, a4); - } -}; +/***/ }), +/* 344 */ +/***/ (function(module, exports, __webpack_require__) { -var standardReleaser = function (instance) { - var Klass = this; - !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; - instance.destructor(); - if (Klass.instancePool.length < Klass.poolSize) { - Klass.instancePool.push(instance); - } -}; +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(52) + , gOPN = __webpack_require__(210).f + , toString = {}.toString; -var DEFAULT_POOL_SIZE = 10; -var DEFAULT_POOLER = oneArgumentPooler; +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; -/** - * Augments `CopyConstructor` to be a poolable class, augmenting only the class - * itself (statically) not adding any prototypical fields. Any CopyConstructor - * you give this may have a `poolSize` property, and will look for a - * prototypical `destructor` on instances. - * - * @param {Function} CopyConstructor Constructor that can be used to reset. - * @param {Function} pooler Customizable pooler. - */ -var addPoolingTo = function (CopyConstructor, pooler) { - // Casting as any so that flow ignores the actual implementation and trusts - // it to match the type we declared - var NewKlass = CopyConstructor; - NewKlass.instancePool = []; - NewKlass.getPooled = pooler || DEFAULT_POOLER; - if (!NewKlass.poolSize) { - NewKlass.poolSize = DEFAULT_POOL_SIZE; +var getWindowNames = function(it){ + try { + return gOPN(it); + } catch(e){ + return windowNames.slice(); } - NewKlass.release = standardReleaser; - return NewKlass; }; -var PooledClass = { - addPoolingTo: addPoolingTo, - oneArgumentPooler: oneArgumentPooler, - twoArgumentPooler: twoArgumentPooler, - threeArgumentPooler: threeArgumentPooler, - fourArgumentPooler: fourArgumentPooler +module.exports.f = function getOwnPropertyNames(it){ + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; -module.exports = PooledClass; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 366 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - +__webpack_require__(141)('asyncIterator'); +/***/ }), +/* 346 */ +/***/ (function(module, exports, __webpack_require__) { -var _prodInvariant = __webpack_require__(66); - -var ReactCurrentOwner = __webpack_require__(30); -var REACT_ELEMENT_TYPE = __webpack_require__(215); +__webpack_require__(141)('observable'); -var getIteratorFn = __webpack_require__(216); -var invariant = __webpack_require__(10); -var KeyEscapeUtils = __webpack_require__(367); -var warning = __webpack_require__(11); +/***/ }), +/* 347 */ +/***/ (function(module, exports, __webpack_require__) { -var SEPARATOR = '.'; -var SUBSEPARATOR = ':'; +__webpack_require__(74); +__webpack_require__(348); +module.exports = __webpack_require__(16).Array.from; -/** - * This is inlined from ReactElement since this file is shared between - * isomorphic and renderers. We could extract this to a - * - */ +/***/ }), +/* 348 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * TODO: Test that a single child and an array with one item have the same key - * pattern. - */ +"use strict"; -var didWarnAboutMaps = false; +var ctx = __webpack_require__(64) + , $export = __webpack_require__(33) + , toObject = __webpack_require__(77) + , call = __webpack_require__(206) + , isArrayIter = __webpack_require__(207) + , toLength = __webpack_require__(134) + , createProperty = __webpack_require__(349) + , getIterFn = __webpack_require__(139); -/** - * Generate a key string that identifies a component within a set. - * - * @param {*} component A component that could contain a manual key. - * @param {number} index Index that is used if a manual key is not provided. - * @return {string} - */ -function getComponentKey(component, index) { - // Do some typechecking here since we call this blindly. We want to ensure - // that we don't block potential future ES APIs. - if (component && typeof component === 'object' && component.key != null) { - // Explicit key - return KeyEscapeUtils.escape(component.key); +$export($export.S + $export.F * !__webpack_require__(209)(function(iter){ Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ + var O = toObject(arrayLike) + , C = typeof this == 'function' ? this : Array + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , index = 0 + , iterFn = getIterFn(O) + , length, result, step, iterator; + if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ + for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for(result = new C(length); length > index; index++){ + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; } - // Implicit key determined by the index in the set - return index.toString(36); -} +}); -/** - * @param {?*} children Children tree container. - * @param {!string} nameSoFar Name of the key path so far. - * @param {!function} callback Callback to invoke with each child found. - * @param {?*} traverseContext Used to pass information throughout the traversal - * process. - * @return {!number} The number of children in this subtree. - */ -function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { - var type = typeof children; - if (type === 'undefined' || type === 'boolean') { - // All of the above are perceived as null. - children = null; - } +/***/ }), +/* 349 */ +/***/ (function(module, exports, __webpack_require__) { - if (children === null || type === 'string' || type === 'number' || - // The following is inlined from ReactElement. This means we can optimize - // some checks. React Fiber also inlines this logic for similar purposes. - type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { - callback(traverseContext, children, - // If it's the only child, treat the name as if it was wrapped in an array - // so that it's consistent if the number of children grows. - nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); - return 1; - } +"use strict"; - var child; - var nextName; - var subtreeCount = 0; // Count of children found in the current subtree. - var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; +var $defineProperty = __webpack_require__(34) + , createDesc = __webpack_require__(75); - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - child = children[i]; - nextName = nextNamePrefix + getComponentKey(child, i); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); - } - } else { - var iteratorFn = getIteratorFn(children); - if (iteratorFn) { - var iterator = iteratorFn.call(children); - var step; - if (iteratorFn !== children.entries) { - var ii = 0; - while (!(step = iterator.next()).done) { - child = step.value; - nextName = nextNamePrefix + getComponentKey(child, ii++); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); - } - } else { - if (process.env.NODE_ENV !== 'production') { - var mapsAsChildrenAddendum = ''; - if (ReactCurrentOwner.current) { - var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); - if (mapsAsChildrenOwnerName) { - mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; - } - } - process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; - didWarnAboutMaps = true; - } - // Iterator will provide entry [k,v] tuples rather than values. - while (!(step = iterator.next()).done) { - var entry = step.value; - if (entry) { - child = entry[1]; - nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); - subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); - } - } - } - } else if (type === 'object') { - var addendum = ''; - if (process.env.NODE_ENV !== 'production') { - addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; - if (children._isReactElement) { - addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.'; - } - if (ReactCurrentOwner.current) { - var name = ReactCurrentOwner.current.getName(); - if (name) { - addendum += ' Check the render method of `' + name + '`.'; - } - } - } - var childrenString = String(children); - true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; - } - } +module.exports = function(object, index, value){ + if(index in object)$defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; - return subtreeCount; -} +/***/ }), +/* 350 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Traverses children that are typically specified as `props.children`, but - * might also be specified through attributes: - * - * - `traverseAllChildren(this.props.children, ...)` - * - `traverseAllChildren(this.props.leftPanelChildren, ...)` - * - * The `traverseContext` is an optional argument that is passed through the - * entire traversal. It can be used to store accumulations or anything else that - * the callback might find relevant. - * - * @param {?*} children Children tree object. - * @param {!function} callback To invoke upon traversing each child. - * @param {?*} traverseContext Context for traversal. - * @return {!number} The number of children in this subtree. - */ -function traverseAllChildren(children, callback, traverseContext) { - if (children == null) { - return 0; - } +__webpack_require__(95); +__webpack_require__(74); +module.exports = __webpack_require__(351); - return traverseAllChildrenImpl(children, '', callback, traverseContext); -} +/***/ }), +/* 351 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = traverseAllChildren; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +var anObject = __webpack_require__(35) + , get = __webpack_require__(139); +module.exports = __webpack_require__(16).getIterator = function(it){ + var iterFn = get(it); + if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; /***/ }), -/* 367 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - +__webpack_require__(353); +module.exports = __webpack_require__(16).Object.getPrototypeOf; +/***/ }), +/* 353 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Escape and wrap key so it is safe to use as a reactid - * - * @param {string} key to be escaped. - * @return {string} the escaped key. - */ +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(77) + , $getPrototypeOf = __webpack_require__(205); -function escape(key) { - var escapeRegex = /[=:]/g; - var escaperLookup = { - '=': '=0', - ':': '=2' +__webpack_require__(213)('getPrototypeOf', function(){ + return function getPrototypeOf(it){ + return $getPrototypeOf(toObject(it)); }; - var escapedString = ('' + key).replace(escapeRegex, function (match) { - return escaperLookup[match]; - }); +}); - return '$' + escapedString; -} +/***/ }), +/* 354 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Unescape and unwrap key for human-readable display - * - * @param {string} key to unescape. - * @return {string} the unescaped key. - */ -function unescape(key) { - var unescapeRegex = /(=0|=2)/g; - var unescaperLookup = { - '=0': '=', - '=2': ':' - }; - var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); +__webpack_require__(355); +var $Object = __webpack_require__(16).Object; +module.exports = function defineProperty(it, key, desc){ + return $Object.defineProperty(it, key, desc); +}; - return ('' + keySubstring).replace(unescapeRegex, function (match) { - return unescaperLookup[match]; - }); -} +/***/ }), +/* 355 */ +/***/ (function(module, exports, __webpack_require__) { -var KeyEscapeUtils = { - escape: escape, - unescape: unescape -}; +var $export = __webpack_require__(33); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(41), 'Object', {defineProperty: __webpack_require__(34).f}); -module.exports = KeyEscapeUtils; +/***/ }), +/* 356 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(357), __esModule: true }; /***/ }), -/* 368 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +__webpack_require__(358); +module.exports = __webpack_require__(16).Object.setPrototypeOf; +/***/ }), +/* 358 */ +/***/ (function(module, exports, __webpack_require__) { +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(33); +$export($export.S, 'Object', {setPrototypeOf: __webpack_require__(359).set}); -var ReactElement = __webpack_require__(51); +/***/ }), +/* 359 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Create a factory that creates HTML tag elements. - * - * @private - */ -var createDOMFactory = ReactElement.createFactory; -if (process.env.NODE_ENV !== 'production') { - var ReactElementValidator = __webpack_require__(217); - createDOMFactory = ReactElementValidator.createFactory; -} +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(65) + , anObject = __webpack_require__(35); +var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = __webpack_require__(64)(Function.call, __webpack_require__(211).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; -/** - * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. - * - * @public - */ -var ReactDOMFactories = { - a: createDOMFactory('a'), - abbr: createDOMFactory('abbr'), - address: createDOMFactory('address'), - area: createDOMFactory('area'), - article: createDOMFactory('article'), - aside: createDOMFactory('aside'), - audio: createDOMFactory('audio'), - b: createDOMFactory('b'), - base: createDOMFactory('base'), - bdi: createDOMFactory('bdi'), - bdo: createDOMFactory('bdo'), - big: createDOMFactory('big'), - blockquote: createDOMFactory('blockquote'), - body: createDOMFactory('body'), - br: createDOMFactory('br'), - button: createDOMFactory('button'), - canvas: createDOMFactory('canvas'), - caption: createDOMFactory('caption'), - cite: createDOMFactory('cite'), - code: createDOMFactory('code'), - col: createDOMFactory('col'), - colgroup: createDOMFactory('colgroup'), - data: createDOMFactory('data'), - datalist: createDOMFactory('datalist'), - dd: createDOMFactory('dd'), - del: createDOMFactory('del'), - details: createDOMFactory('details'), - dfn: createDOMFactory('dfn'), - dialog: createDOMFactory('dialog'), - div: createDOMFactory('div'), - dl: createDOMFactory('dl'), - dt: createDOMFactory('dt'), - em: createDOMFactory('em'), - embed: createDOMFactory('embed'), - fieldset: createDOMFactory('fieldset'), - figcaption: createDOMFactory('figcaption'), - figure: createDOMFactory('figure'), - footer: createDOMFactory('footer'), - form: createDOMFactory('form'), - h1: createDOMFactory('h1'), - h2: createDOMFactory('h2'), - h3: createDOMFactory('h3'), - h4: createDOMFactory('h4'), - h5: createDOMFactory('h5'), - h6: createDOMFactory('h6'), - head: createDOMFactory('head'), - header: createDOMFactory('header'), - hgroup: createDOMFactory('hgroup'), - hr: createDOMFactory('hr'), - html: createDOMFactory('html'), - i: createDOMFactory('i'), - iframe: createDOMFactory('iframe'), - img: createDOMFactory('img'), - input: createDOMFactory('input'), - ins: createDOMFactory('ins'), - kbd: createDOMFactory('kbd'), - keygen: createDOMFactory('keygen'), - label: createDOMFactory('label'), - legend: createDOMFactory('legend'), - li: createDOMFactory('li'), - link: createDOMFactory('link'), - main: createDOMFactory('main'), - map: createDOMFactory('map'), - mark: createDOMFactory('mark'), - menu: createDOMFactory('menu'), - menuitem: createDOMFactory('menuitem'), - meta: createDOMFactory('meta'), - meter: createDOMFactory('meter'), - nav: createDOMFactory('nav'), - noscript: createDOMFactory('noscript'), - object: createDOMFactory('object'), - ol: createDOMFactory('ol'), - optgroup: createDOMFactory('optgroup'), - option: createDOMFactory('option'), - output: createDOMFactory('output'), - p: createDOMFactory('p'), - param: createDOMFactory('param'), - picture: createDOMFactory('picture'), - pre: createDOMFactory('pre'), - progress: createDOMFactory('progress'), - q: createDOMFactory('q'), - rp: createDOMFactory('rp'), - rt: createDOMFactory('rt'), - ruby: createDOMFactory('ruby'), - s: createDOMFactory('s'), - samp: createDOMFactory('samp'), - script: createDOMFactory('script'), - section: createDOMFactory('section'), - select: createDOMFactory('select'), - small: createDOMFactory('small'), - source: createDOMFactory('source'), - span: createDOMFactory('span'), - strong: createDOMFactory('strong'), - style: createDOMFactory('style'), - sub: createDOMFactory('sub'), - summary: createDOMFactory('summary'), - sup: createDOMFactory('sup'), - table: createDOMFactory('table'), - tbody: createDOMFactory('tbody'), - td: createDOMFactory('td'), - textarea: createDOMFactory('textarea'), - tfoot: createDOMFactory('tfoot'), - th: createDOMFactory('th'), - thead: createDOMFactory('thead'), - time: createDOMFactory('time'), - title: createDOMFactory('title'), - tr: createDOMFactory('tr'), - track: createDOMFactory('track'), - u: createDOMFactory('u'), - ul: createDOMFactory('ul'), - 'var': createDOMFactory('var'), - video: createDOMFactory('video'), - wbr: createDOMFactory('wbr'), +/***/ }), +/* 360 */ +/***/ (function(module, exports, __webpack_require__) { - // SVG - circle: createDOMFactory('circle'), - clipPath: createDOMFactory('clipPath'), - defs: createDOMFactory('defs'), - ellipse: createDOMFactory('ellipse'), - g: createDOMFactory('g'), - image: createDOMFactory('image'), - line: createDOMFactory('line'), - linearGradient: createDOMFactory('linearGradient'), - mask: createDOMFactory('mask'), - path: createDOMFactory('path'), - pattern: createDOMFactory('pattern'), - polygon: createDOMFactory('polygon'), - polyline: createDOMFactory('polyline'), - radialGradient: createDOMFactory('radialGradient'), - rect: createDOMFactory('rect'), - stop: createDOMFactory('stop'), - svg: createDOMFactory('svg'), - text: createDOMFactory('text'), - tspan: createDOMFactory('tspan') +module.exports = { "default": __webpack_require__(361), __esModule: true }; + +/***/ }), +/* 361 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(362); +var $Object = __webpack_require__(16).Object; +module.exports = function create(P, D){ + return $Object.create(P, D); }; -module.exports = ReactDOMFactories; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +/***/ }), +/* 362 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(33) +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', {create: __webpack_require__(133)}); /***/ }), -/* 369 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _prodInvariant = __webpack_require__(66); +var _typeof2 = __webpack_require__(42); -var ReactPropTypeLocationNames = __webpack_require__(370); -var ReactPropTypesSecret = __webpack_require__(371); +var _typeof3 = _interopRequireDefault(_typeof2); -var invariant = __webpack_require__(10); -var warning = __webpack_require__(11); +var _classCallCheck2 = __webpack_require__(2); -var ReactComponentTreeHook; +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { - // Temporary hack. - // Inline requires don't work well with Jest: - // https://github.com/facebook/react/issues/7240 - // Remove the inline requires when we don't need them anymore: - // https://github.com/facebook/react/pull/7178 - ReactComponentTreeHook = __webpack_require__(24); -} +var _createClass2 = __webpack_require__(3); -var loggedTypeFailures = {}; +var _createClass3 = _interopRequireDefault(_createClass2); -/** - * Assert that the values match with the type specs. - * Error messages are memorized and will only be shown once. - * - * @param {object} typeSpecs Map of name to a ReactPropType - * @param {object} values Runtime values that need to be type-checked - * @param {string} location e.g. "prop", "context", "child context" - * @param {string} componentName Name of the component for error messages. - * @param {?object} element The React element that is being type-checked - * @param {?number} debugID The React component instance that is being type-checked - * @private - */ -function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { - for (var typeSpecName in typeSpecs) { - if (typeSpecs.hasOwnProperty(typeSpecName)) { - var error; - // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0; - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); - } catch (ex) { - error = ex; - } - process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0; - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var componentStackInfo = ''; +var BaseManager = function () { + function BaseManager() { + (0, _classCallCheck3.default)(this, BaseManager); - if (process.env.NODE_ENV !== 'production') { - if (!ReactComponentTreeHook) { - ReactComponentTreeHook = __webpack_require__(24); - } - if (debugID !== null) { - componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); - } else if (element !== null) { - componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); - } - } + this.notificationBar = this.createNotificationBar(); + } - process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; - } + (0, _createClass3.default)(BaseManager, [{ + key: 'start', + value: function start() { + var _this = this; + + // Checks for page change by repeatedly checking the current page location and tracking change + (function () { + var currentPage = window.location.href; + setInterval(function () { + _this.updateNotificationBar(); + if (currentPage != window.location.href) { + currentPage = window.location.href; + setTimeout(function () { + return _this.onPageChange(); + }, 100); + } + }, 50); + _this.updateNotificationBar(); + _this.onPageChange(); + })(); + } + }, { + key: 'updateNotificationBar', + value: function updateNotificationBar() { + if (document.getElementById('sup-notif-bar')) return; + return this.createNotificationBar(); } - } -} -module.exports = checkReactTypeSpec; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + /** + * Helper timeout function to add a timer in the notification bar + * @param {Function} fn Function to be called after the delay + * @param {Number} ms Delay before calling the function + * @param {String} actionName Optional, an action name that will be displayed in the notification bar + */ -/***/ }), -/* 370 */ -/***/ (function(module, exports, __webpack_require__) { + }, { + key: 'timeout', + value: function timeout(fn, ms, actionName) { + var _this2 = this; -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ + var now = new Date(); + var shouldAbort = false; + var currentLocation = document.location.href; + + var interval = setInterval(function () { + if (currentLocation !== document.location.href) { + shouldAbort = true; + clearInterval(interval); + return; + } + var d = new Date(); + var diff = d.getTime() - now.getTime(); + _this2.setNotificationBarText((actionName || 'Action') + ' in : ' + (ms - diff) / 1000); + }, 100); + setTimeout(function () { + clearInterval(interval); + if (shouldAbort || currentLocation !== document.location.href) { + return; + } + _this2.setNotificationBarText('Done'); + fn(); + }, ms); + } + }, { + key: 'createNotificationBar', + value: function createNotificationBar() { + var notificationBar = document.createElement("div"); + notificationBar.style.width = '100%'; + notificationBar.style.textAlign = 'center'; + notificationBar.style.backgroundColor = 'rgba(203, 255, 205, 0.38)'; + notificationBar.style.lineHeight = '50px'; + notificationBar.style.height = '50px'; + notificationBar.style.fontSize = 'medium'; + notificationBar.style.zIndex = '9999'; + notificationBar.style.position = 'absolute'; + notificationBar.style.left = 0; + notificationBar.style.top = 0; + notificationBar.id = "sup-notif-bar"; + document.body.prepend(notificationBar); + return notificationBar; + } + /** + * Sets top notification bar text + * @param {} text The new text for the notification bar + */ -var ReactPropTypeLocationNames = {}; + }, { + key: 'setNotificationBarText', + value: function setNotificationBarText(text) { + this.notificationBar.textContent = text; + } + }, { + key: 'onPageChange', + value: function onPageChange() {} + }, { + key: 'sizeMatch', + value: function sizeMatch(sizeA, sizeB, category) { + sizeA = sizeA.toString().toLowerCase(); + sizeB = sizeB.toString().toLowerCase(); + if (!sizeB || !sizeA) return false; -if (process.env.NODE_ENV !== 'production') { - ReactPropTypeLocationNames = { - prop: 'prop', - context: 'context', - childContext: 'child context' - }; -} + if (sizeA === sizeB) { + return true; + } -module.exports = ReactPropTypeLocationNames; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + if (category === "shoes") { + var _ret = function () { + // Match sizes like UK10/US10.5' + var a = sizeA.split(/(?:\/)+/); + var b = sizeB.split(/(?:\/)+/); -/***/ }), -/* 371 */ -/***/ (function(module, exports, __webpack_require__) { + if (a.some(function (x) { + return b.indexOf(x) !== -1; + })) { + return { + v: true + }; + } + return { + v: a[0].replace(/\D/g, '') === b[0].replace(/\D/g, '') + }; + }(); -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ + if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + } + if (!isNaN(sizeA) || !isNaN(sizeB)) return false; + // Match sizes like 'S/M'; + var splitA = sizeA.split('/'); + var splitB = sizeB.split('/'); -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + return splitA.some(function (x) { + return sizeB[0] === x[0]; + }) || splitB.some(function (x) { + return sizeA[0] === x[0]; + }); + } + }]); + return BaseManager; +}(); -module.exports = ReactPropTypesSecret; +exports.default = BaseManager; /***/ }), -/* 372 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - +__webpack_require__(365); +module.exports = __webpack_require__(16).Object.keys; -var _require = __webpack_require__(51), - isValidElement = _require.isValidElement; +/***/ }), +/* 365 */ +/***/ (function(module, exports, __webpack_require__) { -var factory = __webpack_require__(218); +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(77) + , $keys = __webpack_require__(68); -module.exports = factory(isValidElement); +__webpack_require__(213)('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; +}); /***/ }), -/* 373 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ +Object.defineProperty(exports, "__esModule", { + value: true +}); -if (process.env.NODE_ENV !== 'production') { - var invariant = __webpack_require__(10); - var warning = __webpack_require__(11); - var ReactPropTypesSecret = __webpack_require__(142); - var loggedTypeFailures = {}; -} +var _keys = __webpack_require__(54); -/** - * Assert that the values match with the type specs. - * Error messages are memorized and will only be shown once. - * - * @param {object} typeSpecs Map of name to a ReactPropType - * @param {object} values Runtime values that need to be type-checked - * @param {string} location e.g. "prop", "context", "child context" - * @param {string} componentName Name of the component for error messages. - * @param {?Function} getStack Returns the component stack. - * @private - */ -function checkPropTypes(typeSpecs, values, location, componentName, getStack) { - if (process.env.NODE_ENV !== 'production') { - for (var typeSpecName in typeSpecs) { - if (typeSpecs.hasOwnProperty(typeSpecName)) { - var error; - // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); - } catch (ex) { - error = ex; - } - warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; +var _keys2 = _interopRequireDefault(_keys); - var stack = getStack ? getStack() : ''; +var _toConsumableArray2 = __webpack_require__(53); - warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); - } - } - } +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +exports.setInputValue = setInputValue; +exports.processField = processField; +exports.processUnknownField = processUnknownField; +exports.processByLabel = processByLabel; +exports.processByName = processByName; +exports.processByParent = processByParent; +exports.cleanup = cleanup; +exports.processFields = processFields; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ignoredIds = ['g-recaptcha-response', 'number_v', 'oba3', 'order_billing_address_3']; + +function setInputValue(input, value) { + var dispatchEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + input.value = value; + if (dispatchEvent) { + input.dispatchEvent(new Event('change')); } + return input; } -module.exports = checkPropTypes; +function processField(input, settings) { + var id = input.id; + if (ignoredIds.indexOf(id) !== -1) { + return true; + } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + if (typeof settings[id] !== 'undefined') { + setInputValue(input, settings[id]); + return true; + } + return processUnknownField(input, settings); +} -/***/ }), -/* 374 */ -/***/ (function(module, exports, __webpack_require__) { +function processUnknownField(input, settings) { + var splittedName = settings['order_billing_name'].split(' '); + if (input.name === 'credit_card[last_name]') { + setInputValue(input, splittedName[0]); + return true; + } + if (input.name === 'credit_card[first_name]') { + setInputValue(input, splittedName[1]); + return true; + } + if (input.name === 'order[billing_name]') { + setInputValue(input, settings['order_billing_name']); + return true; + } -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + if (input.name === 'order[email]') { + setInputValue(input, settings['order_email']); + return true; + } + if (input.name === 'order[tel]') { + setInputValue(input, settings['order_tel']); + return true; + } + if (input.name === 'order[billing_address]') { + setInputValue(input, settings['bo']); + return true; + } -module.exports = '15.6.1'; + if (input.name === 'order[billing_city]') { + setInputValue(input, settings['order_billing_city']); + return true; + } -/***/ }), -/* 375 */ -/***/ (function(module, exports, __webpack_require__) { + if (input.name === 'order[billing_zip]') { + setInputValue(input, settings['order_billing_zip']); + return true; + } -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + if (input.name === 'order[billing_state]') { + setInputValue(input, settings['order_billing_state']); + return true; + } + if (input.name === 'order[billing_country]') { + setInputValue(input, settings['order_billing_country']); + return true; + } + if (input.name === 'credit_card[type]') { + setInputValue(input, settings['credit_card_type']); + return true; + } -var _require = __webpack_require__(213), - Component = _require.Component; + if (input.name === 'credit_card[month]') { + setInputValue(input, settings['credit_card_month']); + return true; + } -var _require2 = __webpack_require__(51), - isValidElement = _require2.isValidElement; + if (input.name === 'credit_card[year]') { + setInputValue(input, settings['credit_card_year']); + return true; + } -var ReactNoopUpdateQueue = __webpack_require__(214); -var factory = __webpack_require__(376); + if (input.name === 'credit_card[nlb]' || input.name === 'credit_card[cnb]') { + setInputValue(input, settings['cnb']); + return true; + } -module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue); + if (input.name === 'credit_card[rvv]' || input.name === 'credit_card[vval]') { + setInputValue(input, settings['vval']); + return true; + } -/***/ }), -/* 376 */ -/***/ (function(module, exports, __webpack_require__) { + return processByLabel(input, settings); +} -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +function processByLabel(input, settings) { + var parent = input.parentNode; + var label = parent.getElementsByTagName('label')[0] || parent.querySelector('.sr-label'); + if (!label) { + var children = parent.childNodes; + for (var i = 0; i < children.length; i += 1) { + var hasClass = [].concat((0, _toConsumableArray3.default)(children[i].classList)).filter(function (x) { + return x.toLowerCase().indexOf('label') !== -1; + }).length > 0; + if (hasClass) { + label = children[i]; + break; + } + } + } + if (!label) return false; + var text = label.innerText; + if (!text) { + return; + } + var inArray = function inArray(txt, arr) { + return arr.map(function (x) { + return x.toLowerCase(); + }).indexOf(txt.toLowerCase()) !== -1; + }; -var _assign = __webpack_require__(15); + var hasText = function hasText(arr) { + return inArray(text, arr); + }; -var emptyObject = __webpack_require__(98); -var _invariant = __webpack_require__(10); + if (hasText(['nom', 'name', 'firstname', 'lastname', 'nom', 'prenom'])) { + setInputValue(input, settings['order_billing_name']); + return true; + } + if (hasText(['email', 'Eメール'])) { + setInputValue(input, settings['order_email']); + return true; + } + if (hasText(['tel', 'phone', 'phone number', '電話番号'])) { + setInputValue(input, settings['order_tel']); + return true; + } + if (hasText(['address', 'adresse', 'addresse', '住所'])) { + setInputValue(input, settings['bo']); + return true; + } + if (hasText(['city', 'ville', '区市町村'])) { + setInputValue(input, settings['order_billing_city']); + return true; + } + if (hasText(['zip', 'code postal', 'codepostal', 'code_postal', 'postal code', 'postalcode', '郵便番号'])) { + setInputValue(input, settings['order_billing_zip']); + return true; + } + if (hasText(['country', 'pays'])) { + setInputValue(input, settings['order_billing_country']); + return true; + } + if (hasText(['state', 'état', 'etat', 'province', '都道府県'])) { + setInputValue(input, settings['order_billing_state']); + return true; + } + if (hasText(['type', 'type de carte', 'credit card type', '支払い方法'])) { + setInputValue(input, settings['credit_card_type']); + return true; + } + if (hasText(['numéro', 'number', 'numero', 'カード番号'])) { + setInputValue(input, settings['cnb']); + return true; + } + if (hasText(['exp. date', 'exp date', 'expiry date', 'date d’exp.', 'date d\'exp.', 'date d\'expiration', '有効期限'])) { + if (input.type === 'select-one') { + var isMonth = input.options && input.options[0] && input.options[0].value[0] === '0'; + setInputValue(input, settings[isMonth ? 'credit_card_month' : 'credit_card_year']); + return true; + } + } + if (hasText(['CVV', 'CVV番号'])) { + setInputValue(input, settings['vval']); + return true; + } + return processByName(input, settings); +} -if (process.env.NODE_ENV !== 'production') { - var warning = __webpack_require__(11); +function processByName(input, settings) { + if ((0, _keys2.default)(settings).indexOf(input.name) !== -1) { + setInputValue(input, settings[input.name]); + return true; + } + return processByParent(input, settings); } -var MIXINS_KEY = 'mixins'; +function processByParent(input, settings) { + var parent = input.parentNode; + if (!parent) { + return false; + } + var classList = [].concat((0, _toConsumableArray3.default)(parent.classList)); + if (classList.indexOf('credit_card_verification_value') !== -1) { + setInputValue(input, settings['vval']); + return true; + } -// Helper function to allow the creation of anonymous functions which do not -// have .name set to the name of the variable being assigned to. -function identity(fn) { - return fn; -} + if (classList.indexOf('credit_card_number') !== -1) { + setInputValue(input, settings['cnb']); + return true; + } -var ReactPropTypeLocationNames; -if (process.env.NODE_ENV !== 'production') { - ReactPropTypeLocationNames = { - prop: 'prop', - context: 'context', - childContext: 'child context' - }; -} else { - ReactPropTypeLocationNames = {}; + // probably a card detail input + if (parent.parentNode && parent.parentNode.id === 'card_details') { + // either month/year of expiry date + if (input.type === 'select-one') { + var isMonth = input.options && input.options[0] && input.options[0].value[0] === '0'; + setInputValue(input, settings[isMonth ? 'credit_card_month' : 'credit_card_year']); + return true; + } + + // probably cvv + if (input.attributes['maxlength']) { + setInputValue(input, settings['vval']); + return true; + } + + // otherwise its probably cc number + setInputValue(input, settings['cnb']); + } } -function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { - /** - * Policies that describe methods in `ReactClassInterface`. - */ +function cleanup(inputs, settings) { + var input = document.getElementById('order_billing_state') || document.querySelector('[name="order[billing_state]"]'); + if (input) { + setInputValue(input, settings['order_billing_state'], false); + return true; + } + var stateLabel = document.querySelector('#state_label'); + if (stateLabel && stateLabel.parentNode) { + var stateSelect = stateLabel.parentNode.querySelector('select'); + if (stateLabel) { + setInputValue(stateSelect, settings['order_billing_state'], false); + return true; + } + } - var injectedMixins = []; + var stateInputParent = document.querySelector('.order_billing_state'); + if (stateInputParent) { + var selector = stateInputParent.querySelector('select'); + if (selector) { + setInputValue(selector, settings['order_billing_state'], false); + return true; + } + } + return false; +} - /** - * Composite components are higher-level components that compose other composite - * or host components. - * - * To create a new type of `ReactClass`, pass a specification of - * your new class to `React.createClass`. The only requirement of your class - * specification is that you implement a `render` method. - * - * var MyComponent = React.createClass({ - * render: function() { - * return <div>Hello World</div>; - * } - * }); - * - * The class specification supports a specific protocol of methods that have - * special meaning (e.g. `render`). See `ReactClassInterface` for - * more the comprehensive protocol. Any other properties and methods in the - * class specification will be available on the prototype. - * - * @interface ReactClassInterface - * @internal - */ - var ReactClassInterface = { - /** - * An array of Mixin objects to include when defining your component. - * - * @type {array} - * @optional - */ - mixins: 'DEFINE_MANY', +function processFields(inputs, settings) { + var successes = []; + for (var i = 0; i < inputs.length; i += 1) { + var success = processField(inputs[i], settings); + successes.push(success); + if (!success) { + console.info('Unknown field id : ' + inputs[i].id); + } + } + cleanup(inputs, settings); + return successes.every(function (x) { + return x === true; + }); +} - /** - * An object containing properties and methods that should be defined on - * the component's constructor instead of its prototype (static methods). - * - * @type {object} - * @optional - */ - statics: 'DEFINE_MANY', +/***/ }), +/* 367 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Definition of prop types for this component. - * - * @type {object} - * @optional - */ - propTypes: 'DEFINE_MANY', +"use strict"; - /** - * Definition of context types for this component. - * - * @type {object} - * @optional - */ - contextTypes: 'DEFINE_MANY', - /** - * Definition of context types this component sets for its children. - * - * @type {object} - * @optional - */ - childContextTypes: 'DEFINE_MANY', +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.saveState = exports.loadSavedState = exports.initializeLocalStorageState = undefined; - // ==== Definition methods ==== +var _regenerator = __webpack_require__(126); - /** - * Invoked when the component is mounted. Values in the mapping will be set on - * `this.props` if that prop is not specified (i.e. using an `in` check). - * - * This method is invoked before `getInitialState` and therefore cannot rely - * on `this.state` or use `this.setState`. - * - * @return {object} - * @optional - */ - getDefaultProps: 'DEFINE_MANY_MERGED', +var _regenerator2 = _interopRequireDefault(_regenerator); - /** - * Invoked once before the component is mounted. The return value will be used - * as the initial value of `this.state`. - * - * getInitialState: function() { - * return { - * isOn: false, - * fooBaz: new BazFoo() - * } - * } - * - * @return {object} - * @optional - */ - getInitialState: 'DEFINE_MANY_MERGED', +var _asyncToGenerator2 = __webpack_require__(127); - /** - * @return {object} - * @optional - */ - getChildContext: 'DEFINE_MANY_MERGED', +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); - /** - * Uses props from `this.props` and state from `this.state` to render the - * structure of the component. - * - * No guarantees are made about when or how often this method is invoked, so - * it must not have side effects. - * - * render: function() { - * var name = this.props.name; - * return <div>Hello, {name}!</div>; - * } - * - * @return {ReactComponent} - * @required - */ - render: 'DEFINE_ONCE', +var _promise = __webpack_require__(197); - // ==== Delegate methods ==== +var _promise2 = _interopRequireDefault(_promise); - /** - * Invoked when the component is initially created and about to be mounted. - * This may have side effects, but any external subscriptions or data created - * by this method must be cleaned up in `componentWillUnmount`. - * - * @optional - */ - componentWillMount: 'DEFINE_MANY', +var _stringify = __webpack_require__(368); - /** - * Invoked when the component has been mounted and has a DOM representation. - * However, there is no guarantee that the DOM node is in the document. - * - * Use this as an opportunity to operate on the DOM when the component has - * been mounted (initialized and rendered) for the first time. - * - * @param {DOMElement} rootNode DOM element representing the component. - * @optional - */ - componentDidMount: 'DEFINE_MANY', +var _stringify2 = _interopRequireDefault(_stringify); - /** - * Invoked before the component receives new props. - * - * Use this as an opportunity to react to a prop transition by updating the - * state using `this.setState`. Current props are accessed via `this.props`. - * - * componentWillReceiveProps: function(nextProps, nextContext) { - * this.setState({ - * likesIncreasing: nextProps.likeCount > this.props.likeCount - * }); - * } - * - * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop - * transition may cause a state change, but the opposite is not true. If you - * need it, you are probably looking for `componentWillUpdate`. - * - * @param {object} nextProps - * @optional - */ - componentWillReceiveProps: 'DEFINE_MANY', +exports.saveToChromeStorage = saveToChromeStorage; +exports.getFromChromeStorage = getFromChromeStorage; - /** - * Invoked while deciding if the component should be updated as a result of - * receiving new props, state and/or context. - * - * Use this as an opportunity to `return false` when you're certain that the - * transition to the new props/state/context will not require a component - * update. - * - * shouldComponentUpdate: function(nextProps, nextState, nextContext) { - * return !equal(nextProps, this.props) || - * !equal(nextState, this.state) || - * !equal(nextContext, this.context); - * } - * - * @param {object} nextProps - * @param {?object} nextState - * @param {?object} nextContext - * @return {boolean} True if the component should update. - * @optional - */ - shouldComponentUpdate: 'DEFINE_ONCE', +var _Helpers = __webpack_require__(145); - /** - * Invoked when the component is about to update due to a transition from - * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` - * and `nextContext`. - * - * Use this as an opportunity to perform preparation before an update occurs. - * - * NOTE: You **cannot** use `this.setState()` in this method. - * - * @param {object} nextProps - * @param {?object} nextState - * @param {?object} nextContext - * @param {ReactReconcileTransaction} transaction - * @optional - */ - componentWillUpdate: 'DEFINE_MANY', +var Helpers = _interopRequireWildcard(_Helpers); - /** - * Invoked when the component's DOM representation has been updated. - * - * Use this as an opportunity to operate on the DOM when the component has - * been updated. - * - * @param {object} prevProps - * @param {?object} prevState - * @param {?object} prevContext - * @param {DOMElement} rootNode DOM element representing the component. - * @optional - */ - componentDidUpdate: 'DEFINE_MANY', +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - /** - * Invoked when the component is about to be removed from its parent and have - * its DOM representation destroyed. - * - * Use this as an opportunity to deallocate any external resources. - * - * NOTE: There is no `componentDidUnmount` since your component will have been - * destroyed by that point. - * - * @optional - */ - componentWillUnmount: 'DEFINE_MANY', +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // ==== Advanced methods ==== +var initializeLocalStorageState = exports.initializeLocalStorageState = function initializeLocalStorageState(initialState, version) { + localStorage.setItem('state', (0, _stringify2.default)([{ value: initialState || {}, version: version }])); +}; - /** - * Updates the component's currently mounted DOM representation. - * - * By default, this implements React's rendering and reconciliation algorithm. - * Sophisticated clients may wish to override this. - * - * @param {ReactReconcileTransaction} transaction - * @internal - * @overridable - */ - updateComponent: 'OVERRIDE_BASE' - }; +var loadSavedState = exports.loadSavedState = function loadSavedState(version) { + try { + var items = JSON.parse(localStorage.getItem('state')) || []; + var state = items.filter(function (x) { + return x.version === version; + })[0]; + if (state) { + return state.value; + } + return {}; + } catch (err) { + initializeLocalStorageState({}, version); + return {}; + } +}; - /** - * Mapping from class specification keys to special processing functions. - * - * Although these are declared like instance properties in the specification - * when defining classes using `React.createClass`, they are actually static - * and are accessible on the constructor instead of the prototype. Despite - * being static, they must be defined outside of the "statics" key under - * which all other static methods are defined. - */ - var RESERVED_SPEC_KEYS = { - displayName: function(Constructor, displayName) { - Constructor.displayName = displayName; - }, - mixins: function(Constructor, mixins) { - if (mixins) { - for (var i = 0; i < mixins.length; i++) { - mixSpecIntoComponent(Constructor, mixins[i]); - } - } - }, - childContextTypes: function(Constructor, childContextTypes) { - if (process.env.NODE_ENV !== 'production') { - validateTypeDef(Constructor, childContextTypes, 'childContext'); - } - Constructor.childContextTypes = _assign( - {}, - Constructor.childContextTypes, - childContextTypes - ); - }, - contextTypes: function(Constructor, contextTypes) { - if (process.env.NODE_ENV !== 'production') { - validateTypeDef(Constructor, contextTypes, 'context'); - } - Constructor.contextTypes = _assign( - {}, - Constructor.contextTypes, - contextTypes - ); - }, - /** - * Special case getDefaultProps which should move into statics but requires - * automatic merging. - */ - getDefaultProps: function(Constructor, getDefaultProps) { - if (Constructor.getDefaultProps) { - Constructor.getDefaultProps = createMergedResultFunction( - Constructor.getDefaultProps, - getDefaultProps - ); - } else { - Constructor.getDefaultProps = getDefaultProps; - } - }, - propTypes: function(Constructor, propTypes) { - if (process.env.NODE_ENV !== 'production') { - validateTypeDef(Constructor, propTypes, 'prop'); - } - Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); - }, - statics: function(Constructor, statics) { - mixStaticSpecIntoComponent(Constructor, statics); - }, - autobind: function() {} - }; - - function validateTypeDef(Constructor, typeDef, location) { - for (var propName in typeDef) { - if (typeDef.hasOwnProperty(propName)) { - // use a warning instead of an _invariant so components - // don't show up in prod but only in __DEV__ - if (process.env.NODE_ENV !== 'production') { - warning( - typeof typeDef[propName] === 'function', - '%s: %s type `%s` is invalid; it must be a function, usually from ' + - 'React.PropTypes.', - Constructor.displayName || 'ReactClass', - ReactPropTypeLocationNames[location], - propName - ); - } +var saveState = exports.saveState = function saveState(state, version) { + try { + // If no state is saved, we create it using the current version number + if (!localStorage.getItem('state')) { + initializeLocalStorageState(state, version); + } else { + var currentState = JSON.parse(localStorage.getItem('state')); + var currentVersionState = currentState.filter(function (x) { + return x.version === version; + })[0]; + // If a state for the current version already exists, we update it + if (currentVersionState) { + currentVersionState.value = state; + } else { + currentState.push({ value: state, version: version }); } + localStorage.setItem('state', (0, _stringify2.default)(currentState)); } + } catch (err) { + console.info('Possible corrupted or incompatible state found in the localstorage, reinitializing the state...'); + initializeLocalStorageState({}, version); } +}; - function validateMethodOverride(isAlreadyDefined, name) { - var specPolicy = ReactClassInterface.hasOwnProperty(name) - ? ReactClassInterface[name] - : null; +function saveToChromeStorage(key, value) { + return new _promise2.default(function (resolve) { + var obj = {}; + obj[key] = value; + chrome.storage.local.set(obj, function () { + resolve(); + }); + }); +} - // Disallow overriding of base class methods unless explicitly allowed. - if (ReactClassMixin.hasOwnProperty(name)) { - _invariant( - specPolicy === 'OVERRIDE_BASE', - 'ReactClassInterface: You are attempting to override ' + - '`%s` from your class specification. Ensure that your method names ' + - 'do not overlap with React methods.', - name - ); - } +function getFromChromeStorage(key) { + var _this = this; - // Disallow defining methods more than once unless explicitly allowed. - if (isAlreadyDefined) { - _invariant( - specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', - 'ReactClassInterface: You are attempting to define ' + - '`%s` on your component more than once. This conflict may be due ' + - 'to a mixin.', - name - ); - } - } + return new _promise2.default(function (resolve) { + chrome.storage.local.get(key, function () { + var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(settings) { + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + resolve(Helpers.isObjectEmpty(settings) ? {} : settings[key]); - /** - * Mixin helper which handles policy validation and reserved - * specification keys when building React classes. - */ - function mixSpecIntoComponent(Constructor, spec) { - if (!spec) { - if (process.env.NODE_ENV !== 'production') { - var typeofSpec = typeof spec; - var isMixinValid = typeofSpec === 'object' && spec !== null; + case 1: + case 'end': + return _context.stop(); + } + } + }, _callee, _this); + })); - if (process.env.NODE_ENV !== 'production') { - warning( - isMixinValid, - "%s: You're attempting to include a mixin that is either null " + - 'or not an object. Check the mixins included by the component, ' + - 'as well as any mixins they include themselves. ' + - 'Expected object but got %s.', - Constructor.displayName || 'ReactClass', - spec === null ? null : typeofSpec - ); - } - } + return function (_x) { + return _ref.apply(this, arguments); + }; + }()); + }); +} - return; - } +/***/ }), +/* 368 */ +/***/ (function(module, exports, __webpack_require__) { - _invariant( - typeof spec !== 'function', - "ReactClass: You're attempting to " + - 'use a component class or function as a mixin. Instead, just use a ' + - 'regular object.' - ); - _invariant( - !isValidElement(spec), - "ReactClass: You're attempting to " + - 'use a component as a mixin. Instead, just use a regular object.' - ); +module.exports = { "default": __webpack_require__(369), __esModule: true }; - var proto = Constructor.prototype; - var autoBindPairs = proto.__reactAutoBindPairs; +/***/ }), +/* 369 */ +/***/ (function(module, exports, __webpack_require__) { - // By handling mixins before any other properties, we ensure the same - // chaining order is applied to methods with DEFINE_MANY policy, whether - // mixins are listed before or after these methods in the spec. - if (spec.hasOwnProperty(MIXINS_KEY)) { - RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); - } +var core = __webpack_require__(16) + , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify}); +module.exports = function stringify(it){ // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); +}; - for (var name in spec) { - if (!spec.hasOwnProperty(name)) { - continue; - } +/***/ }), +/* 370 */ +/***/ (function(module, exports, __webpack_require__) { - if (name === MIXINS_KEY) { - // We have already handled mixins in a special case above. - continue; - } +"use strict"; - var property = spec[name]; - var isAlreadyDefined = proto.hasOwnProperty(name); - validateMethodOverride(isAlreadyDefined, name); - if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { - RESERVED_SPEC_KEYS[name](Constructor, property); - } else { - // Setup methods on prototype: - // The following member methods should not be automatically bound: - // 1. Expected ReactClass methods (in the "interface"). - // 2. Overridden methods (that were mixed in). - var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); - var isFunction = typeof property === 'function'; - var shouldAutoBind = - isFunction && - !isReactClassMethod && - !isAlreadyDefined && - spec.autobind !== false; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SHOP_NAME = undefined; - if (shouldAutoBind) { - autoBindPairs.push(name, property); - proto[name] = property; - } else { - if (isAlreadyDefined) { - var specPolicy = ReactClassInterface[name]; +var _keys = __webpack_require__(54); - // These cases should already be caught by validateMethodOverride. - _invariant( - isReactClassMethod && - (specPolicy === 'DEFINE_MANY_MERGED' || - specPolicy === 'DEFINE_MANY'), - 'ReactClass: Unexpected spec policy %s for key %s ' + - 'when mixing in component specs.', - specPolicy, - name - ); +var _keys2 = _interopRequireDefault(_keys); - // For methods which are defined more than once, call the existing - // methods before calling the new property, merging if appropriate. - if (specPolicy === 'DEFINE_MANY_MERGED') { - proto[name] = createMergedResultFunction(proto[name], property); - } else if (specPolicy === 'DEFINE_MANY') { - proto[name] = createChainedFunction(proto[name], property); - } - } else { - proto[name] = property; - if (process.env.NODE_ENV !== 'production') { - // Add verbose displayName to the function, which helps when looking - // at profiling tools. - if (typeof property === 'function' && spec.displayName) { - proto[name].displayName = spec.displayName + '_' + name; - } - } - } - } - } - } - } +var _getPrototypeOf = __webpack_require__(4); - function mixStaticSpecIntoComponent(Constructor, statics) { - if (!statics) { - return; - } - for (var name in statics) { - var property = statics[name]; - if (!statics.hasOwnProperty(name)) { - continue; - } +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - var isReserved = name in RESERVED_SPEC_KEYS; - _invariant( - !isReserved, - 'ReactClass: You are attempting to define a reserved ' + - 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + - 'as an instance property instead; it will still be accessible on the ' + - 'constructor.', - name - ); +var _classCallCheck2 = __webpack_require__(2); - var isInherited = name in Constructor; - _invariant( - !isInherited, - 'ReactClass: You are attempting to define ' + - '`%s` on your component more than once. This conflict may be ' + - 'due to a mixin.', - name - ); - Constructor[name] = property; - } - } +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - /** - * Merge two objects, but throw if both contain the same key. - * - * @param {object} one The first object, which is mutated. - * @param {object} two The second object - * @return {object} one after it has been mutated to contain everything in two. - */ - function mergeIntoWithNoDuplicateKeys(one, two) { - _invariant( - one && two && typeof one === 'object' && typeof two === 'object', - 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' - ); +var _createClass2 = __webpack_require__(3); - for (var key in two) { - if (two.hasOwnProperty(key)) { - _invariant( - one[key] === undefined, - 'mergeIntoWithNoDuplicateKeys(): ' + - 'Tried to merge two objects with the same key: `%s`. This conflict ' + - 'may be due to a mixin; in particular, this may be caused by two ' + - 'getInitialState() or getDefaultProps() methods returning objects ' + - 'with clashing keys.', - key - ); - one[key] = two[key]; - } - } - return one; - } +var _createClass3 = _interopRequireDefault(_createClass2); - /** - * Creates a function that invokes two functions and merges their return values. - * - * @param {function} one Function to invoke first. - * @param {function} two Function to invoke second. - * @return {function} Function that invokes the two argument functions. - * @private - */ - function createMergedResultFunction(one, two) { - return function mergedResult() { - var a = one.apply(this, arguments); - var b = two.apply(this, arguments); - if (a == null) { - return b; - } else if (b == null) { - return a; - } - var c = {}; - mergeIntoWithNoDuplicateKeys(c, a); - mergeIntoWithNoDuplicateKeys(c, b); - return c; - }; - } +var _possibleConstructorReturn2 = __webpack_require__(5); - /** - * Creates a function that invokes two functions and ignores their return vales. - * - * @param {function} one Function to invoke first. - * @param {function} two Function to invoke second. - * @return {function} Function that invokes the two argument functions. - * @private - */ - function createChainedFunction(one, two) { - return function chainedFunction() { - one.apply(this, arguments); - two.apply(this, arguments); - }; - } +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - /** - * Binds a method to the component. - * - * @param {object} component Component whose method is going to be bound. - * @param {function} method Method to be bound. - * @return {function} The bound method. - */ - function bindAutoBindMethod(component, method) { - var boundMethod = method.bind(component); - if (process.env.NODE_ENV !== 'production') { - boundMethod.__reactBoundContext = component; - boundMethod.__reactBoundMethod = method; - boundMethod.__reactBoundArguments = null; - var componentName = component.constructor.displayName; - var _bind = boundMethod.bind; - boundMethod.bind = function(newThis) { - for ( - var _len = arguments.length, - args = Array(_len > 1 ? _len - 1 : 0), - _key = 1; - _key < _len; - _key++ - ) { - args[_key - 1] = arguments[_key]; - } +var _inherits2 = __webpack_require__(6); - // User is trying to bind() an autobound method; we effectively will - // ignore the value of "this" that the user is trying to use, so - // let's warn. - if (newThis !== component && newThis !== null) { - if (process.env.NODE_ENV !== 'production') { - warning( - false, - 'bind(): React component methods may only be bound to the ' + - 'component instance. See %s', - componentName - ); - } - } else if (!args.length) { - if (process.env.NODE_ENV !== 'production') { - warning( - false, - 'bind(): You are binding a component method to the component. ' + - 'React does this for you automatically in a high-performance ' + - 'way, so you can safely remove this call. See %s', - componentName - ); - } - return boundMethod; - } - var reboundMethod = _bind.apply(boundMethod, arguments); - reboundMethod.__reactBoundContext = component; - reboundMethod.__reactBoundMethod = method; - reboundMethod.__reactBoundArguments = args; - return reboundMethod; - }; - } - return boundMethod; - } +var _inherits3 = _interopRequireDefault(_inherits2); - /** - * Binds all auto-bound methods in a component. - * - * @param {object} component Component whose method is going to be bound. - */ - function bindAutoBindMethods(component) { - var pairs = component.__reactAutoBindPairs; - for (var i = 0; i < pairs.length; i += 2) { - var autoBindKey = pairs[i]; - var method = pairs[i + 1]; - component[autoBindKey] = bindAutoBindMethod(component, method); - } - } +var _react = __webpack_require__(1); - var IsMountedPreMixin = { - componentDidMount: function() { - this.__isMounted = true; - } - }; +var _react2 = _interopRequireDefault(_react); - var IsMountedPostMixin = { - componentWillUnmount: function() { - this.__isMounted = false; - } - }; +var _Tab = __webpack_require__(382); - /** - * Add more to the ReactClass base class. These are all legacy features and - * therefore not already part of the modern ReactComponent. - */ - var ReactClassMixin = { - /** - * TODO: This will be deprecated because state should always keep a consistent - * type signature and the only use case for this, is to avoid that. - */ - replaceState: function(newState, callback) { - this.updater.enqueueReplaceState(this, newState, callback); - }, +var _Tab2 = _interopRequireDefault(_Tab); - /** - * Checks whether or not this composite component is mounted. - * @return {boolean} True if mounted, false otherwise. - * @protected - * @final - */ - isMounted: function() { - if (process.env.NODE_ENV !== 'production') { - warning( - this.__didWarnIsMounted, - '%s: isMounted is deprecated. Instead, make sure to clean up ' + - 'subscriptions and pending requests in componentWillUnmount to ' + - 'prevent memory leaks.', - (this.constructor && this.constructor.displayName) || - this.name || - 'Component' - ); - this.__didWarnIsMounted = true; - } - return !!this.__isMounted; - } - }; +var _reactRedux = __webpack_require__(28); - var ReactClassComponent = function() {}; - _assign( - ReactClassComponent.prototype, - ReactComponent.prototype, - ReactClassMixin - ); +var _FontIcon = __webpack_require__(262); - /** - * Creates a composite component class given a class specification. - * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass - * - * @param {object} spec Class specification (which must define `render`). - * @return {function} Component constructor function. - * @public - */ - function createClass(spec) { - // To keep our warnings more understandable, we'll use a little hack here to - // ensure that Constructor.name !== 'Constructor'. This makes sure we don't - // unnecessarily identify a class without displayName as 'Constructor'. - var Constructor = identity(function(props, context, updater) { - // This constructor gets overridden by mocks. The argument is used - // by mocks to assert on what gets mounted. +var _FontIcon2 = _interopRequireDefault(_FontIcon); - if (process.env.NODE_ENV !== 'production') { - warning( - this instanceof Constructor, - 'Something is calling a React component directly. Use a factory or ' + - 'JSX instead. See: https://fb.me/react-legacyfactory' - ); - } +var _IconButton = __webpack_require__(72); - // Wire up auto-binding - if (this.__reactAutoBindPairs.length) { - bindAutoBindMethods(this); - } +var _IconButton2 = _interopRequireDefault(_IconButton); - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; +var _colors = __webpack_require__(37); - this.state = null; +var _Menus = __webpack_require__(84); - // ReactClasses doesn't have constructors. Instead, they use the - // getInitialState and componentWillMount methods for initialization. +var menus = _interopRequireWildcard(_Menus); - var initialState = this.getInitialState ? this.getInitialState() : null; - if (process.env.NODE_ENV !== 'production') { - // We allow auto-mocks to proceed as if they're returning null. - if ( - initialState === undefined && - this.getInitialState._isMockFunction - ) { - // This is probably bad practice. Consider warning here and - // deprecating this convenience. - initialState = null; - } - } - _invariant( - typeof initialState === 'object' && !Array.isArray(initialState), - '%s.getInitialState(): must return an object or null', - Constructor.displayName || 'ReactCompositeComponent' - ); +var _Billing = __webpack_require__(502); - this.state = initialState; - }); - Constructor.prototype = new ReactClassComponent(); - Constructor.prototype.constructor = Constructor; - Constructor.prototype.__reactAutoBindPairs = []; +var _Billing2 = _interopRequireDefault(_Billing); - injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); +var _Options = __webpack_require__(766); - mixSpecIntoComponent(Constructor, IsMountedPreMixin); - mixSpecIntoComponent(Constructor, spec); - mixSpecIntoComponent(Constructor, IsMountedPostMixin); +var _Options2 = _interopRequireDefault(_Options); - // Initialize the defaultProps property after all mixins have been merged. - if (Constructor.getDefaultProps) { - Constructor.defaultProps = Constructor.getDefaultProps(); - } +var _Sizes = __webpack_require__(767); - if (process.env.NODE_ENV !== 'production') { - // This is a tag to indicate that the use of these method names is ok, - // since it's used with createClass. If it's not, then it's likely a - // mistake so we'll warn you to use the static property, property - // initializer or constructor respectively. - if (Constructor.getDefaultProps) { - Constructor.getDefaultProps.isReactClassApproved = {}; +var _Sizes2 = _interopRequireDefault(_Sizes); + +var _Atc = __webpack_require__(768); + +var _Atc2 = _interopRequireDefault(_Atc); + +var _Layout = __webpack_require__(784); + +var _Layout2 = _interopRequireDefault(_Layout); + +var _Badge = __webpack_require__(791); + +var _Badge2 = _interopRequireDefault(_Badge); + +var _menu = __webpack_require__(793); + +var _profiles = __webpack_require__(794); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SHOP_NAME = exports.SHOP_NAME = 'Supreme'; + +var Supreme = function (_Component) { + (0, _inherits3.default)(Supreme, _Component); + + function Supreme() { + (0, _classCallCheck3.default)(this, Supreme); + return (0, _possibleConstructorReturn3.default)(this, (Supreme.__proto__ || (0, _getPrototypeOf2.default)(Supreme)).apply(this, arguments)); + } + + (0, _createClass3.default)(Supreme, [{ + key: 'getContainerForMenu', + value: function getContainerForMenu(menu) { + var _this2 = this; + + switch (menu) { + case menus.MENU_BILLING: + return _react2.default.createElement(_Billing2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + case menus.MENU_OPTIONS: + return _react2.default.createElement(_Options2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + case menus.MENU_SIZES: + return _react2.default.createElement(_Sizes2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + case menus.MENU_ATC: + return _react2.default.createElement(_Atc2.default, { shop: SHOP_NAME }); + default: + return null; } - if (Constructor.prototype.getInitialState) { - Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + }, { + key: 'strToNumberReducer', + value: function strToNumberReducer(menu, key, value) { + // Don't process values for billing + if (typeof value === 'string' && !isNaN(value) && menu !== menus.MENU_BILLING) { + return +value; } + return value; } - - _invariant( - Constructor.prototype.render, - 'createClass(...): Class specification must implement a `render` method.' - ); - - if (process.env.NODE_ENV !== 'production') { - warning( - !Constructor.prototype.componentShouldUpdate, - '%s has a method called ' + - 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + - 'The name is phrased as a question because the function is ' + - 'expected to return a value.', - spec.displayName || 'A component' - ); - warning( - !Constructor.prototype.componentWillRecieveProps, - '%s has a method called ' + - 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', - spec.displayName || 'A component' + }, { + key: 'transform', + value: function transform(menu, obj, reducer) { + var keys = (0, _keys2.default)(obj); + var newObj = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = obj[key]; + newObj[key] = reducer(menu, key, value); + } + return newObj; + } + }, { + key: 'onSubmit', + value: function onSubmit(menu, data) { + var newObj = this.transform(menu, data, this.strToNumberReducer); + this.props.updateSettings(this.props.currentProfile, SHOP_NAME, menu, newObj); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + if (this.props.menu == null) { + this.props.changeMenu(Supreme.getDefaultMenu()); + } + } + }, { + key: 'getIconForTabMenu', + value: function getIconForTabMenu(menu) { + if (menu === menus.MENU_ATC) { + return _react2.default.createElement( + _IconButton2.default, + { iconStyle: { color: 'white' }, style: { padding: 0 }, tooltipPosition: 'top-center', tooltipStyles: { color: 'white' } }, + _react2.default.createElement( + _Badge2.default, + { + badgeStyle: { top: -24, right: 12 }, + badgeContent: this.props.atcProducts.length, + primary: true + }, + _react2.default.createElement( + _FontIcon2.default, + { style: { color: 'white', top: -24, right: 12 }, className: 'material-icons' }, + 'done' + ) + ) + ); + } + var isIncomplete = !this.props.settings[SHOP_NAME] || !this.props.settings[SHOP_NAME][menu]; + var color = isIncomplete ? _colors.red300 : 'white'; + var tip = isIncomplete ? 'This tab hasn\'t been configured yet' : ''; + return _react2.default.createElement( + _IconButton2.default, + { iconStyle: { color: color }, tooltip: tip, tooltipPosition: 'top-center', tooltipStyles: { color: 'white' } }, + _react2.default.createElement( + _FontIcon2.default, + { style: { color: color }, className: 'material-icons' }, + isIncomplete ? 'error' : 'done' + ) ); } + }, { + key: 'getTabs', + value: function getTabs() { + var _this3 = this; - // Reduce time spent doing lookups by setting these on the prototype. - for (var methodName in ReactClassInterface) { - if (!Constructor.prototype[methodName]) { - Constructor.prototype[methodName] = null; - } + return [_react2.default.createElement(_Tab2.default, { + label: 'Billing', + key: 1, + icon: this.getIconForTabMenu(menus.MENU_BILLING), + value: menus.MENU_BILLING, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_BILLING); + } + }), _react2.default.createElement(_Tab2.default, { + label: 'Options', + key: 2, + icon: this.getIconForTabMenu(menus.MENU_OPTIONS), + value: menus.MENU_OPTIONS, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_OPTIONS); + } + }), _react2.default.createElement(_Tab2.default, { + label: 'Sizes', + key: 3, + icon: this.getIconForTabMenu(menus.MENU_SIZES), + value: menus.MENU_SIZES, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_SIZES); + } + }), _react2.default.createElement(_Tab2.default, { + label: 'AutoCop', + key: 4, + icon: this.getIconForTabMenu(menus.MENU_ATC), + value: menus.MENU_ATC, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_ATC); + } + })]; } + }, { + key: 'render', + value: function render() { + var menu = this.props.menu; - return Constructor; - } + return _react2.default.createElement( + _Layout2.default, + { title: menu || 'Loading...', tabs: this.getTabs(), currentTab: menu }, + this.getContainerForMenu(menu) + ); + } + }], [{ + key: 'getDefaultMenu', + value: function getDefaultMenu() { + return menus.MENU_BILLING; + } + }]); + return Supreme; +}(_react.Component); - return createClass; +function mapStateToProps(state) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + menu: state.menu.currentMenu, + settings: settings, + atcProducts: state.atc.atcProducts, + currentProfile: currentProfile + }; } -module.exports = factory; +function mapDispatchToProps(dispatch) { + return { + changeMenu: function changeMenu(menu) { + return dispatch((0, _menu.changeMenu)(menu)); + }, + updateSettings: function updateSettings(currentProfile, shop, key, value) { + return dispatch((0, _profiles.updateProfileSettings)(currentProfile, shop, key, value)); + } + }; +} -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Supreme); /***/ }), -/* 377 */ +/* 371 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27075,672 +27360,458 @@ module.exports = factory; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * */ -var _prodInvariant = __webpack_require__(66); -var ReactElement = __webpack_require__(51); +var _prodInvariant = __webpack_require__(56); var invariant = __webpack_require__(10); /** - * Returns the first child in a collection of children and verifies that there - * is only one child in the collection. - * - * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only - * - * The current implementation of this function assumes that a single child gets - * passed without a wrapper, but the purpose of this helper function is to - * abstract away the particular structure of children. - * - * @param {?object} children Child collection structure. - * @return {ReactElement} The first and only `ReactElement` contained in the - * structure. + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. */ -function onlyChild(children) { - !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0; - return children; -} - -module.exports = onlyChild; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 378 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends2 = __webpack_require__(8); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(9); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - -var _getPrototypeOf = __webpack_require__(4); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(2); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(3); - -var _createClass3 = _interopRequireDefault(_createClass2); +var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; -var _possibleConstructorReturn2 = __webpack_require__(5); +var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } +}; -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); +var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } +}; -var _inherits2 = __webpack_require__(6); +var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } +}; -var _inherits3 = _interopRequireDefault(_inherits2); +var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } +}; -var _simpleAssign = __webpack_require__(7); +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +/** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ +var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; +}; -var _react = __webpack_require__(1); +var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler +}; -var _react2 = _interopRequireDefault(_react); +module.exports = PooledClass; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -var _EnhancedButton = __webpack_require__(52); +/***/ }), +/* 372 */ +/***/ (function(module, exports, __webpack_require__) { -var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props, context) { - var tabs = context.muiTheme.tabs; +var ReactElement = __webpack_require__(43); - return { - root: { - color: props.selected ? tabs.selectedTextColor : tabs.textColor, - fontWeight: 500, - fontSize: 14, - width: props.width, - textTransform: 'uppercase', - padding: 0 - }, - button: { - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - justifyContent: 'center', - height: props.label && props.icon ? 72 : 48 - } - }; +/** + * Create a factory that creates HTML tag elements. + * + * @private + */ +var createDOMFactory = ReactElement.createFactory; +if (process.env.NODE_ENV !== 'production') { + var ReactElementValidator = __webpack_require__(221); + createDOMFactory = ReactElementValidator.createFactory; } -var Tab = function (_Component) { - (0, _inherits3.default)(Tab, _Component); - - function Tab() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, Tab); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tab.__proto__ || (0, _getPrototypeOf2.default)(Tab)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTap = function (event) { - if (_this.props.onTouchTap) { - _this.props.onTouchTap(_this.props.value, event, _this); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - - (0, _createClass3.default)(Tab, [{ - key: 'render', - value: function render() { - var _props = this.props, - icon = _props.icon, - index = _props.index, - onActive = _props.onActive, - onTouchTap = _props.onTouchTap, - selected = _props.selected, - label = _props.label, - buttonStyle = _props.buttonStyle, - style = _props.style, - value = _props.value, - width = _props.width, - other = (0, _objectWithoutProperties3.default)(_props, ['icon', 'index', 'onActive', 'onTouchTap', 'selected', 'label', 'buttonStyle', 'style', 'value', 'width']); - - - var styles = getStyles(this.props, this.context); - - var iconElement = void 0; - if (icon && _react2.default.isValidElement(icon)) { - var iconProps = { - style: { - fontSize: 24, - color: styles.root.color, - marginBottom: label ? 5 : 0 - } - }; - // If it's svg icon set color via props - if (icon.type.muiName !== 'FontIcon') { - iconProps.color = styles.root.color; - } - iconElement = _react2.default.cloneElement(icon, iconProps); - } - - var rippleOpacity = 0.3; - var rippleColor = this.context.muiTheme.tabs.selectedTextColor; - - return _react2.default.createElement( - _EnhancedButton2.default, - (0, _extends3.default)({}, other, { - style: (0, _simpleAssign2.default)(styles.root, style), - focusRippleColor: rippleColor, - touchRippleColor: rippleColor, - focusRippleOpacity: rippleOpacity, - touchRippleOpacity: rippleOpacity, - onTouchTap: this.handleTouchTap - }), - _react2.default.createElement( - 'div', - { style: (0, _simpleAssign2.default)(styles.button, buttonStyle) }, - iconElement, - label - ) - ); - } - }]); - return Tab; -}(_react.Component); - -Tab.muiName = 'Tab'; -Tab.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; -process.env.NODE_ENV !== "production" ? Tab.propTypes = { - /** - * Override the inline-styles of the button element. - */ - buttonStyle: _react.PropTypes.object, - /** - * The css class name of the root element. - */ - className: _react.PropTypes.string, - /** - * Sets the icon of the tab, you can pass `FontIcon` or `SvgIcon` elements. - */ - icon: _react.PropTypes.node, - /** - * @ignore - */ - index: _react.PropTypes.any, - /** - * Sets the text value of the tab item to the string specified. - */ - label: _react.PropTypes.node, - /** - * Fired when the active tab changes by touch or tap. - * Use this event to specify any functionality when an active tab changes. - * For example - we are using this to route to home when the third tab becomes active. - * This function will always recieve the active tab as it\'s first argument. - */ - onActive: _react.PropTypes.func, - /** - * @ignore - * This property is overriden by the Tabs component. - */ - onTouchTap: _react.PropTypes.func, - /** - * @ignore - * Defines if the current tab is selected or not. - * The Tabs component is responsible for setting this property. - */ - selected: _react.PropTypes.bool, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - /** - * If value prop passed to Tabs component, this value prop is also required. - * It assigns a value to the tab so that it can be selected by the Tabs. - */ - value: _react.PropTypes.any, - /** - * @ignore - * This property is overriden by the Tabs component. - */ - width: _react.PropTypes.string -} : void 0; -exports.default = Tab; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 379 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(380); -module.exports = __webpack_require__(17).Object.assign; - - -/***/ }), -/* 380 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.3.1 Object.assign(target, source) -var $export = __webpack_require__(27); - -$export($export.S + $export.F, 'Object', { assign: __webpack_require__(381) }); - - -/***/ }), -/* 381 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -// 19.1.2.1 Object.assign(target, source, ...) -var getKeys = __webpack_require__(64); -var gOPS = __webpack_require__(140); -var pIE = __webpack_require__(96); -var toObject = __webpack_require__(75); -var IObject = __webpack_require__(197); -var $assign = Object.assign; +/** + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. + * + * @public + */ +var ReactDOMFactories = { + a: createDOMFactory('a'), + abbr: createDOMFactory('abbr'), + address: createDOMFactory('address'), + area: createDOMFactory('area'), + article: createDOMFactory('article'), + aside: createDOMFactory('aside'), + audio: createDOMFactory('audio'), + b: createDOMFactory('b'), + base: createDOMFactory('base'), + bdi: createDOMFactory('bdi'), + bdo: createDOMFactory('bdo'), + big: createDOMFactory('big'), + blockquote: createDOMFactory('blockquote'), + body: createDOMFactory('body'), + br: createDOMFactory('br'), + button: createDOMFactory('button'), + canvas: createDOMFactory('canvas'), + caption: createDOMFactory('caption'), + cite: createDOMFactory('cite'), + code: createDOMFactory('code'), + col: createDOMFactory('col'), + colgroup: createDOMFactory('colgroup'), + data: createDOMFactory('data'), + datalist: createDOMFactory('datalist'), + dd: createDOMFactory('dd'), + del: createDOMFactory('del'), + details: createDOMFactory('details'), + dfn: createDOMFactory('dfn'), + dialog: createDOMFactory('dialog'), + div: createDOMFactory('div'), + dl: createDOMFactory('dl'), + dt: createDOMFactory('dt'), + em: createDOMFactory('em'), + embed: createDOMFactory('embed'), + fieldset: createDOMFactory('fieldset'), + figcaption: createDOMFactory('figcaption'), + figure: createDOMFactory('figure'), + footer: createDOMFactory('footer'), + form: createDOMFactory('form'), + h1: createDOMFactory('h1'), + h2: createDOMFactory('h2'), + h3: createDOMFactory('h3'), + h4: createDOMFactory('h4'), + h5: createDOMFactory('h5'), + h6: createDOMFactory('h6'), + head: createDOMFactory('head'), + header: createDOMFactory('header'), + hgroup: createDOMFactory('hgroup'), + hr: createDOMFactory('hr'), + html: createDOMFactory('html'), + i: createDOMFactory('i'), + iframe: createDOMFactory('iframe'), + img: createDOMFactory('img'), + input: createDOMFactory('input'), + ins: createDOMFactory('ins'), + kbd: createDOMFactory('kbd'), + keygen: createDOMFactory('keygen'), + label: createDOMFactory('label'), + legend: createDOMFactory('legend'), + li: createDOMFactory('li'), + link: createDOMFactory('link'), + main: createDOMFactory('main'), + map: createDOMFactory('map'), + mark: createDOMFactory('mark'), + menu: createDOMFactory('menu'), + menuitem: createDOMFactory('menuitem'), + meta: createDOMFactory('meta'), + meter: createDOMFactory('meter'), + nav: createDOMFactory('nav'), + noscript: createDOMFactory('noscript'), + object: createDOMFactory('object'), + ol: createDOMFactory('ol'), + optgroup: createDOMFactory('optgroup'), + option: createDOMFactory('option'), + output: createDOMFactory('output'), + p: createDOMFactory('p'), + param: createDOMFactory('param'), + picture: createDOMFactory('picture'), + pre: createDOMFactory('pre'), + progress: createDOMFactory('progress'), + q: createDOMFactory('q'), + rp: createDOMFactory('rp'), + rt: createDOMFactory('rt'), + ruby: createDOMFactory('ruby'), + s: createDOMFactory('s'), + samp: createDOMFactory('samp'), + script: createDOMFactory('script'), + section: createDOMFactory('section'), + select: createDOMFactory('select'), + small: createDOMFactory('small'), + source: createDOMFactory('source'), + span: createDOMFactory('span'), + strong: createDOMFactory('strong'), + style: createDOMFactory('style'), + sub: createDOMFactory('sub'), + summary: createDOMFactory('summary'), + sup: createDOMFactory('sup'), + table: createDOMFactory('table'), + tbody: createDOMFactory('tbody'), + td: createDOMFactory('td'), + textarea: createDOMFactory('textarea'), + tfoot: createDOMFactory('tfoot'), + th: createDOMFactory('th'), + thead: createDOMFactory('thead'), + time: createDOMFactory('time'), + title: createDOMFactory('title'), + tr: createDOMFactory('tr'), + track: createDOMFactory('track'), + u: createDOMFactory('u'), + ul: createDOMFactory('ul'), + 'var': createDOMFactory('var'), + video: createDOMFactory('video'), + wbr: createDOMFactory('wbr'), -// should work with symbols and should have deterministic property order (V8 bug) -module.exports = !$assign || __webpack_require__(62)(function () { - var A = {}; - var B = {}; - // eslint-disable-next-line no-undef - var S = Symbol(); - var K = 'abcdefghijklmnopqrst'; - A[S] = 7; - K.split('').forEach(function (k) { B[k] = k; }); - return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; -}) ? function assign(target, source) { // eslint-disable-line no-unused-vars - var T = toObject(target); - var aLen = arguments.length; - var index = 1; - var getSymbols = gOPS.f; - var isEnum = pIE.f; - while (aLen > index) { - var S = IObject(arguments[index++]); - var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; - } return T; -} : $assign; + // SVG + circle: createDOMFactory('circle'), + clipPath: createDOMFactory('clipPath'), + defs: createDOMFactory('defs'), + ellipse: createDOMFactory('ellipse'), + g: createDOMFactory('g'), + image: createDOMFactory('image'), + line: createDOMFactory('line'), + linearGradient: createDOMFactory('linearGradient'), + mask: createDOMFactory('mask'), + path: createDOMFactory('path'), + pattern: createDOMFactory('pattern'), + polygon: createDOMFactory('polygon'), + polyline: createDOMFactory('polyline'), + radialGradient: createDOMFactory('radialGradient'), + rect: createDOMFactory('rect'), + stop: createDOMFactory('stop'), + svg: createDOMFactory('svg'), + text: createDOMFactory('text'), + tspan: createDOMFactory('tspan') +}; +module.exports = ReactDOMFactories; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 382 */ +/* 373 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2015-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. + * */ -var React = __webpack_require__(1); +var _prodInvariant = __webpack_require__(56); -var REACT_ELEMENT_TYPE = - (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || - 0xeac7; +var ReactPropTypeLocationNames = __webpack_require__(374); +var ReactPropTypesSecret = __webpack_require__(375); -var emptyFunction = __webpack_require__(23); var invariant = __webpack_require__(10); var warning = __webpack_require__(11); -var SEPARATOR = '.'; -var SUBSEPARATOR = ':'; - -var didWarnAboutMaps = false; - -var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; -var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. - -function getIteratorFn(maybeIterable) { - var iteratorFn = - maybeIterable && - ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) || - maybeIterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; - } -} - -function escape(key) { - var escapeRegex = /[=:]/g; - var escaperLookup = { - '=': '=0', - ':': '=2' - }; - var escapedString = ('' + key).replace(escapeRegex, function(match) { - return escaperLookup[match]; - }); - - return '$' + escapedString; -} +var ReactComponentTreeHook; -function getComponentKey(component, index) { - // Do some typechecking here since we call this blindly. We want to ensure - // that we don't block potential future ES APIs. - if (component && typeof component === 'object' && component.key != null) { - // Explicit key - return escape(component.key); - } - // Implicit key determined by the index in the set - return index.toString(36); +if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); } -function traverseAllChildrenImpl( - children, - nameSoFar, - callback, - traverseContext -) { - var type = typeof children; - - if (type === 'undefined' || type === 'boolean') { - // All of the above are perceived as null. - children = null; - } +var loggedTypeFailures = {}; - if ( - children === null || - type === 'string' || - type === 'number' || - // The following is inlined from ReactElement. This means we can optimize - // some checks. React Fiber also inlines this logic for similar purposes. - (type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) - ) { - callback( - traverseContext, - children, - // If it's the only child, treat the name as if it was wrapped in an array - // so that it's consistent if the number of children grows. - nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar - ); - return 1; - } +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?object} element The React element that is being type-checked + * @param {?number} debugID The React component instance that is being type-checked + * @private + */ +function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0; + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0; + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; - var child; - var nextName; - var subtreeCount = 0; // Count of children found in the current subtree. - var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + var componentStackInfo = ''; - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - child = children[i]; - nextName = nextNamePrefix + getComponentKey(child, i); - subtreeCount += traverseAllChildrenImpl( - child, - nextName, - callback, - traverseContext - ); - } - } else { - var iteratorFn = getIteratorFn(children); - if (iteratorFn) { - if (process.env.NODE_ENV !== 'production') { - // Warn about using Maps as children - if (iteratorFn === children.entries) { - warning( - didWarnAboutMaps, - 'Using Maps as children is unsupported and will likely yield ' + - 'unexpected results. Convert it to a sequence/iterable of keyed ' + - 'ReactElements instead.' - ); - didWarnAboutMaps = true; + if (process.env.NODE_ENV !== 'production') { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (debugID !== null) { + componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); + } else if (element !== null) { + componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); + } } - } - var iterator = iteratorFn.call(children); - var step; - var ii = 0; - while (!(step = iterator.next()).done) { - child = step.value; - nextName = nextNamePrefix + getComponentKey(child, ii++); - subtreeCount += traverseAllChildrenImpl( - child, - nextName, - callback, - traverseContext - ); + process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; } - } else if (type === 'object') { - var addendum = ''; - if (process.env.NODE_ENV !== 'production') { - addendum = - ' If you meant to render a collection of children, use an array ' + - 'instead or wrap the object using createFragment(object) from the ' + - 'React add-ons.'; - } - var childrenString = '' + children; - invariant( - false, - 'Objects are not valid as a React child (found: %s).%s', - childrenString === '[object Object]' - ? 'object with keys {' + Object.keys(children).join(', ') + '}' - : childrenString, - addendum - ); } } - - return subtreeCount; } -function traverseAllChildren(children, callback, traverseContext) { - if (children == null) { - return 0; - } - - return traverseAllChildrenImpl(children, '', callback, traverseContext); -} +module.exports = checkReactTypeSpec; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -var userProvidedKeyEscapeRegex = /\/+/g; -function escapeUserProvidedKey(text) { - return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); -} +/***/ }), +/* 374 */ +/***/ (function(module, exports, __webpack_require__) { -function cloneAndReplaceKey(oldElement, newKey) { - return React.cloneElement( - oldElement, - {key: newKey}, - oldElement.props !== undefined ? oldElement.props.children : undefined - ); -} +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ -var DEFAULT_POOL_SIZE = 10; -var DEFAULT_POOLER = oneArgumentPooler; -var oneArgumentPooler = function(copyFieldsFrom) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, copyFieldsFrom); - return instance; - } else { - return new Klass(copyFieldsFrom); - } -}; -var addPoolingTo = function addPoolingTo(CopyConstructor, pooler) { - // Casting as any so that flow ignores the actual implementation and trusts - // it to match the type we declared - var NewKlass = CopyConstructor; - NewKlass.instancePool = []; - NewKlass.getPooled = pooler || DEFAULT_POOLER; - if (!NewKlass.poolSize) { - NewKlass.poolSize = DEFAULT_POOL_SIZE; - } - NewKlass.release = standardReleaser; - return NewKlass; -}; +var ReactPropTypeLocationNames = {}; -var standardReleaser = function standardReleaser(instance) { - var Klass = this; - invariant( - instance instanceof Klass, - 'Trying to release an instance into a pool of a different type.' - ); - instance.destructor(); - if (Klass.instancePool.length < Klass.poolSize) { - Klass.instancePool.push(instance); - } -}; +if (process.env.NODE_ENV !== 'production') { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; +} -var fourArgumentPooler = function fourArgumentPooler(a1, a2, a3, a4) { - var Klass = this; - if (Klass.instancePool.length) { - var instance = Klass.instancePool.pop(); - Klass.call(instance, a1, a2, a3, a4); - return instance; - } else { - return new Klass(a1, a2, a3, a4); - } -}; +module.exports = ReactPropTypeLocationNames; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { - this.result = mapResult; - this.keyPrefix = keyPrefix; - this.func = mapFunction; - this.context = mapContext; - this.count = 0; -} -MapBookKeeping.prototype.destructor = function() { - this.result = null; - this.keyPrefix = null; - this.func = null; - this.context = null; - this.count = 0; -}; -addPoolingTo(MapBookKeeping, fourArgumentPooler); +/***/ }), +/* 375 */ +/***/ (function(module, exports, __webpack_require__) { -function mapSingleChildIntoContext(bookKeeping, child, childKey) { - var result = bookKeeping.result; - var keyPrefix = bookKeeping.keyPrefix; - var func = bookKeeping.func; - var context = bookKeeping.context; +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ - var mappedChild = func.call(context, child, bookKeeping.count++); - if (Array.isArray(mappedChild)) { - mapIntoWithKeyPrefixInternal( - mappedChild, - result, - childKey, - emptyFunction.thatReturnsArgument - ); - } else if (mappedChild != null) { - if (React.isValidElement(mappedChild)) { - mappedChild = cloneAndReplaceKey( - mappedChild, - // Keep both the (mapped) and old keys if they differ, just as - // traverseAllChildren used to do for objects as children - keyPrefix + - (mappedChild.key && (!child || child.key !== mappedChild.key) - ? escapeUserProvidedKey(mappedChild.key) + '/' - : '') + - childKey - ); - } - result.push(mappedChild); - } -} -function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { - var escapedPrefix = ''; - if (prefix != null) { - escapedPrefix = escapeUserProvidedKey(prefix) + '/'; - } - var traverseContext = MapBookKeeping.getPooled( - array, - escapedPrefix, - func, - context - ); - traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); - MapBookKeeping.release(traverseContext); -} -var numericPropertyRegex = /^\d+$/; +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; -var warnedAboutNumeric = false; +module.exports = ReactPropTypesSecret; -function createReactFragment(object) { - if (typeof object !== 'object' || !object || Array.isArray(object)) { - warning( - false, - 'React.addons.createFragment only accepts a single object. Got: %s', - object - ); - return object; - } - if (React.isValidElement(object)) { - warning( - false, - 'React.addons.createFragment does not accept a ReactElement ' + - 'without a wrapper object.' - ); - return object; - } +/***/ }), +/* 376 */ +/***/ (function(module, exports, __webpack_require__) { - invariant( - object.nodeType !== 1, - 'React.addons.createFragment(...): Encountered an invalid child; DOM ' + - 'elements are not valid children of React components.' - ); +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - var result = []; - for (var key in object) { - if (process.env.NODE_ENV !== 'production') { - if (!warnedAboutNumeric && numericPropertyRegex.test(key)) { - warning( - false, - 'React.addons.createFragment(...): Child objects should have ' + - 'non-numeric keys so ordering is preserved.' - ); - warnedAboutNumeric = true; - } - } - mapIntoWithKeyPrefixInternal( - object[key], - result, - key, - emptyFunction.thatReturnsArgument - ); - } - return result; -} +var _require = __webpack_require__(43), + isValidElement = _require.isValidElement; -module.exports = createReactFragment; +var factory = __webpack_require__(222); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +module.exports = factory(isValidElement); /***/ }), -/* 383 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27751,113 +27822,65 @@ module.exports = createReactFragment; * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. - * */ -/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ - - -var ReactDOMComponentTree = __webpack_require__(16); -var ReactDefaultInjection = __webpack_require__(384); -var ReactMount = __webpack_require__(243); -var ReactReconciler = __webpack_require__(67); -var ReactUpdates = __webpack_require__(32); -var ReactVersion = __webpack_require__(462); - -var findDOMNode = __webpack_require__(463); -var getHostComponentFromComposite = __webpack_require__(244); -var renderSubtreeIntoContainer = __webpack_require__(464); -var warning = __webpack_require__(11); - -ReactDefaultInjection.inject(); - -var ReactDOM = { - findDOMNode: findDOMNode, - render: ReactMount.render, - unmountComponentAtNode: ReactMount.unmountComponentAtNode, - version: ReactVersion, - - /* eslint-disable camelcase */ - unstable_batchedUpdates: ReactUpdates.batchedUpdates, - unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer - /* eslint-enable camelcase */ -}; - -// Inject the runtime into a devtools global hook regardless of browser. -// Allows for debugging when the hook is injected on the page. -if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { - __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ - ComponentTree: { - getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode, - getNodeFromInstance: function (inst) { - // inst is an internal instance (but could be a composite) - if (inst._renderedComponent) { - inst = getHostComponentFromComposite(inst); - } - if (inst) { - return ReactDOMComponentTree.getNodeFromInstance(inst); - } else { - return null; - } - } - }, - Mount: ReactMount, - Reconciler: ReactReconciler - }); -} if (process.env.NODE_ENV !== 'production') { - var ExecutionEnvironment = __webpack_require__(19); - if (ExecutionEnvironment.canUseDOM && window.top === window.self) { - // First check if devtools is not installed - if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { - // If we're in Chrome or Firefox, provide a download link if not installed. - if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) { - // Firefox does not have the issue with devtools loaded over file:// - var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1; - console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools'); - } - } - - var testFunc = function testFn() {}; - process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, "It looks like you're using a minified copy of the development build " + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0; - - // If we're in IE8, check to see if we are in compatibility mode and provide - // information on preventing compatibility mode - var ieCompatibilityMode = document.documentMode && document.documentMode < 8; + var invariant = __webpack_require__(10); + var warning = __webpack_require__(11); + var ReactPropTypesSecret = __webpack_require__(147); + var loggedTypeFailures = {}; +} - process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0; +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ +function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (process.env.NODE_ENV !== 'production') { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; - var expectedFeatures = [ - // shims - Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim]; + var stack = getStack ? getStack() : ''; - for (var i = 0; i < expectedFeatures.length; i++) { - if (!expectedFeatures[i]) { - process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0; - break; + warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + } } } } } -if (process.env.NODE_ENV !== 'production') { - var ReactInstrumentation = __webpack_require__(25); - var ReactDOMUnknownPropertyHook = __webpack_require__(465); - var ReactDOMNullInputValuePropHook = __webpack_require__(466); - var ReactDOMInvalidARIAHook = __webpack_require__(467); - - ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook); - ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook); - ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook); -} +module.exports = checkPropTypes; -module.exports = ReactDOM; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 384 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27873,82 +27896,10 @@ module.exports = ReactDOM; -var ARIADOMPropertyConfig = __webpack_require__(385); -var BeforeInputEventPlugin = __webpack_require__(386); -var ChangeEventPlugin = __webpack_require__(390); -var DefaultEventPluginOrder = __webpack_require__(398); -var EnterLeaveEventPlugin = __webpack_require__(399); -var HTMLDOMPropertyConfig = __webpack_require__(400); -var ReactComponentBrowserEnvironment = __webpack_require__(401); -var ReactDOMComponent = __webpack_require__(407); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactDOMEmptyComponent = __webpack_require__(433); -var ReactDOMTreeTraversal = __webpack_require__(434); -var ReactDOMTextComponent = __webpack_require__(435); -var ReactDefaultBatchingStrategy = __webpack_require__(436); -var ReactEventListener = __webpack_require__(437); -var ReactInjection = __webpack_require__(439); -var ReactReconcileTransaction = __webpack_require__(440); -var SVGDOMPropertyConfig = __webpack_require__(446); -var SelectEventPlugin = __webpack_require__(447); -var SimpleEventPlugin = __webpack_require__(448); - -var alreadyInjected = false; - -function inject() { - if (alreadyInjected) { - // TODO: This is currently true because these injections are shared between - // the client and the server package. They should be built independently - // and not share any injection state. Then this problem will be solved. - return; - } - alreadyInjected = true; - - ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); - - /** - * Inject modules for resolving DOM hierarchy and plugin ordering. - */ - ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); - ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree); - ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal); - - /** - * Some important event plugins included by default (without having to require - * them). - */ - ReactInjection.EventPluginHub.injectEventPluginsByName({ - SimpleEventPlugin: SimpleEventPlugin, - EnterLeaveEventPlugin: EnterLeaveEventPlugin, - ChangeEventPlugin: ChangeEventPlugin, - SelectEventPlugin: SelectEventPlugin, - BeforeInputEventPlugin: BeforeInputEventPlugin - }); - - ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent); - - ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent); - - ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig); - ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); - ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); - - ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) { - return new ReactDOMEmptyComponent(instantiate); - }); - - ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); - ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); - - ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); -} - -module.exports = { - inject: inject -}; +module.exports = '15.6.1'; /***/ }), -/* 385 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27964,75 +27915,24 @@ module.exports = { -var ARIADOMPropertyConfig = { - Properties: { - // Global States and Properties - 'aria-current': 0, // state - 'aria-details': 0, - 'aria-disabled': 0, // state - 'aria-hidden': 0, // state - 'aria-invalid': 0, // state - 'aria-keyshortcuts': 0, - 'aria-label': 0, - 'aria-roledescription': 0, - // Widget Attributes - 'aria-autocomplete': 0, - 'aria-checked': 0, - 'aria-expanded': 0, - 'aria-haspopup': 0, - 'aria-level': 0, - 'aria-modal': 0, - 'aria-multiline': 0, - 'aria-multiselectable': 0, - 'aria-orientation': 0, - 'aria-placeholder': 0, - 'aria-pressed': 0, - 'aria-readonly': 0, - 'aria-required': 0, - 'aria-selected': 0, - 'aria-sort': 0, - 'aria-valuemax': 0, - 'aria-valuemin': 0, - 'aria-valuenow': 0, - 'aria-valuetext': 0, - // Live Region Attributes - 'aria-atomic': 0, - 'aria-busy': 0, - 'aria-live': 0, - 'aria-relevant': 0, - // Drag-and-Drop Attributes - 'aria-dropeffect': 0, - 'aria-grabbed': 0, - // Relationship Attributes - 'aria-activedescendant': 0, - 'aria-colcount': 0, - 'aria-colindex': 0, - 'aria-colspan': 0, - 'aria-controls': 0, - 'aria-describedby': 0, - 'aria-errormessage': 0, - 'aria-flowto': 0, - 'aria-labelledby': 0, - 'aria-owns': 0, - 'aria-posinset': 0, - 'aria-rowcount': 0, - 'aria-rowindex': 0, - 'aria-rowspan': 0, - 'aria-setsize': 0 - }, - DOMAttributeNames: {}, - DOMPropertyNames: {} -}; +var _require = __webpack_require__(214), + Component = _require.Component; -module.exports = ARIADOMPropertyConfig; +var _require2 = __webpack_require__(43), + isValidElement = _require2.isValidElement; + +var ReactNoopUpdateQueue = __webpack_require__(215); +var factory = __webpack_require__(380); + +module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue); /***/ }), -/* 386 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** - * Copyright 2013-present Facebook, Inc. +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -28043,525 +27943,875 @@ module.exports = ARIADOMPropertyConfig; -var EventPropagators = __webpack_require__(77); -var ExecutionEnvironment = __webpack_require__(19); -var FallbackCompositionState = __webpack_require__(387); -var SyntheticCompositionEvent = __webpack_require__(388); -var SyntheticInputEvent = __webpack_require__(389); +var _assign = __webpack_require__(14); -var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space -var START_KEYCODE = 229; - -var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; +var emptyObject = __webpack_require__(98); +var _invariant = __webpack_require__(10); -var documentMode = null; -if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { - documentMode = document.documentMode; +if (process.env.NODE_ENV !== 'production') { + var warning = __webpack_require__(11); } -// Webkit offers a very useful `textInput` event that can be used to -// directly represent `beforeInput`. The IE `textinput` event is not as -// useful, so we don't use it. -var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); - -// In IE9+, we have access to composition events, but the data supplied -// by the native compositionend event may be incorrect. Japanese ideographic -// spaces, for instance (\u3000) are not recorded correctly. -var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); +var MIXINS_KEY = 'mixins'; -/** - * Opera <= 12 includes TextEvent in window, but does not fire - * text input events. Rely on keypress instead. - */ -function isPresto() { - var opera = window.opera; - return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12; +// Helper function to allow the creation of anonymous functions which do not +// have .name set to the name of the variable being assigned to. +function identity(fn) { + return fn; } -var SPACEBAR_CODE = 32; -var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); +var ReactPropTypeLocationNames; +if (process.env.NODE_ENV !== 'production') { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; +} else { + ReactPropTypeLocationNames = {}; +} -// Events and their corresponding property names. -var eventTypes = { - beforeInput: { - phasedRegistrationNames: { - bubbled: 'onBeforeInput', - captured: 'onBeforeInputCapture' - }, - dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste'] - }, - compositionEnd: { - phasedRegistrationNames: { - bubbled: 'onCompositionEnd', - captured: 'onCompositionEndCapture' - }, - dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] - }, - compositionStart: { - phasedRegistrationNames: { - bubbled: 'onCompositionStart', - captured: 'onCompositionStartCapture' - }, - dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] - }, - compositionUpdate: { - phasedRegistrationNames: { - bubbled: 'onCompositionUpdate', - captured: 'onCompositionUpdateCapture' - }, - dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] - } -}; +function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { + /** + * Policies that describe methods in `ReactClassInterface`. + */ -// Track whether we've ever handled a keypress on the space key. -var hasSpaceKeypress = false; + var injectedMixins = []; -/** - * Return whether a native keypress event is assumed to be a command. - * This is required because Firefox fires `keypress` events for key commands - * (cut, copy, select-all, etc.) even though no character is inserted. - */ -function isKeypressCommand(nativeEvent) { - return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && - // ctrlKey && altKey is equivalent to AltGr, and is not a command. - !(nativeEvent.ctrlKey && nativeEvent.altKey); -} + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', -/** - * Translate native top level events into event types. - * - * @param {string} topLevelType - * @return {object} - */ -function getCompositionEventType(topLevelType) { - switch (topLevelType) { - case 'topCompositionStart': - return eventTypes.compositionStart; - case 'topCompositionEnd': - return eventTypes.compositionEnd; - case 'topCompositionUpdate': - return eventTypes.compositionUpdate; - } -} + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', -/** - * Does our fallback best-guess model think this event signifies that - * composition has begun? - * - * @param {string} topLevelType - * @param {object} nativeEvent - * @return {boolean} - */ -function isFallbackCompositionStart(topLevelType, nativeEvent) { - return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; -} + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', -/** - * Does our fallback mode think that this event is the end of composition? - * - * @param {string} topLevelType - * @param {object} nativeEvent - * @return {boolean} - */ -function isFallbackCompositionEnd(topLevelType, nativeEvent) { - switch (topLevelType) { - case 'topKeyUp': - // Command keys insert or clear IME input. - return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; - case 'topKeyDown': - // Expect IME keyCode on each keydown. If we get any other - // code we must have exited earlier. - return nativeEvent.keyCode !== START_KEYCODE; - case 'topKeyPress': - case 'topMouseDown': - case 'topBlur': - // Events are not possible without cancelling IME. - return true; - default: - return false; - } -} + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', -/** - * Google Input Tools provides composition data via a CustomEvent, - * with the `data` property populated in the `detail` object. If this - * is available on the event object, use it. If not, this is a plain - * composition event and we have nothing special to extract. - * - * @param {object} nativeEvent - * @return {?string} - */ -function getDataFromCustomEvent(nativeEvent) { - var detail = nativeEvent.detail; - if (typeof detail === 'object' && 'data' in detail) { - return detail.data; - } - return null; -} + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', -// Track the current IME composition fallback object, if any. -var currentComposition = null; + // ==== Definition methods ==== -/** - * @return {?object} A SyntheticCompositionEvent. - */ -function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { - var eventType; - var fallbackData; + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', - if (canUseCompositionEvent) { - eventType = getCompositionEventType(topLevelType); - } else if (!currentComposition) { - if (isFallbackCompositionStart(topLevelType, nativeEvent)) { - eventType = eventTypes.compositionStart; - } - } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { - eventType = eventTypes.compositionEnd; - } + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', - if (!eventType) { - return null; - } + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', - if (useFallbackCompositionData) { - // The current composition is stored statically and must not be - // overwritten while composition continues. - if (!currentComposition && eventType === eventTypes.compositionStart) { - currentComposition = FallbackCompositionState.getPooled(nativeEventTarget); - } else if (eventType === eventTypes.compositionEnd) { - if (currentComposition) { - fallbackData = currentComposition.getData(); - } - } - } + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', - var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget); + // ==== Delegate methods ==== - if (fallbackData) { - // Inject data generated from fallback path into the synthetic event. - // This matches the property of native CompositionEventInterface. - event.data = fallbackData; - } else { - var customData = getDataFromCustomEvent(nativeEvent); - if (customData !== null) { - event.data = customData; - } - } + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', - EventPropagators.accumulateTwoPhaseDispatches(event); - return event; -} + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', -/** - * @param {string} topLevelType Record from `EventConstants`. - * @param {object} nativeEvent Native browser event. - * @return {?string} The string corresponding to this `beforeInput` event. - */ -function getNativeBeforeInputChars(topLevelType, nativeEvent) { - switch (topLevelType) { - case 'topCompositionEnd': - return getDataFromCustomEvent(nativeEvent); - case 'topKeyPress': - /** - * If native `textInput` events are available, our goal is to make - * use of them. However, there is a special case: the spacebar key. - * In Webkit, preventing default on a spacebar `textInput` event - * cancels character insertion, but it *also* causes the browser - * to fall back to its default spacebar behavior of scrolling the - * page. - * - * Tracking at: - * https://code.google.com/p/chromium/issues/detail?id=355103 - * - * To avoid this issue, use the keypress event as if no `textInput` - * event is available. - */ - var which = nativeEvent.which; - if (which !== SPACEBAR_CODE) { - return null; - } + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', - hasSpaceKeypress = true; - return SPACEBAR_CHAR; + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', - case 'topTextInput': - // Record the characters to be added to the DOM. - var chars = nativeEvent.data; + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', - // If it's a spacebar character, assume that we have already handled - // it at the keypress level and bail immediately. Android Chrome - // doesn't give us keycodes, so we need to blacklist it. - if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { - return null; - } + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', - return chars; + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', - default: - // For other native event types, do nothing. - return null; - } -} + // ==== Advanced methods ==== -/** - * For browsers that do not provide the `textInput` event, extract the - * appropriate string to use for SyntheticInputEvent. - * - * @param {string} topLevelType Record from `EventConstants`. - * @param {object} nativeEvent Native browser event. - * @return {?string} The fallback string for this `beforeInput` event. - */ -function getFallbackBeforeInputChars(topLevelType, nativeEvent) { - // If we are currently composing (IME) and using a fallback to do so, - // try to extract the composed characters from the fallback object. - // If composition event is available, we extract a string only at - // compositionevent, otherwise extract it at fallback events. - if (currentComposition) { - if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { - var chars = currentComposition.getData(); - FallbackCompositionState.release(currentComposition); - currentComposition = null; - return chars; - } - return null; - } + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE' + }; - switch (topLevelType) { - case 'topPaste': - // If a paste event occurs after a keypress, throw out the input - // chars. Paste events should not lead to BeforeInput events. - return null; - case 'topKeyPress': - /** - * As of v27, Firefox may fire keypress events even when no character - * will be inserted. A few possibilities: - * - * - `which` is `0`. Arrow keys, Esc key, etc. - * - * - `which` is the pressed key code, but no char is available. - * Ex: 'AltGr + d` in Polish. There is no modified character for - * this key combination and no character is inserted into the - * document, but FF fires the keypress for char code `100` anyway. - * No `input` event will occur. - * - * - `which` is the pressed key code, but a command combination is - * being used. Ex: `Cmd+C`. No character is inserted, and no - * `input` event will occur. - */ - if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { - return String.fromCharCode(nativeEvent.which); + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function(Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } } - return null; - case 'topCompositionEnd': - return useFallbackCompositionData ? null : nativeEvent.data; - default: - return null; + }, + childContextTypes: function(Constructor, childContextTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign( + {}, + Constructor.childContextTypes, + childContextTypes + ); + }, + contextTypes: function(Constructor, contextTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign( + {}, + Constructor.contextTypes, + contextTypes + ); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function(Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function(Constructor, propTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function() {} + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + if (process.env.NODE_ENV !== 'production') { + warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName + ); + } + } + } } -} -/** - * Extract a SyntheticInputEvent for `beforeInput`, based on either native - * `textInput` or fallback behavior. - * - * @return {?object} A SyntheticInputEvent. - */ -function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { - var chars; + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) + ? ReactClassInterface[name] + : null; - if (canUseTextInputEvent) { - chars = getNativeBeforeInputChars(topLevelType, nativeEvent); - } else { - chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); - } + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name + ); + } - // If no characters are being inserted, no BeforeInput event should - // be fired. - if (!chars) { - return null; + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name + ); + } } - var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget); + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (process.env.NODE_ENV !== 'production') { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; - event.data = chars; - EventPropagators.accumulateTwoPhaseDispatches(event); - return event; -} + if (process.env.NODE_ENV !== 'production') { + warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec + ); + } + } -/** - * Create an `onBeforeInput` event to match - * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. - * - * This event plugin is based on the native `textInput` event - * available in Chrome, Safari, Opera, and IE. This event fires after - * `onKeyPress` and `onCompositionEnd`, but before `onInput`. - * - * `beforeInput` is spec'd but not implemented in any browsers, and - * the `input` event does not provide any useful information about what has - * actually been added, contrary to the spec. Thus, `textInput` is the best - * available event to identify the characters that have actually been inserted - * into the target node. - * - * This plugin is also responsible for emitting `composition` events, thus - * allowing us to share composition fallback code for both `beforeInput` and - * `composition` event types. - */ -var BeforeInputEventPlugin = { - eventTypes: eventTypes, + return; + } - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)]; - } -}; + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.' + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.' + ); -module.exports = BeforeInputEventPlugin; + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; -/***/ }), -/* 387 */ -/***/ (function(module, exports, __webpack_require__) { + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); -var _assign = __webpack_require__(15); + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && + !isReactClassMethod && + !isAlreadyDefined && + spec.autobind !== false; -var PooledClass = __webpack_require__(53); + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; -var getTextContentAccessor = __webpack_require__(223); + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || + specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + + 'when mixing in component specs.', + specPolicy, + name + ); -/** - * This helper class stores information about text content of a target node, - * allowing comparison of content before and after a given event. - * - * Identify the node where selection currently begins, then observe - * both its text content and its current position in the DOM. Since the - * browser may natively replace the target node during composition, we can - * use its position to find its replacement. - * - * @param {DOMEventTarget} root - */ -function FallbackCompositionState(root) { - this._root = root; - this._startText = this.getText(); - this._fallbackText = null; -} + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (process.env.NODE_ENV !== 'production') { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } -_assign(FallbackCompositionState.prototype, { - destructor: function () { - this._root = null; - this._startText = null; - this._fallbackText = null; - }, + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name + ); + + var isInherited = name in Constructor; + _invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name + ); + Constructor[name] = property; + } + } /** - * Get current text of input. + * Merge two objects, but throw if both contain the same key. * - * @return {string} + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. */ - getText: function () { - if ('value' in this._root) { - return this._root.value; + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key + ); + one[key] = two[key]; + } } - return this._root[getTextContentAccessor()]; - }, + return one; + } /** - * Determine the differing substring between the initially stored - * text content and the current content. + * Creates a function that invokes two functions and merges their return values. * - * @return {string} + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private */ - getData: function () { - if (this._fallbackText) { - return this._fallbackText; + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (process.env.NODE_ENV !== 'production') { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function(newThis) { + for ( + var _len = arguments.length, + args = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + if (process.env.NODE_ENV !== 'production') { + warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName + ); + } + } else if (!args.length) { + if (process.env.NODE_ENV !== 'production') { + warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName + ); + } + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; } + return boundMethod; + } - var start; - var startValue = this._startText; - var startLength = startValue.length; - var end; - var endValue = this.getText(); - var endLength = endValue.length; + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } - for (start = 0; start < startLength; start++) { - if (startValue[start] !== endValue[start]) { - break; - } + var IsMountedPreMixin = { + componentDidMount: function() { + this.__isMounted = true; } + }; - var minEnd = startLength - start; - for (end = 1; end <= minEnd; end++) { - if (startValue[startLength - end] !== endValue[endLength - end]) { - break; + var IsMountedPostMixin = { + componentWillUnmount: function() { + this.__isMounted = false; + } + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function(newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function() { + if (process.env.NODE_ENV !== 'production') { + warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || + this.name || + 'Component' + ); + this.__didWarnIsMounted = true; } + return !!this.__isMounted; } + }; - var sliceTail = end > 1 ? 1 - end : undefined; - this._fallbackText = endValue.slice(start, sliceTail); - return this._fallbackText; - } -}); + var ReactClassComponent = function() {}; + _assign( + ReactClassComponent.prototype, + ReactComponent.prototype, + ReactClassMixin + ); -PooledClass.addPoolingTo(FallbackCompositionState); + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function(props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. -module.exports = FallbackCompositionState; + if (process.env.NODE_ENV !== 'production') { + warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory' + ); + } -/***/ }), -/* 388 */ -/***/ (function(module, exports, __webpack_require__) { + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + this.state = null; + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. -var SyntheticEvent = __webpack_require__(38); + var initialState = this.getInitialState ? this.getInitialState() : null; + if (process.env.NODE_ENV !== 'production') { + // We allow auto-mocks to proceed as if they're returning null. + if ( + initialState === undefined && + this.getInitialState._isMockFunction + ) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent' + ); -/** - * @interface Event - * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents - */ -var CompositionEventInterface = { - data: null -}; + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; -/** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticUIEvent} - */ -function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedPreMixin); + mixSpecIntoComponent(Constructor, spec); + mixSpecIntoComponent(Constructor, IsMountedPostMixin); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (process.env.NODE_ENV !== 'production') { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.' + ); + + if (process.env.NODE_ENV !== 'production') { + warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component' + ); + warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component' + ); + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; } -SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface); +module.exports = factory; -module.exports = SyntheticCompositionEvent; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 389 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** +/* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -28572,445 +28822,390 @@ module.exports = SyntheticCompositionEvent; */ +var _prodInvariant = __webpack_require__(56); -var SyntheticEvent = __webpack_require__(38); +var ReactElement = __webpack_require__(43); -/** - * @interface Event - * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 - * /#events-inputevents - */ -var InputEventInterface = { - data: null -}; +var invariant = __webpack_require__(10); /** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticUIEvent} + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. */ -function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +function onlyChild(children) { + !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0; + return children; } -SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface); - -module.exports = SyntheticInputEvent; +module.exports = onlyChild; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 390 */ +/* 382 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +/* WEBPACK VAR INJECTION */(function(process) { +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _extends2 = __webpack_require__(8); -var EventPluginHub = __webpack_require__(78); -var EventPropagators = __webpack_require__(77); -var ExecutionEnvironment = __webpack_require__(19); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactUpdates = __webpack_require__(32); -var SyntheticEvent = __webpack_require__(38); +var _extends3 = _interopRequireDefault(_extends2); -var inputValueTracking = __webpack_require__(226); -var getEventTarget = __webpack_require__(147); -var isEventSupported = __webpack_require__(148); -var isTextInputElement = __webpack_require__(227); +var _objectWithoutProperties2 = __webpack_require__(9); -var eventTypes = { - change: { - phasedRegistrationNames: { - bubbled: 'onChange', - captured: 'onChangeCapture' - }, - dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange'] - } -}; +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -function createAndAccumulateChangeEvent(inst, nativeEvent, target) { - var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target); - event.type = 'change'; - EventPropagators.accumulateTwoPhaseDispatches(event); - return event; -} -/** - * For IE shims - */ -var activeElement = null; -var activeElementInst = null; +var _getPrototypeOf = __webpack_require__(4); -/** - * SECTION: handle `change` event - */ -function shouldUseChangeEvent(elem) { - var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); - return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; -} +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -var doesChangeEventBubble = false; -if (ExecutionEnvironment.canUseDOM) { - // See `handleChange` comment below - doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8); -} +var _classCallCheck2 = __webpack_require__(2); -function manualDispatchChangeEvent(nativeEvent) { - var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); - - // If change and propertychange bubbled, we'd just bind to it like all the - // other events and have it go through ReactBrowserEventEmitter. Since it - // doesn't, we manually listen for the events and so we have to enqueue and - // process the abstract event manually. - // - // Batching is necessary here in order to ensure that all event handlers run - // before the next rerender (including event handlers attached to ancestor - // elements instead of directly on the input). Without this, controlled - // components don't work properly in conjunction with event bubbling because - // the component is rerendered and the value reverted before all the event - // handlers can run. See https://github.com/facebook/react/issues/708. - ReactUpdates.batchedUpdates(runEventInBatch, event); -} +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -function runEventInBatch(event) { - EventPluginHub.enqueueEvents(event); - EventPluginHub.processEventQueue(false); -} +var _createClass2 = __webpack_require__(3); -function startWatchingForChangeEventIE8(target, targetInst) { - activeElement = target; - activeElementInst = targetInst; - activeElement.attachEvent('onchange', manualDispatchChangeEvent); -} +var _createClass3 = _interopRequireDefault(_createClass2); -function stopWatchingForChangeEventIE8() { - if (!activeElement) { - return; - } - activeElement.detachEvent('onchange', manualDispatchChangeEvent); - activeElement = null; - activeElementInst = null; -} +var _possibleConstructorReturn2 = __webpack_require__(5); -function getInstIfValueChanged(targetInst, nativeEvent) { - var updated = inputValueTracking.updateValueIfChanged(targetInst); - var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - if (updated || simulated) { - return targetInst; - } -} +var _inherits2 = __webpack_require__(6); -function getTargetInstForChangeEvent(topLevelType, targetInst) { - if (topLevelType === 'topChange') { - return targetInst; - } -} +var _inherits3 = _interopRequireDefault(_inherits2); -function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { - if (topLevelType === 'topFocus') { - // stopWatching() should be a noop here but we call it just in case we - // missed a blur event somehow. - stopWatchingForChangeEventIE8(); - startWatchingForChangeEventIE8(target, targetInst); - } else if (topLevelType === 'topBlur') { - stopWatchingForChangeEventIE8(); - } -} +var _simpleAssign = __webpack_require__(7); -/** - * SECTION: handle `input` event - */ -var isInputEventSupported = false; -if (ExecutionEnvironment.canUseDOM) { - // IE9 claims to support the input event but fails to trigger it when - // deleting text, so we ignore its input events. +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 9); -} +var _react = __webpack_require__(1); -/** - * (For IE <=9) Starts tracking propertychange events on the passed-in element - * and override the value property so that we can distinguish user events from - * value changes in JS. - */ -function startWatchingForValueChange(target, targetInst) { - activeElement = target; - activeElementInst = targetInst; - activeElement.attachEvent('onpropertychange', handlePropertyChange); -} +var _react2 = _interopRequireDefault(_react); -/** - * (For IE <=9) Removes the event listeners from the currently-tracked element, - * if any exists. - */ -function stopWatchingForValueChange() { - if (!activeElement) { - return; - } - activeElement.detachEvent('onpropertychange', handlePropertyChange); +var _EnhancedButton = __webpack_require__(44); - activeElement = null; - activeElementInst = null; -} +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); -/** - * (For IE <=9) Handles a propertychange event, sending a `change` event if - * the value of the active element has changed. - */ -function handlePropertyChange(nativeEvent) { - if (nativeEvent.propertyName !== 'value') { - return; - } - if (getInstIfValueChanged(activeElementInst, nativeEvent)) { - manualDispatchChangeEvent(nativeEvent); - } -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { - if (topLevelType === 'topFocus') { - // In IE8, we can capture almost all .value changes by adding a - // propertychange handler and looking for events with propertyName - // equal to 'value' - // In IE9, propertychange fires for most input events but is buggy and - // doesn't fire when text is deleted, but conveniently, selectionchange - // appears to fire in all of the remaining cases so we catch those and - // forward the event if the value has changed - // In either case, we don't want to call the event handler if the value - // is changed from JS so we redefine a setter for `.value` that updates - // our activeElementValue variable, allowing us to ignore those changes - // - // stopWatching() should be a noop here but we call it just in case we - // missed a blur event somehow. - stopWatchingForValueChange(); - startWatchingForValueChange(target, targetInst); - } else if (topLevelType === 'topBlur') { - stopWatchingForValueChange(); - } -} +function getStyles(props, context) { + var tabs = context.muiTheme.tabs; -// For IE8 and IE9. -function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) { - if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { - // On the selectionchange event, the target is just document which isn't - // helpful for us so just check activeElement instead. - // - // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire - // propertychange on the first input event after setting `value` from a - // script and fires only keydown, keypress, keyup. Catching keyup usually - // gets it and catching keydown lets us fire an event for the first - // keystroke if user does a key repeat (it'll be a little delayed: right - // before the second keystroke). Other input methods (e.g., paste) seem to - // fire selectionchange normally. - return getInstIfValueChanged(activeElementInst, nativeEvent); - } -} -/** - * SECTION: handle `click` event - */ -function shouldUseClickEvent(elem) { - // Use the `click` event to detect changes to checkbox and radio inputs. - // This approach works across all browsers, whereas `change` does not fire - // until `blur` in IE8. - var nodeName = elem.nodeName; - return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); + return { + root: { + color: props.selected ? tabs.selectedTextColor : tabs.textColor, + fontWeight: 500, + fontSize: 14, + width: props.width, + textTransform: 'uppercase', + padding: 0 + }, + button: { + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + justifyContent: 'center', + height: props.label && props.icon ? 72 : 48 + } + }; } -function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) { - if (topLevelType === 'topClick') { - return getInstIfValueChanged(targetInst, nativeEvent); - } -} +var Tab = function (_Component) { + (0, _inherits3.default)(Tab, _Component); -function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) { - if (topLevelType === 'topInput' || topLevelType === 'topChange') { - return getInstIfValueChanged(targetInst, nativeEvent); - } -} + function Tab() { + var _ref; -function handleControlledInputBlur(inst, node) { - // TODO: In IE, inst is occasionally null. Why? - if (inst == null) { - return; - } + var _temp, _this, _ret; - // Fiber and ReactDOM keep wrapper state in separate places - var state = inst._wrapperState || node._wrapperState; + (0, _classCallCheck3.default)(this, Tab); - if (!state || !state.controlled || node.type !== 'number') { - return; - } + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - // If controlled, assign the value attribute to the current value on blur - var value = '' + node.value; - if (node.getAttribute('value') !== value) { - node.setAttribute('value', value); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tab.__proto__ || (0, _getPrototypeOf2.default)(Tab)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(_this.props.value, event, _this); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } -} -/** - * This plugin creates an `onChange` event that normalizes change events - * across form elements. This event fires at a time when it's possible to - * change the element's value without seeing a flicker. - * - * Supported elements are: - * - input (see `isTextInputElement`) - * - textarea - * - select - */ -var ChangeEventPlugin = { - eventTypes: eventTypes, + (0, _createClass3.default)(Tab, [{ + key: 'render', + value: function render() { + var _props = this.props, + icon = _props.icon, + index = _props.index, + onActive = _props.onActive, + onTouchTap = _props.onTouchTap, + selected = _props.selected, + label = _props.label, + buttonStyle = _props.buttonStyle, + style = _props.style, + value = _props.value, + width = _props.width, + other = (0, _objectWithoutProperties3.default)(_props, ['icon', 'index', 'onActive', 'onTouchTap', 'selected', 'label', 'buttonStyle', 'style', 'value', 'width']); - _allowSimulatedPassThrough: true, - _isInputEventSupported: isInputEventSupported, - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + var styles = getStyles(this.props, this.context); - var getTargetInstFunc, handleEventFunc; - if (shouldUseChangeEvent(targetNode)) { - if (doesChangeEventBubble) { - getTargetInstFunc = getTargetInstForChangeEvent; - } else { - handleEventFunc = handleEventsForChangeEventIE8; - } - } else if (isTextInputElement(targetNode)) { - if (isInputEventSupported) { - getTargetInstFunc = getTargetInstForInputOrChangeEvent; - } else { - getTargetInstFunc = getTargetInstForInputEventPolyfill; - handleEventFunc = handleEventsForInputEventPolyfill; + var iconElement = void 0; + if (icon && _react2.default.isValidElement(icon)) { + var iconProps = { + style: { + fontSize: 24, + color: styles.root.color, + marginBottom: label ? 5 : 0 + } + }; + // If it's svg icon set color via props + if (icon.type.muiName !== 'FontIcon') { + iconProps.color = styles.root.color; + } + iconElement = _react2.default.cloneElement(icon, iconProps); } - } else if (shouldUseClickEvent(targetNode)) { - getTargetInstFunc = getTargetInstForClickEvent; - } - if (getTargetInstFunc) { - var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent); - if (inst) { - var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget); - return event; - } - } + var rippleOpacity = 0.3; + var rippleColor = this.context.muiTheme.tabs.selectedTextColor; - if (handleEventFunc) { - handleEventFunc(topLevelType, targetNode, targetInst); + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + style: (0, _simpleAssign2.default)(styles.root, style), + focusRippleColor: rippleColor, + touchRippleColor: rippleColor, + focusRippleOpacity: rippleOpacity, + touchRippleOpacity: rippleOpacity, + onTouchTap: this.handleTouchTap + }), + _react2.default.createElement( + 'div', + { style: (0, _simpleAssign2.default)(styles.button, buttonStyle) }, + iconElement, + label + ) + ); } + }]); + return Tab; +}(_react.Component); - // When blurring, set the value attribute for number inputs - if (topLevelType === 'topBlur') { - handleControlledInputBlur(targetInst, targetNode); - } - } +Tab.muiName = 'Tab'; +Tab.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired }; +process.env.NODE_ENV !== "production" ? Tab.propTypes = { + /** + * Override the inline-styles of the button element. + */ + buttonStyle: _react.PropTypes.object, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Sets the icon of the tab, you can pass `FontIcon` or `SvgIcon` elements. + */ + icon: _react.PropTypes.node, + /** + * @ignore + */ + index: _react.PropTypes.any, + /** + * Sets the text value of the tab item to the string specified. + */ + label: _react.PropTypes.node, + /** + * Fired when the active tab changes by touch or tap. + * Use this event to specify any functionality when an active tab changes. + * For example - we are using this to route to home when the third tab becomes active. + * This function will always recieve the active tab as it\'s first argument. + */ + onActive: _react.PropTypes.func, + /** + * @ignore + * This property is overriden by the Tabs component. + */ + onTouchTap: _react.PropTypes.func, + /** + * @ignore + * Defines if the current tab is selected or not. + * The Tabs component is responsible for setting this property. + */ + selected: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * If value prop passed to Tabs component, this value prop is also required. + * It assigns a value to the tab so that it can be selected by the Tabs. + */ + value: _react.PropTypes.any, + /** + * @ignore + * This property is overriden by the Tabs component. + */ + width: _react.PropTypes.string +} : void 0; +exports.default = Tab; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -module.exports = ChangeEventPlugin; +/***/ }), +/* 383 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(384); +module.exports = __webpack_require__(16).Object.assign; /***/ }), -/* 391 */ +/* 384 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(33); + +$export($export.S + $export.F, 'Object', {assign: __webpack_require__(385)}); + +/***/ }), +/* 385 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** - * Copyright 2013-present, Facebook, Inc. + +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(68) + , gOPS = __webpack_require__(142) + , pIE = __webpack_require__(96) + , toObject = __webpack_require__(77) + , IObject = __webpack_require__(203) + , $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(66)(function(){ + var A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function(k){ B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source){ // eslint-disable-line no-unused-vars + var T = toObject(target) + , aLen = arguments.length + , index = 1 + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) + , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; + } return T; +} : $assign; + +/***/ }), +/* 386 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(387).create; + +/***/ }), +/* 387 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * */ -var ReactOwner = __webpack_require__(392); +var _prodInvariant = __webpack_require__(56); -var ReactRef = {}; +var ReactChildren = __webpack_require__(216); +var ReactElement = __webpack_require__(43); -function attachRef(ref, component, owner) { - if (typeof ref === 'function') { - ref(component.getPublicInstance()); - } else { - // Legacy ref - ReactOwner.addComponentAsRefTo(component, ref, owner); - } -} +var emptyFunction = __webpack_require__(21); +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); -function detachRef(ref, component, owner) { - if (typeof ref === 'function') { - ref(null); - } else { - // Legacy ref - ReactOwner.removeComponentAsRefFrom(component, ref, owner); - } -} +/** + * We used to allow keyed objects to serve as a collection of ReactElements, + * or nested sets. This allowed us a way to explicitly key a set or fragment of + * components. This is now being replaced with an opaque data structure. + * The upgrade path is to call React.addons.createFragment({ key: value }) to + * create a keyed fragment. The resulting data structure is an array. + */ -ReactRef.attachRefs = function (instance, element) { - if (element === null || typeof element !== 'object') { - return; - } - var ref = element.ref; - if (ref != null) { - attachRef(ref, instance, element._owner); - } -}; +var numericPropertyRegex = /^\d+$/; -ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { - // If either the owner or a `ref` has changed, make sure the newest owner - // has stored a reference to `this`, and the previous owner (if different) - // has forgotten the reference to `this`. We use the element instead - // of the public this.props because the post processing cannot determine - // a ref. The ref conceptually lives on the element. +var warnedAboutNumeric = false; - // TODO: Should this even be possible? The owner cannot change because - // it's forbidden by shouldUpdateReactComponent. The ref can change - // if you swap the keys of but not the refs. Reconsider where this check - // is made. It probably belongs where the key checking and - // instantiateReactComponent is done. +var ReactFragment = { + /** + * Wrap a keyed object in an opaque proxy that warns you if you access any + * of its properties. + * See https://facebook.github.io/react/docs/create-fragment.html + */ + create: function (object) { + if (typeof object !== 'object' || !object || Array.isArray(object)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment only accepts a single object. Got: %s', object) : void 0; + return object; + } + if (ReactElement.isValidElement(object)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : void 0; + return object; + } - var prevRef = null; - var prevOwner = null; - if (prevElement !== null && typeof prevElement === 'object') { - prevRef = prevElement.ref; - prevOwner = prevElement._owner; - } + !(object.nodeType !== 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.') : _prodInvariant('0') : void 0; - var nextRef = null; - var nextOwner = null; - if (nextElement !== null && typeof nextElement === 'object') { - nextRef = nextElement.ref; - nextOwner = nextElement._owner; - } + var result = []; - return prevRef !== nextRef || - // If owner changes but we have an unchanged function ref, don't update refs - typeof nextRef === 'string' && nextOwner !== prevOwner; -}; + for (var key in object) { + if (process.env.NODE_ENV !== 'production') { + if (!warnedAboutNumeric && numericPropertyRegex.test(key)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment(...): Child objects should have ' + 'non-numeric keys so ordering is preserved.') : void 0; + warnedAboutNumeric = true; + } + } + ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument); + } -ReactRef.detachRefs = function (instance, element) { - if (element === null || typeof element !== 'object') { - return; - } - var ref = element.ref; - if (ref != null) { - detachRef(ref, instance, element._owner); + return result; } }; -module.exports = ReactRef; +module.exports = ReactFragment; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 392 */ +/* 388 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29022,641 +29217,672 @@ module.exports = ReactRef; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * */ +/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ -var _prodInvariant = __webpack_require__(14); -var invariant = __webpack_require__(10); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactDefaultInjection = __webpack_require__(389); +var ReactMount = __webpack_require__(246); +var ReactReconciler = __webpack_require__(69); +var ReactUpdates = __webpack_require__(30); +var ReactVersion = __webpack_require__(467); -/** - * @param {?object} object - * @return {boolean} True if `object` is a valid owner. - * @final - */ -function isValidOwner(object) { - return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); -} +var findDOMNode = __webpack_require__(468); +var getHostComponentFromComposite = __webpack_require__(247); +var renderSubtreeIntoContainer = __webpack_require__(469); +var warning = __webpack_require__(11); -/** - * ReactOwners are capable of storing references to owned components. - * - * All components are capable of //being// referenced by owner components, but - * only ReactOwner components are capable of //referencing// owned components. - * The named reference is known as a "ref". - * - * Refs are available when mounted and updated during reconciliation. - * - * var MyComponent = React.createClass({ - * render: function() { - * return ( - * <div onClick={this.handleClick}> - * <CustomComponent ref="custom" /> - * </div> - * ); - * }, - * handleClick: function() { - * this.refs.custom.handleClick(); - * }, - * componentDidMount: function() { - * this.refs.custom.initialize(); - * } - * }); - * - * Refs should rarely be used. When refs are used, they should only be done to - * control data that is not handled by React's data flow. - * - * @class ReactOwner - */ -var ReactOwner = { - /** - * Adds a component by ref to an owner component. - * - * @param {ReactComponent} component Component to reference. - * @param {string} ref Name by which to refer to the component. - * @param {ReactOwner} owner Component on which to record the ref. - * @final - * @internal - */ - addComponentAsRefTo: function (component, ref, owner) { - !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0; - owner.attachRef(ref, component); - }, +ReactDefaultInjection.inject(); - /** - * Removes a component by ref from an owner component. - * - * @param {ReactComponent} component Component to dereference. - * @param {string} ref Name of the ref to remove. - * @param {ReactOwner} owner Component on which the ref is recorded. - * @final - * @internal - */ - removeComponentAsRefFrom: function (component, ref, owner) { - !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0; - var ownerPublicInstance = owner.getPublicInstance(); - // Check that `component`'s owner is still alive and that `component` is still the current ref - // because we do not want to detach the ref if another component stole it. - if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) { - owner.detachRef(ref); - } - } -}; - -module.exports = ReactOwner; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 393 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ - - - -var ReactInvalidSetStateWarningHook = __webpack_require__(394); -var ReactHostOperationHistoryHook = __webpack_require__(395); -var ReactComponentTreeHook = __webpack_require__(24); -var ExecutionEnvironment = __webpack_require__(19); - -var performanceNow = __webpack_require__(396); -var warning = __webpack_require__(11); - -var hooks = []; -var didHookThrowForEvent = {}; - -function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) { - try { - fn.call(context, arg1, arg2, arg3, arg4, arg5); - } catch (e) { - process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0; - didHookThrowForEvent[event] = true; - } -} - -function emitEvent(event, arg1, arg2, arg3, arg4, arg5) { - for (var i = 0; i < hooks.length; i++) { - var hook = hooks[i]; - var fn = hook[event]; - if (fn) { - callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5); - } - } -} - -var isProfiling = false; -var flushHistory = []; -var lifeCycleTimerStack = []; -var currentFlushNesting = 0; -var currentFlushMeasurements = []; -var currentFlushStartTime = 0; -var currentTimerDebugID = null; -var currentTimerStartTime = 0; -var currentTimerNestedFlushDuration = 0; -var currentTimerType = null; - -var lifeCycleTimerHasWarned = false; - -function clearHistory() { - ReactComponentTreeHook.purgeUnmountedComponents(); - ReactHostOperationHistoryHook.clearHistory(); -} - -function getTreeSnapshot(registeredIDs) { - return registeredIDs.reduce(function (tree, id) { - var ownerID = ReactComponentTreeHook.getOwnerID(id); - var parentID = ReactComponentTreeHook.getParentID(id); - tree[id] = { - displayName: ReactComponentTreeHook.getDisplayName(id), - text: ReactComponentTreeHook.getText(id), - updateCount: ReactComponentTreeHook.getUpdateCount(id), - childIDs: ReactComponentTreeHook.getChildIDs(id), - // Text nodes don't have owners but this is close enough. - ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0, - parentID: parentID - }; - return tree; - }, {}); -} - -function resetMeasurements() { - var previousStartTime = currentFlushStartTime; - var previousMeasurements = currentFlushMeasurements; - var previousOperations = ReactHostOperationHistoryHook.getHistory(); - - if (currentFlushNesting === 0) { - currentFlushStartTime = 0; - currentFlushMeasurements = []; - clearHistory(); - return; - } - - if (previousMeasurements.length || previousOperations.length) { - var registeredIDs = ReactComponentTreeHook.getRegisteredIDs(); - flushHistory.push({ - duration: performanceNow() - previousStartTime, - measurements: previousMeasurements || [], - operations: previousOperations || [], - treeSnapshot: getTreeSnapshot(registeredIDs) - }); - } - - clearHistory(); - currentFlushStartTime = performanceNow(); - currentFlushMeasurements = []; -} - -function checkDebugID(debugID) { - var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (allowRoot && debugID === 0) { - return; - } - if (!debugID) { - process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0; - } -} - -function beginLifeCycleTimer(debugID, timerType) { - if (currentFlushNesting === 0) { - return; - } - if (currentTimerType && !lifeCycleTimerHasWarned) { - process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; - lifeCycleTimerHasWarned = true; - } - currentTimerStartTime = performanceNow(); - currentTimerNestedFlushDuration = 0; - currentTimerDebugID = debugID; - currentTimerType = timerType; -} - -function endLifeCycleTimer(debugID, timerType) { - if (currentFlushNesting === 0) { - return; - } - if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) { - process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; - lifeCycleTimerHasWarned = true; - } - if (isProfiling) { - currentFlushMeasurements.push({ - timerType: timerType, - instanceID: debugID, - duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration - }); - } - currentTimerStartTime = 0; - currentTimerNestedFlushDuration = 0; - currentTimerDebugID = null; - currentTimerType = null; -} - -function pauseCurrentLifeCycleTimer() { - var currentTimer = { - startTime: currentTimerStartTime, - nestedFlushStartTime: performanceNow(), - debugID: currentTimerDebugID, - timerType: currentTimerType - }; - lifeCycleTimerStack.push(currentTimer); - currentTimerStartTime = 0; - currentTimerNestedFlushDuration = 0; - currentTimerDebugID = null; - currentTimerType = null; -} - -function resumeCurrentLifeCycleTimer() { - var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(), - startTime = _lifeCycleTimerStack$.startTime, - nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime, - debugID = _lifeCycleTimerStack$.debugID, - timerType = _lifeCycleTimerStack$.timerType; - - var nestedFlushDuration = performanceNow() - nestedFlushStartTime; - currentTimerStartTime = startTime; - currentTimerNestedFlushDuration += nestedFlushDuration; - currentTimerDebugID = debugID; - currentTimerType = timerType; -} +var ReactDOM = { + findDOMNode: findDOMNode, + render: ReactMount.render, + unmountComponentAtNode: ReactMount.unmountComponentAtNode, + version: ReactVersion, -var lastMarkTimeStamp = 0; -var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; + /* eslint-disable camelcase */ + unstable_batchedUpdates: ReactUpdates.batchedUpdates, + unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer +}; -function shouldMark(debugID) { - if (!isProfiling || !canUsePerformanceMeasure) { - return false; - } - var element = ReactComponentTreeHook.getElement(debugID); - if (element == null || typeof element !== 'object') { - return false; - } - var isHostElement = typeof element.type === 'string'; - if (isHostElement) { - return false; - } - return true; +// Inject the runtime into a devtools global hook regardless of browser. +// Allows for debugging when the hook is injected on the page. +if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { + __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ + ComponentTree: { + getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode, + getNodeFromInstance: function (inst) { + // inst is an internal instance (but could be a composite) + if (inst._renderedComponent) { + inst = getHostComponentFromComposite(inst); + } + if (inst) { + return ReactDOMComponentTree.getNodeFromInstance(inst); + } else { + return null; + } + } + }, + Mount: ReactMount, + Reconciler: ReactReconciler + }); } -function markBegin(debugID, markType) { - if (!shouldMark(debugID)) { - return; - } +if (process.env.NODE_ENV !== 'production') { + var ExecutionEnvironment = __webpack_require__(18); + if (ExecutionEnvironment.canUseDOM && window.top === window.self) { - var markName = debugID + '::' + markType; - lastMarkTimeStamp = performanceNow(); - performance.mark(markName); -} + // First check if devtools is not installed + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + // If we're in Chrome or Firefox, provide a download link if not installed. + if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) { + // Firefox does not have the issue with devtools loaded over file:// + var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1; + console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools'); + } + } -function markEnd(debugID, markType) { - if (!shouldMark(debugID)) { - return; - } + var testFunc = function testFn() {}; + process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0; - var markName = debugID + '::' + markType; - var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown'; + // If we're in IE8, check to see if we are in compatibility mode and provide + // information on preventing compatibility mode + var ieCompatibilityMode = document.documentMode && document.documentMode < 8; - // Chrome has an issue of dropping markers recorded too fast: - // https://bugs.chromium.org/p/chromium/issues/detail?id=640652 - // To work around this, we will not report very small measurements. - // I determined the magic number by tweaking it back and forth. - // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe. - // When the bug is fixed, we can `measure()` unconditionally if we want to. - var timeStamp = performanceNow(); - if (timeStamp - lastMarkTimeStamp > 0.1) { - var measurementName = displayName + ' [' + markType + ']'; - performance.measure(measurementName, markName); - } + process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0; - performance.clearMarks(markName); - if (measurementName) { - performance.clearMeasures(measurementName); - } -} + var expectedFeatures = [ + // shims + Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim]; -var ReactDebugTool = { - addHook: function (hook) { - hooks.push(hook); - }, - removeHook: function (hook) { - for (var i = 0; i < hooks.length; i++) { - if (hooks[i] === hook) { - hooks.splice(i, 1); - i--; + for (var i = 0; i < expectedFeatures.length; i++) { + if (!expectedFeatures[i]) { + process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0; + break; } } - }, - isProfiling: function () { - return isProfiling; - }, - beginProfiling: function () { - if (isProfiling) { - return; - } - - isProfiling = true; - flushHistory.length = 0; - resetMeasurements(); - ReactDebugTool.addHook(ReactHostOperationHistoryHook); - }, - endProfiling: function () { - if (!isProfiling) { - return; - } - - isProfiling = false; - resetMeasurements(); - ReactDebugTool.removeHook(ReactHostOperationHistoryHook); - }, - getFlushHistory: function () { - return flushHistory; - }, - onBeginFlush: function () { - currentFlushNesting++; - resetMeasurements(); - pauseCurrentLifeCycleTimer(); - emitEvent('onBeginFlush'); - }, - onEndFlush: function () { - resetMeasurements(); - currentFlushNesting--; - resumeCurrentLifeCycleTimer(); - emitEvent('onEndFlush'); - }, - onBeginLifeCycleTimer: function (debugID, timerType) { - checkDebugID(debugID); - emitEvent('onBeginLifeCycleTimer', debugID, timerType); - markBegin(debugID, timerType); - beginLifeCycleTimer(debugID, timerType); - }, - onEndLifeCycleTimer: function (debugID, timerType) { - checkDebugID(debugID); - endLifeCycleTimer(debugID, timerType); - markEnd(debugID, timerType); - emitEvent('onEndLifeCycleTimer', debugID, timerType); - }, - onBeginProcessingChildContext: function () { - emitEvent('onBeginProcessingChildContext'); - }, - onEndProcessingChildContext: function () { - emitEvent('onEndProcessingChildContext'); - }, - onHostOperation: function (operation) { - checkDebugID(operation.instanceID); - emitEvent('onHostOperation', operation); - }, - onSetState: function () { - emitEvent('onSetState'); - }, - onSetChildren: function (debugID, childDebugIDs) { - checkDebugID(debugID); - childDebugIDs.forEach(checkDebugID); - emitEvent('onSetChildren', debugID, childDebugIDs); - }, - onBeforeMountComponent: function (debugID, element, parentDebugID) { - checkDebugID(debugID); - checkDebugID(parentDebugID, true); - emitEvent('onBeforeMountComponent', debugID, element, parentDebugID); - markBegin(debugID, 'mount'); - }, - onMountComponent: function (debugID) { - checkDebugID(debugID); - markEnd(debugID, 'mount'); - emitEvent('onMountComponent', debugID); - }, - onBeforeUpdateComponent: function (debugID, element) { - checkDebugID(debugID); - emitEvent('onBeforeUpdateComponent', debugID, element); - markBegin(debugID, 'update'); - }, - onUpdateComponent: function (debugID) { - checkDebugID(debugID); - markEnd(debugID, 'update'); - emitEvent('onUpdateComponent', debugID); - }, - onBeforeUnmountComponent: function (debugID) { - checkDebugID(debugID); - emitEvent('onBeforeUnmountComponent', debugID); - markBegin(debugID, 'unmount'); - }, - onUnmountComponent: function (debugID) { - checkDebugID(debugID); - markEnd(debugID, 'unmount'); - emitEvent('onUnmountComponent', debugID); - }, - onTestEvent: function () { - emitEvent('onTestEvent'); } -}; +} -// TODO remove these when RN/www gets updated -ReactDebugTool.addDevtool = ReactDebugTool.addHook; -ReactDebugTool.removeDevtool = ReactDebugTool.removeHook; +if (process.env.NODE_ENV !== 'production') { + var ReactInstrumentation = __webpack_require__(25); + var ReactDOMUnknownPropertyHook = __webpack_require__(470); + var ReactDOMNullInputValuePropHook = __webpack_require__(471); + var ReactDOMInvalidARIAHook = __webpack_require__(472); -ReactDebugTool.addHook(ReactInvalidSetStateWarningHook); -ReactDebugTool.addHook(ReactComponentTreeHook); -var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; -if (/[?&]react_perf\b/.test(url)) { - ReactDebugTool.beginProfiling(); + ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook); + ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook); + ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook); } -module.exports = ReactDebugTool; +module.exports = ReactDOM; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 394 */ +/* 389 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2016-present, Facebook, Inc. +/** + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * */ -var warning = __webpack_require__(11); +var ARIADOMPropertyConfig = __webpack_require__(390); +var BeforeInputEventPlugin = __webpack_require__(391); +var ChangeEventPlugin = __webpack_require__(395); +var DefaultEventPluginOrder = __webpack_require__(403); +var EnterLeaveEventPlugin = __webpack_require__(404); +var HTMLDOMPropertyConfig = __webpack_require__(405); +var ReactComponentBrowserEnvironment = __webpack_require__(406); +var ReactDOMComponent = __webpack_require__(412); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactDOMEmptyComponent = __webpack_require__(438); +var ReactDOMTreeTraversal = __webpack_require__(439); +var ReactDOMTextComponent = __webpack_require__(440); +var ReactDefaultBatchingStrategy = __webpack_require__(441); +var ReactEventListener = __webpack_require__(442); +var ReactInjection = __webpack_require__(444); +var ReactReconcileTransaction = __webpack_require__(445); +var SVGDOMPropertyConfig = __webpack_require__(451); +var SelectEventPlugin = __webpack_require__(452); +var SimpleEventPlugin = __webpack_require__(453); -if (process.env.NODE_ENV !== 'production') { - var processingChildContext = false; +var alreadyInjected = false; - var warnInvalidSetState = function () { - process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0; - }; +function inject() { + if (alreadyInjected) { + // TODO: This is currently true because these injections are shared between + // the client and the server package. They should be built independently + // and not share any injection state. Then this problem will be solved. + return; + } + alreadyInjected = true; + + ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); + + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); + ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree); + ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal); + + /** + * Some important event plugins included by default (without having to require + * them). + */ + ReactInjection.EventPluginHub.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin + }); + + ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent); + + ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent); + + ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); + + ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) { + return new ReactDOMEmptyComponent(instantiate); + }); + + ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); + ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); + + ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); } -var ReactInvalidSetStateWarningHook = { - onBeginProcessingChildContext: function () { - processingChildContext = true; - }, - onEndProcessingChildContext: function () { - processingChildContext = false; - }, - onSetState: function () { - warnInvalidSetState(); - } +module.exports = { + inject: inject }; -module.exports = ReactInvalidSetStateWarningHook; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - /***/ }), -/* 395 */ +/* 390 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** - * Copyright 2016-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * */ -var history = []; - -var ReactHostOperationHistoryHook = { - onHostOperation: function (operation) { - history.push(operation); - }, - clearHistory: function () { - if (ReactHostOperationHistoryHook._preventClearing) { - // Should only be used for tests. - return; - } - - history = []; - }, - getHistory: function () { - return history; - } -}; +var ARIADOMPropertyConfig = { + Properties: { + // Global States and Properties + 'aria-current': 0, // state + 'aria-details': 0, + 'aria-disabled': 0, // state + 'aria-hidden': 0, // state + 'aria-invalid': 0, // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0 + }, + DOMAttributeNames: {}, + DOMPropertyNames: {} +}; -module.exports = ReactHostOperationHistoryHook; +module.exports = ARIADOMPropertyConfig; /***/ }), -/* 396 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - - /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright 2013-present Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @typechecks */ -var performance = __webpack_require__(397); -var performanceNow; + +var EventPropagators = __webpack_require__(78); +var ExecutionEnvironment = __webpack_require__(18); +var FallbackCompositionState = __webpack_require__(392); +var SyntheticCompositionEvent = __webpack_require__(393); +var SyntheticInputEvent = __webpack_require__(394); + +var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space +var START_KEYCODE = 229; + +var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; + +var documentMode = null; +if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; +} + +// Webkit offers a very useful `textInput` event that can be used to +// directly represent `beforeInput`. The IE `textinput` event is not as +// useful, so we don't use it. +var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); + +// In IE9+, we have access to composition events, but the data supplied +// by the native compositionend event may be incorrect. Japanese ideographic +// spaces, for instance (\u3000) are not recorded correctly. +var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); /** - * Detect if we can use `window.performance.now()` and gracefully fallback to - * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now - * because of Facebook's testing infrastructure. + * Opera <= 12 includes TextEvent in window, but does not fire + * text input events. Rely on keypress instead. */ -if (performance.now) { - performanceNow = function performanceNow() { - return performance.now(); - }; -} else { - performanceNow = function performanceNow() { - return Date.now(); - }; +function isPresto() { + var opera = window.opera; + return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12; } -module.exports = performanceNow; +var SPACEBAR_CODE = 32; +var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); -/***/ }), -/* 397 */ -/***/ (function(module, exports, __webpack_require__) { +// Events and their corresponding property names. +var eventTypes = { + beforeInput: { + phasedRegistrationNames: { + bubbled: 'onBeforeInput', + captured: 'onBeforeInputCapture' + }, + dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste'] + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: 'onCompositionEnd', + captured: 'onCompositionEndCapture' + }, + dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: 'onCompositionStart', + captured: 'onCompositionStartCapture' + }, + dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: 'onCompositionUpdate', + captured: 'onCompositionUpdateCapture' + }, + dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + } +}; + +// Track whether we've ever handled a keypress on the space key. +var hasSpaceKeypress = false; -"use strict"; /** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. + */ +function isKeypressCommand(nativeEvent) { + return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && + // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey); +} + +/** + * Translate native top level events into event types. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * @param {string} topLevelType + * @return {object} + */ +function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case 'topCompositionStart': + return eventTypes.compositionStart; + case 'topCompositionEnd': + return eventTypes.compositionEnd; + case 'topCompositionUpdate': + return eventTypes.compositionUpdate; + } +} + +/** + * Does our fallback best-guess model think this event signifies that + * composition has begun? * - * @typechecks + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ +function isFallbackCompositionStart(topLevelType, nativeEvent) { + return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; +} + +/** + * Does our fallback mode think that this event is the end of composition? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ +function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case 'topKeyUp': + // Command keys insert or clear IME input. + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; + case 'topKeyDown': + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return nativeEvent.keyCode !== START_KEYCODE; + case 'topKeyPress': + case 'topMouseDown': + case 'topBlur': + // Events are not possible without cancelling IME. + return true; + default: + return false; + } +} + +/** + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. + * + * @param {object} nativeEvent + * @return {?string} */ +function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; + } + return null; +} +// Track the current IME composition fallback object, if any. +var currentComposition = null; +/** + * @return {?object} A SyntheticCompositionEvent. + */ +function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var eventType; + var fallbackData; -var ExecutionEnvironment = __webpack_require__(19); + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!currentComposition) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionStart; + } + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionEnd; + } -var performance; + if (!eventType) { + return null; + } -if (ExecutionEnvironment.canUseDOM) { - performance = window.performance || window.msPerformance || window.webkitPerformance; + if (useFallbackCompositionData) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!currentComposition && eventType === eventTypes.compositionStart) { + currentComposition = FallbackCompositionState.getPooled(nativeEventTarget); + } else if (eventType === eventTypes.compositionEnd) { + if (currentComposition) { + fallbackData = currentComposition.getData(); + } + } + } + + var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget); + + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + if (customData !== null) { + event.data = customData; + } + } + + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; } -module.exports = performance || {}; +/** + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. + */ +function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case 'topCompositionEnd': + return getDataFromCustomEvent(nativeEvent); + case 'topKeyPress': + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + if (which !== SPACEBAR_CODE) { + return null; + } -/***/ }), -/* 398 */ -/***/ (function(module, exports, __webpack_require__) { + hasSpaceKeypress = true; + return SPACEBAR_CHAR; + + case 'topTextInput': + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; + + // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to blacklist it. + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } + + return chars; + + default: + // For other native event types, do nothing. + return null; + } +} -"use strict"; /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. + */ +function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + // If composition event is available, we extract a string only at + // compositionevent, otherwise extract it at fallback events. + if (currentComposition) { + if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { + var chars = currentComposition.getData(); + FallbackCompositionState.release(currentComposition); + currentComposition = null; + return chars; + } + return null; + } + + switch (topLevelType) { + case 'topPaste': + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + case 'topKeyPress': + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { + return String.fromCharCode(nativeEvent.which); + } + return null; + case 'topCompositionEnd': + return useFallbackCompositionData ? null : nativeEvent.data; + default: + return null; + } +} + +/** + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. * + * @return {?object} A SyntheticInputEvent. */ +function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var chars; + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); + } + + // If no characters are being inserted, no BeforeInput event should + // be fired. + if (!chars) { + return null; + } + + var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget); + event.data = chars; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; +} /** - * Module that is injectable into `EventPluginHub`, that specifies a - * deterministic ordering of `EventPlugin`s. A convenient way to reason about - * plugins, without having to package every one of them. This is better than - * having plugins be ordered in the same order that they are injected because - * that ordering would be influenced by the packaging order. - * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that - * preventing default on events is convenient in `SimpleEventPlugin` handlers. + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. + * + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. */ +var BeforeInputEventPlugin = { -var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; + eventTypes: eventTypes, -module.exports = DefaultEventPluginOrder; + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)]; + } +}; + +module.exports = BeforeInputEventPlugin; /***/ }), -/* 399 */ +/* 392 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29672,94 +29898,91 @@ module.exports = DefaultEventPluginOrder; -var EventPropagators = __webpack_require__(77); -var ReactDOMComponentTree = __webpack_require__(16); -var SyntheticMouseEvent = __webpack_require__(103); +var _assign = __webpack_require__(14); -var eventTypes = { - mouseEnter: { - registrationName: 'onMouseEnter', - dependencies: ['topMouseOut', 'topMouseOver'] - }, - mouseLeave: { - registrationName: 'onMouseLeave', - dependencies: ['topMouseOut', 'topMouseOver'] - } -}; +var PooledClass = __webpack_require__(57); -var EnterLeaveEventPlugin = { - eventTypes: eventTypes, +var getTextContentAccessor = __webpack_require__(227); + +/** + * This helper class stores information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * @param {DOMEventTarget} root + */ +function FallbackCompositionState(root) { + this._root = root; + this._startText = this.getText(); + this._fallbackText = null; +} + +_assign(FallbackCompositionState.prototype, { + destructor: function () { + this._root = null; + this._startText = null; + this._fallbackText = null; + }, /** - * For almost every interaction we care about, there will be both a top-level - * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that - * we do not extract duplicate events. However, moving the mouse into the - * browser from outside will not fire a `mouseout` event. In this case, we use - * the `mouseover` top-level event. + * Get current text of input. + * + * @return {string} */ - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { - return null; - } - if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { - // Must not be a mouse in or mouse out - ignoring. - return null; + getText: function () { + if ('value' in this._root) { + return this._root.value; } + return this._root[getTextContentAccessor()]; + }, - var win; - if (nativeEventTarget.window === nativeEventTarget) { - // `nativeEventTarget` is probably a window object. - win = nativeEventTarget; - } else { - // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. - var doc = nativeEventTarget.ownerDocument; - if (doc) { - win = doc.defaultView || doc.parentWindow; - } else { - win = window; - } + /** + * Determine the differing substring between the initially stored + * text content and the current content. + * + * @return {string} + */ + getData: function () { + if (this._fallbackText) { + return this._fallbackText; } - var from; - var to; - if (topLevelType === 'topMouseOut') { - from = targetInst; - var related = nativeEvent.relatedTarget || nativeEvent.toElement; - to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; - } else { - // Moving to a node from outside the window. - from = null; - to = targetInst; - } + var start; + var startValue = this._startText; + var startLength = startValue.length; + var end; + var endValue = this.getText(); + var endLength = endValue.length; - if (from === to) { - // Nothing pertains to our managed components. - return null; + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } } - var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from); - var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to); - - var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget); - leave.type = 'mouseleave'; - leave.target = fromNode; - leave.relatedTarget = toNode; - - var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget); - enter.type = 'mouseenter'; - enter.target = toNode; - enter.relatedTarget = fromNode; - - EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to); + var minEnd = startLength - start; + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } - return [leave, enter]; + var sliceTail = end > 1 ? 1 - end : undefined; + this._fallbackText = endValue.slice(start, sliceTail); + return this._fallbackText; } -}; +}); -module.exports = EnterLeaveEventPlugin; +PooledClass.addPoolingTo(FallbackCompositionState); + +module.exports = FallbackCompositionState; /***/ }), -/* 400 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29775,232 +29998,32 @@ module.exports = EnterLeaveEventPlugin; -var DOMProperty = __webpack_require__(43); - -var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; -var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; -var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; -var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; -var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; +var SyntheticEvent = __webpack_require__(36); -var HTMLDOMPropertyConfig = { - isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')), - Properties: { - /** - * Standard Properties - */ - accept: 0, - acceptCharset: 0, - accessKey: 0, - action: 0, - allowFullScreen: HAS_BOOLEAN_VALUE, - allowTransparency: 0, - alt: 0, - // specifies target context for links with `preload` type - as: 0, - async: HAS_BOOLEAN_VALUE, - autoComplete: 0, - // autoFocus is polyfilled/normalized by AutoFocusUtils - // autoFocus: HAS_BOOLEAN_VALUE, - autoPlay: HAS_BOOLEAN_VALUE, - capture: HAS_BOOLEAN_VALUE, - cellPadding: 0, - cellSpacing: 0, - charSet: 0, - challenge: 0, - checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, - cite: 0, - classID: 0, - className: 0, - cols: HAS_POSITIVE_NUMERIC_VALUE, - colSpan: 0, - content: 0, - contentEditable: 0, - contextMenu: 0, - controls: HAS_BOOLEAN_VALUE, - coords: 0, - crossOrigin: 0, - data: 0, // For `<object />` acts as `src`. - dateTime: 0, - 'default': HAS_BOOLEAN_VALUE, - defer: HAS_BOOLEAN_VALUE, - dir: 0, - disabled: HAS_BOOLEAN_VALUE, - download: HAS_OVERLOADED_BOOLEAN_VALUE, - draggable: 0, - encType: 0, - form: 0, - formAction: 0, - formEncType: 0, - formMethod: 0, - formNoValidate: HAS_BOOLEAN_VALUE, - formTarget: 0, - frameBorder: 0, - headers: 0, - height: 0, - hidden: HAS_BOOLEAN_VALUE, - high: 0, - href: 0, - hrefLang: 0, - htmlFor: 0, - httpEquiv: 0, - icon: 0, - id: 0, - inputMode: 0, - integrity: 0, - is: 0, - keyParams: 0, - keyType: 0, - kind: 0, - label: 0, - lang: 0, - list: 0, - loop: HAS_BOOLEAN_VALUE, - low: 0, - manifest: 0, - marginHeight: 0, - marginWidth: 0, - max: 0, - maxLength: 0, - media: 0, - mediaGroup: 0, - method: 0, - min: 0, - minLength: 0, - // Caution; `option.selected` is not updated if `select.multiple` is - // disabled with `removeAttribute`. - multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, - muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, - name: 0, - nonce: 0, - noValidate: HAS_BOOLEAN_VALUE, - open: HAS_BOOLEAN_VALUE, - optimum: 0, - pattern: 0, - placeholder: 0, - playsInline: HAS_BOOLEAN_VALUE, - poster: 0, - preload: 0, - profile: 0, - radioGroup: 0, - readOnly: HAS_BOOLEAN_VALUE, - referrerPolicy: 0, - rel: 0, - required: HAS_BOOLEAN_VALUE, - reversed: HAS_BOOLEAN_VALUE, - role: 0, - rows: HAS_POSITIVE_NUMERIC_VALUE, - rowSpan: HAS_NUMERIC_VALUE, - sandbox: 0, - scope: 0, - scoped: HAS_BOOLEAN_VALUE, - scrolling: 0, - seamless: HAS_BOOLEAN_VALUE, - selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, - shape: 0, - size: HAS_POSITIVE_NUMERIC_VALUE, - sizes: 0, - span: HAS_POSITIVE_NUMERIC_VALUE, - spellCheck: 0, - src: 0, - srcDoc: 0, - srcLang: 0, - srcSet: 0, - start: HAS_NUMERIC_VALUE, - step: 0, - style: 0, - summary: 0, - tabIndex: 0, - target: 0, - title: 0, - // Setting .type throws on non-<input> tags - type: 0, - useMap: 0, - value: 0, - width: 0, - wmode: 0, - wrap: 0, +/** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ +var CompositionEventInterface = { + data: null +}; - /** - * RDFa Properties - */ - about: 0, - datatype: 0, - inlist: 0, - prefix: 0, - // property is also supported for OpenGraph in meta tags. - property: 0, - resource: 0, - 'typeof': 0, - vocab: 0, +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} - /** - * Non-standard Properties - */ - // autoCapitalize and autoCorrect are supported in Mobile Safari for - // keyboard hints. - autoCapitalize: 0, - autoCorrect: 0, - // autoSave allows WebKit/Blink to persist values of input fields on page reloads - autoSave: 0, - // color is for Safari mask-icon link - color: 0, - // itemProp, itemScope, itemType are for - // Microdata support. See http://schema.org/docs/gs.html - itemProp: 0, - itemScope: HAS_BOOLEAN_VALUE, - itemType: 0, - // itemID and itemRef are for Microdata support as well but - // only specified in the WHATWG spec document. See - // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api - itemID: 0, - itemRef: 0, - // results show looking glass icon and recent searches on input - // search fields in WebKit/Blink - results: 0, - // IE-only attribute that specifies security restrictions on an iframe - // as an alternative to the sandbox attribute on IE<10 - security: 0, - // IE-only attribute that controls focus behavior - unselectable: 0 - }, - DOMAttributeNames: { - acceptCharset: 'accept-charset', - className: 'class', - htmlFor: 'for', - httpEquiv: 'http-equiv' - }, - DOMPropertyNames: {}, - DOMMutationMethods: { - value: function (node, value) { - if (value == null) { - return node.removeAttribute('value'); - } - - // Number inputs get special treatment due to some edge cases in - // Chrome. Let everything else assign the value attribute as normal. - // https://github.com/facebook/react/issues/7253#issuecomment-236074326 - if (node.type !== 'number' || node.hasAttribute('value') === false) { - node.setAttribute('value', '' + value); - } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) { - // Don't assign an attribute if validation reports bad - // input. Chrome will clear the value. Additionally, don't - // operate on inputs that have focus, otherwise Chrome might - // strip off trailing decimal places and cause the user's - // cursor position to jump to the beginning of the input. - // - // In ReactDOMInput, we have an onBlur event that will trigger - // this function again when focus is lost. - node.setAttribute('value', '' + value); - } - } - } -}; +SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface); -module.exports = HTMLDOMPropertyConfig; +module.exports = SyntheticCompositionEvent; /***/ }), -/* 401 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30016,28 +30039,37 @@ module.exports = HTMLDOMPropertyConfig; -var DOMChildrenOperations = __webpack_require__(150); -var ReactDOMIDOperations = __webpack_require__(406); +var SyntheticEvent = __webpack_require__(36); /** - * Abstracts away all functionality of the reconciler that requires knowledge of - * the browser context. TODO: These callers should be refactored to avoid the - * need for this injection. + * @interface Event + * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 + * /#events-inputevents */ -var ReactComponentBrowserEnvironment = { - processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, - - replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup +var InputEventInterface = { + data: null }; -module.exports = ReactComponentBrowserEnvironment; +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface); + +module.exports = SyntheticInputEvent; /***/ }), -/* 402 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** +/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -30049,371 +30081,415 @@ module.exports = ReactComponentBrowserEnvironment; -var _prodInvariant = __webpack_require__(14); - -var DOMLazyTree = __webpack_require__(68); -var ExecutionEnvironment = __webpack_require__(19); - -var createNodesFromMarkup = __webpack_require__(403); -var emptyFunction = __webpack_require__(23); -var invariant = __webpack_require__(10); +var EventPluginHub = __webpack_require__(79); +var EventPropagators = __webpack_require__(78); +var ExecutionEnvironment = __webpack_require__(18); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactUpdates = __webpack_require__(30); +var SyntheticEvent = __webpack_require__(36); -var Danger = { - /** - * Replaces a node with a string of markup at its current position within its - * parent. The markup must render into a single root node. - * - * @param {DOMElement} oldChild Child node to replace. - * @param {string} markup Markup to render in place of the child node. - * @internal - */ - dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) { - !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0; - !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0; - !(oldChild.nodeName !== 'HTML') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0; +var getEventTarget = __webpack_require__(152); +var isEventSupported = __webpack_require__(153); +var isTextInputElement = __webpack_require__(230); - if (typeof markup === 'string') { - var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; - oldChild.parentNode.replaceChild(newChild, oldChild); - } else { - DOMLazyTree.replaceChildWithTree(oldChild, markup); - } +var eventTypes = { + change: { + phasedRegistrationNames: { + bubbled: 'onChange', + captured: 'onChangeCapture' + }, + dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange'] } }; -module.exports = Danger; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 403 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { +/** + * For IE shims + */ +var activeElement = null; +var activeElementInst = null; +var activeElementValue = null; +var activeElementValueProp = null; /** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks + * SECTION: handle `change` event */ +function shouldUseChangeEvent(elem) { + var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; +} -/*eslint-disable fb-www/unsafe-html*/ +var doesChangeEventBubble = false; +if (ExecutionEnvironment.canUseDOM) { + // See `handleChange` comment below + doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8); +} -var ExecutionEnvironment = __webpack_require__(19); +function manualDispatchChangeEvent(nativeEvent) { + var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); + EventPropagators.accumulateTwoPhaseDispatches(event); -var createArrayFromMixed = __webpack_require__(404); -var getMarkupWrap = __webpack_require__(405); -var invariant = __webpack_require__(10); + // If change and propertychange bubbled, we'd just bind to it like all the + // other events and have it go through ReactBrowserEventEmitter. Since it + // doesn't, we manually listen for the events and so we have to enqueue and + // process the abstract event manually. + // + // Batching is necessary here in order to ensure that all event handlers run + // before the next rerender (including event handlers attached to ancestor + // elements instead of directly on the input). Without this, controlled + // components don't work properly in conjunction with event bubbling because + // the component is rerendered and the value reverted before all the event + // handlers can run. See https://github.com/facebook/react/issues/708. + ReactUpdates.batchedUpdates(runEventInBatch, event); +} + +function runEventInBatch(event) { + EventPluginHub.enqueueEvents(event); + EventPluginHub.processEventQueue(false); +} + +function startWatchingForChangeEventIE8(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElement.attachEvent('onchange', manualDispatchChangeEvent); +} + +function stopWatchingForChangeEventIE8() { + if (!activeElement) { + return; + } + activeElement.detachEvent('onchange', manualDispatchChangeEvent); + activeElement = null; + activeElementInst = null; +} + +function getTargetInstForChangeEvent(topLevelType, targetInst) { + if (topLevelType === 'topChange') { + return targetInst; + } +} +function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { + if (topLevelType === 'topFocus') { + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForChangeEventIE8(); + startWatchingForChangeEventIE8(target, targetInst); + } else if (topLevelType === 'topBlur') { + stopWatchingForChangeEventIE8(); + } +} /** - * Dummy container used to render all markup. + * SECTION: handle `input` event */ -var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; +var isInputEventSupported = false; +if (ExecutionEnvironment.canUseDOM) { + // IE9 claims to support the input event but fails to trigger it when + // deleting text, so we ignore its input events. + // IE10+ fire input events to often, such when a placeholder + // changes or when an input with a placeholder is focused. + isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11); +} /** - * Pattern used by `getNodeName`. + * (For IE <=11) Replacement getter/setter for the `value` property that gets + * set on the active element. */ -var nodeNamePattern = /^\s*<(\w+)/; +var newValueProp = { + get: function () { + return activeElementValueProp.get.call(this); + }, + set: function (val) { + // Cast to a string so we can do equality checks. + activeElementValue = '' + val; + activeElementValueProp.set.call(this, val); + } +}; /** - * Extracts the `nodeName` of the first element in a string of markup. - * - * @param {string} markup String of markup. - * @return {?string} Node name of the supplied markup. + * (For IE <=11) Starts tracking propertychange events on the passed-in element + * and override the value property so that we can distinguish user events from + * value changes in JS. */ -function getNodeName(markup) { - var nodeNameMatch = markup.match(nodeNamePattern); - return nodeNameMatch && nodeNameMatch[1].toLowerCase(); +function startWatchingForValueChange(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElementValue = target.value; + activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value'); + + // Not guarded in a canDefineProperty check: IE8 supports defineProperty only + // on DOM elements + Object.defineProperty(activeElement, 'value', newValueProp); + if (activeElement.attachEvent) { + activeElement.attachEvent('onpropertychange', handlePropertyChange); + } else { + activeElement.addEventListener('propertychange', handlePropertyChange, false); + } } /** - * Creates an array containing the nodes rendered from the supplied markup. The - * optionally supplied `handleScript` function will be invoked once for each - * <script> element that is rendered. If no `handleScript` function is supplied, - * an exception is thrown if any <script> elements are rendered. - * - * @param {string} markup A string of valid HTML markup. - * @param {?function} handleScript Invoked once for each rendered <script>. - * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. + * (For IE <=11) Removes the event listeners from the currently-tracked element, + * if any exists. */ -function createNodesFromMarkup(markup, handleScript) { - var node = dummyNode; - !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0; - var nodeName = getNodeName(markup); +function stopWatchingForValueChange() { + if (!activeElement) { + return; + } - var wrap = nodeName && getMarkupWrap(nodeName); - if (wrap) { - node.innerHTML = wrap[1] + markup + wrap[2]; + // delete restores the original property definition + delete activeElement.value; - var wrapDepth = wrap[0]; - while (wrapDepth--) { - node = node.lastChild; - } + if (activeElement.detachEvent) { + activeElement.detachEvent('onpropertychange', handlePropertyChange); } else { - node.innerHTML = markup; + activeElement.removeEventListener('propertychange', handlePropertyChange, false); } - var scripts = node.getElementsByTagName('script'); - if (scripts.length) { - !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0; - createArrayFromMixed(scripts).forEach(handleScript); - } + activeElement = null; + activeElementInst = null; + activeElementValue = null; + activeElementValueProp = null; +} - var nodes = Array.from(node.childNodes); - while (node.lastChild) { - node.removeChild(node.lastChild); +/** + * (For IE <=11) Handles a propertychange event, sending a `change` event if + * the value of the active element has changed. + */ +function handlePropertyChange(nativeEvent) { + if (nativeEvent.propertyName !== 'value') { + return; } - return nodes; -} + var value = nativeEvent.srcElement.value; + if (value === activeElementValue) { + return; + } + activeElementValue = value; -module.exports = createNodesFromMarkup; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + manualDispatchChangeEvent(nativeEvent); +} -/***/ }), -/* 404 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * If a `change` event should be fired, returns the target's ID. + */ +function getTargetInstForInputEvent(topLevelType, targetInst) { + if (topLevelType === 'topInput') { + // In modern browsers (i.e., not IE8 or IE9), the input event is exactly + // what we want so fall through here and trigger an abstract event + return targetInst; + } +} -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { +function handleEventsForInputEventIE(topLevelType, target, targetInst) { + if (topLevelType === 'topFocus') { + // In IE8, we can capture almost all .value changes by adding a + // propertychange handler and looking for events with propertyName + // equal to 'value' + // In IE9-11, propertychange fires for most input events but is buggy and + // doesn't fire when text is deleted, but conveniently, selectionchange + // appears to fire in all of the remaining cases so we catch those and + // forward the event if the value has changed + // In either case, we don't want to call the event handler if the value + // is changed from JS so we redefine a setter for `.value` that updates + // our activeElementValue variable, allowing us to ignore those changes + // + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForValueChange(); + startWatchingForValueChange(target, targetInst); + } else if (topLevelType === 'topBlur') { + stopWatchingForValueChange(); + } +} + +// For IE8 and IE9. +function getTargetInstForInputEventIE(topLevelType, targetInst) { + if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { + // On the selectionchange event, the target is just document which isn't + // helpful for us so just check activeElement instead. + // + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire + // propertychange on the first input event after setting `value` from a + // script and fires only keydown, keypress, keyup. Catching keyup usually + // gets it and catching keydown lets us fire an event for the first + // keystroke if user does a key repeat (it'll be a little delayed: right + // before the second keystroke). Other input methods (e.g., paste) seem to + // fire selectionchange normally. + if (activeElement && activeElement.value !== activeElementValue) { + activeElementValue = activeElement.value; + return activeElementInst; + } + } +} /** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks + * SECTION: handle `click` event */ +function shouldUseClickEvent(elem) { + // Use the `click` event to detect changes to checkbox and radio inputs. + // This approach works across all browsers, whereas `change` does not fire + // until `blur` in IE8. + return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); +} -var invariant = __webpack_require__(10); +function getTargetInstForClickEvent(topLevelType, targetInst) { + if (topLevelType === 'topClick') { + return targetInst; + } +} /** - * Convert array-like objects to arrays. - * - * This API assumes the caller knows the contents of the data type. For less - * well defined inputs use createArrayFromMixed. + * This plugin creates an `onChange` event that normalizes change events + * across form elements. This event fires at a time when it's possible to + * change the element's value without seeing a flicker. * - * @param {object|function|filelist} obj - * @return {array} + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - select */ -function toArray(obj) { - var length = obj.length; - - // Some browsers builtin objects can report typeof 'function' (e.g. NodeList - // in old versions of Safari). - !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0; +var ChangeEventPlugin = { - !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0; + eventTypes: eventTypes, - !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0; + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; - !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0; + var getTargetInstFunc, handleEventFunc; + if (shouldUseChangeEvent(targetNode)) { + if (doesChangeEventBubble) { + getTargetInstFunc = getTargetInstForChangeEvent; + } else { + handleEventFunc = handleEventsForChangeEventIE8; + } + } else if (isTextInputElement(targetNode)) { + if (isInputEventSupported) { + getTargetInstFunc = getTargetInstForInputEvent; + } else { + getTargetInstFunc = getTargetInstForInputEventIE; + handleEventFunc = handleEventsForInputEventIE; + } + } else if (shouldUseClickEvent(targetNode)) { + getTargetInstFunc = getTargetInstForClickEvent; + } - // Old IE doesn't give collections access to hasOwnProperty. Assume inputs - // without method will throw during the slice call and skip straight to the - // fallback. - if (obj.hasOwnProperty) { - try { - return Array.prototype.slice.call(obj); - } catch (e) { - // IE < 9 does not support Array#slice on collections objects + if (getTargetInstFunc) { + var inst = getTargetInstFunc(topLevelType, targetInst); + if (inst) { + var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget); + event.type = 'change'; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } } - } - // Fall back to copying key by key. This assumes all keys have a value, - // so will not preserve sparsely populated inputs. - var ret = Array(length); - for (var ii = 0; ii < length; ii++) { - ret[ii] = obj[ii]; + if (handleEventFunc) { + handleEventFunc(topLevelType, targetNode, targetInst); + } } - return ret; -} - -/** - * Perform a heuristic test to determine if an object is "array-like". - * - * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" - * Joshu replied: "Mu." - * - * This function determines if its argument has "array nature": it returns - * true if the argument is an actual array, an `arguments' object, or an - * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). - * - * It will return false for other array-like objects like Filelist. - * - * @param {*} obj - * @return {boolean} - */ -function hasArrayNature(obj) { - return ( - // not null/false - !!obj && ( - // arrays are objects, NodeLists are functions in Safari - typeof obj == 'object' || typeof obj == 'function') && - // quacks like an array - 'length' in obj && - // not window - !('setInterval' in obj) && - // no DOM node should be considered an array-like - // a 'select' element has 'length' and 'item' properties on IE8 - typeof obj.nodeType != 'number' && ( - // a real array - Array.isArray(obj) || - // arguments - 'callee' in obj || - // HTMLCollection/NodeList - 'item' in obj) - ); -} -/** - * Ensure that the argument is an array by wrapping it in an array if it is not. - * Creates a copy of the argument if it is already an array. - * - * This is mostly useful idiomatically: - * - * var createArrayFromMixed = require('createArrayFromMixed'); - * - * function takesOneOrMoreThings(things) { - * things = createArrayFromMixed(things); - * ... - * } - * - * This allows you to treat `things' as an array, but accept scalars in the API. - * - * If you need to convert an array-like object, like `arguments`, into an array - * use toArray instead. - * - * @param {*} obj - * @return {array} - */ -function createArrayFromMixed(obj) { - if (!hasArrayNature(obj)) { - return [obj]; - } else if (Array.isArray(obj)) { - return obj.slice(); - } else { - return toArray(obj); - } -} +}; -module.exports = createArrayFromMixed; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +module.exports = ChangeEventPlugin; /***/ }), -/* 405 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * */ -/*eslint-disable fb-www/unsafe-html */ - -var ExecutionEnvironment = __webpack_require__(19); -var invariant = __webpack_require__(10); -/** - * Dummy container used to detect which wraps are necessary. - */ -var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; +var ReactOwner = __webpack_require__(397); -/** - * Some browsers cannot use `innerHTML` to render certain elements standalone, - * so we wrap them, render the wrapped nodes, then extract the desired node. - * - * In IE8, certain elements cannot render alone, so wrap all elements ('*'). - */ +var ReactRef = {}; -var shouldWrap = {}; +function attachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(component.getPublicInstance()); + } else { + // Legacy ref + ReactOwner.addComponentAsRefTo(component, ref, owner); + } +} -var selectWrap = [1, '<select multiple="true">', '</select>']; -var tableWrap = [1, '<table>', '</table>']; -var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; +function detachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(null); + } else { + // Legacy ref + ReactOwner.removeComponentAsRefFrom(component, ref, owner); + } +} -var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>']; +ReactRef.attachRefs = function (instance, element) { + if (element === null || typeof element !== 'object') { + return; + } + var ref = element.ref; + if (ref != null) { + attachRef(ref, instance, element._owner); + } +}; -var markupWrap = { - '*': [1, '?<div>', '</div>'], +ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { + // If either the owner or a `ref` has changed, make sure the newest owner + // has stored a reference to `this`, and the previous owner (if different) + // has forgotten the reference to `this`. We use the element instead + // of the public this.props because the post processing cannot determine + // a ref. The ref conceptually lives on the element. - 'area': [1, '<map>', '</map>'], - 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], - 'legend': [1, '<fieldset>', '</fieldset>'], - 'param': [1, '<object>', '</object>'], - 'tr': [2, '<table><tbody>', '</tbody></table>'], + // TODO: Should this even be possible? The owner cannot change because + // it's forbidden by shouldUpdateReactComponent. The ref can change + // if you swap the keys of but not the refs. Reconsider where this check + // is made. It probably belongs where the key checking and + // instantiateReactComponent is done. - 'optgroup': selectWrap, - 'option': selectWrap, + var prevRef = null; + var prevOwner = null; + if (prevElement !== null && typeof prevElement === 'object') { + prevRef = prevElement.ref; + prevOwner = prevElement._owner; + } - 'caption': tableWrap, - 'colgroup': tableWrap, - 'tbody': tableWrap, - 'tfoot': tableWrap, - 'thead': tableWrap, + var nextRef = null; + var nextOwner = null; + if (nextElement !== null && typeof nextElement === 'object') { + nextRef = nextElement.ref; + nextOwner = nextElement._owner; + } - 'td': trWrap, - 'th': trWrap + return prevRef !== nextRef || + // If owner changes but we have an unchanged function ref, don't update refs + typeof nextRef === 'string' && nextOwner !== prevOwner; }; -// Initialize the SVG elements since we know they'll always need to be wrapped -// consistently. If they are created inside a <div> they will be initialized in -// the wrong namespace (and will not display). -var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan']; -svgElements.forEach(function (nodeName) { - markupWrap[nodeName] = svgWrap; - shouldWrap[nodeName] = true; -}); - -/** - * Gets the markup wrap configuration for the supplied `nodeName`. - * - * NOTE: This lazily detects which wraps are necessary for the current browser. - * - * @param {string} nodeName Lowercase `nodeName`. - * @return {?array} Markup wrap configuration, if applicable. - */ -function getMarkupWrap(nodeName) { - !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0; - if (!markupWrap.hasOwnProperty(nodeName)) { - nodeName = '*'; +ReactRef.detachRefs = function (instance, element) { + if (element === null || typeof element !== 'object') { + return; } - if (!shouldWrap.hasOwnProperty(nodeName)) { - if (nodeName === '*') { - dummyNode.innerHTML = '<link />'; - } else { - dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; - } - shouldWrap[nodeName] = !dummyNode.firstChild; + var ref = element.ref; + if (ref != null) { + detachRef(ref, instance, element._owner); } - return shouldWrap[nodeName] ? markupWrap[nodeName] : null; -} +}; -module.exports = getMarkupWrap; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +module.exports = ReactRef; /***/ }), -/* 406 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** +/* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -30421,1049 +30497,964 @@ module.exports = getMarkupWrap; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * */ -var DOMChildrenOperations = __webpack_require__(150); -var ReactDOMComponentTree = __webpack_require__(16); +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(10); /** - * Operations used to process updates to DOM nodes. + * @param {?object} object + * @return {boolean} True if `object` is a valid owner. + * @final */ -var ReactDOMIDOperations = { +function isValidOwner(object) { + return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); +} + +/** + * ReactOwners are capable of storing references to owned components. + * + * All components are capable of //being// referenced by owner components, but + * only ReactOwner components are capable of //referencing// owned components. + * The named reference is known as a "ref". + * + * Refs are available when mounted and updated during reconciliation. + * + * var MyComponent = React.createClass({ + * render: function() { + * return ( + * <div onClick={this.handleClick}> + * <CustomComponent ref="custom" /> + * </div> + * ); + * }, + * handleClick: function() { + * this.refs.custom.handleClick(); + * }, + * componentDidMount: function() { + * this.refs.custom.initialize(); + * } + * }); + * + * Refs should rarely be used. When refs are used, they should only be done to + * control data that is not handled by React's data flow. + * + * @class ReactOwner + */ +var ReactOwner = { /** - * Updates a component's children by processing a series of updates. + * Adds a component by ref to an owner component. * - * @param {array<object>} updates List of update configurations. + * @param {ReactComponent} component Component to reference. + * @param {string} ref Name by which to refer to the component. + * @param {ReactOwner} owner Component on which to record the ref. + * @final * @internal */ - dangerouslyProcessChildrenUpdates: function (parentInst, updates) { - var node = ReactDOMComponentTree.getNodeFromInstance(parentInst); - DOMChildrenOperations.processUpdates(node, updates); + addComponentAsRefTo: function (component, ref, owner) { + !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0; + owner.attachRef(ref, component); + }, + + /** + * Removes a component by ref from an owner component. + * + * @param {ReactComponent} component Component to dereference. + * @param {string} ref Name of the ref to remove. + * @param {ReactOwner} owner Component on which the ref is recorded. + * @final + * @internal + */ + removeComponentAsRefFrom: function (component, ref, owner) { + !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0; + var ownerPublicInstance = owner.getPublicInstance(); + // Check that `component`'s owner is still alive and that `component` is still the current ref + // because we do not want to detach the ref if another component stole it. + if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) { + owner.detachRef(ref); + } } + }; -module.exports = ReactDOMIDOperations; +module.exports = ReactOwner; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 407 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. + * Copyright 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * */ -/* global hasOwnProperty:true */ - - -var _prodInvariant = __webpack_require__(14), - _assign = __webpack_require__(15); -var AutoFocusUtils = __webpack_require__(408); -var CSSPropertyOperations = __webpack_require__(409); -var DOMLazyTree = __webpack_require__(68); -var DOMNamespaces = __webpack_require__(151); -var DOMProperty = __webpack_require__(43); -var DOMPropertyOperations = __webpack_require__(232); -var EventPluginHub = __webpack_require__(78); -var EventPluginRegistry = __webpack_require__(101); -var ReactBrowserEventEmitter = __webpack_require__(106); -var ReactDOMComponentFlags = __webpack_require__(220); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactDOMInput = __webpack_require__(419); -var ReactDOMOption = __webpack_require__(420); -var ReactDOMSelect = __webpack_require__(234); -var ReactDOMTextarea = __webpack_require__(421); -var ReactInstrumentation = __webpack_require__(25); -var ReactMultiChild = __webpack_require__(422); -var ReactServerRenderingTransaction = __webpack_require__(431); +var ReactInvalidSetStateWarningHook = __webpack_require__(399); +var ReactHostOperationHistoryHook = __webpack_require__(400); +var ReactComponentTreeHook = __webpack_require__(19); +var ExecutionEnvironment = __webpack_require__(18); -var emptyFunction = __webpack_require__(23); -var escapeTextContentForBrowser = __webpack_require__(105); -var invariant = __webpack_require__(10); -var isEventSupported = __webpack_require__(148); -var shallowEqual = __webpack_require__(81); -var inputValueTracking = __webpack_require__(226); -var validateDOMNesting = __webpack_require__(158); +var performanceNow = __webpack_require__(401); var warning = __webpack_require__(11); -var Flags = ReactDOMComponentFlags; -var deleteListener = EventPluginHub.deleteListener; -var getNode = ReactDOMComponentTree.getNodeFromInstance; -var listenTo = ReactBrowserEventEmitter.listenTo; -var registrationNameModules = EventPluginRegistry.registrationNameModules; - -// For quickly matching children type, to test if can be treated as content. -var CONTENT_TYPES = { string: true, number: true }; - -var STYLE = 'style'; -var HTML = '__html'; -var RESERVED_PROPS = { - children: null, - dangerouslySetInnerHTML: null, - suppressContentEditableWarning: null -}; - -// Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE). -var DOC_FRAGMENT_TYPE = 11; +var hooks = []; +var didHookThrowForEvent = {}; -function getDeclarationErrorAddendum(internalInstance) { - if (internalInstance) { - var owner = internalInstance._currentElement._owner || null; - if (owner) { - var name = owner.getName(); - if (name) { - return ' This DOM node was rendered by `' + name + '`.'; - } - } +function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) { + try { + fn.call(context, arg1, arg2, arg3, arg4, arg5); + } catch (e) { + process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0; + didHookThrowForEvent[event] = true; } - return ''; } -function friendlyStringify(obj) { - if (typeof obj === 'object') { - if (Array.isArray(obj)) { - return '[' + obj.map(friendlyStringify).join(', ') + ']'; - } else { - var pairs = []; - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key); - pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key])); - } - } - return '{' + pairs.join(', ') + '}'; +function emitEvent(event, arg1, arg2, arg3, arg4, arg5) { + for (var i = 0; i < hooks.length; i++) { + var hook = hooks[i]; + var fn = hook[event]; + if (fn) { + callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5); } - } else if (typeof obj === 'string') { - return JSON.stringify(obj); - } else if (typeof obj === 'function') { - return '[function object]'; } - // Differs from JSON.stringify in that undefined because undefined and that - // inf and nan don't become null - return String(obj); } -var styleMutationWarning = {}; +var isProfiling = false; +var flushHistory = []; +var lifeCycleTimerStack = []; +var currentFlushNesting = 0; +var currentFlushMeasurements = []; +var currentFlushStartTime = 0; +var currentTimerDebugID = null; +var currentTimerStartTime = 0; +var currentTimerNestedFlushDuration = 0; +var currentTimerType = null; -function checkAndWarnForMutatedStyle(style1, style2, component) { - if (style1 == null || style2 == null) { - return; - } - if (shallowEqual(style1, style2)) { - return; - } +var lifeCycleTimerHasWarned = false; - var componentName = component._tag; - var owner = component._currentElement._owner; - var ownerName; - if (owner) { - ownerName = owner.getName(); - } +function clearHistory() { + ReactComponentTreeHook.purgeUnmountedComponents(); + ReactHostOperationHistoryHook.clearHistory(); +} - var hash = ownerName + '|' + componentName; +function getTreeSnapshot(registeredIDs) { + return registeredIDs.reduce(function (tree, id) { + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var parentID = ReactComponentTreeHook.getParentID(id); + tree[id] = { + displayName: ReactComponentTreeHook.getDisplayName(id), + text: ReactComponentTreeHook.getText(id), + updateCount: ReactComponentTreeHook.getUpdateCount(id), + childIDs: ReactComponentTreeHook.getChildIDs(id), + // Text nodes don't have owners but this is close enough. + ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0, + parentID: parentID + }; + return tree; + }, {}); +} - if (styleMutationWarning.hasOwnProperty(hash)) { +function resetMeasurements() { + var previousStartTime = currentFlushStartTime; + var previousMeasurements = currentFlushMeasurements; + var previousOperations = ReactHostOperationHistoryHook.getHistory(); + + if (currentFlushNesting === 0) { + currentFlushStartTime = 0; + currentFlushMeasurements = []; + clearHistory(); return; } - styleMutationWarning[hash] = true; + if (previousMeasurements.length || previousOperations.length) { + var registeredIDs = ReactComponentTreeHook.getRegisteredIDs(); + flushHistory.push({ + duration: performanceNow() - previousStartTime, + measurements: previousMeasurements || [], + operations: previousOperations || [], + treeSnapshot: getTreeSnapshot(registeredIDs) + }); + } - process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0; + clearHistory(); + currentFlushStartTime = performanceNow(); + currentFlushMeasurements = []; } -/** - * @param {object} component - * @param {?object} props - */ -function assertValidProps(component, props) { - if (!props) { +function checkDebugID(debugID) { + var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (allowRoot && debugID === 0) { return; } - // Note the use of `==` which checks for null or undefined. - if (voidElementTags[component._tag]) { - !(props.children == null && props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0; + if (!debugID) { + process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0; } - if (props.dangerouslySetInnerHTML != null) { - !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0; - !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0; +} + +function beginLifeCycleTimer(debugID, timerType) { + if (currentFlushNesting === 0) { + return; } - if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0; - process.env.NODE_ENV !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0; - process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0; + if (currentTimerType && !lifeCycleTimerHasWarned) { + process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; + lifeCycleTimerHasWarned = true; } - !(props.style == null || typeof props.style === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0; + currentTimerStartTime = performanceNow(); + currentTimerNestedFlushDuration = 0; + currentTimerDebugID = debugID; + currentTimerType = timerType; } -function enqueuePutListener(inst, registrationName, listener, transaction) { - if (transaction instanceof ReactServerRenderingTransaction) { +function endLifeCycleTimer(debugID, timerType) { + if (currentFlushNesting === 0) { return; } - if (process.env.NODE_ENV !== 'production') { - // IE8 has no API for event capturing and the `onScroll` event doesn't - // bubble. - process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : void 0; + if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) { + process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; + lifeCycleTimerHasWarned = true; } - var containerInfo = inst._hostContainerInfo; - var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE; - var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument; - listenTo(registrationName, doc); - transaction.getReactMountReady().enqueue(putListener, { - inst: inst, - registrationName: registrationName, - listener: listener - }); + if (isProfiling) { + currentFlushMeasurements.push({ + timerType: timerType, + instanceID: debugID, + duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration + }); + } + currentTimerStartTime = 0; + currentTimerNestedFlushDuration = 0; + currentTimerDebugID = null; + currentTimerType = null; } -function putListener() { - var listenerToPut = this; - EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener); +function pauseCurrentLifeCycleTimer() { + var currentTimer = { + startTime: currentTimerStartTime, + nestedFlushStartTime: performanceNow(), + debugID: currentTimerDebugID, + timerType: currentTimerType + }; + lifeCycleTimerStack.push(currentTimer); + currentTimerStartTime = 0; + currentTimerNestedFlushDuration = 0; + currentTimerDebugID = null; + currentTimerType = null; } -function inputPostMount() { - var inst = this; - ReactDOMInput.postMountWrapper(inst); +function resumeCurrentLifeCycleTimer() { + var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(), + startTime = _lifeCycleTimerStack$.startTime, + nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime, + debugID = _lifeCycleTimerStack$.debugID, + timerType = _lifeCycleTimerStack$.timerType; + + var nestedFlushDuration = performanceNow() - nestedFlushStartTime; + currentTimerStartTime = startTime; + currentTimerNestedFlushDuration += nestedFlushDuration; + currentTimerDebugID = debugID; + currentTimerType = timerType; } -function textareaPostMount() { - var inst = this; - ReactDOMTextarea.postMountWrapper(inst); +var lastMarkTimeStamp = 0; +var canUsePerformanceMeasure = +// $FlowFixMe https://github.com/facebook/flow/issues/2345 +typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; + +function shouldMark(debugID) { + if (!isProfiling || !canUsePerformanceMeasure) { + return false; + } + var element = ReactComponentTreeHook.getElement(debugID); + if (element == null || typeof element !== 'object') { + return false; + } + var isHostElement = typeof element.type === 'string'; + if (isHostElement) { + return false; + } + return true; } -function optionPostMount() { - var inst = this; - ReactDOMOption.postMountWrapper(inst); +function markBegin(debugID, markType) { + if (!shouldMark(debugID)) { + return; + } + + var markName = debugID + '::' + markType; + lastMarkTimeStamp = performanceNow(); + performance.mark(markName); } -var setAndValidateContentChildDev = emptyFunction; -if (process.env.NODE_ENV !== 'production') { - setAndValidateContentChildDev = function (content) { - var hasExistingContent = this._contentDebugID != null; - var debugID = this._debugID; - // This ID represents the inlined child that has no backing instance: - var contentDebugID = -debugID; +function markEnd(debugID, markType) { + if (!shouldMark(debugID)) { + return; + } - if (content == null) { - if (hasExistingContent) { - ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID); + var markName = debugID + '::' + markType; + var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown'; + + // Chrome has an issue of dropping markers recorded too fast: + // https://bugs.chromium.org/p/chromium/issues/detail?id=640652 + // To work around this, we will not report very small measurements. + // I determined the magic number by tweaking it back and forth. + // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe. + // When the bug is fixed, we can `measure()` unconditionally if we want to. + var timeStamp = performanceNow(); + if (timeStamp - lastMarkTimeStamp > 0.1) { + var measurementName = displayName + ' [' + markType + ']'; + performance.measure(measurementName, markName); + } + + performance.clearMarks(markName); + performance.clearMeasures(measurementName); +} + +var ReactDebugTool = { + addHook: function (hook) { + hooks.push(hook); + }, + removeHook: function (hook) { + for (var i = 0; i < hooks.length; i++) { + if (hooks[i] === hook) { + hooks.splice(i, 1); + i--; } - this._contentDebugID = null; + } + }, + isProfiling: function () { + return isProfiling; + }, + beginProfiling: function () { + if (isProfiling) { return; } - validateDOMNesting(null, String(content), this, this._ancestorInfo); - this._contentDebugID = contentDebugID; - if (hasExistingContent) { - ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content); - ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID); - } else { - ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID); - ReactInstrumentation.debugTool.onMountComponent(contentDebugID); - ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]); + isProfiling = true; + flushHistory.length = 0; + resetMeasurements(); + ReactDebugTool.addHook(ReactHostOperationHistoryHook); + }, + endProfiling: function () { + if (!isProfiling) { + return; } - }; -} -// There are so many media events, it makes sense to just -// maintain a list rather than create a `trapBubbledEvent` for each -var mediaEvents = { - topAbort: 'abort', - topCanPlay: 'canplay', - topCanPlayThrough: 'canplaythrough', - topDurationChange: 'durationchange', - topEmptied: 'emptied', - topEncrypted: 'encrypted', - topEnded: 'ended', - topError: 'error', - topLoadedData: 'loadeddata', - topLoadedMetadata: 'loadedmetadata', - topLoadStart: 'loadstart', - topPause: 'pause', - topPlay: 'play', - topPlaying: 'playing', - topProgress: 'progress', - topRateChange: 'ratechange', - topSeeked: 'seeked', - topSeeking: 'seeking', - topStalled: 'stalled', - topSuspend: 'suspend', - topTimeUpdate: 'timeupdate', - topVolumeChange: 'volumechange', - topWaiting: 'waiting' + isProfiling = false; + resetMeasurements(); + ReactDebugTool.removeHook(ReactHostOperationHistoryHook); + }, + getFlushHistory: function () { + return flushHistory; + }, + onBeginFlush: function () { + currentFlushNesting++; + resetMeasurements(); + pauseCurrentLifeCycleTimer(); + emitEvent('onBeginFlush'); + }, + onEndFlush: function () { + resetMeasurements(); + currentFlushNesting--; + resumeCurrentLifeCycleTimer(); + emitEvent('onEndFlush'); + }, + onBeginLifeCycleTimer: function (debugID, timerType) { + checkDebugID(debugID); + emitEvent('onBeginLifeCycleTimer', debugID, timerType); + markBegin(debugID, timerType); + beginLifeCycleTimer(debugID, timerType); + }, + onEndLifeCycleTimer: function (debugID, timerType) { + checkDebugID(debugID); + endLifeCycleTimer(debugID, timerType); + markEnd(debugID, timerType); + emitEvent('onEndLifeCycleTimer', debugID, timerType); + }, + onBeginProcessingChildContext: function () { + emitEvent('onBeginProcessingChildContext'); + }, + onEndProcessingChildContext: function () { + emitEvent('onEndProcessingChildContext'); + }, + onHostOperation: function (operation) { + checkDebugID(operation.instanceID); + emitEvent('onHostOperation', operation); + }, + onSetState: function () { + emitEvent('onSetState'); + }, + onSetChildren: function (debugID, childDebugIDs) { + checkDebugID(debugID); + childDebugIDs.forEach(checkDebugID); + emitEvent('onSetChildren', debugID, childDebugIDs); + }, + onBeforeMountComponent: function (debugID, element, parentDebugID) { + checkDebugID(debugID); + checkDebugID(parentDebugID, true); + emitEvent('onBeforeMountComponent', debugID, element, parentDebugID); + markBegin(debugID, 'mount'); + }, + onMountComponent: function (debugID) { + checkDebugID(debugID); + markEnd(debugID, 'mount'); + emitEvent('onMountComponent', debugID); + }, + onBeforeUpdateComponent: function (debugID, element) { + checkDebugID(debugID); + emitEvent('onBeforeUpdateComponent', debugID, element); + markBegin(debugID, 'update'); + }, + onUpdateComponent: function (debugID) { + checkDebugID(debugID); + markEnd(debugID, 'update'); + emitEvent('onUpdateComponent', debugID); + }, + onBeforeUnmountComponent: function (debugID) { + checkDebugID(debugID); + emitEvent('onBeforeUnmountComponent', debugID); + markBegin(debugID, 'unmount'); + }, + onUnmountComponent: function (debugID) { + checkDebugID(debugID); + markEnd(debugID, 'unmount'); + emitEvent('onUnmountComponent', debugID); + }, + onTestEvent: function () { + emitEvent('onTestEvent'); + } }; -function trackInputValue() { - inputValueTracking.track(this); -} - -function trapBubbledEventsLocal() { - var inst = this; - // If a component renders to null or if another component fatals and causes - // the state of the tree to be corrupted, `node` here can be null. - !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0; - var node = getNode(inst); - !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0; +// TODO remove these when RN/www gets updated +ReactDebugTool.addDevtool = ReactDebugTool.addHook; +ReactDebugTool.removeDevtool = ReactDebugTool.removeHook; - switch (inst._tag) { - case 'iframe': - case 'object': - inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; - break; - case 'video': - case 'audio': - inst._wrapperState.listeners = []; - // Create listener for each media event - for (var event in mediaEvents) { - if (mediaEvents.hasOwnProperty(event)) { - inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node)); - } - } - break; - case 'source': - inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)]; - break; - case 'img': - inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; - break; - case 'form': - inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)]; - break; - case 'input': - case 'select': - case 'textarea': - inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)]; - break; - } +ReactDebugTool.addHook(ReactInvalidSetStateWarningHook); +ReactDebugTool.addHook(ReactComponentTreeHook); +var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; +if (/[?&]react_perf\b/.test(url)) { + ReactDebugTool.beginProfiling(); } -function postUpdateSelectWrapper() { - ReactDOMSelect.postUpdateWrapper(this); -} +module.exports = ReactDebugTool; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -// For HTML, certain tags should omit their close tag. We keep a whitelist for -// those special-case tags. +/***/ }), +/* 399 */ +/***/ (function(module, exports, __webpack_require__) { -var omittedCloseTags = { - area: true, - base: true, - br: true, - col: true, - embed: true, - hr: true, - img: true, - input: true, - keygen: true, - link: true, - meta: true, - param: true, - source: true, - track: true, - wbr: true - // NOTE: menuitem's close tag should be omitted, but that causes problems. -}; +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ -var newlineEatingTags = { - listing: true, - pre: true, - textarea: true -}; -// For HTML, certain tags cannot have children. This has the same purpose as -// `omittedCloseTags` except that `menuitem` should still have its closing tag. -var voidElementTags = _assign({ - menuitem: true -}, omittedCloseTags); +var warning = __webpack_require__(11); -// We accept any tag to be rendered but since this gets injected into arbitrary -// HTML, we want to make sure that it's a safe tag. -// http://www.w3.org/TR/REC-xml/#NT-Name +if (process.env.NODE_ENV !== 'production') { + var processingChildContext = false; -var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset -var validatedTagCache = {}; -var hasOwnProperty = {}.hasOwnProperty; + var warnInvalidSetState = function () { + process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0; + }; +} -function validateDangerousTag(tag) { - if (!hasOwnProperty.call(validatedTagCache, tag)) { - !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0; - validatedTagCache[tag] = true; +var ReactInvalidSetStateWarningHook = { + onBeginProcessingChildContext: function () { + processingChildContext = true; + }, + onEndProcessingChildContext: function () { + processingChildContext = false; + }, + onSetState: function () { + warnInvalidSetState(); } -} +}; -function isCustomComponent(tagName, props) { - return tagName.indexOf('-') >= 0 || props.is != null; -} +module.exports = ReactInvalidSetStateWarningHook; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -var globalIdCounter = 1; +/***/ }), +/* 400 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; /** - * Creates a new React class that is idempotent and capable of containing other - * React components. It accepts event listeners and DOM properties that are - * valid according to `DOMProperty`. - * - * - Event listeners: `onClick`, `onMouseDown`, etc. - * - DOM properties: `className`, `name`, `title`, etc. + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. * - * The `style` property functions differently from the DOM API. It accepts an - * object mapping of style properties to values. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @constructor ReactDOMComponent - * @extends ReactMultiChild + * */ -function ReactDOMComponent(element) { - var tag = element.type; - validateDangerousTag(tag); - this._currentElement = element; - this._tag = tag.toLowerCase(); - this._namespaceURI = null; - this._renderedChildren = null; - this._previousStyle = null; - this._previousStyleCopy = null; - this._hostNode = null; - this._hostParent = null; - this._rootNodeID = 0; - this._domID = 0; - this._hostContainerInfo = null; - this._wrapperState = null; - this._topLevelWrapper = null; - this._flags = 0; - if (process.env.NODE_ENV !== 'production') { - this._ancestorInfo = null; - setAndValidateContentChildDev.call(this, null); - } -} -ReactDOMComponent.displayName = 'ReactDOMComponent'; -ReactDOMComponent.Mixin = { - /** - * Generates root tag markup then recurses. This method has side effects and - * is not idempotent. - * - * @internal - * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction - * @param {?ReactDOMComponent} the parent component instance - * @param {?object} info about the host container - * @param {object} context - * @return {string} The computed markup. - */ - mountComponent: function (transaction, hostParent, hostContainerInfo, context) { - this._rootNodeID = globalIdCounter++; - this._domID = hostContainerInfo._idCounter++; - this._hostParent = hostParent; - this._hostContainerInfo = hostContainerInfo; - var props = this._currentElement.props; +var history = []; - switch (this._tag) { - case 'audio': - case 'form': - case 'iframe': - case 'img': - case 'link': - case 'object': - case 'source': - case 'video': - this._wrapperState = { - listeners: null - }; - transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); - break; - case 'input': - ReactDOMInput.mountWrapper(this, props, hostParent); - props = ReactDOMInput.getHostProps(this, props); - transaction.getReactMountReady().enqueue(trackInputValue, this); - transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); - break; - case 'option': - ReactDOMOption.mountWrapper(this, props, hostParent); - props = ReactDOMOption.getHostProps(this, props); - break; - case 'select': - ReactDOMSelect.mountWrapper(this, props, hostParent); - props = ReactDOMSelect.getHostProps(this, props); - transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); - break; - case 'textarea': - ReactDOMTextarea.mountWrapper(this, props, hostParent); - props = ReactDOMTextarea.getHostProps(this, props); - transaction.getReactMountReady().enqueue(trackInputValue, this); - transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); - break; +var ReactHostOperationHistoryHook = { + onHostOperation: function (operation) { + history.push(operation); + }, + clearHistory: function () { + if (ReactHostOperationHistoryHook._preventClearing) { + // Should only be used for tests. + return; } - assertValidProps(this, props); + history = []; + }, + getHistory: function () { + return history; + } +}; - // We create tags in the namespace of their parent container, except HTML - // tags get no namespace. - var namespaceURI; - var parentTag; - if (hostParent != null) { - namespaceURI = hostParent._namespaceURI; - parentTag = hostParent._tag; - } else if (hostContainerInfo._tag) { - namespaceURI = hostContainerInfo._namespaceURI; - parentTag = hostContainerInfo._tag; - } - if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') { - namespaceURI = DOMNamespaces.html; - } - if (namespaceURI === DOMNamespaces.html) { - if (this._tag === 'svg') { - namespaceURI = DOMNamespaces.svg; - } else if (this._tag === 'math') { - namespaceURI = DOMNamespaces.mathml; - } - } - this._namespaceURI = namespaceURI; +module.exports = ReactHostOperationHistoryHook; - if (process.env.NODE_ENV !== 'production') { - var parentInfo; - if (hostParent != null) { - parentInfo = hostParent._ancestorInfo; - } else if (hostContainerInfo._tag) { - parentInfo = hostContainerInfo._ancestorInfo; - } - if (parentInfo) { - // parentInfo should always be present except for the top-level - // component when server rendering - validateDOMNesting(this._tag, null, this, parentInfo); - } - this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this); - } +/***/ }), +/* 401 */ +/***/ (function(module, exports, __webpack_require__) { - var mountImage; - if (transaction.useCreateElement) { - var ownerDocument = hostContainerInfo._ownerDocument; - var el; - if (namespaceURI === DOMNamespaces.html) { - if (this._tag === 'script') { - // Create the script via .innerHTML so its "parser-inserted" flag is - // set to true and it does not execute - var div = ownerDocument.createElement('div'); - var type = this._currentElement.type; - div.innerHTML = '<' + type + '></' + type + '>'; - el = div.removeChild(div.firstChild); - } else if (props.is) { - el = ownerDocument.createElement(this._currentElement.type, props.is); - } else { - // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug. - // See discussion in https://github.com/facebook/react/pull/6896 - // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 - el = ownerDocument.createElement(this._currentElement.type); - } - } else { - el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type); - } - ReactDOMComponentTree.precacheNode(this, el); - this._flags |= Flags.hasCachedChildNodes; - if (!this._hostParent) { - DOMPropertyOperations.setAttributeForRoot(el); - } - this._updateDOMProperties(null, props, transaction); - var lazyTree = DOMLazyTree(el); - this._createInitialChildren(transaction, props, context, lazyTree); - mountImage = lazyTree; - } else { - var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props); - var tagContent = this._createContentMarkup(transaction, props, context); - if (!tagContent && omittedCloseTags[this._tag]) { - mountImage = tagOpen + '/>'; - } else { - mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>'; - } - } +"use strict"; - switch (this._tag) { - case 'input': - transaction.getReactMountReady().enqueue(inputPostMount, this); - if (props.autoFocus) { - transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); - } - break; - case 'textarea': - transaction.getReactMountReady().enqueue(textareaPostMount, this); - if (props.autoFocus) { - transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); - } - break; - case 'select': - if (props.autoFocus) { - transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); - } - break; - case 'button': - if (props.autoFocus) { - transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); - } - break; - case 'option': - transaction.getReactMountReady().enqueue(optionPostMount, this); - break; - } - return mountImage; - }, +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ - /** - * Creates markup for the open tag and all attributes. - * - * This method has side effects because events get registered. - * - * Iterating over object properties is faster than iterating over arrays. - * @see http://jsperf.com/obj-vs-arr-iteration - * - * @private - * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction - * @param {object} props - * @return {string} Markup of opening tag. - */ - _createOpenTagMarkupAndPutListeners: function (transaction, props) { - var ret = '<' + this._currentElement.type; +var performance = __webpack_require__(402); - for (var propKey in props) { - if (!props.hasOwnProperty(propKey)) { - continue; - } - var propValue = props[propKey]; - if (propValue == null) { - continue; - } - if (registrationNameModules.hasOwnProperty(propKey)) { - if (propValue) { - enqueuePutListener(this, propKey, propValue, transaction); - } - } else { - if (propKey === STYLE) { - if (propValue) { - if (process.env.NODE_ENV !== 'production') { - // See `_updateDOMProperties`. style block - this._previousStyle = propValue; - } - propValue = this._previousStyleCopy = _assign({}, props.style); - } - propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this); - } - var markup = null; - if (this._tag != null && isCustomComponent(this._tag, props)) { - if (!RESERVED_PROPS.hasOwnProperty(propKey)) { - markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue); - } - } else { - markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue); - } - if (markup) { - ret += ' ' + markup; - } - } - } +var performanceNow; - // For static pages, no need to put React ID and checksum. Saves lots of - // bytes. - if (transaction.renderToStaticMarkup) { - return ret; - } +/** + * Detect if we can use `window.performance.now()` and gracefully fallback to + * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now + * because of Facebook's testing infrastructure. + */ +if (performance.now) { + performanceNow = function performanceNow() { + return performance.now(); + }; +} else { + performanceNow = function performanceNow() { + return Date.now(); + }; +} - if (!this._hostParent) { - ret += ' ' + DOMPropertyOperations.createMarkupForRoot(); - } - ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID); - return ret; +module.exports = performanceNow; + +/***/ }), +/* 402 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + + +var ExecutionEnvironment = __webpack_require__(18); + +var performance; + +if (ExecutionEnvironment.canUseDOM) { + performance = window.performance || window.msPerformance || window.webkitPerformance; +} + +module.exports = performance || {}; + +/***/ }), +/* 403 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ + +var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; + +module.exports = DefaultEventPluginOrder; + +/***/ }), +/* 404 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPropagators = __webpack_require__(78); +var ReactDOMComponentTree = __webpack_require__(15); +var SyntheticMouseEvent = __webpack_require__(103); + +var eventTypes = { + mouseEnter: { + registrationName: 'onMouseEnter', + dependencies: ['topMouseOut', 'topMouseOver'] }, + mouseLeave: { + registrationName: 'onMouseLeave', + dependencies: ['topMouseOut', 'topMouseOver'] + } +}; + +var EnterLeaveEventPlugin = { + + eventTypes: eventTypes, /** - * Creates markup for the content between the tags. - * - * @private - * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction - * @param {object} props - * @param {object} context - * @return {string} Content markup. + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. */ - _createContentMarkup: function (transaction, props, context) { - var ret = ''; + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { + return null; + } + if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { + // Must not be a mouse in or mouse out - ignoring. + return null; + } - // Intentional use of != to avoid catching zero/false. - var innerHTML = props.dangerouslySetInnerHTML; - if (innerHTML != null) { - if (innerHTML.__html != null) { - ret = innerHTML.__html; - } + var win; + if (nativeEventTarget.window === nativeEventTarget) { + // `nativeEventTarget` is probably a window object. + win = nativeEventTarget; } else { - var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; - var childrenToUse = contentToUse != null ? null : props.children; - if (contentToUse != null) { - // TODO: Validate that text is allowed as a child of this node - ret = escapeTextContentForBrowser(contentToUse); - if (process.env.NODE_ENV !== 'production') { - setAndValidateContentChildDev.call(this, contentToUse); - } - } else if (childrenToUse != null) { - var mountImages = this.mountChildren(childrenToUse, transaction, context); - ret = mountImages.join(''); + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = nativeEventTarget.ownerDocument; + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; } } - if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') { - // text/html ignores the first character in these tags if it's a newline - // Prefer to break application/xml over text/html (for now) by adding - // a newline specifically to get eaten by the parser. (Alternately for - // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first - // \r is normalized out by HTMLTextAreaElement#value.) - // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> - // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> - // See: <http://www.w3.org/TR/html5/syntax.html#newlines> - // See: Parsing of "textarea" "listing" and "pre" elements - // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> - return '\n' + ret; + + var from; + var to; + if (topLevelType === 'topMouseOut') { + from = targetInst; + var related = nativeEvent.relatedTarget || nativeEvent.toElement; + to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; } else { - return ret; + // Moving to a node from outside the window. + from = null; + to = targetInst; } - }, - _createInitialChildren: function (transaction, props, context, lazyTree) { - // Intentional use of != to avoid catching zero/false. - var innerHTML = props.dangerouslySetInnerHTML; - if (innerHTML != null) { - if (innerHTML.__html != null) { - DOMLazyTree.queueHTML(lazyTree, innerHTML.__html); - } - } else { - var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; - var childrenToUse = contentToUse != null ? null : props.children; - // TODO: Validate that text is allowed as a child of this node - if (contentToUse != null) { - // Avoid setting textContent when the text is empty. In IE11 setting - // textContent on a text area will cause the placeholder to not - // show within the textarea until it has been focused and blurred again. - // https://github.com/facebook/react/issues/6731#issuecomment-254874553 - if (contentToUse !== '') { - if (process.env.NODE_ENV !== 'production') { - setAndValidateContentChildDev.call(this, contentToUse); - } - DOMLazyTree.queueText(lazyTree, contentToUse); - } - } else if (childrenToUse != null) { - var mountImages = this.mountChildren(childrenToUse, transaction, context); - for (var i = 0; i < mountImages.length; i++) { - DOMLazyTree.queueChild(lazyTree, mountImages[i]); - } - } + if (from === to) { + // Nothing pertains to our managed components. + return null; } - }, - /** - * Receives a next element and updates the component. - * - * @internal - * @param {ReactElement} nextElement - * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction - * @param {object} context - */ - receiveComponent: function (nextElement, transaction, context) { - var prevElement = this._currentElement; - this._currentElement = nextElement; - this.updateComponent(transaction, prevElement, nextElement, context); - }, + var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from); + var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to); - /** - * Updates a DOM component after it has already been allocated and - * attached to the DOM. Reconciles the root DOM node, then recurses. - * - * @param {ReactReconcileTransaction} transaction - * @param {ReactElement} prevElement - * @param {ReactElement} nextElement - * @internal - * @overridable - */ - updateComponent: function (transaction, prevElement, nextElement, context) { - var lastProps = prevElement.props; - var nextProps = this._currentElement.props; + var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget); + leave.type = 'mouseleave'; + leave.target = fromNode; + leave.relatedTarget = toNode; - switch (this._tag) { - case 'input': - lastProps = ReactDOMInput.getHostProps(this, lastProps); - nextProps = ReactDOMInput.getHostProps(this, nextProps); - break; - case 'option': - lastProps = ReactDOMOption.getHostProps(this, lastProps); - nextProps = ReactDOMOption.getHostProps(this, nextProps); - break; - case 'select': - lastProps = ReactDOMSelect.getHostProps(this, lastProps); - nextProps = ReactDOMSelect.getHostProps(this, nextProps); - break; - case 'textarea': - lastProps = ReactDOMTextarea.getHostProps(this, lastProps); - nextProps = ReactDOMTextarea.getHostProps(this, nextProps); - break; - } + var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget); + enter.type = 'mouseenter'; + enter.target = toNode; + enter.relatedTarget = fromNode; - assertValidProps(this, nextProps); - this._updateDOMProperties(lastProps, nextProps, transaction); - this._updateDOMChildren(lastProps, nextProps, transaction, context); + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to); - switch (this._tag) { - case 'input': - // Update the wrapper around inputs *after* updating props. This has to - // happen after `_updateDOMProperties`. Otherwise HTML5 input validations - // raise warnings and prevent the new value from being assigned. - ReactDOMInput.updateWrapper(this); - break; - case 'textarea': - ReactDOMTextarea.updateWrapper(this); - break; - case 'select': - // <select> value update needs to occur after <option> children - // reconciliation - transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this); - break; - } - }, + return [leave, enter]; + } - /** - * Reconciles the properties by detecting differences in property values and - * updating the DOM as necessary. This function is probably the single most - * critical path for performance optimization. - * - * TODO: Benchmark whether checking for changed values in memory actually - * improves performance (especially statically positioned elements). - * TODO: Benchmark the effects of putting this at the top since 99% of props - * do not change for a given reconciliation. - * TODO: Benchmark areas that can be improved with caching. - * - * @private - * @param {object} lastProps - * @param {object} nextProps - * @param {?DOMElement} node - */ - _updateDOMProperties: function (lastProps, nextProps, transaction) { - var propKey; - var styleName; - var styleUpdates; - for (propKey in lastProps) { - if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) { - continue; - } - if (propKey === STYLE) { - var lastStyle = this._previousStyleCopy; - for (styleName in lastStyle) { - if (lastStyle.hasOwnProperty(styleName)) { - styleUpdates = styleUpdates || {}; - styleUpdates[styleName] = ''; - } - } - this._previousStyleCopy = null; - } else if (registrationNameModules.hasOwnProperty(propKey)) { - if (lastProps[propKey]) { - // Only call deleteListener if there was a listener previously or - // else willDeleteListener gets called when there wasn't actually a - // listener (e.g., onClick={null}) - deleteListener(this, propKey); - } - } else if (isCustomComponent(this._tag, lastProps)) { - if (!RESERVED_PROPS.hasOwnProperty(propKey)) { - DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey); - } - } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { - DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey); - } - } - for (propKey in nextProps) { - var nextProp = nextProps[propKey]; - var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined; - if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) { - continue; - } - if (propKey === STYLE) { - if (nextProp) { - if (process.env.NODE_ENV !== 'production') { - checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this); - this._previousStyle = nextProp; - } - nextProp = this._previousStyleCopy = _assign({}, nextProp); - } else { - this._previousStyleCopy = null; - } - if (lastProp) { - // Unset styles on `lastProp` but not on `nextProp`. - for (styleName in lastProp) { - if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) { - styleUpdates = styleUpdates || {}; - styleUpdates[styleName] = ''; - } - } - // Update styles that changed since `lastProp`. - for (styleName in nextProp) { - if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { - styleUpdates = styleUpdates || {}; - styleUpdates[styleName] = nextProp[styleName]; - } - } - } else { - // Relies on `updateStylesByID` not mutating `styleUpdates`. - styleUpdates = nextProp; - } - } else if (registrationNameModules.hasOwnProperty(propKey)) { - if (nextProp) { - enqueuePutListener(this, propKey, nextProp, transaction); - } else if (lastProp) { - deleteListener(this, propKey); - } - } else if (isCustomComponent(this._tag, nextProps)) { - if (!RESERVED_PROPS.hasOwnProperty(propKey)) { - DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp); - } - } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { - var node = getNode(this); - // If we're updating to null or undefined, we should remove the property - // from the DOM node instead of inadvertently setting to a string. This - // brings us in line with the same behavior we have on initial render. - if (nextProp != null) { - DOMPropertyOperations.setValueForProperty(node, propKey, nextProp); - } else { - DOMPropertyOperations.deleteValueForProperty(node, propKey); - } - } - } - if (styleUpdates) { - CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this); - } - }, +}; - /** - * Reconciles the children with the various properties that affect the - * children content. - * - * @param {object} lastProps - * @param {object} nextProps - * @param {ReactReconcileTransaction} transaction - * @param {object} context - */ - _updateDOMChildren: function (lastProps, nextProps, transaction, context) { - var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; - var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; +module.exports = EnterLeaveEventPlugin; - var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html; - var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html; +/***/ }), +/* 405 */ +/***/ (function(module, exports, __webpack_require__) { - // Note the use of `!=` which checks for null or undefined. - var lastChildren = lastContent != null ? null : lastProps.children; - var nextChildren = nextContent != null ? null : nextProps.children; +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - // If we're switching from children to content/html or vice versa, remove - // the old content - var lastHasContentOrHtml = lastContent != null || lastHtml != null; - var nextHasContentOrHtml = nextContent != null || nextHtml != null; - if (lastChildren != null && nextChildren == null) { - this.updateChildren(null, transaction, context); - } else if (lastHasContentOrHtml && !nextHasContentOrHtml) { - this.updateTextContent(''); - if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); - } - } - if (nextContent != null) { - if (lastContent !== nextContent) { - this.updateTextContent('' + nextContent); - if (process.env.NODE_ENV !== 'production') { - setAndValidateContentChildDev.call(this, nextContent); - } - } - } else if (nextHtml != null) { - if (lastHtml !== nextHtml) { - this.updateMarkup('' + nextHtml); - } - if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); - } - } else if (nextChildren != null) { - if (process.env.NODE_ENV !== 'production') { - setAndValidateContentChildDev.call(this, null); - } - this.updateChildren(nextChildren, transaction, context); - } - }, +var DOMProperty = __webpack_require__(45); - getHostNode: function () { - return getNode(this); - }, +var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; +var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; +var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; +var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; +var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; - /** - * Destroys all event registrations for this instance. Does not remove from - * the DOM. That must be done by the parent. - * - * @internal - */ - unmountComponent: function (safely) { - switch (this._tag) { - case 'audio': - case 'form': - case 'iframe': - case 'img': - case 'link': - case 'object': - case 'source': - case 'video': - var listeners = this._wrapperState.listeners; - if (listeners) { - for (var i = 0; i < listeners.length; i++) { - listeners[i].remove(); - } - } - break; - case 'input': - case 'textarea': - inputValueTracking.stopTracking(this); - break; - case 'html': - case 'head': - case 'body': - /** - * Components like <html> <head> and <body> can't be removed or added - * easily in a cross-browser way, however it's valuable to be able to - * take advantage of React's reconciliation for styling and <title> - * management. So we just document it and throw in dangerous cases. - */ - true ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0; - break; - } +var HTMLDOMPropertyConfig = { + isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')), + Properties: { + /** + * Standard Properties + */ + accept: 0, + acceptCharset: 0, + accessKey: 0, + action: 0, + allowFullScreen: HAS_BOOLEAN_VALUE, + allowTransparency: 0, + alt: 0, + // specifies target context for links with `preload` type + as: 0, + async: HAS_BOOLEAN_VALUE, + autoComplete: 0, + // autoFocus is polyfilled/normalized by AutoFocusUtils + // autoFocus: HAS_BOOLEAN_VALUE, + autoPlay: HAS_BOOLEAN_VALUE, + capture: HAS_BOOLEAN_VALUE, + cellPadding: 0, + cellSpacing: 0, + charSet: 0, + challenge: 0, + checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + cite: 0, + classID: 0, + className: 0, + cols: HAS_POSITIVE_NUMERIC_VALUE, + colSpan: 0, + content: 0, + contentEditable: 0, + contextMenu: 0, + controls: HAS_BOOLEAN_VALUE, + coords: 0, + crossOrigin: 0, + data: 0, // For `<object />` acts as `src`. + dateTime: 0, + 'default': HAS_BOOLEAN_VALUE, + defer: HAS_BOOLEAN_VALUE, + dir: 0, + disabled: HAS_BOOLEAN_VALUE, + download: HAS_OVERLOADED_BOOLEAN_VALUE, + draggable: 0, + encType: 0, + form: 0, + formAction: 0, + formEncType: 0, + formMethod: 0, + formNoValidate: HAS_BOOLEAN_VALUE, + formTarget: 0, + frameBorder: 0, + headers: 0, + height: 0, + hidden: HAS_BOOLEAN_VALUE, + high: 0, + href: 0, + hrefLang: 0, + htmlFor: 0, + httpEquiv: 0, + icon: 0, + id: 0, + inputMode: 0, + integrity: 0, + is: 0, + keyParams: 0, + keyType: 0, + kind: 0, + label: 0, + lang: 0, + list: 0, + loop: HAS_BOOLEAN_VALUE, + low: 0, + manifest: 0, + marginHeight: 0, + marginWidth: 0, + max: 0, + maxLength: 0, + media: 0, + mediaGroup: 0, + method: 0, + min: 0, + minLength: 0, + // Caution; `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. + multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + name: 0, + nonce: 0, + noValidate: HAS_BOOLEAN_VALUE, + open: HAS_BOOLEAN_VALUE, + optimum: 0, + pattern: 0, + placeholder: 0, + playsInline: HAS_BOOLEAN_VALUE, + poster: 0, + preload: 0, + profile: 0, + radioGroup: 0, + readOnly: HAS_BOOLEAN_VALUE, + referrerPolicy: 0, + rel: 0, + required: HAS_BOOLEAN_VALUE, + reversed: HAS_BOOLEAN_VALUE, + role: 0, + rows: HAS_POSITIVE_NUMERIC_VALUE, + rowSpan: HAS_NUMERIC_VALUE, + sandbox: 0, + scope: 0, + scoped: HAS_BOOLEAN_VALUE, + scrolling: 0, + seamless: HAS_BOOLEAN_VALUE, + selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + shape: 0, + size: HAS_POSITIVE_NUMERIC_VALUE, + sizes: 0, + span: HAS_POSITIVE_NUMERIC_VALUE, + spellCheck: 0, + src: 0, + srcDoc: 0, + srcLang: 0, + srcSet: 0, + start: HAS_NUMERIC_VALUE, + step: 0, + style: 0, + summary: 0, + tabIndex: 0, + target: 0, + title: 0, + // Setting .type throws on non-<input> tags + type: 0, + useMap: 0, + value: 0, + width: 0, + wmode: 0, + wrap: 0, - this.unmountChildren(safely); - ReactDOMComponentTree.uncacheNode(this); - EventPluginHub.deleteAllListeners(this); - this._rootNodeID = 0; - this._domID = 0; - this._wrapperState = null; + /** + * RDFa Properties + */ + about: 0, + datatype: 0, + inlist: 0, + prefix: 0, + // property is also supported for OpenGraph in meta tags. + property: 0, + resource: 0, + 'typeof': 0, + vocab: 0, - if (process.env.NODE_ENV !== 'production') { - setAndValidateContentChildDev.call(this, null); - } + /** + * Non-standard Properties + */ + // autoCapitalize and autoCorrect are supported in Mobile Safari for + // keyboard hints. + autoCapitalize: 0, + autoCorrect: 0, + // autoSave allows WebKit/Blink to persist values of input fields on page reloads + autoSave: 0, + // color is for Safari mask-icon link + color: 0, + // itemProp, itemScope, itemType are for + // Microdata support. See http://schema.org/docs/gs.html + itemProp: 0, + itemScope: HAS_BOOLEAN_VALUE, + itemType: 0, + // itemID and itemRef are for Microdata support as well but + // only specified in the WHATWG spec document. See + // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api + itemID: 0, + itemRef: 0, + // results show looking glass icon and recent searches on input + // search fields in WebKit/Blink + results: 0, + // IE-only attribute that specifies security restrictions on an iframe + // as an alternative to the sandbox attribute on IE<10 + security: 0, + // IE-only attribute that controls focus behavior + unselectable: 0 }, - - getPublicInstance: function () { - return getNode(this); - } + DOMAttributeNames: { + acceptCharset: 'accept-charset', + className: 'class', + htmlFor: 'for', + httpEquiv: 'http-equiv' + }, + DOMPropertyNames: {} }; -_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin); - -module.exports = ReactDOMComponent; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +module.exports = HTMLDOMPropertyConfig; /***/ }), -/* 408 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31479,20 +31470,26 @@ module.exports = ReactDOMComponent; -var ReactDOMComponentTree = __webpack_require__(16); +var DOMChildrenOperations = __webpack_require__(155); +var ReactDOMIDOperations = __webpack_require__(411); -var focusNode = __webpack_require__(230); +/** + * Abstracts away all functionality of the reconciler that requires knowledge of + * the browser context. TODO: These callers should be refactored to avoid the + * need for this injection. + */ +var ReactComponentBrowserEnvironment = { + + processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, + + replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup -var AutoFocusUtils = { - focusDOMComponent: function () { - focusNode(ReactDOMComponentTree.getNodeFromInstance(this)); - } }; -module.exports = AutoFocusUtils; +module.exports = ReactComponentBrowserEnvironment; /***/ }), -/* 409 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31508,215 +31505,140 @@ module.exports = AutoFocusUtils; -var CSSProperty = __webpack_require__(231); -var ExecutionEnvironment = __webpack_require__(19); -var ReactInstrumentation = __webpack_require__(25); - -var camelizeStyleName = __webpack_require__(410); -var dangerousStyleValue = __webpack_require__(412); -var hyphenateStyleName = __webpack_require__(413); -var memoizeStringOnly = __webpack_require__(415); -var warning = __webpack_require__(11); - -var processStyleName = memoizeStringOnly(function (styleName) { - return hyphenateStyleName(styleName); -}); +var _prodInvariant = __webpack_require__(13); -var hasShorthandPropertyBug = false; -var styleFloatAccessor = 'cssFloat'; -if (ExecutionEnvironment.canUseDOM) { - var tempStyle = document.createElement('div').style; - try { - // IE8 throws "Invalid argument." if resetting shorthand style properties. - tempStyle.font = ''; - } catch (e) { - hasShorthandPropertyBug = true; - } - // IE8 only supports accessing cssFloat (standard) as styleFloat - if (document.documentElement.style.cssFloat === undefined) { - styleFloatAccessor = 'styleFloat'; - } -} +var DOMLazyTree = __webpack_require__(70); +var ExecutionEnvironment = __webpack_require__(18); -if (process.env.NODE_ENV !== 'production') { - // 'msTransform' is correct, but the other prefixes should be capitalized - var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; +var createNodesFromMarkup = __webpack_require__(408); +var emptyFunction = __webpack_require__(21); +var invariant = __webpack_require__(10); - // style values shouldn't contain a semicolon - var badStyleValueWithSemicolonPattern = /;\s*$/; +var Danger = { - var warnedStyleNames = {}; - var warnedStyleValues = {}; - var warnedForNaNValue = false; + /** + * Replaces a node with a string of markup at its current position within its + * parent. The markup must render into a single root node. + * + * @param {DOMElement} oldChild Child node to replace. + * @param {string} markup Markup to render in place of the child node. + * @internal + */ + dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) { + !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0; + !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0; + !(oldChild.nodeName !== 'HTML') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0; - var warnHyphenatedStyleName = function (name, owner) { - if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { - return; + if (typeof markup === 'string') { + var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; + oldChild.parentNode.replaceChild(newChild, oldChild); + } else { + DOMLazyTree.replaceChildWithTree(oldChild, markup); } + } - warnedStyleNames[name] = true; - process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0; - }; +}; - var warnBadVendoredStyleName = function (name, owner) { - if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { - return; - } +module.exports = Danger; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - warnedStyleNames[name] = true; - process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0; - }; +/***/ }), +/* 408 */ +/***/ (function(module, exports, __webpack_require__) { - var warnStyleValueWithSemicolon = function (name, value, owner) { - if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { - return; - } +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { - warnedStyleValues[value] = true; - process.env.NODE_ENV !== 'production' ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0; - }; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ - var warnStyleValueIsNaN = function (name, value, owner) { - if (warnedForNaNValue) { - return; - } +/*eslint-disable fb-www/unsafe-html*/ - warnedForNaNValue = true; - process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0; - }; +var ExecutionEnvironment = __webpack_require__(18); - var checkRenderMessage = function (owner) { - if (owner) { - var name = owner.getName(); - if (name) { - return ' Check the render method of `' + name + '`.'; - } - } - return ''; - }; +var createArrayFromMixed = __webpack_require__(409); +var getMarkupWrap = __webpack_require__(410); +var invariant = __webpack_require__(10); - /** - * @param {string} name - * @param {*} value - * @param {ReactDOMComponent} component - */ - var warnValidStyle = function (name, value, component) { - var owner; - if (component) { - owner = component._currentElement._owner; - } - if (name.indexOf('-') > -1) { - warnHyphenatedStyleName(name, owner); - } else if (badVendoredStyleNamePattern.test(name)) { - warnBadVendoredStyleName(name, owner); - } else if (badStyleValueWithSemicolonPattern.test(value)) { - warnStyleValueWithSemicolon(name, value, owner); - } +/** + * Dummy container used to render all markup. + */ +var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; - if (typeof value === 'number' && isNaN(value)) { - warnStyleValueIsNaN(name, value, owner); - } - }; +/** + * Pattern used by `getNodeName`. + */ +var nodeNamePattern = /^\s*<(\w+)/; + +/** + * Extracts the `nodeName` of the first element in a string of markup. + * + * @param {string} markup String of markup. + * @return {?string} Node name of the supplied markup. + */ +function getNodeName(markup) { + var nodeNameMatch = markup.match(nodeNamePattern); + return nodeNameMatch && nodeNameMatch[1].toLowerCase(); } /** - * Operations for dealing with CSS properties. + * Creates an array containing the nodes rendered from the supplied markup. The + * optionally supplied `handleScript` function will be invoked once for each + * <script> element that is rendered. If no `handleScript` function is supplied, + * an exception is thrown if any <script> elements are rendered. + * + * @param {string} markup A string of valid HTML markup. + * @param {?function} handleScript Invoked once for each rendered <script>. + * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. */ -var CSSPropertyOperations = { - /** - * Serializes a mapping of style properties for use as inline styles: - * - * > createMarkupForStyles({width: '200px', height: 0}) - * "width:200px;height:0;" - * - * Undefined values are ignored so that declarative programming is easier. - * The result should be HTML-escaped before insertion into the DOM. - * - * @param {object} styles - * @param {ReactDOMComponent} component - * @return {?string} - */ - createMarkupForStyles: function (styles, component) { - var serialized = ''; - for (var styleName in styles) { - if (!styles.hasOwnProperty(styleName)) { - continue; - } - var isCustomProperty = styleName.indexOf('--') === 0; - var styleValue = styles[styleName]; - if (process.env.NODE_ENV !== 'production') { - if (!isCustomProperty) { - warnValidStyle(styleName, styleValue, component); - } - } - if (styleValue != null) { - serialized += processStyleName(styleName) + ':'; - serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';'; - } - } - return serialized || null; - }, +function createNodesFromMarkup(markup, handleScript) { + var node = dummyNode; + !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0; + var nodeName = getNodeName(markup); - /** - * Sets the value for multiple styles on a node. If a value is specified as - * '' (empty string), the corresponding style property will be unset. - * - * @param {DOMElement} node - * @param {object} styles - * @param {ReactDOMComponent} component - */ - setValueForStyles: function (node, styles, component) { - if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation({ - instanceID: component._debugID, - type: 'update styles', - payload: styles - }); - } + var wrap = nodeName && getMarkupWrap(nodeName); + if (wrap) { + node.innerHTML = wrap[1] + markup + wrap[2]; - var style = node.style; - for (var styleName in styles) { - if (!styles.hasOwnProperty(styleName)) { - continue; - } - var isCustomProperty = styleName.indexOf('--') === 0; - if (process.env.NODE_ENV !== 'production') { - if (!isCustomProperty) { - warnValidStyle(styleName, styles[styleName], component); - } - } - var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty); - if (styleName === 'float' || styleName === 'cssFloat') { - styleName = styleFloatAccessor; - } - if (isCustomProperty) { - style.setProperty(styleName, styleValue); - } else if (styleValue) { - style[styleName] = styleValue; - } else { - var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; - if (expansion) { - // Shorthand property that IE8 won't like unsetting, so unset each - // component to placate it - for (var individualStyleName in expansion) { - style[individualStyleName] = ''; - } - } else { - style[styleName] = ''; - } - } + var wrapDepth = wrap[0]; + while (wrapDepth--) { + node = node.lastChild; } + } else { + node.innerHTML = markup; } -}; -module.exports = CSSPropertyOperations; + var scripts = node.getElementsByTagName('script'); + if (scripts.length) { + !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0; + createArrayFromMixed(scripts).forEach(handleScript); + } + + var nodes = Array.from(node.childNodes); + while (node.lastChild) { + node.removeChild(node.lastChild); + } + return nodes; +} + +module.exports = createNodesFromMarkup; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 410 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. @@ -31728,79 +31650,130 @@ module.exports = CSSPropertyOperations; * @typechecks */ - - -var camelize = __webpack_require__(411); - -var msPattern = /^-ms-/; +var invariant = __webpack_require__(10); /** - * Camelcases a hyphenated CSS property name, for example: - * - * > camelizeStyleName('background-color') - * < "backgroundColor" - * > camelizeStyleName('-moz-transition') - * < "MozTransition" - * > camelizeStyleName('-ms-transition') - * < "msTransition" + * Convert array-like objects to arrays. * - * As Andi Smith suggests - * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix - * is converted to lowercase `ms`. + * This API assumes the caller knows the contents of the data type. For less + * well defined inputs use createArrayFromMixed. * - * @param {string} string - * @return {string} + * @param {object|function|filelist} obj + * @return {array} */ -function camelizeStyleName(string) { - return camelize(string.replace(msPattern, 'ms-')); -} +function toArray(obj) { + var length = obj.length; -module.exports = camelizeStyleName; + // Some browsers builtin objects can report typeof 'function' (e.g. NodeList + // in old versions of Safari). + !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0; -/***/ }), -/* 411 */ -/***/ (function(module, exports, __webpack_require__) { + !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0; -"use strict"; + !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0; + + !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0; + + // Old IE doesn't give collections access to hasOwnProperty. Assume inputs + // without method will throw during the slice call and skip straight to the + // fallback. + if (obj.hasOwnProperty) { + try { + return Array.prototype.slice.call(obj); + } catch (e) { + // IE < 9 does not support Array#slice on collections objects + } + } + // Fall back to copying key by key. This assumes all keys have a value, + // so will not preserve sparsely populated inputs. + var ret = Array(length); + for (var ii = 0; ii < length; ii++) { + ret[ii] = obj[ii]; + } + return ret; +} /** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. + * Perform a heuristic test to determine if an object is "array-like". * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." * - * @typechecks + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} */ - -var _hyphenPattern = /-(.)/g; +function hasArrayNature(obj) { + return ( + // not null/false + !!obj && ( + // arrays are objects, NodeLists are functions in Safari + typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + 'length' in obj && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + typeof obj.nodeType != 'number' && ( + // a real array + Array.isArray(obj) || + // arguments + 'callee' in obj || + // HTMLCollection/NodeList + 'item' in obj) + ); +} /** - * Camelcases a hyphenated string, for example: + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. * - * > camelize('background-color') - * < "backgroundColor" + * This is mostly useful idiomatically: * - * @param {string} string - * @return {string} + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} */ -function camelize(string) { - return string.replace(_hyphenPattern, function (_, character) { - return character.toUpperCase(); - }); +function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + return toArray(obj); + } } -module.exports = camelize; +module.exports = createArrayFromMixed; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 412 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. +/* WEBPACK VAR INJECTION */(function(process) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -31809,960 +31782,1142 @@ module.exports = camelize; * */ +/*eslint-disable fb-www/unsafe-html */ +var ExecutionEnvironment = __webpack_require__(18); -var CSSProperty = __webpack_require__(231); -var warning = __webpack_require__(11); +var invariant = __webpack_require__(10); -var isUnitlessNumber = CSSProperty.isUnitlessNumber; -var styleWarnings = {}; +/** + * Dummy container used to detect which wraps are necessary. + */ +var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; /** - * Convert a value into the proper css writable value. The style name `name` - * should be logical (no hyphens), as specified - * in `CSSProperty.isUnitlessNumber`. + * Some browsers cannot use `innerHTML` to render certain elements standalone, + * so we wrap them, render the wrapped nodes, then extract the desired node. * - * @param {string} name CSS property name such as `topMargin`. - * @param {*} value CSS property value such as `10px`. - * @param {ReactDOMComponent} component - * @return {string} Normalized style value with dimensions applied. + * In IE8, certain elements cannot render alone, so wrap all elements ('*'). */ -function dangerousStyleValue(name, value, component, isCustomProperty) { - // Note that we've removed escapeTextForBrowser() calls here since the - // whole string will be escaped when the attribute is injected into - // the markup. If you provide unsafe user data here they can inject - // arbitrary CSS which may be problematic (I couldn't repro this): - // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet - // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ - // This is not an XSS hole but instead a potential CSS injection issue - // which has lead to a greater discussion about how we're going to - // trust URLs moving forward. See #2115901 - var isEmpty = value == null || typeof value === 'boolean' || value === ''; - if (isEmpty) { - return ''; - } +var shouldWrap = {}; - var isNonNumeric = isNaN(value); - if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { - return '' + value; // cast to string - } +var selectWrap = [1, '<select multiple="true">', '</select>']; +var tableWrap = [1, '<table>', '</table>']; +var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; - if (typeof value === 'string') { - if (process.env.NODE_ENV !== 'production') { - // Allow '0' to pass through without warning. 0 is already special and - // doesn't require units, so we don't need to warn about it. - if (component && value !== '0') { - var owner = component._currentElement._owner; - var ownerName = owner ? owner.getName() : null; - if (ownerName && !styleWarnings[ownerName]) { - styleWarnings[ownerName] = {}; - } - var warned = false; - if (ownerName) { - var warnings = styleWarnings[ownerName]; - warned = warnings[name]; - if (!warned) { - warnings[name] = true; - } - } - if (!warned) { - process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0; - } - } +var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>']; + +var markupWrap = { + '*': [1, '?<div>', '</div>'], + + 'area': [1, '<map>', '</map>'], + 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], + 'legend': [1, '<fieldset>', '</fieldset>'], + 'param': [1, '<object>', '</object>'], + 'tr': [2, '<table><tbody>', '</tbody></table>'], + + 'optgroup': selectWrap, + 'option': selectWrap, + + 'caption': tableWrap, + 'colgroup': tableWrap, + 'tbody': tableWrap, + 'tfoot': tableWrap, + 'thead': tableWrap, + + 'td': trWrap, + 'th': trWrap +}; + +// Initialize the SVG elements since we know they'll always need to be wrapped +// consistently. If they are created inside a <div> they will be initialized in +// the wrong namespace (and will not display). +var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan']; +svgElements.forEach(function (nodeName) { + markupWrap[nodeName] = svgWrap; + shouldWrap[nodeName] = true; +}); + +/** + * Gets the markup wrap configuration for the supplied `nodeName`. + * + * NOTE: This lazily detects which wraps are necessary for the current browser. + * + * @param {string} nodeName Lowercase `nodeName`. + * @return {?array} Markup wrap configuration, if applicable. + */ +function getMarkupWrap(nodeName) { + !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0; + if (!markupWrap.hasOwnProperty(nodeName)) { + nodeName = '*'; + } + if (!shouldWrap.hasOwnProperty(nodeName)) { + if (nodeName === '*') { + dummyNode.innerHTML = '<link />'; + } else { + dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; } - value = value.trim(); + shouldWrap[nodeName] = !dummyNode.firstChild; } - return value + 'px'; + return shouldWrap[nodeName] ? markupWrap[nodeName] : null; } -module.exports = dangerousStyleValue; +module.exports = getMarkupWrap; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 413 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @typechecks */ -var hyphenate = __webpack_require__(414); - -var msPattern = /^ms-/; +var DOMChildrenOperations = __webpack_require__(155); +var ReactDOMComponentTree = __webpack_require__(15); /** - * Hyphenates a camelcased CSS property name, for example: - * - * > hyphenateStyleName('backgroundColor') - * < "background-color" - * > hyphenateStyleName('MozTransition') - * < "-moz-transition" - * > hyphenateStyleName('msTransition') - * < "-ms-transition" - * - * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix - * is converted to `-ms-`. - * - * @param {string} string - * @return {string} + * Operations used to process updates to DOM nodes. */ -function hyphenateStyleName(string) { - return hyphenate(string).replace(msPattern, '-ms-'); -} +var ReactDOMIDOperations = { -module.exports = hyphenateStyleName; + /** + * Updates a component's children by processing a series of updates. + * + * @param {array<object>} updates List of update configurations. + * @internal + */ + dangerouslyProcessChildrenUpdates: function (parentInst, updates) { + var node = ReactDOMComponentTree.getNodeFromInstance(parentInst); + DOMChildrenOperations.processUpdates(node, updates); + } +}; + +module.exports = ReactDOMIDOperations; /***/ }), -/* 414 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - - -/** - * Copyright (c) 2013-present, Facebook, Inc. +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @typechecks */ -var _uppercasePattern = /([A-Z])/g; +/* global hasOwnProperty:true */ -/** - * Hyphenates a camelcased string, for example: - * - * > hyphenate('backgroundColor') - * < "background-color" - * - * For CSS style names, use `hyphenateStyleName` instead which works properly - * with all vendor prefixes, including `ms`. - * - * @param {string} string - * @return {string} - */ -function hyphenate(string) { - return string.replace(_uppercasePattern, '-$1').toLowerCase(); -} -module.exports = hyphenate; -/***/ }), -/* 415 */ -/***/ (function(module, exports, __webpack_require__) { +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - * @typechecks static-only - */ +var AutoFocusUtils = __webpack_require__(413); +var CSSPropertyOperations = __webpack_require__(414); +var DOMLazyTree = __webpack_require__(70); +var DOMNamespaces = __webpack_require__(156); +var DOMProperty = __webpack_require__(45); +var DOMPropertyOperations = __webpack_require__(235); +var EventPluginHub = __webpack_require__(79); +var EventPluginRegistry = __webpack_require__(101); +var ReactBrowserEventEmitter = __webpack_require__(106); +var ReactDOMComponentFlags = __webpack_require__(224); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactDOMInput = __webpack_require__(424); +var ReactDOMOption = __webpack_require__(425); +var ReactDOMSelect = __webpack_require__(237); +var ReactDOMTextarea = __webpack_require__(426); +var ReactInstrumentation = __webpack_require__(25); +var ReactMultiChild = __webpack_require__(427); +var ReactServerRenderingTransaction = __webpack_require__(436); +var emptyFunction = __webpack_require__(21); +var escapeTextContentForBrowser = __webpack_require__(105); +var invariant = __webpack_require__(10); +var isEventSupported = __webpack_require__(153); +var shallowEqual = __webpack_require__(82); +var validateDOMNesting = __webpack_require__(163); +var warning = __webpack_require__(11); +var Flags = ReactDOMComponentFlags; +var deleteListener = EventPluginHub.deleteListener; +var getNode = ReactDOMComponentTree.getNodeFromInstance; +var listenTo = ReactBrowserEventEmitter.listenTo; +var registrationNameModules = EventPluginRegistry.registrationNameModules; -/** - * Memoizes the return value of a function that accepts one string argument. - */ +// For quickly matching children type, to test if can be treated as content. +var CONTENT_TYPES = { 'string': true, 'number': true }; -function memoizeStringOnly(callback) { - var cache = {}; - return function (string) { - if (!cache.hasOwnProperty(string)) { - cache[string] = callback.call(this, string); +var STYLE = 'style'; +var HTML = '__html'; +var RESERVED_PROPS = { + children: null, + dangerouslySetInnerHTML: null, + suppressContentEditableWarning: null +}; + +// Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE). +var DOC_FRAGMENT_TYPE = 11; + +function getDeclarationErrorAddendum(internalInstance) { + if (internalInstance) { + var owner = internalInstance._currentElement._owner || null; + if (owner) { + var name = owner.getName(); + if (name) { + return ' This DOM node was rendered by `' + name + '`.'; + } } - return cache[string]; - }; + } + return ''; } -module.exports = memoizeStringOnly; - -/***/ }), -/* 416 */ -/***/ (function(module, exports, __webpack_require__) { +function friendlyStringify(obj) { + if (typeof obj === 'object') { + if (Array.isArray(obj)) { + return '[' + obj.map(friendlyStringify).join(', ') + ']'; + } else { + var pairs = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key); + pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key])); + } + } + return '{' + pairs.join(', ') + '}'; + } + } else if (typeof obj === 'string') { + return JSON.stringify(obj); + } else if (typeof obj === 'function') { + return '[function object]'; + } + // Differs from JSON.stringify in that undefined because undefined and that + // inf and nan don't become null + return String(obj); +} -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +var styleMutationWarning = {}; +function checkAndWarnForMutatedStyle(style1, style2, component) { + if (style1 == null || style2 == null) { + return; + } + if (shallowEqual(style1, style2)) { + return; + } + var componentName = component._tag; + var owner = component._currentElement._owner; + var ownerName; + if (owner) { + ownerName = owner.getName(); + } -var escapeTextContentForBrowser = __webpack_require__(105); + var hash = ownerName + '|' + componentName; -/** - * Escapes attribute value to prevent scripting attacks. - * - * @param {*} value Value to escape. - * @return {string} An escaped string. - */ -function quoteAttributeValueForBrowser(value) { - return '"' + escapeTextContentForBrowser(value) + '"'; -} + if (styleMutationWarning.hasOwnProperty(hash)) { + return; + } -module.exports = quoteAttributeValueForBrowser; + styleMutationWarning[hash] = true; -/***/ }), -/* 417 */ -/***/ (function(module, exports, __webpack_require__) { + process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0; +} -"use strict"; /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * + * @param {object} component + * @param {?object} props */ - - - -var EventPluginHub = __webpack_require__(78); - -function runEventQueueInBatch(events) { - EventPluginHub.enqueueEvents(events); - EventPluginHub.processEventQueue(false); +function assertValidProps(component, props) { + if (!props) { + return; + } + // Note the use of `==` which checks for null or undefined. + if (voidElementTags[component._tag]) { + !(props.children == null && props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0; + } + if (props.dangerouslySetInnerHTML != null) { + !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0; + !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0; + } + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0; + } + !(props.style == null || typeof props.style === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0; } -var ReactEventEmitterMixin = { - /** - * Streams a fired top-level event to `EventPluginHub` where plugins have the - * opportunity to create `ReactEvent`s to be dispatched. - */ - handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); - runEventQueueInBatch(events); +function enqueuePutListener(inst, registrationName, listener, transaction) { + if (transaction instanceof ReactServerRenderingTransaction) { + return; } -}; - -module.exports = ReactEventEmitterMixin; - -/***/ }), -/* 418 */ -/***/ (function(module, exports, __webpack_require__) { + if (process.env.NODE_ENV !== 'production') { + // IE8 has no API for event capturing and the `onScroll` event doesn't + // bubble. + process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0; + } + var containerInfo = inst._hostContainerInfo; + var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE; + var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument; + listenTo(registrationName, doc); + transaction.getReactMountReady().enqueue(putListener, { + inst: inst, + registrationName: registrationName, + listener: listener + }); +} -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +function putListener() { + var listenerToPut = this; + EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener); +} +function inputPostMount() { + var inst = this; + ReactDOMInput.postMountWrapper(inst); +} +function textareaPostMount() { + var inst = this; + ReactDOMTextarea.postMountWrapper(inst); +} -var ExecutionEnvironment = __webpack_require__(19); +function optionPostMount() { + var inst = this; + ReactDOMOption.postMountWrapper(inst); +} -/** - * Generate a mapping of standard vendor prefixes using the defined style property and event name. - * - * @param {string} styleProp - * @param {string} eventName - * @returns {object} - */ -function makePrefixMap(styleProp, eventName) { - var prefixes = {}; +var setAndValidateContentChildDev = emptyFunction; +if (process.env.NODE_ENV !== 'production') { + setAndValidateContentChildDev = function (content) { + var hasExistingContent = this._contentDebugID != null; + var debugID = this._debugID; + // This ID represents the inlined child that has no backing instance: + var contentDebugID = -debugID; - prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); - prefixes['Webkit' + styleProp] = 'webkit' + eventName; - prefixes['Moz' + styleProp] = 'moz' + eventName; - prefixes['ms' + styleProp] = 'MS' + eventName; - prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); + if (content == null) { + if (hasExistingContent) { + ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID); + } + this._contentDebugID = null; + return; + } - return prefixes; + validateDOMNesting(null, String(content), this, this._ancestorInfo); + this._contentDebugID = contentDebugID; + if (hasExistingContent) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content); + ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID); + } else { + ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID); + ReactInstrumentation.debugTool.onMountComponent(contentDebugID); + ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]); + } + }; } -/** - * A list of event names to a configurable list of vendor prefixes. - */ -var vendorPrefixes = { - animationend: makePrefixMap('Animation', 'AnimationEnd'), - animationiteration: makePrefixMap('Animation', 'AnimationIteration'), - animationstart: makePrefixMap('Animation', 'AnimationStart'), - transitionend: makePrefixMap('Transition', 'TransitionEnd') +// There are so many media events, it makes sense to just +// maintain a list rather than create a `trapBubbledEvent` for each +var mediaEvents = { + topAbort: 'abort', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topSeeked: 'seeked', + topSeeking: 'seeking', + topStalled: 'stalled', + topSuspend: 'suspend', + topTimeUpdate: 'timeupdate', + topVolumeChange: 'volumechange', + topWaiting: 'waiting' }; -/** - * Event names that have already been detected and prefixed (if applicable). - */ -var prefixedEventNames = {}; - -/** - * Element to check for prefixes on. - */ -var style = {}; - -/** - * Bootstrap if a DOM exists. - */ -if (ExecutionEnvironment.canUseDOM) { - style = document.createElement('div').style; +function trapBubbledEventsLocal() { + var inst = this; + // If a component renders to null or if another component fatals and causes + // the state of the tree to be corrupted, `node` here can be null. + !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0; + var node = getNode(inst); + !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0; - // On some platforms, in particular some releases of Android 4.x, - // the un-prefixed "animation" and "transition" properties are defined on the - // style object but the events that fire will still be prefixed, so we need - // to check if the un-prefixed events are usable, and if not remove them from the map. - if (!('AnimationEvent' in window)) { - delete vendorPrefixes.animationend.animation; - delete vendorPrefixes.animationiteration.animation; - delete vendorPrefixes.animationstart.animation; - } + switch (inst._tag) { + case 'iframe': + case 'object': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; + break; + case 'video': + case 'audio': - // Same as above - if (!('TransitionEvent' in window)) { - delete vendorPrefixes.transitionend.transition; + inst._wrapperState.listeners = []; + // Create listener for each media event + for (var event in mediaEvents) { + if (mediaEvents.hasOwnProperty(event)) { + inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node)); + } + } + break; + case 'source': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)]; + break; + case 'img': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; + break; + case 'form': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)]; + break; + case 'input': + case 'select': + case 'textarea': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)]; + break; } } -/** - * Attempts to determine the correct vendor prefixed event name. - * - * @param {string} eventName - * @returns {string} - */ -function getVendorPrefixedEventName(eventName) { - if (prefixedEventNames[eventName]) { - return prefixedEventNames[eventName]; - } else if (!vendorPrefixes[eventName]) { - return eventName; - } - - var prefixMap = vendorPrefixes[eventName]; - - for (var styleProp in prefixMap) { - if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { - return prefixedEventNames[eventName] = prefixMap[styleProp]; - } - } - - return ''; +function postUpdateSelectWrapper() { + ReactDOMSelect.postUpdateWrapper(this); } -module.exports = getVendorPrefixedEventName; - -/***/ }), -/* 419 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +// For HTML, certain tags should omit their close tag. We keep a whitelist for +// those special-case tags. +var omittedCloseTags = { + 'area': true, + 'base': true, + 'br': true, + 'col': true, + 'embed': true, + 'hr': true, + 'img': true, + 'input': true, + 'keygen': true, + 'link': true, + 'meta': true, + 'param': true, + 'source': true, + 'track': true, + 'wbr': true +}; +var newlineEatingTags = { + 'listing': true, + 'pre': true, + 'textarea': true +}; -var _prodInvariant = __webpack_require__(14), - _assign = __webpack_require__(15); +// For HTML, certain tags cannot have children. This has the same purpose as +// `omittedCloseTags` except that `menuitem` should still have its closing tag. -var DOMPropertyOperations = __webpack_require__(232); -var LinkedValueUtils = __webpack_require__(153); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactUpdates = __webpack_require__(32); +var voidElementTags = _assign({ + 'menuitem': true +}, omittedCloseTags); -var invariant = __webpack_require__(10); -var warning = __webpack_require__(11); +// We accept any tag to be rendered but since this gets injected into arbitrary +// HTML, we want to make sure that it's a safe tag. +// http://www.w3.org/TR/REC-xml/#NT-Name -var didWarnValueLink = false; -var didWarnCheckedLink = false; -var didWarnValueDefaultValue = false; -var didWarnCheckedDefaultChecked = false; -var didWarnControlledToUncontrolled = false; -var didWarnUncontrolledToControlled = false; +var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset +var validatedTagCache = {}; +var hasOwnProperty = {}.hasOwnProperty; -function forceUpdateIfMounted() { - if (this._rootNodeID) { - // DOM component is still mounted; update - ReactDOMInput.updateWrapper(this); +function validateDangerousTag(tag) { + if (!hasOwnProperty.call(validatedTagCache, tag)) { + !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0; + validatedTagCache[tag] = true; } } -function isControlled(props) { - var usesChecked = props.type === 'checkbox' || props.type === 'radio'; - return usesChecked ? props.checked != null : props.value != null; +function isCustomComponent(tagName, props) { + return tagName.indexOf('-') >= 0 || props.is != null; } +var globalIdCounter = 1; + /** - * Implements an <input> host component that allows setting these optional - * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. - * - * If `checked` or `value` are not supplied (or null/undefined), user actions - * that affect the checked state or value will trigger updates to the element. + * Creates a new React class that is idempotent and capable of containing other + * React components. It accepts event listeners and DOM properties that are + * valid according to `DOMProperty`. * - * If they are supplied (and not null/undefined), the rendered element will not - * trigger updates to the element. Instead, the props must change in order for - * the rendered element to be updated. + * - Event listeners: `onClick`, `onMouseDown`, etc. + * - DOM properties: `className`, `name`, `title`, etc. * - * The rendered element will be initialized as unchecked (or `defaultChecked`) - * with an empty value (or `defaultValue`). + * The `style` property functions differently from the DOM API. It accepts an + * object mapping of style properties to values. * - * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + * @constructor ReactDOMComponent + * @extends ReactMultiChild */ -var ReactDOMInput = { - getHostProps: function (inst, props) { - var value = LinkedValueUtils.getValue(props); - var checked = LinkedValueUtils.getChecked(props); +function ReactDOMComponent(element) { + var tag = element.type; + validateDangerousTag(tag); + this._currentElement = element; + this._tag = tag.toLowerCase(); + this._namespaceURI = null; + this._renderedChildren = null; + this._previousStyle = null; + this._previousStyleCopy = null; + this._hostNode = null; + this._hostParent = null; + this._rootNodeID = 0; + this._domID = 0; + this._hostContainerInfo = null; + this._wrapperState = null; + this._topLevelWrapper = null; + this._flags = 0; + if (process.env.NODE_ENV !== 'production') { + this._ancestorInfo = null; + setAndValidateContentChildDev.call(this, null); + } +} - var hostProps = _assign({ - // Make sure we set .type before any other properties (setting .value - // before .type means .value is lost in IE11 and below) - type: undefined, - // Make sure we set .step before .value (setting .value before .step - // means .value is rounded on mount, based upon step precision) - step: undefined, - // Make sure we set .min & .max before .value (to ensure proper order - // in corner cases such as min or max deriving from value, e.g. Issue #7170) - min: undefined, - max: undefined - }, props, { - defaultChecked: undefined, - defaultValue: undefined, - value: value != null ? value : inst._wrapperState.initialValue, - checked: checked != null ? checked : inst._wrapperState.initialChecked, - onChange: inst._wrapperState.onChange - }); +ReactDOMComponent.displayName = 'ReactDOMComponent'; - return hostProps; - }, +ReactDOMComponent.Mixin = { - mountWrapper: function (inst, props) { - if (process.env.NODE_ENV !== 'production') { - LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner); + /** + * Generates root tag markup then recurses. This method has side effects and + * is not idempotent. + * + * @internal + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?ReactDOMComponent} the parent component instance + * @param {?object} info about the host container + * @param {object} context + * @return {string} The computed markup. + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + this._rootNodeID = globalIdCounter++; + this._domID = hostContainerInfo._idCounter++; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; - var owner = inst._currentElement._owner; + var props = this._currentElement.props; - if (props.valueLink !== undefined && !didWarnValueLink) { - process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; - didWarnValueLink = true; - } - if (props.checkedLink !== undefined && !didWarnCheckedLink) { - process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; - didWarnCheckedLink = true; - } - if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { - process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; - didWarnCheckedDefaultChecked = true; - } - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { - process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; - didWarnValueDefaultValue = true; - } + switch (this._tag) { + case 'audio': + case 'form': + case 'iframe': + case 'img': + case 'link': + case 'object': + case 'source': + case 'video': + this._wrapperState = { + listeners: null + }; + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'input': + ReactDOMInput.mountWrapper(this, props, hostParent); + props = ReactDOMInput.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'option': + ReactDOMOption.mountWrapper(this, props, hostParent); + props = ReactDOMOption.getHostProps(this, props); + break; + case 'select': + ReactDOMSelect.mountWrapper(this, props, hostParent); + props = ReactDOMSelect.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'textarea': + ReactDOMTextarea.mountWrapper(this, props, hostParent); + props = ReactDOMTextarea.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; } - var defaultValue = props.defaultValue; - inst._wrapperState = { - initialChecked: props.checked != null ? props.checked : props.defaultChecked, - initialValue: props.value != null ? props.value : defaultValue, - listeners: null, - onChange: _handleChange.bind(inst), - controlled: isControlled(props) - }; - }, + assertValidProps(this, props); - updateWrapper: function (inst) { - var props = inst._currentElement.props; + // We create tags in the namespace of their parent container, except HTML + // tags get no namespace. + var namespaceURI; + var parentTag; + if (hostParent != null) { + namespaceURI = hostParent._namespaceURI; + parentTag = hostParent._tag; + } else if (hostContainerInfo._tag) { + namespaceURI = hostContainerInfo._namespaceURI; + parentTag = hostContainerInfo._tag; + } + if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') { + namespaceURI = DOMNamespaces.html; + } + if (namespaceURI === DOMNamespaces.html) { + if (this._tag === 'svg') { + namespaceURI = DOMNamespaces.svg; + } else if (this._tag === 'math') { + namespaceURI = DOMNamespaces.mathml; + } + } + this._namespaceURI = namespaceURI; if (process.env.NODE_ENV !== 'production') { - var controlled = isControlled(props); - var owner = inst._currentElement._owner; - - if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { - process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; - didWarnUncontrolledToControlled = true; + var parentInfo; + if (hostParent != null) { + parentInfo = hostParent._ancestorInfo; + } else if (hostContainerInfo._tag) { + parentInfo = hostContainerInfo._ancestorInfo; } - if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { - process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; - didWarnControlledToUncontrolled = true; + if (parentInfo) { + // parentInfo should always be present except for the top-level + // component when server rendering + validateDOMNesting(this._tag, null, this, parentInfo); } + this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this); } - // TODO: Shouldn't this be getChecked(props)? - var checked = props.checked; - if (checked != null) { - DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false); - } - - var node = ReactDOMComponentTree.getNodeFromInstance(inst); - var value = LinkedValueUtils.getValue(props); - if (value != null) { - if (value === 0 && node.value === '') { - node.value = '0'; - // Note: IE9 reports a number inputs as 'text', so check props instead. - } else if (props.type === 'number') { - // Simulate `input.valueAsNumber`. IE9 does not support it - var valueAsNumber = parseFloat(node.value, 10) || 0; - - if ( - // eslint-disable-next-line - value != valueAsNumber || - // eslint-disable-next-line - value == valueAsNumber && node.value != value) { - // Cast `value` to a string to ensure the value is set correctly. While - // browsers typically do this as necessary, jsdom doesn't. - node.value = '' + value; + var mountImage; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var el; + if (namespaceURI === DOMNamespaces.html) { + if (this._tag === 'script') { + // Create the script via .innerHTML so its "parser-inserted" flag is + // set to true and it does not execute + var div = ownerDocument.createElement('div'); + var type = this._currentElement.type; + div.innerHTML = '<' + type + '></' + type + '>'; + el = div.removeChild(div.firstChild); + } else if (props.is) { + el = ownerDocument.createElement(this._currentElement.type, props.is); + } else { + // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug. + // See discussion in https://github.com/facebook/react/pull/6896 + // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 + el = ownerDocument.createElement(this._currentElement.type); } - } else if (node.value !== '' + value) { - // Cast `value` to a string to ensure the value is set correctly. While - // browsers typically do this as necessary, jsdom doesn't. - node.value = '' + value; + } else { + el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type); } - } else { - if (props.value == null && props.defaultValue != null) { - // In Chrome, assigning defaultValue to certain input types triggers input validation. - // For number inputs, the display value loses trailing decimal points. For email inputs, - // Chrome raises "The specified value <x> is not a valid email address". - // - // Here we check to see if the defaultValue has actually changed, avoiding these problems - // when the user is inputting text - // - // https://github.com/facebook/react/issues/7253 - if (node.defaultValue !== '' + props.defaultValue) { - node.defaultValue = '' + props.defaultValue; - } + ReactDOMComponentTree.precacheNode(this, el); + this._flags |= Flags.hasCachedChildNodes; + if (!this._hostParent) { + DOMPropertyOperations.setAttributeForRoot(el); } - if (props.checked == null && props.defaultChecked != null) { - node.defaultChecked = !!props.defaultChecked; + this._updateDOMProperties(null, props, transaction); + var lazyTree = DOMLazyTree(el); + this._createInitialChildren(transaction, props, context, lazyTree); + mountImage = lazyTree; + } else { + var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props); + var tagContent = this._createContentMarkup(transaction, props, context); + if (!tagContent && omittedCloseTags[this._tag]) { + mountImage = tagOpen + '/>'; + } else { + mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>'; } } - }, - - postMountWrapper: function (inst) { - var props = inst._currentElement.props; - - // This is in postMount because we need access to the DOM node, which is not - // available until after the component has mounted. - var node = ReactDOMComponentTree.getNodeFromInstance(inst); - - // Detach value from defaultValue. We won't do anything if we're working on - // submit or reset inputs as those values & defaultValues are linked. They - // are not resetable nodes so this operation doesn't matter and actually - // removes browser-default values (eg "Submit Query") when no value is - // provided. - switch (props.type) { - case 'submit': - case 'reset': + switch (this._tag) { + case 'input': + transaction.getReactMountReady().enqueue(inputPostMount, this); + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } break; - case 'color': - case 'date': - case 'datetime': - case 'datetime-local': - case 'month': - case 'time': - case 'week': - // This fixes the no-show issue on iOS Safari and Android Chrome: - // https://github.com/facebook/react/issues/7233 - node.value = ''; - node.value = node.defaultValue; + case 'textarea': + transaction.getReactMountReady().enqueue(textareaPostMount, this); + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } break; - default: - node.value = node.value; + case 'select': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'button': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'option': + transaction.getReactMountReady().enqueue(optionPostMount, this); break; } - // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug - // this is needed to work around a chrome bug where setting defaultChecked - // will sometimes influence the value of checked (even after detachment). - // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 - // We need to temporarily unset name to avoid disrupting radio button groups. - var name = node.name; - if (name !== '') { - node.name = ''; - } - node.defaultChecked = !node.defaultChecked; - node.defaultChecked = !node.defaultChecked; - if (name !== '') { - node.name = name; - } - } -}; - -function _handleChange(event) { - var props = this._currentElement.props; - - var returnValue = LinkedValueUtils.executeOnChange(props, event); - - // Here we use asap to wait until all updates have propagated, which - // is important when using controlled components within layers: - // https://github.com/facebook/react/issues/1698 - ReactUpdates.asap(forceUpdateIfMounted, this); - - var name = props.name; - if (props.type === 'radio' && name != null) { - var rootNode = ReactDOMComponentTree.getNodeFromInstance(this); - var queryRoot = rootNode; - - while (queryRoot.parentNode) { - queryRoot = queryRoot.parentNode; - } + return mountImage; + }, - // If `rootNode.form` was non-null, then we could try `form.elements`, - // but that sometimes behaves strangely in IE8. We could also try using - // `form.getElementsByName`, but that will only return direct children - // and won't include inputs that use the HTML5 `form=` attribute. Since - // the input might not even be in a form, let's just use the global - // `querySelectorAll` to ensure we don't miss anything. - var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); + /** + * Creates markup for the open tag and all attributes. + * + * This method has side effects because events get registered. + * + * Iterating over object properties is faster than iterating over arrays. + * @see http://jsperf.com/obj-vs-arr-iteration + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props + * @return {string} Markup of opening tag. + */ + _createOpenTagMarkupAndPutListeners: function (transaction, props) { + var ret = '<' + this._currentElement.type; - for (var i = 0; i < group.length; i++) { - var otherNode = group[i]; - if (otherNode === rootNode || otherNode.form !== rootNode.form) { + for (var propKey in props) { + if (!props.hasOwnProperty(propKey)) { continue; } - // This will throw if radio buttons rendered by different copies of React - // and the same name are rendered into the same form (same as #1939). - // That's probably okay; we don't support it just as we don't support - // mixing React radio buttons with non-React ones. - var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode); - !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0; - // If this is a controlled radio button group, forcing the input that - // was previously checked to update will cause it to be come re-checked - // as appropriate. - ReactUpdates.asap(forceUpdateIfMounted, otherInstance); - } - } - - return returnValue; -} - -module.exports = ReactDOMInput; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 420 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - - -var _assign = __webpack_require__(15); - -var React = __webpack_require__(65); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactDOMSelect = __webpack_require__(234); - -var warning = __webpack_require__(11); -var didWarnInvalidOptionChildren = false; - -function flattenChildren(children) { - var content = ''; - - // Flatten children and warn if they aren't strings or numbers; - // invalid types are ignored. - React.Children.forEach(children, function (child) { - if (child == null) { - return; - } - if (typeof child === 'string' || typeof child === 'number') { - content += child; - } else if (!didWarnInvalidOptionChildren) { - didWarnInvalidOptionChildren = true; - process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0; - } - }); - - return content; -} - -/** - * Implements an <option> host component that warns when `selected` is set. - */ -var ReactDOMOption = { - mountWrapper: function (inst, props, hostParent) { - // TODO (yungsters): Remove support for `selected` in <option>. - if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0; - } - - // Look up whether this option is 'selected' - var selectValue = null; - if (hostParent != null) { - var selectParent = hostParent; - - if (selectParent._tag === 'optgroup') { - selectParent = selectParent._hostParent; - } - - if (selectParent != null && selectParent._tag === 'select') { - selectValue = ReactDOMSelect.getSelectValueContext(selectParent); + var propValue = props[propKey]; + if (propValue == null) { + continue; } - } - - // If the value is null (e.g., no specified value or after initial mount) - // or missing (e.g., for <datalist>), we don't change props.selected - var selected = null; - if (selectValue != null) { - var value; - if (props.value != null) { - value = props.value + ''; + if (registrationNameModules.hasOwnProperty(propKey)) { + if (propValue) { + enqueuePutListener(this, propKey, propValue, transaction); + } } else { - value = flattenChildren(props.children); - } - selected = false; - if (Array.isArray(selectValue)) { - // multiple - for (var i = 0; i < selectValue.length; i++) { - if ('' + selectValue[i] === value) { - selected = true; - break; + if (propKey === STYLE) { + if (propValue) { + if (process.env.NODE_ENV !== 'production') { + // See `_updateDOMProperties`. style block + this._previousStyle = propValue; + } + propValue = this._previousStyleCopy = _assign({}, props.style); } + propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this); + } + var markup = null; + if (this._tag != null && isCustomComponent(this._tag, props)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue); + } + } else { + markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue); + } + if (markup) { + ret += ' ' + markup; } - } else { - selected = '' + selectValue === value; } } - inst._wrapperState = { selected: selected }; - }, + // For static pages, no need to put React ID and checksum. Saves lots of + // bytes. + if (transaction.renderToStaticMarkup) { + return ret; + } - postMountWrapper: function (inst) { - // value="" should make a value attribute (#6219) - var props = inst._currentElement.props; - if (props.value != null) { - var node = ReactDOMComponentTree.getNodeFromInstance(inst); - node.setAttribute('value', props.value); + if (!this._hostParent) { + ret += ' ' + DOMPropertyOperations.createMarkupForRoot(); } + ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID); + return ret; }, - getHostProps: function (inst, props) { - var hostProps = _assign({ selected: undefined, children: undefined }, props); + /** + * Creates markup for the content between the tags. + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props + * @param {object} context + * @return {string} Content markup. + */ + _createContentMarkup: function (transaction, props, context) { + var ret = ''; - // Read state only from initial mount because <select> updates value - // manually; we need the initial state only for server rendering - if (inst._wrapperState.selected != null) { - hostProps.selected = inst._wrapperState.selected; + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + ret = innerHTML.__html; + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + if (contentToUse != null) { + // TODO: Validate that text is allowed as a child of this node + ret = escapeTextContentForBrowser(contentToUse); + if (process.env.NODE_ENV !== 'production') { + setAndValidateContentChildDev.call(this, contentToUse); + } + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + ret = mountImages.join(''); + } } + if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + return '\n' + ret; + } else { + return ret; + } + }, - var content = flattenChildren(props.children); - - if (content) { - hostProps.children = content; + _createInitialChildren: function (transaction, props, context, lazyTree) { + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + DOMLazyTree.queueHTML(lazyTree, innerHTML.__html); + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + // TODO: Validate that text is allowed as a child of this node + if (contentToUse != null) { + // Avoid setting textContent when the text is empty. In IE11 setting + // textContent on a text area will cause the placeholder to not + // show within the textarea until it has been focused and blurred again. + // https://github.com/facebook/react/issues/6731#issuecomment-254874553 + if (contentToUse !== '') { + if (process.env.NODE_ENV !== 'production') { + setAndValidateContentChildDev.call(this, contentToUse); + } + DOMLazyTree.queueText(lazyTree, contentToUse); + } + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + for (var i = 0; i < mountImages.length; i++) { + DOMLazyTree.queueChild(lazyTree, mountImages[i]); + } + } } + }, - return hostProps; - } -}; - -module.exports = ReactDOMOption; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 421 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - + /** + * Receives a next element and updates the component. + * + * @internal + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} context + */ + receiveComponent: function (nextElement, transaction, context) { + var prevElement = this._currentElement; + this._currentElement = nextElement; + this.updateComponent(transaction, prevElement, nextElement, context); + }, -var _prodInvariant = __webpack_require__(14), - _assign = __webpack_require__(15); + /** + * Updates a DOM component after it has already been allocated and + * attached to the DOM. Reconciles the root DOM node, then recurses. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevElement + * @param {ReactElement} nextElement + * @internal + * @overridable + */ + updateComponent: function (transaction, prevElement, nextElement, context) { + var lastProps = prevElement.props; + var nextProps = this._currentElement.props; -var LinkedValueUtils = __webpack_require__(153); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactUpdates = __webpack_require__(32); + switch (this._tag) { + case 'input': + lastProps = ReactDOMInput.getHostProps(this, lastProps); + nextProps = ReactDOMInput.getHostProps(this, nextProps); + break; + case 'option': + lastProps = ReactDOMOption.getHostProps(this, lastProps); + nextProps = ReactDOMOption.getHostProps(this, nextProps); + break; + case 'select': + lastProps = ReactDOMSelect.getHostProps(this, lastProps); + nextProps = ReactDOMSelect.getHostProps(this, nextProps); + break; + case 'textarea': + lastProps = ReactDOMTextarea.getHostProps(this, lastProps); + nextProps = ReactDOMTextarea.getHostProps(this, nextProps); + break; + } -var invariant = __webpack_require__(10); -var warning = __webpack_require__(11); + assertValidProps(this, nextProps); + this._updateDOMProperties(lastProps, nextProps, transaction); + this._updateDOMChildren(lastProps, nextProps, transaction, context); -var didWarnValueLink = false; -var didWarnValDefaultVal = false; + switch (this._tag) { + case 'input': + // Update the wrapper around inputs *after* updating props. This has to + // happen after `_updateDOMProperties`. Otherwise HTML5 input validations + // raise warnings and prevent the new value from being assigned. + ReactDOMInput.updateWrapper(this); + break; + case 'textarea': + ReactDOMTextarea.updateWrapper(this); + break; + case 'select': + // <select> value update needs to occur after <option> children + // reconciliation + transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this); + break; + } + }, -function forceUpdateIfMounted() { - if (this._rootNodeID) { - // DOM component is still mounted; update - ReactDOMTextarea.updateWrapper(this); - } -} + /** + * Reconciles the properties by detecting differences in property values and + * updating the DOM as necessary. This function is probably the single most + * critical path for performance optimization. + * + * TODO: Benchmark whether checking for changed values in memory actually + * improves performance (especially statically positioned elements). + * TODO: Benchmark the effects of putting this at the top since 99% of props + * do not change for a given reconciliation. + * TODO: Benchmark areas that can be improved with caching. + * + * @private + * @param {object} lastProps + * @param {object} nextProps + * @param {?DOMElement} node + */ + _updateDOMProperties: function (lastProps, nextProps, transaction) { + var propKey; + var styleName; + var styleUpdates; + for (propKey in lastProps) { + if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) { + continue; + } + if (propKey === STYLE) { + var lastStyle = this._previousStyleCopy; + for (styleName in lastStyle) { + if (lastStyle.hasOwnProperty(styleName)) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + this._previousStyleCopy = null; + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (lastProps[propKey]) { + // Only call deleteListener if there was a listener previously or + // else willDeleteListener gets called when there wasn't actually a + // listener (e.g., onClick={null}) + deleteListener(this, propKey); + } + } else if (isCustomComponent(this._tag, lastProps)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey); + } + } + for (propKey in nextProps) { + var nextProp = nextProps[propKey]; + var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined; + if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) { + continue; + } + if (propKey === STYLE) { + if (nextProp) { + if (process.env.NODE_ENV !== 'production') { + checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this); + this._previousStyle = nextProp; + } + nextProp = this._previousStyleCopy = _assign({}, nextProp); + } else { + this._previousStyleCopy = null; + } + if (lastProp) { + // Unset styles on `lastProp` but not on `nextProp`. + for (styleName in lastProp) { + if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + // Update styles that changed since `lastProp`. + for (styleName in nextProp) { + if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = nextProp[styleName]; + } + } + } else { + // Relies on `updateStylesByID` not mutating `styleUpdates`. + styleUpdates = nextProp; + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp) { + enqueuePutListener(this, propKey, nextProp, transaction); + } else if (lastProp) { + deleteListener(this, propKey); + } + } else if (isCustomComponent(this._tag, nextProps)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + var node = getNode(this); + // If we're updating to null or undefined, we should remove the property + // from the DOM node instead of inadvertently setting to a string. This + // brings us in line with the same behavior we have on initial render. + if (nextProp != null) { + DOMPropertyOperations.setValueForProperty(node, propKey, nextProp); + } else { + DOMPropertyOperations.deleteValueForProperty(node, propKey); + } + } + } + if (styleUpdates) { + CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this); + } + }, -/** - * Implements a <textarea> host component that allows setting `value`, and - * `defaultValue`. This differs from the traditional DOM API because value is - * usually set as PCDATA children. - * - * If `value` is not supplied (or null/undefined), user actions that affect the - * value will trigger updates to the element. - * - * If `value` is supplied (and not null/undefined), the rendered element will - * not trigger updates to the element. Instead, the `value` prop must change in - * order for the rendered element to be updated. - * - * The rendered element will be initialized with an empty value, the prop - * `defaultValue` if specified, or the children content (deprecated). - */ -var ReactDOMTextarea = { - getHostProps: function (inst, props) { - !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0; + /** + * Reconciles the children with the various properties that affect the + * children content. + * + * @param {object} lastProps + * @param {object} nextProps + * @param {ReactReconcileTransaction} transaction + * @param {object} context + */ + _updateDOMChildren: function (lastProps, nextProps, transaction, context) { + var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; + var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; - // Always set children to the same thing. In IE9, the selection range will - // get reset if `textContent` is mutated. We could add a check in setTextContent - // to only set the value if/when the value differs from the node value (which would - // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution. - // The value can be a boolean or object so that's why it's forced to be a string. - var hostProps = _assign({}, props, { - value: undefined, - defaultValue: undefined, - children: '' + inst._wrapperState.initialValue, - onChange: inst._wrapperState.onChange - }); + var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html; + var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html; - return hostProps; - }, + // Note the use of `!=` which checks for null or undefined. + var lastChildren = lastContent != null ? null : lastProps.children; + var nextChildren = nextContent != null ? null : nextProps.children; - mountWrapper: function (inst, props) { - if (process.env.NODE_ENV !== 'production') { - LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner); - if (props.valueLink !== undefined && !didWarnValueLink) { - process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0; - didWarnValueLink = true; - } - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0; - didWarnValDefaultVal = true; + // If we're switching from children to content/html or vice versa, remove + // the old content + var lastHasContentOrHtml = lastContent != null || lastHtml != null; + var nextHasContentOrHtml = nextContent != null || nextHtml != null; + if (lastChildren != null && nextChildren == null) { + this.updateChildren(null, transaction, context); + } else if (lastHasContentOrHtml && !nextHasContentOrHtml) { + this.updateTextContent(''); + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); } } - var value = LinkedValueUtils.getValue(props); - var initialValue = value; - - // Only bother fetching default value if we're going to use it - if (value == null) { - var defaultValue = props.defaultValue; - // TODO (yungsters): Remove support for children content in <textarea>. - var children = props.children; - if (children != null) { + if (nextContent != null) { + if (lastContent !== nextContent) { + this.updateTextContent('' + nextContent); if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0; - } - !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0; - if (Array.isArray(children)) { - !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0; - children = children[0]; + setAndValidateContentChildDev.call(this, nextContent); } - - defaultValue = '' + children; } - if (defaultValue == null) { - defaultValue = ''; + } else if (nextHtml != null) { + if (lastHtml !== nextHtml) { + this.updateMarkup('' + nextHtml); } - initialValue = defaultValue; + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); + } + } else if (nextChildren != null) { + if (process.env.NODE_ENV !== 'production') { + setAndValidateContentChildDev.call(this, null); + } + + this.updateChildren(nextChildren, transaction, context); } + }, - inst._wrapperState = { - initialValue: '' + initialValue, - listeners: null, - onChange: _handleChange.bind(inst) - }; + getHostNode: function () { + return getNode(this); }, - updateWrapper: function (inst) { - var props = inst._currentElement.props; + /** + * Destroys all event registrations for this instance. Does not remove from + * the DOM. That must be done by the parent. + * + * @internal + */ + unmountComponent: function (safely) { + switch (this._tag) { + case 'audio': + case 'form': + case 'iframe': + case 'img': + case 'link': + case 'object': + case 'source': + case 'video': + var listeners = this._wrapperState.listeners; + if (listeners) { + for (var i = 0; i < listeners.length; i++) { + listeners[i].remove(); + } + } + break; + case 'html': + case 'head': + case 'body': + /** + * Components like <html> <head> and <body> can't be removed or added + * easily in a cross-browser way, however it's valuable to be able to + * take advantage of React's reconciliation for styling and <title> + * management. So we just document it and throw in dangerous cases. + */ + true ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0; + break; + } - var node = ReactDOMComponentTree.getNodeFromInstance(inst); - var value = LinkedValueUtils.getValue(props); - if (value != null) { - // Cast `value` to a string to ensure the value is set correctly. While - // browsers typically do this as necessary, jsdom doesn't. - var newValue = '' + value; + this.unmountChildren(safely); + ReactDOMComponentTree.uncacheNode(this); + EventPluginHub.deleteAllListeners(this); + this._rootNodeID = 0; + this._domID = 0; + this._wrapperState = null; - // To avoid side effects (such as losing text selection), only set value if changed - if (newValue !== node.value) { - node.value = newValue; - } - if (props.defaultValue == null) { - node.defaultValue = newValue; - } - } - if (props.defaultValue != null) { - node.defaultValue = props.defaultValue; + if (process.env.NODE_ENV !== 'production') { + setAndValidateContentChildDev.call(this, null); } }, - postMountWrapper: function (inst) { - // This is in postMount because we need access to the DOM node, which is not - // available until after the component has mounted. - var node = ReactDOMComponentTree.getNodeFromInstance(inst); - var textContent = node.textContent; - - // Only set node.value if textContent is equal to the expected - // initial value. In IE10/IE11 there is a bug where the placeholder attribute - // will populate textContent as well. - // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ - if (textContent === inst._wrapperState.initialValue) { - node.value = textContent; - } + getPublicInstance: function () { + return getNode(this); } + }; -function _handleChange(event) { - var props = this._currentElement.props; - var returnValue = LinkedValueUtils.executeOnChange(props, event); - ReactUpdates.asap(forceUpdateIfMounted, this); - return returnValue; -} +_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin); -module.exports = ReactDOMTextarea; +module.exports = ReactDOMComponent; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 422 */ +/* 413 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** +/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -32774,602 +32929,317 @@ module.exports = ReactDOMTextarea; -var _prodInvariant = __webpack_require__(14); +var ReactDOMComponentTree = __webpack_require__(15); -var ReactComponentEnvironment = __webpack_require__(154); -var ReactInstanceMap = __webpack_require__(80); -var ReactInstrumentation = __webpack_require__(25); +var focusNode = __webpack_require__(233); -var ReactCurrentOwner = __webpack_require__(30); -var ReactReconciler = __webpack_require__(67); -var ReactChildReconciler = __webpack_require__(423); +var AutoFocusUtils = { + focusDOMComponent: function () { + focusNode(ReactDOMComponentTree.getNodeFromInstance(this)); + } +}; -var emptyFunction = __webpack_require__(23); -var flattenChildren = __webpack_require__(430); -var invariant = __webpack_require__(10); +module.exports = AutoFocusUtils; -/** - * Make an update for markup to be rendered and inserted at a supplied index. - * - * @param {string} markup Markup that renders into an element. - * @param {number} toIndex Destination index. - * @private - */ -function makeInsertMarkup(markup, afterNode, toIndex) { - // NOTE: Null values reduce hidden classes. - return { - type: 'INSERT_MARKUP', - content: markup, - fromIndex: null, - fromNode: null, - toIndex: toIndex, - afterNode: afterNode - }; -} +/***/ }), +/* 414 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Make an update for moving an existing element to another index. +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. * - * @param {number} fromIndex Source index of the existing element. - * @param {number} toIndex Destination index of the element. - * @private - */ -function makeMove(child, afterNode, toIndex) { - // NOTE: Null values reduce hidden classes. - return { - type: 'MOVE_EXISTING', - content: null, - fromIndex: child._mountIndex, - fromNode: ReactReconciler.getHostNode(child), - toIndex: toIndex, - afterNode: afterNode - }; -} - -/** - * Make an update for removing an element at an index. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @param {number} fromIndex Index of the element to remove. - * @private */ -function makeRemove(child, node) { - // NOTE: Null values reduce hidden classes. - return { - type: 'REMOVE_NODE', - content: null, - fromIndex: child._mountIndex, - fromNode: node, - toIndex: null, - afterNode: null - }; -} -/** - * Make an update for setting the markup of a node. - * - * @param {string} markup Markup that renders into an element. - * @private - */ -function makeSetMarkup(markup) { - // NOTE: Null values reduce hidden classes. - return { - type: 'SET_MARKUP', - content: markup, - fromIndex: null, - fromNode: null, - toIndex: null, - afterNode: null - }; -} -/** - * Make an update for setting the text content. - * - * @param {string} textContent Text content to set. - * @private - */ -function makeTextContent(textContent) { - // NOTE: Null values reduce hidden classes. - return { - type: 'TEXT_CONTENT', - content: textContent, - fromIndex: null, - fromNode: null, - toIndex: null, - afterNode: null - }; -} -/** - * Push an update, if any, onto the queue. Creates a new queue if none is - * passed and always returns the queue. Mutative. - */ -function enqueue(queue, update) { - if (update) { - queue = queue || []; - queue.push(update); - } - return queue; -} +var CSSProperty = __webpack_require__(234); +var ExecutionEnvironment = __webpack_require__(18); +var ReactInstrumentation = __webpack_require__(25); -/** - * Processes any enqueued updates. - * - * @private - */ -function processQueue(inst, updateQueue) { - ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue); +var camelizeStyleName = __webpack_require__(415); +var dangerousStyleValue = __webpack_require__(417); +var hyphenateStyleName = __webpack_require__(418); +var memoizeStringOnly = __webpack_require__(420); +var warning = __webpack_require__(11); + +var processStyleName = memoizeStringOnly(function (styleName) { + return hyphenateStyleName(styleName); +}); + +var hasShorthandPropertyBug = false; +var styleFloatAccessor = 'cssFloat'; +if (ExecutionEnvironment.canUseDOM) { + var tempStyle = document.createElement('div').style; + try { + // IE8 throws "Invalid argument." if resetting shorthand style properties. + tempStyle.font = ''; + } catch (e) { + hasShorthandPropertyBug = true; + } + // IE8 only supports accessing cssFloat (standard) as styleFloat + if (document.documentElement.style.cssFloat === undefined) { + styleFloatAccessor = 'styleFloat'; + } } -var setChildrenForInstrumentation = emptyFunction; if (process.env.NODE_ENV !== 'production') { - var getDebugID = function (inst) { - if (!inst._debugID) { - // Check for ART-like instances. TODO: This is silly/gross. - var internal; - if (internal = ReactInstanceMap.get(inst)) { - inst = internal; + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + + // style values shouldn't contain a semicolon + var badStyleValueWithSemicolonPattern = /;\s*$/; + + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + + var warnHyphenatedStyleName = function (name, owner) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0; + }; + + var warnBadVendoredStyleName = function (name, owner) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0; + }; + + var warnStyleValueWithSemicolon = function (name, value, owner) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0; + }; + + var warnStyleValueIsNaN = function (name, value, owner) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0; + }; + + var checkRenderMessage = function (owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; } } - return inst._debugID; + return ''; }; - setChildrenForInstrumentation = function (children) { - var debugID = getDebugID(this); - // TODO: React Native empty components are also multichild. - // This means they still get into this method but don't have _debugID. - if (debugID !== 0) { - ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) { - return children[key]._debugID; - }) : []); + + /** + * @param {string} name + * @param {*} value + * @param {ReactDOMComponent} component + */ + var warnValidStyle = function (name, value, component) { + var owner; + if (component) { + owner = component._currentElement._owner; + } + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name, owner); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name, owner); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value, owner); + } + + if (typeof value === 'number' && isNaN(value)) { + warnStyleValueIsNaN(name, value, owner); } }; } /** - * ReactMultiChild are capable of reconciling multiple children. - * - * @class ReactMultiChild - * @internal + * Operations for dealing with CSS properties. */ -var ReactMultiChild = { +var CSSPropertyOperations = { + /** - * Provides common functionality for components that must reconcile multiple - * children. This is used by `ReactDOMComponent` to mount, update, and - * unmount child components. + * Serializes a mapping of style properties for use as inline styles: * - * @lends {ReactMultiChild.prototype} + * > createMarkupForStyles({width: '200px', height: 0}) + * "width:200px;height:0;" + * + * Undefined values are ignored so that declarative programming is easier. + * The result should be HTML-escaped before insertion into the DOM. + * + * @param {object} styles + * @param {ReactDOMComponent} component + * @return {?string} */ - Mixin: { - _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) { - if (process.env.NODE_ENV !== 'production') { - var selfDebugID = getDebugID(this); - if (this._currentElement) { - try { - ReactCurrentOwner.current = this._currentElement._owner; - return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID); - } finally { - ReactCurrentOwner.current = null; - } - } + createMarkupForStyles: function (styles, component) { + var serialized = ''; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; } - return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); - }, - - _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) { - var nextChildren; - var selfDebugID = 0; + var styleValue = styles[styleName]; if (process.env.NODE_ENV !== 'production') { - selfDebugID = getDebugID(this); - if (this._currentElement) { - try { - ReactCurrentOwner.current = this._currentElement._owner; - nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); - } finally { - ReactCurrentOwner.current = null; - } - ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); - return nextChildren; - } - } - nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); - ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); - return nextChildren; - }, - - /** - * Generates a "mount image" for each of the supplied children. In the case - * of `ReactDOMComponent`, a mount image is a string of markup. - * - * @param {?object} nestedChildren Nested child maps. - * @return {array} An array of mounted representations. - * @internal - */ - mountChildren: function (nestedChildren, transaction, context) { - var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context); - this._renderedChildren = children; - - var mountImages = []; - var index = 0; - for (var name in children) { - if (children.hasOwnProperty(name)) { - var child = children[name]; - var selfDebugID = 0; - if (process.env.NODE_ENV !== 'production') { - selfDebugID = getDebugID(this); - } - var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID); - child._mountIndex = index++; - mountImages.push(mountImage); - } + warnValidStyle(styleName, styleValue, component); } - - if (process.env.NODE_ENV !== 'production') { - setChildrenForInstrumentation.call(this, children); + if (styleValue != null) { + serialized += processStyleName(styleName) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, component) + ';'; } + } + return serialized || null; + }, - return mountImages; - }, + /** + * Sets the value for multiple styles on a node. If a value is specified as + * '' (empty string), the corresponding style property will be unset. + * + * @param {DOMElement} node + * @param {object} styles + * @param {ReactDOMComponent} component + */ + setValueForStyles: function (node, styles, component) { + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: component._debugID, + type: 'update styles', + payload: styles + }); + } - /** - * Replaces any rendered children with a text content string. - * - * @param {string} nextContent String of content. - * @internal - */ - updateTextContent: function (nextContent) { - var prevChildren = this._renderedChildren; - // Remove any rendered children. - ReactChildReconciler.unmountChildren(prevChildren, false); - for (var name in prevChildren) { - if (prevChildren.hasOwnProperty(name)) { - true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; - } + var style = node.style; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; } - // Set new text content. - var updates = [makeTextContent(nextContent)]; - processQueue(this, updates); - }, - - /** - * Replaces any rendered children with a markup string. - * - * @param {string} nextMarkup String of markup. - * @internal - */ - updateMarkup: function (nextMarkup) { - var prevChildren = this._renderedChildren; - // Remove any rendered children. - ReactChildReconciler.unmountChildren(prevChildren, false); - for (var name in prevChildren) { - if (prevChildren.hasOwnProperty(name)) { - true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; - } + if (process.env.NODE_ENV !== 'production') { + warnValidStyle(styleName, styles[styleName], component); } - var updates = [makeSetMarkup(nextMarkup)]; - processQueue(this, updates); - }, - - /** - * Updates the rendered children with new children. - * - * @param {?object} nextNestedChildrenElements Nested child element maps. - * @param {ReactReconcileTransaction} transaction - * @internal - */ - updateChildren: function (nextNestedChildrenElements, transaction, context) { - // Hook used by React ART - this._updateChildren(nextNestedChildrenElements, transaction, context); - }, - - /** - * @param {?object} nextNestedChildrenElements Nested child element maps. - * @param {ReactReconcileTransaction} transaction - * @final - * @protected - */ - _updateChildren: function (nextNestedChildrenElements, transaction, context) { - var prevChildren = this._renderedChildren; - var removedNodes = {}; - var mountImages = []; - var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context); - if (!nextChildren && !prevChildren) { - return; + var styleValue = dangerousStyleValue(styleName, styles[styleName], component); + if (styleName === 'float' || styleName === 'cssFloat') { + styleName = styleFloatAccessor; } - var updates = null; - var name; - // `nextIndex` will increment for each child in `nextChildren`, but - // `lastIndex` will be the last index visited in `prevChildren`. - var nextIndex = 0; - var lastIndex = 0; - // `nextMountIndex` will increment for each newly mounted child. - var nextMountIndex = 0; - var lastPlacedNode = null; - for (name in nextChildren) { - if (!nextChildren.hasOwnProperty(name)) { - continue; - } - var prevChild = prevChildren && prevChildren[name]; - var nextChild = nextChildren[name]; - if (prevChild === nextChild) { - updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex)); - lastIndex = Math.max(prevChild._mountIndex, lastIndex); - prevChild._mountIndex = nextIndex; - } else { - if (prevChild) { - // Update `lastIndex` before `_mountIndex` gets unset by unmounting. - lastIndex = Math.max(prevChild._mountIndex, lastIndex); - // The `removedNodes` loop below will actually remove the child. + if (styleValue) { + style[styleName] = styleValue; + } else { + var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; + if (expansion) { + // Shorthand property that IE8 won't like unsetting, so unset each + // component to placate it + for (var individualStyleName in expansion) { + style[individualStyleName] = ''; } - // The child must be instantiated before it's mounted. - updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context)); - nextMountIndex++; - } - nextIndex++; - lastPlacedNode = ReactReconciler.getHostNode(nextChild); - } - // Remove children that are no longer present. - for (name in removedNodes) { - if (removedNodes.hasOwnProperty(name)) { - updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name])); + } else { + style[styleName] = ''; } } - if (updates) { - processQueue(this, updates); - } - this._renderedChildren = nextChildren; - - if (process.env.NODE_ENV !== 'production') { - setChildrenForInstrumentation.call(this, nextChildren); - } - }, - - /** - * Unmounts all rendered children. This should be used to clean up children - * when this component is unmounted. It does not actually perform any - * backend operations. - * - * @internal - */ - unmountChildren: function (safely) { - var renderedChildren = this._renderedChildren; - ReactChildReconciler.unmountChildren(renderedChildren, safely); - this._renderedChildren = null; - }, - - /** - * Moves a child component to the supplied index. - * - * @param {ReactComponent} child Component to move. - * @param {number} toIndex Destination index of the element. - * @param {number} lastIndex Last index visited of the siblings of `child`. - * @protected - */ - moveChild: function (child, afterNode, toIndex, lastIndex) { - // If the index of `child` is less than `lastIndex`, then it needs to - // be moved. Otherwise, we do not need to move it because a child will be - // inserted or moved before `child`. - if (child._mountIndex < lastIndex) { - return makeMove(child, afterNode, toIndex); - } - }, - - /** - * Creates a child component. - * - * @param {ReactComponent} child Component to create. - * @param {string} mountImage Markup to insert. - * @protected - */ - createChild: function (child, afterNode, mountImage) { - return makeInsertMarkup(mountImage, afterNode, child._mountIndex); - }, - - /** - * Removes a child component. - * - * @param {ReactComponent} child Child to remove. - * @protected - */ - removeChild: function (child, node) { - return makeRemove(child, node); - }, - - /** - * Mounts a child with the supplied name. - * - * NOTE: This is part of `updateChildren` and is here for readability. - * - * @param {ReactComponent} child Component to mount. - * @param {string} name Name of the child. - * @param {number} index Index at which to insert the child. - * @param {ReactReconcileTransaction} transaction - * @private - */ - _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) { - child._mountIndex = index; - return this.createChild(child, afterNode, mountImage); - }, - - /** - * Unmounts a rendered child. - * - * NOTE: This is part of `updateChildren` and is here for readability. - * - * @param {ReactComponent} child Component to unmount. - * @private - */ - _unmountChild: function (child, node) { - var update = this.removeChild(child, node); - child._mountIndex = null; - return update; } } + }; -module.exports = ReactMultiChild; +module.exports = CSSPropertyOperations; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 423 */ +/* 415 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2014-present, Facebook, Inc. +/** + * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @typechecks */ -var ReactReconciler = __webpack_require__(67); +var camelize = __webpack_require__(416); -var instantiateReactComponent = __webpack_require__(235); -var KeyEscapeUtils = __webpack_require__(156); -var shouldUpdateReactComponent = __webpack_require__(155); -var traverseAllChildren = __webpack_require__(239); -var warning = __webpack_require__(11); +var msPattern = /^-ms-/; -var ReactComponentTreeHook; +/** + * Camelcases a hyphenated CSS property name, for example: + * + * > camelizeStyleName('background-color') + * < "backgroundColor" + * > camelizeStyleName('-moz-transition') + * < "MozTransition" + * > camelizeStyleName('-ms-transition') + * < "msTransition" + * + * As Andi Smith suggests + * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + * is converted to lowercase `ms`. + * + * @param {string} string + * @return {string} + */ +function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); +} -if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { - // Temporary hack. - // Inline requires don't work well with Jest: - // https://github.com/facebook/react/issues/7240 - // Remove the inline requires when we don't need them anymore: - // https://github.com/facebook/react/pull/7178 - ReactComponentTreeHook = __webpack_require__(24); -} +module.exports = camelizeStyleName; + +/***/ }), +/* 416 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; -function instantiateChild(childInstances, child, name, selfDebugID) { - // We found a component instance. - var keyUnique = childInstances[name] === undefined; - if (process.env.NODE_ENV !== 'production') { - if (!ReactComponentTreeHook) { - ReactComponentTreeHook = __webpack_require__(24); - } - if (!keyUnique) { - process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; - } - } - if (child != null && keyUnique) { - childInstances[name] = instantiateReactComponent(child, true); - } -} /** - * ReactChildReconciler provides helpers for initializing or updating a set of - * children. Its output is suitable for passing it onto ReactMultiChild which - * does diffed reordering and insertion. + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks */ -var ReactChildReconciler = { - /** - * Generates a "mount image" for each of the supplied children. In the case - * of `ReactDOMComponent`, a mount image is a string of markup. - * - * @param {?object} nestedChildNodes Nested child maps. - * @return {?object} A set of child instances. - * @internal - */ - instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots - { - if (nestedChildNodes == null) { - return null; - } - var childInstances = {}; - - if (process.env.NODE_ENV !== 'production') { - traverseAllChildren(nestedChildNodes, function (childInsts, child, name) { - return instantiateChild(childInsts, child, name, selfDebugID); - }, childInstances); - } else { - traverseAllChildren(nestedChildNodes, instantiateChild, childInstances); - } - return childInstances; - }, - /** - * Updates the rendered children and returns a new set of children. - * - * @param {?object} prevChildren Previously initialized set of children. - * @param {?object} nextChildren Flat child element maps. - * @param {ReactReconcileTransaction} transaction - * @param {object} context - * @return {?object} A new set of child instances. - * @internal - */ - updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots - { - // We currently don't have a way to track moves here but if we use iterators - // instead of for..in we can zip the iterators and check if an item has - // moved. - // TODO: If nothing has changed, return the prevChildren object so that we - // can quickly bailout if nothing has changed. - if (!nextChildren && !prevChildren) { - return; - } - var name; - var prevChild; - for (name in nextChildren) { - if (!nextChildren.hasOwnProperty(name)) { - continue; - } - prevChild = prevChildren && prevChildren[name]; - var prevElement = prevChild && prevChild._currentElement; - var nextElement = nextChildren[name]; - if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) { - ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context); - nextChildren[name] = prevChild; - } else { - if (prevChild) { - removedNodes[name] = ReactReconciler.getHostNode(prevChild); - ReactReconciler.unmountComponent(prevChild, false); - } - // The child must be instantiated before it's mounted. - var nextChildInstance = instantiateReactComponent(nextElement, true); - nextChildren[name] = nextChildInstance; - // Creating mount image now ensures refs are resolved in right order - // (see https://github.com/facebook/react/pull/7101 for explanation). - var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID); - mountImages.push(nextChildMountImage); - } - } - // Unmount children that are no longer present. - for (name in prevChildren) { - if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { - prevChild = prevChildren[name]; - removedNodes[name] = ReactReconciler.getHostNode(prevChild); - ReactReconciler.unmountComponent(prevChild, false); - } - } - }, +var _hyphenPattern = /-(.)/g; - /** - * Unmounts all rendered children. This should be used to clean up children - * when this component is unmounted. - * - * @param {?object} renderedChildren Previously initialized set of children. - * @internal - */ - unmountChildren: function (renderedChildren, safely) { - for (var name in renderedChildren) { - if (renderedChildren.hasOwnProperty(name)) { - var renderedChild = renderedChildren[name]; - ReactReconciler.unmountComponent(renderedChild, safely); - } - } - } -}; +/** + * Camelcases a hyphenated string, for example: + * + * > camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ +function camelize(string) { + return string.replace(_hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); +} -module.exports = ReactChildReconciler; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +module.exports = camelize; /***/ }), -/* 424 */ +/* 417 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33385,897 +33255,781 @@ module.exports = ReactChildReconciler; -var _prodInvariant = __webpack_require__(14), - _assign = __webpack_require__(15); - -var React = __webpack_require__(65); -var ReactComponentEnvironment = __webpack_require__(154); -var ReactCurrentOwner = __webpack_require__(30); -var ReactErrorUtils = __webpack_require__(146); -var ReactInstanceMap = __webpack_require__(80); -var ReactInstrumentation = __webpack_require__(25); -var ReactNodeTypes = __webpack_require__(236); -var ReactReconciler = __webpack_require__(67); - -if (process.env.NODE_ENV !== 'production') { - var checkReactTypeSpec = __webpack_require__(425); -} - -var emptyObject = __webpack_require__(98); -var invariant = __webpack_require__(10); -var shallowEqual = __webpack_require__(81); -var shouldUpdateReactComponent = __webpack_require__(155); +var CSSProperty = __webpack_require__(234); var warning = __webpack_require__(11); -var CompositeTypes = { - ImpureClass: 0, - PureClass: 1, - StatelessFunctional: 2 -}; +var isUnitlessNumber = CSSProperty.isUnitlessNumber; +var styleWarnings = {}; -function StatelessComponent(Component) {} -StatelessComponent.prototype.render = function () { - var Component = ReactInstanceMap.get(this)._currentElement.type; - var element = Component(this.props, this.context, this.updater); - warnIfInvalidElement(Component, element); - return element; -}; +/** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @param {ReactDOMComponent} component + * @return {string} Normalized style value with dimensions applied. + */ +function dangerousStyleValue(name, value, component) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 -function warnIfInvalidElement(Component, element) { - if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0; - process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0; + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + if (isEmpty) { + return ''; } -} - -function shouldConstruct(Component) { - return !!(Component.prototype && Component.prototype.isReactComponent); -} - -function isPureComponent(Component) { - return !!(Component.prototype && Component.prototype.isPureReactComponent); -} -// Separated into a function to contain deoptimizations caused by try/finally. -function measureLifeCyclePerf(fn, debugID, timerType) { - if (debugID === 0) { - // Top-level wrappers (see ReactMount) and empty components (see - // ReactDOMEmptyComponent) are invisible to hooks and devtools. - // Both are implementation details that should go away in the future. - return fn(); + var isNonNumeric = isNaN(value); + if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { + return '' + value; // cast to string } - ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType); - try { - return fn(); - } finally { - ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType); + if (typeof value === 'string') { + if (process.env.NODE_ENV !== 'production') { + // Allow '0' to pass through without warning. 0 is already special and + // doesn't require units, so we don't need to warn about it. + if (component && value !== '0') { + var owner = component._currentElement._owner; + var ownerName = owner ? owner.getName() : null; + if (ownerName && !styleWarnings[ownerName]) { + styleWarnings[ownerName] = {}; + } + var warned = false; + if (ownerName) { + var warnings = styleWarnings[ownerName]; + warned = warnings[name]; + if (!warned) { + warnings[name] = true; + } + } + if (!warned) { + process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0; + } + } + } + value = value.trim(); } + return value + 'px'; } +module.exports = dangerousStyleValue; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 418 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; /** - * ------------------ The Life-Cycle of a Composite Component ------------------ + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. * - * - constructor: Initialization of state. The instance is now retained. - * - componentWillMount - * - render - * - [children's constructors] - * - [children's componentWillMount and render] - * - [children's componentDidMount] - * - componentDidMount + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * Update Phases: - * - componentWillReceiveProps (only called if parent updated) - * - shouldComponentUpdate - * - componentWillUpdate - * - render - * - [children's constructors or receive props phases] - * - componentDidUpdate + * @typechecks + */ + + + +var hyphenate = __webpack_require__(419); + +var msPattern = /^ms-/; + +/** + * Hyphenates a camelcased CSS property name, for example: * - * - componentWillUnmount - * - [children's componentWillUnmount] - * - [children destroyed] - * - (destroyed): The instance is now blank, released by React and ready for GC. + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" * - * ----------------------------------------------------------------------------- + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + * + * @param {string} string + * @return {string} */ +function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, '-ms-'); +} + +module.exports = hyphenateStyleName; + +/***/ }), +/* 419 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + /** - * An incrementing ID assigned to each component when it is mounted. This is - * used to enforce the order in which `ReactUpdates` updates dirty components. + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. * - * @private + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks */ -var nextMountID = 1; + +var _uppercasePattern = /([A-Z])/g; /** - * @lends {ReactCompositeComponent.prototype} + * Hyphenates a camelcased string, for example: + * + * > hyphenate('backgroundColor') + * < "background-color" + * + * For CSS style names, use `hyphenateStyleName` instead which works properly + * with all vendor prefixes, including `ms`. + * + * @param {string} string + * @return {string} */ -var ReactCompositeComponent = { - /** - * Base constructor for all composite component. - * - * @param {ReactElement} element - * @final - * @internal - */ - construct: function (element) { - this._currentElement = element; - this._rootNodeID = 0; - this._compositeType = null; - this._instance = null; - this._hostParent = null; - this._hostContainerInfo = null; +function hyphenate(string) { + return string.replace(_uppercasePattern, '-$1').toLowerCase(); +} - // See ReactUpdateQueue - this._updateBatchNumber = null; - this._pendingElement = null; - this._pendingStateQueue = null; - this._pendingReplaceState = false; - this._pendingForceUpdate = false; +module.exports = hyphenate; - this._renderedNodeType = null; - this._renderedComponent = null; - this._context = null; - this._mountOrder = 0; - this._topLevelWrapper = null; +/***/ }), +/* 420 */ +/***/ (function(module, exports, __webpack_require__) { - // See ReactUpdates and ReactUpdateQueue. - this._pendingCallbacks = null; +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + * @typechecks static-only + */ - // ComponentWillUnmount shall only be called once - this._calledComponentWillUnmount = false; - if (process.env.NODE_ENV !== 'production') { - this._warnedAboutRefsInRender = false; - } - }, - /** - * Initializes the component, renders markup, and registers event listeners. - * - * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction - * @param {?object} hostParent - * @param {?object} hostContainerInfo - * @param {?object} context - * @return {?string} Rendered markup to be inserted into the DOM. - * @final - * @internal - */ - mountComponent: function (transaction, hostParent, hostContainerInfo, context) { - var _this = this; +/** + * Memoizes the return value of a function that accepts one string argument. + */ - this._context = context; - this._mountOrder = nextMountID++; - this._hostParent = hostParent; - this._hostContainerInfo = hostContainerInfo; +function memoizeStringOnly(callback) { + var cache = {}; + return function (string) { + if (!cache.hasOwnProperty(string)) { + cache[string] = callback.call(this, string); + } + return cache[string]; + }; +} - var publicProps = this._currentElement.props; - var publicContext = this._processContext(context); +module.exports = memoizeStringOnly; - var Component = this._currentElement.type; +/***/ }), +/* 421 */ +/***/ (function(module, exports, __webpack_require__) { - var updateQueue = transaction.getUpdateQueue(); +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - // Initialize the public class - var doConstruct = shouldConstruct(Component); - var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue); - var renderedElement; - // Support functional components - if (!doConstruct && (inst == null || inst.render == null)) { - renderedElement = inst; - warnIfInvalidElement(Component, renderedElement); - !(inst === null || inst === false || React.isValidElement(inst)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0; - inst = new StatelessComponent(Component); - this._compositeType = CompositeTypes.StatelessFunctional; - } else { - if (isPureComponent(Component)) { - this._compositeType = CompositeTypes.PureClass; - } else { - this._compositeType = CompositeTypes.ImpureClass; - } - } - if (process.env.NODE_ENV !== 'production') { - // This will throw later in _renderValidatedComponent, but add an early - // warning now to help debugging - if (inst.render == null) { - process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0; - } +var escapeTextContentForBrowser = __webpack_require__(105); - var propsMutated = inst.props !== publicProps; - var componentName = Component.displayName || Component.name || 'Component'; +/** + * Escapes attribute value to prevent scripting attacks. + * + * @param {*} value Value to escape. + * @return {string} An escaped string. + */ +function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextContentForBrowser(value) + '"'; +} - process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", componentName, componentName) : void 0; - } +module.exports = quoteAttributeValueForBrowser; - // These should be set up in the constructor, but as a convenience for - // simpler class abstractions, we set them up after the fact. - inst.props = publicProps; - inst.context = publicContext; - inst.refs = emptyObject; - inst.updater = updateQueue; +/***/ }), +/* 422 */ +/***/ (function(module, exports, __webpack_require__) { - this._instance = inst; +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - // Store a reference from the instance back to the internal representation - ReactInstanceMap.set(inst, this); - if (process.env.NODE_ENV !== 'production') { - // Since plain JS classes are defined without any special initialization - // logic, we can not catch common errors early. Therefore, we have to - // catch them here, at initialization time, instead. - process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0; - process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0; - process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0; - process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0; - process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0; - process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0; - process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0; - } - var initialState = inst.state; - if (initialState === undefined) { - inst.state = initialState = null; - } - !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0; +var EventPluginHub = __webpack_require__(79); - this._pendingStateQueue = null; - this._pendingReplaceState = false; - this._pendingForceUpdate = false; +function runEventQueueInBatch(events) { + EventPluginHub.enqueueEvents(events); + EventPluginHub.processEventQueue(false); +} - var markup; - if (inst.unstable_handleError) { - markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context); - } else { - markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); - } +var ReactEventEmitterMixin = { - if (inst.componentDidMount) { - if (process.env.NODE_ENV !== 'production') { - transaction.getReactMountReady().enqueue(function () { - measureLifeCyclePerf(function () { - return inst.componentDidMount(); - }, _this._debugID, 'componentDidMount'); - }); - } else { - transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); - } - } + /** + * Streams a fired top-level event to `EventPluginHub` where plugins have the + * opportunity to create `ReactEvent`s to be dispatched. + */ + handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); + runEventQueueInBatch(events); + } +}; - return markup; - }, +module.exports = ReactEventEmitterMixin; - _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) { - if (process.env.NODE_ENV !== 'production') { - ReactCurrentOwner.current = this; - try { - return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); - } finally { - ReactCurrentOwner.current = null; - } - } else { - return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); - } - }, +/***/ }), +/* 423 */ +/***/ (function(module, exports, __webpack_require__) { - _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) { - var Component = this._currentElement.type; +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - if (doConstruct) { - if (process.env.NODE_ENV !== 'production') { - return measureLifeCyclePerf(function () { - return new Component(publicProps, publicContext, updateQueue); - }, this._debugID, 'ctor'); - } else { - return new Component(publicProps, publicContext, updateQueue); - } - } - // This can still be an instance in case of factory components - // but we'll count this as time spent rendering as the more common case. - if (process.env.NODE_ENV !== 'production') { - return measureLifeCyclePerf(function () { - return Component(publicProps, publicContext, updateQueue); - }, this._debugID, 'render'); - } else { - return Component(publicProps, publicContext, updateQueue); - } - }, - performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { - var markup; - var checkpoint = transaction.checkpoint(); - try { - markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); - } catch (e) { - // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint - transaction.rollback(checkpoint); - this._instance.unstable_handleError(e); - if (this._pendingStateQueue) { - this._instance.state = this._processPendingState(this._instance.props, this._instance.context); - } - checkpoint = transaction.checkpoint(); +var ExecutionEnvironment = __webpack_require__(18); - this._renderedComponent.unmountComponent(true); - transaction.rollback(checkpoint); +/** + * Generate a mapping of standard vendor prefixes using the defined style property and event name. + * + * @param {string} styleProp + * @param {string} eventName + * @returns {object} + */ +function makePrefixMap(styleProp, eventName) { + var prefixes = {}; - // Try again - we've informed the component about the error, so they can render an error message this time. - // If this throws again, the error will bubble up (and can be caught by a higher error boundary). - markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); - } - return markup; - }, + prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); + prefixes['Webkit' + styleProp] = 'webkit' + eventName; + prefixes['Moz' + styleProp] = 'moz' + eventName; + prefixes['ms' + styleProp] = 'MS' + eventName; + prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); - performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { - var inst = this._instance; + return prefixes; +} - var debugID = 0; - if (process.env.NODE_ENV !== 'production') { - debugID = this._debugID; - } +/** + * A list of event names to a configurable list of vendor prefixes. + */ +var vendorPrefixes = { + animationend: makePrefixMap('Animation', 'AnimationEnd'), + animationiteration: makePrefixMap('Animation', 'AnimationIteration'), + animationstart: makePrefixMap('Animation', 'AnimationStart'), + transitionend: makePrefixMap('Transition', 'TransitionEnd') +}; - if (inst.componentWillMount) { - if (process.env.NODE_ENV !== 'production') { - measureLifeCyclePerf(function () { - return inst.componentWillMount(); - }, debugID, 'componentWillMount'); - } else { - inst.componentWillMount(); - } - // When mounting, calls to `setState` by `componentWillMount` will set - // `this._pendingStateQueue` without triggering a re-render. - if (this._pendingStateQueue) { - inst.state = this._processPendingState(inst.props, inst.context); - } - } +/** + * Event names that have already been detected and prefixed (if applicable). + */ +var prefixedEventNames = {}; - // If not a stateless component, we now render - if (renderedElement === undefined) { - renderedElement = this._renderValidatedComponent(); - } +/** + * Element to check for prefixes on. + */ +var style = {}; - var nodeType = ReactNodeTypes.getType(renderedElement); - this._renderedNodeType = nodeType; - var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ - ); - this._renderedComponent = child; +/** + * Bootstrap if a DOM exists. + */ +if (ExecutionEnvironment.canUseDOM) { + style = document.createElement('div').style; - var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID); + // On some platforms, in particular some releases of Android 4.x, + // the un-prefixed "animation" and "transition" properties are defined on the + // style object but the events that fire will still be prefixed, so we need + // to check if the un-prefixed events are usable, and if not remove them from the map. + if (!('AnimationEvent' in window)) { + delete vendorPrefixes.animationend.animation; + delete vendorPrefixes.animationiteration.animation; + delete vendorPrefixes.animationstart.animation; + } - if (process.env.NODE_ENV !== 'production') { - if (debugID !== 0) { - var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; - ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); - } - } + // Same as above + if (!('TransitionEvent' in window)) { + delete vendorPrefixes.transitionend.transition; + } +} - return markup; - }, +/** + * Attempts to determine the correct vendor prefixed event name. + * + * @param {string} eventName + * @returns {string} + */ +function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) { + return prefixedEventNames[eventName]; + } else if (!vendorPrefixes[eventName]) { + return eventName; + } - getHostNode: function () { - return ReactReconciler.getHostNode(this._renderedComponent); - }, + var prefixMap = vendorPrefixes[eventName]; - /** - * Releases any resources allocated by `mountComponent`. - * - * @final - * @internal - */ - unmountComponent: function (safely) { - if (!this._renderedComponent) { - return; + for (var styleProp in prefixMap) { + if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { + return prefixedEventNames[eventName] = prefixMap[styleProp]; } + } - var inst = this._instance; + return ''; +} - if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) { - inst._calledComponentWillUnmount = true; +module.exports = getVendorPrefixedEventName; - if (safely) { - var name = this.getName() + '.componentWillUnmount()'; - ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst)); - } else { - if (process.env.NODE_ENV !== 'production') { - measureLifeCyclePerf(function () { - return inst.componentWillUnmount(); - }, this._debugID, 'componentWillUnmount'); - } else { - inst.componentWillUnmount(); - } - } - } +/***/ }), +/* 424 */ +/***/ (function(module, exports, __webpack_require__) { - if (this._renderedComponent) { - ReactReconciler.unmountComponent(this._renderedComponent, safely); - this._renderedNodeType = null; - this._renderedComponent = null; - this._instance = null; - } +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - // Reset pending fields - // Even if this component is scheduled for another update in ReactUpdates, - // it would still be ignored because these fields are reset. - this._pendingStateQueue = null; - this._pendingReplaceState = false; - this._pendingForceUpdate = false; - this._pendingCallbacks = null; - this._pendingElement = null; - // These fields do not really need to be reset since this object is no - // longer accessible. - this._context = null; - this._rootNodeID = 0; - this._topLevelWrapper = null; - // Delete the reference from the instance to this internal representation - // which allow the internals to be properly cleaned up even if the user - // leaks a reference to the public instance. - ReactInstanceMap.remove(inst); +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); - // Some existing components rely on inst.props even after they've been - // destroyed (in event handlers). - // TODO: inst.props = null; - // TODO: inst.state = null; - // TODO: inst.context = null; - }, +var DOMPropertyOperations = __webpack_require__(235); +var LinkedValueUtils = __webpack_require__(158); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactUpdates = __webpack_require__(30); - /** - * Filters the context object to only contain keys specified in - * `contextTypes` - * - * @param {object} context - * @return {?object} - * @private - */ - _maskContext: function (context) { - var Component = this._currentElement.type; - var contextTypes = Component.contextTypes; - if (!contextTypes) { - return emptyObject; - } - var maskedContext = {}; - for (var contextName in contextTypes) { - maskedContext[contextName] = context[contextName]; - } - return maskedContext; +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +var didWarnValueLink = false; +var didWarnCheckedLink = false; +var didWarnValueDefaultValue = false; +var didWarnCheckedDefaultChecked = false; +var didWarnControlledToUncontrolled = false; +var didWarnUncontrolledToControlled = false; + +function forceUpdateIfMounted() { + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMInput.updateWrapper(this); + } +} + +function isControlled(props) { + var usesChecked = props.type === 'checkbox' || props.type === 'radio'; + return usesChecked ? props.checked != null : props.value != null; +} + +/** + * Implements an <input> host component that allows setting these optional + * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. + * + * If `checked` or `value` are not supplied (or null/undefined), user actions + * that affect the checked state or value will trigger updates to the element. + * + * If they are supplied (and not null/undefined), the rendered element will not + * trigger updates to the element. Instead, the props must change in order for + * the rendered element to be updated. + * + * The rendered element will be initialized as unchecked (or `defaultChecked`) + * with an empty value (or `defaultValue`). + * + * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + */ +var ReactDOMInput = { + getHostProps: function (inst, props) { + var value = LinkedValueUtils.getValue(props); + var checked = LinkedValueUtils.getChecked(props); + + var hostProps = _assign({ + // Make sure we set .type before any other properties (setting .value + // before .type means .value is lost in IE11 and below) + type: undefined, + // Make sure we set .step before .value (setting .value before .step + // means .value is rounded on mount, based upon step precision) + step: undefined, + // Make sure we set .min & .max before .value (to ensure proper order + // in corner cases such as min or max deriving from value, e.g. Issue #7170) + min: undefined, + max: undefined + }, props, { + defaultChecked: undefined, + defaultValue: undefined, + value: value != null ? value : inst._wrapperState.initialValue, + checked: checked != null ? checked : inst._wrapperState.initialChecked, + onChange: inst._wrapperState.onChange + }); + + return hostProps; }, - /** - * Filters the context object to only contain keys specified in - * `contextTypes`, and asserts that they are valid. - * - * @param {object} context - * @return {?object} - * @private - */ - _processContext: function (context) { - var maskedContext = this._maskContext(context); + mountWrapper: function (inst, props) { if (process.env.NODE_ENV !== 'production') { - var Component = this._currentElement.type; - if (Component.contextTypes) { - this._checkContextTypes(Component.contextTypes, maskedContext, 'context'); - } - } - return maskedContext; - }, + LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner); - /** - * @param {object} currentContext - * @return {object} - * @private - */ - _processChildContext: function (currentContext) { - var Component = this._currentElement.type; - var inst = this._instance; - var childContext; + var owner = inst._currentElement._owner; - if (inst.getChildContext) { - if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onBeginProcessingChildContext(); - try { - childContext = inst.getChildContext(); - } finally { - ReactInstrumentation.debugTool.onEndProcessingChildContext(); - } - } else { - childContext = inst.getChildContext(); + if (props.valueLink !== undefined && !didWarnValueLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnValueLink = true; } - } - - if (childContext) { - !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0; - if (process.env.NODE_ENV !== 'production') { - this._checkContextTypes(Component.childContextTypes, childContext, 'child context'); + if (props.checkedLink !== undefined && !didWarnCheckedLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnCheckedLink = true; } - for (var name in childContext) { - !(name in Component.childContextTypes) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0; + if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnCheckedDefaultChecked = true; + } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnValueDefaultValue = true; } - return _assign({}, currentContext, childContext); } - return currentContext; - }, - /** - * Assert that the context types are valid - * - * @param {object} typeSpecs Map of context field to a ReactPropType - * @param {object} values Runtime values that need to be type-checked - * @param {string} location e.g. "prop", "context", "child context" - * @private - */ - _checkContextTypes: function (typeSpecs, values, location) { + var defaultValue = props.defaultValue; + inst._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: props.value != null ? props.value : defaultValue, + listeners: null, + onChange: _handleChange.bind(inst) + }; + if (process.env.NODE_ENV !== 'production') { - checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID); + inst._wrapperState.controlled = isControlled(props); } }, - receiveComponent: function (nextElement, transaction, nextContext) { - var prevElement = this._currentElement; - var prevContext = this._context; + updateWrapper: function (inst) { + var props = inst._currentElement.props; - this._pendingElement = null; + if (process.env.NODE_ENV !== 'production') { + var controlled = isControlled(props); + var owner = inst._currentElement._owner; - this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); - }, + if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnUncontrolledToControlled = true; + } + if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnControlledToUncontrolled = true; + } + } - /** - * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate` - * is set, update the component. - * - * @param {ReactReconcileTransaction} transaction - * @internal - */ - performUpdateIfNecessary: function (transaction) { - if (this._pendingElement != null) { - ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context); - } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) { - this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context); - } else { - this._updateBatchNumber = null; + // TODO: Shouldn't this be getChecked(props)? + var checked = props.checked; + if (checked != null) { + DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false); } - }, - /** - * Perform an update to a mounted component. The componentWillReceiveProps and - * shouldComponentUpdate methods are called, then (assuming the update isn't - * skipped) the remaining update lifecycle methods are called and the DOM - * representation is updated. - * - * By default, this implements React's rendering and reconciliation algorithm. - * Sophisticated clients may wish to override this. - * - * @param {ReactReconcileTransaction} transaction - * @param {ReactElement} prevParentElement - * @param {ReactElement} nextParentElement - * @internal - * @overridable - */ - updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) { - var inst = this._instance; - !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0; + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var value = LinkedValueUtils.getValue(props); + if (value != null) { - var willReceive = false; - var nextContext; + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = '' + value; - // Determine if the context has changed or not - if (this._context === nextUnmaskedContext) { - nextContext = inst.context; - } else { - nextContext = this._processContext(nextUnmaskedContext); - willReceive = true; - } - - var prevProps = prevParentElement.props; - var nextProps = nextParentElement.props; - - // Not a simple state update but a props update - if (prevParentElement !== nextParentElement) { - willReceive = true; - } - - // An update here will schedule an update but immediately set - // _pendingStateQueue which will ensure that any state updates gets - // immediately reconciled instead of waiting for the next batch. - if (willReceive && inst.componentWillReceiveProps) { - if (process.env.NODE_ENV !== 'production') { - measureLifeCyclePerf(function () { - return inst.componentWillReceiveProps(nextProps, nextContext); - }, this._debugID, 'componentWillReceiveProps'); - } else { - inst.componentWillReceiveProps(nextProps, nextContext); + // To avoid side effects (such as losing text selection), only set value if changed + if (newValue !== node.value) { + node.value = newValue; } - } - - var nextState = this._processPendingState(nextProps, nextContext); - var shouldUpdate = true; - - if (!this._pendingForceUpdate) { - if (inst.shouldComponentUpdate) { - if (process.env.NODE_ENV !== 'production') { - shouldUpdate = measureLifeCyclePerf(function () { - return inst.shouldComponentUpdate(nextProps, nextState, nextContext); - }, this._debugID, 'shouldComponentUpdate'); - } else { - shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext); - } - } else { - if (this._compositeType === CompositeTypes.PureClass) { - shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState); + } else { + if (props.value == null && props.defaultValue != null) { + // In Chrome, assigning defaultValue to certain input types triggers input validation. + // For number inputs, the display value loses trailing decimal points. For email inputs, + // Chrome raises "The specified value <x> is not a valid email address". + // + // Here we check to see if the defaultValue has actually changed, avoiding these problems + // when the user is inputting text + // + // https://github.com/facebook/react/issues/7253 + if (node.defaultValue !== '' + props.defaultValue) { + node.defaultValue = '' + props.defaultValue; } } + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } } + }, - if (process.env.NODE_ENV !== 'production') { - process.env.NODE_ENV !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0; - } + postMountWrapper: function (inst) { + var props = inst._currentElement.props; - this._updateBatchNumber = null; - if (shouldUpdate) { - this._pendingForceUpdate = false; - // Will set `this.props`, `this.state` and `this.context`. - this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext); - } else { - // If it's determined that a component should not update, we still want - // to set props and state but we shortcut the rest of the update. - this._currentElement = nextParentElement; - this._context = nextUnmaskedContext; - inst.props = nextProps; - inst.state = nextState; - inst.context = nextContext; - } - }, + // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + var node = ReactDOMComponentTree.getNodeFromInstance(inst); - _processPendingState: function (props, context) { - var inst = this._instance; - var queue = this._pendingStateQueue; - var replace = this._pendingReplaceState; - this._pendingReplaceState = false; - this._pendingStateQueue = null; + // Detach value from defaultValue. We won't do anything if we're working on + // submit or reset inputs as those values & defaultValues are linked. They + // are not resetable nodes so this operation doesn't matter and actually + // removes browser-default values (eg "Submit Query") when no value is + // provided. - if (!queue) { - return inst.state; + switch (props.type) { + case 'submit': + case 'reset': + break; + case 'color': + case 'date': + case 'datetime': + case 'datetime-local': + case 'month': + case 'time': + case 'week': + // This fixes the no-show issue on iOS Safari and Android Chrome: + // https://github.com/facebook/react/issues/7233 + node.value = ''; + node.value = node.defaultValue; + break; + default: + node.value = node.value; + break; } - if (replace && queue.length === 1) { - return queue[0]; + // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug + // this is needed to work around a chrome bug where setting defaultChecked + // will sometimes influence the value of checked (even after detachment). + // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 + // We need to temporarily unset name to avoid disrupting radio button groups. + var name = node.name; + if (name !== '') { + node.name = ''; } - - var nextState = _assign({}, replace ? queue[0] : inst.state); - for (var i = replace ? 1 : 0; i < queue.length; i++) { - var partial = queue[i]; - _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial); + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !node.defaultChecked; + if (name !== '') { + node.name = name; } + } +}; - return nextState; - }, +function _handleChange(event) { + var props = this._currentElement.props; - /** - * Merges new props and state, notifies delegate methods of update and - * performs update. - * - * @param {ReactElement} nextElement Next element - * @param {object} nextProps Next public object to set as properties. - * @param {?object} nextState Next object to set as state. - * @param {?object} nextContext Next public object to set as context. - * @param {ReactReconcileTransaction} transaction - * @param {?object} unmaskedContext - * @private - */ - _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) { - var _this2 = this; + var returnValue = LinkedValueUtils.executeOnChange(props, event); - var inst = this._instance; + // Here we use asap to wait until all updates have propagated, which + // is important when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + ReactUpdates.asap(forceUpdateIfMounted, this); - var hasComponentDidUpdate = Boolean(inst.componentDidUpdate); - var prevProps; - var prevState; - var prevContext; - if (hasComponentDidUpdate) { - prevProps = inst.props; - prevState = inst.state; - prevContext = inst.context; + var name = props.name; + if (props.type === 'radio' && name != null) { + var rootNode = ReactDOMComponentTree.getNodeFromInstance(this); + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; } - if (inst.componentWillUpdate) { - if (process.env.NODE_ENV !== 'production') { - measureLifeCyclePerf(function () { - return inst.componentWillUpdate(nextProps, nextState, nextContext); - }, this._debugID, 'componentWillUpdate'); - } else { - inst.componentWillUpdate(nextProps, nextState, nextContext); + // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form, let's just use the global + // `querySelectorAll` to ensure we don't miss anything. + var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); + + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; } + // This will throw if radio buttons rendered by different copies of React + // and the same name are rendered into the same form (same as #1939). + // That's probably okay; we don't support it just as we don't support + // mixing React radio buttons with non-React ones. + var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode); + !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0; + // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + ReactUpdates.asap(forceUpdateIfMounted, otherInstance); } + } - this._currentElement = nextElement; - this._context = unmaskedContext; - inst.props = nextProps; - inst.state = nextState; - inst.context = nextContext; + return returnValue; +} - this._updateRenderedComponent(transaction, unmaskedContext); +module.exports = ReactDOMInput; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - if (hasComponentDidUpdate) { - if (process.env.NODE_ENV !== 'production') { - transaction.getReactMountReady().enqueue(function () { - measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate'); - }); - } else { - transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); - } - } - }, +/***/ }), +/* 425 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Call the component's `render` method and update the DOM accordingly. - * - * @param {ReactReconcileTransaction} transaction - * @internal - */ - _updateRenderedComponent: function (transaction, context) { - var prevComponentInstance = this._renderedComponent; - var prevRenderedElement = prevComponentInstance._currentElement; - var nextRenderedElement = this._renderValidatedComponent(); +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - var debugID = 0; - if (process.env.NODE_ENV !== 'production') { - debugID = this._debugID; - } - if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { - ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context)); - } else { - var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance); - ReactReconciler.unmountComponent(prevComponentInstance, false); - var nodeType = ReactNodeTypes.getType(nextRenderedElement); - this._renderedNodeType = nodeType; - var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ - ); - this._renderedComponent = child; +var _assign = __webpack_require__(14); - var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID); +var React = __webpack_require__(55); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactDOMSelect = __webpack_require__(237); - if (process.env.NODE_ENV !== 'production') { - if (debugID !== 0) { - var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; - ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); - } - } +var warning = __webpack_require__(11); +var didWarnInvalidOptionChildren = false; - this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance); - } - }, +function flattenChildren(children) { + var content = ''; - /** - * Overridden in shallow rendering. - * - * @protected - */ - _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) { - ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance); - }, + // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + if (typeof child === 'string' || typeof child === 'number') { + content += child; + } else if (!didWarnInvalidOptionChildren) { + didWarnInvalidOptionChildren = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0; + } + }); - /** - * @protected - */ - _renderValidatedComponentWithoutOwnerOrContext: function () { - var inst = this._instance; - var renderedElement; + return content; +} +/** + * Implements an <option> host component that warns when `selected` is set. + */ +var ReactDOMOption = { + mountWrapper: function (inst, props, hostParent) { + // TODO (yungsters): Remove support for `selected` in <option>. if (process.env.NODE_ENV !== 'production') { - renderedElement = measureLifeCyclePerf(function () { - return inst.render(); - }, this._debugID, 'render'); - } else { - renderedElement = inst.render(); + process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0; } - if (process.env.NODE_ENV !== 'production') { - // We allow auto-mocks to proceed as if they're returning null. - if (renderedElement === undefined && inst.render._isMockFunction) { - // This is probably bad practice. Consider warning here and - // deprecating this convenience. - renderedElement = null; + // Look up whether this option is 'selected' + var selectValue = null; + if (hostParent != null) { + var selectParent = hostParent; + + if (selectParent._tag === 'optgroup') { + selectParent = selectParent._hostParent; } - } - return renderedElement; - }, + if (selectParent != null && selectParent._tag === 'select') { + selectValue = ReactDOMSelect.getSelectValueContext(selectParent); + } + } - /** - * @private - */ - _renderValidatedComponent: function () { - var renderedElement; - if (process.env.NODE_ENV !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) { - ReactCurrentOwner.current = this; - try { - renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); - } finally { - ReactCurrentOwner.current = null; + // If the value is null (e.g., no specified value or after initial mount) + // or missing (e.g., for <datalist>), we don't change props.selected + var selected = null; + if (selectValue != null) { + var value; + if (props.value != null) { + value = props.value + ''; + } else { + value = flattenChildren(props.children); + } + selected = false; + if (Array.isArray(selectValue)) { + // multiple + for (var i = 0; i < selectValue.length; i++) { + if ('' + selectValue[i] === value) { + selected = true; + break; + } + } + } else { + selected = '' + selectValue === value; } - } else { - renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); } - !( - // TODO: An `isValidNode` function would probably be more appropriate - renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0; - return renderedElement; + inst._wrapperState = { selected: selected }; }, - /** - * Lazily allocates the refs object and stores `component` as `ref`. - * - * @param {string} ref Reference name. - * @param {component} component Component to store as `ref`. - * @final - * @private - */ - attachRef: function (ref, component) { - var inst = this.getPublicInstance(); - !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0; - var publicComponentInstance = component.getPublicInstance(); - if (process.env.NODE_ENV !== 'production') { - var componentName = component && component.getName ? component.getName() : 'a component'; - process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0; + postMountWrapper: function (inst) { + // value="" should make a value attribute (#6219) + var props = inst._currentElement.props; + if (props.value != null) { + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + node.setAttribute('value', props.value); } - var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs; - refs[ref] = publicComponentInstance; }, - /** - * Detaches a reference name. - * - * @param {string} ref Name to dereference. - * @final - * @private - */ - detachRef: function (ref) { - var refs = this.getPublicInstance().refs; - delete refs[ref]; - }, + getHostProps: function (inst, props) { + var hostProps = _assign({ selected: undefined, children: undefined }, props); - /** - * Get a text description of the component that can be used to identify it - * in error messages. - * @return {string} The name or null. - * @internal - */ - getName: function () { - var type = this._currentElement.type; - var constructor = this._instance && this._instance.constructor; - return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null; - }, + // Read state only from initial mount because <select> updates value + // manually; we need the initial state only for server rendering + if (inst._wrapperState.selected != null) { + hostProps.selected = inst._wrapperState.selected; + } - /** - * Get the publicly accessible representation of this component - i.e. what - * is exposed by refs and returned by render. Can be null for stateless - * components. - * - * @return {ReactComponent} the public component instance. - * @internal - */ - getPublicInstance: function () { - var inst = this._instance; - if (this._compositeType === CompositeTypes.StatelessFunctional) { - return null; + var content = flattenChildren(props.children); + + if (content) { + hostProps.children = content; } - return inst; - }, - // Stub - _instantiateReactComponent: null + return hostProps; + } + }; -module.exports = ReactCompositeComponent; +module.exports = ReactDOMOption; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 425 */ +/* 426 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34291,111 +34045,153 @@ module.exports = ReactCompositeComponent; -var _prodInvariant = __webpack_require__(14); +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); -var ReactPropTypeLocationNames = __webpack_require__(426); -var ReactPropTypesSecret = __webpack_require__(233); +var LinkedValueUtils = __webpack_require__(158); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactUpdates = __webpack_require__(30); var invariant = __webpack_require__(10); var warning = __webpack_require__(11); -var ReactComponentTreeHook; +var didWarnValueLink = false; +var didWarnValDefaultVal = false; -if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { - // Temporary hack. - // Inline requires don't work well with Jest: - // https://github.com/facebook/react/issues/7240 - // Remove the inline requires when we don't need them anymore: - // https://github.com/facebook/react/pull/7178 - ReactComponentTreeHook = __webpack_require__(24); +function forceUpdateIfMounted() { + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMTextarea.updateWrapper(this); + } } -var loggedTypeFailures = {}; - /** - * Assert that the values match with the type specs. - * Error messages are memorized and will only be shown once. + * Implements a <textarea> host component that allows setting `value`, and + * `defaultValue`. This differs from the traditional DOM API because value is + * usually set as PCDATA children. * - * @param {object} typeSpecs Map of name to a ReactPropType - * @param {object} values Runtime values that need to be type-checked - * @param {string} location e.g. "prop", "context", "child context" - * @param {string} componentName Name of the component for error messages. - * @param {?object} element The React element that is being type-checked - * @param {?number} debugID The React component instance that is being type-checked - * @private + * If `value` is not supplied (or null/undefined), user actions that affect the + * value will trigger updates to the element. + * + * If `value` is supplied (and not null/undefined), the rendered element will + * not trigger updates to the element. Instead, the `value` prop must change in + * order for the rendered element to be updated. + * + * The rendered element will be initialized with an empty value, the prop + * `defaultValue` if specified, or the children content (deprecated). */ -function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { - for (var typeSpecName in typeSpecs) { - if (typeSpecs.hasOwnProperty(typeSpecName)) { - var error; - // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0; - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); - } catch (ex) { - error = ex; - } - process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0; - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; +var ReactDOMTextarea = { + getHostProps: function (inst, props) { + !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0; - var componentStackInfo = ''; + // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. We could add a check in setTextContent + // to only set the value if/when the value differs from the node value (which would + // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution. + // The value can be a boolean or object so that's why it's forced to be a string. + var hostProps = _assign({}, props, { + value: undefined, + defaultValue: undefined, + children: '' + inst._wrapperState.initialValue, + onChange: inst._wrapperState.onChange + }); + + return hostProps; + }, + + mountWrapper: function (inst, props) { + if (process.env.NODE_ENV !== 'production') { + LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner); + if (props.valueLink !== undefined && !didWarnValueLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnValueLink = true; + } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0; + didWarnValDefaultVal = true; + } + } + + var value = LinkedValueUtils.getValue(props); + var initialValue = value; + // Only bother fetching default value if we're going to use it + if (value == null) { + var defaultValue = props.defaultValue; + // TODO (yungsters): Remove support for children content in <textarea>. + var children = props.children; + if (children != null) { if (process.env.NODE_ENV !== 'production') { - if (!ReactComponentTreeHook) { - ReactComponentTreeHook = __webpack_require__(24); - } - if (debugID !== null) { - componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); - } else if (element !== null) { - componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); - } + process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0; + } + !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0; + if (Array.isArray(children)) { + !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0; + children = children[0]; } - process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; + defaultValue = '' + children; + } + if (defaultValue == null) { + defaultValue = ''; } + initialValue = defaultValue; } - } -} -module.exports = checkReactTypeSpec; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + inst._wrapperState = { + initialValue: '' + initialValue, + listeners: null, + onChange: _handleChange.bind(inst) + }; + }, -/***/ }), -/* 426 */ -/***/ (function(module, exports, __webpack_require__) { + updateWrapper: function (inst) { + var props = inst._currentElement.props; -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * - */ + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var value = LinkedValueUtils.getValue(props); + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = '' + value; + // To avoid side effects (such as losing text selection), only set value if changed + if (newValue !== node.value) { + node.value = newValue; + } + if (props.defaultValue == null) { + node.defaultValue = newValue; + } + } + if (props.defaultValue != null) { + node.defaultValue = props.defaultValue; + } + }, + postMountWrapper: function (inst) { + // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var textContent = node.textContent; -var ReactPropTypeLocationNames = {}; + // Only set node.value if textContent is equal to the expected + // initial value. In IE10/IE11 there is a bug where the placeholder attribute + // will populate textContent as well. + // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ + if (textContent === inst._wrapperState.initialValue) { + node.value = textContent; + } + } +}; -if (process.env.NODE_ENV !== 'production') { - ReactPropTypeLocationNames = { - prop: 'prop', - context: 'context', - childContext: 'child context' - }; +function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); + ReactUpdates.asap(forceUpdateIfMounted, this); + return returnValue; } -module.exports = ReactPropTypeLocationNames; +module.exports = ReactDOMTextarea; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), @@ -34403,7 +34199,7 @@ module.exports = ReactPropTypeLocationNames; /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** +/* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -34411,420 +34207,616 @@ module.exports = ReactPropTypeLocationNames; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * */ -var nextDebugID = 1; +var _prodInvariant = __webpack_require__(13); -function getNextDebugID() { - return nextDebugID++; -} +var ReactComponentEnvironment = __webpack_require__(159); +var ReactInstanceMap = __webpack_require__(81); +var ReactInstrumentation = __webpack_require__(25); -module.exports = getNextDebugID; +var ReactCurrentOwner = __webpack_require__(29); +var ReactReconciler = __webpack_require__(69); +var ReactChildReconciler = __webpack_require__(428); -/***/ }), -/* 428 */ -/***/ (function(module, exports, __webpack_require__) { +var emptyFunction = __webpack_require__(21); +var flattenChildren = __webpack_require__(435); +var invariant = __webpack_require__(10); -"use strict"; /** - * Copyright 2014-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * Make an update for markup to be rendered and inserted at a supplied index. * - * + * @param {string} markup Markup that renders into an element. + * @param {number} toIndex Destination index. + * @private */ +function makeInsertMarkup(markup, afterNode, toIndex) { + // NOTE: Null values reduce hidden classes. + return { + type: 'INSERT_MARKUP', + content: markup, + fromIndex: null, + fromNode: null, + toIndex: toIndex, + afterNode: afterNode + }; +} - - -// The Symbol used to tag the ReactElement type. If there is no native Symbol -// nor polyfill, then a plain number is used for performance. - -var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; - -module.exports = REACT_ELEMENT_TYPE; - -/***/ }), -/* 429 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * Make an update for moving an existing element to another index. * - * + * @param {number} fromIndex Source index of the existing element. + * @param {number} toIndex Destination index of the element. + * @private */ - - - -/* global Symbol */ - -var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; -var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. +function makeMove(child, afterNode, toIndex) { + // NOTE: Null values reduce hidden classes. + return { + type: 'MOVE_EXISTING', + content: null, + fromIndex: child._mountIndex, + fromNode: ReactReconciler.getHostNode(child), + toIndex: toIndex, + afterNode: afterNode + }; +} /** - * Returns the iterator method function contained on the iterable object. - * - * Be sure to invoke the function with the iterable as context: - * - * var iteratorFn = getIteratorFn(myIterable); - * if (iteratorFn) { - * var iterator = iteratorFn.call(myIterable); - * ... - * } + * Make an update for removing an element at an index. * - * @param {?object} maybeIterable - * @return {?function} + * @param {number} fromIndex Index of the element to remove. + * @private */ -function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; - } +function makeRemove(child, node) { + // NOTE: Null values reduce hidden classes. + return { + type: 'REMOVE_NODE', + content: null, + fromIndex: child._mountIndex, + fromNode: node, + toIndex: null, + afterNode: null + }; } -module.exports = getIteratorFn; - -/***/ }), -/* 430 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. +/** + * Make an update for setting the markup of a node. * - * + * @param {string} markup Markup that renders into an element. + * @private */ - - - -var KeyEscapeUtils = __webpack_require__(156); -var traverseAllChildren = __webpack_require__(239); -var warning = __webpack_require__(11); - -var ReactComponentTreeHook; - -if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { - // Temporary hack. - // Inline requires don't work well with Jest: - // https://github.com/facebook/react/issues/7240 - // Remove the inline requires when we don't need them anymore: - // https://github.com/facebook/react/pull/7178 - ReactComponentTreeHook = __webpack_require__(24); +function makeSetMarkup(markup) { + // NOTE: Null values reduce hidden classes. + return { + type: 'SET_MARKUP', + content: markup, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null + }; } /** - * @param {function} traverseContext Context passed through traversal. - * @param {?ReactComponent} child React child component. - * @param {!string} name String name of key path to child. - * @param {number=} selfDebugID Optional debugID of the current internal instance. + * Make an update for setting the text content. + * + * @param {string} textContent Text content to set. + * @private */ -function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { - // We found a component instance. - if (traverseContext && typeof traverseContext === 'object') { - var result = traverseContext; - var keyUnique = result[name] === undefined; - if (process.env.NODE_ENV !== 'production') { - if (!ReactComponentTreeHook) { - ReactComponentTreeHook = __webpack_require__(24); - } - if (!keyUnique) { - process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; - } - } - if (keyUnique && child != null) { - result[name] = child; - } - } +function makeTextContent(textContent) { + // NOTE: Null values reduce hidden classes. + return { + type: 'TEXT_CONTENT', + content: textContent, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null + }; } /** - * Flattens children that are typically specified as `props.children`. Any null - * children will not be included in the resulting object. - * @return {!object} flattened children keyed by name. + * Push an update, if any, onto the queue. Creates a new queue if none is + * passed and always returns the queue. Mutative. */ -function flattenChildren(children, selfDebugID) { - if (children == null) { - return children; - } - var result = {}; - - if (process.env.NODE_ENV !== 'production') { - traverseAllChildren(children, function (traverseContext, child, name) { - return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); - }, result); - } else { - traverseAllChildren(children, flattenSingleChildIntoContext, result); +function enqueue(queue, update) { + if (update) { + queue = queue || []; + queue.push(update); } - return result; + return queue; } -module.exports = flattenChildren; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 431 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2014-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - - -var _assign = __webpack_require__(15); - -var PooledClass = __webpack_require__(53); -var Transaction = __webpack_require__(102); -var ReactInstrumentation = __webpack_require__(25); -var ReactServerUpdateQueue = __webpack_require__(432); - /** - * Executed within the scope of the `Transaction` instance. Consider these as - * being member methods, but with an implied ordering while being isolated from - * each other. + * Processes any enqueued updates. + * + * @private */ -var TRANSACTION_WRAPPERS = []; +function processQueue(inst, updateQueue) { + ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue); +} +var setChildrenForInstrumentation = emptyFunction; if (process.env.NODE_ENV !== 'production') { - TRANSACTION_WRAPPERS.push({ - initialize: ReactInstrumentation.debugTool.onBeginFlush, - close: ReactInstrumentation.debugTool.onEndFlush - }); + var getDebugID = function (inst) { + if (!inst._debugID) { + // Check for ART-like instances. TODO: This is silly/gross. + var internal; + if (internal = ReactInstanceMap.get(inst)) { + inst = internal; + } + } + return inst._debugID; + }; + setChildrenForInstrumentation = function (children) { + var debugID = getDebugID(this); + // TODO: React Native empty components are also multichild. + // This means they still get into this method but don't have _debugID. + if (debugID !== 0) { + ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) { + return children[key]._debugID; + }) : []); + } + }; } -var noopCallbackQueue = { - enqueue: function () {} -}; - /** - * @class ReactServerRenderingTransaction - * @param {boolean} renderToStaticMarkup + * ReactMultiChild are capable of reconciling multiple children. + * + * @class ReactMultiChild + * @internal */ -function ReactServerRenderingTransaction(renderToStaticMarkup) { - this.reinitializeTransaction(); - this.renderToStaticMarkup = renderToStaticMarkup; - this.useCreateElement = false; - this.updateQueue = new ReactServerUpdateQueue(this); -} - -var Mixin = { - /** - * @see Transaction - * @abstract - * @final - * @return {array} Empty list of operation wrap procedures. - */ - getTransactionWrappers: function () { - return TRANSACTION_WRAPPERS; - }, +var ReactMultiChild = { /** - * @return {object} The queue to collect `onDOMReady` callbacks with. + * Provides common functionality for components that must reconcile multiple + * children. This is used by `ReactDOMComponent` to mount, update, and + * unmount child components. + * + * @lends {ReactMultiChild.prototype} */ - getReactMountReady: function () { - return noopCallbackQueue; - }, + Mixin: { - /** - * @return {object} The queue to collect React async events. - */ - getUpdateQueue: function () { - return this.updateQueue; - }, + _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) { + if (process.env.NODE_ENV !== 'production') { + var selfDebugID = getDebugID(this); + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID); + } finally { + ReactCurrentOwner.current = null; + } + } + } + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); + }, - /** - * `PooledClass` looks for this, and will invoke this before allowing this - * instance to be reused. - */ - destructor: function () {}, + _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) { + var nextChildren; + var selfDebugID = 0; + if (process.env.NODE_ENV !== 'production') { + selfDebugID = getDebugID(this); + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); + } finally { + ReactCurrentOwner.current = null; + } + ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); + return nextChildren; + } + } + nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); + ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); + return nextChildren; + }, - checkpoint: function () {}, + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildren Nested child maps. + * @return {array} An array of mounted representations. + * @internal + */ + mountChildren: function (nestedChildren, transaction, context) { + var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context); + this._renderedChildren = children; - rollback: function () {} -}; + var mountImages = []; + var index = 0; + for (var name in children) { + if (children.hasOwnProperty(name)) { + var child = children[name]; + var selfDebugID = 0; + if (process.env.NODE_ENV !== 'production') { + selfDebugID = getDebugID(this); + } + var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID); + child._mountIndex = index++; + mountImages.push(mountImage); + } + } -_assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin); + if (process.env.NODE_ENV !== 'production') { + setChildrenForInstrumentation.call(this, children); + } -PooledClass.addPoolingTo(ReactServerRenderingTransaction); + return mountImages; + }, -module.exports = ReactServerRenderingTransaction; + /** + * Replaces any rendered children with a text content string. + * + * @param {string} nextContent String of content. + * @internal + */ + updateTextContent: function (nextContent) { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren, false); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; + } + } + // Set new text content. + var updates = [makeTextContent(nextContent)]; + processQueue(this, updates); + }, + + /** + * Replaces any rendered children with a markup string. + * + * @param {string} nextMarkup String of markup. + * @internal + */ + updateMarkup: function (nextMarkup) { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren, false); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; + } + } + var updates = [makeSetMarkup(nextMarkup)]; + processQueue(this, updates); + }, + + /** + * Updates the rendered children with new children. + * + * @param {?object} nextNestedChildrenElements Nested child element maps. + * @param {ReactReconcileTransaction} transaction + * @internal + */ + updateChildren: function (nextNestedChildrenElements, transaction, context) { + // Hook used by React ART + this._updateChildren(nextNestedChildrenElements, transaction, context); + }, + + /** + * @param {?object} nextNestedChildrenElements Nested child element maps. + * @param {ReactReconcileTransaction} transaction + * @final + * @protected + */ + _updateChildren: function (nextNestedChildrenElements, transaction, context) { + var prevChildren = this._renderedChildren; + var removedNodes = {}; + var mountImages = []; + var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context); + if (!nextChildren && !prevChildren) { + return; + } + var updates = null; + var name; + // `nextIndex` will increment for each child in `nextChildren`, but + // `lastIndex` will be the last index visited in `prevChildren`. + var nextIndex = 0; + var lastIndex = 0; + // `nextMountIndex` will increment for each newly mounted child. + var nextMountIndex = 0; + var lastPlacedNode = null; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + var prevChild = prevChildren && prevChildren[name]; + var nextChild = nextChildren[name]; + if (prevChild === nextChild) { + updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex)); + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + prevChild._mountIndex = nextIndex; + } else { + if (prevChild) { + // Update `lastIndex` before `_mountIndex` gets unset by unmounting. + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + // The `removedNodes` loop below will actually remove the child. + } + // The child must be instantiated before it's mounted. + updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context)); + nextMountIndex++; + } + nextIndex++; + lastPlacedNode = ReactReconciler.getHostNode(nextChild); + } + // Remove children that are no longer present. + for (name in removedNodes) { + if (removedNodes.hasOwnProperty(name)) { + updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name])); + } + } + if (updates) { + processQueue(this, updates); + } + this._renderedChildren = nextChildren; + + if (process.env.NODE_ENV !== 'production') { + setChildrenForInstrumentation.call(this, nextChildren); + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. It does not actually perform any + * backend operations. + * + * @internal + */ + unmountChildren: function (safely) { + var renderedChildren = this._renderedChildren; + ReactChildReconciler.unmountChildren(renderedChildren, safely); + this._renderedChildren = null; + }, + + /** + * Moves a child component to the supplied index. + * + * @param {ReactComponent} child Component to move. + * @param {number} toIndex Destination index of the element. + * @param {number} lastIndex Last index visited of the siblings of `child`. + * @protected + */ + moveChild: function (child, afterNode, toIndex, lastIndex) { + // If the index of `child` is less than `lastIndex`, then it needs to + // be moved. Otherwise, we do not need to move it because a child will be + // inserted or moved before `child`. + if (child._mountIndex < lastIndex) { + return makeMove(child, afterNode, toIndex); + } + }, + + /** + * Creates a child component. + * + * @param {ReactComponent} child Component to create. + * @param {string} mountImage Markup to insert. + * @protected + */ + createChild: function (child, afterNode, mountImage) { + return makeInsertMarkup(mountImage, afterNode, child._mountIndex); + }, + + /** + * Removes a child component. + * + * @param {ReactComponent} child Child to remove. + * @protected + */ + removeChild: function (child, node) { + return makeRemove(child, node); + }, + + /** + * Mounts a child with the supplied name. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to mount. + * @param {string} name Name of the child. + * @param {number} index Index at which to insert the child. + * @param {ReactReconcileTransaction} transaction + * @private + */ + _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) { + child._mountIndex = index; + return this.createChild(child, afterNode, mountImage); + }, + + /** + * Unmounts a rendered child. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to unmount. + * @private + */ + _unmountChild: function (child, node) { + var update = this.removeChild(child, node); + child._mountIndex = null; + return update; + } + + } + +}; + +module.exports = ReactMultiChild; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 432 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2015-present, Facebook, Inc. + * Copyright 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * */ -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var ReactUpdateQueue = __webpack_require__(157); +var ReactReconciler = __webpack_require__(69); +var instantiateReactComponent = __webpack_require__(238); +var KeyEscapeUtils = __webpack_require__(161); +var shouldUpdateReactComponent = __webpack_require__(160); +var traverseAllChildren = __webpack_require__(242); var warning = __webpack_require__(11); -function warnNoop(publicInstance, callerName) { +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); +} + +function instantiateChild(childInstances, child, name, selfDebugID) { + // We found a component instance. + var keyUnique = childInstances[name] === undefined; if (process.env.NODE_ENV !== 'production') { - var constructor = publicInstance.constructor; - process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (!keyUnique) { + process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; + } + } + if (child != null && keyUnique) { + childInstances[name] = instantiateReactComponent(child, true); } } /** - * This is the update queue used for server rendering. - * It delegates to ReactUpdateQueue while server rendering is in progress and - * switches to ReactNoopUpdateQueue after the transaction has completed. - * @class ReactServerUpdateQueue - * @param {Transaction} transaction + * ReactChildReconciler provides helpers for initializing or updating a set of + * children. Its output is suitable for passing it onto ReactMultiChild which + * does diffed reordering and insertion. */ - -var ReactServerUpdateQueue = function () { - function ReactServerUpdateQueue(transaction) { - _classCallCheck(this, ReactServerUpdateQueue); - - this.transaction = transaction; - } - - /** - * Checks whether or not this composite component is mounted. - * @param {ReactClass} publicInstance The instance we want to test. - * @return {boolean} True if mounted, false otherwise. - * @protected - * @final - */ - - - ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) { - return false; - }; - +var ReactChildReconciler = { /** - * Enqueue a callback that will be executed after all the pending updates - * have processed. + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. * - * @param {ReactClass} publicInstance The instance to use as `this` context. - * @param {?function} callback Called after state is updated. + * @param {?object} nestedChildNodes Nested child maps. + * @return {?object} A set of child instances. * @internal */ - - - ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) { - if (this.transaction.isInTransaction()) { - ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName); + instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots + ) { + if (nestedChildNodes == null) { + return null; } - }; - - /** - * Forces an update. This should only be invoked when it is known with - * certainty that we are **not** in a DOM transaction. - * - * You may want to call this when you know that some deeper aspect of the - * component's state has changed but `setState` was not called. - * - * This will not invoke `shouldComponentUpdate`, but it will invoke - * `componentWillUpdate` and `componentDidUpdate`. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @internal - */ - + var childInstances = {}; - ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) { - if (this.transaction.isInTransaction()) { - ReactUpdateQueue.enqueueForceUpdate(publicInstance); + if (process.env.NODE_ENV !== 'production') { + traverseAllChildren(nestedChildNodes, function (childInsts, child, name) { + return instantiateChild(childInsts, child, name, selfDebugID); + }, childInstances); } else { - warnNoop(publicInstance, 'forceUpdate'); + traverseAllChildren(nestedChildNodes, instantiateChild, childInstances); } - }; + return childInstances; + }, /** - * Replaces all of the state. Always use this or `setState` to mutate state. - * You should treat `this.state` as immutable. - * - * There is no guarantee that `this.state` will be immediately updated, so - * accessing `this.state` after calling this method may return the old value. + * Updates the rendered children and returns a new set of children. * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {object|function} completeState Next state. + * @param {?object} prevChildren Previously initialized set of children. + * @param {?object} nextChildren Flat child element maps. + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @return {?object} A new set of child instances. * @internal */ - - - ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) { - if (this.transaction.isInTransaction()) { - ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState); - } else { - warnNoop(publicInstance, 'replaceState'); + updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots + ) { + // We currently don't have a way to track moves here but if we use iterators + // instead of for..in we can zip the iterators and check if an item has + // moved. + // TODO: If nothing has changed, return the prevChildren object so that we + // can quickly bailout if nothing has changed. + if (!nextChildren && !prevChildren) { + return; } - }; + var name; + var prevChild; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + prevChild = prevChildren && prevChildren[name]; + var prevElement = prevChild && prevChild._currentElement; + var nextElement = nextChildren[name]; + if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) { + ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context); + nextChildren[name] = prevChild; + } else { + if (prevChild) { + removedNodes[name] = ReactReconciler.getHostNode(prevChild); + ReactReconciler.unmountComponent(prevChild, false); + } + // The child must be instantiated before it's mounted. + var nextChildInstance = instantiateReactComponent(nextElement, true); + nextChildren[name] = nextChildInstance; + // Creating mount image now ensures refs are resolved in right order + // (see https://github.com/facebook/react/pull/7101 for explanation). + var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID); + mountImages.push(nextChildMountImage); + } + } + // Unmount children that are no longer present. + for (name in prevChildren) { + if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { + prevChild = prevChildren[name]; + removedNodes[name] = ReactReconciler.getHostNode(prevChild); + ReactReconciler.unmountComponent(prevChild, false); + } + } + }, /** - * Sets a subset of the state. This only exists because _pendingState is - * internal. This provides a merging strategy that is not available to deep - * properties which is confusing. TODO: Expose pendingState or don't use it - * during the merge. + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {object|function} partialState Next partial state to be merged with state. + * @param {?object} renderedChildren Previously initialized set of children. * @internal */ - - - ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) { - if (this.transaction.isInTransaction()) { - ReactUpdateQueue.enqueueSetState(publicInstance, partialState); - } else { - warnNoop(publicInstance, 'setState'); + unmountChildren: function (renderedChildren, safely) { + for (var name in renderedChildren) { + if (renderedChildren.hasOwnProperty(name)) { + var renderedChild = renderedChildren[name]; + ReactReconciler.unmountComponent(renderedChild, safely); + } } - }; + } - return ReactServerUpdateQueue; -}(); +}; -module.exports = ReactServerUpdateQueue; +module.exports = ReactChildReconciler; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 433 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** - * Copyright 2014-present, Facebook, Inc. +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -34835,1087 +34827,903 @@ module.exports = ReactServerUpdateQueue; -var _assign = __webpack_require__(15); +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); -var DOMLazyTree = __webpack_require__(68); -var ReactDOMComponentTree = __webpack_require__(16); +var React = __webpack_require__(55); +var ReactComponentEnvironment = __webpack_require__(159); +var ReactCurrentOwner = __webpack_require__(29); +var ReactErrorUtils = __webpack_require__(151); +var ReactInstanceMap = __webpack_require__(81); +var ReactInstrumentation = __webpack_require__(25); +var ReactNodeTypes = __webpack_require__(239); +var ReactReconciler = __webpack_require__(69); -var ReactDOMEmptyComponent = function (instantiate) { - // ReactCompositeComponent uses this: - this._currentElement = null; - // ReactDOMComponentTree uses these: - this._hostNode = null; - this._hostParent = null; - this._hostContainerInfo = null; - this._domID = 0; -}; -_assign(ReactDOMEmptyComponent.prototype, { - mountComponent: function (transaction, hostParent, hostContainerInfo, context) { - var domID = hostContainerInfo._idCounter++; - this._domID = domID; - this._hostParent = hostParent; - this._hostContainerInfo = hostContainerInfo; +if (process.env.NODE_ENV !== 'production') { + var checkReactTypeSpec = __webpack_require__(430); +} - var nodeValue = ' react-empty: ' + this._domID + ' '; - if (transaction.useCreateElement) { - var ownerDocument = hostContainerInfo._ownerDocument; - var node = ownerDocument.createComment(nodeValue); - ReactDOMComponentTree.precacheNode(this, node); - return DOMLazyTree(node); - } else { - if (transaction.renderToStaticMarkup) { - // Normally we'd insert a comment node, but since this is a situation - // where React won't take over (static pages), we can simply return - // nothing. - return ''; - } - return '<!--' + nodeValue + '-->'; - } - }, - receiveComponent: function () {}, - getHostNode: function () { - return ReactDOMComponentTree.getNodeFromInstance(this); - }, - unmountComponent: function () { - ReactDOMComponentTree.uncacheNode(this); - } -}); +var emptyObject = __webpack_require__(98); +var invariant = __webpack_require__(10); +var shallowEqual = __webpack_require__(82); +var shouldUpdateReactComponent = __webpack_require__(160); +var warning = __webpack_require__(11); -module.exports = ReactDOMEmptyComponent; +var CompositeTypes = { + ImpureClass: 0, + PureClass: 1, + StatelessFunctional: 2 +}; -/***/ }), -/* 434 */ -/***/ (function(module, exports, __webpack_require__) { +function StatelessComponent(Component) {} +StatelessComponent.prototype.render = function () { + var Component = ReactInstanceMap.get(this)._currentElement.type; + var element = Component(this.props, this.context, this.updater); + warnIfInvalidElement(Component, element); + return element; +}; -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ +function warnIfInvalidElement(Component, element) { + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0; + } +} +function shouldConstruct(Component) { + return !!(Component.prototype && Component.prototype.isReactComponent); +} +function isPureComponent(Component) { + return !!(Component.prototype && Component.prototype.isPureReactComponent); +} -var _prodInvariant = __webpack_require__(14); +// Separated into a function to contain deoptimizations caused by try/finally. +function measureLifeCyclePerf(fn, debugID, timerType) { + if (debugID === 0) { + // Top-level wrappers (see ReactMount) and empty components (see + // ReactDOMEmptyComponent) are invisible to hooks and devtools. + // Both are implementation details that should go away in the future. + return fn(); + } -var invariant = __webpack_require__(10); + ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType); + try { + return fn(); + } finally { + ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType); + } +} /** - * Return the lowest common ancestor of A and B, or null if they are in - * different trees. - */ -function getLowestCommonAncestor(instA, instB) { - !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; - !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; - - var depthA = 0; - for (var tempA = instA; tempA; tempA = tempA._hostParent) { - depthA++; - } - var depthB = 0; - for (var tempB = instB; tempB; tempB = tempB._hostParent) { - depthB++; - } - - // If A is deeper, crawl up. - while (depthA - depthB > 0) { - instA = instA._hostParent; - depthA--; - } - - // If B is deeper, crawl up. - while (depthB - depthA > 0) { - instB = instB._hostParent; - depthB--; - } - - // Walk in lockstep until we find a match. - var depth = depthA; - while (depth--) { - if (instA === instB) { - return instA; - } - instA = instA._hostParent; - instB = instB._hostParent; - } - return null; -} - -/** - * Return if A is an ancestor of B. - */ -function isAncestor(instA, instB) { - !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; - !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; - - while (instB) { - if (instB === instA) { - return true; - } - instB = instB._hostParent; - } - return false; -} - -/** - * Return the parent instance of the passed-in instance. - */ -function getParentInstance(inst) { - !('_hostNode' in inst) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0; - - return inst._hostParent; -} - -/** - * Simulates the traversal of a two-phase, capture/bubble event dispatch. - */ -function traverseTwoPhase(inst, fn, arg) { - var path = []; - while (inst) { - path.push(inst); - inst = inst._hostParent; - } - var i; - for (i = path.length; i-- > 0;) { - fn(path[i], 'captured', arg); - } - for (i = 0; i < path.length; i++) { - fn(path[i], 'bubbled', arg); - } -} - -/** - * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that - * should would receive a `mouseEnter` or `mouseLeave` event. + * ------------------ The Life-Cycle of a Composite Component ------------------ * - * Does not invoke the callback on the nearest common ancestor because nothing - * "entered" or "left" that element. - */ -function traverseEnterLeave(from, to, fn, argFrom, argTo) { - var common = from && to ? getLowestCommonAncestor(from, to) : null; - var pathFrom = []; - while (from && from !== common) { - pathFrom.push(from); - from = from._hostParent; - } - var pathTo = []; - while (to && to !== common) { - pathTo.push(to); - to = to._hostParent; - } - var i; - for (i = 0; i < pathFrom.length; i++) { - fn(pathFrom[i], 'bubbled', argFrom); - } - for (i = pathTo.length; i-- > 0;) { - fn(pathTo[i], 'captured', argTo); - } -} - -module.exports = { - isAncestor: isAncestor, - getLowestCommonAncestor: getLowestCommonAncestor, - getParentInstance: getParentInstance, - traverseTwoPhase: traverseTwoPhase, - traverseEnterLeave: traverseEnterLeave -}; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 435 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. + * - constructor: Initialization of state. The instance is now retained. + * - componentWillMount + * - render + * - [children's constructors] + * - [children's componentWillMount and render] + * - [children's componentDidMount] + * - componentDidMount * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * Update Phases: + * - componentWillReceiveProps (only called if parent updated) + * - shouldComponentUpdate + * - componentWillUpdate + * - render + * - [children's constructors or receive props phases] + * - componentDidUpdate + * + * - componentWillUnmount + * - [children's componentWillUnmount] + * - [children destroyed] + * - (destroyed): The instance is now blank, released by React and ready for GC. * + * ----------------------------------------------------------------------------- */ - - -var _prodInvariant = __webpack_require__(14), - _assign = __webpack_require__(15); - -var DOMChildrenOperations = __webpack_require__(150); -var DOMLazyTree = __webpack_require__(68); -var ReactDOMComponentTree = __webpack_require__(16); - -var escapeTextContentForBrowser = __webpack_require__(105); -var invariant = __webpack_require__(10); -var validateDOMNesting = __webpack_require__(158); - /** - * Text nodes violate a couple assumptions that React makes about components: - * - * - When mounting text into the DOM, adjacent text nodes are merged. - * - Text nodes cannot be assigned a React root ID. - * - * This component is used to wrap strings between comment nodes so that they - * can undergo the same reconciliation that is applied to elements. - * - * TODO: Investigate representing React components in the DOM with text nodes. + * An incrementing ID assigned to each component when it is mounted. This is + * used to enforce the order in which `ReactUpdates` updates dirty components. * - * @class ReactDOMTextComponent - * @extends ReactComponent - * @internal + * @private */ -var ReactDOMTextComponent = function (text) { - // TODO: This is really a ReactText (ReactNode), not a ReactElement - this._currentElement = text; - this._stringText = '' + text; - // ReactDOMComponentTree uses these: - this._hostNode = null; - this._hostParent = null; +var nextMountID = 1; - // Properties - this._domID = 0; - this._mountIndex = 0; - this._closingComment = null; - this._commentNodes = null; -}; +/** + * @lends {ReactCompositeComponent.prototype} + */ +var ReactCompositeComponent = { -_assign(ReactDOMTextComponent.prototype, { /** - * Creates the markup for this text node. This node is not intended to have - * any features besides containing text content. + * Base constructor for all composite component. * - * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction - * @return {string} Markup for this text node. + * @param {ReactElement} element + * @final * @internal */ - mountComponent: function (transaction, hostParent, hostContainerInfo, context) { - if (process.env.NODE_ENV !== 'production') { - var parentInfo; - if (hostParent != null) { - parentInfo = hostParent._ancestorInfo; - } else if (hostContainerInfo != null) { - parentInfo = hostContainerInfo._ancestorInfo; - } - if (parentInfo) { - // parentInfo should always be present except for the top-level - // component when server rendering - validateDOMNesting(null, this._stringText, this, parentInfo); - } - } + construct: function (element) { + this._currentElement = element; + this._rootNodeID = 0; + this._compositeType = null; + this._instance = null; + this._hostParent = null; + this._hostContainerInfo = null; - var domID = hostContainerInfo._idCounter++; - var openingValue = ' react-text: ' + domID + ' '; - var closingValue = ' /react-text '; - this._domID = domID; - this._hostParent = hostParent; - if (transaction.useCreateElement) { - var ownerDocument = hostContainerInfo._ownerDocument; - var openingComment = ownerDocument.createComment(openingValue); - var closingComment = ownerDocument.createComment(closingValue); - var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment()); - DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment)); - if (this._stringText) { - DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText))); - } - DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment)); - ReactDOMComponentTree.precacheNode(this, openingComment); - this._closingComment = closingComment; - return lazyTree; - } else { - var escapedText = escapeTextContentForBrowser(this._stringText); + // See ReactUpdateQueue + this._updateBatchNumber = null; + this._pendingElement = null; + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; - if (transaction.renderToStaticMarkup) { - // Normally we'd wrap this between comment nodes for the reasons stated - // above, but since this is a situation where React won't take over - // (static pages), we can simply return the text as it is. - return escapedText; - } + this._renderedNodeType = null; + this._renderedComponent = null; + this._context = null; + this._mountOrder = 0; + this._topLevelWrapper = null; - return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->'; + // See ReactUpdates and ReactUpdateQueue. + this._pendingCallbacks = null; + + // ComponentWillUnmount shall only be called once + this._calledComponentWillUnmount = false; + + if (process.env.NODE_ENV !== 'production') { + this._warnedAboutRefsInRender = false; } }, /** - * Updates this component by updating the text content. + * Initializes the component, renders markup, and registers event listeners. * - * @param {ReactText} nextText The next text content - * @param {ReactReconcileTransaction} transaction + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?object} hostParent + * @param {?object} hostContainerInfo + * @param {?object} context + * @return {?string} Rendered markup to be inserted into the DOM. + * @final * @internal */ - receiveComponent: function (nextText, transaction) { - if (nextText !== this._currentElement) { - this._currentElement = nextText; - var nextStringText = '' + nextText; - if (nextStringText !== this._stringText) { - // TODO: Save this as pending props and use performUpdateIfNecessary - // and/or updateComponent to do the actual update for consistency with - // other component types? - this._stringText = nextStringText; - var commentNodes = this.getHostNode(); - DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText); - } - } - }, - - getHostNode: function () { - var hostNode = this._commentNodes; - if (hostNode) { - return hostNode; - } - if (!this._closingComment) { - var openingComment = ReactDOMComponentTree.getNodeFromInstance(this); - var node = openingComment.nextSibling; - while (true) { - !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0; - if (node.nodeType === 8 && node.nodeValue === ' /react-text ') { - this._closingComment = node; - break; - } - node = node.nextSibling; - } - } - hostNode = [this._hostNode, this._closingComment]; - this._commentNodes = hostNode; - return hostNode; - }, - - unmountComponent: function () { - this._closingComment = null; - this._commentNodes = null; - ReactDOMComponentTree.uncacheNode(this); - } -}); - -module.exports = ReactDOMTextComponent; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 436 */ -/***/ (function(module, exports, __webpack_require__) { + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + var _this = this; -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + this._context = context; + this._mountOrder = nextMountID++; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + var publicProps = this._currentElement.props; + var publicContext = this._processContext(context); + var Component = this._currentElement.type; -var _assign = __webpack_require__(15); + var updateQueue = transaction.getUpdateQueue(); -var ReactUpdates = __webpack_require__(32); -var Transaction = __webpack_require__(102); + // Initialize the public class + var doConstruct = shouldConstruct(Component); + var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue); + var renderedElement; -var emptyFunction = __webpack_require__(23); + // Support functional components + if (!doConstruct && (inst == null || inst.render == null)) { + renderedElement = inst; + warnIfInvalidElement(Component, renderedElement); + !(inst === null || inst === false || React.isValidElement(inst)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0; + inst = new StatelessComponent(Component); + this._compositeType = CompositeTypes.StatelessFunctional; + } else { + if (isPureComponent(Component)) { + this._compositeType = CompositeTypes.PureClass; + } else { + this._compositeType = CompositeTypes.ImpureClass; + } + } -var RESET_BATCHED_UPDATES = { - initialize: emptyFunction, - close: function () { - ReactDefaultBatchingStrategy.isBatchingUpdates = false; - } -}; + if (process.env.NODE_ENV !== 'production') { + // This will throw later in _renderValidatedComponent, but add an early + // warning now to help debugging + if (inst.render == null) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0; + } -var FLUSH_BATCHED_UPDATES = { - initialize: emptyFunction, - close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates) -}; + var propsMutated = inst.props !== publicProps; + var componentName = Component.displayName || Component.name || 'Component'; -var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES]; + process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName) : void 0; + } -function ReactDefaultBatchingStrategyTransaction() { - this.reinitializeTransaction(); -} + // These should be set up in the constructor, but as a convenience for + // simpler class abstractions, we set them up after the fact. + inst.props = publicProps; + inst.context = publicContext; + inst.refs = emptyObject; + inst.updater = updateQueue; -_assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, { - getTransactionWrappers: function () { - return TRANSACTION_WRAPPERS; - } -}); + this._instance = inst; -var transaction = new ReactDefaultBatchingStrategyTransaction(); + // Store a reference from the instance back to the internal representation + ReactInstanceMap.set(inst, this); -var ReactDefaultBatchingStrategy = { - isBatchingUpdates: false, + if (process.env.NODE_ENV !== 'production') { + // Since plain JS classes are defined without any special initialization + // logic, we can not catch common errors early. Therefore, we have to + // catch them here, at initialization time, instead. + process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0; + } - /** - * Call the provided function in a context within which calls to `setState` - * and friends are batched such that components aren't updated unnecessarily. - */ - batchedUpdates: function (callback, a, b, c, d, e) { - var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; + var initialState = inst.state; + if (initialState === undefined) { + inst.state = initialState = null; + } + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0; - ReactDefaultBatchingStrategy.isBatchingUpdates = true; + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; - // The code is written this way to avoid extra allocations - if (alreadyBatchingUpdates) { - return callback(a, b, c, d, e); + var markup; + if (inst.unstable_handleError) { + markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context); } else { - return transaction.perform(callback, null, a, b, c, d, e); + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); } - } -}; -module.exports = ReactDefaultBatchingStrategy; + if (inst.componentDidMount) { + if (process.env.NODE_ENV !== 'production') { + transaction.getReactMountReady().enqueue(function () { + measureLifeCyclePerf(function () { + return inst.componentDidMount(); + }, _this._debugID, 'componentDidMount'); + }); + } else { + transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); + } + } -/***/ }), -/* 437 */ -/***/ (function(module, exports, __webpack_require__) { + return markup; + }, -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) { + if (process.env.NODE_ENV !== 'production') { + ReactCurrentOwner.current = this; + try { + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); + } finally { + ReactCurrentOwner.current = null; + } + } else { + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); + } + }, + _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) { + var Component = this._currentElement.type; + if (doConstruct) { + if (process.env.NODE_ENV !== 'production') { + return measureLifeCyclePerf(function () { + return new Component(publicProps, publicContext, updateQueue); + }, this._debugID, 'ctor'); + } else { + return new Component(publicProps, publicContext, updateQueue); + } + } -var _assign = __webpack_require__(15); + // This can still be an instance in case of factory components + // but we'll count this as time spent rendering as the more common case. + if (process.env.NODE_ENV !== 'production') { + return measureLifeCyclePerf(function () { + return Component(publicProps, publicContext, updateQueue); + }, this._debugID, 'render'); + } else { + return Component(publicProps, publicContext, updateQueue); + } + }, -var EventListener = __webpack_require__(240); -var ExecutionEnvironment = __webpack_require__(19); -var PooledClass = __webpack_require__(53); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactUpdates = __webpack_require__(32); + performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { + var markup; + var checkpoint = transaction.checkpoint(); + try { + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } catch (e) { + // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint + transaction.rollback(checkpoint); + this._instance.unstable_handleError(e); + if (this._pendingStateQueue) { + this._instance.state = this._processPendingState(this._instance.props, this._instance.context); + } + checkpoint = transaction.checkpoint(); -var getEventTarget = __webpack_require__(147); -var getUnboundedScrollPosition = __webpack_require__(438); + this._renderedComponent.unmountComponent(true); + transaction.rollback(checkpoint); -/** - * Find the deepest React component completely containing the root of the - * passed-in instance (for use when entire React trees are nested within each - * other). If React trees are not nested, returns null. - */ -function findParent(inst) { - // TODO: It may be a good idea to cache this to prevent unnecessary DOM - // traversal, but caching is difficult to do correctly without using a - // mutation observer to listen for all DOM changes. - while (inst._hostParent) { - inst = inst._hostParent; - } - var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst); - var container = rootNode.parentNode; - return ReactDOMComponentTree.getClosestInstanceFromNode(container); -} - -// Used to store ancestor hierarchy in top level callback -function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { - this.topLevelType = topLevelType; - this.nativeEvent = nativeEvent; - this.ancestors = []; -} -_assign(TopLevelCallbackBookKeeping.prototype, { - destructor: function () { - this.topLevelType = null; - this.nativeEvent = null; - this.ancestors.length = 0; - } -}); -PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler); + // Try again - we've informed the component about the error, so they can render an error message this time. + // If this throws again, the error will bubble up (and can be caught by a higher error boundary). + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } + return markup; + }, -function handleTopLevelImpl(bookKeeping) { - var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent); - var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget); + performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { + var inst = this._instance; - // Loop through the hierarchy, in case there's any nested components. - // It's important that we build the array of ancestors before calling any - // event handlers, because event handlers can modify the DOM, leading to - // inconsistencies with ReactMount's node cache. See #1105. - var ancestor = targetInst; - do { - bookKeeping.ancestors.push(ancestor); - ancestor = ancestor && findParent(ancestor); - } while (ancestor); + var debugID = 0; + if (process.env.NODE_ENV !== 'production') { + debugID = this._debugID; + } - for (var i = 0; i < bookKeeping.ancestors.length; i++) { - targetInst = bookKeeping.ancestors[i]; - ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); - } -} + if (inst.componentWillMount) { + if (process.env.NODE_ENV !== 'production') { + measureLifeCyclePerf(function () { + return inst.componentWillMount(); + }, debugID, 'componentWillMount'); + } else { + inst.componentWillMount(); + } + // When mounting, calls to `setState` by `componentWillMount` will set + // `this._pendingStateQueue` without triggering a re-render. + if (this._pendingStateQueue) { + inst.state = this._processPendingState(inst.props, inst.context); + } + } -function scrollValueMonitor(cb) { - var scrollPosition = getUnboundedScrollPosition(window); - cb(scrollPosition); -} + // If not a stateless component, we now render + if (renderedElement === undefined) { + renderedElement = this._renderValidatedComponent(); + } -var ReactEventListener = { - _enabled: true, - _handleTopLevel: null, + var nodeType = ReactNodeTypes.getType(renderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ + ); + this._renderedComponent = child; - WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, + var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID); - setHandleTopLevel: function (handleTopLevel) { - ReactEventListener._handleTopLevel = handleTopLevel; - }, + if (process.env.NODE_ENV !== 'production') { + if (debugID !== 0) { + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); + } + } - setEnabled: function (enabled) { - ReactEventListener._enabled = !!enabled; + return markup; }, - isEnabled: function () { - return ReactEventListener._enabled; + getHostNode: function () { + return ReactReconciler.getHostNode(this._renderedComponent); }, /** - * Traps top-level events by using event bubbling. + * Releases any resources allocated by `mountComponent`. * - * @param {string} topLevelType Record from `EventConstants`. - * @param {string} handlerBaseName Event name (e.g. "click"). - * @param {object} element Element on which to attach listener. - * @return {?object} An object with a remove function which will forcefully - * remove the listener. + * @final * @internal */ - trapBubbledEvent: function (topLevelType, handlerBaseName, element) { - if (!element) { - return null; + unmountComponent: function (safely) { + if (!this._renderedComponent) { + return; } - return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); - }, - /** - * Traps a top-level event by using event capturing. - * - * @param {string} topLevelType Record from `EventConstants`. - * @param {string} handlerBaseName Event name (e.g. "click"). - * @param {object} element Element on which to attach listener. - * @return {?object} An object with a remove function which will forcefully - * remove the listener. - * @internal - */ - trapCapturedEvent: function (topLevelType, handlerBaseName, element) { - if (!element) { - return null; - } - return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); - }, + var inst = this._instance; - monitorScrollValue: function (refresh) { - var callback = scrollValueMonitor.bind(null, refresh); - EventListener.listen(window, 'scroll', callback); - }, + if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) { + inst._calledComponentWillUnmount = true; - dispatchEvent: function (topLevelType, nativeEvent) { - if (!ReactEventListener._enabled) { - return; + if (safely) { + var name = this.getName() + '.componentWillUnmount()'; + ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst)); + } else { + if (process.env.NODE_ENV !== 'production') { + measureLifeCyclePerf(function () { + return inst.componentWillUnmount(); + }, this._debugID, 'componentWillUnmount'); + } else { + inst.componentWillUnmount(); + } + } } - var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent); - try { - // Event queue being processed in the same cycle allows - // `preventDefault`. - ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping); - } finally { - TopLevelCallbackBookKeeping.release(bookKeeping); + if (this._renderedComponent) { + ReactReconciler.unmountComponent(this._renderedComponent, safely); + this._renderedNodeType = null; + this._renderedComponent = null; + this._instance = null; } - } -}; - -module.exports = ReactEventListener; - -/***/ }), -/* 438 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks - */ - - - -/** - * Gets the scroll position of the supplied element or window. - * - * The return values are unbounded, unlike `getScrollPosition`. This means they - * may be negative or exceed the element boundaries (which is possible using - * inertial scrolling). - * - * @param {DOMWindow|DOMElement} scrollable - * @return {object} Map with `x` and `y` keys. - */ - -function getUnboundedScrollPosition(scrollable) { - if (scrollable.Window && scrollable instanceof scrollable.Window) { - return { - x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft, - y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop - }; - } - return { - x: scrollable.scrollLeft, - y: scrollable.scrollTop - }; -} - -module.exports = getUnboundedScrollPosition; - -/***/ }), -/* 439 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - - -var DOMProperty = __webpack_require__(43); -var EventPluginHub = __webpack_require__(78); -var EventPluginUtils = __webpack_require__(145); -var ReactComponentEnvironment = __webpack_require__(154); -var ReactEmptyComponent = __webpack_require__(237); -var ReactBrowserEventEmitter = __webpack_require__(106); -var ReactHostComponent = __webpack_require__(238); -var ReactUpdates = __webpack_require__(32); - -var ReactInjection = { - Component: ReactComponentEnvironment.injection, - DOMProperty: DOMProperty.injection, - EmptyComponent: ReactEmptyComponent.injection, - EventPluginHub: EventPluginHub.injection, - EventPluginUtils: EventPluginUtils.injection, - EventEmitter: ReactBrowserEventEmitter.injection, - HostComponent: ReactHostComponent.injection, - Updates: ReactUpdates.injection -}; - -module.exports = ReactInjection; - -/***/ }), -/* 440 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + // Reset pending fields + // Even if this component is scheduled for another update in ReactUpdates, + // it would still be ignored because these fields are reset. + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + this._pendingCallbacks = null; + this._pendingElement = null; + // These fields do not really need to be reset since this object is no + // longer accessible. + this._context = null; + this._rootNodeID = 0; + this._topLevelWrapper = null; -var _assign = __webpack_require__(15); + // Delete the reference from the instance to this internal representation + // which allow the internals to be properly cleaned up even if the user + // leaks a reference to the public instance. + ReactInstanceMap.remove(inst); -var CallbackQueue = __webpack_require__(224); -var PooledClass = __webpack_require__(53); -var ReactBrowserEventEmitter = __webpack_require__(106); -var ReactInputSelection = __webpack_require__(241); -var ReactInstrumentation = __webpack_require__(25); -var Transaction = __webpack_require__(102); -var ReactUpdateQueue = __webpack_require__(157); + // Some existing components rely on inst.props even after they've been + // destroyed (in event handlers). + // TODO: inst.props = null; + // TODO: inst.state = null; + // TODO: inst.context = null; + }, -/** - * Ensures that, when possible, the selection range (currently selected text - * input) is not disturbed by performing the transaction. - */ -var SELECTION_RESTORATION = { - /** - * @return {Selection} Selection information. - */ - initialize: ReactInputSelection.getSelectionInformation, /** - * @param {Selection} sel Selection information returned from `initialize`. + * Filters the context object to only contain keys specified in + * `contextTypes` + * + * @param {object} context + * @return {?object} + * @private */ - close: ReactInputSelection.restoreSelection -}; + _maskContext: function (context) { + var Component = this._currentElement.type; + var contextTypes = Component.contextTypes; + if (!contextTypes) { + return emptyObject; + } + var maskedContext = {}; + for (var contextName in contextTypes) { + maskedContext[contextName] = context[contextName]; + } + return maskedContext; + }, -/** - * Suppresses events (blur/focus) that could be inadvertently dispatched due to - * high level DOM manipulations (like temporarily removing a text input from the - * DOM). - */ -var EVENT_SUPPRESSION = { /** - * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before - * the reconciliation. + * Filters the context object to only contain keys specified in + * `contextTypes`, and asserts that they are valid. + * + * @param {object} context + * @return {?object} + * @private */ - initialize: function () { - var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); - ReactBrowserEventEmitter.setEnabled(false); - return currentlyEnabled; + _processContext: function (context) { + var maskedContext = this._maskContext(context); + if (process.env.NODE_ENV !== 'production') { + var Component = this._currentElement.type; + if (Component.contextTypes) { + this._checkContextTypes(Component.contextTypes, maskedContext, 'context'); + } + } + return maskedContext; }, /** - * @param {boolean} previouslyEnabled Enabled status of - * `ReactBrowserEventEmitter` before the reconciliation occurred. `close` - * restores the previous value. + * @param {object} currentContext + * @return {object} + * @private */ - close: function (previouslyEnabled) { - ReactBrowserEventEmitter.setEnabled(previouslyEnabled); - } -}; + _processChildContext: function (currentContext) { + var Component = this._currentElement.type; + var inst = this._instance; + var childContext; -/** - * Provides a queue for collecting `componentDidMount` and - * `componentDidUpdate` callbacks during the transaction. - */ -var ON_DOM_READY_QUEUEING = { - /** - * Initializes the internal `onDOMReady` queue. - */ - initialize: function () { - this.reactMountReady.reset(); + if (inst.getChildContext) { + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onBeginProcessingChildContext(); + try { + childContext = inst.getChildContext(); + } finally { + ReactInstrumentation.debugTool.onEndProcessingChildContext(); + } + } else { + childContext = inst.getChildContext(); + } + } + + if (childContext) { + !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0; + if (process.env.NODE_ENV !== 'production') { + this._checkContextTypes(Component.childContextTypes, childContext, 'childContext'); + } + for (var name in childContext) { + !(name in Component.childContextTypes) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0; + } + return _assign({}, currentContext, childContext); + } + return currentContext; }, /** - * After DOM is flushed, invoke all registered `onDOMReady` callbacks. + * Assert that the context types are valid + * + * @param {object} typeSpecs Map of context field to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @private */ - close: function () { - this.reactMountReady.notifyAll(); - } -}; - -/** - * Executed within the scope of the `Transaction` instance. Consider these as - * being member methods, but with an implied ordering while being isolated from - * each other. - */ -var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING]; + _checkContextTypes: function (typeSpecs, values, location) { + if (process.env.NODE_ENV !== 'production') { + checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID); + } + }, -if (process.env.NODE_ENV !== 'production') { - TRANSACTION_WRAPPERS.push({ - initialize: ReactInstrumentation.debugTool.onBeginFlush, - close: ReactInstrumentation.debugTool.onEndFlush - }); -} + receiveComponent: function (nextElement, transaction, nextContext) { + var prevElement = this._currentElement; + var prevContext = this._context; -/** - * Currently: - * - The order that these are listed in the transaction is critical: - * - Suppresses events. - * - Restores selection range. - * - * Future: - * - Restore document/overflow scroll positions that were unintentionally - * modified via DOM insertions above the top viewport boundary. - * - Implement/integrate with customized constraint based layout system and keep - * track of which dimensions must be remeasured. - * - * @class ReactReconcileTransaction - */ -function ReactReconcileTransaction(useCreateElement) { - this.reinitializeTransaction(); - // Only server-side rendering really needs this option (see - // `ReactServerRendering`), but server-side uses - // `ReactServerRenderingTransaction` instead. This option is here so that it's - // accessible and defaults to false when `ReactDOMComponent` and - // `ReactDOMTextComponent` checks it in `mountComponent`.` - this.renderToStaticMarkup = false; - this.reactMountReady = CallbackQueue.getPooled(null); - this.useCreateElement = useCreateElement; -} + this._pendingElement = null; -var Mixin = { - /** - * @see Transaction - * @abstract - * @final - * @return {array<object>} List of operation wrap procedures. - * TODO: convert to array<TransactionWrapper> - */ - getTransactionWrappers: function () { - return TRANSACTION_WRAPPERS; + this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); }, /** - * @return {object} The queue to collect `onDOMReady` callbacks with. + * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate` + * is set, update the component. + * + * @param {ReactReconcileTransaction} transaction + * @internal */ - getReactMountReady: function () { - return this.reactMountReady; + performUpdateIfNecessary: function (transaction) { + if (this._pendingElement != null) { + ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context); + } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) { + this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context); + } else { + this._updateBatchNumber = null; + } }, /** - * @return {object} The queue to collect React async events. + * Perform an update to a mounted component. The componentWillReceiveProps and + * shouldComponentUpdate methods are called, then (assuming the update isn't + * skipped) the remaining update lifecycle methods are called and the DOM + * representation is updated. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevParentElement + * @param {ReactElement} nextParentElement + * @internal + * @overridable */ - getUpdateQueue: function () { - return ReactUpdateQueue; - }, + updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) { + var inst = this._instance; + !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0; - /** - * Save current transaction state -- if the return value from this method is - * passed to `rollback`, the transaction will be reset to that state. - */ - checkpoint: function () { - // reactMountReady is the our only stateful wrapper - return this.reactMountReady.checkpoint(); - }, - - rollback: function (checkpoint) { - this.reactMountReady.rollback(checkpoint); - }, - - /** - * `PooledClass` looks for this, and will invoke this before allowing this - * instance to be reused. - */ - destructor: function () { - CallbackQueue.release(this.reactMountReady); - this.reactMountReady = null; - } -}; + var willReceive = false; + var nextContext; -_assign(ReactReconcileTransaction.prototype, Transaction, Mixin); + // Determine if the context has changed or not + if (this._context === nextUnmaskedContext) { + nextContext = inst.context; + } else { + nextContext = this._processContext(nextUnmaskedContext); + willReceive = true; + } -PooledClass.addPoolingTo(ReactReconcileTransaction); + var prevProps = prevParentElement.props; + var nextProps = nextParentElement.props; -module.exports = ReactReconcileTransaction; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + // Not a simple state update but a props update + if (prevParentElement !== nextParentElement) { + willReceive = true; + } -/***/ }), -/* 441 */ -/***/ (function(module, exports, __webpack_require__) { + // An update here will schedule an update but immediately set + // _pendingStateQueue which will ensure that any state updates gets + // immediately reconciled instead of waiting for the next batch. + if (willReceive && inst.componentWillReceiveProps) { + if (process.env.NODE_ENV !== 'production') { + measureLifeCyclePerf(function () { + return inst.componentWillReceiveProps(nextProps, nextContext); + }, this._debugID, 'componentWillReceiveProps'); + } else { + inst.componentWillReceiveProps(nextProps, nextContext); + } + } -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + var nextState = this._processPendingState(nextProps, nextContext); + var shouldUpdate = true; + if (!this._pendingForceUpdate) { + if (inst.shouldComponentUpdate) { + if (process.env.NODE_ENV !== 'production') { + shouldUpdate = measureLifeCyclePerf(function () { + return inst.shouldComponentUpdate(nextProps, nextState, nextContext); + }, this._debugID, 'shouldComponentUpdate'); + } else { + shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext); + } + } else { + if (this._compositeType === CompositeTypes.PureClass) { + shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState); + } + } + } + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0; + } -var ExecutionEnvironment = __webpack_require__(19); + this._updateBatchNumber = null; + if (shouldUpdate) { + this._pendingForceUpdate = false; + // Will set `this.props`, `this.state` and `this.context`. + this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext); + } else { + // If it's determined that a component should not update, we still want + // to set props and state but we shortcut the rest of the update. + this._currentElement = nextParentElement; + this._context = nextUnmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + } + }, -var getNodeForCharacterOffset = __webpack_require__(442); -var getTextContentAccessor = __webpack_require__(223); + _processPendingState: function (props, context) { + var inst = this._instance; + var queue = this._pendingStateQueue; + var replace = this._pendingReplaceState; + this._pendingReplaceState = false; + this._pendingStateQueue = null; -/** - * While `isCollapsed` is available on the Selection object and `collapsed` - * is available on the Range object, IE11 sometimes gets them wrong. - * If the anchor/focus nodes and offsets are the same, the range is collapsed. - */ -function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { - return anchorNode === focusNode && anchorOffset === focusOffset; -} + if (!queue) { + return inst.state; + } -/** - * Get the appropriate anchor and focus node/offset pairs for IE. - * - * The catch here is that IE's selection API doesn't provide information - * about whether the selection is forward or backward, so we have to - * behave as though it's always forward. - * - * IE text differs from modern selection in that it behaves as though - * block elements end with a new line. This means character offsets will - * differ between the two APIs. - * - * @param {DOMElement} node - * @return {object} - */ -function getIEOffsets(node) { - var selection = document.selection; - var selectedRange = selection.createRange(); - var selectedLength = selectedRange.text.length; + if (replace && queue.length === 1) { + return queue[0]; + } - // Duplicate selection so we can move range without breaking user selection. - var fromStart = selectedRange.duplicate(); - fromStart.moveToElementText(node); - fromStart.setEndPoint('EndToStart', selectedRange); + var nextState = _assign({}, replace ? queue[0] : inst.state); + for (var i = replace ? 1 : 0; i < queue.length; i++) { + var partial = queue[i]; + _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial); + } - var startOffset = fromStart.text.length; - var endOffset = startOffset + selectedLength; + return nextState; + }, - return { - start: startOffset, - end: endOffset - }; -} + /** + * Merges new props and state, notifies delegate methods of update and + * performs update. + * + * @param {ReactElement} nextElement Next element + * @param {object} nextProps Next public object to set as properties. + * @param {?object} nextState Next object to set as state. + * @param {?object} nextContext Next public object to set as context. + * @param {ReactReconcileTransaction} transaction + * @param {?object} unmaskedContext + * @private + */ + _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) { + var _this2 = this; -/** - * @param {DOMElement} node - * @return {?object} - */ -function getModernOffsets(node) { - var selection = window.getSelection && window.getSelection(); + var inst = this._instance; - if (!selection || selection.rangeCount === 0) { - return null; - } + var hasComponentDidUpdate = Boolean(inst.componentDidUpdate); + var prevProps; + var prevState; + var prevContext; + if (hasComponentDidUpdate) { + prevProps = inst.props; + prevState = inst.state; + prevContext = inst.context; + } - var anchorNode = selection.anchorNode; - var anchorOffset = selection.anchorOffset; - var focusNode = selection.focusNode; - var focusOffset = selection.focusOffset; + if (inst.componentWillUpdate) { + if (process.env.NODE_ENV !== 'production') { + measureLifeCyclePerf(function () { + return inst.componentWillUpdate(nextProps, nextState, nextContext); + }, this._debugID, 'componentWillUpdate'); + } else { + inst.componentWillUpdate(nextProps, nextState, nextContext); + } + } - var currentRange = selection.getRangeAt(0); + this._currentElement = nextElement; + this._context = unmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; - // In Firefox, range.startContainer and range.endContainer can be "anonymous - // divs", e.g. the up/down buttons on an <input type="number">. Anonymous - // divs do not seem to expose properties, triggering a "Permission denied - // error" if any of its properties are accessed. The only seemingly possible - // way to avoid erroring is to access a property that typically works for - // non-anonymous divs and catch any error that may otherwise arise. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 - try { - /* eslint-disable no-unused-expressions */ - currentRange.startContainer.nodeType; - currentRange.endContainer.nodeType; - /* eslint-enable no-unused-expressions */ - } catch (e) { - return null; - } + this._updateRenderedComponent(transaction, unmaskedContext); - // If the node and offset values are the same, the selection is collapsed. - // `Selection.isCollapsed` is available natively, but IE sometimes gets - // this value wrong. - var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset); + if (hasComponentDidUpdate) { + if (process.env.NODE_ENV !== 'production') { + transaction.getReactMountReady().enqueue(function () { + measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate'); + }); + } else { + transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); + } + } + }, - var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length; + /** + * Call the component's `render` method and update the DOM accordingly. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + _updateRenderedComponent: function (transaction, context) { + var prevComponentInstance = this._renderedComponent; + var prevRenderedElement = prevComponentInstance._currentElement; + var nextRenderedElement = this._renderValidatedComponent(); - var tempRange = currentRange.cloneRange(); - tempRange.selectNodeContents(node); - tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); + var debugID = 0; + if (process.env.NODE_ENV !== 'production') { + debugID = this._debugID; + } - var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset); + if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { + ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context)); + } else { + var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance); + ReactReconciler.unmountComponent(prevComponentInstance, false); - var start = isTempRangeCollapsed ? 0 : tempRange.toString().length; - var end = start + rangeLength; + var nodeType = ReactNodeTypes.getType(nextRenderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ + ); + this._renderedComponent = child; - // Detect whether the selection is backward. - var detectionRange = document.createRange(); - detectionRange.setStart(anchorNode, anchorOffset); - detectionRange.setEnd(focusNode, focusOffset); - var isBackward = detectionRange.collapsed; + var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID); - return { - start: isBackward ? end : start, - end: isBackward ? start : end - }; -} + if (process.env.NODE_ENV !== 'production') { + if (debugID !== 0) { + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); + } + } -/** - * @param {DOMElement|DOMTextNode} node - * @param {object} offsets - */ -function setIEOffsets(node, offsets) { - var range = document.selection.createRange().duplicate(); - var start, end; + this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance); + } + }, - if (offsets.end === undefined) { - start = offsets.start; - end = start; - } else if (offsets.start > offsets.end) { - start = offsets.end; - end = offsets.start; - } else { - start = offsets.start; - end = offsets.end; - } + /** + * Overridden in shallow rendering. + * + * @protected + */ + _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) { + ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance); + }, - range.moveToElementText(node); - range.moveStart('character', start); - range.setEndPoint('EndToStart', range); - range.moveEnd('character', end - start); - range.select(); -} + /** + * @protected + */ + _renderValidatedComponentWithoutOwnerOrContext: function () { + var inst = this._instance; + var renderedElement; -/** - * In modern non-IE browsers, we can support both forward and backward - * selections. - * - * Note: IE10+ supports the Selection object, but it does not support - * the `extend` method, which means that even in modern IE, it's not possible - * to programmatically create a backward selection. Thus, for all IE - * versions, we use the old IE API to create our selections. - * - * @param {DOMElement|DOMTextNode} node - * @param {object} offsets - */ -function setModernOffsets(node, offsets) { - if (!window.getSelection) { - return; - } + if (process.env.NODE_ENV !== 'production') { + renderedElement = measureLifeCyclePerf(function () { + return inst.render(); + }, this._debugID, 'render'); + } else { + renderedElement = inst.render(); + } - var selection = window.getSelection(); - var length = node[getTextContentAccessor()].length; - var start = Math.min(offsets.start, length); - var end = offsets.end === undefined ? start : Math.min(offsets.end, length); + if (process.env.NODE_ENV !== 'production') { + // We allow auto-mocks to proceed as if they're returning null. + if (renderedElement === undefined && inst.render._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + renderedElement = null; + } + } - // IE 11 uses modern selection, but doesn't support the extend method. - // Flip backward selections, so we can set with a single range. - if (!selection.extend && start > end) { - var temp = end; - end = start; - start = temp; - } + return renderedElement; + }, - var startMarker = getNodeForCharacterOffset(node, start); - var endMarker = getNodeForCharacterOffset(node, end); + /** + * @private + */ + _renderValidatedComponent: function () { + var renderedElement; + if (process.env.NODE_ENV !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) { + ReactCurrentOwner.current = this; + try { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } finally { + ReactCurrentOwner.current = null; + } + } else { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } + !( + // TODO: An `isValidNode` function would probably be more appropriate + renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0; - if (startMarker && endMarker) { - var range = document.createRange(); - range.setStart(startMarker.node, startMarker.offset); - selection.removeAllRanges(); + return renderedElement; + }, - if (start > end) { - selection.addRange(range); - selection.extend(endMarker.node, endMarker.offset); - } else { - range.setEnd(endMarker.node, endMarker.offset); - selection.addRange(range); + /** + * Lazily allocates the refs object and stores `component` as `ref`. + * + * @param {string} ref Reference name. + * @param {component} component Component to store as `ref`. + * @final + * @private + */ + attachRef: function (ref, component) { + var inst = this.getPublicInstance(); + !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0; + var publicComponentInstance = component.getPublicInstance(); + if (process.env.NODE_ENV !== 'production') { + var componentName = component && component.getName ? component.getName() : 'a component'; + process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0; } - } -} + var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs; + refs[ref] = publicComponentInstance; + }, -var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window); + /** + * Detaches a reference name. + * + * @param {string} ref Name to dereference. + * @final + * @private + */ + detachRef: function (ref) { + var refs = this.getPublicInstance().refs; + delete refs[ref]; + }, -var ReactDOMSelection = { /** - * @param {DOMElement} node + * Get a text description of the component that can be used to identify it + * in error messages. + * @return {string} The name or null. + * @internal */ - getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, + getName: function () { + var type = this._currentElement.type; + var constructor = this._instance && this._instance.constructor; + return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null; + }, /** - * @param {DOMElement|DOMTextNode} node - * @param {object} offsets + * Get the publicly accessible representation of this component - i.e. what + * is exposed by refs and returned by render. Can be null for stateless + * components. + * + * @return {ReactComponent} the public component instance. + * @internal */ - setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets + getPublicInstance: function () { + var inst = this._instance; + if (this._compositeType === CompositeTypes.StatelessFunctional) { + return null; + } + return inst; + }, + + // Stub + _instantiateReactComponent: null + }; -module.exports = ReactDOMSelection; +module.exports = ReactCompositeComponent; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 442 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** +/* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -35927,77 +35735,89 @@ module.exports = ReactDOMSelection; -/** - * Given any node return the first leaf node without children. - * - * @param {DOMElement|DOMTextNode} node - * @return {DOMElement|DOMTextNode} - */ +var _prodInvariant = __webpack_require__(13); -function getLeafNode(node) { - while (node && node.firstChild) { - node = node.firstChild; - } - return node; -} +var ReactPropTypeLocationNames = __webpack_require__(431); +var ReactPropTypesSecret = __webpack_require__(236); -/** - * Get the next sibling within a container. This will walk up the - * DOM if a node's siblings have been exhausted. - * - * @param {DOMElement|DOMTextNode} node - * @return {?DOMElement|DOMTextNode} - */ -function getSiblingNode(node) { - while (node) { - if (node.nextSibling) { - return node.nextSibling; - } - node = node.parentNode; - } +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); } +var loggedTypeFailures = {}; + /** - * Get object describing the nodes which contain characters at offset. + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. * - * @param {DOMElement|DOMTextNode} root - * @param {number} offset - * @return {?object} - */ -function getNodeForCharacterOffset(root, offset) { - var node = getLeafNode(root); - var nodeStart = 0; - var nodeEnd = 0; + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?object} element The React element that is being type-checked + * @param {?number} debugID The React component instance that is being type-checked + * @private + */ +function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0; + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0; + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; - while (node) { - if (node.nodeType === 3) { - nodeEnd = nodeStart + node.textContent.length; + var componentStackInfo = ''; - if (nodeStart <= offset && nodeEnd >= offset) { - return { - node: node, - offset: offset - nodeStart - }; - } + if (process.env.NODE_ENV !== 'production') { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (debugID !== null) { + componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); + } else if (element !== null) { + componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); + } + } - nodeStart = nodeEnd; + process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; + } } - - node = getLeafNode(getSiblingNode(node)); } } -module.exports = getNodeForCharacterOffset; +module.exports = checkReactTypeSpec; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 443 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - - -/** - * Copyright (c) 2013-present, Facebook, Inc. +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -36007,95 +35827,74 @@ module.exports = getNodeForCharacterOffset; * */ -var isTextNode = __webpack_require__(444); -/*eslint-disable no-bitwise */ -/** - * Checks if a given DOM node contains or is another DOM node. - */ -function containsNode(outerNode, innerNode) { - if (!outerNode || !innerNode) { - return false; - } else if (outerNode === innerNode) { - return true; - } else if (isTextNode(outerNode)) { - return false; - } else if (isTextNode(innerNode)) { - return containsNode(outerNode, innerNode.parentNode); - } else if ('contains' in outerNode) { - return outerNode.contains(innerNode); - } else if (outerNode.compareDocumentPosition) { - return !!(outerNode.compareDocumentPosition(innerNode) & 16); - } else { - return false; - } +var ReactPropTypeLocationNames = {}; + +if (process.env.NODE_ENV !== 'production') { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; } -module.exports = containsNode; +module.exports = ReactPropTypeLocationNames; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 444 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - - /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @typechecks + * */ -var isNode = __webpack_require__(445); -/** - * @param {*} object The object to check. - * @return {boolean} Whether or not the object is a DOM text node. - */ -function isTextNode(object) { - return isNode(object) && object.nodeType == 3; + +var nextDebugID = 1; + +function getNextDebugID() { + return nextDebugID++; } -module.exports = isTextNode; +module.exports = getNextDebugID; /***/ }), -/* 445 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - - /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @typechecks + * */ -/** - * @param {*} object The object to check. - * @return {boolean} Whether or not the object is a DOM node. - */ -function isNode(object) { - var doc = object ? object.ownerDocument || object : document; - var defaultView = doc.defaultView || window; - return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); -} -module.exports = isNode; + +// The Symbol used to tag the ReactElement type. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. + +var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; + +module.exports = REACT_ELEMENT_TYPE; /***/ }), -/* 446 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36107,306 +35906,45 @@ module.exports = isNode; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * */ -var NS = { - xlink: 'http://www.w3.org/1999/xlink', - xml: 'http://www.w3.org/XML/1998/namespace' -}; - -// We use attributes for everything SVG so let's avoid some duplication and run -// code instead. -// The following are all specified in the HTML config already so we exclude here. -// - class (as className) -// - color -// - height -// - id -// - lang -// - max -// - media -// - method -// - min -// - name -// - style -// - target -// - type -// - width -var ATTRS = { - accentHeight: 'accent-height', - accumulate: 0, - additive: 0, - alignmentBaseline: 'alignment-baseline', - allowReorder: 'allowReorder', - alphabetic: 0, - amplitude: 0, - arabicForm: 'arabic-form', - ascent: 0, - attributeName: 'attributeName', - attributeType: 'attributeType', - autoReverse: 'autoReverse', - azimuth: 0, - baseFrequency: 'baseFrequency', - baseProfile: 'baseProfile', - baselineShift: 'baseline-shift', - bbox: 0, - begin: 0, - bias: 0, - by: 0, - calcMode: 'calcMode', - capHeight: 'cap-height', - clip: 0, - clipPath: 'clip-path', - clipRule: 'clip-rule', - clipPathUnits: 'clipPathUnits', - colorInterpolation: 'color-interpolation', - colorInterpolationFilters: 'color-interpolation-filters', - colorProfile: 'color-profile', - colorRendering: 'color-rendering', - contentScriptType: 'contentScriptType', - contentStyleType: 'contentStyleType', - cursor: 0, - cx: 0, - cy: 0, - d: 0, - decelerate: 0, - descent: 0, - diffuseConstant: 'diffuseConstant', - direction: 0, - display: 0, - divisor: 0, - dominantBaseline: 'dominant-baseline', - dur: 0, - dx: 0, - dy: 0, - edgeMode: 'edgeMode', - elevation: 0, - enableBackground: 'enable-background', - end: 0, - exponent: 0, - externalResourcesRequired: 'externalResourcesRequired', - fill: 0, - fillOpacity: 'fill-opacity', - fillRule: 'fill-rule', - filter: 0, - filterRes: 'filterRes', - filterUnits: 'filterUnits', - floodColor: 'flood-color', - floodOpacity: 'flood-opacity', - focusable: 0, - fontFamily: 'font-family', - fontSize: 'font-size', - fontSizeAdjust: 'font-size-adjust', - fontStretch: 'font-stretch', - fontStyle: 'font-style', - fontVariant: 'font-variant', - fontWeight: 'font-weight', - format: 0, - from: 0, - fx: 0, - fy: 0, - g1: 0, - g2: 0, - glyphName: 'glyph-name', - glyphOrientationHorizontal: 'glyph-orientation-horizontal', - glyphOrientationVertical: 'glyph-orientation-vertical', - glyphRef: 'glyphRef', - gradientTransform: 'gradientTransform', - gradientUnits: 'gradientUnits', - hanging: 0, - horizAdvX: 'horiz-adv-x', - horizOriginX: 'horiz-origin-x', - ideographic: 0, - imageRendering: 'image-rendering', - 'in': 0, - in2: 0, - intercept: 0, - k: 0, - k1: 0, - k2: 0, - k3: 0, - k4: 0, - kernelMatrix: 'kernelMatrix', - kernelUnitLength: 'kernelUnitLength', - kerning: 0, - keyPoints: 'keyPoints', - keySplines: 'keySplines', - keyTimes: 'keyTimes', - lengthAdjust: 'lengthAdjust', - letterSpacing: 'letter-spacing', - lightingColor: 'lighting-color', - limitingConeAngle: 'limitingConeAngle', - local: 0, - markerEnd: 'marker-end', - markerMid: 'marker-mid', - markerStart: 'marker-start', - markerHeight: 'markerHeight', - markerUnits: 'markerUnits', - markerWidth: 'markerWidth', - mask: 0, - maskContentUnits: 'maskContentUnits', - maskUnits: 'maskUnits', - mathematical: 0, - mode: 0, - numOctaves: 'numOctaves', - offset: 0, - opacity: 0, - operator: 0, - order: 0, - orient: 0, - orientation: 0, - origin: 0, - overflow: 0, - overlinePosition: 'overline-position', - overlineThickness: 'overline-thickness', - paintOrder: 'paint-order', - panose1: 'panose-1', - pathLength: 'pathLength', - patternContentUnits: 'patternContentUnits', - patternTransform: 'patternTransform', - patternUnits: 'patternUnits', - pointerEvents: 'pointer-events', - points: 0, - pointsAtX: 'pointsAtX', - pointsAtY: 'pointsAtY', - pointsAtZ: 'pointsAtZ', - preserveAlpha: 'preserveAlpha', - preserveAspectRatio: 'preserveAspectRatio', - primitiveUnits: 'primitiveUnits', - r: 0, - radius: 0, - refX: 'refX', - refY: 'refY', - renderingIntent: 'rendering-intent', - repeatCount: 'repeatCount', - repeatDur: 'repeatDur', - requiredExtensions: 'requiredExtensions', - requiredFeatures: 'requiredFeatures', - restart: 0, - result: 0, - rotate: 0, - rx: 0, - ry: 0, - scale: 0, - seed: 0, - shapeRendering: 'shape-rendering', - slope: 0, - spacing: 0, - specularConstant: 'specularConstant', - specularExponent: 'specularExponent', - speed: 0, - spreadMethod: 'spreadMethod', - startOffset: 'startOffset', - stdDeviation: 'stdDeviation', - stemh: 0, - stemv: 0, - stitchTiles: 'stitchTiles', - stopColor: 'stop-color', - stopOpacity: 'stop-opacity', - strikethroughPosition: 'strikethrough-position', - strikethroughThickness: 'strikethrough-thickness', - string: 0, - stroke: 0, - strokeDasharray: 'stroke-dasharray', - strokeDashoffset: 'stroke-dashoffset', - strokeLinecap: 'stroke-linecap', - strokeLinejoin: 'stroke-linejoin', - strokeMiterlimit: 'stroke-miterlimit', - strokeOpacity: 'stroke-opacity', - strokeWidth: 'stroke-width', - surfaceScale: 'surfaceScale', - systemLanguage: 'systemLanguage', - tableValues: 'tableValues', - targetX: 'targetX', - targetY: 'targetY', - textAnchor: 'text-anchor', - textDecoration: 'text-decoration', - textRendering: 'text-rendering', - textLength: 'textLength', - to: 0, - transform: 0, - u1: 0, - u2: 0, - underlinePosition: 'underline-position', - underlineThickness: 'underline-thickness', - unicode: 0, - unicodeBidi: 'unicode-bidi', - unicodeRange: 'unicode-range', - unitsPerEm: 'units-per-em', - vAlphabetic: 'v-alphabetic', - vHanging: 'v-hanging', - vIdeographic: 'v-ideographic', - vMathematical: 'v-mathematical', - values: 0, - vectorEffect: 'vector-effect', - version: 0, - vertAdvY: 'vert-adv-y', - vertOriginX: 'vert-origin-x', - vertOriginY: 'vert-origin-y', - viewBox: 'viewBox', - viewTarget: 'viewTarget', - visibility: 0, - widths: 0, - wordSpacing: 'word-spacing', - writingMode: 'writing-mode', - x: 0, - xHeight: 'x-height', - x1: 0, - x2: 0, - xChannelSelector: 'xChannelSelector', - xlinkActuate: 'xlink:actuate', - xlinkArcrole: 'xlink:arcrole', - xlinkHref: 'xlink:href', - xlinkRole: 'xlink:role', - xlinkShow: 'xlink:show', - xlinkTitle: 'xlink:title', - xlinkType: 'xlink:type', - xmlBase: 'xml:base', - xmlns: 0, - xmlnsXlink: 'xmlns:xlink', - xmlLang: 'xml:lang', - xmlSpace: 'xml:space', - y: 0, - y1: 0, - y2: 0, - yChannelSelector: 'yChannelSelector', - z: 0, - zoomAndPan: 'zoomAndPan' -}; +/* global Symbol */ -var SVGDOMPropertyConfig = { - Properties: {}, - DOMAttributeNamespaces: { - xlinkActuate: NS.xlink, - xlinkArcrole: NS.xlink, - xlinkHref: NS.xlink, - xlinkRole: NS.xlink, - xlinkShow: NS.xlink, - xlinkTitle: NS.xlink, - xlinkType: NS.xlink, - xmlBase: NS.xml, - xmlLang: NS.xml, - xmlSpace: NS.xml - }, - DOMAttributeNames: {} -}; +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. -Object.keys(ATTRS).forEach(function (key) { - SVGDOMPropertyConfig.Properties[key] = 0; - if (ATTRS[key]) { - SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key]; +/** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ +function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; } -}); +} -module.exports = SVGDOMPropertyConfig; +module.exports = getIteratorFn; /***/ }), -/* 447 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** +/* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -36414,193 +35952,178 @@ module.exports = SVGDOMPropertyConfig; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * */ -var EventPropagators = __webpack_require__(77); -var ExecutionEnvironment = __webpack_require__(19); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactInputSelection = __webpack_require__(241); -var SyntheticEvent = __webpack_require__(38); +var KeyEscapeUtils = __webpack_require__(161); +var traverseAllChildren = __webpack_require__(242); +var warning = __webpack_require__(11); -var getActiveElement = __webpack_require__(242); -var isTextInputElement = __webpack_require__(227); -var shallowEqual = __webpack_require__(81); +var ReactComponentTreeHook; -var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; +if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); +} -var eventTypes = { - select: { - phasedRegistrationNames: { - bubbled: 'onSelect', - captured: 'onSelectCapture' - }, - dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange'] +/** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + * @param {number=} selfDebugID Optional debugID of the current internal instance. + */ +function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + // We found a component instance. + if (traverseContext && typeof traverseContext === 'object') { + var result = traverseContext; + var keyUnique = result[name] === undefined; + if (process.env.NODE_ENV !== 'production') { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (!keyUnique) { + process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; + } + } + if (keyUnique && child != null) { + result[name] = child; + } } -}; - -var activeElement = null; -var activeElementInst = null; -var lastSelection = null; -var mouseDown = false; - -// Track whether a listener exists for this plugin. If none exist, we do -// not extract events. See #3639. -var hasListener = false; +} /** - * Get an object which is a unique representation of the current selection. - * - * The return value will not be consistent across nodes or browsers, but - * two identical selections on the same node will return identical objects. - * - * @param {DOMElement} node - * @return {object} + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. */ -function getSelection(node) { - if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) { - return { - start: node.selectionStart, - end: node.selectionEnd - }; - } else if (window.getSelection) { - var selection = window.getSelection(); - return { - anchorNode: selection.anchorNode, - anchorOffset: selection.anchorOffset, - focusNode: selection.focusNode, - focusOffset: selection.focusOffset - }; - } else if (document.selection) { - var range = document.selection.createRange(); - return { - parentElement: range.parentElement(), - text: range.text, - top: range.boundingTop, - left: range.boundingLeft - }; +function flattenChildren(children, selfDebugID) { + if (children == null) { + return children; } + var result = {}; + + if (process.env.NODE_ENV !== 'production') { + traverseAllChildren(children, function (traverseContext, child, name) { + return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); + }, result); + } else { + traverseAllChildren(children, flattenSingleChildIntoContext, result); + } + return result; } -/** - * Poll selection to see whether it's changed. +module.exports = flattenChildren; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 436 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @param {object} nativeEvent - * @return {?SyntheticEvent} */ -function constructSelectEvent(nativeEvent, nativeEventTarget) { - // Ensure we have the right element, and that the user is not dragging a - // selection (this matches native `select` event behavior). In HTML5, select - // fires only on input and textarea thus if there's no focused element we - // won't dispatch. - if (mouseDown || activeElement == null || activeElement !== getActiveElement()) { - return null; - } - // Only fire when selection has actually changed. - var currentSelection = getSelection(activeElement); - if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { - lastSelection = currentSelection; - var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget); - syntheticEvent.type = 'select'; - syntheticEvent.target = activeElement; +var _assign = __webpack_require__(14); - EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent); +var PooledClass = __webpack_require__(57); +var Transaction = __webpack_require__(102); +var ReactInstrumentation = __webpack_require__(25); +var ReactServerUpdateQueue = __webpack_require__(437); - return syntheticEvent; - } +/** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ +var TRANSACTION_WRAPPERS = []; - return null; +if (process.env.NODE_ENV !== 'production') { + TRANSACTION_WRAPPERS.push({ + initialize: ReactInstrumentation.debugTool.onBeginFlush, + close: ReactInstrumentation.debugTool.onEndFlush + }); } +var noopCallbackQueue = { + enqueue: function () {} +}; + /** - * This plugin creates an `onSelect` event that normalizes select events - * across form elements. - * - * Supported elements are: - * - input (see `isTextInputElement`) - * - textarea - * - contentEditable - * - * This differs from native browser implementations in the following ways: - * - Fires on contentEditable fields as well as inputs. - * - Fires for collapsed selection. - * - Fires after user input. + * @class ReactServerRenderingTransaction + * @param {boolean} renderToStaticMarkup */ -var SelectEventPlugin = { - eventTypes: eventTypes, - - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - if (!hasListener) { - return null; - } +function ReactServerRenderingTransaction(renderToStaticMarkup) { + this.reinitializeTransaction(); + this.renderToStaticMarkup = renderToStaticMarkup; + this.useCreateElement = false; + this.updateQueue = new ReactServerUpdateQueue(this); +} - var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; +var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array} Empty list of operation wrap procedures. + */ + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, - switch (topLevelType) { - // Track the input node that has focus. - case 'topFocus': - if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { - activeElement = targetNode; - activeElementInst = targetInst; - lastSelection = null; - } - break; - case 'topBlur': - activeElement = null; - activeElementInst = null; - lastSelection = null; - break; - // Don't fire the event while the user is dragging. This matches the - // semantics of the native select event. - case 'topMouseDown': - mouseDown = true; - break; - case 'topContextMenu': - case 'topMouseUp': - mouseDown = false; - return constructSelectEvent(nativeEvent, nativeEventTarget); - // Chrome and IE fire non-standard event when selection is changed (and - // sometimes when it hasn't). IE's event fires out of order with respect - // to key and input events on deletion, so we discard it. - // - // Firefox doesn't support selectionchange, so check selection status - // after each key entry. The selection changes after keydown and before - // keyup, but we check on keydown as well in the case of holding down a - // key, when multiple keydown events are fired but only one keyup is. - // This is also our approach for IE handling, for the reason above. - case 'topSelectionChange': - if (skipSelectionChangeEvent) { - break; - } - // falls through - case 'topKeyDown': - case 'topKeyUp': - return constructSelectEvent(nativeEvent, nativeEventTarget); - } + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function () { + return noopCallbackQueue; + }, - return null; + /** + * @return {object} The queue to collect React async events. + */ + getUpdateQueue: function () { + return this.updateQueue; }, - didPutListener: function (inst, registrationName, listener) { - if (registrationName === 'onSelect') { - hasListener = true; - } - } + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be reused. + */ + destructor: function () {}, + + checkpoint: function () {}, + + rollback: function () {} }; -module.exports = SelectEventPlugin; +_assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin); + +PooledClass.addPoolingTo(ReactServerRenderingTransaction); + +module.exports = ReactServerRenderingTransaction; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 448 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. + * Copyright 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -36612,227 +36135,140 @@ module.exports = SelectEventPlugin; -var _prodInvariant = __webpack_require__(14); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var EventListener = __webpack_require__(240); -var EventPropagators = __webpack_require__(77); -var ReactDOMComponentTree = __webpack_require__(16); -var SyntheticAnimationEvent = __webpack_require__(449); -var SyntheticClipboardEvent = __webpack_require__(450); -var SyntheticEvent = __webpack_require__(38); -var SyntheticFocusEvent = __webpack_require__(451); -var SyntheticKeyboardEvent = __webpack_require__(452); -var SyntheticMouseEvent = __webpack_require__(103); -var SyntheticDragEvent = __webpack_require__(454); -var SyntheticTouchEvent = __webpack_require__(455); -var SyntheticTransitionEvent = __webpack_require__(456); -var SyntheticUIEvent = __webpack_require__(79); -var SyntheticWheelEvent = __webpack_require__(457); - -var emptyFunction = __webpack_require__(23); -var getEventCharCode = __webpack_require__(159); -var invariant = __webpack_require__(10); +var ReactUpdateQueue = __webpack_require__(162); + +var warning = __webpack_require__(11); + +function warnNoop(publicInstance, callerName) { + if (process.env.NODE_ENV !== 'production') { + var constructor = publicInstance.constructor; + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; + } +} /** - * Turns - * ['abort', ...] - * into - * eventTypes = { - * 'abort': { - * phasedRegistrationNames: { - * bubbled: 'onAbort', - * captured: 'onAbortCapture', - * }, - * dependencies: ['topAbort'], - * }, - * ... - * }; - * topLevelEventsToDispatchConfig = { - * 'topAbort': { sameConfig } - * }; + * This is the update queue used for server rendering. + * It delegates to ReactUpdateQueue while server rendering is in progress and + * switches to ReactNoopUpdateQueue after the transaction has completed. + * @class ReactServerUpdateQueue + * @param {Transaction} transaction */ -var eventTypes = {}; -var topLevelEventsToDispatchConfig = {}; -['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) { - var capitalizedEvent = event[0].toUpperCase() + event.slice(1); - var onEvent = 'on' + capitalizedEvent; - var topEvent = 'top' + capitalizedEvent; - var type = { - phasedRegistrationNames: { - bubbled: onEvent, - captured: onEvent + 'Capture' - }, - dependencies: [topEvent] - }; - eventTypes[event] = type; - topLevelEventsToDispatchConfig[topEvent] = type; -}); +var ReactServerUpdateQueue = function () { + function ReactServerUpdateQueue(transaction) { + _classCallCheck(this, ReactServerUpdateQueue); -var onClickListeners = {}; + this.transaction = transaction; + } -function getDictionaryKey(inst) { - // Prevents V8 performance issue: - // https://github.com/facebook/react/pull/7232 - return '.' + inst._rootNodeID; -} + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ -function isInteractive(tag) { - return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; -} -var SimpleEventPlugin = { - eventTypes: eventTypes, + ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) { + return false; + }; - extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; - if (!dispatchConfig) { - return null; + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName); } - var EventConstructor; - switch (topLevelType) { - case 'topAbort': - case 'topCanPlay': - case 'topCanPlayThrough': - case 'topDurationChange': - case 'topEmptied': - case 'topEncrypted': - case 'topEnded': - case 'topError': - case 'topInput': - case 'topInvalid': - case 'topLoad': - case 'topLoadedData': - case 'topLoadedMetadata': - case 'topLoadStart': - case 'topPause': - case 'topPlay': - case 'topPlaying': - case 'topProgress': - case 'topRateChange': - case 'topReset': - case 'topSeeked': - case 'topSeeking': - case 'topStalled': - case 'topSubmit': - case 'topSuspend': - case 'topTimeUpdate': - case 'topVolumeChange': - case 'topWaiting': - // HTML Events - // @see http://www.w3.org/TR/html5/index.html#events-0 - EventConstructor = SyntheticEvent; - break; - case 'topKeyPress': - // Firefox creates a keypress event for function keys too. This removes - // the unwanted keypress events. Enter is however both printable and - // non-printable. One would expect Tab to be as well (but it isn't). - if (getEventCharCode(nativeEvent) === 0) { - return null; - } - /* falls through */ - case 'topKeyDown': - case 'topKeyUp': - EventConstructor = SyntheticKeyboardEvent; - break; - case 'topBlur': - case 'topFocus': - EventConstructor = SyntheticFocusEvent; - break; - case 'topClick': - // Firefox creates a click event on right mouse clicks. This removes the - // unwanted click events. - if (nativeEvent.button === 2) { - return null; - } - /* falls through */ - case 'topDoubleClick': - case 'topMouseDown': - case 'topMouseMove': - case 'topMouseUp': - // TODO: Disabled elements should not respond to mouse events - /* falls through */ - case 'topMouseOut': - case 'topMouseOver': - case 'topContextMenu': - EventConstructor = SyntheticMouseEvent; - break; - case 'topDrag': - case 'topDragEnd': - case 'topDragEnter': - case 'topDragExit': - case 'topDragLeave': - case 'topDragOver': - case 'topDragStart': - case 'topDrop': - EventConstructor = SyntheticDragEvent; - break; - case 'topTouchCancel': - case 'topTouchEnd': - case 'topTouchMove': - case 'topTouchStart': - EventConstructor = SyntheticTouchEvent; - break; - case 'topAnimationEnd': - case 'topAnimationIteration': - case 'topAnimationStart': - EventConstructor = SyntheticAnimationEvent; - break; - case 'topTransitionEnd': - EventConstructor = SyntheticTransitionEvent; - break; - case 'topScroll': - EventConstructor = SyntheticUIEvent; - break; - case 'topWheel': - EventConstructor = SyntheticWheelEvent; - break; - case 'topCopy': - case 'topCut': - case 'topPaste': - EventConstructor = SyntheticClipboardEvent; - break; + }; + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueForceUpdate(publicInstance); + } else { + warnNoop(publicInstance, 'forceUpdate'); } - !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0; - var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget); - EventPropagators.accumulateTwoPhaseDispatches(event); - return event; - }, + }; - didPutListener: function (inst, registrationName, listener) { - // Mobile Safari does not fire properly bubble click events on - // non-interactive elements, which means delegated click listeners do not - // fire. The workaround for this bug involves attaching an empty click - // listener on the target node. - // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html - if (registrationName === 'onClick' && !isInteractive(inst._tag)) { - var key = getDictionaryKey(inst); - var node = ReactDOMComponentTree.getNodeFromInstance(inst); - if (!onClickListeners[key]) { - onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction); - } + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object|function} completeState Next state. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState); + } else { + warnNoop(publicInstance, 'replaceState'); } - }, + }; - willDeleteListener: function (inst, registrationName) { - if (registrationName === 'onClick' && !isInteractive(inst._tag)) { - var key = getDictionaryKey(inst); - onClickListeners[key].remove(); - delete onClickListeners[key]; + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object|function} partialState Next partial state to be merged with state. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueSetState(publicInstance, partialState); + } else { + warnNoop(publicInstance, 'setState'); } - } -}; + }; -module.exports = SimpleEventPlugin; + return ReactServerUpdateQueue; +}(); + +module.exports = ReactServerUpdateQueue; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 449 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** - * Copyright 2013-present, Facebook, Inc. + * Copyright 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -36843,40 +36279,61 @@ module.exports = SimpleEventPlugin; -var SyntheticEvent = __webpack_require__(38); +var _assign = __webpack_require__(14); -/** - * @interface Event - * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface - * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent - */ -var AnimationEventInterface = { - animationName: null, - elapsedTime: null, - pseudoElement: null -}; +var DOMLazyTree = __webpack_require__(70); +var ReactDOMComponentTree = __webpack_require__(15); -/** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticEvent} - */ -function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); -} +var ReactDOMEmptyComponent = function (instantiate) { + // ReactCompositeComponent uses this: + this._currentElement = null; + // ReactDOMComponentTree uses these: + this._hostNode = null; + this._hostParent = null; + this._hostContainerInfo = null; + this._domID = 0; +}; +_assign(ReactDOMEmptyComponent.prototype, { + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + var domID = hostContainerInfo._idCounter++; + this._domID = domID; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; -SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface); + var nodeValue = ' react-empty: ' + this._domID + ' '; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var node = ownerDocument.createComment(nodeValue); + ReactDOMComponentTree.precacheNode(this, node); + return DOMLazyTree(node); + } else { + if (transaction.renderToStaticMarkup) { + // Normally we'd insert a comment node, but since this is a situation + // where React won't take over (static pages), we can simply return + // nothing. + return ''; + } + return '<!--' + nodeValue + '-->'; + } + }, + receiveComponent: function () {}, + getHostNode: function () { + return ReactDOMComponentTree.getNodeFromInstance(this); + }, + unmountComponent: function () { + ReactDOMComponentTree.uncacheNode(this); + } +}); -module.exports = SyntheticAnimationEvent; +module.exports = ReactDOMEmptyComponent; /***/ }), -/* 450 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** - * Copyright 2013-present, Facebook, Inc. +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -36887,79 +36344,137 @@ module.exports = SyntheticAnimationEvent; -var SyntheticEvent = __webpack_require__(38); +var _prodInvariant = __webpack_require__(13); -/** - * @interface Event - * @see http://www.w3.org/TR/clipboard-apis/ - */ -var ClipboardEventInterface = { - clipboardData: function (event) { - return 'clipboardData' in event ? event.clipboardData : window.clipboardData; - } -}; +var invariant = __webpack_require__(10); /** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticUIEvent} + * Return the lowest common ancestor of A and B, or null if they are in + * different trees. */ -function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); -} +function getLowestCommonAncestor(instA, instB) { + !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; + !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; -SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); + var depthA = 0; + for (var tempA = instA; tempA; tempA = tempA._hostParent) { + depthA++; + } + var depthB = 0; + for (var tempB = instB; tempB; tempB = tempB._hostParent) { + depthB++; + } -module.exports = SyntheticClipboardEvent; + // If A is deeper, crawl up. + while (depthA - depthB > 0) { + instA = instA._hostParent; + depthA--; + } -/***/ }), -/* 451 */ -/***/ (function(module, exports, __webpack_require__) { + // If B is deeper, crawl up. + while (depthB - depthA > 0) { + instB = instB._hostParent; + depthB--; + } + + // Walk in lockstep until we find a match. + var depth = depthA; + while (depth--) { + if (instA === instB) { + return instA; + } + instA = instA._hostParent; + instB = instB._hostParent; + } + return null; +} -"use strict"; /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * + * Return if A is an ancestor of B. */ +function isAncestor(instA, instB) { + !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; + !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; + while (instB) { + if (instB === instA) { + return true; + } + instB = instB._hostParent; + } + return false; +} +/** + * Return the parent instance of the passed-in instance. + */ +function getParentInstance(inst) { + !('_hostNode' in inst) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0; -var SyntheticUIEvent = __webpack_require__(79); + return inst._hostParent; +} /** - * @interface FocusEvent - * @see http://www.w3.org/TR/DOM-Level-3-Events/ + * Simulates the traversal of a two-phase, capture/bubble event dispatch. */ -var FocusEventInterface = { - relatedTarget: null -}; +function traverseTwoPhase(inst, fn, arg) { + var path = []; + while (inst) { + path.push(inst); + inst = inst._hostParent; + } + var i; + for (i = path.length; i-- > 0;) { + fn(path[i], 'captured', arg); + } + for (i = 0; i < path.length; i++) { + fn(path[i], 'bubbled', arg); + } +} /** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticUIEvent} + * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that + * should would receive a `mouseEnter` or `mouseLeave` event. + * + * Does not invoke the callback on the nearest common ancestor because nothing + * "entered" or "left" that element. */ -function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +function traverseEnterLeave(from, to, fn, argFrom, argTo) { + var common = from && to ? getLowestCommonAncestor(from, to) : null; + var pathFrom = []; + while (from && from !== common) { + pathFrom.push(from); + from = from._hostParent; + } + var pathTo = []; + while (to && to !== common) { + pathTo.push(to); + to = to._hostParent; + } + var i; + for (i = 0; i < pathFrom.length; i++) { + fn(pathFrom[i], 'bubbled', argFrom); + } + for (i = pathTo.length; i-- > 0;) { + fn(pathTo[i], 'captured', argTo); + } } -SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); - -module.exports = SyntheticFocusEvent; +module.exports = { + isAncestor: isAncestor, + getLowestCommonAncestor: getLowestCommonAncestor, + getParentInstance: getParentInstance, + traverseTwoPhase: traverseTwoPhase, + traverseEnterLeave: traverseEnterLeave +}; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 452 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/** +/* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -36971,80 +36486,161 @@ module.exports = SyntheticFocusEvent; -var SyntheticUIEvent = __webpack_require__(79); +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); -var getEventCharCode = __webpack_require__(159); -var getEventKey = __webpack_require__(453); -var getEventModifierState = __webpack_require__(149); +var DOMChildrenOperations = __webpack_require__(155); +var DOMLazyTree = __webpack_require__(70); +var ReactDOMComponentTree = __webpack_require__(15); + +var escapeTextContentForBrowser = __webpack_require__(105); +var invariant = __webpack_require__(10); +var validateDOMNesting = __webpack_require__(163); /** - * @interface KeyboardEvent - * @see http://www.w3.org/TR/DOM-Level-3-Events/ + * Text nodes violate a couple assumptions that React makes about components: + * + * - When mounting text into the DOM, adjacent text nodes are merged. + * - Text nodes cannot be assigned a React root ID. + * + * This component is used to wrap strings between comment nodes so that they + * can undergo the same reconciliation that is applied to elements. + * + * TODO: Investigate representing React components in the DOM with text nodes. + * + * @class ReactDOMTextComponent + * @extends ReactComponent + * @internal */ -var KeyboardEventInterface = { - key: getEventKey, - location: null, - ctrlKey: null, - shiftKey: null, - altKey: null, - metaKey: null, - repeat: null, - locale: null, - getModifierState: getEventModifierState, - // Legacy Interface - charCode: function (event) { - // `charCode` is the result of a KeyPress event and represents the value of - // the actual printable character. +var ReactDOMTextComponent = function (text) { + // TODO: This is really a ReactText (ReactNode), not a ReactElement + this._currentElement = text; + this._stringText = '' + text; + // ReactDOMComponentTree uses these: + this._hostNode = null; + this._hostParent = null; - // KeyPress is deprecated, but its replacement is not yet final and not - // implemented in any major browser. Only KeyPress has charCode. - if (event.type === 'keypress') { - return getEventCharCode(event); + // Properties + this._domID = 0; + this._mountIndex = 0; + this._closingComment = null; + this._commentNodes = null; +}; + +_assign(ReactDOMTextComponent.prototype, { + + /** + * Creates the markup for this text node. This node is not intended to have + * any features besides containing text content. + * + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {string} Markup for this text node. + * @internal + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + if (process.env.NODE_ENV !== 'production') { + var parentInfo; + if (hostParent != null) { + parentInfo = hostParent._ancestorInfo; + } else if (hostContainerInfo != null) { + parentInfo = hostContainerInfo._ancestorInfo; + } + if (parentInfo) { + // parentInfo should always be present except for the top-level + // component when server rendering + validateDOMNesting(null, this._stringText, this, parentInfo); + } + } + + var domID = hostContainerInfo._idCounter++; + var openingValue = ' react-text: ' + domID + ' '; + var closingValue = ' /react-text '; + this._domID = domID; + this._hostParent = hostParent; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var openingComment = ownerDocument.createComment(openingValue); + var closingComment = ownerDocument.createComment(closingValue); + var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment()); + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment)); + if (this._stringText) { + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText))); + } + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment)); + ReactDOMComponentTree.precacheNode(this, openingComment); + this._closingComment = closingComment; + return lazyTree; + } else { + var escapedText = escapeTextContentForBrowser(this._stringText); + + if (transaction.renderToStaticMarkup) { + // Normally we'd wrap this between comment nodes for the reasons stated + // above, but since this is a situation where React won't take over + // (static pages), we can simply return the text as it is. + return escapedText; + } + + return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->'; } - return 0; }, - keyCode: function (event) { - // `keyCode` is the result of a KeyDown/Up event and represents the value of - // physical keyboard key. - // The actual meaning of the value depends on the users' keyboard layout - // which cannot be detected. Assuming that it is a US keyboard layout - // provides a surprisingly accurate mapping for US and European users. - // Due to this, it is left to the user to implement at this time. - if (event.type === 'keydown' || event.type === 'keyup') { - return event.keyCode; + /** + * Updates this component by updating the text content. + * + * @param {ReactText} nextText The next text content + * @param {ReactReconcileTransaction} transaction + * @internal + */ + receiveComponent: function (nextText, transaction) { + if (nextText !== this._currentElement) { + this._currentElement = nextText; + var nextStringText = '' + nextText; + if (nextStringText !== this._stringText) { + // TODO: Save this as pending props and use performUpdateIfNecessary + // and/or updateComponent to do the actual update for consistency with + // other component types? + this._stringText = nextStringText; + var commentNodes = this.getHostNode(); + DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText); + } } - return 0; }, - which: function (event) { - // `which` is an alias for either `keyCode` or `charCode` depending on the - // type of the event. - if (event.type === 'keypress') { - return getEventCharCode(event); + + getHostNode: function () { + var hostNode = this._commentNodes; + if (hostNode) { + return hostNode; } - if (event.type === 'keydown' || event.type === 'keyup') { - return event.keyCode; + if (!this._closingComment) { + var openingComment = ReactDOMComponentTree.getNodeFromInstance(this); + var node = openingComment.nextSibling; + while (true) { + !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0; + if (node.nodeType === 8 && node.nodeValue === ' /react-text ') { + this._closingComment = node; + break; + } + node = node.nextSibling; + } } - return 0; - } -}; + hostNode = [this._hostNode, this._closingComment]; + this._commentNodes = hostNode; + return hostNode; + }, -/** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticUIEvent} - */ -function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); -} + unmountComponent: function () { + this._closingComment = null; + this._commentNodes = null; + ReactDOMComponentTree.uncacheNode(this); + } -SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); +}); -module.exports = SyntheticKeyboardEvent; +module.exports = ReactDOMTextComponent; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 453 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37060,108 +36656,64 @@ module.exports = SyntheticKeyboardEvent; -var getEventCharCode = __webpack_require__(159); +var _assign = __webpack_require__(14); -/** - * Normalization of deprecated HTML5 `key` values - * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names - */ -var normalizeKey = { - Esc: 'Escape', - Spacebar: ' ', - Left: 'ArrowLeft', - Up: 'ArrowUp', - Right: 'ArrowRight', - Down: 'ArrowDown', - Del: 'Delete', - Win: 'OS', - Menu: 'ContextMenu', - Apps: 'ContextMenu', - Scroll: 'ScrollLock', - MozPrintableKey: 'Unidentified' +var ReactUpdates = __webpack_require__(30); +var Transaction = __webpack_require__(102); + +var emptyFunction = __webpack_require__(21); + +var RESET_BATCHED_UPDATES = { + initialize: emptyFunction, + close: function () { + ReactDefaultBatchingStrategy.isBatchingUpdates = false; + } }; -/** - * Translation from legacy `keyCode` to HTML5 `key` - * Only special keys supported, all others depend on keyboard layout or browser - * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names - */ -var translateToKey = { - 8: 'Backspace', - 9: 'Tab', - 12: 'Clear', - 13: 'Enter', - 16: 'Shift', - 17: 'Control', - 18: 'Alt', - 19: 'Pause', - 20: 'CapsLock', - 27: 'Escape', - 32: ' ', - 33: 'PageUp', - 34: 'PageDown', - 35: 'End', - 36: 'Home', - 37: 'ArrowLeft', - 38: 'ArrowUp', - 39: 'ArrowRight', - 40: 'ArrowDown', - 45: 'Insert', - 46: 'Delete', - 112: 'F1', - 113: 'F2', - 114: 'F3', - 115: 'F4', - 116: 'F5', - 117: 'F6', - 118: 'F7', - 119: 'F8', - 120: 'F9', - 121: 'F10', - 122: 'F11', - 123: 'F12', - 144: 'NumLock', - 145: 'ScrollLock', - 224: 'Meta' +var FLUSH_BATCHED_UPDATES = { + initialize: emptyFunction, + close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates) }; -/** - * @param {object} nativeEvent Native browser event. - * @return {string} Normalized `key` property. - */ -function getEventKey(nativeEvent) { - if (nativeEvent.key) { - // Normalize inconsistent values reported by browsers due to - // implementations of a working draft specification. +var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES]; - // FireFox implements `key` but returns `MozPrintableKey` for all - // printable characters (normalized to `Unidentified`), ignore it. - var key = normalizeKey[nativeEvent.key] || nativeEvent.key; - if (key !== 'Unidentified') { - return key; - } +function ReactDefaultBatchingStrategyTransaction() { + this.reinitializeTransaction(); +} + +_assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, { + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; } +}); - // Browser does not implement `key`, polyfill as much of it as we can. - if (nativeEvent.type === 'keypress') { - var charCode = getEventCharCode(nativeEvent); +var transaction = new ReactDefaultBatchingStrategyTransaction(); - // The enter-key is technically both printable and non-printable and can - // thus be captured by `keypress`, no other non-printable key should. - return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); - } - if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { - // While user keyboard layout determines the actual meaning of each - // `keyCode` value, almost all function keys have a universal value. - return translateToKey[nativeEvent.keyCode] || 'Unidentified'; +var ReactDefaultBatchingStrategy = { + isBatchingUpdates: false, + + /** + * Call the provided function in a context within which calls to `setState` + * and friends are batched such that components aren't updated unnecessarily. + */ + batchedUpdates: function (callback, a, b, c, d, e) { + var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; + + ReactDefaultBatchingStrategy.isBatchingUpdates = true; + + // The code is written this way to avoid extra allocations + if (alreadyBatchingUpdates) { + return callback(a, b, c, d, e); + } else { + return transaction.perform(callback, null, a, b, c, d, e); + } } - return ''; -} +}; -module.exports = getEventKey; +module.exports = ReactDefaultBatchingStrategy; /***/ }), -/* 454 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37177,126 +36729,195 @@ module.exports = getEventKey; -var SyntheticMouseEvent = __webpack_require__(103); +var _assign = __webpack_require__(14); -/** - * @interface DragEvent - * @see http://www.w3.org/TR/DOM-Level-3-Events/ - */ -var DragEventInterface = { - dataTransfer: null -}; +var EventListener = __webpack_require__(243); +var ExecutionEnvironment = __webpack_require__(18); +var PooledClass = __webpack_require__(57); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactUpdates = __webpack_require__(30); + +var getEventTarget = __webpack_require__(152); +var getUnboundedScrollPosition = __webpack_require__(443); /** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticUIEvent} - */ -function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + * Find the deepest React component completely containing the root of the + * passed-in instance (for use when entire React trees are nested within each + * other). If React trees are not nested, returns null. + */ +function findParent(inst) { + // TODO: It may be a good idea to cache this to prevent unnecessary DOM + // traversal, but caching is difficult to do correctly without using a + // mutation observer to listen for all DOM changes. + while (inst._hostParent) { + inst = inst._hostParent; + } + var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst); + var container = rootNode.parentNode; + return ReactDOMComponentTree.getClosestInstanceFromNode(container); } -SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); +// Used to store ancestor hierarchy in top level callback +function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { + this.topLevelType = topLevelType; + this.nativeEvent = nativeEvent; + this.ancestors = []; +} +_assign(TopLevelCallbackBookKeeping.prototype, { + destructor: function () { + this.topLevelType = null; + this.nativeEvent = null; + this.ancestors.length = 0; + } +}); +PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler); -module.exports = SyntheticDragEvent; +function handleTopLevelImpl(bookKeeping) { + var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent); + var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget); -/***/ }), -/* 455 */ -/***/ (function(module, exports, __webpack_require__) { + // Loop through the hierarchy, in case there's any nested components. + // It's important that we build the array of ancestors before calling any + // event handlers, because event handlers can modify the DOM, leading to + // inconsistencies with ReactMount's node cache. See #1105. + var ancestor = targetInst; + do { + bookKeeping.ancestors.push(ancestor); + ancestor = ancestor && findParent(ancestor); + } while (ancestor); -"use strict"; -/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ + for (var i = 0; i < bookKeeping.ancestors.length; i++) { + targetInst = bookKeeping.ancestors[i]; + ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); + } +} +function scrollValueMonitor(cb) { + var scrollPosition = getUnboundedScrollPosition(window); + cb(scrollPosition); +} +var ReactEventListener = { + _enabled: true, + _handleTopLevel: null, -var SyntheticUIEvent = __webpack_require__(79); + WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, -var getEventModifierState = __webpack_require__(149); + setHandleTopLevel: function (handleTopLevel) { + ReactEventListener._handleTopLevel = handleTopLevel; + }, -/** - * @interface TouchEvent - * @see http://www.w3.org/TR/touch-events/ - */ -var TouchEventInterface = { - touches: null, - targetTouches: null, - changedTouches: null, - altKey: null, - metaKey: null, - ctrlKey: null, - shiftKey: null, - getModifierState: getEventModifierState -}; + setEnabled: function (enabled) { + ReactEventListener._enabled = !!enabled; + }, -/** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticUIEvent} - */ -function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); -} + isEnabled: function () { + return ReactEventListener._enabled; + }, -SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); + /** + * Traps top-level events by using event bubbling. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} element Element on which to attach listener. + * @return {?object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapBubbledEvent: function (topLevelType, handlerBaseName, element) { + if (!element) { + return null; + } + return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); + }, -module.exports = SyntheticTouchEvent; + /** + * Traps a top-level event by using event capturing. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} element Element on which to attach listener. + * @return {?object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapCapturedEvent: function (topLevelType, handlerBaseName, element) { + if (!element) { + return null; + } + return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); + }, + + monitorScrollValue: function (refresh) { + var callback = scrollValueMonitor.bind(null, refresh); + EventListener.listen(window, 'scroll', callback); + }, + + dispatchEvent: function (topLevelType, nativeEvent) { + if (!ReactEventListener._enabled) { + return; + } + + var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent); + try { + // Event queue being processed in the same cycle allows + // `preventDefault`. + ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping); + } finally { + TopLevelCallbackBookKeeping.release(bookKeeping); + } + } +}; + +module.exports = ReactEventListener; /***/ }), -/* 456 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** - * Copyright 2013-present, Facebook, Inc. + * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @typechecks */ -var SyntheticEvent = __webpack_require__(38); - /** - * @interface Event - * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- - * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent + * Gets the scroll position of the supplied element or window. + * + * The return values are unbounded, unlike `getScrollPosition`. This means they + * may be negative or exceed the element boundaries (which is possible using + * inertial scrolling). + * + * @param {DOMWindow|DOMElement} scrollable + * @return {object} Map with `x` and `y` keys. */ -var TransitionEventInterface = { - propertyName: null, - elapsedTime: null, - pseudoElement: null -}; -/** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticEvent} - */ -function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +function getUnboundedScrollPosition(scrollable) { + if (scrollable.Window && scrollable instanceof scrollable.Window) { + return { + x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft, + y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop + }; + } + return { + x: scrollable.scrollLeft, + y: scrollable.scrollTop + }; } -SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface); - -module.exports = SyntheticTransitionEvent; +module.exports = getUnboundedScrollPosition; /***/ }), -/* 457 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37312,47 +36933,30 @@ module.exports = SyntheticTransitionEvent; -var SyntheticMouseEvent = __webpack_require__(103); - -/** - * @interface WheelEvent - * @see http://www.w3.org/TR/DOM-Level-3-Events/ - */ -var WheelEventInterface = { - deltaX: function (event) { - return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). - 'wheelDeltaX' in event ? -event.wheelDeltaX : 0; - }, - deltaY: function (event) { - return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). - 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). - 'wheelDelta' in event ? -event.wheelDelta : 0; - }, - deltaZ: null, +var DOMProperty = __webpack_require__(45); +var EventPluginHub = __webpack_require__(79); +var EventPluginUtils = __webpack_require__(150); +var ReactComponentEnvironment = __webpack_require__(159); +var ReactEmptyComponent = __webpack_require__(240); +var ReactBrowserEventEmitter = __webpack_require__(106); +var ReactHostComponent = __webpack_require__(241); +var ReactUpdates = __webpack_require__(30); - // Browsers without "deltaMode" is reporting in raw wheel delta where one - // notch on the scroll is always +/- 120, roughly equivalent to pixels. - // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or - // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. - deltaMode: null +var ReactInjection = { + Component: ReactComponentEnvironment.injection, + DOMProperty: DOMProperty.injection, + EmptyComponent: ReactEmptyComponent.injection, + EventPluginHub: EventPluginHub.injection, + EventPluginUtils: EventPluginUtils.injection, + EventEmitter: ReactBrowserEventEmitter.injection, + HostComponent: ReactHostComponent.injection, + Updates: ReactUpdates.injection }; -/** - * @param {object} dispatchConfig Configuration used to dispatch this event. - * @param {string} dispatchMarker Marker identifying the event target. - * @param {object} nativeEvent Native browser event. - * @extends {SyntheticMouseEvent} - */ -function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { - return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); -} - -SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); - -module.exports = SyntheticWheelEvent; +module.exports = ReactInjection; /***/ }), -/* 458 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37368,109 +36972,175 @@ module.exports = SyntheticWheelEvent; -var validateDOMNesting = __webpack_require__(158); - -var DOC_NODE_TYPE = 9; - -function ReactDOMContainerInfo(topLevelWrapper, node) { - var info = { - _topLevelWrapper: topLevelWrapper, - _idCounter: 1, - _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null, - _node: node, - _tag: node ? node.nodeName.toLowerCase() : null, - _namespaceURI: node ? node.namespaceURI : null - }; - if (process.env.NODE_ENV !== 'production') { - info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null; - } - return info; -} +var _assign = __webpack_require__(14); -module.exports = ReactDOMContainerInfo; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +var CallbackQueue = __webpack_require__(228); +var PooledClass = __webpack_require__(57); +var ReactBrowserEventEmitter = __webpack_require__(106); +var ReactInputSelection = __webpack_require__(244); +var ReactInstrumentation = __webpack_require__(25); +var Transaction = __webpack_require__(102); +var ReactUpdateQueue = __webpack_require__(162); -/***/ }), -/* 459 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Ensures that, when possible, the selection range (currently selected text + * input) is not disturbed by performing the transaction. + */ +var SELECTION_RESTORATION = { + /** + * @return {Selection} Selection information. + */ + initialize: ReactInputSelection.getSelectionInformation, + /** + * @param {Selection} sel Selection information returned from `initialize`. + */ + close: ReactInputSelection.restoreSelection +}; -"use strict"; /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * + * Suppresses events (blur/focus) that could be inadvertently dispatched due to + * high level DOM manipulations (like temporarily removing a text input from the + * DOM). */ +var EVENT_SUPPRESSION = { + /** + * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before + * the reconciliation. + */ + initialize: function () { + var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); + ReactBrowserEventEmitter.setEnabled(false); + return currentlyEnabled; + }, + /** + * @param {boolean} previouslyEnabled Enabled status of + * `ReactBrowserEventEmitter` before the reconciliation occurred. `close` + * restores the previous value. + */ + close: function (previouslyEnabled) { + ReactBrowserEventEmitter.setEnabled(previouslyEnabled); + } +}; +/** + * Provides a queue for collecting `componentDidMount` and + * `componentDidUpdate` callbacks during the transaction. + */ +var ON_DOM_READY_QUEUEING = { + /** + * Initializes the internal `onDOMReady` queue. + */ + initialize: function () { + this.reactMountReady.reset(); + }, -var ReactDOMFeatureFlags = { - useCreateElement: true, - useFiber: false + /** + * After DOM is flushed, invoke all registered `onDOMReady` callbacks. + */ + close: function () { + this.reactMountReady.notifyAll(); + } }; -module.exports = ReactDOMFeatureFlags; +/** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ +var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING]; -/***/ }), -/* 460 */ -/***/ (function(module, exports, __webpack_require__) { +if (process.env.NODE_ENV !== 'production') { + TRANSACTION_WRAPPERS.push({ + initialize: ReactInstrumentation.debugTool.onBeginFlush, + close: ReactInstrumentation.debugTool.onEndFlush + }); +} -"use strict"; /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. + * Currently: + * - The order that these are listed in the transaction is critical: + * - Suppresses events. + * - Restores selection range. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * Future: + * - Restore document/overflow scroll positions that were unintentionally + * modified via DOM insertions above the top viewport boundary. + * - Implement/integrate with customized constraint based layout system and keep + * track of which dimensions must be remeasured. * + * @class ReactReconcileTransaction */ +function ReactReconcileTransaction(useCreateElement) { + this.reinitializeTransaction(); + // Only server-side rendering really needs this option (see + // `ReactServerRendering`), but server-side uses + // `ReactServerRenderingTransaction` instead. This option is here so that it's + // accessible and defaults to false when `ReactDOMComponent` and + // `ReactDOMTextComponent` checks it in `mountComponent`.` + this.renderToStaticMarkup = false; + this.reactMountReady = CallbackQueue.getPooled(null); + this.useCreateElement = useCreateElement; +} +var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array<object>} List of operation wrap procedures. + * TODO: convert to array<TransactionWrapper> + */ + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function () { + return this.reactMountReady; + }, -var adler32 = __webpack_require__(461); - -var TAG_END = /\/?>/; -var COMMENT_START = /^<\!\-\-/; - -var ReactMarkupChecksum = { - CHECKSUM_ATTR_NAME: 'data-react-checksum', + /** + * @return {object} The queue to collect React async events. + */ + getUpdateQueue: function () { + return ReactUpdateQueue; + }, /** - * @param {string} markup Markup string - * @return {string} Markup string with checksum attribute attached + * Save current transaction state -- if the return value from this method is + * passed to `rollback`, the transaction will be reset to that state. */ - addChecksumToMarkup: function (markup) { - var checksum = adler32(markup); + checkpoint: function () { + // reactMountReady is the our only stateful wrapper + return this.reactMountReady.checkpoint(); + }, - // Add checksum (handle both parent tags, comments and self-closing tags) - if (COMMENT_START.test(markup)) { - return markup; - } else { - return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&'); - } + rollback: function (checkpoint) { + this.reactMountReady.rollback(checkpoint); }, /** - * @param {string} markup to use - * @param {DOMElement} element root React element - * @returns {boolean} whether or not the markup is the same + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be reused. */ - canReuseMarkup: function (markup, element) { - var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); - existingChecksum = existingChecksum && parseInt(existingChecksum, 10); - var markupChecksum = adler32(markup); - return markupChecksum === existingChecksum; + destructor: function () { + CallbackQueue.release(this.reactMountReady); + this.reactMountReady = null; } }; -module.exports = ReactMarkupChecksum; +_assign(ReactReconcileTransaction.prototype, Transaction, Mixin); + +PooledClass.addPoolingTo(ReactReconcileTransaction); + +module.exports = ReactReconcileTransaction; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 461 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37482,154 +37152,216 @@ module.exports = ReactMarkupChecksum; * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * */ -var MOD = 65521; - -// adler32 is not cryptographically strong, and is only used to sanity check that -// markup generated on the server matches the markup generated on the client. -// This implementation (a modified version of the SheetJS version) has been optimized -// for our use case, at the expense of conforming to the adler32 specification -// for non-ascii inputs. -function adler32(data) { - var a = 1; - var b = 0; - var i = 0; - var l = data.length; - var m = l & ~0x3; - while (i < m) { - var n = Math.min(i + 4096, m); - for (; i < n; i += 4) { - b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3)); - } - a %= MOD; - b %= MOD; - } - for (; i < l; i++) { - b += a += data.charCodeAt(i); - } - a %= MOD; - b %= MOD; - return a | b << 16; -} +var ExecutionEnvironment = __webpack_require__(18); -module.exports = adler32; +var getNodeForCharacterOffset = __webpack_require__(447); +var getTextContentAccessor = __webpack_require__(227); -/***/ }), -/* 462 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * While `isCollapsed` is available on the Selection object and `collapsed` + * is available on the Range object, IE11 sometimes gets them wrong. + * If the anchor/focus nodes and offsets are the same, the range is collapsed. + */ +function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { + return anchorNode === focusNode && anchorOffset === focusOffset; +} -"use strict"; /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. + * Get the appropriate anchor and focus node/offset pairs for IE. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * The catch here is that IE's selection API doesn't provide information + * about whether the selection is forward or backward, so we have to + * behave as though it's always forward. + * + * IE text differs from modern selection in that it behaves as though + * block elements end with a new line. This means character offsets will + * differ between the two APIs. * + * @param {DOMElement} node + * @return {object} */ +function getIEOffsets(node) { + var selection = document.selection; + var selectedRange = selection.createRange(); + var selectedLength = selectedRange.text.length; + // Duplicate selection so we can move range without breaking user selection. + var fromStart = selectedRange.duplicate(); + fromStart.moveToElementText(node); + fromStart.setEndPoint('EndToStart', selectedRange); + var startOffset = fromStart.text.length; + var endOffset = startOffset + selectedLength; -module.exports = '15.6.1'; - -/***/ }), -/* 463 */ -/***/ (function(module, exports, __webpack_require__) { + return { + start: startOffset, + end: endOffset + }; +} -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * +/** + * @param {DOMElement} node + * @return {?object} */ +function getModernOffsets(node) { + var selection = window.getSelection && window.getSelection(); + + if (!selection || selection.rangeCount === 0) { + return null; + } + + var anchorNode = selection.anchorNode; + var anchorOffset = selection.anchorOffset; + var focusNode = selection.focusNode; + var focusOffset = selection.focusOffset; + var currentRange = selection.getRangeAt(0); + // In Firefox, range.startContainer and range.endContainer can be "anonymous + // divs", e.g. the up/down buttons on an <input type="number">. Anonymous + // divs do not seem to expose properties, triggering a "Permission denied + // error" if any of its properties are accessed. The only seemingly possible + // way to avoid erroring is to access a property that typically works for + // non-anonymous divs and catch any error that may otherwise arise. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 + try { + /* eslint-disable no-unused-expressions */ + currentRange.startContainer.nodeType; + currentRange.endContainer.nodeType; + /* eslint-enable no-unused-expressions */ + } catch (e) { + return null; + } -var _prodInvariant = __webpack_require__(14); + // If the node and offset values are the same, the selection is collapsed. + // `Selection.isCollapsed` is available natively, but IE sometimes gets + // this value wrong. + var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset); -var ReactCurrentOwner = __webpack_require__(30); -var ReactDOMComponentTree = __webpack_require__(16); -var ReactInstanceMap = __webpack_require__(80); + var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length; -var getHostComponentFromComposite = __webpack_require__(244); -var invariant = __webpack_require__(10); -var warning = __webpack_require__(11); + var tempRange = currentRange.cloneRange(); + tempRange.selectNodeContents(node); + tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); + + var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset); + + var start = isTempRangeCollapsed ? 0 : tempRange.toString().length; + var end = start + rangeLength; + + // Detect whether the selection is backward. + var detectionRange = document.createRange(); + detectionRange.setStart(anchorNode, anchorOffset); + detectionRange.setEnd(focusNode, focusOffset); + var isBackward = detectionRange.collapsed; + + return { + start: isBackward ? end : start, + end: isBackward ? start : end + }; +} /** - * Returns the DOM node rendered by this element. - * - * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode - * - * @param {ReactComponent|DOMElement} componentOrElement - * @return {?DOMElement} The root node of this element. + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets */ -function findDOMNode(componentOrElement) { - if (process.env.NODE_ENV !== 'production') { - var owner = ReactCurrentOwner.current; - if (owner !== null) { - process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0; - owner._warnedAboutRefsInRender = true; - } - } - if (componentOrElement == null) { - return null; - } - if (componentOrElement.nodeType === 1) { - return componentOrElement; - } - - var inst = ReactInstanceMap.get(componentOrElement); - if (inst) { - inst = getHostComponentFromComposite(inst); - return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null; - } +function setIEOffsets(node, offsets) { + var range = document.selection.createRange().duplicate(); + var start, end; - if (typeof componentOrElement.render === 'function') { - true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0; + if (offsets.end === undefined) { + start = offsets.start; + end = start; + } else if (offsets.start > offsets.end) { + start = offsets.end; + end = offsets.start; } else { - true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0; + start = offsets.start; + end = offsets.end; } -} - -module.exports = findDOMNode; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -/***/ }), -/* 464 */ -/***/ (function(module, exports, __webpack_require__) { + range.moveToElementText(node); + range.moveStart('character', start); + range.setEndPoint('EndToStart', range); + range.moveEnd('character', end - start); + range.select(); +} -"use strict"; /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. + * In modern non-IE browsers, we can support both forward and backward + * selections. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programmatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. * + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets */ +function setModernOffsets(node, offsets) { + if (!window.getSelection) { + return; + } + + var selection = window.getSelection(); + var length = node[getTextContentAccessor()].length; + var start = Math.min(offsets.start, length); + var end = offsets.end === undefined ? start : Math.min(offsets.end, length); + // IE 11 uses modern selection, but doesn't support the extend method. + // Flip backward selections, so we can set with a single range. + if (!selection.extend && start > end) { + var temp = end; + end = start; + start = temp; + } + var startMarker = getNodeForCharacterOffset(node, start); + var endMarker = getNodeForCharacterOffset(node, end); -var ReactMount = __webpack_require__(243); + if (startMarker && endMarker) { + var range = document.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); -module.exports = ReactMount.renderSubtreeIntoContainer; + if (start > end) { + selection.addRange(range); + selection.extend(endMarker.node, endMarker.offset); + } else { + range.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range); + } + } +} + +var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window); + +var ReactDOMSelection = { + /** + * @param {DOMElement} node + */ + getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, + + /** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets +}; + +module.exports = ReactDOMSelection; /***/ }), -/* 465 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** +/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * @@ -37641,691 +37373,1040 @@ module.exports = ReactMount.renderSubtreeIntoContainer; -var DOMProperty = __webpack_require__(43); -var EventPluginRegistry = __webpack_require__(101); -var ReactComponentTreeHook = __webpack_require__(24); - -var warning = __webpack_require__(11); - -if (process.env.NODE_ENV !== 'production') { - var reactProps = { - children: true, - dangerouslySetInnerHTML: true, - key: true, - ref: true, +/** + * Given any node return the first leaf node without children. + * + * @param {DOMElement|DOMTextNode} node + * @return {DOMElement|DOMTextNode} + */ - autoFocus: true, - defaultValue: true, - valueLink: true, - defaultChecked: true, - checkedLink: true, - innerHTML: true, - suppressContentEditableWarning: true, - onFocusIn: true, - onFocusOut: true - }; - var warnedProperties = {}; +function getLeafNode(node) { + while (node && node.firstChild) { + node = node.firstChild; + } + return node; +} - var validateProperty = function (tagName, name, debugID) { - if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) { - return true; - } - if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { - return true; - } - if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) { - return true; +/** + * Get the next sibling within a container. This will walk up the + * DOM if a node's siblings have been exhausted. + * + * @param {DOMElement|DOMTextNode} node + * @return {?DOMElement|DOMTextNode} + */ +function getSiblingNode(node) { + while (node) { + if (node.nextSibling) { + return node.nextSibling; } - warnedProperties[name] = true; - var lowerCasedName = name.toLowerCase(); + node = node.parentNode; + } +} - // data-* attributes should be lowercase; suggest the lowercase version - var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null; +/** + * Get object describing the nodes which contain characters at offset. + * + * @param {DOMElement|DOMTextNode} root + * @param {number} offset + * @return {?object} + */ +function getNodeForCharacterOffset(root, offset) { + var node = getLeafNode(root); + var nodeStart = 0; + var nodeEnd = 0; - var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null; + while (node) { + if (node.nodeType === 3) { + nodeEnd = nodeStart + node.textContent.length; - if (standardName != null) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; - return true; - } else if (registrationName != null) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; - return true; - } else { - // We were unable to guess which prop the user intended. - // It is likely that the user was just blindly spreading/forwarding props - // Components should be careful to only render valid props/attributes. - // Warning will be invoked in warnUnknownProperties to allow grouping. - return false; - } - }; -} + if (nodeStart <= offset && nodeEnd >= offset) { + return { + node: node, + offset: offset - nodeStart + }; + } -var warnUnknownProperties = function (debugID, element) { - var unknownProps = []; - for (var key in element.props) { - var isValid = validateProperty(element.type, key, debugID); - if (!isValid) { - unknownProps.push(key); + nodeStart = nodeEnd; } - } - - var unknownPropString = unknownProps.map(function (prop) { - return '`' + prop + '`'; - }).join(', '); - if (unknownProps.length === 1) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; - } else if (unknownProps.length > 1) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown props %s on <%s> tag. Remove these props from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; - } -}; - -function handleElement(debugID, element) { - if (element == null || typeof element.type !== 'string') { - return; - } - if (element.type.indexOf('-') >= 0 || element.props.is) { - return; + node = getLeafNode(getSiblingNode(node)); } - warnUnknownProperties(debugID, element); } -var ReactDOMUnknownPropertyHook = { - onBeforeMountComponent: function (debugID, element) { - handleElement(debugID, element); - }, - onBeforeUpdateComponent: function (debugID, element) { - handleElement(debugID, element); - } -}; - -module.exports = ReactDOMUnknownPropertyHook; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +module.exports = getNodeForCharacterOffset; /***/ }), -/* 466 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. + + +/** + * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * */ +var isTextNode = __webpack_require__(449); +/*eslint-disable no-bitwise */ -var ReactComponentTreeHook = __webpack_require__(24); - -var warning = __webpack_require__(11); - -var didWarnValueNull = false; - -function handleElement(debugID, element) { - if (element == null) { - return; - } - if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') { - return; - } - if (element.props != null && element.props.value === null && !didWarnValueNull) { - process.env.NODE_ENV !== 'production' ? warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; - - didWarnValueNull = true; +/** + * Checks if a given DOM node contains or is another DOM node. + */ +function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; } } -var ReactDOMNullInputValuePropHook = { - onBeforeMountComponent: function (debugID, element) { - handleElement(debugID, element); - }, - onBeforeUpdateComponent: function (debugID, element) { - handleElement(debugID, element); - } -}; - -module.exports = ReactDOMNullInputValuePropHook; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +module.exports = containsNode; /***/ }), -/* 467 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. + + +/** + * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @typechecks */ +var isNode = __webpack_require__(450); - -var DOMProperty = __webpack_require__(43); -var ReactComponentTreeHook = __webpack_require__(24); - -var warning = __webpack_require__(11); - -var warnedProperties = {}; -var rARIA = new RegExp('^(aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); - -function validateProperty(tagName, name, debugID) { - if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { - return true; - } - - if (rARIA.test(name)) { - var lowerCasedName = name.toLowerCase(); - var standardName = DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null; - - // If this is an aria-* attribute, but is not listed in the known DOM - // DOM properties, then it is an invalid aria-* attribute. - if (standardName == null) { - warnedProperties[name] = true; - return false; - } - // aria-* attributes should be lowercase; suggest the lowercase version. - if (name !== standardName) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown ARIA attribute %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; - warnedProperties[name] = true; - return true; - } - } - - return true; +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM text node. + */ +function isTextNode(object) { + return isNode(object) && object.nodeType == 3; } -function warnInvalidARIAProps(debugID, element) { - var invalidProps = []; +module.exports = isTextNode; - for (var key in element.props) { - var isValid = validateProperty(element.type, key, debugID); - if (!isValid) { - invalidProps.push(key); - } - } +/***/ }), +/* 450 */ +/***/ (function(module, exports, __webpack_require__) { - var unknownPropString = invalidProps.map(function (prop) { - return '`' + prop + '`'; - }).join(', '); +"use strict"; - if (invalidProps.length === 1) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; - } else if (invalidProps.length > 1) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; - } -} -function handleElement(debugID, element) { - if (element == null || typeof element.type !== 'string') { - return; - } - if (element.type.indexOf('-') >= 0 || element.props.is) { - return; - } +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ - warnInvalidARIAProps(debugID, element); +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM node. + */ +function isNode(object) { + var doc = object ? object.ownerDocument || object : document; + var defaultView = doc.defaultView || window; + return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); } -var ReactDOMInvalidARIAHook = { - onBeforeMountComponent: function (debugID, element) { - if (process.env.NODE_ENV !== 'production') { - handleElement(debugID, element); - } - }, - onBeforeUpdateComponent: function (debugID, element) { - if (process.env.NODE_ENV !== 'production') { - handleElement(debugID, element); - } - } -}; - -module.exports = ReactDOMInvalidARIAHook; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +module.exports = isNode; /***/ }), -/* 468 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends2 = __webpack_require__(8); +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -var _extends3 = _interopRequireDefault(_extends2); -var _objectWithoutProperties2 = __webpack_require__(9); -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); +var NS = { + xlink: 'http://www.w3.org/1999/xlink', + xml: 'http://www.w3.org/XML/1998/namespace' +}; -var _getPrototypeOf = __webpack_require__(4); +// We use attributes for everything SVG so let's avoid some duplication and run +// code instead. +// The following are all specified in the HTML config already so we exclude here. +// - class (as className) +// - color +// - height +// - id +// - lang +// - max +// - media +// - method +// - min +// - name +// - style +// - target +// - type +// - width +var ATTRS = { + accentHeight: 'accent-height', + accumulate: 0, + additive: 0, + alignmentBaseline: 'alignment-baseline', + allowReorder: 'allowReorder', + alphabetic: 0, + amplitude: 0, + arabicForm: 'arabic-form', + ascent: 0, + attributeName: 'attributeName', + attributeType: 'attributeType', + autoReverse: 'autoReverse', + azimuth: 0, + baseFrequency: 'baseFrequency', + baseProfile: 'baseProfile', + baselineShift: 'baseline-shift', + bbox: 0, + begin: 0, + bias: 0, + by: 0, + calcMode: 'calcMode', + capHeight: 'cap-height', + clip: 0, + clipPath: 'clip-path', + clipRule: 'clip-rule', + clipPathUnits: 'clipPathUnits', + colorInterpolation: 'color-interpolation', + colorInterpolationFilters: 'color-interpolation-filters', + colorProfile: 'color-profile', + colorRendering: 'color-rendering', + contentScriptType: 'contentScriptType', + contentStyleType: 'contentStyleType', + cursor: 0, + cx: 0, + cy: 0, + d: 0, + decelerate: 0, + descent: 0, + diffuseConstant: 'diffuseConstant', + direction: 0, + display: 0, + divisor: 0, + dominantBaseline: 'dominant-baseline', + dur: 0, + dx: 0, + dy: 0, + edgeMode: 'edgeMode', + elevation: 0, + enableBackground: 'enable-background', + end: 0, + exponent: 0, + externalResourcesRequired: 'externalResourcesRequired', + fill: 0, + fillOpacity: 'fill-opacity', + fillRule: 'fill-rule', + filter: 0, + filterRes: 'filterRes', + filterUnits: 'filterUnits', + floodColor: 'flood-color', + floodOpacity: 'flood-opacity', + focusable: 0, + fontFamily: 'font-family', + fontSize: 'font-size', + fontSizeAdjust: 'font-size-adjust', + fontStretch: 'font-stretch', + fontStyle: 'font-style', + fontVariant: 'font-variant', + fontWeight: 'font-weight', + format: 0, + from: 0, + fx: 0, + fy: 0, + g1: 0, + g2: 0, + glyphName: 'glyph-name', + glyphOrientationHorizontal: 'glyph-orientation-horizontal', + glyphOrientationVertical: 'glyph-orientation-vertical', + glyphRef: 'glyphRef', + gradientTransform: 'gradientTransform', + gradientUnits: 'gradientUnits', + hanging: 0, + horizAdvX: 'horiz-adv-x', + horizOriginX: 'horiz-origin-x', + ideographic: 0, + imageRendering: 'image-rendering', + 'in': 0, + in2: 0, + intercept: 0, + k: 0, + k1: 0, + k2: 0, + k3: 0, + k4: 0, + kernelMatrix: 'kernelMatrix', + kernelUnitLength: 'kernelUnitLength', + kerning: 0, + keyPoints: 'keyPoints', + keySplines: 'keySplines', + keyTimes: 'keyTimes', + lengthAdjust: 'lengthAdjust', + letterSpacing: 'letter-spacing', + lightingColor: 'lighting-color', + limitingConeAngle: 'limitingConeAngle', + local: 0, + markerEnd: 'marker-end', + markerMid: 'marker-mid', + markerStart: 'marker-start', + markerHeight: 'markerHeight', + markerUnits: 'markerUnits', + markerWidth: 'markerWidth', + mask: 0, + maskContentUnits: 'maskContentUnits', + maskUnits: 'maskUnits', + mathematical: 0, + mode: 0, + numOctaves: 'numOctaves', + offset: 0, + opacity: 0, + operator: 0, + order: 0, + orient: 0, + orientation: 0, + origin: 0, + overflow: 0, + overlinePosition: 'overline-position', + overlineThickness: 'overline-thickness', + paintOrder: 'paint-order', + panose1: 'panose-1', + pathLength: 'pathLength', + patternContentUnits: 'patternContentUnits', + patternTransform: 'patternTransform', + patternUnits: 'patternUnits', + pointerEvents: 'pointer-events', + points: 0, + pointsAtX: 'pointsAtX', + pointsAtY: 'pointsAtY', + pointsAtZ: 'pointsAtZ', + preserveAlpha: 'preserveAlpha', + preserveAspectRatio: 'preserveAspectRatio', + primitiveUnits: 'primitiveUnits', + r: 0, + radius: 0, + refX: 'refX', + refY: 'refY', + renderingIntent: 'rendering-intent', + repeatCount: 'repeatCount', + repeatDur: 'repeatDur', + requiredExtensions: 'requiredExtensions', + requiredFeatures: 'requiredFeatures', + restart: 0, + result: 0, + rotate: 0, + rx: 0, + ry: 0, + scale: 0, + seed: 0, + shapeRendering: 'shape-rendering', + slope: 0, + spacing: 0, + specularConstant: 'specularConstant', + specularExponent: 'specularExponent', + speed: 0, + spreadMethod: 'spreadMethod', + startOffset: 'startOffset', + stdDeviation: 'stdDeviation', + stemh: 0, + stemv: 0, + stitchTiles: 'stitchTiles', + stopColor: 'stop-color', + stopOpacity: 'stop-opacity', + strikethroughPosition: 'strikethrough-position', + strikethroughThickness: 'strikethrough-thickness', + string: 0, + stroke: 0, + strokeDasharray: 'stroke-dasharray', + strokeDashoffset: 'stroke-dashoffset', + strokeLinecap: 'stroke-linecap', + strokeLinejoin: 'stroke-linejoin', + strokeMiterlimit: 'stroke-miterlimit', + strokeOpacity: 'stroke-opacity', + strokeWidth: 'stroke-width', + surfaceScale: 'surfaceScale', + systemLanguage: 'systemLanguage', + tableValues: 'tableValues', + targetX: 'targetX', + targetY: 'targetY', + textAnchor: 'text-anchor', + textDecoration: 'text-decoration', + textRendering: 'text-rendering', + textLength: 'textLength', + to: 0, + transform: 0, + u1: 0, + u2: 0, + underlinePosition: 'underline-position', + underlineThickness: 'underline-thickness', + unicode: 0, + unicodeBidi: 'unicode-bidi', + unicodeRange: 'unicode-range', + unitsPerEm: 'units-per-em', + vAlphabetic: 'v-alphabetic', + vHanging: 'v-hanging', + vIdeographic: 'v-ideographic', + vMathematical: 'v-mathematical', + values: 0, + vectorEffect: 'vector-effect', + version: 0, + vertAdvY: 'vert-adv-y', + vertOriginX: 'vert-origin-x', + vertOriginY: 'vert-origin-y', + viewBox: 'viewBox', + viewTarget: 'viewTarget', + visibility: 0, + widths: 0, + wordSpacing: 'word-spacing', + writingMode: 'writing-mode', + x: 0, + xHeight: 'x-height', + x1: 0, + x2: 0, + xChannelSelector: 'xChannelSelector', + xlinkActuate: 'xlink:actuate', + xlinkArcrole: 'xlink:arcrole', + xlinkHref: 'xlink:href', + xlinkRole: 'xlink:role', + xlinkShow: 'xlink:show', + xlinkTitle: 'xlink:title', + xlinkType: 'xlink:type', + xmlBase: 'xml:base', + xmlns: 0, + xmlnsXlink: 'xmlns:xlink', + xmlLang: 'xml:lang', + xmlSpace: 'xml:space', + y: 0, + y1: 0, + y2: 0, + yChannelSelector: 'yChannelSelector', + z: 0, + zoomAndPan: 'zoomAndPan' +}; -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var SVGDOMPropertyConfig = { + Properties: {}, + DOMAttributeNamespaces: { + xlinkActuate: NS.xlink, + xlinkArcrole: NS.xlink, + xlinkHref: NS.xlink, + xlinkRole: NS.xlink, + xlinkShow: NS.xlink, + xlinkTitle: NS.xlink, + xlinkType: NS.xlink, + xmlBase: NS.xml, + xmlLang: NS.xml, + xmlSpace: NS.xml + }, + DOMAttributeNames: {} +}; -var _classCallCheck2 = __webpack_require__(2); +Object.keys(ATTRS).forEach(function (key) { + SVGDOMPropertyConfig.Properties[key] = 0; + if (ATTRS[key]) { + SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key]; + } +}); -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +module.exports = SVGDOMPropertyConfig; -var _createClass2 = __webpack_require__(3); +/***/ }), +/* 452 */ +/***/ (function(module, exports, __webpack_require__) { -var _createClass3 = _interopRequireDefault(_createClass2); +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -var _possibleConstructorReturn2 = __webpack_require__(5); -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var _inherits2 = __webpack_require__(6); +var EventPropagators = __webpack_require__(78); +var ExecutionEnvironment = __webpack_require__(18); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactInputSelection = __webpack_require__(244); +var SyntheticEvent = __webpack_require__(36); -var _inherits3 = _interopRequireDefault(_inherits2); +var getActiveElement = __webpack_require__(245); +var isTextInputElement = __webpack_require__(230); +var shallowEqual = __webpack_require__(82); -var _simpleAssign = __webpack_require__(7); +var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var eventTypes = { + select: { + phasedRegistrationNames: { + bubbled: 'onSelect', + captured: 'onSelectCapture' + }, + dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange'] + } +}; -var _react = __webpack_require__(1); +var activeElement = null; +var activeElementInst = null; +var lastSelection = null; +var mouseDown = false; -var _react2 = _interopRequireDefault(_react); +// Track whether a listener exists for this plugin. If none exist, we do +// not extract events. See #3639. +var hasListener = false; -var _reactAddonsTransitionGroup = __webpack_require__(108); +/** + * Get an object which is a unique representation of the current selection. + * + * The return value will not be consistent across nodes or browsers, but + * two identical selections on the same node will return identical objects. + * + * @param {DOMElement} node + * @return {object} + */ +function getSelection(node) { + if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) { + return { + start: node.selectionStart, + end: node.selectionEnd + }; + } else if (window.getSelection) { + var selection = window.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset + }; + } else if (document.selection) { + var range = document.selection.createRange(); + return { + parentElement: range.parentElement(), + text: range.text, + top: range.boundingTop, + left: range.boundingLeft + }; + } +} -var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); +/** + * Poll selection to see whether it's changed. + * + * @param {object} nativeEvent + * @return {?SyntheticEvent} + */ +function constructSelectEvent(nativeEvent, nativeEventTarget) { + // Ensure we have the right element, and that the user is not dragging a + // selection (this matches native `select` event behavior). In HTML5, select + // fires only on input and textarea thus if there's no focused element we + // won't dispatch. + if (mouseDown || activeElement == null || activeElement !== getActiveElement()) { + return null; + } -var _ScaleInChild = __webpack_require__(473); + // Only fire when selection has actually changed. + var currentSelection = getSelection(activeElement); + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; -var _ScaleInChild2 = _interopRequireDefault(_ScaleInChild); + var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + syntheticEvent.type = 'select'; + syntheticEvent.target = activeElement; -var ScaleIn = function (_Component) { - (0, _inherits3.default)(ScaleIn, _Component); + EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent); - function ScaleIn() { - (0, _classCallCheck3.default)(this, ScaleIn); - return (0, _possibleConstructorReturn3.default)(this, (ScaleIn.__proto__ || (0, _getPrototypeOf2.default)(ScaleIn)).apply(this, arguments)); + return syntheticEvent; } - (0, _createClass3.default)(ScaleIn, [{ - key: 'render', - value: function render() { - var _props = this.props, - children = _props.children, - childStyle = _props.childStyle, - enterDelay = _props.enterDelay, - maxScale = _props.maxScale, - minScale = _props.minScale, - style = _props.style, - other = (0, _objectWithoutProperties3.default)(_props, ['children', 'childStyle', 'enterDelay', 'maxScale', 'minScale', 'style']); - var prepareStyles = this.context.muiTheme.prepareStyles; - + return null; +} - var mergedRootStyles = (0, _simpleAssign2.default)({}, { - position: 'relative', - overflow: 'hidden', - height: '100%' - }, style); +/** + * This plugin creates an `onSelect` event that normalizes select events + * across form elements. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - contentEditable + * + * This differs from native browser implementations in the following ways: + * - Fires on contentEditable fields as well as inputs. + * - Fires for collapsed selection. + * - Fires after user input. + */ +var SelectEventPlugin = { - var newChildren = _react2.default.Children.map(children, function (child) { - return _react2.default.createElement( - _ScaleInChild2.default, - { - key: child.key, - enterDelay: enterDelay, - maxScale: maxScale, - minScale: minScale, - style: childStyle - }, - child - ); - }); + eventTypes: eventTypes, - return _react2.default.createElement( - _reactAddonsTransitionGroup2.default, - (0, _extends3.default)({}, other, { - style: prepareStyles(mergedRootStyles), - component: 'div' - }), - newChildren - ); + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (!hasListener) { + return null; } - }]); - return ScaleIn; -}(_react.Component); - -ScaleIn.defaultProps = { - enterDelay: 0 -}; -ScaleIn.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; -process.env.NODE_ENV !== "production" ? ScaleIn.propTypes = { - childStyle: _react.PropTypes.object, - children: _react.PropTypes.node, - enterDelay: _react.PropTypes.number, - maxScale: _react.PropTypes.number, - minScale: _react.PropTypes.number, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object -} : void 0; -exports.default = ScaleIn; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -/***/ }), -/* 469 */ -/***/ (function(module, exports, __webpack_require__) { + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { + switch (topLevelType) { + // Track the input node that has focus. + case 'topFocus': + if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { + activeElement = targetNode; + activeElementInst = targetInst; + lastSelection = null; + } + break; + case 'topBlur': + activeElement = null; + activeElementInst = null; + lastSelection = null; + break; -exports.__esModule = true; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _chainFunction = __webpack_require__(470); - -var _chainFunction2 = _interopRequireDefault(_chainFunction); - -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(20); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _warning = __webpack_require__(26); - -var _warning2 = _interopRequireDefault(_warning); - -var _ChildMapping = __webpack_require__(472); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + // Don't fire the event while the user is dragging. This matches the + // semantics of the native select event. + case 'topMouseDown': + mouseDown = true; + break; + case 'topContextMenu': + case 'topMouseUp': + mouseDown = false; + return constructSelectEvent(nativeEvent, nativeEventTarget); -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + // Chrome and IE fire non-standard event when selection is changed (and + // sometimes when it hasn't). IE's event fires out of order with respect + // to key and input events on deletion, so we discard it. + // + // Firefox doesn't support selectionchange, so check selection status + // after each key entry. The selection changes after keydown and before + // keyup, but we check on keydown as well in the case of holding down a + // key, when multiple keydown events are fired but only one keyup is. + // This is also our approach for IE handling, for the reason above. + case 'topSelectionChange': + if (skipSelectionChangeEvent) { + break; + } + // falls through + case 'topKeyDown': + case 'topKeyUp': + return constructSelectEvent(nativeEvent, nativeEventTarget); + } -var propTypes = { - component: _propTypes2.default.any, - childFactory: _propTypes2.default.func, - children: _propTypes2.default.node -}; + return null; + }, -var defaultProps = { - component: 'span', - childFactory: function childFactory(child) { - return child; + didPutListener: function (inst, registrationName, listener) { + if (registrationName === 'onSelect') { + hasListener = true; + } } }; -var TransitionGroup = function (_React$Component) { - _inherits(TransitionGroup, _React$Component); - - function TransitionGroup(props, context) { - _classCallCheck(this, TransitionGroup); - - var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); +module.exports = SelectEventPlugin; - _this.performAppear = function (key, component) { - _this.currentlyTransitioningKeys[key] = true; +/***/ }), +/* 453 */ +/***/ (function(module, exports, __webpack_require__) { - if (component.componentWillAppear) { - component.componentWillAppear(_this._handleDoneAppearing.bind(_this, key, component)); - } else { - _this._handleDoneAppearing(key, component); - } - }; +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ - _this._handleDoneAppearing = function (key, component) { - if (component.componentDidAppear) { - component.componentDidAppear(); - } - delete _this.currentlyTransitioningKeys[key]; - var currentChildMapping = (0, _ChildMapping.getChildMapping)(_this.props.children); +var _prodInvariant = __webpack_require__(13); - if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { - // This was removed before it had fully appeared. Remove it. - _this.performLeave(key, component); - } - }; +var EventListener = __webpack_require__(243); +var EventPropagators = __webpack_require__(78); +var ReactDOMComponentTree = __webpack_require__(15); +var SyntheticAnimationEvent = __webpack_require__(454); +var SyntheticClipboardEvent = __webpack_require__(455); +var SyntheticEvent = __webpack_require__(36); +var SyntheticFocusEvent = __webpack_require__(456); +var SyntheticKeyboardEvent = __webpack_require__(457); +var SyntheticMouseEvent = __webpack_require__(103); +var SyntheticDragEvent = __webpack_require__(459); +var SyntheticTouchEvent = __webpack_require__(460); +var SyntheticTransitionEvent = __webpack_require__(461); +var SyntheticUIEvent = __webpack_require__(80); +var SyntheticWheelEvent = __webpack_require__(462); + +var emptyFunction = __webpack_require__(21); +var getEventCharCode = __webpack_require__(164); +var invariant = __webpack_require__(10); - _this.performEnter = function (key, component) { - _this.currentlyTransitioningKeys[key] = true; +/** + * Turns + * ['abort', ...] + * into + * eventTypes = { + * 'abort': { + * phasedRegistrationNames: { + * bubbled: 'onAbort', + * captured: 'onAbortCapture', + * }, + * dependencies: ['topAbort'], + * }, + * ... + * }; + * topLevelEventsToDispatchConfig = { + * 'topAbort': { sameConfig } + * }; + */ +var eventTypes = {}; +var topLevelEventsToDispatchConfig = {}; +['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) { + var capitalizedEvent = event[0].toUpperCase() + event.slice(1); + var onEvent = 'on' + capitalizedEvent; + var topEvent = 'top' + capitalizedEvent; - if (component.componentWillEnter) { - component.componentWillEnter(_this._handleDoneEntering.bind(_this, key, component)); - } else { - _this._handleDoneEntering(key, component); - } - }; + var type = { + phasedRegistrationNames: { + bubbled: onEvent, + captured: onEvent + 'Capture' + }, + dependencies: [topEvent] + }; + eventTypes[event] = type; + topLevelEventsToDispatchConfig[topEvent] = type; +}); - _this._handleDoneEntering = function (key, component) { - if (component.componentDidEnter) { - component.componentDidEnter(); - } +var onClickListeners = {}; - delete _this.currentlyTransitioningKeys[key]; +function getDictionaryKey(inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 + return '.' + inst._rootNodeID; +} - var currentChildMapping = (0, _ChildMapping.getChildMapping)(_this.props.children); +function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; +} - if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { - // This was removed before it had fully entered. Remove it. - _this.performLeave(key, component); - } - }; +var SimpleEventPlugin = { - _this.performLeave = function (key, component) { - _this.currentlyTransitioningKeys[key] = true; + eventTypes: eventTypes, - if (component.componentWillLeave) { - component.componentWillLeave(_this._handleDoneLeaving.bind(_this, key, component)); - } else { - // Note that this is somewhat dangerous b/c it calls setState() - // again, effectively mutating the component before all the work - // is done. - _this._handleDoneLeaving(key, component); - } - }; + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + if (!dispatchConfig) { + return null; + } + var EventConstructor; + switch (topLevelType) { + case 'topAbort': + case 'topCanPlay': + case 'topCanPlayThrough': + case 'topDurationChange': + case 'topEmptied': + case 'topEncrypted': + case 'topEnded': + case 'topError': + case 'topInput': + case 'topInvalid': + case 'topLoad': + case 'topLoadedData': + case 'topLoadedMetadata': + case 'topLoadStart': + case 'topPause': + case 'topPlay': + case 'topPlaying': + case 'topProgress': + case 'topRateChange': + case 'topReset': + case 'topSeeked': + case 'topSeeking': + case 'topStalled': + case 'topSubmit': + case 'topSuspend': + case 'topTimeUpdate': + case 'topVolumeChange': + case 'topWaiting': + // HTML Events + // @see http://www.w3.org/TR/html5/index.html#events-0 + EventConstructor = SyntheticEvent; + break; + case 'topKeyPress': + // Firefox creates a keypress event for function keys too. This removes + // the unwanted keypress events. Enter is however both printable and + // non-printable. One would expect Tab to be as well (but it isn't). + if (getEventCharCode(nativeEvent) === 0) { + return null; + } + /* falls through */ + case 'topKeyDown': + case 'topKeyUp': + EventConstructor = SyntheticKeyboardEvent; + break; + case 'topBlur': + case 'topFocus': + EventConstructor = SyntheticFocusEvent; + break; + case 'topClick': + // Firefox creates a click event on right mouse clicks. This removes the + // unwanted click events. + if (nativeEvent.button === 2) { + return null; + } + /* falls through */ + case 'topDoubleClick': + case 'topMouseDown': + case 'topMouseMove': + case 'topMouseUp': + // TODO: Disabled elements should not respond to mouse events + /* falls through */ + case 'topMouseOut': + case 'topMouseOver': + case 'topContextMenu': + EventConstructor = SyntheticMouseEvent; + break; + case 'topDrag': + case 'topDragEnd': + case 'topDragEnter': + case 'topDragExit': + case 'topDragLeave': + case 'topDragOver': + case 'topDragStart': + case 'topDrop': + EventConstructor = SyntheticDragEvent; + break; + case 'topTouchCancel': + case 'topTouchEnd': + case 'topTouchMove': + case 'topTouchStart': + EventConstructor = SyntheticTouchEvent; + break; + case 'topAnimationEnd': + case 'topAnimationIteration': + case 'topAnimationStart': + EventConstructor = SyntheticAnimationEvent; + break; + case 'topTransitionEnd': + EventConstructor = SyntheticTransitionEvent; + break; + case 'topScroll': + EventConstructor = SyntheticUIEvent; + break; + case 'topWheel': + EventConstructor = SyntheticWheelEvent; + break; + case 'topCopy': + case 'topCut': + case 'topPaste': + EventConstructor = SyntheticClipboardEvent; + break; + } + !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0; + var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget); + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + }, - _this._handleDoneLeaving = function (key, component) { - if (component.componentDidLeave) { - component.componentDidLeave(); + didPutListener: function (inst, registrationName, listener) { + // Mobile Safari does not fire properly bubble click events on + // non-interactive elements, which means delegated click listeners do not + // fire. The workaround for this bug involves attaching an empty click + // listener on the target node. + // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + if (registrationName === 'onClick' && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + if (!onClickListeners[key]) { + onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction); } + } + }, - delete _this.currentlyTransitioningKeys[key]; - - var currentChildMapping = (0, _ChildMapping.getChildMapping)(_this.props.children); - - if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) { - // This entered again before it fully left. Add it again. - _this.keysToEnter.push(key); - } else { - _this.setState(function (state) { - var newChildren = _extends({}, state.children); - delete newChildren[key]; - return { children: newChildren }; - }); - } - }; + willDeleteListener: function (inst, registrationName) { + if (registrationName === 'onClick' && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + onClickListeners[key].remove(); + delete onClickListeners[key]; + } + } - _this.childRefs = Object.create(null); +}; - _this.state = { - children: (0, _ChildMapping.getChildMapping)(props.children) - }; - return _this; - } +module.exports = SimpleEventPlugin; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - TransitionGroup.prototype.componentWillMount = function componentWillMount() { - this.currentlyTransitioningKeys = {}; - this.keysToEnter = []; - this.keysToLeave = []; - }; +/***/ }), +/* 454 */ +/***/ (function(module, exports, __webpack_require__) { - TransitionGroup.prototype.componentDidMount = function componentDidMount() { - var initialChildMapping = this.state.children; - for (var key in initialChildMapping) { - if (initialChildMapping[key]) { - this.performAppear(key, this.childRefs[key]); - } - } - }; +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - TransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { - var nextChildMapping = (0, _ChildMapping.getChildMapping)(nextProps.children); - var prevChildMapping = this.state.children; - this.setState({ - children: (0, _ChildMapping.mergeChildMappings)(prevChildMapping, nextChildMapping) - }); - for (var key in nextChildMapping) { - var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); - if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) { - this.keysToEnter.push(key); - } - } +var SyntheticEvent = __webpack_require__(36); - for (var _key in prevChildMapping) { - var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(_key); - if (prevChildMapping[_key] && !hasNext && !this.currentlyTransitioningKeys[_key]) { - this.keysToLeave.push(_key); - } - } +/** + * @interface Event + * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface + * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent + */ +var AnimationEventInterface = { + animationName: null, + elapsedTime: null, + pseudoElement: null +}; - // If we want to someday check for reordering, we could do it here. - }; +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} - TransitionGroup.prototype.componentDidUpdate = function componentDidUpdate() { - var _this2 = this; +SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface); - var keysToEnter = this.keysToEnter; - this.keysToEnter = []; - keysToEnter.forEach(function (key) { - return _this2.performEnter(key, _this2.childRefs[key]); - }); +module.exports = SyntheticAnimationEvent; - var keysToLeave = this.keysToLeave; - this.keysToLeave = []; - keysToLeave.forEach(function (key) { - return _this2.performLeave(key, _this2.childRefs[key]); - }); - }; +/***/ }), +/* 455 */ +/***/ (function(module, exports, __webpack_require__) { - TransitionGroup.prototype.render = function render() { - var _this3 = this; +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - // TODO: we could get rid of the need for the wrapper node - // by cloning a single child - var childrenToRender = []; - var _loop = function _loop(key) { - var child = _this3.state.children[key]; - if (child) { - var isCallbackRef = typeof child.ref !== 'string'; - var factoryChild = _this3.props.childFactory(child); - var ref = function ref(r) { - _this3.childRefs[key] = r; - }; - process.env.NODE_ENV !== 'production' ? (0, _warning2.default)(isCallbackRef, 'string refs are not supported on children of TransitionGroup and will be ignored. ' + 'Please use a callback ref instead: https://facebook.github.io/react/docs/refs-and-the-dom.html#the-ref-callback-attribute') : void 0; +var SyntheticEvent = __webpack_require__(36); - // Always chaining the refs leads to problems when the childFactory - // wraps the child. The child ref callback gets called twice with the - // wrapper and the child. So we only need to chain the ref if the - // factoryChild is not different from child. - if (factoryChild === child && isCallbackRef) { - ref = (0, _chainFunction2.default)(child.ref, ref); - } +/** + * @interface Event + * @see http://www.w3.org/TR/clipboard-apis/ + */ +var ClipboardEventInterface = { + clipboardData: function (event) { + return 'clipboardData' in event ? event.clipboardData : window.clipboardData; + } +}; - // You may need to apply reactive updates to a child as it is leaving. - // The normal React way to do it won't work since the child will have - // already been removed. In case you need this behavior you can provide - // a childFactory function to wrap every child, even the ones that are - // leaving. - childrenToRender.push(_react2.default.cloneElement(factoryChild, { - key: key, - ref: ref - })); - } - }; +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} - for (var key in this.state.children) { - _loop(key); - } +SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); - // Do not forward TransitionGroup props to primitive DOM nodes - var props = _extends({}, this.props); - delete props.transitionLeave; - delete props.transitionName; - delete props.transitionAppear; - delete props.transitionEnter; - delete props.childFactory; - delete props.transitionLeaveTimeout; - delete props.transitionEnterTimeout; - delete props.transitionAppearTimeout; - delete props.component; +module.exports = SyntheticClipboardEvent; - return _react2.default.createElement(this.props.component, props, childrenToRender); - }; +/***/ }), +/* 456 */ +/***/ (function(module, exports, __webpack_require__) { - return TransitionGroup; -}(_react2.default.Component); +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -TransitionGroup.displayName = 'TransitionGroup'; -TransitionGroup.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {}; -TransitionGroup.defaultProps = defaultProps; +var SyntheticUIEvent = __webpack_require__(80); -exports.default = TransitionGroup; -module.exports = exports['default']; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +/** + * @interface FocusEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var FocusEventInterface = { + relatedTarget: null +}; -/***/ }), -/* 470 */ -/***/ (function(module, exports) { +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} - -module.exports = function chain(){ - var len = arguments.length - var args = []; - - for (var i = 0; i < len; i++) - args[i] = arguments[i] - - args = args.filter(function(fn){ return fn != null }) - - if (args.length === 0) return undefined - if (args.length === 1) return args[0] - - return args.reduce(function(current, next){ - return function chainedFunction() { - current.apply(this, arguments); - next.apply(this, arguments); - }; - }) -} +SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); +module.exports = SyntheticFocusEvent; /***/ }), -/* 471 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38336,5968 +38417,6431 @@ module.exports = function chain(){ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. + * */ -var emptyFunction = __webpack_require__(23); -var invariant = __webpack_require__(10); -var ReactPropTypesSecret = __webpack_require__(142); +var SyntheticUIEvent = __webpack_require__(80); -module.exports = function() { - function shim(props, propName, componentName, location, propFullName, secret) { - if (secret === ReactPropTypesSecret) { - // It is still safe when called from React. - return; - } - invariant( - false, - 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + - 'Use PropTypes.checkPropTypes() to call them. ' + - 'Read more at http://fb.me/use-check-prop-types' - ); - }; - shim.isRequired = shim; - function getShim() { - return shim; - }; - // Important! - // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. - var ReactPropTypes = { - array: shim, - bool: shim, - func: shim, - number: shim, - object: shim, - string: shim, - symbol: shim, +var getEventCharCode = __webpack_require__(164); +var getEventKey = __webpack_require__(458); +var getEventModifierState = __webpack_require__(154); - any: shim, - arrayOf: getShim, - element: shim, - instanceOf: getShim, - node: shim, - objectOf: getShim, - oneOf: getShim, - oneOfType: getShim, - shape: getShim - }; +/** + * @interface KeyboardEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var KeyboardEventInterface = { + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + // Legacy Interface + charCode: function (event) { + // `charCode` is the result of a KeyPress event and represents the value of + // the actual printable character. - ReactPropTypes.checkPropTypes = emptyFunction; - ReactPropTypes.PropTypes = ReactPropTypes; + // KeyPress is deprecated, but its replacement is not yet final and not + // implemented in any major browser. Only KeyPress has charCode. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + return 0; + }, + keyCode: function (event) { + // `keyCode` is the result of a KeyDown/Up event and represents the value of + // physical keyboard key. - return ReactPropTypes; + // The actual meaning of the value depends on the users' keyboard layout + // which cannot be detected. Assuming that it is a US keyboard layout + // provides a surprisingly accurate mapping for US and European users. + // Due to this, it is left to the user to implement at this time. + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + }, + which: function (event) { + // `which` is an alias for either `keyCode` or `charCode` depending on the + // type of the event. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + } }; +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); + +module.exports = SyntheticKeyboardEvent; /***/ }), -/* 472 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -exports.__esModule = true; -exports.getChildMapping = getChildMapping; -exports.mergeChildMappings = mergeChildMappings; -var _react = __webpack_require__(1); +var getEventCharCode = __webpack_require__(164); /** - * Given `this.props.children`, return an object mapping key to child. - * - * @param {*} children `this.props.children` - * @return {object} Mapping of key to child + * Normalization of deprecated HTML5 `key` values + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names */ -function getChildMapping(children) { - if (!children) { - return children; - } - var result = {}; - _react.Children.map(children, function (child) { - return child; - }).forEach(function (child) { - result[child.key] = child; - }); - return result; -} +var normalizeKey = { + 'Esc': 'Escape', + 'Spacebar': ' ', + 'Left': 'ArrowLeft', + 'Up': 'ArrowUp', + 'Right': 'ArrowRight', + 'Down': 'ArrowDown', + 'Del': 'Delete', + 'Win': 'OS', + 'Menu': 'ContextMenu', + 'Apps': 'ContextMenu', + 'Scroll': 'ScrollLock', + 'MozPrintableKey': 'Unidentified' +}; /** - * When you're adding or removing children some may be added or removed in the - * same render pass. We want to show *both* since we want to simultaneously - * animate elements in and out. This function takes a previous set of keys - * and a new set of keys and merges them with its best guess of the correct - * ordering. In the future we may expose some of the utilities in - * ReactMultiChild to make this easy, but for now React itself does not - * directly have this concept of the union of prevChildren and nextChildren - * so we implement it here. - * - * @param {object} prev prev children as returned from - * `ReactTransitionChildMapping.getChildMapping()`. - * @param {object} next next children as returned from - * `ReactTransitionChildMapping.getChildMapping()`. - * @return {object} a key set that contains all keys in `prev` and all keys - * in `next` in a reasonable order. + * Translation from legacy `keyCode` to HTML5 `key` + * Only special keys supported, all others depend on keyboard layout or browser + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names */ -function mergeChildMappings(prev, next) { - prev = prev || {}; - next = next || {}; - - function getValueForKey(key) { - if (next.hasOwnProperty(key)) { - return next[key]; - } - - return prev[key]; - } +var translateToKey = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6', + 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta' +}; - // For each key of `next`, the list of keys to insert before that key in - // the combined list - var nextKeysPending = {}; +/** + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `key` property. + */ +function getEventKey(nativeEvent) { + if (nativeEvent.key) { + // Normalize inconsistent values reported by browsers due to + // implementations of a working draft specification. - var pendingKeys = []; - for (var prevKey in prev) { - if (next.hasOwnProperty(prevKey)) { - if (pendingKeys.length) { - nextKeysPending[prevKey] = pendingKeys; - pendingKeys = []; - } - } else { - pendingKeys.push(prevKey); + // FireFox implements `key` but returns `MozPrintableKey` for all + // printable characters (normalized to `Unidentified`), ignore it. + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + if (key !== 'Unidentified') { + return key; } } - var i = void 0; - var childMapping = {}; - for (var nextKey in next) { - if (nextKeysPending.hasOwnProperty(nextKey)) { - for (i = 0; i < nextKeysPending[nextKey].length; i++) { - var pendingNextKey = nextKeysPending[nextKey][i]; - childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); - } - } - childMapping[nextKey] = getValueForKey(nextKey); - } + // Browser does not implement `key`, polyfill as much of it as we can. + if (nativeEvent.type === 'keypress') { + var charCode = getEventCharCode(nativeEvent); - // Finally, add the keys which didn't appear before any key in `next` - for (i = 0; i < pendingKeys.length; i++) { - childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + // The enter-key is technically both printable and non-printable and can + // thus be captured by `keypress`, no other non-printable key should. + return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); } - - return childMapping; + if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { + // While user keyboard layout determines the actual meaning of each + // `keyCode` value, almost all function keys have a universal value. + return translateToKey[nativeEvent.keyCode] || 'Unidentified'; + } + return ''; } +module.exports = getEventKey; + /***/ }), -/* 473 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends2 = __webpack_require__(8); +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -var _extends3 = _interopRequireDefault(_extends2); -var _objectWithoutProperties2 = __webpack_require__(9); -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); +var SyntheticMouseEvent = __webpack_require__(103); -var _getPrototypeOf = __webpack_require__(4); +/** + * @interface DragEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var DragEventInterface = { + dataTransfer: null +}; -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} -var _classCallCheck2 = __webpack_require__(2); +SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +module.exports = SyntheticDragEvent; -var _createClass2 = __webpack_require__(3); +/***/ }), +/* 460 */ +/***/ (function(module, exports, __webpack_require__) { -var _createClass3 = _interopRequireDefault(_createClass2); +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -var _possibleConstructorReturn2 = __webpack_require__(5); -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var _inherits2 = __webpack_require__(6); +var SyntheticUIEvent = __webpack_require__(80); -var _inherits3 = _interopRequireDefault(_inherits2); +var getEventModifierState = __webpack_require__(154); -var _simpleAssign = __webpack_require__(7); +/** + * @interface TouchEvent + * @see http://www.w3.org/TR/touch-events/ + */ +var TouchEventInterface = { + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState +}; -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} -var _react = __webpack_require__(1); +SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); -var _react2 = _interopRequireDefault(_react); +module.exports = SyntheticTouchEvent; -var _reactDom = __webpack_require__(18); +/***/ }), +/* 461 */ +/***/ (function(module, exports, __webpack_require__) { -var _reactDom2 = _interopRequireDefault(_reactDom); +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -var _autoPrefix = __webpack_require__(107); -var _autoPrefix2 = _interopRequireDefault(_autoPrefix); -var _transitions = __webpack_require__(12); +var SyntheticEvent = __webpack_require__(36); -var _transitions2 = _interopRequireDefault(_transitions); +/** + * @interface Event + * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- + * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent + */ +var TransitionEventInterface = { + propertyName: null, + elapsedTime: null, + pseudoElement: null +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} -var ScaleInChild = function (_Component) { - (0, _inherits3.default)(ScaleInChild, _Component); +SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface); - function ScaleInChild() { - (0, _classCallCheck3.default)(this, ScaleInChild); - return (0, _possibleConstructorReturn3.default)(this, (ScaleInChild.__proto__ || (0, _getPrototypeOf2.default)(ScaleInChild)).apply(this, arguments)); - } +module.exports = SyntheticTransitionEvent; - (0, _createClass3.default)(ScaleInChild, [{ - key: 'componentWillUnmount', - value: function componentWillUnmount() { - clearTimeout(this.enterTimer); - clearTimeout(this.leaveTimer); - } - }, { - key: 'componentWillAppear', - value: function componentWillAppear(callback) { - this.initializeAnimation(callback); - } - }, { - key: 'componentWillEnter', - value: function componentWillEnter(callback) { - this.initializeAnimation(callback); - } - }, { - key: 'componentDidAppear', - value: function componentDidAppear() { - this.animate(); - } - }, { - key: 'componentDidEnter', - value: function componentDidEnter() { - this.animate(); - } - }, { - key: 'componentWillLeave', - value: function componentWillLeave(callback) { - var style = _reactDom2.default.findDOMNode(this).style; +/***/ }), +/* 462 */ +/***/ (function(module, exports, __webpack_require__) { - style.opacity = '0'; - _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.minScale + ')'); +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - this.leaveTimer = setTimeout(callback, 450); - } - }, { - key: 'animate', - value: function animate() { - var style = _reactDom2.default.findDOMNode(this).style; - style.opacity = '1'; - _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.maxScale + ')'); - } - }, { - key: 'initializeAnimation', - value: function initializeAnimation(callback) { - var style = _reactDom2.default.findDOMNode(this).style; - style.opacity = '0'; - _autoPrefix2.default.set(style, 'transform', 'scale(0)'); +var SyntheticMouseEvent = __webpack_require__(103); - this.enterTimer = setTimeout(callback, this.props.enterDelay); - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - children = _props.children, - enterDelay = _props.enterDelay, - maxScale = _props.maxScale, - minScale = _props.minScale, - style = _props.style, - other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'maxScale', 'minScale', 'style']); - var prepareStyles = this.context.muiTheme.prepareStyles; +/** + * @interface WheelEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var WheelEventInterface = { + deltaX: function (event) { + return 'deltaX' in event ? event.deltaX : + // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + 'wheelDeltaX' in event ? -event.wheelDeltaX : 0; + }, + deltaY: function (event) { + return 'deltaY' in event ? event.deltaY : + // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + 'wheelDeltaY' in event ? -event.wheelDeltaY : + // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + 'wheelDelta' in event ? -event.wheelDelta : 0; + }, + deltaZ: null, + // Browsers without "deltaMode" is reporting in raw wheel delta where one + // notch on the scroll is always +/- 120, roughly equivalent to pixels. + // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or + // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. + deltaMode: null +}; - var mergedRootStyles = (0, _simpleAssign2.default)({}, { - position: 'absolute', - height: '100%', - width: '100%', - top: 0, - left: 0, - transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) - }, style); +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticMouseEvent} + */ +function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} - return _react2.default.createElement( - 'div', - (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }), - children - ); - } - }]); - return ScaleInChild; -}(_react.Component); +SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); -ScaleInChild.defaultProps = { - enterDelay: 0, - maxScale: 1, - minScale: 0 -}; -ScaleInChild.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; -process.env.NODE_ENV !== "production" ? ScaleInChild.propTypes = { - children: _react.PropTypes.node, - enterDelay: _react.PropTypes.number, - maxScale: _react.PropTypes.number, - minScale: _react.PropTypes.number, - style: _react.PropTypes.object -} : void 0; -exports.default = ScaleInChild; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +module.exports = SyntheticWheelEvent; /***/ }), -/* 474 */ +/* 463 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends2 = __webpack_require__(8); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(9); +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var _getPrototypeOf = __webpack_require__(4); -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var validateDOMNesting = __webpack_require__(163); -var _classCallCheck2 = __webpack_require__(2); +var DOC_NODE_TYPE = 9; -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +function ReactDOMContainerInfo(topLevelWrapper, node) { + var info = { + _topLevelWrapper: topLevelWrapper, + _idCounter: 1, + _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null, + _node: node, + _tag: node ? node.nodeName.toLowerCase() : null, + _namespaceURI: node ? node.namespaceURI : null + }; + if (process.env.NODE_ENV !== 'production') { + info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null; + } + return info; +} -var _createClass2 = __webpack_require__(3); +module.exports = ReactDOMContainerInfo; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -var _createClass3 = _interopRequireDefault(_createClass2); +/***/ }), +/* 464 */ +/***/ (function(module, exports, __webpack_require__) { -var _possibleConstructorReturn2 = __webpack_require__(5); +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var _inherits2 = __webpack_require__(6); -var _inherits3 = _interopRequireDefault(_inherits2); +var ReactDOMFeatureFlags = { + useCreateElement: true, + useFiber: false +}; -var _simpleAssign = __webpack_require__(7); +module.exports = ReactDOMFeatureFlags; -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +/***/ }), +/* 465 */ +/***/ (function(module, exports, __webpack_require__) { -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -var _reactDom = __webpack_require__(18); -var _reactDom2 = _interopRequireDefault(_reactDom); -var _shallowEqual = __webpack_require__(54); +var adler32 = __webpack_require__(466); -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); +var TAG_END = /\/?>/; +var COMMENT_START = /^<\!\-\-/; -var _autoPrefix = __webpack_require__(107); +var ReactMarkupChecksum = { + CHECKSUM_ATTR_NAME: 'data-react-checksum', -var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + /** + * @param {string} markup Markup string + * @return {string} Markup string with checksum attribute attached + */ + addChecksumToMarkup: function (markup) { + var checksum = adler32(markup); -var _transitions = __webpack_require__(12); + // Add checksum (handle both parent tags, comments and self-closing tags) + if (COMMENT_START.test(markup)) { + return markup; + } else { + return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&'); + } + }, -var _transitions2 = _interopRequireDefault(_transitions); + /** + * @param {string} markup to use + * @param {DOMElement} element root React element + * @returns {boolean} whether or not the markup is the same + */ + canReuseMarkup: function (markup, element) { + var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + existingChecksum = existingChecksum && parseInt(existingChecksum, 10); + var markupChecksum = adler32(markup); + return markupChecksum === existingChecksum; + } +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +module.exports = ReactMarkupChecksum; -var CircleRipple = function (_Component) { - (0, _inherits3.default)(CircleRipple, _Component); +/***/ }), +/* 466 */ +/***/ (function(module, exports, __webpack_require__) { - function CircleRipple() { - (0, _classCallCheck3.default)(this, CircleRipple); - return (0, _possibleConstructorReturn3.default)(this, (CircleRipple.__proto__ || (0, _getPrototypeOf2.default)(CircleRipple)).apply(this, arguments)); - } +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ - (0, _createClass3.default)(CircleRipple, [{ - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps) { - return !(0, _shallowEqual2.default)(this.props, nextProps); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - clearTimeout(this.enterTimer); - clearTimeout(this.leaveTimer); - } - }, { - key: 'componentWillAppear', - value: function componentWillAppear(callback) { - this.initializeAnimation(callback); - } - }, { - key: 'componentWillEnter', - value: function componentWillEnter(callback) { - this.initializeAnimation(callback); - } - }, { - key: 'componentDidAppear', - value: function componentDidAppear() { - this.animate(); - } - }, { - key: 'componentDidEnter', - value: function componentDidEnter() { - this.animate(); - } - }, { - key: 'componentWillLeave', - value: function componentWillLeave(callback) { - var style = _reactDom2.default.findDOMNode(this).style; - style.opacity = 0; - // If the animation is aborted, remove from the DOM immediately - var removeAfter = this.props.aborted ? 0 : 2000; - this.enterTimer = setTimeout(callback, removeAfter); - } - }, { - key: 'animate', - value: function animate() { - var style = _reactDom2.default.findDOMNode(this).style; - var transitionValue = _transitions2.default.easeOut('2s', 'opacity') + ', ' + _transitions2.default.easeOut('1s', 'transform'); - _autoPrefix2.default.set(style, 'transition', transitionValue); - _autoPrefix2.default.set(style, 'transform', 'scale(1)'); - } - }, { - key: 'initializeAnimation', - value: function initializeAnimation(callback) { - var style = _reactDom2.default.findDOMNode(this).style; - style.opacity = this.props.opacity; - _autoPrefix2.default.set(style, 'transform', 'scale(0)'); - this.leaveTimer = setTimeout(callback, 0); - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - aborted = _props.aborted, - color = _props.color, - opacity = _props.opacity, - style = _props.style, - touchGenerated = _props.touchGenerated, - other = (0, _objectWithoutProperties3.default)(_props, ['aborted', 'color', 'opacity', 'style', 'touchGenerated']); - var prepareStyles = this.context.muiTheme.prepareStyles; - var mergedStyles = (0, _simpleAssign2.default)({ - position: 'absolute', - top: 0, - left: 0, - height: '100%', - width: '100%', - borderRadius: '50%', - backgroundColor: color - }, style); +var MOD = 65521; - return _react2.default.createElement('div', (0, _extends3.default)({}, other, { style: prepareStyles(mergedStyles) })); +// adler32 is not cryptographically strong, and is only used to sanity check that +// markup generated on the server matches the markup generated on the client. +// This implementation (a modified version of the SheetJS version) has been optimized +// for our use case, at the expense of conforming to the adler32 specification +// for non-ascii inputs. +function adler32(data) { + var a = 1; + var b = 0; + var i = 0; + var l = data.length; + var m = l & ~0x3; + while (i < m) { + var n = Math.min(i + 4096, m); + for (; i < n; i += 4) { + b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3)); } - }]); - return CircleRipple; -}(_react.Component); + a %= MOD; + b %= MOD; + } + for (; i < l; i++) { + b += a += data.charCodeAt(i); + } + a %= MOD; + b %= MOD; + return a | b << 16; +} -CircleRipple.defaultProps = { - opacity: 0.1, - aborted: false -}; -CircleRipple.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; -process.env.NODE_ENV !== "production" ? CircleRipple.propTypes = { - aborted: _react.PropTypes.bool, - color: _react.PropTypes.string, - opacity: _react.PropTypes.number, - style: _react.PropTypes.object, - touchGenerated: _react.PropTypes.bool -} : void 0; -exports.default = CircleRipple; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +module.exports = adler32; /***/ }), -/* 475 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -exports.__esModule = true; -exports["default"] = undefined; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -var _react = __webpack_require__(1); -var _propTypes = __webpack_require__(20); -var _propTypes2 = _interopRequireDefault(_propTypes); +module.exports = '15.4.2'; -var _storeShape = __webpack_require__(248); +/***/ }), +/* 468 */ +/***/ (function(module, exports, __webpack_require__) { -var _storeShape2 = _interopRequireDefault(_storeShape); +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -var _warning = __webpack_require__(249); -var _warning2 = _interopRequireDefault(_warning); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +var _prodInvariant = __webpack_require__(13); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +var ReactCurrentOwner = __webpack_require__(29); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactInstanceMap = __webpack_require__(81); -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +var getHostComponentFromComposite = __webpack_require__(247); +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +/** + * Returns the DOM node rendered by this element. + * + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode + * + * @param {ReactComponent|DOMElement} componentOrElement + * @return {?DOMElement} The root node of this element. + */ +function findDOMNode(componentOrElement) { + if (process.env.NODE_ENV !== 'production') { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0; + owner._warnedAboutRefsInRender = true; + } + } + if (componentOrElement == null) { + return null; + } + if (componentOrElement.nodeType === 1) { + return componentOrElement; + } -var didWarnAboutReceivingStore = false; -function warnAboutReceivingStore() { - if (didWarnAboutReceivingStore) { - return; + var inst = ReactInstanceMap.get(componentOrElement); + if (inst) { + inst = getHostComponentFromComposite(inst); + return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null; } - didWarnAboutReceivingStore = true; - (0, _warning2["default"])('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.'); + if (typeof componentOrElement.render === 'function') { + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0; + } else { + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0; + } } -var Provider = function (_Component) { - _inherits(Provider, _Component); +module.exports = findDOMNode; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - Provider.prototype.getChildContext = function getChildContext() { - return { store: this.store }; - }; +/***/ }), +/* 469 */ +/***/ (function(module, exports, __webpack_require__) { - function Provider(props, context) { - _classCallCheck(this, Provider); +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); - _this.store = props.store; - return _this; - } - Provider.prototype.render = function render() { - return _react.Children.only(this.props.children); - }; +var ReactMount = __webpack_require__(246); - return Provider; -}(_react.Component); +module.exports = ReactMount.renderSubtreeIntoContainer; -exports["default"] = Provider; +/***/ }), +/* 470 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMProperty = __webpack_require__(45); +var EventPluginRegistry = __webpack_require__(101); +var ReactComponentTreeHook = __webpack_require__(19); + +var warning = __webpack_require__(11); if (process.env.NODE_ENV !== 'production') { - Provider.prototype.componentWillReceiveProps = function (nextProps) { - var store = this.store; - var nextStore = nextProps.store; + var reactProps = { + children: true, + dangerouslySetInnerHTML: true, + key: true, + ref: true, + autoFocus: true, + defaultValue: true, + valueLink: true, + defaultChecked: true, + checkedLink: true, + innerHTML: true, + suppressContentEditableWarning: true, + onFocusIn: true, + onFocusOut: true + }; + var warnedProperties = {}; - if (store !== nextStore) { - warnAboutReceivingStore(); + var validateProperty = function (tagName, name, debugID) { + if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) { + return true; + } + if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { + return true; + } + if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) { + return true; + } + warnedProperties[name] = true; + var lowerCasedName = name.toLowerCase(); + + // data-* attributes should be lowercase; suggest the lowercase version + var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null; + + var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null; + + if (standardName != null) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + return true; + } else if (registrationName != null) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + return true; + } else { + // We were unable to guess which prop the user intended. + // It is likely that the user was just blindly spreading/forwarding props + // Components should be careful to only render valid props/attributes. + // Warning will be invoked in warnUnknownProperties to allow grouping. + return false; } }; } -Provider.propTypes = { - store: _storeShape2["default"].isRequired, - children: _propTypes2["default"].element.isRequired +var warnUnknownProperties = function (debugID, element) { + var unknownProps = []; + for (var key in element.props) { + var isValid = validateProperty(element.type, key, debugID); + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps.map(function (prop) { + return '`' + prop + '`'; + }).join(', '); + + if (unknownProps.length === 1) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + } else if (unknownProps.length > 1) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown props %s on <%s> tag. Remove these props from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + } }; -Provider.childContextTypes = { - store: _storeShape2["default"].isRequired + +function handleElement(debugID, element) { + if (element == null || typeof element.type !== 'string') { + return; + } + if (element.type.indexOf('-') >= 0 || element.props.is) { + return; + } + warnUnknownProperties(debugID, element); +} + +var ReactDOMUnknownPropertyHook = { + onBeforeMountComponent: function (debugID, element) { + handleElement(debugID, element); + }, + onBeforeUpdateComponent: function (debugID, element) { + handleElement(debugID, element); + } }; + +module.exports = ReactDOMUnknownPropertyHook; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 476 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) { +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -exports.__esModule = true; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -exports["default"] = connect; +var ReactComponentTreeHook = __webpack_require__(19); -var _react = __webpack_require__(1); +var warning = __webpack_require__(11); -var _storeShape = __webpack_require__(248); +var didWarnValueNull = false; -var _storeShape2 = _interopRequireDefault(_storeShape); +function handleElement(debugID, element) { + if (element == null) { + return; + } + if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') { + return; + } + if (element.props != null && element.props.value === null && !didWarnValueNull) { + process.env.NODE_ENV !== 'production' ? warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; -var _shallowEqual = __webpack_require__(477); + didWarnValueNull = true; + } +} -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); +var ReactDOMNullInputValuePropHook = { + onBeforeMountComponent: function (debugID, element) { + handleElement(debugID, element); + }, + onBeforeUpdateComponent: function (debugID, element) { + handleElement(debugID, element); + } +}; -var _wrapActionCreators = __webpack_require__(478); +module.exports = ReactDOMNullInputValuePropHook; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators); +/***/ }), +/* 472 */ +/***/ (function(module, exports, __webpack_require__) { -var _warning = __webpack_require__(249); +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ -var _warning2 = _interopRequireDefault(_warning); -var _isPlainObject = __webpack_require__(487); -var _isPlainObject2 = _interopRequireDefault(_isPlainObject); +var DOMProperty = __webpack_require__(45); +var ReactComponentTreeHook = __webpack_require__(19); -var _hoistNonReactStatics = __webpack_require__(258); +var warning = __webpack_require__(11); -var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); +var warnedProperties = {}; +var rARIA = new RegExp('^(aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); -var _invariant = __webpack_require__(82); +function validateProperty(tagName, name, debugID) { + if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { + return true; + } -var _invariant2 = _interopRequireDefault(_invariant); + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + if (standardName == null) { + warnedProperties[name] = true; + return false; + } + // aria-* attributes should be lowercase; suggest the lowercase version. + if (name !== standardName) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown ARIA attribute %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + warnedProperties[name] = true; + return true; + } + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + return true; +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +function warnInvalidARIAProps(debugID, element) { + var invalidProps = []; -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + for (var key in element.props) { + var isValid = validateProperty(element.type, key, debugID); + if (!isValid) { + invalidProps.push(key); + } + } -var defaultMapStateToProps = function defaultMapStateToProps(state) { - return {}; -}; // eslint-disable-line no-unused-vars -var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) { - return { dispatch: dispatch }; -}; -var defaultMergeProps = function defaultMergeProps(stateProps, dispatchProps, parentProps) { - return _extends({}, parentProps, stateProps, dispatchProps); -}; - -function getDisplayName(WrappedComponent) { - return WrappedComponent.displayName || WrappedComponent.name || 'Component'; -} + var unknownPropString = invalidProps.map(function (prop) { + return '`' + prop + '`'; + }).join(', '); -var errorObject = { value: null }; -function tryCatch(fn, ctx) { - try { - return fn.apply(ctx); - } catch (e) { - errorObject.value = e; - return errorObject; + if (invalidProps.length === 1) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + } else if (invalidProps.length > 1) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; } } -// Helps track hot reloading. -var nextVersion = 0; - -function connect(mapStateToProps, mapDispatchToProps, mergeProps) { - var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; +function handleElement(debugID, element) { + if (element == null || typeof element.type !== 'string') { + return; + } + if (element.type.indexOf('-') >= 0 || element.props.is) { + return; + } - var shouldSubscribe = Boolean(mapStateToProps); - var mapState = mapStateToProps || defaultMapStateToProps; + warnInvalidARIAProps(debugID, element); +} - var mapDispatch = void 0; - if (typeof mapDispatchToProps === 'function') { - mapDispatch = mapDispatchToProps; - } else if (!mapDispatchToProps) { - mapDispatch = defaultMapDispatchToProps; - } else { - mapDispatch = (0, _wrapActionCreators2["default"])(mapDispatchToProps); +var ReactDOMInvalidARIAHook = { + onBeforeMountComponent: function (debugID, element) { + if (process.env.NODE_ENV !== 'production') { + handleElement(debugID, element); + } + }, + onBeforeUpdateComponent: function (debugID, element) { + if (process.env.NODE_ENV !== 'production') { + handleElement(debugID, element); + } } +}; - var finalMergeProps = mergeProps || defaultMergeProps; - var _options$pure = options.pure, - pure = _options$pure === undefined ? true : _options$pure, - _options$withRef = options.withRef, - withRef = _options$withRef === undefined ? false : _options$withRef; - - var checkMergedEquals = pure && finalMergeProps !== defaultMergeProps; +module.exports = ReactDOMInvalidARIAHook; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - // Helps track hot reloading. - var version = nextVersion++; +/***/ }), +/* 473 */ +/***/ (function(module, exports, __webpack_require__) { - return function wrapWithConnect(WrappedComponent) { - var connectDisplayName = 'Connect(' + getDisplayName(WrappedComponent) + ')'; +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { - function checkStateShape(props, methodName) { - if (!(0, _isPlainObject2["default"])(props)) { - (0, _warning2["default"])(methodName + '() in ' + connectDisplayName + ' must return a plain object. ' + ('Instead received ' + props + '.')); - } - } +Object.defineProperty(exports, "__esModule", { + value: true +}); - function computeMergedProps(stateProps, dispatchProps, parentProps) { - var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps); - if (process.env.NODE_ENV !== 'production') { - checkStateShape(mergedProps, 'mergeProps'); - } - return mergedProps; - } +var _extends2 = __webpack_require__(8); - var Connect = function (_Component) { - _inherits(Connect, _Component); +var _extends3 = _interopRequireDefault(_extends2); - Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() { - return !pure || this.haveOwnPropsChanged || this.hasStoreStateChanged; - }; +var _objectWithoutProperties2 = __webpack_require__(9); - function Connect(props, context) { - _classCallCheck(this, Connect); +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); +var _getPrototypeOf = __webpack_require__(4); - _this.version = version; - _this.store = props.store || context.store; +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - (0, _invariant2["default"])(_this.store, 'Could not find "store" in either the context or ' + ('props of "' + connectDisplayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + connectDisplayName + '".')); +var _classCallCheck2 = __webpack_require__(2); - var storeState = _this.store.getState(); - _this.state = { storeState: storeState }; - _this.clearCache(); - return _this; - } +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - Connect.prototype.computeStateProps = function computeStateProps(store, props) { - if (!this.finalMapStateToProps) { - return this.configureFinalMapState(store, props); - } +var _createClass2 = __webpack_require__(3); - var state = store.getState(); - var stateProps = this.doStatePropsDependOnOwnProps ? this.finalMapStateToProps(state, props) : this.finalMapStateToProps(state); +var _createClass3 = _interopRequireDefault(_createClass2); - if (process.env.NODE_ENV !== 'production') { - checkStateShape(stateProps, 'mapStateToProps'); - } - return stateProps; - }; +var _possibleConstructorReturn2 = __webpack_require__(5); - Connect.prototype.configureFinalMapState = function configureFinalMapState(store, props) { - var mappedState = mapState(store.getState(), props); - var isFactory = typeof mappedState === 'function'; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - this.finalMapStateToProps = isFactory ? mappedState : mapState; - this.doStatePropsDependOnOwnProps = this.finalMapStateToProps.length !== 1; +var _inherits2 = __webpack_require__(6); - if (isFactory) { - return this.computeStateProps(store, props); - } +var _inherits3 = _interopRequireDefault(_inherits2); - if (process.env.NODE_ENV !== 'production') { - checkStateShape(mappedState, 'mapStateToProps'); - } - return mappedState; - }; +var _simpleAssign = __webpack_require__(7); - Connect.prototype.computeDispatchProps = function computeDispatchProps(store, props) { - if (!this.finalMapDispatchToProps) { - return this.configureFinalMapDispatch(store, props); - } +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var dispatch = store.dispatch; +var _react = __webpack_require__(1); - var dispatchProps = this.doDispatchPropsDependOnOwnProps ? this.finalMapDispatchToProps(dispatch, props) : this.finalMapDispatchToProps(dispatch); +var _react2 = _interopRequireDefault(_react); - if (process.env.NODE_ENV !== 'production') { - checkStateShape(dispatchProps, 'mapDispatchToProps'); - } - return dispatchProps; - }; +var _reactAddonsTransitionGroup = __webpack_require__(108); - Connect.prototype.configureFinalMapDispatch = function configureFinalMapDispatch(store, props) { - var mappedDispatch = mapDispatch(store.dispatch, props); - var isFactory = typeof mappedDispatch === 'function'; +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); - this.finalMapDispatchToProps = isFactory ? mappedDispatch : mapDispatch; - this.doDispatchPropsDependOnOwnProps = this.finalMapDispatchToProps.length !== 1; +var _ScaleInChild = __webpack_require__(477); - if (isFactory) { - return this.computeDispatchProps(store, props); - } +var _ScaleInChild2 = _interopRequireDefault(_ScaleInChild); - if (process.env.NODE_ENV !== 'production') { - checkStateShape(mappedDispatch, 'mapDispatchToProps'); - } - return mappedDispatch; - }; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - Connect.prototype.updateStatePropsIfNeeded = function updateStatePropsIfNeeded() { - var nextStateProps = this.computeStateProps(this.store, this.props); - if (this.stateProps && (0, _shallowEqual2["default"])(nextStateProps, this.stateProps)) { - return false; - } +var ScaleIn = function (_Component) { + (0, _inherits3.default)(ScaleIn, _Component); - this.stateProps = nextStateProps; - return true; - }; + function ScaleIn() { + (0, _classCallCheck3.default)(this, ScaleIn); + return (0, _possibleConstructorReturn3.default)(this, (ScaleIn.__proto__ || (0, _getPrototypeOf2.default)(ScaleIn)).apply(this, arguments)); + } - Connect.prototype.updateDispatchPropsIfNeeded = function updateDispatchPropsIfNeeded() { - var nextDispatchProps = this.computeDispatchProps(this.store, this.props); - if (this.dispatchProps && (0, _shallowEqual2["default"])(nextDispatchProps, this.dispatchProps)) { - return false; - } + (0, _createClass3.default)(ScaleIn, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + childStyle = _props.childStyle, + enterDelay = _props.enterDelay, + maxScale = _props.maxScale, + minScale = _props.minScale, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'childStyle', 'enterDelay', 'maxScale', 'minScale', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; - this.dispatchProps = nextDispatchProps; - return true; - }; - Connect.prototype.updateMergedPropsIfNeeded = function updateMergedPropsIfNeeded() { - var nextMergedProps = computeMergedProps(this.stateProps, this.dispatchProps, this.props); - if (this.mergedProps && checkMergedEquals && (0, _shallowEqual2["default"])(nextMergedProps, this.mergedProps)) { - return false; - } + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'relative', + overflow: 'hidden', + height: '100%' + }, style); - this.mergedProps = nextMergedProps; - return true; - }; + var newChildren = _react2.default.Children.map(children, function (child) { + return _react2.default.createElement( + _ScaleInChild2.default, + { + key: child.key, + enterDelay: enterDelay, + maxScale: maxScale, + minScale: minScale, + style: childStyle + }, + child + ); + }); - Connect.prototype.isSubscribed = function isSubscribed() { - return typeof this.unsubscribe === 'function'; - }; + return _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + (0, _extends3.default)({}, other, { + style: prepareStyles(mergedRootStyles), + component: 'div' + }), + newChildren + ); + } + }]); + return ScaleIn; +}(_react.Component); - Connect.prototype.trySubscribe = function trySubscribe() { - if (shouldSubscribe && !this.unsubscribe) { - this.unsubscribe = this.store.subscribe(this.handleChange.bind(this)); - this.handleChange(); - } - }; +ScaleIn.defaultProps = { + enterDelay: 0 +}; +ScaleIn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? ScaleIn.propTypes = { + childStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + enterDelay: _react.PropTypes.number, + maxScale: _react.PropTypes.number, + minScale: _react.PropTypes.number, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = ScaleIn; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - Connect.prototype.tryUnsubscribe = function tryUnsubscribe() { - if (this.unsubscribe) { - this.unsubscribe(); - this.unsubscribe = null; - } - }; +/***/ }), +/* 474 */ +/***/ (function(module, exports, __webpack_require__) { - Connect.prototype.componentDidMount = function componentDidMount() { - this.trySubscribe(); - }; +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { - if (!pure || !(0, _shallowEqual2["default"])(nextProps, this.props)) { - this.haveOwnPropsChanged = true; - } - }; - Connect.prototype.componentWillUnmount = function componentWillUnmount() { - this.tryUnsubscribe(); - this.clearCache(); - }; - Connect.prototype.clearCache = function clearCache() { - this.dispatchProps = null; - this.stateProps = null; - this.mergedProps = null; - this.haveOwnPropsChanged = true; - this.hasStoreStateChanged = true; - this.haveStatePropsBeenPrecalculated = false; - this.statePropsPrecalculationError = null; - this.renderedElement = null; - this.finalMapDispatchToProps = null; - this.finalMapStateToProps = null; - }; +var _assign = __webpack_require__(14); - Connect.prototype.handleChange = function handleChange() { - if (!this.unsubscribe) { - return; - } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var storeState = this.store.getState(); - var prevStoreState = this.state.storeState; - if (pure && prevStoreState === storeState) { - return; - } +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - if (pure && !this.doStatePropsDependOnOwnProps) { - var haveStatePropsChanged = tryCatch(this.updateStatePropsIfNeeded, this); - if (!haveStatePropsChanged) { - return; - } - if (haveStatePropsChanged === errorObject) { - this.statePropsPrecalculationError = errorObject.value; - } - this.haveStatePropsBeenPrecalculated = true; - } +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - this.hasStoreStateChanged = true; - this.setState({ storeState: storeState }); - }; +var React = __webpack_require__(55); +var ReactTransitionChildMapping = __webpack_require__(475); - Connect.prototype.getWrappedInstance = function getWrappedInstance() { - (0, _invariant2["default"])(withRef, 'To access the wrapped instance, you need to specify ' + '{ withRef: true } as the fourth argument of the connect() call.'); +var propTypesFactory = __webpack_require__(222); +var PropTypes = propTypesFactory(React.isValidElement); - return this.refs.wrappedInstance; - }; +var emptyFunction = __webpack_require__(21); - Connect.prototype.render = function render() { - var haveOwnPropsChanged = this.haveOwnPropsChanged, - hasStoreStateChanged = this.hasStoreStateChanged, - haveStatePropsBeenPrecalculated = this.haveStatePropsBeenPrecalculated, - statePropsPrecalculationError = this.statePropsPrecalculationError, - renderedElement = this.renderedElement; +/** + * A basis for animations. When children are declaratively added or removed, + * special lifecycle hooks are called. + * See https://facebook.github.io/react/docs/animation.html#low-level-api-reacttransitiongroup + */ +var ReactTransitionGroup = function (_React$Component) { + _inherits(ReactTransitionGroup, _React$Component); - this.haveOwnPropsChanged = false; - this.hasStoreStateChanged = false; - this.haveStatePropsBeenPrecalculated = false; - this.statePropsPrecalculationError = null; + function ReactTransitionGroup() { + var _temp, _this, _ret; - if (statePropsPrecalculationError) { - throw statePropsPrecalculationError; - } + _classCallCheck(this, ReactTransitionGroup); - var shouldUpdateStateProps = true; - var shouldUpdateDispatchProps = true; - if (pure && renderedElement) { - shouldUpdateStateProps = hasStoreStateChanged || haveOwnPropsChanged && this.doStatePropsDependOnOwnProps; - shouldUpdateDispatchProps = haveOwnPropsChanged && this.doDispatchPropsDependOnOwnProps; - } + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - var haveStatePropsChanged = false; - var haveDispatchPropsChanged = false; - if (haveStatePropsBeenPrecalculated) { - haveStatePropsChanged = true; - } else if (shouldUpdateStateProps) { - haveStatePropsChanged = this.updateStatePropsIfNeeded(); - } - if (shouldUpdateDispatchProps) { - haveDispatchPropsChanged = this.updateDispatchPropsIfNeeded(); - } + return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { + // TODO: can we get useful debug information to show at this point? + children: ReactTransitionChildMapping.getChildMapping(_this.props.children) + }, _this.performAppear = function (key) { + _this.currentlyTransitioningKeys[key] = true; - var haveMergedPropsChanged = true; - if (haveStatePropsChanged || haveDispatchPropsChanged || haveOwnPropsChanged) { - haveMergedPropsChanged = this.updateMergedPropsIfNeeded(); - } else { - haveMergedPropsChanged = false; - } + var component = _this.refs[key]; - if (!haveMergedPropsChanged && renderedElement) { - return renderedElement; - } + if (component.componentWillAppear) { + component.componentWillAppear(_this._handleDoneAppearing.bind(_this, key)); + } else { + _this._handleDoneAppearing(key); + } + }, _this._handleDoneAppearing = function (key) { + var component = _this.refs[key]; + if (component.componentDidAppear) { + component.componentDidAppear(); + } - if (withRef) { - this.renderedElement = (0, _react.createElement)(WrappedComponent, _extends({}, this.mergedProps, { - ref: 'wrappedInstance' - })); - } else { - this.renderedElement = (0, _react.createElement)(WrappedComponent, this.mergedProps); - } + delete _this.currentlyTransitioningKeys[key]; - return this.renderedElement; - }; + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); - return Connect; - }(_react.Component); + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully appeared. Remove it. + _this.performLeave(key); + } + }, _this.performEnter = function (key) { + _this.currentlyTransitioningKeys[key] = true; - Connect.displayName = connectDisplayName; - Connect.WrappedComponent = WrappedComponent; - Connect.contextTypes = { - store: _storeShape2["default"] - }; - Connect.propTypes = { - store: _storeShape2["default"] - }; + var component = _this.refs[key]; - if (process.env.NODE_ENV !== 'production') { - Connect.prototype.componentWillUpdate = function componentWillUpdate() { - if (this.version === version) { - return; - } + if (component.componentWillEnter) { + component.componentWillEnter(_this._handleDoneEntering.bind(_this, key)); + } else { + _this._handleDoneEntering(key); + } + }, _this._handleDoneEntering = function (key) { + var component = _this.refs[key]; + if (component.componentDidEnter) { + component.componentDidEnter(); + } - // We are hot reloading! - this.version = version; - this.trySubscribe(); - this.clearCache(); - }; - } + delete _this.currentlyTransitioningKeys[key]; - return (0, _hoistNonReactStatics2["default"])(Connect, WrappedComponent); - }; -} -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); -/***/ }), -/* 477 */ -/***/ (function(module, exports, __webpack_require__) { + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully entered. Remove it. + _this.performLeave(key); + } + }, _this.performLeave = function (key) { + _this.currentlyTransitioningKeys[key] = true; -"use strict"; + var component = _this.refs[key]; + if (component.componentWillLeave) { + component.componentWillLeave(_this._handleDoneLeaving.bind(_this, key)); + } else { + // Note that this is somewhat dangerous b/c it calls setState() + // again, effectively mutating the component before all the work + // is done. + _this._handleDoneLeaving(key); + } + }, _this._handleDoneLeaving = function (key) { + var component = _this.refs[key]; + if (component.componentDidLeave) { + component.componentDidLeave(); + } -exports.__esModule = true; -exports["default"] = shallowEqual; -function shallowEqual(objA, objB) { - if (objA === objB) { - return true; - } + delete _this.currentlyTransitioningKeys[key]; - var keysA = Object.keys(objA); - var keysB = Object.keys(objB); + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); - if (keysA.length !== keysB.length) { - return false; + if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) { + // This entered again before it fully left. Add it again. + _this.performEnter(key); + } else { + _this.setState(function (state) { + var newChildren = _assign({}, state.children); + delete newChildren[key]; + return { children: newChildren }; + }); + } + }, _temp), _possibleConstructorReturn(_this, _ret); } - // Test for A's keys different from B. - var hasOwn = Object.prototype.hasOwnProperty; - for (var i = 0; i < keysA.length; i++) { - if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { - return false; - } - } + ReactTransitionGroup.prototype.componentWillMount = function componentWillMount() { + this.currentlyTransitioningKeys = {}; + this.keysToEnter = []; + this.keysToLeave = []; + }; - return true; -} + ReactTransitionGroup.prototype.componentDidMount = function componentDidMount() { + var initialChildMapping = this.state.children; + for (var key in initialChildMapping) { + if (initialChildMapping[key]) { + this.performAppear(key); + } + } + }; -/***/ }), -/* 478 */ -/***/ (function(module, exports, __webpack_require__) { + ReactTransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + var nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children); + var prevChildMapping = this.state.children; -"use strict"; + this.setState({ + children: ReactTransitionChildMapping.mergeChildMappings(prevChildMapping, nextChildMapping) + }); + var key; -exports.__esModule = true; -exports["default"] = wrapActionCreators; + for (key in nextChildMapping) { + var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); + if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) { + this.keysToEnter.push(key); + } + } -var _redux = __webpack_require__(160); + for (key in prevChildMapping) { + var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key); + if (prevChildMapping[key] && !hasNext && !this.currentlyTransitioningKeys[key]) { + this.keysToLeave.push(key); + } + } -function wrapActionCreators(actionCreators) { - return function (dispatch) { - return (0, _redux.bindActionCreators)(actionCreators, dispatch); + // If we want to someday check for reordering, we could do it here. }; -} -/***/ }), -/* 479 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + ReactTransitionGroup.prototype.componentDidUpdate = function componentDidUpdate() { + var keysToEnter = this.keysToEnter; + this.keysToEnter = []; + keysToEnter.forEach(this.performEnter); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(109); + var keysToLeave = this.keysToLeave; + this.keysToLeave = []; + keysToLeave.forEach(this.performLeave); + }; + + ReactTransitionGroup.prototype.render = function render() { + // TODO: we could get rid of the need for the wrapper node + // by cloning a single child + var childrenToRender = []; + for (var key in this.state.children) { + var child = this.state.children[key]; + if (child) { + // You may need to apply reactive updates to a child as it is leaving. + // The normal React way to do it won't work since the child will have + // already been removed. In case you need this behavior you can provide + // a childFactory function to wrap every child, even the ones that are + // leaving. + childrenToRender.push(React.cloneElement(this.props.childFactory(child), { + ref: key, + key: key + })); + } + } + // Do not forward ReactTransitionGroup props to primitive DOM nodes + var props = _assign({}, this.props); + delete props.transitionLeave; + delete props.transitionName; + delete props.transitionAppear; + delete props.transitionEnter; + delete props.childFactory; + delete props.transitionLeaveTimeout; + delete props.transitionEnterTimeout; + delete props.transitionAppearTimeout; + delete props.component; -/** Used for built-in method references. */ -var objectProto = Object.prototype; + return React.createElement(this.props.component, props, childrenToRender); + }; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + return ReactTransitionGroup; +}(React.Component); -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; +ReactTransitionGroup.displayName = 'ReactTransitionGroup'; +ReactTransitionGroup.propTypes = { + component: PropTypes.any, + childFactory: PropTypes.func +}; +ReactTransitionGroup.defaultProps = { + component: 'span', + childFactory: emptyFunction.thatReturnsArgument +}; -/** Built-in value references. */ -var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. +module.exports = ReactTransitionGroup; + +/***/ }), +/* 475 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; + +var flattenChildren = __webpack_require__(476); + +var ReactTransitionChildMapping = { + /** + * Given `this.props.children`, return an object mapping key to child. Just + * simple syntactic sugar around flattenChildren(). + * + * @param {*} children `this.props.children` + * @param {number=} selfDebugID Optional debugID of the current internal instance. + * @return {object} Mapping of key to child + */ + getChildMapping: function (children, selfDebugID) { + if (!children) { + return children; } - } - return result; -} -/* harmony default export */ __webpack_exports__["a"] = (getRawTag); + if (process.env.NODE_ENV !== 'production') { + return flattenChildren(children, selfDebugID); + } + + return flattenChildren(children); + }, + + /** + * When you're adding or removing children some may be added or removed in the + * same render pass. We want to show *both* since we want to simultaneously + * animate elements in and out. This function takes a previous set of keys + * and a new set of keys and merges them with its best guess of the correct + * ordering. In the future we may expose some of the utilities in + * ReactMultiChild to make this easy, but for now React itself does not + * directly have this concept of the union of prevChildren and nextChildren + * so we implement it here. + * + * @param {object} prev prev children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @param {object} next next children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @return {object} a key set that contains all keys in `prev` and all keys + * in `next` in a reasonable order. + */ + mergeChildMappings: function (prev, next) { + prev = prev || {}; + next = next || {}; + + function getValueForKey(key) { + if (next.hasOwnProperty(key)) { + return next[key]; + } else { + return prev[key]; + } + } + // For each key of `next`, the list of keys to insert before that key in + // the combined list + var nextKeysPending = {}; + + var pendingKeys = []; + for (var prevKey in prev) { + if (next.hasOwnProperty(prevKey)) { + if (pendingKeys.length) { + nextKeysPending[prevKey] = pendingKeys; + pendingKeys = []; + } + } else { + pendingKeys.push(prevKey); + } + } + + var i; + var childMapping = {}; + for (var nextKey in next) { + if (nextKeysPending.hasOwnProperty(nextKey)) { + for (i = 0; i < nextKeysPending[nextKey].length; i++) { + var pendingNextKey = nextKeysPending[nextKey][i]; + childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); + } + } + childMapping[nextKey] = getValueForKey(nextKey); + } + + // Finally, add the keys which didn't appear before any key in `next` + for (i = 0; i < pendingKeys.length; i++) { + childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + } + + return childMapping; + } +}; + +module.exports = ReactTransitionChildMapping; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 480 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 476 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * */ -var nativeObjectToString = objectProto.toString; + + + +var KeyEscapeUtils = __webpack_require__(220); +var traverseAllChildren = __webpack_require__(218); +var warning = __webpack_require__(11); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); +} /** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + * @param {number=} selfDebugID Optional debugID of the current internal instance. */ -function objectToString(value) { - return nativeObjectToString.call(value); +function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + // We found a component instance. + if (traverseContext && typeof traverseContext === 'object') { + var result = traverseContext; + var keyUnique = result[name] === undefined; + if (process.env.NODE_ENV !== 'production') { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (!keyUnique) { + process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; + } + } + if (keyUnique && child != null) { + result[name] = child; + } + } } -/* harmony default export */ __webpack_exports__["a"] = (objectToString); - - -/***/ }), -/* 481 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ +function flattenChildren(children, selfDebugID) { + if (children == null) { + return children; + } + var result = {}; -module.exports = __webpack_require__(482); + if (process.env.NODE_ENV !== 'production') { + traverseAllChildren(children, function (traverseContext, child, name) { + return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); + }, result); + } else { + traverseAllChildren(children, flattenSingleChildIntoContext, result); + } + return result; +} +module.exports = flattenChildren; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 482 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(global, module) { +/* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); -var _ponyfill = __webpack_require__(483); +var _extends2 = __webpack_require__(8); -var _ponyfill2 = _interopRequireDefault(_ponyfill); +var _extends3 = _interopRequireDefault(_extends2); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } +var _objectWithoutProperties2 = __webpack_require__(9); -var root; /* global window */ +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); +var _getPrototypeOf = __webpack_require__(4); -if (typeof self !== 'undefined') { - root = self; -} else if (typeof window !== 'undefined') { - root = window; -} else if (typeof global !== 'undefined') { - root = global; -} else if (true) { - root = module; -} else { - root = Function('return this')(); -} +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -var result = (0, _ponyfill2['default'])(root); -exports['default'] = result; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46), __webpack_require__(254)(module))) +var _classCallCheck2 = __webpack_require__(2); -/***/ }), -/* 483 */ -/***/ (function(module, exports, __webpack_require__) { +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -"use strict"; +var _createClass2 = __webpack_require__(3); +var _createClass3 = _interopRequireDefault(_createClass2); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports['default'] = symbolObservablePonyfill; -function symbolObservablePonyfill(root) { - var result; - var _Symbol = root.Symbol; +var _possibleConstructorReturn2 = __webpack_require__(5); - if (typeof _Symbol === 'function') { - if (_Symbol.observable) { - result = _Symbol.observable; - } else { - result = _Symbol('observable'); - _Symbol.observable = result; - } - } else { - result = '@@observable'; - } +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - return result; -}; +var _inherits2 = __webpack_require__(6); -/***/ }), -/* 484 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _inherits3 = _interopRequireDefault(_inherits2); -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = combineReducers; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(250); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(161); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(255); +var _simpleAssign = __webpack_require__(7); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var _react = __webpack_require__(1); +var _react2 = _interopRequireDefault(_react); -function getUndefinedStateErrorMessage(key, action) { - var actionType = action && action.type; - var actionName = actionType && '"' + actionType.toString() + '"' || 'an action'; +var _reactDom = __webpack_require__(17); - return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.'; -} +var _reactDom2 = _interopRequireDefault(_reactDom); -function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { - var reducerKeys = Object.keys(reducers); - var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; +var _autoPrefix = __webpack_require__(107); - if (reducerKeys.length === 0) { - return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; - } +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); - if (!Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */])(inputState)) { - return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"'); - } +var _transitions = __webpack_require__(12); - var unexpectedKeys = Object.keys(inputState).filter(function (key) { - return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; - }); +var _transitions2 = _interopRequireDefault(_transitions); - unexpectedKeys.forEach(function (key) { - unexpectedKeyCache[key] = true; - }); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (unexpectedKeys.length > 0) { - return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.'); - } -} +var ScaleInChild = function (_Component) { + (0, _inherits3.default)(ScaleInChild, _Component); -function assertReducerShape(reducers) { - Object.keys(reducers).forEach(function (key) { - var reducer = reducers[key]; - var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT }); + function ScaleInChild() { + (0, _classCallCheck3.default)(this, ScaleInChild); + return (0, _possibleConstructorReturn3.default)(this, (ScaleInChild.__proto__ || (0, _getPrototypeOf2.default)(ScaleInChild)).apply(this, arguments)); + } - if (typeof initialState === 'undefined') { - throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.'); + (0, _createClass3.default)(ScaleInChild, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); } - - var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); - if (typeof reducer(undefined, { type: type }) === 'undefined') { - throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.'); + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + this.initializeAnimation(callback); } - }); -} + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentDidAppear', + value: function componentDidAppear() { + this.animate(); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + this.animate(); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; -/** - * Turns an object whose values are different reducer functions, into a single - * reducer function. It will call every child reducer, and gather their results - * into a single state object, whose keys correspond to the keys of the passed - * reducer functions. - * - * @param {Object} reducers An object whose values correspond to different - * reducer functions that need to be combined into one. One handy way to obtain - * it is to use ES6 `import * as reducers` syntax. The reducers may never return - * undefined for any action. Instead, they should return their initial state - * if the state passed to them was undefined, and the current state for any - * unrecognized action. - * - * @returns {Function} A reducer function that invokes every reducer inside the - * passed object, and builds a state object with the same shape. - */ -function combineReducers(reducers) { - var reducerKeys = Object.keys(reducers); - var finalReducers = {}; - for (var i = 0; i < reducerKeys.length; i++) { - var key = reducerKeys[i]; + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.minScale + ')'); - if (process.env.NODE_ENV !== 'production') { - if (typeof reducers[key] === 'undefined') { - Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */])('No reducer provided for key "' + key + '"'); - } + this.leaveTimer = setTimeout(callback, 450); } + }, { + key: 'animate', + value: function animate() { + var style = _reactDom2.default.findDOMNode(this).style; - if (typeof reducers[key] === 'function') { - finalReducers[key] = reducers[key]; + style.opacity = '1'; + _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.maxScale + ')'); } - } - var finalReducerKeys = Object.keys(finalReducers); + }, { + key: 'initializeAnimation', + value: function initializeAnimation(callback) { + var style = _reactDom2.default.findDOMNode(this).style; - var unexpectedKeyCache = void 0; - if (process.env.NODE_ENV !== 'production') { - unexpectedKeyCache = {}; - } + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'scale(0)'); - var shapeAssertionError = void 0; - try { - assertReducerShape(finalReducers); - } catch (e) { - shapeAssertionError = e; - } + this.enterTimer = setTimeout(callback, this.props.enterDelay); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + enterDelay = _props.enterDelay, + maxScale = _props.maxScale, + minScale = _props.minScale, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'maxScale', 'minScale', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; - return function combination() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var action = arguments[1]; - if (shapeAssertionError) { - throw shapeAssertionError; - } + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'absolute', + height: '100%', + width: '100%', + top: 0, + left: 0, + transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) + }, style); - if (process.env.NODE_ENV !== 'production') { - var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); - if (warningMessage) { - Object(__WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */])(warningMessage); - } + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }), + children + ); } + }]); + return ScaleInChild; +}(_react.Component); - var hasChanged = false; - var nextState = {}; - for (var _i = 0; _i < finalReducerKeys.length; _i++) { - var _key = finalReducerKeys[_i]; - var reducer = finalReducers[_key]; - var previousStateForKey = state[_key]; - var nextStateForKey = reducer(previousStateForKey, action); - if (typeof nextStateForKey === 'undefined') { - var errorMessage = getUndefinedStateErrorMessage(_key, action); - throw new Error(errorMessage); - } - nextState[_key] = nextStateForKey; - hasChanged = hasChanged || nextStateForKey !== previousStateForKey; - } - return hasChanged ? nextState : state; - }; -} -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(0))) +ScaleInChild.defaultProps = { + enterDelay: 0, + maxScale: 1, + minScale: 0 +}; +ScaleInChild.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? ScaleInChild.propTypes = { + children: _react.PropTypes.node, + enterDelay: _react.PropTypes.number, + maxScale: _react.PropTypes.number, + minScale: _react.PropTypes.number, + style: _react.PropTypes.object +} : void 0; +exports.default = ScaleInChild; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 485 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 478 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = bindActionCreators; -function bindActionCreator(actionCreator, dispatch) { - return function () { - return dispatch(actionCreator.apply(undefined, arguments)); - }; -} +/* WEBPACK VAR INJECTION */(function(process) { -/** - * Turns an object whose values are action creators, into an object with the - * same keys, but with every function wrapped into a `dispatch` call so they - * may be invoked directly. This is just a convenience method, as you can call - * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. - * - * For convenience, you can also pass a single function as the first argument, - * and get a function in return. - * - * @param {Function|Object} actionCreators An object whose values are action - * creator functions. One handy way to obtain it is to use ES6 `import * as` - * syntax. You may also pass a single function. - * - * @param {Function} dispatch The `dispatch` function available on your Redux - * store. - * - * @returns {Function|Object} The object mimicking the original object, but with - * every action creator wrapped into the `dispatch` call. If you passed a - * function as `actionCreators`, the return value will also be a single - * function. - */ -function bindActionCreators(actionCreators, dispatch) { - if (typeof actionCreators === 'function') { - return bindActionCreator(actionCreators, dispatch); - } +Object.defineProperty(exports, "__esModule", { + value: true +}); - if (typeof actionCreators !== 'object' || actionCreators === null) { - throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?'); - } - - var keys = Object.keys(actionCreators); - var boundActionCreators = {}; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var actionCreator = actionCreators[key]; - if (typeof actionCreator === 'function') { - boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); - } - } - return boundActionCreators; -} - -/***/ }), -/* 486 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(256); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends2 = __webpack_require__(8); +var _extends3 = _interopRequireDefault(_extends2); +var _objectWithoutProperties2 = __webpack_require__(9); -/** - * Creates a store enhancer that applies middleware to the dispatch method - * of the Redux store. This is handy for a variety of tasks, such as expressing - * asynchronous actions in a concise manner, or logging every action payload. - * - * See `redux-thunk` package as an example of the Redux middleware. - * - * Because middleware is potentially asynchronous, this should be the first - * store enhancer in the composition chain. - * - * Note that each middleware will be given the `dispatch` and `getState` functions - * as named arguments. - * - * @param {...Function} middlewares The middleware chain to be applied. - * @returns {Function} A store enhancer applying the middleware. - */ -function applyMiddleware() { - for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { - middlewares[_key] = arguments[_key]; - } +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - return function (createStore) { - return function (reducer, preloadedState, enhancer) { - var store = createStore(reducer, preloadedState, enhancer); - var _dispatch = store.dispatch; - var chain = []; +var _getPrototypeOf = __webpack_require__(4); - var middlewareAPI = { - getState: store.getState, - dispatch: function dispatch(action) { - return _dispatch(action); - } - }; - chain = middlewares.map(function (middleware) { - return middleware(middlewareAPI); - }); - _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__["a" /* default */].apply(undefined, chain)(store.dispatch); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - return _extends({}, store, { - dispatch: _dispatch - }); - }; - }; -} +var _classCallCheck2 = __webpack_require__(2); -/***/ }), -/* 487 */ -/***/ (function(module, exports, __webpack_require__) { +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var baseGetTag = __webpack_require__(488), - getPrototype = __webpack_require__(493), - isObjectLike = __webpack_require__(495); +var _createClass2 = __webpack_require__(3); -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; +var _createClass3 = _interopRequireDefault(_createClass2); -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; +var _possibleConstructorReturn2 = __webpack_require__(5); -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +var _inherits2 = __webpack_require__(6); -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); +var _inherits3 = _interopRequireDefault(_inherits2); -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; -} +var _simpleAssign = __webpack_require__(7); -module.exports = isPlainObject; +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var _react = __webpack_require__(1); -/***/ }), -/* 488 */ -/***/ (function(module, exports, __webpack_require__) { +var _react2 = _interopRequireDefault(_react); -var Symbol = __webpack_require__(257), - getRawTag = __webpack_require__(491), - objectToString = __webpack_require__(492); +var _reactDom = __webpack_require__(17); -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; +var _reactDom2 = _interopRequireDefault(_reactDom); -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; +var _shallowEqual = __webpack_require__(58); -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); -module.exports = baseGetTag; +var _autoPrefix = __webpack_require__(107); +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); -/***/ }), -/* 489 */ -/***/ (function(module, exports, __webpack_require__) { +var _transitions = __webpack_require__(12); -var freeGlobal = __webpack_require__(490); +var _transitions2 = _interopRequireDefault(_transitions); -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); +var CircleRipple = function (_Component) { + (0, _inherits3.default)(CircleRipple, _Component); -module.exports = root; + function CircleRipple() { + (0, _classCallCheck3.default)(this, CircleRipple); + return (0, _possibleConstructorReturn3.default)(this, (CircleRipple.__proto__ || (0, _getPrototypeOf2.default)(CircleRipple)).apply(this, arguments)); + } + (0, _createClass3.default)(CircleRipple, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + return !(0, _shallowEqual2.default)(this.props, nextProps); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentDidAppear', + value: function componentDidAppear() { + this.animate(); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + this.animate(); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = 0; + // If the animation is aborted, remove from the DOM immediately + var removeAfter = this.props.aborted ? 0 : 2000; + this.enterTimer = setTimeout(callback, removeAfter); + } + }, { + key: 'animate', + value: function animate() { + var style = _reactDom2.default.findDOMNode(this).style; + var transitionValue = _transitions2.default.easeOut('2s', 'opacity') + ', ' + _transitions2.default.easeOut('1s', 'transform'); + _autoPrefix2.default.set(style, 'transition', transitionValue); + _autoPrefix2.default.set(style, 'transform', 'scale(1)'); + } + }, { + key: 'initializeAnimation', + value: function initializeAnimation(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = this.props.opacity; + _autoPrefix2.default.set(style, 'transform', 'scale(0)'); + this.leaveTimer = setTimeout(callback, 0); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + aborted = _props.aborted, + color = _props.color, + opacity = _props.opacity, + style = _props.style, + touchGenerated = _props.touchGenerated, + other = (0, _objectWithoutProperties3.default)(_props, ['aborted', 'color', 'opacity', 'style', 'touchGenerated']); + var prepareStyles = this.context.muiTheme.prepareStyles; -/***/ }), -/* 490 */ -/***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + var mergedStyles = (0, _simpleAssign2.default)({ + position: 'absolute', + top: 0, + left: 0, + height: '100%', + width: '100%', + borderRadius: '50%', + backgroundColor: color + }, style); -module.exports = freeGlobal; + return _react2.default.createElement('div', (0, _extends3.default)({}, other, { style: prepareStyles(mergedStyles) })); + } + }]); + return CircleRipple; +}(_react.Component); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46))) +CircleRipple.defaultProps = { + opacity: 0.1, + aborted: false +}; +CircleRipple.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? CircleRipple.propTypes = { + aborted: _react.PropTypes.bool, + color: _react.PropTypes.string, + opacity: _react.PropTypes.number, + style: _react.PropTypes.object, + touchGenerated: _react.PropTypes.bool +} : void 0; +exports.default = CircleRipple; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 491 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { -var Symbol = __webpack_require__(257); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +exports.__esModule = true; +exports["default"] = undefined; -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; +var _react = __webpack_require__(1); -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; +var _storeShape = __webpack_require__(251); -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; +var _storeShape2 = _interopRequireDefault(_storeShape); - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} +var _warning = __webpack_require__(252); - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} +var _warning2 = _interopRequireDefault(_warning); -module.exports = getRawTag; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -/***/ }), -/* 492 */ -/***/ (function(module, exports) { +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -/** Used for built-in method references. */ -var objectProto = Object.prototype; +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; +var didWarnAboutReceivingStore = false; +function warnAboutReceivingStore() { + if (didWarnAboutReceivingStore) { + return; + } + didWarnAboutReceivingStore = true; -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); + (0, _warning2["default"])('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.'); } -module.exports = objectToString; - +var Provider = function (_Component) { + _inherits(Provider, _Component); -/***/ }), -/* 493 */ -/***/ (function(module, exports, __webpack_require__) { + Provider.prototype.getChildContext = function getChildContext() { + return { store: this.store }; + }; -var overArg = __webpack_require__(494); + function Provider(props, context) { + _classCallCheck(this, Provider); -/** Built-in value references. */ -var getPrototype = overArg(Object.getPrototypeOf, Object); + var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); -module.exports = getPrototype; + _this.store = props.store; + return _this; + } + Provider.prototype.render = function render() { + return _react.Children.only(this.props.children); + }; -/***/ }), -/* 494 */ -/***/ (function(module, exports) { + return Provider; +}(_react.Component); -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} +exports["default"] = Provider; -module.exports = overArg; +if (process.env.NODE_ENV !== 'production') { + Provider.prototype.componentWillReceiveProps = function (nextProps) { + var store = this.store; + var nextStore = nextProps.store; -/***/ }), -/* 495 */ -/***/ (function(module, exports) { -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; + if (store !== nextStore) { + warnAboutReceivingStore(); + } + }; } -module.exports = isObjectLike; - +Provider.propTypes = { + store: _storeShape2["default"].isRequired, + children: _react.PropTypes.element.isRequired +}; +Provider.childContextTypes = { + store: _storeShape2["default"].isRequired +}; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 496 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { -Object.defineProperty(exports, "__esModule", { - value: true -}); +exports.__esModule = true; -var _extends2 = __webpack_require__(8); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _extends3 = _interopRequireDefault(_extends2); +exports["default"] = connect; -var _objectWithoutProperties2 = __webpack_require__(9); +var _react = __webpack_require__(1); -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); +var _storeShape = __webpack_require__(251); -var _getPrototypeOf = __webpack_require__(4); +var _storeShape2 = _interopRequireDefault(_storeShape); -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _shallowEqual = __webpack_require__(481); -var _classCallCheck2 = __webpack_require__(2); +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var _wrapActionCreators = __webpack_require__(482); -var _createClass2 = __webpack_require__(3); +var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators); -var _createClass3 = _interopRequireDefault(_createClass2); +var _warning = __webpack_require__(252); -var _possibleConstructorReturn2 = __webpack_require__(5); +var _warning2 = _interopRequireDefault(_warning); -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); +var _isPlainObject = __webpack_require__(491); -var _inherits2 = __webpack_require__(6); +var _isPlainObject2 = _interopRequireDefault(_isPlainObject); -var _inherits3 = _interopRequireDefault(_inherits2); +var _hoistNonReactStatics = __webpack_require__(261); -var _simpleAssign = __webpack_require__(7); +var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +var _invariant = __webpack_require__(83); -var _react = __webpack_require__(1); +var _invariant2 = _interopRequireDefault(_invariant); -var _react2 = _interopRequireDefault(_react); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -var _transitions = __webpack_require__(12); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var _transitions2 = _interopRequireDefault(_transitions); +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -function getStyles(props, context, state) { - var color = props.color, - hoverColor = props.hoverColor; - var baseTheme = context.muiTheme.baseTheme; +var defaultMapStateToProps = function defaultMapStateToProps(state) { + return {}; +}; // eslint-disable-line no-unused-vars +var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) { + return { dispatch: dispatch }; +}; +var defaultMergeProps = function defaultMergeProps(stateProps, dispatchProps, parentProps) { + return _extends({}, parentProps, stateProps, dispatchProps); +}; - var offColor = color || baseTheme.palette.textColor; - var onColor = hoverColor || offColor; +function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; +} - return { - root: { - color: state.hovered ? onColor : offColor, - position: 'relative', - fontSize: baseTheme.spacing.iconSize, - display: 'inline-block', - userSelect: 'none', - transition: _transitions2.default.easeOut() - } - }; +var errorObject = { value: null }; +function tryCatch(fn, ctx) { + try { + return fn.apply(ctx); + } catch (e) { + errorObject.value = e; + return errorObject; + } } -var FontIcon = function (_Component) { - (0, _inherits3.default)(FontIcon, _Component); +// Helps track hot reloading. +var nextVersion = 0; - function FontIcon() { - var _ref; +function connect(mapStateToProps, mapDispatchToProps, mergeProps) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - var _temp, _this, _ret; + var shouldSubscribe = Boolean(mapStateToProps); + var mapState = mapStateToProps || defaultMapStateToProps; - (0, _classCallCheck3.default)(this, FontIcon); + var mapDispatch = void 0; + if (typeof mapDispatchToProps === 'function') { + mapDispatch = mapDispatchToProps; + } else if (!mapDispatchToProps) { + mapDispatch = defaultMapDispatchToProps; + } else { + mapDispatch = (0, _wrapActionCreators2["default"])(mapDispatchToProps); + } - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + var finalMergeProps = mergeProps || defaultMergeProps; + var _options$pure = options.pure, + pure = _options$pure === undefined ? true : _options$pure, + _options$withRef = options.withRef, + withRef = _options$withRef === undefined ? false : _options$withRef; - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FontIcon.__proto__ || (0, _getPrototypeOf2.default)(FontIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - hovered: false - }, _this.handleMouseLeave = function (event) { - // hover is needed only when a hoverColor is defined - if (_this.props.hoverColor !== undefined) { - _this.setState({ hovered: false }); - } - if (_this.props.onMouseLeave) { - _this.props.onMouseLeave(event); - } - }, _this.handleMouseEnter = function (event) { - // hover is needed only when a hoverColor is defined - if (_this.props.hoverColor !== undefined) { - _this.setState({ hovered: true }); - } - if (_this.props.onMouseEnter) { - _this.props.onMouseEnter(event); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } + var checkMergedEquals = pure && finalMergeProps !== defaultMergeProps; - (0, _createClass3.default)(FontIcon, [{ - key: 'render', - value: function render() { - var _props = this.props, - hoverColor = _props.hoverColor, - onMouseLeave = _props.onMouseLeave, - onMouseEnter = _props.onMouseEnter, - style = _props.style, - other = (0, _objectWithoutProperties3.default)(_props, ['hoverColor', 'onMouseLeave', 'onMouseEnter', 'style']); - var prepareStyles = this.context.muiTheme.prepareStyles; + // Helps track hot reloading. + var version = nextVersion++; - var styles = getStyles(this.props, this.context, this.state); + return function wrapWithConnect(WrappedComponent) { + var connectDisplayName = 'Connect(' + getDisplayName(WrappedComponent) + ')'; - return _react2.default.createElement('span', (0, _extends3.default)({}, other, { - onMouseLeave: this.handleMouseLeave, - onMouseEnter: this.handleMouseEnter, - style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) - })); + function checkStateShape(props, methodName) { + if (!(0, _isPlainObject2["default"])(props)) { + (0, _warning2["default"])(methodName + '() in ' + connectDisplayName + ' must return a plain object. ' + ('Instead received ' + props + '.')); + } } - }]); - return FontIcon; -}(_react.Component); -FontIcon.muiName = 'FontIcon'; -FontIcon.defaultProps = { - onMouseEnter: function onMouseEnter() {}, - onMouseLeave: function onMouseLeave() {} -}; -FontIcon.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; -process.env.NODE_ENV !== "production" ? FontIcon.propTypes = { - /** - * This is the font color of the font icon. If not specified, - * this component will default to muiTheme.palette.textColor. - */ - color: _react.PropTypes.string, - /** - * This is the icon color when the mouse hovers over the icon. - */ - hoverColor: _react.PropTypes.string, - /** @ignore */ - onMouseEnter: _react.PropTypes.func, - /** @ignore */ - onMouseLeave: _react.PropTypes.func, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object -} : void 0; -exports.default = FontIcon; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + function computeMergedProps(stateProps, dispatchProps, parentProps) { + var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps); + if (process.env.NODE_ENV !== 'production') { + checkStateShape(mergedProps, 'mergeProps'); + } + return mergedProps; + } -/***/ }), -/* 497 */ -/***/ (function(module, exports, __webpack_require__) { + var Connect = function (_Component) { + _inherits(Connect, _Component); -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { + Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() { + return !pure || this.haveOwnPropsChanged || this.hasStoreStateChanged; + }; -Object.defineProperty(exports, "__esModule", { - value: true -}); + function Connect(props, context) { + _classCallCheck(this, Connect); -var _extends2 = __webpack_require__(8); + var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); -var _extends3 = _interopRequireDefault(_extends2); + _this.version = version; + _this.store = props.store || context.store; -var _objectWithoutProperties2 = __webpack_require__(9); + (0, _invariant2["default"])(_this.store, 'Could not find "store" in either the context or ' + ('props of "' + connectDisplayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + connectDisplayName + '".')); -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + var storeState = _this.store.getState(); + _this.state = { storeState: storeState }; + _this.clearCache(); + return _this; + } -var _getPrototypeOf = __webpack_require__(4); + Connect.prototype.computeStateProps = function computeStateProps(store, props) { + if (!this.finalMapStateToProps) { + return this.configureFinalMapState(store, props); + } -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + var state = store.getState(); + var stateProps = this.doStatePropsDependOnOwnProps ? this.finalMapStateToProps(state, props) : this.finalMapStateToProps(state); -var _classCallCheck2 = __webpack_require__(2); + if (process.env.NODE_ENV !== 'production') { + checkStateShape(stateProps, 'mapStateToProps'); + } + return stateProps; + }; -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + Connect.prototype.configureFinalMapState = function configureFinalMapState(store, props) { + var mappedState = mapState(store.getState(), props); + var isFactory = typeof mappedState === 'function'; -var _createClass2 = __webpack_require__(3); + this.finalMapStateToProps = isFactory ? mappedState : mapState; + this.doStatePropsDependOnOwnProps = this.finalMapStateToProps.length !== 1; -var _createClass3 = _interopRequireDefault(_createClass2); + if (isFactory) { + return this.computeStateProps(store, props); + } -var _possibleConstructorReturn2 = __webpack_require__(5); + if (process.env.NODE_ENV !== 'production') { + checkStateShape(mappedState, 'mapStateToProps'); + } + return mappedState; + }; -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + Connect.prototype.computeDispatchProps = function computeDispatchProps(store, props) { + if (!this.finalMapDispatchToProps) { + return this.configureFinalMapDispatch(store, props); + } -var _inherits2 = __webpack_require__(6); + var dispatch = store.dispatch; -var _inherits3 = _interopRequireDefault(_inherits2); + var dispatchProps = this.doDispatchPropsDependOnOwnProps ? this.finalMapDispatchToProps(dispatch, props) : this.finalMapDispatchToProps(dispatch); -var _simpleAssign = __webpack_require__(7); + if (process.env.NODE_ENV !== 'production') { + checkStateShape(dispatchProps, 'mapDispatchToProps'); + } + return dispatchProps; + }; -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + Connect.prototype.configureFinalMapDispatch = function configureFinalMapDispatch(store, props) { + var mappedDispatch = mapDispatch(store.dispatch, props); + var isFactory = typeof mappedDispatch === 'function'; -var _react = __webpack_require__(1); + this.finalMapDispatchToProps = isFactory ? mappedDispatch : mapDispatch; + this.doDispatchPropsDependOnOwnProps = this.finalMapDispatchToProps.length !== 1; -var _react2 = _interopRequireDefault(_react); + if (isFactory) { + return this.computeDispatchProps(store, props); + } -var _transitions = __webpack_require__(12); + if (process.env.NODE_ENV !== 'production') { + checkStateShape(mappedDispatch, 'mapDispatchToProps'); + } + return mappedDispatch; + }; -var _transitions2 = _interopRequireDefault(_transitions); + Connect.prototype.updateStatePropsIfNeeded = function updateStatePropsIfNeeded() { + var nextStateProps = this.computeStateProps(this.store, this.props); + if (this.stateProps && (0, _shallowEqual2["default"])(nextStateProps, this.stateProps)) { + return false; + } -var _propTypes = __webpack_require__(44); + this.stateProps = nextStateProps; + return true; + }; -var _propTypes2 = _interopRequireDefault(_propTypes); + Connect.prototype.updateDispatchPropsIfNeeded = function updateDispatchPropsIfNeeded() { + var nextDispatchProps = this.computeDispatchProps(this.store, this.props); + if (this.dispatchProps && (0, _shallowEqual2["default"])(nextDispatchProps, this.dispatchProps)) { + return false; + } -var _EnhancedButton = __webpack_require__(52); + this.dispatchProps = nextDispatchProps; + return true; + }; -var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + Connect.prototype.updateMergedPropsIfNeeded = function updateMergedPropsIfNeeded() { + var nextMergedProps = computeMergedProps(this.stateProps, this.dispatchProps, this.props); + if (this.mergedProps && checkMergedEquals && (0, _shallowEqual2["default"])(nextMergedProps, this.mergedProps)) { + return false; + } -var _FontIcon = __webpack_require__(259); + this.mergedProps = nextMergedProps; + return true; + }; -var _FontIcon2 = _interopRequireDefault(_FontIcon); + Connect.prototype.isSubscribed = function isSubscribed() { + return typeof this.unsubscribe === 'function'; + }; -var _Tooltip = __webpack_require__(498); + Connect.prototype.trySubscribe = function trySubscribe() { + if (shouldSubscribe && !this.unsubscribe) { + this.unsubscribe = this.store.subscribe(this.handleChange.bind(this)); + this.handleChange(); + } + }; -var _Tooltip2 = _interopRequireDefault(_Tooltip); + Connect.prototype.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + } + }; -var _childUtils = __webpack_require__(100); + Connect.prototype.componentDidMount = function componentDidMount() { + this.trySubscribe(); + }; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + if (!pure || !(0, _shallowEqual2["default"])(nextProps, this.props)) { + this.haveOwnPropsChanged = true; + } + }; -function getStyles(props, context) { - var baseTheme = context.muiTheme.baseTheme; + Connect.prototype.componentWillUnmount = function componentWillUnmount() { + this.tryUnsubscribe(); + this.clearCache(); + }; + Connect.prototype.clearCache = function clearCache() { + this.dispatchProps = null; + this.stateProps = null; + this.mergedProps = null; + this.haveOwnPropsChanged = true; + this.hasStoreStateChanged = true; + this.haveStatePropsBeenPrecalculated = false; + this.statePropsPrecalculationError = null; + this.renderedElement = null; + this.finalMapDispatchToProps = null; + this.finalMapStateToProps = null; + }; - return { - root: { - boxSizing: 'border-box', - overflow: 'visible', - transition: _transitions2.default.easeOut(), - padding: baseTheme.spacing.iconSize / 2, - width: baseTheme.spacing.iconSize * 2, - height: baseTheme.spacing.iconSize * 2, - fontSize: 0 - }, - tooltip: { - boxSizing: 'border-box' - }, - disabled: { - color: baseTheme.palette.disabledColor, - fill: baseTheme.palette.disabledColor, - cursor: 'not-allowed' - } - }; -} + Connect.prototype.handleChange = function handleChange() { + if (!this.unsubscribe) { + return; + } -var IconButton = function (_Component) { - (0, _inherits3.default)(IconButton, _Component); + var storeState = this.store.getState(); + var prevStoreState = this.state.storeState; + if (pure && prevStoreState === storeState) { + return; + } - function IconButton() { - var _ref; + if (pure && !this.doStatePropsDependOnOwnProps) { + var haveStatePropsChanged = tryCatch(this.updateStatePropsIfNeeded, this); + if (!haveStatePropsChanged) { + return; + } + if (haveStatePropsChanged === errorObject) { + this.statePropsPrecalculationError = errorObject.value; + } + this.haveStatePropsBeenPrecalculated = true; + } - var _temp, _this, _ret; + this.hasStoreStateChanged = true; + this.setState({ storeState: storeState }); + }; - (0, _classCallCheck3.default)(this, IconButton); + Connect.prototype.getWrappedInstance = function getWrappedInstance() { + (0, _invariant2["default"])(withRef, 'To access the wrapped instance, you need to specify ' + '{ withRef: true } as the fourth argument of the connect() call.'); - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + return this.refs.wrappedInstance; + }; - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = IconButton.__proto__ || (0, _getPrototypeOf2.default)(IconButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - hovered: false, - isKeyboardFocused: false, - // Not to be confonded with the touch property. - // This state is to determined if it's a mobile device. - touch: false, - tooltipShown: false - }, _this.handleBlur = function (event) { - _this.hideTooltip(); - if (_this.props.onBlur) { - _this.props.onBlur(event); - } - }, _this.handleFocus = function (event) { - _this.showTooltip(); - if (_this.props.onFocus) { - _this.props.onFocus(event); - } - }, _this.handleMouseLeave = function (event) { - if (!_this.button.isKeyboardFocused()) { - _this.hideTooltip(); - } - _this.setState({ hovered: false }); - if (_this.props.onMouseLeave) { - _this.props.onMouseLeave(event); - } - }, _this.handleMouseOut = function (event) { - if (_this.props.disabled) _this.hideTooltip(); - if (_this.props.onMouseOut) _this.props.onMouseOut(event); - }, _this.handleMouseEnter = function (event) { - _this.showTooltip(); + Connect.prototype.render = function render() { + var haveOwnPropsChanged = this.haveOwnPropsChanged, + hasStoreStateChanged = this.hasStoreStateChanged, + haveStatePropsBeenPrecalculated = this.haveStatePropsBeenPrecalculated, + statePropsPrecalculationError = this.statePropsPrecalculationError, + renderedElement = this.renderedElement; - // Cancel hover styles for touch devices - if (!_this.state.touch) { - _this.setState({ hovered: true }); - } - if (_this.props.onMouseEnter) { - _this.props.onMouseEnter(event); - } - }, _this.handleTouchStart = function (event) { - _this.setState({ touch: true }); - if (_this.props.onTouchStart) { - _this.props.onTouchStart(event); - } - }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { - var _this$props = _this.props, - disabled = _this$props.disabled, - onFocus = _this$props.onFocus, - onBlur = _this$props.onBlur, - onKeyboardFocus = _this$props.onKeyboardFocus; + this.haveOwnPropsChanged = false; + this.hasStoreStateChanged = false; + this.haveStatePropsBeenPrecalculated = false; + this.statePropsPrecalculationError = null; - if (isKeyboardFocused && !disabled) { - _this.showTooltip(); - if (onFocus) { - onFocus(event); + if (statePropsPrecalculationError) { + throw statePropsPrecalculationError; } - } else { - _this.hideTooltip(); - if (onBlur) { - onBlur(event); + + var shouldUpdateStateProps = true; + var shouldUpdateDispatchProps = true; + if (pure && renderedElement) { + shouldUpdateStateProps = hasStoreStateChanged || haveOwnPropsChanged && this.doStatePropsDependOnOwnProps; + shouldUpdateDispatchProps = haveOwnPropsChanged && this.doDispatchPropsDependOnOwnProps; } - } - _this.setState({ isKeyboardFocused: isKeyboardFocused }); - if (onKeyboardFocus) { - onKeyboardFocus(event, isKeyboardFocused); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } + var haveStatePropsChanged = false; + var haveDispatchPropsChanged = false; + if (haveStatePropsBeenPrecalculated) { + haveStatePropsChanged = true; + } else if (shouldUpdateStateProps) { + haveStatePropsChanged = this.updateStatePropsIfNeeded(); + } + if (shouldUpdateDispatchProps) { + haveDispatchPropsChanged = this.updateDispatchPropsIfNeeded(); + } - (0, _createClass3.default)(IconButton, [{ - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (nextProps.disabled) { - this.setState({ hovered: false }); - } - } - }, { - key: 'setKeyboardFocus', - value: function setKeyboardFocus() { - this.button.setKeyboardFocus(); - } - }, { - key: 'showTooltip', - value: function showTooltip() { - if (this.props.tooltip) { - this.setState({ tooltipShown: true }); - } - } - }, { - key: 'hideTooltip', - value: function hideTooltip() { - if (this.props.tooltip) this.setState({ tooltipShown: false }); - } - }, { - key: 'render', - value: function render() { - var _this2 = this; + var haveMergedPropsChanged = true; + if (haveStatePropsChanged || haveDispatchPropsChanged || haveOwnPropsChanged) { + haveMergedPropsChanged = this.updateMergedPropsIfNeeded(); + } else { + haveMergedPropsChanged = false; + } - var _props = this.props, - disabled = _props.disabled, - hoveredStyle = _props.hoveredStyle, - disableTouchRipple = _props.disableTouchRipple, - children = _props.children, - iconClassName = _props.iconClassName, - style = _props.style, - tooltip = _props.tooltip, - tooltipPositionProp = _props.tooltipPosition, - tooltipStyles = _props.tooltipStyles, - touch = _props.touch, - iconStyle = _props.iconStyle, - other = (0, _objectWithoutProperties3.default)(_props, ['disabled', 'hoveredStyle', 'disableTouchRipple', 'children', 'iconClassName', 'style', 'tooltip', 'tooltipPosition', 'tooltipStyles', 'touch', 'iconStyle']); + if (!haveMergedPropsChanged && renderedElement) { + return renderedElement; + } - var fonticon = void 0; + if (withRef) { + this.renderedElement = (0, _react.createElement)(WrappedComponent, _extends({}, this.mergedProps, { + ref: 'wrappedInstance' + })); + } else { + this.renderedElement = (0, _react.createElement)(WrappedComponent, this.mergedProps); + } - var styles = getStyles(this.props, this.context); - var tooltipPosition = tooltipPositionProp.split('-'); + return this.renderedElement; + }; - var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled; + return Connect; + }(_react.Component); - var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style, hovered ? hoveredStyle : {}); + Connect.displayName = connectDisplayName; + Connect.WrappedComponent = WrappedComponent; + Connect.contextTypes = { + store: _storeShape2["default"] + }; + Connect.propTypes = { + store: _storeShape2["default"] + }; - var tooltipElement = tooltip ? _react2.default.createElement(_Tooltip2.default, { - label: tooltip, - show: this.state.tooltipShown, - touch: touch, - style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyles), - verticalPosition: tooltipPosition[0], - horizontalPosition: tooltipPosition[1] - }) : null; - - if (iconClassName) { - var iconHoverColor = iconStyle.iconHoverColor, - iconStyleFontIcon = (0, _objectWithoutProperties3.default)(iconStyle, ['iconHoverColor']); - - - fonticon = _react2.default.createElement( - _FontIcon2.default, - { - className: iconClassName, - hoverColor: disabled ? null : iconHoverColor, - style: (0, _simpleAssign2.default)({}, disabled && styles.disabled, iconStyleFontIcon), - color: this.context.muiTheme.baseTheme.palette.textColor - }, - children - ); - } - - var childrenStyle = disabled ? (0, _simpleAssign2.default)({}, iconStyle, styles.disabled) : iconStyle; + if (process.env.NODE_ENV !== 'production') { + Connect.prototype.componentWillUpdate = function componentWillUpdate() { + if (this.version === version) { + return; + } - return _react2.default.createElement( - _EnhancedButton2.default, - (0, _extends3.default)({ - ref: function ref(_ref2) { - return _this2.button = _ref2; - } - }, other, { - centerRipple: true, - disabled: disabled, - onTouchStart: this.handleTouchStart, - style: mergedRootStyles, - disableTouchRipple: disableTouchRipple, - onBlur: this.handleBlur, - onFocus: this.handleFocus, - onMouseLeave: this.handleMouseLeave, - onMouseEnter: this.handleMouseEnter, - onMouseOut: this.handleMouseOut, - onKeyboardFocus: this.handleKeyboardFocus - }), - tooltipElement, - fonticon, - (0, _childUtils.extendChildren)(children, { - style: childrenStyle - }) - ); + // We are hot reloading! + this.version = version; + this.trySubscribe(); + this.clearCache(); + }; } - }]); - return IconButton; -}(_react.Component); -IconButton.muiName = 'IconButton'; -IconButton.defaultProps = { - disabled: false, - disableTouchRipple: false, - iconStyle: {}, - tooltipPosition: 'bottom-center', - touch: false -}; -IconButton.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; -process.env.NODE_ENV !== "production" ? IconButton.propTypes = { - /** - * Can be used to pass a `FontIcon` element as the icon for the button. - */ - children: _react.PropTypes.node, - /** - * The CSS class name of the root element. - */ - className: _react.PropTypes.string, - /** - * If true, the element's ripple effect will be disabled. - */ - disableTouchRipple: _react.PropTypes.bool, - /** - * If true, the element will be disabled. - */ - disabled: _react.PropTypes.bool, - /** - * Override the inline-styles of the root element when the component is hovered. - */ - hoveredStyle: _react.PropTypes.object, - /** - * The URL to link to when the button is clicked. - */ - href: _react.PropTypes.string, - /** - * The CSS class name of the icon. Used for setting the icon with a stylesheet. - */ - iconClassName: _react.PropTypes.string, - /** - * Override the inline-styles of the icon element. - * Note: you can specify iconHoverColor as a String inside this object. - */ - iconStyle: _react.PropTypes.object, - /** @ignore */ - onBlur: _react.PropTypes.func, - /** @ignore */ - onFocus: _react.PropTypes.func, - /** - * Callback function fired when the element is focused or blurred by the keyboard. - * - * @param {object} event `focus` or `blur` event targeting the element. - * @param {boolean} keyboardFocused Indicates whether the element is focused. - */ - onKeyboardFocus: _react.PropTypes.func, - /** @ignore */ - onMouseEnter: _react.PropTypes.func, - /** @ignore */ - onMouseLeave: _react.PropTypes.func, - /** @ignore */ - onMouseOut: _react.PropTypes.func, - /** @ignore */ - onTouchStart: _react.PropTypes.func, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - /** - * The text to supply to the element's tooltip. - */ - tooltip: _react.PropTypes.node, - /** - * The vertical and horizontal positions, respectively, of the element's tooltip. - * Possible values are: "bottom-center", "top-center", "bottom-right", "top-right", - * "bottom-left", and "top-left". - */ - tooltipPosition: _propTypes2.default.cornersAndCenter, - /** - * Override the inline-styles of the tooltip element. - */ - tooltipStyles: _react.PropTypes.object, - /** - * If true, increase the tooltip element's size. Useful for increasing tooltip - * readability on mobile devices. - */ - touch: _react.PropTypes.bool -} : void 0; -exports.default = IconButton; + return (0, _hoistNonReactStatics2["default"])(Connect, WrappedComponent); + }; +} /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 498 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends2 = __webpack_require__(8); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(9); -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var _getPrototypeOf = __webpack_require__(4); +exports.__esModule = true; +exports["default"] = shallowEqual; +function shallowEqual(objA, objB) { + if (objA === objB) { + return true; + } -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); -var _classCallCheck2 = __webpack_require__(2); + if (keysA.length !== keysB.length) { + return false; + } -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + // Test for A's keys different from B. + var hasOwn = Object.prototype.hasOwnProperty; + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { + return false; + } + } -var _createClass2 = __webpack_require__(3); + return true; +} -var _createClass3 = _interopRequireDefault(_createClass2); +/***/ }), +/* 482 */ +/***/ (function(module, exports, __webpack_require__) { -var _possibleConstructorReturn2 = __webpack_require__(5); +"use strict"; -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -var _inherits2 = __webpack_require__(6); +exports.__esModule = true; +exports["default"] = wrapActionCreators; -var _inherits3 = _interopRequireDefault(_inherits2); +var _redux = __webpack_require__(165); -var _simpleAssign = __webpack_require__(7); +function wrapActionCreators(actionCreators) { + return function (dispatch) { + return (0, _redux.bindActionCreators)(actionCreators, dispatch); + }; +} -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); +/***/ }), +/* 483 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var _react = __webpack_require__(1); +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(109); -var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(12); +/** Used for built-in method references. */ +var objectProto = Object.prototype; -var _transitions2 = _interopRequireDefault(_transitions); +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; -function getStyles(props, context, state) { - var verticalPosition = props.verticalPosition; - var horizontalPosition = props.horizontalPosition; - var touchMarginOffset = props.touch ? 10 : 0; - var touchOffsetTop = props.touch ? -20 : -10; - var offset = verticalPosition === 'bottom' ? 14 + touchMarginOffset : -14 - touchMarginOffset; +/** Built-in value references. */ +var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; - var _context$muiTheme = context.muiTheme, - baseTheme = _context$muiTheme.baseTheme, - zIndex = _context$muiTheme.zIndex, - tooltip = _context$muiTheme.tooltip; +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} - var styles = { - root: { - position: 'absolute', - fontFamily: baseTheme.fontFamily, - fontSize: '10px', - lineHeight: '22px', - padding: '0 8px', - zIndex: zIndex.tooltip, - color: tooltip.color, - overflow: 'hidden', - top: -10000, - borderRadius: 2, - userSelect: 'none', - opacity: 0, - right: horizontalPosition === 'left' ? 12 : null, - left: horizontalPosition === 'center' ? (state.offsetWidth - 48) / 2 * -1 : null, - transition: _transitions2.default.easeOut('0ms', 'top', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') - }, - label: { - position: 'relative', - whiteSpace: 'nowrap' - }, - ripple: { - position: 'absolute', - left: horizontalPosition === 'center' ? '50%' : horizontalPosition === 'left' ? '100%' : '0%', - top: verticalPosition === 'bottom' ? 0 : '100%', - transform: 'translate(-50%, -50%)', - borderRadius: '50%', - backgroundColor: 'transparent', - transition: _transitions2.default.easeOut('0ms', 'width', '450ms') + ', ' + _transitions2.default.easeOut('0ms', 'height', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') - }, - rootWhenShown: { - top: verticalPosition === 'top' ? touchOffsetTop : 36, - opacity: 0.9, - transform: 'translate(0px, ' + offset + 'px)', - transition: _transitions2.default.easeOut('0ms', 'top', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') - }, - rootWhenTouched: { - fontSize: '14px', - lineHeight: '32px', - padding: '0 16px' - }, - rippleWhenShown: { - backgroundColor: tooltip.rippleBackgroundColor, - transition: _transitions2.default.easeOut('450ms', 'width', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'height', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; } - }; - - return styles; + } + return result; } -var Tooltip = function (_Component) { - (0, _inherits3.default)(Tooltip, _Component); +/* harmony default export */ __webpack_exports__["a"] = (getRawTag); - function Tooltip() { - var _ref; - var _temp, _this, _ret; +/***/ }), +/* 484 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - (0, _classCallCheck3.default)(this, Tooltip); +"use strict"; +/** Used for built-in method references. */ +var objectProto = Object.prototype; - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tooltip.__proto__ || (0, _getPrototypeOf2.default)(Tooltip)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - offsetWidth: null - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} - (0, _createClass3.default)(Tooltip, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.setRippleSize(); - this.setTooltipPosition(); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps() { - this.setTooltipPosition(); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate() { - this.setRippleSize(); - } - }, { - key: 'setRippleSize', - value: function setRippleSize() { - var ripple = this.refs.ripple; - var tooltip = this.refs.tooltip; - var tooltipWidth = parseInt(tooltip.offsetWidth, 10) / (this.props.horizontalPosition === 'center' ? 2 : 1); - var tooltipHeight = parseInt(tooltip.offsetHeight, 10); +/* harmony default export */ __webpack_exports__["a"] = (objectToString); - var rippleDiameter = Math.ceil(Math.sqrt(Math.pow(tooltipHeight, 2) + Math.pow(tooltipWidth, 2)) * 2); - if (this.props.show) { - ripple.style.height = rippleDiameter + 'px'; - ripple.style.width = rippleDiameter + 'px'; - } else { - ripple.style.width = '0px'; - ripple.style.height = '0px'; - } - } - }, { - key: 'setTooltipPosition', - value: function setTooltipPosition() { - this.setState({ offsetWidth: this.refs.tooltip.offsetWidth }); - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - horizontalPosition = _props.horizontalPosition, - label = _props.label, - show = _props.show, - touch = _props.touch, - verticalPosition = _props.verticalPosition, - other = (0, _objectWithoutProperties3.default)(_props, ['horizontalPosition', 'label', 'show', 'touch', 'verticalPosition']); - var prepareStyles = this.context.muiTheme.prepareStyles; - var styles = getStyles(this.props, this.context, this.state); +/***/ }), +/* 485 */ +/***/ (function(module, exports, __webpack_require__) { - return _react2.default.createElement( - 'div', - (0, _extends3.default)({}, other, { - ref: 'tooltip', - style: prepareStyles((0, _simpleAssign2.default)(styles.root, this.props.show && styles.rootWhenShown, this.props.touch && styles.rootWhenTouched, this.props.style)) - }), - _react2.default.createElement('div', { - ref: 'ripple', - style: prepareStyles((0, _simpleAssign2.default)(styles.ripple, this.props.show && styles.rippleWhenShown)) - }), - _react2.default.createElement( - 'span', - { style: prepareStyles(styles.label) }, - label - ) - ); - } - }]); - return Tooltip; -}(_react.Component); +module.exports = __webpack_require__(486); -Tooltip.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; -process.env.NODE_ENV !== "production" ? Tooltip.propTypes = { - /** - * The css class name of the root element. - */ - className: _react.PropTypes.string, - horizontalPosition: _react.PropTypes.oneOf(['left', 'right', 'center']), - label: _react.PropTypes.node.isRequired, - show: _react.PropTypes.bool, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - touch: _react.PropTypes.bool, - verticalPosition: _react.PropTypes.oneOf(['top', 'bottom']) -} : void 0; -exports.default = Tooltip; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 499 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - +/* WEBPACK VAR INJECTION */(function(global, module) { Object.defineProperty(exports, "__esModule", { value: true }); -var _react = __webpack_require__(1); +var _ponyfill = __webpack_require__(487); -var _react2 = _interopRequireDefault(_react); +var _ponyfill2 = _interopRequireDefault(_ponyfill); -var _reduxForm = __webpack_require__(162); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } -var _reactRedux = __webpack_require__(33); +var root; /* global window */ -var _MenuItem = __webpack_require__(118); -var _MenuItem2 = _interopRequireDefault(_MenuItem); +if (typeof self !== 'undefined') { + root = self; +} else if (typeof window !== 'undefined') { + root = window; +} else if (typeof global !== 'undefined') { + root = global; +} else if (true) { + root = module; +} else { + root = Function('return this')(); +} -var _RaisedButton = __webpack_require__(182); +var result = (0, _ponyfill2['default'])(root); +exports['default'] = result; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(49), __webpack_require__(257)(module))) -var _RaisedButton2 = _interopRequireDefault(_RaisedButton); +/***/ }), +/* 487 */ +/***/ (function(module, exports, __webpack_require__) { -var _reduxFormMaterialUi = __webpack_require__(183); +"use strict"; -var _Styles = __webpack_require__(120); -var _Styles2 = _interopRequireDefault(_Styles); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports['default'] = symbolObservablePonyfill; +function symbolObservablePonyfill(root) { + var result; + var _Symbol = root.Symbol; -var _Utils = __webpack_require__(305); + if (typeof _Symbol === 'function') { + if (_Symbol.observable) { + result = _Symbol.observable; + } else { + result = _Symbol('observable'); + _Symbol.observable = result; + } + } else { + result = '@@observable'; + } -var Utils = _interopRequireWildcard(_Utils); + return result; +}; -var _FormValidators = __webpack_require__(189); +/***/ }), +/* 488 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var Validators = _interopRequireWildcard(_FormValidators); +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = combineReducers; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(253); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(258); -var _Menus = __webpack_require__(84); -var menus = _interopRequireWildcard(_Menus); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function getUndefinedStateErrorMessage(key, action) { + var actionType = action && action.type; + var actionName = actionType && '"' + actionType.toString() + '"' || 'an action'; -function getStatesForCountry(country) { - switch (country) { - case 'USA': - return Utils.usaRegions; - case 'JAPAN': - return Utils.japanRegions; - case 'CANADA': - return Utils.canadaRegions; - default: - return []; - } + return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.'; } -var Billing = function Billing(props) { - var handleSubmit = props.handleSubmit, - pristine = props.pristine, - submitting = props.submitting, - country = props.country; - - return _react2.default.createElement( - 'form', - { onSubmit: handleSubmit, id: 'biling-form' }, - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'order_billing_name', - validate: Validators.fullName, - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Firstname and Lastname', - hintText: 'Firstname and Lastname', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'order_email', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Email', - hintText: 'Email', - style: _Styles2.default.fields.text, - validate: [Validators.required, Validators.email] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'order_tel', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Phone number', - hintText: 'Phone number', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'bo', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Address', - hintText: 'Address', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'order_billing_city', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'City', - hintText: 'City', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'order_billing_country', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Country', - hintText: 'Country', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.countries.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); - }) - ) - ), - ['JAPAN', 'USA', 'CANADA'].indexOf(country) !== -1 && _react2.default.createElement( - _reduxForm.Field, - { - name: 'order_billing_state', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'State', - hintText: 'State', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - getStatesForCountry(country).map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'order_billing_zip', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Zip', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'credit_card_type', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Credit card type', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - _react2.default.createElement(_MenuItem2.default, { value: 'visa', primaryText: 'Visa' }), - _react2.default.createElement(_MenuItem2.default, { value: 'american_express', primaryText: 'American Express' }), - _react2.default.createElement(_MenuItem2.default, { value: 'master', primaryText: 'Mastercard' }), - _react2.default.createElement(_MenuItem2.default, { value: 'solo', primaryText: 'Solo' }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'cnb', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Credit Card Number', - hintText: 'Credit Card Number', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'credit_card_month', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Expiry month', - hintText: 'Expiry month', - validate: [Validators.required], - style: _Styles2.default.fields.text - }, - Array.apply(null, new Array(12)).map(function (x, i) { - var month = ++i < 10 ? '0' + i : i; - return _react2.default.createElement(_MenuItem2.default, { key: month, value: month, primaryText: month }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'credit_card_year', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Expiry year', - hintText: 'Expiry year', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Array.apply(null, new Array(5)).map(function (x, i) { - var year = new Date().getFullYear() + i; - return _react2.default.createElement(_MenuItem2.default, { key: year, value: year, primaryText: year }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'vval', - component: _reduxFormMaterialUi.TextField, - hintText: 'CCV', - floatingLabelText: 'CCV', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_RaisedButton2.default, { - label: 'Save', - disabled: pristine || submitting, - type: 'submit' - }) - ) - ); -}; - -var BillingForm = (0, _reduxForm.reduxForm)({ - form: 'billing' -})(Billing); +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; -Billing.propTypes = { - shop: _react.PropTypes.string.isRequired -}; -var selector = (0, _reduxForm.formValueSelector)('billing'); + if (reducerKeys.length === 0) { + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; + } -function mapStateToProps(state, ownProps) { - return { - initialValues: (state.settings.values[ownProps.shop] || {})[menus.MENU_BILLING] || {}, - country: selector(state, 'order_billing_country') - }; -} + if (!__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */](inputState)) { + return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"'); + } -exports.default = (0, _reactRedux.connect)(mapStateToProps)(BillingForm); + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); -/***/ }), -/* 500 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + if (unexpectedKeys.length > 0) { + return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.'); + } +} -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function assertReducerSanity(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT }); -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + if (typeof initialState === 'undefined') { + throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.'); + } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); + if (typeof reducer(undefined, { type: type }) === 'undefined') { + throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.'); + } + }); +} +/** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ +function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + if (process.env.NODE_ENV !== 'production') { + if (typeof reducers[key] === 'undefined') { + __WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */]('No reducer provided for key "' + key + '"'); + } + } + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + var finalReducerKeys = Object.keys(finalReducers); -var Form = function (_Component) { - _inherits(Form, _Component); + if (process.env.NODE_ENV !== 'production') { + var unexpectedKeyCache = {}; + } - function Form(props, context) { - _classCallCheck(this, Form); + var sanityError; + try { + assertReducerSanity(finalReducers); + } catch (e) { + sanityError = e; + } - var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props, context)); + return function combination() { + var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var action = arguments[1]; - if (!context._reduxForm) { - throw new Error('Form must be inside a component decorated with reduxForm()'); + if (sanityError) { + throw sanityError; } - return _this; - } - _createClass(Form, [{ - key: 'componentWillMount', - value: function componentWillMount() { - this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit); - } - }, { - key: 'render', - value: function render() { - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('form', this.props); + if (process.env.NODE_ENV !== 'production') { + var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); + if (warningMessage) { + __WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */](warningMessage); + } } - }]); - - return Form; -}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); -Form.propTypes = { - onSubmit: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired -}; -Form.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object -}; - -/* harmony default export */ __webpack_exports__["a"] = (Form); + var hasChanged = false; + var nextState = {}; + for (var i = 0; i < finalReducerKeys.length; i++) { + var key = finalReducerKeys[i]; + var reducer = finalReducers[key]; + var previousStateForKey = state[key]; + var nextStateForKey = reducer(previousStateForKey, action); + if (typeof nextStateForKey === 'undefined') { + var errorMessage = getUndefinedStateErrorMessage(key, action); + throw new Error(errorMessage); + } + nextState[key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + return hasChanged ? nextState : state; + }; +} +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(0))) /***/ }), -/* 501 */ +/* 489 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_prefixName__ = __webpack_require__(85); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - - - - -var FormSection = function (_Component) { - _inherits(FormSection, _Component); - - function FormSection(props, context) { - _classCallCheck(this, FormSection); - - var _this = _possibleConstructorReturn(this, (FormSection.__proto__ || Object.getPrototypeOf(FormSection)).call(this, props, context)); +/* harmony export (immutable) */ __webpack_exports__["a"] = bindActionCreators; +function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(undefined, arguments)); + }; +} - if (!context._reduxForm) { - throw new Error('FormSection must be inside a component decorated with reduxForm()'); - } - return _this; +/** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass a single function as the first argument, + * and get a function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ +function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); } - _createClass(FormSection, [{ - key: 'getChildContext', - value: function getChildContext() { - var context = this.context, - name = this.props.name; + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?'); + } - return { - _reduxForm: _extends({}, context._reduxForm, { - sectionPrefix: Object(__WEBPACK_IMPORTED_MODULE_2__util_prefixName__["a" /* default */])(context, name) - }) - }; + var keys = Object.keys(actionCreators); + var boundActionCreators = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var actionCreator = actionCreators[key]; + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); } - }, { - key: 'render', - value: function render() { - var _props = this.props, - children = _props.children, - name = _props.name, - component = _props.component, - rest = _objectWithoutProperties(_props, ['children', 'name', 'component']); + } + return boundActionCreators; +} - if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(children)) { - return children; - } +/***/ }), +/* 490 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, rest, { - children: children - })); - } - }]); +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(259); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - return FormSection; -}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); -FormSection.propTypes = { - name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired, - component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]) -}; -FormSection.defaultProps = { - component: 'div' -}; +/** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ +function applyMiddleware() { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } -FormSection.childContextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired -}; + return function (createStore) { + return function (reducer, preloadedState, enhancer) { + var store = createStore(reducer, preloadedState, enhancer); + var _dispatch = store.dispatch; + var chain = []; -FormSection.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object -}; + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch(action) { + return _dispatch(action); + } + }; + chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__["a" /* default */].apply(undefined, chain)(store.dispatch); -/* harmony default export */ __webpack_exports__["a"] = (FormSection); + return _extends({}, store, { + dispatch: _dispatch + }); + }; + }; +} /***/ }), -/* 502 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - +var baseGetTag = __webpack_require__(492), + getPrototype = __webpack_require__(497), + isObjectLike = __webpack_require__(499); -Object.defineProperty(exports, "__esModule", { - value: true -}); +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -function _extendableBuiltin(cls) { - function ExtendableBuiltin() { - cls.apply(this, arguments); - } +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); - ExtendableBuiltin.prototype = Object.create(cls.prototype, { - constructor: { - value: cls, - enumerable: false, - writable: true, - configurable: true - } - }); - - if (Object.setPrototypeOf) { - Object.setPrototypeOf(ExtendableBuiltin, cls); - } else { - ExtendableBuiltin.__proto__ = cls; +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; } - - return ExtendableBuiltin; + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; } -var ExtendableError = function (_extendableBuiltin2) { - _inherits(ExtendableError, _extendableBuiltin2); - - function ExtendableError() { - var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; +module.exports = isPlainObject; - _classCallCheck(this, ExtendableError); - // extending Error is weird and does not propagate `message` - var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message)); +/***/ }), +/* 492 */ +/***/ (function(module, exports, __webpack_require__) { - Object.defineProperty(_this, 'message', { - configurable: true, - enumerable: false, - value: message, - writable: true - }); +var Symbol = __webpack_require__(260), + getRawTag = __webpack_require__(495), + objectToString = __webpack_require__(496); - Object.defineProperty(_this, 'name', { - configurable: true, - enumerable: false, - value: _this.constructor.name, - writable: true - }); +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; - if (Error.hasOwnProperty('captureStackTrace')) { - Error.captureStackTrace(_this, _this.constructor); - return _possibleConstructorReturn(_this); - } +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - Object.defineProperty(_this, 'stack', { - configurable: true, - enumerable: false, - value: new Error(message).stack, - writable: true - }); - return _this; +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} - return ExtendableError; -}(_extendableBuiltin(Error)); - -exports.default = ExtendableError; -module.exports = exports['default']; +module.exports = baseGetTag; /***/ }), -/* 503 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return formPropTypes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return fieldInputPropTypes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return fieldMetaPropTypes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return fieldPropTypes; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); +/* 493 */ +/***/ (function(module, exports, __webpack_require__) { +var freeGlobal = __webpack_require__(494); -var any = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any, - bool = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool, - func = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func, - shape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape, - string = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, - oneOfType = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType, - object = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object; +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); -var formPropTypes = { - // State: - anyTouched: bool.isRequired, // true if any of the fields have been marked as touched - asyncValidating: oneOfType([bool, string]).isRequired, // true if async validation is running, a string if a field triggered async validation - dirty: bool.isRequired, // true if any values are different from initialValues - error: any, // form-wide error from '_error' key in validation result - form: string.isRequired, // the name of the form - invalid: bool.isRequired, // true if there are any validation errors - initialized: bool.isRequired, // true if the form has been initialized - initialValues: object, // the initialValues object passed to reduxForm - pristine: bool.isRequired, // true if the values are the same as initialValues - pure: bool.isRequired, // if true, implements shouldComponentUpdate - submitting: bool.isRequired, // true if the form is in the process of being submitted - submitFailed: bool.isRequired, // true if the form was submitted and failed for any reason - submitSucceeded: bool.isRequired, // true if the form was successfully submitted - valid: bool.isRequired, // true if there are no validation errors - warning: any, // form-wide warning from '_warning' key in validation result - // Actions: - array: shape({ - insert: func.isRequired, // function to insert a value into an array field - move: func.isRequired, // function to move a value within an array field - pop: func.isRequired, // function to pop a value off of an array field - push: func.isRequired, // function to push a value onto an array field - remove: func.isRequired, // function to remove a value from an array field - removeAll: func.isRequired, // function to remove all the values from an array field - shift: func.isRequired, // function to shift a value out of an array field - splice: func.isRequired, // function to splice a value into an array field - swap: func.isRequired, // function to swap values in an array field - unshift: func.isRequired // function to unshift a value into an array field - }), - asyncValidate: func.isRequired, // function to trigger async validation - autofill: func.isRequired, // action to set a value of a field and mark it as autofilled - blur: func.isRequired, // action to mark a field as blurred - change: func.isRequired, // action to change the value of a field - clearAsyncError: func.isRequired, // action to clear the async error of a field - destroy: func.isRequired, // action to destroy the form's data in Redux - dispatch: func.isRequired, // the Redux dispatch action - handleSubmit: func.isRequired, // function to submit the form - initialize: func.isRequired, // action to initialize form data - reset: func.isRequired, // action to reset the form data to previously initialized values - touch: func.isRequired, // action to mark fields as touched - submit: func.isRequired, // action to trigger a submission of the specified form - untouch: func.isRequired, // action to mark fields as untouched +module.exports = root; - // triggerSubmit - triggerSubmit: bool, // if true, submits the form on componentWillReceiveProps - clearSubmit: func.isRequired // called before a triggered submit, by default clears triggerSubmit -}; -var fieldInputPropTypes = { - checked: bool, - name: string.isRequired, - onBlur: func.isRequired, - onChange: func.isRequired, - onDragStart: func.isRequired, - onDrop: func.isRequired, - onFocus: func.isRequired, - value: any -}; +/***/ }), +/* 494 */ +/***/ (function(module, exports, __webpack_require__) { -var fieldMetaPropTypes = { - active: bool.isRequired, - asyncValidating: bool.isRequired, - autofilled: bool.isRequired, - dirty: bool.isRequired, - dispatch: func.isRequired, - error: string, - form: string.isRequired, - invalid: bool.isRequired, - pristine: bool.isRequired, - submitting: bool.isRequired, - submitFailed: bool.isRequired, - touched: bool.isRequired, - valid: bool.isRequired, - visited: bool.isRequired, - warning: string -}; +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; -var fieldPropTypes = { - input: shape(fieldInputPropTypes).isRequired, - meta: shape(fieldMetaPropTypes).isRequired, - custom: object.isRequired -}; +module.exports = freeGlobal; -/* harmony default export */ __webpack_exports__["a"] = (formPropTypes); +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(49))) /***/ }), -/* 504 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createField__ = __webpack_require__(505); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); - +/* 495 */ +/***/ (function(module, exports, __webpack_require__) { +var Symbol = __webpack_require__(260); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createField__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +/** Used for built-in method references. */ +var objectProto = Object.prototype; -/***/ }), -/* 505 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(82); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConnectedField__ = __webpack_require__(506); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__ = __webpack_require__(276); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_prefixName__ = __webpack_require__(85); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} +module.exports = getRawTag; +/***/ }), +/* 496 */ +/***/ (function(module, exports) { +/** Used for built-in method references. */ +var objectProto = Object.prototype; +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} +module.exports = objectToString; -var createField = function createField(_ref) { - var deepEqual = _ref.deepEqual, - getIn = _ref.getIn, - setIn = _ref.setIn, - toJS = _ref.toJS; - var ConnectedField = Object(__WEBPACK_IMPORTED_MODULE_3__ConnectedField__["a" /* default */])({ - deepEqual: deepEqual, - getIn: getIn, - toJS: toJS - }); +/***/ }), +/* 497 */ +/***/ (function(module, exports, __webpack_require__) { - var Field = function (_Component) { - _inherits(Field, _Component); +var overArg = __webpack_require__(498); - function Field(props, context) { - _classCallCheck(this, Field); +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); - var _this = _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).call(this, props, context)); +module.exports = getPrototype; - if (!context._reduxForm) { - throw new Error('Field must be inside a component decorated with reduxForm()'); - } - _this.normalize = _this.normalize.bind(_this); - return _this; - } +/***/ }), +/* 498 */ +/***/ (function(module, exports) { - _createClass(Field, [{ - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return Object(__WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__["a" /* default */])(this, nextProps, nextState); - } - }, { - key: 'componentWillMount', - value: function componentWillMount() { - var _this2 = this; +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} - this.context._reduxForm.register(this.name, 'Field', function () { - return _this2.props.validate; - }, function () { - return _this2.props.warn; - }); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (this.props.name !== nextProps.name) { - // unregister old name - this.context._reduxForm.unregister(this.name - // register new name - );this.context._reduxForm.register(Object(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */])(this.context, nextProps.name), 'Field'); - } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.context._reduxForm.unregister(this.name); - } - }, { - key: 'getRenderedComponent', - value: function getRenderedComponent() { - __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Field'); - return this.refs.connected.getWrappedInstance().getRenderedComponent(); - } - }, { - key: 'normalize', - value: function normalize(name, value) { - var normalize = this.props.normalize; +module.exports = overArg; - if (!normalize) { - return value; - } - var previousValues = this.context._reduxForm.getValues(); - var previousValue = this.value; - var nextValues = setIn(previousValues, name, value); - return normalize(value, previousValue, nextValues, previousValues); - } - }, { - key: 'render', - value: function render() { - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(ConnectedField, _extends({}, this.props, { - name: this.name, - normalize: this.normalize, - _reduxForm: this.context._reduxForm, - ref: 'connected' - })); - } - }, { - key: 'name', - get: function get() { - return Object(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */])(this.context, this.props.name); - } - }, { - key: 'dirty', - get: function get() { - return !this.pristine; - } - }, { - key: 'pristine', - get: function get() { - return this.refs.connected.getWrappedInstance().isPristine(); - } - }, { - key: 'value', - get: function get() { - return this.refs.connected && this.refs.connected.getWrappedInstance().getValue(); - } - }]); - return Field; - }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); +/***/ }), +/* 499 */ +/***/ (function(module, exports) { - Field.propTypes = { - name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired, - component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired, - format: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - normalize: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - onBlur: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - onChange: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - onFocus: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - onDragStart: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - onDrop: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - parse: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, - validate: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]), - warn: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]), - withRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool - }; - Field.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object - }; +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} - return Field; -}; +module.exports = isObjectLike; -/* harmony default export */ __webpack_exports__["a"] = (createField); /***/ }), -/* 506 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 500 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createFieldProps__ = __webpack_require__(264); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(265); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__ = __webpack_require__(509); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__structure_plain__ = __webpack_require__(13); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +/* WEBPACK VAR INJECTION */(function(process) { -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; +var _extends2 = __webpack_require__(8); -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } +var _extends3 = _interopRequireDefault(_extends2); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +var _objectWithoutProperties2 = __webpack_require__(9); -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +var _getPrototypeOf = __webpack_require__(4); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _classCallCheck2 = __webpack_require__(2); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var _createClass2 = __webpack_require__(3); +var _createClass3 = _interopRequireDefault(_createClass2); +var _possibleConstructorReturn2 = __webpack_require__(5); +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); +var _inherits2 = __webpack_require__(6); -var propsToNotUpdateFor = ['_reduxForm']; +var _inherits3 = _interopRequireDefault(_inherits2); -var isObject = function isObject(entity) { - return entity && (typeof entity === 'undefined' ? 'undefined' : _typeof(entity)) === 'object'; -}; +var _simpleAssign = __webpack_require__(7); -var isFunction = function isFunction(entity) { - return entity && typeof entity === 'function'; -}; +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -var eventPreventDefault = function eventPreventDefault(event) { - if (isObject(event) && isFunction(event.preventDefault)) { - event.preventDefault(); - } -}; +var _react = __webpack_require__(1); -var eventDataTransferGetData = function eventDataTransferGetData(event, key) { - if (isObject(event) && isObject(event.dataTransfer) && isFunction(event.dataTransfer.getData)) { - return event.dataTransfer.getData(key); - } -}; +var _react2 = _interopRequireDefault(_react); -var eventDataTransferSetData = function eventDataTransferSetData(event, key, value) { - if (isObject(event) && isObject(event.dataTransfer) && isFunction(event.dataTransfer.setData)) { - event.dataTransfer.setData(key, value); - } -}; +var _transitions = __webpack_require__(12); -var createConnectedField = function createConnectedField(_ref) { - var deepEqual = _ref.deepEqual, - getIn = _ref.getIn, - toJS = _ref.toJS; +var _transitions2 = _interopRequireDefault(_transitions); - var getSyncError = function getSyncError(syncErrors, name) { - var error = __WEBPACK_IMPORTED_MODULE_6__structure_plain__["a" /* default */].getIn(syncErrors, name - // Because the error for this field might not be at a level in the error structure where - // it can be set directly, it might need to be unwrapped from the _error property - );return error && error._error ? error._error : error; - }; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var getSyncWarning = function getSyncWarning(syncWarnings, name) { - var warning = getIn(syncWarnings, name - // Because the warning for this field might not be at a level in the warning structure where - // it can be set directly, it might need to be unwrapped from the _warning property - );return warning && warning._warning ? warning._warning : warning; +function getStyles(props, context, state) { + var color = props.color, + hoverColor = props.hoverColor; + var baseTheme = context.muiTheme.baseTheme; + + var offColor = color || baseTheme.palette.textColor; + var onColor = hoverColor || offColor; + + return { + root: { + color: state.hovered ? onColor : offColor, + position: 'relative', + fontSize: baseTheme.spacing.iconSize, + display: 'inline-block', + userSelect: 'none', + transition: _transitions2.default.easeOut() + } }; +} - var ConnectedField = function (_Component) { - _inherits(ConnectedField, _Component); +var FontIcon = function (_Component) { + (0, _inherits3.default)(FontIcon, _Component); - function ConnectedField(props) { - _classCallCheck(this, ConnectedField); + function FontIcon() { + var _ref; - var _this = _possibleConstructorReturn(this, (ConnectedField.__proto__ || Object.getPrototypeOf(ConnectedField)).call(this, props)); + var _temp, _this, _ret; - _this.handleChange = _this.handleChange.bind(_this); - _this.handleFocus = _this.handleFocus.bind(_this); - _this.handleBlur = _this.handleBlur.bind(_this); - _this.handleDragStart = _this.handleDragStart.bind(_this); - _this.handleDrop = _this.handleDrop.bind(_this); - return _this; - } + (0, _classCallCheck3.default)(this, FontIcon); - _createClass(ConnectedField, [{ - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps) { - var _this2 = this; + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - var nextPropsKeys = Object.keys(nextProps); - var thisPropsKeys = Object.keys(this.props); - return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { - return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); - }); - } - }, { - key: 'isPristine', - value: function isPristine() { - return this.props.pristine; + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FontIcon.__proto__ || (0, _getPrototypeOf2.default)(FontIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.handleMouseLeave = function (event) { + // hover is needed only when a hoverColor is defined + if (_this.props.hoverColor !== undefined) { + _this.setState({ hovered: false }); } - }, { - key: 'getValue', - value: function getValue() { - return this.props.value; + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); } - }, { - key: 'getRenderedComponent', - value: function getRenderedComponent() { - return this.refs.renderedComponent; + }, _this.handleMouseEnter = function (event) { + // hover is needed only when a hoverColor is defined + if (_this.props.hoverColor !== undefined) { + _this.setState({ hovered: true }); } - }, { - key: 'handleChange', - value: function handleChange(event) { - var _props = this.props, - name = _props.name, - dispatch = _props.dispatch, - parse = _props.parse, - normalize = _props.normalize, - onChange = _props.onChange, - _reduxForm = _props._reduxForm, - previousValue = _props.value; - - var newValue = Object(__WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize }); - - var defaultPrevented = false; - if (onChange) { - onChange(_extends({}, event, { - preventDefault: function preventDefault() { - defaultPrevented = true; - return eventPreventDefault(event); - } - }), newValue, previousValue); - } - if (!defaultPrevented) { - // dispatch change action - dispatch(_reduxForm.change(name, newValue)); - } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); } - }, { - key: 'handleFocus', - value: function handleFocus(event) { - var _props2 = this.props, - name = _props2.name, - dispatch = _props2.dispatch, - onFocus = _props2.onFocus, - _reduxForm = _props2._reduxForm; - + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } - var defaultPrevented = false; - if (onFocus) { - onFocus(_extends({}, event, { - preventDefault: function preventDefault() { - defaultPrevented = true; - return eventPreventDefault(event); - } - })); - } + (0, _createClass3.default)(FontIcon, [{ + key: 'render', + value: function render() { + var _props = this.props, + hoverColor = _props.hoverColor, + onMouseLeave = _props.onMouseLeave, + onMouseEnter = _props.onMouseEnter, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['hoverColor', 'onMouseLeave', 'onMouseEnter', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; - if (!defaultPrevented) { - dispatch(_reduxForm.focus(name)); - } - } - }, { - key: 'handleBlur', - value: function handleBlur(event) { - var _props3 = this.props, - name = _props3.name, - dispatch = _props3.dispatch, - parse = _props3.parse, - normalize = _props3.normalize, - onBlur = _props3.onBlur, - _reduxForm = _props3._reduxForm, - _value = _props3._value, - previousValue = _props3.value; + var styles = getStyles(this.props, this.context, this.state); - var newValue = Object(__WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize } + return _react2.default.createElement('span', (0, _extends3.default)({}, other, { + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + })); + } + }]); + return FontIcon; +}(_react.Component); - // for checkbox and radio, if the value property of checkbox or radio equals - // the value passed by blur event, then fire blur action with previousValue. - );if (newValue === _value && _value !== undefined) { - newValue = previousValue; - } +FontIcon.muiName = 'FontIcon'; +FontIcon.defaultProps = { + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {} +}; +FontIcon.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? FontIcon.propTypes = { + /** + * This is the font color of the font icon. If not specified, + * this component will default to muiTheme.palette.textColor. + */ + color: _react.PropTypes.string, + /** + * This is the icon color when the mouse hovers over the icon. + */ + hoverColor: _react.PropTypes.string, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = FontIcon; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - var defaultPrevented = false; - if (onBlur) { - onBlur(_extends({}, event, { - preventDefault: function preventDefault() { - defaultPrevented = true; - return eventPreventDefault(event); - } - }), newValue, previousValue); - } +/***/ }), +/* 501 */ +/***/ (function(module, exports, __webpack_require__) { - if (!defaultPrevented) { - // dispatch blur action - dispatch(_reduxForm.blur(name, newValue) +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { - // call post-blur callback - );if (_reduxForm.asyncValidate) { - _reduxForm.asyncValidate(name, newValue); - } - } - } - }, { - key: 'handleDragStart', - value: function handleDragStart(event) { - var _props4 = this.props, - onDragStart = _props4.onDragStart, - value = _props4.value; +Object.defineProperty(exports, "__esModule", { + value: true +}); - eventDataTransferSetData(event, __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */], value == null ? '' : value); +var _extends2 = __webpack_require__(8); - if (onDragStart) { - onDragStart(event); - } - } - }, { - key: 'handleDrop', - value: function handleDrop(event) { - var _props5 = this.props, - name = _props5.name, - dispatch = _props5.dispatch, - onDrop = _props5.onDrop, - _reduxForm = _props5._reduxForm, - previousValue = _props5.value; +var _extends3 = _interopRequireDefault(_extends2); - var newValue = eventDataTransferGetData(event, __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */]); +var _objectWithoutProperties2 = __webpack_require__(9); - var defaultPrevented = false; - if (onDrop) { - onDrop(_extends({}, event, { - preventDefault: function preventDefault() { - defaultPrevented = true; - return eventPreventDefault(event); - } - }), newValue, previousValue); - } +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - if (!defaultPrevented) { - // dispatch change action - dispatch(_reduxForm.change(name, newValue)); - eventPreventDefault(event); - } - } - }, { - key: 'render', - value: function render() { - var _props6 = this.props, - component = _props6.component, - withRef = _props6.withRef, - name = _props6.name, - _reduxForm = _props6._reduxForm, - normalize = _props6.normalize, - onBlur = _props6.onBlur, - onChange = _props6.onChange, - onFocus = _props6.onFocus, - onDragStart = _props6.onDragStart, - onDrop = _props6.onDrop, - rest = _objectWithoutProperties(_props6, ['component', 'withRef', 'name', '_reduxForm', 'normalize', 'onBlur', 'onChange', 'onFocus', 'onDragStart', 'onDrop']); +var _getPrototypeOf = __webpack_require__(4); - var _createFieldProps = Object(__WEBPACK_IMPORTED_MODULE_3__createFieldProps__["a" /* default */])({ getIn: getIn, toJS: toJS }, name, _extends({}, rest, { - form: _reduxForm.form, - onBlur: this.handleBlur, - onChange: this.handleChange, - onDrop: this.handleDrop, - onDragStart: this.handleDragStart, - onFocus: this.handleFocus - })), - custom = _createFieldProps.custom, - props = _objectWithoutProperties(_createFieldProps, ['custom']); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - if (withRef) { - custom.ref = 'renderedComponent'; - } - if (typeof component === 'string') { - var input = props.input, - meta = props.meta; // eslint-disable-line no-unused-vars - // flatten input into other props +var _classCallCheck2 = __webpack_require__(2); - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, input, custom)); - } else { - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, props, custom)); - } - } - }]); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - return ConnectedField; - }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); +var _createClass2 = __webpack_require__(3); - ConnectedField.propTypes = { - component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired, - props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object - }; +var _createClass3 = _interopRequireDefault(_createClass2); - var connector = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(function (state, ownProps) { - var name = ownProps.name, - _ownProps$_reduxForm = ownProps._reduxForm, - initialValues = _ownProps$_reduxForm.initialValues, - getFormState = _ownProps$_reduxForm.getFormState; +var _possibleConstructorReturn2 = __webpack_require__(5); - var formState = getFormState(state); - var initialState = getIn(formState, 'initial.' + name); - var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); - var value = getIn(formState, 'values.' + name); - var submitting = getIn(formState, 'submitting'); - var syncError = getSyncError(getIn(formState, 'syncErrors'), name); - var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); - var pristine = deepEqual(value, initial); - return { - asyncError: getIn(formState, 'asyncErrors.' + name), - asyncValidating: getIn(formState, 'asyncValidating') === name, - dirty: !pristine, - pristine: pristine, - state: getIn(formState, 'fields.' + name), - submitError: getIn(formState, 'submitErrors.' + name), - submitFailed: getIn(formState, 'submitFailed'), - submitting: submitting, - syncError: syncError, - syncWarning: syncWarning, - initial: initial, - value: value, - _value: ownProps.value // save value passed in (for checkboxes) - }; - }, undefined, undefined, { withRef: true }); - return connector(ConnectedField); -}; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -/* harmony default export */ __webpack_exports__["a"] = (createConnectedField); +var _inherits2 = __webpack_require__(6); -/***/ }), -/* 507 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _inherits3 = _interopRequireDefault(_inherits2); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(266); +var _simpleAssign = __webpack_require__(7); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -var getSelectedValues = function getSelectedValues(options) { - var result = []; - if (options) { - for (var index = 0; index < options.length; index++) { - var option = options[index]; - if (option.selected) { - result.push(option.value); - } - } - } - return result; -}; +var _react = __webpack_require__(1); -var getValue = function getValue(event, isReactNative) { - if (Object(__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */])(event)) { - if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) { - return event.nativeEvent.text; - } - if (isReactNative && event.nativeEvent !== undefined) { - return event.nativeEvent.text; - } - var _event$target = event.target, - type = _event$target.type, - value = _event$target.value, - checked = _event$target.checked, - files = _event$target.files, - dataTransfer = event.dataTransfer; +var _react2 = _interopRequireDefault(_react); - if (type === 'checkbox') { - return checked || ''; - } - if (type === 'file') { - return files || dataTransfer && dataTransfer.files; - } - if (type === 'select-multiple') { - return getSelectedValues(event.target.options); - } - return value; - } - return event; -}; +var _transitions = __webpack_require__(12); -/* harmony default export */ __webpack_exports__["a"] = (getValue); +var _transitions2 = _interopRequireDefault(_transitions); -/***/ }), -/* 508 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _propTypes = __webpack_require__(46); -"use strict"; -var isReactNative = typeof window !== 'undefined' && window.navigator && window.navigator.product && window.navigator.product === 'ReactNative'; +var _propTypes2 = _interopRequireDefault(_propTypes); -/* harmony default export */ __webpack_exports__["a"] = (isReactNative); +var _EnhancedButton = __webpack_require__(44); -/***/ }), -/* 509 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dataKey; }); -var dataKey = 'text'; +var _FontIcon = __webpack_require__(262); -/***/ }), -/* 510 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _FontIcon2 = _interopRequireDefault(_FontIcon); -"use strict"; -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } +var _Tooltip = __webpack_require__(263); -var splice = function splice(array, index, removeNum, value) { - array = array || []; +var _Tooltip2 = _interopRequireDefault(_Tooltip); - if (index < array.length) { - if (value === undefined && !removeNum) { - // inserting undefined - var _copy2 = [].concat(_toConsumableArray(array)); - _copy2.splice(index, 0, null); - _copy2[index] = undefined; - return _copy2; - } - if (value != null) { - var _copy3 = [].concat(_toConsumableArray(array)); - _copy3.splice(index, removeNum, value // removing and adding - );return _copy3; - } - var _copy = [].concat(_toConsumableArray(array)); - _copy.splice(index, removeNum // removing - );return _copy; - } - if (removeNum) { - // trying to remove non-existant item: return original array - return array; - } - // trying to add outside of range: just set value - var copy = [].concat(_toConsumableArray(array)); - copy[index] = value; - return copy; -}; +var _childUtils = __webpack_require__(100); -/* harmony default export */ __webpack_exports__["a"] = (splice); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/***/ }), -/* 511 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function getStyles(props, context) { + var baseTheme = context.muiTheme.baseTheme; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(110); + return { + root: { + boxSizing: 'border-box', + overflow: 'visible', + transition: _transitions2.default.easeOut(), + padding: baseTheme.spacing.iconSize / 2, + width: baseTheme.spacing.iconSize * 2, + height: baseTheme.spacing.iconSize * 2, + fontSize: 0 + }, + tooltip: { + boxSizing: 'border-box' + }, + disabled: { + color: baseTheme.palette.disabledColor, + fill: baseTheme.palette.disabledColor, + cursor: 'not-allowed' + } + }; +} +var IconButton = function (_Component) { + (0, _inherits3.default)(IconButton, _Component); -var getIn = function getIn(state, field) { - if (!state) { - return state; - } + function IconButton() { + var _ref; - var path = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(field); - var length = path.length; - if (!length) { - return undefined; - } + var _temp, _this, _ret; - var result = state; - for (var i = 0; i < length && !!result; ++i) { - result = result[path[i]]; - } + (0, _classCallCheck3.default)(this, IconButton); - return result; -}; + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -/* harmony default export */ __webpack_exports__["a"] = (getIn); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = IconButton.__proto__ || (0, _getPrototypeOf2.default)(IconButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + // Not to be confonded with the touch property. + // This state is to determined if it's a mobile device. + touch: false, + tooltipShown: false + }, _this.handleBlur = function (event) { + _this.hideTooltip(); + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleFocus = function (event) { + _this.showTooltip(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleMouseLeave = function (event) { + if (!_this.button.isKeyboardFocused()) { + _this.hideTooltip(); + } + _this.setState({ hovered: false }); + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseOut = function (event) { + if (_this.props.disabled) _this.hideTooltip(); + if (_this.props.onMouseOut) _this.props.onMouseOut(event); + }, _this.handleMouseEnter = function (event) { + _this.showTooltip(); -/***/ }), -/* 512 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // Cancel hover styles for touch devices + if (!_this.state.touch) { + _this.setState({ hovered: true }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoize_js__ = __webpack_require__(513); + if (_this.props.onTouchStart) { + _this.props.onTouchStart(event); + } + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + var _this$props = _this.props, + disabled = _this$props.disabled, + onFocus = _this$props.onFocus, + onBlur = _this$props.onBlur, + onKeyboardFocus = _this$props.onKeyboardFocus; + if (isKeyboardFocused && !disabled) { + _this.showTooltip(); + if (onFocus) { + onFocus(event); + } + } else { + _this.hideTooltip(); + if (onBlur) { + onBlur(event); + } + } -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + if (onKeyboardFocus) { + onKeyboardFocus(event, isKeyboardFocused); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = Object(__WEBPACK_IMPORTED_MODULE_0__memoize_js__["a" /* default */])(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); + (0, _createClass3.default)(IconButton, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.disabled) { + this.setState({ hovered: false }); + } } - return key; - }); - - var cache = result.cache; - return result; -} - -/* harmony default export */ __webpack_exports__["a"] = (memoizeCapped); - - -/***/ }), -/* 513 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(164); - - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); + }, { + key: 'setKeyboardFocus', + value: function setKeyboardFocus() { + this.button.setKeyboardFocus(); } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]); - return memoized; -} - -// Expose `MapCache`. -memoize.Cache = __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; - -/* harmony default export */ __webpack_exports__["a"] = (memoize); - - -/***/ }), -/* 514 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Hash_js__ = __webpack_require__(515); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ListCache_js__ = __webpack_require__(113); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Map_js__ = __webpack_require__(166); - - - - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new __WEBPACK_IMPORTED_MODULE_0__Hash_js__["a" /* default */], - 'map': new (__WEBPACK_IMPORTED_MODULE_2__Map_js__["a" /* default */] || __WEBPACK_IMPORTED_MODULE_1__ListCache_js__["a" /* default */]), - 'string': new __WEBPACK_IMPORTED_MODULE_0__Hash_js__["a" /* default */] - }; -} - -/* harmony default export */ __webpack_exports__["a"] = (mapCacheClear); - - -/***/ }), -/* 515 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hashClear_js__ = __webpack_require__(516); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__ = __webpack_require__(521); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hashGet_js__ = __webpack_require__(522); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__hashHas_js__ = __webpack_require__(523); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__hashSet_js__ = __webpack_require__(524); - - - - - - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `Hash`. -Hash.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__hashClear_js__["a" /* default */]; -Hash.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__["a" /* default */]; -Hash.prototype.get = __WEBPACK_IMPORTED_MODULE_2__hashGet_js__["a" /* default */]; -Hash.prototype.has = __WEBPACK_IMPORTED_MODULE_3__hashHas_js__["a" /* default */]; -Hash.prototype.set = __WEBPACK_IMPORTED_MODULE_4__hashSet_js__["a" /* default */]; - -/* harmony default export */ __webpack_exports__["a"] = (Hash); - - -/***/ }), -/* 516 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(112); - - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? Object(__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */])(null) : {}; - this.size = 0; -} - -/* harmony default export */ __webpack_exports__["a"] = (hashClear); - - -/***/ }), -/* 517 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(165); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isMasked_js__ = __webpack_require__(518); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(45); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toSource_js__ = __webpack_require__(270); - + }, { + key: 'showTooltip', + value: function showTooltip() { + if (this.props.tooltip) { + this.setState({ tooltipShown: true }); + } + } + }, { + key: 'hideTooltip', + value: function hideTooltip() { + if (this.props.tooltip) this.setState({ tooltipShown: false }); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + var _props = this.props, + disabled = _props.disabled, + hoveredStyle = _props.hoveredStyle, + disableTouchRipple = _props.disableTouchRipple, + children = _props.children, + iconClassName = _props.iconClassName, + style = _props.style, + tooltip = _props.tooltip, + tooltipPositionProp = _props.tooltipPosition, + tooltipStyles = _props.tooltipStyles, + touch = _props.touch, + iconStyle = _props.iconStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['disabled', 'hoveredStyle', 'disableTouchRipple', 'children', 'iconClassName', 'style', 'tooltip', 'tooltipPosition', 'tooltipStyles', 'touch', 'iconStyle']); + var fonticon = void 0; + var styles = getStyles(this.props, this.context); + var tooltipPosition = tooltipPositionProp.split('-'); -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled; -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; + var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style, hovered ? hoveredStyle : {}); -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; + var tooltipElement = tooltip ? _react2.default.createElement(_Tooltip2.default, { + label: tooltip, + show: this.state.tooltipShown, + touch: touch, + style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyles), + verticalPosition: tooltipPosition[0], + horizontalPosition: tooltipPosition[1] + }) : null; -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; + if (iconClassName) { + var iconHoverColor = iconStyle.iconHoverColor, + iconStyleFontIcon = (0, _objectWithoutProperties3.default)(iconStyle, ['iconHoverColor']); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); + fonticon = _react2.default.createElement( + _FontIcon2.default, + { + className: iconClassName, + hoverColor: disabled ? null : iconHoverColor, + style: (0, _simpleAssign2.default)({}, disabled && styles.disabled, iconStyleFontIcon), + color: this.context.muiTheme.baseTheme.palette.textColor + }, + children + ); + } -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!Object(__WEBPACK_IMPORTED_MODULE_2__isObject_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_1__isMasked_js__["a" /* default */])(value)) { - return false; - } - var pattern = Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(value) ? reIsNative : reIsHostCtor; - return pattern.test(Object(__WEBPACK_IMPORTED_MODULE_3__toSource_js__["a" /* default */])(value)); -} + var childrenStyle = disabled ? (0, _simpleAssign2.default)({}, iconStyle, styles.disabled) : iconStyle; -/* harmony default export */ __webpack_exports__["a"] = (baseIsNative); + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({ + ref: function ref(_ref2) { + return _this2.button = _ref2; + } + }, other, { + centerRipple: true, + disabled: disabled, + onTouchStart: this.handleTouchStart, + style: mergedRootStyles, + disableTouchRipple: disableTouchRipple, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onMouseOut: this.handleMouseOut, + onKeyboardFocus: this.handleKeyboardFocus + }), + tooltipElement, + fonticon, + (0, _childUtils.extendChildren)(children, { + style: childrenStyle + }) + ); + } + }]); + return IconButton; +}(_react.Component); +IconButton.muiName = 'IconButton'; +IconButton.defaultProps = { + disabled: false, + disableTouchRipple: false, + iconStyle: {}, + tooltipPosition: 'bottom-center', + touch: false +}; +IconButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? IconButton.propTypes = { + /** + * Can be used to pass a `FontIcon` element as the icon for the button. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the element's ripple effect will be disabled. + */ + disableTouchRipple: _react.PropTypes.bool, + /** + * If true, the element will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element when the component is hovered. + */ + hoveredStyle: _react.PropTypes.object, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * The CSS class name of the icon. Used for setting the icon with a stylesheet. + */ + iconClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the icon element. + * Note: you can specify iconHoverColor as a String inside this object. + */ + iconStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Callback function fired when the element is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the element. + * @param {boolean} keyboardFocused Indicates whether the element is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onMouseOut: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The text to supply to the element's tooltip. + */ + tooltip: _react.PropTypes.node, + /** + * The vertical and horizontal positions, respectively, of the element's tooltip. + * Possible values are: "bottom-center", "top-center", "bottom-right", "top-right", + * "bottom-left", and "top-left". + */ + tooltipPosition: _propTypes2.default.cornersAndCenter, + /** + * Override the inline-styles of the tooltip element. + */ + tooltipStyles: _react.PropTypes.object, + /** + * If true, increase the tooltip element's size. Useful for increasing tooltip + * readability on mobile devices. + */ + touch: _react.PropTypes.bool +} : void 0; +exports.default = IconButton; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 518 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 502 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__ = __webpack_require__(519); - - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(__WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */].keys && __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */].keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} - -/* harmony default export */ __webpack_exports__["a"] = (isMasked); -/***/ }), -/* 519 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +Object.defineProperty(exports, "__esModule", { + value: true +}); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(34); +var _react = __webpack_require__(1); +var _react2 = _interopRequireDefault(_react); -/** Used to detect overreaching core-js shims. */ -var coreJsData = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */]['__core-js_shared__']; +var _reduxForm = __webpack_require__(110); -/* harmony default export */ __webpack_exports__["a"] = (coreJsData); +var _reactRedux = __webpack_require__(28); +var _MenuItem = __webpack_require__(87); -/***/ }), -/* 520 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _MenuItem2 = _interopRequireDefault(_MenuItem); -"use strict"; -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} +var _RaisedButton = __webpack_require__(88); -/* harmony default export */ __webpack_exports__["a"] = (getValue); +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); +var _reduxFormMaterialUi = __webpack_require__(121); -/***/ }), -/* 521 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _Styles = __webpack_require__(91); -"use strict"; -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; -} +var _Styles2 = _interopRequireDefault(_Styles); -/* harmony default export */ __webpack_exports__["a"] = (hashDelete); +var _Utils = __webpack_require__(195); +var Utils = _interopRequireWildcard(_Utils); -/***/ }), -/* 522 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _FormValidators = __webpack_require__(124); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(112); +var Validators = _interopRequireWildcard(_FormValidators); +var _Menus = __webpack_require__(84); -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; +var menus = _interopRequireWildcard(_Menus); -/** Used for built-in method references. */ -var objectProto = Object.prototype; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */]) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; +function getStatesForCountry(country) { + switch (country) { + case 'USA': + return Utils.usaRegions; + case 'JAPAN': + return Utils.japanRegions; + case 'CANADA': + return Utils.canadaRegions; + default: + return []; } - return hasOwnProperty.call(data, key) ? data[key] : undefined; } -/* harmony default export */ __webpack_exports__["a"] = (hashGet); - - -/***/ }), -/* 523 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(112); +var Billing = function Billing(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting, + country = props.country; + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'biling-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_name', + validate: Validators.fullName, + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Firstname and Lastname', + hintText: 'Firstname and Lastname', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_email', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Email', + hintText: 'Email', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.email] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_tel', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Phone number', + hintText: 'Phone number', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'bo', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Address', + hintText: 'Address', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_city', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'City', + hintText: 'City', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'order_billing_country', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Country', + hintText: 'Country', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.countries.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); + }) + ) + ), + ['JAPAN', 'USA', 'CANADA'].indexOf(country) !== -1 && _react2.default.createElement( + _reduxForm.Field, + { + name: 'order_billing_state', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'State', + hintText: 'State', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + getStatesForCountry(country).map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_zip', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Zip', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_type', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Credit card type', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + (country === 'JAPAN' ? Utils.japanCreditCards : Utils.creditCards).map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { value: x.value, primaryText: x.text, key: x.value }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'cnb', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Credit Card Number', + hintText: 'Credit Card Number', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_month', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Expiry month', + hintText: 'Expiry month', + validate: [Validators.required], + style: _Styles2.default.fields.text + }, + Array.apply(null, new Array(12)).map(function (x, i) { + var month = ++i < 10 ? '0' + i : i; + return _react2.default.createElement(_MenuItem2.default, { key: month, value: month, primaryText: month }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_year', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Expiry year', + hintText: 'Expiry year', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Array.apply(null, new Array(5)).map(function (x, i) { + var year = new Date().getFullYear() + i; + return _react2.default.createElement(_MenuItem2.default, { key: year, value: year, primaryText: year }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'vval', + component: _reduxFormMaterialUi.TextField, + hintText: 'CCV', + floatingLabelText: 'CCV', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; -/** Used for built-in method references. */ -var objectProto = Object.prototype; +var BillingForm = (0, _reduxForm.reduxForm)({ + form: 'billing' +})(Billing); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +Billing.propTypes = { + shop: _react.PropTypes.string.isRequired +}; +var selector = (0, _reduxForm.formValueSelector)('billing'); -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +function mapStateToProps(state, ownProps) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + initialValues: (settings[ownProps.shop] || {})[menus.MENU_BILLING] || {}, + country: selector(state, 'order_billing_country') + }; } -/* harmony default export */ __webpack_exports__["a"] = (hashHas); - +exports.default = (0, _reactRedux.connect)(mapStateToProps)(BillingForm); /***/ }), -/* 524 */ +/* 503 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(112); - - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] && value === undefined) ? HASH_UNDEFINED : value; - return this; -} +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reducer__ = __webpack_require__(504); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__reduxForm__ = __webpack_require__(530); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Field__ = __webpack_require__(616); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Fields__ = __webpack_require__(621); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__FieldArray__ = __webpack_require__(623); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__formValueSelector__ = __webpack_require__(626); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__values__ = __webpack_require__(627); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__selectors_getFormValues__ = __webpack_require__(628); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__selectors_getFormInitialValues__ = __webpack_require__(629); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__selectors_getFormSyncErrors__ = __webpack_require__(630); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__selectors_getFormAsyncErrors__ = __webpack_require__(631); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__selectors_getFormSubmitErrors__ = __webpack_require__(632); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__selectors_isDirty__ = __webpack_require__(633); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__selectors_isInvalid__ = __webpack_require__(634); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__selectors_isPristine__ = __webpack_require__(289); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__selectors_isValid__ = __webpack_require__(184); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__selectors_isSubmitting__ = __webpack_require__(635); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__selectors_hasSubmitSucceeded__ = __webpack_require__(636); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__selectors_hasSubmitFailed__ = __webpack_require__(637); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__Form__ = __webpack_require__(638); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__FormSection__ = __webpack_require__(639); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__SubmissionError__ = __webpack_require__(282); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__propTypes__ = __webpack_require__(640); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__actions__ = __webpack_require__(281); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__actionTypes__ = __webpack_require__(167); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -/* harmony default export */ __webpack_exports__["a"] = (hashSet); -/***/ }), -/* 525 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; - this.size = 0; -} -/* harmony default export */ __webpack_exports__["a"] = (listCacheClear); -/***/ }), -/* 526 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(114); -/** Used for built-in method references. */ -var arrayProto = Array.prototype; -/** Built-in value references. */ -var splice = arrayProto.splice; -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(data, key); - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; -} -/* harmony default export */ __webpack_exports__["a"] = (listCacheDelete); -/***/ }), -/* 527 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(114); -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(data, key); - return index < 0 ? undefined : data[index][1]; -} -/* harmony default export */ __webpack_exports__["a"] = (listCacheGet); -/***/ }), -/* 528 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(114); -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(this.__data__, key) > -1; -} -/* harmony default export */ __webpack_exports__["a"] = (listCacheHas); +var createAll = function createAll(structure) { + return _extends({ + // separate out field actions + actionTypes: __WEBPACK_IMPORTED_MODULE_24__actionTypes__ + }, __WEBPACK_IMPORTED_MODULE_23__actions__, { + Field: __WEBPACK_IMPORTED_MODULE_2__Field__["a" /* default */](structure), + Fields: __WEBPACK_IMPORTED_MODULE_3__Fields__["a" /* default */](structure), + FieldArray: __WEBPACK_IMPORTED_MODULE_4__FieldArray__["a" /* default */](structure), + Form: __WEBPACK_IMPORTED_MODULE_19__Form__["a" /* default */], + FormSection: __WEBPACK_IMPORTED_MODULE_20__FormSection__["a" /* default */], + formValueSelector: __WEBPACK_IMPORTED_MODULE_5__formValueSelector__["a" /* default */](structure), + getFormValues: __WEBPACK_IMPORTED_MODULE_7__selectors_getFormValues__["a" /* default */](structure), + getFormInitialValues: __WEBPACK_IMPORTED_MODULE_8__selectors_getFormInitialValues__["a" /* default */](structure), + getFormSyncErrors: __WEBPACK_IMPORTED_MODULE_9__selectors_getFormSyncErrors__["a" /* default */](structure), + getFormAsyncErrors: __WEBPACK_IMPORTED_MODULE_10__selectors_getFormAsyncErrors__["a" /* default */](structure), + getFormSubmitErrors: __WEBPACK_IMPORTED_MODULE_11__selectors_getFormSubmitErrors__["a" /* default */](structure), + isDirty: __WEBPACK_IMPORTED_MODULE_12__selectors_isDirty__["a" /* default */](structure), + isInvalid: __WEBPACK_IMPORTED_MODULE_13__selectors_isInvalid__["a" /* default */](structure), + isPristine: __WEBPACK_IMPORTED_MODULE_14__selectors_isPristine__["a" /* default */](structure), + isValid: __WEBPACK_IMPORTED_MODULE_15__selectors_isValid__["a" /* default */](structure), + isSubmitting: __WEBPACK_IMPORTED_MODULE_16__selectors_isSubmitting__["a" /* default */](structure), + hasSubmitSucceeded: __WEBPACK_IMPORTED_MODULE_17__selectors_hasSubmitSucceeded__["a" /* default */](structure), + hasSubmitFailed: __WEBPACK_IMPORTED_MODULE_18__selectors_hasSubmitFailed__["a" /* default */](structure), + propTypes: __WEBPACK_IMPORTED_MODULE_22__propTypes__["a" /* default */], + reduxForm: __WEBPACK_IMPORTED_MODULE_1__reduxForm__["a" /* default */](structure), + reducer: __WEBPACK_IMPORTED_MODULE_0__reducer__["a" /* default */](structure), + SubmissionError: __WEBPACK_IMPORTED_MODULE_21__SubmissionError__["a" /* default */], + values: __WEBPACK_IMPORTED_MODULE_6__values__["a" /* default */](structure) + }); +}; +/* harmony default export */ __webpack_exports__["a"] = (createAll); /***/ }), -/* 529 */ +/* 504 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(114); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(167); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__ = __webpack_require__(505); +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(data, key); - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} -/* harmony default export */ __webpack_exports__["a"] = (listCacheSet); +var createReducer = function createReducer(structure) { + var _behaviors; -/***/ }), -/* 530 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var deepEqual = structure.deepEqual, + empty = structure.empty, + getIn = structure.getIn, + setIn = structure.setIn, + deleteIn = structure.deleteIn, + fromJS = structure.fromJS, + keys = structure.keys, + size = structure.size, + splice = structure.splice; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(115); + var deleteInWithCleanUp = __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__["a" /* default */](structure); + var doSplice = function doSplice(state, key, field, index, removeNum, value, force) { + var existing = getIn(state, key + '.' + field); + return existing || force ? setIn(state, key + '.' + field, splice(existing, index, removeNum, value)) : state; + }; + var rootKeys = ['values', 'fields', 'submitErrors', 'asyncErrors']; + var arraySplice = function arraySplice(state, field, index, removeNum, value) { + var result = state; + var nonValuesValue = value != null ? empty : undefined; + result = doSplice(result, 'values', field, index, removeNum, value, true); + result = doSplice(result, 'fields', field, index, removeNum, nonValuesValue); + result = doSplice(result, 'submitErrors', field, index, removeNum, nonValuesValue); + result = doSplice(result, 'asyncErrors', field, index, removeNum, nonValuesValue); + return result; + }; + var behaviors = (_behaviors = {}, _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], function (state, _ref) { + var _ref$meta = _ref.meta, + field = _ref$meta.field, + index = _ref$meta.index, + payload = _ref.payload; -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - var result = Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; -} + return arraySplice(state, field, index, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], function (state, _ref2) { + var _ref2$meta = _ref2.meta, + field = _ref2$meta.field, + from = _ref2$meta.from, + to = _ref2$meta.to; -/* harmony default export */ __webpack_exports__["a"] = (mapCacheDelete); + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + var result = state; + if (length) { + rootKeys.forEach(function (key) { + var path = key + '.' + field; + if (getIn(result, path)) { + var value = getIn(result, path + '[' + from + ']'); + result = setIn(result, path, splice(getIn(result, path), from, 1)); // remove + result = setIn(result, path, splice(getIn(result, path), to, 0, value)); // insert + } + }); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], function (state, _ref3) { + var field = _ref3.meta.field; + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return length ? arraySplice(state, field, length - 1, 1) : state; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], function (state, _ref4) { + var field = _ref4.meta.field, + payload = _ref4.payload; -/***/ }), -/* 531 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return arraySplice(state, field, length, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], function (state, _ref5) { + var _ref5$meta = _ref5.meta, + field = _ref5$meta.field, + index = _ref5$meta.index; -"use strict"; -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} + return arraySplice(state, field, index, 1); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], function (state, _ref6) { + var field = _ref6.meta.field; -/* harmony default export */ __webpack_exports__["a"] = (isKeyable); + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return length ? arraySplice(state, field, 0, length) : state; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], function (state, _ref7) { + var field = _ref7.meta.field; + return arraySplice(state, field, 0, 1); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], function (state, _ref8) { + var _ref8$meta = _ref8.meta, + field = _ref8$meta.field, + index = _ref8$meta.index, + removeNum = _ref8$meta.removeNum, + payload = _ref8.payload; -/***/ }), -/* 532 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + return arraySplice(state, field, index, removeNum, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], function (state, _ref9) { + var _ref9$meta = _ref9.meta, + field = _ref9$meta.field, + indexA = _ref9$meta.indexA, + indexB = _ref9$meta.indexB; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(115); + var result = state; + rootKeys.forEach(function (key) { + var valueA = getIn(result, key + '.' + field + '[' + indexA + ']'); + var valueB = getIn(result, key + '.' + field + '[' + indexB + ']'); + if (valueA !== undefined || valueB !== undefined) { + result = setIn(result, key + '.' + field + '[' + indexA + ']', valueB); + result = setIn(result, key + '.' + field + '[' + indexB + ']', valueA); + } + }); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], function (state, _ref10) { + var field = _ref10.meta.field, + payload = _ref10.payload; + return arraySplice(state, field, 0, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], function (state, _ref11) { + var field = _ref11.meta.field, + payload = _ref11.payload; -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key).get(key); -} - -/* harmony default export */ __webpack_exports__["a"] = (mapCacheGet); - - -/***/ }), -/* 533 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(115); - - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key).has(key); -} - -/* harmony default export */ __webpack_exports__["a"] = (mapCacheHas); + var result = state; + result = deleteInWithCleanUp(result, 'asyncErrors.' + field); + result = deleteInWithCleanUp(result, 'submitErrors.' + field); + result = setIn(result, 'fields.' + field + '.autofilled', true); + result = setIn(result, 'values.' + field, payload); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], function (state, _ref12) { + var _ref12$meta = _ref12.meta, + field = _ref12$meta.field, + touch = _ref12$meta.touch, + payload = _ref12.payload; + var result = state; + var initial = getIn(result, 'initial.' + field); + if (initial === undefined && payload === '') { + result = deleteInWithCleanUp(result, 'values.' + field); + } else if (payload !== undefined) { + result = setIn(result, 'values.' + field, payload); + } + if (field === getIn(result, 'active')) { + result = deleteIn(result, 'active'); + } + result = deleteIn(result, 'fields.' + field + '.active'); + if (touch) { + result = setIn(result, 'fields.' + field + '.touched', true); + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], function (state, _ref13) { + var _ref13$meta = _ref13.meta, + field = _ref13$meta.field, + touch = _ref13$meta.touch, + persistentSubmitErrors = _ref13$meta.persistentSubmitErrors, + payload = _ref13.payload; -/***/ }), -/* 534 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var result = state; + var initial = getIn(result, 'initial.' + field); + if (initial === undefined && payload === '') { + result = deleteInWithCleanUp(result, 'values.' + field); + } else if (payload !== undefined) { + result = setIn(result, 'values.' + field, payload); + } + result = deleteInWithCleanUp(result, 'asyncErrors.' + field); + if (!persistentSubmitErrors) { + result = deleteInWithCleanUp(result, 'submitErrors.' + field); + } + result = deleteInWithCleanUp(result, 'fields.' + field + '.autofilled'); + if (touch) { + result = setIn(result, 'fields.' + field + '.touched', true); + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], function (state) { + return deleteIn(state, 'triggerSubmit'); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], function (state, _ref14) { + var field = _ref14.meta.field; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(115); + return deleteIn(state, 'asyncErrors.' + field); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], function (state, _ref15) { + var field = _ref15.meta.field; + var result = state; + var previouslyActive = getIn(state, 'active'); + result = deleteIn(result, 'fields.' + previouslyActive + '.active'); + result = setIn(result, 'fields.' + field + '.visited', true); + result = setIn(result, 'fields.' + field + '.active', true); + result = setIn(result, 'active', field); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], function (state, _ref16) { + var payload = _ref16.payload, + _ref16$meta = _ref16.meta, + keepDirty = _ref16$meta.keepDirty, + keepSubmitSucceeded = _ref16$meta.keepSubmitSucceeded; -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - var data = Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key), - size = data.size; + var mapData = fromJS(payload); + var result = empty; // clean all field state - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; -} + // persist old warnings, they will get recalculated if the new form values are different from the old values + var warning = getIn(state, 'warning'); + if (warning) { + result = setIn(result, 'warning', warning); + } + var syncWarnings = getIn(state, 'syncWarnings'); + if (syncWarnings) { + result = setIn(result, 'syncWarnings', syncWarnings); + } -/* harmony default export */ __webpack_exports__["a"] = (mapCacheSet); + // persist old errors, they will get recalculated if the new form values are different from the old values + var error = getIn(state, 'error'); + if (error) { + result = setIn(result, 'error', error); + } + var syncErrors = getIn(state, 'syncErrors'); + if (syncErrors) { + result = setIn(result, 'syncErrors', syncErrors); + } + var registeredFields = getIn(state, 'registeredFields'); + if (registeredFields) { + result = setIn(result, 'registeredFields', registeredFields); + } + var newValues = mapData; + if (keepDirty && registeredFields) { + (function () { + // + // Keep the value of dirty fields while updating the value of + // pristine fields. This way, apps can reinitialize forms while + // avoiding stomping on user edits. + // + // Note 1: The initialize action replaces all initial values + // regardless of keepDirty. + // + // Note 2: When a field is dirty, keepDirty is enabled, and the field + // value is the same as the new initial value for the field, the + // initialize action causes the field to become pristine. That effect + // is what we want. + // + var previousValues = getIn(state, 'values'); + var previousInitialValues = getIn(state, 'initial'); + keys(registeredFields).forEach(function (name) { + var previousInitialValue = getIn(previousInitialValues, name); + var previousValue = getIn(previousValues, name); + if (!deepEqual(previousValue, previousInitialValue)) { + // This field was dirty. Restore the dirty value. + newValues = setIn(newValues, name, previousValue); + } + }); + })(); + } + if (keepSubmitSucceeded && getIn(state, 'submitSucceeded')) { + result = setIn(result, 'submitSucceeded', true); + } + result = setIn(result, 'values', newValues); + result = setIn(result, 'initial', mapData); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], function (state, _ref17) { + var _ref17$payload = _ref17.payload, + name = _ref17$payload.name, + type = _ref17$payload.type; -/***/ }), -/* 535 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var key = 'registeredFields[\'' + name + '\']'; + var field = getIn(state, key); + if (field) { + var count = getIn(field, 'count') + 1; + field = setIn(field, 'count', count); + } else { + field = fromJS({ name: name, type: type, count: 1 }); + } + return setIn(state, key, field); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], function (state) { + var result = empty; + var registeredFields = getIn(state, 'registeredFields'); + if (registeredFields) { + result = setIn(result, 'registeredFields', registeredFields); + } + var values = getIn(state, 'initial'); + if (values) { + result = setIn(result, 'values', values); + result = setIn(result, 'initial', values); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], function (state) { + return setIn(state, 'triggerSubmit', true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], function (state, _ref18) { + var field = _ref18.meta.field; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(109); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(267); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(35); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(111); + return setIn(state, 'asyncValidating', field || true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], function (state) { + return setIn(state, 'submitting', true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], function (state, _ref19) { + var payload = _ref19.payload; + var result = state; + result = deleteIn(result, 'asyncValidating'); + if (payload && Object.keys(payload).length) { + var _error = payload._error, + fieldErrors = _objectWithoutProperties(payload, ['_error']); + if (_error) { + result = setIn(result, 'error', _error); + } + if (Object.keys(fieldErrors).length) { + result = setIn(result, 'asyncErrors', fromJS(fieldErrors)); + } else { + result = deleteIn(result, 'asyncErrors'); + } + } else { + result = deleteIn(result, 'error'); + result = deleteIn(result, 'asyncErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], function (state, _ref20) { + var payload = _ref20.payload; + var result = state; + result = deleteIn(result, 'submitting'); + result = deleteIn(result, 'submitFailed'); + result = deleteIn(result, 'submitSucceeded'); + if (payload && Object.keys(payload).length) { + var _error = payload._error, + fieldErrors = _objectWithoutProperties(payload, ['_error']); + if (_error) { + result = setIn(result, 'error', _error); + } else { + result = deleteIn(result, 'error'); + } + if (Object.keys(fieldErrors).length) { + result = setIn(result, 'submitErrors', fromJS(fieldErrors)); + } else { + result = deleteIn(result, 'submitErrors'); + } + result = setIn(result, 'submitFailed', true); + } else { + result = setIn(result, 'submitSucceeded', true); + result = deleteIn(result, 'error'); + result = deleteIn(result, 'submitErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], function (state, _ref21) { + var fields = _ref21.meta.fields; -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; + var result = state; + result = setIn(result, 'submitFailed', true); + result = deleteIn(result, 'submitSucceeded'); + result = deleteIn(result, 'submitting'); + fields.forEach(function (field) { + return result = setIn(result, 'fields.' + field + '.touched', true); + }); + if (fields.length) { + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], function (state) { + var result = state; + result = deleteIn(result, 'submitFailed'); + result = setIn(result, 'submitSucceeded', true); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], function (state, _ref22) { + var fields = _ref22.meta.fields; -/** Used to convert symbols to primitives and strings. */ -var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; + var result = state; + fields.forEach(function (field) { + return result = setIn(result, 'fields.' + field + '.touched', true); + }); + result = setIn(result, 'anyTouched', true); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], function (state, _ref23) { + var _ref23$payload = _ref23.payload, + name = _ref23$payload.name, + destroyOnUnmount = _ref23$payload.destroyOnUnmount; -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value)) { - // Recursively convert values (susceptible to call stack limits). - return Object(__WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */])(value, baseToString) + ''; - } - if (Object(__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */])(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} + var result = state; + var key = 'registeredFields[\'' + name + '\']'; + var field = getIn(result, key); + if (!field) { + return result; + } -/* harmony default export */ __webpack_exports__["a"] = (baseToString); + var count = getIn(field, 'count') - 1; + if (count <= 0 && destroyOnUnmount) { + result = deleteIn(result, key); + if (deepEqual(getIn(result, 'registeredFields'), empty)) { + result = deleteIn(result, 'registeredFields'); + } + } else { + field = setIn(field, 'count', count); + result = setIn(result, key, field); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], function (state, _ref24) { + var fields = _ref24.meta.fields; + var result = state; + fields.forEach(function (field) { + return result = deleteIn(result, 'fields.' + field + '.touched'); + }); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], function (state, _ref25) { + var _ref25$payload = _ref25.payload, + syncErrors = _ref25$payload.syncErrors, + error = _ref25$payload.error; -/***/ }), -/* 536 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var result = state; + if (error) { + result = setIn(result, 'error', error); + result = setIn(result, 'syncError', true); + } else { + result = deleteIn(result, 'error'); + result = deleteIn(result, 'syncError'); + } + if (Object.keys(syncErrors).length) { + result = setIn(result, 'syncErrors', syncErrors); + } else { + result = deleteIn(result, 'syncErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], function (state, _ref26) { + var _ref26$payload = _ref26.payload, + syncWarnings = _ref26$payload.syncWarnings, + warning = _ref26$payload.warning; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(110); + var result = state; + if (warning) { + result = setIn(result, 'warning', warning); + } else { + result = deleteIn(result, 'warning'); + } + if (Object.keys(syncWarnings).length) { + result = setIn(result, 'syncWarnings', syncWarnings); + } else { + result = deleteIn(result, 'syncWarnings'); + } + return result; + }), _behaviors); + var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments[1]; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + var behavior = behaviors[action.type]; + return behavior ? behavior(state, action) : state; + }; -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + var byForm = function byForm(reducer) { + return function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -var setInWithPath = function setInWithPath(state, value, path, pathIndex) { - if (pathIndex >= path.length) { - return value; - } + var form = action && action.meta && action.meta.form; + if (!form) { + return state; + } + if (action.type === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"]) { + return action.meta.form.reduce(function (result, form) { + return deleteInWithCleanUp(result, form); + }, state); + } + var formState = getIn(state, form); + var result = reducer(formState, action); + return result === formState ? state : setIn(state, form, result); + }; + }; - var first = path[pathIndex]; - var next = setInWithPath(state && state[first], value, path, pathIndex + 1); + /** + * Adds additional functionality to the reducer + */ + function decorate(target) { + target.plugin = function plugin(reducers) { + var _this = this; - if (!state) { - var initialized = isNaN(first) ? {} : []; - initialized[first] = next; - return initialized; - } + // use 'function' keyword to enable 'this' + return decorate(function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return Object.keys(reducers).reduce(function (accumulator, key) { + var previousState = getIn(accumulator, key); + var nextState = reducers[key](previousState, action, getIn(state, key)); + return nextState === previousState ? accumulator : setIn(accumulator, key, nextState); + }, _this(state, action)); + }); + }; - if (Array.isArray(state)) { - var copy = [].concat(state); - copy[first] = next; - return copy; + return target; } - return _extends({}, state, _defineProperty({}, first, next)); -}; - -var setIn = function setIn(state, field, value) { - return setInWithPath(state, value, Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(field), 0); + return decorate(byForm(reducer)); }; -/* harmony default export */ __webpack_exports__["a"] = (setIn); +/* harmony default export */ __webpack_exports__["a"] = (createReducer); /***/ }), -/* 537 */ +/* 505 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(272); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(111); -var customizer = function customizer(obj, other) { - if (obj === other) return true; - if ((obj == null || obj === '' || obj === false) && (other == null || other === '' || other === false)) return true; +var createDeleteInWithCleanUp = function createDeleteInWithCleanUp(_ref) { + var deepEqual = _ref.deepEqual, + empty = _ref.empty, + getIn = _ref.getIn, + deleteIn = _ref.deleteIn, + setIn = _ref.setIn; - if (obj && other && obj._error !== other._error) return false; - if (obj && other && obj._warning !== other._warning) return false; -}; -var deepEqual = function deepEqual(a, b) { - return Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */])(a, b, customizer); + var deleteInWithCleanUp = function deleteInWithCleanUp(state, path) { + if (path[path.length - 1] === ']') { + // array path + var pathTokens = __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](path); + pathTokens.pop(); + var parent = getIn(state, pathTokens.join('.')); + return parent ? setIn(state, path, undefined) : state; + } + var result = deleteIn(state, path); + var dotIndex = path.lastIndexOf('.'); + if (dotIndex > 0) { + var parentPath = path.substring(0, dotIndex); + if (parentPath[parentPath.length - 1] !== ']') { + var _parent = getIn(result, parentPath); + if (deepEqual(_parent, empty)) { + return deleteInWithCleanUp(result, parentPath); + } + } + } + return result; + }; + + return deleteInWithCleanUp; }; -/* harmony default export */ __webpack_exports__["a"] = (deepEqual); +/* harmony default export */ __webpack_exports__["a"] = (createDeleteInWithCleanUp); /***/ }), -/* 538 */ +/* 506 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(168); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__ = __webpack_require__(273); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__ = __webpack_require__(549); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__ = __webpack_require__(552); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getTag_js__ = __webpack_require__(567); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArray_js__ = __webpack_require__(35); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__ = __webpack_require__(171); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__ = __webpack_require__(174); - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoize_js__ = __webpack_require__(507); +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = __WEBPACK_IMPORTED_MODULE_0__memoize_js__["a" /* default */](func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + var cache = result.cache; + return result; +} +/* harmony default export */ __webpack_exports__["a"] = (memoizeCapped); +/***/ }), +/* 507 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(168); + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]); + return memoized; +} + +// Expose `MapCache`. +memoize.Cache = __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (memoize); + + +/***/ }), +/* 508 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Hash_js__ = __webpack_require__(509); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ListCache_js__ = __webpack_require__(114); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Map_js__ = __webpack_require__(170); -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; -/** Used for built-in method references. */ -var objectProto = Object.prototype; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. + * Removes all key-value entries from the map. * * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * @name clear + * @memberOf MapCache */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = Object(__WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */])(object), - othIsArr = Object(__WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */])(other), - objTag = objIsArr ? arrayTag : Object(__WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */])(object), - othTag = othIsArr ? arrayTag : Object(__WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */])(other); +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new __WEBPACK_IMPORTED_MODULE_0__Hash_js__["a" /* default */], + 'map': new (__WEBPACK_IMPORTED_MODULE_2__Map_js__["a" /* default */] || __WEBPACK_IMPORTED_MODULE_1__ListCache_js__["a" /* default */]), + 'string': new __WEBPACK_IMPORTED_MODULE_0__Hash_js__["a" /* default */] + }; +} - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; +/* harmony default export */ __webpack_exports__["a"] = (mapCacheClear); - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - if (isSameTag && Object(__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */])(object)) { - if (!Object(__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */])(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); - return (objIsArr || Object(__WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__["a" /* default */])(object)) - ? Object(__WEBPACK_IMPORTED_MODULE_1__equalArrays_js__["a" /* default */])(object, other, bitmask, customizer, equalFunc, stack) - : Object(__WEBPACK_IMPORTED_MODULE_2__equalByTag_js__["a" /* default */])(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); +/***/ }), +/* 509 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hashClear_js__ = __webpack_require__(510); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__ = __webpack_require__(515); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hashGet_js__ = __webpack_require__(516); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__hashHas_js__ = __webpack_require__(517); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__hashSet_js__ = __webpack_require__(518); - stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; + + + + + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); } - stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); - return Object(__WEBPACK_IMPORTED_MODULE_3__equalObjects_js__["a" /* default */])(object, other, bitmask, customizer, equalFunc, stack); } -/* harmony default export */ __webpack_exports__["a"] = (baseIsEqualDeep); +// Add methods to `Hash`. +Hash.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__hashClear_js__["a" /* default */]; +Hash.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__["a" /* default */]; +Hash.prototype.get = __WEBPACK_IMPORTED_MODULE_2__hashGet_js__["a" /* default */]; +Hash.prototype.has = __WEBPACK_IMPORTED_MODULE_3__hashHas_js__["a" /* default */]; +Hash.prototype.set = __WEBPACK_IMPORTED_MODULE_4__hashSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (Hash); /***/ }), -/* 539 */ +/* 510 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(113); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(113); /** - * Removes all key-value entries from the stack. + * Removes all key-value entries from the hash. * * @private * @name clear - * @memberOf Stack + * @memberOf Hash */ -function stackClear() { - this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */]; +function hashClear() { + this.__data__ = __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */](null) : {}; this.size = 0; } -/* harmony default export */ __webpack_exports__["a"] = (stackClear); +/* harmony default export */ __webpack_exports__["a"] = (hashClear); /***/ }), -/* 540 */ +/* 511 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isMasked_js__ = __webpack_require__(512); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toSource_js__ = __webpack_require__(267); + + + + + /** - * Removes `key` and its value from the stack. + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. * * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. */ -function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); +function baseIsNative(value) { + if (!__WEBPACK_IMPORTED_MODULE_2__isObject_js__["a" /* default */](value) || __WEBPACK_IMPORTED_MODULE_1__isMasked_js__["a" /* default */](value)) { + return false; + } + var pattern = __WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */](value) ? reIsNative : reIsHostCtor; + return pattern.test(__WEBPACK_IMPORTED_MODULE_3__toSource_js__["a" /* default */](value)); +} - this.size = data.size; - return result; +/* harmony default export */ __webpack_exports__["a"] = (baseIsNative); + + +/***/ }), +/* 512 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__ = __webpack_require__(513); + + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(__WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */].keys && __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */].keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); } -/* harmony default export */ __webpack_exports__["a"] = (stackDelete); +/* harmony default export */ __webpack_exports__["a"] = (isMasked); /***/ }), -/* 541 */ +/* 513 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(31); + + +/** Used to detect overreaching core-js shims. */ +var coreJsData = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */]['__core-js_shared__']; + +/* harmony default export */ __webpack_exports__["a"] = (coreJsData); + + +/***/ }), +/* 514 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** - * Gets the stack value for `key`. + * Gets the value at `key` of `object`. * * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. */ -function stackGet(key) { - return this.__data__.get(key); +function getValue(object, key) { + return object == null ? undefined : object[key]; } -/* harmony default export */ __webpack_exports__["a"] = (stackGet); +/* harmony default export */ __webpack_exports__["a"] = (getValue); /***/ }), -/* 542 */ +/* 515 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** - * Checks if a stack value for `key` exists. + * Removes `key` and its value from the hash. * * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function stackHas(key) { - return this.__data__.has(key); +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; } -/* harmony default export */ __webpack_exports__["a"] = (stackHas); +/* harmony default export */ __webpack_exports__["a"] = (hashDelete); /***/ }), -/* 543 */ +/* 516 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(113); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(166); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MapCache_js__ = __webpack_require__(164); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(113); +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; +/** Used for built-in method references. */ +var objectProto = Object.prototype; -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * Sets the stack `key` to `value`. + * Gets the hash value for `key`. * * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ -function stackSet(key, value) { +function hashGet(key) { var data = this.__data__; - if (data instanceof __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */]) { - var pairs = data.__data__; - if (!__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new __WEBPACK_IMPORTED_MODULE_2__MapCache_js__["a" /* default */](pairs); + if (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */]) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; } - data.set(key, value); - this.size = data.size; - return this; + return hasOwnProperty.call(data, key) ? data[key] : undefined; } -/* harmony default export */ __webpack_exports__["a"] = (stackSet); +/* harmony default export */ __webpack_exports__["a"] = (hashGet); /***/ }), -/* 544 */ +/* 517 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(164); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__ = __webpack_require__(545); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__ = __webpack_require__(546); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(113); +/** Used for built-in method references. */ +var objectProto = Object.prototype; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * - * Creates an array cache object to store unique values. + * Checks if a hash value for `key` exists. * * @private - * @constructor - * @param {Array} [values] The values to cache. + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; - while (++index < length) { - this.add(values[index]); - } +function hashHas(key) { + var data = this.__data__; + return __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__["a" /* default */]; -SetCache.prototype.has = __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__["a" /* default */]; - -/* harmony default export */ __webpack_exports__["a"] = (SetCache); +/* harmony default export */ __webpack_exports__["a"] = (hashHas); /***/ }), -/* 545 */ +/* 518 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(113); + + /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** - * Adds `value` to the array cache. + * Sets the hash `key` to `value`. * * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] && value === undefined) ? HASH_UNDEFINED : value; return this; } -/* harmony default export */ __webpack_exports__["a"] = (setCacheAdd); +/* harmony default export */ __webpack_exports__["a"] = (hashSet); /***/ }), -/* 546 */ +/* 519 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** - * Checks if `value` is in the array cache. + * Removes all key-value entries from the list cache. * * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. + * @name clear + * @memberOf ListCache */ -function setCacheHas(value) { - return this.__data__.has(value); +function listCacheClear() { + this.__data__ = []; + this.size = 0; } -/* harmony default export */ __webpack_exports__["a"] = (setCacheHas); +/* harmony default export */ __webpack_exports__["a"] = (listCacheClear); /***/ }), -/* 547 */ +/* 520 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(115); + + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + /** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. + * Removes `key` and its value from the list cache. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; +function listCacheDelete(key) { + var data = this.__data__, + index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key); - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } + if (index < 0) { + return false; } - return false; + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; } -/* harmony default export */ __webpack_exports__["a"] = (arraySome); +/* harmony default export */ __webpack_exports__["a"] = (listCacheDelete); /***/ }), -/* 548 */ +/* 521 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(115); + + /** - * Checks if a `cache` value for `key` exists. + * Gets the list cache value for `key`. * * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ -function cacheHas(cache, key) { - return cache.has(key); +function listCacheGet(key) { + var data = this.__data__, + index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key); + + return index < 0 ? undefined : data[index][1]; } -/* harmony default export */ __webpack_exports__["a"] = (cacheHas); +/* harmony default export */ __webpack_exports__["a"] = (listCacheGet); /***/ }), -/* 549 */ +/* 522 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(109); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__ = __webpack_require__(274); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__eq_js__ = __webpack_require__(86); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__ = __webpack_require__(273); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__ = __webpack_require__(550); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__setToArray_js__ = __webpack_require__(551); - - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(115); +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](this.__data__, key) > -1; +} +/* harmony default export */ __webpack_exports__["a"] = (listCacheHas); -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; +/***/ }), +/* 523 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(115); -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * Sets the list cache `key` to `value`. * * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](object), new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return Object(__WEBPACK_IMPORTED_MODULE_2__eq_js__["a" /* default */])(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__["a" /* default */]; - - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = __WEBPACK_IMPORTED_MODULE_5__setToArray_js__["a" /* default */]); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = Object(__WEBPACK_IMPORTED_MODULE_3__equalArrays_js__["a" /* default */])(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; +function listCacheSet(key, value) { + var data = this.__data__, + index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key); - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; } - return false; + return this; } -/* harmony default export */ __webpack_exports__["a"] = (equalByTag); +/* harmony default export */ __webpack_exports__["a"] = (listCacheSet); /***/ }), -/* 550 */ +/* 524 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/* harmony default export */ __webpack_exports__["a"] = (mapToArray); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(116); -/***/ }), -/* 551 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; /** - * Converts `set` to an array of its values. + * Removes `key` and its value from the map. * * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); +function mapCacheDelete(key) { + var result = __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key)['delete'](key); + this.size -= result ? 1 : 0; return result; } -/* harmony default export */ __webpack_exports__["a"] = (setToArray); +/* harmony default export */ __webpack_exports__["a"] = (mapCacheDelete); /***/ }), -/* 552 */ +/* 525 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__ = __webpack_require__(553); - - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. + * Checks if `value` is suitable for use as unique object key. * * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = Object(__WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */])(object), - objLength = objProps.length, - othProps = Object(__WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */])(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); } -/* harmony default export */ __webpack_exports__["a"] = (equalObjects); +/* harmony default export */ __webpack_exports__["a"] = (isKeyable); /***/ }), -/* 553 */ +/* 526 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__ = __webpack_require__(554); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__ = __webpack_require__(556); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(169); - - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(116); /** - * Creates an array of own enumerable property names and symbols of `object`. + * Gets the map value for `key`. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ -function getAllKeys(object) { - return Object(__WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__["a" /* default */])(object, __WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__["a" /* default */]); +function mapCacheGet(key) { + return __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key).get(key); } -/* harmony default export */ __webpack_exports__["a"] = (getAllKeys); +/* harmony default export */ __webpack_exports__["a"] = (mapCacheGet); /***/ }), -/* 554 */ +/* 527 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__ = __webpack_require__(555); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(35); - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(116); /** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. + * Checks if a map value for `key` exists. * * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */])(object) ? result : Object(__WEBPACK_IMPORTED_MODULE_0__arrayPush_js__["a" /* default */])(result, symbolsFunc(object)); +function mapCacheHas(key) { + return __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key).has(key); } -/* harmony default export */ __webpack_exports__["a"] = (baseGetAllKeys); +/* harmony default export */ __webpack_exports__["a"] = (mapCacheHas); /***/ }), -/* 555 */ +/* 528 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(116); + + /** - * Appends the elements of `values` to `array`. + * Sets the map `key` to `value`. * * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; +function mapCacheSet(key, value) { + var data = __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key), + size = data.size; - while (++index < length) { - array[offset + index] = values[index]; - } - return array; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; } -/* harmony default export */ __webpack_exports__["a"] = (arrayPush); +/* harmony default export */ __webpack_exports__["a"] = (mapCacheSet); /***/ }), -/* 556 */ +/* 529 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(557); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubArray_js__ = __webpack_require__(558); - - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(109); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(264); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(112); -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? __WEBPACK_IMPORTED_MODULE_1__stubArray_js__["a" /* default */] : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return Object(__WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */])(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; -/* harmony default export */ __webpack_exports__["a"] = (getSymbols); +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; -/***/ }), -/* 557 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** Used to convert symbols to primitives and strings. */ +var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; -"use strict"; /** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. + * @param {*} value The value to process. + * @returns {string} Returns the string. */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; } - return result; + if (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value)) { + // Recursively convert values (susceptible to call stack limits). + return __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */](value, baseToString) + ''; + } + if (__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */](value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } -/* harmony default export */ __webpack_exports__["a"] = (arrayFilter); +/* harmony default export */ __webpack_exports__["a"] = (baseToString); /***/ }), -/* 558 */ +/* 530 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__ = __webpack_require__(531); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__ = __webpack_require__(275); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = __webpack_require__(261); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux__ = __webpack_require__(28); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_redux__ = __webpack_require__(165); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_is_promise__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_is_promise__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util_getDisplayName__ = __webpack_require__(602); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__actions__ = __webpack_require__(281); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__handleSubmit__ = __webpack_require__(603); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__events_silenceEvent__ = __webpack_require__(283); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__events_silenceEvents__ = __webpack_require__(605); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__asyncValidation__ = __webpack_require__(606); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__defaultShouldAsyncValidate__ = __webpack_require__(607); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__defaultShouldValidate__ = __webpack_require__(608); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__structure_plain__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__generateValidator__ = __webpack_require__(614); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__selectors_isValid__ = __webpack_require__(184); -/* harmony default export */ __webpack_exports__["a"] = (stubArray); -/***/ }), -/* 559 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -"use strict"; -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -/* harmony default export */ __webpack_exports__["a"] = (baseTimes); +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -/***/ }), -/* 560 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(69); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(55); +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; -/** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ -function baseIsArguments(value) { - return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == argsTag; -} -/* harmony default export */ __webpack_exports__["a"] = (baseIsArguments); -/***/ }), -/* 561 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} -/* harmony default export */ __webpack_exports__["a"] = (stubFalse); -/***/ }), -/* 562 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(69); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(175); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(55); -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) && - Object(__WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */])(value.length) && !!typedArrayTags[Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value)]; -} -/* harmony default export */ __webpack_exports__["a"] = (baseIsTypedArray); +var isClassComponent = function isClassComponent(Component) { + return Boolean(Component && Component.prototype && _typeof(Component.prototype.isReactComponent) === 'object'); +}; -/***/ }), -/* 563 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// extract field-specific actions -"use strict"; -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function(value) { - return func(value); - }; -} +var arrayInsert = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayInsert"], + arrayMove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayMove"], + arrayPop = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPop"], + arrayPush = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPush"], + arrayRemove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemove"], + arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemoveAll"], + arrayShift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayShift"], + arraySplice = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySplice"], + arraySwap = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySwap"], + arrayUnshift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayUnshift"], + blur = __WEBPACK_IMPORTED_MODULE_8__actions__["blur"], + change = __WEBPACK_IMPORTED_MODULE_8__actions__["change"], + focus = __WEBPACK_IMPORTED_MODULE_8__actions__["focus"], + formActions = _objectWithoutProperties(__WEBPACK_IMPORTED_MODULE_8__actions__, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'blur', 'change', 'focus']); -/* harmony default export */ __webpack_exports__["a"] = (baseUnary); +var arrayActions = { + arrayInsert: arrayInsert, + arrayMove: arrayMove, + arrayPop: arrayPop, + arrayPush: arrayPush, + arrayRemove: arrayRemove, + arrayRemoveAll: arrayRemoveAll, + arrayShift: arrayShift, + arraySplice: arraySplice, + arraySwap: arraySwap, + arrayUnshift: arrayUnshift +}; +var propsToNotUpdateFor = [].concat(_toConsumableArray(Object.keys(__WEBPACK_IMPORTED_MODULE_8__actions__)), ['array', 'asyncErrors', 'initialized', 'initialValues', 'syncErrors', 'syncWarnings', 'values', 'registeredFields']); -/***/ }), -/* 564 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var checkSubmit = function checkSubmit(submit) { + if (!submit || typeof submit !== 'function') { + throw new Error('You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop'); + } + return submit; +}; -"use strict"; -/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(251); +/** + * The decorator that is the main API to redux-form + */ +var createReduxForm = function createReduxForm(structure) { + var deepEqual = structure.deepEqual, + empty = structure.empty, + getIn = structure.getIn, + setIn = structure.setIn, + keys = structure.keys, + fromJS = structure.fromJS; + var isValid = __WEBPACK_IMPORTED_MODULE_17__selectors_isValid__["a" /* default */](structure); + return function (initialConfig) { + var config = _extends({ + touchOnBlur: true, + touchOnChange: false, + persistentSubmitErrors: false, + destroyOnUnmount: true, + shouldAsyncValidate: __WEBPACK_IMPORTED_MODULE_13__defaultShouldAsyncValidate__["a" /* default */], + shouldValidate: __WEBPACK_IMPORTED_MODULE_14__defaultShouldValidate__["a" /* default */], + enableReinitialize: false, + keepDirtyOnReinitialize: false, + getFormState: function getFormState(state) { + return getIn(state, 'form'); + }, + pure: true, + forceUnregisterOnUnmount: false + }, initialConfig); -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + return function (WrappedComponent) { + var Form = function (_Component) { + _inherits(Form, _Component); -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + function Form(props) { + _classCallCheck(this, Form); -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; + var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props)); -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */].process; + _this.submit = _this.submit.bind(_this); + _this.reset = _this.reset.bind(_this); + _this.asyncValidate = _this.asyncValidate.bind(_this); + _this.getValues = _this.getValues.bind(_this); + _this.register = _this.register.bind(_this); + _this.unregister = _this.unregister.bind(_this); + _this.submitCompleted = _this.submitCompleted.bind(_this); + _this.submitFailed = _this.submitFailed.bind(_this); + _this.fieldValidators = {}; + _this.lastFieldValidatorKeys = []; + _this.fieldWarners = {}; + _this.lastFieldWarnerKeys = []; + return _this; + } -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} -}()); + _createClass(Form, [{ + key: 'getChildContext', + value: function getChildContext() { + var _this2 = this; -/* harmony default export */ __webpack_exports__["a"] = (nodeUtil); + return { + _reduxForm: _extends({}, this.props, { + getFormState: function getFormState(state) { + return getIn(_this2.props.getFormState(state), _this2.props.form); + }, + asyncValidate: this.asyncValidate, + getValues: this.getValues, + sectionPrefix: undefined, + register: this.register, + unregister: this.unregister, + registerInnerOnSubmit: function registerInnerOnSubmit(innerOnSubmit) { + return _this2.innerOnSubmit = innerOnSubmit; + } + }) + }; + } + }, { + key: 'initIfNeeded', + value: function initIfNeeded(nextProps) { + var enableReinitialize = this.props.enableReinitialize; -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(172)(module))) + if (nextProps) { + if ((enableReinitialize || !nextProps.initialized) && !deepEqual(this.props.initialValues, nextProps.initialValues)) { + var keepDirty = nextProps.initialized && this.props.keepDirtyOnReinitialize; + this.props.initialize(nextProps.initialValues, keepDirty); + } + } else if (this.props.initialValues && (!this.props.initialized || enableReinitialize)) { + this.props.initialize(this.props.initialValues, this.props.keepDirtyOnReinitialize); + } + } + }, { + key: 'updateSyncErrorsIfNeeded', + value: function updateSyncErrorsIfNeeded(nextSyncErrors, nextError) { + var _props = this.props, + error = _props.error, + syncErrors = _props.syncErrors, + updateSyncErrors = _props.updateSyncErrors; -/***/ }), -/* 565 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var noErrors = (!syncErrors || !Object.keys(syncErrors).length) && !error; + var nextNoErrors = (!nextSyncErrors || !Object.keys(nextSyncErrors).length) && !nextError; + if (!(noErrors && nextNoErrors) && (!__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(syncErrors, nextSyncErrors) || !__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(error, nextError))) { + updateSyncErrors(nextSyncErrors, nextError); + } + } + }, { + key: 'submitIfNeeded', + value: function submitIfNeeded(nextProps) { + var _props2 = this.props, + clearSubmit = _props2.clearSubmit, + triggerSubmit = _props2.triggerSubmit; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPrototype_js__ = __webpack_require__(176); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__ = __webpack_require__(566); + if (!triggerSubmit && nextProps.triggerSubmit) { + clearSubmit(); + this.submit(); + } + } + }, { + key: 'validateIfNeeded', + value: function validateIfNeeded(nextProps) { + var _props3 = this.props, + shouldValidate = _props3.shouldValidate, + validate = _props3.validate, + values = _props3.values; + var fieldLevelValidate = this.generateValidator(); + if (validate || fieldLevelValidate) { + var initialRender = nextProps === undefined; + var fieldValidatorKeys = Object.keys(this.fieldValidators); + var shouldValidateResult = shouldValidate({ + values: values, + nextProps: nextProps, + props: this.props, + initialRender: initialRender, + lastFieldValidatorKeys: this.lastFieldValidatorKeys, + fieldValidatorKeys: fieldValidatorKeys, + structure: structure + }); + if (shouldValidateResult) { + var propsToValidate = initialRender ? this.props : nextProps; -/** Used for built-in method references. */ -var objectProto = Object.prototype; + var _merge2 = __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */](validate ? validate(propsToValidate.values, propsToValidate) || {} : {}, fieldLevelValidate ? fieldLevelValidate(propsToValidate.values, propsToValidate) || {} : {}), + _error = _merge2._error, + nextSyncErrors = _objectWithoutProperties(_merge2, ['_error']); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + this.lastFieldValidatorKeys = fieldValidatorKeys; + this.updateSyncErrorsIfNeeded(nextSyncErrors, _error); + } + } + } + }, { + key: 'updateSyncWarningsIfNeeded', + value: function updateSyncWarningsIfNeeded(nextSyncWarnings, nextWarning) { + var _props4 = this.props, + warning = _props4.warning, + syncWarnings = _props4.syncWarnings, + updateSyncWarnings = _props4.updateSyncWarnings; -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!Object(__WEBPACK_IMPORTED_MODULE_0__isPrototype_js__["a" /* default */])(object)) { - return Object(__WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__["a" /* default */])(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} + var noWarnings = (!syncWarnings || !Object.keys(syncWarnings).length) && !warning; + var nextNoWarnings = (!nextSyncWarnings || !Object.keys(nextSyncWarnings).length) && !nextWarning; + if (!(noWarnings && nextNoWarnings) && (!__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(syncWarnings, nextSyncWarnings) || !__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(warning, nextWarning))) { + updateSyncWarnings(nextSyncWarnings, nextWarning); + } + } + }, { + key: 'warnIfNeeded', + value: function warnIfNeeded(nextProps) { + var _props5 = this.props, + shouldValidate = _props5.shouldValidate, + warn = _props5.warn, + values = _props5.values; -/* harmony default export */ __webpack_exports__["a"] = (baseKeys); + var fieldLevelWarn = this.generateWarner(); + if (warn || fieldLevelWarn) { + var initialRender = nextProps === undefined; + var fieldWarnerKeys = Object.keys(this.fieldWarners); + var shouldWarnResult = shouldValidate({ + values: values, + nextProps: nextProps, + props: this.props, + initialRender: initialRender, + lastFieldValidatorKeys: this.lastFieldWarnerKeys, + fieldValidatorKeys: fieldWarnerKeys, + structure: structure + }); + if (shouldWarnResult) { + var propsToWarn = initialRender ? this.props : nextProps; -/***/ }), -/* 566 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var _merge3 = __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */](warn ? warn(propsToWarn.values, propsToWarn) : {}, fieldLevelWarn ? fieldLevelWarn(propsToWarn.values, propsToWarn) : {}), + _warning = _merge3._warning, + nextSyncWarnings = _objectWithoutProperties(_merge3, ['_warning']); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(253); + this.lastFieldWarnerKeys = fieldWarnerKeys; + this.updateSyncWarningsIfNeeded(nextSyncWarnings, _warning); + } + } + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + this.initIfNeeded(); + this.validateIfNeeded(); + this.warnIfNeeded(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.initIfNeeded(nextProps); + this.validateIfNeeded(nextProps); + this.warnIfNeeded(nextProps); + this.submitIfNeeded(nextProps); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this3 = this; + if (!config.pure) return true; + return Object.keys(nextProps).some(function (prop) { + // useful to debug rerenders + // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { + // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) + // } + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); + }); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + var _props6 = this.props, + destroyOnUnmount = _props6.destroyOnUnmount, + destroy = _props6.destroy; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.keys, Object); + if (destroyOnUnmount) { + this.destroyed = true; + destroy(); + } + } + }, { + key: 'getValues', + value: function getValues() { + return this.props.values; + } + }, { + key: 'isValid', + value: function isValid() { + return this.props.valid; + } + }, { + key: 'isPristine', + value: function isPristine() { + return this.props.pristine; + } + }, { + key: 'register', + value: function register(name, type, getValidator, getWarner) { + this.props.registerField(name, type); + if (getValidator) { + this.fieldValidators[name] = getValidator; + } + if (getWarner) { + this.fieldWarners[name] = getWarner; + } + } + }, { + key: 'unregister', + value: function unregister(name) { + if (!this.destroyed) { + if (this.props.destroyOnUnmount || this.props.forceUnregisterOnUnmount) { + this.props.unregisterField(name); + delete this.fieldValidators[name]; + delete this.fieldWarners[name]; + } else { + this.props.unregisterField(name, false); + } + } + } + }, { + key: 'getFieldList', + value: function getFieldList(options) { + var registeredFields = this.props.registeredFields; + var list = []; + if (!registeredFields) { + return list; + } + var keySeq = keys(registeredFields); + if (options && options.excludeFieldArray) { + keySeq = keySeq.filter(function (name) { + return getIn(registeredFields, '[\'' + name + '\'].type') !== 'FieldArray'; + }); + } + return fromJS(keySeq.reduce(function (acc, key) { + acc.push(key); + return acc; + }, list)); + } + }, { + key: 'generateValidator', + value: function generateValidator() { + var _this4 = this; -/* harmony default export */ __webpack_exports__["a"] = (nativeKeys); + var validators = {}; + Object.keys(this.fieldValidators).forEach(function (name) { + var validator = _this4.fieldValidators[name](); + if (validator) { + validators[name] = validator; + } + }); + return Object.keys(validators).length ? __WEBPACK_IMPORTED_MODULE_16__generateValidator__["a" /* default */](validators, structure) : undefined; + } + }, { + key: 'generateWarner', + value: function generateWarner() { + var _this5 = this; + var warners = {}; + Object.keys(this.fieldWarners).forEach(function (name) { + var warner = _this5.fieldWarners[name](); + if (warner) { + warners[name] = warner; + } + }); + return Object.keys(warners).length ? __WEBPACK_IMPORTED_MODULE_16__generateValidator__["a" /* default */](warners, structure) : undefined; + } + }, { + key: 'asyncValidate', + value: function asyncValidate(name, value) { + var _this6 = this; -/***/ }), -/* 567 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var _props7 = this.props, + asyncBlurFields = _props7.asyncBlurFields, + asyncErrors = _props7.asyncErrors, + asyncValidate = _props7.asyncValidate, + dispatch = _props7.dispatch, + initialized = _props7.initialized, + pristine = _props7.pristine, + shouldAsyncValidate = _props7.shouldAsyncValidate, + startAsyncValidation = _props7.startAsyncValidation, + stopAsyncValidation = _props7.stopAsyncValidation, + syncErrors = _props7.syncErrors, + values = _props7.values; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DataView_js__ = __webpack_require__(568); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(166); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Promise_js__ = __webpack_require__(569); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Set_js__ = __webpack_require__(570); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__ = __webpack_require__(571); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__ = __webpack_require__(69); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toSource_js__ = __webpack_require__(270); + var submitting = !name; + if (asyncValidate) { + var _ret = function () { + var valuesToValidate = submitting ? values : setIn(values, name, value); + var syncValidationPasses = submitting || !getIn(syncErrors, name); + var isBlurredField = !submitting && (!asyncBlurFields || ~asyncBlurFields.indexOf(name.replace(/\[[0-9]+\]/g, '[]'))); + if ((isBlurredField || submitting) && shouldAsyncValidate({ + asyncErrors: asyncErrors, + initialized: initialized, + trigger: submitting ? 'submit' : 'blur', + blurredField: name, + pristine: pristine, + syncValidationPasses: syncValidationPasses + })) { + return { + v: __WEBPACK_IMPORTED_MODULE_12__asyncValidation__["a" /* default */](function () { + return asyncValidate(valuesToValidate, dispatch, _this6.props, name); + }, startAsyncValidation, stopAsyncValidation, name) + }; + } + }(); + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } + } + }, { + key: 'submitCompleted', + value: function submitCompleted(result) { + delete this.submitPromise; + return result; + } + }, { + key: 'submitFailed', + value: function submitFailed(error) { + delete this.submitPromise; + throw error; + } + }, { + key: 'listenToSubmit', + value: function listenToSubmit(promise) { + if (!__WEBPACK_IMPORTED_MODULE_6_is_promise___default.a(promise)) { + return promise; + } + this.submitPromise = promise; + return promise.then(this.submitCompleted, this.submitFailed); + } + }, { + key: 'submit', + value: function submit(submitOrEvent) { + var _this7 = this; + var onSubmit = this.props.onSubmit; + if (!submitOrEvent || __WEBPACK_IMPORTED_MODULE_10__events_silenceEvent__["a" /* default */](submitOrEvent)) { + // submitOrEvent is an event: fire submit if not already submitting + if (!this.submitPromise) { + if (this.innerOnSubmit) { + // will call "submitOrEvent is the submit function" block below + return this.innerOnSubmit(); + } else { + return this.listenToSubmit(__WEBPACK_IMPORTED_MODULE_9__handleSubmit__["a" /* default */](checkSubmit(onSubmit), this.props, this.props.validExceptSubmit, this.asyncValidate, this.getFieldList({ excludeFieldArray: true }))); + } + } + } else { + // submitOrEvent is the submit function: return deferred submit thunk + return __WEBPACK_IMPORTED_MODULE_11__events_silenceEvents__["a" /* default */](function () { + return !_this7.submitPromise && _this7.listenToSubmit(__WEBPACK_IMPORTED_MODULE_9__handleSubmit__["a" /* default */](checkSubmit(submitOrEvent), _this7.props, _this7.props.validExceptSubmit, _this7.asyncValidate, _this7.getFieldList({ excludeFieldArray: true }))); + }); + } + } + }, { + key: 'reset', + value: function reset() { + this.props.reset(); + } + }, { + key: 'render', + value: function render() { + // remove some redux-form config-only props + /* eslint-disable no-unused-vars */ + var _props8 = this.props, + anyTouched = _props8.anyTouched, + arrayInsert = _props8.arrayInsert, + arrayMove = _props8.arrayMove, + arrayPop = _props8.arrayPop, + arrayPush = _props8.arrayPush, + arrayRemove = _props8.arrayRemove, + arrayRemoveAll = _props8.arrayRemoveAll, + arrayShift = _props8.arrayShift, + arraySplice = _props8.arraySplice, + arraySwap = _props8.arraySwap, + arrayUnshift = _props8.arrayUnshift, + asyncErrors = _props8.asyncErrors, + asyncValidate = _props8.asyncValidate, + asyncValidating = _props8.asyncValidating, + blur = _props8.blur, + change = _props8.change, + destroy = _props8.destroy, + destroyOnUnmount = _props8.destroyOnUnmount, + forceUnregisterOnUnmount = _props8.forceUnregisterOnUnmount, + dirty = _props8.dirty, + dispatch = _props8.dispatch, + enableReinitialize = _props8.enableReinitialize, + error = _props8.error, + focus = _props8.focus, + form = _props8.form, + getFormState = _props8.getFormState, + initialize = _props8.initialize, + initialized = _props8.initialized, + initialValues = _props8.initialValues, + invalid = _props8.invalid, + keepDirtyOnReinitialize = _props8.keepDirtyOnReinitialize, + pristine = _props8.pristine, + propNamespace = _props8.propNamespace, + registeredFields = _props8.registeredFields, + registerField = _props8.registerField, + reset = _props8.reset, + setSubmitFailed = _props8.setSubmitFailed, + setSubmitSucceeded = _props8.setSubmitSucceeded, + shouldAsyncValidate = _props8.shouldAsyncValidate, + shouldValidate = _props8.shouldValidate, + startAsyncValidation = _props8.startAsyncValidation, + startSubmit = _props8.startSubmit, + stopAsyncValidation = _props8.stopAsyncValidation, + stopSubmit = _props8.stopSubmit, + submitting = _props8.submitting, + submitFailed = _props8.submitFailed, + submitSucceeded = _props8.submitSucceeded, + touch = _props8.touch, + touchOnBlur = _props8.touchOnBlur, + touchOnChange = _props8.touchOnChange, + persistentSubmitErrors = _props8.persistentSubmitErrors, + syncErrors = _props8.syncErrors, + syncWarnings = _props8.syncWarnings, + unregisterField = _props8.unregisterField, + untouch = _props8.untouch, + updateSyncErrors = _props8.updateSyncErrors, + updateSyncWarnings = _props8.updateSyncWarnings, + valid = _props8.valid, + validExceptSubmit = _props8.validExceptSubmit, + values = _props8.values, + warning = _props8.warning, + rest = _objectWithoutProperties(_props8, ['anyTouched', 'arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'blur', 'change', 'destroy', 'destroyOnUnmount', 'forceUnregisterOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'focus', 'form', 'getFormState', 'initialize', 'initialized', 'initialValues', 'invalid', 'keepDirtyOnReinitialize', 'pristine', 'propNamespace', 'registeredFields', 'registerField', 'reset', 'setSubmitFailed', 'setSubmitSucceeded', 'shouldAsyncValidate', 'shouldValidate', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitting', 'submitFailed', 'submitSucceeded', 'touch', 'touchOnBlur', 'touchOnChange', 'persistentSubmitErrors', 'syncErrors', 'syncWarnings', 'unregisterField', 'untouch', 'updateSyncErrors', 'updateSyncWarnings', 'valid', 'validExceptSubmit', 'values', 'warning']); + /* eslint-enable no-unused-vars */ + var reduxFormProps = _extends({ + anyTouched: anyTouched, + asyncValidate: this.asyncValidate, + asyncValidating: asyncValidating + }, __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"]({ blur: blur, change: change }, dispatch), { + destroy: destroy, + dirty: dirty, + dispatch: dispatch, + error: error, + form: form, + handleSubmit: this.submit, + initialize: initialize, + initialized: initialized, + initialValues: initialValues, + invalid: invalid, + pristine: pristine, + reset: reset, + submitting: submitting, + submitFailed: submitFailed, + submitSucceeded: submitSucceeded, + touch: touch, + untouch: untouch, + valid: valid, + warning: warning + }); + var propsToPass = _extends({}, propNamespace ? _defineProperty({}, propNamespace, reduxFormProps) : reduxFormProps, rest); + if (isClassComponent(WrappedComponent)) { + propsToPass.ref = 'wrapped'; + } + return __WEBPACK_IMPORTED_MODULE_2_react__["createElement"](WrappedComponent, propsToPass); + } + }]); + return Form; + }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - setTag = '[object Set]', - weakMapTag = '[object WeakMap]'; + Form.displayName = 'Form(' + __WEBPACK_IMPORTED_MODULE_7__util_getDisplayName__["a" /* default */](WrappedComponent) + ')'; + Form.WrappedComponent = WrappedComponent; + Form.childContextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].object.isRequired + }; + Form.propTypes = { + destroyOnUnmount: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + forceUnregisterOnUnmount: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + form: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].string.isRequired, + initialValues: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].object, + getFormState: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + onSubmitFail: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + onSubmitSuccess: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + propNameSpace: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].string, + validate: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + warn: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + touchOnBlur: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + touchOnChange: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + triggerSubmit: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + persistentSubmitErrors: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + registeredFields: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].any + }; -var dataViewTag = '[object DataView]'; + var connector = __WEBPACK_IMPORTED_MODULE_4_react_redux__["connect"](function (state, props) { + var form = props.form, + getFormState = props.getFormState, + initialValues = props.initialValues, + enableReinitialize = props.enableReinitialize, + keepDirtyOnReinitialize = props.keepDirtyOnReinitialize; -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */]), - mapCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]), - promiseCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */]), - setCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]), - weakMapCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]); + var formState = getIn(getFormState(state) || empty, form) || empty; + var stateInitial = getIn(formState, 'initial'); + var initialized = !!stateInitial; -/** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -var getTag = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */]; + var shouldUpdateInitialValues = enableReinitialize && initialized && !deepEqual(initialValues, stateInitial); + var shouldResetValues = shouldUpdateInitialValues && !keepDirtyOnReinitialize; -// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. -if ((__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */](new ArrayBuffer(1))) != dataViewTag) || - (__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]) != mapTag) || - (__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */] && getTag(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */].resolve()) != promiseTag) || - (__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]) != setTag) || - (__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]) != weakMapTag)) { - getTag = function(value) { - var result = Object(__WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */])(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(Ctor) : ''; + var initial = initialValues || stateInitial || empty; - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; -} + if (shouldUpdateInitialValues) { + initial = stateInitial || empty; + } -/* harmony default export */ __webpack_exports__["a"] = (getTag); + var values = getIn(formState, 'values') || initial; + if (shouldResetValues) { + values = initial; + } -/***/ }), -/* 568 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var pristine = shouldResetValues || deepEqual(initial, values); + var asyncErrors = getIn(formState, 'asyncErrors'); + var syncErrors = getIn(formState, 'syncErrors') || {}; + var syncWarnings = getIn(formState, 'syncWarnings') || {}; + var registeredFields = getIn(formState, 'registeredFields'); + var valid = isValid(form, getFormState, false)(state); + var validExceptSubmit = isValid(form, getFormState, true)(state); + var anyTouched = !!getIn(formState, 'anyTouched'); + var submitting = !!getIn(formState, 'submitting'); + var submitFailed = !!getIn(formState, 'submitFailed'); + var submitSucceeded = !!getIn(formState, 'submitSucceeded'); + var error = getIn(formState, 'error'); + var warning = getIn(formState, 'warning'); + var triggerSubmit = getIn(formState, 'triggerSubmit'); + return { + anyTouched: anyTouched, + asyncErrors: asyncErrors, + asyncValidating: getIn(formState, 'asyncValidating') || false, + dirty: !pristine, + error: error, + initialized: initialized, + invalid: !valid, + pristine: pristine, + registeredFields: registeredFields, + submitting: submitting, + submitFailed: submitFailed, + submitSucceeded: submitSucceeded, + syncErrors: syncErrors, + syncWarnings: syncWarnings, + triggerSubmit: triggerSubmit, + values: values, + valid: valid, + validExceptSubmit: validExceptSubmit, + warning: warning + }; + }, function (dispatch, initialProps) { + var bindForm = function bindForm(actionCreator) { + return actionCreator.bind(null, initialProps.form); + }; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(57); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(34); + // Bind the first parameter on `props.form` + var boundFormACs = __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */](formActions, bindForm); + var boundArrayACs = __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */](arrayActions, bindForm); + var boundBlur = function boundBlur(field, value) { + return blur(initialProps.form, field, value, !!initialProps.touchOnBlur); + }; + var boundChange = function boundChange(field, value) { + return change(initialProps.form, field, value, !!initialProps.touchOnChange, !!initialProps.persistentSubmitErrors); + }; + var boundFocus = bindForm(focus); + // Wrap action creators with `dispatch` + var connectedFormACs = __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundFormACs, dispatch); + var connectedArrayACs = { + insert: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayInsert, dispatch), + move: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayMove, dispatch), + pop: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayPop, dispatch), + push: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayPush, dispatch), + remove: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayRemove, dispatch), + removeAll: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayRemoveAll, dispatch), + shift: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayShift, dispatch), + splice: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arraySplice, dispatch), + swap: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arraySwap, dispatch), + unshift: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayUnshift, dispatch) + }; + var computedActions = _extends({}, connectedFormACs, boundArrayACs, { + blur: boundBlur, + change: boundChange, + array: connectedArrayACs, + focus: boundFocus, + dispatch: dispatch + }); -/* Built-in method references that are verified to be native. */ -var DataView = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'DataView'); + return function () { + return computedActions; + }; + }, undefined, { withRef: true }); + var ConnectedForm = __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default.a(connector(Form), WrappedComponent); + ConnectedForm.defaultProps = config; -/* harmony default export */ __webpack_exports__["a"] = (DataView); + // build outer component to expose instance api + return function (_Component2) { + _inherits(ReduxForm, _Component2); + + function ReduxForm() { + _classCallCheck(this, ReduxForm); + + return _possibleConstructorReturn(this, (ReduxForm.__proto__ || Object.getPrototypeOf(ReduxForm)).apply(this, arguments)); + } + + _createClass(ReduxForm, [{ + key: 'submit', + value: function submit() { + return this.refs.wrapped.getWrappedInstance().submit(); + } + }, { + key: 'reset', + value: function reset() { + return this.refs.wrapped.getWrappedInstance().reset(); + } + }, { + key: 'render', + value: function render() { + var _props9 = this.props, + initialValues = _props9.initialValues, + rest = _objectWithoutProperties(_props9, ['initialValues']); + + return __WEBPACK_IMPORTED_MODULE_2_react__["createElement"](ConnectedForm, _extends({}, rest, { + ref: 'wrapped', + // convert initialValues if need to + initialValues: fromJS(initialValues) + })); + } + }, { + key: 'valid', + get: function get() { + return this.refs.wrapped.getWrappedInstance().isValid(); + } + }, { + key: 'invalid', + get: function get() { + return !this.valid; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.wrapped.getWrappedInstance().isPristine(); + } + }, { + key: 'dirty', + get: function get() { + return !this.pristine; + } + }, { + key: 'values', + get: function get() { + return this.refs.wrapped.getWrappedInstance().getValues(); + } + }, { + key: 'fieldList', + get: function get() { + // mainly provided for testing + return this.refs.wrapped.getWrappedInstance().getFieldList(); + } + }, { + key: 'wrappedInstance', + get: function get() { + // for testine + return this.refs.wrapped.getWrappedInstance().refs.wrapped; + } + }]); + + return ReduxForm; + }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); + }; + }; +}; +/* harmony default export */ __webpack_exports__["a"] = (createReduxForm); /***/ }), -/* 569 */ +/* 531 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(57); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(34); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__ = __webpack_require__(532); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(557); -/* Built-in method references that are verified to be native. */ -var Promise = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Promise'); +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */](function(object, source, srcIndex) { + __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__["a" /* default */](object, source, srcIndex); +}); -/* harmony default export */ __webpack_exports__["a"] = (Promise); +/* harmony default export */ __webpack_exports__["a"] = (merge); /***/ }), -/* 570 */ +/* 532 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(57); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(34); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__ = __webpack_require__(269); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseFor_js__ = __webpack_require__(271); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__ = __webpack_require__(539); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isObject_js__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keysIn_js__ = __webpack_require__(273); -/* Built-in method references that are verified to be native. */ -var Set = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Set'); -/* harmony default export */ __webpack_exports__["a"] = (Set); + + + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + __WEBPACK_IMPORTED_MODULE_2__baseFor_js__["a" /* default */](source, function(srcValue, key) { + if (__WEBPACK_IMPORTED_MODULE_4__isObject_js__["a" /* default */](srcValue)) { + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__["a" /* default */](object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__["a" /* default */](object, key, newValue); + } + }, __WEBPACK_IMPORTED_MODULE_5__keysIn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMerge); /***/ }), -/* 571 */ +/* 533 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(57); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(34); - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(114); -/* Built-in method references that are verified to be native. */ -var WeakMap = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'WeakMap'); +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */]; + this.size = 0; +} -/* harmony default export */ __webpack_exports__["a"] = (WeakMap); +/* harmony default export */ __webpack_exports__["a"] = (stackClear); /***/ }), -/* 572 */ +/* 534 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(110); +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + this.size = data.size; + return result; +} -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +/* harmony default export */ __webpack_exports__["a"] = (stackDelete); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } +/***/ }), +/* 535 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var deleteInWithPath = function deleteInWithPath(state, first) { - for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - rest[_key - 2] = arguments[_key]; - } +"use strict"; +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} - if (state === undefined || first === undefined) { - return state; - } - if (rest.length) { - if (Array.isArray(state)) { - if (first < state.length) { - var result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); - if (result !== state[first]) { - var copy = [].concat(_toConsumableArray(state)); - copy[first] = result; - return copy; - } - } - return state; - } - if (first in state) { - var _result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); - return state[first] === _result ? state : _extends({}, state, _defineProperty({}, first, _result)); - } - return state; - } - if (Array.isArray(state)) { - if (isNaN(first)) { - throw new Error('Cannot delete non-numerical index from an array'); - } - if (first < state.length) { - var _copy = [].concat(_toConsumableArray(state)); - _copy.splice(first, 1); - return _copy; - } - return state; - } - if (first in state) { - var _copy2 = _extends({}, state); - delete _copy2[first]; - return _copy2; - } - return state; -}; +/* harmony default export */ __webpack_exports__["a"] = (stackGet); -var deleteIn = function deleteIn(state, field) { - return deleteInWithPath.apply(undefined, [state].concat(_toConsumableArray(Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(field)))); -}; -/* harmony default export */ __webpack_exports__["a"] = (deleteIn); +/***/ }), +/* 536 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (stackHas); + /***/ }), -/* 573 */ +/* 537 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var keys = function keys(value) { - if (!value) { - return []; - } +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(114); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(170); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MapCache_js__ = __webpack_require__(168); - if (Array.isArray(value)) { - return value.map(function (i) { - return i.name; - }); + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */]) { + var pairs = data.__data__; + if (!__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new __WEBPACK_IMPORTED_MODULE_2__MapCache_js__["a" /* default */](pairs); } + data.set(key, value); + this.size = data.size; + return this; +} - return Object.keys(value); -}; +/* harmony default export */ __webpack_exports__["a"] = (stackSet); -/* harmony default export */ __webpack_exports__["a"] = (keys); /***/ }), -/* 574 */ +/* 538 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFields__ = __webpack_require__(575); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} +/* harmony default export */ __webpack_exports__["a"] = (createBaseFor); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFields__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); /***/ }), -/* 575 */ +/* 539 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(82); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConnectedFields__ = __webpack_require__(576); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__ = __webpack_require__(276); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__structure_plain__ = __webpack_require__(13); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_prefixName__ = __webpack_require__(85); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__ = __webpack_require__(269); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__ = __webpack_require__(540); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__ = __webpack_require__(541); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__copyArray_js__ = __webpack_require__(265); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__ = __webpack_require__(543); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArguments_js__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isArray_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__ = __webpack_require__(546); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__isFunction_js__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__isObject_js__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__ = __webpack_require__(177); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__ = __webpack_require__(551); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } @@ -44307,2145 +44851,2096 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" -var validateNameProp = function validateNameProp(prop) { - if (!prop) { - return new Error('No "names" prop was specified <Fields/>'); - } - if (!Array.isArray(prop) && !prop._isFieldArray) { - return new Error('Invalid prop "names" supplied to <Fields/>. Must be either an array of strings or the fields array generated by FieldArray.'); - } -}; -var createFields = function createFields(_ref) { - var deepEqual = _ref.deepEqual, - getIn = _ref.getIn, - toJS = _ref.toJS, - size = _ref.size; - var ConnectedFields = Object(__WEBPACK_IMPORTED_MODULE_3__ConnectedFields__["a" /* default */])({ - deepEqual: deepEqual, - getIn: getIn, - toJS: toJS, - size: size - }); +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); - var Fields = function (_Component) { - _inherits(Fields, _Component); + if (stacked) { + __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */](object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; - function Fields(props, context) { - _classCallCheck(this, Fields); + var isCommon = newValue === undefined; - var _this = _possibleConstructorReturn(this, (Fields.__proto__ || Object.getPrototypeOf(Fields)).call(this, props, context)); + if (isCommon) { + var isArr = __WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */](srcValue), + isBuff = !isArr && __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__["a" /* default */](srcValue), + isTyped = !isArr && !isBuff && __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__["a" /* default */](srcValue); - if (!context._reduxForm) { - throw new Error('Fields must be inside a component decorated with reduxForm()'); + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */](objValue)) { + newValue = objValue; } - return _this; - } - - _createClass(Fields, [{ - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState) { - return Object(__WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__["a" /* default */])(this, nextProps, nextState); + else if (__WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__["a" /* default */](objValue)) { + newValue = __WEBPACK_IMPORTED_MODULE_3__copyArray_js__["a" /* default */](objValue); } - }, { - key: 'componentWillMount', - value: function componentWillMount() { - var error = validateNameProp(this.props.names); - if (error) { - throw error; - } - var context = this.context; - var register = context._reduxForm.register; - - this.names.forEach(function (name) { - return register(name, 'Field'); - }); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (!__WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].deepEqual(this.props.names, nextProps.names)) { - var context = this.context; - var _context$_reduxForm = context._reduxForm, - register = _context$_reduxForm.register, - unregister = _context$_reduxForm.unregister; - // unregister old name - - this.props.names.forEach(function (name) { - return unregister(Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name)); - } - // register new name - );nextProps.names.forEach(function (name) { - return register(Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name), 'Field'); - }); - } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - var context = this.context; - var unregister = context._reduxForm.unregister; - - this.props.names.forEach(function (name) { - return unregister(Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name)); - }); - } - }, { - key: 'getRenderedComponent', - value: function getRenderedComponent() { - __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Fields'); - return this.refs.connected.getWrappedInstance().getRenderedComponent(); - } - }, { - key: 'render', - value: function render() { - var context = this.context; - - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(ConnectedFields, _extends({}, this.props, { - names: this.props.names.map(function (name) { - return Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name); - }), - _reduxForm: this.context._reduxForm, - ref: 'connected' - })); + else if (isBuff) { + isCommon = false; + newValue = __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__["a" /* default */](srcValue, true); } - }, { - key: 'names', - get: function get() { - var context = this.context; - - return this.props.names.map(function (name) { - return Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name); - }); + else if (isTyped) { + isCommon = false; + newValue = __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__["a" /* default */](srcValue, true); } - }, { - key: 'dirty', - get: function get() { - return this.refs.connected.getWrappedInstance().isDirty(); + else { + newValue = []; } - }, { - key: 'pristine', - get: function get() { - return !this.dirty; + } + else if (__WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__["a" /* default */](srcValue) || __WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */](srcValue)) { + newValue = objValue; + if (__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */](objValue)) { + newValue = __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__["a" /* default */](objValue); } - }, { - key: 'values', - get: function get() { - return this.refs.connected && this.refs.connected.getWrappedInstance().getValues(); + else if (!__WEBPACK_IMPORTED_MODULE_10__isObject_js__["a" /* default */](objValue) || (srcIndex && __WEBPACK_IMPORTED_MODULE_9__isFunction_js__["a" /* default */](objValue))) { + newValue = __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__["a" /* default */](srcValue); } - }]); - - return Fields; - }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); - - Fields.propTypes = { - names: function names(props, propName) { - return validateNameProp(props[propName]); - }, - component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired, - format: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - parse: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, - props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, - withRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool - }; - Fields.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object - }; + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */](object, key, newValue); +} - return Fields; -}; +/* harmony default export */ __webpack_exports__["a"] = (baseMergeDeep); -/* harmony default export */ __webpack_exports__["a"] = (createFields); /***/ }), -/* 576 */ +/* 540 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createFieldProps__ = __webpack_require__(264); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__structure_plain__ = __webpack_require__(13); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__events_onChangeValue__ = __webpack_require__(265); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(31); -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; +/** Built-in value references. */ +var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + buffer.copy(result); + return result; +} +/* harmony default export */ __webpack_exports__["a"] = (cloneBuffer); -var propsToNotUpdateFor = ['_reduxForm']; +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(172)(module))) -var createConnectedFields = function createConnectedFields(_ref) { - var deepEqual = _ref.deepEqual, - getIn = _ref.getIn, - toJS = _ref.toJS, - size = _ref.size; +/***/ }), +/* 541 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var getSyncError = function getSyncError(syncErrors, name) { - // Because the error for this field might not be at a level in the error structure where - // it can be set directly, it might need to be unwrapped from the _error property - return __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error') || __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].getIn(syncErrors, name); - }; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__ = __webpack_require__(542); - var getSyncWarning = function getSyncWarning(syncWarnings, name) { - var warning = getIn(syncWarnings, name - // Because the warning for this field might not be at a level in the warning structure where - // it can be set directly, it might need to be unwrapped from the _warning property - );return warning && warning._warning ? warning._warning : warning; - }; - var ConnectedFields = function (_Component) { - _inherits(ConnectedFields, _Component); +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__["a" /* default */](typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} - function ConnectedFields(props) { - _classCallCheck(this, ConnectedFields); +/* harmony default export */ __webpack_exports__["a"] = (cloneTypedArray); - var _this = _possibleConstructorReturn(this, (ConnectedFields.__proto__ || Object.getPrototypeOf(ConnectedFields)).call(this, props)); - _this.handleChange = _this.handleChange.bind(_this); - _this.handleFocus = _this.handleFocus.bind(_this); - _this.handleBlur = _this.handleBlur.bind(_this); +/***/ }), +/* 542 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - _this.onChangeFns = props.names.reduce(function (acc, name) { - acc[name] = function (event) { - return _this.handleChange(name, event); - }; - return acc; - }, {}); +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__ = __webpack_require__(272); - _this.onFocusFns = props.names.reduce(function (acc, name) { - acc[name] = function () { - return _this.handleFocus(name); - }; - return acc; - }, {}); - _this.onBlurFns = props.names.reduce(function (acc, name) { - acc[name] = function (event) { - return _this.handleBlur(name, event); - }; - return acc; - }, {}); - return _this; - } +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](result).set(new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](arrayBuffer)); + return result; +} - _createClass(ConnectedFields, [{ - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - var _this2 = this; +/* harmony default export */ __webpack_exports__["a"] = (cloneArrayBuffer); - if (this.props.names !== nextProps.names && (size(this.props.names) !== size(nextProps.names) || nextProps.names.some(function (nextName) { - return !_this2.props._fields[nextName]; - }))) { - // names is changed. The cached event handlers need to be updated - this.onChangeFns = nextProps.names.reduce(function (acc, name) { - acc[name] = function (event) { - return _this2.handleChange(name, event); - }; - return acc; - }, {}); - this.onFocusFns = nextProps.names.reduce(function (acc, name) { - acc[name] = function () { - return _this2.handleFocus(name); - }; - return acc; - }, {}); +/***/ }), +/* 543 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - this.onBlurFns = nextProps.names.reduce(function (acc, name) { - acc[name] = function (event) { - return _this2.handleBlur(name, event); - }; - return acc; - }, {}); - } - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps) { - var _this3 = this; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(544); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(255); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isPrototype_js__ = __webpack_require__(173); - var nextPropsKeys = Object.keys(nextProps); - var thisPropsKeys = Object.keys(this.props); - return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { - return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); - }); - } - }, { - key: 'isDirty', - value: function isDirty() { - var _fields = this.props._fields; - return Object.keys(_fields).some(function (name) { - return _fields[name].dirty; - }); - } - }, { - key: 'getValues', - value: function getValues() { - var _fields = this.props._fields; - return Object.keys(_fields).reduce(function (accumulator, name) { - return __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].setIn(accumulator, name, _fields[name].value); - }, {}); - } - }, { - key: 'getRenderedComponent', - value: function getRenderedComponent() { - return this.refs.renderedComponent; - } - }, { - key: 'handleChange', - value: function handleChange(name, event) { - var _props = this.props, - dispatch = _props.dispatch, - parse = _props.parse, - normalize = _props.normalize, - _reduxForm = _props._reduxForm; - var value = Object(__WEBPACK_IMPORTED_MODULE_5__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize }); +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !__WEBPACK_IMPORTED_MODULE_2__isPrototype_js__["a" /* default */](object)) + ? __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */](object)) + : {}; +} - dispatch(_reduxForm.change(name, value)); - } - }, { - key: 'handleFocus', - value: function handleFocus(name) { - var _props2 = this.props, - dispatch = _props2.dispatch, - _reduxForm = _props2._reduxForm; +/* harmony default export */ __webpack_exports__["a"] = (initCloneObject); - dispatch(_reduxForm.focus(name)); - } - }, { - key: 'handleBlur', - value: function handleBlur(name, event) { - var _props3 = this.props, - dispatch = _props3.dispatch, - parse = _props3.parse, - normalize = _props3.normalize, - _reduxForm = _props3._reduxForm; - var value = Object(__WEBPACK_IMPORTED_MODULE_5__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize } +/***/ }), +/* 544 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // dispatch blur action - );dispatch(_reduxForm.blur(name, value) +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(47); - // call post-blur callback - );if (_reduxForm.asyncValidate) { - _reduxForm.asyncValidate(name, value); - } - } - }, { - key: 'render', - value: function render() { - var _this4 = this; - var _props4 = this.props, - component = _props4.component, - withRef = _props4.withRef, - _fields = _props4._fields, - _reduxForm = _props4._reduxForm, - rest = _objectWithoutProperties(_props4, ['component', 'withRef', '_fields', '_reduxForm']); +/** Built-in value references. */ +var objectCreate = Object.create; - var sectionPrefix = _reduxForm.sectionPrefix, - form = _reduxForm.form; +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); - var _Object$keys$reduce = Object.keys(_fields).reduce(function (accumulator, name) { - var connectedProps = _fields[name]; +/* harmony default export */ __webpack_exports__["a"] = (baseCreate); - var _createFieldProps = Object(__WEBPACK_IMPORTED_MODULE_3__createFieldProps__["a" /* default */])({ getIn: getIn, toJS: toJS }, name, _extends({}, connectedProps, rest, { - form: form, - onBlur: _this4.onBlurFns[name], - onChange: _this4.onChangeFns[name], - onFocus: _this4.onFocusFns[name] - })), - custom = _createFieldProps.custom, - fieldProps = _objectWithoutProperties(_createFieldProps, ['custom']); - accumulator.custom = custom; - var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; - return __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].setIn(accumulator, fieldName, fieldProps); - }, {}), - custom = _Object$keys$reduce.custom, - props = _objectWithoutProperties(_Object$keys$reduce, ['custom']); +/***/ }), +/* 545 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (withRef) { - props.ref = 'renderedComponent'; - } +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(71); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59); - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, props, custom)); - } - }]); - return ConnectedFields; - }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); - ConnectedFields.propTypes = { - component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired, - _fields: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired, - props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object - }; +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; - var connector = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(function (state, ownProps) { - var names = ownProps.names, - _ownProps$_reduxForm = ownProps._reduxForm, - initialValues = _ownProps$_reduxForm.initialValues, - getFormState = _ownProps$_reduxForm.getFormState; +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) == argsTag; +} - var formState = getFormState(state); - return { - _fields: names.reduce(function (accumulator, name) { - var initialState = getIn(formState, 'initial.' + name); - var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); - var value = getIn(formState, 'values.' + name); - var syncError = getSyncError(getIn(formState, 'syncErrors'), name); - var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); - var submitting = getIn(formState, 'submitting'); - var pristine = value === initial; - accumulator[name] = { - asyncError: getIn(formState, 'asyncErrors.' + name), - asyncValidating: getIn(formState, 'asyncValidating') === name, - dirty: !pristine, - pristine: pristine, - state: getIn(formState, 'fields.' + name), - submitError: getIn(formState, 'submitErrors.' + name), - submitFailed: getIn(formState, 'submitFailed'), - submitting: submitting, - syncError: syncError, - syncWarning: syncWarning, - value: value, - _value: ownProps.value // save value passed in (for checkboxes) - }; - return accumulator; - }, {}) - }; - }, undefined, undefined, { withRef: true }); - return connector(ConnectedFields); -}; +/* harmony default export */ __webpack_exports__["a"] = (baseIsArguments); -/* harmony default export */ __webpack_exports__["a"] = (createConnectedFields); /***/ }), -/* 577 */ +/* 546 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFieldArray__ = __webpack_require__(578); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(118); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59); + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isArrayLikeObject); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFieldArray__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); /***/ }), -/* 578 */ +/* 547 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(82); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConnectedFieldArray__ = __webpack_require__(579); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(85); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +/* harmony default export */ __webpack_exports__["a"] = (stubFalse); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +/***/ }), +/* 548 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(71); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(175); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(59); +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; -var toArray = function toArray(value) { - return Array.isArray(value) ? value : [value]; -}; - -var wrapError = function wrapError(fn, key) { - return fn && function () { - var validators = toArray(fn); - for (var i = 0; i < validators.length; i++) { - var result = validators[i].apply(validators, arguments); - if (result) { - return _defineProperty({}, key, result); - } - } - }; -}; - -var createFieldArray = function createFieldArray(_ref2) { - var deepEqual = _ref2.deepEqual, - getIn = _ref2.getIn, - size = _ref2.size; - - var ConnectedFieldArray = Object(__WEBPACK_IMPORTED_MODULE_3__ConnectedFieldArray__["a" /* default */])({ - deepEqual: deepEqual, - getIn: getIn, - size: size - }); - - var FieldArray = function (_Component) { - _inherits(FieldArray, _Component); - - function FieldArray(props, context) { - _classCallCheck(this, FieldArray); +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; - var _this = _possibleConstructorReturn(this, (FieldArray.__proto__ || Object.getPrototypeOf(FieldArray)).call(this, props, context)); +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; - if (!context._reduxForm) { - throw new Error('FieldArray must be inside a component decorated with reduxForm()'); - } - return _this; - } +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */](value) && + __WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */](value.length) && !!typedArrayTags[__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value)]; +} - _createClass(FieldArray, [{ - key: 'componentWillMount', - value: function componentWillMount() { - var _this2 = this; +/* harmony default export */ __webpack_exports__["a"] = (baseIsTypedArray); - this.context._reduxForm.register(this.name, 'FieldArray', function () { - return wrapError(_this2.props.validate, '_error'); - }, function () { - return wrapError(_this2.props.warn, '_warning'); - }); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (this.props.name !== nextProps.name) { - // unregister old name - this.context._reduxForm.unregister(this.name - // register new name - );this.context._reduxForm.register(Object(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */])(this.context, nextProps.name), 'FieldArray'); - } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.context._reduxForm.unregister(this.name); - } - }, { - key: 'getRenderedComponent', - value: function getRenderedComponent() { - __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to FieldArray'); - return this.refs.connected.getWrappedInstance().getRenderedComponent(); - } - }, { - key: 'render', - value: function render() { - return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(ConnectedFieldArray, _extends({}, this.props, { - name: this.name, - syncError: this.syncError, - syncWarning: this.syncWarning, - _reduxForm: this.context._reduxForm, - ref: 'connected' - })); - } - }, { - key: 'name', - get: function get() { - return Object(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */])(this.context, this.props.name); - } - }, { - key: 'dirty', - get: function get() { - return this.refs.connected.getWrappedInstance().dirty; - } - }, { - key: 'pristine', - get: function get() { - return this.refs.connected.getWrappedInstance().pristine; - } - }, { - key: 'value', - get: function get() { - return this.refs.connected.getWrappedInstance().value; - } - }]); - return FieldArray; - }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); +/***/ }), +/* 549 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - FieldArray.propTypes = { - name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired, - component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired, - props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, - validate: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]), - warn: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]), - withRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool - }; - FieldArray.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object +"use strict"; +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); }; +} - return FieldArray; -}; +/* harmony default export */ __webpack_exports__["a"] = (baseUnary); -/* harmony default export */ __webpack_exports__["a"] = (createFieldArray); /***/ }), -/* 579 */ +/* 550 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__ = __webpack_require__(277); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_redux__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_redux__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_redux__ = __webpack_require__(160); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__createFieldArrayProps__ = __webpack_require__(594); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__structure_plain__ = __webpack_require__(13); - - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - - +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(254); +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */].process; -var propsToNotUpdateFor = ['_reduxForm', 'value']; +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); -var createConnectedFieldArray = function createConnectedFieldArray(_ref) { - var deepEqual = _ref.deepEqual, - getIn = _ref.getIn, - size = _ref.size; +/* harmony default export */ __webpack_exports__["a"] = (nodeUtil); - var getSyncError = function getSyncError(syncErrors, name) { - // For an array, the error can _ONLY_ be under _error. - // This is why this getSyncError is not the same as the - // one in Field. - return __WEBPACK_IMPORTED_MODULE_6__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error'); - }; +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(172)(module))) - var getSyncWarning = function getSyncWarning(syncWarnings, name) { - // For an array, the warning can _ONLY_ be under _warning. - // This is why this getSyncError is not the same as the - // one in Field. - return getIn(syncWarnings, name + '._warning'); - }; +/***/ }), +/* 551 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var ConnectedFieldArray = function (_Component) { - _inherits(ConnectedFieldArray, _Component); +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(552); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keysIn_js__ = __webpack_require__(273); - function ConnectedFieldArray() { - _classCallCheck(this, ConnectedFieldArray); - var _this = _possibleConstructorReturn(this, (ConnectedFieldArray.__proto__ || Object.getPrototypeOf(ConnectedFieldArray)).call(this)); - _this.getValue = _this.getValue.bind(_this); - return _this; - } +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return __WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */](value, __WEBPACK_IMPORTED_MODULE_1__keysIn_js__["a" /* default */](value)); +} - _createClass(ConnectedFieldArray, [{ - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps) { - var _this2 = this; +/* harmony default export */ __webpack_exports__["a"] = (toPlainObject); - // Update if the elements of the value array was updated. - var thisValue = this.props.value; - var nextValue = nextProps.value; - if (thisValue && nextValue) { - if (thisValue.length !== nextValue.length || nextProps.rerenderOnEveryChange && thisValue.some(function (val) { - return nextValue.every(function (next) { - return !deepEqual(val, next); - }); - })) { - return true; - } - } +/***/ }), +/* 552 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var nextPropsKeys = Object.keys(nextProps); - var thisPropsKeys = Object.keys(this.props); - return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { - // useful to debug rerenders - // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { - // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) - // } - return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); - }); - } - }, { - key: 'getRenderedComponent', - value: function getRenderedComponent() { - return this.refs.renderedComponent; - } - }, { - key: 'getValue', - value: function getValue(index) { - return this.props.value && getIn(this.props.value, index); - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - component = _props.component, - withRef = _props.withRef, - name = _props.name, - _reduxForm = _props._reduxForm, - validate = _props.validate, - warn = _props.warn, - rerenderOnEveryChange = _props.rerenderOnEveryChange, - rest = _objectWithoutProperties(_props, ['component', 'withRef', 'name', '_reduxForm', 'validate', 'warn', 'rerenderOnEveryChange']); +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignValue_js__ = __webpack_require__(553); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__ = __webpack_require__(117); - var props = Object(__WEBPACK_IMPORTED_MODULE_5__createFieldArrayProps__["a" /* default */])(getIn, name, _reduxForm.form, _reduxForm.sectionPrefix, this.getValue, rest); - if (withRef) { - props.ref = 'renderedComponent'; - } - return Object(__WEBPACK_IMPORTED_MODULE_1_react__["createElement"])(component, props); - } - }, { - key: 'dirty', - get: function get() { - return this.props.dirty; - } - }, { - key: 'pristine', - get: function get() { - return this.props.pristine; - } - }, { - key: 'value', - get: function get() { - return this.props.value; - } - }]); - return ConnectedFieldArray; - }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); - ConnectedFieldArray.propTypes = { - component: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string]).isRequired, - props: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object, - rerenderOnEveryChange: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool - }; +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); - ConnectedFieldArray.defaultProps = { - rerenderOnEveryChange: false - }; + var index = -1, + length = props.length; - ConnectedFieldArray.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object - }; + while (++index < length) { + var key = props[index]; - var connector = Object(__WEBPACK_IMPORTED_MODULE_3_react_redux__["connect"])(function (state, ownProps) { - var name = ownProps.name, - _ownProps$_reduxForm = ownProps._reduxForm, - initialValues = _ownProps$_reduxForm.initialValues, - getFormState = _ownProps$_reduxForm.getFormState; + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; - var formState = getFormState(state); - var initial = getIn(formState, 'initial.' + name) || initialValues && getIn(initialValues, name); - var value = getIn(formState, 'values.' + name); - var submitting = getIn(formState, 'submitting'); - var syncError = getSyncError(getIn(formState, 'syncErrors'), name); - var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); - var pristine = deepEqual(value, initial); - return { - asyncError: getIn(formState, 'asyncErrors.' + name + '._error'), - dirty: !pristine, - pristine: pristine, - state: getIn(formState, 'fields.' + name), - submitError: getIn(formState, 'submitErrors.' + name + '._error'), - submitFailed: getIn(formState, 'submitFailed'), - submitting: submitting, - syncError: syncError, - syncWarning: syncWarning, - value: value, - length: size(value) - }; - }, function (dispatch, ownProps) { - var name = ownProps.name, - _reduxForm = ownProps._reduxForm; - var arrayInsert = _reduxForm.arrayInsert, - arrayMove = _reduxForm.arrayMove, - arrayPop = _reduxForm.arrayPop, - arrayPush = _reduxForm.arrayPush, - arrayRemove = _reduxForm.arrayRemove, - arrayRemoveAll = _reduxForm.arrayRemoveAll, - arrayShift = _reduxForm.arrayShift, - arraySplice = _reduxForm.arraySplice, - arraySwap = _reduxForm.arraySwap, - arrayUnshift = _reduxForm.arrayUnshift; + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__["a" /* default */](object, key, newValue); + } else { + __WEBPACK_IMPORTED_MODULE_0__assignValue_js__["a" /* default */](object, key, newValue); + } + } + return object; +} - return Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__["a" /* default */])({ - arrayInsert: arrayInsert, - arrayMove: arrayMove, - arrayPop: arrayPop, - arrayPush: arrayPush, - arrayRemove: arrayRemove, - arrayRemoveAll: arrayRemoveAll, - arrayShift: arrayShift, - arraySplice: arraySplice, - arraySwap: arraySwap, - arrayUnshift: arrayUnshift - }, function (actionCreator) { - return Object(__WEBPACK_IMPORTED_MODULE_4_redux__["bindActionCreators"])(actionCreator.bind(null, name), dispatch); - }); - }, undefined, { withRef: true }); - return connector(ConnectedFieldArray); -}; +/* harmony default export */ __webpack_exports__["a"] = (copyObject); -/* harmony default export */ __webpack_exports__["a"] = (createConnectedFieldArray); /***/ }), -/* 580 */ +/* 553 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFor_js__ = __webpack_require__(279); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(117); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(85); + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * The base implementation of `_.forOwn` without support for iteratee shorthands. + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ -function baseForOwn(object, iteratee) { - return object && Object(__WEBPACK_IMPORTED_MODULE_0__baseFor_js__["a" /* default */])(object, iteratee, __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]); +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && __WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */](objValue, value)) || + (value === undefined && !(key in object))) { + __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](object, key, value); + } } -/* harmony default export */ __webpack_exports__["a"] = (baseForOwn); +/* harmony default export */ __webpack_exports__["a"] = (assignValue); /***/ }), -/* 581 */ +/* 554 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. * * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; + while (++index < n) { + result[index] = iteratee(index); + } + return result; } -/* harmony default export */ __webpack_exports__["a"] = (createBaseFor); +/* harmony default export */ __webpack_exports__["a"] = (baseTimes); /***/ }), -/* 582 */ +/* 555 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__ = __webpack_require__(583); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__ = __webpack_require__(586); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(178); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(35); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__property_js__ = __webpack_require__(591); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__ = __webpack_require__(173); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__ = __webpack_require__(556); +/** Used for built-in method references. */ +var objectProto = Object.prototype; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * The base implementation of `_.iteratee`. + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */]; +function baseKeysIn(object) { + if (!__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](object)) { + return __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__["a" /* default */](object); } - if (typeof value == 'object') { - return Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(value) - ? Object(__WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__["a" /* default */])(value[0], value[1]) - : Object(__WEBPACK_IMPORTED_MODULE_0__baseMatches_js__["a" /* default */])(value); + var isProto = __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__["a" /* default */](object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } } - return Object(__WEBPACK_IMPORTED_MODULE_4__property_js__["a" /* default */])(value); + return result; } -/* harmony default export */ __webpack_exports__["a"] = (baseIteratee); +/* harmony default export */ __webpack_exports__["a"] = (baseKeysIn); /***/ }), -/* 583 */ +/* 556 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__ = __webpack_require__(584); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__ = __webpack_require__(585); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__ = __webpack_require__(281); - - - - /** - * The base implementation of `_.matches` which doesn't clone `source`. + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. * * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. */ -function baseMatches(source) { - var matchData = Object(__WEBPACK_IMPORTED_MODULE_1__getMatchData_js__["a" /* default */])(source); - if (matchData.length == 1 && matchData[0][2]) { - return Object(__WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__["a" /* default */])(matchData[0][0], matchData[0][1]); +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } } - return function(object) { - return object === source || Object(__WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__["a" /* default */])(object, source, matchData); - }; + return result; } -/* harmony default export */ __webpack_exports__["a"] = (baseMatches); +/* harmony default export */ __webpack_exports__["a"] = (nativeKeysIn); /***/ }), -/* 584 */ +/* 557 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(168); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__ = __webpack_require__(167); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(558); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(565); -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - /** - * The base implementation of `_.isMatch` without support for iteratee shorthands. + * Creates a function like `_.assign`. * * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; +function createAssigner(assigner) { + return __WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */](function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? Object(__WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__["a" /* default */])(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; + if (guard && __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */](sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); } } - } - return true; + return object; + }); } -/* harmony default export */ __webpack_exports__["a"] = (baseIsMatch); +/* harmony default export */ __webpack_exports__["a"] = (createAssigner); /***/ }), -/* 585 */ +/* 558 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__ = __webpack_require__(280); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(179); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__overRest_js__ = __webpack_require__(559); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setToString_js__ = __webpack_require__(561); + /** - * Gets the property names, values, and compare flags of `object`. + * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. */ -function getMatchData(object) { - var result = Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */])(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, Object(__WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__["a" /* default */])(value)]; - } - return result; +function baseRest(func, start) { + return __WEBPACK_IMPORTED_MODULE_2__setToString_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__overRest_js__["a" /* default */](func, start, __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */]), func + ''); } -/* harmony default export */ __webpack_exports__["a"] = (getMatchData); +/* harmony default export */ __webpack_exports__["a"] = (baseRest); /***/ }), -/* 586 */ +/* 559 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(167); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__get_js__ = __webpack_require__(587); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hasIn_js__ = __webpack_require__(588); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isKey_js__ = __webpack_require__(177); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__ = __webpack_require__(280); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__ = __webpack_require__(281); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toKey_js__ = __webpack_require__(87); - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(560); +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return __WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */](func, this, otherArgs); + }; +} +/* harmony default export */ __webpack_exports__["a"] = (overRest); -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; +/***/ }), +/* 560 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; /** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. * * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. */ -function baseMatchesProperty(path, srcValue) { - if (Object(__WEBPACK_IMPORTED_MODULE_3__isKey_js__["a" /* default */])(path) && Object(__WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__["a" /* default */])(srcValue)) { - return Object(__WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_6__toKey_js__["a" /* default */])(path), srcValue); +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); } - return function(object) { - var objValue = Object(__WEBPACK_IMPORTED_MODULE_1__get_js__["a" /* default */])(object, path); - return (objValue === undefined && objValue === srcValue) - ? Object(__WEBPACK_IMPORTED_MODULE_2__hasIn_js__["a" /* default */])(object, path) - : Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */])(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; + return func.apply(thisArg, args); } -/* harmony default export */ __webpack_exports__["a"] = (baseMatchesProperty); +/* harmony default export */ __webpack_exports__["a"] = (apply); /***/ }), -/* 587 */ +/* 561 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(282); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__ = __webpack_require__(562); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shortOut_js__ = __webpack_require__(564); + /** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 + * Sets the `toString` method of `func` to return `string`. * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : Object(__WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */])(object, path); - return result === undefined ? defaultValue : result; -} +var setToString = __WEBPACK_IMPORTED_MODULE_1__shortOut_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__["a" /* default */]); -/* harmony default export */ __webpack_exports__["a"] = (get); +/* harmony default export */ __webpack_exports__["a"] = (setToString); /***/ }), -/* 588 */ +/* 562 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__ = __webpack_require__(589); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasPath_js__ = __webpack_require__(590); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(563); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__ = __webpack_require__(270); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(179); + /** - * Checks if `path` is a direct or inherited property of `object`. + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */] : function(func, string) { + return __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */](func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': __WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */](string), + 'writable': true + }); +}; + +/* harmony default export */ __webpack_exports__["a"] = (baseSetToString); + + +/***/ }), +/* 563 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a function that returns `value`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. * @example * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true + * var objects = _.times(2, _.constant({ 'a': 1 })); * - * _.hasIn(object, 'a.b'); - * // => true + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] * - * _.hasIn(object, ['a', 'b']); + * console.log(objects[0] === objects[1]); * // => true - * - * _.hasIn(object, 'b'); - * // => false */ -function hasIn(object, path) { - return object != null && Object(__WEBPACK_IMPORTED_MODULE_1__hasPath_js__["a" /* default */])(object, path, __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__["a" /* default */]); +function constant(value) { + return function() { + return value; + }; } -/* harmony default export */ __webpack_exports__["a"] = (hasIn); +/* harmony default export */ __webpack_exports__["a"] = (constant); /***/ }), -/* 589 */ +/* 564 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + /** - * The base implementation of `_.hasIn` without support for deep paths. + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. * * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. */ -function baseHasIn(object, key) { - return object != null && key in Object(object); +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; } -/* harmony default export */ __webpack_exports__["a"] = (baseHasIn); +/* harmony default export */ __webpack_exports__["a"] = (shortOut); /***/ }), -/* 590 */ +/* 565 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(283); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(170); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(35); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isIndex_js__ = __webpack_require__(173); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isLength_js__ = __webpack_require__(175); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(87); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(85); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(118); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isIndex_js__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isObject_js__ = __webpack_require__(47); + + + + + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!__WEBPACK_IMPORTED_MODULE_3__isObject_js__["a" /* default */](object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */](object) && __WEBPACK_IMPORTED_MODULE_2__isIndex_js__["a" /* default */](index, object.length)) + : (type == 'string' && index in object) + ) { + return __WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */](object[index], value); + } + return false; +} +/* harmony default export */ __webpack_exports__["a"] = (isIterateeCall); +/***/ }), +/* 566 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFor_js__ = __webpack_require__(271); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(180); /** - * Checks if `path` exists on `object`. + * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. */ -function hasPath(object, path, hasFunc) { - path = Object(__WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */])(path, object); +function baseForOwn(object, iteratee) { + return object && __WEBPACK_IMPORTED_MODULE_0__baseFor_js__["a" /* default */](object, iteratee, __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]); +} - var index = -1, - length = path.length, - result = false; +/* harmony default export */ __webpack_exports__["a"] = (baseForOwn); - while (++index < length) { - var key = Object(__WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */])(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; + +/***/ }), +/* 567 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPrototype_js__ = __webpack_require__(173); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__ = __webpack_require__(568); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!__WEBPACK_IMPORTED_MODULE_0__isPrototype_js__["a" /* default */](object)) { + return __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__["a" /* default */](object); } - if (result || ++index != length) { - return result; + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } } - length = object == null ? 0 : object.length; - return !!length && Object(__WEBPACK_IMPORTED_MODULE_4__isLength_js__["a" /* default */])(length) && Object(__WEBPACK_IMPORTED_MODULE_3__isIndex_js__["a" /* default */])(key, length) && - (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(object) || Object(__WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */])(object)); + return result; } -/* harmony default export */ __webpack_exports__["a"] = (hasPath); +/* harmony default export */ __webpack_exports__["a"] = (baseKeys); /***/ }), -/* 591 */ +/* 568 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(256); + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = __WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */](Object.keys, Object); + +/* harmony default export */ __webpack_exports__["a"] = (nativeKeys); + + +/***/ }), +/* 569 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__ = __webpack_require__(592); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__ = __webpack_require__(593); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isKey_js__ = __webpack_require__(177); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toKey_js__ = __webpack_require__(87); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__ = __webpack_require__(570); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__ = __webpack_require__(594); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(179); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__property_js__ = __webpack_require__(599); + /** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] + * The base implementation of `_.iteratee`. * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. */ -function property(path) { - return Object(__WEBPACK_IMPORTED_MODULE_2__isKey_js__["a" /* default */])(path) ? Object(__WEBPACK_IMPORTED_MODULE_0__baseProperty_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__toKey_js__["a" /* default */])(path)) : Object(__WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__["a" /* default */])(path); +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */]; + } + if (typeof value == 'object') { + return __WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */](value) + ? __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__["a" /* default */](value[0], value[1]) + : __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__["a" /* default */](value); + } + return __WEBPACK_IMPORTED_MODULE_4__property_js__["a" /* default */](value); } -/* harmony default export */ __webpack_exports__["a"] = (property); +/* harmony default export */ __webpack_exports__["a"] = (baseIteratee); /***/ }), -/* 592 */ +/* 570 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__ = __webpack_require__(571); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__ = __webpack_require__(593); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__ = __webpack_require__(278); + + + + /** - * The base implementation of `_.property` without support for deep paths. + * The base implementation of `_.matches` which doesn't clone `source`. * * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. */ -function baseProperty(key) { +function baseMatches(source) { + var matchData = __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__["a" /* default */](source); + if (matchData.length == 1 && matchData[0][2]) { + return __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__["a" /* default */](matchData[0][0], matchData[0][1]); + } return function(object) { - return object == null ? undefined : object[key]; + return object === source || __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__["a" /* default */](object, source, matchData); }; } -/* harmony default export */ __webpack_exports__["a"] = (baseProperty); +/* harmony default export */ __webpack_exports__["a"] = (baseMatches); /***/ }), -/* 593 */ +/* 571 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(282); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__ = __webpack_require__(181); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + /** - * A specialized version of `baseProperty` which supports deep paths. + * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ -function basePropertyDeep(path) { - return function(object) { - return Object(__WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */])(object, path); - }; +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__["a" /* default */](srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; } -/* harmony default export */ __webpack_exports__["a"] = (basePropertyDeep); +/* harmony default export */ __webpack_exports__["a"] = (baseIsMatch); /***/ }), -/* 594 */ +/* 572 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__ = __webpack_require__(276); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__ = __webpack_require__(578); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__ = __webpack_require__(581); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getTag_js__ = __webpack_require__(588); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArray_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__ = __webpack_require__(177); -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -var createFieldArrayProps = function createFieldArrayProps(getIn, name, form, sectionPrefix, getValue, _ref) { - var arrayInsert = _ref.arrayInsert, - arrayMove = _ref.arrayMove, - arrayPop = _ref.arrayPop, - arrayPush = _ref.arrayPush, - arrayRemove = _ref.arrayRemove, - arrayRemoveAll = _ref.arrayRemoveAll, - arrayShift = _ref.arrayShift, - arraySplice = _ref.arraySplice, - arraySwap = _ref.arraySwap, - arrayUnshift = _ref.arrayUnshift, - asyncError = _ref.asyncError, - dirty = _ref.dirty, - length = _ref.length, - pristine = _ref.pristine, - submitError = _ref.submitError, - state = _ref.state, - submitFailed = _ref.submitFailed, - submitting = _ref.submitting, - syncError = _ref.syncError, - syncWarning = _ref.syncWarning, - value = _ref.value, - props = _ref.props, - rest = _objectWithoutProperties(_ref, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncError', 'dirty', 'length', 'pristine', 'submitError', 'state', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'value', 'props']); - - var error = syncError || asyncError || submitError; - var warning = syncWarning; - var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; - var finalProps = _extends({ - fields: { - _isFieldArray: true, - forEach: function forEach(callback) { - return (value || []).forEach(function (item, index) { - return callback(fieldName + '[' + index + ']', index, finalProps.fields); - }); - }, - get: getValue, - getAll: function getAll() { - return value; - }, - insert: arrayInsert, - length: length, - map: function map(callback) { - return (value || []).map(function (item, index) { - return callback(fieldName + '[' + index + ']', index, finalProps.fields); - }); - }, - move: arrayMove, - name: name, - pop: function pop() { - arrayPop(); - return getIn(value, length - 1); - }, - push: arrayPush, - reduce: function reduce(callback, initial) { - return (value || []).reduce(function (accumulator, item, index) { - return callback(accumulator, fieldName + '[' + index + ']', index, finalProps.fields); - }, initial); - }, - remove: arrayRemove, - removeAll: arrayRemoveAll, - shift: function shift() { - arrayShift(); - return getIn(value, 0); - }, - swap: arraySwap, - unshift: arrayUnshift - }, - meta: { - dirty: dirty, - error: error, - form: form, - warning: warning, - invalid: !!error, - pristine: pristine, - submitting: submitting, - submitFailed: submitFailed, - valid: !error - } - }, props, rest); - return finalProps; -}; - -/* harmony default export */ __webpack_exports__["a"] = (createFieldArrayProps); -/***/ }), -/* 595 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFormValueSelector__ = __webpack_require__(596); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFormValueSelector__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); -/***/ }), -/* 596 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(82); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; +/** Used for built-in method references. */ +var objectProto = Object.prototype; -var createFormValueSelector = function createFormValueSelector(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; - __WEBPACK_IMPORTED_MODULE_0_invariant___default()(form, 'Form value must be specified'); - return function (state) { - for (var _len = arguments.length, fields = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - fields[_key - 1] = arguments[_key]; - } +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = __WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */](object), + othIsArr = __WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */](other), + objTag = objIsArr ? arrayTag : __WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */](object), + othTag = othIsArr ? arrayTag : __WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */](other); - __WEBPACK_IMPORTED_MODULE_0_invariant___default()(fields.length, 'No fields specified'); - return fields.length === 1 ? // only selecting one field, so return its value - getIn(getFormState(state), form + '.values.' + fields[0]) : // selecting many fields, so return an object of field values - fields.reduce(function (accumulator, field) { - var value = getIn(getFormState(state), form + '.values.' + field); - return value === undefined ? accumulator : __WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */].setIn(accumulator, field, value); - }, {}); - }; - }; -}; + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; -/* harmony default export */ __webpack_exports__["a"] = (createFormValueSelector); + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; -/***/ }), -/* 597 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (isSameTag && __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */](object)) { + if (!__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */](other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return (objIsArr || __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__["a" /* default */](object)) + ? __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__["a" /* default */](object, other, bitmask, customizer, equalFunc, stack) + : __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__["a" /* default */](object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFormValues__ = __webpack_require__(598); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__["a" /* default */](object, other, bitmask, customizer, equalFunc, stack); +} +/* harmony default export */ __webpack_exports__["a"] = (baseIsEqualDeep); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFormValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); /***/ }), -/* 598 */ +/* 573 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_prefixName__ = __webpack_require__(85); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(168); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__ = __webpack_require__(574); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__ = __webpack_require__(575); -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; + while (++index < length) { + this.add(values[index]); + } +} +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__["a" /* default */]; +SetCache.prototype.has = __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__["a" /* default */]; -var createValues = function createValues(_ref) { - var getIn = _ref.getIn; - return function () { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } +/* harmony default export */ __webpack_exports__["a"] = (SetCache); - var valuesMap = void 0; - if (typeof args[0] === 'string') { - valuesMap = args.map(function (k) { - return { prop: k, path: k }; - }); - } else { - var config = args[0]; - valuesMap = Object.keys(config).map(function (k) { - return { - prop: k, - path: config[k] - }; - }); - } - if (!valuesMap.length) { - throw new Error('formValues(): You must specify values to get as formValues(name1, name2, ...) or formValues({propName1: propPath1, ...})'); - } +/***/ }), +/* 574 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // create a class that reads current form name and creates a selector - // return - return function (Component) { - var FormValues = function (_React$Component) { - _inherits(FormValues, _React$Component); +"use strict"; +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; - function FormValues(props, context) { - _classCallCheck(this, FormValues); +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} - var _this = _possibleConstructorReturn(this, (FormValues.__proto__ || Object.getPrototypeOf(FormValues)).call(this, props, context)); +/* harmony default export */ __webpack_exports__["a"] = (setCacheAdd); - if (!context._reduxForm) { - throw new Error('formValues() must be used inside a React tree decorated with reduxForm()'); - } - var getValues = context._reduxForm.getValues; - - var formValuesSelector = function formValuesSelector(_) { - // Yes, we're only using connect() for listening to updates - var props = {}; - var values = getValues(); - valuesMap.forEach(function (_ref2) { - var prop = _ref2.prop, - path = _ref2.path; - return props[prop] = getIn(values, Object(__WEBPACK_IMPORTED_MODULE_3__util_prefixName__["a" /* default */])(context, path)); - }); - return props; - }; - _this.Component = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(formValuesSelector, function () { - return {}; - } // ignore dispatch - )(Component); - return _this; - } - _createClass(FormValues, [{ - key: 'render', - value: function render() { - return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(this.Component, this.props); - } - }]); +/***/ }), +/* 575 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return FormValues; - }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component); +"use strict"; +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} - FormValues.contextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object - }; - return FormValues; - }; - }; -}; +/* harmony default export */ __webpack_exports__["a"] = (setCacheHas); -/* harmony default export */ __webpack_exports__["a"] = (createValues); /***/ }), -/* 599 */ +/* 576 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormNames__ = __webpack_require__(600); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} +/* harmony default export */ __webpack_exports__["a"] = (arraySome); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormNames__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); /***/ }), -/* 600 */ +/* 577 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var createGetFormNames = function createGetFormNames(_ref) { - var getIn = _ref.getIn, - keys = _ref.keys; - return function () { - var getFormState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return keys(getFormState(state)); - }; - }; -}; +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (cacheHas); -/* harmony default export */ __webpack_exports__["a"] = (createGetFormNames); /***/ }), -/* 601 */ +/* 578 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormValues__ = __webpack_require__(602); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(109); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__ = __webpack_require__(272); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__eq_js__ = __webpack_require__(85); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__ = __webpack_require__(276); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__ = __webpack_require__(579); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__setToArray_js__ = __webpack_require__(580); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); -/***/ }), -/* 602 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -var createGetFormValues = function createGetFormValues(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.values'); - }; - }; -}; -/* harmony default export */ __webpack_exports__["a"] = (createGetFormValues); -/***/ }), -/* 603 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormInitialValues__ = __webpack_require__(604); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; +/** Used to convert symbols to primitives and strings. */ +var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormInitialValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; -/***/ }), -/* 604 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](object), new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](other))) { + return false; + } + return true; -"use strict"; -var createGetFormInitialValues = function createGetFormInitialValues(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.initial'); - }; - }; -}; + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return __WEBPACK_IMPORTED_MODULE_2__eq_js__["a" /* default */](+object, +other); -/* harmony default export */ __webpack_exports__["a"] = (createGetFormInitialValues); + case errorTag: + return object.name == other.name && object.message == other.message; -/***/ }), -/* 605 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncErrors__ = __webpack_require__(606); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); + case mapTag: + var convert = __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__["a" /* default */]; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = __WEBPACK_IMPORTED_MODULE_5__setToArray_js__["a" /* default */]); + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncErrors__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__["a" /* default */](convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; -/***/ }), -/* 606 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} -"use strict"; -var createGetFormSyncErrors = function createGetFormSyncErrors(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.syncErrors'); - }; - }; -}; +/* harmony default export */ __webpack_exports__["a"] = (equalByTag); -/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncErrors); /***/ }), -/* 607 */ +/* 579 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormMeta__ = __webpack_require__(608); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} +/* harmony default export */ __webpack_exports__["a"] = (mapToArray); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormMeta__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); /***/ }), -/* 608 */ +/* 580 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var createGetFormMeta = function createGetFormMeta(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.fields'); - }; - }; -}; +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (setToArray); -/* harmony default export */ __webpack_exports__["a"] = (createGetFormMeta); /***/ }), -/* 609 */ +/* 581 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormAsyncErrors__ = __webpack_require__(610); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__ = __webpack_require__(582); +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormAsyncErrors__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); - -/***/ }), -/* 610 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** Used for built-in method references. */ +var objectProto = Object.prototype; -"use strict"; -var createGetFormAsyncErrors = function createGetFormAsyncErrors(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.asyncErrors'); - }; - }; -}; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -/* harmony default export */ __webpack_exports__["a"] = (createGetFormAsyncErrors); +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */](object), + objLength = objProps.length, + othProps = __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */](other), + othLength = othProps.length; -/***/ }), -/* 611 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncWarnings__ = __webpack_require__(612); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} +/* harmony default export */ __webpack_exports__["a"] = (equalObjects); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncWarnings__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); /***/ }), -/* 612 */ +/* 582 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var createGetFormSyncWarnings = function createGetFormSyncWarnings(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.syncWarnings'); - }; - }; -}; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__ = __webpack_require__(583); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__ = __webpack_require__(585); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(180); -/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncWarnings); -/***/ }), -/* 613 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormSubmitErrors__ = __webpack_require__(614); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__["a" /* default */](object, __WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__["a" /* default */]); +} +/* harmony default export */ __webpack_exports__["a"] = (getAllKeys); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormSubmitErrors__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); /***/ }), -/* 614 */ +/* 583 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var createGetFormSubmitErrors = function createGetFormSubmitErrors(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - return getIn(getFormState(state), form + '.submitErrors'); - }; - }; -}; - -/* harmony default export */ __webpack_exports__["a"] = (createGetFormSubmitErrors); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__ = __webpack_require__(584); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(32); -/***/ }), -/* 615 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isDirty__ = __webpack_require__(616); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return __WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */](object) ? result : __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__["a" /* default */](result, symbolsFunc(object)); +} +/* harmony default export */ __webpack_exports__["a"] = (baseGetAllKeys); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isDirty__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); /***/ }), -/* 616 */ +/* 584 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPristine__ = __webpack_require__(284); +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} -var createIsDirty = function createIsDirty(structure) { - return function (form, getFormState) { - var isPristine = Object(__WEBPACK_IMPORTED_MODULE_0__isPristine__["a" /* default */])(structure)(form, getFormState); - return function (state) { - return !isPristine(state); - }; - }; -}; +/* harmony default export */ __webpack_exports__["a"] = (arrayPush); -/* harmony default export */ __webpack_exports__["a"] = (createIsDirty); /***/ }), -/* 617 */ +/* 585 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isInvalid__ = __webpack_require__(618); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(586); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubArray_js__ = __webpack_require__(587); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isInvalid__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); - -/***/ }), -/* 618 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** Used for built-in method references. */ +var objectProto = Object.prototype; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isValid__ = __webpack_require__(179); +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; -var createIsInvalid = function createIsInvalid(structure) { - return function (form, getFormState) { - var isValid = Object(__WEBPACK_IMPORTED_MODULE_0__isValid__["a" /* default */])(structure)(form, getFormState); - return function (state) { - return !isValid(state); - }; - }; +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? __WEBPACK_IMPORTED_MODULE_1__stubArray_js__["a" /* default */] : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */](nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); }; -/* harmony default export */ __webpack_exports__["a"] = (createIsInvalid); +/* harmony default export */ __webpack_exports__["a"] = (getSymbols); + /***/ }), -/* 619 */ +/* 586 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var getErrorKeys = function getErrorKeys(name, type) { - switch (type) { - case 'Field': - return [name, name + '._error']; - case 'FieldArray': - return [name + '._error']; - default: - throw new Error('Unknown field type'); - } -}; - -var createHasError = function createHasError(_ref) { - var getIn = _ref.getIn; +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; - var hasError = function hasError(field, syncErrors, asyncErrors, submitErrors) { - if (!syncErrors && !asyncErrors && !submitErrors) { - return false; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; } + } + return result; +} - var name = getIn(field, 'name'); - var type = getIn(field, 'type'); - return getErrorKeys(name, type).some(function (key) { - return getIn(syncErrors, key) || getIn(asyncErrors, key) || getIn(submitErrors, key); - }); - }; - return hasError; -}; +/* harmony default export */ __webpack_exports__["a"] = (arrayFilter); -/* harmony default export */ __webpack_exports__["a"] = (createHasError); /***/ }), -/* 620 */ +/* 587 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isPristine__ = __webpack_require__(284); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); - +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} +/* harmony default export */ __webpack_exports__["a"] = (stubArray); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isPristine__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); /***/ }), -/* 621 */ +/* 588 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isValid__ = __webpack_require__(179); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DataView_js__ = __webpack_require__(589); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(170); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Promise_js__ = __webpack_require__(590); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Set_js__ = __webpack_require__(591); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__ = __webpack_require__(592); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__ = __webpack_require__(71); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toSource_js__ = __webpack_require__(267); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isValid__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); -/***/ }), -/* 622 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isSubmitting__ = __webpack_require__(623); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isSubmitting__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; -/***/ }), -/* 623 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var dataViewTag = '[object DataView]'; -"use strict"; -var createIsSubmitting = function createIsSubmitting(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - var formState = getFormState(state); - return getIn(formState, form + '.submitting') || false; - }; +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */]), + mapCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]), + promiseCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */]), + setCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]), + weakMapCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */]; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */](new ArrayBuffer(1))) != dataViewTag) || + (__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]) != mapTag) || + (__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */] && getTag(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */].resolve()) != promiseTag) || + (__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]) != setTag) || + (__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]) != weakMapTag)) { + getTag = function(value) { + var result = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */](value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; }; -}; +} + +/* harmony default export */ __webpack_exports__["a"] = (getTag); -/* harmony default export */ __webpack_exports__["a"] = (createIsSubmitting); /***/ }), -/* 624 */ +/* 589 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitSucceeded__ = __webpack_require__(625); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(31); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitSucceeded__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); - -/***/ }), -/* 625 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* Built-in method references that are verified to be native. */ +var DataView = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'DataView'); -"use strict"; -var createHasSubmitSucceeded = function createHasSubmitSucceeded(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - var formState = getFormState(state); - return getIn(formState, form + '.submitSucceeded') || false; - }; - }; -}; +/* harmony default export */ __webpack_exports__["a"] = (DataView); -/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitSucceeded); /***/ }), -/* 626 */ +/* 590 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitFailed__ = __webpack_require__(627); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(31); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitFailed__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +/* Built-in method references that are verified to be native. */ +var Promise = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Promise'); + +/* harmony default export */ __webpack_exports__["a"] = (Promise); + /***/ }), -/* 627 */ +/* 591 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -var createHasSubmitFailed = function createHasSubmitFailed(_ref) { - var getIn = _ref.getIn; - return function (form) { - var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { - return getIn(state, 'form'); - }; - return function (state) { - var formState = getFormState(state); - return getIn(formState, form + '.submitFailed') || false; - }; - }; -}; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(31); + + + +/* Built-in method references that are verified to be native. */ +var Set = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Set'); + +/* harmony default export */ __webpack_exports__["a"] = (Set); -/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitFailed); /***/ }), -/* 628 */ +/* 592 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createReduxForm__ = __webpack_require__(629); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(31); + +/* Built-in method references that are verified to be native. */ +var WeakMap = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'WeakMap'); + +/* harmony default export */ __webpack_exports__["a"] = (WeakMap); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createReduxForm__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); /***/ }), -/* 629 */ +/* 593 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__ = __webpack_require__(630); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__ = __webpack_require__(277); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(258); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_is_promise__ = __webpack_require__(180); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_is_promise__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_redux__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_redux__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_redux__ = __webpack_require__(160); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__actions__ = __webpack_require__(260); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__asyncValidation__ = __webpack_require__(653); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__defaultShouldAsyncValidate__ = __webpack_require__(261); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__defaultShouldValidate__ = __webpack_require__(262); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__events_silenceEvent__ = __webpack_require__(287); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__events_silenceEvents__ = __webpack_require__(654); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__generateValidator__ = __webpack_require__(655); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__handleSubmit__ = __webpack_require__(656); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__selectors_isValid__ = __webpack_require__(179); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__structure_plain__ = __webpack_require__(13); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__util_getDisplayName__ = __webpack_require__(657); - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__ = __webpack_require__(277); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(180); -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */](object), + length = result.length; -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + while (length--) { + var key = result[length], + value = object[key]; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + result[length] = [key, value, __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__["a" /* default */](value)]; + } + return result; +} -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +/* harmony default export */ __webpack_exports__["a"] = (getMatchData); -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } +/***/ }), +/* 594 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(181); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__get_js__ = __webpack_require__(595); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hasIn_js__ = __webpack_require__(596); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isKey_js__ = __webpack_require__(182); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__ = __webpack_require__(277); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__ = __webpack_require__(278); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toKey_js__ = __webpack_require__(86); @@ -46454,2596 +46949,2395 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (__WEBPACK_IMPORTED_MODULE_3__isKey_js__["a" /* default */](path) && __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__["a" /* default */](srcValue)) { + return __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_6__toKey_js__["a" /* default */](path), srcValue); + } + return function(object) { + var objValue = __WEBPACK_IMPORTED_MODULE_1__get_js__["a" /* default */](object, path); + return (objValue === undefined && objValue === srcValue) + ? __WEBPACK_IMPORTED_MODULE_2__hasIn_js__["a" /* default */](object, path) + : __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */](srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} +/* harmony default export */ __webpack_exports__["a"] = (baseMatchesProperty); +/***/ }), +/* 595 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(279); +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : __WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */](object, path); + return result === undefined ? defaultValue : result; +} +/* harmony default export */ __webpack_exports__["a"] = (get); +/***/ }), +/* 596 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__ = __webpack_require__(597); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasPath_js__ = __webpack_require__(598); -var isClassComponent = function isClassComponent(Component) { - return Boolean(Component && Component.prototype && _typeof(Component.prototype.isReactComponent) === 'object' - // extract field-specific actions - ); -}; -var arrayInsert = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayInsert"], - arrayMove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayMove"], - arrayPop = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPop"], - arrayPush = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPush"], - arrayRemove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemove"], - arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemoveAll"], - arrayShift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayShift"], - arraySplice = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySplice"], - arraySwap = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySwap"], - arrayUnshift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayUnshift"], - blur = __WEBPACK_IMPORTED_MODULE_8__actions__["blur"], - change = __WEBPACK_IMPORTED_MODULE_8__actions__["change"], - focus = __WEBPACK_IMPORTED_MODULE_8__actions__["focus"], - formActions = _objectWithoutProperties(__WEBPACK_IMPORTED_MODULE_8__actions__, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'blur', 'change', 'focus']); -var arrayActions = { - arrayInsert: arrayInsert, - arrayMove: arrayMove, - arrayPop: arrayPop, - arrayPush: arrayPush, - arrayRemove: arrayRemove, - arrayRemoveAll: arrayRemoveAll, - arrayShift: arrayShift, - arraySplice: arraySplice, - arraySwap: arraySwap, - arrayUnshift: arrayUnshift -}; +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && __WEBPACK_IMPORTED_MODULE_1__hasPath_js__["a" /* default */](object, path, __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__["a" /* default */]); +} -var propsToNotUpdateFor = [].concat(_toConsumableArray(Object.keys(__WEBPACK_IMPORTED_MODULE_8__actions__)), ['array', 'asyncErrors', 'initialValues', 'syncErrors', 'syncWarnings', 'values', 'registeredFields']); +/* harmony default export */ __webpack_exports__["a"] = (hasIn); -var checkSubmit = function checkSubmit(submit) { - if (!submit || typeof submit !== 'function') { - throw new Error('You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop'); + +/***/ }), +/* 597 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseHasIn); + + +/***/ }), +/* 598 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(280); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isIndex_js__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isLength_js__ = __webpack_require__(175); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(86); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = __WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */](path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */](path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; } - return submit; -}; + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && __WEBPACK_IMPORTED_MODULE_4__isLength_js__["a" /* default */](length) && __WEBPACK_IMPORTED_MODULE_3__isIndex_js__["a" /* default */](key, length) && + (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](object) || __WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */](object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (hasPath); + + +/***/ }), +/* 599 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__ = __webpack_require__(600); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__ = __webpack_require__(601); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isKey_js__ = __webpack_require__(182); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toKey_js__ = __webpack_require__(86); + + + + /** - * The decorator that is the main API to redux-form + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] */ -var createReduxForm = function createReduxForm(structure) { - var deepEqual = structure.deepEqual, - empty = structure.empty, - getIn = structure.getIn, - setIn = structure.setIn, - keys = structure.keys, - fromJS = structure.fromJS; +function property(path) { + return __WEBPACK_IMPORTED_MODULE_2__isKey_js__["a" /* default */](path) ? __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__toKey_js__["a" /* default */](path)) : __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__["a" /* default */](path); +} - var isValid = Object(__WEBPACK_IMPORTED_MODULE_16__selectors_isValid__["a" /* default */])(structure); - return function (initialConfig) { - var config = _extends({ - touchOnBlur: true, - touchOnChange: false, - persistentSubmitErrors: false, - destroyOnUnmount: true, - shouldAsyncValidate: __WEBPACK_IMPORTED_MODULE_10__defaultShouldAsyncValidate__["a" /* default */], - shouldValidate: __WEBPACK_IMPORTED_MODULE_11__defaultShouldValidate__["a" /* default */], - enableReinitialize: false, - keepDirtyOnReinitialize: false, - getFormState: function getFormState(state) { - return getIn(state, 'form'); - }, - pure: true, - forceUnregisterOnUnmount: false - }, initialConfig); +/* harmony default export */ __webpack_exports__["a"] = (property); - return function (WrappedComponent) { - var Form = function (_Component) { - _inherits(Form, _Component); - function Form(props) { - _classCallCheck(this, Form); +/***/ }), +/* 600 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props)); +"use strict"; +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} - _this.submit = _this.submit.bind(_this); - _this.reset = _this.reset.bind(_this); - _this.asyncValidate = _this.asyncValidate.bind(_this); - _this.getValues = _this.getValues.bind(_this); - _this.register = _this.register.bind(_this); - _this.unregister = _this.unregister.bind(_this); - _this.submitCompleted = _this.submitCompleted.bind(_this); - _this.submitFailed = _this.submitFailed.bind(_this); - _this.fieldValidators = {}; - _this.lastFieldValidatorKeys = []; - _this.fieldWarners = {}; - _this.lastFieldWarnerKeys = []; - return _this; - } +/* harmony default export */ __webpack_exports__["a"] = (baseProperty); - _createClass(Form, [{ - key: 'getChildContext', - value: function getChildContext() { - var _this2 = this; - return { - _reduxForm: _extends({}, this.props, { - getFormState: function getFormState(state) { - return getIn(_this2.props.getFormState(state), _this2.props.form); - }, - asyncValidate: this.asyncValidate, - getValues: this.getValues, - sectionPrefix: undefined, - register: this.register, - unregister: this.unregister, - registerInnerOnSubmit: function registerInnerOnSubmit(innerOnSubmit) { - return _this2.innerOnSubmit = innerOnSubmit; - } - }) - }; - } - }, { - key: 'initIfNeeded', - value: function initIfNeeded(nextProps) { - var enableReinitialize = this.props.enableReinitialize; +/***/ }), +/* 601 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (nextProps) { - if ((enableReinitialize || !nextProps.initialized) && !deepEqual(this.props.initialValues, nextProps.initialValues)) { - var keepDirty = nextProps.initialized && this.props.keepDirtyOnReinitialize; - this.props.initialize(nextProps.initialValues, keepDirty, { - lastInitialValues: this.props.initialValues - }); - } - } else if (this.props.initialValues && (!this.props.initialized || enableReinitialize)) { - this.props.initialize(this.props.initialValues, this.props.keepDirtyOnReinitialize); - } - } - }, { - key: 'updateSyncErrorsIfNeeded', - value: function updateSyncErrorsIfNeeded(nextSyncErrors, nextError, lastSyncErrors) { - var _props = this.props, - error = _props.error, - updateSyncErrors = _props.updateSyncErrors; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(279); - var noErrors = (!lastSyncErrors || !Object.keys(lastSyncErrors).length) && !error; - var nextNoErrors = (!nextSyncErrors || !Object.keys(nextSyncErrors).length) && !nextError; - if (!(noErrors && nextNoErrors) && (!__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(lastSyncErrors, nextSyncErrors) || !__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(error, nextError))) { - updateSyncErrors(nextSyncErrors, nextError); - } - } - }, { - key: 'clearSubmitPromiseIfNeeded', - value: function clearSubmitPromiseIfNeeded(nextProps) { - var submitting = this.props.submitting; - if (this.submitPromise && submitting && !nextProps.submitting) { - delete this.submitPromise; - } - } - }, { - key: 'submitIfNeeded', - value: function submitIfNeeded(nextProps) { - var _props2 = this.props, - clearSubmit = _props2.clearSubmit, - triggerSubmit = _props2.triggerSubmit; +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return __WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */](object, path); + }; +} - if (!triggerSubmit && nextProps.triggerSubmit) { - clearSubmit(); - this.submit(); - } - } - }, { - key: 'validateIfNeeded', - value: function validateIfNeeded(nextProps) { - var _props3 = this.props, - shouldValidate = _props3.shouldValidate, - validate = _props3.validate, - values = _props3.values; +/* harmony default export */ __webpack_exports__["a"] = (basePropertyDeep); - var fieldLevelValidate = this.generateValidator(); - if (validate || fieldLevelValidate) { - var initialRender = nextProps === undefined; - var fieldValidatorKeys = Object.keys(this.getValidators()); - var shouldValidateResult = shouldValidate({ - values: values, - nextProps: nextProps, - props: this.props, - initialRender: initialRender, - lastFieldValidatorKeys: this.lastFieldValidatorKeys, - fieldValidatorKeys: fieldValidatorKeys, - structure: structure - }); - if (shouldValidateResult) { - var propsToValidate = initialRender ? this.props : nextProps; +/***/ }), +/* 602 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var _merge2 = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */])(validate ? validate(propsToValidate.values, propsToValidate) || {} : {}, fieldLevelValidate ? fieldLevelValidate(propsToValidate.values, propsToValidate) || {} : {}), - _error = _merge2._error, - nextSyncErrors = _objectWithoutProperties(_merge2, ['_error']); +"use strict"; +var getDisplayName = function getDisplayName(Comp) { + return Comp.displayName || Comp.name || 'Component'; +}; - this.lastFieldValidatorKeys = fieldValidatorKeys; - this.updateSyncErrorsIfNeeded(nextSyncErrors, _error, propsToValidate.syncErrors); - } - } - } - }, { - key: 'updateSyncWarningsIfNeeded', - value: function updateSyncWarningsIfNeeded(nextSyncWarnings, nextWarning, lastSyncWarnings) { - var _props4 = this.props, - warning = _props4.warning, - syncWarnings = _props4.syncWarnings, - updateSyncWarnings = _props4.updateSyncWarnings; +/* harmony default export */ __webpack_exports__["a"] = (getDisplayName); - var noWarnings = (!syncWarnings || !Object.keys(syncWarnings).length) && !warning; - var nextNoWarnings = (!nextSyncWarnings || !Object.keys(nextSyncWarnings).length) && !nextWarning; - if (!(noWarnings && nextNoWarnings) && (!__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(lastSyncWarnings, nextSyncWarnings) || !__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(warning, nextWarning))) { - updateSyncWarnings(nextSyncWarnings, nextWarning); - } - } - }, { - key: 'warnIfNeeded', - value: function warnIfNeeded(nextProps) { - var _props5 = this.props, - shouldValidate = _props5.shouldValidate, - warn = _props5.warn, - values = _props5.values; +/***/ }), +/* 603 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var fieldLevelWarn = this.generateWarner(); - if (warn || fieldLevelWarn) { - var initialRender = nextProps === undefined; - var fieldWarnerKeys = Object.keys(this.getWarners()); - var shouldWarnResult = shouldValidate({ - values: values, - nextProps: nextProps, - props: this.props, - initialRender: initialRender, - lastFieldValidatorKeys: this.lastFieldWarnerKeys, - fieldValidatorKeys: fieldWarnerKeys, - structure: structure - }); +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubmissionError__ = __webpack_require__(282); +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - if (shouldWarnResult) { - var propsToWarn = initialRender ? this.props : nextProps; +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - var _merge3 = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */])(warn ? warn(propsToWarn.values, propsToWarn) : {}, fieldLevelWarn ? fieldLevelWarn(propsToWarn.values, propsToWarn) : {}), - _warning = _merge3._warning, - nextSyncWarnings = _objectWithoutProperties(_merge3, ['_warning']); - this.lastFieldWarnerKeys = fieldWarnerKeys; - this.updateSyncWarningsIfNeeded(nextSyncWarnings, _warning, propsToWarn.syncWarnings); - } - } - } - }, { - key: 'componentWillMount', - value: function componentWillMount() { - this.initIfNeeded(); - this.validateIfNeeded(); - this.warnIfNeeded(); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - this.initIfNeeded(nextProps); - this.validateIfNeeded(nextProps); - this.warnIfNeeded(nextProps); - this.clearSubmitPromiseIfNeeded(nextProps); - this.submitIfNeeded(nextProps); - if (nextProps.onChange) { - if (!deepEqual(nextProps.values, this.props.values)) { - nextProps.onChange(nextProps.values, nextProps.dispatch, nextProps); - } - } - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps) { - var _this3 = this; - if (!this.props.pure) return true; - var _initialConfig$immuta = initialConfig.immutableProps, - immutableProps = _initialConfig$immuta === undefined ? [] : _initialConfig$immuta; - return Object.keys(nextProps).some(function (prop) { - // useful to debug rerenders - // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { - // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) - // } - if (~immutableProps.indexOf(prop)) { - return _this3.props[prop] !== nextProps[prop]; - } - return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); - }); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - var _props6 = this.props, - destroyOnUnmount = _props6.destroyOnUnmount, - destroy = _props6.destroy; +var handleSubmit = function handleSubmit(submit, props, valid, asyncValidate, fields) { + var dispatch = props.dispatch, + onSubmitFail = props.onSubmitFail, + onSubmitSuccess = props.onSubmitSuccess, + startSubmit = props.startSubmit, + stopSubmit = props.stopSubmit, + setSubmitFailed = props.setSubmitFailed, + setSubmitSucceeded = props.setSubmitSucceeded, + syncErrors = props.syncErrors, + touch = props.touch, + values = props.values, + persistentSubmitErrors = props.persistentSubmitErrors; - if (destroyOnUnmount) { - this.destroyed = true; - destroy(); - } - } - }, { - key: 'getValues', - value: function getValues() { - return this.props.values; - } - }, { - key: 'isValid', - value: function isValid() { - return this.props.valid; + + touch.apply(undefined, _toConsumableArray(fields)); // mark all fields as touched + + if (valid || persistentSubmitErrors) { + var _ret = function () { + var doSubmit = function doSubmit() { + var result = void 0; + try { + result = submit(values, dispatch, props); + } catch (submitError) { + var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; + stopSubmit(error); + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(error, dispatch, submitError, props); } - }, { - key: 'isPristine', - value: function isPristine() { - return this.props.pristine; + if (error || onSubmitFail) { + // if you've provided an onSubmitFail callback, don't re-throw the error + return error; + } else { + throw submitError; } - }, { - key: 'register', - value: function register(name, type, getValidator, getWarner) { - this.props.registerField(name, type); - if (getValidator) { - this.fieldValidators[name] = getValidator; + } + if (__WEBPACK_IMPORTED_MODULE_0_is_promise___default.a(result)) { + startSubmit(); + return result.then(function (submitResult) { + stopSubmit(); + setSubmitSucceeded(); + if (onSubmitSuccess) { + onSubmitSuccess(submitResult, dispatch, props); } - if (getWarner) { - this.fieldWarners[name] = getWarner; + return submitResult; + }, function (submitError) { + var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; + stopSubmit(error); + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(error, dispatch, submitError, props); } - } - }, { - key: 'unregister', - value: function unregister(name) { - if (!this.destroyed) { - if (this.props.destroyOnUnmount || this.props.forceUnregisterOnUnmount) { - this.props.unregisterField(name); - delete this.fieldValidators[name]; - delete this.fieldWarners[name]; - } else { - this.props.unregisterField(name, false); - } + if (error || onSubmitFail) { + // if you've provided an onSubmitFail callback, don't re-throw the error + return error; + } else { + throw submitError; } + }); + } else { + setSubmitSucceeded(); + if (onSubmitSuccess) { + onSubmitSuccess(result, dispatch, props); } - }, { - key: 'getFieldList', - value: function getFieldList(options) { - var registeredFields = this.props.registeredFields; - var list = []; - if (!registeredFields) { - return list; + } + return result; + }; + + var asyncValidateResult = asyncValidate && asyncValidate(); + if (asyncValidateResult) { + return { + v: asyncValidateResult.then(function (asyncErrors) { + if (asyncErrors) { + throw asyncErrors; } - var keySeq = keys(registeredFields); - if (options && options.excludeFieldArray) { - keySeq = keySeq.filter(function (name) { - return getIn(registeredFields, '[\'' + name + '\'].type') !== 'FieldArray'; - }); + return doSubmit(); + }).catch(function (asyncErrors) { + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(asyncErrors, dispatch, null, props); } - return fromJS(keySeq.reduce(function (acc, key) { - acc.push(key); - return acc; - }, list)); - } - }, { - key: 'getValidators', - value: function getValidators() { - var _this4 = this; + return Promise.reject(asyncErrors); + }) + }; + } else { + return { + v: doSubmit() + }; + } + }(); - var validators = {}; - Object.keys(this.fieldValidators).forEach(function (name) { - var validator = _this4.fieldValidators[name](); - if (validator) { - validators[name] = validator; - } - }); - return validators; - } - }, { - key: 'generateValidator', - value: function generateValidator() { - var validators = this.getValidators(); - return Object.keys(validators).length ? Object(__WEBPACK_IMPORTED_MODULE_14__generateValidator__["a" /* default */])(validators, structure) : undefined; - } - }, { - key: 'getWarners', - value: function getWarners() { - var _this5 = this; + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } else { + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(syncErrors, dispatch, null, props); + } + return syncErrors; + } +}; - var warners = {}; - Object.keys(this.fieldWarners).forEach(function (name) { - var warner = _this5.fieldWarners[name](); - if (warner) { - warners[name] = warner; - } - }); - return warners; - } - }, { - key: 'generateWarner', - value: function generateWarner() { - var warners = this.getWarners(); - return Object.keys(warners).length ? Object(__WEBPACK_IMPORTED_MODULE_14__generateValidator__["a" /* default */])(warners, structure) : undefined; - } - }, { - key: 'asyncValidate', - value: function asyncValidate(name, value) { - var _this6 = this; +/* harmony default export */ __webpack_exports__["a"] = (handleSubmit); - var _props7 = this.props, - asyncBlurFields = _props7.asyncBlurFields, - asyncErrors = _props7.asyncErrors, - asyncValidate = _props7.asyncValidate, - dispatch = _props7.dispatch, - initialized = _props7.initialized, - pristine = _props7.pristine, - shouldAsyncValidate = _props7.shouldAsyncValidate, - startAsyncValidation = _props7.startAsyncValidation, - stopAsyncValidation = _props7.stopAsyncValidation, - syncErrors = _props7.syncErrors, - values = _props7.values; +/***/ }), +/* 604 */ +/***/ (function(module, exports, __webpack_require__) { - var submitting = !name; - if (asyncValidate) { - var valuesToValidate = submitting ? values : setIn(values, name, value); - var syncValidationPasses = submitting || !getIn(syncErrors, name); - var isBlurredField = !submitting && (!asyncBlurFields || ~asyncBlurFields.indexOf(name.replace(/\[[0-9]+\]/g, '[]'))); - if ((isBlurredField || submitting) && shouldAsyncValidate({ - asyncErrors: asyncErrors, - initialized: initialized, - trigger: submitting ? 'submit' : 'blur', - blurredField: name, - pristine: pristine, - syncValidationPasses: syncValidationPasses - })) { - return Object(__WEBPACK_IMPORTED_MODULE_9__asyncValidation__["a" /* default */])(function () { - return asyncValidate(valuesToValidate, dispatch, _this6.props, name); - }, startAsyncValidation, stopAsyncValidation, name); - } - } - } - }, { - key: 'submitCompleted', - value: function submitCompleted(result) { - delete this.submitPromise; - return result; - } - }, { - key: 'submitFailed', - value: function submitFailed(error) { - delete this.submitPromise; - throw error; - } - }, { - key: 'listenToSubmit', - value: function listenToSubmit(promise) { - if (!__WEBPACK_IMPORTED_MODULE_3_is_promise___default()(promise)) { - return promise; - } - this.submitPromise = promise; - return promise.then(this.submitCompleted, this.submitFailed); - } - }, { - key: 'submit', - value: function submit(submitOrEvent) { - var _this7 = this; +"use strict"; - var _props8 = this.props, - onSubmit = _props8.onSubmit, - blur = _props8.blur, - change = _props8.change, - dispatch = _props8.dispatch; +Object.defineProperty(exports, "__esModule", { + value: true +}); - if (!submitOrEvent || Object(__WEBPACK_IMPORTED_MODULE_12__events_silenceEvent__["a" /* default */])(submitOrEvent)) { - // submitOrEvent is an event: fire submit if not already submitting - if (!this.submitPromise) { - // avoid recursive stack trace if use Form with onSubmit as handleSubmit - if (this.innerOnSubmit && this.innerOnSubmit !== this.submit) { - // will call "submitOrEvent is the submit function" block below - return this.innerOnSubmit(); - } else { - return this.listenToSubmit(Object(__WEBPACK_IMPORTED_MODULE_15__handleSubmit__["a" /* default */])(checkSubmit(onSubmit), _extends({}, this.props, Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])({ blur: blur, change: change }, dispatch)), this.props.validExceptSubmit, this.asyncValidate, this.getFieldList({ excludeFieldArray: true }))); - } - } - } else { - // submitOrEvent is the submit function: return deferred submit thunk - return Object(__WEBPACK_IMPORTED_MODULE_13__events_silenceEvents__["a" /* default */])(function () { - return !_this7.submitPromise && _this7.listenToSubmit(Object(__WEBPACK_IMPORTED_MODULE_15__handleSubmit__["a" /* default */])(checkSubmit(submitOrEvent), _extends({}, _this7.props, Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])({ blur: blur, change: change }, dispatch)), _this7.props.validExceptSubmit, _this7.asyncValidate, _this7.getFieldList({ excludeFieldArray: true }))); - }); - } - } - }, { - key: 'reset', - value: function reset() { - this.props.reset(); - } - }, { - key: 'render', - value: function render() { - // remove some redux-form config-only props - /* eslint-disable no-unused-vars */ - var _props9 = this.props, - anyTouched = _props9.anyTouched, - arrayInsert = _props9.arrayInsert, - arrayMove = _props9.arrayMove, - arrayPop = _props9.arrayPop, - arrayPush = _props9.arrayPush, - arrayRemove = _props9.arrayRemove, - arrayRemoveAll = _props9.arrayRemoveAll, - arrayShift = _props9.arrayShift, - arraySplice = _props9.arraySplice, - arraySwap = _props9.arraySwap, - arrayUnshift = _props9.arrayUnshift, - asyncErrors = _props9.asyncErrors, - asyncValidate = _props9.asyncValidate, - asyncValidating = _props9.asyncValidating, - blur = _props9.blur, - change = _props9.change, - destroy = _props9.destroy, - destroyOnUnmount = _props9.destroyOnUnmount, - forceUnregisterOnUnmount = _props9.forceUnregisterOnUnmount, - dirty = _props9.dirty, - dispatch = _props9.dispatch, - enableReinitialize = _props9.enableReinitialize, - error = _props9.error, - focus = _props9.focus, - form = _props9.form, - getFormState = _props9.getFormState, - initialize = _props9.initialize, - initialized = _props9.initialized, - initialValues = _props9.initialValues, - invalid = _props9.invalid, - keepDirtyOnReinitialize = _props9.keepDirtyOnReinitialize, - pristine = _props9.pristine, - propNamespace = _props9.propNamespace, - registeredFields = _props9.registeredFields, - registerField = _props9.registerField, - reset = _props9.reset, - setSubmitFailed = _props9.setSubmitFailed, - setSubmitSucceeded = _props9.setSubmitSucceeded, - shouldAsyncValidate = _props9.shouldAsyncValidate, - shouldValidate = _props9.shouldValidate, - startAsyncValidation = _props9.startAsyncValidation, - startSubmit = _props9.startSubmit, - stopAsyncValidation = _props9.stopAsyncValidation, - stopSubmit = _props9.stopSubmit, - submitting = _props9.submitting, - submitFailed = _props9.submitFailed, - submitSucceeded = _props9.submitSucceeded, - touch = _props9.touch, - touchOnBlur = _props9.touchOnBlur, - touchOnChange = _props9.touchOnChange, - persistentSubmitErrors = _props9.persistentSubmitErrors, - syncErrors = _props9.syncErrors, - syncWarnings = _props9.syncWarnings, - unregisterField = _props9.unregisterField, - untouch = _props9.untouch, - updateSyncErrors = _props9.updateSyncErrors, - updateSyncWarnings = _props9.updateSyncWarnings, - valid = _props9.valid, - validExceptSubmit = _props9.validExceptSubmit, - values = _props9.values, - warning = _props9.warning, - rest = _objectWithoutProperties(_props9, ['anyTouched', 'arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'blur', 'change', 'destroy', 'destroyOnUnmount', 'forceUnregisterOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'focus', 'form', 'getFormState', 'initialize', 'initialized', 'initialValues', 'invalid', 'keepDirtyOnReinitialize', 'pristine', 'propNamespace', 'registeredFields', 'registerField', 'reset', 'setSubmitFailed', 'setSubmitSucceeded', 'shouldAsyncValidate', 'shouldValidate', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitting', 'submitFailed', 'submitSucceeded', 'touch', 'touchOnBlur', 'touchOnChange', 'persistentSubmitErrors', 'syncErrors', 'syncWarnings', 'unregisterField', 'untouch', 'updateSyncErrors', 'updateSyncWarnings', 'valid', 'validExceptSubmit', 'values', 'warning']); - /* eslint-enable no-unused-vars */ +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var reduxFormProps = _extends({ - anyTouched: anyTouched, - asyncValidate: this.asyncValidate, - asyncValidating: asyncValidating - }, Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])({ blur: blur, change: change }, dispatch), { - destroy: destroy, - dirty: dirty, - dispatch: dispatch, - error: error, - form: form, - handleSubmit: this.submit, - initialize: initialize, - initialized: initialized, - initialValues: initialValues, - invalid: invalid, - pristine: pristine, - reset: reset, - submitting: submitting, - submitFailed: submitFailed, - submitSucceeded: submitSucceeded, - touch: touch, - untouch: untouch, - valid: valid, - warning: warning - }); - var propsToPass = _extends({}, propNamespace ? _defineProperty({}, propNamespace, reduxFormProps) : reduxFormProps, rest); - if (isClassComponent(WrappedComponent)) { - propsToPass.ref = 'wrapped'; - } - return Object(__WEBPACK_IMPORTED_MODULE_5_react__["createElement"])(WrappedComponent, propsToPass); - } - }]); +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - return Form; - }(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]); +function _extendableBuiltin(cls) { + function ExtendableBuiltin() { + cls.apply(this, arguments); + } - Form.displayName = 'Form(' + Object(__WEBPACK_IMPORTED_MODULE_18__util_getDisplayName__["a" /* default */])(WrappedComponent) + ')'; - Form.WrappedComponent = WrappedComponent; - Form.childContextTypes = { - _reduxForm: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object.isRequired - }; - Form.propTypes = { - destroyOnUnmount: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, - forceUnregisterOnUnmount: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, - form: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string.isRequired, - initialValues: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.array, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object]), - getFormState: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, - onSubmitFail: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, - onSubmitSuccess: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, - propNameSpace: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, - validate: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, - warn: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, - touchOnBlur: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, - touchOnChange: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, - triggerSubmit: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, - persistentSubmitErrors: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, - registeredFields: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any - }; + ExtendableBuiltin.prototype = Object.create(cls.prototype, { + constructor: { + value: cls, + enumerable: false, + writable: true, + configurable: true + } + }); - var connector = Object(__WEBPACK_IMPORTED_MODULE_6_react_redux__["connect"])(function (state, props) { - var form = props.form, - getFormState = props.getFormState, - initialValues = props.initialValues, - enableReinitialize = props.enableReinitialize, - keepDirtyOnReinitialize = props.keepDirtyOnReinitialize; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(ExtendableBuiltin, cls); + } else { + ExtendableBuiltin.__proto__ = cls; + } - var formState = getIn(getFormState(state) || empty, form) || empty; - var stateInitial = getIn(formState, 'initial'); - var initialized = !!stateInitial; + return ExtendableBuiltin; +} - var shouldUpdateInitialValues = enableReinitialize && initialized && !deepEqual(initialValues, stateInitial); - var shouldResetValues = shouldUpdateInitialValues && !keepDirtyOnReinitialize; +var ExtendableError = function (_extendableBuiltin2) { + _inherits(ExtendableError, _extendableBuiltin2); - var initial = initialValues || stateInitial || empty; + function ExtendableError() { + var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; - if (shouldUpdateInitialValues) { - initial = stateInitial || empty; - } + _classCallCheck(this, ExtendableError); - var values = getIn(formState, 'values') || initial; + // extending Error is weird and does not propagate `message` + var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message)); - if (shouldResetValues) { - values = initial; - } + Object.defineProperty(_this, 'message', { + configurable: true, + enumerable: false, + value: message, + writable: true + }); - var pristine = shouldResetValues || deepEqual(initial, values); - var asyncErrors = getIn(formState, 'asyncErrors'); - var syncErrors = getIn(formState, 'syncErrors') || {}; - var syncWarnings = getIn(formState, 'syncWarnings') || {}; - var registeredFields = getIn(formState, 'registeredFields'); - var valid = isValid(form, getFormState, false)(state); - var validExceptSubmit = isValid(form, getFormState, true)(state); - var anyTouched = !!getIn(formState, 'anyTouched'); - var submitting = !!getIn(formState, 'submitting'); - var submitFailed = !!getIn(formState, 'submitFailed'); - var submitSucceeded = !!getIn(formState, 'submitSucceeded'); - var error = getIn(formState, 'error'); - var warning = getIn(formState, 'warning'); - var triggerSubmit = getIn(formState, 'triggerSubmit'); - return { - anyTouched: anyTouched, - asyncErrors: asyncErrors, - asyncValidating: getIn(formState, 'asyncValidating') || false, - dirty: !pristine, - error: error, - initialized: initialized, - invalid: !valid, - pristine: pristine, - registeredFields: registeredFields, - submitting: submitting, - submitFailed: submitFailed, - submitSucceeded: submitSucceeded, - syncErrors: syncErrors, - syncWarnings: syncWarnings, - triggerSubmit: triggerSubmit, - values: values, - valid: valid, - validExceptSubmit: validExceptSubmit, - warning: warning - }; - }, function (dispatch, initialProps) { - var bindForm = function bindForm(actionCreator) { - return actionCreator.bind(null, initialProps.form + Object.defineProperty(_this, 'name', { + configurable: true, + enumerable: false, + value: _this.constructor.name, + writable: true + }); - // Bind the first parameter on `props.form` - ); - };var boundFormACs = Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */])(formActions, bindForm); - var boundArrayACs = Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */])(arrayActions, bindForm); - var boundBlur = function boundBlur(field, value) { - return blur(initialProps.form, field, value, !!initialProps.touchOnBlur); - }; - var boundChange = function boundChange(field, value) { - return change(initialProps.form, field, value, !!initialProps.touchOnChange, !!initialProps.persistentSubmitErrors); - }; - var boundFocus = bindForm(focus + if (Error.hasOwnProperty('captureStackTrace')) { + Error.captureStackTrace(_this, _this.constructor); + return _possibleConstructorReturn(_this); + } - // Wrap action creators with `dispatch` - );var connectedFormACs = Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundFormACs, dispatch); - var connectedArrayACs = { - insert: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayInsert, dispatch), - move: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayMove, dispatch), - pop: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayPop, dispatch), - push: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayPush, dispatch), - remove: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayRemove, dispatch), - removeAll: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayRemoveAll, dispatch), - shift: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayShift, dispatch), - splice: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arraySplice, dispatch), - swap: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arraySwap, dispatch), - unshift: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayUnshift, dispatch) - }; + Object.defineProperty(_this, 'stack', { + configurable: true, + enumerable: false, + value: new Error(message).stack, + writable: true + }); + return _this; + } - var computedActions = _extends({}, connectedFormACs, boundArrayACs, { - blur: boundBlur, - change: boundChange, - array: connectedArrayACs, - focus: boundFocus, - dispatch: dispatch - }); + return ExtendableError; +}(_extendableBuiltin(Error)); - return function () { - return computedActions; - }; - }, undefined, { withRef: true }); - var ConnectedForm = __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(connector(Form), WrappedComponent); - ConnectedForm.defaultProps = config; +exports.default = ExtendableError; +module.exports = exports['default']; - // build outer component to expose instance api - return function (_Component2) { - _inherits(ReduxForm, _Component2); - function ReduxForm() { - _classCallCheck(this, ReduxForm); +/***/ }), +/* 605 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return _possibleConstructorReturn(this, (ReduxForm.__proto__ || Object.getPrototypeOf(ReduxForm)).apply(this, arguments)); - } +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__silenceEvent__ = __webpack_require__(283); - _createClass(ReduxForm, [{ - key: 'submit', - value: function submit() { - return this.refs.wrapped.getWrappedInstance().submit(); - } - }, { - key: 'reset', - value: function reset() { - return this.refs.wrapped.getWrappedInstance().reset(); - } - }, { - key: 'render', - value: function render() { - var _props10 = this.props, - initialValues = _props10.initialValues, - rest = _objectWithoutProperties(_props10, ['initialValues']); - return Object(__WEBPACK_IMPORTED_MODULE_5_react__["createElement"])(ConnectedForm, _extends({}, rest, { - ref: 'wrapped', - // convert initialValues if need to - initialValues: fromJS(initialValues) - })); - } - }, { - key: 'valid', - get: function get() { - return this.refs.wrapped.getWrappedInstance().isValid(); - } - }, { - key: 'invalid', - get: function get() { - return !this.valid; - } - }, { - key: 'pristine', - get: function get() { - return this.refs.wrapped.getWrappedInstance().isPristine(); - } - }, { - key: 'dirty', - get: function get() { - return !this.pristine; - } - }, { - key: 'values', - get: function get() { - return this.refs.wrapped.getWrappedInstance().getValues(); - } - }, { - key: 'fieldList', - get: function get() { - // mainly provided for testing - return this.refs.wrapped.getWrappedInstance().getFieldList(); - } - }, { - key: 'wrappedInstance', - get: function get() { - // for testing - return this.refs.wrapped.getWrappedInstance().refs.wrapped; - } - }]); +var silenceEvents = function silenceEvents(fn) { + return function (event) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } - return ReduxForm; - }(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]); - }; + return __WEBPACK_IMPORTED_MODULE_0__silenceEvent__["a" /* default */](event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args)); }; }; -/* harmony default export */ __webpack_exports__["a"] = (createReduxForm); +/* harmony default export */ __webpack_exports__["a"] = (silenceEvents); /***/ }), -/* 630 */ +/* 606 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__ = __webpack_require__(631); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(644); - - +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(183); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); -/** - * This method is like `_.assign` except that it recursively merges own and - * inherited enumerable string keyed properties of source objects into the - * destination object. Source properties that resolve to `undefined` are - * skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * var object = { - * 'a': [{ 'b': 2 }, { 'd': 4 }] - * }; - * - * var other = { - * 'a': [{ 'c': 3 }, { 'e': 5 }] - * }; - * - * _.merge(object, other); - * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } - */ -var merge = Object(__WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */])(function(object, source, srcIndex) { - Object(__WEBPACK_IMPORTED_MODULE_0__baseMerge_js__["a" /* default */])(object, source, srcIndex); -}); -/* harmony default export */ __webpack_exports__["a"] = (merge); +var asyncValidation = function asyncValidation(fn, start, stop, field) { + start(field); + var promise = fn(); + if (!__WEBPACK_IMPORTED_MODULE_0_is_promise___default.a(promise)) { + throw new Error('asyncValidate function passed to reduxForm must return a promise'); + } + var handleErrors = function handleErrors(rejected) { + return function (errors) { + if (errors && Object.keys(errors).length) { + stop(errors); + return errors; + } else if (rejected) { + stop(); + throw new Error('Asynchronous validation promise was rejected without errors.'); + } + stop(); + return Promise.resolve(); + }; + }; + return promise.then(handleErrors(false), handleErrors(true)); +}; +/* harmony default export */ __webpack_exports__["a"] = (asyncValidation); /***/ }), -/* 631 */ +/* 607 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(168); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__ = __webpack_require__(285); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseFor_js__ = __webpack_require__(279); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__ = __webpack_require__(632); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isObject_js__ = __webpack_require__(45); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keysIn_js__ = __webpack_require__(286); - - +var defaultShouldAsyncValidate = function defaultShouldAsyncValidate(_ref) { + var initialized = _ref.initialized, + trigger = _ref.trigger, + pristine = _ref.pristine, + syncValidationPasses = _ref.syncValidationPasses; + if (!syncValidationPasses) { + return false; + } + switch (trigger) { + case 'blur': + // blurring + return true; + case 'submit': + // submitting, so only async validate if form is dirty or was never initialized + // conversely, DON'T async validate if the form is pristine just as it was initialized + return !pristine || !initialized; + default: + return false; + } +}; +/* harmony default export */ __webpack_exports__["a"] = (defaultShouldAsyncValidate); +/***/ }), +/* 608 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +var defaultShouldValidate = function defaultShouldValidate(_ref) { + var values = _ref.values, + nextProps = _ref.nextProps, + initialRender = _ref.initialRender, + lastFieldValidatorKeys = _ref.lastFieldValidatorKeys, + fieldValidatorKeys = _ref.fieldValidatorKeys, + structure = _ref.structure; -/** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; + if (initialRender) { + return true; } - Object(__WEBPACK_IMPORTED_MODULE_2__baseFor_js__["a" /* default */])(source, function(srcValue, key) { - if (Object(__WEBPACK_IMPORTED_MODULE_4__isObject_js__["a" /* default */])(srcValue)) { - stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); - Object(__WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__["a" /* default */])(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(object[key], srcValue, (key + ''), object, source, stack) - : undefined; - - if (newValue === undefined) { - newValue = srcValue; - } - Object(__WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__["a" /* default */])(object, key, newValue); - } - }, __WEBPACK_IMPORTED_MODULE_5__keysIn_js__["a" /* default */]); -} - -/* harmony default export */ __webpack_exports__["a"] = (baseMerge); + return !structure.deepEqual(values, nextProps.values) || !structure.deepEqual(lastFieldValidatorKeys, fieldValidatorKeys); +}; +/* harmony default export */ __webpack_exports__["a"] = (defaultShouldValidate); /***/ }), -/* 632 */ +/* 609 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__ = __webpack_require__(285); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__ = __webpack_require__(633); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__ = __webpack_require__(634); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__copyArray_js__ = __webpack_require__(268); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__ = __webpack_require__(636); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArguments_js__ = __webpack_require__(170); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isArray_js__ = __webpack_require__(35); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__ = __webpack_require__(638); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__ = __webpack_require__(171); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__isFunction_js__ = __webpack_require__(165); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__isObject_js__ = __webpack_require__(45); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__ = __webpack_require__(161); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__ = __webpack_require__(174); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__ = __webpack_require__(639); - - +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } +var splice = function splice(array, index, removeNum, value) { + array = array || []; + if (index < array.length) { + if (value === undefined && !removeNum) { + // inserting undefined + var _copy2 = [].concat(_toConsumableArray(array)); + _copy2.splice(index, 0, null); + _copy2[index] = undefined; + return _copy2; + } + if (value != null) { + var _copy3 = [].concat(_toConsumableArray(array)); + _copy3.splice(index, removeNum, value); // removing and adding + return _copy3; + } + var _copy = [].concat(_toConsumableArray(array)); + _copy.splice(index, removeNum); // removing + return _copy; + } + if (removeNum) { + // trying to remove non-existant item: return original array + return array; + } + // trying to add outside of range: just set value + var copy = [].concat(_toConsumableArray(array)); + copy[index] = value; + return copy; +}; +/* harmony default export */ __webpack_exports__["a"] = (splice); +/***/ }), +/* 610 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(111); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var setInWithPath = function setInWithPath(state, value, path, pathIndex) { + if (pathIndex >= path.length) { + return value; + } + var first = path[pathIndex]; + var next = setInWithPath(state && state[first], value, path, pathIndex + 1); + if (!state) { + var initialized = isNaN(first) ? {} : []; + initialized[first] = next; + return initialized; + } - -/** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = object[key], - srcValue = source[key], - stacked = stack.get(srcValue); - - if (stacked) { - Object(__WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */])(object, key, stacked); - return; + if (Array.isArray(state)) { + var copy = [].concat(state); + copy[first] = next; + return copy; } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; - - var isCommon = newValue === undefined; - if (isCommon) { - var isArr = Object(__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */])(srcValue), - isBuff = !isArr && Object(__WEBPACK_IMPORTED_MODULE_8__isBuffer_js__["a" /* default */])(srcValue), - isTyped = !isArr && !isBuff && Object(__WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__["a" /* default */])(srcValue); - - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (Object(__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */])(objValue)) { - newValue = objValue; - } - else if (Object(__WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__["a" /* default */])(objValue)) { - newValue = Object(__WEBPACK_IMPORTED_MODULE_3__copyArray_js__["a" /* default */])(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = Object(__WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__["a" /* default */])(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = Object(__WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__["a" /* default */])(srcValue, true); - } - else { - newValue = []; - } - } - else if (Object(__WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__["a" /* default */])(srcValue) || Object(__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */])(srcValue)) { - newValue = objValue; - if (Object(__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */])(objValue)) { - newValue = Object(__WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__["a" /* default */])(objValue); - } - else if (!Object(__WEBPACK_IMPORTED_MODULE_10__isObject_js__["a" /* default */])(objValue) || (srcIndex && Object(__WEBPACK_IMPORTED_MODULE_9__isFunction_js__["a" /* default */])(objValue))) { - newValue = Object(__WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__["a" /* default */])(srcValue); - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - Object(__WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */])(object, key, newValue); -} + return _extends({}, state, _defineProperty({}, first, next)); +}; -/* harmony default export */ __webpack_exports__["a"] = (baseMergeDeep); +var setIn = function setIn(state, field, value) { + return setInWithPath(state, value, __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field), 0); +}; +/* harmony default export */ __webpack_exports__["a"] = (setIn); /***/ }), -/* 633 */ +/* 611 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(34); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(286); -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); +var customizer = function customizer(obj, other) { + if (obj === other) return true; + if ((obj == null || obj === '' || obj === false) && (other == null || other === '' || other === false)) return true; - buffer.copy(result); - return result; -} + if (obj && other && obj._error !== other._error) return false; + if (obj && other && obj._warning !== other._warning) return false; +}; -/* harmony default export */ __webpack_exports__["a"] = (cloneBuffer); +var deepEqual = function deepEqual(a, b) { + return __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](a, b, customizer); +}; -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(172)(module))) +/* harmony default export */ __webpack_exports__["a"] = (deepEqual); /***/ }), -/* 634 */ +/* 612 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__ = __webpack_require__(635); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(111); -/** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? Object(__WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__["a" /* default */])(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -/* harmony default export */ __webpack_exports__["a"] = (cloneTypedArray); +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } -/***/ }), -/* 635 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var deleteInWithPath = function deleteInWithPath(state, first) { + for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + rest[_key - 2] = arguments[_key]; + } -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__ = __webpack_require__(274); + if (state === undefined || first === undefined) { + return state; + } + if (rest.length) { + if (Array.isArray(state)) { + if (first < state.length) { + var result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); + if (result !== state[first]) { + var copy = [].concat(_toConsumableArray(state)); + copy[first] = result; + return copy; + } + } + return state; + } + if (first in state) { + var _result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); + return state[first] === _result ? state : _extends({}, state, _defineProperty({}, first, _result)); + } + return state; + } + if (Array.isArray(state)) { + if (isNaN(first)) { + throw new Error('Cannot delete non-numerical index from an array'); + } + if (first < state.length) { + var _copy = [].concat(_toConsumableArray(state)); + _copy.splice(first, 1); + return _copy; + } + return state; + } + if (first in state) { + var _copy2 = _extends({}, state); + delete _copy2[first]; + return _copy2; + } + return state; +}; +var deleteIn = function deleteIn(state, field) { + return deleteInWithPath.apply(undefined, [state].concat(_toConsumableArray(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field)))); +}; -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](result).set(new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](arrayBuffer)); - return result; -} +/* harmony default export */ __webpack_exports__["a"] = (deleteIn); -/* harmony default export */ __webpack_exports__["a"] = (cloneArrayBuffer); +/***/ }), +/* 613 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var keys = function keys(value) { + return value ? Object.keys(value) : []; +}; +/* harmony default export */ __webpack_exports__["a"] = (keys); /***/ }), -/* 636 */ +/* 614 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(637); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(252); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isPrototype_js__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain__ = __webpack_require__(48); +var toArray = function toArray(value) { + return Array.isArray(value) ? value : [value]; +}; +var getError = function getError(value, values, props, validators) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !Object(__WEBPACK_IMPORTED_MODULE_2__isPrototype_js__["a" /* default */])(object)) - ? Object(__WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(object)) - : {}; -} + try { + for (var _iterator = toArray(validators)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var validator = _step.value; -/* harmony default export */ __webpack_exports__["a"] = (initCloneObject); + var error = validator(value, values, props); + if (error) { + return error; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } +}; + +var generateValidator = function generateValidator(validators, _ref) { + var getIn = _ref.getIn; + return function (values, props) { + var errors = {}; + Object.keys(validators).forEach(function (name) { + var value = getIn(values, name); + var error = getError(value, values, props, validators[name]); + if (error) { + errors = __WEBPACK_IMPORTED_MODULE_0__structure_plain__["a" /* default */].setIn(errors, name, error); + } + }); + return errors; + }; +}; +/* harmony default export */ __webpack_exports__["a"] = (generateValidator); /***/ }), -/* 637 */ +/* 615 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain_getIn__ = __webpack_require__(285); -/** Built-in value references. */ -var objectCreate = Object.create; +var getErrorKeys = function getErrorKeys(name, type) { + switch (type) { + case 'Field': + return [name, name + '._error']; + case 'FieldArray': + return [name + '._error']; + } +}; -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ -var baseCreate = (function() { - function object() {} - return function(proto) { - if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); +var createHasError = function createHasError(_ref) { + var getIn = _ref.getIn; + + var hasError = function hasError(field, syncErrors, asyncErrors, submitErrors) { + if (!syncErrors && !asyncErrors && !submitErrors) { + return false; } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; -}()); -/* harmony default export */ __webpack_exports__["a"] = (baseCreate); + var name = getIn(field, 'name'); + var type = getIn(field, 'type'); + return getErrorKeys(name, type).some(function (key) { + return __WEBPACK_IMPORTED_MODULE_0__structure_plain_getIn__["a" /* default */](syncErrors, key) || getIn(asyncErrors, key) || getIn(submitErrors, key); + }); + }; + return hasError; +}; +/* harmony default export */ __webpack_exports__["a"] = (createHasError); /***/ }), -/* 638 */ +/* 616 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(116); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(83); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedField__ = __webpack_require__(617); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(185); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(119); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(value); -} +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -/* harmony default export */ __webpack_exports__["a"] = (isArrayLikeObject); +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -/***/ }), -/* 639 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(640); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keysIn_js__ = __webpack_require__(286); -/** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ -function toPlainObject(value) { - return Object(__WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */])(value, Object(__WEBPACK_IMPORTED_MODULE_1__keysIn_js__["a" /* default */])(value)); -} -/* harmony default export */ __webpack_exports__["a"] = (toPlainObject); +var createField = function createField(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + setIn = _ref.setIn, + toJS = _ref.toJS; -/***/ }), -/* 640 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var ConnectedField = __WEBPACK_IMPORTED_MODULE_2__ConnectedField__["a" /* default */]({ + deepEqual: deepEqual, + getIn: getIn, + toJS: toJS + }); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignValue_js__ = __webpack_require__(641); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__ = __webpack_require__(117); + var Field = function (_Component) { + _inherits(Field, _Component); + function Field(props, context) { + _classCallCheck(this, Field); + var _this = _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).call(this, props, context)); -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); + if (!context._reduxForm) { + throw new Error('Field must be inside a component decorated with reduxForm()'); + } - var index = -1, - length = props.length; + _this.normalize = _this.normalize.bind(_this); + return _this; + } - while (++index < length) { - var key = props[index]; + _createClass(Field, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; + this.context._reduxForm.register(this.name, 'Field', function () { + return _this2.props.validate; + }, function () { + return _this2.props.warn; + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.name !== nextProps.name) { + // unregister old name + this.context._reduxForm.unregister(this.name); + // register new name + this.context._reduxForm.register(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, nextProps.name), 'Field'); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context._reduxForm.unregister(this.name); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Field'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'normalize', + value: function normalize(name, value) { + var normalize = this.props.normalize; - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - Object(__WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__["a" /* default */])(object, key, newValue); - } else { - Object(__WEBPACK_IMPORTED_MODULE_0__assignValue_js__["a" /* default */])(object, key, newValue); - } - } - return object; -} + if (!normalize) { + return value; + } + var previousValues = this.context._reduxForm.getValues(); + var previousValue = this.value; + var nextValues = setIn(previousValues, name, value); + return normalize(value, previousValue, nextValues, previousValues); + } + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedField, _extends({}, this.props, { + name: this.name, + normalize: this.normalize, + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'name', + get: function get() { + return __WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, this.props.name); + } + }, { + key: 'dirty', + get: function get() { + return !this.pristine; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.connected.getWrappedInstance().isPristine(); + } + }, { + key: 'value', + get: function get() { + return this.refs.connected && this.refs.connected.getWrappedInstance().getValue(); + } + }]); -/* harmony default export */ __webpack_exports__["a"] = (copyObject); + return Field; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + Field.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + format: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + normalize: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onBlur: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onChange: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onFocus: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onDragStart: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onDrop: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + parse: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + Field.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + + return Field; +}; +/* harmony default export */ __webpack_exports__["a"] = (createField); /***/ }), -/* 641 */ +/* 617 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(117); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(86); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(28); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createFieldProps__ = __webpack_require__(287); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__structure_plain__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(288); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__ = __webpack_require__(620); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -/** Used for built-in method references. */ -var objectProto = Object.prototype; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && Object(__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */])(objValue, value)) || - (value === undefined && !(key in object))) { - Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(object, key, value); - } -} +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -/* harmony default export */ __webpack_exports__["a"] = (assignValue); -/***/ }), -/* 642 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(45); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__ = __webpack_require__(176); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__ = __webpack_require__(643); -/** Used for built-in method references. */ -var objectProto = Object.prototype; +var propsToNotUpdateFor = ['_reduxForm']; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +var createConnectedField = function createConnectedField(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS; -/** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeysIn(object) { - if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(object)) { - return Object(__WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__["a" /* default */])(object); - } - var isProto = Object(__WEBPACK_IMPORTED_MODULE_1__isPrototype_js__["a" /* default */])(object), - result = []; - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} + var getSyncError = function getSyncError(syncErrors, name) { + var error = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncErrors, name); + // Because the error for this field might not be at a level in the error structure where + // it can be set directly, it might need to be unwrapped from the _error property + return error && error._error ? error._error : error; + }; -/* harmony default export */ __webpack_exports__["a"] = (baseKeysIn); + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + var warning = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncWarnings, name); + // Because the warning for this field might not be at a level in the warning structure where + // it can be set directly, it might need to be unwrapped from the _warning property + return warning && warning._warning ? warning._warning : warning; + }; + var ConnectedField = function (_Component) { + _inherits(ConnectedField, _Component); -/***/ }), -/* 643 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function ConnectedField(props) { + _classCallCheck(this, ConnectedField); -"use strict"; -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); + var _this = _possibleConstructorReturn(this, (ConnectedField.__proto__ || Object.getPrototypeOf(ConnectedField)).call(this, props)); + + _this.handleChange = _this.handleChange.bind(_this); + _this.handleFocus = _this.handleFocus.bind(_this); + _this.handleBlur = _this.handleBlur.bind(_this); + _this.handleDragStart = _this.handleDragStart.bind(_this); + _this.handleDrop = _this.handleDrop.bind(_this); + return _this; } - } - return result; -} -/* harmony default export */ __webpack_exports__["a"] = (nativeKeysIn); + _createClass(ConnectedField, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this2 = this; + + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); + }); + } + }, { + key: 'isPristine', + value: function isPristine() { + return this.props.pristine; + } + }, { + key: 'getValue', + value: function getValue() { + return this.props.value; + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'handleChange', + value: function handleChange(event) { + var _props = this.props, + name = _props.name, + dispatch = _props.dispatch, + parse = _props.parse, + normalize = _props.normalize, + onChange = _props.onChange, + _reduxForm = _props._reduxForm, + previousValue = _props.value; + var newValue = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); -/***/ }), -/* 644 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var defaultPrevented = false; + if (onChange) { + onChange(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + }), newValue, previousValue); + } + if (!defaultPrevented) { + // dispatch change action + dispatch(_reduxForm.change(name, newValue)); + } + } + }, { + key: 'handleFocus', + value: function handleFocus(event) { + var _props2 = this.props, + name = _props2.name, + dispatch = _props2.dispatch, + onFocus = _props2.onFocus, + _reduxForm = _props2._reduxForm; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(645); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(652); + var defaultPrevented = false; + if (onFocus) { + onFocus(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + })); + } + if (!defaultPrevented) { + dispatch(_reduxForm.focus(name)); + } + } + }, { + key: 'handleBlur', + value: function handleBlur(event) { + var _props3 = this.props, + name = _props3.name, + dispatch = _props3.dispatch, + parse = _props3.parse, + normalize = _props3.normalize, + onBlur = _props3.onBlur, + _reduxForm = _props3._reduxForm, + _value = _props3._value, + previousValue = _props3.value; -/** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return Object(__WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */])(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; + var newValue = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; + // for checkbox and radio, if the value property of checkbox or radio equals + // the value passed by blur event, then fire blur action with previousValue. + if (newValue === _value && _value !== undefined) { + newValue = previousValue; + } - if (guard && Object(__WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */])(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); + var defaultPrevented = false; + if (onBlur) { + onBlur(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + }), newValue, previousValue); + } + + if (!defaultPrevented) { + // dispatch blur action + dispatch(_reduxForm.blur(name, newValue)); + + // call post-blur callback + if (_reduxForm.asyncValidate) { + _reduxForm.asyncValidate(name, newValue); + } + } } - } - return object; - }); -} + }, { + key: 'handleDragStart', + value: function handleDragStart(event) { + var _props4 = this.props, + onDragStart = _props4.onDragStart, + value = _props4.value; -/* harmony default export */ __webpack_exports__["a"] = (createAssigner); + event.dataTransfer.setData(__WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */], value == null ? '' : value); + if (onDragStart) { + onDragStart(event); + } + } + }, { + key: 'handleDrop', + value: function handleDrop(event) { + var _props5 = this.props, + name = _props5.name, + dispatch = _props5.dispatch, + onDrop = _props5.onDrop, + _reduxForm = _props5._reduxForm, + previousValue = _props5.value; -/***/ }), -/* 645 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var newValue = event.dataTransfer.getData(__WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */]); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(178); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__overRest_js__ = __webpack_require__(646); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setToString_js__ = __webpack_require__(648); + var defaultPrevented = false; + if (onDrop) { + onDrop(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + }), newValue, previousValue); + } + + if (!defaultPrevented) { + // dispatch change action + dispatch(_reduxForm.change(name, newValue)); + event.preventDefault(); + } + } + }, { + key: 'render', + value: function render() { + var _props6 = this.props, + component = _props6.component, + withRef = _props6.withRef, + name = _props6.name, + _reduxForm = _props6._reduxForm, + normalize = _props6.normalize, + onBlur = _props6.onBlur, + onChange = _props6.onChange, + onFocus = _props6.onFocus, + onDragStart = _props6.onDragStart, + onDrop = _props6.onDrop, + rest = _objectWithoutProperties(_props6, ['component', 'withRef', 'name', '_reduxForm', 'normalize', 'onBlur', 'onChange', 'onFocus', 'onDragStart', 'onDrop']); + + var _createFieldProps = __WEBPACK_IMPORTED_MODULE_2__createFieldProps__["a" /* default */]({ getIn: getIn, toJS: toJS }, name, _extends({}, rest, { + form: _reduxForm.form, + onBlur: this.handleBlur, + onChange: this.handleChange, + onDrop: this.handleDrop, + onDragStart: this.handleDragStart, + onFocus: this.handleFocus + })), + custom = _createFieldProps.custom, + props = _objectWithoutProperties(_createFieldProps, ['custom']); + if (withRef) { + custom.ref = 'renderedComponent'; + } + if (typeof component === 'string') { + var input = props.input, + meta = props.meta; // eslint-disable-line no-unused-vars + // flatten input into other props + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, input, custom)); + } else { + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, props, custom)); + } + } + }]); + return ConnectedField; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - return Object(__WEBPACK_IMPORTED_MODULE_2__setToString_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__overRest_js__["a" /* default */])(func, start, __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */]), func + ''); -} + ConnectedField.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; -/* harmony default export */ __webpack_exports__["a"] = (baseRest); + var connector = __WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"](function (state, ownProps) { + var name = ownProps.name, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; + var formState = getFormState(state); + var initialState = getIn(formState, 'initial.' + name); + var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var submitting = getIn(formState, 'submitting'); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var pristine = value === initial; + return { + asyncError: getIn(formState, 'asyncErrors.' + name), + asyncValidating: getIn(formState, 'asyncValidating') === name, + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name), + submitFailed: getIn(formState, 'submitFailed'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + _value: ownProps.value // save value passed in (for checkboxes) + }; + }, undefined, undefined, { withRef: true }); + return connector(ConnectedField); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createConnectedField); /***/ }), -/* 646 */ +/* 618 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(647); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(284); -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); +var getSelectedValues = function getSelectedValues(options) { + var result = []; + if (options) { + for (var index = 0; index < options.length; index++) { + var option = options[index]; + if (option.selected) { + result.push(option.value); + } + } + } + return result; +}; - while (++index < length) { - array[index] = args[start + index]; +var getValue = function getValue(event, isReactNative) { + if (__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */](event)) { + if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) { + return event.nativeEvent.text; } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; + if (isReactNative && event.nativeEvent !== undefined) { + return event.nativeEvent.text; } - otherArgs[start] = transform(array); - return Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(func, this, otherArgs); - }; -} + var _event$target = event.target, + type = _event$target.type, + value = _event$target.value, + checked = _event$target.checked, + files = _event$target.files, + dataTransfer = event.dataTransfer; -/* harmony default export */ __webpack_exports__["a"] = (overRest); + if (type === 'checkbox') { + return checked; + } + if (type === 'file') { + return files || dataTransfer && dataTransfer.files; + } + if (type === 'select-multiple') { + return getSelectedValues(event.target.options); + } + return value; + } + return event; +}; +/* harmony default export */ __webpack_exports__["a"] = (getValue); /***/ }), -/* 647 */ +/* 619 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); -} - -/* harmony default export */ __webpack_exports__["a"] = (apply); +var isReactNative = typeof window !== 'undefined' && window.navigator && window.navigator.product && window.navigator.product === 'ReactNative'; +/* harmony default export */ __webpack_exports__["a"] = (isReactNative); /***/ }), -/* 648 */ +/* 620 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__ = __webpack_require__(649); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shortOut_js__ = __webpack_require__(651); - - - -/** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var setToString = Object(__WEBPACK_IMPORTED_MODULE_1__shortOut_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__["a" /* default */]); - -/* harmony default export */ __webpack_exports__["a"] = (setToString); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dataKey; }); +var dataKey = 'text'; /***/ }), -/* 649 */ +/* 621 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(650); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__ = __webpack_require__(278); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(83); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedFields__ = __webpack_require__(622); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(185); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__structure_plain__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_prefixName__ = __webpack_require__(119); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -/** - * The base implementation of `setToString` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var baseSetToString = !__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */] : function(func, string) { - return Object(__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */])(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(string), - 'writable': true - }); -}; +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -/* harmony default export */ __webpack_exports__["a"] = (baseSetToString); -/***/ }), -/* 650 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant(value) { - return function() { - return value; - }; -} -/* harmony default export */ __webpack_exports__["a"] = (constant); -/***/ }), -/* 651 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/** Used to detect hot functions by number of calls within a span of milliseconds. */ -var HOT_COUNT = 800, - HOT_SPAN = 16; +var validateNameProp = function validateNameProp(prop) { + if (!prop) { + return new Error('No "names" prop was specified <Fields/>'); + } + if (!Array.isArray(prop) && !prop._isFieldArray) { + return new Error('Invalid prop "names" supplied to <Fields/>. Must be either an array of strings or the fields array generated by FieldArray.'); + } +}; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeNow = Date.now; +var createFields = function createFields(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS, + size = _ref.size; -/** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ -function shortOut(func) { - var count = 0, - lastCalled = 0; - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); + var ConnectedFields = __WEBPACK_IMPORTED_MODULE_2__ConnectedFields__["a" /* default */]({ + deepEqual: deepEqual, + getIn: getIn, + toJS: toJS, + size: size + }); - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; + var Fields = function (_Component) { + _inherits(Fields, _Component); + + function Fields(props, context) { + _classCallCheck(this, Fields); + + var _this = _possibleConstructorReturn(this, (Fields.__proto__ || Object.getPrototypeOf(Fields)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Fields must be inside a component decorated with reduxForm()'); } - } else { - count = 0; + return _this; } - return func.apply(undefined, arguments); - }; -} -/* harmony default export */ __webpack_exports__["a"] = (shortOut); + _createClass(Fields, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var error = validateNameProp(this.props.names); + if (error) { + throw error; + } + var context = this.context; + var register = context._reduxForm.register; + this.names.forEach(function (name) { + return register(name, 'Field'); + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; -/***/ }), -/* 652 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (!__WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].deepEqual(this.props.names, nextProps.names)) { + (function () { + var context = _this2.context; + var _context$_reduxForm = context._reduxForm, + register = _context$_reduxForm.register, + unregister = _context$_reduxForm.unregister; + // unregister old name -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(86); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(116); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isIndex_js__ = __webpack_require__(173); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isObject_js__ = __webpack_require__(45); + _this2.props.names.forEach(function (name) { + return unregister(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name)); + }); + // register new name + nextProps.names.forEach(function (name) { + return register(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name), 'Field'); + }); + })(); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + var context = this.context; + var unregister = context._reduxForm.unregister; + this.props.names.forEach(function (name) { + return unregister(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name)); + }); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Fields'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'render', + value: function render() { + var context = this.context; + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedFields, _extends({}, this.props, { + names: this.props.names.map(function (name) { + return __WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name); + }), + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'names', + get: function get() { + var context = this.context; + return this.props.names.map(function (name) { + return __WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name); + }); + } + }, { + key: 'dirty', + get: function get() { + return this.refs.connected.getWrappedInstance().isDirty(); + } + }, { + key: 'pristine', + get: function get() { + return !this.dirty; + } + }, { + key: 'values', + get: function get() { + return this.refs.connected && this.refs.connected.getWrappedInstance().getValues(); + } + }]); + return Fields; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); -/** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ -function isIterateeCall(value, index, object) { - if (!Object(__WEBPACK_IMPORTED_MODULE_3__isObject_js__["a" /* default */])(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */])(object) && Object(__WEBPACK_IMPORTED_MODULE_2__isIndex_js__["a" /* default */])(index, object.length)) - : (type == 'string' && index in object) - ) { - return Object(__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */])(object[index], value); - } - return false; -} + Fields.propTypes = { + names: function names(props, propName) { + return validateNameProp(props[propName]); + }, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + format: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + parse: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + Fields.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; -/* harmony default export */ __webpack_exports__["a"] = (isIterateeCall); + return Fields; +}; +/* harmony default export */ __webpack_exports__["a"] = (createFields); /***/ }), -/* 653 */ +/* 622 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(180); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(28); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createFieldProps__ = __webpack_require__(287); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__structure_plain__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(288); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var asyncValidation = function asyncValidation(fn, start, stop, field) { - start(field); - var promise = fn(); - if (!__WEBPACK_IMPORTED_MODULE_0_is_promise___default()(promise)) { - throw new Error('asyncValidate function passed to reduxForm must return a promise'); - } - var handleErrors = function handleErrors(rejected) { - return function (errors) { - if (errors && Object.keys(errors).length) { - stop(errors); - return errors; - } else if (rejected) { - stop(); - throw new Error('Asynchronous validation promise was rejected without errors.'); - } - stop(); - return Promise.resolve(); - }; - }; - return promise.then(handleErrors(false), handleErrors(true)); -}; +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -/* harmony default export */ __webpack_exports__["a"] = (asyncValidation); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -/***/ }), -/* 654 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__silenceEvent__ = __webpack_require__(287); +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -var silenceEvents = function silenceEvents(fn) { - return function (event) { - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - return Object(__WEBPACK_IMPORTED_MODULE_0__silenceEvent__["a" /* default */])(event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args)); - }; -}; -/* harmony default export */ __webpack_exports__["a"] = (silenceEvents); -/***/ }), -/* 655 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain__ = __webpack_require__(13); +var propsToNotUpdateFor = ['_reduxForm']; -var toArray = function toArray(value) { - return Array.isArray(value) ? value : [value]; -}; +var createConnectedFields = function createConnectedFields(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS, + size = _ref.size; -var getError = function getError(value, values, props, validators) { - var array = toArray(validators); - for (var i = 0; i < array.length; i++) { - var error = array[i](value, values, props); - if (error) { - return error; - } - } -}; -var generateValidator = function generateValidator(validators, _ref) { - var getIn = _ref.getIn; - return function (values, props) { - var errors = {}; - Object.keys(validators).forEach(function (name) { - var value = getIn(values, name); - var error = getError(value, values, props, validators[name]); - if (error) { - errors = __WEBPACK_IMPORTED_MODULE_0__structure_plain__["a" /* default */].setIn(errors, name, error); - } - }); - return errors; + var getSyncError = function getSyncError(syncErrors, name) { + var error = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncErrors, name); + // Because the error for this field might not be at a level in the error structure where + // it can be set directly, it might need to be unwrapped from the _error property + return error && error._error ? error._error : error; }; -}; -/* harmony default export */ __webpack_exports__["a"] = (generateValidator); + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + var warning = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncWarnings, name); + // Because the warning for this field might not be at a level in the warning structure where + // it can be set directly, it might need to be unwrapped from the _warning property + return warning && warning._warning ? warning._warning : warning; + }; -/***/ }), -/* 656 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var ConnectedFields = function (_Component) { + _inherits(ConnectedFields, _Component); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(180); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubmissionError__ = __webpack_require__(263); -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + function ConnectedFields(props) { + _classCallCheck(this, ConnectedFields); + var _this = _possibleConstructorReturn(this, (ConnectedFields.__proto__ || Object.getPrototypeOf(ConnectedFields)).call(this, props)); + _this.handleChange = _this.handleChange.bind(_this); + _this.handleFocus = _this.handleFocus.bind(_this); + _this.handleBlur = _this.handleBlur.bind(_this); + _this.onChangeFns = props.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this.handleChange(name, event); + }; + return acc; + }, {}); -var handleSubmit = function handleSubmit(submit, props, valid, asyncValidate, fields) { - var dispatch = props.dispatch, - onSubmitFail = props.onSubmitFail, - onSubmitSuccess = props.onSubmitSuccess, - startSubmit = props.startSubmit, - stopSubmit = props.stopSubmit, - setSubmitFailed = props.setSubmitFailed, - setSubmitSucceeded = props.setSubmitSucceeded, - syncErrors = props.syncErrors, - touch = props.touch, - values = props.values, - persistentSubmitErrors = props.persistentSubmitErrors; + _this.onFocusFns = props.names.reduce(function (acc, name) { + acc[name] = function () { + return _this.handleFocus(name); + }; + return acc; + }, {}); + _this.onBlurFns = props.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this.handleBlur(name, event); + }; + return acc; + }, {}); + return _this; + } - touch.apply(undefined, _toConsumableArray(fields)); // mark all fields as touched + _createClass(ConnectedFields, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; - if (valid || persistentSubmitErrors) { - var doSubmit = function doSubmit() { - var result = void 0; - try { - result = submit(values, dispatch, props); - } catch (submitError) { - var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; - stopSubmit(error); - setSubmitFailed.apply(undefined, _toConsumableArray(fields)); - if (onSubmitFail) { - onSubmitFail(error, dispatch, submitError, props); - } - if (error || onSubmitFail) { - // if you've provided an onSubmitFail callback, don't re-throw the error - return error; - } else { - throw submitError; + if (this.props.names !== nextProps.names && (size(this.props.names) !== size(nextProps.names) || nextProps.names.some(function (nextName) { + return !_this2.props._fields[nextName]; + }))) { + + // names is changed. The cached event handlers need to be updated + this.onChangeFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this2.handleChange(name, event); + }; + return acc; + }, {}); + + this.onFocusFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function () { + return _this2.handleFocus(name); + }; + return acc; + }, {}); + + this.onBlurFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this2.handleBlur(name, event); + }; + return acc; + }, {}); } } - if (__WEBPACK_IMPORTED_MODULE_0_is_promise___default()(result)) { - startSubmit(); - return result.then(function (submitResult) { - stopSubmit(); - setSubmitSucceeded(); - if (onSubmitSuccess) { - onSubmitSuccess(submitResult, dispatch, props); - } - return submitResult; - }, function (submitError) { - var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; - stopSubmit(error); - setSubmitFailed.apply(undefined, _toConsumableArray(fields)); - if (onSubmitFail) { - onSubmitFail(error, dispatch, submitError, props); - } - if (error || onSubmitFail) { - // if you've provided an onSubmitFail callback, don't re-throw the error - return error; - } else { - throw submitError; - } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this3 = this; + + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); }); - } else { - setSubmitSucceeded(); - if (onSubmitSuccess) { - onSubmitSuccess(result, dispatch, props); - } } - return result; - }; + }, { + key: 'isDirty', + value: function isDirty() { + var _fields = this.props._fields; - var asyncValidateResult = asyncValidate && asyncValidate(); - if (asyncValidateResult) { - return asyncValidateResult.then(function (asyncErrors) { - if (asyncErrors) { - throw asyncErrors; - } - return doSubmit(); - }).catch(function (asyncErrors) { - setSubmitFailed.apply(undefined, _toConsumableArray(fields)); - if (onSubmitFail) { - onSubmitFail(asyncErrors, dispatch, null, props); - } - return Promise.reject(asyncErrors); - }); - } else { - return doSubmit(); - } - } else { - setSubmitFailed.apply(undefined, _toConsumableArray(fields)); - if (onSubmitFail) { - onSubmitFail(syncErrors, dispatch, null, props); - } - return syncErrors; - } -}; + return Object.keys(_fields).some(function (name) { + return _fields[name].dirty; + }); + } + }, { + key: 'getValues', + value: function getValues() { + var _fields = this.props._fields; -/* harmony default export */ __webpack_exports__["a"] = (handleSubmit); + return Object.keys(_fields).reduce(function (accumulator, name) { + return __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].setIn(accumulator, name, _fields[name].value); + }, {}); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'handleChange', + value: function handleChange(name, event) { + var _props = this.props, + dispatch = _props.dispatch, + parse = _props.parse, + normalize = _props.normalize, + _reduxForm = _props._reduxForm; -/***/ }), -/* 657 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var value = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); -"use strict"; -var getDisplayName = function getDisplayName(Comp) { - return Comp.displayName || Comp.name || 'Component'; -}; + dispatch(_reduxForm.change(name, value)); + } + }, { + key: 'handleFocus', + value: function handleFocus(name) { + var _props2 = this.props, + dispatch = _props2.dispatch, + _reduxForm = _props2._reduxForm; -/* harmony default export */ __webpack_exports__["a"] = (getDisplayName); + dispatch(_reduxForm.focus(name)); + } + }, { + key: 'handleBlur', + value: function handleBlur(name, event) { + var _props3 = this.props, + dispatch = _props3.dispatch, + parse = _props3.parse, + normalize = _props3.normalize, + _reduxForm = _props3._reduxForm; -/***/ }), -/* 658 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var value = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createReducer__ = __webpack_require__(659); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); + // dispatch blur action + dispatch(_reduxForm.blur(name, value)); + // call post-blur callback + if (_reduxForm.asyncValidate) { + _reduxForm.asyncValidate(name, value); + } + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + var _props4 = this.props, + component = _props4.component, + withRef = _props4.withRef, + _fields = _props4._fields, + _reduxForm = _props4._reduxForm, + rest = _objectWithoutProperties(_props4, ['component', 'withRef', '_fields', '_reduxForm']); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createReducer__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); + var sectionPrefix = _reduxForm.sectionPrefix; -/***/ }), -/* 659 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var _Object$keys$reduce = Object.keys(_fields).reduce(function (accumulator, name) { + var connectedProps = _fields[name]; -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(163); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__ = __webpack_require__(660); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__structure_plain__ = __webpack_require__(13); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + var _createFieldProps = __WEBPACK_IMPORTED_MODULE_2__createFieldProps__["a" /* default */]({ getIn: getIn, toJS: toJS }, name, _extends({}, connectedProps, rest, { + onBlur: _this4.onBlurFns[name], + onChange: _this4.onChangeFns[name], + onFocus: _this4.onFocusFns[name] + })), + custom = _createFieldProps.custom, + fieldProps = _objectWithoutProperties(_createFieldProps, ['custom']); -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + accumulator.custom = custom; + var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; + return __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].setIn(accumulator, fieldName, fieldProps); + }, {}), + custom = _Object$keys$reduce.custom, + props = _objectWithoutProperties(_Object$keys$reduce, ['custom']); + + if (withRef) { + props.ref = 'renderedComponent'; + } + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, props, custom)); + } + }]); + return ConnectedFields; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + ConnectedFields.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + _fields: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object.isRequired, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + var connector = __WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"](function (state, ownProps) { + var names = ownProps.names, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; -var isReduxFormAction = function isReduxFormAction(action) { - return action && action.type && action.type.length > __WEBPACK_IMPORTED_MODULE_0__actionTypes__["prefix"].length && action.type.substring(0, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["prefix"].length) === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["prefix"]; + var formState = getFormState(state); + return { + _fields: names.reduce(function (accumulator, name) { + var initialState = getIn(formState, 'initial.' + name); + var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var submitting = getIn(formState, 'submitting'); + var pristine = value === initial; + accumulator[name] = { + asyncError: getIn(formState, 'asyncErrors.' + name), + asyncValidating: getIn(formState, 'asyncValidating') === name, + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name), + submitFailed: getIn(formState, 'submitFailed'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + _value: ownProps.value // save value passed in (for checkboxes) + }; + return accumulator; + }, {}) + }; + }, undefined, undefined, { withRef: true }); + return connector(ConnectedFields); }; -var createReducer = function createReducer(structure) { - var _behaviors; +/* harmony default export */ __webpack_exports__["a"] = (createConnectedFields); - var deepEqual = structure.deepEqual, - empty = structure.empty, - getIn = structure.getIn, - setIn = structure.setIn, - deleteIn = structure.deleteIn, - fromJS = structure.fromJS, - keys = structure.keys, - size = structure.size, - splice = structure.splice; +/***/ }), +/* 623 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - var deleteInWithCleanUp = Object(__WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__["a" /* default */])(structure); - var doSplice = function doSplice(state, key, field, index, removeNum, value, force) { - var existing = getIn(state, key + '.' + field); - return existing || force ? setIn(state, key + '.' + field, splice(existing, index, removeNum, value)) : state; - }; - var doPlainSplice = function doPlainSplice(state, key, field, index, removeNum, value, force) { - var slice = getIn(state, key); - var existing = __WEBPACK_IMPORTED_MODULE_2__structure_plain__["a" /* default */].getIn(slice, field); - return existing || force ? setIn(state, key, __WEBPACK_IMPORTED_MODULE_2__structure_plain__["a" /* default */].setIn(slice, field, __WEBPACK_IMPORTED_MODULE_2__structure_plain__["a" /* default */].splice(existing, index, removeNum, value))) : state; - }; - var rootKeys = ['values', 'fields', 'submitErrors', 'asyncErrors']; - var arraySplice = function arraySplice(state, field, index, removeNum, value) { - var result = state; - var nonValuesValue = value != null ? empty : undefined; - result = doSplice(result, 'values', field, index, removeNum, value, true); - result = doSplice(result, 'fields', field, index, removeNum, nonValuesValue); - result = doPlainSplice(result, 'syncErrors', field, index, removeNum, undefined); - result = doPlainSplice(result, 'syncWarnings', field, index, removeNum, undefined); - result = doSplice(result, 'submitErrors', field, index, removeNum, undefined); - result = doSplice(result, 'asyncErrors', field, index, removeNum, undefined); - return result; - }; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(83); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedFieldArray__ = __webpack_require__(624); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(185); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(119); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - var behaviors = (_behaviors = {}, _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], function (state, _ref) { - var _ref$meta = _ref.meta, - field = _ref$meta.field, - index = _ref$meta.index, - payload = _ref.payload; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - return arraySplice(state, field, index, 0, payload); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], function (state, _ref2) { - var _ref2$meta = _ref2.meta, - field = _ref2$meta.field, - from = _ref2$meta.from, - to = _ref2$meta.to; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var array = getIn(state, 'values.' + field); - var length = array ? size(array) : 0; - var result = state; - if (length) { - rootKeys.forEach(function (key) { - var path = key + '.' + field; - if (getIn(result, path)) { - var value = getIn(result, path + '[' + from + ']'); - result = setIn(result, path, splice(getIn(result, path), from, 1) // remove - );result = setIn(result, path, splice(getIn(result, path), to, 0, value) // insert - ); - } - }); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], function (state, _ref3) { - var field = _ref3.meta.field; +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var array = getIn(state, 'values.' + field); - var length = array ? size(array) : 0; - return length ? arraySplice(state, field, length - 1, 1) : state; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], function (state, _ref4) { - var field = _ref4.meta.field, - payload = _ref4.payload; +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var array = getIn(state, 'values.' + field); - var length = array ? size(array) : 0; - return arraySplice(state, field, length, 0, payload); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], function (state, _ref5) { - var _ref5$meta = _ref5.meta, - field = _ref5$meta.field, - index = _ref5$meta.index; +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - return arraySplice(state, field, index, 1); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], function (state, _ref6) { - var field = _ref6.meta.field; - var array = getIn(state, 'values.' + field); - var length = array ? size(array) : 0; - return length ? arraySplice(state, field, 0, length) : state; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], function (state, _ref7) { - var field = _ref7.meta.field; - return arraySplice(state, field, 0, 1); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], function (state, _ref8) { - var _ref8$meta = _ref8.meta, - field = _ref8$meta.field, - index = _ref8$meta.index, - removeNum = _ref8$meta.removeNum, - payload = _ref8.payload; - return arraySplice(state, field, index, removeNum, payload); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], function (state, _ref9) { - var _ref9$meta = _ref9.meta, - field = _ref9$meta.field, - indexA = _ref9$meta.indexA, - indexB = _ref9$meta.indexB; - var result = state; - rootKeys.forEach(function (key) { - var valueA = getIn(result, key + '.' + field + '[' + indexA + ']'); - var valueB = getIn(result, key + '.' + field + '[' + indexB + ']'); - if (valueA !== undefined || valueB !== undefined) { - result = setIn(result, key + '.' + field + '[' + indexA + ']', valueB); - result = setIn(result, key + '.' + field + '[' + indexB + ']', valueA); - } - }); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], function (state, _ref10) { - var field = _ref10.meta.field, - payload = _ref10.payload; - return arraySplice(state, field, 0, 0, payload); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], function (state, _ref11) { - var field = _ref11.meta.field, - payload = _ref11.payload; - var result = state; - result = deleteInWithCleanUp(result, 'asyncErrors.' + field); - result = deleteInWithCleanUp(result, 'submitErrors.' + field); - result = setIn(result, 'fields.' + field + '.autofilled', true); - result = setIn(result, 'values.' + field, payload); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], function (state, _ref12) { - var _ref12$meta = _ref12.meta, - field = _ref12$meta.field, - touch = _ref12$meta.touch, - payload = _ref12.payload; +var toArray = function toArray(value) { + return Array.isArray(value) ? value : [value]; +}; - var result = state; - var initial = getIn(result, 'initial.' + field); - if (initial === undefined && payload === '') { - result = deleteInWithCleanUp(result, 'values.' + field); - } else if (payload !== undefined) { - result = setIn(result, 'values.' + field, payload); - } - if (field === getIn(result, 'active')) { - result = deleteIn(result, 'active'); - } - result = deleteIn(result, 'fields.' + field + '.active'); - if (touch) { - result = setIn(result, 'fields.' + field + '.touched', true); - result = setIn(result, 'anyTouched', true); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], function (state, _ref13) { - var _ref13$meta = _ref13.meta, - field = _ref13$meta.field, - touch = _ref13$meta.touch, - persistentSubmitErrors = _ref13$meta.persistentSubmitErrors, - payload = _ref13.payload; +var wrapError = function wrapError(fn, key) { + return fn && function () { + var validators = toArray(fn); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; - var result = state; - var initial = getIn(result, 'initial.' + field); - if (initial === undefined && payload === '') { - result = deleteInWithCleanUp(result, 'values.' + field); - } else if (payload !== undefined) { - result = setIn(result, 'values.' + field, payload); - } - result = deleteInWithCleanUp(result, 'asyncErrors.' + field); - if (!persistentSubmitErrors) { - result = deleteInWithCleanUp(result, 'submitErrors.' + field); - } - result = deleteInWithCleanUp(result, 'fields.' + field + '.autofilled'); - if (touch) { - result = setIn(result, 'fields.' + field + '.touched', true); - result = setIn(result, 'anyTouched', true); + try { + for (var _iterator = validators[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var validator = _step.value; + + var result = validator.apply(undefined, arguments); + if (result) { + return _defineProperty({}, key, result); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], function (state) { - return deleteIn(state, 'triggerSubmit'); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT_ERRORS"], function (state) { - return deleteInWithCleanUp(state, 'submitErrors'); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], function (state, _ref14) { - var field = _ref14.meta.field; + }; +}; - return deleteIn(state, 'asyncErrors.' + field); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], function (state, _ref15) { - var field = _ref15.meta.field; +var createFieldArray = function createFieldArray(_ref2) { + var deepEqual = _ref2.deepEqual, + getIn = _ref2.getIn, + size = _ref2.size; - var result = state; - var previouslyActive = getIn(state, 'active'); - result = deleteIn(result, 'fields.' + previouslyActive + '.active'); - result = setIn(result, 'fields.' + field + '.visited', true); - result = setIn(result, 'fields.' + field + '.active', true); - result = setIn(result, 'active', field); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], function (state, _ref16) { - var payload = _ref16.payload, - _ref16$meta = _ref16.meta, - keepDirty = _ref16$meta.keepDirty, - keepSubmitSucceeded = _ref16$meta.keepSubmitSucceeded; - var mapData = fromJS(payload); - var result = empty; // clean all field state + var ConnectedFieldArray = __WEBPACK_IMPORTED_MODULE_2__ConnectedFieldArray__["a" /* default */]({ deepEqual: deepEqual, getIn: getIn, size: size }); - // persist old warnings, they will get recalculated if the new form values are different from the old values - var warning = getIn(state, 'warning'); - if (warning) { - result = setIn(result, 'warning', warning); - } - var syncWarnings = getIn(state, 'syncWarnings'); - if (syncWarnings) { - result = setIn(result, 'syncWarnings', syncWarnings); - } + var FieldArray = function (_Component) { + _inherits(FieldArray, _Component); - // persist old errors, they will get recalculated if the new form values are different from the old values - var error = getIn(state, 'error'); - if (error) { - result = setIn(result, 'error', error); - } - var syncErrors = getIn(state, 'syncErrors'); - if (syncErrors) { - result = setIn(result, 'syncErrors', syncErrors); - } + function FieldArray(props, context) { + _classCallCheck(this, FieldArray); - var registeredFields = getIn(state, 'registeredFields'); - if (registeredFields) { - result = setIn(result, 'registeredFields', registeredFields); + var _this = _possibleConstructorReturn(this, (FieldArray.__proto__ || Object.getPrototypeOf(FieldArray)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('FieldArray must be inside a component decorated with reduxForm()'); + } + return _this; } - var previousValues = getIn(state, 'values'); - var previousInitialValues = getIn(state, 'initial'); - var newInitialValues = mapData; + _createClass(FieldArray, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; - var newValues = previousValues; + this.context._reduxForm.register(this.name, 'FieldArray', function () { + return wrapError(_this2.props.validate, '_error'); + }, function () { + return wrapError(_this2.props.warn, '_warning'); + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.name !== nextProps.name) { + // unregister old name + this.context._reduxForm.unregister(this.name); + // register new name + this.context._reduxForm.register(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, nextProps.name), 'FieldArray'); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context._reduxForm.unregister(this.name); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to FieldArray'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedFieldArray, _extends({}, this.props, { + name: this.name, + syncError: this.syncError, + syncWarning: this.syncWarning, + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'name', + get: function get() { + return __WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, this.props.name); + } + }, { + key: 'dirty', + get: function get() { + return this.refs.connected.getWrappedInstance().dirty; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.connected.getWrappedInstance().pristine; + } + }, { + key: 'value', + get: function get() { + return this.refs.connected.getWrappedInstance().value; + } + }]); - if (keepDirty && registeredFields) { - if (!deepEqual(newInitialValues, previousInitialValues)) { - // - // Keep the value of dirty fields while updating the value of - // pristine fields. This way, apps can reinitialize forms while - // avoiding stomping on user edits. - // - // Note 1: The initialize action replaces all initial values - // regardless of keepDirty. - // - // Note 2: When a field is dirty, keepDirty is enabled, and the field - // value is the same as the new initial value for the field, the - // initialize action causes the field to become pristine. That effect - // is what we want. - // - keys(registeredFields).forEach(function (name) { - var previousInitialValue = getIn(previousInitialValues, name); - var previousValue = getIn(previousValues, name); + return FieldArray; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); - if (deepEqual(previousValue, previousInitialValue)) { - // Overwrite the old pristine value with the new pristine value - var newInitialValue = getIn(newInitialValues, name); - newValues = setIn(newValues, name, newInitialValue); - } - }); + FieldArray.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + FieldArray.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; - keys(newInitialValues).forEach(function (name) { - var previousInitialValue = getIn(previousInitialValues, name); - if (typeof previousInitialValue === 'undefined') { - // Add new values at the root level. - var newInitialValue = getIn(newInitialValues, name); - newValues = setIn(newValues, name, newInitialValue); - } - }); - } - } else { - newValues = newInitialValues; - } + return FieldArray; +}; - if (keepSubmitSucceeded && getIn(state, 'submitSucceeded')) { - result = setIn(result, 'submitSucceeded', true); - } - result = setIn(result, 'values', newValues); - result = setIn(result, 'initial', newInitialValues); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], function (state, _ref17) { - var _ref17$payload = _ref17.payload, - name = _ref17$payload.name, - type = _ref17$payload.type; +/* harmony default export */ __webpack_exports__["a"] = (createFieldArray); - var key = 'registeredFields[\'' + name + '\']'; - var field = getIn(state, key); - if (field) { - var count = getIn(field, 'count') + 1; - field = setIn(field, 'count', count); - } else { - field = fromJS({ name: name, type: type, count: 1 }); - } - return setIn(state, key, field); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], function (state) { - var result = empty; - var registeredFields = getIn(state, 'registeredFields'); - if (registeredFields) { - result = setIn(result, 'registeredFields', registeredFields); - } - var values = getIn(state, 'initial'); - if (values) { - result = setIn(result, 'values', values); - result = setIn(result, 'initial', values); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], function (state) { - return setIn(state, 'triggerSubmit', true); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], function (state, _ref18) { - var field = _ref18.meta.field; +/***/ }), +/* 624 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return setIn(state, 'asyncValidating', field || true); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], function (state) { - return setIn(state, 'submitting', true); - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], function (state, _ref19) { - var payload = _ref19.payload; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__ = __webpack_require__(275); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(28); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux__ = __webpack_require__(165); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createFieldArrayProps__ = __webpack_require__(625); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__structure_plain__ = __webpack_require__(48); - var result = state; - result = deleteIn(result, 'asyncValidating'); - if (payload && Object.keys(payload).length) { - var _error = payload._error, - fieldErrors = _objectWithoutProperties(payload, ['_error']); - if (_error) { - result = setIn(result, 'error', _error); - } - if (Object.keys(fieldErrors).length) { - result = setIn(result, 'asyncErrors', fromJS(fieldErrors)); - } else { - result = deleteIn(result, 'asyncErrors'); - } - } else { - result = deleteIn(result, 'error'); - result = deleteIn(result, 'asyncErrors'); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], function (state, _ref20) { - var payload = _ref20.payload; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var result = state; - result = deleteIn(result, 'submitting'); - result = deleteIn(result, 'submitFailed'); - result = deleteIn(result, 'submitSucceeded'); - if (payload && Object.keys(payload).length) { - var _error = payload._error, - fieldErrors = _objectWithoutProperties(payload, ['_error']); +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - if (_error) { - result = setIn(result, 'error', _error); - } else { - result = deleteIn(result, 'error'); - } - if (Object.keys(fieldErrors).length) { - result = setIn(result, 'submitErrors', fromJS(fieldErrors)); - } else { - result = deleteIn(result, 'submitErrors'); - } - result = setIn(result, 'submitFailed', true); - } else { - result = setIn(result, 'submitSucceeded', true); - result = deleteIn(result, 'error'); - result = deleteIn(result, 'submitErrors'); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], function (state, _ref21) { - var fields = _ref21.meta.fields; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var result = state; - result = setIn(result, 'submitFailed', true); - result = deleteIn(result, 'submitSucceeded'); - result = deleteIn(result, 'submitting'); - fields.forEach(function (field) { - return result = setIn(result, 'fields.' + field + '.touched', true); - }); - if (fields.length) { - result = setIn(result, 'anyTouched', true); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], function (state) { - var result = state; - result = deleteIn(result, 'submitFailed'); - result = setIn(result, 'submitSucceeded', true); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], function (state, _ref22) { - var fields = _ref22.meta.fields; +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var result = state; - fields.forEach(function (field) { - return result = setIn(result, 'fields.' + field + '.touched', true); - }); - result = setIn(result, 'anyTouched', true); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], function (state, _ref23) { - var _ref23$payload = _ref23.payload, - name = _ref23$payload.name, - destroyOnUnmount = _ref23$payload.destroyOnUnmount; +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var result = state; - var key = 'registeredFields[\'' + name + '\']'; - var field = getIn(result, key); - if (!field) { - return result; - } - var count = getIn(field, 'count') - 1; - if (count <= 0 && destroyOnUnmount) { - // Note: Cannot use deleteWithCleanUp here because of the flat nature of registeredFields - result = deleteIn(result, key); - if (deepEqual(getIn(result, 'registeredFields'), empty)) { - result = deleteIn(result, 'registeredFields'); - } - } else { - field = setIn(field, 'count', count); - result = setIn(result, key, field); - } - if (destroyOnUnmount) { - result = deleteInWithCleanUp(result, 'syncErrors.' + name); - result = deleteInWithCleanUp(result, 'submitErrors.' + name); - result = deleteInWithCleanUp(result, 'asyncErrors.' + name); - result = deleteInWithCleanUp(result, 'syncWarnings.' + name); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], function (state, _ref24) { - var fields = _ref24.meta.fields; - var result = state; - fields.forEach(function (field) { - return result = deleteIn(result, 'fields.' + field + '.touched'); - }); - var anyTouched = keys(getIn(result, 'registeredFields')).some(function (key) { - return getIn(result, 'fields.' + key + '.touched'); - }); - result = anyTouched ? setIn(result, 'anyTouched', true) : deleteIn(result, 'anyTouched'); - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], function (state, _ref25) { - var _ref25$payload = _ref25.payload, - syncErrors = _ref25$payload.syncErrors, - error = _ref25$payload.error; - var result = state; - if (error) { - result = setIn(result, 'error', error); - result = setIn(result, 'syncError', true); - } else { - result = deleteIn(result, 'error'); - result = deleteIn(result, 'syncError'); - } - if (Object.keys(syncErrors).length) { - result = setIn(result, 'syncErrors', syncErrors); - } else { - result = deleteIn(result, 'syncErrors'); - } - return result; - }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], function (state, _ref26) { - var _ref26$payload = _ref26.payload, - syncWarnings = _ref26$payload.syncWarnings, - warning = _ref26$payload.warning; - var result = state; - if (warning) { - result = setIn(result, 'warning', warning); - } else { - result = deleteIn(result, 'warning'); - } - if (Object.keys(syncWarnings).length) { - result = setIn(result, 'syncWarnings', syncWarnings); - } else { - result = deleteIn(result, 'syncWarnings'); - } - return result; - }), _behaviors); - var reducer = function reducer() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; - var action = arguments[1]; - var behavior = behaviors[action.type]; - return behavior ? behavior(state, action) : state; + +var propsToNotUpdateFor = ['_reduxForm', 'value']; + +var createConnectedFieldArray = function createConnectedFieldArray(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + size = _ref.size; + + + var getSyncError = function getSyncError(syncErrors, name) { + // For an array, the error can _ONLY_ be under _error. + // This is why this getSyncError is not the same as the + // one in Field. + return __WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error'); }; - var byForm = function byForm(reducer) { - return function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; - var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + // For an array, the warning can _ONLY_ be under _warning. + // This is why this getSyncError is not the same as the + // one in Field. + return __WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].getIn(syncWarnings, name + '._warning'); + }; - var form = action && action.meta && action.meta.form; - if (!form || !isReduxFormAction(action)) { - return state; + var ConnectedFieldArray = function (_Component) { + _inherits(ConnectedFieldArray, _Component); + + function ConnectedFieldArray() { + _classCallCheck(this, ConnectedFieldArray); + + var _this = _possibleConstructorReturn(this, (ConnectedFieldArray.__proto__ || Object.getPrototypeOf(ConnectedFieldArray)).call(this)); + + _this.getValue = _this.getValue.bind(_this); + return _this; + } + + _createClass(ConnectedFieldArray, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this2 = this; + + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + // useful to debug rerenders + // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { + // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) + // } + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); + }); } - if (action.type === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"]) { - return action.meta.form.reduce(function (result, form) { - return deleteInWithCleanUp(result, form); - }, state); + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; } - var formState = getIn(state, form); - var result = reducer(formState, action); - return result === formState ? state : setIn(state, form, result); - }; + }, { + key: 'getValue', + value: function getValue(index) { + return this.props.value && getIn(this.props.value, index); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + component = _props.component, + withRef = _props.withRef, + name = _props.name, + _reduxForm = _props._reduxForm, + validate = _props.validate, + warn = _props.warn, + rest = _objectWithoutProperties(_props, ['component', 'withRef', 'name', '_reduxForm', 'validate', 'warn']); + + var props = __WEBPACK_IMPORTED_MODULE_4__createFieldArrayProps__["a" /* default */](getIn, name, _reduxForm.sectionPrefix, this.getValue, rest); + if (withRef) { + props.ref = 'renderedComponent'; + } + return __WEBPACK_IMPORTED_MODULE_1_react__["createElement"](component, props); + } + }, { + key: 'dirty', + get: function get() { + return this.props.dirty; + } + }, { + key: 'pristine', + get: function get() { + return this.props.pristine; + } + }, { + key: 'value', + get: function get() { + return this.props.value; + } + }]); + + return ConnectedFieldArray; + }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); + + ConnectedFieldArray.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].string]).isRequired, + props: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].object }; - /** - * Adds additional functionality to the reducer - */ - function decorate(target) { - target.plugin = function plugin(reducers) { - var _this = this; + ConnectedFieldArray.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].object + }; - // use 'function' keyword to enable 'this' - return decorate(function () { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; - var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - return Object.keys(reducers).reduce(function (accumulator, key) { - var previousState = getIn(accumulator, key); - var nextState = reducers[key](previousState, action, getIn(state, key)); - return nextState === previousState ? accumulator : setIn(accumulator, key, nextState); - }, _this(state, action)); - }); - }; + var connector = __WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"](function (state, ownProps) { + var name = ownProps.name, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; - return target; - } + var formState = getFormState(state); + var initial = getIn(formState, 'initial.' + name) || initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var submitting = getIn(formState, 'submitting'); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var pristine = deepEqual(value, initial); + return { + asyncError: getIn(formState, 'asyncErrors.' + name + '._error'), + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name + '._error'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + length: size(value) + }; + }, function (dispatch, ownProps) { + var name = ownProps.name, + _reduxForm = ownProps._reduxForm; + var arrayInsert = _reduxForm.arrayInsert, + arrayMove = _reduxForm.arrayMove, + arrayPop = _reduxForm.arrayPop, + arrayPush = _reduxForm.arrayPush, + arrayRemove = _reduxForm.arrayRemove, + arrayRemoveAll = _reduxForm.arrayRemoveAll, + arrayShift = _reduxForm.arrayShift, + arraySplice = _reduxForm.arraySplice, + arraySwap = _reduxForm.arraySwap, + arrayUnshift = _reduxForm.arrayUnshift; - return decorate(byForm(reducer)); + return __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__["a" /* default */]({ + arrayInsert: arrayInsert, + arrayMove: arrayMove, + arrayPop: arrayPop, + arrayPush: arrayPush, + arrayRemove: arrayRemove, + arrayRemoveAll: arrayRemoveAll, + arrayShift: arrayShift, + arraySplice: arraySplice, + arraySwap: arraySwap, + arrayUnshift: arrayUnshift + }, function (actionCreator) { + return __WEBPACK_IMPORTED_MODULE_3_redux__["bindActionCreators"](actionCreator.bind(null, name), dispatch); + }); + }, undefined, { withRef: true }); + return connector(ConnectedFieldArray); }; -/* harmony default export */ __webpack_exports__["a"] = (createReducer); +/* harmony default export */ __webpack_exports__["a"] = (createConnectedFieldArray); /***/ }), -/* 660 */ +/* 625 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(110); - - - -var createDeleteInWithCleanUp = function createDeleteInWithCleanUp(_ref) { - var deepEqual = _ref.deepEqual, - empty = _ref.empty, - getIn = _ref.getIn, - deleteIn = _ref.deleteIn, - setIn = _ref.setIn; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - var deleteInWithCleanUp = function deleteInWithCleanUp(state, path) { - if (path[path.length - 1] === ']') { - // array path - var pathTokens = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(path); - pathTokens.pop(); - var parent = getIn(state, pathTokens.join('.')); - return parent ? setIn(state, path, undefined) : state; - } +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - var result = state; - if (getIn(state, path) !== undefined) { - result = deleteIn(state, path); - } +var createFieldArrayProps = function createFieldArrayProps(getIn, name, sectionPrefix, getValue, _ref) { + var arrayInsert = _ref.arrayInsert, + arrayMove = _ref.arrayMove, + arrayPop = _ref.arrayPop, + arrayPush = _ref.arrayPush, + arrayRemove = _ref.arrayRemove, + arrayRemoveAll = _ref.arrayRemoveAll, + arrayShift = _ref.arrayShift, + arraySplice = _ref.arraySplice, + arraySwap = _ref.arraySwap, + arrayUnshift = _ref.arrayUnshift, + asyncError = _ref.asyncError, + dirty = _ref.dirty, + length = _ref.length, + pristine = _ref.pristine, + submitError = _ref.submitError, + state = _ref.state, + submitFailed = _ref.submitFailed, + submitting = _ref.submitting, + syncError = _ref.syncError, + syncWarning = _ref.syncWarning, + value = _ref.value, + props = _ref.props, + rest = _objectWithoutProperties(_ref, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncError', 'dirty', 'length', 'pristine', 'submitError', 'state', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'value', 'props']); - var dotIndex = path.lastIndexOf('.'); - if (dotIndex > 0) { - var parentPath = path.substring(0, dotIndex); - if (parentPath[parentPath.length - 1] !== ']') { - var _parent = getIn(result, parentPath); - if (deepEqual(_parent, empty)) { - return deleteInWithCleanUp(result, parentPath); - } - } + var error = syncError || asyncError || submitError; + var warning = syncWarning; + var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; + var finalProps = _extends({ + fields: { + _isFieldArray: true, + forEach: function forEach(callback) { + return (value || []).forEach(function (item, index) { + return callback(fieldName + '[' + index + ']', index, finalProps.fields); + }); + }, + get: getValue, + getAll: function getAll() { + return value; + }, + insert: arrayInsert, + length: length, + map: function map(callback) { + return (value || []).map(function (item, index) { + return callback(fieldName + '[' + index + ']', index, finalProps.fields); + }); + }, + move: arrayMove, + name: name, + pop: function pop() { + arrayPop(); + return getIn(value, length - 1); + }, + push: arrayPush, + reduce: function reduce(callback, initial) { + return (value || []).reduce(function (accumulator, item, index) { + return callback(accumulator, fieldName + '[' + index + ']', index, finalProps.fields); + }, initial); + }, + remove: arrayRemove, + removeAll: arrayRemoveAll, + shift: function shift() { + arrayShift(); + return getIn(value, 0); + }, + swap: arraySwap, + unshift: arrayUnshift + }, + meta: { + dirty: dirty, + error: error, + warning: warning, + invalid: !!error, + pristine: pristine, + submitting: submitting, + touched: !!(state && getIn(state, 'touched')), + valid: !error } - return result; - }; - - return deleteInWithCleanUp; + }, props, rest); + return finalProps; }; -/* harmony default export */ __webpack_exports__["a"] = (createDeleteInWithCleanUp); +/* harmony default export */ __webpack_exports__["a"] = (createFieldArrayProps); /***/ }), -/* 661 */ +/* 626 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createValues__ = __webpack_require__(662); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(13); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(83); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(48); -/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */])); +var createFormValueSelector = function createFormValueSelector(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + + __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(form, 'Form value must be specified'); + return function (state) { + for (var _len = arguments.length, fields = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + fields[_key - 1] = arguments[_key]; + } + + __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(fields.length, 'No fields specified'); + return fields.length === 1 ? + // only selecting one field, so return its value + getIn(getFormState(state), form + '.values.' + fields[0]) : + // selecting many fields, so return an object of field values + fields.reduce(function (accumulator, field) { + var value = getIn(getFormState(state), form + '.values.' + field); + return value === undefined ? accumulator : __WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */].setIn(accumulator, field, value); + }, {}); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFormValueSelector); /***/ }), -/* 662 */ +/* 627 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_redux__); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -49064,7 +49358,7 @@ var createValues = function createValues(_ref) { prop = _prop$getFormState$co.prop, getFormState = _prop$getFormState$co.getFormState; - return Object(__WEBPACK_IMPORTED_MODULE_0_react_redux__["connect"])(function (state) { + return __WEBPACK_IMPORTED_MODULE_0_react_redux__["connect"](function (state) { return _defineProperty({}, prop, getIn(getFormState(state), form + '.values')); }, function () { return {}; @@ -49076,108 +49370,536 @@ var createValues = function createValues(_ref) { /* harmony default export */ __webpack_exports__["a"] = (createValues); /***/ }), -/* 663 */ -/***/ (function(module, exports, __webpack_require__) { +/* 628 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +var createGetFormValues = function createGetFormValues(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.values'); + }; + }; +}; +/* harmony default export */ __webpack_exports__["a"] = (createGetFormValues); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.passiveOption = exports.detachEvent = exports.attachEvent = exports.removeEventListener = exports.addEventListener = exports.canUseDOM = undefined; - -var _defineProperty = __webpack_require__(664); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// Inspired by https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/ExecutionEnvironment.js -var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); +/***/ }), +/* 629 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var addEventListener = exports.addEventListener = canUseDOM && 'addEventListener' in window; -var removeEventListener = exports.removeEventListener = canUseDOM && 'removeEventListener' in window; +"use strict"; +var createGetFormInitialValues = function createGetFormInitialValues(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.initial'); + }; + }; +}; -// IE8+ Support -var attachEvent = exports.attachEvent = canUseDOM && 'attachEvent' in window; -var detachEvent = exports.detachEvent = canUseDOM && 'detachEvent' in window; +/* harmony default export */ __webpack_exports__["a"] = (createGetFormInitialValues); -// Passive options -// Inspired by https://github.com/Modernizr/Modernizr/blob/master/feature-detects/dom/passiveeventlisteners.js -var passiveOption = exports.passiveOption = function () { - var cache = null; +/***/ }), +/* 630 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return function () { - if (cache !== null) { - return cache; - } +"use strict"; +var createGetFormSyncErrors = function createGetFormSyncErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.syncErrors'); + }; + }; +}; - var supportsPassiveOption = false; +/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncErrors); - try { - window.addEventListener('test', null, (0, _defineProperty2.default)({}, 'passive', { - get: function get() { - supportsPassiveOption = true; - } - })); - } catch (e) {} // eslint-disable-line no-empty +/***/ }), +/* 631 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - cache = supportsPassiveOption; +"use strict"; +var createGetFormAsyncErrors = function createGetFormAsyncErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.asyncErrors'); + }; + }; +}; - return supportsPassiveOption; - }(); -}(); +/* harmony default export */ __webpack_exports__["a"] = (createGetFormAsyncErrors); /***/ }), -/* 664 */ -/***/ (function(module, exports, __webpack_require__) { +/* 632 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +var createGetFormSubmitErrors = function createGetFormSubmitErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.submitErrors'); + }; + }; +}; +/* harmony default export */ __webpack_exports__["a"] = (createGetFormSubmitErrors); -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _defineProperty = __webpack_require__(137); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); +/***/ }), +/* 633 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -exports.default = defineProperty; +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPristine__ = __webpack_require__(289); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -// weak +var createIsDirty = function createIsDirty(structure) { + return function (form, getFormState) { + var isPristine = __WEBPACK_IMPORTED_MODULE_0__isPristine__["a" /* default */](structure)(form, getFormState); + return function (state) { + return !isPristine(state); + }; + }; +}; -function defineProperty(o, p, attr) { - return (0, _defineProperty2.default)(o, p, attr); -} +/* harmony default export */ __webpack_exports__["a"] = (createIsDirty); /***/ }), -/* 665 */ -/***/ (function(module, exports, __webpack_require__) { +/* 634 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isValid__ = __webpack_require__(184); -var _extends2 = __webpack_require__(8); -var _extends3 = _interopRequireDefault(_extends2); +var createIsInvalid = function createIsInvalid(structure) { + return function (form, getFormState) { + var isValid = __WEBPACK_IMPORTED_MODULE_0__isValid__["a" /* default */](structure)(form, getFormState); + return function (state) { + return !isValid(state); + }; + }; +}; -var _objectWithoutProperties2 = __webpack_require__(9); +/* harmony default export */ __webpack_exports__["a"] = (createIsInvalid); -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); +/***/ }), +/* 635 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var _getPrototypeOf = __webpack_require__(4); +"use strict"; +var createIsSubmitting = function createIsSubmitting(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitting') || false; + }; + }; +}; -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +/* harmony default export */ __webpack_exports__["a"] = (createIsSubmitting); -var _classCallCheck2 = __webpack_require__(2); +/***/ }), +/* 636 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createHasSubmitSucceeded = function createHasSubmitSucceeded(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitSucceeded') || false; + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitSucceeded); + +/***/ }), +/* 637 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createHasSubmitFailed = function createHasSubmitFailed(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitFailed') || false; + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitFailed); + +/***/ }), +/* 638 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + +var Form = function (_Component) { + _inherits(Form, _Component); + + function Form(props, context) { + _classCallCheck(this, Form); + + var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Form must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(Form, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit); + } + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('form', this.props); + } + }]); + + return Form; +}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + +Form.propTypes = { + onSubmit: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired +}; +Form.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object +}; + +/* harmony default export */ __webpack_exports__["a"] = (Form); + +/***/ }), +/* 639 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_prefixName__ = __webpack_require__(119); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + +var FormSection = function (_Component) { + _inherits(FormSection, _Component); + + function FormSection(props, context) { + _classCallCheck(this, FormSection); + + var _this = _possibleConstructorReturn(this, (FormSection.__proto__ || Object.getPrototypeOf(FormSection)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('FormSection must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(FormSection, [{ + key: 'getChildContext', + value: function getChildContext() { + var context = this.context, + name = this.props.name; + + return { + _reduxForm: _extends({}, context._reduxForm, { + sectionPrefix: __WEBPACK_IMPORTED_MODULE_1__util_prefixName__["a" /* default */](context, name) + }) + }; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + name = _props.name, + component = _props.component, + rest = _objectWithoutProperties(_props, ['children', 'name', 'component']); + + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(children)) { + return children; + } + + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, rest, { + children: children + })); + } + }]); + + return FormSection; +}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + +FormSection.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]) +}; + +FormSection.defaultProps = { + component: 'div' +}; + +FormSection.childContextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object.isRequired +}; + +FormSection.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object +}; + +/* harmony default export */ __webpack_exports__["a"] = (FormSection); + +/***/ }), +/* 640 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); + +var any = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].any, + bool = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].bool, + func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape; + + +var propTypes = { + // State: + asyncValidating: bool.isRequired, // true if async validation is running + dirty: bool.isRequired, // true if any values are different from initialValues + error: any, // form-wide error from '_error' key in validation result + warning: any, // form-wide warning from '_warning' key in validation result + invalid: bool.isRequired, // true if there are any validation errors + initialized: bool.isRequired, // true if the form has been initialized + pristine: bool.isRequired, // true if the values are the same as initialValues + submitting: bool.isRequired, // true if the form is in the process of being submitted + submitFailed: bool.isRequired, // true if the form was submitted and failed for any reason + submitSucceeded: bool.isRequired, // true if the form was successfully submitted + valid: bool.isRequired, // true if there are no validation errors + // Actions: + array: shape({ + insert: func.isRequired, // function to insert a value into an array field + move: func.isRequired, // function to move a value within an array field + pop: func.isRequired, // function to pop a value off of an array field + push: func.isRequired, // function to push a value onto an array field + remove: func.isRequired, // function to remove a value from an array field + removeAll: func.isRequired, // function to remove all the values from an array field + shift: func.isRequired, // function to shift a value out of an array field + splice: func.isRequired, // function to splice a value into an array field + swap: func.isRequired, // function to swap values in an array field + unshift: func.isRequired // function to unshift a value into an array field + }), + asyncValidate: func.isRequired, // function to trigger async validation + blur: func.isRequired, // action to mark a field as blurred + change: func.isRequired, // action to change the value of a field + destroy: func.isRequired, // action to destroy the form's data in Redux + dispatch: func.isRequired, // the Redux dispatch action + handleSubmit: func.isRequired, // function to submit the form + initialize: func.isRequired, // action to initialize form data + reset: func.isRequired, // action to reset the form data to previously initialized values + touch: func.isRequired, // action to mark fields as touched + untouch: func.isRequired // action to mark fields as untouched +}; + +/* harmony default export */ __webpack_exports__["a"] = (propTypes); + +/***/ }), +/* 641 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(642); + +/***/ }), +/* 642 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var shallowEqual = __webpack_require__(82); + +/** + * Does a shallow comparison for props and state. + * See ReactComponentWithPureRenderMixin + * See also https://facebook.github.io/react/docs/shallow-compare.html + */ +function shallowCompare(instance, nextProps, nextState) { + return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState); +} + +module.exports = shallowCompare; + +/***/ }), +/* 643 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.passiveOption = exports.detachEvent = exports.attachEvent = exports.removeEventListener = exports.addEventListener = exports.canUseDOM = undefined; + +var _defineProperty = __webpack_require__(644); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Inspired by https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/ExecutionEnvironment.js +var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +var addEventListener = exports.addEventListener = canUseDOM && 'addEventListener' in window; +var removeEventListener = exports.removeEventListener = canUseDOM && 'removeEventListener' in window; + +// IE8+ Support +var attachEvent = exports.attachEvent = canUseDOM && 'attachEvent' in window; +var detachEvent = exports.detachEvent = canUseDOM && 'detachEvent' in window; + +// Passive options +// Inspired by https://github.com/Modernizr/Modernizr/blob/master/feature-detects/dom/passiveeventlisteners.js +var passiveOption = exports.passiveOption = function () { + var cache = null; + + return function () { + if (cache !== null) { + return cache; + } + + var supportsPassiveOption = false; + + try { + window.addEventListener('test', null, (0, _defineProperty2.default)({}, 'passive', { + get: function get() { + supportsPassiveOption = true; + } + })); + } catch (e) {} // eslint-disable-line no-empty + + cache = supportsPassiveOption; + + return supportsPassiveOption; + }(); +}(); + +/***/ }), +/* 644 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _defineProperty = __webpack_require__(144); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +exports.default = defineProperty; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// weak + +function defineProperty(o, p, attr) { + return (0, _defineProperty2.default)(o, p, attr); +} + +/***/ }), +/* 645 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); @@ -49201,7 +49923,7 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _propTypes = __webpack_require__(44); +var _propTypes = __webpack_require__(46); var _propTypes2 = _interopRequireDefault(_propTypes); @@ -49308,7 +50030,7 @@ exports.default = Paper; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 666 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -49751,10 +50473,10 @@ function toNumber(value) { module.exports = throttle; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(49))) /***/ }), -/* 667 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -49796,11 +50518,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _propTypes = __webpack_require__(44); +var _propTypes = __webpack_require__(46); var _propTypes2 = _interopRequireDefault(_propTypes); -var _Paper = __webpack_require__(39); +var _Paper = __webpack_require__(38); var _Paper2 = _interopRequireDefault(_Paper); @@ -49929,7 +50651,7 @@ exports.default = PopoverAnimationDefault; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 668 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -49962,7 +50684,7 @@ var isIOS = exports.isIOS = function isIOS() { }; /***/ }), -/* 669 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -49976,11 +50698,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(28); +var _pure = __webpack_require__(22); var _pure2 = _interopRequireDefault(_pure); -var _SvgIcon = __webpack_require__(29); +var _SvgIcon = __webpack_require__(23); var _SvgIcon2 = _interopRequireDefault(_SvgIcon); @@ -50000,7 +50722,7 @@ NavigationCheck.muiName = 'SvgIcon'; exports.default = NavigationCheck; /***/ }), -/* 670 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50010,11 +50732,11 @@ exports.__esModule = true; var _react = __webpack_require__(1); -var _createHelper = __webpack_require__(290); +var _createHelper = __webpack_require__(292); var _createHelper2 = _interopRequireDefault(_createHelper); -var _createEagerFactory = __webpack_require__(673); +var _createEagerFactory = __webpack_require__(653); var _createEagerFactory2 = _interopRequireDefault(_createEagerFactory); @@ -50054,7 +50776,7 @@ var shouldUpdate = function shouldUpdate(test) { exports.default = (0, _createHelper2.default)(shouldUpdate, 'shouldUpdate'); /***/ }), -/* 671 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50062,7 +50784,7 @@ exports.default = (0, _createHelper2.default)(shouldUpdate, 'shouldUpdate'); exports.__esModule = true; -var _getDisplayName = __webpack_require__(672); +var _getDisplayName = __webpack_require__(652); var _getDisplayName2 = _interopRequireDefault(_getDisplayName); @@ -50075,7 +50797,7 @@ var wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) { exports.default = wrapDisplayName; /***/ }), -/* 672 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50097,7 +50819,7 @@ var getDisplayName = function getDisplayName(Component) { exports.default = getDisplayName; /***/ }), -/* 673 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50105,11 +50827,11 @@ exports.default = getDisplayName; exports.__esModule = true; -var _createEagerElementUtil = __webpack_require__(674); +var _createEagerElementUtil = __webpack_require__(654); var _createEagerElementUtil2 = _interopRequireDefault(_createEagerElementUtil); -var _isReferentiallyTransparentFunctionComponent = __webpack_require__(675); +var _isReferentiallyTransparentFunctionComponent = __webpack_require__(655); var _isReferentiallyTransparentFunctionComponent2 = _interopRequireDefault(_isReferentiallyTransparentFunctionComponent); @@ -50125,7 +50847,7 @@ var createFactory = function createFactory(type) { exports.default = createFactory; /***/ }), -/* 674 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50165,7 +50887,7 @@ var createEagerElementUtil = function createEagerElementUtil(hasKey, isReferenti exports.default = createEagerElementUtil; /***/ }), -/* 675 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50173,7 +50895,7 @@ exports.default = createEagerElementUtil; exports.__esModule = true; -var _isClassComponent = __webpack_require__(676); +var _isClassComponent = __webpack_require__(656); var _isClassComponent2 = _interopRequireDefault(_isClassComponent); @@ -50187,7 +50909,7 @@ exports.default = isReferentiallyTransparentFunctionComponent; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 676 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50201,7 +50923,7 @@ var isClassComponent = function isClassComponent(Component) { exports.default = isClassComponent; /***/ }), -/* 677 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50369,7 +51091,7 @@ exports.default = SvgIcon; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 678 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50415,37 +51137,37 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(18); +var _reactDom = __webpack_require__(17); var _reactDom2 = _interopRequireDefault(_reactDom); -var _shallowEqual = __webpack_require__(54); +var _shallowEqual = __webpack_require__(58); var _shallowEqual2 = _interopRequireDefault(_shallowEqual); -var _colorManipulator = __webpack_require__(70); +var _colorManipulator = __webpack_require__(62); var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _EnhancedButton = __webpack_require__(52); +var _EnhancedButton = __webpack_require__(44); var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); -var _IconButton = __webpack_require__(83); +var _IconButton = __webpack_require__(72); var _IconButton2 = _interopRequireDefault(_IconButton); -var _expandLess = __webpack_require__(679); +var _expandLess = __webpack_require__(659); var _expandLess2 = _interopRequireDefault(_expandLess); -var _expandMore = __webpack_require__(680); +var _expandMore = __webpack_require__(660); var _expandMore2 = _interopRequireDefault(_expandMore); -var _NestedList = __webpack_require__(681); +var _NestedList = __webpack_require__(661); var _NestedList2 = _interopRequireDefault(_NestedList); @@ -51087,7 +51809,7 @@ exports.default = ListItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 679 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51101,11 +51823,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(28); +var _pure = __webpack_require__(22); var _pure2 = _interopRequireDefault(_pure); -var _SvgIcon = __webpack_require__(29); +var _SvgIcon = __webpack_require__(23); var _SvgIcon2 = _interopRequireDefault(_SvgIcon); @@ -51125,7 +51847,7 @@ NavigationExpandLess.muiName = 'SvgIcon'; exports.default = NavigationExpandLess; /***/ }), -/* 680 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51139,11 +51861,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(28); +var _pure = __webpack_require__(22); var _pure2 = _interopRequireDefault(_pure); -var _SvgIcon = __webpack_require__(29); +var _SvgIcon = __webpack_require__(23); var _SvgIcon2 = _interopRequireDefault(_SvgIcon); @@ -51163,7 +51885,7 @@ NavigationExpandMore.muiName = 'SvgIcon'; exports.default = NavigationExpandMore; /***/ }), -/* 681 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51177,7 +51899,7 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _List = __webpack_require__(291); +var _List = __webpack_require__(293); var _List2 = _interopRequireDefault(_List); @@ -51219,7 +51941,7 @@ exports.default = NestedList; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 682 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51230,7 +51952,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _Subheader = __webpack_require__(683); +var _Subheader = __webpack_require__(663); var _Subheader2 = _interopRequireDefault(_Subheader); @@ -51239,7 +51961,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.default = _Subheader2.default; /***/ }), -/* 683 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51325,139 +52047,7 @@ exports.default = Subheader; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 684 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _getPrototypeOf = __webpack_require__(4); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(2); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(3); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(5); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(6); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _react = __webpack_require__(1); - -var _reactDom = __webpack_require__(18); - -var _reactDom2 = _interopRequireDefault(_reactDom); - -var _events = __webpack_require__(143); - -var _events2 = _interopRequireDefault(_events); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var isDescendant = function isDescendant(el, target) { - if (target !== null) { - return el === target || isDescendant(el, target.parentNode); - } - return false; -}; - -var clickAwayEvents = ['mouseup', 'touchend']; -var bind = function bind(callback) { - return clickAwayEvents.forEach(function (event) { - return _events2.default.on(document, event, callback); - }); -}; -var unbind = function unbind(callback) { - return clickAwayEvents.forEach(function (event) { - return _events2.default.off(document, event, callback); - }); -}; - -var ClickAwayListener = function (_Component) { - (0, _inherits3.default)(ClickAwayListener, _Component); - - function ClickAwayListener() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, ClickAwayListener); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClickAwayListener.__proto__ || (0, _getPrototypeOf2.default)(ClickAwayListener)).call.apply(_ref, [this].concat(args))), _this), _this.handleClickAway = function (event) { - if (event.defaultPrevented) { - return; - } - - // IE11 support, which trigger the handleClickAway even after the unbind - if (_this.isCurrentlyMounted) { - var el = _reactDom2.default.findDOMNode(_this); - - if (document.documentElement.contains(event.target) && !isDescendant(el, event.target)) { - _this.props.onClickAway(event); - } - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - - (0, _createClass3.default)(ClickAwayListener, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.isCurrentlyMounted = true; - if (this.props.onClickAway) { - bind(this.handleClickAway); - } - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate(prevProps) { - if (prevProps.onClickAway !== this.props.onClickAway) { - unbind(this.handleClickAway); - if (this.props.onClickAway) { - bind(this.handleClickAway); - } - } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.isCurrentlyMounted = false; - unbind(this.handleClickAway); - } - }, { - key: 'render', - value: function render() { - return this.props.children; - } - }]); - return ClickAwayListener; -}(_react.Component); - -process.env.NODE_ENV !== "production" ? ClickAwayListener.propTypes = { - children: _react.PropTypes.element, - onClickAway: _react.PropTypes.func -} : void 0; -exports.default = ClickAwayListener; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 685 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51502,7 +52092,7 @@ var HotKeyHolder = exports.HotKeyHolder = function () { }(); /***/ }), -/* 686 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51552,15 +52142,15 @@ var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _colorManipulator = __webpack_require__(70); +var _colorManipulator = __webpack_require__(62); var _childUtils = __webpack_require__(100); -var _EnhancedButton = __webpack_require__(52); +var _EnhancedButton = __webpack_require__(44); var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); -var _Paper = __webpack_require__(39); +var _Paper = __webpack_require__(38); var _Paper2 = _interopRequireDefault(_Paper); @@ -51983,7 +52573,7 @@ exports.default = RaisedButton; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 687 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51997,15 +52587,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _AutoComplete = __webpack_require__(688); +var _AutoComplete = __webpack_require__(667); var _AutoComplete2 = _interopRequireDefault(_AutoComplete); -var _createComponent = __webpack_require__(40); +var _createComponent = __webpack_require__(39); var _createComponent2 = _interopRequireDefault(_createComponent); -var _mapError = __webpack_require__(59); +var _mapError = __webpack_require__(63); var _mapError2 = _interopRequireDefault(_mapError); @@ -52039,7 +52629,7 @@ exports.default = (0, _createComponent2.default)(_AutoComplete2.default, functio }); /***/ }), -/* 688 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52050,7 +52640,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _AutoComplete = __webpack_require__(689); +var _AutoComplete = __webpack_require__(295); var _AutoComplete2 = _interopRequireDefault(_AutoComplete); @@ -52059,7 +52649,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.default = _AutoComplete2.default; /***/ }), -/* 689 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52073,10 +52663,6 @@ var _extends2 = __webpack_require__(8); var _extends3 = _interopRequireDefault(_extends2); -var _typeof2 = __webpack_require__(76); - -var _typeof3 = _interopRequireDefault(_typeof2); - var _objectWithoutProperties2 = __webpack_require__(9); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); @@ -52109,641 +52695,543 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(18); +var _reactDom = __webpack_require__(17); var _reactDom2 = _interopRequireDefault(_reactDom); -var _keycode = __webpack_require__(31); +var _shallowEqual = __webpack_require__(58); -var _keycode2 = _interopRequireDefault(_keycode); +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); -var _TextField = __webpack_require__(88); +var _transitions = __webpack_require__(12); -var _TextField2 = _interopRequireDefault(_TextField); +var _transitions2 = _interopRequireDefault(_transitions); -var _Menu = __webpack_require__(695); +var _EnhancedTextarea = __webpack_require__(669); -var _Menu2 = _interopRequireDefault(_Menu); +var _EnhancedTextarea2 = _interopRequireDefault(_EnhancedTextarea); -var _MenuItem = __webpack_require__(118); +var _TextFieldHint = __webpack_require__(296); -var _MenuItem2 = _interopRequireDefault(_MenuItem); +var _TextFieldHint2 = _interopRequireDefault(_TextFieldHint); -var _Divider = __webpack_require__(696); +var _TextFieldLabel = __webpack_require__(297); -var _Divider2 = _interopRequireDefault(_Divider); +var _TextFieldLabel2 = _interopRequireDefault(_TextFieldLabel); -var _Popover = __webpack_require__(119); +var _TextFieldUnderline = __webpack_require__(298); -var _Popover2 = _interopRequireDefault(_Popover); +var _TextFieldUnderline2 = _interopRequireDefault(_TextFieldUnderline); -var _propTypes = __webpack_require__(44); +var _warning = __webpack_require__(26); -var _propTypes2 = _interopRequireDefault(_propTypes); +var _warning2 = _interopRequireDefault(_warning); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props, context, state) { - var anchorEl = state.anchorEl; - var fullWidth = props.fullWidth; +var getStyles = function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + _context$muiTheme$tex = _context$muiTheme.textField, + floatingLabelColor = _context$muiTheme$tex.floatingLabelColor, + focusColor = _context$muiTheme$tex.focusColor, + textColor = _context$muiTheme$tex.textColor, + disabledTextColor = _context$muiTheme$tex.disabledTextColor, + backgroundColor = _context$muiTheme$tex.backgroundColor, + errorColor = _context$muiTheme$tex.errorColor; var styles = { root: { + fontSize: 16, + lineHeight: '24px', + width: props.fullWidth ? '100%' : 256, + height: (props.rows - 1) * 24 + (props.floatingLabelText ? 72 : 48), display: 'inline-block', position: 'relative', - width: fullWidth ? '100%' : 256 + backgroundColor: backgroundColor, + fontFamily: baseTheme.fontFamily, + transition: _transitions2.default.easeOut('200ms', 'height'), + cursor: props.disabled ? 'not-allowed' : 'auto' }, - menu: { - width: '100%' + error: { + position: 'relative', + bottom: 2, + fontSize: 12, + lineHeight: '12px', + color: errorColor, + transition: _transitions2.default.easeOut() }, - list: { - display: 'block', - width: fullWidth ? '100%' : 256 + floatingLabel: { + color: props.disabled ? disabledTextColor : floatingLabelColor, + pointerEvents: 'none' }, - innerDiv: { - overflow: 'hidden' - } + input: { + padding: 0, + position: 'relative', + width: '100%', + border: 'none', + outline: 'none', + backgroundColor: 'rgba(0,0,0,0)', + color: props.disabled ? disabledTextColor : textColor, + cursor: 'inherit', + font: 'inherit', + WebkitTapHighlightColor: 'rgba(0,0,0,0)' }, + inputNative: { + appearance: 'textfield' } }; - if (anchorEl && fullWidth) { - styles.popover = { - width: anchorEl.clientWidth - }; - } - - return styles; -} - -var AutoComplete = function (_Component) { - (0, _inherits3.default)(AutoComplete, _Component); + styles.textarea = (0, _simpleAssign2.default)({}, styles.input, { + marginTop: props.floatingLabelText ? 36 : 12, + marginBottom: props.floatingLabelText ? -36 : -12, + boxSizing: 'border-box', + font: 'inherit' + }); - function AutoComplete() { - var _ref; + // Do not assign a height to the textarea as he handles it on his own. + styles.input.height = '100%'; - var _temp, _this, _ret; + if (state.isFocused) { + styles.floatingLabel.color = focusColor; + } - (0, _classCallCheck3.default)(this, AutoComplete); + if (props.floatingLabelText) { + styles.input.boxSizing = 'border-box'; - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; + if (!props.multiLine) { + styles.input.marginTop = 14; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoComplete.__proto__ || (0, _getPrototypeOf2.default)(AutoComplete)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - anchorEl: null, - focusTextField: true, - open: false, - searchText: undefined - }, _this.handleRequestClose = function () { - // Only take into account the Popover clickAway when we are - // not focusing the TextField. - if (!_this.state.focusTextField) { - _this.close(); - } - }, _this.handleMouseDown = function (event) { - // Keep the TextField focused - event.preventDefault(); - }, _this.handleItemTouchTap = function (event, child) { - var dataSource = _this.props.dataSource; - - var index = parseInt(child.key, 10); - var chosenRequest = dataSource[index]; - var searchText = _this.chosenRequestText(chosenRequest); + if (state.errorText) { + styles.error.bottom = !props.multiLine ? styles.error.fontSize + 3 : 3; + } + } - _this.setState({ - searchText: searchText - }, function () { - _this.props.onUpdateInput(searchText, _this.props.dataSource, { - source: 'touchTap' - }); + if (state.errorText) { + if (state.isFocused) { + styles.floatingLabel.color = styles.error.color; + } + } - _this.timerTouchTapCloseId = setTimeout(function () { - _this.timerTouchTapCloseId = null; - _this.close(); - _this.props.onNewRequest(chosenRequest, index); - }, _this.props.menuCloseDelay); - }); - }, _this.chosenRequestText = function (chosenRequest) { - if (typeof chosenRequest === 'string') { - return chosenRequest; - } else { - return chosenRequest[_this.props.dataSourceConfig.text]; - } - }, _this.handleEscKeyDown = function () { - _this.close(); - }, _this.handleKeyDown = function (event) { - if (_this.props.onKeyDown) _this.props.onKeyDown(event); + return styles; +}; - switch ((0, _keycode2.default)(event)) { - case 'enter': - _this.close(); - var searchText = _this.state.searchText; - if (searchText !== '') { - _this.props.onNewRequest(searchText, -1); - } - break; +/** + * Check if a value is valid to be displayed inside an input. + * + * @param The value to check. + * @returns True if the string provided is valid, false otherwise. + */ +function isValid(value) { + return value !== '' && value !== undefined && value !== null; +} - case 'esc': - _this.close(); - break; +var TextField = function (_Component) { + (0, _inherits3.default)(TextField, _Component); - case 'down': - event.preventDefault(); - _this.setState({ - open: true, - focusTextField: false, - anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) - }); - break; + function TextField() { + var _ref; - default: - break; - } - }, _this.handleChange = function (event) { - var searchText = event.target.value; + var _temp, _this, _ret; - // Make sure that we have a new searchText. - // Fix an issue with a Cordova Webview - if (searchText === _this.state.searchText) { - return; - } + (0, _classCallCheck3.default)(this, TextField); - _this.setState({ - searchText: searchText, - open: true, - anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) - }, function () { - _this.props.onUpdateInput(searchText, _this.props.dataSource, { - source: 'change' - }); - }); - }, _this.handleBlur = function (event) { - if (_this.state.focusTextField && _this.timerTouchTapCloseId === null) { - _this.timerBlurClose = setTimeout(function () { - _this.close(); - }, 0); - } + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TextField.__proto__ || (0, _getPrototypeOf2.default)(TextField)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + isFocused: false, + errorText: undefined, + hasValue: false + }, _this.handleInputBlur = function (event) { + _this.setState({ isFocused: false }); if (_this.props.onBlur) { _this.props.onBlur(event); } - }, _this.handleFocus = function (event) { - if (!_this.state.open && _this.props.openOnFocus) { - _this.setState({ - open: true, - anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) - }); + }, _this.handleInputChange = function (event) { + _this.setState({ hasValue: isValid(event.target.value) }); + if (_this.props.onChange) { + _this.props.onChange(event, event.target.value); } - - _this.setState({ - focusTextField: true - }); - + }, _this.handleInputFocus = function (event) { + if (_this.props.disabled) { + return; + } + _this.setState({ isFocused: true }); if (_this.props.onFocus) { _this.props.onFocus(event); } + }, _this.handleHeightChange = function (event, height) { + var newHeight = height + 24; + if (_this.props.floatingLabelText) { + newHeight += 24; + } + _reactDom2.default.findDOMNode(_this).style.height = newHeight + 'px'; }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(AutoComplete, [{ + (0, _createClass3.default)(TextField, [{ key: 'componentWillMount', value: function componentWillMount() { - this.requestsList = []; + var _props = this.props, + children = _props.children, + name = _props.name, + hintText = _props.hintText, + floatingLabelText = _props.floatingLabelText, + id = _props.id; + + + var propsLeaf = children ? children.props : this.props; + this.setState({ - open: this.props.open, - searchText: this.props.searchText + errorText: this.props.errorText, + hasValue: isValid(propsLeaf.value) || isValid(propsLeaf.defaultValue) }); - this.timerTouchTapCloseId = null; + + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(name || hintText || floatingLabelText || id, 'Material-UI: We don\'t have enough information\n to build a robust unique id for the TextField component. Please provide an id or a name.') : void 0; + + var uniqueId = name + '-' + hintText + '-' + floatingLabelText + '-' + Math.floor(Math.random() * 0xFFFF); + this.uniqueId = uniqueId.replace(/[^A-Za-z0-9-]/gi, ''); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { - if (this.props.searchText !== nextProps.searchText) { + if (nextProps.errorText !== this.props.errorText) { this.setState({ - searchText: nextProps.searchText + errorText: nextProps.errorText }); } - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - clearTimeout(this.timerTouchTapCloseId); - clearTimeout(this.timerBlurClose); - } - }, { - key: 'close', - value: function close() { - this.setState({ - open: false, - anchorEl: null - }); - if (this.props.onClose) { - this.props.onClose(); + if (nextProps.children && nextProps.children.props) { + nextProps = nextProps.children.props; + } + + if (nextProps.hasOwnProperty('value')) { + var hasValue = isValid(nextProps.value); + + this.setState({ + hasValue: hasValue + }); } } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } }, { key: 'blur', value: function blur() { - this.refs.searchTextField.blur(); + if (this.input) { + this.getInputNode().blur(); + } } }, { key: 'focus', value: function focus() { - this.refs.searchTextField.focus(); + if (this.input) { + this.getInputNode().focus(); + } + } + }, { + key: 'select', + value: function select() { + if (this.input) { + this.getInputNode().select(); + } + } + }, { + key: 'getValue', + value: function getValue() { + return this.input ? this.getInputNode().value : undefined; + } + }, { + key: 'getInputNode', + value: function getInputNode() { + return this.props.children || this.props.multiLine ? this.input.getInputNode() : _reactDom2.default.findDOMNode(this.input); + } + }, { + key: '_isControlled', + value: function _isControlled() { + return this.props.hasOwnProperty('value'); } }, { key: 'render', value: function render() { var _this2 = this; - var _props = this.props, - anchorOrigin = _props.anchorOrigin, - animated = _props.animated, - animation = _props.animation, - dataSource = _props.dataSource, - dataSourceConfig = _props.dataSourceConfig, - disableFocusRipple = _props.disableFocusRipple, - errorStyle = _props.errorStyle, - floatingLabelText = _props.floatingLabelText, - filter = _props.filter, - fullWidth = _props.fullWidth, - style = _props.style, - hintText = _props.hintText, - maxSearchResults = _props.maxSearchResults, - menuCloseDelay = _props.menuCloseDelay, - textFieldStyle = _props.textFieldStyle, - menuStyle = _props.menuStyle, - menuProps = _props.menuProps, - listStyle = _props.listStyle, - targetOrigin = _props.targetOrigin, - onClose = _props.onClose, - onNewRequest = _props.onNewRequest, - onUpdateInput = _props.onUpdateInput, - openOnFocus = _props.openOnFocus, - popoverProps = _props.popoverProps, - searchTextProp = _props.searchText, - other = (0, _objectWithoutProperties3.default)(_props, ['anchorOrigin', 'animated', 'animation', 'dataSource', 'dataSourceConfig', 'disableFocusRipple', 'errorStyle', 'floatingLabelText', 'filter', 'fullWidth', 'style', 'hintText', 'maxSearchResults', 'menuCloseDelay', 'textFieldStyle', 'menuStyle', 'menuProps', 'listStyle', 'targetOrigin', 'onClose', 'onNewRequest', 'onUpdateInput', 'openOnFocus', 'popoverProps', 'searchText']); - - var _ref2 = popoverProps || {}, - popoverStyle = _ref2.style, - popoverOther = (0, _objectWithoutProperties3.default)(_ref2, ['style']); - - var _state = this.state, - open = _state.open, - anchorEl = _state.anchorEl, - searchText = _state.searchText, - focusTextField = _state.focusTextField; + var _props2 = this.props, + children = _props2.children, + className = _props2.className, + disabled = _props2.disabled, + errorStyle = _props2.errorStyle, + errorText = _props2.errorText, + floatingLabelFixed = _props2.floatingLabelFixed, + floatingLabelFocusStyle = _props2.floatingLabelFocusStyle, + floatingLabelShrinkStyle = _props2.floatingLabelShrinkStyle, + floatingLabelStyle = _props2.floatingLabelStyle, + floatingLabelText = _props2.floatingLabelText, + fullWidth = _props2.fullWidth, + hintText = _props2.hintText, + hintStyle = _props2.hintStyle, + id = _props2.id, + inputStyle = _props2.inputStyle, + multiLine = _props2.multiLine, + onBlur = _props2.onBlur, + onChange = _props2.onChange, + onFocus = _props2.onFocus, + style = _props2.style, + type = _props2.type, + underlineDisabledStyle = _props2.underlineDisabledStyle, + underlineFocusStyle = _props2.underlineFocusStyle, + underlineShow = _props2.underlineShow, + underlineStyle = _props2.underlineStyle, + rows = _props2.rows, + rowsMax = _props2.rowsMax, + textareaStyle = _props2.textareaStyle, + other = (0, _objectWithoutProperties3.default)(_props2, ['children', 'className', 'disabled', 'errorStyle', 'errorText', 'floatingLabelFixed', 'floatingLabelFocusStyle', 'floatingLabelShrinkStyle', 'floatingLabelStyle', 'floatingLabelText', 'fullWidth', 'hintText', 'hintStyle', 'id', 'inputStyle', 'multiLine', 'onBlur', 'onChange', 'onFocus', 'style', 'type', 'underlineDisabledStyle', 'underlineFocusStyle', 'underlineShow', 'underlineStyle', 'rows', 'rowsMax', 'textareaStyle']); var prepareStyles = this.context.muiTheme.prepareStyles; var styles = getStyles(this.props, this.context, this.state); + var inputId = id || this.uniqueId; - var requestsList = []; - - dataSource.every(function (item, index) { - switch (typeof item === 'undefined' ? 'undefined' : (0, _typeof3.default)(item)) { - case 'string': - if (filter(searchText, item, item)) { - requestsList.push({ - text: item, - value: _react2.default.createElement(_MenuItem2.default, { - innerDivStyle: styles.innerDiv, - value: item, - primaryText: item, - disableFocusRipple: disableFocusRipple, - key: index - }) - }); - } - break; + var errorTextElement = this.state.errorText && _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.error, errorStyle)) }, + this.state.errorText + ); - case 'object': - if (item && typeof item[_this2.props.dataSourceConfig.text] === 'string') { - var itemText = item[_this2.props.dataSourceConfig.text]; - if (!_this2.props.filter(searchText, itemText, item)) break; + var floatingLabelTextElement = floatingLabelText && _react2.default.createElement( + _TextFieldLabel2.default, + { + muiTheme: this.context.muiTheme, + style: (0, _simpleAssign2.default)(styles.floatingLabel, floatingLabelStyle, this.state.isFocused ? floatingLabelFocusStyle : null), + shrinkStyle: floatingLabelShrinkStyle, + htmlFor: inputId, + shrink: this.state.hasValue || this.state.isFocused || floatingLabelFixed, + disabled: disabled + }, + floatingLabelText + ); - var itemValue = item[_this2.props.dataSourceConfig.value]; - if (itemValue.type && (itemValue.type.muiName === _MenuItem2.default.muiName || itemValue.type.muiName === _Divider2.default.muiName)) { - requestsList.push({ - text: itemText, - value: _react2.default.cloneElement(itemValue, { - key: index, - disableFocusRipple: disableFocusRipple - }) - }); - } else { - requestsList.push({ - text: itemText, - value: _react2.default.createElement(_MenuItem2.default, { - innerDivStyle: styles.innerDiv, - primaryText: itemText, - disableFocusRipple: disableFocusRipple, - key: index - }) - }); - } - } - break; + var inputProps = { + id: inputId, + ref: function ref(elem) { + return _this2.input = elem; + }, + disabled: this.props.disabled, + onBlur: this.handleInputBlur, + onChange: this.handleInputChange, + onFocus: this.handleInputFocus + }; - default: - // Do nothing - } + var childStyleMerged = (0, _simpleAssign2.default)(styles.input, inputStyle); - return !(maxSearchResults && maxSearchResults > 0 && requestsList.length === maxSearchResults); - }); + var inputElement = void 0; + if (children) { + inputElement = _react2.default.cloneElement(children, (0, _extends3.default)({}, inputProps, children.props, { + style: (0, _simpleAssign2.default)(childStyleMerged, children.props.style) + })); + } else { + inputElement = multiLine ? _react2.default.createElement(_EnhancedTextarea2.default, (0, _extends3.default)({ + style: childStyleMerged, + textareaStyle: (0, _simpleAssign2.default)(styles.textarea, styles.inputNative, textareaStyle), + rows: rows, + rowsMax: rowsMax + }, other, inputProps, { + onHeightChange: this.handleHeightChange + })) : _react2.default.createElement('input', (0, _extends3.default)({ + type: type, + style: prepareStyles((0, _simpleAssign2.default)(styles.inputNative, childStyleMerged)) + }, other, inputProps)); + } - this.requestsList = requestsList; + var rootProps = {}; - var menu = open && requestsList.length > 0 && _react2.default.createElement( - _Menu2.default, - (0, _extends3.default)({}, menuProps, { - ref: 'menu', - autoWidth: false, - disableAutoFocus: focusTextField, - onEscKeyDown: this.handleEscKeyDown, - initiallyKeyboardFocused: true, - onItemTouchTap: this.handleItemTouchTap, - onMouseDown: this.handleMouseDown, - style: (0, _simpleAssign2.default)(styles.menu, menuStyle), - listStyle: (0, _simpleAssign2.default)(styles.list, listStyle) - }), - requestsList.map(function (i) { - return i.value; - }) - ); + if (children) { + rootProps = other; + } return _react2.default.createElement( 'div', - { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, - _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { - ref: 'searchTextField', - autoComplete: 'off', - value: searchText, - onChange: this.handleChange, - onBlur: this.handleBlur, - onFocus: this.handleFocus, - onKeyDown: this.handleKeyDown, - floatingLabelText: floatingLabelText, - hintText: hintText, - fullWidth: fullWidth, - multiLine: false, + (0, _extends3.default)({}, rootProps, { + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }), + floatingLabelTextElement, + hintText ? _react2.default.createElement(_TextFieldHint2.default, { + muiTheme: this.context.muiTheme, + show: !(this.state.hasValue || floatingLabelText && !this.state.isFocused) || !this.state.hasValue && floatingLabelText && floatingLabelFixed && !this.state.isFocused, + style: hintStyle, + text: hintText + }) : null, + inputElement, + underlineShow ? _react2.default.createElement(_TextFieldUnderline2.default, { + disabled: disabled, + disabledStyle: underlineDisabledStyle, + error: !!this.state.errorText, errorStyle: errorStyle, - style: textFieldStyle - })), - _react2.default.createElement( - _Popover2.default, - (0, _extends3.default)({ - style: (0, _simpleAssign2.default)({}, styles.popover, popoverStyle), - canAutoPosition: false, - anchorOrigin: anchorOrigin, - targetOrigin: targetOrigin, - open: open, - anchorEl: anchorEl, - useLayerForClickAway: false, - onRequestClose: this.handleRequestClose, - animated: animated, - animation: animation - }, popoverOther), - menu - ) + focus: this.state.isFocused, + focusStyle: underlineFocusStyle, + muiTheme: this.context.muiTheme, + style: underlineStyle + }) : null, + errorTextElement ); } }]); - return AutoComplete; + return TextField; }(_react.Component); -AutoComplete.defaultProps = { - anchorOrigin: { - vertical: 'bottom', - horizontal: 'left' - }, - animated: true, - dataSourceConfig: { - text: 'text', - value: 'value' - }, - disableFocusRipple: true, - filter: function filter(searchText, key) { - return searchText !== '' && key.indexOf(searchText) !== -1; - }, +TextField.defaultProps = { + disabled: false, + floatingLabelFixed: false, + multiLine: false, fullWidth: false, - open: false, - openOnFocus: false, - onUpdateInput: function onUpdateInput() {}, - onNewRequest: function onNewRequest() {}, - searchText: '', - menuCloseDelay: 300, - targetOrigin: { - vertical: 'top', - horizontal: 'left' - } + type: 'text', + underlineShow: true, + rows: 1 }; -AutoComplete.contextTypes = { +TextField.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; -process.env.NODE_ENV !== "production" ? AutoComplete.propTypes = { +process.env.NODE_ENV !== "production" ? TextField.propTypes = { + children: _react.PropTypes.node, /** - * Location of the anchor for the auto complete. + * The css class name of the root element. */ - anchorOrigin: _propTypes2.default.origin, + className: _react.PropTypes.string, /** - * If true, the auto complete is animated as it is toggled. + * The text string to use for the default value. */ - animated: _react.PropTypes.bool, + defaultValue: _react.PropTypes.any, /** - * Override the default animation component used. + * Disables the text field if set to true. */ - animation: _react.PropTypes.func, + disabled: _react.PropTypes.bool, /** - * Array of strings or nodes used to populate the list. + * The style object to use to override error styles. */ - dataSource: _react.PropTypes.array.isRequired, + errorStyle: _react.PropTypes.object, /** - * Config for objects list dataSource. - * - * @typedef {Object} dataSourceConfig - * - * @property {string} text `dataSource` element key used to find a string to be matched for search - * and shown as a `TextField` input value after choosing the result. - * @property {string} value `dataSource` element key used to find a string to be shown in search results. + * The error content to display. */ - dataSourceConfig: _react.PropTypes.object, + errorText: _react.PropTypes.node, /** - * Disables focus ripple when true. + * If true, the floating label will float even when there is no value. */ - disableFocusRipple: _react.PropTypes.bool, + floatingLabelFixed: _react.PropTypes.bool, /** - * Override style prop for error. + * The style object to use to override floating label styles when focused. */ - errorStyle: _react.PropTypes.object, + floatingLabelFocusStyle: _react.PropTypes.object, /** - * The error content to display. + * The style object to use to override floating label styles when shrunk. */ - errorText: _react.PropTypes.node, + floatingLabelShrinkStyle: _react.PropTypes.object, /** - * Callback function used to filter the auto complete. - * - * @param {string} searchText The text to search for within `dataSource`. - * @param {string} key `dataSource` element, or `text` property on that element if it's not a string. - * @returns {boolean} `true` indicates the auto complete list will include `key` when the input is `searchText`. + * The style object to use to override floating label styles. */ - filter: _react.PropTypes.func, + floatingLabelStyle: _react.PropTypes.object, /** - * The content to use for adding floating label element. + * The content to use for the floating label element. */ floatingLabelText: _react.PropTypes.node, /** - * If true, the field receives the property `width: 100%`. + * If true, the field receives the property width 100%. */ fullWidth: _react.PropTypes.bool, /** - * The hint content to display. + * Override the inline-styles of the TextField's hint text element. */ - hintText: _react.PropTypes.node, + hintStyle: _react.PropTypes.object, /** - * Override style for list. + * The hint content to display. */ - listStyle: _react.PropTypes.object, + hintText: _react.PropTypes.node, /** - * The max number of search results to be shown. - * By default it shows all the items which matches filter. + * The id prop for the text field. */ - maxSearchResults: _react.PropTypes.number, + id: _react.PropTypes.string, /** - * Delay for closing time of the menu. + * Override the inline-styles of the TextField's input element. + * When multiLine is false: define the style of the input element. + * When multiLine is true: define the style of the container of the textarea. */ - menuCloseDelay: _react.PropTypes.number, + inputStyle: _react.PropTypes.object, /** - * Props to be passed to menu. + * If true, a textarea element will be rendered. + * The textarea also grows and shrinks according to the number of lines. */ - menuProps: _react.PropTypes.object, + multiLine: _react.PropTypes.bool, /** - * Override style for menu. + * Name applied to the input. */ - menuStyle: _react.PropTypes.object, + name: _react.PropTypes.string, /** @ignore */ onBlur: _react.PropTypes.func, /** - * Callback function fired when the menu is closed. + * Callback function that is fired when the textfield's value changes. + * + * @param {object} event Change event targeting the text field. + * @param {string} newValue The new value of the text field. */ - onClose: _react.PropTypes.func, + onChange: _react.PropTypes.func, /** @ignore */ onFocus: _react.PropTypes.func, - /** @ignore */ - onKeyDown: _react.PropTypes.func, /** - * Callback function that is fired when a list item is selected, or enter is pressed in the `TextField`. - * - * @param {string} chosenRequest Either the `TextField` input value, if enter is pressed in the `TextField`, - * or the text value of the corresponding list item that was selected. - * @param {number} index The index in `dataSource` of the list item selected, or `-1` if enter is pressed in the - * `TextField`. + * Number of rows to display when multiLine option is set to true. */ - onNewRequest: _react.PropTypes.func, + rows: _react.PropTypes.number, /** - * Callback function that is fired when the user updates the `TextField`. - * - * @param {string} searchText The auto-complete's `searchText` value. - * @param {array} dataSource The auto-complete's `dataSource` array. - * @param {object} params Additional information linked the update. + * Maximum number of rows to display when + * multiLine option is set to true. */ - onUpdateInput: _react.PropTypes.func, + rowsMax: _react.PropTypes.number, /** - * Auto complete menu is open if true. + * Override the inline-styles of the root element. */ - open: _react.PropTypes.bool, + style: _react.PropTypes.object, /** - * If true, the list item is showed when a focus event triggers. + * Override the inline-styles of the TextField's textarea element. + * The TextField use either a textarea or an input, + * this property has effects only when multiLine is true. */ - openOnFocus: _react.PropTypes.bool, + textareaStyle: _react.PropTypes.object, /** - * Props to be passed to popover. + * Specifies the type of input to display + * such as "password" or "text". */ - popoverProps: _react.PropTypes.object, + type: _react.PropTypes.string, /** - * Text being input to auto complete. + * Override the inline-styles of the + * TextField's underline element when disabled. */ - searchText: _react.PropTypes.string, + underlineDisabledStyle: _react.PropTypes.object, /** - * Override the inline-styles of the root element. + * Override the inline-styles of the TextField's + * underline element when focussed. */ - style: _react.PropTypes.object, + underlineFocusStyle: _react.PropTypes.object, /** - * Origin for location of target. + * If true, shows the underline for the text field. */ - targetOrigin: _propTypes2.default.origin, + underlineShow: _react.PropTypes.bool, /** - * Override the inline-styles of AutoComplete's TextField element. + * Override the inline-styles of the TextField's underline element. */ - textFieldStyle: _react.PropTypes.object + underlineStyle: _react.PropTypes.object, + /** + * The value of the text field. + */ + value: _react.PropTypes.any } : void 0; - - -AutoComplete.levenshteinDistance = function (searchText, key) { - var current = []; - var prev = void 0; - var value = void 0; - - for (var i = 0; i <= key.length; i++) { - for (var j = 0; j <= searchText.length; j++) { - if (i && j) { - if (searchText.charAt(j - 1) === key.charAt(i - 1)) value = prev;else value = Math.min(current[j], current[j - 1], prev) + 1; - } else { - value = i + j; - } - prev = current[j]; - current[j] = value; - } - } - return current.pop(); -}; - -AutoComplete.noFilter = function () { - return true; -}; - -AutoComplete.defaultFilter = AutoComplete.caseSensitiveFilter = function (searchText, key) { - return searchText !== '' && key.indexOf(searchText) !== -1; -}; - -AutoComplete.caseInsensitiveFilter = function (searchText, key) { - return key.toLowerCase().indexOf(searchText.toLowerCase()) !== -1; -}; - -AutoComplete.levenshteinDistanceFilter = function (distanceLessThan) { - if (distanceLessThan === undefined) { - return AutoComplete.levenshteinDistance; - } else if (typeof distanceLessThan !== 'number') { - throw 'Error: AutoComplete.levenshteinDistanceFilter is a filter generator, not a filter!'; - } - - return function (s, k) { - return AutoComplete.levenshteinDistance(s, k) < distanceLessThan; - }; -}; - -AutoComplete.fuzzyFilter = function (searchText, key) { - var compareString = key.toLowerCase(); - searchText = searchText.toLowerCase(); - - var searchTextIndex = 0; - for (var index = 0; index < key.length; index++) { - if (compareString[index] === searchText[searchTextIndex]) { - searchTextIndex += 1; - } - } - - return searchTextIndex === searchText.length; -}; - -AutoComplete.Item = _MenuItem2.default; -AutoComplete.Divider = _Divider2.default; - -exports.default = AutoComplete; +exports.default = TextField; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 690 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52789,543 +53277,376 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(18); - -var _reactDom2 = _interopRequireDefault(_reactDom); - -var _shallowEqual = __webpack_require__(54); - -var _shallowEqual2 = _interopRequireDefault(_shallowEqual); - -var _transitions = __webpack_require__(12); - -var _transitions2 = _interopRequireDefault(_transitions); - -var _EnhancedTextarea = __webpack_require__(691); - -var _EnhancedTextarea2 = _interopRequireDefault(_EnhancedTextarea); - -var _TextFieldHint = __webpack_require__(692); +var _reactEventListener = __webpack_require__(61); -var _TextFieldHint2 = _interopRequireDefault(_TextFieldHint); - -var _TextFieldLabel = __webpack_require__(693); - -var _TextFieldLabel2 = _interopRequireDefault(_TextFieldLabel); - -var _TextFieldUnderline = __webpack_require__(694); - -var _TextFieldUnderline2 = _interopRequireDefault(_TextFieldUnderline); - -var _warning = __webpack_require__(26); - -var _warning2 = _interopRequireDefault(_warning); +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var getStyles = function getStyles(props, context, state) { - var _context$muiTheme = context.muiTheme, - baseTheme = _context$muiTheme.baseTheme, - _context$muiTheme$tex = _context$muiTheme.textField, - floatingLabelColor = _context$muiTheme$tex.floatingLabelColor, - focusColor = _context$muiTheme$tex.focusColor, - textColor = _context$muiTheme$tex.textColor, - disabledTextColor = _context$muiTheme$tex.disabledTextColor, - backgroundColor = _context$muiTheme$tex.backgroundColor, - errorColor = _context$muiTheme$tex.errorColor; - +var rowsHeight = 24; - var styles = { +function getStyles(props, context, state) { + return { root: { - fontSize: 16, - lineHeight: '24px', - width: props.fullWidth ? '100%' : 256, - height: (props.rows - 1) * 24 + (props.floatingLabelText ? 72 : 48), - display: 'inline-block', - position: 'relative', - backgroundColor: backgroundColor, - fontFamily: baseTheme.fontFamily, - transition: _transitions2.default.easeOut('200ms', 'height'), - cursor: props.disabled ? 'not-allowed' : 'auto' - }, - error: { - position: 'relative', - bottom: 2, - fontSize: 12, - lineHeight: '12px', - color: errorColor, - transition: _transitions2.default.easeOut() - }, - floatingLabel: { - color: props.disabled ? disabledTextColor : floatingLabelColor, - pointerEvents: 'none' - }, - input: { - padding: 0, - position: 'relative', + position: 'relative' }, + textarea: { + height: state.height, width: '100%', - border: 'none', - outline: 'none', - backgroundColor: 'rgba(0,0,0,0)', - color: props.disabled ? disabledTextColor : textColor, - cursor: 'inherit', + resize: 'none', font: 'inherit', - WebkitTapHighlightColor: 'rgba(0,0,0,0)' }, - inputNative: { - appearance: 'textfield' } - }; - - styles.textarea = (0, _simpleAssign2.default)({}, styles.input, { - marginTop: props.floatingLabelText ? 36 : 12, - marginBottom: props.floatingLabelText ? -36 : -12, - boxSizing: 'border-box', - font: 'inherit' - }); - - // Do not assign a height to the textarea as he handles it on his own. - styles.input.height = '100%'; - - if (state.isFocused) { - styles.floatingLabel.color = focusColor; - } - - if (props.floatingLabelText) { - styles.input.boxSizing = 'border-box'; - - if (!props.multiLine) { - styles.input.marginTop = 14; - } - - if (state.errorText) { - styles.error.bottom = !props.multiLine ? styles.error.fontSize + 3 : 3; - } - } - - if (state.errorText) { - if (state.isFocused) { - styles.floatingLabel.color = styles.error.color; + padding: 0, + cursor: 'inherit' + }, + shadow: { + resize: 'none', + // Overflow also needed to here to remove the extra row + // added to textareas in Firefox. + overflow: 'hidden', + // Visibility needed to hide the extra text area on ipads + visibility: 'hidden', + position: 'absolute', + height: 'initial' } - } - - return styles; -}; - -/** - * Check if a value is valid to be displayed inside an input. - * - * @param The value to check. - * @returns True if the string provided is valid, false otherwise. - */ -function isValid(value) { - return value !== '' && value !== undefined && value !== null; + }; } -var TextField = function (_Component) { - (0, _inherits3.default)(TextField, _Component); +var EnhancedTextarea = function (_Component) { + (0, _inherits3.default)(EnhancedTextarea, _Component); - function TextField() { + function EnhancedTextarea() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, TextField); + (0, _classCallCheck3.default)(this, EnhancedTextarea); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TextField.__proto__ || (0, _getPrototypeOf2.default)(TextField)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - isFocused: false, - errorText: undefined, - hasValue: false - }, _this.handleInputBlur = function (event) { - _this.setState({ isFocused: false }); - if (_this.props.onBlur) { - _this.props.onBlur(event); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedTextarea.__proto__ || (0, _getPrototypeOf2.default)(EnhancedTextarea)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + height: null + }, _this.handleResize = function (event) { + _this.syncHeightWithShadow(undefined, event); + }, _this.handleChange = function (event) { + _this.syncHeightWithShadow(event.target.value); + + if (_this.props.hasOwnProperty('valueLink')) { + _this.props.valueLink.requestChange(event.target.value); } - }, _this.handleInputChange = function (event) { - _this.setState({ hasValue: isValid(event.target.value) }); + if (_this.props.onChange) { - _this.props.onChange(event, event.target.value); - } - }, _this.handleInputFocus = function (event) { - if (_this.props.disabled) { - return; - } - _this.setState({ isFocused: true }); - if (_this.props.onFocus) { - _this.props.onFocus(event); - } - }, _this.handleHeightChange = function (event, height) { - var newHeight = height + 24; - if (_this.props.floatingLabelText) { - newHeight += 24; + _this.props.onChange(event); } - _reactDom2.default.findDOMNode(_this).style.height = newHeight + 'px'; }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(TextField, [{ + (0, _createClass3.default)(EnhancedTextarea, [{ key: 'componentWillMount', value: function componentWillMount() { - var _props = this.props, - children = _props.children, - name = _props.name, - hintText = _props.hintText, - floatingLabelText = _props.floatingLabelText, - id = _props.id; - - - var propsLeaf = children ? children.props : this.props; - this.setState({ - errorText: this.props.errorText, - hasValue: isValid(propsLeaf.value) || isValid(propsLeaf.defaultValue) + height: this.props.rows * rowsHeight }); - - process.env.NODE_ENV !== "production" ? (0, _warning2.default)(name || hintText || floatingLabelText || id, 'Material-UI: We don\'t have enough information\n to build a robust unique id for the TextField component. Please provide an id or a name.') : void 0; - - var uniqueId = name + '-' + hintText + '-' + floatingLabelText + '-' + Math.floor(Math.random() * 0xFFFF); - this.uniqueId = uniqueId.replace(/[^A-Za-z0-9-]/gi, ''); - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (nextProps.errorText !== this.props.errorText) { - this.setState({ - errorText: nextProps.errorText - }); - } - - if (nextProps.children && nextProps.children.props) { - nextProps = nextProps.children.props; - } - - if (nextProps.hasOwnProperty('value')) { - var hasValue = isValid(nextProps.value); - - this.setState({ - hasValue: hasValue - }); - } - } - }, { - key: 'shouldComponentUpdate', - value: function shouldComponentUpdate(nextProps, nextState, nextContext) { - return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); - } - }, { - key: 'blur', - value: function blur() { - if (this.input) { - this.getInputNode().blur(); - } } }, { - key: 'focus', - value: function focus() { - if (this.input) { - this.getInputNode().focus(); - } + key: 'componentDidMount', + value: function componentDidMount() { + this.syncHeightWithShadow(); } }, { - key: 'select', - value: function select() { - if (this.input) { - this.getInputNode().select(); + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== this.props.value) { + this.syncHeightWithShadow(nextProps.value); } } - }, { - key: 'getValue', - value: function getValue() { - return this.input ? this.getInputNode().value : undefined; - } }, { key: 'getInputNode', value: function getInputNode() { - return this.props.children || this.props.multiLine ? this.input.getInputNode() : _reactDom2.default.findDOMNode(this.input); + return this.refs.input; } }, { - key: '_isControlled', - value: function _isControlled() { - return this.props.hasOwnProperty('value'); + key: 'setValue', + value: function setValue(value) { + this.getInputNode().value = value; + this.syncHeightWithShadow(value); } }, { - key: 'render', - value: function render() { - var _this2 = this; + key: 'syncHeightWithShadow', + value: function syncHeightWithShadow(newValue, event) { + var shadow = this.refs.shadow; - var _props2 = this.props, - children = _props2.children, - className = _props2.className, - disabled = _props2.disabled, - errorStyle = _props2.errorStyle, - errorText = _props2.errorText, - floatingLabelFixed = _props2.floatingLabelFixed, - floatingLabelFocusStyle = _props2.floatingLabelFocusStyle, - floatingLabelShrinkStyle = _props2.floatingLabelShrinkStyle, - floatingLabelStyle = _props2.floatingLabelStyle, - floatingLabelText = _props2.floatingLabelText, - fullWidth = _props2.fullWidth, - hintText = _props2.hintText, - hintStyle = _props2.hintStyle, - id = _props2.id, - inputStyle = _props2.inputStyle, - multiLine = _props2.multiLine, - onBlur = _props2.onBlur, - onChange = _props2.onChange, - onFocus = _props2.onFocus, - style = _props2.style, - type = _props2.type, - underlineDisabledStyle = _props2.underlineDisabledStyle, - underlineFocusStyle = _props2.underlineFocusStyle, - underlineShow = _props2.underlineShow, - underlineStyle = _props2.underlineStyle, - rows = _props2.rows, - rowsMax = _props2.rowsMax, - textareaStyle = _props2.textareaStyle, - other = (0, _objectWithoutProperties3.default)(_props2, ['children', 'className', 'disabled', 'errorStyle', 'errorText', 'floatingLabelFixed', 'floatingLabelFocusStyle', 'floatingLabelShrinkStyle', 'floatingLabelStyle', 'floatingLabelText', 'fullWidth', 'hintText', 'hintStyle', 'id', 'inputStyle', 'multiLine', 'onBlur', 'onChange', 'onFocus', 'style', 'type', 'underlineDisabledStyle', 'underlineFocusStyle', 'underlineShow', 'underlineStyle', 'rows', 'rowsMax', 'textareaStyle']); - var prepareStyles = this.context.muiTheme.prepareStyles; + if (newValue !== undefined) { + shadow.value = newValue; + } - var styles = getStyles(this.props, this.context, this.state); - var inputId = id || this.uniqueId; + var newHeight = shadow.scrollHeight; - var errorTextElement = this.state.errorText && _react2.default.createElement( - 'div', - { style: prepareStyles((0, _simpleAssign2.default)(styles.error, errorStyle)) }, - this.state.errorText - ); + // Guarding for jsdom, where scrollHeight isn't present. + // See https://github.com/tmpvar/jsdom/issues/1013 + if (newHeight === undefined) return; - var floatingLabelTextElement = floatingLabelText && _react2.default.createElement( - _TextFieldLabel2.default, - { - muiTheme: this.context.muiTheme, - style: (0, _simpleAssign2.default)(styles.floatingLabel, floatingLabelStyle, this.state.isFocused ? floatingLabelFocusStyle : null), - shrinkStyle: floatingLabelShrinkStyle, - htmlFor: inputId, - shrink: this.state.hasValue || this.state.isFocused || floatingLabelFixed, - disabled: disabled - }, - floatingLabelText - ); + if (this.props.rowsMax >= this.props.rows) { + newHeight = Math.min(this.props.rowsMax * rowsHeight, newHeight); + } - var inputProps = { - id: inputId, - ref: function ref(elem) { - return _this2.input = elem; - }, - disabled: this.props.disabled, - onBlur: this.handleInputBlur, - onChange: this.handleInputChange, - onFocus: this.handleInputFocus - }; + newHeight = Math.max(newHeight, rowsHeight); - var childStyleMerged = (0, _simpleAssign2.default)(styles.input, inputStyle); + if (this.state.height !== newHeight) { + this.setState({ + height: newHeight + }); - var inputElement = void 0; - if (children) { - inputElement = _react2.default.cloneElement(children, (0, _extends3.default)({}, inputProps, children.props, { - style: (0, _simpleAssign2.default)(childStyleMerged, children.props.style) - })); - } else { - inputElement = multiLine ? _react2.default.createElement(_EnhancedTextarea2.default, (0, _extends3.default)({ - style: childStyleMerged, - textareaStyle: (0, _simpleAssign2.default)(styles.textarea, styles.inputNative, textareaStyle), - rows: rows, - rowsMax: rowsMax - }, other, inputProps, { - onHeightChange: this.handleHeightChange - })) : _react2.default.createElement('input', (0, _extends3.default)({ - type: type, - style: prepareStyles((0, _simpleAssign2.default)(styles.inputNative, childStyleMerged)) - }, other, inputProps)); + if (this.props.onHeightChange) { + this.props.onHeightChange(event, newHeight); + } } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + onChange = _props.onChange, + onHeightChange = _props.onHeightChange, + rows = _props.rows, + rowsMax = _props.rowsMax, + shadowStyle = _props.shadowStyle, + style = _props.style, + textareaStyle = _props.textareaStyle, + valueLink = _props.valueLink, + other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'onHeightChange', 'rows', 'rowsMax', 'shadowStyle', 'style', 'textareaStyle', 'valueLink']); + var prepareStyles = this.context.muiTheme.prepareStyles; - var rootProps = {}; + var styles = getStyles(this.props, this.context, this.state); + var rootStyles = (0, _simpleAssign2.default)(styles.root, style); + var textareaStyles = (0, _simpleAssign2.default)(styles.textarea, textareaStyle); + var shadowStyles = (0, _simpleAssign2.default)({}, textareaStyles, styles.shadow, shadowStyle); - if (children) { - rootProps = other; + if (this.props.hasOwnProperty('valueLink')) { + other.value = this.props.valueLink.value; } return _react2.default.createElement( 'div', - (0, _extends3.default)({}, rootProps, { - className: className, - style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + { style: prepareStyles(rootStyles) }, + _react2.default.createElement(_reactEventListener2.default, { target: 'window', onResize: this.handleResize }), + _react2.default.createElement('textarea', { + ref: 'shadow', + style: prepareStyles(shadowStyles), + tabIndex: '-1', + rows: this.props.rows, + defaultValue: this.props.defaultValue, + readOnly: true, + value: this.props.value, + valueLink: this.props.valueLink }), - floatingLabelTextElement, - hintText ? _react2.default.createElement(_TextFieldHint2.default, { - muiTheme: this.context.muiTheme, - show: !(this.state.hasValue || floatingLabelText && !this.state.isFocused) || !this.state.hasValue && floatingLabelText && floatingLabelFixed && !this.state.isFocused, - style: hintStyle, - text: hintText - }) : null, - inputElement, - underlineShow ? _react2.default.createElement(_TextFieldUnderline2.default, { - disabled: disabled, - disabledStyle: underlineDisabledStyle, - error: !!this.state.errorText, - errorStyle: errorStyle, - focus: this.state.isFocused, - focusStyle: underlineFocusStyle, - muiTheme: this.context.muiTheme, - style: underlineStyle - }) : null, - errorTextElement + _react2.default.createElement('textarea', (0, _extends3.default)({}, other, { + ref: 'input', + rows: this.props.rows, + style: prepareStyles(textareaStyles), + onChange: this.handleChange + })) ); } }]); - return TextField; + return EnhancedTextarea; }(_react.Component); -TextField.defaultProps = { - disabled: false, - floatingLabelFixed: false, - multiLine: false, - fullWidth: false, - type: 'text', - underlineShow: true, +EnhancedTextarea.defaultProps = { rows: 1 }; -TextField.contextTypes = { +EnhancedTextarea.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; -process.env.NODE_ENV !== "production" ? TextField.propTypes = { - children: _react.PropTypes.node, - /** - * The css class name of the root element. - */ - className: _react.PropTypes.string, - /** - * The text string to use for the default value. - */ +process.env.NODE_ENV !== "production" ? EnhancedTextarea.propTypes = { defaultValue: _react.PropTypes.any, - /** - * Disables the text field if set to true. - */ disabled: _react.PropTypes.bool, - /** - * The style object to use to override error styles. - */ - errorStyle: _react.PropTypes.object, - /** - * The error content to display. - */ - errorText: _react.PropTypes.node, - /** - * If true, the floating label will float even when there is no value. - */ - floatingLabelFixed: _react.PropTypes.bool, - /** - * The style object to use to override floating label styles when focused. - */ - floatingLabelFocusStyle: _react.PropTypes.object, - /** - * The style object to use to override floating label styles when shrunk. - */ - floatingLabelShrinkStyle: _react.PropTypes.object, - /** - * The style object to use to override floating label styles. - */ - floatingLabelStyle: _react.PropTypes.object, - /** - * The content to use for the floating label element. - */ - floatingLabelText: _react.PropTypes.node, - /** - * If true, the field receives the property width 100%. - */ - fullWidth: _react.PropTypes.bool, - /** - * Override the inline-styles of the TextField's hint text element. - */ - hintStyle: _react.PropTypes.object, - /** - * The hint content to display. - */ - hintText: _react.PropTypes.node, - /** - * The id prop for the text field. - */ - id: _react.PropTypes.string, - /** - * Override the inline-styles of the TextField's input element. - * When multiLine is false: define the style of the input element. - * When multiLine is true: define the style of the container of the textarea. - */ - inputStyle: _react.PropTypes.object, - /** - * If true, a textarea element will be rendered. - * The textarea also grows and shrinks according to the number of lines. - */ - multiLine: _react.PropTypes.bool, - /** - * Name applied to the input. - */ - name: _react.PropTypes.string, - /** @ignore */ - onBlur: _react.PropTypes.func, - /** - * Callback function that is fired when the textfield's value changes. - * - * @param {object} event Change event targeting the text field. - * @param {string} newValue The new value of the text field. - */ onChange: _react.PropTypes.func, - /** @ignore */ - onFocus: _react.PropTypes.func, - /** - * Number of rows to display when multiLine option is set to true. - */ + onHeightChange: _react.PropTypes.func, rows: _react.PropTypes.number, - /** - * Maximum number of rows to display when - * multiLine option is set to true. - */ rowsMax: _react.PropTypes.number, + shadowStyle: _react.PropTypes.object, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, - /** - * Override the inline-styles of the TextField's textarea element. - * The TextField use either a textarea or an input, - * this property has effects only when multiLine is true. - */ textareaStyle: _react.PropTypes.object, + value: _react.PropTypes.string, + valueLink: _react.PropTypes.object +} : void 0; +exports.default = EnhancedTextarea; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 670 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.MenuItem = exports.Menu = undefined; + +var _Menu2 = __webpack_require__(186); + +var _Menu3 = _interopRequireDefault(_Menu2); + +var _MenuItem2 = __webpack_require__(87); + +var _MenuItem3 = _interopRequireDefault(_MenuItem2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.Menu = _Menu3.default; +exports.MenuItem = _MenuItem3.default; +exports.default = _Menu3.default; + +/***/ }), +/* 671 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Divider = __webpack_require__(672); + +var _Divider2 = _interopRequireDefault(_Divider); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Divider2.default; + +/***/ }), +/* 672 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Divider = function Divider(props, context) { + var inset = props.inset, + style = props.style, + other = (0, _objectWithoutProperties3.default)(props, ['inset', 'style']); + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + prepareStyles = _context$muiTheme.prepareStyles; + + + var styles = { + root: { + margin: 0, + marginTop: -1, + marginLeft: inset ? 72 : 0, + height: 1, + border: 'none', + backgroundColor: baseTheme.palette.borderColor + } + }; + + return _react2.default.createElement('hr', (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) })); +}; + +Divider.muiName = 'Divider'; + +process.env.NODE_ENV !== "production" ? Divider.propTypes = { /** - * Specifies the type of input to display - * such as "password" or "text". - */ - type: _react.PropTypes.string, - /** - * Override the inline-styles of the - * TextField's underline element when disabled. - */ - underlineDisabledStyle: _react.PropTypes.object, - /** - * Override the inline-styles of the TextField's - * underline element when focussed. - */ - underlineFocusStyle: _react.PropTypes.object, - /** - * If true, shows the underline for the text field. - */ - underlineShow: _react.PropTypes.bool, - /** - * Override the inline-styles of the TextField's underline element. + * If true, the `Divider` will be indented. */ - underlineStyle: _react.PropTypes.object, + inset: _react.PropTypes.bool, /** - * The value of the text field. + * Override the inline-styles of the root element. */ - value: _react.PropTypes.any + style: _react.PropTypes.object } : void 0; -exports.default = TextField; + +Divider.defaultProps = { + inset: false +}; + +Divider.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +exports.default = Divider; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 691 */ +/* 673 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _Checkbox = __webpack_require__(187); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +var _createComponent = __webpack_require__(39); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_Checkbox2.default, function (_ref) { + var _ref$input = _ref.input, + onChange = _ref$input.onChange, + value = _ref$input.value, + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']), + meta = _ref.meta, + _onCheck = _ref.onCheck, + defaultChecked = _ref.defaultChecked, + props = _objectWithoutProperties(_ref, ['input', 'meta', 'onCheck', 'defaultChecked']); + + return _extends({}, inputProps, props, { + checked: value ? true : false, + onCheck: function onCheck(event, isInputChecked) { + onChange(isInputChecked); + if (_onCheck) { + _onCheck(isInputChecked); + } + } + }); +}); + +/***/ }), +/* 674 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53371,672 +53692,334 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactEventListener = __webpack_require__(58); +var _EnhancedSwitch = __webpack_require__(188); -var _reactEventListener2 = _interopRequireDefault(_reactEventListener); +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _checkBoxOutlineBlank = __webpack_require__(675); + +var _checkBoxOutlineBlank2 = _interopRequireDefault(_checkBoxOutlineBlank); + +var _checkBox = __webpack_require__(676); + +var _checkBox2 = _interopRequireDefault(_checkBox); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var rowsHeight = 24; +function getStyles(props, context) { + var checkbox = context.muiTheme.checkbox; + + var checkboxSize = 24; -function getStyles(props, context, state) { return { - root: { - position: 'relative' }, - textarea: { - height: state.height, - width: '100%', - resize: 'none', - font: 'inherit', - padding: 0, - cursor: 'inherit' + icon: { + height: checkboxSize, + width: checkboxSize }, - shadow: { - resize: 'none', - // Overflow also needed to here to remove the extra row - // added to textareas in Firefox. - overflow: 'hidden', - // Visibility needed to hide the extra text area on ipads - visibility: 'hidden', + check: { position: 'absolute', - height: 'initial' + opacity: 0, + transform: 'scale(0)', + transitionOrigin: '50% 50%', + transition: _transitions2.default.easeOut('450ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('0ms', 'transform', '450ms'), + fill: checkbox.checkedColor + }, + checkWhenSwitched: { + opacity: 1, + transform: 'scale(1)', + transition: _transitions2.default.easeOut('0ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('800ms', 'transform', '0ms') + }, + checkWhenDisabled: { + fill: checkbox.disabledColor + }, + box: { + position: 'absolute', + opacity: 1, + fill: checkbox.boxColor, + transition: _transitions2.default.easeOut('1000ms', 'opacity', '200ms') + }, + boxWhenSwitched: { + opacity: 0, + transition: _transitions2.default.easeOut('650ms', 'opacity', '150ms'), + fill: checkbox.checkedColor + }, + boxWhenDisabled: { + fill: props.checked ? 'transparent' : checkbox.disabledColor + }, + label: { + color: props.disabled ? checkbox.labelDisabledColor : checkbox.labelColor } }; } -var EnhancedTextarea = function (_Component) { - (0, _inherits3.default)(EnhancedTextarea, _Component); +var Checkbox = function (_Component) { + (0, _inherits3.default)(Checkbox, _Component); - function EnhancedTextarea() { + function Checkbox() { var _ref; var _temp, _this, _ret; - (0, _classCallCheck3.default)(this, EnhancedTextarea); + (0, _classCallCheck3.default)(this, Checkbox); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedTextarea.__proto__ || (0, _getPrototypeOf2.default)(EnhancedTextarea)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - height: null - }, _this.handleResize = function (event) { - _this.syncHeightWithShadow(undefined, event); - }, _this.handleChange = function (event) { - _this.syncHeightWithShadow(event.target.value); - - if (_this.props.hasOwnProperty('valueLink')) { - _this.props.valueLink.requestChange(event.target.value); - } - - if (_this.props.onChange) { - _this.props.onChange(event); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Checkbox.__proto__ || (0, _getPrototypeOf2.default)(Checkbox)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + switched: false + }, _this.handleStateChange = function (newSwitched) { + _this.setState({ + switched: newSwitched + }); + }, _this.handleCheck = function (event, isInputChecked) { + if (_this.props.onCheck) { + _this.props.onCheck(event, isInputChecked); } }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - (0, _createClass3.default)(EnhancedTextarea, [{ + (0, _createClass3.default)(Checkbox, [{ key: 'componentWillMount', value: function componentWillMount() { - this.setState({ - height: this.props.rows * rowsHeight - }); - } - }, { - key: 'componentDidMount', - value: function componentDidMount() { - this.syncHeightWithShadow(); + var _props = this.props, + checked = _props.checked, + defaultChecked = _props.defaultChecked, + valueLink = _props.valueLink; + + + if (checked || defaultChecked || valueLink && valueLink.value) { + this.setState({ + switched: true + }); + } } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { - if (nextProps.value !== this.props.value) { - this.syncHeightWithShadow(nextProps.value); + if (this.props.checked !== nextProps.checked) { + this.setState({ + switched: nextProps.checked + }); } } }, { - key: 'getInputNode', - value: function getInputNode() { - return this.refs.input; + key: 'isChecked', + value: function isChecked() { + return this.refs.enhancedSwitch.isSwitched(); } }, { - key: 'setValue', - value: function setValue(value) { - this.getInputNode().value = value; - this.syncHeightWithShadow(value); + key: 'setChecked', + value: function setChecked(newCheckedValue) { + this.refs.enhancedSwitch.setSwitched(newCheckedValue); } }, { - key: 'syncHeightWithShadow', - value: function syncHeightWithShadow(newValue, event) { - var shadow = this.refs.shadow; - - if (newValue !== undefined) { - shadow.value = newValue; - } - - var newHeight = shadow.scrollHeight; + key: 'render', + value: function render() { + var _props2 = this.props, + iconStyle = _props2.iconStyle, + onCheck = _props2.onCheck, + checkedIcon = _props2.checkedIcon, + uncheckedIcon = _props2.uncheckedIcon, + other = (0, _objectWithoutProperties3.default)(_props2, ['iconStyle', 'onCheck', 'checkedIcon', 'uncheckedIcon']); - // Guarding for jsdom, where scrollHeight isn't present. - // See https://github.com/tmpvar/jsdom/issues/1013 - if (newHeight === undefined) return; + var styles = getStyles(this.props, this.context); + var boxStyles = (0, _simpleAssign2.default)(styles.box, this.state.switched && styles.boxWhenSwitched, iconStyle, this.props.disabled && styles.boxWhenDisabled); + var checkStyles = (0, _simpleAssign2.default)(styles.check, this.state.switched && styles.checkWhenSwitched, iconStyle, this.props.disabled && styles.checkWhenDisabled); - if (this.props.rowsMax >= this.props.rows) { - newHeight = Math.min(this.props.rowsMax * rowsHeight, newHeight); - } + var checkedElement = checkedIcon ? _react2.default.cloneElement(checkedIcon, { + style: (0, _simpleAssign2.default)(checkStyles, checkedIcon.props.style) + }) : _react2.default.createElement(_checkBox2.default, { + style: checkStyles + }); - newHeight = Math.max(newHeight, rowsHeight); + var unCheckedElement = uncheckedIcon ? _react2.default.cloneElement(uncheckedIcon, { + style: (0, _simpleAssign2.default)(boxStyles, uncheckedIcon.props.style) + }) : _react2.default.createElement(_checkBoxOutlineBlank2.default, { + style: boxStyles + }); - if (this.state.height !== newHeight) { - this.setState({ - height: newHeight - }); + var checkboxElement = _react2.default.createElement( + 'div', + null, + unCheckedElement, + checkedElement + ); - if (this.props.onHeightChange) { - this.props.onHeightChange(event, newHeight); - } - } - } - }, { - key: 'render', - value: function render() { - var _props = this.props, - onChange = _props.onChange, - onHeightChange = _props.onHeightChange, - rows = _props.rows, - rowsMax = _props.rowsMax, - shadowStyle = _props.shadowStyle, - style = _props.style, - textareaStyle = _props.textareaStyle, - valueLink = _props.valueLink, - other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'onHeightChange', 'rows', 'rowsMax', 'shadowStyle', 'style', 'textareaStyle', 'valueLink']); - var prepareStyles = this.context.muiTheme.prepareStyles; + var rippleColor = this.state.switched ? checkStyles.fill : boxStyles.fill; + var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle); - var styles = getStyles(this.props, this.context, this.state); - var rootStyles = (0, _simpleAssign2.default)(styles.root, style); - var textareaStyles = (0, _simpleAssign2.default)(styles.textarea, textareaStyle); - var shadowStyles = (0, _simpleAssign2.default)({}, textareaStyles, styles.shadow, shadowStyle); + var labelStyle = (0, _simpleAssign2.default)(styles.label, this.props.labelStyle); - if (this.props.hasOwnProperty('valueLink')) { - other.value = this.props.valueLink.value; - } + var enhancedSwitchProps = { + ref: 'enhancedSwitch', + inputType: 'checkbox', + switched: this.state.switched, + switchElement: checkboxElement, + rippleColor: rippleColor, + iconStyle: mergedIconStyle, + onSwitch: this.handleCheck, + labelStyle: labelStyle, + onParentShouldUpdate: this.handleStateChange, + labelPosition: this.props.labelPosition + }; - return _react2.default.createElement( - 'div', - { style: prepareStyles(rootStyles) }, - _react2.default.createElement(_reactEventListener2.default, { target: 'window', onResize: this.handleResize }), - _react2.default.createElement('textarea', { - ref: 'shadow', - style: prepareStyles(shadowStyles), - tabIndex: '-1', - rows: this.props.rows, - defaultValue: this.props.defaultValue, - readOnly: true, - value: this.props.value, - valueLink: this.props.valueLink - }), - _react2.default.createElement('textarea', (0, _extends3.default)({}, other, { - ref: 'input', - rows: this.props.rows, - style: prepareStyles(textareaStyles), - onChange: this.handleChange - })) - ); + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps)); } }]); - return EnhancedTextarea; + return Checkbox; }(_react.Component); -EnhancedTextarea.defaultProps = { - rows: 1 +Checkbox.defaultProps = { + labelPosition: 'right', + disabled: false }; -EnhancedTextarea.contextTypes = { +Checkbox.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; -process.env.NODE_ENV !== "production" ? EnhancedTextarea.propTypes = { - defaultValue: _react.PropTypes.any, +process.env.NODE_ENV !== "production" ? Checkbox.propTypes = { + /** + * Checkbox is checked if true. + */ + checked: _react.PropTypes.bool, + /** + * The SvgIcon to use for the checked state. + * This is useful to create icon toggles. + */ + checkedIcon: _react.PropTypes.element, + /** + * The default state of our checkbox component. + * **Warning:** This cannot be used in conjunction with `checked`. + * Decide between using a controlled or uncontrolled input element and remove one of these props. + * More info: https://fb.me/react-controlled-components + */ + defaultChecked: _react.PropTypes.bool, + /** + * Disabled if true. + */ disabled: _react.PropTypes.bool, - onChange: _react.PropTypes.func, - onHeightChange: _react.PropTypes.func, - rows: _react.PropTypes.number, - rowsMax: _react.PropTypes.number, - shadowStyle: _react.PropTypes.object, + /** + * Overrides the inline-styles of the icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Overrides the inline-styles of the input element. + */ + inputStyle: _react.PropTypes.object, + /** + * Where the label will be placed next to the checkbox. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * Overrides the inline-styles of the Checkbox element label. + */ + labelStyle: _react.PropTypes.object, + /** + * Callback function that is fired when the checkbox is checked. + * + * @param {object} event `change` event targeting the underlying checkbox `input`. + * @param {boolean} isInputChecked The `checked` value of the underlying checkbox `input`. + */ + onCheck: _react.PropTypes.func, /** * Override the inline-styles of the root element. */ style: _react.PropTypes.object, - textareaStyle: _react.PropTypes.object, - value: _react.PropTypes.string, + /** + * The SvgIcon to use for the unchecked state. + * This is useful to create icon toggles. + */ + uncheckedIcon: _react.PropTypes.element, + /** + * ValueLink for when using controlled checkbox. + */ valueLink: _react.PropTypes.object } : void 0; -exports.default = EnhancedTextarea; +exports.default = Checkbox; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 692 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) { + Object.defineProperty(exports, "__esModule", { value: true }); -var _simpleAssign = __webpack_require__(7); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(12); +var _pure = __webpack_require__(22); -var _transitions2 = _interopRequireDefault(_transitions); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getStyles(props) { - var hintColor = props.muiTheme.textField.hintColor, - show = props.show; - - - return { - root: { - position: 'absolute', - opacity: show ? 1 : 0, - color: hintColor, - transition: _transitions2.default.easeOut(), - bottom: 12 - } - }; -} - -var TextFieldHint = function TextFieldHint(props) { - var prepareStyles = props.muiTheme.prepareStyles, - style = props.style, - text = props.text; - - - var styles = getStyles(props); - - return _react2.default.createElement( - 'div', - { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, - text - ); -}; - -process.env.NODE_ENV !== "production" ? TextFieldHint.propTypes = { - /** - * @ignore - * The material-ui theme applied to this component. - */ - muiTheme: _react.PropTypes.object.isRequired, - /** - * True if the hint text should be visible. - */ - show: _react.PropTypes.bool, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - /** - * The hint text displayed. - */ - text: _react.PropTypes.node -} : void 0; - -TextFieldHint.defaultProps = { - show: true -}; - -exports.default = TextFieldHint; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 693 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _simpleAssign = __webpack_require__(7); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); +var _pure2 = _interopRequireDefault(_pure); -var _transitions = __webpack_require__(12); +var _SvgIcon = __webpack_require__(23); -var _transitions2 = _interopRequireDefault(_transitions); +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function getStyles(props) { - var defaultStyles = { - position: 'absolute', - lineHeight: '22px', - top: 38, - transition: _transitions2.default.easeOut(), - zIndex: 1, // Needed to display label above Chrome's autocomplete field background - transform: 'scale(1) translate(0, 0)', - transformOrigin: 'left top', - pointerEvents: 'auto', - userSelect: 'none' - }; - - var shrinkStyles = props.shrink ? (0, _simpleAssign2.default)({ - transform: 'scale(0.75) translate(0, -28px)', - pointerEvents: 'none' - }, props.shrinkStyle) : null; - - return { - root: (0, _simpleAssign2.default)(defaultStyles, props.style, shrinkStyles) - }; -} - -var TextFieldLabel = function TextFieldLabel(props) { - var muiTheme = props.muiTheme, - className = props.className, - children = props.children, - htmlFor = props.htmlFor, - onTouchTap = props.onTouchTap; - var prepareStyles = muiTheme.prepareStyles; - - var styles = getStyles(props); - +var ToggleCheckBoxOutlineBlank = function ToggleCheckBoxOutlineBlank(props) { return _react2.default.createElement( - 'label', - { - className: className, - style: prepareStyles(styles.root), - htmlFor: htmlFor, - onTouchTap: onTouchTap - }, - children + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z' }) ); }; +ToggleCheckBoxOutlineBlank = (0, _pure2.default)(ToggleCheckBoxOutlineBlank); +ToggleCheckBoxOutlineBlank.displayName = 'ToggleCheckBoxOutlineBlank'; +ToggleCheckBoxOutlineBlank.muiName = 'SvgIcon'; -process.env.NODE_ENV !== "production" ? TextFieldLabel.propTypes = { - /** - * The label contents. - */ - children: _react.PropTypes.node, - /** - * The css class name of the root element. - */ - className: _react.PropTypes.string, - /** - * Disables the label if set to true. - */ - disabled: _react.PropTypes.bool, - /** - * The id of the target element that this label should refer to. - */ - htmlFor: _react.PropTypes.string, - /** - * @ignore - * The material-ui theme applied to this component. - */ - muiTheme: _react.PropTypes.object.isRequired, - /** - * Callback function for when the label is selected via a touch tap. - * - * @param {object} event TouchTap event targeting the text field label. - */ - onTouchTap: _react.PropTypes.func, - /** - * True if the floating label should shrink. - */ - shrink: _react.PropTypes.bool, - /** - * Override the inline-styles of the root element when shrunk. - */ - shrinkStyle: _react.PropTypes.object, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object -} : void 0; - -TextFieldLabel.defaultProps = { - disabled: false, - shrink: false -}; - -exports.default = TextFieldLabel; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +exports.default = ToggleCheckBoxOutlineBlank; /***/ }), -/* 694 */ +/* 676 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(process) { + Object.defineProperty(exports, "__esModule", { value: true }); -var _simpleAssign = __webpack_require__(7); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _transitions = __webpack_require__(12); - -var _transitions2 = _interopRequireDefault(_transitions); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var propTypes = { - /** - * True if the parent `TextField` is disabled. - */ - disabled: _react.PropTypes.bool, - /** - * Override the inline-styles of the underline when parent `TextField` is disabled. - */ - disabledStyle: _react.PropTypes.object, - /** - * True if the parent `TextField` has an error. - */ - error: _react.PropTypes.bool, - /** - * Override the inline-styles of the underline when parent `TextField` has an error. - */ - errorStyle: _react.PropTypes.object, - /** - * True if the parent `TextField` is focused. - */ - focus: _react.PropTypes.bool, - /** - * Override the inline-styles of the underline when parent `TextField` is focused. - */ - focusStyle: _react.PropTypes.object, - /** - * @ignore - * The material-ui theme applied to this component. - */ - muiTheme: _react.PropTypes.object.isRequired, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object -}; - -var defaultProps = { - disabled: false, - disabledStyle: {}, - error: false, - errorStyle: {}, - focus: false, - focusStyle: {}, - style: {} -}; - -var TextFieldUnderline = function TextFieldUnderline(props) { - var disabled = props.disabled, - disabledStyle = props.disabledStyle, - error = props.error, - errorStyle = props.errorStyle, - focus = props.focus, - focusStyle = props.focusStyle, - muiTheme = props.muiTheme, - style = props.style; - var errorStyleColor = errorStyle.color; - var prepareStyles = muiTheme.prepareStyles, - _muiTheme$textField = muiTheme.textField, - borderColor = _muiTheme$textField.borderColor, - disabledTextColor = _muiTheme$textField.disabledTextColor, - errorColor = _muiTheme$textField.errorColor, - focusColor = _muiTheme$textField.focusColor; +var _pure = __webpack_require__(22); +var _pure2 = _interopRequireDefault(_pure); - var styles = { - root: { - borderTop: 'none', - borderLeft: 'none', - borderRight: 'none', - borderBottom: 'solid 1px', - borderColor: borderColor, - bottom: 8, - boxSizing: 'content-box', - margin: 0, - position: 'absolute', - width: '100%' - }, - disabled: { - borderBottom: 'dotted 2px', - borderColor: disabledTextColor - }, - focus: { - borderBottom: 'solid 2px', - borderColor: focusColor, - transform: 'scaleX(0)', - transition: _transitions2.default.easeOut() - }, - error: { - borderColor: errorStyleColor ? errorStyleColor : errorColor, - transform: 'scaleX(1)' - } - }; +var _SvgIcon = __webpack_require__(23); - var underline = (0, _simpleAssign2.default)({}, styles.root, style); - var focusedUnderline = (0, _simpleAssign2.default)({}, underline, styles.focus, focusStyle); +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); - if (disabled) underline = (0, _simpleAssign2.default)({}, underline, styles.disabled, disabledStyle); - if (focus) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, { transform: 'scaleX(1)' }); - if (error) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, styles.error); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var ToggleCheckBox = function ToggleCheckBox(props) { return _react2.default.createElement( - 'div', - null, - _react2.default.createElement('hr', { style: prepareStyles(underline) }), - _react2.default.createElement('hr', { style: prepareStyles(focusedUnderline) }) + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z' }) ); }; +ToggleCheckBox = (0, _pure2.default)(ToggleCheckBox); +ToggleCheckBox.displayName = 'ToggleCheckBox'; +ToggleCheckBox.muiName = 'SvgIcon'; -process.env.NODE_ENV !== "production" ? TextFieldUnderline.propTypes = propTypes : void 0; -TextFieldUnderline.defaultProps = defaultProps; - -exports.default = TextFieldUnderline; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 695 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = exports.MenuItem = exports.Menu = undefined; - -var _Menu2 = __webpack_require__(181); - -var _Menu3 = _interopRequireDefault(_Menu2); - -var _MenuItem2 = __webpack_require__(118); - -var _MenuItem3 = _interopRequireDefault(_MenuItem2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.Menu = _Menu3.default; -exports.MenuItem = _MenuItem3.default; -exports.default = _Menu3.default; - -/***/ }), -/* 696 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; - -var _Divider = __webpack_require__(697); - -var _Divider2 = _interopRequireDefault(_Divider); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _Divider2.default; - -/***/ }), -/* 697 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends2 = __webpack_require__(8); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(9); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - -var _simpleAssign = __webpack_require__(7); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var Divider = function Divider(props, context) { - var inset = props.inset, - style = props.style, - other = (0, _objectWithoutProperties3.default)(props, ['inset', 'style']); - var _context$muiTheme = context.muiTheme, - baseTheme = _context$muiTheme.baseTheme, - prepareStyles = _context$muiTheme.prepareStyles; - - - var styles = { - root: { - margin: 0, - marginTop: -1, - marginLeft: inset ? 72 : 0, - height: 1, - border: 'none', - backgroundColor: baseTheme.palette.borderColor - } - }; - - return _react2.default.createElement('hr', (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) })); -}; - -Divider.muiName = 'Divider'; - -process.env.NODE_ENV !== "production" ? Divider.propTypes = { - /** - * If true, the `Divider` will be indented. - */ - inset: _react.PropTypes.bool, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object -} : void 0; - -Divider.defaultProps = { - inset: false -}; - -Divider.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; - -exports.default = Divider; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +exports.default = ToggleCheckBox; /***/ }), -/* 698 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54048,41 +54031,42 @@ Object.defineProperty(exports, "__esModule", { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _Checkbox = __webpack_require__(699); +var _DatePicker = __webpack_require__(678); -var _Checkbox2 = _interopRequireDefault(_Checkbox); +var _DatePicker2 = _interopRequireDefault(_DatePicker); -var _createComponent = __webpack_require__(40); +var _createComponent = __webpack_require__(39); var _createComponent2 = _interopRequireDefault(_createComponent); +var _mapError = __webpack_require__(63); + +var _mapError2 = _interopRequireDefault(_mapError); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -exports.default = (0, _createComponent2.default)(_Checkbox2.default, function (_ref) { +exports.default = (0, _createComponent2.default)(_DatePicker2.default, function (_ref) { var _ref$input = _ref.input, - onChange = _ref$input.onChange, - value = _ref$input.value, - inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']), - meta = _ref.meta, - _onCheck = _ref.onCheck, - defaultChecked = _ref.defaultChecked, - props = _objectWithoutProperties(_ref, ['input', 'meta', 'onCheck', 'defaultChecked']); + onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onBlur']), + defaultDate = _ref.defaultDate, + _onChange = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'defaultDate', 'onChange']); - return _extends({}, inputProps, props, { - checked: value ? true : false, - onCheck: function onCheck(event, isInputChecked) { - onChange(isInputChecked); - if (_onCheck) { - _onCheck(isInputChecked); + return _extends({}, inputProps, (0, _mapError2.default)(props), { + onChange: function onChange(event, value) { + inputProps.onChange(value); + if (_onChange) { + _onChange(value); } } }); }); /***/ }), -/* 699 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54093,16 +54077,16 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _Checkbox = __webpack_require__(700); +var _DatePicker = __webpack_require__(679); -var _Checkbox2 = _interopRequireDefault(_Checkbox); +var _DatePicker2 = _interopRequireDefault(_DatePicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = _Checkbox2.default; +exports.default = _DatePicker2.default; /***/ }), -/* 700 */ +/* 679 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54148,471 +54132,31 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _EnhancedSwitch = __webpack_require__(184); +var _dateUtils = __webpack_require__(73); -var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); +var _DatePickerDialog = __webpack_require__(680); -var _transitions = __webpack_require__(12); +var _DatePickerDialog2 = _interopRequireDefault(_DatePickerDialog); -var _transitions2 = _interopRequireDefault(_transitions); +var _TextField = __webpack_require__(89); -var _checkBoxOutlineBlank = __webpack_require__(701); +var _TextField2 = _interopRequireDefault(_TextField); -var _checkBoxOutlineBlank2 = _interopRequireDefault(_checkBoxOutlineBlank); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _checkBox = __webpack_require__(702); +var DatePicker = function (_Component) { + (0, _inherits3.default)(DatePicker, _Component); -var _checkBox2 = _interopRequireDefault(_checkBox); + function DatePicker() { + var _ref; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var _temp, _this, _ret; -function getStyles(props, context) { - var checkbox = context.muiTheme.checkbox; + (0, _classCallCheck3.default)(this, DatePicker); - var checkboxSize = 24; - - return { - icon: { - height: checkboxSize, - width: checkboxSize - }, - check: { - position: 'absolute', - opacity: 0, - transform: 'scale(0)', - transitionOrigin: '50% 50%', - transition: _transitions2.default.easeOut('450ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('0ms', 'transform', '450ms'), - fill: checkbox.checkedColor - }, - checkWhenSwitched: { - opacity: 1, - transform: 'scale(1)', - transition: _transitions2.default.easeOut('0ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('800ms', 'transform', '0ms') - }, - checkWhenDisabled: { - fill: checkbox.disabledColor - }, - box: { - position: 'absolute', - opacity: 1, - fill: checkbox.boxColor, - transition: _transitions2.default.easeOut('1000ms', 'opacity', '200ms') - }, - boxWhenSwitched: { - opacity: 0, - transition: _transitions2.default.easeOut('650ms', 'opacity', '150ms'), - fill: checkbox.checkedColor - }, - boxWhenDisabled: { - fill: props.checked ? 'transparent' : checkbox.disabledColor - }, - label: { - color: props.disabled ? checkbox.labelDisabledColor : checkbox.labelColor - } - }; -} - -var Checkbox = function (_Component) { - (0, _inherits3.default)(Checkbox, _Component); - - function Checkbox() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, Checkbox); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Checkbox.__proto__ || (0, _getPrototypeOf2.default)(Checkbox)).call.apply(_ref, [this].concat(args))), _this), _this.state = { - switched: false - }, _this.handleStateChange = function (newSwitched) { - _this.setState({ - switched: newSwitched - }); - }, _this.handleCheck = function (event, isInputChecked) { - if (_this.props.onCheck) { - _this.props.onCheck(event, isInputChecked); - } - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - - (0, _createClass3.default)(Checkbox, [{ - key: 'componentWillMount', - value: function componentWillMount() { - var _props = this.props, - checked = _props.checked, - defaultChecked = _props.defaultChecked, - valueLink = _props.valueLink; - - - if (checked || defaultChecked || valueLink && valueLink.value) { - this.setState({ - switched: true - }); - } - } - }, { - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - if (this.props.checked !== nextProps.checked) { - this.setState({ - switched: nextProps.checked - }); - } - } - }, { - key: 'isChecked', - value: function isChecked() { - return this.refs.enhancedSwitch.isSwitched(); - } - }, { - key: 'setChecked', - value: function setChecked(newCheckedValue) { - this.refs.enhancedSwitch.setSwitched(newCheckedValue); - } - }, { - key: 'render', - value: function render() { - var _props2 = this.props, - iconStyle = _props2.iconStyle, - onCheck = _props2.onCheck, - checkedIcon = _props2.checkedIcon, - uncheckedIcon = _props2.uncheckedIcon, - other = (0, _objectWithoutProperties3.default)(_props2, ['iconStyle', 'onCheck', 'checkedIcon', 'uncheckedIcon']); - - var styles = getStyles(this.props, this.context); - var boxStyles = (0, _simpleAssign2.default)(styles.box, this.state.switched && styles.boxWhenSwitched, iconStyle, this.props.disabled && styles.boxWhenDisabled); - var checkStyles = (0, _simpleAssign2.default)(styles.check, this.state.switched && styles.checkWhenSwitched, iconStyle, this.props.disabled && styles.checkWhenDisabled); - - var checkedElement = checkedIcon ? _react2.default.cloneElement(checkedIcon, { - style: (0, _simpleAssign2.default)(checkStyles, checkedIcon.props.style) - }) : _react2.default.createElement(_checkBox2.default, { - style: checkStyles - }); - - var unCheckedElement = uncheckedIcon ? _react2.default.cloneElement(uncheckedIcon, { - style: (0, _simpleAssign2.default)(boxStyles, uncheckedIcon.props.style) - }) : _react2.default.createElement(_checkBoxOutlineBlank2.default, { - style: boxStyles - }); - - var checkboxElement = _react2.default.createElement( - 'div', - null, - unCheckedElement, - checkedElement - ); - - var rippleColor = this.state.switched ? checkStyles.fill : boxStyles.fill; - var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle); - - var labelStyle = (0, _simpleAssign2.default)(styles.label, this.props.labelStyle); - - var enhancedSwitchProps = { - ref: 'enhancedSwitch', - inputType: 'checkbox', - switched: this.state.switched, - switchElement: checkboxElement, - rippleColor: rippleColor, - iconStyle: mergedIconStyle, - onSwitch: this.handleCheck, - labelStyle: labelStyle, - onParentShouldUpdate: this.handleStateChange, - labelPosition: this.props.labelPosition - }; - - return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps)); - } - }]); - return Checkbox; -}(_react.Component); - -Checkbox.defaultProps = { - labelPosition: 'right', - disabled: false -}; -Checkbox.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; -process.env.NODE_ENV !== "production" ? Checkbox.propTypes = { - /** - * Checkbox is checked if true. - */ - checked: _react.PropTypes.bool, - /** - * The SvgIcon to use for the checked state. - * This is useful to create icon toggles. - */ - checkedIcon: _react.PropTypes.element, - /** - * The default state of our checkbox component. - * **Warning:** This cannot be used in conjunction with `checked`. - * Decide between using a controlled or uncontrolled input element and remove one of these props. - * More info: https://fb.me/react-controlled-components - */ - defaultChecked: _react.PropTypes.bool, - /** - * Disabled if true. - */ - disabled: _react.PropTypes.bool, - /** - * Overrides the inline-styles of the icon element. - */ - iconStyle: _react.PropTypes.object, - /** - * Overrides the inline-styles of the input element. - */ - inputStyle: _react.PropTypes.object, - /** - * Where the label will be placed next to the checkbox. - */ - labelPosition: _react.PropTypes.oneOf(['left', 'right']), - /** - * Overrides the inline-styles of the Checkbox element label. - */ - labelStyle: _react.PropTypes.object, - /** - * Callback function that is fired when the checkbox is checked. - * - * @param {object} event `change` event targeting the underlying checkbox `input`. - * @param {boolean} isInputChecked The `checked` value of the underlying checkbox `input`. - */ - onCheck: _react.PropTypes.func, - /** - * Override the inline-styles of the root element. - */ - style: _react.PropTypes.object, - /** - * The SvgIcon to use for the unchecked state. - * This is useful to create icon toggles. - */ - uncheckedIcon: _react.PropTypes.element, - /** - * ValueLink for when using controlled checkbox. - */ - valueLink: _react.PropTypes.object -} : void 0; -exports.default = Checkbox; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 701 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); - -var _pure = __webpack_require__(28); - -var _pure2 = _interopRequireDefault(_pure); - -var _SvgIcon = __webpack_require__(29); - -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var ToggleCheckBoxOutlineBlank = function ToggleCheckBoxOutlineBlank(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z' }) - ); -}; -ToggleCheckBoxOutlineBlank = (0, _pure2.default)(ToggleCheckBoxOutlineBlank); -ToggleCheckBoxOutlineBlank.displayName = 'ToggleCheckBoxOutlineBlank'; -ToggleCheckBoxOutlineBlank.muiName = 'SvgIcon'; - -exports.default = ToggleCheckBoxOutlineBlank; - -/***/ }), -/* 702 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); - -var _pure = __webpack_require__(28); - -var _pure2 = _interopRequireDefault(_pure); - -var _SvgIcon = __webpack_require__(29); - -var _SvgIcon2 = _interopRequireDefault(_SvgIcon); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var ToggleCheckBox = function ToggleCheckBox(props) { - return _react2.default.createElement( - _SvgIcon2.default, - props, - _react2.default.createElement('path', { d: 'M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z' }) - ); -}; -ToggleCheckBox = (0, _pure2.default)(ToggleCheckBox); -ToggleCheckBox.displayName = 'ToggleCheckBox'; -ToggleCheckBox.muiName = 'SvgIcon'; - -exports.default = ToggleCheckBox; - -/***/ }), -/* 703 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _DatePicker = __webpack_require__(704); - -var _DatePicker2 = _interopRequireDefault(_DatePicker); - -var _createComponent = __webpack_require__(40); - -var _createComponent2 = _interopRequireDefault(_createComponent); - -var _mapError = __webpack_require__(59); - -var _mapError2 = _interopRequireDefault(_mapError); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - -exports.default = (0, _createComponent2.default)(_DatePicker2.default, function (_ref) { - var _ref$input = _ref.input, - onBlur = _ref$input.onBlur, - inputProps = _objectWithoutProperties(_ref$input, ['onBlur']), - defaultDate = _ref.defaultDate, - _onChange = _ref.onChange, - props = _objectWithoutProperties(_ref, ['input', 'defaultDate', 'onChange']); - - return _extends({}, inputProps, (0, _mapError2.default)(props), { - onChange: function onChange(event, value) { - inputProps.onChange(value); - if (_onChange) { - _onChange(value); - } - } - }); -}); - -/***/ }), -/* 704 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; - -var _DatePicker = __webpack_require__(705); - -var _DatePicker2 = _interopRequireDefault(_DatePicker); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _DatePicker2.default; - -/***/ }), -/* 705 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends2 = __webpack_require__(8); - -var _extends3 = _interopRequireDefault(_extends2); - -var _objectWithoutProperties2 = __webpack_require__(9); - -var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); - -var _getPrototypeOf = __webpack_require__(4); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(2); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(3); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(5); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(6); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _simpleAssign = __webpack_require__(7); - -var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); - -var _dateUtils = __webpack_require__(71); - -var _DatePickerDialog = __webpack_require__(706); - -var _DatePickerDialog2 = _interopRequireDefault(_DatePickerDialog); - -var _TextField = __webpack_require__(88); - -var _TextField2 = _interopRequireDefault(_TextField); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var DatePicker = function (_Component) { - (0, _inherits3.default)(DatePicker, _Component); - - function DatePicker() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, DatePicker); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePicker.__proto__ || (0, _getPrototypeOf2.default)(DatePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { date: undefined @@ -54937,7 +54481,7 @@ exports.default = DatePicker; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 706 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54983,31 +54527,31 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactEventListener = __webpack_require__(58); +var _reactEventListener = __webpack_require__(61); var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -var _keycode = __webpack_require__(31); +var _keycode = __webpack_require__(27); var _keycode2 = _interopRequireDefault(_keycode); -var _Calendar = __webpack_require__(707); +var _Calendar = __webpack_require__(681); var _Calendar2 = _interopRequireDefault(_Calendar); -var _Dialog = __webpack_require__(293); +var _Dialog = __webpack_require__(191); var _Dialog2 = _interopRequireDefault(_Dialog); -var _Popover = __webpack_require__(119); +var _Popover = __webpack_require__(120); var _Popover2 = _interopRequireDefault(_Popover); -var _PopoverAnimationVertical = __webpack_require__(294); +var _PopoverAnimationVertical = __webpack_require__(299); var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical); -var _dateUtils = __webpack_require__(71); +var _dateUtils = __webpack_require__(73); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -55190,7 +54734,7 @@ exports.default = DatePickerDialog; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 707 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55220,7 +54764,7 @@ var _inherits2 = __webpack_require__(6); var _inherits3 = _interopRequireDefault(_inherits2); -var _toConsumableArray2 = __webpack_require__(95); +var _toConsumableArray2 = __webpack_require__(53); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); @@ -55228,11 +54772,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactEventListener = __webpack_require__(58); +var _reactEventListener = __webpack_require__(61); var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -var _keycode = __webpack_require__(31); +var _keycode = __webpack_require__(27); var _keycode2 = _interopRequireDefault(_keycode); @@ -55240,31 +54784,31 @@ var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _CalendarActionButtons = __webpack_require__(708); +var _CalendarActionButtons = __webpack_require__(682); var _CalendarActionButtons2 = _interopRequireDefault(_CalendarActionButtons); -var _CalendarMonth = __webpack_require__(711); +var _CalendarMonth = __webpack_require__(685); var _CalendarMonth2 = _interopRequireDefault(_CalendarMonth); -var _CalendarYear = __webpack_require__(713); +var _CalendarYear = __webpack_require__(687); var _CalendarYear2 = _interopRequireDefault(_CalendarYear); -var _CalendarToolbar = __webpack_require__(715); +var _CalendarToolbar = __webpack_require__(689); var _CalendarToolbar2 = _interopRequireDefault(_CalendarToolbar); -var _DateDisplay = __webpack_require__(719); +var _DateDisplay = __webpack_require__(693); var _DateDisplay2 = _interopRequireDefault(_DateDisplay); -var _SlideIn = __webpack_require__(185); +var _SlideIn = __webpack_require__(190); var _SlideIn2 = _interopRequireDefault(_SlideIn); -var _dateUtils = __webpack_require__(71); +var _dateUtils = __webpack_require__(73); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -55645,7 +55189,7 @@ exports.default = Calendar; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 708 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55679,7 +55223,7 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _FlatButton = __webpack_require__(292); +var _FlatButton = __webpack_require__(189); var _FlatButton2 = _interopRequireDefault(_FlatButton); @@ -55752,7 +55296,7 @@ exports.default = CalendarActionButton; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 709 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55804,13 +55348,13 @@ var _transitions2 = _interopRequireDefault(_transitions); var _childUtils = __webpack_require__(100); -var _colorManipulator = __webpack_require__(70); +var _colorManipulator = __webpack_require__(62); -var _EnhancedButton = __webpack_require__(52); +var _EnhancedButton = __webpack_require__(44); var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); -var _FlatButtonLabel = __webpack_require__(710); +var _FlatButtonLabel = __webpack_require__(684); var _FlatButtonLabel2 = _interopRequireDefault(_FlatButtonLabel); @@ -56083,7 +55627,7 @@ exports.default = FlatButton; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 710 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56176,7 +55720,7 @@ exports.default = FlatButtonLabel; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 711 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56210,9 +55754,9 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _dateUtils = __webpack_require__(71); +var _dateUtils = __webpack_require__(73); -var _DayButton = __webpack_require__(712); +var _DayButton = __webpack_require__(686); var _DayButton2 = _interopRequireDefault(_DayButton); @@ -56349,7 +55893,7 @@ exports.default = CalendarMonth; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 712 */ +/* 686 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56395,9 +55939,9 @@ var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _dateUtils = __webpack_require__(71); +var _dateUtils = __webpack_require__(73); -var _EnhancedButton = __webpack_require__(52); +var _EnhancedButton = __webpack_require__(44); var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); @@ -56551,7 +56095,7 @@ exports.default = DayButton; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 713 */ +/* 687 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56589,15 +56133,15 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(18); +var _reactDom = __webpack_require__(17); var _reactDom2 = _interopRequireDefault(_reactDom); -var _YearButton = __webpack_require__(714); +var _YearButton = __webpack_require__(688); var _YearButton2 = _interopRequireDefault(_YearButton); -var _dateUtils = __webpack_require__(71); +var _dateUtils = __webpack_require__(73); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -56747,7 +56291,7 @@ exports.default = CalendarYear; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 714 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56789,7 +56333,7 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _EnhancedButton = __webpack_require__(52); +var _EnhancedButton = __webpack_require__(44); var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); @@ -56908,7 +56452,7 @@ exports.default = YearButton; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 715 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56942,19 +56486,19 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _IconButton = __webpack_require__(83); +var _IconButton = __webpack_require__(72); var _IconButton2 = _interopRequireDefault(_IconButton); -var _chevronLeft = __webpack_require__(716); +var _chevronLeft = __webpack_require__(690); var _chevronLeft2 = _interopRequireDefault(_chevronLeft); -var _chevronRight = __webpack_require__(717); +var _chevronRight = __webpack_require__(691); var _chevronRight2 = _interopRequireDefault(_chevronRight); -var _SlideIn = __webpack_require__(185); +var _SlideIn = __webpack_require__(190); var _SlideIn2 = _interopRequireDefault(_SlideIn); @@ -57083,7 +56627,7 @@ exports.default = CalendarToolbar; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 716 */ +/* 690 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57097,11 +56641,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(28); +var _pure = __webpack_require__(22); var _pure2 = _interopRequireDefault(_pure); -var _SvgIcon = __webpack_require__(29); +var _SvgIcon = __webpack_require__(23); var _SvgIcon2 = _interopRequireDefault(_SvgIcon); @@ -57121,7 +56665,7 @@ NavigationChevronLeft.muiName = 'SvgIcon'; exports.default = NavigationChevronLeft; /***/ }), -/* 717 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57135,11 +56679,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(28); +var _pure = __webpack_require__(22); var _pure2 = _interopRequireDefault(_pure); -var _SvgIcon = __webpack_require__(29); +var _SvgIcon = __webpack_require__(23); var _SvgIcon2 = _interopRequireDefault(_SvgIcon); @@ -57159,7 +56703,7 @@ NavigationChevronRight.muiName = 'SvgIcon'; exports.default = NavigationChevronRight; /***/ }), -/* 718 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57205,7 +56749,7 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(18); +var _reactDom = __webpack_require__(17); var _reactDom2 = _interopRequireDefault(_reactDom); @@ -57314,7 +56858,7 @@ exports.default = SlideInChild; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 719 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57360,7 +56904,7 @@ var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _SlideIn = __webpack_require__(185); +var _SlideIn = __webpack_require__(190); var _SlideIn2 = _interopRequireDefault(_SlideIn); @@ -57558,7 +57102,7 @@ exports.default = DateDisplay; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 720 */ +/* 694 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57604,15 +57148,15 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(18); +var _reactDom = __webpack_require__(17); var _reactDom2 = _interopRequireDefault(_reactDom); -var _reactEventListener = __webpack_require__(58); +var _reactEventListener = __webpack_require__(61); var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -var _keycode = __webpack_require__(31); +var _keycode = __webpack_require__(27); var _keycode2 = _interopRequireDefault(_keycode); @@ -57620,15 +57164,15 @@ var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _Overlay = __webpack_require__(721); +var _Overlay = __webpack_require__(695); var _Overlay2 = _interopRequireDefault(_Overlay); -var _RenderToLayer = __webpack_require__(289); +var _RenderToLayer = __webpack_require__(291); var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer); -var _Paper = __webpack_require__(39); +var _Paper = __webpack_require__(38); var _Paper2 = _interopRequireDefault(_Paper); @@ -58152,7 +57696,7 @@ exports.default = Dialog; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 721 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58202,7 +57746,7 @@ var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _AutoLockScrolling = __webpack_require__(722); +var _AutoLockScrolling = __webpack_require__(696); var _AutoLockScrolling2 = _interopRequireDefault(_AutoLockScrolling); @@ -58299,7 +57843,7 @@ exports.default = Overlay; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 722 */ +/* 696 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58426,7 +57970,7 @@ exports.default = AutoLockScrolling; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 723 */ +/* 697 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58438,13 +57982,13 @@ Object.defineProperty(exports, "__esModule", { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _RadioButton = __webpack_require__(295); +var _RadioButton = __webpack_require__(300); -var _createComponent = __webpack_require__(40); +var _createComponent = __webpack_require__(39); var _createComponent2 = _interopRequireDefault(_createComponent); -var _mapError = __webpack_require__(59); +var _mapError = __webpack_require__(63); var _mapError2 = _interopRequireDefault(_mapError); @@ -58464,7 +58008,7 @@ var mapValueToValueSelected = function mapValueToValueSelected(_ref, errorProp) exports.default = (0, _createComponent2.default)(_RadioButton.RadioButtonGroup, mapValueToValueSelected); /***/ }), -/* 724 */ +/* 698 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58514,15 +58058,15 @@ var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _EnhancedSwitch = __webpack_require__(184); +var _EnhancedSwitch = __webpack_require__(188); var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); -var _radioButtonUnchecked = __webpack_require__(725); +var _radioButtonUnchecked = __webpack_require__(699); var _radioButtonUnchecked2 = _interopRequireDefault(_radioButtonUnchecked); -var _radioButtonChecked = __webpack_require__(726); +var _radioButtonChecked = __webpack_require__(700); var _radioButtonChecked2 = _interopRequireDefault(_radioButtonChecked); @@ -58742,7 +58286,7 @@ exports.default = RadioButton; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 725 */ +/* 699 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58756,11 +58300,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(28); +var _pure = __webpack_require__(22); var _pure2 = _interopRequireDefault(_pure); -var _SvgIcon = __webpack_require__(29); +var _SvgIcon = __webpack_require__(23); var _SvgIcon2 = _interopRequireDefault(_SvgIcon); @@ -58780,7 +58324,7 @@ ToggleRadioButtonUnchecked.muiName = 'SvgIcon'; exports.default = ToggleRadioButtonUnchecked; /***/ }), -/* 726 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58794,11 +58338,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(28); +var _pure = __webpack_require__(22); var _pure2 = _interopRequireDefault(_pure); -var _SvgIcon = __webpack_require__(29); +var _SvgIcon = __webpack_require__(23); var _SvgIcon2 = _interopRequireDefault(_SvgIcon); @@ -58818,7 +58362,7 @@ ToggleRadioButtonChecked.muiName = 'SvgIcon'; exports.default = ToggleRadioButtonChecked; /***/ }), -/* 727 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -58864,7 +58408,7 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _RadioButton = __webpack_require__(295); +var _RadioButton = __webpack_require__(300); var _RadioButton2 = _interopRequireDefault(_RadioButton); @@ -59060,7 +58604,7 @@ exports.default = RadioButtonGroup; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 728 */ +/* 702 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59072,15 +58616,15 @@ Object.defineProperty(exports, "__esModule", { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _SelectField = __webpack_require__(729); +var _SelectField = __webpack_require__(703); var _SelectField2 = _interopRequireDefault(_SelectField); -var _createComponent = __webpack_require__(40); +var _createComponent = __webpack_require__(39); var _createComponent2 = _interopRequireDefault(_createComponent); -var _mapError = __webpack_require__(59); +var _mapError = __webpack_require__(63); var _mapError2 = _interopRequireDefault(_mapError); @@ -59112,7 +58656,7 @@ exports.default = (0, _createComponent2.default)(_SelectField2.default, function }); /***/ }), -/* 729 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59123,7 +58667,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _SelectField = __webpack_require__(730); +var _SelectField = __webpack_require__(704); var _SelectField2 = _interopRequireDefault(_SelectField); @@ -59132,7 +58676,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.default = _SelectField2.default; /***/ }), -/* 730 */ +/* 704 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59178,11 +58722,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _TextField = __webpack_require__(88); +var _TextField = __webpack_require__(89); var _TextField2 = _interopRequireDefault(_TextField); -var _DropDownMenu = __webpack_require__(731); +var _DropDownMenu = __webpack_require__(705); var _DropDownMenu2 = _interopRequireDefault(_DropDownMenu); @@ -59424,7 +58968,7 @@ exports.default = SelectField; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 731 */ +/* 705 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59435,11 +58979,11 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = exports.MenuItem = exports.DropDownMenu = undefined; -var _DropDownMenu2 = __webpack_require__(732); +var _DropDownMenu2 = __webpack_require__(706); var _DropDownMenu3 = _interopRequireDefault(_DropDownMenu2); -var _MenuItem2 = __webpack_require__(288); +var _MenuItem2 = __webpack_require__(290); var _MenuItem3 = _interopRequireDefault(_MenuItem2); @@ -59450,7 +58994,7 @@ exports.MenuItem = _MenuItem3.default; exports.default = _DropDownMenu3.default; /***/ }), -/* 732 */ +/* 706 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59496,7 +59040,7 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(18); +var _reactDom = __webpack_require__(17); var _reactDom2 = _interopRequireDefault(_reactDom); @@ -59504,35 +59048,35 @@ var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _arrowDropDown = __webpack_require__(733); +var _arrowDropDown = __webpack_require__(707); var _arrowDropDown2 = _interopRequireDefault(_arrowDropDown); -var _Menu = __webpack_require__(181); +var _Menu = __webpack_require__(186); var _Menu2 = _interopRequireDefault(_Menu); -var _ClearFix = __webpack_require__(734); +var _ClearFix = __webpack_require__(708); var _ClearFix2 = _interopRequireDefault(_ClearFix); -var _Popover = __webpack_require__(119); +var _Popover = __webpack_require__(120); var _Popover2 = _interopRequireDefault(_Popover); -var _PopoverAnimationVertical = __webpack_require__(294); +var _PopoverAnimationVertical = __webpack_require__(299); var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical); -var _keycode = __webpack_require__(31); +var _keycode = __webpack_require__(27); var _keycode2 = _interopRequireDefault(_keycode); -var _events = __webpack_require__(143); +var _events = __webpack_require__(148); var _events2 = _interopRequireDefault(_events); -var _IconButton = __webpack_require__(83); +var _IconButton = __webpack_require__(72); var _IconButton2 = _interopRequireDefault(_IconButton); @@ -59951,7 +59495,7 @@ exports.default = DropDownMenu; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 733 */ +/* 707 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59965,11 +59509,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(28); +var _pure = __webpack_require__(22); var _pure2 = _interopRequireDefault(_pure); -var _SvgIcon = __webpack_require__(29); +var _SvgIcon = __webpack_require__(23); var _SvgIcon2 = _interopRequireDefault(_SvgIcon); @@ -59989,7 +59533,7 @@ NavigationArrowDropDown.muiName = 'SvgIcon'; exports.default = NavigationArrowDropDown; /***/ }), -/* 734 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60011,7 +59555,7 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _BeforeAfterWrapper = __webpack_require__(735); +var _BeforeAfterWrapper = __webpack_require__(709); var _BeforeAfterWrapper2 = _interopRequireDefault(_BeforeAfterWrapper); @@ -60058,7 +59602,7 @@ exports.default = ClearFix; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 735 */ +/* 709 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60215,7 +59759,7 @@ exports.default = BeforeAfterWrapper; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 736 */ +/* 710 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60227,15 +59771,15 @@ Object.defineProperty(exports, "__esModule", { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _Slider = __webpack_require__(737); +var _Slider = __webpack_require__(711); var _Slider2 = _interopRequireDefault(_Slider); -var _createComponent = __webpack_require__(40); +var _createComponent = __webpack_require__(39); var _createComponent2 = _interopRequireDefault(_createComponent); -var _mapError = __webpack_require__(59); +var _mapError = __webpack_require__(63); var _mapError2 = _interopRequireDefault(_mapError); @@ -60263,7 +59807,7 @@ exports.default = (0, _createComponent2.default)(_Slider2.default, function (_re }); /***/ }), -/* 737 */ +/* 711 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60274,7 +59818,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _Slider = __webpack_require__(738); +var _Slider = __webpack_require__(712); var _Slider2 = _interopRequireDefault(_Slider); @@ -60283,7 +59827,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.default = _Slider2.default; /***/ }), -/* 738 */ +/* 712 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60321,7 +59865,7 @@ var _inherits2 = __webpack_require__(6); var _inherits3 = _interopRequireDefault(_inherits2); -var _defineProperty2 = __webpack_require__(739); +var _defineProperty2 = __webpack_require__(713); var _defineProperty3 = _interopRequireDefault(_defineProperty2); @@ -60333,7 +59877,7 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _keycode = __webpack_require__(31); +var _keycode = __webpack_require__(27); var _keycode2 = _interopRequireDefault(_keycode); @@ -60345,11 +59889,11 @@ var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _FocusRipple = __webpack_require__(144); +var _FocusRipple = __webpack_require__(149); var _FocusRipple2 = _interopRequireDefault(_FocusRipple); -var _deprecatedPropType = __webpack_require__(740); +var _deprecatedPropType = __webpack_require__(714); var _deprecatedPropType2 = _interopRequireDefault(_deprecatedPropType); @@ -61138,7 +60682,7 @@ exports.default = Slider; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 739 */ +/* 713 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61146,7 +60690,7 @@ exports.default = Slider; exports.__esModule = true; -var _defineProperty = __webpack_require__(137); +var _defineProperty = __webpack_require__(144); var _defineProperty2 = _interopRequireDefault(_defineProperty); @@ -61168,7 +60712,7 @@ exports.default = function (obj, key, value) { }; /***/ }), -/* 740 */ +/* 714 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61213,7 +60757,7 @@ function deprecated(validator, reason) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 741 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61223,15 +60767,15 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _TextField = __webpack_require__(88); +var _TextField = __webpack_require__(89); var _TextField2 = _interopRequireDefault(_TextField); -var _createComponent = __webpack_require__(40); +var _createComponent = __webpack_require__(39); var _createComponent2 = _interopRequireDefault(_createComponent); -var _mapError = __webpack_require__(59); +var _mapError = __webpack_require__(63); var _mapError2 = _interopRequireDefault(_mapError); @@ -61247,7 +60791,7 @@ exports.default = (0, _createComponent2.default)(_TextField2.default, function ( }); /***/ }), -/* 742 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61259,15 +60803,15 @@ Object.defineProperty(exports, "__esModule", { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _TimePicker = __webpack_require__(743); +var _TimePicker = __webpack_require__(717); var _TimePicker2 = _interopRequireDefault(_TimePicker); -var _createComponent = __webpack_require__(40); +var _createComponent = __webpack_require__(39); var _createComponent2 = _interopRequireDefault(_createComponent); -var _mapError = __webpack_require__(59); +var _mapError = __webpack_require__(63); var _mapError2 = _interopRequireDefault(_mapError); @@ -61294,7 +60838,7 @@ exports.default = (0, _createComponent2.default)(_TimePicker2.default, function }); /***/ }), -/* 743 */ +/* 717 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61305,7 +60849,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _TimePicker = __webpack_require__(744); +var _TimePicker = __webpack_require__(718); var _TimePicker2 = _interopRequireDefault(_TimePicker); @@ -61314,7 +60858,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.default = _TimePicker2.default; /***/ }), -/* 744 */ +/* 718 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61360,15 +60904,15 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _TimePickerDialog = __webpack_require__(745); +var _TimePickerDialog = __webpack_require__(719); var _TimePickerDialog2 = _interopRequireDefault(_TimePickerDialog); -var _TextField = __webpack_require__(88); +var _TextField = __webpack_require__(89); var _TextField2 = _interopRequireDefault(_TextField); -var _timeUtils = __webpack_require__(89); +var _timeUtils = __webpack_require__(90); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -61614,7 +61158,7 @@ exports.default = TimePicker; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 745 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61660,23 +61204,23 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactEventListener = __webpack_require__(58); +var _reactEventListener = __webpack_require__(61); var _reactEventListener2 = _interopRequireDefault(_reactEventListener); -var _keycode = __webpack_require__(31); +var _keycode = __webpack_require__(27); var _keycode2 = _interopRequireDefault(_keycode); -var _Clock = __webpack_require__(746); +var _Clock = __webpack_require__(720); var _Clock2 = _interopRequireDefault(_Clock); -var _Dialog = __webpack_require__(293); +var _Dialog = __webpack_require__(191); var _Dialog2 = _interopRequireDefault(_Dialog); -var _FlatButton = __webpack_require__(292); +var _FlatButton = __webpack_require__(189); var _FlatButton2 = _interopRequireDefault(_FlatButton); @@ -61824,7 +61368,7 @@ exports.default = TimePickerDialog; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 746 */ +/* 720 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61858,15 +61402,15 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _TimeDisplay = __webpack_require__(747); +var _TimeDisplay = __webpack_require__(721); var _TimeDisplay2 = _interopRequireDefault(_TimeDisplay); -var _ClockHours = __webpack_require__(751); +var _ClockHours = __webpack_require__(725); var _ClockHours2 = _interopRequireDefault(_ClockHours); -var _ClockMinutes = __webpack_require__(752); +var _ClockMinutes = __webpack_require__(726); var _ClockMinutes2 = _interopRequireDefault(_ClockMinutes); @@ -62065,7 +61609,7 @@ exports.default = Clock; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 747 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62079,7 +61623,7 @@ var _extends2 = __webpack_require__(8); var _extends3 = _interopRequireDefault(_extends2); -var _slicedToArray2 = __webpack_require__(296); +var _slicedToArray2 = __webpack_require__(301); var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); @@ -62315,38 +61859,280 @@ exports.default = TimeDisplay; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 748 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(749), __esModule: true }; +module.exports = { "default": __webpack_require__(723), __esModule: true }; /***/ }), -/* 749 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(94); -__webpack_require__(72); -module.exports = __webpack_require__(750); - +__webpack_require__(95); +__webpack_require__(74); +module.exports = __webpack_require__(724); /***/ }), -/* 750 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { -var classof = __webpack_require__(134); -var ITERATOR = __webpack_require__(21)('iterator'); -var Iterators = __webpack_require__(63); -module.exports = __webpack_require__(17).isIterable = function (it) { +var classof = __webpack_require__(138) + , ITERATOR = __webpack_require__(20)('iterator') + , Iterators = __webpack_require__(67); +module.exports = __webpack_require__(16).isIterable = function(it){ var O = Object(it); return O[ITERATOR] !== undefined || '@@iterator' in O - // eslint-disable-next-line no-prototype-builtins || Iterators.hasOwnProperty(classof(O)); }; +/***/ }), +/* 725 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _ClockNumber = __webpack_require__(302); + +var _ClockNumber2 = _interopRequireDefault(_ClockNumber); + +var _ClockPointer = __webpack_require__(303); + +var _ClockPointer2 = _interopRequireDefault(_ClockPointer); + +var _timeUtils = __webpack_require__(90); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ClockHours = function (_Component) { + (0, _inherits3.default)(ClockHours, _Component); + + function ClockHours() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClockHours); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockHours.__proto__ || (0, _getPrototypeOf2.default)(ClockHours)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) { + event.preventDefault(); + _this.setClock(event.nativeEvent, true); + }, _this.handleMove = function (event) { + event.preventDefault(); + if (_this.isMousePressed(event) !== 1) return; + _this.setClock(event.nativeEvent, false); + }, _this.handleTouchMove = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], false); + }, _this.handleTouchEnd = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], true); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClockHours, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var clockElement = _reactDom2.default.findDOMNode(this.refs.mask); + + this.center = { + x: clockElement.offsetWidth / 2, + y: clockElement.offsetHeight / 2 + }; + + this.basePoint = { + x: this.center.x, + y: 0 + }; + } + }, { + key: 'isMousePressed', + value: function isMousePressed(event) { + if (typeof event.buttons === 'undefined') { + return event.nativeEvent.which; + } + + return event.buttons; + } + }, { + key: 'setClock', + value: function setClock(event, finish) { + if (typeof event.offsetX === 'undefined') { + var offset = (0, _timeUtils.getTouchEventOffsetValues)(event); + + event.offsetX = offset.offsetX; + event.offsetY = offset.offsetY; + } + + var hours = this.getHours(event.offsetX, event.offsetY); + + this.props.onChange(hours, finish); + } + }, { + key: 'getHours', + value: function getHours(offsetX, offsetY) { + var step = 30; + var x = offsetX - this.center.x; + var y = offsetY - this.center.y; + var cx = this.basePoint.x - this.center.x; + var cy = this.basePoint.y - this.center.y; + + var atan = Math.atan2(cx, cy) - Math.atan2(x, y); + + var deg = (0, _timeUtils.rad2deg)(atan); + deg = Math.round(deg / step) * step; + deg %= 360; + + var value = Math.floor(deg / step) || 0; + + var delta = Math.pow(x, 2) + Math.pow(y, 2); + var distance = Math.sqrt(delta); + + value = value || 12; + if (this.props.format === '24hr') { + if (distance < 90) { + value += 12; + value %= 24; + } + } else { + value %= 12; + } + + return value; + } + }, { + key: 'getSelected', + value: function getSelected() { + var hour = this.props.initialHours; + + if (this.props.format === 'ampm') { + hour %= 12; + hour = hour || 12; + } + + return hour; + } + }, { + key: 'getHourNumbers', + value: function getHourNumbers() { + var _this2 = this; + + var style = { + pointerEvents: 'none' + }; + var hourSize = this.props.format === 'ampm' ? 12 : 24; + + var hours = []; + for (var i = 1; i <= hourSize; i++) { + hours.push(i % 24); + } + + return hours.map(function (hour) { + var isSelected = _this2.getSelected() === hour; + return _react2.default.createElement(_ClockNumber2.default, { + key: hour, + style: style, + isSelected: isSelected, + type: 'hour', + value: hour + }); + }); + } + }, { + key: 'render', + value: function render() { + var styles = { + root: { + height: '100%', + width: '100%', + borderRadius: '100%', + position: 'relative', + pointerEvents: 'none', + boxSizing: 'border-box' + }, + + hitMask: { + height: '100%', + width: '100%', + pointerEvents: 'auto' + } + }; + + var prepareStyles = this.context.muiTheme.prepareStyles; + + var hours = this.getSelected(); + var numbers = this.getHourNumbers(); + + return _react2.default.createElement( + 'div', + { ref: 'clock', style: prepareStyles(styles.root) }, + _react2.default.createElement(_ClockPointer2.default, { hasSelected: true, value: hours, type: 'hour' }), + numbers, + _react2.default.createElement('div', { + ref: 'mask', style: prepareStyles(styles.hitMask), onTouchMove: this.handleTouchMove, + onTouchEnd: this.handleTouchEnd, onMouseUp: this.handleUp, onMouseMove: this.handleMove + }) + ); + } + }]); + return ClockHours; +}(_react.Component); + +ClockHours.defaultProps = { + initialHours: new Date().getHours(), + onChange: function onChange() {}, + format: 'ampm' +}; +ClockHours.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? ClockHours.propTypes = { + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialHours: _react.PropTypes.number, + onChange: _react.PropTypes.func +} : void 0; +exports.default = ClockHours; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 751 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62380,260 +62166,15 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reactDom = __webpack_require__(18); - -var _reactDom2 = _interopRequireDefault(_reactDom); - -var _ClockNumber = __webpack_require__(297); - -var _ClockNumber2 = _interopRequireDefault(_ClockNumber); - -var _ClockPointer = __webpack_require__(298); - -var _ClockPointer2 = _interopRequireDefault(_ClockPointer); - -var _timeUtils = __webpack_require__(89); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var ClockHours = function (_Component) { - (0, _inherits3.default)(ClockHours, _Component); - - function ClockHours() { - var _ref; - - var _temp, _this, _ret; - - (0, _classCallCheck3.default)(this, ClockHours); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockHours.__proto__ || (0, _getPrototypeOf2.default)(ClockHours)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) { - event.preventDefault(); - _this.setClock(event.nativeEvent, true); - }, _this.handleMove = function (event) { - event.preventDefault(); - if (_this.isMousePressed(event) !== 1) return; - _this.setClock(event.nativeEvent, false); - }, _this.handleTouchMove = function (event) { - event.preventDefault(); - _this.setClock(event.changedTouches[0], false); - }, _this.handleTouchEnd = function (event) { - event.preventDefault(); - _this.setClock(event.changedTouches[0], true); - }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); - } - - (0, _createClass3.default)(ClockHours, [{ - key: 'componentDidMount', - value: function componentDidMount() { - var clockElement = _reactDom2.default.findDOMNode(this.refs.mask); - - this.center = { - x: clockElement.offsetWidth / 2, - y: clockElement.offsetHeight / 2 - }; - - this.basePoint = { - x: this.center.x, - y: 0 - }; - } - }, { - key: 'isMousePressed', - value: function isMousePressed(event) { - if (typeof event.buttons === 'undefined') { - return event.nativeEvent.which; - } - - return event.buttons; - } - }, { - key: 'setClock', - value: function setClock(event, finish) { - if (typeof event.offsetX === 'undefined') { - var offset = (0, _timeUtils.getTouchEventOffsetValues)(event); - - event.offsetX = offset.offsetX; - event.offsetY = offset.offsetY; - } - - var hours = this.getHours(event.offsetX, event.offsetY); - - this.props.onChange(hours, finish); - } - }, { - key: 'getHours', - value: function getHours(offsetX, offsetY) { - var step = 30; - var x = offsetX - this.center.x; - var y = offsetY - this.center.y; - var cx = this.basePoint.x - this.center.x; - var cy = this.basePoint.y - this.center.y; - - var atan = Math.atan2(cx, cy) - Math.atan2(x, y); - - var deg = (0, _timeUtils.rad2deg)(atan); - deg = Math.round(deg / step) * step; - deg %= 360; - - var value = Math.floor(deg / step) || 0; - - var delta = Math.pow(x, 2) + Math.pow(y, 2); - var distance = Math.sqrt(delta); - - value = value || 12; - if (this.props.format === '24hr') { - if (distance < 90) { - value += 12; - value %= 24; - } - } else { - value %= 12; - } - - return value; - } - }, { - key: 'getSelected', - value: function getSelected() { - var hour = this.props.initialHours; - - if (this.props.format === 'ampm') { - hour %= 12; - hour = hour || 12; - } - - return hour; - } - }, { - key: 'getHourNumbers', - value: function getHourNumbers() { - var _this2 = this; - - var style = { - pointerEvents: 'none' - }; - var hourSize = this.props.format === 'ampm' ? 12 : 24; - - var hours = []; - for (var i = 1; i <= hourSize; i++) { - hours.push(i % 24); - } - - return hours.map(function (hour) { - var isSelected = _this2.getSelected() === hour; - return _react2.default.createElement(_ClockNumber2.default, { - key: hour, - style: style, - isSelected: isSelected, - type: 'hour', - value: hour - }); - }); - } - }, { - key: 'render', - value: function render() { - var styles = { - root: { - height: '100%', - width: '100%', - borderRadius: '100%', - position: 'relative', - pointerEvents: 'none', - boxSizing: 'border-box' - }, - - hitMask: { - height: '100%', - width: '100%', - pointerEvents: 'auto' - } - }; - - var prepareStyles = this.context.muiTheme.prepareStyles; - - var hours = this.getSelected(); - var numbers = this.getHourNumbers(); - - return _react2.default.createElement( - 'div', - { ref: 'clock', style: prepareStyles(styles.root) }, - _react2.default.createElement(_ClockPointer2.default, { hasSelected: true, value: hours, type: 'hour' }), - numbers, - _react2.default.createElement('div', { - ref: 'mask', style: prepareStyles(styles.hitMask), onTouchMove: this.handleTouchMove, - onTouchEnd: this.handleTouchEnd, onMouseUp: this.handleUp, onMouseMove: this.handleMove - }) - ); - } - }]); - return ClockHours; -}(_react.Component); - -ClockHours.defaultProps = { - initialHours: new Date().getHours(), - onChange: function onChange() {}, - format: 'ampm' -}; -ClockHours.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired -}; -process.env.NODE_ENV !== "production" ? ClockHours.propTypes = { - format: _react.PropTypes.oneOf(['ampm', '24hr']), - initialHours: _react.PropTypes.number, - onChange: _react.PropTypes.func -} : void 0; -exports.default = ClockHours; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - -/***/ }), -/* 752 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _getPrototypeOf = __webpack_require__(4); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(2); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(3); - -var _createClass3 = _interopRequireDefault(_createClass2); - -var _possibleConstructorReturn2 = __webpack_require__(5); - -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); - -var _inherits2 = __webpack_require__(6); - -var _inherits3 = _interopRequireDefault(_inherits2); - -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); - -var _ClockNumber = __webpack_require__(297); +var _ClockNumber = __webpack_require__(302); var _ClockNumber2 = _interopRequireDefault(_ClockNumber); -var _ClockPointer = __webpack_require__(298); +var _ClockPointer = __webpack_require__(303); var _ClockPointer2 = _interopRequireDefault(_ClockPointer); -var _timeUtils = __webpack_require__(89); +var _timeUtils = __webpack_require__(90); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -62809,7 +62350,7 @@ exports.default = ClockMinutes; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 753 */ +/* 727 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62821,11 +62362,11 @@ Object.defineProperty(exports, "__esModule", { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _Toggle = __webpack_require__(754); +var _Toggle = __webpack_require__(304); var _Toggle2 = _interopRequireDefault(_Toggle); -var _createComponent = __webpack_require__(40); +var _createComponent = __webpack_require__(39); var _createComponent2 = _interopRequireDefault(_createComponent); @@ -62849,27 +62390,7 @@ exports.default = (0, _createComponent2.default)(_Toggle2.default, function (_re }); /***/ }), -/* 754 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = undefined; - -var _Toggle = __webpack_require__(755); - -var _Toggle2 = _interopRequireDefault(_Toggle); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _Toggle2.default; - -/***/ }), -/* 755 */ +/* 728 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62919,11 +62440,11 @@ var _transitions = __webpack_require__(12); var _transitions2 = _interopRequireDefault(_transitions); -var _Paper = __webpack_require__(39); +var _Paper = __webpack_require__(38); var _Paper2 = _interopRequireDefault(_Paper); -var _EnhancedSwitch = __webpack_require__(184); +var _EnhancedSwitch = __webpack_require__(188); var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); @@ -63202,7 +62723,7 @@ exports.default = Toggle; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 756 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, module) {/** @@ -65372,51 +64893,2085 @@ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); }); -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = merge; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(49), __webpack_require__(257)(module))) + +/***/ }), +/* 730 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = __webpack_require__(42); + +var _typeof3 = _interopRequireDefault(_typeof2); + +exports.default = function (muiTheme) { + var isClient = typeof navigator !== 'undefined'; + var userAgent = muiTheme.userAgent; + + if (userAgent === undefined && isClient) { + userAgent = navigator.userAgent; + } + + if (userAgent === undefined && !hasWarnedAboutUserAgent) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: userAgent should be supplied in the muiTheme context\n for server-side rendering.') : void 0; + + hasWarnedAboutUserAgent = true; + } + + if (userAgent === false) { + // Disabled autoprefixer + return null; + } else if (userAgent === 'all' || userAgent === undefined) { + // Prefix for all user agent + return function (style) { + var isFlex = ['flex', 'inline-flex'].indexOf(style.display) !== -1; + var stylePrefixed = _inlineStylePrefixer2.default.prefixAll(style); + + if (isFlex) { + var display = stylePrefixed.display; + if (isClient) { + // We can't apply this join with react-dom: + // #https://github.com/facebook/react/issues/6467 + stylePrefixed.display = display[display.length - 1]; + } else { + stylePrefixed.display = display.join('; display: '); + } + } + + return stylePrefixed; + }; + } else { + var _ret = function () { + var prefixer = new _inlineStylePrefixer2.default({ + userAgent: userAgent + }); + + return { + v: function v(style) { + return prefixer.prefix(style); + } + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + } +}; + +var _inlineStylePrefixer = __webpack_require__(731); + +var _inlineStylePrefixer2 = _interopRequireDefault(_inlineStylePrefixer); + +var _warning = __webpack_require__(26); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var hasWarnedAboutUserAgent = false; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 731 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +// special flexbox specifications + + +var _prefixAll2 = __webpack_require__(732); + +var _prefixAll3 = _interopRequireDefault(_prefixAll2); + +var _getBrowserInformation = __webpack_require__(743); + +var _getBrowserInformation2 = _interopRequireDefault(_getBrowserInformation); + +var _getPrefixedKeyframes = __webpack_require__(746); + +var _getPrefixedKeyframes2 = _interopRequireDefault(_getPrefixedKeyframes); + +var _capitalizeString = __webpack_require__(193); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _sortPrefixedStyle = __webpack_require__(308); + +var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); + +var _prefixProps = __webpack_require__(747); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +var _position = __webpack_require__(748); + +var _position2 = _interopRequireDefault(_position); + +var _calc = __webpack_require__(749); + +var _calc2 = _interopRequireDefault(_calc); + +var _zoomCursor = __webpack_require__(750); + +var _zoomCursor2 = _interopRequireDefault(_zoomCursor); + +var _grabCursor = __webpack_require__(751); + +var _grabCursor2 = _interopRequireDefault(_grabCursor); + +var _flex = __webpack_require__(752); + +var _flex2 = _interopRequireDefault(_flex); + +var _sizing = __webpack_require__(753); + +var _sizing2 = _interopRequireDefault(_sizing); + +var _gradient = __webpack_require__(754); + +var _gradient2 = _interopRequireDefault(_gradient); + +var _transition = __webpack_require__(755); + +var _transition2 = _interopRequireDefault(_transition); + +var _flexboxIE = __webpack_require__(757); + +var _flexboxIE2 = _interopRequireDefault(_flexboxIE); + +var _flexboxOld = __webpack_require__(758); + +var _flexboxOld2 = _interopRequireDefault(_flexboxOld); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var plugins = [_position2.default, _calc2.default, _zoomCursor2.default, _grabCursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, +// this must be run AFTER the flexbox specs +_flex2.default]; + +var Prefixer = function () { + /** + * Instantiante a new prefixer + * @param {string} userAgent - userAgent to gather prefix information according to caniuse.com + * @param {string} keepUnprefixed - keeps unprefixed properties and values + */ + + function Prefixer() { + var _this = this; + + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + _classCallCheck(this, Prefixer); + + var defaultUserAgent = typeof navigator !== 'undefined' ? navigator.userAgent : undefined; + + this._userAgent = options.userAgent || defaultUserAgent; + this._keepUnprefixed = options.keepUnprefixed || false; + + this._browserInfo = (0, _getBrowserInformation2.default)(this._userAgent); + + // Checks if the userAgent was resolved correctly + if (this._browserInfo && this._browserInfo.prefix) { + // set additional prefix information + this.cssPrefix = this._browserInfo.prefix.css; + this.jsPrefix = this._browserInfo.prefix.inline; + this.prefixedKeyframes = (0, _getPrefixedKeyframes2.default)(this._browserInfo); + } else { + this._usePrefixAllFallback = true; + return false; + } + + var data = this._browserInfo.browser && _prefixProps2.default[this._browserInfo.browser]; + if (data) { + this._requiresPrefix = Object.keys(data).filter(function (key) { + return data[key] >= _this._browserInfo.version; + }).reduce(function (result, name) { + result[name] = true; + return result; + }, {}); + this._hasPropsRequiringPrefix = Object.keys(this._requiresPrefix).length > 0; + } else { + this._usePrefixAllFallback = true; + } + } + + /** + * Returns a prefixed version of the style object + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ + + + _createClass(Prefixer, [{ + key: 'prefix', + value: function prefix(styles) { + var _this2 = this; + + // use prefixAll as fallback if userAgent can not be resolved + if (this._usePrefixAllFallback) { + return (0, _prefixAll3.default)(styles); + } + + // only add prefixes if needed + if (!this._hasPropsRequiringPrefix) { + return styles; + } + + Object.keys(styles).forEach(function (property) { + var value = styles[property]; + if (value instanceof Object && !Array.isArray(value)) { + // recurse through nested style objects + styles[property] = _this2.prefix(value); + } else { + // add prefixes if needed + if (_this2._requiresPrefix[property]) { + styles[_this2.jsPrefix + (0, _capitalizeString2.default)(property)] = value; + if (!_this2._keepUnprefixed) { + delete styles[property]; + } + } + } + }); + + Object.keys(styles).forEach(function (property) { + [].concat(styles[property]).forEach(function (value) { + // resolve plugins + plugins.forEach(function (plugin) { + // generates a new plugin interface with current data + assignStyles(styles, plugin({ + property: property, + value: value, + styles: styles, + browserInfo: _this2._browserInfo, + prefix: { + js: _this2.jsPrefix, + css: _this2.cssPrefix, + keyframes: _this2.prefixedKeyframes + }, + keepUnprefixed: _this2._keepUnprefixed, + requiresPrefix: _this2._requiresPrefix + }), value, _this2._keepUnprefixed); + }); + }); + }); + + return (0, _sortPrefixedStyle2.default)(styles); + } + + /** + * Returns a prefixed version of the style object using all vendor prefixes + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ + + }], [{ + key: 'prefixAll', + value: function prefixAll(styles) { + return (0, _prefixAll3.default)(styles); + } + }]); + + return Prefixer; +}(); + +exports.default = Prefixer; + + +function assignStyles(base) { + var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var value = arguments[2]; + var keepUnprefixed = arguments[3]; + + Object.keys(extend).forEach(function (property) { + var baseValue = base[property]; + if (Array.isArray(baseValue)) { + [].concat(extend[property]).forEach(function (val) { + if (base[property].indexOf(val) === -1) { + base[property].splice(baseValue.indexOf(value), keepUnprefixed ? 0 : 1, val); + } + }); + } else { + base[property] = extend[property]; + } + }); +} +module.exports = exports['default']; + +/***/ }), +/* 732 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = prefixAll; + +var _prefixProps = __webpack_require__(307); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +var _capitalizeString = __webpack_require__(193); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _sortPrefixedStyle = __webpack_require__(308); + +var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); + +var _position = __webpack_require__(734); + +var _position2 = _interopRequireDefault(_position); + +var _calc = __webpack_require__(735); + +var _calc2 = _interopRequireDefault(_calc); + +var _cursor = __webpack_require__(736); + +var _cursor2 = _interopRequireDefault(_cursor); + +var _flex = __webpack_require__(737); + +var _flex2 = _interopRequireDefault(_flex); + +var _sizing = __webpack_require__(738); + +var _sizing2 = _interopRequireDefault(_sizing); + +var _gradient = __webpack_require__(739); + +var _gradient2 = _interopRequireDefault(_gradient); + +var _transition = __webpack_require__(740); + +var _transition2 = _interopRequireDefault(_transition); + +var _flexboxIE = __webpack_require__(741); + +var _flexboxIE2 = _interopRequireDefault(_flexboxIE); + +var _flexboxOld = __webpack_require__(742); + +var _flexboxOld2 = _interopRequireDefault(_flexboxOld); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// special flexbox specifications + + +var plugins = [_position2.default, _calc2.default, _cursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, _flex2.default]; + +/** + * Returns a prefixed version of the style object using all vendor prefixes + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ +function prefixAll(styles) { + Object.keys(styles).forEach(function (property) { + var value = styles[property]; + if (value instanceof Object && !Array.isArray(value)) { + // recurse through nested style objects + styles[property] = prefixAll(value); + } else { + Object.keys(_prefixProps2.default).forEach(function (prefix) { + var properties = _prefixProps2.default[prefix]; + // add prefixes if needed + if (properties[property]) { + styles[prefix + (0, _capitalizeString2.default)(property)] = value; + } + }); + } + }); + + Object.keys(styles).forEach(function (property) { + [].concat(styles[property]).forEach(function (value, index) { + // resolve every special plugins + plugins.forEach(function (plugin) { + return assignStyles(styles, plugin(property, value)); + }); + }); + }); + + return (0, _sortPrefixedStyle2.default)(styles); +} + +function assignStyles(base) { + var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + Object.keys(extend).forEach(function (property) { + var baseValue = base[property]; + if (Array.isArray(baseValue)) { + [].concat(extend[property]).forEach(function (value) { + var valueIndex = baseValue.indexOf(value); + if (valueIndex > -1) { + base[property].splice(valueIndex, 1); + } + base[property].push(value); + }); + } else { + base[property] = extend[property]; + } + }); +} +module.exports = exports['default']; + +/***/ }), +/* 733 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (property) { + return property.match(/^(Webkit|Moz|O|ms)/) !== null; +}; + +module.exports = exports["default"]; + +/***/ }), +/* 734 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = position; +function position(property, value) { + if (property === 'position' && value === 'sticky') { + return { position: ['-webkit-sticky', 'sticky'] }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 735 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = calc; + +var _joinPrefixedValue = __webpack_require__(123); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +var _isPrefixedValue = __webpack_require__(194); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function calc(property, value) { + if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('calc(') > -1) { + return (0, _joinPrefixedValue2.default)(property, value, function (prefix, value) { + return value.replace(/calc\(/g, prefix + 'calc('); + }); + } +} +module.exports = exports['default']; + +/***/ }), +/* 736 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cursor; + +var _joinPrefixedValue = __webpack_require__(123); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { + 'zoom-in': true, + 'zoom-out': true, + grab: true, + grabbing: true +}; + +function cursor(property, value) { + if (property === 'cursor' && values[value]) { + return (0, _joinPrefixedValue2.default)(property, value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 737 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flex; +var values = { flex: true, 'inline-flex': true }; + +function flex(property, value) { + if (property === 'display' && values[value]) { + return { + display: ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value] + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 738 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sizing; + +var _joinPrefixedValue = __webpack_require__(123); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var properties = { + maxHeight: true, + maxWidth: true, + width: true, + height: true, + columnWidth: true, + minWidth: true, + minHeight: true +}; +var values = { + 'min-content': true, + 'max-content': true, + 'fill-available': true, + 'fit-content': true, + 'contain-floats': true +}; + +function sizing(property, value) { + if (properties[property] && values[value]) { + return (0, _joinPrefixedValue2.default)(property, value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 739 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gradient; + +var _joinPrefixedValue = __webpack_require__(123); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +var _isPrefixedValue = __webpack_require__(194); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; + +function gradient(property, value) { + if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.match(values) !== null) { + return (0, _joinPrefixedValue2.default)(property, value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 740 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = transition; + +var _hyphenateStyleName = __webpack_require__(309); + +var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); + +var _capitalizeString = __webpack_require__(193); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _isPrefixedValue = __webpack_require__(194); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +var _prefixProps = __webpack_require__(307); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { + transition: true, + transitionProperty: true, + WebkitTransition: true, + WebkitTransitionProperty: true +}; + +function transition(property, value) { + // also check for already prefixed transitions + if (typeof value === 'string' && properties[property]) { + var _ref2; + + var outputValue = prefixValue(value); + var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (value) { + return value.match(/-moz-|-ms-/) === null; + }).join(','); + + // if the property is already prefixed + if (property.indexOf('Webkit') > -1) { + return _defineProperty({}, property, webkitOutput); + } + + return _ref2 = {}, _defineProperty(_ref2, 'Webkit' + (0, _capitalizeString2.default)(property), webkitOutput), _defineProperty(_ref2, property, outputValue), _ref2; + } +} + +function prefixValue(value) { + if ((0, _isPrefixedValue2.default)(value)) { + return value; + } + + // only split multi values, not cubic beziers + var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); + + // iterate each single value and check for transitioned properties + // that need to be prefixed as well + multipleValues.forEach(function (val, index) { + multipleValues[index] = Object.keys(_prefixProps2.default).reduce(function (out, prefix) { + var dashCasePrefix = '-' + prefix.toLowerCase() + '-'; + + Object.keys(_prefixProps2.default[prefix]).forEach(function (prop) { + var dashCaseProperty = (0, _hyphenateStyleName2.default)(prop); + + if (val.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') { + // join all prefixes and create a new value + out = val.replace(dashCaseProperty, dashCasePrefix + dashCaseProperty) + ',' + out; + } + }); + return out; + }, val); + }); + + return multipleValues.join(','); +} +module.exports = exports['default']; + +/***/ }), +/* 741 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxIE; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'distribute', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end' +}; +var alternativeProps = { + alignContent: 'msFlexLinePack', + alignSelf: 'msFlexItemAlign', + alignItems: 'msFlexAlign', + justifyContent: 'msFlexPack', + order: 'msFlexOrder', + flexGrow: 'msFlexPositive', + flexShrink: 'msFlexNegative', + flexBasis: 'msPreferredSize' +}; + +function flexboxIE(property, value) { + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 742 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxOld; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'justify', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + 'wrap-reverse': 'multiple', + wrap: 'multiple' +}; + +var alternativeProps = { + alignItems: 'WebkitBoxAlign', + justifyContent: 'WebkitBoxPack', + flexWrap: 'WebkitBoxLines' +}; + +function flexboxOld(property, value) { + if (property === 'flexDirection' && typeof value === 'string') { + return { + WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', + WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 743 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _bowser = __webpack_require__(744); + +var _bowser2 = _interopRequireDefault(_bowser); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var vendorPrefixes = { + Webkit: ['chrome', 'safari', 'ios', 'android', 'phantom', 'opera', 'webos', 'blackberry', 'bada', 'tizen', 'chromium', 'vivaldi'], + Moz: ['firefox', 'seamonkey', 'sailfish'], + ms: ['msie', 'msedge'] +}; +var browsers = { + chrome: [['chrome'], ['chromium']], + safari: [['safari']], + firefox: [['firefox']], + edge: [['msedge']], + opera: [['opera'], ['vivaldi']], + ios_saf: [['ios', 'mobile'], ['ios', 'tablet']], + ie: [['msie']], + op_mini: [['opera', 'mobile'], ['opera', 'tablet']], + and_uc: [['android', 'mobile'], ['android', 'tablet']], + android: [['android', 'mobile'], ['android', 'tablet']] +}; + +var browserByInfo = function browserByInfo(info) { + if (info.firefox) { + return 'firefox'; + } + var name = ''; + + Object.keys(browsers).forEach(function (browser) { + browsers[browser].forEach(function (condition) { + var match = 0; + condition.forEach(function (single) { + if (info[single]) { + match += 1; + } + }); + if (condition.length === match) { + name = browser; + } + }); + }); + + return name; +}; + +/** + * Uses bowser to get default browser information such as version and name + * Evaluates bowser info and adds vendorPrefix information + * @param {string} userAgent - userAgent that gets evaluated + */ + +exports.default = function (userAgent) { + if (!userAgent) { + return false; + } + var info = _bowser2.default._detect(userAgent); + + Object.keys(vendorPrefixes).forEach(function (prefix) { + vendorPrefixes[prefix].forEach(function (browser) { + if (info[browser]) { + info.prefix = { + inline: prefix, + css: '-' + prefix.toLowerCase() + '-' + }; + } + }); + }); + + info.browser = browserByInfo(info); + + // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN + info.version = info.version ? parseFloat(info.version) : parseInt(parseFloat(info.osversion), 10); + info.osversion = parseFloat(info.osversion); + + // iOS forces all browsers to use Safari under the hood + // as the Safari version seems to match the iOS version + // we just explicitely use the osversion instead + // https://github.com/rofrischmann/inline-style-prefixer/issues/72 + if (info.browser === 'ios_saf' && info.version > info.osversion) { + info.version = info.osversion; + info.safari = true; + } + + // seperate native android chrome + // https://github.com/rofrischmann/inline-style-prefixer/issues/45 + if (info.browser === 'android' && info.chrome && info.version > 37) { + info.browser = 'and_chr'; + } + + // For android < 4.4 we want to check the osversion + // not the chrome version, see issue #26 + // https://github.com/rofrischmann/inline-style-prefixer/issues/26 + if (info.browser === 'android' && info.osversion < 5) { + info.version = info.osversion; + } + + return info; +}; + +module.exports = exports['default']; + +/***/ }), +/* 744 */ +/***/ (function(module, exports, __webpack_require__) { + +/*! + * Bowser - a browser detector + * https://github.com/ded/bowser + * MIT License | (c) Dustin Diaz 2015 + */ + +!function (root, name, definition) { + if (typeof module != 'undefined' && module.exports) module.exports = definition() + else if (true) __webpack_require__(745)(name, definition) + else root[name] = definition() +}(this, 'bowser', function () { + /** + * See useragents.js for examples of navigator.userAgent + */ + + var t = true + + function detect(ua) { + + function getFirstMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[1]) || ''; + } + + function getSecondMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[2]) || ''; + } + + var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase() + , likeAndroid = /like android/i.test(ua) + , android = !likeAndroid && /android/i.test(ua) + , nexusMobile = /nexus\s*[0-6]\s*/i.test(ua) + , nexusTablet = !nexusMobile && /nexus\s*[0-9]+/i.test(ua) + , chromeos = /CrOS/.test(ua) + , silk = /silk/i.test(ua) + , sailfish = /sailfish/i.test(ua) + , tizen = /tizen/i.test(ua) + , webos = /(web|hpw)os/i.test(ua) + , windowsphone = /windows phone/i.test(ua) + , samsungBrowser = /SamsungBrowser/i.test(ua) + , windows = !windowsphone && /windows/i.test(ua) + , mac = !iosdevice && !silk && /macintosh/i.test(ua) + , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua) + , edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i) + , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i) + , tablet = /tablet/i.test(ua) + , mobile = !tablet && /[^-]mobi/i.test(ua) + , xbox = /xbox/i.test(ua) + , result + + if (/opera/i.test(ua)) { + // an old Opera + result = { + name: 'Opera' + , opera: t + , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i) + } + } else if (/opr|opios/i.test(ua)) { + // a new Opera + result = { + name: 'Opera' + , opera: t + , version: getFirstMatch(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i) || versionIdentifier + } + } + else if (/SamsungBrowser/i.test(ua)) { + result = { + name: 'Samsung Internet for Android' + , samsungBrowser: t + , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/coast/i.test(ua)) { + result = { + name: 'Opera Coast' + , coast: t + , version: versionIdentifier || getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/yabrowser/i.test(ua)) { + result = { + name: 'Yandex Browser' + , yandexbrowser: t + , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/ucbrowser/i.test(ua)) { + result = { + name: 'UC Browser' + , ucbrowser: t + , version: getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/mxios/i.test(ua)) { + result = { + name: 'Maxthon' + , maxthon: t + , version: getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/epiphany/i.test(ua)) { + result = { + name: 'Epiphany' + , epiphany: t + , version: getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/puffin/i.test(ua)) { + result = { + name: 'Puffin' + , puffin: t + , version: getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i) + } + } + else if (/sleipnir/i.test(ua)) { + result = { + name: 'Sleipnir' + , sleipnir: t + , version: getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/k-meleon/i.test(ua)) { + result = { + name: 'K-Meleon' + , kMeleon: t + , version: getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (windowsphone) { + result = { + name: 'Windows Phone' + , windowsphone: t + } + if (edgeVersion) { + result.msedge = t + result.version = edgeVersion + } + else { + result.msie = t + result.version = getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i) + } + } + else if (/msie|trident/i.test(ua)) { + result = { + name: 'Internet Explorer' + , msie: t + , version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i) + } + } else if (chromeos) { + result = { + name: 'Chrome' + , chromeos: t + , chromeBook: t + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } else if (/chrome.+? edge/i.test(ua)) { + result = { + name: 'Microsoft Edge' + , msedge: t + , version: edgeVersion + } + } + else if (/vivaldi/i.test(ua)) { + result = { + name: 'Vivaldi' + , vivaldi: t + , version: getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i) || versionIdentifier + } + } + else if (sailfish) { + result = { + name: 'Sailfish' + , sailfish: t + , version: getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i) + } + } + else if (/seamonkey\//i.test(ua)) { + result = { + name: 'SeaMonkey' + , seamonkey: t + , version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i) + } + } + else if (/firefox|iceweasel|fxios/i.test(ua)) { + result = { + name: 'Firefox' + , firefox: t + , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i) + } + if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) { + result.firefoxos = t + } + } + else if (silk) { + result = { + name: 'Amazon Silk' + , silk: t + , version : getFirstMatch(/silk\/(\d+(\.\d+)?)/i) + } + } + else if (/phantom/i.test(ua)) { + result = { + name: 'PhantomJS' + , phantom: t + , version: getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i) + } + } + else if (/slimerjs/i.test(ua)) { + result = { + name: 'SlimerJS' + , slimer: t + , version: getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i) + } + } + else if (/blackberry|\bbb\d+/i.test(ua) || /rim\stablet/i.test(ua)) { + result = { + name: 'BlackBerry' + , blackberry: t + , version: versionIdentifier || getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i) + } + } + else if (webos) { + result = { + name: 'WebOS' + , webos: t + , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i) + }; + /touchpad\//i.test(ua) && (result.touchpad = t) + } + else if (/bada/i.test(ua)) { + result = { + name: 'Bada' + , bada: t + , version: getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i) + }; + } + else if (tizen) { + result = { + name: 'Tizen' + , tizen: t + , version: getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || versionIdentifier + }; + } + else if (/qupzilla/i.test(ua)) { + result = { + name: 'QupZilla' + , qupzilla: t + , version: getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || versionIdentifier + } + } + else if (/chromium/i.test(ua)) { + result = { + name: 'Chromium' + , chromium: t + , version: getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || versionIdentifier + } + } + else if (/chrome|crios|crmo/i.test(ua)) { + result = { + name: 'Chrome' + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } + else if (android) { + result = { + name: 'Android' + , version: versionIdentifier + } + } + else if (/safari|applewebkit/i.test(ua)) { + result = { + name: 'Safari' + , safari: t + } + if (versionIdentifier) { + result.version = versionIdentifier + } + } + else if (iosdevice) { + result = { + name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod' + } + // WTF: version is not part of user agent in web apps + if (versionIdentifier) { + result.version = versionIdentifier + } + } + else if(/googlebot/i.test(ua)) { + result = { + name: 'Googlebot' + , googlebot: t + , version: getFirstMatch(/googlebot\/(\d+(\.\d+))/i) || versionIdentifier + } + } + else { + result = { + name: getFirstMatch(/^(.*)\/(.*) /), + version: getSecondMatch(/^(.*)\/(.*) /) + }; + } + + // set webkit or gecko flag for browsers based on these engines + if (!result.msedge && /(apple)?webkit/i.test(ua)) { + if (/(apple)?webkit\/537\.36/i.test(ua)) { + result.name = result.name || "Blink" + result.blink = t + } else { + result.name = result.name || "Webkit" + result.webkit = t + } + if (!result.version && versionIdentifier) { + result.version = versionIdentifier + } + } else if (!result.opera && /gecko\//i.test(ua)) { + result.name = result.name || "Gecko" + result.gecko = t + result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i) + } + + // set OS flags for platforms that have multiple browsers + if (!result.windowsphone && !result.msedge && (android || result.silk)) { + result.android = t + } else if (!result.windowsphone && !result.msedge && iosdevice) { + result[iosdevice] = t + result.ios = t + } else if (mac) { + result.mac = t + } else if (xbox) { + result.xbox = t + } else if (windows) { + result.windows = t + } else if (linux) { + result.linux = t + } + + // OS version extraction + var osVersion = ''; + if (result.windowsphone) { + osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i); + } else if (iosdevice) { + osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i); + osVersion = osVersion.replace(/[_\s]/g, '.'); + } else if (android) { + osVersion = getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i); + } else if (result.webos) { + osVersion = getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i); + } else if (result.blackberry) { + osVersion = getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i); + } else if (result.bada) { + osVersion = getFirstMatch(/bada\/(\d+(\.\d+)*)/i); + } else if (result.tizen) { + osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i); + } + if (osVersion) { + result.osversion = osVersion; + } + + // device type extraction + var osMajorVersion = osVersion.split('.')[0]; + if ( + tablet + || nexusTablet + || iosdevice == 'ipad' + || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile))) + || result.silk + ) { + result.tablet = t + } else if ( + mobile + || iosdevice == 'iphone' + || iosdevice == 'ipod' + || android + || nexusMobile + || result.blackberry + || result.webos + || result.bada + ) { + result.mobile = t + } + + // Graded Browser Support + // http://developer.yahoo.com/yui/articles/gbs + if (result.msedge || + (result.msie && result.version >= 10) || + (result.yandexbrowser && result.version >= 15) || + (result.vivaldi && result.version >= 1.0) || + (result.chrome && result.version >= 20) || + (result.samsungBrowser && result.version >= 4) || + (result.firefox && result.version >= 20.0) || + (result.safari && result.version >= 6) || + (result.opera && result.version >= 10.0) || + (result.ios && result.osversion && result.osversion.split(".")[0] >= 6) || + (result.blackberry && result.version >= 10.1) + || (result.chromium && result.version >= 20) + ) { + result.a = t; + } + else if ((result.msie && result.version < 10) || + (result.chrome && result.version < 20) || + (result.firefox && result.version < 20.0) || + (result.safari && result.version < 6) || + (result.opera && result.version < 10.0) || + (result.ios && result.osversion && result.osversion.split(".")[0] < 6) + || (result.chromium && result.version < 20) + ) { + result.c = t + } else result.x = t + + return result + } + + var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '') + + bowser.test = function (browserList) { + for (var i = 0; i < browserList.length; ++i) { + var browserItem = browserList[i]; + if (typeof browserItem=== 'string') { + if (browserItem in bowser) { + return true; + } + } + } + return false; + } + + /** + * Get version precisions count + * + * @example + * getVersionPrecision("1.10.3") // 3 + * + * @param {string} version + * @return {number} + */ + function getVersionPrecision(version) { + return version.split(".").length; + } + + /** + * Array::map polyfill + * + * @param {Array} arr + * @param {Function} iterator + * @return {Array} + */ + function map(arr, iterator) { + var result = [], i; + if (Array.prototype.map) { + return Array.prototype.map.call(arr, iterator); + } + for (i = 0; i < arr.length; i++) { + result.push(iterator(arr[i])); + } + return result; + } + + /** + * Calculate browser version weight + * + * @example + * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1 + * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1 + * compareVersions(['1.10.2.1', '1.10.2.1']); // 0 + * compareVersions(['1.10.2.1', '1.0800.2']); // -1 + * + * @param {Array<String>} versions versions to compare + * @return {Number} comparison result + */ + function compareVersions(versions) { + // 1) get common precision for both versions, for example for "10.0" and "9" it should be 2 + var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1])); + var chunks = map(versions, function (version) { + var delta = precision - getVersionPrecision(version); + + // 2) "9" -> "9.0" (for precision = 2) + version = version + new Array(delta + 1).join(".0"); + + // 3) "9.0" -> ["000000000"", "000000009"] + return map(version.split("."), function (chunk) { + return new Array(20 - chunk.length).join("0") + chunk; + }).reverse(); + }); + + // iterate in reverse order by reversed chunks array + while (--precision >= 0) { + // 4) compare: "000000009" > "000000010" = false (but "9" > "10" = true) + if (chunks[0][precision] > chunks[1][precision]) { + return 1; + } + else if (chunks[0][precision] === chunks[1][precision]) { + if (precision === 0) { + // all version chunks are same + return 0; + } + } + else { + return -1; + } + } + } + + /** + * Check if browser is unsupported + * + * @example + * bowser.isUnsupportedBrowser({ + * msie: "10", + * firefox: "23", + * chrome: "29", + * safari: "5.1", + * opera: "16", + * phantom: "534" + * }); + * + * @param {Object} minVersions map of minimal version to browser + * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map + * @param {String} [ua] user agent string + * @return {Boolean} + */ + function isUnsupportedBrowser(minVersions, strictMode, ua) { + var _bowser = bowser; + + // make strictMode param optional with ua param usage + if (typeof strictMode === 'string') { + ua = strictMode; + strictMode = void(0); + } + + if (strictMode === void(0)) { + strictMode = false; + } + if (ua) { + _bowser = detect(ua); + } + + var version = "" + _bowser.version; + for (var browser in minVersions) { + if (minVersions.hasOwnProperty(browser)) { + if (_bowser[browser]) { + if (typeof minVersions[browser] !== 'string') { + throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions)); + } + + // browser version and min supported version. + return compareVersions([version, minVersions[browser]]) < 0; + } + } + } + + return strictMode; // not found + } + + /** + * Check if browser is supported + * + * @param {Object} minVersions map of minimal version to browser + * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map + * @param {String} [ua] user agent string + * @return {Boolean} + */ + function check(minVersions, strictMode, ua) { + return !isUnsupportedBrowser(minVersions, strictMode, ua); + } + + bowser.isUnsupportedBrowser = isUnsupportedBrowser; + bowser.compareVersions = compareVersions; + bowser.check = check; + + /* + * Set our detect method to the main bowser object so we can + * reuse it to test other user agents. + * This is needed to implement future tests. + */ + bowser._detect = detect; + + return bowser +}); + + +/***/ }), +/* 745 */ +/***/ (function(module, exports) { + +module.exports = function() { + throw new Error("define cannot be used indirect"); +}; + + +/***/ }), +/* 746 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (_ref) { + var browser = _ref.browser; + var version = _ref.version; + var prefix = _ref.prefix; + + var prefixedKeyframes = 'keyframes'; + + if (browser === 'chrome' && version < 43 || (browser === 'safari' || browser === 'ios_saf') && version < 9 || browser === 'opera' && version < 30 || browser === 'android' && version <= 4.4 || browser === 'and_uc') { + prefixedKeyframes = prefix.css + prefixedKeyframes; + } + return prefixedKeyframes; +}; + +module.exports = exports['default']; + +/***/ }), +/* 747 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { "chrome": { "transform": 35, "transformOrigin": 35, "transformOriginX": 35, "transformOriginY": 35, "backfaceVisibility": 35, "perspective": 35, "perspectiveOrigin": 35, "transformStyle": 35, "transformOriginZ": 35, "animation": 42, "animationDelay": 42, "animationDirection": 42, "animationFillMode": 42, "animationDuration": 42, "animationIterationCount": 42, "animationName": 42, "animationPlayState": 42, "animationTimingFunction": 42, "appearance": 55, "userSelect": 55, "fontKerning": 32, "textEmphasisPosition": 55, "textEmphasis": 55, "textEmphasisStyle": 55, "textEmphasisColor": 55, "boxDecorationBreak": 55, "clipPath": 55, "maskImage": 55, "maskMode": 55, "maskRepeat": 55, "maskPosition": 55, "maskClip": 55, "maskOrigin": 55, "maskSize": 55, "maskComposite": 55, "mask": 55, "maskBorderSource": 55, "maskBorderMode": 55, "maskBorderSlice": 55, "maskBorderWidth": 55, "maskBorderOutset": 55, "maskBorderRepeat": 55, "maskBorder": 55, "maskType": 55, "textDecorationStyle": 55, "textDecorationSkip": 55, "textDecorationLine": 55, "textDecorationColor": 55, "filter": 52, "fontFeatureSettings": 47, "breakAfter": 49, "breakBefore": 49, "breakInside": 49, "columnCount": 49, "columnFill": 49, "columnGap": 49, "columnRule": 49, "columnRuleColor": 49, "columnRuleStyle": 49, "columnRuleWidth": 49, "columns": 49, "columnSpan": 49, "columnWidth": 49 }, "safari": { "flex": 8, "flexBasis": 8, "flexDirection": 8, "flexGrow": 8, "flexFlow": 8, "flexShrink": 8, "flexWrap": 8, "alignContent": 8, "alignItems": 8, "alignSelf": 8, "justifyContent": 8, "order": 8, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8, "transformOrigin": 8, "transformOriginX": 8, "transformOriginY": 8, "backfaceVisibility": 8, "perspective": 8, "perspectiveOrigin": 8, "transformStyle": 8, "transformOriginZ": 8, "animation": 8, "animationDelay": 8, "animationDirection": 8, "animationFillMode": 8, "animationDuration": 8, "animationIterationCount": 8, "animationName": 8, "animationPlayState": 8, "animationTimingFunction": 8, "appearance": 10, "userSelect": 10, "backdropFilter": 10, "fontKerning": 9, "scrollSnapType": 10, "scrollSnapPointsX": 10, "scrollSnapPointsY": 10, "scrollSnapDestination": 10, "scrollSnapCoordinate": 10, "textEmphasisPosition": 7, "textEmphasis": 7, "textEmphasisStyle": 7, "textEmphasisColor": 7, "boxDecorationBreak": 10, "clipPath": 10, "maskImage": 10, "maskMode": 10, "maskRepeat": 10, "maskPosition": 10, "maskClip": 10, "maskOrigin": 10, "maskSize": 10, "maskComposite": 10, "mask": 10, "maskBorderSource": 10, "maskBorderMode": 10, "maskBorderSlice": 10, "maskBorderWidth": 10, "maskBorderOutset": 10, "maskBorderRepeat": 10, "maskBorder": 10, "maskType": 10, "textDecorationStyle": 10, "textDecorationSkip": 10, "textDecorationLine": 10, "textDecorationColor": 10, "shapeImageThreshold": 10, "shapeImageMargin": 10, "shapeImageOutside": 10, "filter": 9, "hyphens": 10, "flowInto": 10, "flowFrom": 10, "breakBefore": 8, "breakAfter": 8, "breakInside": 8, "regionFragment": 10, "columnCount": 8, "columnFill": 8, "columnGap": 8, "columnRule": 8, "columnRuleColor": 8, "columnRuleStyle": 8, "columnRuleWidth": 8, "columns": 8, "columnSpan": 8, "columnWidth": 8 }, "firefox": { "appearance": 51, "userSelect": 51, "boxSizing": 28, "textAlignLast": 48, "textDecorationStyle": 35, "textDecorationSkip": 35, "textDecorationLine": 35, "textDecorationColor": 35, "tabSize": 51, "hyphens": 42, "fontFeatureSettings": 33, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "opera": { "flex": 16, "flexBasis": 16, "flexDirection": 16, "flexGrow": 16, "flexFlow": 16, "flexShrink": 16, "flexWrap": 16, "alignContent": 16, "alignItems": 16, "alignSelf": 16, "justifyContent": 16, "order": 16, "transform": 22, "transformOrigin": 22, "transformOriginX": 22, "transformOriginY": 22, "backfaceVisibility": 22, "perspective": 22, "perspectiveOrigin": 22, "transformStyle": 22, "transformOriginZ": 22, "animation": 29, "animationDelay": 29, "animationDirection": 29, "animationFillMode": 29, "animationDuration": 29, "animationIterationCount": 29, "animationName": 29, "animationPlayState": 29, "animationTimingFunction": 29, "appearance": 41, "userSelect": 41, "fontKerning": 19, "textEmphasisPosition": 41, "textEmphasis": 41, "textEmphasisStyle": 41, "textEmphasisColor": 41, "boxDecorationBreak": 41, "clipPath": 41, "maskImage": 41, "maskMode": 41, "maskRepeat": 41, "maskPosition": 41, "maskClip": 41, "maskOrigin": 41, "maskSize": 41, "maskComposite": 41, "mask": 41, "maskBorderSource": 41, "maskBorderMode": 41, "maskBorderSlice": 41, "maskBorderWidth": 41, "maskBorderOutset": 41, "maskBorderRepeat": 41, "maskBorder": 41, "maskType": 41, "textDecorationStyle": 41, "textDecorationSkip": 41, "textDecorationLine": 41, "textDecorationColor": 41, "filter": 39, "fontFeatureSettings": 34, "breakAfter": 36, "breakBefore": 36, "breakInside": 36, "columnCount": 36, "columnFill": 36, "columnGap": 36, "columnRule": 36, "columnRuleColor": 36, "columnRuleStyle": 36, "columnRuleWidth": 36, "columns": 36, "columnSpan": 36, "columnWidth": 36 }, "ie": { "flex": 10, "flexDirection": 10, "flexFlow": 10, "flexWrap": 10, "transform": 9, "transformOrigin": 9, "transformOriginX": 9, "transformOriginY": 9, "userSelect": 11, "wrapFlow": 11, "wrapThrough": 11, "wrapMargin": 11, "scrollSnapType": 11, "scrollSnapPointsX": 11, "scrollSnapPointsY": 11, "scrollSnapDestination": 11, "scrollSnapCoordinate": 11, "touchAction": 10, "hyphens": 11, "flowInto": 11, "flowFrom": 11, "breakBefore": 11, "breakAfter": 11, "breakInside": 11, "regionFragment": 11, "gridTemplateColumns": 11, "gridTemplateRows": 11, "gridTemplateAreas": 11, "gridTemplate": 11, "gridAutoColumns": 11, "gridAutoRows": 11, "gridAutoFlow": 11, "grid": 11, "gridRowStart": 11, "gridColumnStart": 11, "gridRowEnd": 11, "gridRow": 11, "gridColumn": 11, "gridColumnEnd": 11, "gridColumnGap": 11, "gridRowGap": 11, "gridArea": 11, "gridGap": 11, "textSizeAdjust": 11 }, "edge": { "userSelect": 14, "wrapFlow": 14, "wrapThrough": 14, "wrapMargin": 14, "scrollSnapType": 14, "scrollSnapPointsX": 14, "scrollSnapPointsY": 14, "scrollSnapDestination": 14, "scrollSnapCoordinate": 14, "hyphens": 14, "flowInto": 14, "flowFrom": 14, "breakBefore": 14, "breakAfter": 14, "breakInside": 14, "regionFragment": 14, "gridTemplateColumns": 14, "gridTemplateRows": 14, "gridTemplateAreas": 14, "gridTemplate": 14, "gridAutoColumns": 14, "gridAutoRows": 14, "gridAutoFlow": 14, "grid": 14, "gridRowStart": 14, "gridColumnStart": 14, "gridRowEnd": 14, "gridRow": 14, "gridColumn": 14, "gridColumnEnd": 14, "gridColumnGap": 14, "gridRowGap": 14, "gridArea": 14, "gridGap": 14 }, "ios_saf": { "flex": 8.1, "flexBasis": 8.1, "flexDirection": 8.1, "flexGrow": 8.1, "flexFlow": 8.1, "flexShrink": 8.1, "flexWrap": 8.1, "alignContent": 8.1, "alignItems": 8.1, "alignSelf": 8.1, "justifyContent": 8.1, "order": 8.1, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8.1, "transformOrigin": 8.1, "transformOriginX": 8.1, "transformOriginY": 8.1, "backfaceVisibility": 8.1, "perspective": 8.1, "perspectiveOrigin": 8.1, "transformStyle": 8.1, "transformOriginZ": 8.1, "animation": 8.1, "animationDelay": 8.1, "animationDirection": 8.1, "animationFillMode": 8.1, "animationDuration": 8.1, "animationIterationCount": 8.1, "animationName": 8.1, "animationPlayState": 8.1, "animationTimingFunction": 8.1, "appearance": 9.3, "userSelect": 9.3, "backdropFilter": 9.3, "fontKerning": 9.3, "scrollSnapType": 9.3, "scrollSnapPointsX": 9.3, "scrollSnapPointsY": 9.3, "scrollSnapDestination": 9.3, "scrollSnapCoordinate": 9.3, "boxDecorationBreak": 9.3, "clipPath": 9.3, "maskImage": 9.3, "maskMode": 9.3, "maskRepeat": 9.3, "maskPosition": 9.3, "maskClip": 9.3, "maskOrigin": 9.3, "maskSize": 9.3, "maskComposite": 9.3, "mask": 9.3, "maskBorderSource": 9.3, "maskBorderMode": 9.3, "maskBorderSlice": 9.3, "maskBorderWidth": 9.3, "maskBorderOutset": 9.3, "maskBorderRepeat": 9.3, "maskBorder": 9.3, "maskType": 9.3, "textSizeAdjust": 9.3, "textDecorationStyle": 9.3, "textDecorationSkip": 9.3, "textDecorationLine": 9.3, "textDecorationColor": 9.3, "shapeImageThreshold": 9.3, "shapeImageMargin": 9.3, "shapeImageOutside": 9.3, "filter": 9, "hyphens": 9.3, "flowInto": 9.3, "flowFrom": 9.3, "breakBefore": 8.1, "breakAfter": 8.1, "breakInside": 8.1, "regionFragment": 9.3, "columnCount": 8.1, "columnFill": 8.1, "columnGap": 8.1, "columnRule": 8.1, "columnRuleColor": 8.1, "columnRuleStyle": 8.1, "columnRuleWidth": 8.1, "columns": 8.1, "columnSpan": 8.1, "columnWidth": 8.1 }, "android": { "flex": 4.2, "flexBasis": 4.2, "flexDirection": 4.2, "flexGrow": 4.2, "flexFlow": 4.2, "flexShrink": 4.2, "flexWrap": 4.2, "alignContent": 4.2, "alignItems": 4.2, "alignSelf": 4.2, "justifyContent": 4.2, "order": 4.2, "transition": 4.2, "transitionDelay": 4.2, "transitionDuration": 4.2, "transitionProperty": 4.2, "transitionTimingFunction": 4.2, "transform": 4.4, "transformOrigin": 4.4, "transformOriginX": 4.4, "transformOriginY": 4.4, "backfaceVisibility": 4.4, "perspective": 4.4, "perspectiveOrigin": 4.4, "transformStyle": 4.4, "transformOriginZ": 4.4, "animation": 4.4, "animationDelay": 4.4, "animationDirection": 4.4, "animationFillMode": 4.4, "animationDuration": 4.4, "animationIterationCount": 4.4, "animationName": 4.4, "animationPlayState": 4.4, "animationTimingFunction": 4.4, "appearance": 51, "userSelect": 51, "fontKerning": 4.4, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "filter": 51, "fontFeatureSettings": 4.4, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "and_chr": { "appearance": 51, "userSelect": 51, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "textDecorationStyle": 51, "textDecorationSkip": 51, "textDecorationLine": 51, "textDecorationColor": 51, "filter": 51 }, "and_uc": { "flex": 9.9, "flexBasis": 9.9, "flexDirection": 9.9, "flexGrow": 9.9, "flexFlow": 9.9, "flexShrink": 9.9, "flexWrap": 9.9, "alignContent": 9.9, "alignItems": 9.9, "alignSelf": 9.9, "justifyContent": 9.9, "order": 9.9, "transition": 9.9, "transitionDelay": 9.9, "transitionDuration": 9.9, "transitionProperty": 9.9, "transitionTimingFunction": 9.9, "transform": 9.9, "transformOrigin": 9.9, "transformOriginX": 9.9, "transformOriginY": 9.9, "backfaceVisibility": 9.9, "perspective": 9.9, "perspectiveOrigin": 9.9, "transformStyle": 9.9, "transformOriginZ": 9.9, "animation": 9.9, "animationDelay": 9.9, "animationDirection": 9.9, "animationFillMode": 9.9, "animationDuration": 9.9, "animationIterationCount": 9.9, "animationName": 9.9, "animationPlayState": 9.9, "animationTimingFunction": 9.9, "appearance": 9.9, "userSelect": 9.9, "fontKerning": 9.9, "textEmphasisPosition": 9.9, "textEmphasis": 9.9, "textEmphasisStyle": 9.9, "textEmphasisColor": 9.9, "maskImage": 9.9, "maskMode": 9.9, "maskRepeat": 9.9, "maskPosition": 9.9, "maskClip": 9.9, "maskOrigin": 9.9, "maskSize": 9.9, "maskComposite": 9.9, "mask": 9.9, "maskBorderSource": 9.9, "maskBorderMode": 9.9, "maskBorderSlice": 9.9, "maskBorderWidth": 9.9, "maskBorderOutset": 9.9, "maskBorderRepeat": 9.9, "maskBorder": 9.9, "maskType": 9.9, "textSizeAdjust": 9.9, "filter": 9.9, "hyphens": 9.9, "flowInto": 9.9, "flowFrom": 9.9, "breakBefore": 9.9, "breakAfter": 9.9, "breakInside": 9.9, "regionFragment": 9.9, "fontFeatureSettings": 9.9, "columnCount": 9.9, "columnFill": 9.9, "columnGap": 9.9, "columnRule": 9.9, "columnRuleColor": 9.9, "columnRuleStyle": 9.9, "columnRuleWidth": 9.9, "columns": 9.9, "columnSpan": 9.9, "columnWidth": 9.9 }, "op_mini": {} }; +module.exports = exports["default"]; + +/***/ }), +/* 748 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = position; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function position(_ref) { + var property = _ref.property; + var value = _ref.value; + var browser = _ref.browserInfo.browser; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'position' && value === 'sticky' && (browser === 'safari' || browser === 'ios_saf')) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 749 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = calc; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function calc(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (typeof value === 'string' && value.indexOf('calc(') > -1 && (browser === 'firefox' && version < 15 || browser === 'chrome' && version < 25 || browser === 'safari' && version < 6.1 || browser === 'ios_saf' && version < 7)) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(value.replace(/calc\(/g, css + 'calc('), value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 750 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = zoomCursor; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { 'zoom-in': true, 'zoom-out': true }; + +function zoomCursor(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'cursor' && values[value] && (browser === 'firefox' && version < 24 || browser === 'chrome' && version < 37 || browser === 'safari' && version < 9 || browser === 'opera' && version < 24)) { + return { + cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 751 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = grabCursor; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { grab: true, grabbing: true }; + +function grabCursor(_ref) { + var property = _ref.property; + var value = _ref.value; + var browser = _ref.browserInfo.browser; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + // adds prefixes for firefox, chrome, safari, and opera regardless of version until a reliable brwoser support info can be found (see: https://github.com/rofrischmann/inline-style-prefixer/issues/79) + if (property === 'cursor' && values[value] && (browser === 'firefox' || browser === 'chrome' || browser === 'safari' || browser === 'opera')) { + return { + cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 752 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flex; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { flex: true, 'inline-flex': true }; + +function flex(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'display' && values[value] && (browser === 'chrome' && version < 29 && version > 20 || (browser === 'safari' || browser === 'ios_saf') && version < 9 && version > 6 || browser === 'opera' && (version == 15 || version == 16))) { + return { + display: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 753 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sizing; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { + maxHeight: true, + maxWidth: true, + width: true, + height: true, + columnWidth: true, + minWidth: true, + minHeight: true +}; +var values = { + 'min-content': true, + 'max-content': true, + 'fill-available': true, + 'fit-content': true, + 'contain-floats': true +}; + +function sizing(_ref) { + var property = _ref.property; + var value = _ref.value; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + // This might change in the future + // Keep an eye on it + if (properties[property] && values[value]) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 754 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gradient; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; + +function gradient(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (typeof value === 'string' && value.match(values) !== null && (browser === 'firefox' && version < 16 || browser === 'chrome' && version < 26 || (browser === 'safari' || browser === 'ios_saf') && version < 7 || (browser === 'opera' || browser === 'op_mini') && version < 12.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 755 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + +exports.default = transition; + +var _hyphenateStyleName = __webpack_require__(309); + +var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); + +var _unprefixProperty = __webpack_require__(756); + +var _unprefixProperty2 = _interopRequireDefault(_unprefixProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { transition: true, transitionProperty: true }; + +function transition(_ref) { + var property = _ref.property; + var value = _ref.value; + var css = _ref.prefix.css; + var requiresPrefix = _ref.requiresPrefix; + var keepUnprefixed = _ref.keepUnprefixed; + + // also check for already prefixed transitions + var unprefixedProperty = (0, _unprefixProperty2.default)(property); + + if (typeof value === 'string' && properties[unprefixedProperty]) { + var _ret = function () { + // TODO: memoize this array + var requiresPrefixDashCased = Object.keys(requiresPrefix).map(function (prop) { + return (0, _hyphenateStyleName2.default)(prop); + }); + + // only split multi values, not cubic beziers + var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); + + requiresPrefixDashCased.forEach(function (prop) { + multipleValues.forEach(function (val, index) { + if (val.indexOf(prop) > -1 && prop !== 'order') { + multipleValues[index] = val.replace(prop, css + prop) + (keepUnprefixed ? ',' + val : ''); + } + }); + }); + + return { + v: _defineProperty({}, property, multipleValues.join(',')) + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } +} +module.exports = exports['default']; + +/***/ }), +/* 756 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (property) { + var unprefixed = property.replace(/^(ms|Webkit|Moz|O)/, ''); + return unprefixed.charAt(0).toLowerCase() + unprefixed.slice(1); +}; + +module.exports = exports['default']; + +/***/ }), +/* 757 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxIE; + +var _getPrefixedValue = __webpack_require__(40); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'distribute', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + flex: 'flexbox', + 'inline-flex': 'inline-flexbox' +}; +var alternativeProps = { + alignContent: 'msFlexLinePack', + alignSelf: 'msFlexItemAlign', + alignItems: 'msFlexAlign', + justifyContent: 'msFlexPack', + order: 'msFlexOrder', + flexGrow: 'msFlexPositive', + flexShrink: 'msFlexNegative', + flexBasis: 'msPreferredSize' +}; + +function flexboxIE(_ref) { + var property = _ref.property; + var value = _ref.value; + var styles = _ref.styles; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if ((alternativeProps[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'ie_mob' || browser === 'ie') && version == 10) { + if (!keepUnprefixed && !Array.isArray(styles[property])) { + delete styles[property]; + } + if (property === 'display' && alternativeValues[value]) { + return { + display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } + } +} +module.exports = exports['default']; + +/***/ }), +/* 758 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxOld; + +var _getPrefixedValue = __webpack_require__(40); -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); -module.exports = merge; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'justify', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + 'wrap-reverse': 'multiple', + wrap: 'multiple', + flex: 'box', + 'inline-flex': 'inline-box' +}; + +var alternativeProps = { + alignItems: 'WebkitBoxAlign', + justifyContent: 'WebkitBoxPack', + flexWrap: 'WebkitBoxLines' +}; + +var otherProps = ['alignContent', 'alignSelf', 'order', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection']; +var properties = Object.keys(alternativeProps).concat(otherProps); + +function flexboxOld(_ref) { + var property = _ref.property; + var value = _ref.value; + var styles = _ref.styles; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46), __webpack_require__(254)(module))) + if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'firefox' && version < 22 || browser === 'chrome' && version < 21 || (browser === 'safari' || browser === 'ios_saf') && version <= 6.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { + if (!keepUnprefixed && !Array.isArray(styles[property])) { + delete styles[property]; + } + if (property === 'flexDirection' && typeof value === 'string') { + return { + WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', + WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' + }; + } + if (property === 'display' && alternativeValues[value]) { + return { + display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } + } +} +module.exports = exports['default']; /***/ }), -/* 757 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65425,79 +66980,165 @@ module.exports = merge; Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = callOnce; -var _typeof2 = __webpack_require__(76); +var _warning = __webpack_require__(26); -var _typeof3 = _interopRequireDefault(_typeof2); +var _warning2 = _interopRequireDefault(_warning); -exports.default = function (muiTheme) { - var isClient = typeof navigator !== 'undefined'; - var userAgent = muiTheme.userAgent; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (userAgent === undefined && isClient) { - userAgent = navigator.userAgent; +var CALLED_ONCE = 'muiPrepared'; + +function callOnce() { + if (process.env.NODE_ENV !== 'production') { + return function (style) { + if (style[CALLED_ONCE]) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: You cannot call prepareStyles() on the same style object more than once.') : void 0; + } + style[CALLED_ONCE] = true; + return style; + }; } +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - if (userAgent === undefined && !hasWarnedAboutUserAgent) { - process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: userAgent should be supplied in the muiTheme context\n for server-side rendering.') : void 0; +/***/ }), +/* 760 */ +/***/ (function(module, exports, __webpack_require__) { - hasWarnedAboutUserAgent = true; - } +"use strict"; - if (userAgent === false) { - // Disabled autoprefixer - return null; - } else if (userAgent === 'all' || userAgent === undefined) { - // Prefix for all user agent + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(54); + +var _keys2 = _interopRequireDefault(_keys); + +exports.default = rtl; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var reTranslate = /((^|\s)translate(3d|X)?\()(\-?[\d]+)/; +var reSkew = /((^|\s)skew(x|y)?\()\s*(\-?[\d]+)(deg|rad|grad)(,\s*(\-?[\d]+)(deg|rad|grad))?/; + +/** + * This function ensures that `style` supports both ltr and rtl directions by + * checking `styleConstants` in `muiTheme` and replacing attribute keys if + * necessary. + */ +function rtl(muiTheme) { + if (muiTheme.isRtl) { return function (style) { - var isFlex = ['flex', 'inline-flex'].indexOf(style.display) !== -1; - var stylePrefixed = _inlineStylePrefixer2.default.prefixAll(style); + if (style.directionInvariant === true) { + return style; + } - if (isFlex) { - var display = stylePrefixed.display; - if (isClient) { - // We can't apply this join with react-dom: - // #https://github.com/facebook/react/issues/6467 - stylePrefixed.display = display[display.length - 1]; - } else { - stylePrefixed.display = display.join('; display: '); + var flippedAttributes = { + // Keys and their replacements. + right: 'left', + left: 'right', + marginRight: 'marginLeft', + marginLeft: 'marginRight', + paddingRight: 'paddingLeft', + paddingLeft: 'paddingRight', + borderRight: 'borderLeft', + borderLeft: 'borderRight' + }; + + var newStyle = {}; + + (0, _keys2.default)(style).forEach(function (attribute) { + var value = style[attribute]; + var key = attribute; + + if (flippedAttributes.hasOwnProperty(attribute)) { + key = flippedAttributes[attribute]; } - } - return stylePrefixed; - }; - } else { - var _ret = function () { - var prefixer = new _inlineStylePrefixer2.default({ - userAgent: userAgent - }); + switch (attribute) { + case 'float': + case 'textAlign': + if (value === 'right') { + value = 'left'; + } else if (value === 'left') { + value = 'right'; + } + break; - return { - v: function v(style) { - return prefixer.prefix(style); + case 'direction': + if (value === 'ltr') { + value = 'rtl'; + } else if (value === 'rtl') { + value = 'ltr'; + } + break; + + case 'transform': + if (!value) break; + var matches = void 0; + if (matches = value.match(reTranslate)) { + value = value.replace(matches[0], matches[1] + -parseFloat(matches[4])); + } + if (matches = value.match(reSkew)) { + value = value.replace(matches[0], matches[1] + -parseFloat(matches[4]) + matches[5] + matches[6] ? ', ' + (-parseFloat(matches[7]) + matches[8]) : ''); + } + break; + + case 'transformOrigin': + if (!value) break; + if (value.indexOf('right') > -1) { + value = value.replace('right', 'left'); + } else if (value.indexOf('left') > -1) { + value = value.replace('left', 'right'); + } + break; } - }; - }(); - if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + newStyle[key] = value; + }); + + return newStyle; + }; } -}; +} -var _inlineStylePrefixer = __webpack_require__(758); +/***/ }), +/* 761 */ +/***/ (function(module, exports, __webpack_require__) { -var _inlineStylePrefixer2 = _interopRequireDefault(_inlineStylePrefixer); +"use strict"; -var _warning = __webpack_require__(26); -var _warning2 = _interopRequireDefault(_warning); +exports.__esModule = true; +exports.default = compose; +function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } -var hasWarnedAboutUserAgent = false; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(undefined, arguments)); + }; + }); +} /***/ }), -/* 758 */ +/* 762 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65506,233 +67147,236 @@ var hasWarnedAboutUserAgent = false; Object.defineProperty(exports, "__esModule", { value: true }); +exports.zIndex = exports.typography = exports.transitions = exports.spacing = exports.muiThemeable = exports.getMuiTheme = exports.LightRawTheme = exports.lightBaseTheme = exports.DarkRawTheme = exports.darkBaseTheme = exports.colors = exports.MuiThemeProvider = undefined; -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -// special flexbox specifications +var _MuiThemeProvider2 = __webpack_require__(763); +var _MuiThemeProvider3 = _interopRequireDefault(_MuiThemeProvider2); -var _prefixAll2 = __webpack_require__(759); +var _colors2 = __webpack_require__(37); -var _prefixAll3 = _interopRequireDefault(_prefixAll2); +var _colors = _interopRequireWildcard(_colors2); -var _getBrowserInformation = __webpack_require__(770); +var _darkBaseTheme2 = __webpack_require__(764); -var _getBrowserInformation2 = _interopRequireDefault(_getBrowserInformation); +var _darkBaseTheme3 = _interopRequireDefault(_darkBaseTheme2); -var _getPrefixedKeyframes = __webpack_require__(773); +var _lightBaseTheme2 = __webpack_require__(305); -var _getPrefixedKeyframes2 = _interopRequireDefault(_getPrefixedKeyframes); +var _lightBaseTheme3 = _interopRequireDefault(_lightBaseTheme2); -var _capitalizeString = __webpack_require__(187); +var _getMuiTheme2 = __webpack_require__(122); -var _capitalizeString2 = _interopRequireDefault(_capitalizeString); +var _getMuiTheme3 = _interopRequireDefault(_getMuiTheme2); -var _sortPrefixedStyle = __webpack_require__(302); +var _muiThemeable2 = __webpack_require__(765); -var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); +var _muiThemeable3 = _interopRequireDefault(_muiThemeable2); -var _prefixProps = __webpack_require__(774); +var _spacing2 = __webpack_require__(192); -var _prefixProps2 = _interopRequireDefault(_prefixProps); +var _spacing3 = _interopRequireDefault(_spacing2); -var _position = __webpack_require__(775); +var _transitions2 = __webpack_require__(12); -var _position2 = _interopRequireDefault(_position); +var _transitions3 = _interopRequireDefault(_transitions2); -var _calc = __webpack_require__(776); +var _typography2 = __webpack_require__(310); -var _calc2 = _interopRequireDefault(_calc); +var _typography3 = _interopRequireDefault(_typography2); -var _zoomCursor = __webpack_require__(777); +var _zIndex2 = __webpack_require__(306); -var _zoomCursor2 = _interopRequireDefault(_zoomCursor); +var _zIndex3 = _interopRequireDefault(_zIndex2); -var _grabCursor = __webpack_require__(778); +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -var _grabCursor2 = _interopRequireDefault(_grabCursor); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _flex = __webpack_require__(779); +exports.MuiThemeProvider = _MuiThemeProvider3.default; +exports.colors = _colors; +exports.darkBaseTheme = _darkBaseTheme3.default; +exports.DarkRawTheme = _darkBaseTheme3.default; +exports.lightBaseTheme = _lightBaseTheme3.default; +exports.LightRawTheme = _lightBaseTheme3.default; +exports.getMuiTheme = _getMuiTheme3.default; +exports.muiThemeable = _muiThemeable3.default; +exports.spacing = _spacing3.default; +exports.transitions = _transitions3.default; +exports.typography = _typography3.default; +exports.zIndex = _zIndex3.default; -var _flex2 = _interopRequireDefault(_flex); +/***/ }), +/* 763 */ +/***/ (function(module, exports, __webpack_require__) { -var _sizing = __webpack_require__(780); +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { -var _sizing2 = _interopRequireDefault(_sizing); +Object.defineProperty(exports, "__esModule", { + value: true +}); -var _gradient = __webpack_require__(781); +var _getPrototypeOf = __webpack_require__(4); -var _gradient2 = _interopRequireDefault(_gradient); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -var _transition = __webpack_require__(782); +var _classCallCheck2 = __webpack_require__(2); -var _transition2 = _interopRequireDefault(_transition); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _flexboxIE = __webpack_require__(784); +var _createClass2 = __webpack_require__(3); -var _flexboxIE2 = _interopRequireDefault(_flexboxIE); +var _createClass3 = _interopRequireDefault(_createClass2); -var _flexboxOld = __webpack_require__(785); +var _possibleConstructorReturn2 = __webpack_require__(5); -var _flexboxOld2 = _interopRequireDefault(_flexboxOld); +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _getMuiTheme = __webpack_require__(122); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +var MuiThemeProvider = function (_Component) { + (0, _inherits3.default)(MuiThemeProvider, _Component); -var plugins = [_position2.default, _calc2.default, _zoomCursor2.default, _grabCursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, -// this must be run AFTER the flexbox specs -_flex2.default]; + function MuiThemeProvider() { + (0, _classCallCheck3.default)(this, MuiThemeProvider); + return (0, _possibleConstructorReturn3.default)(this, (MuiThemeProvider.__proto__ || (0, _getPrototypeOf2.default)(MuiThemeProvider)).apply(this, arguments)); + } -var Prefixer = function () { - /** - * Instantiante a new prefixer - * @param {string} userAgent - userAgent to gather prefix information according to caniuse.com - * @param {string} keepUnprefixed - keeps unprefixed properties and values - */ + (0, _createClass3.default)(MuiThemeProvider, [{ + key: 'getChildContext', + value: function getChildContext() { + return { + muiTheme: this.props.muiTheme || (0, _getMuiTheme2.default)() + }; + } + }, { + key: 'render', + value: function render() { + return this.props.children; + } + }]); + return MuiThemeProvider; +}(_react.Component); - function Prefixer() { - var _this = this; +MuiThemeProvider.childContextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? MuiThemeProvider.propTypes = { + children: _react.PropTypes.element, + muiTheme: _react.PropTypes.object +} : void 0; +exports.default = MuiThemeProvider; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; +/***/ }), +/* 764 */ +/***/ (function(module, exports, __webpack_require__) { - _classCallCheck(this, Prefixer); +"use strict"; - var defaultUserAgent = typeof navigator !== 'undefined' ? navigator.userAgent : undefined; - this._userAgent = options.userAgent || defaultUserAgent; - this._keepUnprefixed = options.keepUnprefixed || false; +Object.defineProperty(exports, "__esModule", { + value: true +}); - this._browserInfo = (0, _getBrowserInformation2.default)(this._userAgent); +var _colors = __webpack_require__(37); - // Checks if the userAgent was resolved correctly - if (this._browserInfo && this._browserInfo.prefix) { - // set additional prefix information - this.cssPrefix = this._browserInfo.prefix.css; - this.jsPrefix = this._browserInfo.prefix.inline; - this.prefixedKeyframes = (0, _getPrefixedKeyframes2.default)(this._browserInfo); - } else { - this._usePrefixAllFallback = true; - return false; - } +var _colorManipulator = __webpack_require__(62); - var data = this._browserInfo.browser && _prefixProps2.default[this._browserInfo.browser]; - if (data) { - this._requiresPrefix = Object.keys(data).filter(function (key) { - return data[key] >= _this._browserInfo.version; - }).reduce(function (result, name) { - result[name] = true; - return result; - }, {}); - this._hasPropsRequiringPrefix = Object.keys(this._requiresPrefix).length > 0; - } else { - this._usePrefixAllFallback = true; - } +var _spacing = __webpack_require__(192); + +var _spacing2 = _interopRequireDefault(_spacing); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = { + spacing: _spacing2.default, + fontFamily: 'Roboto, sans-serif', + palette: { + primary1Color: _colors.cyan700, + primary2Color: _colors.cyan700, + primary3Color: _colors.grey600, + accent1Color: _colors.pinkA200, + accent2Color: _colors.pinkA400, + accent3Color: _colors.pinkA100, + textColor: _colors.fullWhite, + secondaryTextColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.7), + alternateTextColor: '#303030', + canvasColor: '#303030', + borderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), + disabledColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), + pickerHeaderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12), + clockCircleColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12) } +}; - /** - * Returns a prefixed version of the style object - * @param {Object} styles - Style object that gets prefixed properties added - * @returns {Object} - Style object with prefixed properties and values - */ +/***/ }), +/* 765 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; - _createClass(Prefixer, [{ - key: 'prefix', - value: function prefix(styles) { - var _this2 = this; - // use prefixAll as fallback if userAgent can not be resolved - if (this._usePrefixAllFallback) { - return (0, _prefixAll3.default)(styles); - } +Object.defineProperty(exports, "__esModule", { + value: true +}); - // only add prefixes if needed - if (!this._hasPropsRequiringPrefix) { - return styles; - } +var _extends2 = __webpack_require__(8); - Object.keys(styles).forEach(function (property) { - var value = styles[property]; - if (value instanceof Object && !Array.isArray(value)) { - // recurse through nested style objects - styles[property] = _this2.prefix(value); - } else { - // add prefixes if needed - if (_this2._requiresPrefix[property]) { - styles[_this2.jsPrefix + (0, _capitalizeString2.default)(property)] = value; - if (!_this2._keepUnprefixed) { - delete styles[property]; - } - } - } - }); +var _extends3 = _interopRequireDefault(_extends2); - Object.keys(styles).forEach(function (property) { - [].concat(styles[property]).forEach(function (value) { - // resolve plugins - plugins.forEach(function (plugin) { - // generates a new plugin interface with current data - assignStyles(styles, plugin({ - property: property, - value: value, - styles: styles, - browserInfo: _this2._browserInfo, - prefix: { - js: _this2.jsPrefix, - css: _this2.cssPrefix, - keyframes: _this2.prefixedKeyframes - }, - keepUnprefixed: _this2._keepUnprefixed, - requiresPrefix: _this2._requiresPrefix - }), value, _this2._keepUnprefixed); - }); - }); - }); +exports.default = muiThemeable; - return (0, _sortPrefixedStyle2.default)(styles); - } +var _react = __webpack_require__(1); - /** - * Returns a prefixed version of the style object using all vendor prefixes - * @param {Object} styles - Style object that gets prefixed properties added - * @returns {Object} - Style object with prefixed properties and values - */ +var _react2 = _interopRequireDefault(_react); - }], [{ - key: 'prefixAll', - value: function prefixAll(styles) { - return (0, _prefixAll3.default)(styles); - } - }]); +var _getMuiTheme = __webpack_require__(122); - return Prefixer; -}(); +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); -exports.default = Prefixer; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var DEFAULT_THEME = void 0; -function assignStyles(base) { - var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var value = arguments[2]; - var keepUnprefixed = arguments[3]; +function getDefaultTheme() { + if (!DEFAULT_THEME) { + DEFAULT_THEME = (0, _getMuiTheme2.default)(); + } + return DEFAULT_THEME; +} - Object.keys(extend).forEach(function (property) { - var baseValue = base[property]; - if (Array.isArray(baseValue)) { - [].concat(extend[property]).forEach(function (val) { - if (base[property].indexOf(val) === -1) { - base[property].splice(baseValue.indexOf(value), keepUnprefixed ? 0 : 1, val); - } - }); - } else { - base[property] = extend[property]; - } - }); +function muiThemeable() { + return function (Component) { + var MuiComponent = function MuiComponent(props, context) { + var _context$muiTheme = context.muiTheme, + muiTheme = _context$muiTheme === undefined ? getDefaultTheme() : _context$muiTheme; + + + return _react2.default.createElement(Component, (0, _extends3.default)({ muiTheme: muiTheme }, props)); + }; + + MuiComponent.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired + }; + + return MuiComponent; + }; } -module.exports = exports['default']; /***/ }), -/* 759 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65741,119 +67385,485 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = prefixAll; -var _prefixProps = __webpack_require__(301); +var _assign = __webpack_require__(99); -var _prefixProps2 = _interopRequireDefault(_prefixProps); +var _assign2 = _interopRequireDefault(_assign); -var _capitalizeString = __webpack_require__(187); +var _react = __webpack_require__(1); -var _capitalizeString2 = _interopRequireDefault(_capitalizeString); +var _react2 = _interopRequireDefault(_react); -var _sortPrefixedStyle = __webpack_require__(302); +var _reduxForm = __webpack_require__(110); -var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); +var _reactRedux = __webpack_require__(28); -var _position = __webpack_require__(761); +var _RaisedButton = __webpack_require__(88); -var _position2 = _interopRequireDefault(_position); +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); -var _calc = __webpack_require__(762); +var _reduxFormMaterialUi = __webpack_require__(121); -var _calc2 = _interopRequireDefault(_calc); +var _Styles = __webpack_require__(91); -var _cursor = __webpack_require__(763); +var _Styles2 = _interopRequireDefault(_Styles); -var _cursor2 = _interopRequireDefault(_cursor); +var _FormValidators = __webpack_require__(124); -var _flex = __webpack_require__(764); +var Validators = _interopRequireWildcard(_FormValidators); -var _flex2 = _interopRequireDefault(_flex); +var _Menus = __webpack_require__(84); -var _sizing = __webpack_require__(765); +var menus = _interopRequireWildcard(_Menus); -var _sizing2 = _interopRequireDefault(_sizing); +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -var _gradient = __webpack_require__(766); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _gradient2 = _interopRequireDefault(_gradient); +var defaultValues = { + autoCheckout: false, + autoPay: false, + strictSize: true, + hideSoldOut: false, + captchaBypass: false, + addToCartDelay: 200, + checkoutDelay: 2000 +}; -var _transition = __webpack_require__(767); +var Options = function Options(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting, + atcEnabled = props.atcEnabled; -var _transition2 = _interopRequireDefault(_transition); + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'options-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'autoCheckout', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable auto checkout', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'autoPay', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable auto payment', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'strictSize', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable strict size checking', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'hideSoldOut', + component: _reduxFormMaterialUi.Toggle, + label: 'Hide sold out products', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'captchaBypass', + component: _reduxFormMaterialUi.Toggle, + label: 'Bypass captcha (beta)', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'atcEnabled', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable AutoCop (Autocheckout required)', + style: _Styles2.default.fields.text + }) + ), + atcEnabled && _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'atcStartTime', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'ATC Start time (hh:mm:ss) 24hour format', + hintText: 'ATC Start time', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.time24] + }), + _react2.default.createElement('br', null) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'addToCartDelay', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Add to cart delay (ms)', + hintText: 'Add to cart delay (ms)', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'checkoutDelay', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Checkout delay (ms)', + hintText: 'Checkout delay (ms)', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'maxPrice', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Maximum product price', + hintText: 'Maximum product price', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'minPrice', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Minimum product price', + hintText: 'Minimum product price', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; -var _flexboxIE = __webpack_require__(768); +var OptionsForm = (0, _reduxForm.reduxForm)({ + form: 'options' +})(Options); -var _flexboxIE2 = _interopRequireDefault(_flexboxIE); +var selector = (0, _reduxForm.formValueSelector)('options'); -var _flexboxOld = __webpack_require__(769); +function mapStateToProps(state, ownProps) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + initialValues: (0, _assign2.default)({}, defaultValues, (settings[ownProps.shop] || {})[menus.MENU_OPTIONS] || {}), + atcEnabled: selector(state, 'atcEnabled') + }; +} -var _flexboxOld2 = _interopRequireDefault(_flexboxOld); +Options.propTypes = { + shop: _react.PropTypes.string.isRequired +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +exports.default = (0, _reactRedux.connect)(mapStateToProps)(OptionsForm); -// special flexbox specifications +/***/ }), +/* 767 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; -var plugins = [_position2.default, _calc2.default, _cursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, _flex2.default]; -/** - * Returns a prefixed version of the style object using all vendor prefixes - * @param {Object} styles - Style object that gets prefixed properties added - * @returns {Object} - Style object with prefixed properties and values - */ -function prefixAll(styles) { - Object.keys(styles).forEach(function (property) { - var value = styles[property]; - if (value instanceof Object && !Array.isArray(value)) { - // recurse through nested style objects - styles[property] = prefixAll(value); - } else { - Object.keys(_prefixProps2.default).forEach(function (prefix) { - var properties = _prefixProps2.default[prefix]; - // add prefixes if needed - if (properties[property]) { - styles[prefix + (0, _capitalizeString2.default)(property)] = value; - } - }); - } - }); +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reduxForm = __webpack_require__(110); + +var _reactRedux = __webpack_require__(28); + +var _MenuItem = __webpack_require__(87); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +var _RaisedButton = __webpack_require__(88); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _reduxFormMaterialUi = __webpack_require__(121); + +var _Styles = __webpack_require__(91); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _Utils = __webpack_require__(195); + +var Utils = _interopRequireWildcard(_Utils); + +var _FormValidators = __webpack_require__(124); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Menus = __webpack_require__(84); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Sizes = function Sizes(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'biling-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'accessories', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Accessories', + hintText: 'Accessories', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 't-shirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'T-Shirts', + hintText: 'T-Shirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'pants', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Pants', + hintText: 'Pants', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizesPants.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shorts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shorts', + hintText: 'Shorts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizesPants.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'sweatshirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Sweatshirts', + hintText: 'Sweatshirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'tops-sweaters', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Tops/Sweaters', + hintText: 'Tops/Sweaters', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shirts', + hintText: 'Shirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'jackets', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Jackets', + hintText: 'Jackets', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shoes', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shoes', + hintText: 'Shoes', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.shoeSizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'skate', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Skate', + hintText: 'Skate', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.skateSizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; - Object.keys(styles).forEach(function (property) { - [].concat(styles[property]).forEach(function (value, index) { - // resolve every special plugins - plugins.forEach(function (plugin) { - return assignStyles(styles, plugin(property, value)); - }); - }); - }); +Sizes.propTypes = { + shop: _react.PropTypes.string.isRequired +}; - return (0, _sortPrefixedStyle2.default)(styles); +function mapStateToProps(state, ownProps) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + initialValues: (settings[ownProps.shop] || {})[menus.MENU_SIZES] || {} + }; } -function assignStyles(base) { - var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - - Object.keys(extend).forEach(function (property) { - var baseValue = base[property]; - if (Array.isArray(baseValue)) { - [].concat(extend[property]).forEach(function (value) { - var valueIndex = baseValue.indexOf(value); - if (valueIndex > -1) { - base[property].splice(valueIndex, 1); - } - base[property].push(value); - }); - } else { - base[property] = extend[property]; - } - }); -} -module.exports = exports['default']; +exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({ + form: 'sizes' +})(Sizes)); /***/ }), -/* 760 */ +/* 768 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65863,117 +67873,258 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = function (property) { - return property.match(/^(Webkit|Moz|O|ms)/) !== null; -}; +var _getPrototypeOf = __webpack_require__(4); -module.exports = exports["default"]; +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -/***/ }), -/* 761 */ -/***/ (function(module, exports, __webpack_require__) { +var _classCallCheck2 = __webpack_require__(2); -"use strict"; +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var _createClass2 = __webpack_require__(3); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = position; -function position(property, value) { - if (property === 'position' && value === 'sticky') { - return { position: ['-webkit-sticky', 'sticky'] }; - } -} -module.exports = exports['default']; +var _createClass3 = _interopRequireDefault(_createClass2); -/***/ }), -/* 762 */ -/***/ (function(module, exports, __webpack_require__) { +var _possibleConstructorReturn2 = __webpack_require__(5); -"use strict"; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); +var _inherits2 = __webpack_require__(6); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = calc; +var _inherits3 = _interopRequireDefault(_inherits2); -var _joinPrefixedValue = __webpack_require__(122); +var _react = __webpack_require__(1); -var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); +var _react2 = _interopRequireDefault(_react); -var _isPrefixedValue = __webpack_require__(188); +var _reactRedux = __webpack_require__(28); -var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); +var _Table = __webpack_require__(769); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _colors = __webpack_require__(37); -function calc(property, value) { - if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('calc(') > -1) { - return (0, _joinPrefixedValue2.default)(property, value, function (prefix, value) { - return value.replace(/calc\(/g, prefix + 'calc('); - }); - } -} -module.exports = exports['default']; +var _Dialog = __webpack_require__(191); -/***/ }), -/* 763 */ -/***/ (function(module, exports, __webpack_require__) { +var _Dialog2 = _interopRequireDefault(_Dialog); -"use strict"; +var _IconButton = __webpack_require__(72); +var _IconButton2 = _interopRequireDefault(_IconButton); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cursor; +var _delete = __webpack_require__(775); -var _joinPrefixedValue = __webpack_require__(122); +var _delete2 = _interopRequireDefault(_delete); -var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); +var _RaisedButton = __webpack_require__(88); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); -var values = { - 'zoom-in': true, - 'zoom-out': true, - grab: true, - grabbing: true -}; +var _Toggle = __webpack_require__(304); -function cursor(property, value) { - if (property === 'cursor' && values[value]) { - return (0, _joinPrefixedValue2.default)(property, value); - } -} -module.exports = exports['default']; +var _Toggle2 = _interopRequireDefault(_Toggle); -/***/ }), -/* 764 */ -/***/ (function(module, exports, __webpack_require__) { +var _atc = __webpack_require__(776); -"use strict"; +var _AtcCreateForm = __webpack_require__(777); +var _AtcCreateForm2 = _interopRequireDefault(_AtcCreateForm); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = flex; -var values = { flex: true, 'inline-flex': true }; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function flex(property, value) { - if (property === 'display' && values[value]) { - return { - display: ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value] +var Atc = function (_Component) { + (0, _inherits3.default)(Atc, _Component); + + function Atc(props) { + (0, _classCallCheck3.default)(this, Atc); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Atc.__proto__ || (0, _getPrototypeOf2.default)(Atc)).call(this, props)); + + _this.state = { + createModalOpen: false }; + return _this; } + + (0, _createClass3.default)(Atc, [{ + key: 'requestCloseModal', + value: function requestCloseModal() { + this.setState({ + createModalOpen: false + }); + } + }, { + key: 'requestModalOpen', + value: function requestModalOpen() { + this.setState({ + createModalOpen: true + }); + } + }, { + key: 'onRequestDeleteAtc', + value: function onRequestDeleteAtc(atcName) { + this.props.removeAtcProduct(atcName); + } + }, { + key: 'handleSubmit', + value: function handleSubmit(data) { + this.requestCloseModal(); + this.props.addAtcProduct(data); + } + }, { + key: 'toggleAtc', + value: function toggleAtc(name, enabled) { + this.props.setAtcProductEnabled(name, enabled); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var atcProducts = this.props.atcProducts; + + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _Dialog2.default, + { + open: this.state.createModalOpen, + title: 'Add a new atc product', + modal: false, + onRequestClose: function onRequestClose() { + return _this2.requestCloseModal(); + } + }, + _react2.default.createElement(_AtcCreateForm2.default, { onRequestClose: function onRequestClose() { + return _this2.requestCloseModal(); + }, onSubmit: function onSubmit(data) { + return _this2.handleSubmit(data); + } }) + ), + _react2.default.createElement(_RaisedButton2.default, { label: 'Add new', onTouchTap: function onTouchTap() { + return _this2.requestModalOpen(); + }, primary: true }), + _react2.default.createElement( + _Table.Table, + { selectable: false }, + _react2.default.createElement( + _Table.TableHeader, + { displaySelectAll: false, adjustForCheckbox: false }, + _react2.default.createElement( + _Table.TableRow, + null, + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Name' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Keywords' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Color' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Category' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Enabled' + ), + _react2.default.createElement( + _Table.TableHeaderColumn, + null, + 'Delete' + ) + ) + ), + _react2.default.createElement( + _Table.TableBody, + { displayRowCheckbox: false, stripedRows: true }, + atcProducts.map(function (x) { + return _react2.default.createElement( + _Table.TableRow, + { key: x.name }, + _react2.default.createElement( + _Table.TableRowColumn, + null, + x.name + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + x.keywords.join(', ') + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + x.color || 'ANY' + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + x.category + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + _react2.default.createElement(_Toggle2.default, { toggled: x.enabled, onToggle: function onToggle() { + return _this2.toggleAtc(x.name, !x.enabled); + } }) + ), + _react2.default.createElement( + _Table.TableRowColumn, + null, + _react2.default.createElement( + _IconButton2.default, + { onTouchTap: function onTouchTap() { + return _this2.onRequestDeleteAtc(x.name); + } }, + _react2.default.createElement(_delete2.default, { color: _colors.red300 }) + ) + ) + ); + }) + ) + ) + ); + } + }]); + return Atc; +}(_react.Component); + +function mapStateToProps(state) { + return { + atcProducts: state.atc.atcProducts + }; } -module.exports = exports['default']; + +function mapDispatchToProps(dispatch) { + return { + addAtcProduct: function addAtcProduct(data) { + return dispatch((0, _atc.addAtcProduct)(data)); + }, + removeAtcProduct: function removeAtcProduct(data) { + return dispatch((0, _atc.removeAtcProduct)(data)); + }, + setAtcProductEnabled: function setAtcProductEnabled(name, enabled) { + return dispatch((0, _atc.setAtcProductEnabled)(name, enabled)); + } + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Atc); /***/ }), -/* 765 */ +/* 769 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65982,1113 +68133,1643 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = sizing; +exports.default = exports.TableRowColumn = exports.TableRow = exports.TableHeaderColumn = exports.TableHeader = exports.TableFooter = exports.TableBody = exports.Table = undefined; -var _joinPrefixedValue = __webpack_require__(122); +var _Table2 = __webpack_require__(770); -var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); +var _Table3 = _interopRequireDefault(_Table2); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _TableBody2 = __webpack_require__(771); -var properties = { - maxHeight: true, - maxWidth: true, - width: true, - height: true, - columnWidth: true, - minWidth: true, - minHeight: true -}; -var values = { - 'min-content': true, - 'max-content': true, - 'fill-available': true, - 'fit-content': true, - 'contain-floats': true -}; +var _TableBody3 = _interopRequireDefault(_TableBody2); -function sizing(property, value) { - if (properties[property] && values[value]) { - return (0, _joinPrefixedValue2.default)(property, value); - } -} -module.exports = exports['default']; +var _TableFooter2 = __webpack_require__(772); -/***/ }), -/* 766 */ -/***/ (function(module, exports, __webpack_require__) { +var _TableFooter3 = _interopRequireDefault(_TableFooter2); -"use strict"; +var _TableHeader2 = __webpack_require__(773); +var _TableHeader3 = _interopRequireDefault(_TableHeader2); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = gradient; +var _TableHeaderColumn2 = __webpack_require__(311); -var _joinPrefixedValue = __webpack_require__(122); +var _TableHeaderColumn3 = _interopRequireDefault(_TableHeaderColumn2); -var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); +var _TableRow2 = __webpack_require__(774); -var _isPrefixedValue = __webpack_require__(188); +var _TableRow3 = _interopRequireDefault(_TableRow2); -var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); +var _TableRowColumn2 = __webpack_require__(196); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _TableRowColumn3 = _interopRequireDefault(_TableRowColumn2); -var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function gradient(property, value) { - if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.match(values) !== null) { - return (0, _joinPrefixedValue2.default)(property, value); - } -} -module.exports = exports['default']; +exports.Table = _Table3.default; +exports.TableBody = _TableBody3.default; +exports.TableFooter = _TableFooter3.default; +exports.TableHeader = _TableHeader3.default; +exports.TableHeaderColumn = _TableHeaderColumn3.default; +exports.TableRow = _TableRow3.default; +exports.TableRowColumn = _TableRowColumn3.default; +exports.default = _Table3.default; /***/ }), -/* 767 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - +/* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = transition; -var _hyphenateStyleName = __webpack_require__(303); +var _getPrototypeOf = __webpack_require__(4); -var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -var _capitalizeString = __webpack_require__(187); +var _classCallCheck2 = __webpack_require__(2); -var _capitalizeString2 = _interopRequireDefault(_capitalizeString); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _isPrefixedValue = __webpack_require__(188); +var _createClass2 = __webpack_require__(3); -var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); +var _createClass3 = _interopRequireDefault(_createClass2); -var _prefixProps = __webpack_require__(301); +var _possibleConstructorReturn2 = __webpack_require__(5); -var _prefixProps2 = _interopRequireDefault(_prefixProps); +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _inherits2 = __webpack_require__(6); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var _inherits3 = _interopRequireDefault(_inherits2); -var properties = { - transition: true, - transitionProperty: true, - WebkitTransition: true, - WebkitTransitionProperty: true -}; +var _simpleAssign = __webpack_require__(7); -function transition(property, value) { - // also check for already prefixed transitions - if (typeof value === 'string' && properties[property]) { - var _ref2; +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var outputValue = prefixValue(value); - var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (value) { - return value.match(/-moz-|-ms-/) === null; - }).join(','); +var _react = __webpack_require__(1); - // if the property is already prefixed - if (property.indexOf('Webkit') > -1) { - return _defineProperty({}, property, webkitOutput); - } +var _react2 = _interopRequireDefault(_react); - return _ref2 = {}, _defineProperty(_ref2, 'Webkit' + (0, _capitalizeString2.default)(property), webkitOutput), _defineProperty(_ref2, property, outputValue), _ref2; - } +var _warning = __webpack_require__(26); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + table = _context$muiTheme.table; + + + return { + root: { + backgroundColor: table.backgroundColor, + width: '100%', + borderCollapse: 'collapse', + borderSpacing: 0, + tableLayout: 'fixed', + fontFamily: baseTheme.fontFamily + }, + bodyTable: { + height: props.fixedHeader || props.fixedFooter ? props.height : 'auto', + overflowX: 'hidden', + overflowY: 'auto' + }, + tableWrapper: { + height: props.fixedHeader || props.fixedFooter ? 'auto' : props.height, + overflow: 'auto' + } + }; } -function prefixValue(value) { - if ((0, _isPrefixedValue2.default)(value)) { - return value; - } +var Table = function (_Component) { + (0, _inherits3.default)(Table, _Component); - // only split multi values, not cubic beziers - var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); + function Table() { + var _ref; - // iterate each single value and check for transitioned properties - // that need to be prefixed as well - multipleValues.forEach(function (val, index) { - multipleValues[index] = Object.keys(_prefixProps2.default).reduce(function (out, prefix) { - var dashCasePrefix = '-' + prefix.toLowerCase() + '-'; + var _temp, _this, _ret; - Object.keys(_prefixProps2.default[prefix]).forEach(function (prop) { - var dashCaseProperty = (0, _hyphenateStyleName2.default)(prop); + (0, _classCallCheck3.default)(this, Table); - if (val.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') { - // join all prefixes and create a new value - out = val.replace(dashCaseProperty, dashCasePrefix + dashCaseProperty) + ',' + out; + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Table.__proto__ || (0, _getPrototypeOf2.default)(Table)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + allRowsSelected: false + }, _this.onCellClick = function (rowNumber, columnNumber, event) { + if (_this.props.onCellClick) _this.props.onCellClick(rowNumber, columnNumber, event); + }, _this.onCellHover = function (rowNumber, columnNumber, event) { + if (_this.props.onCellHover) _this.props.onCellHover(rowNumber, columnNumber, event); + }, _this.onCellHoverExit = function (rowNumber, columnNumber, event) { + if (_this.props.onCellHoverExit) _this.props.onCellHoverExit(rowNumber, columnNumber, event); + }, _this.onRowHover = function (rowNumber) { + if (_this.props.onRowHover) _this.props.onRowHover(rowNumber); + }, _this.onRowHoverExit = function (rowNumber) { + if (_this.props.onRowHoverExit) _this.props.onRowHoverExit(rowNumber); + }, _this.onRowSelection = function (selectedRows) { + if (_this.state.allRowsSelected) _this.setState({ allRowsSelected: false }); + if (_this.props.onRowSelection) _this.props.onRowSelection(selectedRows); + }, _this.onSelectAll = function () { + if (_this.props.onRowSelection) { + if (!_this.state.allRowsSelected) { + _this.props.onRowSelection('all'); + } else { + _this.props.onRowSelection('none'); } - }); - return out; - }, val); - }); + } - return multipleValues.join(','); -} -module.exports = exports['default']; + _this.setState({ allRowsSelected: !_this.state.allRowsSelected }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } -/***/ }), -/* 768 */ -/***/ (function(module, exports, __webpack_require__) { + (0, _createClass3.default)(Table, [{ + key: 'componentWillMount', + value: function componentWillMount() { + if (this.props.allRowsSelected) { + this.setState({ allRowsSelected: true }); + } + } + }, { + key: 'isScrollbarVisible', + value: function isScrollbarVisible() { + var tableDivHeight = this.refs.tableDiv.clientHeight; + var tableBodyHeight = this.refs.tableBody.clientHeight; -"use strict"; + return tableBodyHeight > tableDivHeight; + } + }, { + key: 'createTableHeader', + value: function createTableHeader(base) { + return _react2.default.cloneElement(base, { + enableSelectAll: base.props.enableSelectAll && this.props.selectable && this.props.multiSelectable, + onSelectAll: this.onSelectAll, + selectAllSelected: this.state.allRowsSelected + }); + } + }, { + key: 'createTableBody', + value: function createTableBody(base) { + return _react2.default.cloneElement(base, { + allRowsSelected: this.state.allRowsSelected, + multiSelectable: this.props.multiSelectable, + onCellClick: this.onCellClick, + onCellHover: this.onCellHover, + onCellHoverExit: this.onCellHoverExit, + onRowHover: this.onRowHover, + onRowHoverExit: this.onRowHoverExit, + onRowSelection: this.onRowSelection, + selectable: this.props.selectable, + style: (0, _simpleAssign2.default)({ height: this.props.height }, base.props.style) + }); + } + }, { + key: 'createTableFooter', + value: function createTableFooter(base) { + return base; + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + var _props = this.props, + children = _props.children, + className = _props.className, + fixedFooter = _props.fixedFooter, + fixedHeader = _props.fixedHeader, + style = _props.style, + wrapperStyle = _props.wrapperStyle, + headerStyle = _props.headerStyle, + bodyStyle = _props.bodyStyle, + footerStyle = _props.footerStyle; + var prepareStyles = this.context.muiTheme.prepareStyles; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = flexboxIE; + var styles = getStyles(this.props, this.context); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + var tHead = void 0; + var tFoot = void 0; + var tBody = void 0; -var alternativeValues = { - 'space-around': 'distribute', - 'space-between': 'justify', - 'flex-start': 'start', - 'flex-end': 'end' -}; -var alternativeProps = { - alignContent: 'msFlexLinePack', - alignSelf: 'msFlexItemAlign', - alignItems: 'msFlexAlign', - justifyContent: 'msFlexPack', - order: 'msFlexOrder', - flexGrow: 'msFlexPositive', - flexShrink: 'msFlexNegative', - flexBasis: 'msPreferredSize' -}; + _react2.default.Children.forEach(children, function (child) { + if (!_react2.default.isValidElement(child)) return; -function flexboxIE(property, value) { - if (alternativeProps[property]) { - return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); - } -} -module.exports = exports['default']; + var muiName = child.type.muiName; -/***/ }), -/* 769 */ -/***/ (function(module, exports, __webpack_require__) { + if (muiName === 'TableBody') { + tBody = _this2.createTableBody(child); + } else if (muiName === 'TableHeader') { + tHead = _this2.createTableHeader(child); + } else if (muiName === 'TableFooter') { + tFoot = _this2.createTableFooter(child); + } else { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: Children of the Table component must be TableBody or TableHeader or TableFooter.\n Nothing is rendered.') : void 0; + } + }); -"use strict"; + // If we could not find a table-header and a table-body, do not attempt to display anything. + if (!tBody && !tHead) return null; + var mergedTableStyle = (0, _simpleAssign2.default)(styles.root, style); + var headerTable = void 0; + var footerTable = void 0; + var inlineHeader = void 0; + var inlineFooter = void 0; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = flexboxOld; + if (fixedHeader) { + headerTable = _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, headerStyle)) }, + _react2.default.createElement( + 'table', + { className: className, style: mergedTableStyle }, + tHead + ) + ); + } else { + inlineHeader = tHead; + } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + if (tFoot !== undefined) { + if (fixedFooter) { + footerTable = _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, footerStyle)) }, + _react2.default.createElement( + 'table', + { className: className, style: prepareStyles(mergedTableStyle) }, + tFoot + ) + ); + } else { + inlineFooter = tFoot; + } + } -var alternativeValues = { - 'space-around': 'justify', - 'space-between': 'justify', - 'flex-start': 'start', - 'flex-end': 'end', - 'wrap-reverse': 'multiple', - wrap: 'multiple' -}; + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.tableWrapper, wrapperStyle)) }, + headerTable, + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.bodyTable, bodyStyle)), ref: 'tableDiv' }, + _react2.default.createElement( + 'table', + { className: className, style: mergedTableStyle, ref: 'tableBody' }, + inlineHeader, + inlineFooter, + tBody + ) + ), + footerTable + ); + } + }]); + return Table; +}(_react.Component); -var alternativeProps = { - alignItems: 'WebkitBoxAlign', - justifyContent: 'WebkitBoxPack', - flexWrap: 'WebkitBoxLines' +Table.defaultProps = { + allRowsSelected: false, + fixedFooter: true, + fixedHeader: true, + height: 'inherit', + multiSelectable: false, + selectable: true }; - -function flexboxOld(property, value) { - if (property === 'flexDirection' && typeof value === 'string') { - return { - WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', - WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' - }; - } - if (alternativeProps[property]) { - return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); - } -} -module.exports = exports['default']; +Table.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Table.propTypes = { + /** + * Set to true to indicate that all rows should be selected. + */ + allRowsSelected: _react.PropTypes.bool, + /** + * Override the inline-styles of the body's table element. + */ + bodyStyle: _react.PropTypes.object, + /** + * Children passed to table. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the footer will appear fixed below the table. + * The default value is true. + */ + fixedFooter: _react.PropTypes.bool, + /** + * If true, the header will appear fixed above the table. + * The default value is true. + */ + fixedHeader: _react.PropTypes.bool, + /** + * Override the inline-styles of the footer's table element. + */ + footerStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the header's table element. + */ + headerStyle: _react.PropTypes.object, + /** + * The height of the table. + */ + height: _react.PropTypes.string, + /** + * If true, multiple table rows can be selected. + * CTRL/CMD+Click and SHIFT+Click are valid actions. + * The default value is false. + */ + multiSelectable: _react.PropTypes.bool, + /** + * Called when a row cell is clicked. + * rowNumber is the row number and columnId is + * the column number or the column key. + */ + onCellClick: _react.PropTypes.func, + /** + * Called when a table cell is hovered. + * rowNumber is the row number of the hovered row + * and columnId is the column number or the column key of the cell. + */ + onCellHover: _react.PropTypes.func, + /** + * Called when a table cell is no longer hovered. + * rowNumber is the row number of the row and columnId + * is the column number or the column key of the cell. + */ + onCellHoverExit: _react.PropTypes.func, + /** + * Called when a table row is hovered. + * rowNumber is the row number of the hovered row. + */ + onRowHover: _react.PropTypes.func, + /** + * Called when a table row is no longer hovered. + * rowNumber is the row number of the row that is no longer hovered. + */ + onRowHoverExit: _react.PropTypes.func, + /** + * Called when a row is selected. + * selectedRows is an array of all row selections. + * IF all rows have been selected, the string "all" + * will be returned instead to indicate that all rows have been selected. + */ + onRowSelection: _react.PropTypes.func, + /** + * If true, table rows can be selected. + * If multiple row selection is desired, enable multiSelectable. + * The default value is true. + */ + selectable: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of the table's wrapper element. + */ + wrapperStyle: _react.PropTypes.object +} : void 0; +exports.default = Table; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 770 */ +/* 771 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - +/* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); -var _bowser = __webpack_require__(771); +var _getIterator2 = __webpack_require__(143); -var _bowser2 = _interopRequireDefault(_bowser); +var _getIterator3 = _interopRequireDefault(_getIterator2); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _toConsumableArray2 = __webpack_require__(53); -var vendorPrefixes = { - Webkit: ['chrome', 'safari', 'ios', 'android', 'phantom', 'opera', 'webos', 'blackberry', 'bada', 'tizen', 'chromium', 'vivaldi'], - Moz: ['firefox', 'seamonkey', 'sailfish'], - ms: ['msie', 'msedge'] -}; -var browsers = { - chrome: [['chrome'], ['chromium']], - safari: [['safari']], - firefox: [['firefox']], - edge: [['msedge']], - opera: [['opera'], ['vivaldi']], - ios_saf: [['ios', 'mobile'], ['ios', 'tablet']], - ie: [['msie']], - op_mini: [['opera', 'mobile'], ['opera', 'tablet']], - and_uc: [['android', 'mobile'], ['android', 'tablet']], - android: [['android', 'mobile'], ['android', 'tablet']] -}; +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); -var browserByInfo = function browserByInfo(info) { - if (info.firefox) { - return 'firefox'; - } - var name = ''; +var _typeof2 = __webpack_require__(42); - Object.keys(browsers).forEach(function (browser) { - browsers[browser].forEach(function (condition) { - var match = 0; - condition.forEach(function (single) { - if (info[single]) { - match += 1; - } - }); - if (condition.length === match) { - name = browser; - } - }); - }); +var _typeof3 = _interopRequireDefault(_typeof2); - return name; -}; +var _extends2 = __webpack_require__(8); -/** - * Uses bowser to get default browser information such as version and name - * Evaluates bowser info and adds vendorPrefix information - * @param {string} userAgent - userAgent that gets evaluated - */ +var _extends3 = _interopRequireDefault(_extends2); -exports.default = function (userAgent) { - if (!userAgent) { - return false; - } - var info = _bowser2.default._detect(userAgent); +var _getPrototypeOf = __webpack_require__(4); - Object.keys(vendorPrefixes).forEach(function (prefix) { - vendorPrefixes[prefix].forEach(function (browser) { - if (info[browser]) { - info.prefix = { - inline: prefix, - css: '-' + prefix.toLowerCase() + '-' - }; - } - }); - }); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - info.browser = browserByInfo(info); +var _classCallCheck2 = __webpack_require__(2); - // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN - info.version = info.version ? parseFloat(info.version) : parseInt(parseFloat(info.osversion), 10); - info.osversion = parseFloat(info.osversion); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - // iOS forces all browsers to use Safari under the hood - // as the Safari version seems to match the iOS version - // we just explicitely use the osversion instead - // https://github.com/rofrischmann/inline-style-prefixer/issues/72 - if (info.browser === 'ios_saf' && info.version > info.osversion) { - info.version = info.osversion; - info.safari = true; - } +var _createClass2 = __webpack_require__(3); - // seperate native android chrome - // https://github.com/rofrischmann/inline-style-prefixer/issues/45 - if (info.browser === 'android' && info.chrome && info.version > 37) { - info.browser = 'and_chr'; - } +var _createClass3 = _interopRequireDefault(_createClass2); - // For android < 4.4 we want to check the osversion - // not the chrome version, see issue #26 - // https://github.com/rofrischmann/inline-style-prefixer/issues/26 - if (info.browser === 'android' && info.osversion < 5) { - info.version = info.osversion; - } +var _possibleConstructorReturn2 = __webpack_require__(5); - return info; -}; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -module.exports = exports['default']; +var _inherits2 = __webpack_require__(6); -/***/ }), -/* 771 */ -/***/ (function(module, exports, __webpack_require__) { +var _inherits3 = _interopRequireDefault(_inherits2); -/*! - * Bowser - a browser detector - * https://github.com/ded/bowser - * MIT License | (c) Dustin Diaz 2015 - */ +var _simpleAssign = __webpack_require__(7); -!function (root, name, definition) { - if (typeof module != 'undefined' && module.exports) module.exports = definition() - else if (true) __webpack_require__(772)(name, definition) - else root[name] = definition() -}(this, 'bowser', function () { - /** - * See useragents.js for examples of navigator.userAgent - */ +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); - var t = true +var _react = __webpack_require__(1); - function detect(ua) { +var _react2 = _interopRequireDefault(_react); - function getFirstMatch(regex) { - var match = ua.match(regex); - return (match && match.length > 1 && match[1]) || ''; - } +var _Checkbox = __webpack_require__(187); - function getSecondMatch(regex) { - var match = ua.match(regex); - return (match && match.length > 1 && match[2]) || ''; - } +var _Checkbox2 = _interopRequireDefault(_Checkbox); - var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase() - , likeAndroid = /like android/i.test(ua) - , android = !likeAndroid && /android/i.test(ua) - , nexusMobile = /nexus\s*[0-6]\s*/i.test(ua) - , nexusTablet = !nexusMobile && /nexus\s*[0-9]+/i.test(ua) - , chromeos = /CrOS/.test(ua) - , silk = /silk/i.test(ua) - , sailfish = /sailfish/i.test(ua) - , tizen = /tizen/i.test(ua) - , webos = /(web|hpw)os/i.test(ua) - , windowsphone = /windows phone/i.test(ua) - , samsungBrowser = /SamsungBrowser/i.test(ua) - , windows = !windowsphone && /windows/i.test(ua) - , mac = !iosdevice && !silk && /macintosh/i.test(ua) - , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua) - , edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i) - , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i) - , tablet = /tablet/i.test(ua) && !/tablet pc/i.test(ua) - , mobile = !tablet && /[^-]mobi/i.test(ua) - , xbox = /xbox/i.test(ua) - , result +var _TableRowColumn = __webpack_require__(196); - if (/opera/i.test(ua)) { - // an old Opera - result = { - name: 'Opera' - , opera: t - , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i) - } - } else if (/opr|opios/i.test(ua)) { - // a new Opera - result = { - name: 'Opera' - , opera: t - , version: getFirstMatch(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i) || versionIdentifier - } - } - else if (/SamsungBrowser/i.test(ua)) { - result = { - name: 'Samsung Internet for Android' - , samsungBrowser: t - , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i) - } - } - else if (/coast/i.test(ua)) { - result = { - name: 'Opera Coast' - , coast: t - , version: versionIdentifier || getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i) - } - } - else if (/yabrowser/i.test(ua)) { - result = { - name: 'Yandex Browser' - , yandexbrowser: t - , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i) - } - } - else if (/ucbrowser/i.test(ua)) { - result = { - name: 'UC Browser' - , ucbrowser: t - , version: getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i) - } - } - else if (/mxios/i.test(ua)) { - result = { - name: 'Maxthon' - , maxthon: t - , version: getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i) - } - } - else if (/epiphany/i.test(ua)) { - result = { - name: 'Epiphany' - , epiphany: t - , version: getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i) - } - } - else if (/puffin/i.test(ua)) { - result = { - name: 'Puffin' - , puffin: t - , version: getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i) - } - } - else if (/sleipnir/i.test(ua)) { - result = { - name: 'Sleipnir' - , sleipnir: t - , version: getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i) - } - } - else if (/k-meleon/i.test(ua)) { - result = { - name: 'K-Meleon' - , kMeleon: t - , version: getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i) - } - } - else if (windowsphone) { - result = { - name: 'Windows Phone' - , windowsphone: t - } - if (edgeVersion) { - result.msedge = t - result.version = edgeVersion - } - else { - result.msie = t - result.version = getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i) - } - } - else if (/msie|trident/i.test(ua)) { - result = { - name: 'Internet Explorer' - , msie: t - , version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i) - } - } else if (chromeos) { - result = { - name: 'Chrome' - , chromeos: t - , chromeBook: t - , chrome: t - , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) - } - } else if (/chrome.+? edge/i.test(ua)) { - result = { - name: 'Microsoft Edge' - , msedge: t - , version: edgeVersion - } - } - else if (/vivaldi/i.test(ua)) { - result = { - name: 'Vivaldi' - , vivaldi: t - , version: getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i) || versionIdentifier - } - } - else if (sailfish) { - result = { - name: 'Sailfish' - , sailfish: t - , version: getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i) - } - } - else if (/seamonkey\//i.test(ua)) { - result = { - name: 'SeaMonkey' - , seamonkey: t - , version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i) - } - } - else if (/firefox|iceweasel|fxios/i.test(ua)) { - result = { - name: 'Firefox' - , firefox: t - , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i) - } - if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) { - result.firefoxos = t - } - } - else if (silk) { - result = { - name: 'Amazon Silk' - , silk: t - , version : getFirstMatch(/silk\/(\d+(\.\d+)?)/i) - } - } - else if (/phantom/i.test(ua)) { - result = { - name: 'PhantomJS' - , phantom: t - , version: getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i) - } - } - else if (/slimerjs/i.test(ua)) { - result = { - name: 'SlimerJS' - , slimer: t - , version: getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i) - } - } - else if (/blackberry|\bbb\d+/i.test(ua) || /rim\stablet/i.test(ua)) { - result = { - name: 'BlackBerry' - , blackberry: t - , version: versionIdentifier || getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i) - } - } - else if (webos) { - result = { - name: 'WebOS' - , webos: t - , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i) - }; - /touchpad\//i.test(ua) && (result.touchpad = t) - } - else if (/bada/i.test(ua)) { - result = { - name: 'Bada' - , bada: t - , version: getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i) - }; - } - else if (tizen) { - result = { - name: 'Tizen' - , tizen: t - , version: getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || versionIdentifier - }; - } - else if (/qupzilla/i.test(ua)) { - result = { - name: 'QupZilla' - , qupzilla: t - , version: getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || versionIdentifier - } - } - else if (/chromium/i.test(ua)) { - result = { - name: 'Chromium' - , chromium: t - , version: getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || versionIdentifier - } - } - else if (/chrome|crios|crmo/i.test(ua)) { - result = { - name: 'Chrome' - , chrome: t - , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) - } - } - else if (android) { - result = { - name: 'Android' - , version: versionIdentifier - } - } - else if (/safari|applewebkit/i.test(ua)) { - result = { - name: 'Safari' - , safari: t - } - if (versionIdentifier) { - result.version = versionIdentifier - } - } - else if (iosdevice) { - result = { - name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod' - } - // WTF: version is not part of user agent in web apps - if (versionIdentifier) { - result.version = versionIdentifier - } - } - else if(/googlebot/i.test(ua)) { - result = { - name: 'Googlebot' - , googlebot: t - , version: getFirstMatch(/googlebot\/(\d+(\.\d+))/i) || versionIdentifier - } - } - else { - result = { - name: getFirstMatch(/^(.*)\/(.*) /), - version: getSecondMatch(/^(.*)\/(.*) /) - }; - } +var _TableRowColumn2 = _interopRequireDefault(_TableRowColumn); - // set webkit or gecko flag for browsers based on these engines - if (!result.msedge && /(apple)?webkit/i.test(ua)) { - if (/(apple)?webkit\/537\.36/i.test(ua)) { - result.name = result.name || "Blink" - result.blink = t - } else { - result.name = result.name || "Webkit" - result.webkit = t - } - if (!result.version && versionIdentifier) { - result.version = versionIdentifier - } - } else if (!result.opera && /gecko\//i.test(ua)) { - result.name = result.name || "Gecko" - result.gecko = t - result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i) - } +var _ClickAwayListener = __webpack_require__(294); - // set OS flags for platforms that have multiple browsers - if (!result.windowsphone && !result.msedge && (android || result.silk)) { - result.android = t - } else if (!result.windowsphone && !result.msedge && iosdevice) { - result[iosdevice] = t - result.ios = t - } else if (mac) { - result.mac = t - } else if (xbox) { - result.xbox = t - } else if (windows) { - result.windows = t - } else if (linux) { - result.linux = t - } +var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener); - function getWindowsVersion (s) { - switch (s) { - case 'NT': return 'NT' - case 'XP': return 'XP' - case 'NT 5.0': return '2000' - case 'NT 5.1': return 'XP' - case 'NT 5.2': return '2003' - case 'NT 6.0': return 'Vista' - case 'NT 6.1': return '7' - case 'NT 6.2': return '8' - case 'NT 6.3': return '8.1' - case 'NT 10.0': return '10' - default: return undefined - } - } - - // OS version extraction - var osVersion = ''; - if (result.windows) { - osVersion = getWindowsVersion(getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i)) - } else if (result.windowsphone) { - osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i); - } else if (result.mac) { - osVersion = getFirstMatch(/Mac OS X (\d+([_\.\s]\d+)*)/i); - osVersion = osVersion.replace(/[_\s]/g, '.'); - } else if (iosdevice) { - osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i); - osVersion = osVersion.replace(/[_\s]/g, '.'); - } else if (android) { - osVersion = getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i); - } else if (result.webos) { - osVersion = getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i); - } else if (result.blackberry) { - osVersion = getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i); - } else if (result.bada) { - osVersion = getFirstMatch(/bada\/(\d+(\.\d+)*)/i); - } else if (result.tizen) { - osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i); - } - if (osVersion) { - result.osversion = osVersion; - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // device type extraction - var osMajorVersion = !result.windows && osVersion.split('.')[0]; - if ( - tablet - || nexusTablet - || iosdevice == 'ipad' - || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile))) - || result.silk - ) { - result.tablet = t - } else if ( - mobile - || iosdevice == 'iphone' - || iosdevice == 'ipod' - || android - || nexusMobile - || result.blackberry - || result.webos - || result.bada - ) { - result.mobile = t - } +var TableBody = function (_Component) { + (0, _inherits3.default)(TableBody, _Component); - // Graded Browser Support - // http://developer.yahoo.com/yui/articles/gbs - if (result.msedge || - (result.msie && result.version >= 10) || - (result.yandexbrowser && result.version >= 15) || - (result.vivaldi && result.version >= 1.0) || - (result.chrome && result.version >= 20) || - (result.samsungBrowser && result.version >= 4) || - (result.firefox && result.version >= 20.0) || - (result.safari && result.version >= 6) || - (result.opera && result.version >= 10.0) || - (result.ios && result.osversion && result.osversion.split(".")[0] >= 6) || - (result.blackberry && result.version >= 10.1) - || (result.chromium && result.version >= 20) - ) { - result.a = t; - } - else if ((result.msie && result.version < 10) || - (result.chrome && result.version < 20) || - (result.firefox && result.version < 20.0) || - (result.safari && result.version < 6) || - (result.opera && result.version < 10.0) || - (result.ios && result.osversion && result.osversion.split(".")[0] < 6) - || (result.chromium && result.version < 20) - ) { - result.c = t - } else result.x = t + function TableBody() { + var _ref; - return result - } + var _temp, _this, _ret; - var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '') + (0, _classCallCheck3.default)(this, TableBody); - bowser.test = function (browserList) { - for (var i = 0; i < browserList.length; ++i) { - var browserItem = browserList[i]; - if (typeof browserItem=== 'string') { - if (browserItem in bowser) { - return true; + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableBody.__proto__ || (0, _getPrototypeOf2.default)(TableBody)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + selectedRows: [] + }, _this.handleClickAway = function () { + if (_this.props.deselectOnClickaway && _this.state.selectedRows.length) { + _this.setState({ + selectedRows: [] + }); + if (_this.props.onRowSelection) { + _this.props.onRowSelection([]); } } - } - return false; - } + }, _this.onRowClick = function (event, rowNumber) { + event.stopPropagation(); - /** - * Get version precisions count - * - * @example - * getVersionPrecision("1.10.3") // 3 - * - * @param {string} version - * @return {number} - */ - function getVersionPrecision(version) { - return version.split(".").length; + if (_this.props.selectable) { + // Prevent text selection while selecting rows. + window.getSelection().removeAllRanges(); + _this.processRowSelection(event, rowNumber); + } + }, _this.onCellClick = function (event, rowNumber, columnNumber) { + event.stopPropagation(); + if (_this.props.onCellClick) { + _this.props.onCellClick(rowNumber, _this.getColumnId(columnNumber), event); + } + }, _this.onCellHover = function (event, rowNumber, columnNumber) { + if (_this.props.onCellHover) { + _this.props.onCellHover(rowNumber, _this.getColumnId(columnNumber), event); + } + _this.onRowHover(event, rowNumber); + }, _this.onCellHoverExit = function (event, rowNumber, columnNumber) { + if (_this.props.onCellHoverExit) { + _this.props.onCellHoverExit(rowNumber, _this.getColumnId(columnNumber), event); + } + _this.onRowHoverExit(event, rowNumber); + }, _this.onRowHover = function (event, rowNumber) { + if (_this.props.onRowHover) { + _this.props.onRowHover(rowNumber); + } + }, _this.onRowHoverExit = function (event, rowNumber) { + if (_this.props.onRowHoverExit) { + _this.props.onRowHoverExit(rowNumber); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); } - /** - * Array::map polyfill - * - * @param {Array} arr - * @param {Function} iterator - * @return {Array} - */ - function map(arr, iterator) { - var result = [], i; - if (Array.prototype.map) { - return Array.prototype.map.call(arr, iterator); + (0, _createClass3.default)(TableBody, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ selectedRows: this.calculatePreselectedRows(this.props) }); } - for (i = 0; i < arr.length; i++) { - result.push(iterator(arr[i])); + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.allRowsSelected !== nextProps.allRowsSelected) { + if (!nextProps.allRowsSelected) { + this.setState({ + selectedRows: [] + }); + } else { + this.setState({ + selectedRows: this.calculatePreselectedRows(nextProps) + }); + } + } } - return result; - } + }, { + key: 'createRows', + value: function createRows() { + var _this2 = this; - /** - * Calculate browser version weight - * - * @example - * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1 - * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1 - * compareVersions(['1.10.2.1', '1.10.2.1']); // 0 - * compareVersions(['1.10.2.1', '1.0800.2']); // -1 - * - * @param {Array<String>} versions versions to compare - * @return {Number} comparison result - */ - function compareVersions(versions) { - // 1) get common precision for both versions, for example for "10.0" and "9" it should be 2 - var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1])); - var chunks = map(versions, function (version) { - var delta = precision - getVersionPrecision(version); + var numChildren = _react2.default.Children.count(this.props.children); + var rowNumber = 0; + var handlers = { + onCellClick: this.onCellClick, + onCellHover: this.onCellHover, + onCellHoverExit: this.onCellHoverExit, + onRowHover: this.onRowHover, + onRowHoverExit: this.onRowHoverExit, + onRowClick: this.onRowClick + }; - // 2) "9" -> "9.0" (for precision = 2) - version = version + new Array(delta + 1).join(".0"); + return _react2.default.Children.map(this.props.children, function (child) { + if (_react2.default.isValidElement(child)) { + var _ret2 = function () { + var props = { + hoverable: _this2.props.showRowHover, + selected: _this2.isRowSelected(rowNumber), + striped: _this2.props.stripedRows && rowNumber % 2 === 0, + rowNumber: rowNumber++ + }; - // 3) "9.0" -> ["000000000"", "000000009"] - return map(version.split("."), function (chunk) { - return new Array(20 - chunk.length).join("0") + chunk; - }).reverse(); - }); + if (rowNumber === numChildren) { + props.displayBorder = false; + } - // iterate in reverse order by reversed chunks array - while (--precision >= 0) { - // 4) compare: "000000009" > "000000010" = false (but "9" > "10" = true) - if (chunks[0][precision] > chunks[1][precision]) { - return 1; + var children = [_this2.createRowCheckboxColumn(props)]; + + _react2.default.Children.forEach(child.props.children, function (child) { + children.push(child); + }); + + return { + v: _react2.default.cloneElement(child, (0, _extends3.default)({}, props, handlers), children) + }; + }(); + + if ((typeof _ret2 === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret2)) === "object") return _ret2.v; + } + }); + } + }, { + key: 'createRowCheckboxColumn', + value: function createRowCheckboxColumn(rowProps) { + if (!this.props.displayRowCheckbox) { + return null; } - else if (chunks[0][precision] === chunks[1][precision]) { - if (precision === 0) { - // all version chunks are same - return 0; + + var key = rowProps.rowNumber + '-cb'; + var disabled = !this.props.selectable; + var checkbox = _react2.default.createElement(_Checkbox2.default, { + ref: 'rowSelectCB', + name: key, + value: 'selected', + disabled: disabled, + checked: rowProps.selected + }); + + return _react2.default.createElement( + _TableRowColumn2.default, + { + key: key, + columnNumber: 0, + style: { + width: 24, + cursor: disabled ? 'not-allowed' : 'inherit' + } + }, + checkbox + ); + } + }, { + key: 'calculatePreselectedRows', + value: function calculatePreselectedRows(props) { + // Determine what rows are 'pre-selected'. + var preSelectedRows = []; + + if (props.selectable && props.preScanRows) { + (function () { + var index = 0; + _react2.default.Children.forEach(props.children, function (child) { + if (_react2.default.isValidElement(child)) { + if (child.props.selected && (preSelectedRows.length === 0 || props.multiSelectable)) { + preSelectedRows.push(index); + } + + index++; + } + }); + })(); + } + + return preSelectedRows; + } + }, { + key: 'isRowSelected', + value: function isRowSelected(rowNumber) { + if (this.props.allRowsSelected) { + return true; + } + + for (var i = 0; i < this.state.selectedRows.length; i++) { + var selection = this.state.selectedRows[i]; + + if ((typeof selection === 'undefined' ? 'undefined' : (0, _typeof3.default)(selection)) === 'object') { + if (this.isValueInRange(rowNumber, selection)) return true; + } else { + if (selection === rowNumber) return true; } } - else { - return -1; + + return false; + } + }, { + key: 'isValueInRange', + value: function isValueInRange(value, range) { + if (!range) return false; + + if (range.start <= value && value <= range.end || range.end <= value && value <= range.start) { + return true; } + + return false; } - } + }, { + key: 'processRowSelection', + value: function processRowSelection(event, rowNumber) { + var selectedRows = this.state.selectedRows; - /** - * Check if browser is unsupported - * - * @example - * bowser.isUnsupportedBrowser({ - * msie: "10", - * firefox: "23", - * chrome: "29", - * safari: "5.1", - * opera: "16", - * phantom: "534" - * }); - * - * @param {Object} minVersions map of minimal version to browser - * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map - * @param {String} [ua] user agent string - * @return {Boolean} - */ - function isUnsupportedBrowser(minVersions, strictMode, ua) { - var _bowser = bowser; + if (event.shiftKey && this.props.multiSelectable && selectedRows.length) { + var lastIndex = selectedRows.length - 1; + var lastSelection = selectedRows[lastIndex]; - // make strictMode param optional with ua param usage - if (typeof strictMode === 'string') { - ua = strictMode; - strictMode = void(0); + if ((typeof lastSelection === 'undefined' ? 'undefined' : (0, _typeof3.default)(lastSelection)) === 'object') { + lastSelection.end = rowNumber; + } else { + selectedRows.splice(lastIndex, 1, { start: lastSelection, end: rowNumber }); + } + } else if ((event.ctrlKey && !event.metaKey || event.metaKey && !event.ctrlKey) && this.props.multiSelectable) { + var idx = selectedRows.indexOf(rowNumber); + if (idx < 0) { + var foundRange = false; + for (var i = 0; i < selectedRows.length; i++) { + var range = selectedRows[i]; + if ((typeof range === 'undefined' ? 'undefined' : (0, _typeof3.default)(range)) !== 'object') continue; + + if (this.isValueInRange(rowNumber, range)) { + var _selectedRows; + + foundRange = true; + var values = this.splitRange(range, rowNumber); + (_selectedRows = selectedRows).splice.apply(_selectedRows, [i, 1].concat((0, _toConsumableArray3.default)(values))); + } + } + + if (!foundRange) selectedRows.push(rowNumber); + } else { + selectedRows.splice(idx, 1); + } + } else { + if (selectedRows.length === 1 && selectedRows[0] === rowNumber) { + selectedRows = []; + } else { + selectedRows = [rowNumber]; + } + } + + this.setState({ selectedRows: selectedRows }); + if (this.props.onRowSelection) this.props.onRowSelection(this.flattenRanges(selectedRows)); } + }, { + key: 'splitRange', + value: function splitRange(range, splitPoint) { + var splitValues = []; + var startOffset = range.start - splitPoint; + var endOffset = range.end - splitPoint; - if (strictMode === void(0)) { - strictMode = false; + // Process start half + splitValues.push.apply(splitValues, (0, _toConsumableArray3.default)(this.genRangeOfValues(splitPoint, startOffset))); + + // Process end half + splitValues.push.apply(splitValues, (0, _toConsumableArray3.default)(this.genRangeOfValues(splitPoint, endOffset))); + + return splitValues; } - if (ua) { - _bowser = detect(ua); + }, { + key: 'genRangeOfValues', + value: function genRangeOfValues(start, offset) { + var values = []; + var dir = offset > 0 ? -1 : 1; // This forces offset to approach 0 from either direction. + while (offset !== 0) { + values.push(start + offset); + offset += dir; + } + + return values; } + }, { + key: 'flattenRanges', + value: function flattenRanges(selectedRows) { + var rows = []; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; - var version = "" + _bowser.version; - for (var browser in minVersions) { - if (minVersions.hasOwnProperty(browser)) { - if (_bowser[browser]) { - if (typeof minVersions[browser] !== 'string') { - throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions)); - } + try { + for (var _iterator = (0, _getIterator3.default)(selectedRows), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var selection = _step.value; - // browser version and min supported version. - return compareVersions([version, minVersions[browser]]) < 0; + if ((typeof selection === 'undefined' ? 'undefined' : (0, _typeof3.default)(selection)) === 'object') { + var values = this.genRangeOfValues(selection.end, selection.start - selection.end); + rows.push.apply(rows, [selection.end].concat((0, _toConsumableArray3.default)(values))); + } else { + rows.push(selection); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } } } + + return rows.sort(); } + }, { + key: 'getColumnId', + value: function getColumnId(columnNumber) { + var columnId = columnNumber; + if (this.props.displayRowCheckbox) { + columnId--; + } + + return columnId; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + className = _props.className, + style = _props.style; + var prepareStyles = this.context.muiTheme.prepareStyles; - return strictMode; // not found - } + return _react2.default.createElement( + _ClickAwayListener2.default, + { onClickAway: this.handleClickAway }, + _react2.default.createElement( + 'tbody', + { className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, + this.createRows() + ) + ); + } + }]); + return TableBody; +}(_react.Component); + +TableBody.muiName = 'TableBody'; +TableBody.defaultProps = { + allRowsSelected: false, + deselectOnClickaway: true, + displayRowCheckbox: true, + multiSelectable: false, + preScanRows: true, + selectable: true, + style: {} +}; +TableBody.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? TableBody.propTypes = { /** - * Check if browser is supported - * - * @param {Object} minVersions map of minimal version to browser - * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map - * @param {String} [ua] user agent string - * @return {Boolean} + * @ignore + * Set to true to indicate that all rows should be selected. */ - function check(minVersions, strictMode, ua) { - return !isUnsupportedBrowser(minVersions, strictMode, ua); - } + allRowsSelected: _react.PropTypes.bool, + /** + * Children passed to table body. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Controls whether or not to deselect all selected + * rows after clicking outside the table. + */ + deselectOnClickaway: _react.PropTypes.bool, + /** + * Controls the display of the row checkbox. The default value is true. + */ + displayRowCheckbox: _react.PropTypes.bool, + /** + * @ignore + * If true, multiple table rows can be selected. + * CTRL/CMD+Click and SHIFT+Click are valid actions. + * The default value is false. + */ + multiSelectable: _react.PropTypes.bool, + /** + * @ignore + * Callback function for when a cell is clicked. + */ + onCellClick: _react.PropTypes.func, + /** + * @ignore + * Called when a table cell is hovered. rowNumber + * is the row number of the hovered row and columnId + * is the column number or the column key of the cell. + */ + onCellHover: _react.PropTypes.func, + /** + * @ignore + * Called when a table cell is no longer hovered. + * rowNumber is the row number of the row and columnId + * is the column number or the column key of the cell. + */ + onCellHoverExit: _react.PropTypes.func, + /** + * @ignore + * Called when a table row is hovered. + * rowNumber is the row number of the hovered row. + */ + onRowHover: _react.PropTypes.func, + /** + * @ignore + * Called when a table row is no longer + * hovered. rowNumber is the row number of the row + * that is no longer hovered. + */ + onRowHoverExit: _react.PropTypes.func, + /** + * @ignore + * Called when a row is selected. selectedRows is an + * array of all row selections. IF all rows have been selected, + * the string "all" will be returned instead to indicate that + * all rows have been selected. + */ + onRowSelection: _react.PropTypes.func, + /** + * Controls whether or not the rows are pre-scanned to determine + * initial state. If your table has a large number of rows and + * you are experiencing a delay in rendering, turn off this property. + */ + preScanRows: _react.PropTypes.bool, + /** + * @ignore + * If true, table rows can be selected. If multiple + * row selection is desired, enable multiSelectable. + * The default value is true. + */ + selectable: _react.PropTypes.bool, + /** + * If true, table rows will be highlighted when + * the cursor is hovering over the row. The default + * value is false. + */ + showRowHover: _react.PropTypes.bool, + /** + * If true, every other table row starting + * with the first row will be striped. The default value is false. + */ + stripedRows: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableBody; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) - bowser.isUnsupportedBrowser = isUnsupportedBrowser; - bowser.compareVersions = compareVersions; - bowser.check = check; +/***/ }), +/* 772 */ +/***/ (function(module, exports, __webpack_require__) { - /* - * Set our detect method to the main bowser object so we can - * reuse it to test other user agents. - * This is needed to implement future tests. - */ - bowser._detect = detect; +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { - return bowser +Object.defineProperty(exports, "__esModule", { + value: true }); +var _extends2 = __webpack_require__(8); -/***/ }), -/* 772 */ -/***/ (function(module, exports) { +var _extends3 = _interopRequireDefault(_extends2); -module.exports = function() { - throw new Error("define cannot be used indirect"); -}; +var _toConsumableArray2 = __webpack_require__(53); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _TableRowColumn = __webpack_require__(196); + +var _TableRowColumn2 = _interopRequireDefault(_TableRowColumn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tableFooter = context.muiTheme.tableFooter; + + + return { + cell: { + borderTop: '1px solid ' + tableFooter.borderColor, + verticalAlign: 'bottom', + padding: 20, + textAlign: 'left', + whiteSpace: 'nowrap' + } + }; +} +var TableFooter = function (_Component) { + (0, _inherits3.default)(TableFooter, _Component); + + function TableFooter() { + (0, _classCallCheck3.default)(this, TableFooter); + return (0, _possibleConstructorReturn3.default)(this, (TableFooter.__proto__ || (0, _getPrototypeOf2.default)(TableFooter)).apply(this, arguments)); + } + + (0, _createClass3.default)(TableFooter, [{ + key: 'render', + value: function render() { + var _props = this.props, + adjustForCheckbox = _props.adjustForCheckbox, + children = _props.children, + className = _props.className, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['adjustForCheckbox', 'children', 'className', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var footerRows = _react2.default.Children.map(children, function (child, rowNumber) { + var newChildProps = { + displayBorder: false, + key: 'f-' + rowNumber, + rowNumber: rowNumber, + style: (0, _simpleAssign2.default)({}, styles.cell, child.props.style) + }; + + var newDescendants = void 0; + + if (adjustForCheckbox) { + newDescendants = [_react2.default.createElement(_TableRowColumn2.default, { key: 'fpcb' + rowNumber, style: { width: 24 } })].concat((0, _toConsumableArray3.default)(_react2.default.Children.toArray(child.props.children))); + } else { + newDescendants = child.props.children; + } + + return _react2.default.cloneElement(child, newChildProps, newDescendants); + }); + + return _react2.default.createElement( + 'tfoot', + (0, _extends3.default)({ className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, other), + footerRows + ); + } + }]); + return TableFooter; +}(_react.Component); + +TableFooter.muiName = 'TableFooter'; +TableFooter.defaultProps = { + adjustForCheckbox: true, + style: {} +}; +TableFooter.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? TableFooter.propTypes = { + /** + * @ignore + * Controls whether or not header rows should be adjusted + * for a checkbox column. If the select all checkbox is true, + * this property will not influence the number of columns. + * This is mainly useful for "super header" rows so that + * the checkbox column does not create an offset that needs + * to be accounted for manually. + */ + adjustForCheckbox: _react.PropTypes.bool, + /** + * Children passed to table footer. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableFooter; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), /* 773 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _Checkbox = __webpack_require__(187); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +var _TableHeaderColumn = __webpack_require__(311); + +var _TableHeaderColumn2 = _interopRequireDefault(_TableHeaderColumn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tableHeader = context.muiTheme.tableHeader; + + + return { + root: { + borderBottom: '1px solid ' + tableHeader.borderColor + } + }; +} + +var TableHeader = function (_Component) { + (0, _inherits3.default)(TableHeader, _Component); + + function TableHeader() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TableHeader); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableHeader.__proto__ || (0, _getPrototypeOf2.default)(TableHeader)).call.apply(_ref, [this].concat(args))), _this), _this.handleCheckAll = function (event, checked) { + if (_this.props.onSelectAll) { + _this.props.onSelectAll(checked); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TableHeader, [{ + key: 'createSuperHeaderRows', + value: function createSuperHeaderRows() { + var numChildren = _react2.default.Children.count(this.props.children); + if (numChildren === 1) return undefined; + + var superHeaders = []; + for (var index = 0; index < numChildren - 1; index++) { + var child = this.props.children[index]; + + if (!_react2.default.isValidElement(child)) continue; + + var props = { + key: 'sh' + index, + rowNumber: index + }; + superHeaders.push(this.createSuperHeaderRow(child, props)); + } + + if (superHeaders.length) return superHeaders; + } + }, { + key: 'createSuperHeaderRow', + value: function createSuperHeaderRow(child, props) { + var children = []; + if (this.props.adjustForCheckbox) { + children.push(this.getCheckboxPlaceholder(props)); + } + _react2.default.Children.forEach(child.props.children, function (child) { + children.push(child); + }); + + return _react2.default.cloneElement(child, props, children); + } + }, { + key: 'createBaseHeaderRow', + value: function createBaseHeaderRow() { + var numChildren = _react2.default.Children.count(this.props.children); + var child = numChildren === 1 ? this.props.children : this.props.children[numChildren - 1]; + var props = { + key: 'h' + numChildren, + rowNumber: numChildren + }; + + var children = [this.getSelectAllCheckboxColumn(props)]; + _react2.default.Children.forEach(child.props.children, function (child) { + children.push(child); + }); + + return _react2.default.cloneElement(child, props, children); + } + }, { + key: 'getCheckboxPlaceholder', + value: function getCheckboxPlaceholder(props) { + if (!this.props.adjustForCheckbox) return null; + + var disabled = !this.props.enableSelectAll; + var key = 'hpcb' + props.rowNumber; + return _react2.default.createElement(_TableHeaderColumn2.default, { + key: key, + style: { + width: 24, + cursor: disabled ? 'not-allowed' : 'inherit' + } + }); + } + }, { + key: 'getSelectAllCheckboxColumn', + value: function getSelectAllCheckboxColumn(props) { + if (!this.props.displaySelectAll) return this.getCheckboxPlaceholder(props); + + var disabled = !this.props.enableSelectAll; + var checkbox = _react2.default.createElement(_Checkbox2.default, { + key: 'selectallcb', + name: 'selectallcb', + value: 'selected', + disabled: disabled, + checked: this.props.selectAllSelected, + onCheck: this.handleCheckAll + }); -Object.defineProperty(exports, "__esModule", { - value: true -}); + var key = 'hpcb' + props.rowNumber; + return _react2.default.createElement( + _TableHeaderColumn2.default, + { + key: key, + style: { + width: 24, + cursor: disabled ? 'not-allowed' : 'inherit' + } + }, + checkbox + ); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + className = _props.className, + style = _props.style; + var prepareStyles = this.context.muiTheme.prepareStyles; -exports.default = function (_ref) { - var browser = _ref.browser; - var version = _ref.version; - var prefix = _ref.prefix; + var styles = getStyles(this.props, this.context); + var superHeaderRows = this.createSuperHeaderRows(); + var baseHeaderRow = this.createBaseHeaderRow(); - var prefixedKeyframes = 'keyframes'; + return _react2.default.createElement( + 'thead', + { className: className, style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + superHeaderRows, + baseHeaderRow + ); + } + }]); + return TableHeader; +}(_react.Component); - if (browser === 'chrome' && version < 43 || (browser === 'safari' || browser === 'ios_saf') && version < 9 || browser === 'opera' && version < 30 || browser === 'android' && version <= 4.4 || browser === 'and_uc') { - prefixedKeyframes = prefix.css + prefixedKeyframes; - } - return prefixedKeyframes; +TableHeader.muiName = 'TableHeader'; +TableHeader.defaultProps = { + adjustForCheckbox: true, + displaySelectAll: true, + enableSelectAll: true, + selectAllSelected: false }; - -module.exports = exports['default']; +TableHeader.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? TableHeader.propTypes = { + /** + * Controls whether or not header rows should be + * adjusted for a checkbox column. If the select all + * checkbox is true, this property will not influence + * the number of columns. This is mainly useful for + * "super header" rows so that the checkbox column + * does not create an offset that needs to be accounted + * for manually. + */ + adjustForCheckbox: _react.PropTypes.bool, + /** + * Children passed to table header. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Controls whether or not the select all checkbox is displayed. + */ + displaySelectAll: _react.PropTypes.bool, + /** + * If set to true, the select all button will be interactable. + * If set to false, the button will not be interactable. + * To hide the checkbox, set displaySelectAll to false. + */ + enableSelectAll: _react.PropTypes.bool, + /** + * @ignore + * Callback when select all has been checked. + */ + onSelectAll: _react.PropTypes.func, + /** + * @ignore + * True when select all has been checked. + */ + selectAllSelected: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableHeader; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), /* 774 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - +/* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = { "chrome": { "transform": 35, "transformOrigin": 35, "transformOriginX": 35, "transformOriginY": 35, "backfaceVisibility": 35, "perspective": 35, "perspectiveOrigin": 35, "transformStyle": 35, "transformOriginZ": 35, "animation": 42, "animationDelay": 42, "animationDirection": 42, "animationFillMode": 42, "animationDuration": 42, "animationIterationCount": 42, "animationName": 42, "animationPlayState": 42, "animationTimingFunction": 42, "appearance": 55, "userSelect": 55, "fontKerning": 32, "textEmphasisPosition": 55, "textEmphasis": 55, "textEmphasisStyle": 55, "textEmphasisColor": 55, "boxDecorationBreak": 55, "clipPath": 55, "maskImage": 55, "maskMode": 55, "maskRepeat": 55, "maskPosition": 55, "maskClip": 55, "maskOrigin": 55, "maskSize": 55, "maskComposite": 55, "mask": 55, "maskBorderSource": 55, "maskBorderMode": 55, "maskBorderSlice": 55, "maskBorderWidth": 55, "maskBorderOutset": 55, "maskBorderRepeat": 55, "maskBorder": 55, "maskType": 55, "textDecorationStyle": 55, "textDecorationSkip": 55, "textDecorationLine": 55, "textDecorationColor": 55, "filter": 52, "fontFeatureSettings": 47, "breakAfter": 49, "breakBefore": 49, "breakInside": 49, "columnCount": 49, "columnFill": 49, "columnGap": 49, "columnRule": 49, "columnRuleColor": 49, "columnRuleStyle": 49, "columnRuleWidth": 49, "columns": 49, "columnSpan": 49, "columnWidth": 49 }, "safari": { "flex": 8, "flexBasis": 8, "flexDirection": 8, "flexGrow": 8, "flexFlow": 8, "flexShrink": 8, "flexWrap": 8, "alignContent": 8, "alignItems": 8, "alignSelf": 8, "justifyContent": 8, "order": 8, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8, "transformOrigin": 8, "transformOriginX": 8, "transformOriginY": 8, "backfaceVisibility": 8, "perspective": 8, "perspectiveOrigin": 8, "transformStyle": 8, "transformOriginZ": 8, "animation": 8, "animationDelay": 8, "animationDirection": 8, "animationFillMode": 8, "animationDuration": 8, "animationIterationCount": 8, "animationName": 8, "animationPlayState": 8, "animationTimingFunction": 8, "appearance": 10, "userSelect": 10, "backdropFilter": 10, "fontKerning": 9, "scrollSnapType": 10, "scrollSnapPointsX": 10, "scrollSnapPointsY": 10, "scrollSnapDestination": 10, "scrollSnapCoordinate": 10, "textEmphasisPosition": 7, "textEmphasis": 7, "textEmphasisStyle": 7, "textEmphasisColor": 7, "boxDecorationBreak": 10, "clipPath": 10, "maskImage": 10, "maskMode": 10, "maskRepeat": 10, "maskPosition": 10, "maskClip": 10, "maskOrigin": 10, "maskSize": 10, "maskComposite": 10, "mask": 10, "maskBorderSource": 10, "maskBorderMode": 10, "maskBorderSlice": 10, "maskBorderWidth": 10, "maskBorderOutset": 10, "maskBorderRepeat": 10, "maskBorder": 10, "maskType": 10, "textDecorationStyle": 10, "textDecorationSkip": 10, "textDecorationLine": 10, "textDecorationColor": 10, "shapeImageThreshold": 10, "shapeImageMargin": 10, "shapeImageOutside": 10, "filter": 9, "hyphens": 10, "flowInto": 10, "flowFrom": 10, "breakBefore": 8, "breakAfter": 8, "breakInside": 8, "regionFragment": 10, "columnCount": 8, "columnFill": 8, "columnGap": 8, "columnRule": 8, "columnRuleColor": 8, "columnRuleStyle": 8, "columnRuleWidth": 8, "columns": 8, "columnSpan": 8, "columnWidth": 8 }, "firefox": { "appearance": 51, "userSelect": 51, "boxSizing": 28, "textAlignLast": 48, "textDecorationStyle": 35, "textDecorationSkip": 35, "textDecorationLine": 35, "textDecorationColor": 35, "tabSize": 51, "hyphens": 42, "fontFeatureSettings": 33, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "opera": { "flex": 16, "flexBasis": 16, "flexDirection": 16, "flexGrow": 16, "flexFlow": 16, "flexShrink": 16, "flexWrap": 16, "alignContent": 16, "alignItems": 16, "alignSelf": 16, "justifyContent": 16, "order": 16, "transform": 22, "transformOrigin": 22, "transformOriginX": 22, "transformOriginY": 22, "backfaceVisibility": 22, "perspective": 22, "perspectiveOrigin": 22, "transformStyle": 22, "transformOriginZ": 22, "animation": 29, "animationDelay": 29, "animationDirection": 29, "animationFillMode": 29, "animationDuration": 29, "animationIterationCount": 29, "animationName": 29, "animationPlayState": 29, "animationTimingFunction": 29, "appearance": 41, "userSelect": 41, "fontKerning": 19, "textEmphasisPosition": 41, "textEmphasis": 41, "textEmphasisStyle": 41, "textEmphasisColor": 41, "boxDecorationBreak": 41, "clipPath": 41, "maskImage": 41, "maskMode": 41, "maskRepeat": 41, "maskPosition": 41, "maskClip": 41, "maskOrigin": 41, "maskSize": 41, "maskComposite": 41, "mask": 41, "maskBorderSource": 41, "maskBorderMode": 41, "maskBorderSlice": 41, "maskBorderWidth": 41, "maskBorderOutset": 41, "maskBorderRepeat": 41, "maskBorder": 41, "maskType": 41, "textDecorationStyle": 41, "textDecorationSkip": 41, "textDecorationLine": 41, "textDecorationColor": 41, "filter": 39, "fontFeatureSettings": 34, "breakAfter": 36, "breakBefore": 36, "breakInside": 36, "columnCount": 36, "columnFill": 36, "columnGap": 36, "columnRule": 36, "columnRuleColor": 36, "columnRuleStyle": 36, "columnRuleWidth": 36, "columns": 36, "columnSpan": 36, "columnWidth": 36 }, "ie": { "flex": 10, "flexDirection": 10, "flexFlow": 10, "flexWrap": 10, "transform": 9, "transformOrigin": 9, "transformOriginX": 9, "transformOriginY": 9, "userSelect": 11, "wrapFlow": 11, "wrapThrough": 11, "wrapMargin": 11, "scrollSnapType": 11, "scrollSnapPointsX": 11, "scrollSnapPointsY": 11, "scrollSnapDestination": 11, "scrollSnapCoordinate": 11, "touchAction": 10, "hyphens": 11, "flowInto": 11, "flowFrom": 11, "breakBefore": 11, "breakAfter": 11, "breakInside": 11, "regionFragment": 11, "gridTemplateColumns": 11, "gridTemplateRows": 11, "gridTemplateAreas": 11, "gridTemplate": 11, "gridAutoColumns": 11, "gridAutoRows": 11, "gridAutoFlow": 11, "grid": 11, "gridRowStart": 11, "gridColumnStart": 11, "gridRowEnd": 11, "gridRow": 11, "gridColumn": 11, "gridColumnEnd": 11, "gridColumnGap": 11, "gridRowGap": 11, "gridArea": 11, "gridGap": 11, "textSizeAdjust": 11 }, "edge": { "userSelect": 14, "wrapFlow": 14, "wrapThrough": 14, "wrapMargin": 14, "scrollSnapType": 14, "scrollSnapPointsX": 14, "scrollSnapPointsY": 14, "scrollSnapDestination": 14, "scrollSnapCoordinate": 14, "hyphens": 14, "flowInto": 14, "flowFrom": 14, "breakBefore": 14, "breakAfter": 14, "breakInside": 14, "regionFragment": 14, "gridTemplateColumns": 14, "gridTemplateRows": 14, "gridTemplateAreas": 14, "gridTemplate": 14, "gridAutoColumns": 14, "gridAutoRows": 14, "gridAutoFlow": 14, "grid": 14, "gridRowStart": 14, "gridColumnStart": 14, "gridRowEnd": 14, "gridRow": 14, "gridColumn": 14, "gridColumnEnd": 14, "gridColumnGap": 14, "gridRowGap": 14, "gridArea": 14, "gridGap": 14 }, "ios_saf": { "flex": 8.1, "flexBasis": 8.1, "flexDirection": 8.1, "flexGrow": 8.1, "flexFlow": 8.1, "flexShrink": 8.1, "flexWrap": 8.1, "alignContent": 8.1, "alignItems": 8.1, "alignSelf": 8.1, "justifyContent": 8.1, "order": 8.1, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8.1, "transformOrigin": 8.1, "transformOriginX": 8.1, "transformOriginY": 8.1, "backfaceVisibility": 8.1, "perspective": 8.1, "perspectiveOrigin": 8.1, "transformStyle": 8.1, "transformOriginZ": 8.1, "animation": 8.1, "animationDelay": 8.1, "animationDirection": 8.1, "animationFillMode": 8.1, "animationDuration": 8.1, "animationIterationCount": 8.1, "animationName": 8.1, "animationPlayState": 8.1, "animationTimingFunction": 8.1, "appearance": 9.3, "userSelect": 9.3, "backdropFilter": 9.3, "fontKerning": 9.3, "scrollSnapType": 9.3, "scrollSnapPointsX": 9.3, "scrollSnapPointsY": 9.3, "scrollSnapDestination": 9.3, "scrollSnapCoordinate": 9.3, "boxDecorationBreak": 9.3, "clipPath": 9.3, "maskImage": 9.3, "maskMode": 9.3, "maskRepeat": 9.3, "maskPosition": 9.3, "maskClip": 9.3, "maskOrigin": 9.3, "maskSize": 9.3, "maskComposite": 9.3, "mask": 9.3, "maskBorderSource": 9.3, "maskBorderMode": 9.3, "maskBorderSlice": 9.3, "maskBorderWidth": 9.3, "maskBorderOutset": 9.3, "maskBorderRepeat": 9.3, "maskBorder": 9.3, "maskType": 9.3, "textSizeAdjust": 9.3, "textDecorationStyle": 9.3, "textDecorationSkip": 9.3, "textDecorationLine": 9.3, "textDecorationColor": 9.3, "shapeImageThreshold": 9.3, "shapeImageMargin": 9.3, "shapeImageOutside": 9.3, "filter": 9, "hyphens": 9.3, "flowInto": 9.3, "flowFrom": 9.3, "breakBefore": 8.1, "breakAfter": 8.1, "breakInside": 8.1, "regionFragment": 9.3, "columnCount": 8.1, "columnFill": 8.1, "columnGap": 8.1, "columnRule": 8.1, "columnRuleColor": 8.1, "columnRuleStyle": 8.1, "columnRuleWidth": 8.1, "columns": 8.1, "columnSpan": 8.1, "columnWidth": 8.1 }, "android": { "flex": 4.2, "flexBasis": 4.2, "flexDirection": 4.2, "flexGrow": 4.2, "flexFlow": 4.2, "flexShrink": 4.2, "flexWrap": 4.2, "alignContent": 4.2, "alignItems": 4.2, "alignSelf": 4.2, "justifyContent": 4.2, "order": 4.2, "transition": 4.2, "transitionDelay": 4.2, "transitionDuration": 4.2, "transitionProperty": 4.2, "transitionTimingFunction": 4.2, "transform": 4.4, "transformOrigin": 4.4, "transformOriginX": 4.4, "transformOriginY": 4.4, "backfaceVisibility": 4.4, "perspective": 4.4, "perspectiveOrigin": 4.4, "transformStyle": 4.4, "transformOriginZ": 4.4, "animation": 4.4, "animationDelay": 4.4, "animationDirection": 4.4, "animationFillMode": 4.4, "animationDuration": 4.4, "animationIterationCount": 4.4, "animationName": 4.4, "animationPlayState": 4.4, "animationTimingFunction": 4.4, "appearance": 51, "userSelect": 51, "fontKerning": 4.4, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "filter": 51, "fontFeatureSettings": 4.4, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "and_chr": { "appearance": 51, "userSelect": 51, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "textDecorationStyle": 51, "textDecorationSkip": 51, "textDecorationLine": 51, "textDecorationColor": 51, "filter": 51 }, "and_uc": { "flex": 9.9, "flexBasis": 9.9, "flexDirection": 9.9, "flexGrow": 9.9, "flexFlow": 9.9, "flexShrink": 9.9, "flexWrap": 9.9, "alignContent": 9.9, "alignItems": 9.9, "alignSelf": 9.9, "justifyContent": 9.9, "order": 9.9, "transition": 9.9, "transitionDelay": 9.9, "transitionDuration": 9.9, "transitionProperty": 9.9, "transitionTimingFunction": 9.9, "transform": 9.9, "transformOrigin": 9.9, "transformOriginX": 9.9, "transformOriginY": 9.9, "backfaceVisibility": 9.9, "perspective": 9.9, "perspectiveOrigin": 9.9, "transformStyle": 9.9, "transformOriginZ": 9.9, "animation": 9.9, "animationDelay": 9.9, "animationDirection": 9.9, "animationFillMode": 9.9, "animationDuration": 9.9, "animationIterationCount": 9.9, "animationName": 9.9, "animationPlayState": 9.9, "animationTimingFunction": 9.9, "appearance": 9.9, "userSelect": 9.9, "fontKerning": 9.9, "textEmphasisPosition": 9.9, "textEmphasis": 9.9, "textEmphasisStyle": 9.9, "textEmphasisColor": 9.9, "maskImage": 9.9, "maskMode": 9.9, "maskRepeat": 9.9, "maskPosition": 9.9, "maskClip": 9.9, "maskOrigin": 9.9, "maskSize": 9.9, "maskComposite": 9.9, "mask": 9.9, "maskBorderSource": 9.9, "maskBorderMode": 9.9, "maskBorderSlice": 9.9, "maskBorderWidth": 9.9, "maskBorderOutset": 9.9, "maskBorderRepeat": 9.9, "maskBorder": 9.9, "maskType": 9.9, "textSizeAdjust": 9.9, "filter": 9.9, "hyphens": 9.9, "flowInto": 9.9, "flowFrom": 9.9, "breakBefore": 9.9, "breakAfter": 9.9, "breakInside": 9.9, "regionFragment": 9.9, "fontFeatureSettings": 9.9, "columnCount": 9.9, "columnFill": 9.9, "columnGap": 9.9, "columnRule": 9.9, "columnRuleColor": 9.9, "columnRuleStyle": 9.9, "columnRuleWidth": 9.9, "columns": 9.9, "columnSpan": 9.9, "columnWidth": 9.9 }, "op_mini": {} }; -module.exports = exports["default"]; -/***/ }), -/* 775 */ -/***/ (function(module, exports, __webpack_require__) { +var _extends2 = __webpack_require__(8); -"use strict"; +var _extends3 = _interopRequireDefault(_extends2); +var _objectWithoutProperties2 = __webpack_require__(9); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = position; +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -var _getPrefixedValue = __webpack_require__(41); +var _getPrototypeOf = __webpack_require__(4); -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _classCallCheck2 = __webpack_require__(2); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -function position(_ref) { - var property = _ref.property; - var value = _ref.value; - var browser = _ref.browserInfo.browser; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; +var _createClass2 = __webpack_require__(3); - if (property === 'position' && value === 'sticky' && (browser === 'safari' || browser === 'ios_saf')) { - return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); - } -} -module.exports = exports['default']; +var _createClass3 = _interopRequireDefault(_createClass2); -/***/ }), -/* 776 */ -/***/ (function(module, exports, __webpack_require__) { +var _possibleConstructorReturn2 = __webpack_require__(5); -"use strict"; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); +var _inherits3 = _interopRequireDefault(_inherits2); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = calc; +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); -var _getPrefixedValue = __webpack_require__(41); +var _react = __webpack_require__(1); -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); +var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function getStyles(props, context, state) { + var tableRow = context.muiTheme.tableRow; -function calc(_ref) { - var property = _ref.property; - var value = _ref.value; - var _ref$browserInfo = _ref.browserInfo; - var browser = _ref$browserInfo.browser; - var version = _ref$browserInfo.version; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; - if (typeof value === 'string' && value.indexOf('calc(') > -1 && (browser === 'firefox' && version < 15 || browser === 'chrome' && version < 25 || browser === 'safari' && version < 6.1 || browser === 'ios_saf' && version < 7)) { - return _defineProperty({}, property, (0, _getPrefixedValue2.default)(value.replace(/calc\(/g, css + 'calc('), value, keepUnprefixed)); + var cellBgColor = 'inherit'; + if (props.hovered || state.hovered) { + cellBgColor = tableRow.hoverColor; + } else if (props.selected) { + cellBgColor = tableRow.selectedColor; + } else if (props.striped) { + cellBgColor = tableRow.stripeColor; } + + return { + root: { + borderBottom: props.displayBorder && '1px solid ' + tableRow.borderColor, + color: tableRow.textColor, + height: tableRow.height + }, + cell: { + backgroundColor: cellBgColor + } + }; } -module.exports = exports['default']; -/***/ }), -/* 777 */ -/***/ (function(module, exports, __webpack_require__) { +var TableRow = function (_Component) { + (0, _inherits3.default)(TableRow, _Component); -"use strict"; + function TableRow() { + var _ref; + var _temp, _this, _ret; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = zoomCursor; + (0, _classCallCheck3.default)(this, TableRow); -var _getPrefixedValue = __webpack_require__(41); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableRow.__proto__ || (0, _getPrototypeOf2.default)(TableRow)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.onCellClick = function (event, columnIndex) { + if (_this.props.selectable && _this.props.onCellClick) { + _this.props.onCellClick(event, _this.props.rowNumber, columnIndex); + } + event.ctrlKey = true; + _this.onRowClick(event); + }, _this.onCellHover = function (event, columnIndex) { + if (_this.props.hoverable) { + _this.setState({ hovered: true }); + if (_this.props.onCellHover) _this.props.onCellHover(event, _this.props.rowNumber, columnIndex); + _this.onRowHover(event); + } + }, _this.onCellHoverExit = function (event, columnIndex) { + if (_this.props.hoverable) { + _this.setState({ hovered: false }); + if (_this.props.onCellHoverExit) _this.props.onCellHoverExit(event, _this.props.rowNumber, columnIndex); + _this.onRowHoverExit(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + (0, _createClass3.default)(TableRow, [{ + key: 'onRowClick', + value: function onRowClick(event) { + if (this.props.selectable && this.props.onRowClick) this.props.onRowClick(event, this.props.rowNumber); + } + }, { + key: 'onRowHover', + value: function onRowHover(event) { + if (this.props.onRowHover) this.props.onRowHover(event, this.props.rowNumber); + } + }, { + key: 'onRowHoverExit', + value: function onRowHoverExit(event) { + if (this.props.onRowHoverExit) this.props.onRowHoverExit(event, this.props.rowNumber); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; -var values = { 'zoom-in': true, 'zoom-out': true }; + var _props = this.props, + className = _props.className, + displayBorder = _props.displayBorder, + hoverable = _props.hoverable, + hovered = _props.hovered, + onCellClick = _props.onCellClick, + onCellHover = _props.onCellHover, + onCellHoverExit = _props.onCellHoverExit, + onRowClick = _props.onRowClick, + onRowHover = _props.onRowHover, + onRowHoverExit = _props.onRowHoverExit, + rowNumber = _props.rowNumber, + selectable = _props.selectable, + selected = _props.selected, + striped = _props.striped, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['className', 'displayBorder', 'hoverable', 'hovered', 'onCellClick', 'onCellHover', 'onCellHoverExit', 'onRowClick', 'onRowHover', 'onRowHoverExit', 'rowNumber', 'selectable', 'selected', 'striped', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; -function zoomCursor(_ref) { - var property = _ref.property; - var value = _ref.value; - var _ref$browserInfo = _ref.browserInfo; - var browser = _ref$browserInfo.browser; - var version = _ref$browserInfo.version; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; + var styles = getStyles(this.props, this.context, this.state); - if (property === 'cursor' && values[value] && (browser === 'firefox' && version < 24 || browser === 'chrome' && version < 37 || browser === 'safari' && version < 9 || browser === 'opera' && version < 24)) { - return { - cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) - }; - } -} -module.exports = exports['default']; + var rowColumns = _react2.default.Children.map(this.props.children, function (child, columnNumber) { + if (_react2.default.isValidElement(child)) { + return _react2.default.cloneElement(child, { + columnNumber: columnNumber, + hoverable: _this2.props.hoverable, + key: _this2.props.rowNumber + '-' + columnNumber, + onClick: _this2.onCellClick, + onHover: _this2.onCellHover, + onHoverExit: _this2.onCellHoverExit, + style: (0, _simpleAssign2.default)({}, styles.cell, child.props.style) + }); + } + }); + + return _react2.default.createElement( + 'tr', + (0, _extends3.default)({ + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }, other), + rowColumns + ); + } + }]); + return TableRow; +}(_react.Component); + +TableRow.defaultProps = { + displayBorder: true, + hoverable: false, + hovered: false, + selectable: true, + selected: false, + striped: false +}; +TableRow.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? TableRow.propTypes = { + /** + * Children passed to table row. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, row border will be displayed for the row. + * If false, no border will be drawn. + */ + displayBorder: _react.PropTypes.bool, + /** + * Controls whether or not the row reponseds to hover events. + */ + hoverable: _react.PropTypes.bool, + /** + * Controls whether or not the row should be rendered as being + * hovered. This property is evaluated in addition to this.state.hovered + * and can be used to synchronize the hovered state with some other + * external events. + */ + hovered: _react.PropTypes.bool, + /** + * @ignore + * Called when a row cell is clicked. + * rowNumber is the row number and columnId is + * the column number or the column key. + */ + onCellClick: _react.PropTypes.func, + /** + * @ignore + * Called when a table cell is hovered. + * rowNumber is the row number of the hovered row + * and columnId is the column number or the column key of the cell. + */ + onCellHover: _react.PropTypes.func, + /** + * @ignore + * Called when a table cell is no longer hovered. + * rowNumber is the row number of the row and columnId + * is the column number or the column key of the cell. + */ + onCellHoverExit: _react.PropTypes.func, + /** + * @ignore + * Called when row is clicked. + */ + onRowClick: _react.PropTypes.func, + /** + * @ignore + * Called when a table row is hovered. + * rowNumber is the row number of the hovered row. + */ + onRowHover: _react.PropTypes.func, + /** + * @ignore + * Called when a table row is no longer hovered. + * rowNumber is the row number of the row that is no longer hovered. + */ + onRowHoverExit: _react.PropTypes.func, + /** + * Number to identify the row. This property is + * automatically populated when used with the TableBody component. + */ + rowNumber: _react.PropTypes.number, + /** + * If true, table rows can be selected. If multiple row + * selection is desired, enable multiSelectable. + * The default value is true. + */ + selectable: _react.PropTypes.bool, + /** + * Indicates that a particular row is selected. + * This property can be used to programmatically select rows. + */ + selected: _react.PropTypes.bool, + /** + * Indicates whether or not the row is striped. + */ + striped: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = TableRow; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 778 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67097,34 +69778,36 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = grabCursor; -var _getPrefixedValue = __webpack_require__(41); +var _react = __webpack_require__(1); -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); +var _react2 = _interopRequireDefault(_react); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _pure = __webpack_require__(22); -var values = { grab: true, grabbing: true }; +var _pure2 = _interopRequireDefault(_pure); -function grabCursor(_ref) { - var property = _ref.property; - var value = _ref.value; - var browser = _ref.browserInfo.browser; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; +var _SvgIcon = __webpack_require__(23); - // adds prefixes for firefox, chrome, safari, and opera regardless of version until a reliable brwoser support info can be found (see: https://github.com/rofrischmann/inline-style-prefixer/issues/79) - if (property === 'cursor' && values[value] && (browser === 'firefox' || browser === 'chrome' || browser === 'safari' || browser === 'opera')) { - return { - cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) - }; - } -} -module.exports = exports['default']; +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ActionDelete = function ActionDelete(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z' }) + ); +}; +ActionDelete = (0, _pure2.default)(ActionDelete); +ActionDelete.displayName = 'ActionDelete'; +ActionDelete.muiName = 'SvgIcon'; + +exports.default = ActionDelete; /***/ }), -/* 779 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67133,35 +69816,55 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = flex; +exports.addAtcProduct = addAtcProduct; +exports.removeAtcProduct = removeAtcProduct; +exports.setAtcProductEnabled = setAtcProductEnabled; -var _getPrefixedValue = __webpack_require__(41); +var _ActionTypes = __webpack_require__(125); -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); +var types = _interopRequireWildcard(_ActionTypes); + +var _notification = __webpack_require__(312); + +var _notification2 = _interopRequireDefault(_notification); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var values = { flex: true, 'inline-flex': true }; +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -function flex(_ref) { - var property = _ref.property; - var value = _ref.value; - var _ref$browserInfo = _ref.browserInfo; - var browser = _ref$browserInfo.browser; - var version = _ref$browserInfo.version; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; +function addAtcProduct(data) { + return function (dispatch) { + dispatch((0, _notification2.default)('Atc product ' + data.name + ' added')); + dispatch({ + type: types.ATC_PRODUCT_ADD, + name: name, + data: data + }); + }; +} - if (property === 'display' && values[value] && (browser === 'chrome' && version < 29 && version > 20 || (browser === 'safari' || browser === 'ios_saf') && version < 9 && version > 6 || browser === 'opera' && (version == 15 || version == 16))) { - return { - display: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) - }; - } +function removeAtcProduct(name) { + return function (dispatch) { + dispatch((0, _notification2.default)('Atc product ' + name + ' removed')); + dispatch({ + type: types.ATC_PRODUCT_REMOVE, + name: name + }); + }; +} + +function setAtcProductEnabled(name) { + var enabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + return { + type: types.ATC_SET_PRODUCT_ENABLED, + name: name, + enabled: enabled + }; } -module.exports = exports['default']; /***/ }), -/* 780 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67170,171 +69873,241 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = sizing; - -var _getPrefixedValue = __webpack_require__(41); - -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -var properties = { - maxHeight: true, - maxWidth: true, - width: true, - height: true, - columnWidth: true, - minWidth: true, - minHeight: true -}; -var values = { - 'min-content': true, - 'max-content': true, - 'fill-available': true, - 'fit-content': true, - 'contain-floats': true -}; +var _extends2 = __webpack_require__(8); -function sizing(_ref) { - var property = _ref.property; - var value = _ref.value; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; +var _extends3 = _interopRequireDefault(_extends2); - // This might change in the future - // Keep an eye on it - if (properties[property] && values[value]) { - return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); - } -} -module.exports = exports['default']; +var _getPrototypeOf = __webpack_require__(4); -/***/ }), -/* 781 */ -/***/ (function(module, exports, __webpack_require__) { +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); -"use strict"; +var _classCallCheck2 = __webpack_require__(2); +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = gradient; +var _createClass2 = __webpack_require__(3); -var _getPrefixedValue = __webpack_require__(41); +var _createClass3 = _interopRequireDefault(_createClass2); -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); +var _possibleConstructorReturn2 = __webpack_require__(5); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var _inherits2 = __webpack_require__(6); -var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; +var _inherits3 = _interopRequireDefault(_inherits2); -function gradient(_ref) { - var property = _ref.property; - var value = _ref.value; - var _ref$browserInfo = _ref.browserInfo; - var browser = _ref$browserInfo.browser; - var version = _ref$browserInfo.version; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; +var _react = __webpack_require__(1); - if (typeof value === 'string' && value.match(values) !== null && (browser === 'firefox' && version < 16 || browser === 'chrome' && version < 26 || (browser === 'safari' || browser === 'ios_saf') && version < 7 || (browser === 'opera' || browser === 'op_mini') && version < 12.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { - return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); - } -} -module.exports = exports['default']; +var _react2 = _interopRequireDefault(_react); -/***/ }), -/* 782 */ -/***/ (function(module, exports, __webpack_require__) { +var _reduxForm = __webpack_require__(110); -"use strict"; +var _reactRedux = __webpack_require__(28); +var _materialUiChipInput = __webpack_require__(778); -Object.defineProperty(exports, "__esModule", { - value: true -}); +var _materialUiChipInput2 = _interopRequireDefault(_materialUiChipInput); -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; +var _MenuItem = __webpack_require__(87); -exports.default = transition; +var _MenuItem2 = _interopRequireDefault(_MenuItem); -var _hyphenateStyleName = __webpack_require__(303); +var _reduxFormMaterialUi = __webpack_require__(121); -var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); +var _RaisedButton = __webpack_require__(88); -var _unprefixProperty = __webpack_require__(783); +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); -var _unprefixProperty2 = _interopRequireDefault(_unprefixProperty); +var _FlatButton = __webpack_require__(189); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _FlatButton2 = _interopRequireDefault(_FlatButton); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var _FormValidators = __webpack_require__(124); -var properties = { transition: true, transitionProperty: true }; +var Validators = _interopRequireWildcard(_FormValidators); -function transition(_ref) { - var property = _ref.property; - var value = _ref.value; - var css = _ref.prefix.css; - var requiresPrefix = _ref.requiresPrefix; - var keepUnprefixed = _ref.keepUnprefixed; +var _Styles = __webpack_require__(91); - // also check for already prefixed transitions - var unprefixedProperty = (0, _unprefixProperty2.default)(property); +var _Styles2 = _interopRequireDefault(_Styles); - if (typeof value === 'string' && properties[unprefixedProperty]) { - var _ret = function () { - // TODO: memoize this array - var requiresPrefixDashCased = Object.keys(requiresPrefix).map(function (prop) { - return (0, _hyphenateStyleName2.default)(prop); - }); +var _Utils = __webpack_require__(195); - // only split multi values, not cubic beziers - var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - requiresPrefixDashCased.forEach(function (prop) { - multipleValues.forEach(function (val, index) { - if (val.indexOf(prop) > -1 && prop !== 'order') { - multipleValues[index] = val.replace(prop, css + prop) + (keepUnprefixed ? ',' + val : ''); - } - }); - }); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - return { - v: _defineProperty({}, property, multipleValues.join(',')) - }; - }(); +var AtcCreateForm = function (_Component) { + (0, _inherits3.default)(AtcCreateForm, _Component); - if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + function AtcCreateForm() { + (0, _classCallCheck3.default)(this, AtcCreateForm); + return (0, _possibleConstructorReturn3.default)(this, (AtcCreateForm.__proto__ || (0, _getPrototypeOf2.default)(AtcCreateForm)).apply(this, arguments)); } -} -module.exports = exports['default']; -/***/ }), -/* 783 */ -/***/ (function(module, exports, __webpack_require__) { + (0, _createClass3.default)(AtcCreateForm, [{ + key: 'render', + value: function render() { + var _props = this.props, + handleSubmit = _props.handleSubmit, + pristine = _props.pristine, + submitting = _props.submitting, + onRequestClose = _props.onRequestClose, + atcProducts = _props.atcProducts; + + var renderChip = function renderChip(_ref) { + var input = _ref.input, + hintText = _ref.hintText, + floatingLabelText = _ref.floatingLabelText, + _ref$meta = _ref.meta, + touched = _ref$meta.touched, + error = _ref$meta.error; + return _react2.default.createElement(_materialUiChipInput2.default, (0, _extends3.default)({}, input, { + chipContainerStyle: _Styles2.default.fields.text, + fullWidth: true, + value: input.value || [], + onRequestAdd: function onRequestAdd(addedChip) { + var values = input.value || []; + values = values.slice(); + values.push(addedChip); + input.onChange(values); + }, + onRequestDelete: function onRequestDelete(deletedChip) { + var values = input.value || []; + values = values.filter(function (v) { + return v !== deletedChip; + }); + input.onChange(values); + }, + onBlur: function onBlur() { + return input.onBlur(); + }, + hintText: hintText, + floatingLabelText: floatingLabelText, + errorText: touched && error ? error : '' + })); + }; + var buttonStyle = { + margin: 6, + float: 'right' + }; -"use strict"; + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'atc-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'name', + validate: [Validators.required, Validators.unique(atcProducts.map(function (x) { + return x.name; + }))], + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Name', + hintText: 'Name', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'keywords', + component: renderChip, + floatingLabelText: 'Product keywords, press enter to validate a keyword', + hintText: 'Product keywords', + style: _Styles2.default.fields.text, + labelStyle: _Styles2.default.fields.text, + validate: [Validators.required, Validators.notEmpty] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'color', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Color', + hintText: 'Color', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'category', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Product category', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + _Utils.categories.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement('br', null), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'enabled', + component: _reduxFormMaterialUi.Toggle, + label: 'Enabled', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Add', + style: buttonStyle, + disabled: pristine || submitting, + type: 'submit' + }), + _react2.default.createElement(_FlatButton2.default, { + label: 'Cancel', + style: buttonStyle, + onTouchTap: function onTouchTap() { + if (onRequestClose) { + onRequestClose(); + } + } + }) + ) + ); + } + }]); + return AtcCreateForm; +}(_react.Component); +AtcCreateForm.propTypes = { + onRequestClose: _react.PropTypes.function +}; -Object.defineProperty(exports, "__esModule", { - value: true -}); +var Form = (0, _reduxForm.reduxForm)({ + form: 'atc-form' +})(AtcCreateForm); -exports.default = function (property) { - var unprefixed = property.replace(/^(ms|Webkit|Moz|O)/, ''); - return unprefixed.charAt(0).toLowerCase() + unprefixed.slice(1); -}; +function mapStateToProps(state) { + return { + atcProducts: state.atc.atcProducts, + initialValues: { + enabled: true + } + }; +} -module.exports = exports['default']; +exports.default = (0, _reactRedux.connect)(mapStateToProps)(Form); /***/ }), -/* 784 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67343,444 +70116,805 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = flexboxIE; -var _getPrefixedValue = __webpack_require__(41); - -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /** + * Notice: Some code was adapted from Material-UI's text field. + * Copyright (c) 2014 Call-Em-All (https://github.com/callemall/material-ui) + */ -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -var alternativeValues = { - 'space-around': 'distribute', - 'space-between': 'justify', - 'flex-start': 'start', - 'flex-end': 'end', - flex: 'flexbox', - 'inline-flex': 'inline-flexbox' -}; -var alternativeProps = { - alignContent: 'msFlexLinePack', - alignSelf: 'msFlexItemAlign', - alignItems: 'msFlexAlign', - justifyContent: 'msFlexPack', - order: 'msFlexOrder', - flexGrow: 'msFlexPositive', - flexShrink: 'msFlexNegative', - flexBasis: 'msPreferredSize' -}; +var _react = __webpack_require__(1); -function flexboxIE(_ref) { - var property = _ref.property; - var value = _ref.value; - var styles = _ref.styles; - var _ref$browserInfo = _ref.browserInfo; - var browser = _ref$browserInfo.browser; - var version = _ref$browserInfo.version; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; +var _react2 = _interopRequireDefault(_react); - if ((alternativeProps[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'ie_mob' || browser === 'ie') && version == 10) { - if (!keepUnprefixed && !Array.isArray(styles[property])) { - delete styles[property]; - } - if (property === 'display' && alternativeValues[value]) { - return { - display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) - }; - } - if (alternativeProps[property]) { - return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); - } - } -} -module.exports = exports['default']; +var _propTypes = __webpack_require__(779); -/***/ }), -/* 785 */ -/***/ (function(module, exports, __webpack_require__) { +var _propTypes2 = _interopRequireDefault(_propTypes); -"use strict"; +var _TextFieldUnderline = __webpack_require__(298); +var _TextFieldUnderline2 = _interopRequireDefault(_TextFieldUnderline); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = flexboxOld; +var _TextFieldHint = __webpack_require__(296); -var _getPrefixedValue = __webpack_require__(41); +var _TextFieldHint2 = _interopRequireDefault(_TextFieldHint); -var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); +var _TextFieldLabel = __webpack_require__(297); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _TextFieldLabel2 = _interopRequireDefault(_TextFieldLabel); -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +var _AutoComplete = __webpack_require__(295); -var alternativeValues = { - 'space-around': 'justify', - 'space-between': 'justify', - 'flex-start': 'start', - 'flex-end': 'end', - 'wrap-reverse': 'multiple', - wrap: 'multiple', - flex: 'box', - 'inline-flex': 'inline-box' -}; +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); -var alternativeProps = { - alignItems: 'WebkitBoxAlign', - justifyContent: 'WebkitBoxPack', - flexWrap: 'WebkitBoxLines' -}; +var _transitions = __webpack_require__(12); -var otherProps = ['alignContent', 'alignSelf', 'order', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection']; -var properties = Object.keys(alternativeProps).concat(otherProps); +var _transitions2 = _interopRequireDefault(_transitions); -function flexboxOld(_ref) { - var property = _ref.property; - var value = _ref.value; - var styles = _ref.styles; - var _ref$browserInfo = _ref.browserInfo; - var browser = _ref$browserInfo.browser; - var version = _ref$browserInfo.version; - var css = _ref.prefix.css; - var keepUnprefixed = _ref.keepUnprefixed; +var _Chip = __webpack_require__(781); - if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'firefox' && version < 22 || browser === 'chrome' && version < 21 || (browser === 'safari' || browser === 'ios_saf') && version <= 6.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { - if (!keepUnprefixed && !Array.isArray(styles[property])) { - delete styles[property]; - } - if (property === 'flexDirection' && typeof value === 'string') { - return { - WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', - WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' - }; - } - if (property === 'display' && alternativeValues[value]) { - return { - display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) - }; - } - if (alternativeProps[property]) { - return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); - } - } -} -module.exports = exports['default']; +var _Chip2 = _interopRequireDefault(_Chip); -/***/ }), -/* 786 */ -/***/ (function(module, exports, __webpack_require__) { +var _colors = __webpack_require__(37); -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = callOnce; +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -var _warning = __webpack_require__(26); +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } -var _warning2 = _interopRequireDefault(_warning); +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var CALLED_ONCE = 'muiPrepared'; +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } -function callOnce() { - if (process.env.NODE_ENV !== 'production') { - return function (style) { - if (style[CALLED_ONCE]) { - process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: You cannot call prepareStyles() on the same style object more than once.') : void 0; - } - style[CALLED_ONCE] = true; - return style; - }; - } -} -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -/***/ }), -/* 787 */ -/***/ (function(module, exports, __webpack_require__) { +var getStyles = function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + _context$muiTheme$tex = _context$muiTheme.textField, + floatingLabelColor = _context$muiTheme$tex.floatingLabelColor, + focusColor = _context$muiTheme$tex.focusColor, + textColor = _context$muiTheme$tex.textColor, + disabledTextColor = _context$muiTheme$tex.disabledTextColor, + backgroundColor = _context$muiTheme$tex.backgroundColor, + errorColor = _context$muiTheme$tex.errorColor; -"use strict"; + var styles = { + root: { + fontSize: 16, + lineHeight: '24px', + width: props.fullWidth ? '100%' : 256, + display: 'inline-block', + position: 'relative', + backgroundColor: backgroundColor, + fontFamily: baseTheme.fontFamily, + transition: _transitions2.default.easeOut('200ms', 'height'), + cursor: 'text' + }, + input: { + padding: 0, + marginTop: 0, + marginBottom: 24, + lineHeight: '32px', + height: 32, + position: 'relative', + display: 'inline-block', + border: 'none', + outline: 'none', + backgroundColor: 'rgba(0,0,0,0)', + color: props.disabled ? disabledTextColor : textColor, + cursor: props.disabled ? 'not-allowed' : 'initial', + font: 'inherit', + appearance: 'none', // Remove border in Safari, doesn't seem to break anything in other browsers + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated style). + float: 'left' + }, + error: { + position: 'absolute', + bottom: -10, + fontSize: 12, + lineHeight: '12px', + color: errorColor, + transition: _transitions2.default.easeOut() + }, + floatingLabel: { + color: props.disabled ? disabledTextColor : floatingLabelColor, + pointerEvents: 'none', + top: 28 + }, + floatingLabelFocusStyle: { + transform: 'scale(0.75) translate(0, -36px)' + }, + defaultChip: { + margin: '8px 8px 0 0', + float: 'left' + }, + chipContainer: { + marginTop: props.floatingLabelText ? 12 : 0 + } + }; -Object.defineProperty(exports, "__esModule", { - value: true -}); + if (state.isFocused) { + styles.floatingLabel.color = focusColor; + } -var _keys = __webpack_require__(50); + if (props.floatingLabelText) { + styles.input.boxSizing = 'border-box'; + } -var _keys2 = _interopRequireDefault(_keys); + if (state.errorText) { + if (state.isFocused) { + styles.floatingLabel.color = styles.error.color; + } + } -exports.default = rtl; + return styles; +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var defaultChipRenderer = function defaultChipRenderer(_ref, key) { + var value = _ref.value, + text = _ref.text, + isFocused = _ref.isFocused, + isDisabled = _ref.isDisabled, + handleClick = _ref.handleClick, + handleRequestDelete = _ref.handleRequestDelete, + defaultStyle = _ref.defaultStyle; + return _react2.default.createElement( + _Chip2.default, + { + key: key, + style: _extends({}, defaultStyle, { pointerEvents: isDisabled ? 'none' : undefined }), + backgroundColor: isFocused ? _colors.blue300 : null, + onClick: handleClick, + onRequestDelete: handleRequestDelete + }, + text + ); +}; -var reTranslate = /((^|\s)translate(3d|X)?\()(\-?[\d]+)/; -var reSkew = /((^|\s)skew(x|y)?\()\s*(\-?[\d]+)(deg|rad|grad)(,\s*(\-?[\d]+)(deg|rad|grad))?/; +var ChipInput = function (_React$Component) { + _inherits(ChipInput, _React$Component); -/** - * This function ensures that `style` supports both ltr and rtl directions by - * checking `styleConstants` in `muiTheme` and replacing attribute keys if - * necessary. - */ -function rtl(muiTheme) { - if (muiTheme.isRtl) { - return function (style) { - if (style.directionInvariant === true) { - return style; - } + function ChipInput(props) { + _classCallCheck(this, ChipInput); - var flippedAttributes = { - // Keys and their replacements. - right: 'left', - left: 'right', - marginRight: 'marginLeft', - marginLeft: 'marginRight', - paddingRight: 'paddingLeft', - paddingLeft: 'paddingRight', - borderRight: 'borderLeft', - borderLeft: 'borderRight' - }; + var _this = _possibleConstructorReturn(this, (ChipInput.__proto__ || Object.getPrototypeOf(ChipInput)).call(this, props)); - var newStyle = {}; + _this.state = { + isFocused: false, + errorText: undefined, + isClean: true, + chips: [], + focusedChip: null, + inputValue: '' + }; - (0, _keys2.default)(style).forEach(function (attribute) { - var value = style[attribute]; - var key = attribute; + _this.handleInputBlur = function (event) { + if (_this.props.onBlur) { + _this.props.onBlur(event); + } - if (flippedAttributes.hasOwnProperty(attribute)) { - key = flippedAttributes[attribute]; + // A momentary delay is required to support openOnFocus. We must give time for the autocomplete + // menu to close before checking the current status. Otherwise, tabbing off the input while the + // menu is open results in the input keeping its focus styles. Note that the ref might not be set + // yet, so this.autocomplete might be null. + setTimeout(function () { + if (_this.autoComplete && (!_this.autoComplete.state.open || _this.autoComplete.requestsList.length === 0)) { + if (_this.props.clearOnBlur) { + _this.clearInput(); + } + _this.setState({ isFocused: false }); } + }, 0); + }; - switch (attribute) { - case 'float': - case 'textAlign': - if (value === 'right') { - value = 'left'; - } else if (value === 'left') { - value = 'right'; - } - break; - - case 'direction': - if (value === 'ltr') { - value = 'rtl'; - } else if (value === 'rtl') { - value = 'ltr'; - } - break; - - case 'transform': - if (!value) break; - var matches = void 0; - if (matches = value.match(reTranslate)) { - value = value.replace(matches[0], matches[1] + -parseFloat(matches[4])); - } - if (matches = value.match(reSkew)) { - value = value.replace(matches[0], matches[1] + -parseFloat(matches[4]) + matches[5] + matches[6] ? ', ' + (-parseFloat(matches[7]) + matches[8]) : ''); - } - break; + _this.handleInputFocus = function (event) { + if (_this.props.disabled) { + return; + } + _this.setState({ isFocused: true }); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }; - case 'transformOrigin': - if (!value) break; - if (value.indexOf('right') > -1) { - value = value.replace('right', 'left'); - } else if (value.indexOf('left') > -1) { - value = value.replace('left', 'right'); + _this.handleKeyDown = function (event) { + _this.setState({ keyPressed: false }); + if (_this.props.newChipKeyCodes.indexOf(event.keyCode) >= 0) { + _this.handleAddChip(event.target.value); + } else if (event.keyCode === 8 || event.keyCode === 46) { + if (event.target.value === '') { + var chips = _this.props.value || _this.state.chips; + if (_this.state.focusedChip == null && event.keyCode === 8) { + _this.setState({ focusedChip: chips[chips.length - 1] }); + } else if (_this.state.focusedChip) { + var index = chips.indexOf(_this.state.focusedChip); + var value = _this.props.dataSourceConfig ? _this.state.focusedChip[_this.props.dataSourceConfig.value] : _this.state.focusedChip; + _this.handleDeleteChip(value, index); + if (event.keyCode === 8 && index > 0) { + _this.setState({ focusedChip: chips[index - 1] }); + } else if (event.keyCode === 46 && index < chips.length - 1) { + _this.setState({ focusedChip: chips[index + 1] }); } - break; + } + } + } else if (event.keyCode === 37) { + var _chips = _this.props.value || _this.state.chips; + var _index = _chips.indexOf(_this.state.focusedChip); + if (_index > 0) { + _this.setState({ focusedChip: _chips[_index - 1] }); + } + } else if (event.keyCode === 39) { + var _chips2 = _this.props.value || _this.state.chips; + var _index2 = _chips2.indexOf(_this.state.focusedChip); + if (_index2 >= 0 && _index2 < _chips2.length - 1) { + _this.setState({ focusedChip: _chips2[_index2 + 1] }); + } else { + _this.setState({ focusedChip: null }); } + } else { + _this.setState({ focusedChip: null }); + } + }; - newStyle[key] = value; - }); + _this.handleKeyUp = function (event) { + if (_this.props.newChipKeyCodes.indexOf(event.keyCode) > 0 && _this.state.keyPressed) { + _this.clearInput(); + } else { + _this.setState({ inputValue: event.target.value }); + } + }; - return newStyle; + _this.handleKeyPress = function (event) { + _this.setState({ keyPressed: true }); + }; + + _this.setAutoComplete = function (autoComplete) { + _this.autoComplete = autoComplete; }; + + if (props.defaultValue) { + _this.state.chips = props.defaultValue; + } + return _this; } -} -/***/ }), -/* 788 */ -/***/ (function(module, exports, __webpack_require__) { + _createClass(ChipInput, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + name = _props.name, + hintText = _props.hintText, + floatingLabelText = _props.floatingLabelText; -"use strict"; + this.setState({ + errorText: this.props.errorText + }); -exports.__esModule = true; -exports.default = compose; -function compose() { - for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { - funcs[_key] = arguments[_key]; - } + var uniqueId = name + '-' + hintText + '-' + floatingLabelText + '-' + Math.floor(Math.random() * 0xFFFF); + this.uniqueId = uniqueId.replace(/[^A-Za-z0-9-]/gi, ''); + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + var _this2 = this; - if (funcs.length === 0) { - return function (arg) { - return arg; - }; - } + var handleKeyDown = this.autoComplete.handleKeyDown; + this.autoComplete.handleKeyDown = function (event) { + var newChipKeyCodes = _this2.props.newChipKeyCodes; - if (funcs.length === 1) { - return funcs[0]; - } + if (newChipKeyCodes.indexOf(event.keyCode) >= 0 && event.target.value) { + event.preventDefault(); + _this2.handleAddChip(event.target.value); + _this2.autoComplete.setState({ searchText: '' }); + _this2.autoComplete.forceUpdate(); + } else { + handleKeyDown(event); + } + }; - return funcs.reduce(function (a, b) { - return function () { - return a(b.apply(undefined, arguments)); - }; - }); -} + this.autoComplete.handleItemTouchTap = function (event, child) { + var dataSource = _this2.autoComplete.props.dataSource; -/***/ }), -/* 789 */ -/***/ (function(module, exports, __webpack_require__) { + var index = parseInt(child.key, 10); + var chosenRequest = dataSource[index]; + _this2.handleAddChip(chosenRequest); -"use strict"; + _this2.autoComplete.setState({ + searchText: '' + }); + _this2.autoComplete.forceUpdate(); + _this2.autoComplete.close(); + setTimeout(function () { + return _this2.focus(); + }, 1); + }; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.zIndex = exports.typography = exports.transitions = exports.spacing = exports.muiThemeable = exports.getMuiTheme = exports.LightRawTheme = exports.lightBaseTheme = exports.DarkRawTheme = exports.darkBaseTheme = exports.colors = exports.MuiThemeProvider = undefined; + // force update autocomplete to ensure that it uses the new handlers + this.autoComplete.forceUpdate(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.disabled) { + this.setState({ focusedChip: null }); + } + if (nextProps.errorText !== this.props.errorText) { + this.setState({ + errorText: nextProps.errorText + }); + } + } + }, { + key: 'blur', + value: function blur() { + if (this.input) this.getInputNode().blur(); + } + }, { + key: 'focus', + value: function focus() { + if (this.autoComplete) { + this.getInputNode().focus(); + if (this.props.openOnFocus) { + this.autoComplete.setState({ + open: true, + anchorEl: this.getInputNode() + }); + + this.autoComplete.forceUpdate(); + } + } + if (this.state.focusedChip) { + this.setState({ focusedChip: null }); + } + } + }, { + key: 'select', + value: function select() { + if (this.input) this.getInputNode().select(); + } + }, { + key: 'getValue', + value: function getValue() { + return this.input ? this.getInputNode().value : undefined; + } + }, { + key: 'getInputNode', + value: function getInputNode() { + return this.autoComplete.refs.searchTextField.getInputNode(); + } + }, { + key: 'handleAddChip', + value: function handleAddChip(chip) { + var _this3 = this; -var _MuiThemeProvider2 = __webpack_require__(790); + this.autoComplete.setState({ searchText: '' }); + var chips = this.props.value || this.state.chips; -var _MuiThemeProvider3 = _interopRequireDefault(_MuiThemeProvider2); + if (this.props.dataSourceConfig) { + if (typeof chip === 'string') { + var _chip; -var _colors2 = __webpack_require__(56); + chip = (_chip = {}, _defineProperty(_chip, this.props.dataSourceConfig.text, chip), _defineProperty(_chip, this.props.dataSourceConfig.value, chip), _chip); + } -var _colors = _interopRequireWildcard(_colors2); + if (this.props.allowDuplicates || !chips.some(function (c) { + return c[_this3.props.dataSourceConfig.value] === chip[_this3.props.dataSourceConfig.value]; + })) { + if (this.props.value) { + if (this.props.onRequestAdd) { + this.props.onRequestAdd(chip); + } + } else { + this.setState({ chips: [].concat(_toConsumableArray(this.state.chips), [chip]) }); + if (this.props.onChange) { + this.props.onChange([].concat(_toConsumableArray(this.state.chips), [chip])); + } + } + } + } else { + if (chip.trim().length > 0) { + if (this.props.allowDuplicates || chips.indexOf(chip) === -1) { + if (this.props.value) { + if (this.props.onRequestAdd) { + this.props.onRequestAdd(chip); + } + } else { + this.setState({ chips: [].concat(_toConsumableArray(this.state.chips), [chip]) }); + if (this.props.onChange) { + this.props.onChange([].concat(_toConsumableArray(this.state.chips), [chip])); + } + } + } + } + } + } + }, { + key: 'handleDeleteChip', + value: function handleDeleteChip(chip, i) { + if (this.props.value) { + if (this.props.onRequestDelete) { + this.props.onRequestDelete(chip, i); + } + } else { + if (this.props.dataSourceConfig) { + var chips = this.state.chips.slice(); + var changed = chips.splice(i, 1); // remove the chip at index i + if (changed) { + this.setState({ + chips: chips, + focusedChip: this.state.focusedChip && this.state.focusedChip[this.props.dataSourceConfig.value] === chip ? null : this.state.focusedChip + }); + if (this.props.onChange) { + this.props.onChange(chips); + } + } + } else { + var _chips3 = this.state.chips.slice(); + var _changed = _chips3.splice(i, 1); // remove the chip at index i + if (_changed) { + this.setState({ + chips: _chips3, + focusedChip: this.state.focusedChip === chip ? null : this.state.focusedChip + }); + if (this.props.onChange) { + this.props.onChange(_chips3); + } + } + } + } + } + }, { + key: 'clearInput', + value: function clearInput() { + this.setState({ inputValue: '' }); + } + + /** + * Sets a reference to the AutoComplete instance. + * + * Using a bound class method here to set `autoComplete` to avoid it being set + * to null by an inline ref callback. + * + * See [Issue #71](https://github.com/TeamWertarbyte/material-ui-chip-input/issues/71) + * + * @param {Object} autoComplete - The AutoComplete DOM element or null + */ -var _darkBaseTheme2 = __webpack_require__(791); + }, { + key: 'render', + value: function render() { + var _this4 = this; -var _darkBaseTheme3 = _interopRequireDefault(_darkBaseTheme2); + var _props2 = this.props, + children = _props2.children, + className = _props2.className, + dataSourceConfig = _props2.dataSourceConfig, + disabled = _props2.disabled, + errorStyle = _props2.errorStyle, + errorText = _props2.errorText, + fullWidth = _props2.fullWidth, + fullWidthInput = _props2.fullWidthInput, + hintText = _props2.hintText, + hintStyle = _props2.hintStyle, + id = _props2.id, + inputStyle = _props2.inputStyle, + clearOnBlur = _props2.clearOnBlur, + onBlur = _props2.onBlur, + onChange = _props2.onChange, + onFocus = _props2.onFocus, + style = _props2.style, + chipContainerStyle = _props2.chipContainerStyle, + underlineDisabledStyle = _props2.underlineDisabledStyle, + underlineFocusStyle = _props2.underlineFocusStyle, + underlineShow = _props2.underlineShow, + underlineStyle = _props2.underlineStyle, + _props2$defaultValue = _props2.defaultValue, + defaultValue = _props2$defaultValue === undefined ? [] : _props2$defaultValue, + filter = _props2.filter, + value = _props2.value, + dataSource = _props2.dataSource, + floatingLabelFixed = _props2.floatingLabelFixed, + floatingLabelFocusStyle = _props2.floatingLabelFocusStyle, + floatingLabelStyle = _props2.floatingLabelStyle, + floatingLabelText = _props2.floatingLabelText, + onRequestAdd = _props2.onRequestAdd, + onRequestDelete = _props2.onRequestDelete, + _props2$chipRenderer = _props2.chipRenderer, + chipRenderer = _props2$chipRenderer === undefined ? defaultChipRenderer : _props2$chipRenderer, + newChipKeyCodes = _props2.newChipKeyCodes, + allowDuplicates = _props2.allowDuplicates, + other = _objectWithoutProperties(_props2, ['children', 'className', 'dataSourceConfig', 'disabled', 'errorStyle', 'errorText', 'fullWidth', 'fullWidthInput', 'hintText', 'hintStyle', 'id', 'inputStyle', 'clearOnBlur', 'onBlur', 'onChange', 'onFocus', 'style', 'chipContainerStyle', 'underlineDisabledStyle', 'underlineFocusStyle', 'underlineShow', 'underlineStyle', 'defaultValue', 'filter', 'value', 'dataSource', 'floatingLabelFixed', 'floatingLabelFocusStyle', 'floatingLabelStyle', 'floatingLabelText', 'onRequestAdd', 'onRequestDelete', 'chipRenderer', 'newChipKeyCodes', 'allowDuplicates']); -var _lightBaseTheme2 = __webpack_require__(299); + var prepareStyles = this.context.muiTheme.prepareStyles; -var _lightBaseTheme3 = _interopRequireDefault(_lightBaseTheme2); + var styles = getStyles(this.props, this.context, this.state); + var inputId = id || this.uniqueId; -var _getMuiTheme2 = __webpack_require__(121); + var inputProps = { + id: inputId, + ref: function ref(elem) { + _this4.input = elem; + }, + disabled: !!this.props.disabled, + onBlur: this.handleInputBlur, + onFocus: this.handleInputFocus, + onKeyDown: this.handleKeyDown, + onKeyUp: this.handleKeyUp, + onKeyPress: this.handleKeyPress, + fullWidth: !!fullWidthInput + }; -var _getMuiTheme3 = _interopRequireDefault(_getMuiTheme2); + var inputStyleMerged = _extends(styles.input, inputStyle); -var _muiThemeable2 = __webpack_require__(792); + var hasInput = (this.props.value || this.state.chips).length > 0 || this.state.inputValue.length > 0; + var showHintText = hintText && !hasInput; + var shrinkFloatingLabel = floatingLabelText && (hasInput || this.state.isFocused || floatingLabelFixed); -var _muiThemeable3 = _interopRequireDefault(_muiThemeable2); + var errorTextElement = this.state.errorText && _react2.default.createElement( + 'div', + { style: prepareStyles(_extends(styles.error, errorStyle)) }, + this.state.errorText + ); -var _spacing2 = __webpack_require__(186); + var floatingLabelTextElement = floatingLabelText && _react2.default.createElement( + _TextFieldLabel2.default, + { + muiTheme: this.context.muiTheme, + style: _extends(styles.floatingLabel, this.props.floatingLabelStyle), + shrinkStyle: _extends(styles.floatingLabelFocusStyle, this.props.floatingLabelFocusStyle), + htmlFor: inputId, + shrink: shrinkFloatingLabel, + disabled: disabled + }, + floatingLabelText + ); -var _spacing3 = _interopRequireDefault(_spacing2); + var overrideRootStyles = {}; + if (floatingLabelText) { + overrideRootStyles.marginTop = 14; + } + if (fullWidth) { + overrideRootStyles.width = '100%'; + } + if (disabled) { + overrideRootStyles.cursor = 'not-allowed'; + } -var _transitions2 = __webpack_require__(12); + var chips = this.props.value || this.state.chips; + var autoCompleteData = dataSourceConfig ? (dataSource || []).filter(function (value) { + return !chips.some(function (c) { + return c[dataSourceConfig.value] === value[dataSourceConfig.value]; + }); + }) : (dataSource || []).filter(function (value) { + return chips.indexOf(value) < 0; + }); -var _transitions3 = _interopRequireDefault(_transitions2); + var actualFilter = other.openOnFocus ? function (search, key) { + return search === '' || filter(search, key); + } : filter; -var _typography2 = __webpack_require__(304); + return _react2.default.createElement( + 'div', + { + className: className, + style: prepareStyles(_extends(styles.root, style, overrideRootStyles)), + onClick: function onClick() { + return _this4.focus(); + } + }, + _react2.default.createElement( + 'div', + null, + floatingLabelTextElement, + _react2.default.createElement( + 'div', + { style: _extends(styles.chipContainer, chipContainerStyle) }, + chips.map(function (tag, i) { + var value = dataSourceConfig ? tag[dataSourceConfig.value] : tag; + return chipRenderer({ + value: value, + text: dataSourceConfig ? tag[dataSourceConfig.text] : tag, + chip: tag, + isDisabled: disabled, + isFocused: dataSourceConfig ? _this4.state.focusedChip && _this4.state.focusedChip[dataSourceConfig.value] === value : _this4.state.focusedChip === value, + handleClick: function handleClick() { + return _this4.setState({ focusedChip: value }); + }, + handleRequestDelete: function handleRequestDelete() { + return _this4.handleDeleteChip(value, i); + }, + defaultStyle: styles.defaultChip + }, i); + }) + ) + ), + hintText ? _react2.default.createElement(_TextFieldHint2.default, { + muiTheme: this.context.muiTheme, + show: showHintText && !(floatingLabelText && !floatingLabelFixed && !this.state.isFocused), + style: _extends({ bottom: 20, pointerEvents: 'none' }, hintStyle), + text: hintText + }) : null, + _react2.default.createElement(_AutoComplete2.default, _extends({}, other, inputProps, { + filter: actualFilter, + style: inputStyleMerged, + dataSource: autoCompleteData, + dataSourceConfig: dataSourceConfig, + searchText: this.state.inputValue, + underlineShow: false, + ref: this.setAutoComplete + })), + underlineShow ? _react2.default.createElement(_TextFieldUnderline2.default, { + disabled: disabled, + disabledStyle: underlineDisabledStyle, + error: !!this.state.errorText, + errorStyle: errorStyle, + focus: this.state.isFocused, + focusStyle: underlineFocusStyle, + muiTheme: this.context.muiTheme, + style: underlineStyle + }) : null, + errorTextElement + ); + } + }]); -var _typography3 = _interopRequireDefault(_typography2); + return ChipInput; +}(_react2.default.Component); -var _zIndex2 = __webpack_require__(300); +ChipInput.contextTypes = { + muiTheme: _propTypes2.default.object.isRequired +}; -var _zIndex3 = _interopRequireDefault(_zIndex2); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +ChipInput.propTypes = { + style: _propTypes2.default.object, + chipContainerStyle: _propTypes2.default.object, + floatingLabelText: _propTypes2.default.node, + hintText: _propTypes2.default.node, + id: _propTypes2.default.string, + dataSourceConfig: _propTypes2.default.shape({ + text: _propTypes2.default.string.isRequired, + value: _propTypes2.default.string.isRequired + }), + disabled: _propTypes2.default.bool, + defaultValue: _propTypes2.default.array, + onChange: _propTypes2.default.func, + value: _propTypes2.default.array, + onRequestAdd: _propTypes2.default.func, + onRequestDelete: _propTypes2.default.func, + dataSource: _propTypes2.default.array, + onUpdateInput: _propTypes2.default.func, + openOnFocus: _propTypes2.default.bool, + chipRenderer: _propTypes2.default.func, + newChipKeyCodes: _propTypes2.default.arrayOf(_propTypes2.default.number), + clearOnBlur: _propTypes2.default.bool, + allowDuplicates: _propTypes2.default.bool +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +ChipInput.defaultProps = { + filter: _AutoComplete2.default.caseInsensitiveFilter, + newChipKeyCodes: [13], + clearOnBlur: true, + allowDuplicates: false, + underlineShow: true +}; -exports.MuiThemeProvider = _MuiThemeProvider3.default; -exports.colors = _colors; -exports.darkBaseTheme = _darkBaseTheme3.default; -exports.DarkRawTheme = _darkBaseTheme3.default; -exports.lightBaseTheme = _lightBaseTheme3.default; -exports.LightRawTheme = _lightBaseTheme3.default; -exports.getMuiTheme = _getMuiTheme3.default; -exports.muiThemeable = _muiThemeable3.default; -exports.spacing = _spacing3.default; -exports.transitions = _transitions3.default; -exports.typography = _typography3.default; -exports.zIndex = _zIndex3.default; +exports.default = ChipInput; /***/ }), -/* 790 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _getPrototypeOf = __webpack_require__(4); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _classCallCheck2 = __webpack_require__(2); - -var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - -var _createClass2 = __webpack_require__(3); +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ -var _createClass3 = _interopRequireDefault(_createClass2); +if (process.env.NODE_ENV !== 'production') { + var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && + Symbol.for && + Symbol.for('react.element')) || + 0xeac7; -var _possibleConstructorReturn2 = __webpack_require__(5); + var isValidElement = function(object) { + return typeof object === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE; + }; -var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = __webpack_require__(223)(isValidElement, throwOnDirectAccess); +} else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__(780)(); +} -var _inherits2 = __webpack_require__(6); +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -var _inherits3 = _interopRequireDefault(_inherits2); +/***/ }), +/* 780 */ +/***/ (function(module, exports, __webpack_require__) { -var _react = __webpack_require__(1); +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ -var _getMuiTheme = __webpack_require__(121); -var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var emptyFunction = __webpack_require__(21); +var invariant = __webpack_require__(10); +var ReactPropTypesSecret = __webpack_require__(147); -var MuiThemeProvider = function (_Component) { - (0, _inherits3.default)(MuiThemeProvider, _Component); +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, - function MuiThemeProvider() { - (0, _classCallCheck3.default)(this, MuiThemeProvider); - return (0, _possibleConstructorReturn3.default)(this, (MuiThemeProvider.__proto__ || (0, _getPrototypeOf2.default)(MuiThemeProvider)).apply(this, arguments)); - } + any: shim, + arrayOf: getShim, + element: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim + }; - (0, _createClass3.default)(MuiThemeProvider, [{ - key: 'getChildContext', - value: function getChildContext() { - return { - muiTheme: this.props.muiTheme || (0, _getMuiTheme2.default)() - }; - } - }, { - key: 'render', - value: function render() { - return this.props.children; - } - }]); - return MuiThemeProvider; -}(_react.Component); + ReactPropTypes.checkPropTypes = emptyFunction; + ReactPropTypes.PropTypes = ReactPropTypes; -MuiThemeProvider.childContextTypes = { - muiTheme: _react.PropTypes.object.isRequired + return ReactPropTypes; }; -process.env.NODE_ENV !== "production" ? MuiThemeProvider.propTypes = { - children: _react.PropTypes.element, - muiTheme: _react.PropTypes.object -} : void 0; -exports.default = MuiThemeProvider; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + /***/ }), -/* 791 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67789,44 +70923,22 @@ exports.default = MuiThemeProvider; Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = undefined; -var _colors = __webpack_require__(56); - -var _colorManipulator = __webpack_require__(70); - -var _spacing = __webpack_require__(186); +var _Chip = __webpack_require__(782); -var _spacing2 = _interopRequireDefault(_spacing); +var _Chip2 = _interopRequireDefault(_Chip); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.default = { - spacing: _spacing2.default, - fontFamily: 'Roboto, sans-serif', - palette: { - primary1Color: _colors.cyan700, - primary2Color: _colors.cyan700, - primary3Color: _colors.grey600, - accent1Color: _colors.pinkA200, - accent2Color: _colors.pinkA400, - accent3Color: _colors.pinkA100, - textColor: _colors.fullWhite, - secondaryTextColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.7), - alternateTextColor: '#303030', - canvasColor: '#303030', - borderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), - disabledColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), - pickerHeaderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12), - clockCircleColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12) - } -}; +exports.default = _Chip2.default; /***/ }), -/* 792 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - +/* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true @@ -67836,479 +70948,374 @@ var _extends2 = __webpack_require__(8); var _extends3 = _interopRequireDefault(_extends2); -exports.default = muiThemeable; - -var _react = __webpack_require__(1); - -var _react2 = _interopRequireDefault(_react); - -var _getMuiTheme = __webpack_require__(121); - -var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _objectWithoutProperties2 = __webpack_require__(9); -var DEFAULT_THEME = void 0; +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); -function getDefaultTheme() { - if (!DEFAULT_THEME) { - DEFAULT_THEME = (0, _getMuiTheme2.default)(); - } - return DEFAULT_THEME; -} +var _getPrototypeOf = __webpack_require__(4); -function muiThemeable() { - return function (Component) { - var MuiComponent = function MuiComponent(props, context) { - var _context$muiTheme = context.muiTheme, - muiTheme = _context$muiTheme === undefined ? getDefaultTheme() : _context$muiTheme; +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); +var _classCallCheck2 = __webpack_require__(2); - return _react2.default.createElement(Component, (0, _extends3.default)({ muiTheme: muiTheme }, props)); - }; +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); - MuiComponent.contextTypes = { - muiTheme: _react.PropTypes.object.isRequired - }; +var _createClass2 = __webpack_require__(3); - return MuiComponent; - }; -} +var _createClass3 = _interopRequireDefault(_createClass2); -/***/ }), -/* 793 */ -/***/ (function(module, exports, __webpack_require__) { +var _possibleConstructorReturn2 = __webpack_require__(5); -"use strict"; +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); +var _inherits2 = __webpack_require__(6); -Object.defineProperty(exports, "__esModule", { - value: true -}); +var _inherits3 = _interopRequireDefault(_inherits2); -var _assign = __webpack_require__(99); +var _simpleAssign = __webpack_require__(7); -var _assign2 = _interopRequireDefault(_assign); +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _reduxForm = __webpack_require__(162); +var _keycode = __webpack_require__(27); -var _reactRedux = __webpack_require__(33); +var _keycode2 = _interopRequireDefault(_keycode); -var _RaisedButton = __webpack_require__(182); +var _colorManipulator = __webpack_require__(62); -var _RaisedButton2 = _interopRequireDefault(_RaisedButton); +var _EnhancedButton = __webpack_require__(44); -var _reduxFormMaterialUi = __webpack_require__(183); +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); -var _Styles = __webpack_require__(120); +var _cancel = __webpack_require__(783); -var _Styles2 = _interopRequireDefault(_Styles); +var _cancel2 = _interopRequireDefault(_cancel); -var _FormValidators = __webpack_require__(189); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var Validators = _interopRequireWildcard(_FormValidators); +function getStyles(props, context, state) { + var chip = context.muiTheme.chip; -var _Menus = __webpack_require__(84); -var menus = _interopRequireWildcard(_Menus); + var backgroundColor = props.backgroundColor || chip.backgroundColor; + var focusColor = (0, _colorManipulator.emphasize)(backgroundColor, 0.08); + var pressedColor = (0, _colorManipulator.emphasize)(backgroundColor, 0.12); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + return { + avatar: { + marginRight: -4 + }, + deleteIcon: { + color: state.deleteHovered ? (0, _colorManipulator.fade)(chip.deleteIconColor, 0.4) : chip.deleteIconColor, + cursor: 'pointer', + margin: '4px 4px 0px -8px' + }, + label: { + color: props.labelColor || chip.textColor, + fontSize: chip.fontSize, + fontWeight: chip.fontWeight, + lineHeight: '32px', + paddingLeft: 12, + paddingRight: 12, + userSelect: 'none', + whiteSpace: 'nowrap' + }, + root: { + backgroundColor: state.clicked ? pressedColor : state.focused || state.hovered ? focusColor : backgroundColor, + borderRadius: 16, + boxShadow: state.clicked ? chip.shadow : null, + cursor: props.onTouchTap ? 'pointer' : 'default', + display: 'flex', + whiteSpace: 'nowrap', + width: 'fit-content' + } + }; +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var Chip = function (_Component) { + (0, _inherits3.default)(Chip, _Component); -var defaultValues = { - autoCheckout: false, - autoPay: false, - strictSize: true, - hideSoldOut: false, - captchaBypass: false, - addToCartDelay: 200, - checkoutDelay: 2000 -}; + function Chip() { + var _ref; -var Options = function Options(props) { - var handleSubmit = props.handleSubmit, - pristine = props.pristine, - submitting = props.submitting; + var _temp, _this, _ret; - return _react2.default.createElement( - 'form', - { onSubmit: handleSubmit, id: 'options-form' }, - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'autoCheckout', - component: _reduxFormMaterialUi.Toggle, - label: 'Enable auto checkout', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'autoPay', - component: _reduxFormMaterialUi.Toggle, - label: 'Enable auto payment', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'strictSize', - component: _reduxFormMaterialUi.Toggle, - label: 'Enable strict size checking', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'hideSoldOut', - component: _reduxFormMaterialUi.Toggle, - label: 'Hide sold out products', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'captchaBypass', - component: _reduxFormMaterialUi.Toggle, - label: 'Bypass captcha (beta)', - style: _Styles2.default.fields.text - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'addToCartDelay', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Add to cart delay (ms)', - hintText: 'Add to cart delay (ms)', - style: _Styles2.default.fields.text, - validate: [Validators.required, Validators.number] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'checkoutDelay', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Checkout delay (ms)', - hintText: 'Checkout delay (ms)', - style: _Styles2.default.fields.text, - validate: [Validators.required, Validators.number] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'maxPrice', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Maximum product price', - hintText: 'Maximum product price', - style: _Styles2.default.fields.text, - validate: [Validators.required, Validators.number] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_reduxForm.Field, { - name: 'minPrice', - component: _reduxFormMaterialUi.TextField, - floatingLabelText: 'Minimum product price', - hintText: 'Minimum product price', - style: _Styles2.default.fields.text, - validate: [Validators.required, Validators.number] - }) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_RaisedButton2.default, { - label: 'Save', - disabled: pristine || submitting, - type: 'submit' - }) - ) - ); -}; + (0, _classCallCheck3.default)(this, Chip); -function mapStateToProps(state, ownProps) { - return { - initialValues: (0, _assign2.default)(defaultValues, (state.settings.values[ownProps.shop] || {})[menus.MENU_OPTIONS] || {}) - }; -} + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } -Options.propTypes = { - shop: _react.PropTypes.string.isRequired -}; + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Chip.__proto__ || (0, _getPrototypeOf2.default)(Chip)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + clicked: false, + deleteHovered: false, + focused: false, + hovered: false + }, _this.handleBlur = function (event) { + _this.setState({ clicked: false, focused: false }); + _this.props.onBlur(event); + }, _this.handleFocus = function (event) { + if (_this.props.onTouchTap || _this.props.onRequestDelete) { + _this.setState({ focused: true }); + } + _this.props.onFocus(event); + }, _this.handleKeyboardFocus = function (event, keyboardFocused) { + if (keyboardFocused) { + _this.handleFocus(); + _this.props.onFocus(event); + } else { + _this.handleBlur(); + } + + _this.props.onKeyboardFocus(event, keyboardFocused); + }, _this.handleKeyDown = function (event) { + if ((0, _keycode2.default)(event) === 'backspace') { + event.preventDefault(); + if (_this.props.onRequestDelete) { + _this.props.onRequestDelete(event); + } + } + _this.props.onKeyDown(event); + }, _this.handleMouseDown = function (event) { + // Only listen to left clicks + if (event.button === 0) { + event.stopPropagation(); + if (_this.props.onTouchTap) { + _this.setState({ clicked: true }); + } + } + _this.props.onMouseDown(event); + }, _this.handleMouseEnter = function (event) { + if (_this.props.onTouchTap) { + _this.setState({ hovered: true }); + } + _this.props.onMouseEnter(event); + }, _this.handleMouseEnterDeleteIcon = function () { + _this.setState({ deleteHovered: true }); + }, _this.handleMouseLeave = function (event) { + _this.setState({ + clicked: false, + hovered: false + }); + _this.props.onMouseLeave(event); + }, _this.handleMouseLeaveDeleteIcon = function () { + _this.setState({ deleteHovered: false }); + }, _this.handleMouseUp = function (event) { + _this.setState({ clicked: false }); + _this.props.onMouseUp(event); + }, _this.handleTouchTapDeleteIcon = function (event) { + // Stop the event from bubbling up to the `Chip` + event.stopPropagation(); + _this.props.onRequestDelete(event); + }, _this.handleTouchEnd = function (event) { + _this.setState({ clicked: false }); + _this.props.onTouchEnd(event); + }, _this.handleTouchStart = function (event) { + event.stopPropagation(); + if (_this.props.onTouchTap) { + _this.setState({ clicked: true }); + } + _this.props.onTouchStart(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } -exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({ - form: 'options' -})(Options)); + (0, _createClass3.default)(Chip, [{ + key: 'render', + value: function render() { + var buttonEventHandlers = { + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onKeyDown: this.handleKeyDown, + onMouseDown: this.handleMouseDown, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onMouseUp: this.handleMouseUp, + onTouchEnd: this.handleTouchEnd, + onTouchStart: this.handleTouchStart, + onKeyboardFocus: this.handleKeyboardFocus + }; -/***/ }), -/* 794 */ -/***/ (function(module, exports, __webpack_require__) { + var prepareStyles = this.context.muiTheme.prepareStyles; -"use strict"; + var styles = getStyles(this.props, this.context, this.state); + var _props = this.props, + childrenProp = _props.children, + style = _props.style, + className = _props.className, + labelStyle = _props.labelStyle, + labelColor = _props.labelColor, + backgroundColor = _props.backgroundColor, + onRequestDelete = _props.onRequestDelete, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'style', 'className', 'labelStyle', 'labelColor', 'backgroundColor', 'onRequestDelete']); -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _react = __webpack_require__(1); + var deletable = this.props.onRequestDelete; + var avatar = null; -var _react2 = _interopRequireDefault(_react); + var deleteIcon = deletable ? _react2.default.createElement(_cancel2.default, { + color: styles.deleteIcon.color, + style: styles.deleteIcon, + onTouchTap: this.handleTouchTapDeleteIcon, + onMouseEnter: this.handleMouseEnterDeleteIcon, + onMouseLeave: this.handleMouseLeaveDeleteIcon + }) : null; -var _reduxForm = __webpack_require__(162); + var children = childrenProp; + var childCount = _react2.default.Children.count(children); -var _reactRedux = __webpack_require__(33); + // If the first child is an avatar, extract it and style it + if (childCount > 1) { + children = _react2.default.Children.toArray(children); -var _MenuItem = __webpack_require__(118); + if (_react2.default.isValidElement(children[0]) && children[0].type.muiName === 'Avatar') { + avatar = children.shift(); -var _MenuItem2 = _interopRequireDefault(_MenuItem); + avatar = _react2.default.cloneElement(avatar, { + style: (0, _simpleAssign2.default)(styles.avatar, avatar.props.style), + size: 32 + }); + } + } -var _RaisedButton = __webpack_require__(182); + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, buttonEventHandlers, { + className: className, + containerElement: 'div' // Firefox doesn't support nested buttons + , disableTouchRipple: true, + disableFocusRipple: true, + style: (0, _simpleAssign2.default)(styles.root, style) + }), + avatar, + _react2.default.createElement( + 'span', + { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) }, + children + ), + deleteIcon + ); + } + }]); + return Chip; +}(_react.Component); -var _RaisedButton2 = _interopRequireDefault(_RaisedButton); +Chip.defaultProps = { + onBlur: function onBlur() {}, + onFocus: function onFocus() {}, + onKeyDown: function onKeyDown() {}, + onKeyboardFocus: function onKeyboardFocus() {}, + onMouseDown: function onMouseDown() {}, + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + onMouseUp: function onMouseUp() {}, + onTouchEnd: function onTouchEnd() {}, + onTouchStart: function onTouchStart() {} +}; +Chip.contextTypes = { muiTheme: _react.PropTypes.object.isRequired }; +process.env.NODE_ENV !== "production" ? Chip.propTypes = { + /** + * Override the background color of the chip. + */ + backgroundColor: _react.PropTypes.string, + /** + * Used to render elements inside the Chip. + */ + children: _react.PropTypes.node, + /** + * CSS `className` of the root element. + */ + className: _react.PropTypes.node, + /** + * Override the label color. + */ + labelColor: _react.PropTypes.string, + /** + * Override the inline-styles of the label. + */ + labelStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** @ignore */ + onKeyDown: _react.PropTypes.func, + /** @ignore */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseDown: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onMouseUp: _react.PropTypes.func, + /** + * Callback function fired when the delete icon is clicked. If set, the delete icon will be shown. + * @param {object} event `touchTap` event targeting the element. + */ + onRequestDelete: _react.PropTypes.func, + /** @ignore */ + onTouchEnd: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * Callback function fired when the `Chip` element is touch-tapped. + * + * @param {object} event TouchTap event targeting the element. + */ + onTouchTap: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = Chip; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) -var _reduxFormMaterialUi = __webpack_require__(183); +/***/ }), +/* 783 */ +/***/ (function(module, exports, __webpack_require__) { -var _Styles = __webpack_require__(120); +"use strict"; -var _Styles2 = _interopRequireDefault(_Styles); -var _Utils = __webpack_require__(305); +Object.defineProperty(exports, "__esModule", { + value: true +}); -var Utils = _interopRequireWildcard(_Utils); +var _react = __webpack_require__(1); -var _FormValidators = __webpack_require__(189); +var _react2 = _interopRequireDefault(_react); -var Validators = _interopRequireWildcard(_FormValidators); +var _pure = __webpack_require__(22); -var _Menus = __webpack_require__(84); +var _pure2 = _interopRequireDefault(_pure); -var menus = _interopRequireWildcard(_Menus); +var _SvgIcon = __webpack_require__(23); -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var Sizes = function Sizes(props) { - var handleSubmit = props.handleSubmit, - pristine = props.pristine, - submitting = props.submitting; - +var NavigationCancel = function NavigationCancel(props) { return _react2.default.createElement( - 'form', - { onSubmit: handleSubmit, id: 'biling-form' }, - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'accessories', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Accessories', - hintText: 'Accessories', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 't-shirts', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'T-Shirts', - hintText: 'T-Shirts', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'pants', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Pants', - hintText: 'Pants', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizesPants.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'shorts', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Shorts', - hintText: 'Shorts', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizesPants.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'sweatshirts', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Sweatshirts', - hintText: 'Sweatshirts', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'tops-sweaters', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Tops/Sweaters', - hintText: 'Tops/Sweaters', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'shirts', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Shirts', - hintText: 'Shirts', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'jackets', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Jackets', - hintText: 'Jackets', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.sizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement( - _reduxForm.Field, - { - name: 'shoes', - component: _reduxFormMaterialUi.SelectField, - floatingLabelText: 'Shoes', - hintText: 'Shoes', - style: _Styles2.default.fields.text, - validate: [Validators.required] - }, - Utils.shoeSizes.map(function (x) { - return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); - }) - ) - ), - _react2.default.createElement( - 'div', - null, - _react2.default.createElement(_RaisedButton2.default, { - label: 'Save', - disabled: pristine || submitting, - type: 'submit' - }) - ) + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z' }) ); }; +NavigationCancel = (0, _pure2.default)(NavigationCancel); +NavigationCancel.displayName = 'NavigationCancel'; +NavigationCancel.muiName = 'SvgIcon'; -Sizes.propTypes = { - shop: _react.PropTypes.string.isRequired -}; - -function mapStateToProps(state, ownProps) { - return { - initialValues: (state.settings.values[ownProps.shop] || {})[menus.MENU_SIZES] || {} - }; -} - -exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({ - form: 'sizes' -})(Sizes)); +exports.default = NavigationCancel; /***/ }), -/* 795 */ +/* 784 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68328,19 +71335,19 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _AppBar = __webpack_require__(796); +var _AppBar = __webpack_require__(785); var _AppBar2 = _interopRequireDefault(_AppBar); -var _Tabs = __webpack_require__(799); +var _Tabs = __webpack_require__(788); var _Tabs2 = _interopRequireDefault(_Tabs); -var _Paper = __webpack_require__(39); +var _Paper = __webpack_require__(38); var _Paper2 = _interopRequireDefault(_Paper); -var _Styles = __webpack_require__(120); +var _Styles = __webpack_require__(91); var _Styles2 = _interopRequireDefault(_Styles); @@ -68401,7 +71408,7 @@ Layout.propTypes = { }; /***/ }), -/* 796 */ +/* 785 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68412,7 +71419,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = undefined; -var _AppBar = __webpack_require__(797); +var _AppBar = __webpack_require__(786); var _AppBar2 = _interopRequireDefault(_AppBar); @@ -68421,7 +71428,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.default = _AppBar2.default; /***/ }), -/* 797 */ +/* 786 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68435,7 +71442,7 @@ var _extends2 = __webpack_require__(8); var _extends3 = _interopRequireDefault(_extends2); -var _keys = __webpack_require__(50); +var _keys = __webpack_require__(54); var _keys2 = _interopRequireDefault(_keys); @@ -68473,19 +71480,19 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _IconButton = __webpack_require__(83); +var _IconButton = __webpack_require__(72); var _IconButton2 = _interopRequireDefault(_IconButton); -var _menu = __webpack_require__(798); +var _menu = __webpack_require__(787); var _menu2 = _interopRequireDefault(_menu); -var _Paper = __webpack_require__(39); +var _Paper = __webpack_require__(38); var _Paper2 = _interopRequireDefault(_Paper); -var _propTypes = __webpack_require__(44); +var _propTypes = __webpack_require__(46); var _propTypes2 = _interopRequireDefault(_propTypes); @@ -68808,7 +71815,7 @@ exports.default = AppBar; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 798 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68822,11 +71829,11 @@ var _react = __webpack_require__(1); var _react2 = _interopRequireDefault(_react); -var _pure = __webpack_require__(28); +var _pure = __webpack_require__(22); var _pure2 = _interopRequireDefault(_pure); -var _SvgIcon = __webpack_require__(29); +var _SvgIcon = __webpack_require__(23); var _SvgIcon2 = _interopRequireDefault(_SvgIcon); @@ -68846,7 +71853,7 @@ NavigationMenu.muiName = 'SvgIcon'; exports.default = NavigationMenu; /***/ }), -/* 799 */ +/* 788 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68896,11 +71903,11 @@ var _warning = __webpack_require__(26); var _warning2 = _interopRequireDefault(_warning); -var _TabTemplate = __webpack_require__(800); +var _TabTemplate = __webpack_require__(789); var _TabTemplate2 = _interopRequireDefault(_TabTemplate); -var _InkBar = __webpack_require__(801); +var _InkBar = __webpack_require__(790); var _InkBar2 = _interopRequireDefault(_InkBar); @@ -69168,7 +72175,7 @@ exports.default = Tabs; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 800 */ +/* 789 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69222,7 +72229,7 @@ exports.default = TabTemplate; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 801 */ +/* 790 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69323,7 +72330,204 @@ exports.default = InkBar; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) /***/ }), -/* 802 */ +/* 791 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Badge = __webpack_require__(792); + +var _Badge2 = _interopRequireDefault(_Badge); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Badge2.default; + +/***/ }), +/* 792 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var primary = props.primary, + secondary = props.secondary; + var badge = context.muiTheme.badge; + + + var badgeBackgroundColor = void 0; + var badgeTextColor = void 0; + + if (primary) { + badgeBackgroundColor = badge.primaryColor; + badgeTextColor = badge.primaryTextColor; + } else if (secondary) { + badgeBackgroundColor = badge.secondaryColor; + badgeTextColor = badge.secondaryTextColor; + } else { + badgeBackgroundColor = badge.color; + badgeTextColor = badge.textColor; + } + + var radius = 12; + var radius2x = Math.floor(2 * radius); + + return { + root: { + position: 'relative', + display: 'inline-block', + padding: radius2x + 'px ' + radius2x + 'px ' + radius + 'px ' + radius + 'px' + }, + badge: { + display: 'flex', + flexDirection: 'row', + flexWrap: 'wrap', + justifyContent: 'center', + alignContent: 'center', + alignItems: 'center', + position: 'absolute', + top: 0, + right: 0, + fontWeight: badge.fontWeight, + fontSize: radius, + width: radius2x, + height: radius2x, + borderRadius: '50%', + backgroundColor: badgeBackgroundColor, + color: badgeTextColor + } + }; +} + +var Badge = function (_Component) { + (0, _inherits3.default)(Badge, _Component); + + function Badge() { + (0, _classCallCheck3.default)(this, Badge); + return (0, _possibleConstructorReturn3.default)(this, (Badge.__proto__ || (0, _getPrototypeOf2.default)(Badge)).apply(this, arguments)); + } + + (0, _createClass3.default)(Badge, [{ + key: 'render', + value: function render() { + var _props = this.props, + badgeContent = _props.badgeContent, + badgeStyle = _props.badgeStyle, + children = _props.children, + primary = _props.primary, + secondary = _props.secondary, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['badgeContent', 'badgeStyle', 'children', 'primary', 'secondary', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, styles.root, style)) }), + children, + _react2.default.createElement( + 'span', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.badge, badgeStyle)) }, + badgeContent + ) + ); + } + }]); + return Badge; +}(_react.Component); + +Badge.defaultProps = { + primary: false, + secondary: false +}; +Badge.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Badge.propTypes = { + /** + * This is the content rendered within the badge. + */ + badgeContent: _react.PropTypes.node.isRequired, + /** + * Override the inline-styles of the badge element. + */ + badgeStyle: _react.PropTypes.object, + /** + * The badge will be added relativelty to this node. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the badge will use the primary badge colors. + */ + primary: _react.PropTypes.bool, + /** + * If true, the badge will use the secondary badge colors. + */ + secondary: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = Badge; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 793 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69333,13 +72537,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _keys = __webpack_require__(50); +var _keys = __webpack_require__(54); var _keys2 = _interopRequireDefault(_keys); exports.changeMenu = changeMenu; -var _ActionTypes = __webpack_require__(190); +var _ActionTypes = __webpack_require__(125); var types = _interopRequireWildcard(_ActionTypes); @@ -69362,7 +72566,7 @@ function changeMenu(newMenu) { } /***/ }), -/* 803 */ +/* 794 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69371,13 +72575,16 @@ function changeMenu(newMenu) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.updateSettings = updateSettings; +exports.createProfile = createProfile; +exports.setProfileEnabled = setProfileEnabled; +exports.removeProfile = removeProfile; +exports.updateProfileSettings = updateProfileSettings; -var _ActionTypes = __webpack_require__(190); +var _ActionTypes = __webpack_require__(125); var types = _interopRequireWildcard(_ActionTypes); -var _notification = __webpack_require__(804); +var _notification = __webpack_require__(312); var _notification2 = _interopRequireDefault(_notification); @@ -69385,41 +72592,48 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -function updateSettings(shop, key, value) { +function createProfile(name, description) { return function (dispatch) { - dispatch((0, _notification2.default)('Settings saved')); - var obj = {}; - obj[key] = value; + dispatch((0, _notification2.default)('Profile created')); dispatch({ - type: types.UPDATE_SETTINGS, - value: obj, - shop: shop + type: types.PROFILE_CREATE, + name: name, + description: description }); }; } -/***/ }), -/* 804 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = addNotification; - -var _ActionTypes = __webpack_require__(190); - -var types = _interopRequireWildcard(_ActionTypes); +function setProfileEnabled(name) { + return function (dispatch) { + dispatch((0, _notification2.default)('Profile set to ' + name)); + dispatch({ + type: types.PROFILE_SET_ENABLED, + name: name + }); + }; +} -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +function removeProfile(name) { + return function (dispatch) { + dispatch((0, _notification2.default)('Profile created')); + dispatch({ + type: types.PROFILE_REMOVE, + name: name + }); + }; +} -function addNotification(message) { - return { - type: types.NOTIFICATION_ADD, - message: message +function updateProfileSettings(profileName, shop, key, value) { + return function (dispatch) { + dispatch((0, _notification2.default)('Settings saved')); + var obj = {}; + obj[key] = value; + dispatch({ + type: types.PROFILE_UPDATE_SETTINGS, + name: profileName, + value: obj, + shop: shop + }); }; } diff --git a/bot/build/extension.js.orig b/bot/build/extension.js.orig new file mode 100644 index 0000000..4119fc7 --- /dev/null +++ b/bot/build/extension.js.orig @@ -0,0 +1,68409 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "/"; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 301); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = __webpack_require__(52); + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _defineProperty = __webpack_require__(138); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(340), __esModule: true }; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _typeof2 = __webpack_require__(50); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; +}; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _setPrototypeOf = __webpack_require__(344); + +var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); + +var _create = __webpack_require__(348); + +var _create2 = _interopRequireDefault(_create); + +var _typeof2 = __webpack_require__(50); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; +}; + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +module.exports = function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; +}; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _assign = __webpack_require__(96); + +var _assign2 = _interopRequireDefault(_assign); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _assign2.default || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; +}; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (obj, keys) { + var target = {}; + + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + + return target; +}; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var validateFormat = function validateFormat(format) {}; + +if (process.env.NODE_ENV !== 'production') { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; +} + +function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +} + +module.exports = invariant; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var emptyFunction = __webpack_require__(21); + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = emptyFunction; + +if (process.env.NODE_ENV !== 'production') { + (function () { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); +} + +module.exports = warning; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + + easeOutFunction: 'cubic-bezier(0.23, 1, 0.32, 1)', + easeInOutFunction: 'cubic-bezier(0.445, 0.05, 0.55, 0.95)', + + easeOut: function easeOut(duration, property, delay, easeFunction) { + easeFunction = easeFunction || this.easeOutFunction; + + if (property && Object.prototype.toString.call(property) === '[object Array]') { + var transitions = ''; + for (var i = 0; i < property.length; i++) { + if (transitions) transitions += ','; + transitions += this.create(duration, property[i], delay, easeFunction); + } + + return transitions; + } else { + return this.create(duration, property, delay, easeFunction); + } + }, + create: function create(duration, property, delay, easeFunction) { + duration = duration || '450ms'; + property = property || 'all'; + delay = delay || '0ms'; + easeFunction = easeFunction || 'linear'; + + return property + ' ' + duration + ' ' + easeFunction + ' ' + delay; + } +}; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + +/** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + +function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; +} + +module.exports = reactProdInvariant; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var DOMProperty = __webpack_require__(42); +var ReactDOMComponentFlags = __webpack_require__(218); + +var invariant = __webpack_require__(10); + +var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; +var Flags = ReactDOMComponentFlags; + +var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2); + +/** + * Check if a given node should be cached. + */ +function shouldPrecacheNode(node, nodeID) { + return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' '; +} + +/** + * Drill down (through composites and empty components) until we get a host or + * host text component. + * + * This is pretty polymorphic but unavoidable with the current structure we have + * for `_renderedChildren`. + */ +function getRenderedHostOrTextFromComponent(component) { + var rendered; + while (rendered = component._renderedComponent) { + component = rendered; + } + return component; +} + +/** + * Populate `_hostNode` on the rendered host/text component with the given + * DOM node. The passed `inst` can be a composite. + */ +function precacheNode(inst, node) { + var hostInst = getRenderedHostOrTextFromComponent(inst); + hostInst._hostNode = node; + node[internalInstanceKey] = hostInst; +} + +function uncacheNode(inst) { + var node = inst._hostNode; + if (node) { + delete node[internalInstanceKey]; + inst._hostNode = null; + } +} + +/** + * Populate `_hostNode` on each child of `inst`, assuming that the children + * match up with the DOM (element) children of `node`. + * + * We cache entire levels at once to avoid an n^2 problem where we access the + * children of a node sequentially and have to walk from the start to our target + * node every time. + * + * Since we update `_renderedChildren` and the actual DOM at (slightly) + * different times, we could race here and see a newer `_renderedChildren` than + * the DOM nodes we see. To avoid this, ReactMultiChild calls + * `prepareToManageChildren` before we change `_renderedChildren`, at which + * time the container's child nodes are always cached (until it unmounts). + */ +function precacheChildNodes(inst, node) { + if (inst._flags & Flags.hasCachedChildNodes) { + return; + } + var children = inst._renderedChildren; + var childNode = node.firstChild; + outer: for (var name in children) { + if (!children.hasOwnProperty(name)) { + continue; + } + var childInst = children[name]; + var childID = getRenderedHostOrTextFromComponent(childInst)._domID; + if (childID === 0) { + // We're currently unmounting this child in ReactMultiChild; skip it. + continue; + } + // We assume the child nodes are in the same order as the child instances. + for (; childNode !== null; childNode = childNode.nextSibling) { + if (shouldPrecacheNode(childNode, childID)) { + precacheNode(childInst, childNode); + continue outer; + } + } + // We reached the end of the DOM children without finding an ID match. + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0; + } + inst._flags |= Flags.hasCachedChildNodes; +} + +/** + * Given a DOM node, return the closest ReactDOMComponent or + * ReactDOMTextComponent instance ancestor. + */ +function getClosestInstanceFromNode(node) { + if (node[internalInstanceKey]) { + return node[internalInstanceKey]; + } + + // Walk up the tree until we find an ancestor whose instance we have cached. + var parents = []; + while (!node[internalInstanceKey]) { + parents.push(node); + if (node.parentNode) { + node = node.parentNode; + } else { + // Top of the tree. This node must not be part of a React tree (or is + // unmounted, potentially). + return null; + } + } + + var closest; + var inst; + for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) { + closest = inst; + if (parents.length) { + precacheChildNodes(inst, node); + } + } + + return closest; +} + +/** + * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent + * instance, or null if the node was not rendered by this React. + */ +function getInstanceFromNode(node) { + var inst = getClosestInstanceFromNode(node); + if (inst != null && inst._hostNode === node) { + return inst; + } else { + return null; + } +} + +/** + * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding + * DOM node. + */ +function getNodeFromInstance(inst) { + // Without this first invariant, passing a non-DOM-component triggers the next + // invariant for a missing parent, which is super confusing. + !(inst._hostNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; + + if (inst._hostNode) { + return inst._hostNode; + } + + // Walk up the tree until we find an ancestor whose DOM node we have cached. + var parents = []; + while (!inst._hostNode) { + parents.push(inst); + !inst._hostParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0; + inst = inst._hostParent; + } + + // Now parents contains each ancestor that does *not* have a cached native + // node, and `inst` is the deepest ancestor that does. + for (; parents.length; inst = parents.pop()) { + precacheChildNodes(inst, inst._hostNode); + } + + return inst._hostNode; +} + +var ReactDOMComponentTree = { + getClosestInstanceFromNode: getClosestInstanceFromNode, + getInstanceFromNode: getInstanceFromNode, + getNodeFromInstance: getNodeFromInstance, + precacheChildNodes: precacheChildNodes, + precacheNode: precacheNode, + uncacheNode: uncacheNode +}; + +module.exports = ReactDOMComponentTree; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 16 */ +/***/ (function(module, exports) { + +var core = module.exports = {version: '2.4.0'}; +if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = __webpack_require__(377); + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +/** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ +var ExecutionEnvironment = { + + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + + isInWorker: !canUseDOM // For now, this is true - might change in the future. + +}; + +module.exports = ExecutionEnvironment; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(53); + +var ReactCurrentOwner = __webpack_require__(27); + +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +function isNative(fn) { + // Based on isNative() from Lodash + var funcToString = Function.prototype.toString; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var reIsNative = RegExp('^' + funcToString + // Take an example native function source for comparison + .call(hasOwnProperty + // Strip regex characters so we can use it for regex + ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&' + // Remove hasOwnProperty from the template to make it generic + ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + try { + var source = funcToString.call(fn); + return reIsNative.test(source); + } catch (err) { + return false; + } +} + +var canUseCollections = +// Array.from +typeof Array.from === 'function' && +// Map +typeof Map === 'function' && isNative(Map) && +// Map.prototype.keys +Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) && +// Set +typeof Set === 'function' && isNative(Set) && +// Set.prototype.keys +Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys); + +var setItem; +var getItem; +var removeItem; +var getItemIDs; +var addRoot; +var removeRoot; +var getRootIDs; + +if (canUseCollections) { + var itemMap = new Map(); + var rootIDSet = new Set(); + + setItem = function (id, item) { + itemMap.set(id, item); + }; + getItem = function (id) { + return itemMap.get(id); + }; + removeItem = function (id) { + itemMap['delete'](id); + }; + getItemIDs = function () { + return Array.from(itemMap.keys()); + }; + + addRoot = function (id) { + rootIDSet.add(id); + }; + removeRoot = function (id) { + rootIDSet['delete'](id); + }; + getRootIDs = function () { + return Array.from(rootIDSet.keys()); + }; +} else { + var itemByKey = {}; + var rootByKey = {}; + + // Use non-numeric keys to prevent V8 performance issues: + // https://github.com/facebook/react/pull/7232 + var getKeyFromID = function (id) { + return '.' + id; + }; + var getIDFromKey = function (key) { + return parseInt(key.substr(1), 10); + }; + + setItem = function (id, item) { + var key = getKeyFromID(id); + itemByKey[key] = item; + }; + getItem = function (id) { + var key = getKeyFromID(id); + return itemByKey[key]; + }; + removeItem = function (id) { + var key = getKeyFromID(id); + delete itemByKey[key]; + }; + getItemIDs = function () { + return Object.keys(itemByKey).map(getIDFromKey); + }; + + addRoot = function (id) { + var key = getKeyFromID(id); + rootByKey[key] = true; + }; + removeRoot = function (id) { + var key = getKeyFromID(id); + delete rootByKey[key]; + }; + getRootIDs = function () { + return Object.keys(rootByKey).map(getIDFromKey); + }; +} + +var unmountedIDs = []; + +function purgeDeep(id) { + var item = getItem(id); + if (item) { + var childIDs = item.childIDs; + + removeItem(id); + childIDs.forEach(purgeDeep); + } +} + +function describeComponentFrame(name, source, ownerName) { + return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); +} + +function getDisplayName(element) { + if (element == null) { + return '#empty'; + } else if (typeof element === 'string' || typeof element === 'number') { + return '#text'; + } else if (typeof element.type === 'string') { + return element.type; + } else { + return element.type.displayName || element.type.name || 'Unknown'; + } +} + +function describeID(id) { + var name = ReactComponentTreeHook.getDisplayName(id); + var element = ReactComponentTreeHook.getElement(id); + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var ownerName; + if (ownerID) { + ownerName = ReactComponentTreeHook.getDisplayName(ownerID); + } + process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0; + return describeComponentFrame(name, element && element._source, ownerName); +} + +var ReactComponentTreeHook = { + onSetChildren: function (id, nextChildIDs) { + var item = getItem(id); + !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; + item.childIDs = nextChildIDs; + + for (var i = 0; i < nextChildIDs.length; i++) { + var nextChildID = nextChildIDs[i]; + var nextChild = getItem(nextChildID); + !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0; + !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0; + !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0; + if (nextChild.parentID == null) { + nextChild.parentID = id; + // TODO: This shouldn't be necessary but mounting a new root during in + // componentWillMount currently causes not-yet-mounted components to + // be purged from our tree data so their parent id is missing. + } + !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0; + } + }, + onBeforeMountComponent: function (id, element, parentID) { + var item = { + element: element, + parentID: parentID, + text: null, + childIDs: [], + isMounted: false, + updateCount: 0 + }; + setItem(id, item); + }, + onBeforeUpdateComponent: function (id, element) { + var item = getItem(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.element = element; + }, + onMountComponent: function (id) { + var item = getItem(id); + !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0; + item.isMounted = true; + var isRoot = item.parentID === 0; + if (isRoot) { + addRoot(id); + } + }, + onUpdateComponent: function (id) { + var item = getItem(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.updateCount++; + }, + onUnmountComponent: function (id) { + var item = getItem(id); + if (item) { + // We need to check if it exists. + // `item` might not exist if it is inside an error boundary, and a sibling + // error boundary child threw while mounting. Then this instance never + // got a chance to mount, but it still gets an unmounting event during + // the error boundary cleanup. + item.isMounted = false; + var isRoot = item.parentID === 0; + if (isRoot) { + removeRoot(id); + } + } + unmountedIDs.push(id); + }, + purgeUnmountedComponents: function () { + if (ReactComponentTreeHook._preventPurging) { + // Should only be used for testing. + return; + } + + for (var i = 0; i < unmountedIDs.length; i++) { + var id = unmountedIDs[i]; + purgeDeep(id); + } + unmountedIDs.length = 0; + }, + isMounted: function (id) { + var item = getItem(id); + return item ? item.isMounted : false; + }, + getCurrentStackAddendum: function (topElement) { + var info = ''; + if (topElement) { + var name = getDisplayName(topElement); + var owner = topElement._owner; + info += describeComponentFrame(name, topElement._source, owner && owner.getName()); + } + + var currentOwner = ReactCurrentOwner.current; + var id = currentOwner && currentOwner._debugID; + + info += ReactComponentTreeHook.getStackAddendumByID(id); + return info; + }, + getStackAddendumByID: function (id) { + var info = ''; + while (id) { + info += describeID(id); + id = ReactComponentTreeHook.getParentID(id); + } + return info; + }, + getChildIDs: function (id) { + var item = getItem(id); + return item ? item.childIDs : []; + }, + getDisplayName: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (!element) { + return null; + } + return getDisplayName(element); + }, + getElement: function (id) { + var item = getItem(id); + return item ? item.element : null; + }, + getOwnerID: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (!element || !element._owner) { + return null; + } + return element._owner._debugID; + }, + getParentID: function (id) { + var item = getItem(id); + return item ? item.parentID : null; + }, + getSource: function (id) { + var item = getItem(id); + var element = item ? item.element : null; + var source = element != null ? element._source : null; + return source; + }, + getText: function (id) { + var element = ReactComponentTreeHook.getElement(id); + if (typeof element === 'string') { + return element; + } else if (typeof element === 'number') { + return '' + element; + } else { + return null; + } + }, + getUpdateCount: function (id) { + var item = getItem(id); + return item ? item.updateCount : 0; + }, + + + getRootIDs: getRootIDs, + getRegisteredIDs: getItemIDs, + + pushNonStandardWarningStack: function (isCreatingElement, currentSource) { + if (typeof console.reactStack !== 'function') { + return; + } + + var stack = []; + var currentOwner = ReactCurrentOwner.current; + var id = currentOwner && currentOwner._debugID; + + try { + if (isCreatingElement) { + stack.push({ + name: id ? ReactComponentTreeHook.getDisplayName(id) : null, + fileName: currentSource ? currentSource.fileName : null, + lineNumber: currentSource ? currentSource.lineNumber : null + }); + } + + while (id) { + var element = ReactComponentTreeHook.getElement(id); + var parentID = ReactComponentTreeHook.getParentID(id); + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null; + var source = element && element._source; + stack.push({ + name: ownerName, + fileName: source ? source.fileName : null, + lineNumber: source ? source.lineNumber : null + }); + id = parentID; + } + } catch (err) { + // Internal state is messed up. + // Stop building the stack (it's just a nice to have). + } + + console.reactStack(stack); + }, + popNonStandardWarningStack: function () { + if (typeof console.reactStackEnd !== 'function') { + return; + } + console.reactStackEnd(); + } +}; + +module.exports = ReactComponentTreeHook; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(131)('wks') + , uid = __webpack_require__(90) + , Symbol = __webpack_require__(22).Symbol + , USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function(name){ + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + +function makeEmptyFunction(arg) { + return function () { + return arg; + }; +} + +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +var emptyFunction = function emptyFunction() {}; + +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function () { + return this; +}; +emptyFunction.thatReturnsArgument = function (arg) { + return arg; +}; + +module.exports = emptyFunction; + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); +if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +// Trust the developer to only use ReactInstrumentation with a __DEV__ check + +var debugTool = null; + +if (process.env.NODE_ENV !== 'production') { + var ReactDebugTool = __webpack_require__(387); + debugTool = ReactDebugTool; +} + +module.exports = { debugTool: debugTool }; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = function() {}; + +if (process.env.NODE_ENV !== 'production') { + warning = function(condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.length < 10 || (/^[s\W]*$/).test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + format + ); + } + + if (!condition) { + var argIndex = 0; + var message = 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch(x) {} + } + }; +} + +module.exports = warning; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _shouldUpdate = __webpack_require__(640); + +var _shouldUpdate2 = _interopRequireDefault(_shouldUpdate); + +var _shallowEqual = __webpack_require__(56); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _createHelper = __webpack_require__(285); + +var _createHelper2 = _interopRequireDefault(_createHelper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var pure = (0, _shouldUpdate2.default)(function (props, nextProps) { + return !(0, _shallowEqual2.default)(props, nextProps); +}); + +exports.default = (0, _createHelper2.default)(pure, 'pure', true, true); + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _SvgIcon = __webpack_require__(647); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _SvgIcon2.default; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + */ +var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null +}; + +module.exports = ReactCurrentOwner; + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +// Source: http://jsfiddle.net/vWx8V/ +// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes + +/** + * Conenience method returns corresponding value for given keyName or keyCode. + * + * @param {Mixed} keyCode {Number} or keyName {String} + * @return {Mixed} + * @api public + */ + +exports = module.exports = function(searchInput) { + // Keyboard Events + if (searchInput && 'object' === typeof searchInput) { + var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode + if (hasKeyCode) searchInput = hasKeyCode + } + + // Numbers + if ('number' === typeof searchInput) return names[searchInput] + + // Everything else (cast to string) + var search = String(searchInput) + + // check codes + var foundNamedKey = codes[search.toLowerCase()] + if (foundNamedKey) return foundNamedKey + + // check aliases + var foundNamedKey = aliases[search.toLowerCase()] + if (foundNamedKey) return foundNamedKey + + // weird character? + if (search.length === 1) return search.charCodeAt(0) + + return undefined +} + +/** + * Get by name + * + * exports.code['enter'] // => 13 + */ + +var codes = exports.code = exports.codes = { + 'backspace': 8, + 'tab': 9, + 'enter': 13, + 'shift': 16, + 'ctrl': 17, + 'alt': 18, + 'pause/break': 19, + 'caps lock': 20, + 'esc': 27, + 'space': 32, + 'page up': 33, + 'page down': 34, + 'end': 35, + 'home': 36, + 'left': 37, + 'up': 38, + 'right': 39, + 'down': 40, + 'insert': 45, + 'delete': 46, + 'command': 91, + 'left command': 91, + 'right command': 93, + 'numpad *': 106, + 'numpad +': 107, + 'numpad -': 109, + 'numpad .': 110, + 'numpad /': 111, + 'num lock': 144, + 'scroll lock': 145, + 'my computer': 182, + 'my calculator': 183, + ';': 186, + '=': 187, + ',': 188, + '-': 189, + '.': 190, + '/': 191, + '`': 192, + '[': 219, + '\\': 220, + ']': 221, + "'": 222 +} + +// Helper aliases + +var aliases = exports.aliases = { + 'windows': 91, + '⇧': 16, + '⌥': 18, + '⌃': 17, + '⌘': 91, + 'ctl': 17, + 'control': 17, + 'option': 18, + 'pause': 19, + 'break': 19, + 'caps': 20, + 'return': 13, + 'escape': 27, + 'spc': 32, + 'pgup': 33, + 'pgdn': 34, + 'ins': 45, + 'del': 46, + 'cmd': 91 +} + + +/*! + * Programatically add the following + */ + +// lower case chars +for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32 + +// numbers +for (var i = 48; i < 58; i++) codes[i - 48] = i + +// function keys +for (i = 1; i < 13; i++) codes['f'+i] = i + 111 + +// numpad keys +for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96 + +/** + * Get by code + * + * exports.name[13] // => 'Enter' + */ + +var names = exports.names = exports.title = {} // title for backward compat + +// Create reverse mapping +for (i in codes) names[codes[i]] = i + +// Add aliases +for (var alias in aliases) { + codes[alias] = aliases[alias] +} + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); + +var CallbackQueue = __webpack_require__(222); +var PooledClass = __webpack_require__(55); +var ReactFeatureFlags = __webpack_require__(223); +var ReactReconciler = __webpack_require__(67); +var Transaction = __webpack_require__(99); + +var invariant = __webpack_require__(10); + +var dirtyComponents = []; +var updateBatchNumber = 0; +var asapCallbackQueue = CallbackQueue.getPooled(); +var asapEnqueued = false; + +var batchingStrategy = null; + +function ensureInjected() { + !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0; +} + +var NESTED_UPDATES = { + initialize: function () { + this.dirtyComponentsLength = dirtyComponents.length; + }, + close: function () { + if (this.dirtyComponentsLength !== dirtyComponents.length) { + // Additional updates were enqueued by componentDidUpdate handlers or + // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run + // these new updates so that if A's componentDidUpdate calls setState on + // B, B will update before the callback A's updater provided when calling + // setState. + dirtyComponents.splice(0, this.dirtyComponentsLength); + flushBatchedUpdates(); + } else { + dirtyComponents.length = 0; + } + } +}; + +var UPDATE_QUEUEING = { + initialize: function () { + this.callbackQueue.reset(); + }, + close: function () { + this.callbackQueue.notifyAll(); + } +}; + +var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING]; + +function ReactUpdatesFlushTransaction() { + this.reinitializeTransaction(); + this.dirtyComponentsLength = null; + this.callbackQueue = CallbackQueue.getPooled(); + this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled( + /* useCreateElement */true); +} + +_assign(ReactUpdatesFlushTransaction.prototype, Transaction, { + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + destructor: function () { + this.dirtyComponentsLength = null; + CallbackQueue.release(this.callbackQueue); + this.callbackQueue = null; + ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction); + this.reconcileTransaction = null; + }, + + perform: function (method, scope, a) { + // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` + // with this transaction's wrappers around it. + return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a); + } +}); + +PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); + +function batchedUpdates(callback, a, b, c, d, e) { + ensureInjected(); + return batchingStrategy.batchedUpdates(callback, a, b, c, d, e); +} + +/** + * Array comparator for ReactComponents by mount ordering. + * + * @param {ReactComponent} c1 first component you're comparing + * @param {ReactComponent} c2 second component you're comparing + * @return {number} Return value usable by Array.prototype.sort(). + */ +function mountOrderComparator(c1, c2) { + return c1._mountOrder - c2._mountOrder; +} + +function runBatchedUpdates(transaction) { + var len = transaction.dirtyComponentsLength; + !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0; + + // Since reconciling a component higher in the owner hierarchy usually (not + // always -- see shouldComponentUpdate()) will reconcile children, reconcile + // them before their children by sorting the array. + dirtyComponents.sort(mountOrderComparator); + + // Any updates enqueued while reconciling must be performed after this entire + // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and + // C, B could update twice in a single batch if C's render enqueues an update + // to B (since B would have already updated, we should skip it, and the only + // way we can know to do so is by checking the batch counter). + updateBatchNumber++; + + for (var i = 0; i < len; i++) { + // If a component is unmounted before pending changes apply, it will still + // be here, but we assume that it has cleared its _pendingCallbacks and + // that performUpdateIfNecessary is a noop. + var component = dirtyComponents[i]; + + // If performUpdateIfNecessary happens to enqueue any new updates, we + // shouldn't execute the callbacks until the next render happens, so + // stash the callbacks first + var callbacks = component._pendingCallbacks; + component._pendingCallbacks = null; + + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var namedComponent = component; + // Duck type TopLevelWrapper. This is probably always true. + if (component._currentElement.type.isReactTopLevelWrapper) { + namedComponent = component._renderedComponent; + } + markerName = 'React update: ' + namedComponent.getName(); + console.time(markerName); + } + + ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber); + + if (markerName) { + console.timeEnd(markerName); + } + + if (callbacks) { + for (var j = 0; j < callbacks.length; j++) { + transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); + } + } + } +} + +var flushBatchedUpdates = function () { + // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents + // array and perform any updates enqueued by mount-ready handlers (i.e., + // componentDidUpdate) but we need to check here too in order to catch + // updates enqueued by setState callbacks and asap calls. + while (dirtyComponents.length || asapEnqueued) { + if (dirtyComponents.length) { + var transaction = ReactUpdatesFlushTransaction.getPooled(); + transaction.perform(runBatchedUpdates, null, transaction); + ReactUpdatesFlushTransaction.release(transaction); + } + + if (asapEnqueued) { + asapEnqueued = false; + var queue = asapCallbackQueue; + asapCallbackQueue = CallbackQueue.getPooled(); + queue.notifyAll(); + CallbackQueue.release(queue); + } + } +}; + +/** + * Mark a component as needing a rerender, adding an optional callback to a + * list of functions which will be executed once the rerender occurs. + */ +function enqueueUpdate(component) { + ensureInjected(); + + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (This is called by each top-level update + // function, like setState, forceUpdate, etc.; creation and + // destruction of top-level components is guarded in ReactMount.) + + if (!batchingStrategy.isBatchingUpdates) { + batchingStrategy.batchedUpdates(enqueueUpdate, component); + return; + } + + dirtyComponents.push(component); + if (component._updateBatchNumber == null) { + component._updateBatchNumber = updateBatchNumber + 1; + } +} + +/** + * Enqueue a callback to be run at the end of the current batching cycle. Throws + * if no updates are currently being performed. + */ +function asap(callback, context) { + !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0; + asapCallbackQueue.enqueue(callback, context); + asapEnqueued = true; +} + +var ReactUpdatesInjection = { + injectReconcileTransaction: function (ReconcileTransaction) { + !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0; + ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; + }, + + injectBatchingStrategy: function (_batchingStrategy) { + !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0; + !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0; + !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0; + batchingStrategy = _batchingStrategy; + } +}; + +var ReactUpdates = { + /** + * React references `ReactReconcileTransaction` using this property in order + * to allow dependency injection. + * + * @internal + */ + ReactReconcileTransaction: null, + + batchedUpdates: batchedUpdates, + enqueueUpdate: enqueueUpdate, + flushBatchedUpdates: flushBatchedUpdates, + injection: ReactUpdatesInjection, + asap: asap +}; + +module.exports = ReactUpdates; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 30 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(248); + + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || freeSelf || Function('return this')(); + +/* harmony default export */ __webpack_exports__["a"] = (root); + + +/***/ }), +/* 31 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/* harmony default export */ __webpack_exports__["a"] = (isArray); + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(22) + , core = __webpack_require__(16) + , ctx = __webpack_require__(62) + , hide = __webpack_require__(47) + , PROTOTYPE = 'prototype'; + +var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(a, b, c){ + if(this instanceof C){ + switch(arguments.length){ + case 0: return new C; + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if(IS_PROTO){ + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(34) + , IE8_DOM_DEFINE = __webpack_require__(192) + , toPrimitive = __webpack_require__(127) + , dP = Object.defineProperty; + +exports.f = __webpack_require__(40) ? Object.defineProperty : function defineProperty(O, P, Attributes){ + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if(IE8_DOM_DEFINE)try { + return dP(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; + return O; +}; + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(63); +module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; +}; + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var PooledClass = __webpack_require__(55); + +var emptyFunction = __webpack_require__(21); +var warning = __webpack_require__(11); + +var didWarnForAddedNewProperty = false; +var isProxySupported = typeof Proxy === 'function'; + +var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances']; + +/** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var EventInterface = { + type: null, + target: null, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: emptyFunction.thatReturnsNull, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function (event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null +}; + +/** + * Synthetic events are dispatched by event plugins, typically in response to a + * top-level event delegation handler. + * + * These systems should generally use pooling to reduce the frequency of garbage + * collection. The system should check `isPersistent` to determine whether the + * event should be released into the pool after being dispatched. Users that + * need a persisted event should invoke `persist`. + * + * Synthetic events (and subclasses) implement the DOM Level 3 Events API by + * normalizing browser quirks. Subclasses do not necessarily have to implement a + * DOM interface; custom application-specific events can also subclass this. + * + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {*} targetInst Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @param {DOMEventTarget} nativeEventTarget Target node. + */ +function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { + if (process.env.NODE_ENV !== 'production') { + // these have a getter/setter for warnings + delete this.nativeEvent; + delete this.preventDefault; + delete this.stopPropagation; + } + + this.dispatchConfig = dispatchConfig; + this._targetInst = targetInst; + this.nativeEvent = nativeEvent; + + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + if (process.env.NODE_ENV !== 'production') { + delete this[propName]; // this has a getter/setter for warnings + } + var normalize = Interface[propName]; + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + if (propName === 'target') { + this.target = nativeEventTarget; + } else { + this[propName] = nativeEvent[propName]; + } + } + } + + var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; + if (defaultPrevented) { + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + } else { + this.isDefaultPrevented = emptyFunction.thatReturnsFalse; + } + this.isPropagationStopped = emptyFunction.thatReturnsFalse; + return this; +} + +_assign(SyntheticEvent.prototype, { + + preventDefault: function () { + this.defaultPrevented = true; + var event = this.nativeEvent; + if (!event) { + return; + } + + if (event.preventDefault) { + event.preventDefault(); + } else if (typeof event.returnValue !== 'unknown') { + // eslint-disable-line valid-typeof + event.returnValue = false; + } + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + }, + + stopPropagation: function () { + var event = this.nativeEvent; + if (!event) { + return; + } + + if (event.stopPropagation) { + event.stopPropagation(); + } else if (typeof event.cancelBubble !== 'unknown') { + // eslint-disable-line valid-typeof + // The ChangeEventPlugin registers a "propertychange" event for + // IE. This event does not support bubbling or cancelling, and + // any references to cancelBubble throw "Member not found". A + // typeof check of "unknown" circumvents this issue (and is also + // IE specific). + event.cancelBubble = true; + } + + this.isPropagationStopped = emptyFunction.thatReturnsTrue; + }, + + /** + * We release all dispatched `SyntheticEvent`s after each event loop, adding + * them back into the pool. This allows a way to hold onto a reference that + * won't be added back into the pool. + */ + persist: function () { + this.isPersistent = emptyFunction.thatReturnsTrue; + }, + + /** + * Checks if this event should be released back into the pool. + * + * @return {boolean} True if this should not be released, false otherwise. + */ + isPersistent: emptyFunction.thatReturnsFalse, + + /** + * `PooledClass` looks for `destructor` on each instance it releases. + */ + destructor: function () { + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (process.env.NODE_ENV !== 'production') { + Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName])); + } else { + this[propName] = null; + } + } + for (var i = 0; i < shouldBeReleasedProperties.length; i++) { + this[shouldBeReleasedProperties[i]] = null; + } + if (process.env.NODE_ENV !== 'production') { + Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null)); + Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction)); + Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction)); + } + } + +}); + +SyntheticEvent.Interface = EventInterface; + +if (process.env.NODE_ENV !== 'production') { + if (isProxySupported) { + /*eslint-disable no-func-assign */ + SyntheticEvent = new Proxy(SyntheticEvent, { + construct: function (target, args) { + return this.apply(target, Object.create(target.prototype), args); + }, + apply: function (constructor, that, args) { + return new Proxy(constructor.apply(that, args), { + set: function (target, prop, value) { + if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) { + process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0; + didWarnForAddedNewProperty = true; + } + target[prop] = value; + return true; + } + }); + } + }); + /*eslint-enable no-func-assign */ + } +} +/** + * Helper to reduce boilerplate when creating subclasses. + * + * @param {function} Class + * @param {?object} Interface + */ +SyntheticEvent.augmentClass = function (Class, Interface) { + var Super = this; + + var E = function () {}; + E.prototype = Super.prototype; + var prototype = new E(); + + _assign(prototype, Class.prototype); + Class.prototype = prototype; + Class.prototype.constructor = Class; + + Class.Interface = _assign({}, Super.Interface, Interface); + Class.augmentClass = Super.augmentClass; + + PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler); +}; + +PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler); + +module.exports = SyntheticEvent; + +/** + * Helper to nullify syntheticEvent instance properties when destructing + * + * @param {object} SyntheticEvent + * @param {String} propName + * @return {object} defineProperty object + */ +function getPooledWarningPropertyDefinition(propName, getVal) { + var isFunction = typeof getVal === 'function'; + return { + configurable: true, + set: set, + get: get + }; + + function set(val) { + var action = isFunction ? 'setting the method' : 'setting the property'; + warn(action, 'This is effectively a no-op'); + return val; + } + + function get() { + var action = isFunction ? 'accessing the method' : 'accessing the property'; + var result = isFunction ? 'This is a no-op function' : 'This is set to null'; + warn(action, result); + return getVal; + } + + function warn(action, result) { + var warningCondition = false; + process.env.NODE_ENV !== 'production' ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0; + } +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.connect = exports.Provider = undefined; + +var _Provider = __webpack_require__(468); + +var _Provider2 = _interopRequireDefault(_Provider); + +var _connect = __webpack_require__(469); + +var _connect2 = _interopRequireDefault(_connect); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +exports.Provider = _Provider2["default"]; +exports.connect = _connect2["default"]; + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Paper = __webpack_require__(635); + +var _Paper2 = _interopRequireDefault(_Paper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Paper2.default; + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +exports.default = createComponent; + +var _react = __webpack_require__(1); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * Creates a component class that renders the given Material UI component + * + * @param MaterialUIComponent The material ui component to render + * @param mapProps A mapping of props provided by redux-form to the props the Material UI + * component needs + */ +function createComponent(MaterialUIComponent, mapProps) { + var InputComponent = function (_Component) { + _inherits(InputComponent, _Component); + + function InputComponent() { + _classCallCheck(this, InputComponent); + + return _possibleConstructorReturn(this, (InputComponent.__proto__ || Object.getPrototypeOf(InputComponent)).apply(this, arguments)); + } + + _createClass(InputComponent, [{ + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.component; + } + }, { + key: 'render', + value: function render() { + return (0, _react.createElement)(MaterialUIComponent, _extends({}, mapProps(this.props), { + ref: 'component' + })); + } + }]); + + return InputComponent; + }(_react.Component); + + InputComponent.displayName = 'ReduxFormMaterialUI' + MaterialUIComponent.name; + return InputComponent; +} + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (prefixedValue, value, keepUnprefixed) { + return keepUnprefixed ? [prefixedValue, value] : prefixedValue; +}; + +module.exports = exports["default"]; + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(64)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; +}); + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var ReactCurrentOwner = __webpack_require__(27); + +var warning = __webpack_require__(11); +var canDefineProperty = __webpack_require__(94); +var hasOwnProperty = Object.prototype.hasOwnProperty; + +var REACT_ELEMENT_TYPE = __webpack_require__(211); + +var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true +}; + +var specialPropKeyWarningShown, specialPropRefWarningShown; + +function hasValidRef(config) { + if (process.env.NODE_ENV !== 'production') { + if (hasOwnProperty.call(config, 'ref')) { + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== undefined; +} + +function hasValidKey(config) { + if (process.env.NODE_ENV !== 'production') { + if (hasOwnProperty.call(config, 'key')) { + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== undefined; +} + +function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function () { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true + }); +} + +function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function () { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true + }); +} + +/** + * Factory method to create a new React element. This no longer adheres to + * the class pattern, so do not use new to call it. Also, no instanceof check + * will work. Instead test $$typeof field against Symbol.for('react.element') to check + * if something is a React Element. + * + * @param {*} type + * @param {*} key + * @param {string|object} ref + * @param {*} self A *temporary* helper to detect places where `this` is + * different from the `owner` when React.createElement is called, so that we + * can warn. We want to get rid of owner and replace string `ref`s with arrow + * functions, and as long as `this` and owner are the same, there will be no + * change in behavior. + * @param {*} source An annotation object (added by a transpiler or otherwise) + * indicating filename, line number, and/or other information. + * @param {*} owner + * @param {*} props + * @internal + */ +var ReactElement = function (type, key, ref, self, source, owner, props) { + var element = { + // This tag allow us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + + // Built-in properties that belong on the element + type: type, + key: key, + ref: ref, + props: props, + + // Record the component responsible for creating this element. + _owner: owner + }; + + if (process.env.NODE_ENV !== 'production') { + // The validation flag is currently mutative. We put it on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + element._store = {}; + + // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + if (canDefineProperty) { + Object.defineProperty(element._store, 'validated', { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + // self and source are DEV only properties. + Object.defineProperty(element, '_self', { + configurable: false, + enumerable: false, + writable: false, + value: self + }); + // Two elements created in two different places should be considered + // equal for testing purposes and therefore we hide it from enumeration. + Object.defineProperty(element, '_source', { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + } else { + element._store.validated = false; + element._self = self; + element._source = source; + } + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + + return element; +}; + +/** + * Create and return a new ReactElement of the given type. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement + */ +ReactElement.createElement = function (type, config, children) { + var propName; + + // Reserved names are extracted + var props = {}; + + var key = null; + var ref = null; + var self = null; + var source = null; + + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + } + if (hasValidKey(config)) { + key = '' + config.key; + } + + self = config.__self === undefined ? null : config.__self; + source = config.__source === undefined ? null : config.__source; + // Remaining properties are added to a new props object + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + if (process.env.NODE_ENV !== 'production') { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + + // Resolve default props + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + } + if (process.env.NODE_ENV !== 'production') { + if (key || ref) { + if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { + var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + } + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); +}; + +/** + * Return a function that produces ReactElements of a given type. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory + */ +ReactElement.createFactory = function (type) { + var factory = ReactElement.createElement.bind(null, type); + // Expose the type on the factory and the prototype so that it can be + // easily accessed on elements. E.g. `<Foo />.type === Foo`. + // This should not be named `constructor` since this may not be the function + // that created the element, and it may not even be a constructor. + // Legacy hook TODO: Warn if this is accessed + factory.type = type; + return factory; +}; + +ReactElement.cloneAndReplaceKey = function (oldElement, newKey) { + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + + return newElement; +}; + +/** + * Clone and return a new ReactElement using element as the starting point. + * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement + */ +ReactElement.cloneElement = function (element, config, children) { + var propName; + + // Original props are copied + var props = _assign({}, element.props); + + // Reserved names are extracted + var key = element.key; + var ref = element.ref; + // Self is preserved since the owner is preserved. + var self = element._self; + // Source is preserved since cloneElement is unlikely to be targeted by a + // transpiler, and the original source is probably a better indicator of the + // true owner. + var source = element._source; + + // Owner will be preserved, unless ref is overridden + var owner = element._owner; + + if (config != null) { + if (hasValidRef(config)) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + key = '' + config.key; + } + + // Remaining properties override existing props + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === undefined && defaultProps !== undefined) { + // Resolve default props + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + + return ReactElement(element.type, key, ref, self, source, owner, props); +}; + +/** + * Verifies the object is a ReactElement. + * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement + * @param {?object} object + * @return {boolean} True if `object` is a valid component. + * @final + */ +ReactElement.isValidElement = function (object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; +}; + +module.exports = ReactElement; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(10); + +function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; +} + +var DOMPropertyInjection = { + /** + * Mapping from normalized, camelcased property names to a configuration that + * specifies how the associated DOM property should be accessed or rendered. + */ + MUST_USE_PROPERTY: 0x1, + HAS_BOOLEAN_VALUE: 0x4, + HAS_NUMERIC_VALUE: 0x8, + HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8, + HAS_OVERLOADED_BOOLEAN_VALUE: 0x20, + + /** + * Inject some specialized knowledge about the DOM. This takes a config object + * with the following properties: + * + * isCustomAttribute: function that given an attribute name will return true + * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* + * attributes where it's impossible to enumerate all of the possible + * attribute names, + * + * Properties: object mapping DOM property name to one of the + * DOMPropertyInjection constants or null. If your attribute isn't in here, + * it won't get written to the DOM. + * + * DOMAttributeNames: object mapping React attribute name to the DOM + * attribute name. Attribute names not specified use the **lowercase** + * normalized name. + * + * DOMAttributeNamespaces: object mapping React attribute name to the DOM + * attribute namespace URL. (Attribute names not specified use no namespace.) + * + * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. + * Property names not specified use the normalized name. + * + * DOMMutationMethods: Properties that require special mutation methods. If + * `value` is undefined, the mutation method should unset the property. + * + * @param {object} domPropertyConfig the config as described above. + */ + injectDOMPropertyConfig: function (domPropertyConfig) { + var Injection = DOMPropertyInjection; + var Properties = domPropertyConfig.Properties || {}; + var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}; + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; + + if (domPropertyConfig.isCustomAttribute) { + DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); + } + + for (var propName in Properties) { + !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0; + + var lowerCased = propName.toLowerCase(); + var propConfig = Properties[propName]; + + var propertyInfo = { + attributeName: lowerCased, + attributeNamespace: null, + propertyName: propName, + mutationMethod: null, + + mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), + hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), + hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), + hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), + hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) + }; + !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0; + + if (process.env.NODE_ENV !== 'production') { + DOMProperty.getPossibleStandardName[lowerCased] = propName; + } + + if (DOMAttributeNames.hasOwnProperty(propName)) { + var attributeName = DOMAttributeNames[propName]; + propertyInfo.attributeName = attributeName; + if (process.env.NODE_ENV !== 'production') { + DOMProperty.getPossibleStandardName[attributeName] = propName; + } + } + + if (DOMAttributeNamespaces.hasOwnProperty(propName)) { + propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]; + } + + if (DOMPropertyNames.hasOwnProperty(propName)) { + propertyInfo.propertyName = DOMPropertyNames[propName]; + } + + if (DOMMutationMethods.hasOwnProperty(propName)) { + propertyInfo.mutationMethod = DOMMutationMethods[propName]; + } + + DOMProperty.properties[propName] = propertyInfo; + } + } +}; + +/* eslint-disable max-len */ +var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; +/* eslint-enable max-len */ + +/** + * DOMProperty exports lookup objects that can be used like functions: + * + * > DOMProperty.isValid['id'] + * true + * > DOMProperty.isValid['foobar'] + * undefined + * + * Although this may be confusing, it performs better in general. + * + * @see http://jsperf.com/key-exists + * @see http://jsperf.com/key-missing + */ +var DOMProperty = { + + ID_ATTRIBUTE_NAME: 'data-reactid', + ROOT_ATTRIBUTE_NAME: 'data-reactroot', + + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', + + /** + * Map from property "standard name" to an object with info about how to set + * the property in the DOM. Each object contains: + * + * attributeName: + * Used when rendering markup or with `*Attribute()`. + * attributeNamespace + * propertyName: + * Used on DOM node instances. (This includes properties that mutate due to + * external factors.) + * mutationMethod: + * If non-null, used instead of the property or `setAttribute()` after + * initial render. + * mustUseProperty: + * Whether the property must be accessed and mutated as an object property. + * hasBooleanValue: + * Whether the property should be removed when set to a falsey value. + * hasNumericValue: + * Whether the property must be numeric or parse as a numeric and should be + * removed when set to a falsey value. + * hasPositiveNumericValue: + * Whether the property must be positive numeric or parse as a positive + * numeric and should be removed when set to a falsey value. + * hasOverloadedBooleanValue: + * Whether the property can be used as a flag as well as with a value. + * Removed when strictly equal to false; present without a value when + * strictly equal to true; present with a value otherwise. + */ + properties: {}, + + /** + * Mapping from lowercase property names to the properly cased version, used + * to warn in the case of missing properties. Available only in __DEV__. + * + * autofocus is predefined, because adding it to the property whitelist + * causes unintended side effects. + * + * @type {Object} + */ + getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null, + + /** + * All of the isCustomAttribute() functions that have been injected. + */ + _isCustomAttributeFunctions: [], + + /** + * Checks whether a property name is a custom attribute. + * @method + */ + isCustomAttribute: function (attributeName) { + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; + if (isCustomAttributeFn(attributeName)) { + return true; + } + } + return false; + }, + + injection: DOMPropertyInjection +}; + +module.exports = DOMProperty; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var horizontal = _react.PropTypes.oneOf(['left', 'middle', 'right']); +var vertical = _react.PropTypes.oneOf(['top', 'center', 'bottom']); + +exports.default = { + + corners: _react.PropTypes.oneOf(['bottom-left', 'bottom-right', 'top-left', 'top-right']), + + horizontal: horizontal, + + vertical: vertical, + + origin: _react.PropTypes.shape({ + horizontal: horizontal, + vertical: vertical + }), + + cornersAndCenter: _react.PropTypes.oneOf(['bottom-center', 'bottom-left', 'bottom-right', 'top-center', 'top-left', 'top-right']), + + stringOrNumber: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]), + + zDepth: _react.PropTypes.oneOf([0, 1, 2, 3, 4, 5]) + +}; + +/***/ }), +/* 44 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +/* harmony default export */ __webpack_exports__["a"] = (isObject); + + +/***/ }), +/* 45 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__splice__ = __webpack_require__(599); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getIn__ = __webpack_require__(278); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setIn__ = __webpack_require__(600); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepEqual__ = __webpack_require__(601); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__deleteIn__ = __webpack_require__(602); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys__ = __webpack_require__(603); + + + + + + + +var structure = { + empty: {}, + emptyList: [], + getIn: __WEBPACK_IMPORTED_MODULE_1__getIn__["a" /* default */], + setIn: __WEBPACK_IMPORTED_MODULE_2__setIn__["a" /* default */], + deepEqual: __WEBPACK_IMPORTED_MODULE_3__deepEqual__["a" /* default */], + deleteIn: __WEBPACK_IMPORTED_MODULE_4__deleteIn__["a" /* default */], + fromJS: function fromJS(value) { + return value; + }, + keys: __WEBPACK_IMPORTED_MODULE_5__keys__["a" /* default */], + size: function size(array) { + return array ? array.length : 0; + }, + splice: __WEBPACK_IMPORTED_MODULE_0__splice__["a" /* default */], + toJS: function toJS(value) { + return value; + } +}; + +/* harmony default export */ __webpack_exports__["a"] = (structure); + +/***/ }), +/* 46 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(33) + , createDesc = __webpack_require__(73); +module.exports = __webpack_require__(40) ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); +} : function(object, key, value){ + object[key] = value; + return object; +}; + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function(it, key){ + return hasOwnProperty.call(it, key); +}; + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(195) + , defined = __webpack_require__(124); +module.exports = function(it){ + return IObject(defined(it)); +}; + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _iterator = __webpack_require__(323); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = __webpack_require__(325); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(352), __esModule: true }; + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var ReactBaseClasses = __webpack_require__(208); +var ReactChildren = __webpack_require__(210); +var ReactDOMFactories = __webpack_require__(360); +var ReactElement = __webpack_require__(41); +var ReactPropTypes = __webpack_require__(364); +var ReactVersion = __webpack_require__(367); + +var createReactClass = __webpack_require__(368); +var onlyChild = __webpack_require__(370); + +var createElement = ReactElement.createElement; +var createFactory = ReactElement.createFactory; +var cloneElement = ReactElement.cloneElement; + +if (process.env.NODE_ENV !== 'production') { + var lowPriorityWarning = __webpack_require__(139); + var canDefineProperty = __webpack_require__(94); + var ReactElementValidator = __webpack_require__(215); + var didWarnPropTypesDeprecated = false; + createElement = ReactElementValidator.createElement; + createFactory = ReactElementValidator.createFactory; + cloneElement = ReactElementValidator.cloneElement; +} + +var __spread = _assign; +var createMixin = function (mixin) { + return mixin; +}; + +if (process.env.NODE_ENV !== 'production') { + var warnedForSpread = false; + var warnedForCreateMixin = false; + __spread = function () { + lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.'); + warnedForSpread = true; + return _assign.apply(null, arguments); + }; + + createMixin = function (mixin) { + lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.'); + warnedForCreateMixin = true; + return mixin; + }; +} + +var React = { + // Modern + + Children: { + map: ReactChildren.map, + forEach: ReactChildren.forEach, + count: ReactChildren.count, + toArray: ReactChildren.toArray, + only: onlyChild + }, + + Component: ReactBaseClasses.Component, + PureComponent: ReactBaseClasses.PureComponent, + + createElement: createElement, + cloneElement: cloneElement, + isValidElement: ReactElement.isValidElement, + + // Classic + + PropTypes: ReactPropTypes, + createClass: createReactClass, + createFactory: createFactory, + createMixin: createMixin, + + // This looks DOM specific but these are actually isomorphic helpers + // since they are just generating DOM strings. + DOM: ReactDOMFactories, + + version: ReactVersion, + + // Deprecated hook for JSX spread, don't use this for anything. + __spread: __spread +}; + +if (process.env.NODE_ENV !== 'production') { + var warnedForCreateClass = false; + if (canDefineProperty) { + Object.defineProperty(React, 'PropTypes', { + get: function () { + lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs'); + didWarnPropTypesDeprecated = true; + return ReactPropTypes; + } + }); + + Object.defineProperty(React, 'createClass', { + get: function () { + lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class'); + warnedForCreateClass = true; + return createReactClass; + } + }); + } + + // React.DOM factories are deprecated. Wrap these methods so that + // invocations of the React.DOM namespace and alert users to switch + // to the `react-dom-factories` package. + React.DOM = {}; + var warnedForFactories = false; + Object.keys(ReactDOMFactories).forEach(function (factory) { + React.DOM[factory] = function () { + if (!warnedForFactories) { + lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory); + warnedForFactories = true; + } + return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments); + }; + }); +} + +module.exports = React; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + +/** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + +function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; +} + +module.exports = reactProdInvariant; + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _childUtils = __webpack_require__(97); + +var _events = __webpack_require__(140); + +var _events2 = _interopRequireDefault(_events); + +var _keycode = __webpack_require__(28); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _FocusRipple = __webpack_require__(141); + +var _FocusRipple2 = _interopRequireDefault(_FocusRipple); + +var _TouchRipple = __webpack_require__(242); + +var _TouchRipple2 = _interopRequireDefault(_TouchRipple); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styleInjected = false; +var listening = false; +var tabPressed = false; + +function injectStyle() { + if (!styleInjected) { + // Remove inner padding and border in Firefox 4+. + var style = document.createElement('style'); + style.innerHTML = '\n button::-moz-focus-inner,\n input::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n '; + + document.body.appendChild(style); + styleInjected = true; + } +} + +function listenForTabPresses() { + if (!listening) { + _events2.default.on(window, 'keydown', function (event) { + tabPressed = (0, _keycode2.default)(event) === 'tab'; + }); + listening = true; + } +} + +var EnhancedButton = function (_Component) { + (0, _inherits3.default)(EnhancedButton, _Component); + + function EnhancedButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, EnhancedButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedButton.__proto__ || (0, _getPrototypeOf2.default)(EnhancedButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + isKeyboardFocused: false + }, _this.handleKeyDown = function (event) { + if (!_this.props.disabled && !_this.props.disableKeyboardFocus) { + if ((0, _keycode2.default)(event) === 'enter' && _this.state.isKeyboardFocused) { + _this.handleTouchTap(event); + } + if ((0, _keycode2.default)(event) === 'esc' && _this.state.isKeyboardFocused) { + _this.removeKeyboardFocus(event); + } + } + _this.props.onKeyDown(event); + }, _this.handleKeyUp = function (event) { + if (!_this.props.disabled && !_this.props.disableKeyboardFocus) { + if ((0, _keycode2.default)(event) === 'space' && _this.state.isKeyboardFocused) { + _this.handleTouchTap(event); + } + } + _this.props.onKeyUp(event); + }, _this.handleBlur = function (event) { + _this.cancelFocusTimeout(); + _this.removeKeyboardFocus(event); + _this.props.onBlur(event); + }, _this.handleFocus = function (event) { + if (event) event.persist(); + if (!_this.props.disabled && !_this.props.disableKeyboardFocus) { + // setTimeout is needed because the focus event fires first + // Wait so that we can capture if this was a keyboard focus + // or touch focus + _this.focusTimeout = setTimeout(function () { + if (tabPressed) { + _this.setKeyboardFocus(event); + tabPressed = false; + } + }, 150); + + _this.props.onFocus(event); + } + }, _this.handleClick = function (event) { + if (!_this.props.disabled) { + tabPressed = false; + _this.props.onClick(event); + } + }, _this.handleTouchTap = function (event) { + _this.cancelFocusTimeout(); + if (!_this.props.disabled) { + tabPressed = false; + _this.removeKeyboardFocus(event); + _this.props.onTouchTap(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(EnhancedButton, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + disabled = _props.disabled, + disableKeyboardFocus = _props.disableKeyboardFocus, + keyboardFocused = _props.keyboardFocused; + + if (!disabled && keyboardFocused && !disableKeyboardFocus) { + this.setState({ isKeyboardFocused: true }); + } + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + injectStyle(); + listenForTabPresses(); + if (this.state.isKeyboardFocused) { + this.refs.enhancedButton.focus(); + this.props.onKeyboardFocus(null, true); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if ((nextProps.disabled || nextProps.disableKeyboardFocus) && this.state.isKeyboardFocused) { + this.setState({ isKeyboardFocused: false }); + if (nextProps.onKeyboardFocus) { + nextProps.onKeyboardFocus(null, false); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.focusTimeout); + } + }, { + key: 'isKeyboardFocused', + value: function isKeyboardFocused() { + return this.state.isKeyboardFocused; + } + }, { + key: 'removeKeyboardFocus', + value: function removeKeyboardFocus(event) { + if (this.state.isKeyboardFocused) { + this.setState({ isKeyboardFocused: false }); + this.props.onKeyboardFocus(event, false); + } + } + }, { + key: 'setKeyboardFocus', + value: function setKeyboardFocus(event) { + if (!this.state.isKeyboardFocused) { + this.setState({ isKeyboardFocused: true }); + this.props.onKeyboardFocus(event, true); + } + } + }, { + key: 'cancelFocusTimeout', + value: function cancelFocusTimeout() { + if (this.focusTimeout) { + clearTimeout(this.focusTimeout); + this.focusTimeout = null; + } + } + }, { + key: 'createButtonChildren', + value: function createButtonChildren() { + var _props2 = this.props, + centerRipple = _props2.centerRipple, + children = _props2.children, + disabled = _props2.disabled, + disableFocusRipple = _props2.disableFocusRipple, + disableKeyboardFocus = _props2.disableKeyboardFocus, + disableTouchRipple = _props2.disableTouchRipple, + focusRippleColor = _props2.focusRippleColor, + focusRippleOpacity = _props2.focusRippleOpacity, + touchRippleColor = _props2.touchRippleColor, + touchRippleOpacity = _props2.touchRippleOpacity; + var isKeyboardFocused = this.state.isKeyboardFocused; + + // Focus Ripple + + var focusRipple = isKeyboardFocused && !disabled && !disableFocusRipple && !disableKeyboardFocus ? _react2.default.createElement(_FocusRipple2.default, { + color: focusRippleColor, + opacity: focusRippleOpacity, + show: isKeyboardFocused + }) : undefined; + + // Touch Ripple + var touchRipple = !disabled && !disableTouchRipple ? _react2.default.createElement( + _TouchRipple2.default, + { + centerRipple: centerRipple, + color: touchRippleColor, + opacity: touchRippleOpacity + }, + children + ) : undefined; + + return (0, _childUtils.createChildFragment)({ + focusRipple: focusRipple, + touchRipple: touchRipple, + children: touchRipple ? undefined : children + }); + } + }, { + key: 'render', + value: function render() { + var _props3 = this.props, + centerRipple = _props3.centerRipple, + children = _props3.children, + containerElement = _props3.containerElement, + disabled = _props3.disabled, + disableFocusRipple = _props3.disableFocusRipple, + disableKeyboardFocus = _props3.disableKeyboardFocus, + disableTouchRipple = _props3.disableTouchRipple, + focusRippleColor = _props3.focusRippleColor, + focusRippleOpacity = _props3.focusRippleOpacity, + href = _props3.href, + keyboardFocused = _props3.keyboardFocused, + touchRippleColor = _props3.touchRippleColor, + touchRippleOpacity = _props3.touchRippleOpacity, + onBlur = _props3.onBlur, + onClick = _props3.onClick, + onFocus = _props3.onFocus, + onKeyUp = _props3.onKeyUp, + onKeyDown = _props3.onKeyDown, + onKeyboardFocus = _props3.onKeyboardFocus, + onTouchTap = _props3.onTouchTap, + style = _props3.style, + tabIndex = _props3.tabIndex, + type = _props3.type, + other = (0, _objectWithoutProperties3.default)(_props3, ['centerRipple', 'children', 'containerElement', 'disabled', 'disableFocusRipple', 'disableKeyboardFocus', 'disableTouchRipple', 'focusRippleColor', 'focusRippleOpacity', 'href', 'keyboardFocused', 'touchRippleColor', 'touchRippleOpacity', 'onBlur', 'onClick', 'onFocus', 'onKeyUp', 'onKeyDown', 'onKeyboardFocus', 'onTouchTap', 'style', 'tabIndex', 'type']); + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + enhancedButton = _context$muiTheme.enhancedButton; + + + var mergedStyles = (0, _simpleAssign2.default)({ + border: 10, + boxSizing: 'border-box', + display: 'inline-block', + fontFamily: this.context.muiTheme.baseTheme.fontFamily, + WebkitTapHighlightColor: enhancedButton.tapHighlightColor, // Remove mobile color flashing (deprecated) + cursor: disabled ? 'default' : 'pointer', + textDecoration: 'none', + margin: 0, + padding: 0, + outline: 'none', + fontSize: 'inherit', + fontWeight: 'inherit', + position: 'relative', // This is needed so that ripples do not bleed past border radius. + verticalAlign: href ? 'middle' : null + }, style); + + // Passing both background:none & backgroundColor can break due to object iteration order + if (!mergedStyles.backgroundColor && !mergedStyles.background) { + mergedStyles.background = 'none'; + } + + if (disabled && href) { + return _react2.default.createElement( + 'span', + (0, _extends3.default)({}, other, { + style: mergedStyles + }), + children + ); + } + + var buttonProps = (0, _extends3.default)({}, other, { + style: prepareStyles(mergedStyles), + ref: 'enhancedButton', + disabled: disabled, + href: href, + onBlur: this.handleBlur, + onClick: this.handleClick, + onFocus: this.handleFocus, + onKeyUp: this.handleKeyUp, + onKeyDown: this.handleKeyDown, + onTouchTap: this.handleTouchTap, + tabIndex: disabled || disableKeyboardFocus ? -1 : tabIndex + }); + + var buttonChildren = this.createButtonChildren(); + + if (_react2.default.isValidElement(containerElement)) { + return _react2.default.cloneElement(containerElement, buttonProps, buttonChildren); + } + + if (!href && containerElement === 'button') { + buttonProps.type = type; + } + + return _react2.default.createElement(href ? 'a' : containerElement, buttonProps, buttonChildren); + } + }]); + return EnhancedButton; +}(_react.Component); + +EnhancedButton.defaultProps = { + containerElement: 'button', + onBlur: function onBlur() {}, + onClick: function onClick() {}, + onFocus: function onFocus() {}, + onKeyDown: function onKeyDown() {}, + onKeyUp: function onKeyUp() {}, + onKeyboardFocus: function onKeyboardFocus() {}, + onTouchTap: function onTouchTap() {}, + tabIndex: 0, + type: 'button' +}; +EnhancedButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? EnhancedButton.propTypes = { + centerRipple: _react.PropTypes.bool, + children: _react.PropTypes.node, + containerElement: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.element]), + disableFocusRipple: _react.PropTypes.bool, + disableKeyboardFocus: _react.PropTypes.bool, + disableTouchRipple: _react.PropTypes.bool, + disabled: _react.PropTypes.bool, + focusRippleColor: _react.PropTypes.string, + focusRippleOpacity: _react.PropTypes.number, + href: _react.PropTypes.string, + keyboardFocused: _react.PropTypes.bool, + onBlur: _react.PropTypes.func, + onClick: _react.PropTypes.func, + onFocus: _react.PropTypes.func, + onKeyDown: _react.PropTypes.func, + onKeyUp: _react.PropTypes.func, + onKeyboardFocus: _react.PropTypes.func, + onTouchTap: _react.PropTypes.func, + style: _react.PropTypes.object, + tabIndex: _react.PropTypes.number, + touchRippleColor: _react.PropTypes.string, + touchRippleOpacity: _react.PropTypes.number, + type: _react.PropTypes.string +} : void 0; +exports.default = EnhancedButton; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(10); + +/** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ +var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; + +var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } +}; + +var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } +}; + +var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } +}; + +var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } +}; + +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; + +/** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ +var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; +}; + +var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler +}; + +module.exports = PooledClass; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _shallowEqual = __webpack_require__(81); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _shallowEqual2.default; + +/***/ }), +/* 57 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +/* harmony default export */ __webpack_exports__["a"] = (isObjectLike); + + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var red50 = exports.red50 = '#ffebee'; +var red100 = exports.red100 = '#ffcdd2'; +var red200 = exports.red200 = '#ef9a9a'; +var red300 = exports.red300 = '#e57373'; +var red400 = exports.red400 = '#ef5350'; +var red500 = exports.red500 = '#f44336'; +var red600 = exports.red600 = '#e53935'; +var red700 = exports.red700 = '#d32f2f'; +var red800 = exports.red800 = '#c62828'; +var red900 = exports.red900 = '#b71c1c'; +var redA100 = exports.redA100 = '#ff8a80'; +var redA200 = exports.redA200 = '#ff5252'; +var redA400 = exports.redA400 = '#ff1744'; +var redA700 = exports.redA700 = '#d50000'; + +var pink50 = exports.pink50 = '#fce4ec'; +var pink100 = exports.pink100 = '#f8bbd0'; +var pink200 = exports.pink200 = '#f48fb1'; +var pink300 = exports.pink300 = '#f06292'; +var pink400 = exports.pink400 = '#ec407a'; +var pink500 = exports.pink500 = '#e91e63'; +var pink600 = exports.pink600 = '#d81b60'; +var pink700 = exports.pink700 = '#c2185b'; +var pink800 = exports.pink800 = '#ad1457'; +var pink900 = exports.pink900 = '#880e4f'; +var pinkA100 = exports.pinkA100 = '#ff80ab'; +var pinkA200 = exports.pinkA200 = '#ff4081'; +var pinkA400 = exports.pinkA400 = '#f50057'; +var pinkA700 = exports.pinkA700 = '#c51162'; + +var purple50 = exports.purple50 = '#f3e5f5'; +var purple100 = exports.purple100 = '#e1bee7'; +var purple200 = exports.purple200 = '#ce93d8'; +var purple300 = exports.purple300 = '#ba68c8'; +var purple400 = exports.purple400 = '#ab47bc'; +var purple500 = exports.purple500 = '#9c27b0'; +var purple600 = exports.purple600 = '#8e24aa'; +var purple700 = exports.purple700 = '#7b1fa2'; +var purple800 = exports.purple800 = '#6a1b9a'; +var purple900 = exports.purple900 = '#4a148c'; +var purpleA100 = exports.purpleA100 = '#ea80fc'; +var purpleA200 = exports.purpleA200 = '#e040fb'; +var purpleA400 = exports.purpleA400 = '#d500f9'; +var purpleA700 = exports.purpleA700 = '#aa00ff'; + +var deepPurple50 = exports.deepPurple50 = '#ede7f6'; +var deepPurple100 = exports.deepPurple100 = '#d1c4e9'; +var deepPurple200 = exports.deepPurple200 = '#b39ddb'; +var deepPurple300 = exports.deepPurple300 = '#9575cd'; +var deepPurple400 = exports.deepPurple400 = '#7e57c2'; +var deepPurple500 = exports.deepPurple500 = '#673ab7'; +var deepPurple600 = exports.deepPurple600 = '#5e35b1'; +var deepPurple700 = exports.deepPurple700 = '#512da8'; +var deepPurple800 = exports.deepPurple800 = '#4527a0'; +var deepPurple900 = exports.deepPurple900 = '#311b92'; +var deepPurpleA100 = exports.deepPurpleA100 = '#b388ff'; +var deepPurpleA200 = exports.deepPurpleA200 = '#7c4dff'; +var deepPurpleA400 = exports.deepPurpleA400 = '#651fff'; +var deepPurpleA700 = exports.deepPurpleA700 = '#6200ea'; + +var indigo50 = exports.indigo50 = '#e8eaf6'; +var indigo100 = exports.indigo100 = '#c5cae9'; +var indigo200 = exports.indigo200 = '#9fa8da'; +var indigo300 = exports.indigo300 = '#7986cb'; +var indigo400 = exports.indigo400 = '#5c6bc0'; +var indigo500 = exports.indigo500 = '#3f51b5'; +var indigo600 = exports.indigo600 = '#3949ab'; +var indigo700 = exports.indigo700 = '#303f9f'; +var indigo800 = exports.indigo800 = '#283593'; +var indigo900 = exports.indigo900 = '#1a237e'; +var indigoA100 = exports.indigoA100 = '#8c9eff'; +var indigoA200 = exports.indigoA200 = '#536dfe'; +var indigoA400 = exports.indigoA400 = '#3d5afe'; +var indigoA700 = exports.indigoA700 = '#304ffe'; + +var blue50 = exports.blue50 = '#e3f2fd'; +var blue100 = exports.blue100 = '#bbdefb'; +var blue200 = exports.blue200 = '#90caf9'; +var blue300 = exports.blue300 = '#64b5f6'; +var blue400 = exports.blue400 = '#42a5f5'; +var blue500 = exports.blue500 = '#2196f3'; +var blue600 = exports.blue600 = '#1e88e5'; +var blue700 = exports.blue700 = '#1976d2'; +var blue800 = exports.blue800 = '#1565c0'; +var blue900 = exports.blue900 = '#0d47a1'; +var blueA100 = exports.blueA100 = '#82b1ff'; +var blueA200 = exports.blueA200 = '#448aff'; +var blueA400 = exports.blueA400 = '#2979ff'; +var blueA700 = exports.blueA700 = '#2962ff'; + +var lightBlue50 = exports.lightBlue50 = '#e1f5fe'; +var lightBlue100 = exports.lightBlue100 = '#b3e5fc'; +var lightBlue200 = exports.lightBlue200 = '#81d4fa'; +var lightBlue300 = exports.lightBlue300 = '#4fc3f7'; +var lightBlue400 = exports.lightBlue400 = '#29b6f6'; +var lightBlue500 = exports.lightBlue500 = '#03a9f4'; +var lightBlue600 = exports.lightBlue600 = '#039be5'; +var lightBlue700 = exports.lightBlue700 = '#0288d1'; +var lightBlue800 = exports.lightBlue800 = '#0277bd'; +var lightBlue900 = exports.lightBlue900 = '#01579b'; +var lightBlueA100 = exports.lightBlueA100 = '#80d8ff'; +var lightBlueA200 = exports.lightBlueA200 = '#40c4ff'; +var lightBlueA400 = exports.lightBlueA400 = '#00b0ff'; +var lightBlueA700 = exports.lightBlueA700 = '#0091ea'; + +var cyan50 = exports.cyan50 = '#e0f7fa'; +var cyan100 = exports.cyan100 = '#b2ebf2'; +var cyan200 = exports.cyan200 = '#80deea'; +var cyan300 = exports.cyan300 = '#4dd0e1'; +var cyan400 = exports.cyan400 = '#26c6da'; +var cyan500 = exports.cyan500 = '#00bcd4'; +var cyan600 = exports.cyan600 = '#00acc1'; +var cyan700 = exports.cyan700 = '#0097a7'; +var cyan800 = exports.cyan800 = '#00838f'; +var cyan900 = exports.cyan900 = '#006064'; +var cyanA100 = exports.cyanA100 = '#84ffff'; +var cyanA200 = exports.cyanA200 = '#18ffff'; +var cyanA400 = exports.cyanA400 = '#00e5ff'; +var cyanA700 = exports.cyanA700 = '#00b8d4'; + +var teal50 = exports.teal50 = '#e0f2f1'; +var teal100 = exports.teal100 = '#b2dfdb'; +var teal200 = exports.teal200 = '#80cbc4'; +var teal300 = exports.teal300 = '#4db6ac'; +var teal400 = exports.teal400 = '#26a69a'; +var teal500 = exports.teal500 = '#009688'; +var teal600 = exports.teal600 = '#00897b'; +var teal700 = exports.teal700 = '#00796b'; +var teal800 = exports.teal800 = '#00695c'; +var teal900 = exports.teal900 = '#004d40'; +var tealA100 = exports.tealA100 = '#a7ffeb'; +var tealA200 = exports.tealA200 = '#64ffda'; +var tealA400 = exports.tealA400 = '#1de9b6'; +var tealA700 = exports.tealA700 = '#00bfa5'; + +var green50 = exports.green50 = '#e8f5e9'; +var green100 = exports.green100 = '#c8e6c9'; +var green200 = exports.green200 = '#a5d6a7'; +var green300 = exports.green300 = '#81c784'; +var green400 = exports.green400 = '#66bb6a'; +var green500 = exports.green500 = '#4caf50'; +var green600 = exports.green600 = '#43a047'; +var green700 = exports.green700 = '#388e3c'; +var green800 = exports.green800 = '#2e7d32'; +var green900 = exports.green900 = '#1b5e20'; +var greenA100 = exports.greenA100 = '#b9f6ca'; +var greenA200 = exports.greenA200 = '#69f0ae'; +var greenA400 = exports.greenA400 = '#00e676'; +var greenA700 = exports.greenA700 = '#00c853'; + +var lightGreen50 = exports.lightGreen50 = '#f1f8e9'; +var lightGreen100 = exports.lightGreen100 = '#dcedc8'; +var lightGreen200 = exports.lightGreen200 = '#c5e1a5'; +var lightGreen300 = exports.lightGreen300 = '#aed581'; +var lightGreen400 = exports.lightGreen400 = '#9ccc65'; +var lightGreen500 = exports.lightGreen500 = '#8bc34a'; +var lightGreen600 = exports.lightGreen600 = '#7cb342'; +var lightGreen700 = exports.lightGreen700 = '#689f38'; +var lightGreen800 = exports.lightGreen800 = '#558b2f'; +var lightGreen900 = exports.lightGreen900 = '#33691e'; +var lightGreenA100 = exports.lightGreenA100 = '#ccff90'; +var lightGreenA200 = exports.lightGreenA200 = '#b2ff59'; +var lightGreenA400 = exports.lightGreenA400 = '#76ff03'; +var lightGreenA700 = exports.lightGreenA700 = '#64dd17'; + +var lime50 = exports.lime50 = '#f9fbe7'; +var lime100 = exports.lime100 = '#f0f4c3'; +var lime200 = exports.lime200 = '#e6ee9c'; +var lime300 = exports.lime300 = '#dce775'; +var lime400 = exports.lime400 = '#d4e157'; +var lime500 = exports.lime500 = '#cddc39'; +var lime600 = exports.lime600 = '#c0ca33'; +var lime700 = exports.lime700 = '#afb42b'; +var lime800 = exports.lime800 = '#9e9d24'; +var lime900 = exports.lime900 = '#827717'; +var limeA100 = exports.limeA100 = '#f4ff81'; +var limeA200 = exports.limeA200 = '#eeff41'; +var limeA400 = exports.limeA400 = '#c6ff00'; +var limeA700 = exports.limeA700 = '#aeea00'; + +var yellow50 = exports.yellow50 = '#fffde7'; +var yellow100 = exports.yellow100 = '#fff9c4'; +var yellow200 = exports.yellow200 = '#fff59d'; +var yellow300 = exports.yellow300 = '#fff176'; +var yellow400 = exports.yellow400 = '#ffee58'; +var yellow500 = exports.yellow500 = '#ffeb3b'; +var yellow600 = exports.yellow600 = '#fdd835'; +var yellow700 = exports.yellow700 = '#fbc02d'; +var yellow800 = exports.yellow800 = '#f9a825'; +var yellow900 = exports.yellow900 = '#f57f17'; +var yellowA100 = exports.yellowA100 = '#ffff8d'; +var yellowA200 = exports.yellowA200 = '#ffff00'; +var yellowA400 = exports.yellowA400 = '#ffea00'; +var yellowA700 = exports.yellowA700 = '#ffd600'; + +var amber50 = exports.amber50 = '#fff8e1'; +var amber100 = exports.amber100 = '#ffecb3'; +var amber200 = exports.amber200 = '#ffe082'; +var amber300 = exports.amber300 = '#ffd54f'; +var amber400 = exports.amber400 = '#ffca28'; +var amber500 = exports.amber500 = '#ffc107'; +var amber600 = exports.amber600 = '#ffb300'; +var amber700 = exports.amber700 = '#ffa000'; +var amber800 = exports.amber800 = '#ff8f00'; +var amber900 = exports.amber900 = '#ff6f00'; +var amberA100 = exports.amberA100 = '#ffe57f'; +var amberA200 = exports.amberA200 = '#ffd740'; +var amberA400 = exports.amberA400 = '#ffc400'; +var amberA700 = exports.amberA700 = '#ffab00'; + +var orange50 = exports.orange50 = '#fff3e0'; +var orange100 = exports.orange100 = '#ffe0b2'; +var orange200 = exports.orange200 = '#ffcc80'; +var orange300 = exports.orange300 = '#ffb74d'; +var orange400 = exports.orange400 = '#ffa726'; +var orange500 = exports.orange500 = '#ff9800'; +var orange600 = exports.orange600 = '#fb8c00'; +var orange700 = exports.orange700 = '#f57c00'; +var orange800 = exports.orange800 = '#ef6c00'; +var orange900 = exports.orange900 = '#e65100'; +var orangeA100 = exports.orangeA100 = '#ffd180'; +var orangeA200 = exports.orangeA200 = '#ffab40'; +var orangeA400 = exports.orangeA400 = '#ff9100'; +var orangeA700 = exports.orangeA700 = '#ff6d00'; + +var deepOrange50 = exports.deepOrange50 = '#fbe9e7'; +var deepOrange100 = exports.deepOrange100 = '#ffccbc'; +var deepOrange200 = exports.deepOrange200 = '#ffab91'; +var deepOrange300 = exports.deepOrange300 = '#ff8a65'; +var deepOrange400 = exports.deepOrange400 = '#ff7043'; +var deepOrange500 = exports.deepOrange500 = '#ff5722'; +var deepOrange600 = exports.deepOrange600 = '#f4511e'; +var deepOrange700 = exports.deepOrange700 = '#e64a19'; +var deepOrange800 = exports.deepOrange800 = '#d84315'; +var deepOrange900 = exports.deepOrange900 = '#bf360c'; +var deepOrangeA100 = exports.deepOrangeA100 = '#ff9e80'; +var deepOrangeA200 = exports.deepOrangeA200 = '#ff6e40'; +var deepOrangeA400 = exports.deepOrangeA400 = '#ff3d00'; +var deepOrangeA700 = exports.deepOrangeA700 = '#dd2c00'; + +var brown50 = exports.brown50 = '#efebe9'; +var brown100 = exports.brown100 = '#d7ccc8'; +var brown200 = exports.brown200 = '#bcaaa4'; +var brown300 = exports.brown300 = '#a1887f'; +var brown400 = exports.brown400 = '#8d6e63'; +var brown500 = exports.brown500 = '#795548'; +var brown600 = exports.brown600 = '#6d4c41'; +var brown700 = exports.brown700 = '#5d4037'; +var brown800 = exports.brown800 = '#4e342e'; +var brown900 = exports.brown900 = '#3e2723'; + +var blueGrey50 = exports.blueGrey50 = '#eceff1'; +var blueGrey100 = exports.blueGrey100 = '#cfd8dc'; +var blueGrey200 = exports.blueGrey200 = '#b0bec5'; +var blueGrey300 = exports.blueGrey300 = '#90a4ae'; +var blueGrey400 = exports.blueGrey400 = '#78909c'; +var blueGrey500 = exports.blueGrey500 = '#607d8b'; +var blueGrey600 = exports.blueGrey600 = '#546e7a'; +var blueGrey700 = exports.blueGrey700 = '#455a64'; +var blueGrey800 = exports.blueGrey800 = '#37474f'; +var blueGrey900 = exports.blueGrey900 = '#263238'; + +var grey50 = exports.grey50 = '#fafafa'; +var grey100 = exports.grey100 = '#f5f5f5'; +var grey200 = exports.grey200 = '#eeeeee'; +var grey300 = exports.grey300 = '#e0e0e0'; +var grey400 = exports.grey400 = '#bdbdbd'; +var grey500 = exports.grey500 = '#9e9e9e'; +var grey600 = exports.grey600 = '#757575'; +var grey700 = exports.grey700 = '#616161'; +var grey800 = exports.grey800 = '#424242'; +var grey900 = exports.grey900 = '#212121'; + +var black = exports.black = '#000000'; +var white = exports.white = '#ffffff'; + +var transparent = exports.transparent = 'rgba(0, 0, 0, 0)'; +var fullBlack = exports.fullBlack = 'rgba(0, 0, 0, 1)'; +var darkBlack = exports.darkBlack = 'rgba(0, 0, 0, 0.87)'; +var lightBlack = exports.lightBlack = 'rgba(0, 0, 0, 0.54)'; +var minBlack = exports.minBlack = 'rgba(0, 0, 0, 0.26)'; +var faintBlack = exports.faintBlack = 'rgba(0, 0, 0, 0.12)'; +var fullWhite = exports.fullWhite = 'rgba(255, 255, 255, 1)'; +var darkWhite = exports.darkWhite = 'rgba(255, 255, 255, 0.87)'; +var lightWhite = exports.lightWhite = 'rgba(255, 255, 255, 0.54)'; + +/***/ }), +/* 59 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(501); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__(504); + + + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = __WEBPACK_IMPORTED_MODULE_1__getValue_js__["a" /* default */](object, key); + return __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */](value) ? value : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (getNative); + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _typeof2 = __webpack_require__(50); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _keys = __webpack_require__(51); + +var _keys2 = _interopRequireDefault(_keys); + +var _assign = __webpack_require__(96); + +var _assign2 = _interopRequireDefault(_assign); + +exports.withOptions = withOptions; + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactAddonsShallowCompare = __webpack_require__(631); + +var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); + +var _warning = __webpack_require__(24); + +var _warning2 = _interopRequireDefault(_warning); + +var _supports = __webpack_require__(633); + +var supports = _interopRequireWildcard(_supports); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint-disable prefer-spread */ + +var defaultEventOptions = { + capture: false, + passive: false +}; + +function mergeDefaultEventOptions(options) { + return (0, _assign2.default)({}, defaultEventOptions, options); +} + +function getEventListenerArgs(eventName, callback, options) { + var args = [eventName, callback]; + args.push(supports.passiveOption ? options : options.capture); + return args; +} + +function on(target, eventName, callback, options) { + if (supports.addEventListener) { + target.addEventListener.apply(target, getEventListenerArgs(eventName, callback, options)); + } else if (supports.attachEvent) { + // IE8+ Support + target.attachEvent('on' + eventName, function () { + callback.call(target); + }); + } +} + +function off(target, eventName, callback, options) { + if (supports.removeEventListener) { + target.removeEventListener.apply(target, getEventListenerArgs(eventName, callback, options)); + } else if (supports.detachEvent) { + // IE8+ Support + target.detachEvent('on' + eventName, callback); + } +} + +var state = {}; + +function forEachListener(props, iteratee) { + (0, _keys2.default)(props).forEach(function (name) { + if (name.substring(0, 2) !== 'on') { + return; + } + + var prop = props[name]; + var type = typeof prop === 'undefined' ? 'undefined' : (0, _typeof3.default)(prop); + var isObject = type === 'object'; + var isFunction = type === 'function'; + + if (!isObject && !isFunction) { + return; + } + + var capture = name.substr(-7).toLowerCase() === 'capture'; + var eventName = name.substring(2).toLowerCase(); + eventName = capture ? eventName.substring(0, eventName.length - 7) : eventName; + + if (isObject) { + iteratee(eventName, prop.handler, prop.options); + } else { + iteratee(eventName, prop, mergeDefaultEventOptions({ capture: capture })); + } + }); +} + +function withOptions(handler, options) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(options, 'react-event-listener: Should be specified options in withOptions.') : void 0; + + return { + handler: handler, + options: mergeDefaultEventOptions(options) + }; +} + +var EventListener = function (_Component) { + (0, _inherits3.default)(EventListener, _Component); + + function EventListener() { + (0, _classCallCheck3.default)(this, EventListener); + return (0, _possibleConstructorReturn3.default)(this, (EventListener.__proto__ || (0, _getPrototypeOf2.default)(EventListener)).apply(this, arguments)); + } + + (0, _createClass3.default)(EventListener, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.addListeners(); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + return (0, _reactAddonsShallowCompare2.default)({ + props: this.props, + state: state + }, nextProps, state); + } + }, { + key: 'componentWillUpdate', + value: function componentWillUpdate() { + this.removeListeners(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.addListeners(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.removeListeners(); + } + }, { + key: 'addListeners', + value: function addListeners() { + this.applyListeners(on); + } + }, { + key: 'removeListeners', + value: function removeListeners() { + this.applyListeners(off); + } + }, { + key: 'applyListeners', + value: function applyListeners(onOrOff) { + var target = this.props.target; + + + if (target) { + var element = target; + + if (typeof target === 'string') { + element = window[target]; + } + + forEachListener(this.props, onOrOff.bind(null, element)); + } + } + }, { + key: 'render', + value: function render() { + return this.props.children || null; + } + }]); + return EventListener; +}(_react.Component); + +process.env.NODE_ENV !== "production" ? EventListener.propTypes = { + /** + * You can provide a single child too. + */ + children: _react.PropTypes.element, + /** + * The DOM target to listen to. + */ + target: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.string]) +} : void 0; +exports.default = EventListener; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var mapError = function mapError(_ref) { + var errorProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'errorText'; + var _ref$meta = _ref.meta; + _ref$meta = _ref$meta === undefined ? {} : _ref$meta; + + var touched = _ref$meta.touched, + error = _ref$meta.error, + warning = _ref$meta.warning, + input = _ref.input, + props = _objectWithoutProperties(_ref, ['meta', 'input']); + + return touched && (error || warning) ? _extends({}, props, input, _defineProperty({}, errorProp, error || warning)) : _extends({}, input, props); +}; + +exports.default = mapError; + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(125); +module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; +}; + +/***/ }), +/* 63 */ +/***/ (function(module, exports) { + +module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +/***/ }), +/* 64 */ +/***/ (function(module, exports) { + +module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } +}; + +/***/ }), +/* 65 */ +/***/ (function(module, exports) { + +module.exports = {}; + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(194) + , enumBugKeys = __webpack_require__(132); + +module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); +}; + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactRef = __webpack_require__(385); +var ReactInstrumentation = __webpack_require__(23); + +var warning = __webpack_require__(11); + +/** + * Helper to call ReactRef.attachRefs with this composite component, split out + * to avoid allocations in the transaction mount-ready queue. + */ +function attachRefs() { + ReactRef.attachRefs(this, this._currentElement); +} + +var ReactReconciler = { + + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?object} the containing host component instance + * @param {?object} info about the host container + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots + ) { + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID); + } + } + var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID); + if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); + } + } + return markup; + }, + + /** + * Returns a value that can be passed to + * ReactComponentEnvironment.replaceNodeWithMarkup. + */ + getHostNode: function (internalInstance) { + return internalInstance.getHostNode(); + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function (internalInstance, safely) { + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID); + } + } + ReactRef.detachRefs(internalInstance, internalInstance._currentElement); + internalInstance.unmountComponent(safely); + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); + } + } + }, + + /** + * Update a component using a new element. + * + * @param {ReactComponent} internalInstance + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @internal + */ + receiveComponent: function (internalInstance, nextElement, transaction, context) { + var prevElement = internalInstance._currentElement; + + if (nextElement === prevElement && context === internalInstance._context) { + // Since elements are immutable after the owner is rendered, + // we can do a cheap identity compare here to determine if this is a + // superfluous reconcile. It's possible for state to be mutable but such + // change should trigger an update of the owner which would recreate + // the element. We explicitly check for the existence of an owner since + // it's possible for an element created outside a composite to be + // deeply mutated and reused. + + // TODO: Bailing out early is just a perf optimization right? + // TODO: Removing the return statement should affect correctness? + return; + } + + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); + } + } + + var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); + + if (refsChanged) { + ReactRef.detachRefs(internalInstance, prevElement); + } + + internalInstance.receiveComponent(nextElement, transaction, context); + + if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); + } + } + }, + + /** + * Flush any dirty changes in a component. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) { + if (internalInstance._updateBatchNumber !== updateBatchNumber) { + // The component's enqueued batch number should always be the current + // batch or the following one. + process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0; + return; + } + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement); + } + } + internalInstance.performUpdateIfNecessary(transaction); + if (process.env.NODE_ENV !== 'production') { + if (internalInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); + } + } + } + +}; + +module.exports = ReactReconciler; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMNamespaces = __webpack_require__(148); +var setInnerHTML = __webpack_require__(101); + +var createMicrosoftUnsafeLocalFunction = __webpack_require__(149); +var setTextContent = __webpack_require__(226); + +var ELEMENT_NODE_TYPE = 1; +var DOCUMENT_FRAGMENT_NODE_TYPE = 11; + +/** + * In IE (8-11) and Edge, appending nodes with no children is dramatically + * faster than appending a full subtree, so we essentially queue up the + * .appendChild calls here and apply them so each node is added to its parent + * before any children are added. + * + * In other browsers, doing so is slower or neutral compared to the other order + * (in Firefox, twice as slow) so we only do this inversion in IE. + * + * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode. + */ +var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent); + +function insertTreeChildren(tree) { + if (!enableLazy) { + return; + } + var node = tree.node; + var children = tree.children; + if (children.length) { + for (var i = 0; i < children.length; i++) { + insertTreeBefore(node, children[i], null); + } + } else if (tree.html != null) { + setInnerHTML(node, tree.html); + } else if (tree.text != null) { + setTextContent(node, tree.text); + } +} + +var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) { + // DocumentFragments aren't actually part of the DOM after insertion so + // appending children won't update the DOM. We need to ensure the fragment + // is properly populated first, breaking out of our lazy approach for just + // this level. Also, some <object> plugins (like Flash Player) will read + // <param> nodes immediately upon insertion into the DOM, so <object> + // must also be populated prior to insertion into the DOM. + if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) { + insertTreeChildren(tree); + parentNode.insertBefore(tree.node, referenceNode); + } else { + parentNode.insertBefore(tree.node, referenceNode); + insertTreeChildren(tree); + } +}); + +function replaceChildWithTree(oldNode, newTree) { + oldNode.parentNode.replaceChild(newTree.node, oldNode); + insertTreeChildren(newTree); +} + +function queueChild(parentTree, childTree) { + if (enableLazy) { + parentTree.children.push(childTree); + } else { + parentTree.node.appendChild(childTree.node); + } +} + +function queueHTML(tree, html) { + if (enableLazy) { + tree.html = html; + } else { + setInnerHTML(tree.node, html); + } +} + +function queueText(tree, text) { + if (enableLazy) { + tree.text = text; + } else { + setTextContent(tree.node, text); + } +} + +function toString() { + return this.node.nodeName; +} + +function DOMLazyTree(node) { + return { + node: node, + children: [], + html: null, + text: null, + toString: toString + }; +} + +DOMLazyTree.insertTreeBefore = insertTreeBefore; +DOMLazyTree.replaceChildWithTree = replaceChildWithTree; +DOMLazyTree.queueChild = queueChild; +DOMLazyTree.queueHTML = queueHTML; +DOMLazyTree.queueText = queueText; + +module.exports = DOMLazyTree; + +/***/ }), +/* 69 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(106); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(472); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(473); + + + + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */](value) + : __WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseGetTag); + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.convertColorToString = convertColorToString; +exports.convertHexToRGB = convertHexToRGB; +exports.decomposeColor = decomposeColor; +exports.getContrastRatio = getContrastRatio; +exports.getLuminance = getLuminance; +exports.emphasize = emphasize; +exports.fade = fade; +exports.darken = darken; +exports.lighten = lighten; +/** + * Returns a number whose value is limited to the given range. + * + * @param {number} value The value to be clamped + * @param {number} min The lower boundary of the output range + * @param {number} max The upper boundary of the output range + * @returns {number} A number in the range [min, max] + */ +function clamp(value, min, max) { + if (value < min) { + return min; + } + if (value > max) { + return max; + } + return value; +} + +/** + * Converts a color object with type and values to a string. + * + * @param {object} color - Decomposed color + * @param {string} color.type - One of, 'rgb', 'rgba', 'hsl', 'hsla' + * @param {array} color.values - [n,n,n] or [n,n,n,n] + * @returns {string} A CSS color string + */ +function convertColorToString(color) { + var type = color.type, + values = color.values; + + + if (type.indexOf('rgb') > -1) { + // Only convert the first 3 values to int (i.e. not alpha) + for (var i = 0; i < 3; i++) { + values[i] = parseInt(values[i]); + } + } + + var colorString = void 0; + + if (type.indexOf('hsl') > -1) { + colorString = color.type + '(' + values[0] + ', ' + values[1] + '%, ' + values[2] + '%'; + } else { + colorString = color.type + '(' + values[0] + ', ' + values[1] + ', ' + values[2]; + } + + if (values.length === 4) { + colorString += ', ' + color.values[3] + ')'; + } else { + colorString += ')'; + } + + return colorString; +} + +/** + * Converts a color from CSS hex format to CSS rgb format. + * + * @param {string} color - Hex color, i.e. #nnn or #nnnnnn + * @returns {string} A CSS rgb color string + */ +function convertHexToRGB(color) { + if (color.length === 4) { + var extendedColor = '#'; + for (var i = 1; i < color.length; i++) { + extendedColor += color.charAt(i) + color.charAt(i); + } + color = extendedColor; + } + + var values = { + r: parseInt(color.substr(1, 2), 16), + g: parseInt(color.substr(3, 2), 16), + b: parseInt(color.substr(5, 2), 16) + }; + + return 'rgb(' + values.r + ', ' + values.g + ', ' + values.b + ')'; +} + +/** + * Returns an object with the type and values of a color. + * + * Note: Does not support rgb % values. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {{type: string, values: number[]}} A MUI color object + */ +function decomposeColor(color) { + if (color.charAt(0) === '#') { + return decomposeColor(convertHexToRGB(color)); + } + + var marker = color.indexOf('('); + var type = color.substring(0, marker); + var values = color.substring(marker + 1, color.length - 1).split(','); + values = values.map(function (value) { + return parseFloat(value); + }); + + return { type: type, values: values }; +} + +/** + * Calculates the contrast ratio between two colors. + * + * Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef + * + * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {number} A contrast ratio value in the range 0 - 21 with 2 digit precision. + */ +function getContrastRatio(foreground, background) { + var lumA = getLuminance(foreground); + var lumB = getLuminance(background); + var contrastRatio = (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05); + + return Number(contrastRatio.toFixed(2)); // Truncate at two digits +} + +/** + * The relative brightness of any point in a color space, + * normalized to 0 for darkest black and 1 for lightest white. + * + * Formula: https://www.w3.org/WAI/GL/wiki/Relative_luminance + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {number} The relative brightness of the color in the range 0 - 1 + */ +function getLuminance(color) { + color = decomposeColor(color); + + if (color.type.indexOf('rgb') > -1) { + var rgb = color.values.map(function (val) { + val /= 255; // normalized + return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4); + }); + return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3)); // Truncate at 3 digits + } else if (color.type.indexOf('hsl') > -1) { + return color.values[2] / 100; + } +} + +/** + * Darken or lighten a colour, depending on its luminance. + * Light colors are darkened, dark colors are lightened. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient=0.15 - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function emphasize(color) { + var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15; + + return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient); +} + +/** + * Set the absolute transparency of a color. + * Any existing alpha values are overwritten. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} value - value to set the alpha channel to in the range 0 -1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function fade(color, value) { + color = decomposeColor(color); + value = clamp(value, 0, 1); + + if (color.type === 'rgb' || color.type === 'hsl') { + color.type += 'a'; + } + color.values[3] = value; + + return convertColorToString(color); +} + +/** + * Darkens a color. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function darken(color, coefficient) { + color = decomposeColor(color); + coefficient = clamp(coefficient, 0, 1); + + if (color.type.indexOf('hsl') > -1) { + color.values[2] *= 1 - coefficient; + } else if (color.type.indexOf('rgb') > -1) { + for (var i = 0; i < 3; i++) { + color.values[i] *= 1 - coefficient; + } + } + return convertColorToString(color); +} + +/** + * Lightens a color. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ +function lighten(color, coefficient) { + color = decomposeColor(color); + coefficient = clamp(coefficient, 0, 1); + + if (color.type.indexOf('hsl') > -1) { + color.values[2] += (100 - color.values[2]) * coefficient; + } else if (color.type.indexOf('rgb') > -1) { + for (var i = 0; i < 3; i++) { + color.values[i] += (255 - color.values[i]) * coefficient; + } + } + + return convertColorToString(color); +} + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.dateTimeFormat = dateTimeFormat; +exports.addDays = addDays; +exports.addMonths = addMonths; +exports.addYears = addYears; +exports.cloneDate = cloneDate; +exports.cloneAsDate = cloneAsDate; +exports.getDaysInMonth = getDaysInMonth; +exports.getFirstDayOfMonth = getFirstDayOfMonth; +exports.getFirstDayOfWeek = getFirstDayOfWeek; +exports.getWeekArray = getWeekArray; +exports.localizedWeekday = localizedWeekday; +exports.formatIso = formatIso; +exports.isEqualDate = isEqualDate; +exports.isBeforeDate = isBeforeDate; +exports.isAfterDate = isAfterDate; +exports.isBetweenDates = isBetweenDates; +exports.monthDiff = monthDiff; +exports.yearDiff = yearDiff; + +var _warning = __webpack_require__(24); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var dayAbbreviation = ['S', 'M', 'T', 'W', 'T', 'F', 'S']; +var dayList = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var monthList = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; +var monthLongList = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; + +function dateTimeFormat(locale, options) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(locale === 'en-US', 'Material-UI: The ' + locale + ' locale is not supported by the built-in DateTimeFormat.\n Use the `DateTimeFormat` prop to supply an alternative implementation.') : void 0; + + this.format = function (date) { + if (options.month === 'short' && options.weekday === 'short' && options.day === '2-digit') { + return dayList[date.getDay()] + ', ' + monthList[date.getMonth()] + ' ' + date.getDate(); + } else if (options.year === 'numeric' && options.month === 'numeric' && options.day === 'numeric') { + return date.getMonth() + 1 + '/' + date.getDate() + '/' + date.getFullYear(); + } else if (options.year === 'numeric' && options.month === 'long') { + return monthLongList[date.getMonth()] + ' ' + date.getFullYear(); + } else if (options.weekday === 'narrow') { + return dayAbbreviation[date.getDay()]; + } else if (options.year === 'numeric') { + return date.getFullYear().toString(); + } else if (options.day === 'numeric') { + return date.getDate(); + } else { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: Wrong usage of DateTimeFormat') : void 0; + } + }; +} + +function addDays(d, days) { + var newDate = cloneDate(d); + newDate.setDate(d.getDate() + days); + return newDate; +} + +function addMonths(d, months) { + var newDate = cloneDate(d); + newDate.setMonth(d.getMonth() + months); + return newDate; +} + +function addYears(d, years) { + var newDate = cloneDate(d); + newDate.setFullYear(d.getFullYear() + years); + return newDate; +} + +function cloneDate(d) { + return new Date(d.getTime()); +} + +function cloneAsDate(d) { + var clonedDate = cloneDate(d); + clonedDate.setHours(0, 0, 0, 0); + return clonedDate; +} + +function getDaysInMonth(d) { + var resultDate = getFirstDayOfMonth(d); + + resultDate.setMonth(resultDate.getMonth() + 1); + resultDate.setDate(resultDate.getDate() - 1); + + return resultDate.getDate(); +} + +function getFirstDayOfMonth(d) { + return new Date(d.getFullYear(), d.getMonth(), 1); +} + +function getFirstDayOfWeek() { + var now = new Date(); + return new Date(now.setDate(now.getDate() - now.getDay())); +} + +function getWeekArray(d, firstDayOfWeek) { + var dayArray = []; + var daysInMonth = getDaysInMonth(d); + var weekArray = []; + var week = []; + + for (var i = 1; i <= daysInMonth; i++) { + dayArray.push(new Date(d.getFullYear(), d.getMonth(), i)); + } + + var addWeek = function addWeek(week) { + var emptyDays = 7 - week.length; + for (var _i = 0; _i < emptyDays; ++_i) { + week[weekArray.length ? 'push' : 'unshift'](null); + } + weekArray.push(week); + }; + + dayArray.forEach(function (day) { + if (week.length > 0 && day.getDay() === firstDayOfWeek) { + addWeek(week); + week = []; + } + week.push(day); + if (dayArray.indexOf(day) === dayArray.length - 1) { + addWeek(week); + } + }); + + return weekArray; +} + +function localizedWeekday(DateTimeFormat, locale, day, firstDayOfWeek) { + var weekdayFormatter = new DateTimeFormat(locale, { weekday: 'narrow' }); + var firstDayDate = getFirstDayOfWeek(); + + return weekdayFormatter.format(addDays(firstDayDate, day + firstDayOfWeek)); +} + +// Convert date to ISO 8601 (YYYY-MM-DD) date string, accounting for current timezone +function formatIso(date) { + return new Date(date.toDateString() + ' 12:00:00 +0000').toISOString().substring(0, 10); +} + +function isEqualDate(d1, d2) { + return d1 && d2 && d1.getFullYear() === d2.getFullYear() && d1.getMonth() === d2.getMonth() && d1.getDate() === d2.getDate(); +} + +function isBeforeDate(d1, d2) { + var date1 = cloneAsDate(d1); + var date2 = cloneAsDate(d2); + + return date1.getTime() < date2.getTime(); +} + +function isAfterDate(d1, d2) { + var date1 = cloneAsDate(d1); + var date2 = cloneAsDate(d2); + + return date1.getTime() > date2.getTime(); +} + +function isBetweenDates(dateToCheck, startDate, endDate) { + return !isBeforeDate(dateToCheck, startDate) && !isAfterDate(dateToCheck, endDate); +} + +function monthDiff(d1, d2) { + var m = void 0; + m = (d1.getFullYear() - d2.getFullYear()) * 12; + m += d1.getMonth(); + m -= d2.getMonth(); + return m; +} + +function yearDiff(d1, d2) { + return ~~(monthDiff(d1, d2) / 12); +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(306)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(191)(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; +}); + +/***/ }), +/* 73 */ +/***/ (function(module, exports) { + +module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; +}; + +/***/ }), +/* 74 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function(it){ + return toString.call(it).slice(8, -1); +}; + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(124); +module.exports = function(it){ + return Object(defined(it)); +}; + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _from = __webpack_require__(204); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } else { + return (0, _from2.default)(arr); + } +}; + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPluginHub = __webpack_require__(78); +var EventPluginUtils = __webpack_require__(142); + +var accumulateInto = __webpack_require__(219); +var forEachAccumulated = __webpack_require__(220); +var warning = __webpack_require__(11); + +var getListener = EventPluginHub.getListener; + +/** + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. + */ +function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); +} + +/** + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function + * here, allows us to not have to bind or create functions for each event. + * Mutating the event's members allows us to not have to create a wrapping + * "dispatch" object that pairs the event with the listener. + */ +function accumulateDirectionalDispatches(inst, phase, event) { + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0; + } + var listener = listenerAtPhase(inst, event, phase); + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } +} + +/** + * Collect dispatches (must be entirely collected before dispatching - see unit + * tests). Lazily allocate the array to conserve memory. We must loop through + * each event and perform the traversal for each one. We cannot perform a + * single traversal for the entire collection of events because each event may + * have a different target. + */ +function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); + } +} + +/** + * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID. + */ +function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + var targetInst = event._targetInst; + var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null; + EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event); + } +} + +/** + * Accumulates without regard to direction, does not look for phased + * registration names. Same as `accumulateDirectDispatchesSingle` but without + * requiring that the `dispatchMarker` be the same as the dispatched ID. + */ +function accumulateDispatches(inst, ignoredDirection, event) { + if (event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(inst, registrationName); + if (listener) { + event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); + } + } +} + +/** + * Accumulates dispatches on an `SyntheticEvent`, but only for the + * `dispatchMarker`. + * @param {SyntheticEvent} event + */ +function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event._targetInst, null, event); + } +} + +function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); +} + +function accumulateTwoPhaseDispatchesSkipTarget(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); +} + +function accumulateEnterLeaveDispatches(leave, enter, from, to) { + EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter); +} + +function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); +} + +/** + * A small set of propagation patterns, each of which will accept a small amount + * of information, and generate a set of "dispatch ready event objects" - which + * are sets of events that have already been annotated with a set of dispatched + * listener functions/ids. The API is designed this way to discourage these + * propagation strategies from actually executing the dispatches, since we + * always want to collect the entire set of dispatches before executing event a + * single one. + * + * @constructor EventPropagators + */ +var EventPropagators = { + accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, + accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, + accumulateDirectDispatches: accumulateDirectDispatches, + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches +}; + +module.exports = EventPropagators; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var EventPluginRegistry = __webpack_require__(98); +var EventPluginUtils = __webpack_require__(142); +var ReactErrorUtils = __webpack_require__(143); + +var accumulateInto = __webpack_require__(219); +var forEachAccumulated = __webpack_require__(220); +var invariant = __webpack_require__(10); + +/** + * Internal store for event listeners + */ +var listenerBank = {}; + +/** + * Internal queue of events that have accumulated their dispatches and are + * waiting to have their dispatches executed. + */ +var eventQueue = null; + +/** + * Dispatches an event and releases it back into the pool, unless persistent. + * + * @param {?object} event Synthetic event to be dispatched. + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @private + */ +var executeDispatchesAndRelease = function (event, simulated) { + if (event) { + EventPluginUtils.executeDispatchesInOrder(event, simulated); + + if (!event.isPersistent()) { + event.constructor.release(event); + } + } +}; +var executeDispatchesAndReleaseSimulated = function (e) { + return executeDispatchesAndRelease(e, true); +}; +var executeDispatchesAndReleaseTopLevel = function (e) { + return executeDispatchesAndRelease(e, false); +}; + +var getDictionaryKey = function (inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 + return '.' + inst._rootNodeID; +}; + +function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; +} + +function shouldPreventMouseEvent(name, type, props) { + switch (name) { + case 'onClick': + case 'onClickCapture': + case 'onDoubleClick': + case 'onDoubleClickCapture': + case 'onMouseDown': + case 'onMouseDownCapture': + case 'onMouseMove': + case 'onMouseMoveCapture': + case 'onMouseUp': + case 'onMouseUpCapture': + return !!(props.disabled && isInteractive(type)); + default: + return false; + } +} + +/** + * This is a unified interface for event plugins to be installed and configured. + * + * Event plugins can implement the following properties: + * + * `extractEvents` {function(string, DOMEventTarget, string, object): *} + * Required. When a top-level event is fired, this method is expected to + * extract synthetic events that will in turn be queued and dispatched. + * + * `eventTypes` {object} + * Optional, plugins that fire events must publish a mapping of registration + * names that are used to register listeners. Values of this mapping must + * be objects that contain `registrationName` or `phasedRegistrationNames`. + * + * `executeDispatch` {function(object, function, string)} + * Optional, allows plugins to override how an event gets dispatched. By + * default, the listener is simply invoked. + * + * Each plugin that is injected into `EventsPluginHub` is immediately operable. + * + * @public + */ +var EventPluginHub = { + + /** + * Methods for injecting dependencies. + */ + injection: { + + /** + * @param {array} InjectedEventPluginOrder + * @public + */ + injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, + + /** + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + */ + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName + + }, + + /** + * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent. + * + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {function} listener The callback to store. + */ + putListener: function (inst, registrationName, listener) { + !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0; + + var key = getDictionaryKey(inst); + var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {}); + bankForRegistrationName[key] = listener; + + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.didPutListener) { + PluginModule.didPutListener(inst, registrationName, listener); + } + }, + + /** + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @return {?function} The stored callback. + */ + getListener: function (inst, registrationName) { + // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not + // live here; needs to be moved to a better place soon + var bankForRegistrationName = listenerBank[registrationName]; + if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) { + return null; + } + var key = getDictionaryKey(inst); + return bankForRegistrationName && bankForRegistrationName[key]; + }, + + /** + * Deletes a listener from the registration bank. + * + * @param {object} inst The instance, which is the source of events. + * @param {string} registrationName Name of listener (e.g. `onClick`). + */ + deleteListener: function (inst, registrationName) { + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } + + var bankForRegistrationName = listenerBank[registrationName]; + // TODO: This should never be null -- when is it? + if (bankForRegistrationName) { + var key = getDictionaryKey(inst); + delete bankForRegistrationName[key]; + } + }, + + /** + * Deletes all listeners for the DOM element with the supplied ID. + * + * @param {object} inst The instance, which is the source of events. + */ + deleteAllListeners: function (inst) { + var key = getDictionaryKey(inst); + for (var registrationName in listenerBank) { + if (!listenerBank.hasOwnProperty(registrationName)) { + continue; + } + + if (!listenerBank[registrationName][key]) { + continue; + } + + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + if (PluginModule && PluginModule.willDeleteListener) { + PluginModule.willDeleteListener(inst, registrationName); + } + + delete listenerBank[registrationName][key]; + } + }, + + /** + * Allows registered plugins an opportunity to extract events from top-level + * native browser events. + * + * @return {*} An accumulation of synthetic events. + * @internal + */ + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events; + var plugins = EventPluginRegistry.plugins; + for (var i = 0; i < plugins.length; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + return events; + }, + + /** + * Enqueues a synthetic event that should be dispatched when + * `processEventQueue` is invoked. + * + * @param {*} events An accumulation of synthetic events. + * @internal + */ + enqueueEvents: function (events) { + if (events) { + eventQueue = accumulateInto(eventQueue, events); + } + }, + + /** + * Dispatches all synthetic events on the event queue. + * + * @internal + */ + processEventQueue: function (simulated) { + // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + var processingEventQueue = eventQueue; + eventQueue = null; + if (simulated) { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); + } else { + forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); + } + !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0; + // This would be a good time to rethrow if any of the event handlers threw. + ReactErrorUtils.rethrowCaughtError(); + }, + + /** + * These are needed for tests only. Do not use! + */ + __purge: function () { + listenerBank = {}; + }, + + __getListenerBank: function () { + return listenerBank; + } + +}; + +module.exports = EventPluginHub; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(35); + +var getEventTarget = __webpack_require__(144); + +/** + * @interface UIEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var UIEventInterface = { + view: function (event) { + if (event.view) { + return event.view; + } + + var target = getEventTarget(event); + if (target.window === target) { + // target is a window object + return target; + } + + var doc = target.ownerDocument; + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + if (doc) { + return doc.defaultView || doc.parentWindow; + } else { + return window; + } + }, + detail: function (event) { + return event.detail || 0; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); + +module.exports = SyntheticUIEvent; + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * `ReactInstanceMap` maintains a mapping from a public facing stateful + * instance (key) and the internal representation (value). This allows public + * methods to accept the user facing instance as an argument and map them back + * to internal methods. + */ + +// TODO: Replace this with ES6: var ReactInstanceMap = new Map(); + +var ReactInstanceMap = { + + /** + * This API should be called `delete` but we'd have to make sure to always + * transform these to strings for IE support. When this transform is fully + * supported we can rename it. + */ + remove: function (key) { + key._reactInternalInstance = undefined; + }, + + get: function (key) { + return key._reactInternalInstance; + }, + + has: function (key) { + return key._reactInternalInstance !== undefined; + }, + + set: function (key, value) { + key._reactInternalInstance = value; + } + +}; + +module.exports = ReactInstanceMap; + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + * + */ + +/*eslint-disable no-self-compare */ + + + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ +function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + // Added the nonzero y check to make Flow happy, but it is redundant + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } +} + +/** + * Performs equality by iterating through keys on an object and returning false + * when any key has values which are not strictly equal between the arguments. + * Returns true when the values of all keys are strictly equal. + */ +function shallowEqual(objA, objB) { + if (is(objA, objB)) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + for (var i = 0; i < keysA.length; i++) { + if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; +} + +module.exports = shallowEqual; + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var invariant = function(condition, format, a, b, c, d, e, f) { + if (process.env.NODE_ENV !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _IconButton = __webpack_require__(490); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _IconButton2.default; + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var MENU_OPTIONS = exports.MENU_OPTIONS = 'Options'; +var MENU_BILLING = exports.MENU_BILLING = 'Billing'; +var MENU_SIZES = exports.MENU_SIZES = 'Sizes'; + +/***/ }), +/* 85 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/* harmony default export */ __webpack_exports__["a"] = (eq); + + +/***/ }), +/* 86 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(108); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */](value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ __webpack_exports__["a"] = (toKey); + + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _TextField = __webpack_require__(660); + +var _TextField2 = _interopRequireDefault(_TextField); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _TextField2.default; + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.addHours = addHours; +exports.addMinutes = addMinutes; +exports.addSeconds = addSeconds; +exports.formatTime = formatTime; +exports.rad2deg = rad2deg; +exports.getTouchEventOffsetValues = getTouchEventOffsetValues; +exports.isInner = isInner; +function addHours(d, hours) { + var newDate = clone(d); + newDate.setHours(d.getHours() + hours); + return newDate; +} + +function addMinutes(d, minutes) { + var newDate = clone(d); + newDate.setMinutes(d.getMinutes() + minutes); + return newDate; +} + +function addSeconds(d, seconds) { + var newDate = clone(d); + newDate.setSeconds(d.getMinutes() + seconds); + return newDate; +} + +function clone(d) { + return new Date(d.getTime()); +} + +/** + * @param date [Date] A Date object. + * @param format [String] One of 'ampm', '24hr', defaults to 'ampm'. + * @param pedantic [Boolean] Check time-picker/time-picker.jsx file. + * + * @return String A string representing the formatted time. + */ +function formatTime(date) { + var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'ampm'; + var pedantic = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + if (!date) return ''; + var hours = date.getHours(); + var mins = date.getMinutes().toString(); + + if (format === 'ampm') { + var isAM = hours < 12; + hours = hours % 12; + var additional = isAM ? ' am' : ' pm'; + hours = (hours || 12).toString(); + + if (mins.length < 2) mins = '0' + mins; + + if (pedantic) { + // Treat midday/midnight specially http://www.nist.gov/pml/div688/times.cfm + if (hours === '12' && mins === '00') { + return additional === ' pm' ? '12 noon' : '12 midnight'; + } + } + + return hours + (mins === '00' ? '' : ':' + mins) + additional; + } + + hours = hours.toString(); + + if (hours.length < 2) hours = '0' + hours; + if (mins.length < 2) mins = '0' + mins; + + return hours + ':' + mins; +} + +function rad2deg(rad) { + return rad * 57.29577951308232; +} + +function getTouchEventOffsetValues(event) { + var el = event.target; + var boundingRect = el.getBoundingClientRect(); + + return { + offsetX: event.clientX - boundingRect.left, + offsetY: event.clientY - boundingRect.top + }; +} + +function isInner(props) { + if (props.type !== 'hour') { + return false; + } + return props.value < 1 || props.value > 12; +} + +/***/ }), +/* 89 */ +/***/ (function(module, exports) { + +module.exports = true; + +/***/ }), +/* 90 */ +/***/ (function(module, exports) { + +var id = 0 + , px = Math.random(); +module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(33).f + , has = __webpack_require__(48) + , TAG = __webpack_require__(20)('toStringTag'); + +module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); +}; + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(311); +var global = __webpack_require__(22) + , hide = __webpack_require__(47) + , Iterators = __webpack_require__(65) + , TO_STRING_TAG = __webpack_require__(20)('toStringTag'); + +for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype; + if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + +/***/ }), +/* 93 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var canDefineProperty = false; +if (process.env.NODE_ENV !== 'production') { + try { + // $FlowFixMe https://github.com/facebook/flow/issues/285 + Object.defineProperty({}, 'x', { get: function () {} }); + canDefineProperty = true; + } catch (x) { + // IE will fail on defineProperty + } +} + +module.exports = canDefineProperty; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var emptyObject = {}; + +if (process.env.NODE_ENV !== 'production') { + Object.freeze(emptyObject); +} + +module.exports = emptyObject; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(372), __esModule: true }; + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createChildFragment = createChildFragment; +exports.extendChildren = extendChildren; + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactAddonsCreateFragment = __webpack_require__(375); + +var _reactAddonsCreateFragment2 = _interopRequireDefault(_reactAddonsCreateFragment); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function createChildFragment(fragments) { + var newFragments = {}; + var validChildrenCount = 0; + var firstKey = void 0; + + // Only create non-empty key fragments + for (var key in fragments) { + var currentChild = fragments[key]; + + if (currentChild) { + if (validChildrenCount === 0) firstKey = key; + newFragments[key] = currentChild; + validChildrenCount++; + } + } + + if (validChildrenCount === 0) return undefined; + if (validChildrenCount === 1) return newFragments[firstKey]; + return (0, _reactAddonsCreateFragment2.default)(newFragments); +} + +function extendChildren(children, extendedProps, extendedChildren) { + return _react2.default.Children.map(children, function (child) { + if (!_react2.default.isValidElement(child)) { + return child; + } + + var newProps = typeof extendedProps === 'function' ? extendedProps(child) : extendedProps; + + var newChildren = typeof extendedChildren === 'function' ? extendedChildren(child) : extendedChildren ? extendedChildren : child.props.children; + + return _react2.default.cloneElement(child, newProps, newChildren); + }); +} + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(10); + +/** + * Injectable ordering of event plugins. + */ +var eventPluginOrder = null; + +/** + * Injectable mapping from names to event plugin modules. + */ +var namesToPlugins = {}; + +/** + * Recomputes the plugin list using the injected plugins and plugin ordering. + * + * @private + */ +function recomputePluginOrdering() { + if (!eventPluginOrder) { + // Wait until an `eventPluginOrder` is injected. + return; + } + for (var pluginName in namesToPlugins) { + var pluginModule = namesToPlugins[pluginName]; + var pluginIndex = eventPluginOrder.indexOf(pluginName); + !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0; + if (EventPluginRegistry.plugins[pluginIndex]) { + continue; + } + !pluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0; + EventPluginRegistry.plugins[pluginIndex] = pluginModule; + var publishedEvents = pluginModule.eventTypes; + for (var eventName in publishedEvents) { + !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0; + } + } +} + +/** + * Publishes an event so that it can be dispatched by the supplied plugin. + * + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private + */ +function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { + !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0; + EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; + + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName(phasedRegistrationName, pluginModule, eventName); + } + } + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); + return true; + } + return false; +} + +/** + * Publishes a registration name that is used to identify dispatched events and + * can be used with `EventPluginHub.putListener` to register listeners. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ +function publishRegistrationName(registrationName, pluginModule, eventName) { + !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0; + EventPluginRegistry.registrationNameModules[registrationName] = pluginModule; + EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; + + if (process.env.NODE_ENV !== 'production') { + var lowerCasedName = registrationName.toLowerCase(); + EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName; + + if (registrationName === 'onDoubleClick') { + EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName; + } + } +} + +/** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ +var EventPluginRegistry = { + + /** + * Ordered list of injected plugins. + */ + plugins: [], + + /** + * Mapping from event name to dispatch config + */ + eventNameDispatchConfigs: {}, + + /** + * Mapping from registration name to plugin module + */ + registrationNameModules: {}, + + /** + * Mapping from registration name to event name + */ + registrationNameDependencies: {}, + + /** + * Mapping from lowercase registration names to the properly cased version, + * used to warn in the case of missing event handlers. Available + * only in __DEV__. + * @type {Object} + */ + possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null, + // Trust the developer to only use possibleRegistrationNames in __DEV__ + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + injectEventPluginOrder: function (injectedEventPluginOrder) { + !!eventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0; + // Clone the ordering so it cannot be dynamically mutated. + eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); + recomputePluginOrdering(); + }, + + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + injectEventPluginsByName: function (injectedNamesToPlugins) { + var isOrderingDirty = false; + for (var pluginName in injectedNamesToPlugins) { + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { + continue; + } + var pluginModule = injectedNamesToPlugins[pluginName]; + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { + !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0; + namesToPlugins[pluginName] = pluginModule; + isOrderingDirty = true; + } + } + if (isOrderingDirty) { + recomputePluginOrdering(); + } + }, + + /** + * Looks up the plugin for the supplied event. + * + * @param {object} event A synthetic event. + * @return {?object} The plugin that created the supplied event. + * @internal + */ + getPluginModuleForEvent: function (event) { + var dispatchConfig = event.dispatchConfig; + if (dispatchConfig.registrationName) { + return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; + } + if (dispatchConfig.phasedRegistrationNames !== undefined) { + // pulling phasedRegistrationNames out of dispatchConfig helps Flow see + // that it is not undefined. + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + + for (var phase in phasedRegistrationNames) { + if (!phasedRegistrationNames.hasOwnProperty(phase)) { + continue; + } + var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]]; + if (pluginModule) { + return pluginModule; + } + } + } + return null; + }, + + /** + * Exposed for unit testing. + * @private + */ + _resetEventPlugins: function () { + eventPluginOrder = null; + for (var pluginName in namesToPlugins) { + if (namesToPlugins.hasOwnProperty(pluginName)) { + delete namesToPlugins[pluginName]; + } + } + EventPluginRegistry.plugins.length = 0; + + var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; + for (var eventName in eventNameDispatchConfigs) { + if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { + delete eventNameDispatchConfigs[eventName]; + } + } + + var registrationNameModules = EventPluginRegistry.registrationNameModules; + for (var registrationName in registrationNameModules) { + if (registrationNameModules.hasOwnProperty(registrationName)) { + delete registrationNameModules[registrationName]; + } + } + + if (process.env.NODE_ENV !== 'production') { + var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames; + for (var lowerCasedName in possibleRegistrationNames) { + if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) { + delete possibleRegistrationNames[lowerCasedName]; + } + } + } + } + +}; + +module.exports = EventPluginRegistry; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(10); + +var OBSERVED_ERROR = {}; + +/** + * `Transaction` creates a black box that is able to wrap any method such that + * certain invariants are maintained before and after the method is invoked + * (Even if an exception is thrown while invoking the wrapped method). Whoever + * instantiates a transaction can provide enforcers of the invariants at + * creation time. The `Transaction` class itself will supply one additional + * automatic invariant for you - the invariant that any transaction instance + * should not be run while it is already being run. You would typically create a + * single instance of a `Transaction` for reuse multiple times, that potentially + * is used to wrap several different methods. Wrappers are extremely simple - + * they only require implementing two methods. + * + * <pre> + * wrappers (injected at creation time) + * + + + * | | + * +-----------------|--------|--------------+ + * | v | | + * | +---------------+ | | + * | +--| wrapper1 |---|----+ | + * | | +---------------+ v | | + * | | +-------------+ | | + * | | +----| wrapper2 |--------+ | + * | | | +-------------+ | | | + * | | | | | | + * | v v v v | wrapper + * | +---+ +---+ +---------+ +---+ +---+ | invariants + * perform(anyMethod) | | | | | | | | | | | | maintained + * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|--------> + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * | +---+ +---+ +---------+ +---+ +---+ | + * | initialize close | + * +-----------------------------------------+ + * </pre> + * + * Use cases: + * - Preserving the input selection ranges before/after reconciliation. + * Restoring selection even in the event of an unexpected error. + * - Deactivating events while rearranging the DOM, preventing blurs/focuses, + * while guaranteeing that afterwards, the event system is reactivated. + * - Flushing a queue of collected DOM mutations to the main UI thread after a + * reconciliation takes place in a worker thread. + * - Invoking any collected `componentDidUpdate` callbacks after rendering new + * content. + * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue + * to preserve the `scrollTop` (an automatic scroll aware DOM). + * - (Future use case): Layout calculations before and after DOM updates. + * + * Transactional plugin API: + * - A module that has an `initialize` method that returns any precomputation. + * - and a `close` method that accepts the precomputation. `close` is invoked + * when the wrapped process is completed, or has failed. + * + * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules + * that implement `initialize` and `close`. + * @return {Transaction} Single transaction for reuse in thread. + * + * @class Transaction + */ +var TransactionImpl = { + /** + * Sets up this instance so that it is prepared for collecting metrics. Does + * so such that this setup method may be used on an instance that is already + * initialized, in a way that does not consume additional memory upon reuse. + * That can be useful if you decide to make your subclass of this mixin a + * "PooledClass". + */ + reinitializeTransaction: function () { + this.transactionWrappers = this.getTransactionWrappers(); + if (this.wrapperInitData) { + this.wrapperInitData.length = 0; + } else { + this.wrapperInitData = []; + } + this._isInTransaction = false; + }, + + _isInTransaction: false, + + /** + * @abstract + * @return {Array<TransactionWrapper>} Array of transaction wrappers. + */ + getTransactionWrappers: null, + + isInTransaction: function () { + return !!this._isInTransaction; + }, + + /** + * Executes the function within a safety window. Use this for the top level + * methods that result in large amounts of computation/mutations that would + * need to be safety checked. The optional arguments helps prevent the need + * to bind in many cases. + * + * @param {function} method Member of scope to call. + * @param {Object} scope Scope to invoke from. + * @param {Object?=} a Argument to pass to the method. + * @param {Object?=} b Argument to pass to the method. + * @param {Object?=} c Argument to pass to the method. + * @param {Object?=} d Argument to pass to the method. + * @param {Object?=} e Argument to pass to the method. + * @param {Object?=} f Argument to pass to the method. + * + * @return {*} Return value from `method`. + */ + perform: function (method, scope, a, b, c, d, e, f) { + !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0; + var errorThrown; + var ret; + try { + this._isInTransaction = true; + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // one of these calls threw. + errorThrown = true; + this.initializeAll(0); + ret = method.call(scope, a, b, c, d, e, f); + errorThrown = false; + } finally { + try { + if (errorThrown) { + // If `method` throws, prefer to show that stack trace over any thrown + // by invoking `closeAll`. + try { + this.closeAll(0); + } catch (err) {} + } else { + // Since `method` didn't throw, we don't want to silence the exception + // here. + this.closeAll(0); + } + } finally { + this._isInTransaction = false; + } + } + return ret; + }, + + initializeAll: function (startIndex) { + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + try { + // Catching errors makes debugging more difficult, so we start with the + // OBSERVED_ERROR state before overwriting it with the real return value + // of initialize -- if it's still set to OBSERVED_ERROR in the finally + // block, it means wrapper.initialize threw. + this.wrapperInitData[i] = OBSERVED_ERROR; + this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; + } finally { + if (this.wrapperInitData[i] === OBSERVED_ERROR) { + // The initializer for wrapper i threw an error; initialize the + // remaining wrappers but silence any exceptions from them to ensure + // that the first error is the one to bubble up. + try { + this.initializeAll(i + 1); + } catch (err) {} + } + } + } + }, + + /** + * Invokes each of `this.transactionWrappers.close[i]` functions, passing into + * them the respective return values of `this.transactionWrappers.init[i]` + * (`close`rs that correspond to initializers that failed will not be + * invoked). + */ + closeAll: function (startIndex) { + !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0; + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + var initData = this.wrapperInitData[i]; + var errorThrown; + try { + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // wrapper.close threw. + errorThrown = true; + if (initData !== OBSERVED_ERROR && wrapper.close) { + wrapper.close.call(this, initData); + } + errorThrown = false; + } finally { + if (errorThrown) { + // The closer for wrapper i threw an error; close the remaining + // wrappers but silence any exceptions from them to ensure that the + // first error is the one to bubble up. + try { + this.closeAll(i + 1); + } catch (e) {} + } + } + } + this.wrapperInitData.length = 0; + } +}; + +module.exports = TransactionImpl; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticUIEvent = __webpack_require__(79); +var ViewportMetrics = __webpack_require__(225); + +var getEventModifierState = __webpack_require__(146); + +/** + * @interface MouseEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var MouseEventInterface = { + screenX: null, + screenY: null, + clientX: null, + clientY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: function (event) { + // Webkit, Firefox, IE9+ + // which: 1 2 3 + // button: 0 1 2 (standard) + var button = event.button; + if ('which' in event) { + return button; + } + // IE<9 + // which: undefined + // button: 0 0 0 + // button: 1 4 2 (onmouseup) + return button === 2 ? 2 : button === 4 ? 1 : 0; + }, + buttons: null, + relatedTarget: function (event) { + return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement); + }, + // "Proprietary" Interface. + pageX: function (event) { + return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft; + }, + pageY: function (event) { + return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); + +module.exports = SyntheticMouseEvent; + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(18); +var DOMNamespaces = __webpack_require__(148); + +var WHITESPACE_TEST = /^[ \r\n\t\f]/; +var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; + +var createMicrosoftUnsafeLocalFunction = __webpack_require__(149); + +// SVG temp container for IE lacking innerHTML +var reusableSVGContainer; + +/** + * Set the innerHTML property of a node, ensuring that whitespace is preserved + * even in IE8. + * + * @param {DOMElement} node + * @param {string} html + * @internal + */ +var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { + // IE does not have innerHTML for SVG nodes, so instead we inject the + // new markup in a temp node and then move the child nodes across into + // the target node + if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) { + reusableSVGContainer = reusableSVGContainer || document.createElement('div'); + reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>'; + var svgNode = reusableSVGContainer.firstChild; + while (svgNode.firstChild) { + node.appendChild(svgNode.firstChild); + } + } else { + node.innerHTML = html; + } +}); + +if (ExecutionEnvironment.canUseDOM) { + // IE8: When updating a just created node with innerHTML only leading + // whitespace is removed. When updating an existing node with innerHTML + // whitespace in root TextNodes is also collapsed. + // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html + + // Feature detection; only IE8 is known to behave improperly like this. + var testElement = document.createElement('div'); + testElement.innerHTML = ' '; + if (testElement.innerHTML === '') { + setInnerHTML = function (node, html) { + // Magic theory: IE8 supposedly differentiates between added and updated + // nodes when processing innerHTML, innerHTML on updated nodes suffers + // from worse whitespace behavior. Re-adding a node like this triggers + // the initial and more favorable whitespace behavior. + // TODO: What to do on a detached node? + if (node.parentNode) { + node.parentNode.replaceChild(node, node); + } + + // We also implement a workaround for non-visible tags disappearing into + // thin air on IE8, this only happens if there is no visible text + // in-front of the non-visible tags. Piggyback on the whitespace fix + // and simply check if any non-visible tags appear in the source. + if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) { + // Recover leading whitespace by temporarily prepending any character. + // \uFEFF has the potential advantage of being zero-width/invisible. + // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode + // in hopes that this is preserved even if "\uFEFF" is transformed to + // the actual Unicode character (by Babel, for example). + // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216 + node.innerHTML = String.fromCharCode(0xFEFF) + html; + + // deleteData leaves an empty `TextNode` which offsets the index of all + // children. Definitely want to avoid this. + var textNode = node.firstChild; + if (textNode.data.length === 1) { + node.removeChild(textNode); + } else { + textNode.deleteData(0, 1); + } + } else { + node.innerHTML = html; + } + }; + } + testElement = null; +} + +module.exports = setInnerHTML; + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * Based on the escape-html library, which is used under the MIT License below: + * + * Copyright (c) 2012-2013 TJ Holowaychuk + * Copyright (c) 2015 Andreas Lubbe + * Copyright (c) 2015 Tiancheng "Timothy" Gu + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * 'Software'), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + + + +// code copied and modified from escape-html +/** + * Module variables. + * @private + */ + +var matchHtmlRegExp = /["'&<>]/; + +/** + * Escape special characters in the given string of html. + * + * @param {string} string The string to escape for inserting into HTML + * @return {string} + * @public + */ + +function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index = 0; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + // " + escape = '"'; + break; + case 38: + // & + escape = '&'; + break; + case 39: + // ' + escape = '''; // modified from escape-html; used to be ''' + break; + case 60: + // < + escape = '<'; + break; + case 62: + // > + escape = '>'; + break; + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; +} +// end code copied and modified from escape-html + + +/** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ +function escapeTextContentForBrowser(text) { + if (typeof text === 'boolean' || typeof text === 'number') { + // this shortcircuit helps perf for types that we know will never have + // special characters, especially given that this function is used often + // for numeric dom ids. + return '' + text; + } + return escapeHtml(text); +} + +module.exports = escapeTextContentForBrowser; + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var EventPluginRegistry = __webpack_require__(98); +var ReactEventEmitterMixin = __webpack_require__(411); +var ViewportMetrics = __webpack_require__(225); + +var getVendorPrefixedEventName = __webpack_require__(412); +var isEventSupported = __webpack_require__(145); + +/** + * Summary of `ReactBrowserEventEmitter` event handling: + * + * - Top-level delegation is used to trap most native browser events. This + * may only occur in the main thread and is the responsibility of + * ReactEventListener, which is injected and can therefore support pluggable + * event sources. This is the only work that occurs in the main thread. + * + * - We normalize and de-duplicate events to account for browser quirks. This + * may be done in the worker thread. + * + * - Forward these native events (with the associated top-level type used to + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want + * to extract any synthetic events. + * + * - The `EventPluginHub` will then process each event by annotating them with + * "dispatches", a sequence of listeners and IDs that care about that event. + * + * - The `EventPluginHub` then dispatches the events. + * + * Overview of React and the event system: + * + * +------------+ . + * | DOM | . + * +------------+ . + * | . + * v . + * +------------+ . + * | ReactEvent | . + * | Listener | . + * +------------+ . +-----------+ + * | . +--------+|SimpleEvent| + * | . | |Plugin | + * +-----|------+ . v +-----------+ + * | | | . +--------------+ +------------+ + * | +-----------.--->|EventPluginHub| | Event | + * | | . | | +-----------+ | Propagators| + * | ReactEvent | . | | |TapEvent | |------------| + * | Emitter | . | |<---+|Plugin | |other plugin| + * | | . | | +-----------+ | utilities | + * | +-----------.--->| | +------------+ + * | | | . +--------------+ + * +-----|------+ . ^ +-----------+ + * | . | |Enter/Leave| + * + . +-------+|Plugin | + * +-------------+ . +-----------+ + * | application | . + * |-------------| . + * | | . + * | | . + * +-------------+ . + * . + * React Core . General Purpose Event Plugin System + */ + +var hasEventPageXY; +var alreadyListeningTo = {}; +var isMonitoringScrollValue = false; +var reactTopListenersCounter = 0; + +// For events like 'submit' which don't consistently bubble (which we trap at a +// lower node than `document`), binding at `document` would cause duplicate +// events so we don't include them here +var topEventMapping = { + topAbort: 'abort', + topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend', + topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration', + topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart', + topBlur: 'blur', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topChange: 'change', + topClick: 'click', + topCompositionEnd: 'compositionend', + topCompositionStart: 'compositionstart', + topCompositionUpdate: 'compositionupdate', + topContextMenu: 'contextmenu', + topCopy: 'copy', + topCut: 'cut', + topDoubleClick: 'dblclick', + topDrag: 'drag', + topDragEnd: 'dragend', + topDragEnter: 'dragenter', + topDragExit: 'dragexit', + topDragLeave: 'dragleave', + topDragOver: 'dragover', + topDragStart: 'dragstart', + topDrop: 'drop', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topFocus: 'focus', + topInput: 'input', + topKeyDown: 'keydown', + topKeyPress: 'keypress', + topKeyUp: 'keyup', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topMouseDown: 'mousedown', + topMouseMove: 'mousemove', + topMouseOut: 'mouseout', + topMouseOver: 'mouseover', + topMouseUp: 'mouseup', + topPaste: 'paste', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topScroll: 'scroll', + topSeeked: 'seeked', + topSeeking: 'seeking', + topSelectionChange: 'selectionchange', + topStalled: 'stalled', + topSuspend: 'suspend', + topTextInput: 'textInput', + topTimeUpdate: 'timeupdate', + topTouchCancel: 'touchcancel', + topTouchEnd: 'touchend', + topTouchMove: 'touchmove', + topTouchStart: 'touchstart', + topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend', + topVolumeChange: 'volumechange', + topWaiting: 'waiting', + topWheel: 'wheel' +}; + +/** + * To ensure no conflicts with other potential React instances on the page + */ +var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2); + +function getListeningForDocument(mountAt) { + // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` + // directly. + if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { + mountAt[topListenersIDKey] = reactTopListenersCounter++; + alreadyListeningTo[mountAt[topListenersIDKey]] = {}; + } + return alreadyListeningTo[mountAt[topListenersIDKey]]; +} + +/** + * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For + * example: + * + * EventPluginHub.putListener('myID', 'onClick', myFunction); + * + * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'. + * + * @internal + */ +var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { + + /** + * Injectable event backend + */ + ReactEventListener: null, + + injection: { + /** + * @param {object} ReactEventListener + */ + injectReactEventListener: function (ReactEventListener) { + ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel); + ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; + } + }, + + /** + * Sets whether or not any created callbacks should be enabled. + * + * @param {boolean} enabled True if callbacks should be enabled. + */ + setEnabled: function (enabled) { + if (ReactBrowserEventEmitter.ReactEventListener) { + ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); + } + }, + + /** + * @return {boolean} True if callbacks are enabled. + */ + isEnabled: function () { + return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled()); + }, + + /** + * We listen for bubbled touch events on the document object. + * + * Firefox v8.01 (and possibly others) exhibited strange behavior when + * mounting `onmousemove` events at some node that was not the document + * element. The symptoms were that if your mouse is not moving over something + * contained within that mount point (for example on the background) the + * top-level listeners for `onmousemove` won't be called. However, if you + * register the `mousemove` on the document object, then it will of course + * catch all `mousemove`s. This along with iOS quirks, justifies restricting + * top-level listeners to the document object only, at least for these + * movement types of events and possibly all events. + * + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + * + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but + * they bubble to document. + * + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {object} contentDocumentHandle Document which owns the container + */ + listenTo: function (registrationName, contentDocumentHandle) { + var mountAt = contentDocumentHandle; + var isListening = getListeningForDocument(mountAt); + var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName]; + + for (var i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { + if (dependency === 'topWheel') { + if (isEventSupported('wheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt); + } else if (isEventSupported('mousewheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt); + } else { + // Firefox needs to capture a different mouse scroll event. + // @see http://www.quirksmode.org/dom/events/tests/scroll.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt); + } + } else if (dependency === 'topScroll') { + + if (isEventSupported('scroll', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt); + } else { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); + } + } else if (dependency === 'topFocus' || dependency === 'topBlur') { + + if (isEventSupported('focus', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt); + } else if (isEventSupported('focusin')) { + // IE has `focusin` and `focusout` events which bubble. + // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt); + } + + // to make sure blur and focus event listeners are only attached once + isListening.topBlur = true; + isListening.topFocus = true; + } else if (topEventMapping.hasOwnProperty(dependency)) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt); + } + + isListening[dependency] = true; + } + } + }, + + trapBubbledEvent: function (topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle); + }, + + trapCapturedEvent: function (topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle); + }, + + /** + * Protect against document.createEvent() returning null + * Some popup blocker extensions appear to do this: + * https://github.com/facebook/react/issues/6887 + */ + supportsEventPageXY: function () { + if (!document.createEvent) { + return false; + } + var ev = document.createEvent('MouseEvent'); + return ev != null && 'pageX' in ev; + }, + + /** + * Listens to window scroll and resize events. We cache scroll values so that + * application code can access them without triggering reflows. + * + * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when + * pageX/pageY isn't supported (legacy browsers). + * + * NOTE: Scroll events do not bubble. + * + * @see http://www.quirksmode.org/dom/events/scroll.html + */ + ensureScrollValueMonitoring: function () { + if (hasEventPageXY === undefined) { + hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY(); + } + if (!hasEventPageXY && !isMonitoringScrollValue) { + var refresh = ViewportMetrics.refreshScrollValues; + ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); + isMonitoringScrollValue = true; + } + } + +}); + +module.exports = ReactBrowserEventEmitter; + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + set: function set(style, key, value) { + style[key] = value; + } +}; + +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(463); + +/***/ }), +/* 106 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(30); + + +/** Built-in value references. */ +var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; + +/* harmony default export */ __webpack_exports__["a"] = (Symbol); + + +/***/ }), +/* 107 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(257); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyArray_js__ = __webpack_require__(258); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(108); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringToPath_js__ = __webpack_require__(259); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(86); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toString_js__ = __webpack_require__(261); + + + + + + + + +/** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ +function toPath(value) { + if (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value)) { + return __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */](value, __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */]); + } + return __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */](value) ? [value] : __WEBPACK_IMPORTED_MODULE_1__copyArray_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_4__stringToPath_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_6__toString_js__["a" /* default */](value))); +} + +/* harmony default export */ __webpack_exports__["a"] = (toPath); + + +/***/ }), +/* 108 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(69); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(57); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) == symbolTag); +} + +/* harmony default export */ __webpack_exports__["a"] = (isSymbol); + + +/***/ }), +/* 109 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(59); + + +/* Built-in method references that are verified to be native. */ +var nativeCreate = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](Object, 'create'); + +/* harmony default export */ __webpack_exports__["a"] = (nativeCreate); + + +/***/ }), +/* 110 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__ = __webpack_require__(509); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__ = __webpack_require__(510); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__ = __webpack_require__(511); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__ = __webpack_require__(512); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__ = __webpack_require__(513); + + + + + + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__["a" /* default */]; +ListCache.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__["a" /* default */]; +ListCache.prototype.get = __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__["a" /* default */]; +ListCache.prototype.has = __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__["a" /* default */]; +ListCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (ListCache); + + +/***/ }), +/* 111 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(85); + + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */](array[length][0], key)) { + return length; + } + } + return -1; +} + +/* harmony default export */ __webpack_exports__["a"] = (assocIndexOf); + + +/***/ }), +/* 112 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__ = __webpack_require__(515); + + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__["a" /* default */](key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/* harmony default export */ __webpack_exports__["a"] = (getMapData); + + +/***/ }), +/* 113 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__(263); + + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */]) { + __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */](object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +/* harmony default export */ __webpack_exports__["a"] = (baseAssignValue); + + +/***/ }), +/* 114 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(162); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(168); + + + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && __WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */](value.length) && !__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isArrayLike); + + +/***/ }), +/* 115 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = formatName; +function formatName(context, name) { + var sectionPrefix = context._reduxForm.sectionPrefix; + + return !sectionPrefix ? name : sectionPrefix + "." + name; +} + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _MenuItem = __webpack_require__(283); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _MenuItem2.default; + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactEventListener = __webpack_require__(60); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _RenderToLayer = __webpack_require__(284); + +var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer); + +var _propTypes = __webpack_require__(43); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _Paper = __webpack_require__(37); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _lodash = __webpack_require__(636); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _PopoverAnimationDefault = __webpack_require__(637); + +var _PopoverAnimationDefault2 = _interopRequireDefault(_PopoverAnimationDefault); + +var _iOSHelpers = __webpack_require__(638); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + root: { + display: 'none' + } +}; + +var Popover = function (_Component) { + (0, _inherits3.default)(Popover, _Component); + + function Popover(props, context) { + (0, _classCallCheck3.default)(this, Popover); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Popover.__proto__ || (0, _getPrototypeOf2.default)(Popover)).call(this, props, context)); + + _this.timeout = null; + + _this.renderLayer = function () { + var _this$props = _this.props, + animated = _this$props.animated, + animation = _this$props.animation, + anchorEl = _this$props.anchorEl, + anchorOrigin = _this$props.anchorOrigin, + autoCloseWhenOffScreen = _this$props.autoCloseWhenOffScreen, + canAutoPosition = _this$props.canAutoPosition, + children = _this$props.children, + onRequestClose = _this$props.onRequestClose, + style = _this$props.style, + targetOrigin = _this$props.targetOrigin, + useLayerForClickAway = _this$props.useLayerForClickAway, + other = (0, _objectWithoutProperties3.default)(_this$props, ['animated', 'animation', 'anchorEl', 'anchorOrigin', 'autoCloseWhenOffScreen', 'canAutoPosition', 'children', 'onRequestClose', 'style', 'targetOrigin', 'useLayerForClickAway']); + + + var styleRoot = style; + + if (!animated) { + styleRoot = { + position: 'fixed', + zIndex: _this.context.muiTheme.zIndex.popover + }; + + if (!_this.state.open) { + return null; + } + + return _react2.default.createElement( + _Paper2.default, + (0, _extends3.default)({ style: (0, _simpleAssign2.default)(styleRoot, style) }, other), + children + ); + } + + var Animation = animation || _PopoverAnimationDefault2.default; + + return _react2.default.createElement( + Animation, + (0, _extends3.default)({ + targetOrigin: targetOrigin, + style: styleRoot + }, other, { + open: _this.state.open && !_this.state.closing + }), + children + ); + }; + + _this.componentClickAway = function (event) { + event.preventDefault(); + _this.requestClose('clickAway'); + }; + + _this.setPlacement = function (scrolling) { + if (!_this.state.open) { + return; + } + + if (!_this.refs.layer.getLayer()) { + return; + } + + var targetEl = _this.refs.layer.getLayer().children[0]; + if (!targetEl) { + return; + } + + var _this$props2 = _this.props, + targetOrigin = _this$props2.targetOrigin, + anchorOrigin = _this$props2.anchorOrigin; + + var anchorEl = _this.props.anchorEl || _this.anchorEl; + + var anchor = _this.getAnchorPosition(anchorEl); + var target = _this.getTargetPosition(targetEl); + + var targetPosition = { + top: anchor[anchorOrigin.vertical] - target[targetOrigin.vertical], + left: anchor[anchorOrigin.horizontal] - target[targetOrigin.horizontal] + }; + + if (scrolling && _this.props.autoCloseWhenOffScreen) { + _this.autoCloseWhenOffScreen(anchor); + } + + if (_this.props.canAutoPosition) { + target = _this.getTargetPosition(targetEl); // update as height may have changed + targetPosition = _this.applyAutoPositionIfNeeded(anchor, target, targetOrigin, anchorOrigin, targetPosition); + } + + targetEl.style.top = Math.max(0, targetPosition.top) + 'px'; + targetEl.style.left = Math.max(0, targetPosition.left) + 'px'; + targetEl.style.maxHeight = window.innerHeight + 'px'; + }; + + _this.handleResize = (0, _lodash2.default)(_this.setPlacement, 100); + _this.handleScroll = (0, _lodash2.default)(_this.setPlacement.bind(_this, true), 50); + + _this.state = { + open: props.open, + closing: false + }; + return _this; + } + + (0, _createClass3.default)(Popover, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setPlacement(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; + + if (nextProps.open !== this.state.open) { + if (nextProps.open) { + this.anchorEl = nextProps.anchorEl || this.props.anchorEl; + this.setState({ + open: true, + closing: false + }); + } else { + if (nextProps.animated) { + if (this.timeout !== null) return; + this.setState({ closing: true }); + this.timeout = setTimeout(function () { + _this2.setState({ + open: false + }, function () { + _this2.timeout = null; + }); + }, 500); + } else { + this.setState({ + open: false + }); + } + } + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.setPlacement(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.handleResize.cancel(); + this.handleScroll.cancel(); + + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + } + }, { + key: 'requestClose', + value: function requestClose(reason) { + if (this.props.onRequestClose) { + this.props.onRequestClose(reason); + } + } + }, { + key: 'getAnchorPosition', + value: function getAnchorPosition(el) { + if (!el) { + el = _reactDom2.default.findDOMNode(this); + } + + var rect = el.getBoundingClientRect(); + var a = { + top: rect.top, + left: rect.left, + width: el.offsetWidth, + height: el.offsetHeight + }; + + a.right = rect.right || a.left + a.width; + + // The fixed positioning isn't respected on iOS when an input is focused. + // We need to compute the position from the top of the page and not the viewport. + if ((0, _iOSHelpers.isIOS)() && document.activeElement.tagName === 'INPUT') { + a.bottom = (0, _iOSHelpers.getOffsetTop)(el) + a.height; + } else { + a.bottom = rect.bottom || a.top + a.height; + } + a.middle = a.left + (a.right - a.left) / 2; + a.center = a.top + (a.bottom - a.top) / 2; + + return a; + } + }, { + key: 'getTargetPosition', + value: function getTargetPosition(targetEl) { + return { + top: 0, + center: targetEl.offsetHeight / 2, + bottom: targetEl.offsetHeight, + left: 0, + middle: targetEl.offsetWidth / 2, + right: targetEl.offsetWidth + }; + } + }, { + key: 'autoCloseWhenOffScreen', + value: function autoCloseWhenOffScreen(anchorPosition) { + if (anchorPosition.top < 0 || anchorPosition.top > window.innerHeight || anchorPosition.left < 0 || anchorPosition.left > window.innerWidth) { + this.requestClose('offScreen'); + } + } + }, { + key: 'getOverlapMode', + value: function getOverlapMode(anchor, target, median) { + if ([anchor, target].indexOf(median) >= 0) return 'auto'; + if (anchor === target) return 'inclusive'; + return 'exclusive'; + } + }, { + key: 'getPositions', + value: function getPositions(anchor, target) { + var a = (0, _extends3.default)({}, anchor); + var t = (0, _extends3.default)({}, target); + + var positions = { + x: ['left', 'right'].filter(function (p) { + return p !== t.horizontal; + }), + y: ['top', 'bottom'].filter(function (p) { + return p !== t.vertical; + }) + }; + + var overlap = { + x: this.getOverlapMode(a.horizontal, t.horizontal, 'middle'), + y: this.getOverlapMode(a.vertical, t.vertical, 'center') + }; + + positions.x.splice(overlap.x === 'auto' ? 0 : 1, 0, 'middle'); + positions.y.splice(overlap.y === 'auto' ? 0 : 1, 0, 'center'); + + if (overlap.y !== 'auto') { + a.vertical = a.vertical === 'top' ? 'bottom' : 'top'; + if (overlap.y === 'inclusive') { + t.vertical = t.vertical; + } + } + + if (overlap.x !== 'auto') { + a.horizontal = a.horizontal === 'left' ? 'right' : 'left'; + if (overlap.y === 'inclusive') { + t.horizontal = t.horizontal; + } + } + + return { + positions: positions, + anchorPos: a + }; + } + }, { + key: 'applyAutoPositionIfNeeded', + value: function applyAutoPositionIfNeeded(anchor, target, targetOrigin, anchorOrigin, targetPosition) { + var _getPositions = this.getPositions(anchorOrigin, targetOrigin), + positions = _getPositions.positions, + anchorPos = _getPositions.anchorPos; + + if (targetPosition.top < 0 || targetPosition.top + target.bottom > window.innerHeight) { + var newTop = anchor[anchorPos.vertical] - target[positions.y[0]]; + if (newTop + target.bottom <= window.innerHeight) { + targetPosition.top = Math.max(0, newTop); + } else { + newTop = anchor[anchorPos.vertical] - target[positions.y[1]]; + if (newTop + target.bottom <= window.innerHeight) { + targetPosition.top = Math.max(0, newTop); + } + } + } + + if (targetPosition.left < 0 || targetPosition.left + target.right > window.innerWidth) { + var newLeft = anchor[anchorPos.horizontal] - target[positions.x[0]]; + if (newLeft + target.right <= window.innerWidth) { + targetPosition.left = Math.max(0, newLeft); + } else { + newLeft = anchor[anchorPos.horizontal] - target[positions.x[1]]; + if (newLeft + target.right <= window.innerWidth) { + targetPosition.left = Math.max(0, newLeft); + } + } + } + + return targetPosition; + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement( + 'div', + { style: styles.root }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onScroll: this.handleScroll, + onResize: this.handleResize + }), + _react2.default.createElement(_RenderToLayer2.default, { + ref: 'layer', + open: this.state.open, + componentClickAway: this.componentClickAway, + useLayerForClickAway: this.props.useLayerForClickAway, + render: this.renderLayer + }) + ); + } + }]); + return Popover; +}(_react.Component); + +Popover.defaultProps = { + anchorOrigin: { + vertical: 'bottom', + horizontal: 'left' + }, + animated: true, + autoCloseWhenOffScreen: true, + canAutoPosition: true, + onRequestClose: function onRequestClose() {}, + open: false, + style: { + overflowY: 'auto' + }, + targetOrigin: { + vertical: 'top', + horizontal: 'left' + }, + useLayerForClickAway: true, + zDepth: 1 +}; +Popover.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Popover.propTypes = { + /** + * This is the DOM element that will be used to set the position of the + * popover. + */ + anchorEl: _react.PropTypes.object, + /** + * This is the point on the anchor where the popover's + * `targetOrigin` will attach to. + * Options: + * vertical: [top, center, bottom] + * horizontal: [left, middle, right]. + */ + anchorOrigin: _propTypes2.default.origin, + /** + * If true, the popover will apply transitions when + * it is added to the DOM. + */ + animated: _react.PropTypes.bool, + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * If true, the popover will hide when the anchor is scrolled off the screen. + */ + autoCloseWhenOffScreen: _react.PropTypes.bool, + /** + * If true, the popover (potentially) ignores `targetOrigin` + * and `anchorOrigin` to make itself fit on screen, + * which is useful for mobile devices. + */ + canAutoPosition: _react.PropTypes.bool, + /** + * The content of the popover. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Callback function fired when the popover is requested to be closed. + * + * @param {string} reason The reason for the close request. Possibles values + * are 'clickAway' and 'offScreen'. + */ + onRequestClose: _react.PropTypes.func, + /** + * If true, the popover is visible. + */ + open: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * This is the point on the popover which will attach to + * the anchor's origin. + * Options: + * vertical: [top, center, bottom] + * horizontal: [left, middle, right]. + */ + targetOrigin: _propTypes2.default.origin, + /** + * If true, the popover will render on top of an invisible + * layer, which will prevent clicks to the underlying + * elements, and trigger an `onRequestClose('clickAway')` call. + */ + useLayerForClickAway: _react.PropTypes.bool, + /** + * The zDepth of the popover. + */ + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = Popover; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getTheme = getTheme; + +var _getMuiTheme = __webpack_require__(119); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + +var _colors = __webpack_require__(58); + +var _styles = __webpack_require__(759); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + paper: { + margin: _styles.spacing.desktopGutter, + padding: _styles.spacing.desktopGutter + }, + container: { + display: 'flex', + flexFlow: 'column', + alignItems: 'center', + minHeight: '100%', + backgroundColor: _colors.grey50 + }, + content: { + maxWidth: 1200, + margin: '0 auto', + zIndex: 101 + }, + tabs: { + marginLeft: -24, + marginRight: -24 + }, + appBar: { + flex: 'none', + display: 'block', + flexWrap: 'wrap', + zIndex: 100, + height: 64 + }, + logo: { + fontSize: 16, + color: _styles.typography.textFullWhite, + lineHeight: _styles.spacing.desktopKeylineIncrement + 'px', + fontWeight: _styles.typography.fontWeightLight, + backgroundColor: 'rgb(72, 72, 72)', + marginBottom: 8, + height: 64, + textAlign: 'center' + }, + fields: { + text: { + width: '100%' + } + }, + colors: { + main: 'rgb(72, 72, 72)', + drawer: 'rgb(250, 250, 250)', + tabs: 'rgb(137, 189, 191)' + }, + theme: { + palette: { + primary1Color: 'rgb(72, 72, 72)', + primary2Color: 'rgb(72, 72, 72)' + }, + drawer: { + color: 'rgb(250, 250, 250)' + } + } +}; + +function getTheme() { + return (0, _getMuiTheme2.default)(styles.theme); +} + +exports.default = styles; + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _toConsumableArray2 = __webpack_require__(76); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +exports.default = getMuiTheme; + +var _lodash = __webpack_require__(726); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _colorManipulator = __webpack_require__(70); + +var _lightBaseTheme = __webpack_require__(294); + +var _lightBaseTheme2 = _interopRequireDefault(_lightBaseTheme); + +var _zIndex = __webpack_require__(295); + +var _zIndex2 = _interopRequireDefault(_zIndex); + +var _autoprefixer = __webpack_require__(727); + +var _autoprefixer2 = _interopRequireDefault(_autoprefixer); + +var _callOnce = __webpack_require__(756); + +var _callOnce2 = _interopRequireDefault(_callOnce); + +var _rtl = __webpack_require__(757); + +var _rtl2 = _interopRequireDefault(_rtl); + +var _compose = __webpack_require__(758); + +var _compose2 = _interopRequireDefault(_compose); + +var _typography = __webpack_require__(299); + +var _typography2 = _interopRequireDefault(_typography); + +var _colors = __webpack_require__(58); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Get the MUI theme corresponding to a base theme. + * It's possible to override the computed theme values + * by providing a second argument. The calculated + * theme will be deeply merged with the second argument. + */ +function getMuiTheme(muiTheme) { + for (var _len = arguments.length, more = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + more[_key - 1] = arguments[_key]; + } + + muiTheme = _lodash2.default.apply(undefined, [{ + zIndex: _zIndex2.default, + isRtl: false, + userAgent: undefined + }, _lightBaseTheme2.default, muiTheme].concat(more)); + + var _muiTheme = muiTheme, + spacing = _muiTheme.spacing, + fontFamily = _muiTheme.fontFamily, + palette = _muiTheme.palette; + + var baseTheme = { spacing: spacing, fontFamily: fontFamily, palette: palette }; + + muiTheme = (0, _lodash2.default)({ + appBar: { + color: palette.primary1Color, + textColor: palette.alternateTextColor, + height: spacing.desktopKeylineIncrement, + titleFontWeight: _typography2.default.fontWeightNormal, + padding: spacing.desktopGutter + }, + avatar: { + color: palette.canvasColor, + backgroundColor: (0, _colorManipulator.emphasize)(palette.canvasColor, 0.26) + }, + badge: { + color: palette.alternateTextColor, + textColor: palette.textColor, + primaryColor: palette.primary1Color, + primaryTextColor: palette.alternateTextColor, + secondaryColor: palette.accent1Color, + secondaryTextColor: palette.alternateTextColor, + fontWeight: _typography2.default.fontWeightMedium + }, + bottomNavigation: { + backgroundColor: palette.canvasColor, + unselectedColor: (0, _colorManipulator.fade)(palette.textColor, 0.54), + selectedColor: palette.primary1Color, + height: 56, + unselectedFontSize: 12, + selectedFontSize: 14 + }, + button: { + height: 36, + minWidth: 88, + iconButtonSize: spacing.iconSize * 2 + }, + card: { + titleColor: (0, _colorManipulator.fade)(palette.textColor, 0.87), + subtitleColor: (0, _colorManipulator.fade)(palette.textColor, 0.54), + fontWeight: _typography2.default.fontWeightMedium + }, + cardMedia: { + color: _colors.darkWhite, + overlayContentBackground: _colors.lightBlack, + titleColor: _colors.darkWhite, + subtitleColor: _colors.lightWhite + }, + cardText: { + textColor: palette.textColor + }, + checkbox: { + boxColor: palette.textColor, + checkedColor: palette.primary1Color, + requiredColor: palette.primary1Color, + disabledColor: palette.disabledColor, + labelColor: palette.textColor, + labelDisabledColor: palette.disabledColor + }, + chip: { + backgroundColor: (0, _colorManipulator.emphasize)(palette.canvasColor, 0.12), + deleteIconColor: (0, _colorManipulator.fade)(palette.textColor, 0.26), + textColor: (0, _colorManipulator.fade)(palette.textColor, 0.87), + fontSize: 14, + fontWeight: _typography2.default.fontWeightNormal, + shadow: '0 1px 6px ' + (0, _colorManipulator.fade)(palette.shadowColor, 0.12) + ',\n 0 1px 4px ' + (0, _colorManipulator.fade)(palette.shadowColor, 0.12) + }, + datePicker: { + color: palette.primary1Color, + textColor: palette.alternateTextColor, + calendarTextColor: palette.textColor, + selectColor: palette.primary2Color, + selectTextColor: palette.alternateTextColor, + calendarYearBackgroundColor: palette.canvasColor + }, + dialog: { + titleFontSize: 22, + bodyFontSize: 16, + bodyColor: (0, _colorManipulator.fade)(palette.textColor, 0.6) + }, + dropDownMenu: { + accentColor: palette.borderColor + }, + enhancedButton: { + tapHighlightColor: _colors.transparent + }, + flatButton: { + color: _colors.transparent, + buttonFilterColor: '#999999', + disabledTextColor: (0, _colorManipulator.fade)(palette.textColor, 0.3), + textColor: palette.textColor, + primaryTextColor: palette.primary1Color, + secondaryTextColor: palette.accent1Color, + fontSize: _typography2.default.fontStyleButtonFontSize, + fontWeight: _typography2.default.fontWeightMedium + }, + floatingActionButton: { + buttonSize: 56, + miniSize: 40, + color: palette.primary1Color, + iconColor: palette.alternateTextColor, + secondaryColor: palette.accent1Color, + secondaryIconColor: palette.alternateTextColor, + disabledTextColor: palette.disabledColor, + disabledColor: (0, _colorManipulator.emphasize)(palette.canvasColor, 0.12) + }, + gridTile: { + textColor: _colors.white + }, + icon: { + color: palette.canvasColor, + backgroundColor: palette.primary1Color + }, + inkBar: { + backgroundColor: palette.accent1Color + }, + drawer: { + width: spacing.desktopKeylineIncrement * 4, + color: palette.canvasColor + }, + listItem: { + nestedLevelDepth: 18, + secondaryTextColor: palette.secondaryTextColor, + leftIconColor: _colors.grey600, + rightIconColor: _colors.grey600 + }, + menu: { + backgroundColor: palette.canvasColor, + containerBackgroundColor: palette.canvasColor + }, + menuItem: { + dataHeight: 32, + height: 48, + hoverColor: (0, _colorManipulator.fade)(palette.textColor, 0.1), + padding: spacing.desktopGutter, + selectedTextColor: palette.accent1Color, + rightIconDesktopFill: _colors.grey600 + }, + menuSubheader: { + padding: spacing.desktopGutter, + borderColor: palette.borderColor, + textColor: palette.primary1Color + }, + overlay: { + backgroundColor: _colors.lightBlack + }, + paper: { + color: palette.textColor, + backgroundColor: palette.canvasColor, + zDepthShadows: [[1, 6, 0.12, 1, 4, 0.12], [3, 10, 0.16, 3, 10, 0.23], [10, 30, 0.19, 6, 10, 0.23], [14, 45, 0.25, 10, 18, 0.22], [19, 60, 0.30, 15, 20, 0.22]].map(function (d) { + return '0 ' + d[0] + 'px ' + d[1] + 'px ' + (0, _colorManipulator.fade)(palette.shadowColor, d[2]) + ',\n 0 ' + d[3] + 'px ' + d[4] + 'px ' + (0, _colorManipulator.fade)(palette.shadowColor, d[5]); + }) + }, + radioButton: { + borderColor: palette.textColor, + backgroundColor: palette.alternateTextColor, + checkedColor: palette.primary1Color, + requiredColor: palette.primary1Color, + disabledColor: palette.disabledColor, + size: 24, + labelColor: palette.textColor, + labelDisabledColor: palette.disabledColor + }, + raisedButton: { + color: palette.alternateTextColor, + textColor: palette.textColor, + primaryColor: palette.primary1Color, + primaryTextColor: palette.alternateTextColor, + secondaryColor: palette.accent1Color, + secondaryTextColor: palette.alternateTextColor, + disabledColor: (0, _colorManipulator.darken)(palette.alternateTextColor, 0.1), + disabledTextColor: (0, _colorManipulator.fade)(palette.textColor, 0.3), + fontSize: _typography2.default.fontStyleButtonFontSize, + fontWeight: _typography2.default.fontWeightMedium + }, + refreshIndicator: { + strokeColor: palette.borderColor, + loadingStrokeColor: palette.primary1Color + }, + ripple: { + color: (0, _colorManipulator.fade)(palette.textColor, 0.87) + }, + slider: { + trackSize: 2, + trackColor: palette.primary3Color, + trackColorSelected: palette.accent3Color, + handleSize: 12, + handleSizeDisabled: 8, + handleSizeActive: 18, + handleColorZero: palette.primary3Color, + handleFillColor: palette.alternateTextColor, + selectionColor: palette.primary1Color, + rippleColor: palette.primary1Color + }, + snackbar: { + textColor: palette.alternateTextColor, + backgroundColor: palette.textColor, + actionColor: palette.accent1Color + }, + subheader: { + color: (0, _colorManipulator.fade)(palette.textColor, 0.54), + fontWeight: _typography2.default.fontWeightMedium + }, + stepper: { + backgroundColor: 'transparent', + hoverBackgroundColor: (0, _colorManipulator.fade)(_colors.black, 0.06), + iconColor: palette.primary1Color, + hoveredIconColor: _colors.grey700, + inactiveIconColor: _colors.grey500, + textColor: (0, _colorManipulator.fade)(_colors.black, 0.87), + disabledTextColor: (0, _colorManipulator.fade)(_colors.black, 0.26), + connectorLineColor: _colors.grey400 + }, + svgIcon: { + color: palette.textColor + }, + table: { + backgroundColor: palette.canvasColor + }, + tableFooter: { + borderColor: palette.borderColor, + textColor: palette.accent3Color + }, + tableHeader: { + borderColor: palette.borderColor + }, + tableHeaderColumn: { + textColor: palette.accent3Color, + height: 56, + spacing: 24 + }, + tableRow: { + hoverColor: palette.accent2Color, + stripeColor: (0, _colorManipulator.fade)((0, _colorManipulator.lighten)(palette.primary1Color, 0.5), 0.4), + selectedColor: palette.borderColor, + textColor: palette.textColor, + borderColor: palette.borderColor, + height: 48 + }, + tableRowColumn: { + height: 48, + spacing: 24 + }, + tabs: { + backgroundColor: palette.primary1Color, + textColor: (0, _colorManipulator.fade)(palette.alternateTextColor, 0.7), + selectedTextColor: palette.alternateTextColor + }, + textField: { + textColor: palette.textColor, + hintColor: palette.disabledColor, + floatingLabelColor: palette.disabledColor, + disabledTextColor: palette.disabledColor, + errorColor: _colors.red500, + focusColor: palette.primary1Color, + backgroundColor: 'transparent', + borderColor: palette.borderColor + }, + timePicker: { + color: palette.alternateTextColor, + textColor: palette.alternateTextColor, + accentColor: palette.primary1Color, + clockColor: palette.textColor, + clockCircleColor: palette.clockCircleColor, + headerColor: palette.pickerHeaderColor || palette.primary1Color, + selectColor: palette.primary2Color, + selectTextColor: palette.alternateTextColor + }, + toggle: { + thumbOnColor: palette.primary1Color, + thumbOffColor: palette.accent2Color, + thumbDisabledColor: palette.borderColor, + thumbRequiredColor: palette.primary1Color, + trackOnColor: (0, _colorManipulator.fade)(palette.primary1Color, 0.5), + trackOffColor: palette.primary3Color, + trackDisabledColor: palette.primary3Color, + labelColor: palette.textColor, + labelDisabledColor: palette.disabledColor, + trackRequiredColor: (0, _colorManipulator.fade)(palette.primary1Color, 0.5) + }, + toolbar: { + color: (0, _colorManipulator.fade)(palette.textColor, 0.54), + hoverColor: (0, _colorManipulator.fade)(palette.textColor, 0.87), + backgroundColor: (0, _colorManipulator.darken)(palette.accent2Color, 0.05), + height: 56, + titleFontSize: 20, + iconColor: (0, _colorManipulator.fade)(palette.textColor, 0.4), + separatorColor: (0, _colorManipulator.fade)(palette.textColor, 0.175), + menuHoverColor: (0, _colorManipulator.fade)(palette.textColor, 0.1) + }, + tooltip: { + color: _colors.white, + rippleBackgroundColor: _colors.grey700 + } + }, muiTheme, { + baseTheme: baseTheme, // To provide backward compatibility. + rawTheme: baseTheme }); + + var transformers = [_autoprefixer2.default, _rtl2.default, _callOnce2.default].map(function (t) { + return t(muiTheme); + }).filter(function (t) { + return t; + }); + + muiTheme.prepareStyles = _compose2.default.apply(undefined, (0, _toConsumableArray3.default)(transformers)); + + return muiTheme; +} + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +// returns a style object with a single concated prefixed value string + +exports.default = function (property, value) { + var replacer = arguments.length <= 2 || arguments[2] === undefined ? function (prefix, value) { + return prefix + value; + } : arguments[2]; + return _defineProperty({}, property, ['-webkit-', '-moz-', ''].map(function (prefix) { + return replacer(prefix, value); + })); +}; + +module.exports = exports['default']; + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(303); + + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _promise = __webpack_require__(189); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new _promise2.default(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return _promise2.default.resolve(value).then(function (value) { + step("next", value); + }, function (err) { + step("throw", err); + }); + } + } + + return step("next"); + }); + }; +}; + +/***/ }), +/* 123 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil + , floor = Math.floor; +module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + +/***/ }), +/* 124 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; +}; + +/***/ }), +/* 125 */ +/***/ (function(module, exports) { + +module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; +}; + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(63) + , document = __webpack_require__(22).document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); +module.exports = function(it){ + return is ? document.createElement(it) : {}; +}; + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(63); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function(it, S){ + if(!isObject(it))return it; + var fn, val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + throw TypeError("Can't convert object to primitive value"); +}; + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(34) + , dPs = __webpack_require__(308) + , enumBugKeys = __webpack_require__(132) + , IE_PROTO = __webpack_require__(130)('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(126)('iframe') + , i = enumBugKeys.length + , lt = '<' + , gt = '>' + , iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(196).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties){ + var result; + if(O !== null){ + Empty[PROTOTYPE] = anObject(O); + result = new Empty; + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(123) + , min = Math.min; +module.exports = function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(131)('keys') + , uid = __webpack_require__(90); +module.exports = function(key){ + return shared[key] || (shared[key] = uid(key)); +}; + +/***/ }), +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(22) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); +module.exports = function(key){ + return store[key] || (store[key] = {}); +}; + +/***/ }), +/* 132 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(74) + , TAG = __webpack_require__(20)('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function(it, key){ + try { + return it[key]; + } catch(e){ /* empty */ } +}; + +module.exports = function(it){ + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(133) + , ITERATOR = __webpack_require__(20)('iterator') + , Iterators = __webpack_require__(65); +module.exports = __webpack_require__(16).getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + +/***/ }), +/* 135 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(20); + +/***/ }), +/* 136 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(22) + , core = __webpack_require__(16) + , LIBRARY = __webpack_require__(89) + , wksExt = __webpack_require__(135) + , defineProperty = __webpack_require__(33).f; +module.exports = function(name){ + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); +}; + +/***/ }), +/* 137 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(342), __esModule: true }; + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Forked from fbjs/warning: + * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js + * + * Only change is we use console.warn instead of console.error, + * and do nothing when 'console' is not supported. + * This really simplifies the code. + * --- + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var lowPriorityWarning = function () {}; + +if (process.env.NODE_ENV !== 'production') { + var printWarning = function (format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.warn(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + lowPriorityWarning = function (condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; +} + +module.exports = lowPriorityWarning; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + once: function once(el, type, callback) { + var typeArray = type ? type.split(' ') : []; + var recursiveFunction = function recursiveFunction(event) { + event.target.removeEventListener(event.type, recursiveFunction); + return callback(event); + }; + + for (var i = typeArray.length - 1; i >= 0; i--) { + this.on(el, typeArray[i], recursiveFunction); + } + }, + on: function on(el, type, callback) { + if (el.addEventListener) { + el.addEventListener(type, callback); + } else { + // IE8+ Support + el.attachEvent('on' + type, function () { + callback.call(el); + }); + } + }, + off: function off(el, type, callback) { + if (el.removeEventListener) { + el.removeEventListener(type, callback); + } else { + // IE8+ Support + el.detachEvent('on' + type, callback); + } + }, + isKeyboard: function isKeyboard(event) { + return ['keydown', 'keypress', 'keyup'].indexOf(event.type) !== -1; + } +}; + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(56); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _autoPrefix = __webpack_require__(104); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _ScaleIn = __webpack_require__(462); + +var _ScaleIn2 = _interopRequireDefault(_ScaleIn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var pulsateDuration = 750; + +var FocusRipple = function (_Component) { + (0, _inherits3.default)(FocusRipple, _Component); + + function FocusRipple() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, FocusRipple); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FocusRipple.__proto__ || (0, _getPrototypeOf2.default)(FocusRipple)).call.apply(_ref, [this].concat(args))), _this), _this.pulsate = function () { + var innerCircle = _reactDom2.default.findDOMNode(_this.refs.innerCircle); + if (!innerCircle) return; + + var startScale = 'scale(1)'; + var endScale = 'scale(0.85)'; + var currentScale = innerCircle.style.transform || startScale; + var nextScale = currentScale === startScale ? endScale : startScale; + + _autoPrefix2.default.set(innerCircle.style, 'transform', nextScale); + _this.timeout = setTimeout(_this.pulsate, pulsateDuration); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(FocusRipple, [{ + key: 'componentDidMount', + value: function componentDidMount() { + if (this.props.show) { + this.setRippleSize(); + this.pulsate(); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + if (this.props.show) { + this.setRippleSize(); + this.pulsate(); + } else { + if (this.timeout) clearTimeout(this.timeout); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.timeout); + } + }, { + key: 'getRippleElement', + value: function getRippleElement(props) { + var color = props.color, + innerStyle = props.innerStyle, + opacity = props.opacity; + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + ripple = _context$muiTheme.ripple; + + + var innerStyles = (0, _simpleAssign2.default)({ + position: 'absolute', + height: '100%', + width: '100%', + borderRadius: '50%', + opacity: opacity ? opacity : 0.16, + backgroundColor: color || ripple.color, + transition: _transitions2.default.easeOut(pulsateDuration + 'ms', 'transform', null, _transitions2.default.easeInOutFunction) + }, innerStyle); + + return _react2.default.createElement('div', { ref: 'innerCircle', style: prepareStyles((0, _simpleAssign2.default)({}, innerStyles)) }); + } + }, { + key: 'setRippleSize', + value: function setRippleSize() { + var el = _reactDom2.default.findDOMNode(this.refs.innerCircle); + var height = el.offsetHeight; + var width = el.offsetWidth; + var size = Math.max(height, width); + + var oldTop = 0; + // For browsers that don't support endsWith() + if (el.style.top.indexOf('px', el.style.top.length - 2) !== -1) { + oldTop = parseInt(el.style.top); + } + el.style.height = size + 'px'; + el.style.top = height / 2 - size / 2 + oldTop + 'px'; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + show = _props.show, + style = _props.style; + + + var mergedRootStyles = (0, _simpleAssign2.default)({ + height: '100%', + width: '100%', + position: 'absolute', + top: 0, + left: 0 + }, style); + + var ripple = show ? this.getRippleElement(this.props) : null; + + return _react2.default.createElement( + _ScaleIn2.default, + { + maxScale: 0.85, + style: mergedRootStyles + }, + ripple + ); + } + }]); + return FocusRipple; +}(_react.Component); + +FocusRipple.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? FocusRipple.propTypes = { + color: _react.PropTypes.string, + innerStyle: _react.PropTypes.object, + opacity: _react.PropTypes.number, + show: _react.PropTypes.bool, + style: _react.PropTypes.object +} : void 0; +exports.default = FocusRipple; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var ReactErrorUtils = __webpack_require__(143); + +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +/** + * Injected dependencies: + */ + +/** + * - `ComponentTree`: [required] Module that can convert between React instances + * and actual node references. + */ +var ComponentTree; +var TreeTraversal; +var injection = { + injectComponentTree: function (Injected) { + ComponentTree = Injected; + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0; + } + }, + injectTreeTraversal: function (Injected) { + TreeTraversal = Injected; + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0; + } + } +}; + +function isEndish(topLevelType) { + return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel'; +} + +function isMoveish(topLevelType) { + return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove'; +} +function isStartish(topLevelType) { + return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart'; +} + +var validateEventDispatches; +if (process.env.NODE_ENV !== 'production') { + validateEventDispatches = function (event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + + var listenersIsArr = Array.isArray(dispatchListeners); + var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0; + + var instancesIsArr = Array.isArray(dispatchInstances); + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0; + + process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0; + }; +} + +/** + * Dispatch the event to the listener. + * @param {SyntheticEvent} event SyntheticEvent to handle + * @param {boolean} simulated If the event is simulated (changes exn behavior) + * @param {function} listener Application-level callback + * @param {*} inst Internal component instance + */ +function executeDispatch(event, simulated, listener, inst) { + var type = event.type || 'unknown-event'; + event.currentTarget = EventPluginUtils.getNodeFromInstance(inst); + if (simulated) { + ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event); + } else { + ReactErrorUtils.invokeGuardedCallback(type, listener, event); + } + event.currentTarget = null; +} + +/** + * Standard/simple iteration through an event's collected dispatches. + */ +function executeDispatchesInOrder(event, simulated) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + if (process.env.NODE_ENV !== 'production') { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and Instances are two parallel arrays that are always in sync. + executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); + } + } else if (dispatchListeners) { + executeDispatch(event, simulated, dispatchListeners, dispatchInstances); + } + event._dispatchListeners = null; + event._dispatchInstances = null; +} + +/** + * Standard/simple iteration through an event's collected dispatches, but stops + * at the first dispatch execution returning true, and returns that id. + * + * @return {?string} id of the first dispatch execution who's listener returns + * true, or null if no listener returned true. + */ +function executeDispatchesInOrderStopAtTrueImpl(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchInstances = event._dispatchInstances; + if (process.env.NODE_ENV !== 'production') { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and Instances are two parallel arrays that are always in sync. + if (dispatchListeners[i](event, dispatchInstances[i])) { + return dispatchInstances[i]; + } + } + } else if (dispatchListeners) { + if (dispatchListeners(event, dispatchInstances)) { + return dispatchInstances; + } + } + return null; +} + +/** + * @see executeDispatchesInOrderStopAtTrueImpl + */ +function executeDispatchesInOrderStopAtTrue(event) { + var ret = executeDispatchesInOrderStopAtTrueImpl(event); + event._dispatchInstances = null; + event._dispatchListeners = null; + return ret; +} + +/** + * Execution of a "direct" dispatch - there must be at most one dispatch + * accumulated on the event or it is considered an error. It doesn't really make + * sense for an event with multiple dispatches (bubbled) to keep track of the + * return values at each dispatch execution, but it does tend to make sense when + * dealing with "direct" dispatches. + * + * @return {*} The return value of executing the single dispatch. + */ +function executeDirectDispatch(event) { + if (process.env.NODE_ENV !== 'production') { + validateEventDispatches(event); + } + var dispatchListener = event._dispatchListeners; + var dispatchInstance = event._dispatchInstances; + !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0; + event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null; + var res = dispatchListener ? dispatchListener(event) : null; + event.currentTarget = null; + event._dispatchListeners = null; + event._dispatchInstances = null; + return res; +} + +/** + * @param {SyntheticEvent} event + * @return {boolean} True iff number of dispatches accumulated is greater than 0. + */ +function hasDispatches(event) { + return !!event._dispatchListeners; +} + +/** + * General utilities that are useful in creating custom Event Plugins. + */ +var EventPluginUtils = { + isEndish: isEndish, + isMoveish: isMoveish, + isStartish: isStartish, + + executeDirectDispatch: executeDirectDispatch, + executeDispatchesInOrder: executeDispatchesInOrder, + executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, + hasDispatches: hasDispatches, + + getInstanceFromNode: function (node) { + return ComponentTree.getInstanceFromNode(node); + }, + getNodeFromInstance: function (node) { + return ComponentTree.getNodeFromInstance(node); + }, + isAncestor: function (a, b) { + return TreeTraversal.isAncestor(a, b); + }, + getLowestCommonAncestor: function (a, b) { + return TreeTraversal.getLowestCommonAncestor(a, b); + }, + getParentInstance: function (inst) { + return TreeTraversal.getParentInstance(inst); + }, + traverseTwoPhase: function (target, fn, arg) { + return TreeTraversal.traverseTwoPhase(target, fn, arg); + }, + traverseEnterLeave: function (from, to, fn, argFrom, argTo) { + return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo); + }, + + injection: injection +}; + +module.exports = EventPluginUtils; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 143 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var caughtError = null; + +/** + * Call a function while guarding against errors that happens within it. + * + * @param {String} name of the guard to use for logging or debugging + * @param {Function} func The function to invoke + * @param {*} a First argument + * @param {*} b Second argument + */ +function invokeGuardedCallback(name, func, a) { + try { + func(a); + } catch (x) { + if (caughtError === null) { + caughtError = x; + } + } +} + +var ReactErrorUtils = { + invokeGuardedCallback: invokeGuardedCallback, + + /** + * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event + * handler are sure to be rethrown by rethrowCaughtError. + */ + invokeGuardedCallbackWithCatch: invokeGuardedCallback, + + /** + * During execution of guarded functions we will capture the first error which + * we will rethrow to be handled by the top level error handler. + */ + rethrowCaughtError: function () { + if (caughtError) { + var error = caughtError; + caughtError = null; + throw error; + } + } +}; + +if (process.env.NODE_ENV !== 'production') { + /** + * To help development we can get better devtools integration by simulating a + * real browser event. + */ + if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') { + var fakeNode = document.createElement('react'); + ReactErrorUtils.invokeGuardedCallback = function (name, func, a) { + var boundFunc = func.bind(null, a); + var evtType = 'react-' + name; + fakeNode.addEventListener(evtType, boundFunc, false); + var evt = document.createEvent('Event'); + // $FlowFixMe https://github.com/facebook/flow/issues/2336 + evt.initEvent(evtType, false, false); + fakeNode.dispatchEvent(evt); + fakeNode.removeEventListener(evtType, boundFunc, false); + }; + } +} + +module.exports = ReactErrorUtils; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Gets the target node from a native browser event by accounting for + * inconsistencies in browser DOM APIs. + * + * @param {object} nativeEvent Native browser event. + * @return {DOMEventTarget} Target node. + */ + +function getEventTarget(nativeEvent) { + var target = nativeEvent.target || nativeEvent.srcElement || window; + + // Normalize SVG <use> element events #4963 + if (target.correspondingUseElement) { + target = target.correspondingUseElement; + } + + // Safari may fire events on text nodes (Node.TEXT_NODE is 3). + // @see http://www.quirksmode.org/js/events_properties.html + return target.nodeType === 3 ? target.parentNode : target; +} + +module.exports = getEventTarget; + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(18); + +var useHasFeature; +if (ExecutionEnvironment.canUseDOM) { + useHasFeature = document.implementation && document.implementation.hasFeature && + // always returns true in newer browsers as per the standard. + // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature + document.implementation.hasFeature('', '') !== true; +} + +/** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @param {?boolean} capture Check if the capture phase is supported. + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ +function isEventSupported(eventNameSuffix, capture) { + if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { + return false; + } + + var eventName = 'on' + eventNameSuffix; + var isSupported = eventName in document; + + if (!isSupported) { + var element = document.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { + // This is the only way to test support for the `wheel` event in IE9+. + isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); + } + + return isSupported; +} + +module.exports = isEventSupported; + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers + */ + +var modifierKeyToProp = { + 'Alt': 'altKey', + 'Control': 'ctrlKey', + 'Meta': 'metaKey', + 'Shift': 'shiftKey' +}; + +// IE8 does not implement getModifierState so we simply map it to the only +// modifier keys exposed by the event itself, does not support Lock-keys. +// Currently, all major browsers except Chrome seems to support Lock-keys. +function modifierStateGetter(keyArg) { + var syntheticEvent = this; + var nativeEvent = syntheticEvent.nativeEvent; + if (nativeEvent.getModifierState) { + return nativeEvent.getModifierState(keyArg); + } + var keyProp = modifierKeyToProp[keyArg]; + return keyProp ? !!nativeEvent[keyProp] : false; +} + +function getEventModifierState(nativeEvent) { + return modifierStateGetter; +} + +module.exports = getEventModifierState; + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMLazyTree = __webpack_require__(68); +var Danger = __webpack_require__(396); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactInstrumentation = __webpack_require__(23); + +var createMicrosoftUnsafeLocalFunction = __webpack_require__(149); +var setInnerHTML = __webpack_require__(101); +var setTextContent = __webpack_require__(226); + +function getNodeAfter(parentNode, node) { + // Special case for text components, which return [open, close] comments + // from getHostNode. + if (Array.isArray(node)) { + node = node[1]; + } + return node ? node.nextSibling : parentNode.firstChild; +} + +/** + * Inserts `childNode` as a child of `parentNode` at the `index`. + * + * @param {DOMElement} parentNode Parent node in which to insert. + * @param {DOMElement} childNode Child node to insert. + * @param {number} index Index at which to insert the child. + * @internal + */ +var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) { + // We rely exclusively on `insertBefore(node, null)` instead of also using + // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so + // we are careful to use `null`.) + parentNode.insertBefore(childNode, referenceNode); +}); + +function insertLazyTreeChildAt(parentNode, childTree, referenceNode) { + DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode); +} + +function moveChild(parentNode, childNode, referenceNode) { + if (Array.isArray(childNode)) { + moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode); + } else { + insertChildAt(parentNode, childNode, referenceNode); + } +} + +function removeChild(parentNode, childNode) { + if (Array.isArray(childNode)) { + var closingComment = childNode[1]; + childNode = childNode[0]; + removeDelimitedText(parentNode, childNode, closingComment); + parentNode.removeChild(closingComment); + } + parentNode.removeChild(childNode); +} + +function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) { + var node = openingComment; + while (true) { + var nextNode = node.nextSibling; + insertChildAt(parentNode, node, referenceNode); + if (node === closingComment) { + break; + } + node = nextNode; + } +} + +function removeDelimitedText(parentNode, startNode, closingComment) { + while (true) { + var node = startNode.nextSibling; + if (node === closingComment) { + // The closing comment is removed by ReactMultiChild. + break; + } else { + parentNode.removeChild(node); + } + } +} + +function replaceDelimitedText(openingComment, closingComment, stringText) { + var parentNode = openingComment.parentNode; + var nodeAfterComment = openingComment.nextSibling; + if (nodeAfterComment === closingComment) { + // There are no text nodes between the opening and closing comments; insert + // a new one if stringText isn't empty. + if (stringText) { + insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment); + } + } else { + if (stringText) { + // Set the text content of the first node after the opening comment, and + // remove all following nodes up until the closing comment. + setTextContent(nodeAfterComment, stringText); + removeDelimitedText(parentNode, nodeAfterComment, closingComment); + } else { + removeDelimitedText(parentNode, openingComment, closingComment); + } + } + + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, + type: 'replace text', + payload: stringText + }); + } +} + +var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup; +if (process.env.NODE_ENV !== 'production') { + dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) { + Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup); + if (prevInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: prevInstance._debugID, + type: 'replace with', + payload: markup.toString() + }); + } else { + var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node); + if (nextInstance._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: nextInstance._debugID, + type: 'mount', + payload: markup.toString() + }); + } + } + }; +} + +/** + * Operations for updating with DOM children. + */ +var DOMChildrenOperations = { + + dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup, + + replaceDelimitedText: replaceDelimitedText, + + /** + * Updates a component's children by processing a series of updates. The + * update configurations are each expected to have a `parentNode` property. + * + * @param {array<object>} updates List of update configurations. + * @internal + */ + processUpdates: function (parentNode, updates) { + if (process.env.NODE_ENV !== 'production') { + var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID; + } + + for (var k = 0; k < updates.length; k++) { + var update = updates[k]; + switch (update.type) { + case 'INSERT_MARKUP': + insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode)); + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'insert child', + payload: { toIndex: update.toIndex, content: update.content.toString() } + }); + } + break; + case 'MOVE_EXISTING': + moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode)); + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'move child', + payload: { fromIndex: update.fromIndex, toIndex: update.toIndex } + }); + } + break; + case 'SET_MARKUP': + setInnerHTML(parentNode, update.content); + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'replace children', + payload: update.content.toString() + }); + } + break; + case 'TEXT_CONTENT': + setTextContent(parentNode, update.content); + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'replace text', + payload: update.content.toString() + }); + } + break; + case 'REMOVE_NODE': + removeChild(parentNode, update.fromNode); + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'remove child', + payload: { fromIndex: update.fromIndex } + }); + } + break; + } + } + } + +}; + +module.exports = DOMChildrenOperations; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMNamespaces = { + html: 'http://www.w3.org/1999/xhtml', + mathml: 'http://www.w3.org/1998/Math/MathML', + svg: 'http://www.w3.org/2000/svg' +}; + +module.exports = DOMNamespaces; + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/* globals MSApp */ + + + +/** + * Create a function which has 'unsafe' privileges (required by windows8 apps) + */ + +var createMicrosoftUnsafeLocalFunction = function (func) { + if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { + return function (arg0, arg1, arg2, arg3) { + MSApp.execUnsafeLocalFunction(function () { + return func(arg0, arg1, arg2, arg3); + }); + }; + } else { + return func; + } +}; + +module.exports = createMicrosoftUnsafeLocalFunction; + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var React = __webpack_require__(52); +var ReactPropTypesSecret = __webpack_require__(230); + +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +var hasReadOnlyValue = { + 'button': true, + 'checkbox': true, + 'image': true, + 'hidden': true, + 'radio': true, + 'reset': true, + 'submit': true +}; + +function _assertSingleLink(inputProps) { + !(inputProps.checkedLink == null || inputProps.valueLink == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0; +} +function _assertValueLink(inputProps) { + _assertSingleLink(inputProps); + !(inputProps.value == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\'t want to use valueLink.') : _prodInvariant('88') : void 0; +} + +function _assertCheckedLink(inputProps) { + _assertSingleLink(inputProps); + !(inputProps.checked == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\'t want to use checkedLink') : _prodInvariant('89') : void 0; +} + +var propTypes = { + value: function (props, propName, componentName) { + if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) { + return null; + } + return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + }, + checked: function (props, propName, componentName) { + if (!props[propName] || props.onChange || props.readOnly || props.disabled) { + return null; + } + return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); + }, + onChange: React.PropTypes.func +}; + +var loggedTypeFailures = {}; +function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +/** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ +var LinkedValueUtils = { + checkPropTypes: function (tagName, props, owner) { + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) { + var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret); + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var addendum = getDeclarationErrorAddendum(owner); + process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0; + } + } + }, + + /** + * @param {object} inputProps Props for form component + * @return {*} current value of the input either from value prop or link. + */ + getValue: function (inputProps) { + if (inputProps.valueLink) { + _assertValueLink(inputProps); + return inputProps.valueLink.value; + } + return inputProps.value; + }, + + /** + * @param {object} inputProps Props for form component + * @return {*} current checked status of the input either from checked prop + * or link. + */ + getChecked: function (inputProps) { + if (inputProps.checkedLink) { + _assertCheckedLink(inputProps); + return inputProps.checkedLink.value; + } + return inputProps.checked; + }, + + /** + * @param {object} inputProps Props for form component + * @param {SyntheticEvent} event change event to handle + */ + executeOnChange: function (inputProps, event) { + if (inputProps.valueLink) { + _assertValueLink(inputProps); + return inputProps.valueLink.requestChange(event.target.value); + } else if (inputProps.checkedLink) { + _assertCheckedLink(inputProps); + return inputProps.checkedLink.requestChange(event.target.checked); + } else if (inputProps.onChange) { + return inputProps.onChange.call(undefined, event); + } + } +}; + +module.exports = LinkedValueUtils; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(10); + +var injected = false; + +var ReactComponentEnvironment = { + + /** + * Optionally injectable hook for swapping out mount images in the middle of + * the tree. + */ + replaceNodeWithMarkup: null, + + /** + * Optionally injectable hook for processing a queue of child updates. Will + * later move into MultiChildComponents. + */ + processChildrenUpdates: null, + + injection: { + injectEnvironment: function (environment) { + !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0; + ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup; + ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates; + injected = true; + } + } + +}; + +module.exports = ReactComponentEnvironment; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Given a `prevElement` and `nextElement`, determines if the existing + * instance should be updated as opposed to being destroyed or replaced by a new + * instance. Both arguments are elements. This ensures that this logic can + * operate on stateless trees without any backing instance. + * + * @param {?object} prevElement + * @param {?object} nextElement + * @return {boolean} True if the existing instance should be updated. + * @protected + */ + +function shouldUpdateReactComponent(prevElement, nextElement) { + var prevEmpty = prevElement === null || prevElement === false; + var nextEmpty = nextElement === null || nextElement === false; + if (prevEmpty || nextEmpty) { + return prevEmpty === nextEmpty; + } + + var prevType = typeof prevElement; + var nextType = typeof nextElement; + if (prevType === 'string' || prevType === 'number') { + return nextType === 'string' || nextType === 'number'; + } else { + return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key; + } +} + +module.exports = shouldUpdateReactComponent; + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + +function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2' + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; +} + +/** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ +function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':' + }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); + + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); +} + +var KeyEscapeUtils = { + escape: escape, + unescape: unescape +}; + +module.exports = KeyEscapeUtils; + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var ReactCurrentOwner = __webpack_require__(27); +var ReactInstanceMap = __webpack_require__(80); +var ReactInstrumentation = __webpack_require__(23); +var ReactUpdates = __webpack_require__(29); + +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +function enqueueUpdate(internalInstance) { + ReactUpdates.enqueueUpdate(internalInstance); +} + +function formatUnexpectedArgument(arg) { + var type = typeof arg; + if (type !== 'object') { + return type; + } + var displayName = arg.constructor && arg.constructor.name || type; + var keys = Object.keys(arg); + if (keys.length > 0 && keys.length < 20) { + return displayName + ' (keys: ' + keys.join(', ') + ')'; + } + return displayName; +} + +function getInternalInstanceReadyForUpdate(publicInstance, callerName) { + var internalInstance = ReactInstanceMap.get(publicInstance); + if (!internalInstance) { + if (process.env.NODE_ENV !== 'production') { + var ctor = publicInstance.constructor; + // Only warn when we have a callerName. Otherwise we should be silent. + // We're probably calling from enqueueCallback. We don't want to warn + // there because we already warned for the corresponding lifecycle method. + process.env.NODE_ENV !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0; + } + return null; + } + + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0; + } + + return internalInstance; +} + +/** + * ReactUpdateQueue allows for state updates to be scheduled into a later + * reconciliation step. + */ +var ReactUpdateQueue = { + + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + if (process.env.NODE_ENV !== 'production') { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0; + owner._warnedAboutRefsInRender = true; + } + } + var internalInstance = ReactInstanceMap.get(publicInstance); + if (internalInstance) { + // During componentWillMount and render this will still be null but after + // that will always render to something. At least for now. So we can use + // this hack. + return !!internalInstance._renderedComponent; + } else { + return false; + } + }, + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @param {string} callerName Name of the calling function in the public API. + * @internal + */ + enqueueCallback: function (publicInstance, callback, callerName) { + ReactUpdateQueue.validateCallback(callback, callerName); + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); + + // Previously we would throw an error if we didn't have an internal + // instance. Since we want to make it a no-op instead, we mirror the same + // behavior we have in other enqueue* methods. + // We also need to ignore callbacks in componentWillMount. See + // enqueueUpdates. + if (!internalInstance) { + return null; + } + + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + // TODO: The callback here is ignored when setState is called from + // componentWillMount. Either fix it or disallow doing so completely in + // favor of getInitialState. Alternatively, we can disallow + // componentWillMount during server-side rendering. + enqueueUpdate(internalInstance); + }, + + enqueueCallbackInternal: function (internalInstance, callback) { + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + enqueueUpdate(internalInstance); + }, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function (publicInstance) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate'); + + if (!internalInstance) { + return; + } + + internalInstance._pendingForceUpdate = true; + + enqueueUpdate(internalInstance); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); + + if (!internalInstance) { + return; + } + + internalInstance._pendingStateQueue = [completeState]; + internalInstance._pendingReplaceState = true; + + enqueueUpdate(internalInstance); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function (publicInstance, partialState) { + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onSetState(); + process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0; + } + + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState'); + + if (!internalInstance) { + return; + } + + var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []); + queue.push(partialState); + + enqueueUpdate(internalInstance); + }, + + enqueueElementInternal: function (internalInstance, nextElement, nextContext) { + internalInstance._pendingElement = nextElement; + // TODO: introduce _pendingContext instead of setting it directly. + internalInstance._context = nextContext; + enqueueUpdate(internalInstance); + }, + + validateCallback: function (callback, callerName) { + !(!callback || typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0; + } + +}; + +module.exports = ReactUpdateQueue; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var emptyFunction = __webpack_require__(21); +var warning = __webpack_require__(11); + +var validateDOMNesting = emptyFunction; + +if (process.env.NODE_ENV !== 'production') { + // This validation code was written based on the HTML5 parsing spec: + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + // + // Note: this does not catch all invalid nesting, nor does it try to (as it's + // not clear what practical benefit doing so provides); instead, we warn only + // for cases where the parser will give a parse tree differing from what React + // intended. For example, <b><div></div></b> is invalid but we don't warn + // because it still parses correctly; we do warn for other cases like nested + // <p> tags where the beginning of the second element implicitly closes the + // first, causing a confusing mess. + + // https://html.spec.whatwg.org/multipage/syntax.html#special + var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; + + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope + var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', + + // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point + // TODO: Distinguish by namespace here -- for <title>, including it here + // errs on the side of fewer warnings + 'foreignObject', 'desc', 'title']; + + // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope + var buttonScopeTags = inScopeTags.concat(['button']); + + // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags + var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; + + var emptyAncestorInfo = { + current: null, + + formTag: null, + aTagInScope: null, + buttonTagInScope: null, + nobrTagInScope: null, + pTagInButtonScope: null, + + listItemTagAutoclosing: null, + dlItemTagAutoclosing: null + }; + + var updatedAncestorInfo = function (oldInfo, tag, instance) { + var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); + var info = { tag: tag, instance: instance }; + + if (inScopeTags.indexOf(tag) !== -1) { + ancestorInfo.aTagInScope = null; + ancestorInfo.buttonTagInScope = null; + ancestorInfo.nobrTagInScope = null; + } + if (buttonScopeTags.indexOf(tag) !== -1) { + ancestorInfo.pTagInButtonScope = null; + } + + // See rules for 'li', 'dd', 'dt' start tags in + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { + ancestorInfo.listItemTagAutoclosing = null; + ancestorInfo.dlItemTagAutoclosing = null; + } + + ancestorInfo.current = info; + + if (tag === 'form') { + ancestorInfo.formTag = info; + } + if (tag === 'a') { + ancestorInfo.aTagInScope = info; + } + if (tag === 'button') { + ancestorInfo.buttonTagInScope = info; + } + if (tag === 'nobr') { + ancestorInfo.nobrTagInScope = info; + } + if (tag === 'p') { + ancestorInfo.pTagInButtonScope = info; + } + if (tag === 'li') { + ancestorInfo.listItemTagAutoclosing = info; + } + if (tag === 'dd' || tag === 'dt') { + ancestorInfo.dlItemTagAutoclosing = info; + } + + return ancestorInfo; + }; + + /** + * Returns whether + */ + var isTagValidWithParent = function (tag, parentTag) { + // First, let's check if we're in an unusual parsing mode... + switch (parentTag) { + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect + case 'select': + return tag === 'option' || tag === 'optgroup' || tag === '#text'; + case 'optgroup': + return tag === 'option' || tag === '#text'; + // Strictly speaking, seeing an <option> doesn't mean we're in a <select> + // but + case 'option': + return tag === '#text'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption + // No special behavior since these rules fall back to "in body" mode for + // all except special table nodes which cause bad parsing behavior anyway. + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr + case 'tr': + return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody + case 'tbody': + case 'thead': + case 'tfoot': + return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup + case 'colgroup': + return tag === 'col' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable + case 'table': + return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead + case 'head': + return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template'; + + // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element + case 'html': + return tag === 'head' || tag === 'body'; + case '#document': + return tag === 'html'; + } + + // Probably in the "in body" parsing mode, so we outlaw only tag combos + // where the parsing rules cause implicit opens or closes to be added. + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody + switch (tag) { + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6'; + + case 'rp': + case 'rt': + return impliedEndTags.indexOf(parentTag) === -1; + + case 'body': + case 'caption': + case 'col': + case 'colgroup': + case 'frame': + case 'head': + case 'html': + case 'tbody': + case 'td': + case 'tfoot': + case 'th': + case 'thead': + case 'tr': + // These tags are only valid with a few parents that have special child + // parsing rules -- if we're down here, then none of those matched and + // so we allow it only if we don't know what the parent is, as all other + // cases are invalid. + return parentTag == null; + } + + return true; + }; + + /** + * Returns whether + */ + var findInvalidAncestorForTag = function (tag, ancestorInfo) { + switch (tag) { + case 'address': + case 'article': + case 'aside': + case 'blockquote': + case 'center': + case 'details': + case 'dialog': + case 'dir': + case 'div': + case 'dl': + case 'fieldset': + case 'figcaption': + case 'figure': + case 'footer': + case 'header': + case 'hgroup': + case 'main': + case 'menu': + case 'nav': + case 'ol': + case 'p': + case 'section': + case 'summary': + case 'ul': + + case 'pre': + case 'listing': + + case 'table': + + case 'hr': + + case 'xmp': + + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + return ancestorInfo.pTagInButtonScope; + + case 'form': + return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; + + case 'li': + return ancestorInfo.listItemTagAutoclosing; + + case 'dd': + case 'dt': + return ancestorInfo.dlItemTagAutoclosing; + + case 'button': + return ancestorInfo.buttonTagInScope; + + case 'a': + // Spec says something about storing a list of markers, but it sounds + // equivalent to this check. + return ancestorInfo.aTagInScope; + + case 'nobr': + return ancestorInfo.nobrTagInScope; + } + + return null; + }; + + /** + * Given a ReactCompositeComponent instance, return a list of its recursive + * owners, starting at the root and ending with the instance itself. + */ + var findOwnerStack = function (instance) { + if (!instance) { + return []; + } + + var stack = []; + do { + stack.push(instance); + } while (instance = instance._currentElement._owner); + stack.reverse(); + return stack; + }; + + var didWarn = {}; + + validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + + if (childText != null) { + process.env.NODE_ENV !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0; + childTag = '#text'; + } + + var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; + var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); + var problematic = invalidParent || invalidAncestor; + + if (problematic) { + var ancestorTag = problematic.tag; + var ancestorInstance = problematic.instance; + + var childOwner = childInstance && childInstance._currentElement._owner; + var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner; + + var childOwners = findOwnerStack(childOwner); + var ancestorOwners = findOwnerStack(ancestorOwner); + + var minStackLen = Math.min(childOwners.length, ancestorOwners.length); + var i; + + var deepestCommon = -1; + for (i = 0; i < minStackLen; i++) { + if (childOwners[i] === ancestorOwners[i]) { + deepestCommon = i; + } else { + break; + } + } + + var UNKNOWN = '(unknown)'; + var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) { + return inst.getName() || UNKNOWN; + }); + var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) { + return inst.getName() || UNKNOWN; + }); + var ownerInfo = [].concat( + // If the parent and child instances have a common owner ancestor, start + // with that -- otherwise we just start with the parent's owners. + deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag, + // If we're warning about an invalid (non-parent) ancestry, add '...' + invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > '); + + var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo; + if (didWarn[warnKey]) { + return; + } + didWarn[warnKey] = true; + + var tagDisplayName = childTag; + var whitespaceInfo = ''; + if (childTag === '#text') { + if (/\S/.test(childText)) { + tagDisplayName = 'Text nodes'; + } else { + tagDisplayName = 'Whitespace text nodes'; + whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.'; + } + } else { + tagDisplayName = '<' + childTag + '>'; + } + + if (invalidParent) { + var info = ''; + if (ancestorTag === 'table' && childTag === 'tr') { + info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.'; + } + process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0; + } else { + process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0; + } + } + }; + + validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo; + + // For testing + validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) { + ancestorInfo = ancestorInfo || emptyAncestorInfo; + var parentInfo = ancestorInfo.current; + var parentTag = parentInfo && parentInfo.tag; + return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo); + }; +} + +module.exports = validateDOMNesting; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * `charCode` represents the actual "character code" and is safe to use with + * `String.fromCharCode`. As such, only keys that correspond to printable + * characters produce a valid `charCode`, the only exception to this is Enter. + * The Tab-key is considered non-printable and does not have a `charCode`, + * presumably because it does not produce a tab-character in browsers. + * + * @param {object} nativeEvent Native browser event. + * @return {number} Normalized `charCode` property. + */ + +function getEventCharCode(nativeEvent) { + var charCode; + var keyCode = nativeEvent.keyCode; + + if ('charCode' in nativeEvent) { + charCode = nativeEvent.charCode; + + // FF does not set `charCode` for the Enter-key, check against `keyCode`. + if (charCode === 0 && keyCode === 13) { + charCode = 13; + } + } else { + // IE8 does not implement `charCode`, but `keyCode` has the correct value. + charCode = keyCode; + } + + // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. + // Must not discard the (non-)printable Enter-key. + if (charCode >= 32 || charCode === 13) { + return charCode; + } + + return 0; +} + +module.exports = getEventCharCode; + +/***/ }), +/* 157 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(247); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(477); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(478); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(479); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(253); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(252); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["b"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_4__compose__["a"]; }); + + + + + + + +/* +* This is a dummy function to check if the function name has been altered by minification. +* If the function has been minified and NODE_ENV !== 'production', warn the user. +*/ +function isCrushed() {} + +if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') { + __WEBPACK_IMPORTED_MODULE_5__utils_warning__["a" /* default */]('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.'); +} + + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(0))) + +/***/ }), +/* 158 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(69); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(249); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(57); + + + + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */](value) || __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) != objectTag) { + return false; + } + var proto = __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */](value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +/* harmony default export */ __webpack_exports__["a"] = (isPlainObject); + + +/***/ }), +/* 159 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionTypes", function() { return actionTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Field", function() { return Field; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fields", function() { return Fields; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FieldArray", function() { return FieldArray; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return Form; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormSection", function() { return FormSection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formValueSelector", function() { return formValueSelector; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormValues", function() { return getFormValues; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormInitialValues", function() { return getFormInitialValues; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncErrors", function() { return getFormSyncErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormAsyncErrors", function() { return getFormAsyncErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSubmitErrors", function() { return getFormSubmitErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDirty", function() { return isDirty; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInvalid", function() { return isInvalid; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPristine", function() { return isPristine; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValid", function() { return isValid; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSubmitting", function() { return isSubmitting; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitSucceeded", function() { return hasSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitFailed", function() { return hasSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return propTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduxForm", function() { return reduxForm; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubmissionError", function() { return SubmissionError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return values; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createAll__ = __webpack_require__(493); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(45); + + + +var _createAll = __WEBPACK_IMPORTED_MODULE_0__createAll__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]); + +var actionTypes = _createAll.actionTypes, + arrayInsert = _createAll.arrayInsert, + arrayMove = _createAll.arrayMove, + arrayPop = _createAll.arrayPop, + arrayPush = _createAll.arrayPush, + arrayRemove = _createAll.arrayRemove, + arrayRemoveAll = _createAll.arrayRemoveAll, + arrayShift = _createAll.arrayShift, + arraySplice = _createAll.arraySplice, + arraySwap = _createAll.arraySwap, + arrayUnshift = _createAll.arrayUnshift, + autofill = _createAll.autofill, + blur = _createAll.blur, + change = _createAll.change, + destroy = _createAll.destroy, + Field = _createAll.Field, + Fields = _createAll.Fields, + FieldArray = _createAll.FieldArray, + Form = _createAll.Form, + FormSection = _createAll.FormSection, + focus = _createAll.focus, + formValueSelector = _createAll.formValueSelector, + getFormValues = _createAll.getFormValues, + getFormInitialValues = _createAll.getFormInitialValues, + getFormSyncErrors = _createAll.getFormSyncErrors, + getFormAsyncErrors = _createAll.getFormAsyncErrors, + getFormSubmitErrors = _createAll.getFormSubmitErrors, + initialize = _createAll.initialize, + isDirty = _createAll.isDirty, + isInvalid = _createAll.isInvalid, + isPristine = _createAll.isPristine, + isValid = _createAll.isValid, + isSubmitting = _createAll.isSubmitting, + hasSubmitSucceeded = _createAll.hasSubmitSucceeded, + hasSubmitFailed = _createAll.hasSubmitFailed, + propTypes = _createAll.propTypes, + reducer = _createAll.reducer, + reduxForm = _createAll.reduxForm, + registerField = _createAll.registerField, + reset = _createAll.reset, + setSubmitFailed = _createAll.setSubmitFailed, + setSubmitSucceeded = _createAll.setSubmitSucceeded, + startAsyncValidation = _createAll.startAsyncValidation, + startSubmit = _createAll.startSubmit, + stopAsyncValidation = _createAll.stopAsyncValidation, + stopSubmit = _createAll.stopSubmit, + submit = _createAll.submit, + SubmissionError = _createAll.SubmissionError, + touch = _createAll.touch, + unregisterField = _createAll.unregisterField, + untouch = _createAll.untouch, + values = _createAll.values; + + +/***/ }), +/* 160 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_INSERT", function() { return ARRAY_INSERT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_MOVE", function() { return ARRAY_MOVE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_POP", function() { return ARRAY_POP; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_PUSH", function() { return ARRAY_PUSH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_REMOVE", function() { return ARRAY_REMOVE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_REMOVE_ALL", function() { return ARRAY_REMOVE_ALL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_SHIFT", function() { return ARRAY_SHIFT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_SPLICE", function() { return ARRAY_SPLICE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_UNSHIFT", function() { return ARRAY_UNSHIFT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_SWAP", function() { return ARRAY_SWAP; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AUTOFILL", function() { return AUTOFILL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BLUR", function() { return BLUR; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CHANGE", function() { return CHANGE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_SUBMIT", function() { return CLEAR_SUBMIT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_ASYNC_ERROR", function() { return CLEAR_ASYNC_ERROR; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DESTROY", function() { return DESTROY; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOCUS", function() { return FOCUS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INITIALIZE", function() { return INITIALIZE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REGISTER_FIELD", function() { return REGISTER_FIELD; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RESET", function() { return RESET; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SET_SUBMIT_FAILED", function() { return SET_SUBMIT_FAILED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SET_SUBMIT_SUCCEEDED", function() { return SET_SUBMIT_SUCCEEDED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "START_ASYNC_VALIDATION", function() { return START_ASYNC_VALIDATION; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "START_SUBMIT", function() { return START_SUBMIT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STOP_ASYNC_VALIDATION", function() { return STOP_ASYNC_VALIDATION; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STOP_SUBMIT", function() { return STOP_SUBMIT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUBMIT", function() { return SUBMIT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TOUCH", function() { return TOUCH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNREGISTER_FIELD", function() { return UNREGISTER_FIELD; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNTOUCH", function() { return UNTOUCH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_SYNC_ERRORS", function() { return UPDATE_SYNC_ERRORS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_SYNC_WARNINGS", function() { return UPDATE_SYNC_WARNINGS; }); +var ARRAY_INSERT = '@@redux-form/ARRAY_INSERT'; +var ARRAY_MOVE = '@@redux-form/ARRAY_MOVE'; +var ARRAY_POP = '@@redux-form/ARRAY_POP'; +var ARRAY_PUSH = '@@redux-form/ARRAY_PUSH'; +var ARRAY_REMOVE = '@@redux-form/ARRAY_REMOVE'; +var ARRAY_REMOVE_ALL = '@@redux-form/ARRAY_REMOVE_ALL'; +var ARRAY_SHIFT = '@@redux-form/ARRAY_SHIFT'; +var ARRAY_SPLICE = '@@redux-form/ARRAY_SPLICE'; +var ARRAY_UNSHIFT = '@@redux-form/ARRAY_UNSHIFT'; +var ARRAY_SWAP = '@@redux-form/ARRAY_SWAP'; +var AUTOFILL = '@@redux-form/AUTOFILL'; +var BLUR = '@@redux-form/BLUR'; +var CHANGE = '@@redux-form/CHANGE'; +var CLEAR_SUBMIT = '@@redux-form/CLEAR_SUBMIT'; +var CLEAR_ASYNC_ERROR = '@redux-form/CLEAR_ASYNC_ERROR'; +var DESTROY = '@@redux-form/DESTROY'; +var FOCUS = '@@redux-form/FOCUS'; +var INITIALIZE = '@@redux-form/INITIALIZE'; +var REGISTER_FIELD = '@@redux-form/REGISTER_FIELD'; +var RESET = '@@redux-form/RESET'; +var SET_SUBMIT_FAILED = '@@redux-form/SET_SUBMIT_FAILED'; +var SET_SUBMIT_SUCCEEDED = '@@redux-form/SET_SUBMIT_SUCCEEDED'; +var START_ASYNC_VALIDATION = '@@redux-form/START_ASYNC_VALIDATION'; +var START_SUBMIT = '@@redux-form/START_SUBMIT'; +var STOP_ASYNC_VALIDATION = '@@redux-form/STOP_ASYNC_VALIDATION'; +var STOP_SUBMIT = '@@redux-form/STOP_SUBMIT'; +var SUBMIT = '@@redux-form/SUBMIT'; +var TOUCH = '@@redux-form/TOUCH'; +var UNREGISTER_FIELD = '@@redux-form/UNREGISTER_FIELD'; +var UNTOUCH = '@@redux-form/UNTOUCH'; +var UPDATE_SYNC_ERRORS = '@@redux-form/UPDATE_SYNC_ERRORS'; +var UPDATE_SYNC_WARNINGS = '@@redux-form/UPDATE_SYNC_WARNINGS'; + +/***/ }), +/* 161 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__ = __webpack_require__(498); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__ = __webpack_require__(514); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__ = __webpack_require__(516); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__ = __webpack_require__(517); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__ = __webpack_require__(518); + + + + + + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__["a" /* default */]; +MapCache.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__["a" /* default */]; +MapCache.prototype.get = __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__["a" /* default */]; +MapCache.prototype.has = __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__["a" /* default */]; +MapCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (MapCache); + + +/***/ }), +/* 162 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(69); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(44); + + + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" /* default */](value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +/* harmony default export */ __webpack_exports__["a"] = (isFunction); + + +/***/ }), +/* 163 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(59); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(30); + + + +/* Built-in method references that are verified to be native. */ +var Map = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Map'); + +/* harmony default export */ __webpack_exports__["a"] = (Map); + + +/***/ }), +/* 164 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(110); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stackClear_js__ = __webpack_require__(523); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__ = __webpack_require__(524); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stackGet_js__ = __webpack_require__(525); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stackHas_js__ = __webpack_require__(526); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stackSet_js__ = __webpack_require__(527); + + + + + + + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */](entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = __WEBPACK_IMPORTED_MODULE_1__stackClear_js__["a" /* default */]; +Stack.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__["a" /* default */]; +Stack.prototype.get = __WEBPACK_IMPORTED_MODULE_3__stackGet_js__["a" /* default */]; +Stack.prototype.has = __WEBPACK_IMPORTED_MODULE_4__stackHas_js__["a" /* default */]; +Stack.prototype.set = __WEBPACK_IMPORTED_MODULE_5__stackSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (Stack); + + +/***/ }), +/* 165 */ +/***/ (function(module, exports) { + +module.exports = function(originalModule) { + if(!originalModule.webpackPolyfill) { + var module = Object.create(originalModule); + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + Object.defineProperty(module, "exports", { + enumerable: true, + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), +/* 166 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/* harmony default export */ __webpack_exports__["a"] = (isPrototype); + + +/***/ }), +/* 167 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__ = __webpack_require__(535); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(57); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */](function() { return arguments; }()) ? __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */] : function(value) { + return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +/* harmony default export */ __webpack_exports__["a"] = (isArguments); + + +/***/ }), +/* 168 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/* harmony default export */ __webpack_exports__["a"] = (isLength); + + +/***/ }), +/* 169 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__ = __webpack_require__(537); + + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isBuffer); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(165)(module))) + +/***/ }), +/* 170 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__ = __webpack_require__(538); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(539); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(540); + + + + +/* Node.js helper references. */ +var nodeIsTypedArray = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */](nodeIsTypedArray) : __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (isTypedArray); + + +/***/ }), +/* 171 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/* harmony default export */ __webpack_exports__["a"] = (isIndex); + + +/***/ }), +/* 172 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +/* harmony default export */ __webpack_exports__["a"] = (identity); + + +/***/ }), +/* 173 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(267); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__ = __webpack_require__(557); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(114); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */](object) ? __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */](object) : __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__["a" /* default */](object); +} + +/* harmony default export */ __webpack_exports__["a"] = (keys); + + +/***/ }), +/* 174 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__ = __webpack_require__(562); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(57); + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && !__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](other))) { + return value !== value && other !== other; + } + return __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__["a" /* default */](value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsEqual); + + +/***/ }), +/* 175 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(108); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */](value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" /* default */](value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (isKey); + + +/***/ }), +/* 176 */ +/***/ (function(module, exports) { + +module.exports = isPromise; + +function isPromise(obj) { + return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; +} + + +/***/ }), +/* 177 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hasError__ = __webpack_require__(605); + + +var createIsValid = function createIsValid(structure) { + var getIn = structure.getIn, + keys = structure.keys; + + var hasError = __WEBPACK_IMPORTED_MODULE_0__hasError__["a" /* default */](structure); + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + var ignoreSubmitErrors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + return function (state) { + var formState = getFormState(state); + var syncError = getIn(formState, form + '.syncError'); + if (syncError) { + return false; + } + if (!ignoreSubmitErrors) { + var error = getIn(formState, form + '.error'); + if (error) { + return false; + } + } + var syncErrors = getIn(formState, form + '.syncErrors'); + var asyncErrors = getIn(formState, form + '.asyncErrors'); + var submitErrors = ignoreSubmitErrors ? undefined : getIn(formState, form + '.submitErrors'); + if (!syncErrors && !asyncErrors && !submitErrors) { + return true; + } + + var registeredFields = getIn(formState, form + '.registeredFields'); + if (!registeredFields) { + return true; + } + + return !keys(registeredFields).filter(function (name) { + return getIn(registeredFields, '[\'' + name + '\'].count') > 0; + }).some(function (name) { + return hasError(getIn(registeredFields, '[\'' + name + '\']'), syncErrors, asyncErrors, submitErrors); + }); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsValid); + +/***/ }), +/* 178 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(279); + + + +var customizer = function customizer(objectValue, otherValue, indexOrkey, object, other, stack) { + // https://lodash.com/docs/4.17.4#isEqualWith + if (stack) { + // Shallow compares + // For 1st level, stack === undefined. + // -> Do nothing (and implicitly return undefined so that it goes to compare 2nd level) + // For 2nd level and up, stack !== undefined. + // -> Compare by === operator + return objectValue === otherValue; + } +}; + +var shallowCompare = function shallowCompare(instance, nextProps, nextState) { + return !__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](instance.props, nextProps, customizer) || !__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](instance.state, nextState, customizer); +}; + +/* harmony default export */ __webpack_exports__["a"] = (shallowCompare); + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _toArray2 = __webpack_require__(243); + +var _toArray3 = _interopRequireDefault(_toArray2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(56); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _ClickAwayListener = __webpack_require__(654); + +var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener); + +var _keycode = __webpack_require__(28); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _propTypes = __webpack_require__(43); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _List = __webpack_require__(286); + +var _List2 = _interopRequireDefault(_List); + +var _menuUtils = __webpack_require__(655); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var desktop = props.desktop, + maxHeight = props.maxHeight, + width = props.width; + var muiTheme = context.muiTheme; + + + var styles = { + root: { + // Nested div bacause the List scales x faster than it scales y + zIndex: muiTheme.zIndex.menu, + maxHeight: maxHeight, + overflowY: maxHeight ? 'auto' : null + }, + divider: { + marginTop: 7, + marginBottom: 8 + }, + list: { + display: 'table-cell', + paddingBottom: desktop ? 16 : 8, + paddingTop: desktop ? 16 : 8, + userSelect: 'none', + width: width + }, + selectedMenuItem: { + color: muiTheme.menuItem.selectedTextColor + } + }; + + return styles; +} + +var Menu = function (_Component) { + (0, _inherits3.default)(Menu, _Component); + + function Menu(props, context) { + (0, _classCallCheck3.default)(this, Menu); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Menu.__proto__ || (0, _getPrototypeOf2.default)(Menu)).call(this, props, context)); + + _initialiseProps.call(_this); + + var filteredChildren = _this.getFilteredChildren(props.children); + var selectedIndex = _this.getSelectedIndex(props, filteredChildren); + + var newFocusIndex = props.disableAutoFocus ? -1 : selectedIndex >= 0 ? selectedIndex : 0; + if (newFocusIndex !== -1 && props.onMenuItemFocusChange) { + props.onMenuItemFocusChange(null, newFocusIndex); + } + _this.state = { + focusIndex: newFocusIndex, + isKeyboardFocused: props.initiallyKeyboardFocused, + keyWidth: props.desktop ? 64 : 56 + }; + + _this.hotKeyHolder = new _menuUtils.HotKeyHolder(); + return _this; + } + + (0, _createClass3.default)(Menu, [{ + key: 'componentDidMount', + value: function componentDidMount() { + if (this.props.autoWidth) { + this.setWidth(); + } + this.setScollPosition(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var filteredChildren = this.getFilteredChildren(nextProps.children); + var selectedIndex = this.getSelectedIndex(nextProps, filteredChildren); + + var newFocusIndex = nextProps.disableAutoFocus ? -1 : selectedIndex >= 0 ? selectedIndex : 0; + if (newFocusIndex !== this.state.focusIndex && this.props.onMenuItemFocusChange) { + this.props.onMenuItemFocusChange(null, newFocusIndex); + } + this.setState({ + focusIndex: newFocusIndex, + keyWidth: nextProps.desktop ? 64 : 56 + }); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + if (this.props.autoWidth) this.setWidth(); + } + }, { + key: 'getValueLink', + + + // Do not use outside of this component, it will be removed once valueLink is deprecated + value: function getValueLink(props) { + return props.valueLink || { + value: props.value, + requestChange: props.onChange + }; + } + }, { + key: 'setKeyboardFocused', + value: function setKeyboardFocused(keyboardFocused) { + this.setState({ + isKeyboardFocused: keyboardFocused + }); + } + }, { + key: 'getFilteredChildren', + value: function getFilteredChildren(children) { + var filteredChildren = []; + _react2.default.Children.forEach(children, function (child) { + if (child) { + filteredChildren.push(child); + } + }); + return filteredChildren; + } + }, { + key: 'cloneMenuItem', + value: function cloneMenuItem(child, childIndex, styles, index) { + var _this2 = this; + + var _props = this.props, + desktop = _props.desktop, + menuItemStyle = _props.menuItemStyle, + selectedMenuItemStyle = _props.selectedMenuItemStyle; + + + var selected = this.isChildSelected(child, this.props); + var selectedChildrenStyles = {}; + + if (selected) { + selectedChildrenStyles = (0, _simpleAssign2.default)(styles.selectedMenuItem, selectedMenuItemStyle); + } + + var mergedChildrenStyles = (0, _simpleAssign2.default)({}, child.props.style, menuItemStyle, selectedChildrenStyles); + + var isFocused = childIndex === this.state.focusIndex; + var focusState = 'none'; + if (isFocused) { + focusState = this.state.isKeyboardFocused ? 'keyboard-focused' : 'focused'; + } + + return _react2.default.cloneElement(child, { + desktop: desktop, + focusState: focusState, + onTouchTap: function onTouchTap(event) { + _this2.handleMenuItemTouchTap(event, child, index); + if (child.props.onTouchTap) child.props.onTouchTap(event); + }, + ref: isFocused ? 'focusedMenuItem' : null, + style: mergedChildrenStyles + }); + } + }, { + key: 'decrementKeyboardFocusIndex', + value: function decrementKeyboardFocusIndex(event) { + var index = this.state.focusIndex; + + index--; + if (index < 0) index = 0; + + this.setFocusIndex(event, index, true); + } + }, { + key: 'getMenuItemCount', + value: function getMenuItemCount(filteredChildren) { + var menuItemCount = 0; + filteredChildren.forEach(function (child) { + var childIsADivider = child.type && child.type.muiName === 'Divider'; + var childIsDisabled = child.props.disabled; + if (!childIsADivider && !childIsDisabled) menuItemCount++; + }); + return menuItemCount; + } + }, { + key: 'getSelectedIndex', + value: function getSelectedIndex(props, filteredChildren) { + var _this3 = this; + + var selectedIndex = -1; + var menuItemIndex = 0; + + filteredChildren.forEach(function (child) { + var childIsADivider = child.type && child.type.muiName === 'Divider'; + + if (_this3.isChildSelected(child, props)) selectedIndex = menuItemIndex; + if (!childIsADivider) menuItemIndex++; + }); + + return selectedIndex; + } + }, { + key: 'setFocusIndexStartsWith', + value: function setFocusIndexStartsWith(event, keys) { + var foundIndex = -1; + _react2.default.Children.forEach(this.props.children, function (child, index) { + if (foundIndex >= 0) { + return; + } + var primaryText = child.props.primaryText; + + if (typeof primaryText === 'string' && new RegExp('^' + keys, 'i').test(primaryText)) { + foundIndex = index; + } + }); + if (foundIndex >= 0) { + this.setFocusIndex(event, foundIndex, true); + return true; + } + return false; + } + }, { + key: 'handleMenuItemTouchTap', + value: function handleMenuItemTouchTap(event, item, index) { + var children = this.props.children; + var multiple = this.props.multiple; + var valueLink = this.getValueLink(this.props); + var menuValue = valueLink.value; + var itemValue = item.props.value; + var focusIndex = _react2.default.isValidElement(children) ? 0 : children.indexOf(item); + + this.setFocusIndex(event, focusIndex, false); + + if (multiple) { + var itemIndex = menuValue.indexOf(itemValue); + + var _menuValue = (0, _toArray3.default)(menuValue), + newMenuValue = _menuValue; + + if (itemIndex === -1) { + newMenuValue.push(itemValue); + } else { + newMenuValue.splice(itemIndex, 1); + } + + valueLink.requestChange(event, newMenuValue); + } else if (!multiple && itemValue !== menuValue) { + valueLink.requestChange(event, itemValue); + } + + this.props.onItemTouchTap(event, item, index); + } + }, { + key: 'incrementKeyboardFocusIndex', + value: function incrementKeyboardFocusIndex(event, filteredChildren) { + var index = this.state.focusIndex; + var maxIndex = this.getMenuItemCount(filteredChildren) - 1; + + index++; + if (index > maxIndex) index = maxIndex; + + this.setFocusIndex(event, index, true); + } + }, { + key: 'isChildSelected', + value: function isChildSelected(child, props) { + var menuValue = this.getValueLink(props).value; + var childValue = child.props.value; + + if (props.multiple) { + return menuValue.length && menuValue.indexOf(childValue) !== -1; + } else { + return child.props.hasOwnProperty('value') && menuValue === childValue; + } + } + }, { + key: 'setFocusIndex', + value: function setFocusIndex(event, newIndex, isKeyboardFocused) { + if (this.props.onMenuItemFocusChange) { + // Do this even if `newIndex === this.state.focusIndex` to allow users + // to detect up-arrow on the first MenuItem or down-arrow on the last. + this.props.onMenuItemFocusChange(event, newIndex); + } + this.setState({ + focusIndex: newIndex, + isKeyboardFocused: isKeyboardFocused + }); + } + }, { + key: 'setScollPosition', + value: function setScollPosition() { + var desktop = this.props.desktop; + var focusedMenuItem = this.refs.focusedMenuItem; + var menuItemHeight = desktop ? 32 : 48; + + if (focusedMenuItem) { + var selectedOffSet = _reactDom2.default.findDOMNode(focusedMenuItem).offsetTop; + + // Make the focused item be the 2nd item in the list the user sees + var scrollTop = selectedOffSet - menuItemHeight; + if (scrollTop < menuItemHeight) scrollTop = 0; + + _reactDom2.default.findDOMNode(this.refs.scrollContainer).scrollTop = scrollTop; + } + } + }, { + key: 'cancelScrollEvent', + value: function cancelScrollEvent(event) { + event.stopPropagation(); + event.preventDefault(); + return false; + } + }, { + key: 'setWidth', + value: function setWidth() { + var el = _reactDom2.default.findDOMNode(this); + var listEl = _reactDom2.default.findDOMNode(this.refs.list); + var elWidth = el.offsetWidth; + var keyWidth = this.state.keyWidth; + var minWidth = keyWidth * 1.5; + var keyIncrements = elWidth / keyWidth; + var newWidth = void 0; + + keyIncrements = keyIncrements <= 1.5 ? 1.5 : Math.ceil(keyIncrements); + newWidth = keyIncrements * keyWidth; + + if (newWidth < minWidth) newWidth = minWidth; + + el.style.width = newWidth + 'px'; + listEl.style.width = newWidth + 'px'; + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + + var _props2 = this.props, + autoWidth = _props2.autoWidth, + children = _props2.children, + desktop = _props2.desktop, + disableAutoFocus = _props2.disableAutoFocus, + initiallyKeyboardFocused = _props2.initiallyKeyboardFocused, + listStyle = _props2.listStyle, + maxHeight = _props2.maxHeight, + multiple = _props2.multiple, + onItemTouchTap = _props2.onItemTouchTap, + onEscKeyDown = _props2.onEscKeyDown, + onMenuItemFocusChange = _props2.onMenuItemFocusChange, + selectedMenuItemStyle = _props2.selectedMenuItemStyle, + menuItemStyle = _props2.menuItemStyle, + style = _props2.style, + value = _props2.value, + valueLink = _props2.valueLink, + width = _props2.width, + other = (0, _objectWithoutProperties3.default)(_props2, ['autoWidth', 'children', 'desktop', 'disableAutoFocus', 'initiallyKeyboardFocused', 'listStyle', 'maxHeight', 'multiple', 'onItemTouchTap', 'onEscKeyDown', 'onMenuItemFocusChange', 'selectedMenuItemStyle', 'menuItemStyle', 'style', 'value', 'valueLink', 'width']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style); + var mergedListStyles = (0, _simpleAssign2.default)(styles.list, listStyle); + + var filteredChildren = this.getFilteredChildren(children); + + var menuItemIndex = 0; + var newChildren = _react2.default.Children.map(filteredChildren, function (child, index) { + var childIsDisabled = child.props.disabled; + var childName = child.type ? child.type.muiName : ''; + var newChild = child; + + switch (childName) { + case 'MenuItem': + newChild = childIsDisabled ? _react2.default.cloneElement(child, { desktop: desktop }) : _this4.cloneMenuItem(child, menuItemIndex, styles, index); + break; + + case 'Divider': + newChild = _react2.default.cloneElement(child, { + style: (0, _simpleAssign2.default)({}, styles.divider, child.props.style) + }); + break; + } + + if (childName === 'MenuItem' && !childIsDisabled) { + menuItemIndex++; + } + + return newChild; + }); + + return _react2.default.createElement( + _ClickAwayListener2.default, + { onClickAway: this.handleClickAway }, + _react2.default.createElement( + 'div', + { + onKeyDown: this.handleKeyDown, + onWheel: this.handleOnWheel, + style: prepareStyles(mergedRootStyles), + ref: 'scrollContainer' + }, + _react2.default.createElement( + _List2.default, + (0, _extends3.default)({}, other, { + ref: 'list', + style: mergedListStyles + }), + newChildren + ) + ) + ); + } + }]); + return Menu; +}(_react.Component); + +Menu.defaultProps = { + autoWidth: true, + desktop: false, + disableAutoFocus: false, + initiallyKeyboardFocused: false, + maxHeight: null, + multiple: false, + onChange: function onChange() {}, + onEscKeyDown: function onEscKeyDown() {}, + onItemTouchTap: function onItemTouchTap() {}, + onKeyDown: function onKeyDown() {} +}; +Menu.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +var _initialiseProps = function _initialiseProps() { + var _this5 = this; + + this.handleClickAway = function (event) { + if (event.defaultPrevented) { + return; + } + + _this5.setFocusIndex(event, -1, false); + }; + + this.handleKeyDown = function (event) { + var filteredChildren = _this5.getFilteredChildren(_this5.props.children); + var key = (0, _keycode2.default)(event); + switch (key) { + case 'down': + event.preventDefault(); + _this5.incrementKeyboardFocusIndex(event, filteredChildren); + break; + case 'esc': + _this5.props.onEscKeyDown(event); + break; + case 'tab': + event.preventDefault(); + if (event.shiftKey) { + _this5.decrementKeyboardFocusIndex(event); + } else { + _this5.incrementKeyboardFocusIndex(event, filteredChildren); + } + break; + case 'up': + event.preventDefault(); + _this5.decrementKeyboardFocusIndex(event); + break; + default: + if (key && key.length === 1) { + var hotKeys = _this5.hotKeyHolder.append(key); + if (_this5.setFocusIndexStartsWith(event, hotKeys)) { + event.preventDefault(); + } + } + } + _this5.props.onKeyDown(event); + }; + + this.handleOnWheel = function (event) { + var scrollContainer = _this5.refs.scrollContainer; + // Only scroll lock if the the Menu is scrollable. + if (scrollContainer.scrollHeight <= scrollContainer.clientHeight) return; + + var scrollTop = scrollContainer.scrollTop, + scrollHeight = scrollContainer.scrollHeight, + clientHeight = scrollContainer.clientHeight; + + var wheelDelta = event.deltaY; + var isDeltaPositive = wheelDelta > 0; + + if (isDeltaPositive && wheelDelta > scrollHeight - clientHeight - scrollTop) { + scrollContainer.scrollTop = scrollHeight; + return _this5.cancelScrollEvent(event); + } else if (!isDeltaPositive && -wheelDelta > scrollTop) { + scrollContainer.scrollTop = 0; + return _this5.cancelScrollEvent(event); + } + }; +}; + +process.env.NODE_ENV !== "production" ? Menu.propTypes = { + /** + * If true, the width of the menu will be set automatically + * according to the widths of its children, + * using proper keyline increments (64px for desktop, + * 56px otherwise). + */ + autoWidth: _react.PropTypes.bool, + /** + * The content of the menu. This is usually used to pass `MenuItem` + * elements. + */ + children: _react.PropTypes.node, + /** + * If true, the menu item will render with compact desktop styles. + */ + desktop: _react.PropTypes.bool, + /** + * If true, the menu will not be auto-focused. + */ + disableAutoFocus: _react.PropTypes.bool, + /** + * If true, the menu will be keyboard-focused initially. + */ + initiallyKeyboardFocused: _react.PropTypes.bool, + /** + * Override the inline-styles of the underlying `List` element. + */ + listStyle: _react.PropTypes.object, + /** + * The maximum height of the menu in pixels. If specified, + * the menu will be scrollable if it is taller than the provided + * height. + */ + maxHeight: _react.PropTypes.number, + /** + * Override the inline-styles of menu items. + */ + menuItemStyle: _react.PropTypes.object, + /** + * If true, `value` must be an array and the menu will support + * multiple selections. + */ + multiple: _react.PropTypes.bool, + /** + * Callback function fired when a menu item with `value` not + * equal to the current `value` of the menu is touch-tapped. + * + * @param {object} event TouchTap event targeting the menu item. + * @param {any} value If `multiple` is true, the menu's `value` + * array with either the menu item's `value` added (if + * it wasn't already selected) or omitted (if it was already selected). + * Otherwise, the `value` of the menu item. + */ + onChange: _react.PropTypes.func, + /** + * Callback function fired when the menu is focused and the *Esc* key + * is pressed. + * + * @param {object} event `keydown` event targeting the menu. + */ + onEscKeyDown: _react.PropTypes.func, + /** + * Callback function fired when a menu item is touch-tapped. + * + * @param {object} event TouchTap event targeting the menu item. + * @param {object} menuItem The menu item. + * @param {number} index The index of the menu item. + */ + onItemTouchTap: _react.PropTypes.func, + /** @ignore */ + onKeyDown: _react.PropTypes.func, + /** + * Callback function fired when the focus on a `MenuItem` is changed. + * There will be some "duplicate" changes reported if two different + * focusing event happen, for example if a `MenuItem` is focused via + * the keyboard and then it is clicked on. + * + * @param {object} event The event that triggered the focus change. + * The event can be null since the focus can be changed for non-event + * reasons such as prop changes. + * @param {number} newFocusIndex The index of the newly focused + * `MenuItem` or `-1` if focus was lost. + */ + onMenuItemFocusChange: _react.PropTypes.func, + /** + * Override the inline-styles of selected menu items. + */ + selectedMenuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * If `multiple` is true, an array of the `value`s of the selected + * menu items. Otherwise, the `value` of the selected menu item. + * If provided, the menu will be a controlled component. + * This component also supports valueLink. + */ + value: _react.PropTypes.any, + /** + * ValueLink for the menu's `value`. + */ + valueLink: _react.PropTypes.object, + /** + * The width of the menu. If not specified, the menu's width + * will be set according to the widths of its children, using + * proper keyline increments (64px for desktop, 56px otherwise). + */ + width: _propTypes2.default.stringOrNumber +} : void 0; +exports.default = Menu; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _RaisedButton = __webpack_require__(656); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _RaisedButton2.default; + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Toggle = exports.TextField = exports.Slider = exports.SelectField = exports.RadioButtonGroup = exports.TimePicker = exports.DatePicker = exports.Checkbox = exports.AutoComplete = undefined; + +var _AutoComplete = __webpack_require__(657); + +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); + +var _Checkbox = __webpack_require__(668); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +var _DatePicker = __webpack_require__(673); + +var _DatePicker2 = _interopRequireDefault(_DatePicker); + +var _RadioButtonGroup = __webpack_require__(693); + +var _RadioButtonGroup2 = _interopRequireDefault(_RadioButtonGroup); + +var _SelectField = __webpack_require__(698); + +var _SelectField2 = _interopRequireDefault(_SelectField); + +var _Slider = __webpack_require__(706); + +var _Slider2 = _interopRequireDefault(_Slider); + +var _TextField = __webpack_require__(711); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _TimePicker = __webpack_require__(712); + +var _TimePicker2 = _interopRequireDefault(_TimePicker); + +var _Toggle = __webpack_require__(723); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.AutoComplete = _AutoComplete2.default; +exports.Checkbox = _Checkbox2.default; +exports.DatePicker = _DatePicker2.default; +exports.TimePicker = _TimePicker2.default; +exports.RadioButtonGroup = _RadioButtonGroup2.default; +exports.SelectField = _SelectField2.default; +exports.Slider = _Slider2.default; +exports.TextField = _TextField2.default; +exports.Toggle = _Toggle2.default; + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(60); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(28); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _FocusRipple = __webpack_require__(141); + +var _FocusRipple2 = _interopRequireDefault(_FocusRipple); + +var _TouchRipple = __webpack_require__(242); + +var _TouchRipple2 = _interopRequireDefault(_TouchRipple); + +var _Paper = __webpack_require__(37); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _warning = __webpack_require__(24); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var baseTheme = context.muiTheme.baseTheme; + + + return { + root: { + cursor: props.disabled ? 'not-allowed' : 'pointer', + position: 'relative', + overflow: 'visible', + display: 'table', + height: 'auto', + width: '100%' + }, + input: { + position: 'absolute', + cursor: 'inherit', + pointerEvents: 'all', + opacity: 0, + width: '100%', + height: '100%', + zIndex: 2, + left: 0, + boxSizing: 'border-box', + padding: 0, + margin: 0 + }, + controls: { + display: 'flex', + width: '100%', + height: '100%' + }, + label: { + float: 'left', + position: 'relative', + display: 'block', + width: 'calc(100% - 60px)', + lineHeight: '24px', + color: baseTheme.palette.textColor, + fontFamily: baseTheme.fontFamily + }, + wrap: { + transition: _transitions2.default.easeOut(), + float: 'left', + position: 'relative', + display: 'block', + flexShrink: 0, + width: 60 - baseTheme.spacing.desktopGutterLess, + marginRight: props.labelPosition === 'right' ? baseTheme.spacing.desktopGutterLess : 0, + marginLeft: props.labelPosition === 'left' ? baseTheme.spacing.desktopGutterLess : 0 + }, + ripple: { + color: props.rippleColor || baseTheme.palette.primary1Color, + height: '200%', + width: '200%', + top: -12, + left: -12 + } + }; +} + +var EnhancedSwitch = function (_Component) { + (0, _inherits3.default)(EnhancedSwitch, _Component); + + function EnhancedSwitch() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, EnhancedSwitch); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedSwitch.__proto__ || (0, _getPrototypeOf2.default)(EnhancedSwitch)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + isKeyboardFocused: false + }, _this.handleChange = function (event) { + _this.tabPressed = false; + _this.setState({ + isKeyboardFocused: false + }); + + var isInputChecked = _this.refs.checkbox.checked; + + if (!_this.props.hasOwnProperty('checked') && _this.props.onParentShouldUpdate) { + _this.props.onParentShouldUpdate(isInputChecked); + } + + if (_this.props.onSwitch) { + _this.props.onSwitch(event, isInputChecked); + } + }, _this.handleKeyDown = function (event) { + var code = (0, _keycode2.default)(event); + + if (code === 'tab') { + _this.tabPressed = true; + } + if (_this.state.isKeyboardFocused && code === 'space') { + _this.handleChange(event); + } + }, _this.handleKeyUp = function (event) { + if (_this.state.isKeyboardFocused && (0, _keycode2.default)(event) === 'space') { + _this.handleChange(event); + } + }, _this.handleMouseDown = function (event) { + // only listen to left clicks + if (event.button === 0) { + _this.refs.touchRipple.start(event); + } + }, _this.handleMouseUp = function () { + _this.refs.touchRipple.end(); + }, _this.handleMouseLeave = function () { + _this.refs.touchRipple.end(); + }, _this.handleTouchStart = function (event) { + _this.refs.touchRipple.start(event); + }, _this.handleTouchEnd = function () { + _this.refs.touchRipple.end(); + }, _this.handleBlur = function (event) { + _this.setState({ + isKeyboardFocused: false + }); + + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleFocus = function (event) { + // setTimeout is needed becuase the focus event fires first + // Wait so that we can capture if this was a keyboard focus + // or touch focus + setTimeout(function () { + if (_this.tabPressed) { + _this.setState({ + isKeyboardFocused: true + }); + } + }, 150); + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(EnhancedSwitch, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var inputNode = this.refs.checkbox; + if ((!this.props.switched || inputNode.checked !== this.props.switched) && this.props.onParentShouldUpdate) { + this.props.onParentShouldUpdate(inputNode.checked); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var hasCheckedProp = nextProps.hasOwnProperty('checked'); + var hasToggledProp = nextProps.hasOwnProperty('toggled'); + var hasNewDefaultProp = nextProps.hasOwnProperty('defaultChecked') && nextProps.defaultChecked !== this.props.defaultChecked; + + if (hasCheckedProp || hasToggledProp || hasNewDefaultProp) { + var switched = nextProps.checked || nextProps.toggled || nextProps.defaultChecked || false; + + this.setState({ + switched: switched + }); + + if (this.props.onParentShouldUpdate && switched !== this.props.switched) { + this.props.onParentShouldUpdate(switched); + } + } + } + }, { + key: 'isSwitched', + value: function isSwitched() { + return this.refs.checkbox.checked; + } + + // no callback here because there is no event + + }, { + key: 'setSwitched', + value: function setSwitched(newSwitchedValue) { + if (!this.props.hasOwnProperty('checked') || this.props.checked === false) { + if (this.props.onParentShouldUpdate) { + this.props.onParentShouldUpdate(newSwitchedValue); + } + this.refs.checkbox.checked = newSwitchedValue; + } else { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: Cannot call set method while checked is defined as a property.') : void 0; + } + } + }, { + key: 'getValue', + value: function getValue() { + return this.refs.checkbox.value; + } + + // Checkbox inputs only use SPACE to change their state. Using ENTER will + // update the ui but not the input. + + + /** + * Because both the ripples and the checkbox input cannot share pointer + * events, the checkbox input takes control of pointer events and calls + * ripple animations manually. + */ + + }, { + key: 'render', + value: function render() { + var _props = this.props, + name = _props.name, + value = _props.value, + iconStyle = _props.iconStyle, + inputStyle = _props.inputStyle, + inputType = _props.inputType, + label = _props.label, + labelStyle = _props.labelStyle, + labelPosition = _props.labelPosition, + onSwitch = _props.onSwitch, + onBlur = _props.onBlur, + onFocus = _props.onFocus, + onMouseUp = _props.onMouseUp, + onMouseDown = _props.onMouseDown, + onMouseLeave = _props.onMouseLeave, + onTouchStart = _props.onTouchStart, + onTouchEnd = _props.onTouchEnd, + onParentShouldUpdate = _props.onParentShouldUpdate, + disabled = _props.disabled, + disableTouchRipple = _props.disableTouchRipple, + disableFocusRipple = _props.disableFocusRipple, + className = _props.className, + rippleColor = _props.rippleColor, + rippleStyle = _props.rippleStyle, + style = _props.style, + switched = _props.switched, + switchElement = _props.switchElement, + thumbStyle = _props.thumbStyle, + trackStyle = _props.trackStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['name', 'value', 'iconStyle', 'inputStyle', 'inputType', 'label', 'labelStyle', 'labelPosition', 'onSwitch', 'onBlur', 'onFocus', 'onMouseUp', 'onMouseDown', 'onMouseLeave', 'onTouchStart', 'onTouchEnd', 'onParentShouldUpdate', 'disabled', 'disableTouchRipple', 'disableFocusRipple', 'className', 'rippleColor', 'rippleStyle', 'style', 'switched', 'switchElement', 'thumbStyle', 'trackStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var wrapStyles = (0, _simpleAssign2.default)(styles.wrap, iconStyle); + var mergedRippleStyle = (0, _simpleAssign2.default)(styles.ripple, rippleStyle); + + if (thumbStyle) { + wrapStyles.marginLeft /= 2; + wrapStyles.marginRight /= 2; + } + + var labelElement = label && _react2.default.createElement( + 'label', + { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) }, + label + ); + + var showTouchRipple = !disabled && !disableTouchRipple; + var showFocusRipple = !disabled && !disableFocusRipple; + + var touchRipple = _react2.default.createElement(_TouchRipple2.default, { + ref: 'touchRipple', + key: 'touchRipple', + style: mergedRippleStyle, + color: mergedRippleStyle.color, + muiTheme: this.context.muiTheme, + centerRipple: true + }); + + var focusRipple = _react2.default.createElement(_FocusRipple2.default, { + key: 'focusRipple', + innerStyle: mergedRippleStyle, + color: mergedRippleStyle.color, + muiTheme: this.context.muiTheme, + show: this.state.isKeyboardFocused + }); + + var ripples = [showTouchRipple ? touchRipple : null, showFocusRipple ? focusRipple : null]; + + var inputElement = _react2.default.createElement('input', (0, _extends3.default)({}, other, { + ref: 'checkbox', + type: inputType, + style: prepareStyles((0, _simpleAssign2.default)(styles.input, inputStyle)), + name: name, + value: value, + disabled: disabled, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onChange: this.handleChange, + onMouseUp: showTouchRipple && this.handleMouseUp, + onMouseDown: showTouchRipple && this.handleMouseDown, + onMouseLeave: showTouchRipple && this.handleMouseLeave, + onTouchStart: showTouchRipple && this.handleTouchStart, + onTouchEnd: showTouchRipple && this.handleTouchEnd + })); + + // If toggle component (indicated by whether the style includes thumb) manually lay out + // elements in order to nest ripple elements + var switchOrThumbElement = !thumbStyle ? _react2.default.createElement( + 'div', + { style: prepareStyles(wrapStyles) }, + switchElement, + ripples + ) : _react2.default.createElement( + 'div', + { style: prepareStyles(wrapStyles) }, + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, trackStyle)) }), + _react2.default.createElement( + _Paper2.default, + { style: thumbStyle, zDepth: 1, circle: true }, + ' ', + ripples, + ' ' + ) + ); + + var elementsInOrder = labelPosition === 'right' ? _react2.default.createElement( + 'div', + { style: styles.controls }, + switchOrThumbElement, + labelElement + ) : _react2.default.createElement( + 'div', + { style: styles.controls }, + labelElement, + switchOrThumbElement + ); + + return _react2.default.createElement( + 'div', + { ref: 'root', className: className, style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyDown: this.handleKeyDown, + onKeyUp: this.handleKeyUp + }), + inputElement, + elementsInOrder + ); + } + }]); + return EnhancedSwitch; +}(_react.Component); + +EnhancedSwitch.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? EnhancedSwitch.propTypes = { + checked: _react.PropTypes.bool, + className: _react.PropTypes.string, + defaultChecked: _react.PropTypes.bool, + disableFocusRipple: _react.PropTypes.bool, + disableTouchRipple: _react.PropTypes.bool, + disabled: _react.PropTypes.bool, + iconStyle: _react.PropTypes.object, + inputStyle: _react.PropTypes.object, + inputType: _react.PropTypes.string.isRequired, + label: _react.PropTypes.node, + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + labelStyle: _react.PropTypes.object, + name: _react.PropTypes.string, + onBlur: _react.PropTypes.func, + onFocus: _react.PropTypes.func, + onMouseDown: _react.PropTypes.func, + onMouseLeave: _react.PropTypes.func, + onMouseUp: _react.PropTypes.func, + onParentShouldUpdate: _react.PropTypes.func, + onSwitch: _react.PropTypes.func, + onTouchEnd: _react.PropTypes.func, + onTouchStart: _react.PropTypes.func, + rippleColor: _react.PropTypes.string, + rippleStyle: _react.PropTypes.object, + style: _react.PropTypes.object, + switchElement: _react.PropTypes.element.isRequired, + switched: _react.PropTypes.bool.isRequired, + thumbStyle: _react.PropTypes.object, + trackStyle: _react.PropTypes.object, + value: _react.PropTypes.any +} : void 0; +exports.default = EnhancedSwitch; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactAddonsTransitionGroup = __webpack_require__(105); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +var _SlideInChild = __webpack_require__(688); + +var _SlideInChild2 = _interopRequireDefault(_SlideInChild); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SlideIn = function (_Component) { + (0, _inherits3.default)(SlideIn, _Component); + + function SlideIn() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, SlideIn); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = SlideIn.__proto__ || (0, _getPrototypeOf2.default)(SlideIn)).call.apply(_ref, [this].concat(args))), _this), _this.getLeaveDirection = function () { + return _this.props.direction; + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(SlideIn, [{ + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + enterDelay = _props.enterDelay, + children = _props.children, + childStyle = _props.childStyle, + direction = _props.direction, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['enterDelay', 'children', 'childStyle', 'direction', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'relative', + overflow: 'hidden', + height: '100%' + }, style); + + var newChildren = _react2.default.Children.map(children, function (child) { + return _react2.default.createElement( + _SlideInChild2.default, + { + key: child.key, + direction: direction, + enterDelay: enterDelay, + getLeaveDirection: _this2.getLeaveDirection, + style: childStyle + }, + child + ); + }, this); + + return _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + (0, _extends3.default)({}, other, { + style: prepareStyles(mergedRootStyles), + component: 'div' + }), + newChildren + ); + } + }]); + return SlideIn; +}(_react.Component); + +SlideIn.defaultProps = { + enterDelay: 0, + direction: 'left' +}; +SlideIn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? SlideIn.propTypes = { + childStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + direction: _react.PropTypes.oneOf(['left', 'right', 'up', 'down']), + enterDelay: _react.PropTypes.number, + style: _react.PropTypes.object +} : void 0; +exports.default = SlideIn; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + iconSize: 24, + + desktopGutter: 24, + desktopGutterMore: 32, + desktopGutterLess: 16, + desktopGutterMini: 8, + desktopKeylineIncrement: 64, + desktopDropDownMenuItemHeight: 32, + desktopDropDownMenuFontSize: 15, + desktopDrawerMenuItemHeight: 48, + desktopSubheaderHeight: 48, + desktopToolbarHeight: 56 +}; + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +// helper to capitalize strings + +exports.default = function (str) { + return str.charAt(0).toUpperCase() + str.slice(1); +}; + +module.exports = exports["default"]; + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (value) { + if (Array.isArray(value)) value = value.join(','); + + return value.match(/-webkit-|-moz-|-ms-/) !== null; +}; + +module.exports = exports['default']; + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.email = email; +exports.required = required; +exports.simpleText = simpleText; +exports.number = number; +exports.minValue = minValue; +exports.maxValue = maxValue; +exports.fullName = fullName; +exports.unique = unique; +function email(input) { + var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return re.test(input) ? undefined : 'Please enter a valid email'; +} + +function required(value) { + var empty = typeof value !== 'number' && !value; + return empty ? 'Required field' : undefined; +} + +function simpleText(value) { + return value && !value.match(/^[0-9a-zA-Z_]{1,64}$/) ? 'Only use characters (a-z, A-Z, 0-9, _)' : undefined; +} + +function number(value) { + return value && isNaN(Number(value)) ? 'This field must be a number' : undefined; +} + +function minValue(min) { + return function (value) { + return value && value < min ? 'The value must be greater than ' + min : undefined; + }; +} + +function maxValue(max) { + return function (value) { + return value && value > max ? 'The value must be less than ' + max : undefined; + }; +} + +function fullName(value) { + return !value || value.split(' ').filter(function (x) { + return x !== ""; + }).length < 2 ? 'Please enter a valid full name (firstname + lastname)' : undefined; +} + +function unique(candidates) { + return function (value) { + if (candidates.indexOf(value) !== -1) { + return 'This value already exists and must be unique'; + } + return undefined; + }; +} + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var CHANGE_MENU = exports.CHANGE_MENU = 'CHANGE_MENU'; +var NOTIFICATION_ADD = exports.NOTIFICATION_ADD = 'NOTIFICATION_ADD'; +var PROFILE_CREATE = exports.PROFILE_CREATE = 'PROFILE_CREATE'; +var PROFILE_UPDATE_SETTINGS = exports.PROFILE_UPDATE_SETTINGS = 'PROFILE_UPDATE_SETTINGS'; +var PROFILE_REMOVE = exports.PROFILE_REMOVE = 'PROFILE_REMOVE'; +var PROFILE_SET_ENABLED = exports.PROFILE_SET_ENABLED = 'PROFILE_SET_ENABLED'; + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(305), __esModule: true }; + +/***/ }), +/* 190 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(89) + , $export = __webpack_require__(32) + , redefine = __webpack_require__(193) + , hide = __webpack_require__(47) + , has = __webpack_require__(48) + , Iterators = __webpack_require__(65) + , $iterCreate = __webpack_require__(307) + , setToStringTag = __webpack_require__(91) + , getPrototypeOf = __webpack_require__(197) + , ITERATOR = __webpack_require__(20)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + +var returnThis = function(){ return this; }; + +module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; + // Fix native + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(40) && !__webpack_require__(64)(function(){ + return Object.defineProperty(__webpack_require__(126)('div'), 'a', {get: function(){ return 7; }}).a != 7; +}); + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(47); + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(48) + , toIObject = __webpack_require__(49) + , arrayIndexOf = __webpack_require__(309)(false) + , IE_PROTO = __webpack_require__(130)('IE_PROTO'); + +module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(names.length > i)if(has(O, key = names[i++])){ + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(74); +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); +}; + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(22).document && document.documentElement; + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(48) + , toObject = __webpack_require__(75) + , IE_PROTO = __webpack_require__(130)('IE_PROTO') + , ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function(O){ + O = toObject(O); + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(typeof O.constructor == 'function' && O instanceof O.constructor){ + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(34); +module.exports = function(iterator, fn, value, entries){ + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch(e){ + var ret = iterator['return']; + if(ret !== undefined)anObject(ret.call(iterator)); + throw e; + } +}; + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(65) + , ITERATOR = __webpack_require__(20)('iterator') + , ArrayProto = Array.prototype; + +module.exports = function(it){ + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(62) + , invoke = __webpack_require__(318) + , html = __webpack_require__(196) + , cel = __webpack_require__(126) + , global = __webpack_require__(22) + , process = global.process + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; +var run = function(){ + var id = +this; + if(queue.hasOwnProperty(id)){ + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function(event){ + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if(!setTask || !clearTask){ + setTask = function setImmediate(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id){ + delete queue[id]; + }; + // Node.js 0.8- + if(__webpack_require__(74)(process) == 'process'){ + defer = function(id){ + process.nextTick(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if(MessageChannel){ + channel = new MessageChannel; + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ + defer = function(id){ + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if(ONREADYSTATECHANGE in cel('script')){ + defer = function(id){ + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function(id){ + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(20)('iterator') + , SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function(){ SAFE_CLOSING = true; }; + Array.from(riter, function(){ throw 2; }); +} catch(e){ /* empty */ } + +module.exports = function(exec, skipClosing){ + if(!skipClosing && !SAFE_CLOSING)return false; + var safe = false; + try { + var arr = [7] + , iter = arr[ITERATOR](); + iter.next = function(){ return {done: safe = true}; }; + arr[ITERATOR] = function(){ return iter; }; + exec(arr); + } catch(e){ /* empty */ } + return safe; +}; + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(194) + , hiddenKeys = __webpack_require__(132).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ + return $keys(O, hiddenKeys); +}; + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(93) + , createDesc = __webpack_require__(73) + , toIObject = __webpack_require__(49) + , toPrimitive = __webpack_require__(127) + , has = __webpack_require__(48) + , IE8_DOM_DEFINE = __webpack_require__(192) + , gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(40) ? gOPD : function getOwnPropertyDescriptor(O, P){ + O = toIObject(O); + P = toPrimitive(P, true); + if(IE8_DOM_DEFINE)try { + return gOPD(O, P); + } catch(e){ /* empty */ } + if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); +}; + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(335), __esModule: true }; + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(338), __esModule: true }; + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(32) + , core = __webpack_require__(16) + , fails = __webpack_require__(64); +module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); +}; + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(51); + +var _keys2 = _interopRequireDefault(_keys); + +exports.isObjectEmpty = isObjectEmpty; +exports.getQueryStringValue = getQueryStringValue; +exports.pageHasNodeOfClass = pageHasNodeOfClass; +exports.hasStringInPath = hasStringInPath; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isObjectEmpty(obj) { + return (0, _keys2.default)(obj).length === 0 && obj.constructor === Object; +} + +function getQueryStringValue(key) { + return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1")); +} + +function pageHasNodeOfClass(className) { + return document.querySelectorAll('.' + className).length > 0; +} + +function hasStringInPath(value) { + return location.pathname.substring(1).split('/').filter(function (x) { + return !!x && x === value; + }).length > 0; +} + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(53), + _assign = __webpack_require__(14); + +var ReactNoopUpdateQueue = __webpack_require__(209); + +var canDefineProperty = __webpack_require__(94); +var emptyObject = __webpack_require__(95); +var invariant = __webpack_require__(10); +var lowPriorityWarning = __webpack_require__(139); + +/** + * Base class helpers for the updating state of a component. + */ +function ReactComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; +} + +ReactComponent.prototype.isReactComponent = {}; + +/** + * Sets a subset of the state. Always use this to mutate + * state. You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * There is no guarantee that calls to `setState` will run synchronously, + * as they may eventually be batched together. You can provide an optional + * callback that will be executed when the call to setState is actually + * completed. + * + * When a function is provided to setState, it will be called at some point in + * the future (not synchronously). It will be called with the up to date + * component arguments (state, props, context). These values can be different + * from this.* because your function may be called after receiveProps but before + * shouldComponentUpdate, and this new state, props, and context will not yet be + * assigned to this. + * + * @param {object|function} partialState Next partial state or function to + * produce next partial state to be merged with current state. + * @param {?function} callback Called after state is updated. + * @final + * @protected + */ +ReactComponent.prototype.setState = function (partialState, callback) { + !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0; + this.updater.enqueueSetState(this, partialState); + if (callback) { + this.updater.enqueueCallback(this, callback, 'setState'); + } +}; + +/** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {?function} callback Called after update is complete. + * @final + * @protected + */ +ReactComponent.prototype.forceUpdate = function (callback) { + this.updater.enqueueForceUpdate(this); + if (callback) { + this.updater.enqueueCallback(this, callback, 'forceUpdate'); + } +}; + +/** + * Deprecated APIs. These APIs used to exist on classic React classes but since + * we would like to deprecate them, we're not going to move them over to this + * modern base class. Instead, we define a getter that warns if it's accessed. + */ +if (process.env.NODE_ENV !== 'production') { + var deprecatedAPIs = { + isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], + replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] + }; + var defineDeprecationWarning = function (methodName, info) { + if (canDefineProperty) { + Object.defineProperty(ReactComponent.prototype, methodName, { + get: function () { + lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); + return undefined; + } + }); + } + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } +} + +/** + * Base class helpers for the updating state of a component. + */ +function ReactPureComponent(props, context, updater) { + // Duplicated from ReactComponent. + this.props = props; + this.context = context; + this.refs = emptyObject; + // We initialize the default updater but the real one gets injected by the + // renderer. + this.updater = updater || ReactNoopUpdateQueue; +} + +function ComponentDummy() {} +ComponentDummy.prototype = ReactComponent.prototype; +ReactPureComponent.prototype = new ComponentDummy(); +ReactPureComponent.prototype.constructor = ReactPureComponent; +// Avoid an extra prototype jump for these methods. +_assign(ReactPureComponent.prototype, ReactComponent.prototype); +ReactPureComponent.prototype.isPureReactComponent = true; + +module.exports = { + Component: ReactComponent, + PureComponent: ReactPureComponent +}; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var warning = __webpack_require__(11); + +function warnNoop(publicInstance, callerName) { + if (process.env.NODE_ENV !== 'production') { + var constructor = publicInstance.constructor; + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; + } +} + +/** + * This is the abstract API for an update queue. + */ +var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function (publicInstance) { + return false; + }, + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + enqueueCallback: function (publicInstance, callback) {}, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function (publicInstance) { + warnNoop(publicInstance, 'forceUpdate'); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function (publicInstance, completeState) { + warnNoop(publicInstance, 'replaceState'); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function (publicInstance, partialState) { + warnNoop(publicInstance, 'setState'); + } +}; + +module.exports = ReactNoopUpdateQueue; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var PooledClass = __webpack_require__(359); +var ReactElement = __webpack_require__(41); + +var emptyFunction = __webpack_require__(21); +var traverseAllChildren = __webpack_require__(212); + +var twoArgumentPooler = PooledClass.twoArgumentPooler; +var fourArgumentPooler = PooledClass.fourArgumentPooler; + +var userProvidedKeyEscapeRegex = /\/+/g; +function escapeUserProvidedKey(text) { + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/'); +} + +/** + * PooledClass representing the bookkeeping associated with performing a child + * traversal. Allows avoiding binding callbacks. + * + * @constructor ForEachBookKeeping + * @param {!function} forEachFunction Function to perform traversal with. + * @param {?*} forEachContext Context to perform context with. + */ +function ForEachBookKeeping(forEachFunction, forEachContext) { + this.func = forEachFunction; + this.context = forEachContext; + this.count = 0; +} +ForEachBookKeeping.prototype.destructor = function () { + this.func = null; + this.context = null; + this.count = 0; +}; +PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); + +function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, + context = bookKeeping.context; + + func.call(context, child, bookKeeping.count++); +} + +/** + * Iterates through children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc + * @param {*} forEachContext Context for forEachContext. + */ +function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + ForEachBookKeeping.release(traverseContext); +} + +/** + * PooledClass representing the bookkeeping associated with performing a child + * mapping. Allows avoiding binding callbacks. + * + * @constructor MapBookKeeping + * @param {!*} mapResult Object containing the ordered map of results. + * @param {!function} mapFunction Function to perform mapping with. + * @param {?*} mapContext Context to perform mapping with. + */ +function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { + this.result = mapResult; + this.keyPrefix = keyPrefix; + this.func = mapFunction; + this.context = mapContext; + this.count = 0; +} +MapBookKeeping.prototype.destructor = function () { + this.result = null; + this.keyPrefix = null; + this.func = null; + this.context = null; + this.count = 0; +}; +PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); + +function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, + keyPrefix = bookKeeping.keyPrefix, + func = bookKeeping.func, + context = bookKeeping.context; + + + var mappedChild = func.call(context, child, bookKeeping.count++); + if (Array.isArray(mappedChild)) { + mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument); + } else if (mappedChild != null) { + if (ReactElement.isValidElement(mappedChild)) { + mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey); + } + result.push(mappedChild); + } +} + +function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ''; + if (prefix != null) { + escapedPrefix = escapeUserProvidedKey(prefix) + '/'; + } + var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + MapBookKeeping.release(traverseContext); +} + +/** + * Maps children that are typically specified as `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} func The map function. + * @param {*} context Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ +function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, func, context); + return result; +} + +function forEachSingleChildDummy(traverseContext, child, name) { + return null; +} + +/** + * Count the number of children that are typically specified as + * `props.children`. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ +function countChildren(children, context) { + return traverseAllChildren(children, forEachSingleChildDummy, null); +} + +/** + * Flatten a children object (typically specified as `props.children`) and + * return an array with appropriately re-keyed children. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray + */ +function toArray(children) { + var result = []; + mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); + return result; +} + +var ReactChildren = { + forEach: forEachChildren, + map: mapChildren, + mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, + count: countChildren, + toArray: toArray +}; + +module.exports = ReactChildren; + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +// The Symbol used to tag the ReactElement type. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. + +var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; + +module.exports = REACT_ELEMENT_TYPE; + +/***/ }), +/* 212 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(53); + +var ReactCurrentOwner = __webpack_require__(27); +var REACT_ELEMENT_TYPE = __webpack_require__(211); + +var getIteratorFn = __webpack_require__(213); +var invariant = __webpack_require__(10); +var KeyEscapeUtils = __webpack_require__(214); +var warning = __webpack_require__(11); + +var SEPARATOR = '.'; +var SUBSEPARATOR = ':'; + +/** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ + +/** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + +var didWarnAboutMaps = false; + +/** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ +function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); +} + +/** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if (children === null || type === 'string' || type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { + callback(traverseContext, children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + if (process.env.NODE_ENV !== 'production') { + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } + } + } else if (type === 'object') { + var addendum = ''; + if (process.env.NODE_ENV !== 'production') { + addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; + if (children._isReactElement) { + addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } + } + } + var childrenString = String(children); + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; + } + } + + return subtreeCount; +} + +/** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); +} + +module.exports = traverseAllChildren; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/* global Symbol */ + +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + +/** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ +function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } +} + +module.exports = getIteratorFn; + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + +function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2' + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; +} + +/** + * Unescape and unwrap key for human-readable display + * + * @param {string} key to unescape. + * @return {string} the unescaped key. + */ +function unescape(key) { + var unescapeRegex = /(=0|=2)/g; + var unescaperLookup = { + '=0': '=', + '=2': ':' + }; + var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1); + + return ('' + keySubstring).replace(unescapeRegex, function (match) { + return unescaperLookup[match]; + }); +} + +var KeyEscapeUtils = { + escape: escape, + unescape: unescape +}; + +module.exports = KeyEscapeUtils; + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ + + + +var ReactCurrentOwner = __webpack_require__(27); +var ReactComponentTreeHook = __webpack_require__(19); +var ReactElement = __webpack_require__(41); + +var checkReactTypeSpec = __webpack_require__(361); + +var canDefineProperty = __webpack_require__(94); +var getIteratorFn = __webpack_require__(213); +var warning = __webpack_require__(11); +var lowPriorityWarning = __webpack_require__(139); + +function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +function getSourceInfoErrorAddendum(elementProps) { + if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) { + var source = elementProps.__source; + var fileName = source.fileName.replace(/^.*[\\\/]/, ''); + var lineNumber = source.lineNumber; + return ' Check your code at ' + fileName + ':' + lineNumber + '.'; + } + return ''; +} + +/** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ +var ownerHasKeyUseWarning = {}; + +function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + + if (!info) { + var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = ' Check the top-level render call using <' + parentName + '>.'; + } + } + return info; +} + +/** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. Error statuses are cached so a warning + * will only be shown once. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ +function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + + var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {}); + + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (memoizer[currentComponentErrorInfo]) { + return; + } + memoizer[currentComponentErrorInfo] = true; + + // Usually the current owner is the offender, but if it accepts children as a + // property, it may be the creator of the child that's responsible for + // assigning it a key. + var childOwner = ''; + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + // Give the component that originally created this child. + childOwner = ' It was passed a child from ' + element._owner.getName() + '.'; + } + + process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0; +} + +/** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ +function validateChildKeys(node, parentType) { + if (typeof node !== 'object') { + return; + } + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (ReactElement.isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (ReactElement.isValidElement(node)) { + // This element was passed in a valid location. + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + // Entry iterators provide implicit keys. + if (iteratorFn) { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (ReactElement.isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } +} + +/** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ +function validatePropTypes(element) { + var componentClass = element.type; + if (typeof componentClass !== 'function') { + return; + } + var name = componentClass.displayName || componentClass.name; + if (componentClass.propTypes) { + checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null); + } + if (typeof componentClass.getDefaultProps === 'function') { + process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0; + } +} + +var ReactElementValidator = { + createElement: function (type, props, children) { + var validType = typeof type === 'string' || typeof type === 'function'; + // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + if (!validType) { + if (typeof type !== 'function' && typeof type !== 'string') { + var info = ''; + if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { + info += ' You likely forgot to export your component from the file ' + "it's defined in."; + } + + var sourceInfo = getSourceInfoErrorAddendum(props); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + + info += ReactComponentTreeHook.getCurrentStackAddendum(); + + var currentSource = props !== null && props !== undefined && props.__source !== undefined ? props.__source : null; + ReactComponentTreeHook.pushNonStandardWarningStack(true, currentSource); + process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0; + ReactComponentTreeHook.popNonStandardWarningStack(); + } + } + + var element = ReactElement.createElement.apply(this, arguments); + + // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + if (element == null) { + return element; + } + + // Skip key warning if the type isn't valid since our key validation logic + // doesn't expect a non-string/function type and can throw confusing errors. + // We don't want exception behavior to differ between dev and prod. + // (Rendering will throw with a helpful message and as soon as the type is + // fixed, the key warnings will appear.) + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + + validatePropTypes(element); + + return element; + }, + + createFactory: function (type) { + var validatedFactory = ReactElementValidator.createElement.bind(null, type); + // Legacy hook TODO: Warn if this is accessed + validatedFactory.type = type; + + if (process.env.NODE_ENV !== 'production') { + if (canDefineProperty) { + Object.defineProperty(validatedFactory, 'type', { + enumerable: false, + get: function () { + lowPriorityWarning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); + Object.defineProperty(this, 'type', { + value: type + }); + return type; + } + }); + } + } + + return validatedFactory; + }, + + cloneElement: function (element, props, children) { + var newElement = ReactElement.cloneElement.apply(this, arguments); + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + validatePropTypes(newElement); + return newElement; + } +}; + +module.exports = ReactElementValidator; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 216 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +// React 15.5 references this module, and assumes PropTypes are still callable in production. +// Therefore we re-export development-only version with all the PropTypes checks here. +// However if one is migrating to the `prop-types` npm library, they will go through the +// `index.js` entry point, and it will branch depending on the environment. +var factory = __webpack_require__(365); +module.exports = function(isValidElement) { + // It is still allowed in 15.5. + var throwOnDirectAccess = false; + return factory(isValidElement, throwOnDirectAccess); +}; + + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMComponentFlags = { + hasCachedChildNodes: 1 << 0 +}; + +module.exports = ReactDOMComponentFlags; + +/***/ }), +/* 219 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(10); + +/** + * Accumulates items that must not be null or undefined into the first one. This + * is used to conserve memory by avoiding array allocations, and thus sacrifices + * API cleanness. Since `current` can be null before being passed in and not + * null after this function, make sure to assign it back to `current`: + * + * `a = accumulateInto(a, b);` + * + * This API should be sparingly used. Try `accumulate` for something cleaner. + * + * @return {*|array<*>} An accumulation of items. + */ + +function accumulateInto(current, next) { + !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0; + + if (current == null) { + return next; + } + + // Both are not empty. Warning: Never call x.concat(y) when you are not + // certain that x is an Array (x could be a string with concat method). + if (Array.isArray(current)) { + if (Array.isArray(next)) { + current.push.apply(current, next); + return current; + } + current.push(next); + return current; + } + + if (Array.isArray(next)) { + // A bit too dangerous to mutate `next`. + return [current].concat(next); + } + + return [current, next]; +} + +module.exports = accumulateInto; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * @param {array} arr an "accumulation" of items which is either an Array or + * a single item. Useful when paired with the `accumulate` module. This is a + * simple utility that allows us to reason about a collection of items, but + * handling the case when there is exactly one item (and we do not need to + * allocate an array). + */ + +function forEachAccumulated(arr, cb, scope) { + if (Array.isArray(arr)) { + arr.forEach(cb, scope); + } else if (arr) { + cb.call(scope, arr); + } +} + +module.exports = forEachAccumulated; + +/***/ }), +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(18); + +var contentKey = null; + +/** + * Gets the key used to access text content on a DOM node. + * + * @return {?string} Key used to access text content. + * @internal + */ +function getTextContentAccessor() { + if (!contentKey && ExecutionEnvironment.canUseDOM) { + // Prefer textContent to innerText because many browsers support both but + // SVG <text> elements don't support innerText even when <div> does. + contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText'; + } + return contentKey; +} + +module.exports = getTextContentAccessor; + +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var PooledClass = __webpack_require__(55); + +var invariant = __webpack_require__(10); + +/** + * A specialized pseudo-event module to help keep track of components waiting to + * be notified when their DOM representations are available for use. + * + * This implements `PooledClass`, so you should never need to instantiate this. + * Instead, use `CallbackQueue.getPooled()`. + * + * @class ReactMountReady + * @implements PooledClass + * @internal + */ + +var CallbackQueue = function () { + function CallbackQueue(arg) { + _classCallCheck(this, CallbackQueue); + + this._callbacks = null; + this._contexts = null; + this._arg = arg; + } + + /** + * Enqueues a callback to be invoked when `notifyAll` is invoked. + * + * @param {function} callback Invoked when `notifyAll` is invoked. + * @param {?object} context Context to call `callback` with. + * @internal + */ + + + CallbackQueue.prototype.enqueue = function enqueue(callback, context) { + this._callbacks = this._callbacks || []; + this._callbacks.push(callback); + this._contexts = this._contexts || []; + this._contexts.push(context); + }; + + /** + * Invokes all enqueued callbacks and clears the queue. This is invoked after + * the DOM representation of a component has been created or updated. + * + * @internal + */ + + + CallbackQueue.prototype.notifyAll = function notifyAll() { + var callbacks = this._callbacks; + var contexts = this._contexts; + var arg = this._arg; + if (callbacks && contexts) { + !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0; + this._callbacks = null; + this._contexts = null; + for (var i = 0; i < callbacks.length; i++) { + callbacks[i].call(contexts[i], arg); + } + callbacks.length = 0; + contexts.length = 0; + } + }; + + CallbackQueue.prototype.checkpoint = function checkpoint() { + return this._callbacks ? this._callbacks.length : 0; + }; + + CallbackQueue.prototype.rollback = function rollback(len) { + if (this._callbacks && this._contexts) { + this._callbacks.length = len; + this._contexts.length = len; + } + }; + + /** + * Resets the internal queue. + * + * @internal + */ + + + CallbackQueue.prototype.reset = function reset() { + this._callbacks = null; + this._contexts = null; + }; + + /** + * `PooledClass` looks for this. + */ + + + CallbackQueue.prototype.destructor = function destructor() { + this.reset(); + }; + + return CallbackQueue; +}(); + +module.exports = PooledClass.addPoolingTo(CallbackQueue); +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactFeatureFlags = { + // When true, call console.time() before and .timeEnd() after each top-level + // render (both initial renders and updates). Useful when looking at prod-mode + // timeline profiles in Chrome, for example. + logTopLevelRenders: false +}; + +module.exports = ReactFeatureFlags; + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/** + * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + */ + +var supportedInputTypes = { + 'color': true, + 'date': true, + 'datetime': true, + 'datetime-local': true, + 'email': true, + 'month': true, + 'number': true, + 'password': true, + 'range': true, + 'search': true, + 'tel': true, + 'text': true, + 'time': true, + 'url': true, + 'week': true +}; + +function isTextInputElement(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + + if (nodeName === 'input') { + return !!supportedInputTypes[elem.type]; + } + + if (nodeName === 'textarea') { + return true; + } + + return false; +} + +module.exports = isTextInputElement; + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ViewportMetrics = { + + currentScrollLeft: 0, + + currentScrollTop: 0, + + refreshScrollValues: function (scrollPosition) { + ViewportMetrics.currentScrollLeft = scrollPosition.x; + ViewportMetrics.currentScrollTop = scrollPosition.y; + } + +}; + +module.exports = ViewportMetrics; + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(18); +var escapeTextContentForBrowser = __webpack_require__(102); +var setInnerHTML = __webpack_require__(101); + +/** + * Set the textContent property of a node, ensuring that whitespace is preserved + * even in IE8. innerText is a poor substitute for textContent and, among many + * issues, inserts <br> instead of the literal newline chars. innerHTML behaves + * as it should. + * + * @param {DOMElement} node + * @param {string} text + * @internal + */ +var setTextContent = function (node, text) { + if (text) { + var firstChild = node.firstChild; + + if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) { + firstChild.nodeValue = text; + return; + } + } + node.textContent = text; +}; + +if (ExecutionEnvironment.canUseDOM) { + if (!('textContent' in document.documentElement)) { + setTextContent = function (node, text) { + if (node.nodeType === 3) { + node.nodeValue = text; + return; + } + setInnerHTML(node, escapeTextContentForBrowser(text)); + }; + } +} + +module.exports = setTextContent; + +/***/ }), +/* 227 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * @param {DOMElement} node input/textarea to focus + */ + +function focusNode(node) { + // IE8 can throw "Can't move focus to the control because it is invisible, + // not enabled, or of a type that does not accept the focus." for all kinds of + // reasons that are too expensive and fragile to test. + try { + node.focus(); + } catch (e) {} +} + +module.exports = focusNode; + +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * CSS properties which accept numbers but are not in units of "px". + */ + +var isUnitlessNumber = { + animationIterationCount: true, + borderImageOutset: true, + borderImageSlice: true, + borderImageWidth: true, + boxFlex: true, + boxFlexGroup: true, + boxOrdinalGroup: true, + columnCount: true, + flex: true, + flexGrow: true, + flexPositive: true, + flexShrink: true, + flexNegative: true, + flexOrder: true, + gridRow: true, + gridColumn: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + tabSize: true, + widows: true, + zIndex: true, + zoom: true, + + // SVG-related properties + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeDasharray: true, + strokeDashoffset: true, + strokeMiterlimit: true, + strokeOpacity: true, + strokeWidth: true +}; + +/** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ +function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); +} + +/** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ +var prefixes = ['Webkit', 'ms', 'Moz', 'O']; + +// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an +// infinite loop, because it iterates over the newly added props too. +Object.keys(isUnitlessNumber).forEach(function (prop) { + prefixes.forEach(function (prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); +}); + +/** + * Most style properties can be unset by doing .style[prop] = '' but IE8 + * doesn't like doing that with shorthand properties so for the properties that + * IE8 breaks on, which are listed here, we instead unset each of the + * individual properties. See http://bugs.jquery.com/ticket/12385. + * The 4-value 'clock' properties like margin, padding, border-width seem to + * behave without any problems. Curiously, list-style works too without any + * special prodding. + */ +var shorthandPropertyExpansions = { + background: { + backgroundAttachment: true, + backgroundColor: true, + backgroundImage: true, + backgroundPositionX: true, + backgroundPositionY: true, + backgroundRepeat: true + }, + backgroundPosition: { + backgroundPositionX: true, + backgroundPositionY: true + }, + border: { + borderWidth: true, + borderStyle: true, + borderColor: true + }, + borderBottom: { + borderBottomWidth: true, + borderBottomStyle: true, + borderBottomColor: true + }, + borderLeft: { + borderLeftWidth: true, + borderLeftStyle: true, + borderLeftColor: true + }, + borderRight: { + borderRightWidth: true, + borderRightStyle: true, + borderRightColor: true + }, + borderTop: { + borderTopWidth: true, + borderTopStyle: true, + borderTopColor: true + }, + font: { + fontStyle: true, + fontVariant: true, + fontWeight: true, + fontSize: true, + lineHeight: true, + fontFamily: true + }, + outline: { + outlineWidth: true, + outlineStyle: true, + outlineColor: true + } +}; + +var CSSProperty = { + isUnitlessNumber: isUnitlessNumber, + shorthandPropertyExpansions: shorthandPropertyExpansions +}; + +module.exports = CSSProperty; + +/***/ }), +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMProperty = __webpack_require__(42); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactInstrumentation = __webpack_require__(23); + +var quoteAttributeValueForBrowser = __webpack_require__(410); +var warning = __webpack_require__(11); + +var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); +var illegalAttributeNameCache = {}; +var validatedAttributeNameCache = {}; + +function isAttributeNameSafe(attributeName) { + if (validatedAttributeNameCache.hasOwnProperty(attributeName)) { + return true; + } + if (illegalAttributeNameCache.hasOwnProperty(attributeName)) { + return false; + } + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + illegalAttributeNameCache[attributeName] = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0; + return false; +} + +function shouldIgnoreValue(propertyInfo, value) { + return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false; +} + +/** + * Operations for dealing with DOM properties. + */ +var DOMPropertyOperations = { + + /** + * Creates markup for the ID property. + * + * @param {string} id Unescaped ID. + * @return {string} Markup string. + */ + createMarkupForID: function (id) { + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id); + }, + + setAttributeForID: function (node, id) { + node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id); + }, + + createMarkupForRoot: function () { + return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""'; + }, + + setAttributeForRoot: function (node) { + node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, ''); + }, + + /** + * Creates markup for a property. + * + * @param {string} name + * @param {*} value + * @return {?string} Markup string, or null if the property was invalid. + */ + createMarkupForProperty: function (name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + if (shouldIgnoreValue(propertyInfo, value)) { + return ''; + } + var attributeName = propertyInfo.attributeName; + if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) { + return attributeName + '=""'; + } + return attributeName + '=' + quoteAttributeValueForBrowser(value); + } else if (DOMProperty.isCustomAttribute(name)) { + if (value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + } + return null; + }, + + /** + * Creates markup for a custom property. + * + * @param {string} name + * @param {*} value + * @return {string} Markup string, or empty string if the property was invalid. + */ + createMarkupForCustomAttribute: function (name, value) { + if (!isAttributeNameSafe(name) || value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + }, + + /** + * Sets the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + * @param {*} value + */ + setValueForProperty: function (node, name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; + if (mutationMethod) { + mutationMethod(node, value); + } else if (shouldIgnoreValue(propertyInfo, value)) { + this.deleteValueForProperty(node, name); + return; + } else if (propertyInfo.mustUseProperty) { + // Contrary to `setAttribute`, object properties are properly + // `toString`ed by IE8/9. + node[propertyInfo.propertyName] = value; + } else { + var attributeName = propertyInfo.attributeName; + var namespace = propertyInfo.attributeNamespace; + // `setAttribute` with objects becomes only `[object]` in IE8/9, + // ('' + value) makes it output the correct toString()-value. + if (namespace) { + node.setAttributeNS(namespace, attributeName, '' + value); + } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) { + node.setAttribute(attributeName, ''); + } else { + node.setAttribute(attributeName, '' + value); + } + } + } else if (DOMProperty.isCustomAttribute(name)) { + DOMPropertyOperations.setValueForAttribute(node, name, value); + return; + } + + if (process.env.NODE_ENV !== 'production') { + var payload = {}; + payload[name] = value; + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'update attribute', + payload: payload + }); + } + }, + + setValueForAttribute: function (node, name, value) { + if (!isAttributeNameSafe(name)) { + return; + } + if (value == null) { + node.removeAttribute(name); + } else { + node.setAttribute(name, '' + value); + } + + if (process.env.NODE_ENV !== 'production') { + var payload = {}; + payload[name] = value; + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'update attribute', + payload: payload + }); + } + }, + + /** + * Deletes an attributes from a node. + * + * @param {DOMElement} node + * @param {string} name + */ + deleteValueForAttribute: function (node, name) { + node.removeAttribute(name); + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'remove attribute', + payload: name + }); + } + }, + + /** + * Deletes the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + */ + deleteValueForProperty: function (node, name) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; + if (mutationMethod) { + mutationMethod(node, undefined); + } else if (propertyInfo.mustUseProperty) { + var propName = propertyInfo.propertyName; + if (propertyInfo.hasBooleanValue) { + node[propName] = false; + } else { + node[propName] = ''; + } + } else { + node.removeAttribute(propertyInfo.attributeName); + } + } else if (DOMProperty.isCustomAttribute(name)) { + node.removeAttribute(name); + } + + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'remove attribute', + payload: name + }); + } + } + +}; + +module.exports = DOMPropertyOperations; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + +/***/ }), +/* 231 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var LinkedValueUtils = __webpack_require__(150); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactUpdates = __webpack_require__(29); + +var warning = __webpack_require__(11); + +var didWarnValueLink = false; +var didWarnValueDefaultValue = false; + +function updateOptionsIfPendingUpdateAndMounted() { + if (this._rootNodeID && this._wrapperState.pendingUpdate) { + this._wrapperState.pendingUpdate = false; + + var props = this._currentElement.props; + var value = LinkedValueUtils.getValue(props); + + if (value != null) { + updateOptions(this, Boolean(props.multiple), value); + } + } +} + +function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +var valuePropNames = ['value', 'defaultValue']; + +/** + * Validation function for `value` and `defaultValue`. + * @private + */ +function checkSelectPropTypes(inst, props) { + var owner = inst._currentElement._owner; + LinkedValueUtils.checkPropTypes('select', props, owner); + + if (props.valueLink !== undefined && !didWarnValueLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnValueLink = true; + } + + for (var i = 0; i < valuePropNames.length; i++) { + var propName = valuePropNames[i]; + if (props[propName] == null) { + continue; + } + var isArray = Array.isArray(props[propName]); + if (props.multiple && !isArray) { + process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0; + } else if (!props.multiple && isArray) { + process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0; + } + } +} + +/** + * @param {ReactDOMComponent} inst + * @param {boolean} multiple + * @param {*} propValue A stringable (with `multiple`, a list of stringables). + * @private + */ +function updateOptions(inst, multiple, propValue) { + var selectedValue, i; + var options = ReactDOMComponentTree.getNodeFromInstance(inst).options; + + if (multiple) { + selectedValue = {}; + for (i = 0; i < propValue.length; i++) { + selectedValue['' + propValue[i]] = true; + } + for (i = 0; i < options.length; i++) { + var selected = selectedValue.hasOwnProperty(options[i].value); + if (options[i].selected !== selected) { + options[i].selected = selected; + } + } + } else { + // Do not set `select.value` as exact behavior isn't consistent across all + // browsers for all cases. + selectedValue = '' + propValue; + for (i = 0; i < options.length; i++) { + if (options[i].value === selectedValue) { + options[i].selected = true; + return; + } + } + if (options.length) { + options[0].selected = true; + } + } +} + +/** + * Implements a <select> host component that allows optionally setting the + * props `value` and `defaultValue`. If `multiple` is false, the prop must be a + * stringable. If `multiple` is true, the prop must be an array of stringables. + * + * If `value` is not supplied (or null/undefined), user actions that change the + * selected option will trigger updates to the rendered options. + * + * If it is supplied (and not null/undefined), the rendered options will not + * update in response to user actions. Instead, the `value` prop must change in + * order for the rendered options to update. + * + * If `defaultValue` is provided, any options with the supplied values will be + * selected. + */ +var ReactDOMSelect = { + getHostProps: function (inst, props) { + return _assign({}, props, { + onChange: inst._wrapperState.onChange, + value: undefined + }); + }, + + mountWrapper: function (inst, props) { + if (process.env.NODE_ENV !== 'production') { + checkSelectPropTypes(inst, props); + } + + var value = LinkedValueUtils.getValue(props); + inst._wrapperState = { + pendingUpdate: false, + initialValue: value != null ? value : props.defaultValue, + listeners: null, + onChange: _handleChange.bind(inst), + wasMultiple: Boolean(props.multiple) + }; + + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0; + didWarnValueDefaultValue = true; + } + }, + + getSelectValueContext: function (inst) { + // ReactDOMOption looks at this initial value so the initial generated + // markup has correct `selected` attributes + return inst._wrapperState.initialValue; + }, + + postUpdateWrapper: function (inst) { + var props = inst._currentElement.props; + + // After the initial mount, we control selected-ness manually so don't pass + // this value down + inst._wrapperState.initialValue = undefined; + + var wasMultiple = inst._wrapperState.wasMultiple; + inst._wrapperState.wasMultiple = Boolean(props.multiple); + + var value = LinkedValueUtils.getValue(props); + if (value != null) { + inst._wrapperState.pendingUpdate = false; + updateOptions(inst, Boolean(props.multiple), value); + } else if (wasMultiple !== Boolean(props.multiple)) { + // For simplicity, reapply `defaultValue` if `multiple` is toggled. + if (props.defaultValue != null) { + updateOptions(inst, Boolean(props.multiple), props.defaultValue); + } else { + // Revert the select back to its default unselected state. + updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : ''); + } + } + } +}; + +function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); + + if (this._rootNodeID) { + this._wrapperState.pendingUpdate = true; + } + ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this); + return returnValue; +} + +module.exports = ReactDOMSelect; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 232 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); + +var ReactCompositeComponent = __webpack_require__(418); +var ReactEmptyComponent = __webpack_require__(234); +var ReactHostComponent = __webpack_require__(235); + +var getNextDebugID = __webpack_require__(421); +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +// To avoid a cyclic dependency, we create the final class in this module +var ReactCompositeComponentWrapper = function (element) { + this.construct(element); +}; +_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, { + _instantiateReactComponent: instantiateReactComponent +}); + +function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +/** + * Check if the type reference is a known internal type. I.e. not a user + * provided composite type. + * + * @param {function} type + * @return {boolean} Returns true if this is a valid internal type. + */ +function isInternalComponentType(type) { + return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function'; +} + +/** + * Given a ReactNode, create an instance that will actually be mounted. + * + * @param {ReactNode} node + * @param {boolean} shouldHaveDebugID + * @return {object} A new instance of the element's constructor. + * @protected + */ +function instantiateReactComponent(node, shouldHaveDebugID) { + var instance; + + if (node === null || node === false) { + instance = ReactEmptyComponent.create(instantiateReactComponent); + } else if (typeof node === 'object') { + var element = node; + var type = element.type; + if (typeof type !== 'function' && typeof type !== 'string') { + var info = ''; + if (process.env.NODE_ENV !== 'production') { + if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { + info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.'; + } + } + info += getDeclarationErrorAddendum(element._owner); + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0; + } + + // Special case string values + if (typeof element.type === 'string') { + instance = ReactHostComponent.createInternalComponent(element); + } else if (isInternalComponentType(element.type)) { + // This is temporarily available for custom components that are not string + // representations. I.e. ART. Once those are updated to use the string + // representation, we can drop this code path. + instance = new element.type(element); + + // We renamed this. Allow the old name for compat. :( + if (!instance.getHostNode) { + instance.getHostNode = instance.getNativeNode; + } + } else { + instance = new ReactCompositeComponentWrapper(element); + } + } else if (typeof node === 'string' || typeof node === 'number') { + instance = ReactHostComponent.createInstanceForText(node); + } else { + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0; + } + + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0; + } + + // These two fields are used by the DOM and ART diffing algorithms + // respectively. Instead of using expandos on components, we should be + // storing the state needed by the diffing algorithms elsewhere. + instance._mountIndex = 0; + instance._mountImage = null; + + if (process.env.NODE_ENV !== 'production') { + instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0; + } + + // Internal instances should fully constructed at this point, so they should + // not get any new fields added to them at this point. + if (process.env.NODE_ENV !== 'production') { + if (Object.preventExtensions) { + Object.preventExtensions(instance); + } + } + + return instance; +} + +module.exports = instantiateReactComponent; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var React = __webpack_require__(52); + +var invariant = __webpack_require__(10); + +var ReactNodeTypes = { + HOST: 0, + COMPOSITE: 1, + EMPTY: 2, + + getType: function (node) { + if (node === null || node === false) { + return ReactNodeTypes.EMPTY; + } else if (React.isValidElement(node)) { + if (typeof node.type === 'function') { + return ReactNodeTypes.COMPOSITE; + } else { + return ReactNodeTypes.HOST; + } + } + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0; + } +}; + +module.exports = ReactNodeTypes; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var emptyComponentFactory; + +var ReactEmptyComponentInjection = { + injectEmptyComponentFactory: function (factory) { + emptyComponentFactory = factory; + } +}; + +var ReactEmptyComponent = { + create: function (instantiate) { + return emptyComponentFactory(instantiate); + } +}; + +ReactEmptyComponent.injection = ReactEmptyComponentInjection; + +module.exports = ReactEmptyComponent; + +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(10); + +var genericComponentClass = null; +var textComponentClass = null; + +var ReactHostComponentInjection = { + // This accepts a class that receives the tag string. This is a catch all + // that can render any kind of tag. + injectGenericComponentClass: function (componentClass) { + genericComponentClass = componentClass; + }, + // This accepts a text component class that takes the text string to be + // rendered as props. + injectTextComponentClass: function (componentClass) { + textComponentClass = componentClass; + } +}; + +/** + * Get a host internal component class for a specific tag. + * + * @param {ReactElement} element The element to create. + * @return {function} The internal class constructor function. + */ +function createInternalComponent(element) { + !genericComponentClass ? process.env.NODE_ENV !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0; + return new genericComponentClass(element); +} + +/** + * @param {ReactText} text + * @return {ReactComponent} + */ +function createInstanceForText(text) { + return new textComponentClass(text); +} + +/** + * @param {ReactComponent} component + * @return {boolean} + */ +function isTextComponent(component) { + return component instanceof textComponentClass; +} + +var ReactHostComponent = { + createInternalComponent: createInternalComponent, + createInstanceForText: createInstanceForText, + isTextComponent: isTextComponent, + injection: ReactHostComponentInjection +}; + +module.exports = ReactHostComponent; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var ReactCurrentOwner = __webpack_require__(27); +var REACT_ELEMENT_TYPE = __webpack_require__(422); + +var getIteratorFn = __webpack_require__(423); +var invariant = __webpack_require__(10); +var KeyEscapeUtils = __webpack_require__(153); +var warning = __webpack_require__(11); + +var SEPARATOR = '.'; +var SUBSEPARATOR = ':'; + +/** + * This is inlined from ReactElement since this file is shared between + * isomorphic and renderers. We could extract this to a + * + */ + +/** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + +var didWarnAboutMaps = false; + +/** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ +function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if (component && typeof component === 'object' && component.key != null) { + // Explicit key + return KeyEscapeUtils.escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); +} + +/** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if (children === null || type === 'string' || type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { + callback(traverseContext, children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + if (process.env.NODE_ENV !== 'production') { + var mapsAsChildrenAddendum = ''; + if (ReactCurrentOwner.current) { + var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName(); + if (mapsAsChildrenOwnerName) { + mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.'; + } + } + process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0; + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } + } + } else if (type === 'object') { + var addendum = ''; + if (process.env.NODE_ENV !== 'production') { + addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.'; + if (children._isReactElement) { + addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.'; + } + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + addendum += ' Check the render method of `' + name + '`.'; + } + } + } + var childrenString = String(children); + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0; + } + } + + return subtreeCount; +} + +/** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', callback, traverseContext); +} + +module.exports = traverseAllChildren; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 237 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @typechecks + */ + +var emptyFunction = __webpack_require__(21); + +/** + * Upstream version of event listener. Does not take into account specific + * nature of platform. + */ +var EventListener = { + /** + * Listen to DOM events during the bubble phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + listen: function listen(target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, false); + return { + remove: function remove() { + target.removeEventListener(eventType, callback, false); + } + }; + } else if (target.attachEvent) { + target.attachEvent('on' + eventType, callback); + return { + remove: function remove() { + target.detachEvent('on' + eventType, callback); + } + }; + } + }, + + /** + * Listen to DOM events during the capture phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + capture: function capture(target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, true); + return { + remove: function remove() { + target.removeEventListener(eventType, callback, true); + } + }; + } else { + if (process.env.NODE_ENV !== 'production') { + console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.'); + } + return { + remove: emptyFunction + }; + } + }, + + registerDefault: function registerDefault() {} +}; + +module.exports = EventListener; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 238 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMSelection = __webpack_require__(435); + +var containsNode = __webpack_require__(437); +var focusNode = __webpack_require__(227); +var getActiveElement = __webpack_require__(239); + +function isInDocument(node) { + return containsNode(document.documentElement, node); +} + +/** + * @ReactInputSelection: React input selection module. Based on Selection.js, + * but modified to be suitable for react and has a couple of bug fixes (doesn't + * assume buttons have range selections allowed). + * Input selection module for React. + */ +var ReactInputSelection = { + + hasSelectionCapabilities: function (elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true'); + }, + + getSelectionInformation: function () { + var focusedElem = getActiveElement(); + return { + focusedElem: focusedElem, + selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null + }; + }, + + /** + * @restoreSelection: If any selection information was potentially lost, + * restore it. This is useful when performing operations that could remove dom + * nodes and place them back in, resulting in focus being lost. + */ + restoreSelection: function (priorSelectionInformation) { + var curFocusedElem = getActiveElement(); + var priorFocusedElem = priorSelectionInformation.focusedElem; + var priorSelectionRange = priorSelectionInformation.selectionRange; + if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { + if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) { + ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange); + } + focusNode(priorFocusedElem); + } + }, + + /** + * @getSelection: Gets the selection bounds of a focused textarea, input or + * contentEditable node. + * -@input: Look up selection bounds of this input + * -@return {start: selectionStart, end: selectionEnd} + */ + getSelection: function (input) { + var selection; + + if ('selectionStart' in input) { + // Modern browser with input or textarea. + selection = { + start: input.selectionStart, + end: input.selectionEnd + }; + } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { + // IE8 input. + var range = document.selection.createRange(); + // There can only be one selection per document in IE, so it must + // be in our element. + if (range.parentElement() === input) { + selection = { + start: -range.moveStart('character', -input.value.length), + end: -range.moveEnd('character', -input.value.length) + }; + } + } else { + // Content editable or old IE textarea. + selection = ReactDOMSelection.getOffsets(input); + } + + return selection || { start: 0, end: 0 }; + }, + + /** + * @setSelection: Sets the selection bounds of a textarea or input and focuses + * the input. + * -@input Set selection bounds of this input or textarea + * -@offsets Object of same form that is returned from get* + */ + setSelection: function (input, offsets) { + var start = offsets.start; + var end = offsets.end; + if (end === undefined) { + end = start; + } + + if ('selectionStart' in input) { + input.selectionStart = start; + input.selectionEnd = Math.min(end, input.value.length); + } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') { + var range = input.createTextRange(); + range.collapse(true); + range.moveStart('character', start); + range.moveEnd('character', end - start); + range.select(); + } else { + ReactDOMSelection.setOffsets(input, offsets); + } + } +}; + +module.exports = ReactInputSelection; + +/***/ }), +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +/* eslint-disable fb-www/typeof-undefined */ + +/** + * Same as document.activeElement but wraps in a try-catch block. In IE it is + * not safe to call document.activeElement if there is nothing focused. + * + * The activeElement will be null only if the document or document body is not + * yet defined. + * + * @param {?DOMDocument} doc Defaults to current document. + * @return {?DOMElement} + */ +function getActiveElement(doc) /*?DOMElement*/{ + doc = doc || (typeof document !== 'undefined' ? document : undefined); + if (typeof doc === 'undefined') { + return null; + } + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } +} + +module.exports = getActiveElement; + +/***/ }), +/* 240 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var DOMLazyTree = __webpack_require__(68); +var DOMProperty = __webpack_require__(42); +var React = __webpack_require__(52); +var ReactBrowserEventEmitter = __webpack_require__(103); +var ReactCurrentOwner = __webpack_require__(27); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactDOMContainerInfo = __webpack_require__(452); +var ReactDOMFeatureFlags = __webpack_require__(453); +var ReactFeatureFlags = __webpack_require__(223); +var ReactInstanceMap = __webpack_require__(80); +var ReactInstrumentation = __webpack_require__(23); +var ReactMarkupChecksum = __webpack_require__(454); +var ReactReconciler = __webpack_require__(67); +var ReactUpdateQueue = __webpack_require__(154); +var ReactUpdates = __webpack_require__(29); + +var emptyObject = __webpack_require__(95); +var instantiateReactComponent = __webpack_require__(232); +var invariant = __webpack_require__(10); +var setInnerHTML = __webpack_require__(101); +var shouldUpdateReactComponent = __webpack_require__(152); +var warning = __webpack_require__(11); + +var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; +var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME; + +var ELEMENT_NODE_TYPE = 1; +var DOC_NODE_TYPE = 9; +var DOCUMENT_FRAGMENT_NODE_TYPE = 11; + +var instancesByReactRootID = {}; + +/** + * Finds the index of the first character + * that's not common between the two given strings. + * + * @return {number} the index of the character where the strings diverge + */ +function firstDifferenceIndex(string1, string2) { + var minLen = Math.min(string1.length, string2.length); + for (var i = 0; i < minLen; i++) { + if (string1.charAt(i) !== string2.charAt(i)) { + return i; + } + } + return string1.length === string2.length ? -1 : minLen; +} + +/** + * @param {DOMElement|DOMDocument} container DOM element that may contain + * a React component + * @return {?*} DOM element that may have the reactRoot ID, or null. + */ +function getReactRootElementInContainer(container) { + if (!container) { + return null; + } + + if (container.nodeType === DOC_NODE_TYPE) { + return container.documentElement; + } else { + return container.firstChild; + } +} + +function internalGetID(node) { + // If node is something like a window, document, or text node, none of + // which support attributes or a .getAttribute method, gracefully return + // the empty string, as if the attribute were missing. + return node.getAttribute && node.getAttribute(ATTR_NAME) || ''; +} + +/** + * Mounts this component and inserts it into the DOM. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {DOMElement} container DOM element to mount into. + * @param {ReactReconcileTransaction} transaction + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ +function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) { + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var wrappedElement = wrapperInstance._currentElement.props.child; + var type = wrappedElement.type; + markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name); + console.time(markerName); + } + + var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */ + ); + + if (markerName) { + console.timeEnd(markerName); + } + + wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance; + ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction); +} + +/** + * Batched mount. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {DOMElement} container DOM element to mount into. + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ +function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) { + var transaction = ReactUpdates.ReactReconcileTransaction.getPooled( + /* useCreateElement */ + !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement); + transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context); + ReactUpdates.ReactReconcileTransaction.release(transaction); +} + +/** + * Unmounts a component and removes it from the DOM. + * + * @param {ReactComponent} instance React component instance. + * @param {DOMElement} container DOM element to unmount from. + * @final + * @internal + * @see {ReactMount.unmountComponentAtNode} + */ +function unmountComponentFromNode(instance, container, safely) { + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onBeginFlush(); + } + ReactReconciler.unmountComponent(instance, safely); + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onEndFlush(); + } + + if (container.nodeType === DOC_NODE_TYPE) { + container = container.documentElement; + } + + // http://jsperf.com/emptying-a-node + while (container.lastChild) { + container.removeChild(container.lastChild); + } +} + +/** + * True if the supplied DOM node has a direct React-rendered child that is + * not a React root element. Useful for warning in `render`, + * `unmountComponentAtNode`, etc. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM element contains a direct child that was + * rendered by React but is not a root element. + * @internal + */ +function hasNonRootReactChild(container) { + var rootEl = getReactRootElementInContainer(container); + if (rootEl) { + var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl); + return !!(inst && inst._hostParent); + } +} + +/** + * True if the supplied DOM node is a React DOM element and + * it has been rendered by another copy of React. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM has been rendered by another copy of React + * @internal + */ +function nodeIsRenderedByOtherInstance(container) { + var rootEl = getReactRootElementInContainer(container); + return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl)); +} + +/** + * True if the supplied DOM node is a valid node element. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM is a valid DOM node. + * @internal + */ +function isValidContainer(node) { + return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)); +} + +/** + * True if the supplied DOM node is a valid React node element. + * + * @param {?DOMElement} node The candidate DOM node. + * @return {boolean} True if the DOM is a valid React DOM node. + * @internal + */ +function isReactNode(node) { + return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME)); +} + +function getHostRootInstanceInContainer(container) { + var rootEl = getReactRootElementInContainer(container); + var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl); + return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null; +} + +function getTopLevelWrapperInContainer(container) { + var root = getHostRootInstanceInContainer(container); + return root ? root._hostContainerInfo._topLevelWrapper : null; +} + +/** + * Temporary (?) hack so that we can store all top-level pending updates on + * composites instead of having to worry about different types of components + * here. + */ +var topLevelRootCounter = 1; +var TopLevelWrapper = function () { + this.rootID = topLevelRootCounter++; +}; +TopLevelWrapper.prototype.isReactComponent = {}; +if (process.env.NODE_ENV !== 'production') { + TopLevelWrapper.displayName = 'TopLevelWrapper'; +} +TopLevelWrapper.prototype.render = function () { + return this.props.child; +}; +TopLevelWrapper.isReactTopLevelWrapper = true; + +/** + * Mounting is the process of initializing a React component by creating its + * representative DOM elements and inserting them into a supplied `container`. + * Any prior content inside `container` is destroyed in the process. + * + * ReactMount.render( + * component, + * document.getElementById('container') + * ); + * + * <div id="container"> <-- Supplied `container`. + * <div data-reactid=".3"> <-- Rendered reactRoot of React + * // ... component. + * </div> + * </div> + * + * Inside of `container`, the first element rendered is the "reactRoot". + */ +var ReactMount = { + + TopLevelWrapper: TopLevelWrapper, + + /** + * Used by devtools. The keys are not important. + */ + _instancesByReactRootID: instancesByReactRootID, + + /** + * This is a hook provided to support rendering React components while + * ensuring that the apparent scroll position of its `container` does not + * change. + * + * @param {DOMElement} container The `container` being rendered into. + * @param {function} renderCallback This must be called once to do the render. + */ + scrollMonitor: function (container, renderCallback) { + renderCallback(); + }, + + /** + * Take a component that's already mounted into the DOM and replace its props + * @param {ReactComponent} prevComponent component instance already in the DOM + * @param {ReactElement} nextElement component instance to render + * @param {DOMElement} container container to render into + * @param {?function} callback function triggered on completion + */ + _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) { + ReactMount.scrollMonitor(container, function () { + ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext); + if (callback) { + ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback); + } + }); + + return prevComponent; + }, + + /** + * Render a new component into the DOM. Hooked by hooks! + * + * @param {ReactElement} nextElement element to render + * @param {DOMElement} container container to render into + * @param {boolean} shouldReuseMarkup if we should skip the markup insertion + * @return {ReactComponent} nextComponent + */ + _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. + process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0; + + !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0; + + ReactBrowserEventEmitter.ensureScrollValueMonitoring(); + var componentInstance = instantiateReactComponent(nextElement, false); + + // The initial render is synchronous but any updates that happen during + // rendering, in componentWillMount or componentDidMount, will be batched + // according to the current batching strategy. + + ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context); + + var wrapperID = componentInstance._instance.rootID; + instancesByReactRootID[wrapperID] = componentInstance; + + return componentInstance; + }, + + /** + * Renders a React component into the DOM in the supplied `container`. + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. + * + * @param {ReactComponent} parentComponent The conceptual parent of this render tree. + * @param {ReactElement} nextElement Component element to render. + * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion + * @return {ReactComponent} Component instance rendered in `container`. + */ + renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { + !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0; + return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback); + }, + + _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) { + ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render'); + !React.isValidElement(nextElement) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : + // Check if it quacks like an element + nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0; + + process.env.NODE_ENV !== 'production' ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0; + + var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement }); + + var nextContext; + if (parentComponent) { + var parentInst = ReactInstanceMap.get(parentComponent); + nextContext = parentInst._processChildContext(parentInst._context); + } else { + nextContext = emptyObject; + } + + var prevComponent = getTopLevelWrapperInContainer(container); + + if (prevComponent) { + var prevWrappedElement = prevComponent._currentElement; + var prevElement = prevWrappedElement.props.child; + if (shouldUpdateReactComponent(prevElement, nextElement)) { + var publicInst = prevComponent._renderedComponent.getPublicInstance(); + var updatedCallback = callback && function () { + callback.call(publicInst); + }; + ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback); + return publicInst; + } else { + ReactMount.unmountComponentAtNode(container); + } + } + + var reactRootElement = getReactRootElementInContainer(container); + var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement); + var containerHasNonRootReactChild = hasNonRootReactChild(container); + + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0; + + if (!containerHasReactMarkup || reactRootElement.nextSibling) { + var rootElementSibling = reactRootElement; + while (rootElementSibling) { + if (internalGetID(rootElementSibling)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0; + break; + } + rootElementSibling = rootElementSibling.nextSibling; + } + } + } + + var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild; + var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance(); + if (callback) { + callback.call(component); + } + return component; + }, + + /** + * Renders a React component into the DOM in the supplied `container`. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. + * + * @param {ReactElement} nextElement Component element to render. + * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion + * @return {ReactComponent} Component instance rendered in `container`. + */ + render: function (nextElement, container, callback) { + return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback); + }, + + /** + * Unmounts and destroys the React component rendered in the `container`. + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode + * + * @param {DOMElement} container DOM element containing a React component. + * @return {boolean} True if a component was found in and unmounted from + * `container` + */ + unmountComponentAtNode: function (container) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (Strictly speaking, unmounting won't cause a + // render but we still don't expect to be in a render call here.) + process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0; + + !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0; + + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0; + } + + var prevComponent = getTopLevelWrapperInContainer(container); + if (!prevComponent) { + // Check if the node being unmounted was rendered by React, but isn't a + // root node. + var containerHasNonRootReactChild = hasNonRootReactChild(container); + + // Check if the container itself is a React root node. + var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME); + + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0; + } + + return false; + } + delete instancesByReactRootID[prevComponent._instance.rootID]; + ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false); + return true; + }, + + _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) { + !isValidContainer(container) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0; + + if (shouldReuseMarkup) { + var rootElement = getReactRootElementInContainer(container); + if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) { + ReactDOMComponentTree.precacheNode(instance, rootElement); + return; + } else { + var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + + var rootMarkup = rootElement.outerHTML; + rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum); + + var normalizedMarkup = markup; + if (process.env.NODE_ENV !== 'production') { + // because rootMarkup is retrieved from the DOM, various normalizations + // will have occurred which will not be present in `markup`. Here, + // insert markup into a <div> or <iframe> depending on the container + // type to perform the same normalizations before comparing. + var normalizer; + if (container.nodeType === ELEMENT_NODE_TYPE) { + normalizer = document.createElement('div'); + normalizer.innerHTML = markup; + normalizedMarkup = normalizer.innerHTML; + } else { + normalizer = document.createElement('iframe'); + document.body.appendChild(normalizer); + normalizer.contentDocument.write(markup); + normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML; + document.body.removeChild(normalizer); + } + } + + var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup); + var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20); + + !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s', difference) : _prodInvariant('42', difference) : void 0; + + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : void 0; + } + } + } + + !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document but you didn\'t use server rendering. We can\'t do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('43') : void 0; + + if (transaction.useCreateElement) { + while (container.lastChild) { + container.removeChild(container.lastChild); + } + DOMLazyTree.insertTreeBefore(container, markup, null); + } else { + setInnerHTML(container, markup); + ReactDOMComponentTree.precacheNode(instance, container.firstChild); + } + + if (process.env.NODE_ENV !== 'production') { + var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild); + if (hostNode._debugID !== 0) { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: hostNode._debugID, + type: 'mount', + payload: markup.toString() + }); + } + } + } +}; + +module.exports = ReactMount; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 241 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactNodeTypes = __webpack_require__(233); + +function getHostComponentFromComposite(inst) { + var type; + + while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) { + inst = inst._renderedComponent; + } + + if (type === ReactNodeTypes.HOST) { + return inst._renderedComponent; + } else if (type === ReactNodeTypes.EMPTY) { + return null; + } +} + +module.exports = getHostComponentFromComposite; + +/***/ }), +/* 242 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _toConsumableArray2 = __webpack_require__(76); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _toArray2 = __webpack_require__(243); + +var _toArray3 = _interopRequireDefault(_toArray2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactAddonsTransitionGroup = __webpack_require__(105); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +var _dom = __webpack_require__(244); + +var _dom2 = _interopRequireDefault(_dom); + +var _CircleRipple = __webpack_require__(467); + +var _CircleRipple2 = _interopRequireDefault(_CircleRipple); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Remove the first element of the array +var shift = function shift(_ref) { + var _ref2 = (0, _toArray3.default)(_ref), + newArray = _ref2.slice(1); + + return newArray; +}; + +var TouchRipple = function (_Component) { + (0, _inherits3.default)(TouchRipple, _Component); + + function TouchRipple(props, context) { + (0, _classCallCheck3.default)(this, TouchRipple); + + // Touch start produces a mouse down event for compat reasons. To avoid + // showing ripples twice we skip showing a ripple for the first mouse down + // after a touch start. Note we don't store ignoreNextMouseDown in this.state + // to avoid re-rendering when we change it. + var _this = (0, _possibleConstructorReturn3.default)(this, (TouchRipple.__proto__ || (0, _getPrototypeOf2.default)(TouchRipple)).call(this, props, context)); + + _this.handleMouseDown = function (event) { + // only listen to left clicks + if (event.button === 0) { + _this.start(event, false); + } + }; + + _this.handleMouseUp = function () { + _this.end(); + }; + + _this.handleMouseLeave = function () { + _this.end(); + }; + + _this.handleTouchStart = function (event) { + event.stopPropagation(); + // If the user is swiping (not just tapping), save the position so we can + // abort ripples if the user appears to be scrolling. + if (_this.props.abortOnScroll && event.touches) { + _this.startListeningForScrollAbort(event); + _this.startTime = Date.now(); + } + _this.start(event, true); + }; + + _this.handleTouchEnd = function () { + _this.end(); + }; + + _this.handleTouchMove = function (event) { + // Stop trying to abort if we're already 300ms into the animation + var timeSinceStart = Math.abs(Date.now() - _this.startTime); + if (timeSinceStart > 300) { + _this.stopListeningForScrollAbort(); + return; + } + + // If the user is scrolling... + var deltaY = Math.abs(event.touches[0].clientY - _this.firstTouchY); + var deltaX = Math.abs(event.touches[0].clientX - _this.firstTouchX); + // Call it a scroll after an arbitrary 6px (feels reasonable in testing) + if (deltaY > 6 || deltaX > 6) { + var currentRipples = _this.state.ripples; + var ripple = currentRipples[0]; + // This clone will replace the ripple in ReactTransitionGroup with a + // version that will disappear immediately when removed from the DOM + var abortedRipple = _react2.default.cloneElement(ripple, { aborted: true }); + // Remove the old ripple and replace it with the new updated one + currentRipples = shift(currentRipples); + currentRipples = [].concat((0, _toConsumableArray3.default)(currentRipples), [abortedRipple]); + _this.setState({ ripples: currentRipples }, function () { + // Call end after we've set the ripple to abort otherwise the setState + // in end() merges with this and the ripple abort fails + _this.end(); + }); + } + }; + + _this.ignoreNextMouseDown = false; + + _this.state = { + // This prop allows us to only render the ReactTransitionGroup + // on the first click of the component, making the inital render faster. + hasRipples: false, + nextKey: 0, + ripples: [] + }; + return _this; + } + + (0, _createClass3.default)(TouchRipple, [{ + key: 'start', + value: function start(event, isRippleTouchGenerated) { + var theme = this.context.muiTheme.ripple; + + if (this.ignoreNextMouseDown && !isRippleTouchGenerated) { + this.ignoreNextMouseDown = false; + return; + } + + var ripples = this.state.ripples; + + // Add a ripple to the ripples array + ripples = [].concat((0, _toConsumableArray3.default)(ripples), [_react2.default.createElement(_CircleRipple2.default, { + key: this.state.nextKey, + style: !this.props.centerRipple ? this.getRippleStyle(event) : {}, + color: this.props.color || theme.color, + opacity: this.props.opacity, + touchGenerated: isRippleTouchGenerated + })]); + + this.ignoreNextMouseDown = isRippleTouchGenerated; + this.setState({ + hasRipples: true, + nextKey: this.state.nextKey + 1, + ripples: ripples + }); + } + }, { + key: 'end', + value: function end() { + var currentRipples = this.state.ripples; + this.setState({ + ripples: shift(currentRipples) + }); + if (this.props.abortOnScroll) { + this.stopListeningForScrollAbort(); + } + } + + // Check if the user seems to be scrolling and abort the animation if so + + }, { + key: 'startListeningForScrollAbort', + value: function startListeningForScrollAbort(event) { + this.firstTouchY = event.touches[0].clientY; + this.firstTouchX = event.touches[0].clientX; + // Note that when scolling Chrome throttles this event to every 200ms + // Also note we don't listen for scroll events directly as there's no general + // way to cover cases like scrolling within containers on the page + document.body.addEventListener('touchmove', this.handleTouchMove); + } + }, { + key: 'stopListeningForScrollAbort', + value: function stopListeningForScrollAbort() { + document.body.removeEventListener('touchmove', this.handleTouchMove); + } + }, { + key: 'getRippleStyle', + value: function getRippleStyle(event) { + var el = _reactDom2.default.findDOMNode(this); + var elHeight = el.offsetHeight; + var elWidth = el.offsetWidth; + var offset = _dom2.default.offset(el); + var isTouchEvent = event.touches && event.touches.length; + var pageX = isTouchEvent ? event.touches[0].pageX : event.pageX; + var pageY = isTouchEvent ? event.touches[0].pageY : event.pageY; + var pointerX = pageX - offset.left; + var pointerY = pageY - offset.top; + var topLeftDiag = this.calcDiag(pointerX, pointerY); + var topRightDiag = this.calcDiag(elWidth - pointerX, pointerY); + var botRightDiag = this.calcDiag(elWidth - pointerX, elHeight - pointerY); + var botLeftDiag = this.calcDiag(pointerX, elHeight - pointerY); + var rippleRadius = Math.max(topLeftDiag, topRightDiag, botRightDiag, botLeftDiag); + var rippleSize = rippleRadius * 2; + var left = pointerX - rippleRadius; + var top = pointerY - rippleRadius; + + return { + directionInvariant: true, + height: rippleSize, + width: rippleSize, + top: top, + left: left + }; + } + }, { + key: 'calcDiag', + value: function calcDiag(a, b) { + return Math.sqrt(a * a + b * b); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + style = _props.style; + var _state = this.state, + hasRipples = _state.hasRipples, + ripples = _state.ripples; + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var rippleGroup = void 0; + + if (hasRipples) { + var mergedStyles = (0, _simpleAssign2.default)({ + height: '100%', + width: '100%', + position: 'absolute', + top: 0, + left: 0, + overflow: 'hidden', + pointerEvents: 'none' + }, style); + + rippleGroup = _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + { style: prepareStyles(mergedStyles) }, + ripples + ); + } + + return _react2.default.createElement( + 'div', + { + onMouseUp: this.handleMouseUp, + onMouseDown: this.handleMouseDown, + onMouseLeave: this.handleMouseLeave, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd + }, + rippleGroup, + children + ); + } + }]); + return TouchRipple; +}(_react.Component); + +TouchRipple.defaultProps = { + abortOnScroll: true +}; +TouchRipple.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? TouchRipple.propTypes = { + abortOnScroll: _react.PropTypes.bool, + centerRipple: _react.PropTypes.bool, + children: _react.PropTypes.node, + color: _react.PropTypes.string, + opacity: _react.PropTypes.number, + style: _react.PropTypes.object +} : void 0; +exports.default = TouchRipple; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 243 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _from = __webpack_require__(204); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + return Array.isArray(arr) ? arr : (0, _from2.default)(arr); +}; + +/***/ }), +/* 244 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + isDescendant: function isDescendant(parent, child) { + var node = child.parentNode; + + while (node !== null) { + if (node === parent) return true; + node = node.parentNode; + } + + return false; + }, + offset: function offset(el) { + var rect = el.getBoundingClientRect(); + return { + top: rect.top + document.body.scrollTop, + left: rect.left + document.body.scrollLeft + }; + } +}; + +/***/ }), +/* 245 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _react = __webpack_require__(1); + +exports["default"] = _react.PropTypes.shape({ + subscribe: _react.PropTypes.func.isRequired, + dispatch: _react.PropTypes.func.isRequired, + getState: _react.PropTypes.func.isRequired +}); + +/***/ }), +/* 246 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = warning; +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ +} + +/***/ }), +/* 247 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionTypes; }); +/* harmony export (immutable) */ __webpack_exports__["b"] = createStore; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(158); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(474); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__); + + + +/** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ +var ActionTypes = { + INIT: '@@redux/INIT' +}; + +/** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} enhancer The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ +function createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error('Expected the enhancer to be a function.'); + } + + return enhancer(createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error('Expected the reducer to be a function.'); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + function getState() { + return currentState; + } + + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error('Expected listener to be a function.'); + } + + var isSubscribed = true; + + ensureCanMutateNextListeners(); + nextListeners.push(listener); + + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + isSubscribed = false; + + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + }; + } + + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + function dispatch(action) { + if (!__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */](action)) { + throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); + } + + if (typeof action.type === 'undefined') { + throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?'); + } + + if (isDispatching) { + throw new Error('Reducers may not dispatch actions.'); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = currentListeners = nextListeners; + for (var i = 0; i < listeners.length; i++) { + listeners[i](); + } + + return action; + } + + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error('Expected the nextReducer to be a function.'); + } + + currentReducer = nextReducer; + dispatch({ type: ActionTypes.INIT }); + } + + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/zenparsing/es-observable + */ + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return _ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object') { + throw new TypeError('Expected the observer to be an object.'); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { unsubscribe: unsubscribe }; + } + }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () { + return this; + }, _ref; + } + + // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + dispatch({ type: ActionTypes.INIT }); + + return _ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer + }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2; +} + +/***/ }), +/* 248 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/* harmony default export */ __webpack_exports__["a"] = (freeGlobal); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(46))) + +/***/ }), +/* 249 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(250); + + +/** Built-in value references. */ +var getPrototype = __WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */](Object.getPrototypeOf, Object); + +/* harmony default export */ __webpack_exports__["a"] = (getPrototype); + + +/***/ }), +/* 250 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (overArg); + + +/***/ }), +/* 251 */ +/***/ (function(module, exports) { + +module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), +/* 252 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = warning; +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ +} + +/***/ }), +/* 253 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = compose; +/** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ + +function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + var last = funcs[funcs.length - 1]; + var rest = funcs.slice(0, -1); + return function () { + return rest.reduceRight(function (composed, f) { + return f(composed); + }, last.apply(undefined, arguments)); + }; +} + +/***/ }), +/* 254 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(482); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ + + +var REACT_STATICS = { + childContextTypes: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + mixins: true, + propTypes: true, + type: true +}; + +var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + arguments: true, + arity: true +}; + +var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function'; + +module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) { + if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components + var keys = Object.getOwnPropertyNames(sourceComponent); + + /* istanbul ignore else */ + if (isGetOwnPropertySymbolsAvailable) { + keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent)); + } + + for (var i = 0; i < keys.length; ++i) { + if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) { + try { + targetComponent[keys[i]] = sourceComponent[keys[i]]; + } catch (error) { + + } + } + } + } + + return targetComponent; +}; + + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _FontIcon = __webpack_require__(489); + +var _FontIcon2 = _interopRequireDefault(_FontIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _FontIcon2.default; + +/***/ }), +/* 257 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayMap); + + +/***/ }), +/* 258 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (copyArray); + + +/***/ }), +/* 259 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__ = __webpack_require__(496); + + +/** Used to match property names within property paths. */ +var reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__["a" /* default */](function(string) { + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ __webpack_exports__["a"] = (stringToPath); + + +/***/ }), +/* 260 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/* harmony default export */ __webpack_exports__["a"] = (toSource); + + +/***/ }), +/* 261 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseToString_js__ = __webpack_require__(519); + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : __WEBPACK_IMPORTED_MODULE_0__baseToString_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (toString); + + +/***/ }), +/* 262 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(113); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(85); + + + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */](object[key], value)) || + (value === undefined && !(key in object))) { + __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](object, key, value); + } +} + +/* harmony default export */ __webpack_exports__["a"] = (assignMergeValue); + + +/***/ }), +/* 263 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(59); + + +var defineProperty = (function() { + try { + var func = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +/* harmony default export */ __webpack_exports__["a"] = (defineProperty); + + +/***/ }), +/* 264 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__ = __webpack_require__(528); + + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__["a" /* default */](); + +/* harmony default export */ __webpack_exports__["a"] = (baseFor); + + +/***/ }), +/* 265 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(30); + + +/** Built-in value references. */ +var Uint8Array = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Uint8Array; + +/* harmony default export */ __webpack_exports__["a"] = (Uint8Array); + + +/***/ }), +/* 266 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(267); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__ = __webpack_require__(545); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(114); + + + + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */](object) ? __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */](object, true) : __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__["a" /* default */](object); +} + +/* harmony default export */ __webpack_exports__["a"] = (keysIn); + + +/***/ }), +/* 267 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__ = __webpack_require__(544); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(167); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isIndex_js__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__ = __webpack_require__(170); + + + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = __WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value), + isArg = !isArr && __WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */](value), + isBuff = !isArr && !isArg && __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__["a" /* default */](value), + isType = !isArr && !isArg && !isBuff && __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__["a" /* default */](value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__["a" /* default */](value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + __WEBPACK_IMPORTED_MODULE_4__isIndex_js__["a" /* default */](key, length) + ))) { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayLikeKeys); + + +/***/ }), +/* 268 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(113); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__ = __webpack_require__(556); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(559); + + + + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */](iteratee, 3); + + __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__["a" /* default */](object, function(value, key, object) { + __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapValues); + + +/***/ }), +/* 269 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SetCache_js__ = __webpack_require__(563); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arraySome_js__ = __webpack_require__(566); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cacheHas_js__ = __webpack_require__(567); + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new __WEBPACK_IMPORTED_MODULE_0__SetCache_js__["a" /* default */] : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!__WEBPACK_IMPORTED_MODULE_1__arraySome_js__["a" /* default */](other, function(othValue, othIndex) { + if (!__WEBPACK_IMPORTED_MODULE_2__cacheHas_js__["a" /* default */](seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (equalArrays); + + +/***/ }), +/* 270 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(44); + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isStrictComparable); + + +/***/ }), +/* 271 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (matchesStrictComparable); + + +/***/ }), +/* 272 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(273); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toKey_js__ = __webpack_require__(86); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = __WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */](path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[__WEBPACK_IMPORTED_MODULE_1__toKey_js__["a" /* default */](path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseGet); + + +/***/ }), +/* 273 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isKey_js__ = __webpack_require__(175); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__ = __webpack_require__(259); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(261); + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */](value)) { + return value; + } + return __WEBPACK_IMPORTED_MODULE_1__isKey_js__["a" /* default */](value, object) ? [value] : __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */](value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (castPath); + + +/***/ }), +/* 274 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmit", function() { return clearSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearAsyncError", function() { return clearAsyncError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncErrors", function() { return updateSyncErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncWarnings", function() { return updateSyncWarnings; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(160); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + +var arrayInsert = function arrayInsert(form, field, index, value) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], meta: { form: form, field: field, index: index }, payload: value }; +}; + +var arrayMove = function arrayMove(form, field, from, to) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], meta: { form: form, field: field, from: from, to: to } }; +}; + +var arrayPop = function arrayPop(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], meta: { form: form, field: field } }; +}; + +var arrayPush = function arrayPush(form, field, value) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], meta: { form: form, field: field }, payload: value }; +}; + +var arrayRemove = function arrayRemove(form, field, index) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], meta: { form: form, field: field, index: index } }; +}; + +var arrayRemoveAll = function arrayRemoveAll(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], meta: { form: form, field: field } }; +}; + +var arrayShift = function arrayShift(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], meta: { form: form, field: field } }; +}; + +var arraySplice = function arraySplice(form, field, index, removeNum, value) { + var action = { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], + meta: { form: form, field: field, index: index, removeNum: removeNum } + }; + if (value !== undefined) { + action.payload = value; + } + return action; +}; + +var arraySwap = function arraySwap(form, field, indexA, indexB) { + if (indexA === indexB) { + throw new Error('Swap indices cannot be equal'); + } + if (indexA < 0 || indexB < 0) { + throw new Error('Swap indices cannot be negative'); + } + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], meta: { form: form, field: field, indexA: indexA, indexB: indexB } }; +}; + +var arrayUnshift = function arrayUnshift(form, field, value) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], meta: { form: form, field: field }, payload: value }; +}; + +var autofill = function autofill(form, field, value) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], meta: { form: form, field: field }, payload: value }; +}; + +var blur = function blur(form, field, value, touch) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], meta: { form: form, field: field, touch: touch }, payload: value }; +}; + +var change = function change(form, field, value, touch, persistentSubmitErrors) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], meta: { form: form, field: field, touch: touch, persistentSubmitErrors: persistentSubmitErrors }, payload: value }; +}; + +var clearSubmit = function clearSubmit(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], meta: { form: form } }; +}; + +var clearAsyncError = function clearAsyncError(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], meta: { form: form, field: field } }; +}; + +var destroy = function destroy() { + for (var _len = arguments.length, form = Array(_len), _key = 0; _key < _len; _key++) { + form[_key] = arguments[_key]; + } + + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"], meta: { form: form } }; +}; + +var focus = function focus(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], meta: { form: form, field: field } }; +}; + +var initialize = function initialize(form, values, keepDirty) { + var otherMeta = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + if (keepDirty instanceof Object) { + otherMeta = keepDirty; + keepDirty = false; + } + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], meta: _extends({ form: form, keepDirty: keepDirty }, otherMeta), payload: values }; +}; + +var registerField = function registerField(form, name, type) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], meta: { form: form }, payload: { name: name, type: type } }; +}; + +var reset = function reset(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], meta: { form: form } }; +}; + +var startAsyncValidation = function startAsyncValidation(form, field) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], meta: { form: form, field: field } }; +}; + +var startSubmit = function startSubmit(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], meta: { form: form } }; +}; + +var stopAsyncValidation = function stopAsyncValidation(form, errors) { + var action = { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], + meta: { form: form }, + payload: errors + }; + if (errors && Object.keys(errors).length) { + action.error = true; + } + return action; +}; + +var stopSubmit = function stopSubmit(form, errors) { + var action = { + type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], + meta: { form: form }, + payload: errors + }; + if (errors && Object.keys(errors).length) { + action.error = true; + } + return action; +}; + +var submit = function submit(form) { + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], meta: { form: form } }; +}; + +var setSubmitFailed = function setSubmitFailed(form) { + for (var _len2 = arguments.length, fields = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + fields[_key2 - 1] = arguments[_key2]; + } + + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], meta: { form: form, fields: fields }, error: true }; +}; + +var setSubmitSucceeded = function setSubmitSucceeded(form) { + for (var _len3 = arguments.length, fields = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { + fields[_key3 - 1] = arguments[_key3]; + } + + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], meta: { form: form, fields: fields }, error: false }; +}; + +var touch = function touch(form) { + for (var _len4 = arguments.length, fields = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { + fields[_key4 - 1] = arguments[_key4]; + } + + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], meta: { form: form, fields: fields } }; +}; + +var unregisterField = function unregisterField(form, name) { + var destroyOnUnmount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], meta: { form: form }, payload: { name: name, destroyOnUnmount: destroyOnUnmount } }; +}; + +var untouch = function untouch(form) { + for (var _len5 = arguments.length, fields = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { + fields[_key5 - 1] = arguments[_key5]; + } + + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], meta: { form: form, fields: fields } }; +}; + +var updateSyncErrors = function updateSyncErrors(form) { + var syncErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var error = arguments[2]; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], meta: { form: form }, payload: { syncErrors: syncErrors, error: error } }; +}; + +var updateSyncWarnings = function updateSyncWarnings(form) { + var syncWarnings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var warning = arguments[2]; + return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], meta: { form: form }, payload: { syncWarnings: syncWarnings, warning: warning } }; +}; + +/***/ }), +/* 275 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error__ = __webpack_require__(594); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_es6_error__); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + +var SubmissionError = function (_ExtendableError) { + _inherits(SubmissionError, _ExtendableError); + + function SubmissionError(errors) { + _classCallCheck(this, SubmissionError); + + var _this = _possibleConstructorReturn(this, (SubmissionError.__proto__ || Object.getPrototypeOf(SubmissionError)).call(this, 'Submit Validation Failed')); + + _this.errors = errors; + return _this; + } + + return SubmissionError; +}(__WEBPACK_IMPORTED_MODULE_0_es6_error___default.a); + +/* harmony default export */ __webpack_exports__["a"] = (SubmissionError); + +/***/ }), +/* 276 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(277); + + +var silenceEvent = function silenceEvent(event) { + var is = __WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */](event); + if (is) { + event.preventDefault(); + } + return is; +}; + +/* harmony default export */ __webpack_exports__["a"] = (silenceEvent); + +/***/ }), +/* 277 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var isEvent = function isEvent(candidate) { + return !!(candidate && candidate.stopPropagation && candidate.preventDefault); +}; + +/* harmony default export */ __webpack_exports__["a"] = (isEvent); + +/***/ }), +/* 278 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(107); + + + +var getIn = function getIn(state, field) { + if (!state) { + return state; + } + + var path = __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field); + var length = path.length; + if (!length) { + return undefined; + } + + var result = state; + for (var i = 0; i < length && !!result; ++i) { + result = result[path[i]]; + } + + return result; +}; + +/* harmony default export */ __webpack_exports__["a"] = (getIn); + +/***/ }), +/* 279 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(174); + + +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */](value, other, undefined, customizer) : !!result; +} + +/* harmony default export */ __webpack_exports__["a"] = (isEqualWith); + + +/***/ }), +/* 280 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var processProps = function processProps(type, props, _value) { + var value = props.value; + + if (type === 'checkbox') { + return _extends({}, props, { + checked: !!value + }); + } + if (type === 'radio') { + return _extends({}, props, { + checked: value === _value, + value: _value + }); + } + if (type === 'select-multiple') { + return _extends({}, props, { + value: value || [] + }); + } + if (type === 'file') { + return _extends({}, props, { + value: value || undefined + }); + } + return props; +}; + +var createFieldProps = function createFieldProps(_ref2, name, _ref) { + var getIn = _ref2.getIn, + toJS = _ref2.toJS; + + var asyncError = _ref.asyncError, + asyncValidating = _ref.asyncValidating, + onBlur = _ref.onBlur, + onChange = _ref.onChange, + onDrop = _ref.onDrop, + onDragStart = _ref.onDragStart, + dirty = _ref.dirty, + dispatch = _ref.dispatch, + onFocus = _ref.onFocus, + form = _ref.form, + format = _ref.format, + parse = _ref.parse, + pristine = _ref.pristine, + props = _ref.props, + state = _ref.state, + submitError = _ref.submitError, + submitFailed = _ref.submitFailed, + submitting = _ref.submitting, + syncError = _ref.syncError, + syncWarning = _ref.syncWarning, + validate = _ref.validate, + value = _ref.value, + _value = _ref._value, + warn = _ref.warn, + custom = _objectWithoutProperties(_ref, ['asyncError', 'asyncValidating', 'onBlur', 'onChange', 'onDrop', 'onDragStart', 'dirty', 'dispatch', 'onFocus', 'form', 'format', 'parse', 'pristine', 'props', 'state', 'submitError', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'validate', 'value', '_value', 'warn']); + + var error = syncError || asyncError || submitError; + var warning = syncWarning; + + var formatFieldValue = function formatFieldValue(value, format) { + if (format === null) { + return value; + } + var defaultFormattedValue = value == null ? '' : value; + return format ? format(value, name) : defaultFormattedValue; + }; + + var formattedFieldValue = formatFieldValue(value, format); + + return { + input: processProps(custom.type, { + name: name, + onBlur: onBlur, + onChange: onChange, + onDragStart: onDragStart, + onDrop: onDrop, + onFocus: onFocus, + value: formattedFieldValue + }, _value), + meta: _extends({}, toJS(state), { + active: !!(state && getIn(state, 'active')), + asyncValidating: asyncValidating, + autofilled: !!(state && getIn(state, 'autofilled')), + dirty: dirty, + dispatch: dispatch, + error: error, + form: form, + warning: warning, + invalid: !!error, + pristine: pristine, + submitting: !!submitting, + submitFailed: !!submitFailed, + touched: !!(state && getIn(state, 'touched')), + valid: !error, + visited: !!(state && getIn(state, 'visited')) + }), + custom: _extends({}, custom, props) + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFieldProps); + +/***/ }), +/* 281 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getValue__ = __webpack_require__(608); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isReactNative__ = __webpack_require__(609); + + + +var onChangeValue = function onChangeValue(event, _ref) { + var name = _ref.name, + parse = _ref.parse, + normalize = _ref.normalize; + + // read value from input + var value = __WEBPACK_IMPORTED_MODULE_0__getValue__["a" /* default */](event, __WEBPACK_IMPORTED_MODULE_1__isReactNative__["a" /* default */]); + + // parse value if we have a parser + if (parse) { + value = parse(value, name); + } + + // normalize value + if (normalize) { + value = normalize(name, value); + } + + return value; +}; + +/* harmony default export */ __webpack_exports__["a"] = (onChangeValue); + +/***/ }), +/* 282 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createIsPristine = function createIsPristine(_ref) { + var deepEqual = _ref.deepEqual, + empty = _ref.empty, + getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + var initial = getIn(formState, form + '.initial') || empty; + var values = getIn(formState, form + '.values') || initial; + return deepEqual(initial, values); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsPristine); + +/***/ }), +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(56); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _Popover = __webpack_require__(117); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _check = __webpack_require__(639); + +var _check2 = _interopRequireDefault(_check); + +var _ListItem = __webpack_require__(648); + +var _ListItem2 = _interopRequireDefault(_ListItem); + +var _Menu = __webpack_require__(179); + +var _Menu2 = _interopRequireDefault(_Menu); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var nestedMenuStyle = { + position: 'relative' +}; + +function getStyles(props, context) { + var disabledColor = context.muiTheme.baseTheme.palette.disabledColor; + var textColor = context.muiTheme.baseTheme.palette.textColor; + var indent = props.desktop ? 64 : 72; + var sidePadding = props.desktop ? 24 : 16; + + var styles = { + root: { + color: props.disabled ? disabledColor : textColor, + cursor: props.disabled ? 'not-allowed' : 'pointer', + minHeight: props.desktop ? '32px' : '48px', + lineHeight: props.desktop ? '32px' : '48px', + fontSize: props.desktop ? 15 : 16, + whiteSpace: 'nowrap' + }, + + innerDivStyle: { + paddingLeft: props.leftIcon || props.insetChildren || props.checked ? indent : sidePadding, + paddingRight: props.rightIcon ? indent : sidePadding, + paddingBottom: 0, + paddingTop: 0 + }, + + secondaryText: { + float: 'right' + }, + + leftIconDesktop: { + margin: 0, + left: 24, + top: 4 + }, + + rightIconDesktop: { + margin: 0, + right: 24, + top: 4, + fill: context.muiTheme.menuItem.rightIconDesktopFill + } + }; + + return styles; +} + +var MenuItem = function (_Component) { + (0, _inherits3.default)(MenuItem, _Component); + + function MenuItem() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, MenuItem); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuItem.__proto__ || (0, _getPrototypeOf2.default)(MenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.cloneMenuItem = function (item) { + return _react2.default.cloneElement(item, { + onTouchTap: function onTouchTap(event) { + if (!item.props.menuItems) { + _this.handleRequestClose(); + } + + if (item.props.onTouchTap) { + item.props.onTouchTap(event); + } + } + }); + }, _this.handleTouchTap = function (event) { + event.preventDefault(); + + _this.setState({ + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this) + }); + + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + }, _this.handleRequestClose = function () { + _this.setState({ + open: false, + anchorEl: null + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(MenuItem, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.applyFocusState(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.state.open && nextProps.focusState === 'none') { + this.handleRequestClose(); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.applyFocusState(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + if (this.state.open) { + this.setState({ + open: false + }); + } + } + }, { + key: 'applyFocusState', + value: function applyFocusState() { + this.refs.listItem.applyFocusState(this.props.focusState); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + checked = _props.checked, + children = _props.children, + desktop = _props.desktop, + disabled = _props.disabled, + focusState = _props.focusState, + innerDivStyle = _props.innerDivStyle, + insetChildren = _props.insetChildren, + leftIcon = _props.leftIcon, + menuItems = _props.menuItems, + rightIcon = _props.rightIcon, + secondaryText = _props.secondaryText, + style = _props.style, + animation = _props.animation, + value = _props.value, + other = (0, _objectWithoutProperties3.default)(_props, ['checked', 'children', 'desktop', 'disabled', 'focusState', 'innerDivStyle', 'insetChildren', 'leftIcon', 'menuItems', 'rightIcon', 'secondaryText', 'style', 'animation', 'value']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style); + var mergedInnerDivStyles = (0, _simpleAssign2.default)(styles.innerDivStyle, innerDivStyle); + + // Left Icon + var leftIconElement = leftIcon ? leftIcon : checked ? _react2.default.createElement(_check2.default, null) : null; + if (leftIconElement) { + var mergedLeftIconStyles = desktop ? (0, _simpleAssign2.default)(styles.leftIconDesktop, leftIconElement.props.style) : leftIconElement.props.style; + leftIconElement = _react2.default.cloneElement(leftIconElement, { style: mergedLeftIconStyles }); + } + + // Right Icon + var rightIconElement = void 0; + if (rightIcon) { + var mergedRightIconStyles = desktop ? (0, _simpleAssign2.default)(styles.rightIconDesktop, rightIcon.props.style) : rightIcon.props.style; + rightIconElement = _react2.default.cloneElement(rightIcon, { style: mergedRightIconStyles }); + } + + // Secondary Text + var secondaryTextElement = void 0; + if (secondaryText) { + var secondaryTextIsAnElement = _react2.default.isValidElement(secondaryText); + var mergedSecondaryTextStyles = secondaryTextIsAnElement ? (0, _simpleAssign2.default)(styles.secondaryText, secondaryText.props.style) : null; + + secondaryTextElement = secondaryTextIsAnElement ? _react2.default.cloneElement(secondaryText, { style: mergedSecondaryTextStyles }) : _react2.default.createElement( + 'div', + { style: prepareStyles(styles.secondaryText) }, + secondaryText + ); + } + var childMenuPopover = void 0; + if (menuItems) { + childMenuPopover = _react2.default.createElement( + _Popover2.default, + { + animation: animation, + anchorOrigin: { horizontal: 'right', vertical: 'top' }, + anchorEl: this.state.anchorEl, + open: this.state.open, + useLayerForClickAway: false, + onRequestClose: this.handleRequestClose + }, + _react2.default.createElement( + _Menu2.default, + { desktop: desktop, disabled: disabled, style: nestedMenuStyle }, + _react2.default.Children.map(menuItems, this.cloneMenuItem) + ) + ); + other.onTouchTap = this.handleTouchTap; + } + + return _react2.default.createElement( + _ListItem2.default, + (0, _extends3.default)({}, other, { + disabled: disabled, + hoverColor: this.context.muiTheme.menuItem.hoverColor, + innerDivStyle: mergedInnerDivStyles, + insetChildren: insetChildren, + leftIcon: leftIconElement, + ref: 'listItem', + rightIcon: rightIconElement, + style: mergedRootStyles + }), + children, + secondaryTextElement, + childMenuPopover + ); + } + }]); + return MenuItem; +}(_react.Component); + +MenuItem.muiName = 'MenuItem'; +MenuItem.defaultProps = { + checked: false, + desktop: false, + disabled: false, + focusState: 'none', + insetChildren: false +}; +MenuItem.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? MenuItem.propTypes = { + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * If true, a left check mark will be rendered. + */ + checked: _react.PropTypes.bool, + /** + * Elements passed as children to the underlying `ListItem`. + */ + children: _react.PropTypes.node, + /** + * @ignore + * If true, the menu item will render with compact desktop + * styles. + */ + desktop: _react.PropTypes.bool, + /** + * If true, the menu item will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * The focus state of the menu item. This prop is used to set the focus + * state of the underlying `ListItem`. + */ + focusState: _react.PropTypes.oneOf(['none', 'focused', 'keyboard-focused']), + /** + * Override the inline-styles of the inner div. + */ + innerDivStyle: _react.PropTypes.object, + /** + * If true, the children will be indented. + * This is only needed when there is no `leftIcon`. + */ + insetChildren: _react.PropTypes.bool, + /** + * The `SvgIcon` or `FontIcon` to be displayed on the left side. + */ + leftIcon: _react.PropTypes.element, + /** + * `MenuItem` elements to nest within the menu item. + */ + menuItems: _react.PropTypes.node, + /** + * Callback function fired when the menu item is touch-tapped. + * + * @param {object} event TouchTap event targeting the menu item. + */ + onTouchTap: _react.PropTypes.func, + /** + * Can be used to render primary text within the menu item. + */ + primaryText: _react.PropTypes.node, + /** + * The `SvgIcon` or `FontIcon` to be displayed on the right side. + */ + rightIcon: _react.PropTypes.element, + /** + * Can be used to render secondary text within the menu item. + */ + secondaryText: _react.PropTypes.node, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The value of the menu item. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = MenuItem; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _reactDom = __webpack_require__(17); + +var _dom = __webpack_require__(244); + +var _dom2 = _interopRequireDefault(_dom); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// heavily inspired by https://github.com/Khan/react-components/blob/master/js/layered-component-mixin.jsx +var RenderToLayer = function (_Component) { + (0, _inherits3.default)(RenderToLayer, _Component); + + function RenderToLayer() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RenderToLayer); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RenderToLayer.__proto__ || (0, _getPrototypeOf2.default)(RenderToLayer)).call.apply(_ref, [this].concat(args))), _this), _this.onClickAway = function (event) { + if (event.defaultPrevented) { + return; + } + + if (!_this.props.componentClickAway) { + return; + } + + if (!_this.props.open) { + return; + } + + var el = _this.layer; + if (event.target !== el && event.target === window || document.documentElement.contains(event.target) && !_dom2.default.isDescendant(el, event.target)) { + _this.props.componentClickAway(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(RenderToLayer, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.renderLayer(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.renderLayer(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.unrenderLayer(); + } + }, { + key: 'getLayer', + value: function getLayer() { + return this.layer; + } + }, { + key: 'unrenderLayer', + value: function unrenderLayer() { + if (!this.layer) { + return; + } + + if (this.props.useLayerForClickAway) { + this.layer.style.position = 'relative'; + this.layer.removeEventListener('touchstart', this.onClickAway); + this.layer.removeEventListener('click', this.onClickAway); + } else { + window.removeEventListener('touchstart', this.onClickAway); + window.removeEventListener('click', this.onClickAway); + } + + (0, _reactDom.unmountComponentAtNode)(this.layer); + document.body.removeChild(this.layer); + this.layer = null; + } + + /** + * By calling this method in componentDidMount() and + * componentDidUpdate(), you're effectively creating a "wormhole" that + * funnels React's hierarchical updates through to a DOM node on an + * entirely different part of the page. + */ + + }, { + key: 'renderLayer', + value: function renderLayer() { + var _this2 = this; + + var _props = this.props, + open = _props.open, + render = _props.render; + + + if (open) { + if (!this.layer) { + this.layer = document.createElement('div'); + document.body.appendChild(this.layer); + + if (this.props.useLayerForClickAway) { + this.layer.addEventListener('touchstart', this.onClickAway); + this.layer.addEventListener('click', this.onClickAway); + this.layer.style.position = 'fixed'; + this.layer.style.top = 0; + this.layer.style.bottom = 0; + this.layer.style.left = 0; + this.layer.style.right = 0; + this.layer.style.zIndex = this.context.muiTheme.zIndex.layer; + } else { + setTimeout(function () { + window.addEventListener('touchstart', _this2.onClickAway); + window.addEventListener('click', _this2.onClickAway); + }, 0); + } + } + + var layerElement = render(); + this.layerElement = (0, _reactDom.unstable_renderSubtreeIntoContainer)(this, layerElement, this.layer); + } else { + this.unrenderLayer(); + } + } + }, { + key: 'render', + value: function render() { + return null; + } + }]); + return RenderToLayer; +}(_react.Component); + +RenderToLayer.defaultProps = { + useLayerForClickAway: true +}; +RenderToLayer.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? RenderToLayer.propTypes = { + componentClickAway: _react.PropTypes.func, + open: _react.PropTypes.bool.isRequired, + render: _react.PropTypes.func.isRequired, + useLayerForClickAway: _react.PropTypes.bool +} : void 0; +exports.default = RenderToLayer; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 285 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +exports.__esModule = true; +var createHelper = function createHelper(func, helperName) { + var setDisplayName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var noArgs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + if (process.env.NODE_ENV !== 'production' && setDisplayName) { + var _ret = function () { + /* eslint-disable global-require */ + var wrapDisplayName = __webpack_require__(641).default; + /* eslint-enable global-require */ + + if (noArgs) { + return { + v: function v(BaseComponent) { + var Component = func(BaseComponent); + Component.displayName = wrapDisplayName(BaseComponent, helperName); + return Component; + } + }; + } + + return { + v: function v() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return function (BaseComponent) { + var Component = func.apply(undefined, args)(BaseComponent); + Component.displayName = wrapDisplayName(BaseComponent, helperName); + return Component; + }; + } + }; + }(); + + if (typeof _ret === "object") return _ret.v; + } + + return func; +}; + +exports.default = createHelper; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 286 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _Subheader = __webpack_require__(652); + +var _Subheader2 = _interopRequireDefault(_Subheader); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var List = function (_Component) { + (0, _inherits3.default)(List, _Component); + + function List() { + (0, _classCallCheck3.default)(this, List); + return (0, _possibleConstructorReturn3.default)(this, (List.__proto__ || (0, _getPrototypeOf2.default)(List)).apply(this, arguments)); + } + + (0, _createClass3.default)(List, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var hasSubheader = false; + + var firstChild = _react.Children.toArray(children)[0]; + if ((0, _react.isValidElement)(firstChild) && firstChild.type === _Subheader2.default) { + hasSubheader = true; + } + + var styles = { + root: { + padding: (hasSubheader ? 0 : 8) + 'px 0px 8px 0px' + } + }; + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + children + ); + } + }]); + return List; +}(_react.Component); + +List.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? List.propTypes = { + /** + * These are usually `ListItem`s that are passed to + * be part of the list. + */ + children: _react.PropTypes.node, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = List; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _FlatButton = __webpack_require__(679); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _FlatButton2.default; + +/***/ }), +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Dialog = __webpack_require__(690); + +var _Dialog2 = _interopRequireDefault(_Dialog); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Dialog2.default; + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _Paper = __webpack_require__(37); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _propTypes = __webpack_require__(43); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var targetOrigin = props.targetOrigin; + var open = state.open; + var muiTheme = context.muiTheme; + + var horizontal = targetOrigin.horizontal.replace('middle', 'vertical'); + + return { + root: { + position: 'fixed', + zIndex: muiTheme.zIndex.popover, + opacity: open ? 1 : 0, + transform: open ? 'scaleY(1)' : 'scaleY(0)', + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('450ms', ['transform', 'opacity']), + maxHeight: '100%' + } + }; +} + +var PopoverAnimationVertical = function (_Component) { + (0, _inherits3.default)(PopoverAnimationVertical, _Component); + + function PopoverAnimationVertical() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, PopoverAnimationVertical); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PopoverAnimationVertical.__proto__ || (0, _getPrototypeOf2.default)(PopoverAnimationVertical)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(PopoverAnimationVertical, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setState({ open: true }); // eslint-disable-line react/no-did-mount-set-state + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + open: nextProps.open + }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + className = _props.className, + style = _props.style, + zDepth = _props.zDepth; + + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _Paper2.default, + { + style: (0, _simpleAssign2.default)(styles.root, style), + zDepth: zDepth, + className: className + }, + this.props.children + ); + } + }]); + return PopoverAnimationVertical; +}(_react.Component); + +PopoverAnimationVertical.defaultProps = { + style: {}, + zDepth: 1 +}; +PopoverAnimationVertical.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? PopoverAnimationVertical.propTypes = { + children: _react.PropTypes.node, + className: _react.PropTypes.string, + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + targetOrigin: _propTypes2.default.origin.isRequired, + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = PopoverAnimationVertical; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 290 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.RadioButtonGroup = exports.RadioButton = undefined; + +var _RadioButton2 = __webpack_require__(694); + +var _RadioButton3 = _interopRequireDefault(_RadioButton2); + +var _RadioButtonGroup2 = __webpack_require__(697); + +var _RadioButtonGroup3 = _interopRequireDefault(_RadioButtonGroup2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.RadioButton = _RadioButton3.default; +exports.RadioButtonGroup = _RadioButtonGroup3.default; +exports.default = _RadioButton3.default; + +/***/ }), +/* 291 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _isIterable2 = __webpack_require__(718); + +var _isIterable3 = _interopRequireDefault(_isIterable2); + +var _getIterator2 = __webpack_require__(205); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if ((0, _isIterable3.default)(Object(arr))) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + +/***/ }), +/* 292 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _slicedToArray2 = __webpack_require__(291); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _timeUtils = __webpack_require__(88); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var styles = { + root: { + directionInvariant: true, + display: 'inline-block', + position: 'absolute', + width: 32, + height: 32, + borderRadius: '100%', + left: 'calc(50% - 16px)', + top: 10, + textAlign: 'center', + paddingTop: 5, + userSelect: 'none', /* Chrome all / Safari all */ + fontSize: '1.1em', + pointerEvents: 'none', + boxSizing: 'border-box' + } + }; + + var muiTheme = context.muiTheme; + + + var pos = props.value; + + if (props.type === 'hour') { + pos %= 12; + } else { + pos = pos / 5; + } + + var positions = [[0, 5], [54.5, 16.6], [94.4, 59.5], [109, 114], [94.4, 168.5], [54.5, 208.4], [0, 223], [-54.5, 208.4], [-94.4, 168.5], [-109, 114], [-94.4, 59.5], [-54.5, 19.6]]; + + var innerPositions = [[0, 40], [36.9, 49.9], [64, 77], [74, 114], [64, 151], [37, 178], [0, 188], [-37, 178], [-64, 151], [-74, 114], [-64, 77], [-37, 50]]; + + if (props.isSelected) { + styles.root.backgroundColor = muiTheme.timePicker.accentColor; + styles.root.color = muiTheme.timePicker.selectTextColor; + } + + var transformPos = positions[pos]; + + if ((0, _timeUtils.isInner)(props)) { + styles.root.width = 28; + styles.root.height = 28; + styles.root.left = 'calc(50% - 14px)'; + transformPos = innerPositions[pos]; + } + + var _transformPos = transformPos, + _transformPos2 = (0, _slicedToArray3.default)(_transformPos, 2), + x = _transformPos2[0], + y = _transformPos2[1]; + + styles.root.transform = 'translate(' + x + 'px, ' + y + 'px)'; + + return styles; +} + +var ClockNumber = function (_Component) { + (0, _inherits3.default)(ClockNumber, _Component); + + function ClockNumber() { + (0, _classCallCheck3.default)(this, ClockNumber); + return (0, _possibleConstructorReturn3.default)(this, (ClockNumber.__proto__ || (0, _getPrototypeOf2.default)(ClockNumber)).apply(this, arguments)); + } + + (0, _createClass3.default)(ClockNumber, [{ + key: 'render', + value: function render() { + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var clockNumber = this.props.value === 0 ? '00' : this.props.value; + + return _react2.default.createElement( + 'span', + { style: prepareStyles(styles.root) }, + clockNumber + ); + } + }]); + return ClockNumber; +}(_react.Component); + +ClockNumber.defaultProps = { + value: 0, + type: 'minute', + isSelected: false +}; +ClockNumber.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? ClockNumber.propTypes = { + isSelected: _react.PropTypes.bool, + onSelected: _react.PropTypes.func, + type: _react.PropTypes.oneOf(['hour', 'minute']), + value: _react.PropTypes.number +} : void 0; +exports.default = ClockNumber; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 293 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _timeUtils = __webpack_require__(88); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function calcAngle(value, base) { + value %= base; + var angle = 360 / base * value; + return angle; +} + +function getStyles(props, context, state) { + var hasSelected = props.hasSelected, + type = props.type, + value = props.value; + var inner = state.inner; + var timePicker = context.muiTheme.timePicker; + + var angle = type === 'hour' ? calcAngle(value, 12) : calcAngle(value, 60); + + var styles = { + root: { + height: inner ? '30%' : '40%', + background: timePicker.accentColor, + width: 2, + left: 'calc(50% - 1px)', + position: 'absolute', + bottom: '50%', + transformOrigin: 'bottom', + pointerEvents: 'none', + transform: 'rotateZ(' + angle + 'deg)' + }, + mark: { + boxSizing: 'content-box', + background: timePicker.selectTextColor, + border: '4px solid ' + timePicker.accentColor, + display: hasSelected && 'none', + width: 7, + height: 7, + position: 'absolute', + top: -5, + left: -6, + borderRadius: '100%' + } + }; + + return styles; +} + +var ClockPointer = function (_Component) { + (0, _inherits3.default)(ClockPointer, _Component); + + function ClockPointer() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClockPointer); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockPointer.__proto__ || (0, _getPrototypeOf2.default)(ClockPointer)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + inner: false + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClockPointer, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + inner: (0, _timeUtils.isInner)(this.props) + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + inner: (0, _timeUtils.isInner)(nextProps) + }); + } + }, { + key: 'render', + value: function render() { + if (this.props.value === null) { + return _react2.default.createElement('span', null); + } + + var styles = getStyles(this.props, this.context, this.state); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement('div', { style: prepareStyles(styles.mark) }) + ); + } + }]); + return ClockPointer; +}(_react.Component); + +ClockPointer.defaultProps = { + hasSelected: false, + value: null, + type: 'minute' +}; +ClockPointer.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? ClockPointer.propTypes = { + hasSelected: _react.PropTypes.bool, + type: _react.PropTypes.oneOf(['hour', 'minute']), + value: _react.PropTypes.number +} : void 0; +exports.default = ClockPointer; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 294 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _colors = __webpack_require__(58); + +var _colorManipulator = __webpack_require__(70); + +var _spacing = __webpack_require__(184); + +var _spacing2 = _interopRequireDefault(_spacing); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Light Theme is the default theme used in material-ui. It is guaranteed to + * have all theme variables needed for every component. Variables not defined + * in a custom theme will default to these values. + */ +exports.default = { + spacing: _spacing2.default, + fontFamily: 'Roboto, sans-serif', + palette: { + primary1Color: _colors.cyan500, + primary2Color: _colors.cyan700, + primary3Color: _colors.grey400, + accent1Color: _colors.pinkA200, + accent2Color: _colors.grey100, + accent3Color: _colors.grey500, + textColor: _colors.darkBlack, + secondaryTextColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.54), + alternateTextColor: _colors.white, + canvasColor: _colors.white, + borderColor: _colors.grey300, + disabledColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.3), + pickerHeaderColor: _colors.cyan500, + clockCircleColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.07), + shadowColor: _colors.fullBlack + } +}; /** + * NB: If you update this file, please also update `docs/src/app/customization/Themes.js` + */ + +/***/ }), +/* 295 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { + menu: 1000, + appBar: 1100, + drawerOverlay: 1200, + drawer: 1300, + dialogOverlay: 1400, + dialog: 1500, + layer: 2000, + popover: 2100, + snackbar: 2900, + tooltip: 3000 +}; + +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { "Webkit": { "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "backfaceVisibility": true, "perspective": true, "perspectiveOrigin": true, "transformStyle": true, "transformOriginZ": true, "animation": true, "animationDelay": true, "animationDirection": true, "animationFillMode": true, "animationDuration": true, "animationIterationCount": true, "animationName": true, "animationPlayState": true, "animationTimingFunction": true, "appearance": true, "userSelect": true, "fontKerning": true, "textEmphasisPosition": true, "textEmphasis": true, "textEmphasisStyle": true, "textEmphasisColor": true, "boxDecorationBreak": true, "clipPath": true, "maskImage": true, "maskMode": true, "maskRepeat": true, "maskPosition": true, "maskClip": true, "maskOrigin": true, "maskSize": true, "maskComposite": true, "mask": true, "maskBorderSource": true, "maskBorderMode": true, "maskBorderSlice": true, "maskBorderWidth": true, "maskBorderOutset": true, "maskBorderRepeat": true, "maskBorder": true, "maskType": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "filter": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true, "flex": true, "flexBasis": true, "flexDirection": true, "flexGrow": true, "flexFlow": true, "flexShrink": true, "flexWrap": true, "alignContent": true, "alignItems": true, "alignSelf": true, "justifyContent": true, "order": true, "transition": true, "transitionDelay": true, "transitionDuration": true, "transitionProperty": true, "transitionTimingFunction": true, "backdropFilter": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "shapeImageThreshold": true, "shapeImageMargin": true, "shapeImageOutside": true, "hyphens": true, "flowInto": true, "flowFrom": true, "regionFragment": true, "textSizeAdjust": true }, "Moz": { "appearance": true, "userSelect": true, "boxSizing": true, "textAlignLast": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "tabSize": true, "hyphens": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true }, "ms": { "flex": true, "flexBasis": false, "flexDirection": true, "flexGrow": false, "flexFlow": true, "flexShrink": false, "flexWrap": true, "alignContent": false, "alignItems": false, "alignSelf": false, "justifyContent": false, "order": false, "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "userSelect": true, "wrapFlow": true, "wrapThrough": true, "wrapMargin": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "touchAction": true, "hyphens": true, "flowInto": true, "flowFrom": true, "breakBefore": true, "breakAfter": true, "breakInside": true, "regionFragment": true, "gridTemplateColumns": true, "gridTemplateRows": true, "gridTemplateAreas": true, "gridTemplate": true, "gridAutoColumns": true, "gridAutoRows": true, "gridAutoFlow": true, "grid": true, "gridRowStart": true, "gridColumnStart": true, "gridRowEnd": true, "gridRow": true, "gridColumn": true, "gridColumnEnd": true, "gridColumnGap": true, "gridRowGap": true, "gridArea": true, "gridGap": true, "textSizeAdjust": true } }; +module.exports = exports["default"]; + +/***/ }), +/* 297 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sortPrefixedStyle; + +var _isPrefixedProperty = __webpack_require__(730); + +var _isPrefixedProperty2 = _interopRequireDefault(_isPrefixedProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sortPrefixedStyle(style) { + return Object.keys(style).sort(function (left, right) { + if ((0, _isPrefixedProperty2.default)(left) && !(0, _isPrefixedProperty2.default)(right)) { + return -1; + } else if (!(0, _isPrefixedProperty2.default)(left) && (0, _isPrefixedProperty2.default)(right)) { + return 1; + } + return 0; + }).reduce(function (sortedStyle, prop) { + sortedStyle[prop] = style[prop]; + return sortedStyle; + }, {}); +} +module.exports = exports['default']; + +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var uppercasePattern = /[A-Z]/g; +var msPattern = /^ms-/; +var cache = {}; + +function hyphenateStyleName(string) { + return string in cache + ? cache[string] + : cache[string] = string + .replace(uppercasePattern, '-$&') + .toLowerCase() + .replace(msPattern, '-ms-'); +} + +module.exports = hyphenateStyleName; + + +/***/ }), +/* 299 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _colors = __webpack_require__(58); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Typography = function Typography() { + (0, _classCallCheck3.default)(this, Typography); + + // text colors + this.textFullBlack = _colors.fullBlack; + this.textDarkBlack = _colors.darkBlack; + this.textLightBlack = _colors.lightBlack; + this.textMinBlack = _colors.minBlack; + this.textFullWhite = _colors.fullWhite; + this.textDarkWhite = _colors.darkWhite; + this.textLightWhite = _colors.lightWhite; + + // font weight + this.fontWeightLight = 300; + this.fontWeightNormal = 400; + this.fontWeightMedium = 500; + + this.fontStyleButtonFontSize = 14; +}; + +exports.default = new Typography(); + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var countries = exports.countries = [{ "text": "USA", "value": "USA" }, { "text": "CANADA", "value": "CANADA" }, { "text": "JAPAN", "value": "JAPAN" }, { "text": "UK", "value": "GB" }, { "text": "UK (N. IRELAND)", "value": "NB" }, { "text": "AUSTRIA", "value": "AT" }, { "text": "BELARUS", "value": "BY" }, { "text": "BELGIUM", "value": "BE" }, { "text": "BULGARIA", "value": "BG" }, { "text": "CROATIA", "value": "HR" }, { "text": "CZECH REPUBLIC", "value": "CZ" }, { "text": "DENMARK", "value": "DK" }, { "text": "ESTONIA", "value": "EE" }, { "text": "FINLAND", "value": "FI" }, { "text": "FRANCE", "value": "FR" }, { "text": "GERMANY", "value": "DE" }, { "text": "GREECE", "value": "GR" }, { "text": "HUNGARY", "value": "HU" }, { "text": "ICELAND", "value": "IS" }, { "text": "IRELAND", "value": "IE" }, { "text": "ITALY", "value": "IT" }, { "text": "LATVIA", "value": "LV" }, { "text": "LITHUANIA", "value": "LT" }, { "text": "LUXEMBOURG", "value": "LU" }, { "text": "MONACO", "value": "MC" }, { "text": "NETHERLANDS", "value": "NL" }, { "text": "NORWAY", "value": "NO" }, { "text": "POLAND", "value": "PL" }, { "text": "PORTUGAL", "value": "PT" }, { "text": "ROMANIA", "value": "RO" }, { "text": "RUSSIA", "value": "RU" }, { "text": "SLOVAKIA", "value": "SK" }, { "text": "SLOVENIA", "value": "SI" }, { "text": "SPAIN", "value": "ES" }, { "text": "SWEDEN", "value": "SE" }, { "text": "SWITZERLAND", "value": "CH" }, { "text": "TURKEY", "value": "TR" }]; +var sizes = exports.sizes = ["Small", "Medium", "Large", "XLarge"]; +var sizesPants = exports.sizesPants = [28, 30, 32, 34, 36, 38, 40]; +var shoeSizes = exports.shoeSizes = [4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5]; +var usaRegions = exports.usaRegions = [{ "text": "AL", "value": "AL" }, { "text": "AK", "value": "AK" }, { "text": "AS", "value": "AS" }, { "text": "AZ", "value": "AZ" }, { "text": "AR", "value": "AR" }, { "text": "CA", "value": "CA" }, { "text": "CO", "value": "CO" }, { "text": "CT", "value": "CT" }, { "text": "DE", "value": "DE" }, { "text": "DC", "value": "DC" }, { "text": "FM", "value": "FM" }, { "text": "FL", "value": "FL" }, { "text": "GA", "value": "GA" }, { "text": "GU", "value": "GU" }, { "text": "HI", "value": "HI" }, { "text": "ID", "value": "ID" }, { "text": "IL", "value": "IL" }, { "text": "IN", "value": "IN" }, { "text": "IA", "value": "IA" }, { "text": "KS", "value": "KS" }, { "text": "KY", "value": "KY" }, { "text": "LA", "value": "LA" }, { "text": "ME", "value": "ME" }, { "text": "MH", "value": "MH" }, { "text": "MD", "value": "MD" }, { "text": "MA", "value": "MA" }, { "text": "MI", "value": "MI" }, { "text": "MN", "value": "MN" }, { "text": "MS", "value": "MS" }, { "text": "MO", "value": "MO" }, { "text": "MT", "value": "MT" }, { "text": "NE", "value": "NE" }, { "text": "NV", "value": "NV" }, { "text": "NH", "value": "NH" }, { "text": "NJ", "value": "NJ" }, { "text": "NM", "value": "NM" }, { "text": "NY", "value": "NY" }, { "text": "NC", "value": "NC" }, { "text": "ND", "value": "ND" }, { "text": "MP", "value": "MP" }, { "text": "OH", "value": "OH" }, { "text": "OK", "value": "OK" }, { "text": "OR", "value": "OR" }, { "text": "PW", "value": "PW" }, { "text": "PA", "value": "PA" }, { "text": "PR", "value": "PR" }, { "text": "RI", "value": "RI" }, { "text": "SC", "value": "SC" }, { "text": "SD", "value": "SD" }, { "text": "TN", "value": "TN" }, { "text": "TX", "value": "TX" }, { "text": "UT", "value": "UT" }, { "text": "VT", "value": "VT" }, { "text": "VI", "value": "VI" }, { "text": "VA", "value": "VA" }, { "text": "WA", "value": "WA" }, { "text": "WV", "value": "WV" }, { "text": "WI", "value": "WI" }, { "text": "WY", "value": "WY" }]; +var canadaRegions = exports.canadaRegions = [{ "text": "AB", "value": "AB" }, { "text": "BC", "value": "BC" }, { "text": "MB", "value": "MB" }, { "text": "NB", "value": "NB" }, { "text": "NL", "value": "NL" }, { "text": "NT", "value": "NT" }, { "text": "NS", "value": "NS" }, { "text": "NU", "value": "NU" }, { "text": "ON", "value": "ON" }, { "text": "PE", "value": "PE" }, { "text": "QC", "value": "QC" }, { "text": "SK", "value": "SK" }, { "text": "YT", "value": "YT" }]; +var japanRegions = exports.japanRegions = [{ "text": " 北海道", "value": " 北海道" }, { "text": " 青森県", "value": " 青森県" }, { "text": " 岩手県", "value": " 岩手県" }, { "text": " 宮城県", "value": " 宮城県" }, { "text": " 秋田県", "value": " 秋田県" }, { "text": " 山形県", "value": " 山形県" }, { "text": " 福島県", "value": " 福島県" }, { "text": " 茨城県", "value": " 茨城県" }, { "text": " 栃木県", "value": " 栃木県" }, { "text": " 群馬県", "value": " 群馬県" }, { "text": " 埼玉県", "value": " 埼玉県" }, { "text": " 千葉県", "value": " 千葉県" }, { "text": " 東京都", "value": " 東京都" }, { "text": " 神奈川県", "value": " 神奈川県" }, { "text": " 新潟県", "value": " 新潟県" }, { "text": " 富山県", "value": " 富山県" }, { "text": " 石川県", "value": " 石川県" }, { "text": " 福井県", "value": " 福井県" }, { "text": " 山梨県", "value": " 山梨県" }, { "text": " 長野県", "value": " 長野県" }, { "text": " 岐阜県", "value": " 岐阜県" }, { "text": " 静岡県", "value": " 静岡県" }, { "text": " 愛知県", "value": " 愛知県" }, { "text": " 三重県", "value": " 三重県" }, { "text": " 滋賀県", "value": " 滋賀県" }, { "text": " 京都府", "value": " 京都府" }, { "text": " 大阪府", "value": " 大阪府" }, { "text": " 兵庫県", "value": " 兵庫県" }, { "text": " 奈良県", "value": " 奈良県" }, { "text": " 和歌山県", "value": " 和歌山県" }, { "text": " 鳥取県", "value": " 鳥取県" }, { "text": " 島根県", "value": " 島根県" }, { "text": " 岡山県", "value": " 岡山県" }, { "text": " 広島県", "value": " 広島県" }, { "text": " 山口県", "value": " 山口県" }, { "text": " 徳島県", "value": " 徳島県" }, { "text": " 香川県", "value": " 香川県" }, { "text": " 愛媛県", "value": " 愛媛県" }, { "text": " 高知県", "value": " 高知県" }, { "text": " 福岡県", "value": " 福岡県" }, { "text": " 佐賀県", "value": " 佐賀県" }, { "text": " 長崎県", "value": " 長崎県" }, { "text": " 熊本県", "value": " 熊本県" }, { "text": " 大分県", "value": " 大分県" }, { "text": " 宮崎県", "value": " 宮崎県" }, { "text": " 鹿児島県", "value": " 鹿児島県" }, { "text": " 沖縄県", "value": " 沖縄県" }]; + +/***/ }), +/* 301 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(302); + + +/***/ }), +/* 302 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _regenerator = __webpack_require__(121); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _asyncToGenerator2 = __webpack_require__(122); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); + +var Start = function () { + var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() { + var settings, manager; + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return StorageManager.getFromChromeStorage('settings'); + + case 2: + _context.t1 = _Supreme.SHOP_NAME; + _context.t0 = _context.sent[_context.t1]; + + if (_context.t0) { + _context.next = 6; + break; + } + + _context.t0 = {}; + + case 6: + settings = _context.t0; + manager = new _supreme2.default(settings.Options, settings.Sizes, settings.Billing); + + manager.start(); + + case 9: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + })); + + return function Start() { + return _ref.apply(this, arguments); + }; +}(); + +var _supreme = __webpack_require__(322); + +var _supreme2 = _interopRequireDefault(_supreme); + +var _StorageManager = __webpack_require__(355); + +var StorageManager = _interopRequireWildcard(_StorageManager); + +var _Supreme = __webpack_require__(358); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +Start(); + +/***/ }), +/* 303 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this; + +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; + +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; + +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; + +module.exports = __webpack_require__(304); + +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; + } +} + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46))) + +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, process) {/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + if (typeof process === "object" && process.domain) { + invoke = process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + while (true) { + var delegate = context.delegate; + if (delegate) { + if (method === "return" || + (method === "throw" && delegate.iterator[method] === undefined)) { + // A return or throw (when the delegate iterator has no throw + // method) always terminates the yield* loop. + context.delegate = null; + + // If the delegate iterator has a return method, give it a + // chance to clean up. + var returnMethod = delegate.iterator["return"]; + if (returnMethod) { + var record = tryCatch(returnMethod, delegate.iterator, arg); + if (record.type === "throw") { + // If the return method threw an exception, let that + // exception prevail over the original return or throw. + method = "throw"; + arg = record.arg; + continue; + } + } + + if (method === "return") { + // Continue with the outer return, now that the delegate + // iterator has been terminated. + continue; + } + } + + var record = tryCatch( + delegate.iterator[method], + delegate.iterator, + arg + ); + + if (record.type === "throw") { + context.delegate = null; + + // Like returning generator.throw(uncaught), but without the + // overhead of an extra function call. + method = "throw"; + arg = record.arg; + continue; + } + + // Delegate generator ran and handled its own exceptions so + // regardless of what the method was, we continue as if it is + // "next" with an undefined arg. + method = "next"; + arg = undefined; + + var info = record.arg; + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + } else { + state = GenStateSuspendedYield; + return info; + } + + context.delegate = null; + } + + if (method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = arg; + + } else if (method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw arg; + } + + if (context.dispatchException(arg)) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + method = "next"; + arg = undefined; + } + + } else if (method === "return") { + context.abrupt("return", arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + var info = { + value: record.arg, + done: context.done + }; + + if (record.arg === ContinueSentinel) { + if (context.delegate && method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + arg = undefined; + } + } else { + return info; + } + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(arg) call above. + method = "throw"; + arg = record.arg; + } + } + }; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.next = finallyEntry.finallyLoc; + } else { + this.complete(record); + } + + return ContinueSentinel; + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = record.arg; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + return ContinueSentinel; + } + }; +})( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this +); + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46), __webpack_require__(0))) + +/***/ }), +/* 305 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(190); +__webpack_require__(72); +__webpack_require__(92); +__webpack_require__(314); +module.exports = __webpack_require__(16).Promise; + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(123) + , defined = __webpack_require__(124); +// true -> String#at +// false -> String#codePointAt +module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + +/***/ }), +/* 307 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(128) + , descriptor = __webpack_require__(73) + , setToStringTag = __webpack_require__(91) + , IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(47)(IteratorPrototype, __webpack_require__(20)('iterator'), function(){ return this; }); + +module.exports = function(Constructor, NAME, next){ + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(33) + , anObject = __webpack_require__(34) + , getKeys = __webpack_require__(66); + +module.exports = __webpack_require__(40) ? Object.defineProperties : function defineProperties(O, Properties){ + anObject(O); + var keys = getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(49) + , toLength = __webpack_require__(129) + , toIndex = __webpack_require__(310); +module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; + // Array#includes uses SameValueZero equality algorithm + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(123) + , max = Math.max + , min = Math.min; +module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(312) + , step = __webpack_require__(313) + , Iterators = __webpack_require__(65) + , toIObject = __webpack_require__(49); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(191)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + +/***/ }), +/* 312 */ +/***/ (function(module, exports) { + +module.exports = function(){ /* empty */ }; + +/***/ }), +/* 313 */ +/***/ (function(module, exports) { + +module.exports = function(done, value){ + return {value: value, done: !!done}; +}; + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(89) + , global = __webpack_require__(22) + , ctx = __webpack_require__(62) + , classof = __webpack_require__(133) + , $export = __webpack_require__(32) + , isObject = __webpack_require__(63) + , aFunction = __webpack_require__(125) + , anInstance = __webpack_require__(315) + , forOf = __webpack_require__(316) + , speciesConstructor = __webpack_require__(317) + , task = __webpack_require__(200).set + , microtask = __webpack_require__(319)() + , PROMISE = 'Promise' + , TypeError = global.TypeError + , process = global.process + , $Promise = global[PROMISE] + , process = global.process + , isNode = classof(process) == 'process' + , empty = function(){ /* empty */ } + , Internal, GenericPromiseCapability, Wrapper; + +var USE_NATIVE = !!function(){ + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1) + , FakePromise = (promise.constructor = {})[__webpack_require__(20)('species')] = function(exec){ exec(empty, empty); }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch(e){ /* empty */ } +}(); + +// helpers +var sameConstructor = function(a, b){ + // with library wrapper special case + return a === b || a === $Promise && b === Wrapper; +}; +var isThenable = function(it){ + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var newPromiseCapability = function(C){ + return sameConstructor($Promise, C) + ? new PromiseCapability(C) + : new GenericPromiseCapability(C); +}; +var PromiseCapability = GenericPromiseCapability = function(C){ + var resolve, reject; + this.promise = new C(function($$resolve, $$reject){ + if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +}; +var perform = function(exec){ + try { + exec(); + } catch(e){ + return {error: e}; + } +}; +var notify = function(promise, isReject){ + if(promise._n)return; + promise._n = true; + var chain = promise._c; + microtask(function(){ + var value = promise._v + , ok = promise._s == 1 + , i = 0; + var run = function(reaction){ + var handler = ok ? reaction.ok : reaction.fail + , resolve = reaction.resolve + , reject = reaction.reject + , domain = reaction.domain + , result, then; + try { + if(handler){ + if(!ok){ + if(promise._h == 2)onHandleUnhandled(promise); + promise._h = 1; + } + if(handler === true)result = value; + else { + if(domain)domain.enter(); + result = handler(value); + if(domain)domain.exit(); + } + if(result === reaction.promise){ + reject(TypeError('Promise-chain cycle')); + } else if(then = isThenable(result)){ + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch(e){ + reject(e); + } + }; + while(chain.length > i)run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if(isReject && !promise._h)onUnhandled(promise); + }); +}; +var onUnhandled = function(promise){ + task.call(global, function(){ + var value = promise._v + , abrupt, handler, console; + if(isUnhandled(promise)){ + abrupt = perform(function(){ + if(isNode){ + process.emit('unhandledRejection', value, promise); + } else if(handler = global.onunhandledrejection){ + handler({promise: promise, reason: value}); + } else if((console = global.console) && console.error){ + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if(abrupt)throw abrupt.error; + }); +}; +var isUnhandled = function(promise){ + if(promise._h == 1)return false; + var chain = promise._a || promise._c + , i = 0 + , reaction; + while(chain.length > i){ + reaction = chain[i++]; + if(reaction.fail || !isUnhandled(reaction.promise))return false; + } return true; +}; +var onHandleUnhandled = function(promise){ + task.call(global, function(){ + var handler; + if(isNode){ + process.emit('rejectionHandled', promise); + } else if(handler = global.onrejectionhandled){ + handler({promise: promise, reason: promise._v}); + } + }); +}; +var $reject = function(value){ + var promise = this; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if(!promise._a)promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function(value){ + var promise = this + , then; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if(promise === value)throw TypeError("Promise can't be resolved itself"); + if(then = isThenable(value)){ + microtask(function(){ + var wrapper = {_w: promise, _d: false}; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch(e){ + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch(e){ + $reject.call({_w: promise, _d: false}, e); // wrap + } +}; + +// constructor polyfill +if(!USE_NATIVE){ + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor){ + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch(err){ + $reject.call(this, err); + } + }; + Internal = function Promise(executor){ + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(320)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected){ + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if(this._a)this._a.push(reaction); + if(this._s)notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function(onRejected){ + return this.then(undefined, onRejected); + } + }); + PromiseCapability = function(){ + var promise = new Internal; + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); +__webpack_require__(91)($Promise, PROMISE); +__webpack_require__(321)(PROMISE); +Wrapper = __webpack_require__(16)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r){ + var capability = newPromiseCapability(this) + , $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x){ + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; + var capability = newPromiseCapability(this) + , $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(201)(function(iter){ + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable){ + var C = this + , capability = newPromiseCapability(C) + , resolve = capability.resolve + , reject = capability.reject; + var abrupt = perform(function(){ + var values = [] + , index = 0 + , remaining = 1; + forOf(iterable, false, function(promise){ + var $index = index++ + , alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function(value){ + if(alreadyCalled)return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable){ + var C = this + , capability = newPromiseCapability(C) + , reject = capability.reject; + var abrupt = perform(function(){ + forOf(iterable, false, function(promise){ + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + } +}); + +/***/ }), +/* 315 */ +/***/ (function(module, exports) { + +module.exports = function(it, Constructor, name, forbiddenField){ + if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(62) + , call = __webpack_require__(198) + , isArrayIter = __webpack_require__(199) + , anObject = __webpack_require__(34) + , toLength = __webpack_require__(129) + , getIterFn = __webpack_require__(134) + , BREAK = {} + , RETURN = {}; +var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , index = 0 + , length, step, iterator, result; + if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if(result === BREAK || result === RETURN)return result; + } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ + result = call(iterator, f, step.value, entries); + if(result === BREAK || result === RETURN)return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(34) + , aFunction = __webpack_require__(125) + , SPECIES = __webpack_require__(20)('species'); +module.exports = function(O, D){ + var C = anObject(O).constructor, S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + +/***/ }), +/* 318 */ +/***/ (function(module, exports) { + +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function(fn, args, that){ + var un = that === undefined; + switch(args.length){ + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(22) + , macrotask = __webpack_require__(200).set + , Observer = global.MutationObserver || global.WebKitMutationObserver + , process = global.process + , Promise = global.Promise + , isNode = __webpack_require__(74)(process) == 'process'; + +module.exports = function(){ + var head, last, notify; + + var flush = function(){ + var parent, fn; + if(isNode && (parent = process.domain))parent.exit(); + while(head){ + fn = head.fn; + head = head.next; + try { + fn(); + } catch(e){ + if(head)notify(); + else last = undefined; + throw e; + } + } last = undefined; + if(parent)parent.enter(); + }; + + // Node.js + if(isNode){ + notify = function(){ + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if(Observer){ + var toggle = true + , node = document.createTextNode(''); + new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new + notify = function(){ + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if(Promise && Promise.resolve){ + var promise = Promise.resolve(); + notify = function(){ + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function(){ + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function(fn){ + var task = {fn: fn, next: undefined}; + if(last)last.next = task; + if(!head){ + head = task; + notify(); + } last = task; + }; +}; + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +var hide = __webpack_require__(47); +module.exports = function(target, src, safe){ + for(var key in src){ + if(safe && target[key])target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(22) + , core = __webpack_require__(16) + , dP = __webpack_require__(33) + , DESCRIPTORS = __webpack_require__(40) + , SPECIES = __webpack_require__(20)('species'); + +module.exports = function(KEY){ + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + configurable: true, + get: function(){ return this; } + }); +}; + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = __webpack_require__(50); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _toConsumableArray2 = __webpack_require__(76); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _getIterator2 = __webpack_require__(205); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _regenerator = __webpack_require__(121); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _asyncToGenerator2 = __webpack_require__(122); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _BaseManager2 = __webpack_require__(351); + +var _BaseManager3 = _interopRequireDefault(_BaseManager2); + +var _Helpers = __webpack_require__(207); + +var Helpers = _interopRequireWildcard(_Helpers); + +var _InputProcessor = __webpack_require__(354); + +var InputProcessor = _interopRequireWildcard(_InputProcessor); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SupremeManager = function (_BaseManager) { + (0, _inherits3.default)(SupremeManager, _BaseManager); + + function SupremeManager(preferences, sizings, billing) { + (0, _classCallCheck3.default)(this, SupremeManager); + + var _this = (0, _possibleConstructorReturn3.default)(this, (SupremeManager.__proto__ || (0, _getPrototypeOf2.default)(SupremeManager)).call(this)); + + _this.preferences = preferences; + _this.sizings = sizings; + _this.billing = billing; + return _this; + } + + /** + * This function is called whenever a new page change occurs + */ + + + (0, _createClass3.default)(SupremeManager, [{ + key: 'onPageChange', + value: function () { + var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() { + var hideSoldOut, autoCheckout, autoPay; + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + this.processLinks(); + + // if stores are not configured yet.. + + if (this.isConfigured()) { + _context.next = 4; + break; + } + + this.setNotificationBarText('Bot not yet configured'); + return _context.abrupt('return'); + + case 4: + hideSoldOut = this.preferences.hideSoldOut; + + this.processSoldOutProducts(hideSoldOut); + + autoCheckout = this.preferences.autoCheckout; + autoPay = this.preferences.autoPay; + + this.setNotificationBarText('AutoCheckout ' + (autoCheckout ? 'enabled' : 'disabled') + ', AutoPay ' + (autoPay ? 'enabled' : 'disabled')); + + if (this.preferences.autoCheckout) { + _context.next = 11; + break; + } + + return _context.abrupt('return'); + + case 11: + if (this.isProductPage()) { + this.processProduct(); + } else if (this.isCart()) { + this.processCart(); + } else if (this.isCheckout()) { + this.processCheckout(); + } + + case 12: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + })); + + function onPageChange() { + return _ref.apply(this, arguments); + } + + return onPageChange; + }() + }, { + key: 'isConfigured', + value: function isConfigured() { + return ![this.preferences, this.sizings, this.billing].some(function (x) { + return x === undefined; + }); + } + + /** + * Attach an event on product links of the page to reload the page instead of loading in ajax + */ + + }, { + key: 'processLinks', + value: function processLinks() { + var links = document.links; + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = (0, _getIterator3.default)(links), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var link = _step.value; + + link.addEventListener('click', function (e) { + window.location.href = this.href; + if (!e) e = window.event; + + if (e.stopPropagation) { + e.stopPropagation(); + } else { + e.cancelBubble = true; + } + }); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + }, { + key: 'processSoldOutProducts', + value: function processSoldOutProducts(hideSoldOut) { + Array.prototype.forEach.call(document.getElementsByClassName('sold_out_tag'), function (x) { + return x.style.display = 'block'; + }); + if (hideSoldOut) { + var sold_outs = Array.prototype.filter.call(document.getElementsByTagName('article'), function (x) { + return x.getElementsByClassName('sold_out_tag').length; + }); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = (0, _getIterator3.default)(sold_outs), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var node = _step2.value; + + node.remove(); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + } + } + + /** + * This function should be called when the user is on the 'cart' page, it will then redirect the user + * to the checkout page after the delay configured in the options + * @param {Object} preferencesStore Object that stores the preference options + */ + + }, { + key: 'processCart', + value: function processCart() { + this.timeout(function () { + document.location.href = '/checkout'; + }, 100, 'Going to checkout'); + } + + /** + * This function should be called when the user is on the 'checkout' page, it will fill + * the checkout form with the values defined by the user in the options and then checkout after a delay + * @param {Object} preferencesStore Object that stores the preference options + * @param {Object} billingStore Object that stores the billings options + */ + + }, { + key: 'processCheckout', + value: function processCheckout() { + var checkoutDelay = this.preferences.checkoutDelay; + var inputs = [].concat((0, _toConsumableArray3.default)(document.querySelectorAll('input, textarea, select'))).filter(function (x) { + return ['hidden', 'submit', 'button', 'checkbox'].indexOf(x.type) === -1; + }); + var successFill = InputProcessor.processFields(inputs, this.billing); + + var terms = document.getElementsByName('order[terms]'); + if (terms.length) { + terms[0].click(); + } + +<<<<<<< HEAD + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = (0, _getIterator3.default)((0, _keys2.default)(this.billing)), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var key = _step3.value; + + var el = document.getElementById(key); + if (el) { + el.value = this.billing[key]; + el.dispatchEvent(new Event('change')); + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + +======= +>>>>>>> Fix profiles, small updates + if (this.preferences.captchaBypass) { + var captcha = document.querySelector('.g-recaptcha'); + if (captcha) { + captcha.remove(); + } + } + if (this.preferences.autoPay) { + this.timeout(function () { + var commitBtn = document.getElementsByName('commit')[0]; + if (commitBtn) { + commitBtn.click(); + } + }, checkoutDelay, 'Checking out'); + } + } + + /** + * This function should be called when the user is on a product page, it will + * try to figure out if the product is sold out or not, and if not, it will find the best available size + * based on the user's preferences and then it will add the item to cart + */ + + }, { + key: 'processProduct', + value: function processProduct() { + var _this2 = this; + + if (!this.isSoldOut()) { + var _ret = function () { + var maxPrice = _this2.preferences.maxPrice; + var minPrice = _this2.preferences.minPrice; + var itemPrice = document.querySelector('[itemprop=price]'); + + if (itemPrice !== null) { + var price = +itemPrice.innerHTML.replace(/\D/g, ''); + if (!isNaN(price)) { + if (maxPrice !== undefined && price > maxPrice) { + _this2.setNotificationBarText('Product price is too high, not checking out'); + return { + v: void 0 + }; + } + + if (minPrice !== undefined && price < minPrice) { + _this2.setNotificationBarText('Product price is too low, not checking out'); + return { + v: void 0 + }; + } + } + } + + var submitBtn = document.querySelector('[name=commit]'); + var productCategory = _this2.getProductCategory(); + var sizesOptions = _this2.getSizesOptions(); + + // If sizes options are available + if (sizesOptions.length) { + var _ret2 = function () { + var categorySize = _this2.sizings[productCategory]; + if (categorySize === undefined) { + _this2.setNotificationBarText('Unknown category "' + productCategory + '", cannot process'); + return { + v: { + v: void 0 + } + }; + } + var targetOption = sizesOptions.find(function (x) { + return _this2.sizeMatch(categorySize, x.text, productCategory); + }); + + if (!targetOption) { + if (_this2.preferences.strictSize) { + _this2.setNotificationBarText('The desired size is not available'); + return { + v: { + v: void 0 + } + }; + } + targetOption = sizesOptions[0]; + } + targetOption.selected = true; + }(); + + if ((typeof _ret2 === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret2)) === "object") return _ret2.v; + } + + var atcDelay = _this2.preferences.addToCartDelay; + _this2.timeout(function () { + var process = function process() { + if (document.querySelector('.in-cart') && document.getElementById('cart')) { + setTimeout(function () { + window.location.href = '/checkout'; + }, 200); + } else { + submitBtn.click(); + _this2.timeout(function () { + return process(); + }, 500, 'Waiting for product to be in cart...'); + } + }; + + process(); + }, atcDelay, 'Adding to cart'); + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + } + } + + /** + * Check if the user is currently on a product page + */ + + }, { + key: 'isProductPage', + value: function isProductPage() { + return Helpers.hasStringInPath('shop') && (Helpers.pageHasNodeOfClass('styles') || Helpers.pageHasNodeOfClass('price') || Helpers.pageHasNodeOfClass('style')); + } + + /** + * Check if the user is currently on the 'cart' page + */ + + }, { + key: 'isCart', + value: function isCart() { + return Helpers.pageHasNodeOfClass('cart') && Helpers.hasStringInPath('cart'); + } + + /** + * Check if the user is currently at the checkout page + */ + + }, { + key: 'isCheckout', + value: function isCheckout() { + return Helpers.hasStringInPath('checkout'); + } + + /** + * Returns the product category when the user is on a product page + */ + + }, { + key: 'getProductCategory', + value: function getProductCategory() { + var category = Helpers.getQueryStringValue('atc-category'); + return category === "" ? location.pathname.substring(1).split('/')[1] : category; + } + + /** + * Check if the current product is sold out + * @return {Boolean} + */ + + }, { + key: 'isSoldOut', + value: function isSoldOut() { + return document.querySelector('input[name=commit]') === null; + } + + /** + * Return the available sizes for the current product + * @return {Array} + */ + + }, { + key: 'getSizesOptions', + value: function getSizesOptions() { + var sizes = document.getElementById('size'); + if (!sizes || !sizes.options) return []; + return [].concat((0, _toConsumableArray3.default)(sizes.options)); + } + }]); + return SupremeManager; +}(_BaseManager3.default); + +exports.default = SupremeManager; + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(324), __esModule: true }; + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(72); +__webpack_require__(92); +module.exports = __webpack_require__(135).f('iterator'); + +/***/ }), +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(326), __esModule: true }; + +/***/ }), +/* 326 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(327); +__webpack_require__(190); +__webpack_require__(333); +__webpack_require__(334); +module.exports = __webpack_require__(16).Symbol; + +/***/ }), +/* 327 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(22) + , has = __webpack_require__(48) + , DESCRIPTORS = __webpack_require__(40) + , $export = __webpack_require__(32) + , redefine = __webpack_require__(193) + , META = __webpack_require__(328).KEY + , $fails = __webpack_require__(64) + , shared = __webpack_require__(131) + , setToStringTag = __webpack_require__(91) + , uid = __webpack_require__(90) + , wks = __webpack_require__(20) + , wksExt = __webpack_require__(135) + , wksDefine = __webpack_require__(136) + , keyOf = __webpack_require__(329) + , enumKeys = __webpack_require__(330) + , isArray = __webpack_require__(331) + , anObject = __webpack_require__(34) + , toIObject = __webpack_require__(49) + , toPrimitive = __webpack_require__(127) + , createDesc = __webpack_require__(73) + , _create = __webpack_require__(128) + , gOPNExt = __webpack_require__(332) + , $GOPD = __webpack_require__(203) + , $DP = __webpack_require__(33) + , $keys = __webpack_require__(66) + , gOPD = $GOPD.f + , dP = $DP.f + , gOPN = gOPNExt.f + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , PROTOTYPE = 'prototype' + , HIDDEN = wks('_hidden') + , TO_PRIMITIVE = wks('toPrimitive') + , isEnum = {}.propertyIsEnumerable + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , OPSymbols = shared('op-symbols') + , ObjectProto = Object[PROTOTYPE] + , USE_NATIVE = typeof $Symbol == 'function' + , QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(dP({}, 'a', { + get: function(){ return dP(this, 'a', {value: 7}).a; } + })).a != 7; +}) ? function(it, key, D){ + var protoDesc = gOPD(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + dP(it, key, D); + if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ + return typeof it == 'symbol'; +} : function(it){ + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D){ + if(it === ObjectProto)$defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if(has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key = toPrimitive(key, true)); + if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + it = toIObject(it); + key = toPrimitive(key, true); + if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; + var D = gOPD(it, key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = gOPN(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var IS_OP = it === ObjectProto + , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if(!USE_NATIVE){ + $Symbol = function Symbol(){ + if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function(value){ + if(this === ObjectProto)$set.call(OPSymbols, value); + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString(){ + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(202).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(93).f = $propertyIsEnumerable; + __webpack_require__(137).f = $getOwnPropertySymbols; + + if(DESCRIPTORS && !__webpack_require__(89)){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function(name){ + return wrap(wks(name)); + } +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); + +for(var symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); + +for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + if(isSymbol(key))return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , replacer, $replacer; + while(arguments.length > i)args.push(arguments[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(47)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + +/***/ }), +/* 328 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(90)('meta') + , isObject = __webpack_require__(63) + , has = __webpack_require__(48) + , setDesc = __webpack_require__(33).f + , id = 0; +var isExtensible = Object.isExtensible || function(){ + return true; +}; +var FREEZE = !__webpack_require__(64)(function(){ + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function(it){ + setDesc(it, META, {value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + }}); +}; +var fastKey = function(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add metadata + if(!create)return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function(it, create){ + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return true; + // not necessary to add metadata + if(!create)return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function(it){ + if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + +/***/ }), +/* 329 */ +/***/ (function(module, exports, __webpack_require__) { + +var getKeys = __webpack_require__(66) + , toIObject = __webpack_require__(49); +module.exports = function(object, el){ + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; +}; + +/***/ }), +/* 330 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(66) + , gOPS = __webpack_require__(137) + , pIE = __webpack_require__(93); +module.exports = function(it){ + var result = getKeys(it) + , getSymbols = gOPS.f; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = pIE.f + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); + } return result; +}; + +/***/ }), +/* 331 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(74); +module.exports = Array.isArray || function isArray(arg){ + return cof(arg) == 'Array'; +}; + +/***/ }), +/* 332 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(49) + , gOPN = __webpack_require__(202).f + , toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function(it){ + try { + return gOPN(it); + } catch(e){ + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it){ + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 333 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(136)('asyncIterator'); + +/***/ }), +/* 334 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(136)('observable'); + +/***/ }), +/* 335 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(72); +__webpack_require__(336); +module.exports = __webpack_require__(16).Array.from; + +/***/ }), +/* 336 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(62) + , $export = __webpack_require__(32) + , toObject = __webpack_require__(75) + , call = __webpack_require__(198) + , isArrayIter = __webpack_require__(199) + , toLength = __webpack_require__(129) + , createProperty = __webpack_require__(337) + , getIterFn = __webpack_require__(134); + +$export($export.S + $export.F * !__webpack_require__(201)(function(iter){ Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ + var O = toObject(arrayLike) + , C = typeof this == 'function' ? this : Array + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , index = 0 + , iterFn = getIterFn(O) + , length, result, step, iterator; + if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ + for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for(result = new C(length); length > index; index++){ + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + + +/***/ }), +/* 337 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(33) + , createDesc = __webpack_require__(73); + +module.exports = function(object, index, value){ + if(index in object)$defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + +/***/ }), +/* 338 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(92); +__webpack_require__(72); +module.exports = __webpack_require__(339); + +/***/ }), +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(34) + , get = __webpack_require__(134); +module.exports = __webpack_require__(16).getIterator = function(it){ + var iterFn = get(it); + if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; + +/***/ }), +/* 340 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(341); +module.exports = __webpack_require__(16).Object.getPrototypeOf; + +/***/ }), +/* 341 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(75) + , $getPrototypeOf = __webpack_require__(197); + +__webpack_require__(206)('getPrototypeOf', function(){ + return function getPrototypeOf(it){ + return $getPrototypeOf(toObject(it)); + }; +}); + +/***/ }), +/* 342 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(343); +var $Object = __webpack_require__(16).Object; +module.exports = function defineProperty(it, key, desc){ + return $Object.defineProperty(it, key, desc); +}; + +/***/ }), +/* 343 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(32); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(40), 'Object', {defineProperty: __webpack_require__(33).f}); + +/***/ }), +/* 344 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(345), __esModule: true }; + +/***/ }), +/* 345 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(346); +module.exports = __webpack_require__(16).Object.setPrototypeOf; + +/***/ }), +/* 346 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(32); +$export($export.S, 'Object', {setPrototypeOf: __webpack_require__(347).set}); + +/***/ }), +/* 347 */ +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(63) + , anObject = __webpack_require__(34); +var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = __webpack_require__(62)(Function.call, __webpack_require__(203).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + +/***/ }), +/* 348 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(349), __esModule: true }; + +/***/ }), +/* 349 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(350); +var $Object = __webpack_require__(16).Object; +module.exports = function create(P, D){ + return $Object.create(P, D); +}; + +/***/ }), +/* 350 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(32) +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', {create: __webpack_require__(128)}); + +/***/ }), +/* 351 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = __webpack_require__(50); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var BaseManager = function () { + function BaseManager() { + (0, _classCallCheck3.default)(this, BaseManager); + + this.notificationBar = this.createNotificationBar(); + } + + (0, _createClass3.default)(BaseManager, [{ + key: 'start', + value: function start() { + var _this = this; + + // Checks for page change by repeatedly checking the current page location and tracking change + (function () { + var currentPage = window.location.href; + setInterval(function () { + _this.updateNotificationBar(); + if (currentPage != window.location.href) { + currentPage = window.location.href; + setTimeout(function () { + return _this.onPageChange(); + }, 100); + } + }, 50); + _this.updateNotificationBar(); + _this.onPageChange(); + })(); + } + }, { + key: 'updateNotificationBar', + value: function updateNotificationBar() { + if (document.getElementById('sup-notif-bar')) return; + return this.createNotificationBar(); + } + + /** + * Helper timeout function to add a timer in the notification bar + * @param {Function} fn Function to be called after the delay + * @param {Number} ms Delay before calling the function + * @param {String} actionName Optional, an action name that will be displayed in the notification bar + */ + + }, { + key: 'timeout', + value: function timeout(fn, ms, actionName) { + var _this2 = this; + + var now = new Date(); + var shouldAbort = false; + var currentLocation = document.location.href; + + var interval = setInterval(function () { + if (currentLocation !== document.location.href) { + shouldAbort = true; + clearInterval(interval); + return; + } + var d = new Date(); + var diff = d.getTime() - now.getTime(); + _this2.setNotificationBarText((actionName || 'Action') + ' in : ' + (ms - diff) / 1000); + }, 100); + + setTimeout(function () { + clearInterval(interval); + if (shouldAbort || currentLocation !== document.location.href) { + return; + } + _this2.setNotificationBarText('Done'); + fn(); + }, ms); + } + }, { + key: 'createNotificationBar', + value: function createNotificationBar() { + var notificationBar = document.createElement("div"); + notificationBar.style.width = '100%'; + notificationBar.style.textAlign = 'center'; + notificationBar.style.backgroundColor = 'rgba(203, 255, 205, 0.38)'; + notificationBar.style.lineHeight = '50px'; + notificationBar.style.height = '50px'; + notificationBar.style.fontSize = 'medium'; + notificationBar.style.zIndex = '9999'; + notificationBar.style.position = 'absolute'; + notificationBar.style.left = 0; + notificationBar.style.top = 0; + notificationBar.id = "sup-notif-bar"; + document.body.prepend(notificationBar); + return notificationBar; + } + + /** + * Sets top notification bar text + * @param {} text The new text for the notification bar + */ + + }, { + key: 'setNotificationBarText', + value: function setNotificationBarText(text) { + this.notificationBar.textContent = text; + } + }, { + key: 'onPageChange', + value: function onPageChange() {} + }, { + key: 'sizeMatch', + value: function sizeMatch(sizeA, sizeB, category) { + sizeA = sizeA.toString().toLowerCase(); + sizeB = sizeB.toString().toLowerCase(); + if (!sizeB || !sizeA) return false; + + if (sizeA === sizeB) { + return true; + } + + if (category === "shoes") { + var _ret = function () { + // Match sizes like UK10/US10.5' + var a = sizeA.split(/(?:\/)+/); + var b = sizeB.split(/(?:\/)+/); + + if (a.some(function (x) { + return b.indexOf(x) !== -1; + })) { + return { + v: true + }; + } + return { + v: a[0].replace(/\D/g, '') === b[0].replace(/\D/g, '') + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + } + + if (!isNaN(sizeA) || !isNaN(sizeB)) return false; + + // Match sizes like 'S/M'; + var splitA = sizeA.split('/'); + var splitB = sizeB.split('/'); + + return splitA.some(function (x) { + return sizeB[0] === x[0]; + }) || splitB.some(function (x) { + return sizeA[0] === x[0]; + }); + } + }]); + return BaseManager; +}(); + +exports.default = BaseManager; + +/***/ }), +/* 352 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(353); +module.exports = __webpack_require__(16).Object.keys; + +/***/ }), +/* 353 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(75) + , $keys = __webpack_require__(66); + +__webpack_require__(206)('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; +}); + +/***/ }), +/* 354 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(51); + +var _keys2 = _interopRequireDefault(_keys); + +var _toConsumableArray2 = __webpack_require__(76); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +exports.setInputValue = setInputValue; +exports.processField = processField; +exports.processUnknownField = processUnknownField; +exports.processByLabel = processByLabel; +exports.processByName = processByName; +exports.processByParent = processByParent; +exports.cleanup = cleanup; +exports.processFields = processFields; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ignoredIds = ['g-recaptcha-response', 'number_v', 'oba3', 'order_billing_address_3']; + +function setInputValue(input, value) { + var dispatchEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + input.value = value; + if (dispatchEvent) { + input.dispatchEvent(new Event('change')); + } + return input; +} + +function processField(input, settings) { + var id = input.id; + if (ignoredIds.indexOf(id) !== -1) { + return true; + } + + if (typeof settings[id] !== 'undefined') { + setInputValue(input, settings[id]); + return true; + } + return processUnknownField(input, settings); +} + +function processUnknownField(input, settings) { + if (input.name === 'order[billing_name]') { + setInputValue(input, settings['order_billing_name']); + return true; + } + + if (input.name === 'order[email]') { + setInputValue(input, settings['order_email']); + return true; + } + + if (input.name === 'order[tel]') { + setInputValue(input, settings['order_tel']); + return true; + } + + if (input.name === 'order[billing_address]') { + setInputValue(input, settings['bo']); + return true; + } + + if (input.name === 'order[billing_city]') { + setInputValue(input, settings['order_billing_city']); + return true; + } + + if (input.name === 'order[billing_zip]') { + setInputValue(input, settings['order_billing_zip']); + return true; + } + + if (input.name === 'order[billing_state]') { + setInputValue(input, settings['order_billing_state']); + return true; + } + + if (input.name === 'order[billing_country]') { + setInputValue(input, settings['order_billing_country']); + return true; + } + + if (input.name === 'credit_card[type]') { + setInputValue(input, settings['credit_card_type']); + return true; + } + + if (input.name === 'credit_card[month]') { + setInputValue(input, settings['credit_card_month']); + return true; + } + + if (input.name === 'credit_card[year]') { + setInputValue(input, settings['credit_card_year']); + return true; + } + + if (input.name === 'credit_card[nlb]' || input.name === 'credit_card[cnb]') { + setInputValue(input, settings['cnb']); + return true; + } + + if (input.name === 'credit_card[rvv]' || input.name === 'credit_card[vval]') { + setInputValue(input, settings['vval']); + return true; + } + + return processByLabel(input, settings); +} + +function processByLabel(input, settings) { + var parent = input.parentNode; + var label = parent.getElementsByTagName('label')[0] || parent.querySelector('.sr-label'); + if (!label) { + var children = parent.childNodes; + for (var i = 0; i < children.length; i += 1) { + var hasClass = [].concat((0, _toConsumableArray3.default)(children[i].classList)).filter(function (x) { + return x.toLowerCase().indexOf('label') !== -1; + }).length > 0; + if (hasClass) { + label = children[i]; + break; + } + } + } + if (!label) return false; + + var text = label.innerText; + if (!text) { + return; + } + + var inArray = function inArray(txt, arr) { + return arr.map(function (x) { + return x.toLowerCase(); + }).indexOf(txt.toLowerCase()) !== -1; + }; + + var hasText = function hasText(arr) { + return inArray(text, arr); + }; + + if (hasText(['nom', 'name', 'firstname', 'lastname', 'nom', 'prenom'])) { + setInputValue(input, settings['order_billing_name']); + return true; + } + if (hasText(['email'])) { + setInputValue(input, settings['order_email']); + return true; + } + if (hasText(['tel', 'phone', 'phone number'])) { + setInputValue(input, settings['order_tel']); + return true; + } + if (hasText(['address', 'adresse', 'addresse'])) { + setInputValue(input, settings['bo']); + return true; + } + if (hasText(['city', 'ville'])) { + setInputValue(input, settings['order_billing_city']); + return true; + } + if (hasText(['zip', 'code postal', 'codepostal', 'code_postal', 'postal code', 'postalcode'])) { + setInputValue(input, settings['order_billing_zip']); + return true; + } + if (hasText(['country', 'pays'])) { + setInputValue(input, settings['order_billing_country']); + return true; + } + if (hasText(['state', 'état', 'etat', 'province'])) { + setInputValue(input, settings['order_billing_state']); + return true; + } + if (hasText(['type', 'type de carte', 'credit card type'])) { + setInputValue(input, settings['credit_card_type']); + return true; + } + if (hasText(['numéro', 'number', 'numero'])) { + setInputValue(input, settings['cnb']); + return true; + } + if (hasText(['exp. date', 'exp date', 'expiry date', 'date d’exp.', 'date d\'exp.', 'date d\'expiration'])) { + if (input.type === 'select-one') { + var isMonth = input.options && input.options[0] && input.options[0].value[0] === '0'; + setInputValue(input, settings[isMonth ? 'credit_card_month' : 'credit_card_year']); + return true; + } + } + if (hasText(['CVV'])) { + setInputValue(input, settings['vval']); + return true; + } + return processByName(input, settings); +} + +function processByName(input, settings) { + if ((0, _keys2.default)(settings).indexOf(input.name) !== -1) { + setInputValue(input, settings[input.name]); + return true; + } + return processByParent(input, settings); +} + +function processByParent(input, settings) { + var parent = input.parentNode; + if (!parent) { + return false; + } + var classList = [].concat((0, _toConsumableArray3.default)(parent.classList)); + if (classList.indexOf('credit_card_verification_value') !== -1) { + setInputValue(input, settings['vval']); + return true; + } + + if (classList.indexOf('credit_card_number') !== -1) { + setInputValue(input, settings['cnb']); + return true; + } + + // probably a card detail input + if (parent.parentNode && parent.parentNode.id === 'card_details') { + // either month/year of expiry date + if (input.type === 'select-one') { + var isMonth = input.options && input.options[0] && input.options[0].value[0] === '0'; + setInputValue(input, settings[isMonth ? 'credit_card_month' : 'credit_card_year']); + return true; + } + + // probably cvv + if (input.attributes['maxlength']) { + setInputValue(input, settings['vval']); + return true; + } + + // otherwise its probably cc number + setInputValue(input, settings['cnb']); + } +} + +function cleanup(inputs, settings) { + var input = document.getElementById('order_billing_state') || document.querySelector('[name="order[billing_state]"]'); + if (input) { + setInputValue(input, settings['order_billing_state'], false); + return true; + } + var stateLabel = document.querySelector('#state_label'); + if (stateLabel && stateLabel.parentNode) { + var stateSelect = stateLabel.parentNode.querySelector('select'); + if (stateLabel) { + setInputValue(stateSelect, settings['order_billing_state'], false); + return true; + } + } + + var stateInputParent = document.querySelector('.order_billing_state'); + if (stateInputParent) { + var selector = stateInputParent.querySelector('select'); + if (selector) { + setInputValue(selector, settings['order_billing_state'], false); + return true; + } + } + return false; +} + +function processFields(inputs, settings) { + var successes = []; + for (var i = 0; i < inputs.length; i += 1) { + var success = processField(inputs[i], settings); + successes.push(success); + if (!success) { + console.info('Unknown field id : ' + inputs[i].id); + } + } + cleanup(inputs, settings); + return successes.every(function (x) { + return x === true; + }); +} + +/***/ }), +/* 355 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.saveState = exports.loadSavedState = exports.initializeLocalStorageState = undefined; + +var _regenerator = __webpack_require__(121); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _asyncToGenerator2 = __webpack_require__(122); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); + +var _promise = __webpack_require__(189); + +var _promise2 = _interopRequireDefault(_promise); + +var _stringify = __webpack_require__(356); + +var _stringify2 = _interopRequireDefault(_stringify); + +exports.saveToChromeStorage = saveToChromeStorage; +exports.getFromChromeStorage = getFromChromeStorage; + +var _Helpers = __webpack_require__(207); + +var Helpers = _interopRequireWildcard(_Helpers); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var initializeLocalStorageState = exports.initializeLocalStorageState = function initializeLocalStorageState(initialState, version) { + localStorage.setItem('state', (0, _stringify2.default)([{ value: initialState || {}, version: version }])); +}; + +var loadSavedState = exports.loadSavedState = function loadSavedState(version) { + try { + var items = JSON.parse(localStorage.getItem('state')) || []; + var state = items.filter(function (x) { + return x.version === version; + })[0]; + if (state) { + return state.value; + } + return {}; + } catch (err) { + initializeLocalStorageState({}, version); + return {}; + } +}; + +var saveState = exports.saveState = function saveState(state, version) { + try { + // If no state is saved, we create it using the current version number + if (!localStorage.getItem('state')) { + initializeLocalStorageState(state, version); + } else { + var currentState = JSON.parse(localStorage.getItem('state')); + var currentVersionState = currentState.filter(function (x) { + return x.version === version; + })[0]; + // If a state for the current version already exists, we update it + if (currentVersionState) { + currentVersionState.value = state; + } else { + currentState.push({ value: state, version: version }); + } + localStorage.setItem('state', (0, _stringify2.default)(currentState)); + } + } catch (err) { + console.info('Possible corrupted or incompatible state found in the localstorage, reinitializing the state...'); + initializeLocalStorageState({}, version); + } +}; + +function saveToChromeStorage(key, value) { + return new _promise2.default(function (resolve) { + var obj = {}; + obj[key] = value; + chrome.storage.local.set(obj, function () { + resolve(); + }); + }); +} + +function getFromChromeStorage(key) { + var _this = this; + + return new _promise2.default(function (resolve) { + chrome.storage.local.get(key, function () { + var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(settings) { + return _regenerator2.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + resolve(Helpers.isObjectEmpty(settings) ? {} : settings[key]); + + case 1: + case 'end': + return _context.stop(); + } + } + }, _callee, _this); + })); + + return function (_x) { + return _ref.apply(this, arguments); + }; + }()); + }); +} + +/***/ }), +/* 356 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(357), __esModule: true }; + +/***/ }), +/* 357 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(16) + , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify}); +module.exports = function stringify(it){ // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); +}; + +/***/ }), +/* 358 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SHOP_NAME = undefined; + +var _keys = __webpack_require__(51); + +var _keys2 = _interopRequireDefault(_keys); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _Tab = __webpack_require__(371); + +var _Tab2 = _interopRequireDefault(_Tab); + +var _reactRedux = __webpack_require__(36); + +var _FontIcon = __webpack_require__(256); + +var _FontIcon2 = _interopRequireDefault(_FontIcon); + +var _IconButton = __webpack_require__(83); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _colors = __webpack_require__(58); + +var _Menus = __webpack_require__(84); + +var menus = _interopRequireWildcard(_Menus); + +var _Billing = __webpack_require__(492); + +var _Billing2 = _interopRequireDefault(_Billing); + +var _Options = __webpack_require__(763); + +var _Options2 = _interopRequireDefault(_Options); + +var _Sizes = __webpack_require__(764); + +var _Sizes2 = _interopRequireDefault(_Sizes); + +var _Layout = __webpack_require__(765); + +var _Layout2 = _interopRequireDefault(_Layout); + +var _menu = __webpack_require__(772); + +var _profiles = __webpack_require__(773); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SHOP_NAME = exports.SHOP_NAME = 'Supreme'; + +var Supreme = function (_Component) { + (0, _inherits3.default)(Supreme, _Component); + + function Supreme() { + (0, _classCallCheck3.default)(this, Supreme); + return (0, _possibleConstructorReturn3.default)(this, (Supreme.__proto__ || (0, _getPrototypeOf2.default)(Supreme)).apply(this, arguments)); + } + + (0, _createClass3.default)(Supreme, [{ + key: 'getContainerForMenu', + value: function getContainerForMenu(menu) { + var _this2 = this; + + switch (menu) { + case menus.MENU_BILLING: + return _react2.default.createElement(_Billing2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + case menus.MENU_OPTIONS: + return _react2.default.createElement(_Options2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + case menus.MENU_SIZES: + return _react2.default.createElement(_Sizes2.default, { onSubmit: function onSubmit(data) { + return _this2.onSubmit(menu, data); + }, shop: SHOP_NAME }); + default: + return null; + } + } + }, { + key: 'strToNumberReducer', + value: function strToNumberReducer(menu, key, value) { + // Don't process values for billing + if (typeof value === 'string' && !isNaN(value) && menu !== menus.MENU_BILLING) { + return +value; + } + return value; + } + }, { + key: 'transform', + value: function transform(menu, obj, reducer) { + var keys = (0, _keys2.default)(obj); + var newObj = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = obj[key]; + newObj[key] = reducer(menu, key, value); + } + return newObj; + } + }, { + key: 'onSubmit', + value: function onSubmit(menu, data) { + var newObj = this.transform(menu, data, this.strToNumberReducer); + this.props.updateSettings(this.props.currentProfile, SHOP_NAME, menu, newObj); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + if (this.props.menu == null) { + this.props.changeMenu(Supreme.getDefaultMenu()); + } + } + }, { + key: 'getIconForTabMenu', + value: function getIconForTabMenu(menu) { + var isIncomplete = !this.props.settings[SHOP_NAME] || !this.props.settings[SHOP_NAME][menu]; + var color = isIncomplete ? _colors.red300 : 'white'; + var tip = isIncomplete ? 'This tab hasn\'t been configured yet' : ''; + return _react2.default.createElement( + _IconButton2.default, + { iconStyle: { color: color }, tooltip: tip, tooltipPosition: 'top-center', tooltipStyles: { color: 'white' } }, + _react2.default.createElement( + _FontIcon2.default, + { style: { color: color }, className: 'material-icons' }, + isIncomplete ? 'error' : 'done' + ) + ); + } + }, { + key: 'getTabs', + value: function getTabs() { + var _this3 = this; + + return [_react2.default.createElement(_Tab2.default, { + label: 'Billing', + key: 1, + icon: this.getIconForTabMenu(menus.MENU_BILLING), + value: menus.MENU_BILLING, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_BILLING); + } + }), _react2.default.createElement(_Tab2.default, { + label: 'Options', + key: 2, + icon: this.getIconForTabMenu(menus.MENU_OPTIONS), + value: menus.MENU_OPTIONS, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_OPTIONS); + } + }), _react2.default.createElement(_Tab2.default, { + label: 'Sizes', + key: 3, + icon: this.getIconForTabMenu(menus.MENU_SIZES), + value: menus.MENU_SIZES, + onClick: function onClick() { + return _this3.props.changeMenu(menus.MENU_SIZES); + } + })]; + } + }, { + key: 'render', + value: function render() { + var menu = this.props.menu; + + return _react2.default.createElement( + _Layout2.default, + { title: menu || 'Loading...', tabs: this.getTabs(), currentTab: menu }, + this.getContainerForMenu(menu) + ); + } + }], [{ + key: 'getDefaultMenu', + value: function getDefaultMenu() { + return menus.MENU_BILLING; + } + }]); + return Supreme; +}(_react.Component); + +function mapStateToProps(state) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + menu: state.menu.currentMenu, + settings: settings, + currentProfile: currentProfile + }; +} + +function mapDispatchToProps(dispatch) { + return { + changeMenu: function changeMenu(menu) { + return dispatch((0, _menu.changeMenu)(menu)); + }, + updateSettings: function updateSettings(currentProfile, shop, key, value) { + return dispatch((0, _profiles.updateProfileSettings)(currentProfile, shop, key, value)); + } + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Supreme); + +/***/ }), +/* 359 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(53); + +var invariant = __webpack_require__(10); + +/** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ +var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; + +var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } +}; + +var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } +}; + +var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } +}; + +var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } +}; + +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; + +/** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ +var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; +}; + +var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler +}; + +module.exports = PooledClass; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 360 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactElement = __webpack_require__(41); + +/** + * Create a factory that creates HTML tag elements. + * + * @private + */ +var createDOMFactory = ReactElement.createFactory; +if (process.env.NODE_ENV !== 'production') { + var ReactElementValidator = __webpack_require__(215); + createDOMFactory = ReactElementValidator.createFactory; +} + +/** + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. + * + * @public + */ +var ReactDOMFactories = { + a: createDOMFactory('a'), + abbr: createDOMFactory('abbr'), + address: createDOMFactory('address'), + area: createDOMFactory('area'), + article: createDOMFactory('article'), + aside: createDOMFactory('aside'), + audio: createDOMFactory('audio'), + b: createDOMFactory('b'), + base: createDOMFactory('base'), + bdi: createDOMFactory('bdi'), + bdo: createDOMFactory('bdo'), + big: createDOMFactory('big'), + blockquote: createDOMFactory('blockquote'), + body: createDOMFactory('body'), + br: createDOMFactory('br'), + button: createDOMFactory('button'), + canvas: createDOMFactory('canvas'), + caption: createDOMFactory('caption'), + cite: createDOMFactory('cite'), + code: createDOMFactory('code'), + col: createDOMFactory('col'), + colgroup: createDOMFactory('colgroup'), + data: createDOMFactory('data'), + datalist: createDOMFactory('datalist'), + dd: createDOMFactory('dd'), + del: createDOMFactory('del'), + details: createDOMFactory('details'), + dfn: createDOMFactory('dfn'), + dialog: createDOMFactory('dialog'), + div: createDOMFactory('div'), + dl: createDOMFactory('dl'), + dt: createDOMFactory('dt'), + em: createDOMFactory('em'), + embed: createDOMFactory('embed'), + fieldset: createDOMFactory('fieldset'), + figcaption: createDOMFactory('figcaption'), + figure: createDOMFactory('figure'), + footer: createDOMFactory('footer'), + form: createDOMFactory('form'), + h1: createDOMFactory('h1'), + h2: createDOMFactory('h2'), + h3: createDOMFactory('h3'), + h4: createDOMFactory('h4'), + h5: createDOMFactory('h5'), + h6: createDOMFactory('h6'), + head: createDOMFactory('head'), + header: createDOMFactory('header'), + hgroup: createDOMFactory('hgroup'), + hr: createDOMFactory('hr'), + html: createDOMFactory('html'), + i: createDOMFactory('i'), + iframe: createDOMFactory('iframe'), + img: createDOMFactory('img'), + input: createDOMFactory('input'), + ins: createDOMFactory('ins'), + kbd: createDOMFactory('kbd'), + keygen: createDOMFactory('keygen'), + label: createDOMFactory('label'), + legend: createDOMFactory('legend'), + li: createDOMFactory('li'), + link: createDOMFactory('link'), + main: createDOMFactory('main'), + map: createDOMFactory('map'), + mark: createDOMFactory('mark'), + menu: createDOMFactory('menu'), + menuitem: createDOMFactory('menuitem'), + meta: createDOMFactory('meta'), + meter: createDOMFactory('meter'), + nav: createDOMFactory('nav'), + noscript: createDOMFactory('noscript'), + object: createDOMFactory('object'), + ol: createDOMFactory('ol'), + optgroup: createDOMFactory('optgroup'), + option: createDOMFactory('option'), + output: createDOMFactory('output'), + p: createDOMFactory('p'), + param: createDOMFactory('param'), + picture: createDOMFactory('picture'), + pre: createDOMFactory('pre'), + progress: createDOMFactory('progress'), + q: createDOMFactory('q'), + rp: createDOMFactory('rp'), + rt: createDOMFactory('rt'), + ruby: createDOMFactory('ruby'), + s: createDOMFactory('s'), + samp: createDOMFactory('samp'), + script: createDOMFactory('script'), + section: createDOMFactory('section'), + select: createDOMFactory('select'), + small: createDOMFactory('small'), + source: createDOMFactory('source'), + span: createDOMFactory('span'), + strong: createDOMFactory('strong'), + style: createDOMFactory('style'), + sub: createDOMFactory('sub'), + summary: createDOMFactory('summary'), + sup: createDOMFactory('sup'), + table: createDOMFactory('table'), + tbody: createDOMFactory('tbody'), + td: createDOMFactory('td'), + textarea: createDOMFactory('textarea'), + tfoot: createDOMFactory('tfoot'), + th: createDOMFactory('th'), + thead: createDOMFactory('thead'), + time: createDOMFactory('time'), + title: createDOMFactory('title'), + tr: createDOMFactory('tr'), + track: createDOMFactory('track'), + u: createDOMFactory('u'), + ul: createDOMFactory('ul'), + 'var': createDOMFactory('var'), + video: createDOMFactory('video'), + wbr: createDOMFactory('wbr'), + + // SVG + circle: createDOMFactory('circle'), + clipPath: createDOMFactory('clipPath'), + defs: createDOMFactory('defs'), + ellipse: createDOMFactory('ellipse'), + g: createDOMFactory('g'), + image: createDOMFactory('image'), + line: createDOMFactory('line'), + linearGradient: createDOMFactory('linearGradient'), + mask: createDOMFactory('mask'), + path: createDOMFactory('path'), + pattern: createDOMFactory('pattern'), + polygon: createDOMFactory('polygon'), + polyline: createDOMFactory('polyline'), + radialGradient: createDOMFactory('radialGradient'), + rect: createDOMFactory('rect'), + stop: createDOMFactory('stop'), + svg: createDOMFactory('svg'), + text: createDOMFactory('text'), + tspan: createDOMFactory('tspan') +}; + +module.exports = ReactDOMFactories; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 361 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(53); + +var ReactPropTypeLocationNames = __webpack_require__(362); +var ReactPropTypesSecret = __webpack_require__(363); + +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); +} + +var loggedTypeFailures = {}; + +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?object} element The React element that is being type-checked + * @param {?number} debugID The React component instance that is being type-checked + * @private + */ +function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0; + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0; + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var componentStackInfo = ''; + + if (process.env.NODE_ENV !== 'production') { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (debugID !== null) { + componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); + } else if (element !== null) { + componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); + } + } + + process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; + } + } + } +} + +module.exports = checkReactTypeSpec; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 362 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactPropTypeLocationNames = {}; + +if (process.env.NODE_ENV !== 'production') { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; +} + +module.exports = ReactPropTypeLocationNames; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 363 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + +/***/ }), +/* 364 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _require = __webpack_require__(41), + isValidElement = _require.isValidElement; + +var factory = __webpack_require__(216); + +module.exports = factory(isValidElement); + +/***/ }), +/* 365 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +var emptyFunction = __webpack_require__(21); +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +var ReactPropTypesSecret = __webpack_require__(217); +var checkPropTypes = __webpack_require__(366); + +module.exports = function(isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (process.env.NODE_ENV !== 'production') { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + warning( + false, + 'You are manually calling a React.PropTypes validation ' + + 'function for the `%s` prop on `%s`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', + propFullName, + componentName + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); + } + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; + return emptyFunction.thatReturnsNull; + } + + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (typeof checker !== 'function') { + warning( + false, + 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + + 'received %s at index %s.', + getPostfixForTypeWarning(checker), + i + ); + return emptyFunction.thatReturnsNull; + } + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { + return null; + } + } + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + default: + return type; + } + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 366 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + + +if (process.env.NODE_ENV !== 'production') { + var invariant = __webpack_require__(10); + var warning = __webpack_require__(11); + var ReactPropTypesSecret = __webpack_require__(217); + var loggedTypeFailures = {}; +} + +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ +function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (process.env.NODE_ENV !== 'production') { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var stack = getStack ? getStack() : ''; + + warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); + } + } + } + } +} + +module.exports = checkPropTypes; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 367 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +module.exports = '15.6.1'; + +/***/ }), +/* 368 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _require = __webpack_require__(208), + Component = _require.Component; + +var _require2 = __webpack_require__(41), + isValidElement = _require2.isValidElement; + +var ReactNoopUpdateQueue = __webpack_require__(209); +var factory = __webpack_require__(369); + +module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue); + +/***/ }), +/* 369 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var emptyObject = __webpack_require__(95); +var _invariant = __webpack_require__(10); + +if (process.env.NODE_ENV !== 'production') { + var warning = __webpack_require__(11); +} + +var MIXINS_KEY = 'mixins'; + +// Helper function to allow the creation of anonymous functions which do not +// have .name set to the name of the variable being assigned to. +function identity(fn) { + return fn; +} + +var ReactPropTypeLocationNames; +if (process.env.NODE_ENV !== 'production') { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; +} else { + ReactPropTypeLocationNames = {}; +} + +function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { + /** + * Policies that describe methods in `ReactClassInterface`. + */ + + var injectedMixins = []; + + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE' + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function(Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function(Constructor, childContextTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign( + {}, + Constructor.childContextTypes, + childContextTypes + ); + }, + contextTypes: function(Constructor, contextTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign( + {}, + Constructor.contextTypes, + contextTypes + ); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function(Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function(Constructor, propTypes) { + if (process.env.NODE_ENV !== 'production') { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function() {} + }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + if (process.env.NODE_ENV !== 'production') { + warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName + ); + } + } + } + } + + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) + ? ReactClassInterface[name] + : null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant( + specPolicy === 'OVERRIDE_BASE', + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name + ); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant( + specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name + ); + } + } + + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (process.env.NODE_ENV !== 'production') { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + if (process.env.NODE_ENV !== 'production') { + warning( + isMixinValid, + "%s: You're attempting to include a mixin that is either null " + + 'or not an object. Check the mixins included by the component, ' + + 'as well as any mixins they include themselves. ' + + 'Expected object but got %s.', + Constructor.displayName || 'ReactClass', + spec === null ? null : typeofSpec + ); + } + } + + return; + } + + _invariant( + typeof spec !== 'function', + "ReactClass: You're attempting to " + + 'use a component class or function as a mixin. Instead, just use a ' + + 'regular object.' + ); + _invariant( + !isValidElement(spec), + "ReactClass: You're attempting to " + + 'use a component as a mixin. Instead, just use a regular object.' + ); + + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && + !isReactClassMethod && + !isAlreadyDefined && + spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant( + isReactClassMethod && + (specPolicy === 'DEFINE_MANY_MERGED' || + specPolicy === 'DEFINE_MANY'), + 'ReactClass: Unexpected spec policy %s for key %s ' + + 'when mixing in component specs.', + specPolicy, + name + ); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (process.env.NODE_ENV !== 'production') { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } + } + + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name + ); + + var isInherited = name in Constructor; + _invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name + ); + Constructor[name] = property; + } + } + + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' + ); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key + ); + one[key] = two[key]; + } + } + return one; + } + + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; + } + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; + } + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (process.env.NODE_ENV !== 'production') { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function(newThis) { + for ( + var _len = arguments.length, + args = Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + if (process.env.NODE_ENV !== 'production') { + warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName + ); + } + } else if (!args.length) { + if (process.env.NODE_ENV !== 'production') { + warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName + ); + } + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + var IsMountedPreMixin = { + componentDidMount: function() { + this.__isMounted = true; + } + }; + + var IsMountedPostMixin = { + componentWillUnmount: function() { + this.__isMounted = false; + } + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function(newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function() { + if (process.env.NODE_ENV !== 'production') { + warning( + this.__didWarnIsMounted, + '%s: isMounted is deprecated. Instead, make sure to clean up ' + + 'subscriptions and pending requests in componentWillUnmount to ' + + 'prevent memory leaks.', + (this.constructor && this.constructor.displayName) || + this.name || + 'Component' + ); + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; + } + }; + + var ReactClassComponent = function() {}; + _assign( + ReactClassComponent.prototype, + ReactComponent.prototype, + ReactClassMixin + ); + + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function(props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (process.env.NODE_ENV !== 'production') { + warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: https://fb.me/react-legacyfactory' + ); + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (process.env.NODE_ENV !== 'production') { + // We allow auto-mocks to proceed as if they're returning null. + if ( + initialState === undefined && + this.getInitialState._isMockFunction + ) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent' + ); + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedPreMixin); + mixSpecIntoComponent(Constructor, spec); + mixSpecIntoComponent(Constructor, IsMountedPostMixin); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (process.env.NODE_ENV !== 'production') { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.' + ); + + if (process.env.NODE_ENV !== 'production') { + warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component' + ); + warning( + !Constructor.prototype.componentWillRecieveProps, + '%s has a method called ' + + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', + spec.displayName || 'A component' + ); + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; +} + +module.exports = factory; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 370 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + +var _prodInvariant = __webpack_require__(53); + +var ReactElement = __webpack_require__(41); + +var invariant = __webpack_require__(10); + +/** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. + * + * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only + * + * The current implementation of this function assumes that a single child gets + * passed without a wrapper, but the purpose of this helper function is to + * abstract away the particular structure of children. + * + * @param {?object} children Child collection structure. + * @return {ReactElement} The first and only `ReactElement` contained in the + * structure. + */ +function onlyChild(children) { + !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0; + return children; +} + +module.exports = onlyChild; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 371 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _EnhancedButton = __webpack_require__(54); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tabs = context.muiTheme.tabs; + + + return { + root: { + color: props.selected ? tabs.selectedTextColor : tabs.textColor, + fontWeight: 500, + fontSize: 14, + width: props.width, + textTransform: 'uppercase', + padding: 0 + }, + button: { + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + justifyContent: 'center', + height: props.label && props.icon ? 72 : 48 + } + }; +} + +var Tab = function (_Component) { + (0, _inherits3.default)(Tab, _Component); + + function Tab() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Tab); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tab.__proto__ || (0, _getPrototypeOf2.default)(Tab)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(_this.props.value, event, _this); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Tab, [{ + key: 'render', + value: function render() { + var _props = this.props, + icon = _props.icon, + index = _props.index, + onActive = _props.onActive, + onTouchTap = _props.onTouchTap, + selected = _props.selected, + label = _props.label, + buttonStyle = _props.buttonStyle, + style = _props.style, + value = _props.value, + width = _props.width, + other = (0, _objectWithoutProperties3.default)(_props, ['icon', 'index', 'onActive', 'onTouchTap', 'selected', 'label', 'buttonStyle', 'style', 'value', 'width']); + + + var styles = getStyles(this.props, this.context); + + var iconElement = void 0; + if (icon && _react2.default.isValidElement(icon)) { + var iconProps = { + style: { + fontSize: 24, + color: styles.root.color, + marginBottom: label ? 5 : 0 + } + }; + // If it's svg icon set color via props + if (icon.type.muiName !== 'FontIcon') { + iconProps.color = styles.root.color; + } + iconElement = _react2.default.cloneElement(icon, iconProps); + } + + var rippleOpacity = 0.3; + var rippleColor = this.context.muiTheme.tabs.selectedTextColor; + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + style: (0, _simpleAssign2.default)(styles.root, style), + focusRippleColor: rippleColor, + touchRippleColor: rippleColor, + focusRippleOpacity: rippleOpacity, + touchRippleOpacity: rippleOpacity, + onTouchTap: this.handleTouchTap + }), + _react2.default.createElement( + 'div', + { style: (0, _simpleAssign2.default)(styles.button, buttonStyle) }, + iconElement, + label + ) + ); + } + }]); + return Tab; +}(_react.Component); + +Tab.muiName = 'Tab'; +Tab.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Tab.propTypes = { + /** + * Override the inline-styles of the button element. + */ + buttonStyle: _react.PropTypes.object, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Sets the icon of the tab, you can pass `FontIcon` or `SvgIcon` elements. + */ + icon: _react.PropTypes.node, + /** + * @ignore + */ + index: _react.PropTypes.any, + /** + * Sets the text value of the tab item to the string specified. + */ + label: _react.PropTypes.node, + /** + * Fired when the active tab changes by touch or tap. + * Use this event to specify any functionality when an active tab changes. + * For example - we are using this to route to home when the third tab becomes active. + * This function will always recieve the active tab as it\'s first argument. + */ + onActive: _react.PropTypes.func, + /** + * @ignore + * This property is overriden by the Tabs component. + */ + onTouchTap: _react.PropTypes.func, + /** + * @ignore + * Defines if the current tab is selected or not. + * The Tabs component is responsible for setting this property. + */ + selected: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * If value prop passed to Tabs component, this value prop is also required. + * It assigns a value to the tab so that it can be selected by the Tabs. + */ + value: _react.PropTypes.any, + /** + * @ignore + * This property is overriden by the Tabs component. + */ + width: _react.PropTypes.string +} : void 0; +exports.default = Tab; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 372 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(373); +module.exports = __webpack_require__(16).Object.assign; + +/***/ }), +/* 373 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(32); + +$export($export.S + $export.F, 'Object', {assign: __webpack_require__(374)}); + +/***/ }), +/* 374 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(66) + , gOPS = __webpack_require__(137) + , pIE = __webpack_require__(93) + , toObject = __webpack_require__(75) + , IObject = __webpack_require__(195) + , $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(64)(function(){ + var A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function(k){ B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source){ // eslint-disable-line no-unused-vars + var T = toObject(target) + , aLen = arguments.length + , index = 1 + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) + , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; + } return T; +} : $assign; + +/***/ }), +/* 375 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(376).create; + +/***/ }), +/* 376 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(53); + +var ReactChildren = __webpack_require__(210); +var ReactElement = __webpack_require__(41); + +var emptyFunction = __webpack_require__(21); +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +/** + * We used to allow keyed objects to serve as a collection of ReactElements, + * or nested sets. This allowed us a way to explicitly key a set or fragment of + * components. This is now being replaced with an opaque data structure. + * The upgrade path is to call React.addons.createFragment({ key: value }) to + * create a keyed fragment. The resulting data structure is an array. + */ + +var numericPropertyRegex = /^\d+$/; + +var warnedAboutNumeric = false; + +var ReactFragment = { + /** + * Wrap a keyed object in an opaque proxy that warns you if you access any + * of its properties. + * See https://facebook.github.io/react/docs/create-fragment.html + */ + create: function (object) { + if (typeof object !== 'object' || !object || Array.isArray(object)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment only accepts a single object. Got: %s', object) : void 0; + return object; + } + if (ReactElement.isValidElement(object)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : void 0; + return object; + } + + !(object.nodeType !== 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.') : _prodInvariant('0') : void 0; + + var result = []; + + for (var key in object) { + if (process.env.NODE_ENV !== 'production') { + if (!warnedAboutNumeric && numericPropertyRegex.test(key)) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment(...): Child objects should have ' + 'non-numeric keys so ordering is preserved.') : void 0; + warnedAboutNumeric = true; + } + } + ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument); + } + + return result; + } +}; + +module.exports = ReactFragment; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 377 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ + + + +var ReactDOMComponentTree = __webpack_require__(15); +var ReactDefaultInjection = __webpack_require__(378); +var ReactMount = __webpack_require__(240); +var ReactReconciler = __webpack_require__(67); +var ReactUpdates = __webpack_require__(29); +var ReactVersion = __webpack_require__(456); + +var findDOMNode = __webpack_require__(457); +var getHostComponentFromComposite = __webpack_require__(241); +var renderSubtreeIntoContainer = __webpack_require__(458); +var warning = __webpack_require__(11); + +ReactDefaultInjection.inject(); + +var ReactDOM = { + findDOMNode: findDOMNode, + render: ReactMount.render, + unmountComponentAtNode: ReactMount.unmountComponentAtNode, + version: ReactVersion, + + /* eslint-disable camelcase */ + unstable_batchedUpdates: ReactUpdates.batchedUpdates, + unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer +}; + +// Inject the runtime into a devtools global hook regardless of browser. +// Allows for debugging when the hook is injected on the page. +if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { + __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ + ComponentTree: { + getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode, + getNodeFromInstance: function (inst) { + // inst is an internal instance (but could be a composite) + if (inst._renderedComponent) { + inst = getHostComponentFromComposite(inst); + } + if (inst) { + return ReactDOMComponentTree.getNodeFromInstance(inst); + } else { + return null; + } + } + }, + Mount: ReactMount, + Reconciler: ReactReconciler + }); +} + +if (process.env.NODE_ENV !== 'production') { + var ExecutionEnvironment = __webpack_require__(18); + if (ExecutionEnvironment.canUseDOM && window.top === window.self) { + + // First check if devtools is not installed + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + // If we're in Chrome or Firefox, provide a download link if not installed. + if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) { + // Firefox does not have the issue with devtools loaded over file:// + var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1; + console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools'); + } + } + + var testFunc = function testFn() {}; + process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0; + + // If we're in IE8, check to see if we are in compatibility mode and provide + // information on preventing compatibility mode + var ieCompatibilityMode = document.documentMode && document.documentMode < 8; + + process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0; + + var expectedFeatures = [ + // shims + Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim]; + + for (var i = 0; i < expectedFeatures.length; i++) { + if (!expectedFeatures[i]) { + process.env.NODE_ENV !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0; + break; + } + } + } +} + +if (process.env.NODE_ENV !== 'production') { + var ReactInstrumentation = __webpack_require__(23); + var ReactDOMUnknownPropertyHook = __webpack_require__(459); + var ReactDOMNullInputValuePropHook = __webpack_require__(460); + var ReactDOMInvalidARIAHook = __webpack_require__(461); + + ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook); + ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook); + ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook); +} + +module.exports = ReactDOM; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 378 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ARIADOMPropertyConfig = __webpack_require__(379); +var BeforeInputEventPlugin = __webpack_require__(380); +var ChangeEventPlugin = __webpack_require__(384); +var DefaultEventPluginOrder = __webpack_require__(392); +var EnterLeaveEventPlugin = __webpack_require__(393); +var HTMLDOMPropertyConfig = __webpack_require__(394); +var ReactComponentBrowserEnvironment = __webpack_require__(395); +var ReactDOMComponent = __webpack_require__(401); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactDOMEmptyComponent = __webpack_require__(427); +var ReactDOMTreeTraversal = __webpack_require__(428); +var ReactDOMTextComponent = __webpack_require__(429); +var ReactDefaultBatchingStrategy = __webpack_require__(430); +var ReactEventListener = __webpack_require__(431); +var ReactInjection = __webpack_require__(433); +var ReactReconcileTransaction = __webpack_require__(434); +var SVGDOMPropertyConfig = __webpack_require__(440); +var SelectEventPlugin = __webpack_require__(441); +var SimpleEventPlugin = __webpack_require__(442); + +var alreadyInjected = false; + +function inject() { + if (alreadyInjected) { + // TODO: This is currently true because these injections are shared between + // the client and the server package. They should be built independently + // and not share any injection state. Then this problem will be solved. + return; + } + alreadyInjected = true; + + ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); + + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); + ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree); + ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal); + + /** + * Some important event plugins included by default (without having to require + * them). + */ + ReactInjection.EventPluginHub.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin + }); + + ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent); + + ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent); + + ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); + + ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) { + return new ReactDOMEmptyComponent(instantiate); + }); + + ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); + ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); + + ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); +} + +module.exports = { + inject: inject +}; + +/***/ }), +/* 379 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ARIADOMPropertyConfig = { + Properties: { + // Global States and Properties + 'aria-current': 0, // state + 'aria-details': 0, + 'aria-disabled': 0, // state + 'aria-hidden': 0, // state + 'aria-invalid': 0, // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0 + }, + DOMAttributeNames: {}, + DOMPropertyNames: {} +}; + +module.exports = ARIADOMPropertyConfig; + +/***/ }), +/* 380 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPropagators = __webpack_require__(77); +var ExecutionEnvironment = __webpack_require__(18); +var FallbackCompositionState = __webpack_require__(381); +var SyntheticCompositionEvent = __webpack_require__(382); +var SyntheticInputEvent = __webpack_require__(383); + +var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space +var START_KEYCODE = 229; + +var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; + +var documentMode = null; +if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; +} + +// Webkit offers a very useful `textInput` event that can be used to +// directly represent `beforeInput`. The IE `textinput` event is not as +// useful, so we don't use it. +var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); + +// In IE9+, we have access to composition events, but the data supplied +// by the native compositionend event may be incorrect. Japanese ideographic +// spaces, for instance (\u3000) are not recorded correctly. +var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); + +/** + * Opera <= 12 includes TextEvent in window, but does not fire + * text input events. Rely on keypress instead. + */ +function isPresto() { + var opera = window.opera; + return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12; +} + +var SPACEBAR_CODE = 32; +var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); + +// Events and their corresponding property names. +var eventTypes = { + beforeInput: { + phasedRegistrationNames: { + bubbled: 'onBeforeInput', + captured: 'onBeforeInputCapture' + }, + dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste'] + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: 'onCompositionEnd', + captured: 'onCompositionEndCapture' + }, + dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: 'onCompositionStart', + captured: 'onCompositionStartCapture' + }, + dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: 'onCompositionUpdate', + captured: 'onCompositionUpdateCapture' + }, + dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] + } +}; + +// Track whether we've ever handled a keypress on the space key. +var hasSpaceKeypress = false; + +/** + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. + */ +function isKeypressCommand(nativeEvent) { + return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && + // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey); +} + +/** + * Translate native top level events into event types. + * + * @param {string} topLevelType + * @return {object} + */ +function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case 'topCompositionStart': + return eventTypes.compositionStart; + case 'topCompositionEnd': + return eventTypes.compositionEnd; + case 'topCompositionUpdate': + return eventTypes.compositionUpdate; + } +} + +/** + * Does our fallback best-guess model think this event signifies that + * composition has begun? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ +function isFallbackCompositionStart(topLevelType, nativeEvent) { + return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; +} + +/** + * Does our fallback mode think that this event is the end of composition? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ +function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case 'topKeyUp': + // Command keys insert or clear IME input. + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; + case 'topKeyDown': + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return nativeEvent.keyCode !== START_KEYCODE; + case 'topKeyPress': + case 'topMouseDown': + case 'topBlur': + // Events are not possible without cancelling IME. + return true; + default: + return false; + } +} + +/** + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. + * + * @param {object} nativeEvent + * @return {?string} + */ +function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; + } + return null; +} + +// Track the current IME composition fallback object, if any. +var currentComposition = null; + +/** + * @return {?object} A SyntheticCompositionEvent. + */ +function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var eventType; + var fallbackData; + + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!currentComposition) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionStart; + } + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionEnd; + } + + if (!eventType) { + return null; + } + + if (useFallbackCompositionData) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!currentComposition && eventType === eventTypes.compositionStart) { + currentComposition = FallbackCompositionState.getPooled(nativeEventTarget); + } else if (eventType === eventTypes.compositionEnd) { + if (currentComposition) { + fallbackData = currentComposition.getData(); + } + } + } + + var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget); + + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + if (customData !== null) { + event.data = customData; + } + } + + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; +} + +/** + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. + */ +function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case 'topCompositionEnd': + return getDataFromCustomEvent(nativeEvent); + case 'topKeyPress': + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + if (which !== SPACEBAR_CODE) { + return null; + } + + hasSpaceKeypress = true; + return SPACEBAR_CHAR; + + case 'topTextInput': + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; + + // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to blacklist it. + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } + + return chars; + + default: + // For other native event types, do nothing. + return null; + } +} + +/** + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. + */ +function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + // If composition event is available, we extract a string only at + // compositionevent, otherwise extract it at fallback events. + if (currentComposition) { + if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { + var chars = currentComposition.getData(); + FallbackCompositionState.release(currentComposition); + currentComposition = null; + return chars; + } + return null; + } + + switch (topLevelType) { + case 'topPaste': + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + case 'topKeyPress': + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { + return String.fromCharCode(nativeEvent.which); + } + return null; + case 'topCompositionEnd': + return useFallbackCompositionData ? null : nativeEvent.data; + default: + return null; + } +} + +/** + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. + * + * @return {?object} A SyntheticInputEvent. + */ +function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var chars; + + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); + } + + // If no characters are being inserted, no BeforeInput event should + // be fired. + if (!chars) { + return null; + } + + var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget); + + event.data = chars; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; +} + +/** + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. + * + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. + */ +var BeforeInputEventPlugin = { + + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)]; + } +}; + +module.exports = BeforeInputEventPlugin; + +/***/ }), +/* 381 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var PooledClass = __webpack_require__(55); + +var getTextContentAccessor = __webpack_require__(221); + +/** + * This helper class stores information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * @param {DOMEventTarget} root + */ +function FallbackCompositionState(root) { + this._root = root; + this._startText = this.getText(); + this._fallbackText = null; +} + +_assign(FallbackCompositionState.prototype, { + destructor: function () { + this._root = null; + this._startText = null; + this._fallbackText = null; + }, + + /** + * Get current text of input. + * + * @return {string} + */ + getText: function () { + if ('value' in this._root) { + return this._root.value; + } + return this._root[getTextContentAccessor()]; + }, + + /** + * Determine the differing substring between the initially stored + * text content and the current content. + * + * @return {string} + */ + getData: function () { + if (this._fallbackText) { + return this._fallbackText; + } + + var start; + var startValue = this._startText; + var startLength = startValue.length; + var end; + var endValue = this.getText(); + var endLength = endValue.length; + + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } + } + + var minEnd = startLength - start; + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } + + var sliceTail = end > 1 ? 1 - end : undefined; + this._fallbackText = endValue.slice(start, sliceTail); + return this._fallbackText; + } +}); + +PooledClass.addPoolingTo(FallbackCompositionState); + +module.exports = FallbackCompositionState; + +/***/ }), +/* 382 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(35); + +/** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ +var CompositionEventInterface = { + data: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface); + +module.exports = SyntheticCompositionEvent; + +/***/ }), +/* 383 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(35); + +/** + * @interface Event + * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 + * /#events-inputevents + */ +var InputEventInterface = { + data: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface); + +module.exports = SyntheticInputEvent; + +/***/ }), +/* 384 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPluginHub = __webpack_require__(78); +var EventPropagators = __webpack_require__(77); +var ExecutionEnvironment = __webpack_require__(18); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactUpdates = __webpack_require__(29); +var SyntheticEvent = __webpack_require__(35); + +var getEventTarget = __webpack_require__(144); +var isEventSupported = __webpack_require__(145); +var isTextInputElement = __webpack_require__(224); + +var eventTypes = { + change: { + phasedRegistrationNames: { + bubbled: 'onChange', + captured: 'onChangeCapture' + }, + dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange'] + } +}; + +/** + * For IE shims + */ +var activeElement = null; +var activeElementInst = null; +var activeElementValue = null; +var activeElementValueProp = null; + +/** + * SECTION: handle `change` event + */ +function shouldUseChangeEvent(elem) { + var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; +} + +var doesChangeEventBubble = false; +if (ExecutionEnvironment.canUseDOM) { + // See `handleChange` comment below + doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8); +} + +function manualDispatchChangeEvent(nativeEvent) { + var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); + EventPropagators.accumulateTwoPhaseDispatches(event); + + // If change and propertychange bubbled, we'd just bind to it like all the + // other events and have it go through ReactBrowserEventEmitter. Since it + // doesn't, we manually listen for the events and so we have to enqueue and + // process the abstract event manually. + // + // Batching is necessary here in order to ensure that all event handlers run + // before the next rerender (including event handlers attached to ancestor + // elements instead of directly on the input). Without this, controlled + // components don't work properly in conjunction with event bubbling because + // the component is rerendered and the value reverted before all the event + // handlers can run. See https://github.com/facebook/react/issues/708. + ReactUpdates.batchedUpdates(runEventInBatch, event); +} + +function runEventInBatch(event) { + EventPluginHub.enqueueEvents(event); + EventPluginHub.processEventQueue(false); +} + +function startWatchingForChangeEventIE8(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElement.attachEvent('onchange', manualDispatchChangeEvent); +} + +function stopWatchingForChangeEventIE8() { + if (!activeElement) { + return; + } + activeElement.detachEvent('onchange', manualDispatchChangeEvent); + activeElement = null; + activeElementInst = null; +} + +function getTargetInstForChangeEvent(topLevelType, targetInst) { + if (topLevelType === 'topChange') { + return targetInst; + } +} +function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { + if (topLevelType === 'topFocus') { + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForChangeEventIE8(); + startWatchingForChangeEventIE8(target, targetInst); + } else if (topLevelType === 'topBlur') { + stopWatchingForChangeEventIE8(); + } +} + +/** + * SECTION: handle `input` event + */ +var isInputEventSupported = false; +if (ExecutionEnvironment.canUseDOM) { + // IE9 claims to support the input event but fails to trigger it when + // deleting text, so we ignore its input events. + // IE10+ fire input events to often, such when a placeholder + // changes or when an input with a placeholder is focused. + isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11); +} + +/** + * (For IE <=11) Replacement getter/setter for the `value` property that gets + * set on the active element. + */ +var newValueProp = { + get: function () { + return activeElementValueProp.get.call(this); + }, + set: function (val) { + // Cast to a string so we can do equality checks. + activeElementValue = '' + val; + activeElementValueProp.set.call(this, val); + } +}; + +/** + * (For IE <=11) Starts tracking propertychange events on the passed-in element + * and override the value property so that we can distinguish user events from + * value changes in JS. + */ +function startWatchingForValueChange(target, targetInst) { + activeElement = target; + activeElementInst = targetInst; + activeElementValue = target.value; + activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value'); + + // Not guarded in a canDefineProperty check: IE8 supports defineProperty only + // on DOM elements + Object.defineProperty(activeElement, 'value', newValueProp); + if (activeElement.attachEvent) { + activeElement.attachEvent('onpropertychange', handlePropertyChange); + } else { + activeElement.addEventListener('propertychange', handlePropertyChange, false); + } +} + +/** + * (For IE <=11) Removes the event listeners from the currently-tracked element, + * if any exists. + */ +function stopWatchingForValueChange() { + if (!activeElement) { + return; + } + + // delete restores the original property definition + delete activeElement.value; + + if (activeElement.detachEvent) { + activeElement.detachEvent('onpropertychange', handlePropertyChange); + } else { + activeElement.removeEventListener('propertychange', handlePropertyChange, false); + } + + activeElement = null; + activeElementInst = null; + activeElementValue = null; + activeElementValueProp = null; +} + +/** + * (For IE <=11) Handles a propertychange event, sending a `change` event if + * the value of the active element has changed. + */ +function handlePropertyChange(nativeEvent) { + if (nativeEvent.propertyName !== 'value') { + return; + } + var value = nativeEvent.srcElement.value; + if (value === activeElementValue) { + return; + } + activeElementValue = value; + + manualDispatchChangeEvent(nativeEvent); +} + +/** + * If a `change` event should be fired, returns the target's ID. + */ +function getTargetInstForInputEvent(topLevelType, targetInst) { + if (topLevelType === 'topInput') { + // In modern browsers (i.e., not IE8 or IE9), the input event is exactly + // what we want so fall through here and trigger an abstract event + return targetInst; + } +} + +function handleEventsForInputEventIE(topLevelType, target, targetInst) { + if (topLevelType === 'topFocus') { + // In IE8, we can capture almost all .value changes by adding a + // propertychange handler and looking for events with propertyName + // equal to 'value' + // In IE9-11, propertychange fires for most input events but is buggy and + // doesn't fire when text is deleted, but conveniently, selectionchange + // appears to fire in all of the remaining cases so we catch those and + // forward the event if the value has changed + // In either case, we don't want to call the event handler if the value + // is changed from JS so we redefine a setter for `.value` that updates + // our activeElementValue variable, allowing us to ignore those changes + // + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForValueChange(); + startWatchingForValueChange(target, targetInst); + } else if (topLevelType === 'topBlur') { + stopWatchingForValueChange(); + } +} + +// For IE8 and IE9. +function getTargetInstForInputEventIE(topLevelType, targetInst) { + if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { + // On the selectionchange event, the target is just document which isn't + // helpful for us so just check activeElement instead. + // + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire + // propertychange on the first input event after setting `value` from a + // script and fires only keydown, keypress, keyup. Catching keyup usually + // gets it and catching keydown lets us fire an event for the first + // keystroke if user does a key repeat (it'll be a little delayed: right + // before the second keystroke). Other input methods (e.g., paste) seem to + // fire selectionchange normally. + if (activeElement && activeElement.value !== activeElementValue) { + activeElementValue = activeElement.value; + return activeElementInst; + } + } +} + +/** + * SECTION: handle `click` event + */ +function shouldUseClickEvent(elem) { + // Use the `click` event to detect changes to checkbox and radio inputs. + // This approach works across all browsers, whereas `change` does not fire + // until `blur` in IE8. + return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); +} + +function getTargetInstForClickEvent(topLevelType, targetInst) { + if (topLevelType === 'topClick') { + return targetInst; + } +} + +/** + * This plugin creates an `onChange` event that normalizes change events + * across form elements. This event fires at a time when it's possible to + * change the element's value without seeing a flicker. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - select + */ +var ChangeEventPlugin = { + + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + + var getTargetInstFunc, handleEventFunc; + if (shouldUseChangeEvent(targetNode)) { + if (doesChangeEventBubble) { + getTargetInstFunc = getTargetInstForChangeEvent; + } else { + handleEventFunc = handleEventsForChangeEventIE8; + } + } else if (isTextInputElement(targetNode)) { + if (isInputEventSupported) { + getTargetInstFunc = getTargetInstForInputEvent; + } else { + getTargetInstFunc = getTargetInstForInputEventIE; + handleEventFunc = handleEventsForInputEventIE; + } + } else if (shouldUseClickEvent(targetNode)) { + getTargetInstFunc = getTargetInstForClickEvent; + } + + if (getTargetInstFunc) { + var inst = getTargetInstFunc(topLevelType, targetInst); + if (inst) { + var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget); + event.type = 'change'; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + } + + if (handleEventFunc) { + handleEventFunc(topLevelType, targetNode, targetInst); + } + } + +}; + +module.exports = ChangeEventPlugin; + +/***/ }), +/* 385 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactOwner = __webpack_require__(386); + +var ReactRef = {}; + +function attachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(component.getPublicInstance()); + } else { + // Legacy ref + ReactOwner.addComponentAsRefTo(component, ref, owner); + } +} + +function detachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(null); + } else { + // Legacy ref + ReactOwner.removeComponentAsRefFrom(component, ref, owner); + } +} + +ReactRef.attachRefs = function (instance, element) { + if (element === null || typeof element !== 'object') { + return; + } + var ref = element.ref; + if (ref != null) { + attachRef(ref, instance, element._owner); + } +}; + +ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { + // If either the owner or a `ref` has changed, make sure the newest owner + // has stored a reference to `this`, and the previous owner (if different) + // has forgotten the reference to `this`. We use the element instead + // of the public this.props because the post processing cannot determine + // a ref. The ref conceptually lives on the element. + + // TODO: Should this even be possible? The owner cannot change because + // it's forbidden by shouldUpdateReactComponent. The ref can change + // if you swap the keys of but not the refs. Reconsider where this check + // is made. It probably belongs where the key checking and + // instantiateReactComponent is done. + + var prevRef = null; + var prevOwner = null; + if (prevElement !== null && typeof prevElement === 'object') { + prevRef = prevElement.ref; + prevOwner = prevElement._owner; + } + + var nextRef = null; + var nextOwner = null; + if (nextElement !== null && typeof nextElement === 'object') { + nextRef = nextElement.ref; + nextOwner = nextElement._owner; + } + + return prevRef !== nextRef || + // If owner changes but we have an unchanged function ref, don't update refs + typeof nextRef === 'string' && nextOwner !== prevOwner; +}; + +ReactRef.detachRefs = function (instance, element) { + if (element === null || typeof element !== 'object') { + return; + } + var ref = element.ref; + if (ref != null) { + detachRef(ref, instance, element._owner); + } +}; + +module.exports = ReactRef; + +/***/ }), +/* 386 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(10); + +/** + * @param {?object} object + * @return {boolean} True if `object` is a valid owner. + * @final + */ +function isValidOwner(object) { + return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); +} + +/** + * ReactOwners are capable of storing references to owned components. + * + * All components are capable of //being// referenced by owner components, but + * only ReactOwner components are capable of //referencing// owned components. + * The named reference is known as a "ref". + * + * Refs are available when mounted and updated during reconciliation. + * + * var MyComponent = React.createClass({ + * render: function() { + * return ( + * <div onClick={this.handleClick}> + * <CustomComponent ref="custom" /> + * </div> + * ); + * }, + * handleClick: function() { + * this.refs.custom.handleClick(); + * }, + * componentDidMount: function() { + * this.refs.custom.initialize(); + * } + * }); + * + * Refs should rarely be used. When refs are used, they should only be done to + * control data that is not handled by React's data flow. + * + * @class ReactOwner + */ +var ReactOwner = { + /** + * Adds a component by ref to an owner component. + * + * @param {ReactComponent} component Component to reference. + * @param {string} ref Name by which to refer to the component. + * @param {ReactOwner} owner Component on which to record the ref. + * @final + * @internal + */ + addComponentAsRefTo: function (component, ref, owner) { + !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0; + owner.attachRef(ref, component); + }, + + /** + * Removes a component by ref from an owner component. + * + * @param {ReactComponent} component Component to dereference. + * @param {string} ref Name of the ref to remove. + * @param {ReactOwner} owner Component on which the ref is recorded. + * @final + * @internal + */ + removeComponentAsRefFrom: function (component, ref, owner) { + !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0; + var ownerPublicInstance = owner.getPublicInstance(); + // Check that `component`'s owner is still alive and that `component` is still the current ref + // because we do not want to detach the ref if another component stole it. + if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) { + owner.detachRef(ref); + } + } + +}; + +module.exports = ReactOwner; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 387 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactInvalidSetStateWarningHook = __webpack_require__(388); +var ReactHostOperationHistoryHook = __webpack_require__(389); +var ReactComponentTreeHook = __webpack_require__(19); +var ExecutionEnvironment = __webpack_require__(18); + +var performanceNow = __webpack_require__(390); +var warning = __webpack_require__(11); + +var hooks = []; +var didHookThrowForEvent = {}; + +function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) { + try { + fn.call(context, arg1, arg2, arg3, arg4, arg5); + } catch (e) { + process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0; + didHookThrowForEvent[event] = true; + } +} + +function emitEvent(event, arg1, arg2, arg3, arg4, arg5) { + for (var i = 0; i < hooks.length; i++) { + var hook = hooks[i]; + var fn = hook[event]; + if (fn) { + callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5); + } + } +} + +var isProfiling = false; +var flushHistory = []; +var lifeCycleTimerStack = []; +var currentFlushNesting = 0; +var currentFlushMeasurements = []; +var currentFlushStartTime = 0; +var currentTimerDebugID = null; +var currentTimerStartTime = 0; +var currentTimerNestedFlushDuration = 0; +var currentTimerType = null; + +var lifeCycleTimerHasWarned = false; + +function clearHistory() { + ReactComponentTreeHook.purgeUnmountedComponents(); + ReactHostOperationHistoryHook.clearHistory(); +} + +function getTreeSnapshot(registeredIDs) { + return registeredIDs.reduce(function (tree, id) { + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var parentID = ReactComponentTreeHook.getParentID(id); + tree[id] = { + displayName: ReactComponentTreeHook.getDisplayName(id), + text: ReactComponentTreeHook.getText(id), + updateCount: ReactComponentTreeHook.getUpdateCount(id), + childIDs: ReactComponentTreeHook.getChildIDs(id), + // Text nodes don't have owners but this is close enough. + ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0, + parentID: parentID + }; + return tree; + }, {}); +} + +function resetMeasurements() { + var previousStartTime = currentFlushStartTime; + var previousMeasurements = currentFlushMeasurements; + var previousOperations = ReactHostOperationHistoryHook.getHistory(); + + if (currentFlushNesting === 0) { + currentFlushStartTime = 0; + currentFlushMeasurements = []; + clearHistory(); + return; + } + + if (previousMeasurements.length || previousOperations.length) { + var registeredIDs = ReactComponentTreeHook.getRegisteredIDs(); + flushHistory.push({ + duration: performanceNow() - previousStartTime, + measurements: previousMeasurements || [], + operations: previousOperations || [], + treeSnapshot: getTreeSnapshot(registeredIDs) + }); + } + + clearHistory(); + currentFlushStartTime = performanceNow(); + currentFlushMeasurements = []; +} + +function checkDebugID(debugID) { + var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (allowRoot && debugID === 0) { + return; + } + if (!debugID) { + process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0; + } +} + +function beginLifeCycleTimer(debugID, timerType) { + if (currentFlushNesting === 0) { + return; + } + if (currentTimerType && !lifeCycleTimerHasWarned) { + process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; + lifeCycleTimerHasWarned = true; + } + currentTimerStartTime = performanceNow(); + currentTimerNestedFlushDuration = 0; + currentTimerDebugID = debugID; + currentTimerType = timerType; +} + +function endLifeCycleTimer(debugID, timerType) { + if (currentFlushNesting === 0) { + return; + } + if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) { + process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; + lifeCycleTimerHasWarned = true; + } + if (isProfiling) { + currentFlushMeasurements.push({ + timerType: timerType, + instanceID: debugID, + duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration + }); + } + currentTimerStartTime = 0; + currentTimerNestedFlushDuration = 0; + currentTimerDebugID = null; + currentTimerType = null; +} + +function pauseCurrentLifeCycleTimer() { + var currentTimer = { + startTime: currentTimerStartTime, + nestedFlushStartTime: performanceNow(), + debugID: currentTimerDebugID, + timerType: currentTimerType + }; + lifeCycleTimerStack.push(currentTimer); + currentTimerStartTime = 0; + currentTimerNestedFlushDuration = 0; + currentTimerDebugID = null; + currentTimerType = null; +} + +function resumeCurrentLifeCycleTimer() { + var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(), + startTime = _lifeCycleTimerStack$.startTime, + nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime, + debugID = _lifeCycleTimerStack$.debugID, + timerType = _lifeCycleTimerStack$.timerType; + + var nestedFlushDuration = performanceNow() - nestedFlushStartTime; + currentTimerStartTime = startTime; + currentTimerNestedFlushDuration += nestedFlushDuration; + currentTimerDebugID = debugID; + currentTimerType = timerType; +} + +var lastMarkTimeStamp = 0; +var canUsePerformanceMeasure = +// $FlowFixMe https://github.com/facebook/flow/issues/2345 +typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; + +function shouldMark(debugID) { + if (!isProfiling || !canUsePerformanceMeasure) { + return false; + } + var element = ReactComponentTreeHook.getElement(debugID); + if (element == null || typeof element !== 'object') { + return false; + } + var isHostElement = typeof element.type === 'string'; + if (isHostElement) { + return false; + } + return true; +} + +function markBegin(debugID, markType) { + if (!shouldMark(debugID)) { + return; + } + + var markName = debugID + '::' + markType; + lastMarkTimeStamp = performanceNow(); + performance.mark(markName); +} + +function markEnd(debugID, markType) { + if (!shouldMark(debugID)) { + return; + } + + var markName = debugID + '::' + markType; + var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown'; + + // Chrome has an issue of dropping markers recorded too fast: + // https://bugs.chromium.org/p/chromium/issues/detail?id=640652 + // To work around this, we will not report very small measurements. + // I determined the magic number by tweaking it back and forth. + // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe. + // When the bug is fixed, we can `measure()` unconditionally if we want to. + var timeStamp = performanceNow(); + if (timeStamp - lastMarkTimeStamp > 0.1) { + var measurementName = displayName + ' [' + markType + ']'; + performance.measure(measurementName, markName); + } + + performance.clearMarks(markName); + performance.clearMeasures(measurementName); +} + +var ReactDebugTool = { + addHook: function (hook) { + hooks.push(hook); + }, + removeHook: function (hook) { + for (var i = 0; i < hooks.length; i++) { + if (hooks[i] === hook) { + hooks.splice(i, 1); + i--; + } + } + }, + isProfiling: function () { + return isProfiling; + }, + beginProfiling: function () { + if (isProfiling) { + return; + } + + isProfiling = true; + flushHistory.length = 0; + resetMeasurements(); + ReactDebugTool.addHook(ReactHostOperationHistoryHook); + }, + endProfiling: function () { + if (!isProfiling) { + return; + } + + isProfiling = false; + resetMeasurements(); + ReactDebugTool.removeHook(ReactHostOperationHistoryHook); + }, + getFlushHistory: function () { + return flushHistory; + }, + onBeginFlush: function () { + currentFlushNesting++; + resetMeasurements(); + pauseCurrentLifeCycleTimer(); + emitEvent('onBeginFlush'); + }, + onEndFlush: function () { + resetMeasurements(); + currentFlushNesting--; + resumeCurrentLifeCycleTimer(); + emitEvent('onEndFlush'); + }, + onBeginLifeCycleTimer: function (debugID, timerType) { + checkDebugID(debugID); + emitEvent('onBeginLifeCycleTimer', debugID, timerType); + markBegin(debugID, timerType); + beginLifeCycleTimer(debugID, timerType); + }, + onEndLifeCycleTimer: function (debugID, timerType) { + checkDebugID(debugID); + endLifeCycleTimer(debugID, timerType); + markEnd(debugID, timerType); + emitEvent('onEndLifeCycleTimer', debugID, timerType); + }, + onBeginProcessingChildContext: function () { + emitEvent('onBeginProcessingChildContext'); + }, + onEndProcessingChildContext: function () { + emitEvent('onEndProcessingChildContext'); + }, + onHostOperation: function (operation) { + checkDebugID(operation.instanceID); + emitEvent('onHostOperation', operation); + }, + onSetState: function () { + emitEvent('onSetState'); + }, + onSetChildren: function (debugID, childDebugIDs) { + checkDebugID(debugID); + childDebugIDs.forEach(checkDebugID); + emitEvent('onSetChildren', debugID, childDebugIDs); + }, + onBeforeMountComponent: function (debugID, element, parentDebugID) { + checkDebugID(debugID); + checkDebugID(parentDebugID, true); + emitEvent('onBeforeMountComponent', debugID, element, parentDebugID); + markBegin(debugID, 'mount'); + }, + onMountComponent: function (debugID) { + checkDebugID(debugID); + markEnd(debugID, 'mount'); + emitEvent('onMountComponent', debugID); + }, + onBeforeUpdateComponent: function (debugID, element) { + checkDebugID(debugID); + emitEvent('onBeforeUpdateComponent', debugID, element); + markBegin(debugID, 'update'); + }, + onUpdateComponent: function (debugID) { + checkDebugID(debugID); + markEnd(debugID, 'update'); + emitEvent('onUpdateComponent', debugID); + }, + onBeforeUnmountComponent: function (debugID) { + checkDebugID(debugID); + emitEvent('onBeforeUnmountComponent', debugID); + markBegin(debugID, 'unmount'); + }, + onUnmountComponent: function (debugID) { + checkDebugID(debugID); + markEnd(debugID, 'unmount'); + emitEvent('onUnmountComponent', debugID); + }, + onTestEvent: function () { + emitEvent('onTestEvent'); + } +}; + +// TODO remove these when RN/www gets updated +ReactDebugTool.addDevtool = ReactDebugTool.addHook; +ReactDebugTool.removeDevtool = ReactDebugTool.removeHook; + +ReactDebugTool.addHook(ReactInvalidSetStateWarningHook); +ReactDebugTool.addHook(ReactComponentTreeHook); +var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; +if (/[?&]react_perf\b/.test(url)) { + ReactDebugTool.beginProfiling(); +} + +module.exports = ReactDebugTool; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 388 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var warning = __webpack_require__(11); + +if (process.env.NODE_ENV !== 'production') { + var processingChildContext = false; + + var warnInvalidSetState = function () { + process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0; + }; +} + +var ReactInvalidSetStateWarningHook = { + onBeginProcessingChildContext: function () { + processingChildContext = true; + }, + onEndProcessingChildContext: function () { + processingChildContext = false; + }, + onSetState: function () { + warnInvalidSetState(); + } +}; + +module.exports = ReactInvalidSetStateWarningHook; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 389 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var history = []; + +var ReactHostOperationHistoryHook = { + onHostOperation: function (operation) { + history.push(operation); + }, + clearHistory: function () { + if (ReactHostOperationHistoryHook._preventClearing) { + // Should only be used for tests. + return; + } + + history = []; + }, + getHistory: function () { + return history; + } +}; + +module.exports = ReactHostOperationHistoryHook; + +/***/ }), +/* 390 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var performance = __webpack_require__(391); + +var performanceNow; + +/** + * Detect if we can use `window.performance.now()` and gracefully fallback to + * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now + * because of Facebook's testing infrastructure. + */ +if (performance.now) { + performanceNow = function performanceNow() { + return performance.now(); + }; +} else { + performanceNow = function performanceNow() { + return Date.now(); + }; +} + +module.exports = performanceNow; + +/***/ }), +/* 391 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + + +var ExecutionEnvironment = __webpack_require__(18); + +var performance; + +if (ExecutionEnvironment.canUseDOM) { + performance = window.performance || window.msPerformance || window.webkitPerformance; +} + +module.exports = performance || {}; + +/***/ }), +/* 392 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ + +var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; + +module.exports = DefaultEventPluginOrder; + +/***/ }), +/* 393 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPropagators = __webpack_require__(77); +var ReactDOMComponentTree = __webpack_require__(15); +var SyntheticMouseEvent = __webpack_require__(100); + +var eventTypes = { + mouseEnter: { + registrationName: 'onMouseEnter', + dependencies: ['topMouseOut', 'topMouseOver'] + }, + mouseLeave: { + registrationName: 'onMouseLeave', + dependencies: ['topMouseOut', 'topMouseOver'] + } +}; + +var EnterLeaveEventPlugin = { + + eventTypes: eventTypes, + + /** + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. + */ + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { + return null; + } + if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { + // Must not be a mouse in or mouse out - ignoring. + return null; + } + + var win; + if (nativeEventTarget.window === nativeEventTarget) { + // `nativeEventTarget` is probably a window object. + win = nativeEventTarget; + } else { + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = nativeEventTarget.ownerDocument; + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; + } + } + + var from; + var to; + if (topLevelType === 'topMouseOut') { + from = targetInst; + var related = nativeEvent.relatedTarget || nativeEvent.toElement; + to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; + } else { + // Moving to a node from outside the window. + from = null; + to = targetInst; + } + + if (from === to) { + // Nothing pertains to our managed components. + return null; + } + + var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from); + var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to); + + var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget); + leave.type = 'mouseleave'; + leave.target = fromNode; + leave.relatedTarget = toNode; + + var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget); + enter.type = 'mouseenter'; + enter.target = toNode; + enter.relatedTarget = fromNode; + + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to); + + return [leave, enter]; + } + +}; + +module.exports = EnterLeaveEventPlugin; + +/***/ }), +/* 394 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMProperty = __webpack_require__(42); + +var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; +var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; +var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; +var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; +var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; + +var HTMLDOMPropertyConfig = { + isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')), + Properties: { + /** + * Standard Properties + */ + accept: 0, + acceptCharset: 0, + accessKey: 0, + action: 0, + allowFullScreen: HAS_BOOLEAN_VALUE, + allowTransparency: 0, + alt: 0, + // specifies target context for links with `preload` type + as: 0, + async: HAS_BOOLEAN_VALUE, + autoComplete: 0, + // autoFocus is polyfilled/normalized by AutoFocusUtils + // autoFocus: HAS_BOOLEAN_VALUE, + autoPlay: HAS_BOOLEAN_VALUE, + capture: HAS_BOOLEAN_VALUE, + cellPadding: 0, + cellSpacing: 0, + charSet: 0, + challenge: 0, + checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + cite: 0, + classID: 0, + className: 0, + cols: HAS_POSITIVE_NUMERIC_VALUE, + colSpan: 0, + content: 0, + contentEditable: 0, + contextMenu: 0, + controls: HAS_BOOLEAN_VALUE, + coords: 0, + crossOrigin: 0, + data: 0, // For `<object />` acts as `src`. + dateTime: 0, + 'default': HAS_BOOLEAN_VALUE, + defer: HAS_BOOLEAN_VALUE, + dir: 0, + disabled: HAS_BOOLEAN_VALUE, + download: HAS_OVERLOADED_BOOLEAN_VALUE, + draggable: 0, + encType: 0, + form: 0, + formAction: 0, + formEncType: 0, + formMethod: 0, + formNoValidate: HAS_BOOLEAN_VALUE, + formTarget: 0, + frameBorder: 0, + headers: 0, + height: 0, + hidden: HAS_BOOLEAN_VALUE, + high: 0, + href: 0, + hrefLang: 0, + htmlFor: 0, + httpEquiv: 0, + icon: 0, + id: 0, + inputMode: 0, + integrity: 0, + is: 0, + keyParams: 0, + keyType: 0, + kind: 0, + label: 0, + lang: 0, + list: 0, + loop: HAS_BOOLEAN_VALUE, + low: 0, + manifest: 0, + marginHeight: 0, + marginWidth: 0, + max: 0, + maxLength: 0, + media: 0, + mediaGroup: 0, + method: 0, + min: 0, + minLength: 0, + // Caution; `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. + multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + name: 0, + nonce: 0, + noValidate: HAS_BOOLEAN_VALUE, + open: HAS_BOOLEAN_VALUE, + optimum: 0, + pattern: 0, + placeholder: 0, + playsInline: HAS_BOOLEAN_VALUE, + poster: 0, + preload: 0, + profile: 0, + radioGroup: 0, + readOnly: HAS_BOOLEAN_VALUE, + referrerPolicy: 0, + rel: 0, + required: HAS_BOOLEAN_VALUE, + reversed: HAS_BOOLEAN_VALUE, + role: 0, + rows: HAS_POSITIVE_NUMERIC_VALUE, + rowSpan: HAS_NUMERIC_VALUE, + sandbox: 0, + scope: 0, + scoped: HAS_BOOLEAN_VALUE, + scrolling: 0, + seamless: HAS_BOOLEAN_VALUE, + selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + shape: 0, + size: HAS_POSITIVE_NUMERIC_VALUE, + sizes: 0, + span: HAS_POSITIVE_NUMERIC_VALUE, + spellCheck: 0, + src: 0, + srcDoc: 0, + srcLang: 0, + srcSet: 0, + start: HAS_NUMERIC_VALUE, + step: 0, + style: 0, + summary: 0, + tabIndex: 0, + target: 0, + title: 0, + // Setting .type throws on non-<input> tags + type: 0, + useMap: 0, + value: 0, + width: 0, + wmode: 0, + wrap: 0, + + /** + * RDFa Properties + */ + about: 0, + datatype: 0, + inlist: 0, + prefix: 0, + // property is also supported for OpenGraph in meta tags. + property: 0, + resource: 0, + 'typeof': 0, + vocab: 0, + + /** + * Non-standard Properties + */ + // autoCapitalize and autoCorrect are supported in Mobile Safari for + // keyboard hints. + autoCapitalize: 0, + autoCorrect: 0, + // autoSave allows WebKit/Blink to persist values of input fields on page reloads + autoSave: 0, + // color is for Safari mask-icon link + color: 0, + // itemProp, itemScope, itemType are for + // Microdata support. See http://schema.org/docs/gs.html + itemProp: 0, + itemScope: HAS_BOOLEAN_VALUE, + itemType: 0, + // itemID and itemRef are for Microdata support as well but + // only specified in the WHATWG spec document. See + // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api + itemID: 0, + itemRef: 0, + // results show looking glass icon and recent searches on input + // search fields in WebKit/Blink + results: 0, + // IE-only attribute that specifies security restrictions on an iframe + // as an alternative to the sandbox attribute on IE<10 + security: 0, + // IE-only attribute that controls focus behavior + unselectable: 0 + }, + DOMAttributeNames: { + acceptCharset: 'accept-charset', + className: 'class', + htmlFor: 'for', + httpEquiv: 'http-equiv' + }, + DOMPropertyNames: {} +}; + +module.exports = HTMLDOMPropertyConfig; + +/***/ }), +/* 395 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMChildrenOperations = __webpack_require__(147); +var ReactDOMIDOperations = __webpack_require__(400); + +/** + * Abstracts away all functionality of the reconciler that requires knowledge of + * the browser context. TODO: These callers should be refactored to avoid the + * need for this injection. + */ +var ReactComponentBrowserEnvironment = { + + processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, + + replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup + +}; + +module.exports = ReactComponentBrowserEnvironment; + +/***/ }), +/* 396 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var DOMLazyTree = __webpack_require__(68); +var ExecutionEnvironment = __webpack_require__(18); + +var createNodesFromMarkup = __webpack_require__(397); +var emptyFunction = __webpack_require__(21); +var invariant = __webpack_require__(10); + +var Danger = { + + /** + * Replaces a node with a string of markup at its current position within its + * parent. The markup must render into a single root node. + * + * @param {DOMElement} oldChild Child node to replace. + * @param {string} markup Markup to render in place of the child node. + * @internal + */ + dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) { + !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0; + !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0; + !(oldChild.nodeName !== 'HTML') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0; + + if (typeof markup === 'string') { + var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; + oldChild.parentNode.replaceChild(newChild, oldChild); + } else { + DOMLazyTree.replaceChildWithTree(oldChild, markup); + } + } + +}; + +module.exports = Danger; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 397 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +/*eslint-disable fb-www/unsafe-html*/ + +var ExecutionEnvironment = __webpack_require__(18); + +var createArrayFromMixed = __webpack_require__(398); +var getMarkupWrap = __webpack_require__(399); +var invariant = __webpack_require__(10); + +/** + * Dummy container used to render all markup. + */ +var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Pattern used by `getNodeName`. + */ +var nodeNamePattern = /^\s*<(\w+)/; + +/** + * Extracts the `nodeName` of the first element in a string of markup. + * + * @param {string} markup String of markup. + * @return {?string} Node name of the supplied markup. + */ +function getNodeName(markup) { + var nodeNameMatch = markup.match(nodeNamePattern); + return nodeNameMatch && nodeNameMatch[1].toLowerCase(); +} + +/** + * Creates an array containing the nodes rendered from the supplied markup. The + * optionally supplied `handleScript` function will be invoked once for each + * <script> element that is rendered. If no `handleScript` function is supplied, + * an exception is thrown if any <script> elements are rendered. + * + * @param {string} markup A string of valid HTML markup. + * @param {?function} handleScript Invoked once for each rendered <script>. + * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. + */ +function createNodesFromMarkup(markup, handleScript) { + var node = dummyNode; + !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0; + var nodeName = getNodeName(markup); + + var wrap = nodeName && getMarkupWrap(nodeName); + if (wrap) { + node.innerHTML = wrap[1] + markup + wrap[2]; + + var wrapDepth = wrap[0]; + while (wrapDepth--) { + node = node.lastChild; + } + } else { + node.innerHTML = markup; + } + + var scripts = node.getElementsByTagName('script'); + if (scripts.length) { + !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0; + createArrayFromMixed(scripts).forEach(handleScript); + } + + var nodes = Array.from(node.childNodes); + while (node.lastChild) { + node.removeChild(node.lastChild); + } + return nodes; +} + +module.exports = createNodesFromMarkup; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 398 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var invariant = __webpack_require__(10); + +/** + * Convert array-like objects to arrays. + * + * This API assumes the caller knows the contents of the data type. For less + * well defined inputs use createArrayFromMixed. + * + * @param {object|function|filelist} obj + * @return {array} + */ +function toArray(obj) { + var length = obj.length; + + // Some browsers builtin objects can report typeof 'function' (e.g. NodeList + // in old versions of Safari). + !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0; + + !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0; + + !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0; + + !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0; + + // Old IE doesn't give collections access to hasOwnProperty. Assume inputs + // without method will throw during the slice call and skip straight to the + // fallback. + if (obj.hasOwnProperty) { + try { + return Array.prototype.slice.call(obj); + } catch (e) { + // IE < 9 does not support Array#slice on collections objects + } + } + + // Fall back to copying key by key. This assumes all keys have a value, + // so will not preserve sparsely populated inputs. + var ret = Array(length); + for (var ii = 0; ii < length; ii++) { + ret[ii] = obj[ii]; + } + return ret; +} + +/** + * Perform a heuristic test to determine if an object is "array-like". + * + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." + * + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} + */ +function hasArrayNature(obj) { + return ( + // not null/false + !!obj && ( + // arrays are objects, NodeLists are functions in Safari + typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + 'length' in obj && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + typeof obj.nodeType != 'number' && ( + // a real array + Array.isArray(obj) || + // arguments + 'callee' in obj || + // HTMLCollection/NodeList + 'item' in obj) + ); +} + +/** + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. + * + * This is mostly useful idiomatically: + * + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} + */ +function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + return toArray(obj); + } +} + +module.exports = createArrayFromMixed; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 399 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/*eslint-disable fb-www/unsafe-html */ + +var ExecutionEnvironment = __webpack_require__(18); + +var invariant = __webpack_require__(10); + +/** + * Dummy container used to detect which wraps are necessary. + */ +var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Some browsers cannot use `innerHTML` to render certain elements standalone, + * so we wrap them, render the wrapped nodes, then extract the desired node. + * + * In IE8, certain elements cannot render alone, so wrap all elements ('*'). + */ + +var shouldWrap = {}; + +var selectWrap = [1, '<select multiple="true">', '</select>']; +var tableWrap = [1, '<table>', '</table>']; +var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; + +var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>']; + +var markupWrap = { + '*': [1, '?<div>', '</div>'], + + 'area': [1, '<map>', '</map>'], + 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], + 'legend': [1, '<fieldset>', '</fieldset>'], + 'param': [1, '<object>', '</object>'], + 'tr': [2, '<table><tbody>', '</tbody></table>'], + + 'optgroup': selectWrap, + 'option': selectWrap, + + 'caption': tableWrap, + 'colgroup': tableWrap, + 'tbody': tableWrap, + 'tfoot': tableWrap, + 'thead': tableWrap, + + 'td': trWrap, + 'th': trWrap +}; + +// Initialize the SVG elements since we know they'll always need to be wrapped +// consistently. If they are created inside a <div> they will be initialized in +// the wrong namespace (and will not display). +var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan']; +svgElements.forEach(function (nodeName) { + markupWrap[nodeName] = svgWrap; + shouldWrap[nodeName] = true; +}); + +/** + * Gets the markup wrap configuration for the supplied `nodeName`. + * + * NOTE: This lazily detects which wraps are necessary for the current browser. + * + * @param {string} nodeName Lowercase `nodeName`. + * @return {?array} Markup wrap configuration, if applicable. + */ +function getMarkupWrap(nodeName) { + !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0; + if (!markupWrap.hasOwnProperty(nodeName)) { + nodeName = '*'; + } + if (!shouldWrap.hasOwnProperty(nodeName)) { + if (nodeName === '*') { + dummyNode.innerHTML = '<link />'; + } else { + dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; + } + shouldWrap[nodeName] = !dummyNode.firstChild; + } + return shouldWrap[nodeName] ? markupWrap[nodeName] : null; +} + +module.exports = getMarkupWrap; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 400 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMChildrenOperations = __webpack_require__(147); +var ReactDOMComponentTree = __webpack_require__(15); + +/** + * Operations used to process updates to DOM nodes. + */ +var ReactDOMIDOperations = { + + /** + * Updates a component's children by processing a series of updates. + * + * @param {array<object>} updates List of update configurations. + * @internal + */ + dangerouslyProcessChildrenUpdates: function (parentInst, updates) { + var node = ReactDOMComponentTree.getNodeFromInstance(parentInst); + DOMChildrenOperations.processUpdates(node, updates); + } +}; + +module.exports = ReactDOMIDOperations; + +/***/ }), +/* 401 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +/* global hasOwnProperty:true */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); + +var AutoFocusUtils = __webpack_require__(402); +var CSSPropertyOperations = __webpack_require__(403); +var DOMLazyTree = __webpack_require__(68); +var DOMNamespaces = __webpack_require__(148); +var DOMProperty = __webpack_require__(42); +var DOMPropertyOperations = __webpack_require__(229); +var EventPluginHub = __webpack_require__(78); +var EventPluginRegistry = __webpack_require__(98); +var ReactBrowserEventEmitter = __webpack_require__(103); +var ReactDOMComponentFlags = __webpack_require__(218); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactDOMInput = __webpack_require__(413); +var ReactDOMOption = __webpack_require__(414); +var ReactDOMSelect = __webpack_require__(231); +var ReactDOMTextarea = __webpack_require__(415); +var ReactInstrumentation = __webpack_require__(23); +var ReactMultiChild = __webpack_require__(416); +var ReactServerRenderingTransaction = __webpack_require__(425); + +var emptyFunction = __webpack_require__(21); +var escapeTextContentForBrowser = __webpack_require__(102); +var invariant = __webpack_require__(10); +var isEventSupported = __webpack_require__(145); +var shallowEqual = __webpack_require__(81); +var validateDOMNesting = __webpack_require__(155); +var warning = __webpack_require__(11); + +var Flags = ReactDOMComponentFlags; +var deleteListener = EventPluginHub.deleteListener; +var getNode = ReactDOMComponentTree.getNodeFromInstance; +var listenTo = ReactBrowserEventEmitter.listenTo; +var registrationNameModules = EventPluginRegistry.registrationNameModules; + +// For quickly matching children type, to test if can be treated as content. +var CONTENT_TYPES = { 'string': true, 'number': true }; + +var STYLE = 'style'; +var HTML = '__html'; +var RESERVED_PROPS = { + children: null, + dangerouslySetInnerHTML: null, + suppressContentEditableWarning: null +}; + +// Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE). +var DOC_FRAGMENT_TYPE = 11; + +function getDeclarationErrorAddendum(internalInstance) { + if (internalInstance) { + var owner = internalInstance._currentElement._owner || null; + if (owner) { + var name = owner.getName(); + if (name) { + return ' This DOM node was rendered by `' + name + '`.'; + } + } + } + return ''; +} + +function friendlyStringify(obj) { + if (typeof obj === 'object') { + if (Array.isArray(obj)) { + return '[' + obj.map(friendlyStringify).join(', ') + ']'; + } else { + var pairs = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key); + pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key])); + } + } + return '{' + pairs.join(', ') + '}'; + } + } else if (typeof obj === 'string') { + return JSON.stringify(obj); + } else if (typeof obj === 'function') { + return '[function object]'; + } + // Differs from JSON.stringify in that undefined because undefined and that + // inf and nan don't become null + return String(obj); +} + +var styleMutationWarning = {}; + +function checkAndWarnForMutatedStyle(style1, style2, component) { + if (style1 == null || style2 == null) { + return; + } + if (shallowEqual(style1, style2)) { + return; + } + + var componentName = component._tag; + var owner = component._currentElement._owner; + var ownerName; + if (owner) { + ownerName = owner.getName(); + } + + var hash = ownerName + '|' + componentName; + + if (styleMutationWarning.hasOwnProperty(hash)) { + return; + } + + styleMutationWarning[hash] = true; + + process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0; +} + +/** + * @param {object} component + * @param {?object} props + */ +function assertValidProps(component, props) { + if (!props) { + return; + } + // Note the use of `==` which checks for null or undefined. + if (voidElementTags[component._tag]) { + !(props.children == null && props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0; + } + if (props.dangerouslySetInnerHTML != null) { + !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0; + !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0; + } + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0; + process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0; + } + !(props.style == null || typeof props.style === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0; +} + +function enqueuePutListener(inst, registrationName, listener, transaction) { + if (transaction instanceof ReactServerRenderingTransaction) { + return; + } + if (process.env.NODE_ENV !== 'production') { + // IE8 has no API for event capturing and the `onScroll` event doesn't + // bubble. + process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0; + } + var containerInfo = inst._hostContainerInfo; + var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE; + var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument; + listenTo(registrationName, doc); + transaction.getReactMountReady().enqueue(putListener, { + inst: inst, + registrationName: registrationName, + listener: listener + }); +} + +function putListener() { + var listenerToPut = this; + EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener); +} + +function inputPostMount() { + var inst = this; + ReactDOMInput.postMountWrapper(inst); +} + +function textareaPostMount() { + var inst = this; + ReactDOMTextarea.postMountWrapper(inst); +} + +function optionPostMount() { + var inst = this; + ReactDOMOption.postMountWrapper(inst); +} + +var setAndValidateContentChildDev = emptyFunction; +if (process.env.NODE_ENV !== 'production') { + setAndValidateContentChildDev = function (content) { + var hasExistingContent = this._contentDebugID != null; + var debugID = this._debugID; + // This ID represents the inlined child that has no backing instance: + var contentDebugID = -debugID; + + if (content == null) { + if (hasExistingContent) { + ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID); + } + this._contentDebugID = null; + return; + } + + validateDOMNesting(null, String(content), this, this._ancestorInfo); + this._contentDebugID = contentDebugID; + if (hasExistingContent) { + ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content); + ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID); + } else { + ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID); + ReactInstrumentation.debugTool.onMountComponent(contentDebugID); + ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]); + } + }; +} + +// There are so many media events, it makes sense to just +// maintain a list rather than create a `trapBubbledEvent` for each +var mediaEvents = { + topAbort: 'abort', + topCanPlay: 'canplay', + topCanPlayThrough: 'canplaythrough', + topDurationChange: 'durationchange', + topEmptied: 'emptied', + topEncrypted: 'encrypted', + topEnded: 'ended', + topError: 'error', + topLoadedData: 'loadeddata', + topLoadedMetadata: 'loadedmetadata', + topLoadStart: 'loadstart', + topPause: 'pause', + topPlay: 'play', + topPlaying: 'playing', + topProgress: 'progress', + topRateChange: 'ratechange', + topSeeked: 'seeked', + topSeeking: 'seeking', + topStalled: 'stalled', + topSuspend: 'suspend', + topTimeUpdate: 'timeupdate', + topVolumeChange: 'volumechange', + topWaiting: 'waiting' +}; + +function trapBubbledEventsLocal() { + var inst = this; + // If a component renders to null or if another component fatals and causes + // the state of the tree to be corrupted, `node` here can be null. + !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0; + var node = getNode(inst); + !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0; + + switch (inst._tag) { + case 'iframe': + case 'object': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; + break; + case 'video': + case 'audio': + + inst._wrapperState.listeners = []; + // Create listener for each media event + for (var event in mediaEvents) { + if (mediaEvents.hasOwnProperty(event)) { + inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node)); + } + } + break; + case 'source': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)]; + break; + case 'img': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; + break; + case 'form': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)]; + break; + case 'input': + case 'select': + case 'textarea': + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)]; + break; + } +} + +function postUpdateSelectWrapper() { + ReactDOMSelect.postUpdateWrapper(this); +} + +// For HTML, certain tags should omit their close tag. We keep a whitelist for +// those special-case tags. + +var omittedCloseTags = { + 'area': true, + 'base': true, + 'br': true, + 'col': true, + 'embed': true, + 'hr': true, + 'img': true, + 'input': true, + 'keygen': true, + 'link': true, + 'meta': true, + 'param': true, + 'source': true, + 'track': true, + 'wbr': true +}; + +var newlineEatingTags = { + 'listing': true, + 'pre': true, + 'textarea': true +}; + +// For HTML, certain tags cannot have children. This has the same purpose as +// `omittedCloseTags` except that `menuitem` should still have its closing tag. + +var voidElementTags = _assign({ + 'menuitem': true +}, omittedCloseTags); + +// We accept any tag to be rendered but since this gets injected into arbitrary +// HTML, we want to make sure that it's a safe tag. +// http://www.w3.org/TR/REC-xml/#NT-Name + +var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset +var validatedTagCache = {}; +var hasOwnProperty = {}.hasOwnProperty; + +function validateDangerousTag(tag) { + if (!hasOwnProperty.call(validatedTagCache, tag)) { + !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0; + validatedTagCache[tag] = true; + } +} + +function isCustomComponent(tagName, props) { + return tagName.indexOf('-') >= 0 || props.is != null; +} + +var globalIdCounter = 1; + +/** + * Creates a new React class that is idempotent and capable of containing other + * React components. It accepts event listeners and DOM properties that are + * valid according to `DOMProperty`. + * + * - Event listeners: `onClick`, `onMouseDown`, etc. + * - DOM properties: `className`, `name`, `title`, etc. + * + * The `style` property functions differently from the DOM API. It accepts an + * object mapping of style properties to values. + * + * @constructor ReactDOMComponent + * @extends ReactMultiChild + */ +function ReactDOMComponent(element) { + var tag = element.type; + validateDangerousTag(tag); + this._currentElement = element; + this._tag = tag.toLowerCase(); + this._namespaceURI = null; + this._renderedChildren = null; + this._previousStyle = null; + this._previousStyleCopy = null; + this._hostNode = null; + this._hostParent = null; + this._rootNodeID = 0; + this._domID = 0; + this._hostContainerInfo = null; + this._wrapperState = null; + this._topLevelWrapper = null; + this._flags = 0; + if (process.env.NODE_ENV !== 'production') { + this._ancestorInfo = null; + setAndValidateContentChildDev.call(this, null); + } +} + +ReactDOMComponent.displayName = 'ReactDOMComponent'; + +ReactDOMComponent.Mixin = { + + /** + * Generates root tag markup then recurses. This method has side effects and + * is not idempotent. + * + * @internal + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?ReactDOMComponent} the parent component instance + * @param {?object} info about the host container + * @param {object} context + * @return {string} The computed markup. + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + this._rootNodeID = globalIdCounter++; + this._domID = hostContainerInfo._idCounter++; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var props = this._currentElement.props; + + switch (this._tag) { + case 'audio': + case 'form': + case 'iframe': + case 'img': + case 'link': + case 'object': + case 'source': + case 'video': + this._wrapperState = { + listeners: null + }; + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'input': + ReactDOMInput.mountWrapper(this, props, hostParent); + props = ReactDOMInput.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'option': + ReactDOMOption.mountWrapper(this, props, hostParent); + props = ReactDOMOption.getHostProps(this, props); + break; + case 'select': + ReactDOMSelect.mountWrapper(this, props, hostParent); + props = ReactDOMSelect.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + case 'textarea': + ReactDOMTextarea.mountWrapper(this, props, hostParent); + props = ReactDOMTextarea.getHostProps(this, props); + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + } + + assertValidProps(this, props); + + // We create tags in the namespace of their parent container, except HTML + // tags get no namespace. + var namespaceURI; + var parentTag; + if (hostParent != null) { + namespaceURI = hostParent._namespaceURI; + parentTag = hostParent._tag; + } else if (hostContainerInfo._tag) { + namespaceURI = hostContainerInfo._namespaceURI; + parentTag = hostContainerInfo._tag; + } + if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') { + namespaceURI = DOMNamespaces.html; + } + if (namespaceURI === DOMNamespaces.html) { + if (this._tag === 'svg') { + namespaceURI = DOMNamespaces.svg; + } else if (this._tag === 'math') { + namespaceURI = DOMNamespaces.mathml; + } + } + this._namespaceURI = namespaceURI; + + if (process.env.NODE_ENV !== 'production') { + var parentInfo; + if (hostParent != null) { + parentInfo = hostParent._ancestorInfo; + } else if (hostContainerInfo._tag) { + parentInfo = hostContainerInfo._ancestorInfo; + } + if (parentInfo) { + // parentInfo should always be present except for the top-level + // component when server rendering + validateDOMNesting(this._tag, null, this, parentInfo); + } + this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this); + } + + var mountImage; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var el; + if (namespaceURI === DOMNamespaces.html) { + if (this._tag === 'script') { + // Create the script via .innerHTML so its "parser-inserted" flag is + // set to true and it does not execute + var div = ownerDocument.createElement('div'); + var type = this._currentElement.type; + div.innerHTML = '<' + type + '></' + type + '>'; + el = div.removeChild(div.firstChild); + } else if (props.is) { + el = ownerDocument.createElement(this._currentElement.type, props.is); + } else { + // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug. + // See discussion in https://github.com/facebook/react/pull/6896 + // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 + el = ownerDocument.createElement(this._currentElement.type); + } + } else { + el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type); + } + ReactDOMComponentTree.precacheNode(this, el); + this._flags |= Flags.hasCachedChildNodes; + if (!this._hostParent) { + DOMPropertyOperations.setAttributeForRoot(el); + } + this._updateDOMProperties(null, props, transaction); + var lazyTree = DOMLazyTree(el); + this._createInitialChildren(transaction, props, context, lazyTree); + mountImage = lazyTree; + } else { + var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props); + var tagContent = this._createContentMarkup(transaction, props, context); + if (!tagContent && omittedCloseTags[this._tag]) { + mountImage = tagOpen + '/>'; + } else { + mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>'; + } + } + + switch (this._tag) { + case 'input': + transaction.getReactMountReady().enqueue(inputPostMount, this); + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'textarea': + transaction.getReactMountReady().enqueue(textareaPostMount, this); + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'select': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'button': + if (props.autoFocus) { + transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + } + break; + case 'option': + transaction.getReactMountReady().enqueue(optionPostMount, this); + break; + } + + return mountImage; + }, + + /** + * Creates markup for the open tag and all attributes. + * + * This method has side effects because events get registered. + * + * Iterating over object properties is faster than iterating over arrays. + * @see http://jsperf.com/obj-vs-arr-iteration + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props + * @return {string} Markup of opening tag. + */ + _createOpenTagMarkupAndPutListeners: function (transaction, props) { + var ret = '<' + this._currentElement.type; + + for (var propKey in props) { + if (!props.hasOwnProperty(propKey)) { + continue; + } + var propValue = props[propKey]; + if (propValue == null) { + continue; + } + if (registrationNameModules.hasOwnProperty(propKey)) { + if (propValue) { + enqueuePutListener(this, propKey, propValue, transaction); + } + } else { + if (propKey === STYLE) { + if (propValue) { + if (process.env.NODE_ENV !== 'production') { + // See `_updateDOMProperties`. style block + this._previousStyle = propValue; + } + propValue = this._previousStyleCopy = _assign({}, props.style); + } + propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this); + } + var markup = null; + if (this._tag != null && isCustomComponent(this._tag, props)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue); + } + } else { + markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue); + } + if (markup) { + ret += ' ' + markup; + } + } + } + + // For static pages, no need to put React ID and checksum. Saves lots of + // bytes. + if (transaction.renderToStaticMarkup) { + return ret; + } + + if (!this._hostParent) { + ret += ' ' + DOMPropertyOperations.createMarkupForRoot(); + } + ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID); + return ret; + }, + + /** + * Creates markup for the content between the tags. + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} props + * @param {object} context + * @return {string} Content markup. + */ + _createContentMarkup: function (transaction, props, context) { + var ret = ''; + + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + ret = innerHTML.__html; + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + if (contentToUse != null) { + // TODO: Validate that text is allowed as a child of this node + ret = escapeTextContentForBrowser(contentToUse); + if (process.env.NODE_ENV !== 'production') { + setAndValidateContentChildDev.call(this, contentToUse); + } + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + ret = mountImages.join(''); + } + } + if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') { + // text/html ignores the first character in these tags if it's a newline + // Prefer to break application/xml over text/html (for now) by adding + // a newline specifically to get eaten by the parser. (Alternately for + // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first + // \r is normalized out by HTMLTextAreaElement#value.) + // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre> + // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions> + // See: <http://www.w3.org/TR/html5/syntax.html#newlines> + // See: Parsing of "textarea" "listing" and "pre" elements + // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody> + return '\n' + ret; + } else { + return ret; + } + }, + + _createInitialChildren: function (transaction, props, context, lazyTree) { + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + DOMLazyTree.queueHTML(lazyTree, innerHTML.__html); + } + } else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + // TODO: Validate that text is allowed as a child of this node + if (contentToUse != null) { + // Avoid setting textContent when the text is empty. In IE11 setting + // textContent on a text area will cause the placeholder to not + // show within the textarea until it has been focused and blurred again. + // https://github.com/facebook/react/issues/6731#issuecomment-254874553 + if (contentToUse !== '') { + if (process.env.NODE_ENV !== 'production') { + setAndValidateContentChildDev.call(this, contentToUse); + } + DOMLazyTree.queueText(lazyTree, contentToUse); + } + } else if (childrenToUse != null) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + for (var i = 0; i < mountImages.length; i++) { + DOMLazyTree.queueChild(lazyTree, mountImages[i]); + } + } + } + }, + + /** + * Receives a next element and updates the component. + * + * @internal + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} context + */ + receiveComponent: function (nextElement, transaction, context) { + var prevElement = this._currentElement; + this._currentElement = nextElement; + this.updateComponent(transaction, prevElement, nextElement, context); + }, + + /** + * Updates a DOM component after it has already been allocated and + * attached to the DOM. Reconciles the root DOM node, then recurses. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevElement + * @param {ReactElement} nextElement + * @internal + * @overridable + */ + updateComponent: function (transaction, prevElement, nextElement, context) { + var lastProps = prevElement.props; + var nextProps = this._currentElement.props; + + switch (this._tag) { + case 'input': + lastProps = ReactDOMInput.getHostProps(this, lastProps); + nextProps = ReactDOMInput.getHostProps(this, nextProps); + break; + case 'option': + lastProps = ReactDOMOption.getHostProps(this, lastProps); + nextProps = ReactDOMOption.getHostProps(this, nextProps); + break; + case 'select': + lastProps = ReactDOMSelect.getHostProps(this, lastProps); + nextProps = ReactDOMSelect.getHostProps(this, nextProps); + break; + case 'textarea': + lastProps = ReactDOMTextarea.getHostProps(this, lastProps); + nextProps = ReactDOMTextarea.getHostProps(this, nextProps); + break; + } + + assertValidProps(this, nextProps); + this._updateDOMProperties(lastProps, nextProps, transaction); + this._updateDOMChildren(lastProps, nextProps, transaction, context); + + switch (this._tag) { + case 'input': + // Update the wrapper around inputs *after* updating props. This has to + // happen after `_updateDOMProperties`. Otherwise HTML5 input validations + // raise warnings and prevent the new value from being assigned. + ReactDOMInput.updateWrapper(this); + break; + case 'textarea': + ReactDOMTextarea.updateWrapper(this); + break; + case 'select': + // <select> value update needs to occur after <option> children + // reconciliation + transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this); + break; + } + }, + + /** + * Reconciles the properties by detecting differences in property values and + * updating the DOM as necessary. This function is probably the single most + * critical path for performance optimization. + * + * TODO: Benchmark whether checking for changed values in memory actually + * improves performance (especially statically positioned elements). + * TODO: Benchmark the effects of putting this at the top since 99% of props + * do not change for a given reconciliation. + * TODO: Benchmark areas that can be improved with caching. + * + * @private + * @param {object} lastProps + * @param {object} nextProps + * @param {?DOMElement} node + */ + _updateDOMProperties: function (lastProps, nextProps, transaction) { + var propKey; + var styleName; + var styleUpdates; + for (propKey in lastProps) { + if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) { + continue; + } + if (propKey === STYLE) { + var lastStyle = this._previousStyleCopy; + for (styleName in lastStyle) { + if (lastStyle.hasOwnProperty(styleName)) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + this._previousStyleCopy = null; + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (lastProps[propKey]) { + // Only call deleteListener if there was a listener previously or + // else willDeleteListener gets called when there wasn't actually a + // listener (e.g., onClick={null}) + deleteListener(this, propKey); + } + } else if (isCustomComponent(this._tag, lastProps)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey); + } + } + for (propKey in nextProps) { + var nextProp = nextProps[propKey]; + var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined; + if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) { + continue; + } + if (propKey === STYLE) { + if (nextProp) { + if (process.env.NODE_ENV !== 'production') { + checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this); + this._previousStyle = nextProp; + } + nextProp = this._previousStyleCopy = _assign({}, nextProp); + } else { + this._previousStyleCopy = null; + } + if (lastProp) { + // Unset styles on `lastProp` but not on `nextProp`. + for (styleName in lastProp) { + if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + // Update styles that changed since `lastProp`. + for (styleName in nextProp) { + if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = nextProp[styleName]; + } + } + } else { + // Relies on `updateStylesByID` not mutating `styleUpdates`. + styleUpdates = nextProp; + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + if (nextProp) { + enqueuePutListener(this, propKey, nextProp, transaction); + } else if (lastProp) { + deleteListener(this, propKey); + } + } else if (isCustomComponent(this._tag, nextProps)) { + if (!RESERVED_PROPS.hasOwnProperty(propKey)) { + DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp); + } + } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + var node = getNode(this); + // If we're updating to null or undefined, we should remove the property + // from the DOM node instead of inadvertently setting to a string. This + // brings us in line with the same behavior we have on initial render. + if (nextProp != null) { + DOMPropertyOperations.setValueForProperty(node, propKey, nextProp); + } else { + DOMPropertyOperations.deleteValueForProperty(node, propKey); + } + } + } + if (styleUpdates) { + CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this); + } + }, + + /** + * Reconciles the children with the various properties that affect the + * children content. + * + * @param {object} lastProps + * @param {object} nextProps + * @param {ReactReconcileTransaction} transaction + * @param {object} context + */ + _updateDOMChildren: function (lastProps, nextProps, transaction, context) { + var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; + var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; + + var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html; + var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html; + + // Note the use of `!=` which checks for null or undefined. + var lastChildren = lastContent != null ? null : lastProps.children; + var nextChildren = nextContent != null ? null : nextProps.children; + + // If we're switching from children to content/html or vice versa, remove + // the old content + var lastHasContentOrHtml = lastContent != null || lastHtml != null; + var nextHasContentOrHtml = nextContent != null || nextHtml != null; + if (lastChildren != null && nextChildren == null) { + this.updateChildren(null, transaction, context); + } else if (lastHasContentOrHtml && !nextHasContentOrHtml) { + this.updateTextContent(''); + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); + } + } + + if (nextContent != null) { + if (lastContent !== nextContent) { + this.updateTextContent('' + nextContent); + if (process.env.NODE_ENV !== 'production') { + setAndValidateContentChildDev.call(this, nextContent); + } + } + } else if (nextHtml != null) { + if (lastHtml !== nextHtml) { + this.updateMarkup('' + nextHtml); + } + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onSetChildren(this._debugID, []); + } + } else if (nextChildren != null) { + if (process.env.NODE_ENV !== 'production') { + setAndValidateContentChildDev.call(this, null); + } + + this.updateChildren(nextChildren, transaction, context); + } + }, + + getHostNode: function () { + return getNode(this); + }, + + /** + * Destroys all event registrations for this instance. Does not remove from + * the DOM. That must be done by the parent. + * + * @internal + */ + unmountComponent: function (safely) { + switch (this._tag) { + case 'audio': + case 'form': + case 'iframe': + case 'img': + case 'link': + case 'object': + case 'source': + case 'video': + var listeners = this._wrapperState.listeners; + if (listeners) { + for (var i = 0; i < listeners.length; i++) { + listeners[i].remove(); + } + } + break; + case 'html': + case 'head': + case 'body': + /** + * Components like <html> <head> and <body> can't be removed or added + * easily in a cross-browser way, however it's valuable to be able to + * take advantage of React's reconciliation for styling and <title> + * management. So we just document it and throw in dangerous cases. + */ + true ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0; + break; + } + + this.unmountChildren(safely); + ReactDOMComponentTree.uncacheNode(this); + EventPluginHub.deleteAllListeners(this); + this._rootNodeID = 0; + this._domID = 0; + this._wrapperState = null; + + if (process.env.NODE_ENV !== 'production') { + setAndValidateContentChildDev.call(this, null); + } + }, + + getPublicInstance: function () { + return getNode(this); + } + +}; + +_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin); + +module.exports = ReactDOMComponent; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 402 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMComponentTree = __webpack_require__(15); + +var focusNode = __webpack_require__(227); + +var AutoFocusUtils = { + focusDOMComponent: function () { + focusNode(ReactDOMComponentTree.getNodeFromInstance(this)); + } +}; + +module.exports = AutoFocusUtils; + +/***/ }), +/* 403 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var CSSProperty = __webpack_require__(228); +var ExecutionEnvironment = __webpack_require__(18); +var ReactInstrumentation = __webpack_require__(23); + +var camelizeStyleName = __webpack_require__(404); +var dangerousStyleValue = __webpack_require__(406); +var hyphenateStyleName = __webpack_require__(407); +var memoizeStringOnly = __webpack_require__(409); +var warning = __webpack_require__(11); + +var processStyleName = memoizeStringOnly(function (styleName) { + return hyphenateStyleName(styleName); +}); + +var hasShorthandPropertyBug = false; +var styleFloatAccessor = 'cssFloat'; +if (ExecutionEnvironment.canUseDOM) { + var tempStyle = document.createElement('div').style; + try { + // IE8 throws "Invalid argument." if resetting shorthand style properties. + tempStyle.font = ''; + } catch (e) { + hasShorthandPropertyBug = true; + } + // IE8 only supports accessing cssFloat (standard) as styleFloat + if (document.documentElement.style.cssFloat === undefined) { + styleFloatAccessor = 'styleFloat'; + } +} + +if (process.env.NODE_ENV !== 'production') { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + + // style values shouldn't contain a semicolon + var badStyleValueWithSemicolonPattern = /;\s*$/; + + var warnedStyleNames = {}; + var warnedStyleValues = {}; + var warnedForNaNValue = false; + + var warnHyphenatedStyleName = function (name, owner) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0; + }; + + var warnBadVendoredStyleName = function (name, owner) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0; + }; + + var warnStyleValueWithSemicolon = function (name, value, owner) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0; + }; + + var warnStyleValueIsNaN = function (name, value, owner) { + if (warnedForNaNValue) { + return; + } + + warnedForNaNValue = true; + process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0; + }; + + var checkRenderMessage = function (owner) { + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; + }; + + /** + * @param {string} name + * @param {*} value + * @param {ReactDOMComponent} component + */ + var warnValidStyle = function (name, value, component) { + var owner; + if (component) { + owner = component._currentElement._owner; + } + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name, owner); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name, owner); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value, owner); + } + + if (typeof value === 'number' && isNaN(value)) { + warnStyleValueIsNaN(name, value, owner); + } + }; +} + +/** + * Operations for dealing with CSS properties. + */ +var CSSPropertyOperations = { + + /** + * Serializes a mapping of style properties for use as inline styles: + * + * > createMarkupForStyles({width: '200px', height: 0}) + * "width:200px;height:0;" + * + * Undefined values are ignored so that declarative programming is easier. + * The result should be HTML-escaped before insertion into the DOM. + * + * @param {object} styles + * @param {ReactDOMComponent} component + * @return {?string} + */ + createMarkupForStyles: function (styles, component) { + var serialized = ''; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + var styleValue = styles[styleName]; + if (process.env.NODE_ENV !== 'production') { + warnValidStyle(styleName, styleValue, component); + } + if (styleValue != null) { + serialized += processStyleName(styleName) + ':'; + serialized += dangerousStyleValue(styleName, styleValue, component) + ';'; + } + } + return serialized || null; + }, + + /** + * Sets the value for multiple styles on a node. If a value is specified as + * '' (empty string), the corresponding style property will be unset. + * + * @param {DOMElement} node + * @param {object} styles + * @param {ReactDOMComponent} component + */ + setValueForStyles: function (node, styles, component) { + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: component._debugID, + type: 'update styles', + payload: styles + }); + } + + var style = node.style; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + if (process.env.NODE_ENV !== 'production') { + warnValidStyle(styleName, styles[styleName], component); + } + var styleValue = dangerousStyleValue(styleName, styles[styleName], component); + if (styleName === 'float' || styleName === 'cssFloat') { + styleName = styleFloatAccessor; + } + if (styleValue) { + style[styleName] = styleValue; + } else { + var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; + if (expansion) { + // Shorthand property that IE8 won't like unsetting, so unset each + // component to placate it + for (var individualStyleName in expansion) { + style[individualStyleName] = ''; + } + } else { + style[styleName] = ''; + } + } + } + } + +}; + +module.exports = CSSPropertyOperations; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 404 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + + +var camelize = __webpack_require__(405); + +var msPattern = /^-ms-/; + +/** + * Camelcases a hyphenated CSS property name, for example: + * + * > camelizeStyleName('background-color') + * < "backgroundColor" + * > camelizeStyleName('-moz-transition') + * < "MozTransition" + * > camelizeStyleName('-ms-transition') + * < "msTransition" + * + * As Andi Smith suggests + * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + * is converted to lowercase `ms`. + * + * @param {string} string + * @return {string} + */ +function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); +} + +module.exports = camelizeStyleName; + +/***/ }), +/* 405 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var _hyphenPattern = /-(.)/g; + +/** + * Camelcases a hyphenated string, for example: + * + * > camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ +function camelize(string) { + return string.replace(_hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); +} + +module.exports = camelize; + +/***/ }), +/* 406 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var CSSProperty = __webpack_require__(228); +var warning = __webpack_require__(11); + +var isUnitlessNumber = CSSProperty.isUnitlessNumber; +var styleWarnings = {}; + +/** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @param {ReactDOMComponent} component + * @return {string} Normalized style value with dimensions applied. + */ +function dangerousStyleValue(name, value, component) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + if (isEmpty) { + return ''; + } + + var isNonNumeric = isNaN(value); + if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { + return '' + value; // cast to string + } + + if (typeof value === 'string') { + if (process.env.NODE_ENV !== 'production') { + // Allow '0' to pass through without warning. 0 is already special and + // doesn't require units, so we don't need to warn about it. + if (component && value !== '0') { + var owner = component._currentElement._owner; + var ownerName = owner ? owner.getName() : null; + if (ownerName && !styleWarnings[ownerName]) { + styleWarnings[ownerName] = {}; + } + var warned = false; + if (ownerName) { + var warnings = styleWarnings[ownerName]; + warned = warnings[name]; + if (!warned) { + warnings[name] = true; + } + } + if (!warned) { + process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0; + } + } + } + value = value.trim(); + } + return value + 'px'; +} + +module.exports = dangerousStyleValue; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 407 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + + +var hyphenate = __webpack_require__(408); + +var msPattern = /^ms-/; + +/** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + * + * @param {string} string + * @return {string} + */ +function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, '-ms-'); +} + +module.exports = hyphenateStyleName; + +/***/ }), +/* 408 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var _uppercasePattern = /([A-Z])/g; + +/** + * Hyphenates a camelcased string, for example: + * + * > hyphenate('backgroundColor') + * < "background-color" + * + * For CSS style names, use `hyphenateStyleName` instead which works properly + * with all vendor prefixes, including `ms`. + * + * @param {string} string + * @return {string} + */ +function hyphenate(string) { + return string.replace(_uppercasePattern, '-$1').toLowerCase(); +} + +module.exports = hyphenate; + +/***/ }), +/* 409 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + * @typechecks static-only + */ + + + +/** + * Memoizes the return value of a function that accepts one string argument. + */ + +function memoizeStringOnly(callback) { + var cache = {}; + return function (string) { + if (!cache.hasOwnProperty(string)) { + cache[string] = callback.call(this, string); + } + return cache[string]; + }; +} + +module.exports = memoizeStringOnly; + +/***/ }), +/* 410 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var escapeTextContentForBrowser = __webpack_require__(102); + +/** + * Escapes attribute value to prevent scripting attacks. + * + * @param {*} value Value to escape. + * @return {string} An escaped string. + */ +function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextContentForBrowser(value) + '"'; +} + +module.exports = quoteAttributeValueForBrowser; + +/***/ }), +/* 411 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPluginHub = __webpack_require__(78); + +function runEventQueueInBatch(events) { + EventPluginHub.enqueueEvents(events); + EventPluginHub.processEventQueue(false); +} + +var ReactEventEmitterMixin = { + + /** + * Streams a fired top-level event to `EventPluginHub` where plugins have the + * opportunity to create `ReactEvent`s to be dispatched. + */ + handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); + runEventQueueInBatch(events); + } +}; + +module.exports = ReactEventEmitterMixin; + +/***/ }), +/* 412 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(18); + +/** + * Generate a mapping of standard vendor prefixes using the defined style property and event name. + * + * @param {string} styleProp + * @param {string} eventName + * @returns {object} + */ +function makePrefixMap(styleProp, eventName) { + var prefixes = {}; + + prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); + prefixes['Webkit' + styleProp] = 'webkit' + eventName; + prefixes['Moz' + styleProp] = 'moz' + eventName; + prefixes['ms' + styleProp] = 'MS' + eventName; + prefixes['O' + styleProp] = 'o' + eventName.toLowerCase(); + + return prefixes; +} + +/** + * A list of event names to a configurable list of vendor prefixes. + */ +var vendorPrefixes = { + animationend: makePrefixMap('Animation', 'AnimationEnd'), + animationiteration: makePrefixMap('Animation', 'AnimationIteration'), + animationstart: makePrefixMap('Animation', 'AnimationStart'), + transitionend: makePrefixMap('Transition', 'TransitionEnd') +}; + +/** + * Event names that have already been detected and prefixed (if applicable). + */ +var prefixedEventNames = {}; + +/** + * Element to check for prefixes on. + */ +var style = {}; + +/** + * Bootstrap if a DOM exists. + */ +if (ExecutionEnvironment.canUseDOM) { + style = document.createElement('div').style; + + // On some platforms, in particular some releases of Android 4.x, + // the un-prefixed "animation" and "transition" properties are defined on the + // style object but the events that fire will still be prefixed, so we need + // to check if the un-prefixed events are usable, and if not remove them from the map. + if (!('AnimationEvent' in window)) { + delete vendorPrefixes.animationend.animation; + delete vendorPrefixes.animationiteration.animation; + delete vendorPrefixes.animationstart.animation; + } + + // Same as above + if (!('TransitionEvent' in window)) { + delete vendorPrefixes.transitionend.transition; + } +} + +/** + * Attempts to determine the correct vendor prefixed event name. + * + * @param {string} eventName + * @returns {string} + */ +function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) { + return prefixedEventNames[eventName]; + } else if (!vendorPrefixes[eventName]) { + return eventName; + } + + var prefixMap = vendorPrefixes[eventName]; + + for (var styleProp in prefixMap) { + if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { + return prefixedEventNames[eventName] = prefixMap[styleProp]; + } + } + + return ''; +} + +module.exports = getVendorPrefixedEventName; + +/***/ }), +/* 413 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); + +var DOMPropertyOperations = __webpack_require__(229); +var LinkedValueUtils = __webpack_require__(150); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactUpdates = __webpack_require__(29); + +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +var didWarnValueLink = false; +var didWarnCheckedLink = false; +var didWarnValueDefaultValue = false; +var didWarnCheckedDefaultChecked = false; +var didWarnControlledToUncontrolled = false; +var didWarnUncontrolledToControlled = false; + +function forceUpdateIfMounted() { + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMInput.updateWrapper(this); + } +} + +function isControlled(props) { + var usesChecked = props.type === 'checkbox' || props.type === 'radio'; + return usesChecked ? props.checked != null : props.value != null; +} + +/** + * Implements an <input> host component that allows setting these optional + * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. + * + * If `checked` or `value` are not supplied (or null/undefined), user actions + * that affect the checked state or value will trigger updates to the element. + * + * If they are supplied (and not null/undefined), the rendered element will not + * trigger updates to the element. Instead, the props must change in order for + * the rendered element to be updated. + * + * The rendered element will be initialized as unchecked (or `defaultChecked`) + * with an empty value (or `defaultValue`). + * + * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + */ +var ReactDOMInput = { + getHostProps: function (inst, props) { + var value = LinkedValueUtils.getValue(props); + var checked = LinkedValueUtils.getChecked(props); + + var hostProps = _assign({ + // Make sure we set .type before any other properties (setting .value + // before .type means .value is lost in IE11 and below) + type: undefined, + // Make sure we set .step before .value (setting .value before .step + // means .value is rounded on mount, based upon step precision) + step: undefined, + // Make sure we set .min & .max before .value (to ensure proper order + // in corner cases such as min or max deriving from value, e.g. Issue #7170) + min: undefined, + max: undefined + }, props, { + defaultChecked: undefined, + defaultValue: undefined, + value: value != null ? value : inst._wrapperState.initialValue, + checked: checked != null ? checked : inst._wrapperState.initialChecked, + onChange: inst._wrapperState.onChange + }); + + return hostProps; + }, + + mountWrapper: function (inst, props) { + if (process.env.NODE_ENV !== 'production') { + LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner); + + var owner = inst._currentElement._owner; + + if (props.valueLink !== undefined && !didWarnValueLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnValueLink = true; + } + if (props.checkedLink !== undefined && !didWarnCheckedLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnCheckedLink = true; + } + if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnCheckedDefaultChecked = true; + } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnValueDefaultValue = true; + } + } + + var defaultValue = props.defaultValue; + inst._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: props.value != null ? props.value : defaultValue, + listeners: null, + onChange: _handleChange.bind(inst) + }; + + if (process.env.NODE_ENV !== 'production') { + inst._wrapperState.controlled = isControlled(props); + } + }, + + updateWrapper: function (inst) { + var props = inst._currentElement.props; + + if (process.env.NODE_ENV !== 'production') { + var controlled = isControlled(props); + var owner = inst._currentElement._owner; + + if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnUncontrolledToControlled = true; + } + if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0; + didWarnControlledToUncontrolled = true; + } + } + + // TODO: Shouldn't this be getChecked(props)? + var checked = props.checked; + if (checked != null) { + DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false); + } + + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var value = LinkedValueUtils.getValue(props); + if (value != null) { + + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = '' + value; + + // To avoid side effects (such as losing text selection), only set value if changed + if (newValue !== node.value) { + node.value = newValue; + } + } else { + if (props.value == null && props.defaultValue != null) { + // In Chrome, assigning defaultValue to certain input types triggers input validation. + // For number inputs, the display value loses trailing decimal points. For email inputs, + // Chrome raises "The specified value <x> is not a valid email address". + // + // Here we check to see if the defaultValue has actually changed, avoiding these problems + // when the user is inputting text + // + // https://github.com/facebook/react/issues/7253 + if (node.defaultValue !== '' + props.defaultValue) { + node.defaultValue = '' + props.defaultValue; + } + } + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + }, + + postMountWrapper: function (inst) { + var props = inst._currentElement.props; + + // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + + // Detach value from defaultValue. We won't do anything if we're working on + // submit or reset inputs as those values & defaultValues are linked. They + // are not resetable nodes so this operation doesn't matter and actually + // removes browser-default values (eg "Submit Query") when no value is + // provided. + + switch (props.type) { + case 'submit': + case 'reset': + break; + case 'color': + case 'date': + case 'datetime': + case 'datetime-local': + case 'month': + case 'time': + case 'week': + // This fixes the no-show issue on iOS Safari and Android Chrome: + // https://github.com/facebook/react/issues/7233 + node.value = ''; + node.value = node.defaultValue; + break; + default: + node.value = node.value; + break; + } + + // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug + // this is needed to work around a chrome bug where setting defaultChecked + // will sometimes influence the value of checked (even after detachment). + // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 + // We need to temporarily unset name to avoid disrupting radio button groups. + var name = node.name; + if (name !== '') { + node.name = ''; + } + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !node.defaultChecked; + if (name !== '') { + node.name = name; + } + } +}; + +function _handleChange(event) { + var props = this._currentElement.props; + + var returnValue = LinkedValueUtils.executeOnChange(props, event); + + // Here we use asap to wait until all updates have propagated, which + // is important when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + ReactUpdates.asap(forceUpdateIfMounted, this); + + var name = props.name; + if (props.type === 'radio' && name != null) { + var rootNode = ReactDOMComponentTree.getNodeFromInstance(this); + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } + + // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form, let's just use the global + // `querySelectorAll` to ensure we don't miss anything. + var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); + + for (var i = 0; i < group.length; i++) { + var otherNode = group[i]; + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } + // This will throw if radio buttons rendered by different copies of React + // and the same name are rendered into the same form (same as #1939). + // That's probably okay; we don't support it just as we don't support + // mixing React radio buttons with non-React ones. + var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode); + !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0; + // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + ReactUpdates.asap(forceUpdateIfMounted, otherInstance); + } + } + + return returnValue; +} + +module.exports = ReactDOMInput; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 414 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var React = __webpack_require__(52); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactDOMSelect = __webpack_require__(231); + +var warning = __webpack_require__(11); +var didWarnInvalidOptionChildren = false; + +function flattenChildren(children) { + var content = ''; + + // Flatten children and warn if they aren't strings or numbers; + // invalid types are ignored. + React.Children.forEach(children, function (child) { + if (child == null) { + return; + } + if (typeof child === 'string' || typeof child === 'number') { + content += child; + } else if (!didWarnInvalidOptionChildren) { + didWarnInvalidOptionChildren = true; + process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0; + } + }); + + return content; +} + +/** + * Implements an <option> host component that warns when `selected` is set. + */ +var ReactDOMOption = { + mountWrapper: function (inst, props, hostParent) { + // TODO (yungsters): Remove support for `selected` in <option>. + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0; + } + + // Look up whether this option is 'selected' + var selectValue = null; + if (hostParent != null) { + var selectParent = hostParent; + + if (selectParent._tag === 'optgroup') { + selectParent = selectParent._hostParent; + } + + if (selectParent != null && selectParent._tag === 'select') { + selectValue = ReactDOMSelect.getSelectValueContext(selectParent); + } + } + + // If the value is null (e.g., no specified value or after initial mount) + // or missing (e.g., for <datalist>), we don't change props.selected + var selected = null; + if (selectValue != null) { + var value; + if (props.value != null) { + value = props.value + ''; + } else { + value = flattenChildren(props.children); + } + selected = false; + if (Array.isArray(selectValue)) { + // multiple + for (var i = 0; i < selectValue.length; i++) { + if ('' + selectValue[i] === value) { + selected = true; + break; + } + } + } else { + selected = '' + selectValue === value; + } + } + + inst._wrapperState = { selected: selected }; + }, + + postMountWrapper: function (inst) { + // value="" should make a value attribute (#6219) + var props = inst._currentElement.props; + if (props.value != null) { + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + node.setAttribute('value', props.value); + } + }, + + getHostProps: function (inst, props) { + var hostProps = _assign({ selected: undefined, children: undefined }, props); + + // Read state only from initial mount because <select> updates value + // manually; we need the initial state only for server rendering + if (inst._wrapperState.selected != null) { + hostProps.selected = inst._wrapperState.selected; + } + + var content = flattenChildren(props.children); + + if (content) { + hostProps.children = content; + } + + return hostProps; + } + +}; + +module.exports = ReactDOMOption; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 415 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); + +var LinkedValueUtils = __webpack_require__(150); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactUpdates = __webpack_require__(29); + +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +var didWarnValueLink = false; +var didWarnValDefaultVal = false; + +function forceUpdateIfMounted() { + if (this._rootNodeID) { + // DOM component is still mounted; update + ReactDOMTextarea.updateWrapper(this); + } +} + +/** + * Implements a <textarea> host component that allows setting `value`, and + * `defaultValue`. This differs from the traditional DOM API because value is + * usually set as PCDATA children. + * + * If `value` is not supplied (or null/undefined), user actions that affect the + * value will trigger updates to the element. + * + * If `value` is supplied (and not null/undefined), the rendered element will + * not trigger updates to the element. Instead, the `value` prop must change in + * order for the rendered element to be updated. + * + * The rendered element will be initialized with an empty value, the prop + * `defaultValue` if specified, or the children content (deprecated). + */ +var ReactDOMTextarea = { + getHostProps: function (inst, props) { + !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0; + + // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. We could add a check in setTextContent + // to only set the value if/when the value differs from the node value (which would + // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution. + // The value can be a boolean or object so that's why it's forced to be a string. + var hostProps = _assign({}, props, { + value: undefined, + defaultValue: undefined, + children: '' + inst._wrapperState.initialValue, + onChange: inst._wrapperState.onChange + }); + + return hostProps; + }, + + mountWrapper: function (inst, props) { + if (process.env.NODE_ENV !== 'production') { + LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner); + if (props.valueLink !== undefined && !didWarnValueLink) { + process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0; + didWarnValueLink = true; + } + if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0; + didWarnValDefaultVal = true; + } + } + + var value = LinkedValueUtils.getValue(props); + var initialValue = value; + + // Only bother fetching default value if we're going to use it + if (value == null) { + var defaultValue = props.defaultValue; + // TODO (yungsters): Remove support for children content in <textarea>. + var children = props.children; + if (children != null) { + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0; + } + !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0; + if (Array.isArray(children)) { + !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0; + children = children[0]; + } + + defaultValue = '' + children; + } + if (defaultValue == null) { + defaultValue = ''; + } + initialValue = defaultValue; + } + + inst._wrapperState = { + initialValue: '' + initialValue, + listeners: null, + onChange: _handleChange.bind(inst) + }; + }, + + updateWrapper: function (inst) { + var props = inst._currentElement.props; + + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var value = LinkedValueUtils.getValue(props); + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + var newValue = '' + value; + + // To avoid side effects (such as losing text selection), only set value if changed + if (newValue !== node.value) { + node.value = newValue; + } + if (props.defaultValue == null) { + node.defaultValue = newValue; + } + } + if (props.defaultValue != null) { + node.defaultValue = props.defaultValue; + } + }, + + postMountWrapper: function (inst) { + // This is in postMount because we need access to the DOM node, which is not + // available until after the component has mounted. + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + var textContent = node.textContent; + + // Only set node.value if textContent is equal to the expected + // initial value. In IE10/IE11 there is a bug where the placeholder attribute + // will populate textContent as well. + // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ + if (textContent === inst._wrapperState.initialValue) { + node.value = textContent; + } + } +}; + +function _handleChange(event) { + var props = this._currentElement.props; + var returnValue = LinkedValueUtils.executeOnChange(props, event); + ReactUpdates.asap(forceUpdateIfMounted, this); + return returnValue; +} + +module.exports = ReactDOMTextarea; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 416 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var ReactComponentEnvironment = __webpack_require__(151); +var ReactInstanceMap = __webpack_require__(80); +var ReactInstrumentation = __webpack_require__(23); + +var ReactCurrentOwner = __webpack_require__(27); +var ReactReconciler = __webpack_require__(67); +var ReactChildReconciler = __webpack_require__(417); + +var emptyFunction = __webpack_require__(21); +var flattenChildren = __webpack_require__(424); +var invariant = __webpack_require__(10); + +/** + * Make an update for markup to be rendered and inserted at a supplied index. + * + * @param {string} markup Markup that renders into an element. + * @param {number} toIndex Destination index. + * @private + */ +function makeInsertMarkup(markup, afterNode, toIndex) { + // NOTE: Null values reduce hidden classes. + return { + type: 'INSERT_MARKUP', + content: markup, + fromIndex: null, + fromNode: null, + toIndex: toIndex, + afterNode: afterNode + }; +} + +/** + * Make an update for moving an existing element to another index. + * + * @param {number} fromIndex Source index of the existing element. + * @param {number} toIndex Destination index of the element. + * @private + */ +function makeMove(child, afterNode, toIndex) { + // NOTE: Null values reduce hidden classes. + return { + type: 'MOVE_EXISTING', + content: null, + fromIndex: child._mountIndex, + fromNode: ReactReconciler.getHostNode(child), + toIndex: toIndex, + afterNode: afterNode + }; +} + +/** + * Make an update for removing an element at an index. + * + * @param {number} fromIndex Index of the element to remove. + * @private + */ +function makeRemove(child, node) { + // NOTE: Null values reduce hidden classes. + return { + type: 'REMOVE_NODE', + content: null, + fromIndex: child._mountIndex, + fromNode: node, + toIndex: null, + afterNode: null + }; +} + +/** + * Make an update for setting the markup of a node. + * + * @param {string} markup Markup that renders into an element. + * @private + */ +function makeSetMarkup(markup) { + // NOTE: Null values reduce hidden classes. + return { + type: 'SET_MARKUP', + content: markup, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null + }; +} + +/** + * Make an update for setting the text content. + * + * @param {string} textContent Text content to set. + * @private + */ +function makeTextContent(textContent) { + // NOTE: Null values reduce hidden classes. + return { + type: 'TEXT_CONTENT', + content: textContent, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null + }; +} + +/** + * Push an update, if any, onto the queue. Creates a new queue if none is + * passed and always returns the queue. Mutative. + */ +function enqueue(queue, update) { + if (update) { + queue = queue || []; + queue.push(update); + } + return queue; +} + +/** + * Processes any enqueued updates. + * + * @private + */ +function processQueue(inst, updateQueue) { + ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue); +} + +var setChildrenForInstrumentation = emptyFunction; +if (process.env.NODE_ENV !== 'production') { + var getDebugID = function (inst) { + if (!inst._debugID) { + // Check for ART-like instances. TODO: This is silly/gross. + var internal; + if (internal = ReactInstanceMap.get(inst)) { + inst = internal; + } + } + return inst._debugID; + }; + setChildrenForInstrumentation = function (children) { + var debugID = getDebugID(this); + // TODO: React Native empty components are also multichild. + // This means they still get into this method but don't have _debugID. + if (debugID !== 0) { + ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) { + return children[key]._debugID; + }) : []); + } + }; +} + +/** + * ReactMultiChild are capable of reconciling multiple children. + * + * @class ReactMultiChild + * @internal + */ +var ReactMultiChild = { + + /** + * Provides common functionality for components that must reconcile multiple + * children. This is used by `ReactDOMComponent` to mount, update, and + * unmount child components. + * + * @lends {ReactMultiChild.prototype} + */ + Mixin: { + + _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) { + if (process.env.NODE_ENV !== 'production') { + var selfDebugID = getDebugID(this); + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID); + } finally { + ReactCurrentOwner.current = null; + } + } + } + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); + }, + + _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) { + var nextChildren; + var selfDebugID = 0; + if (process.env.NODE_ENV !== 'production') { + selfDebugID = getDebugID(this); + if (this._currentElement) { + try { + ReactCurrentOwner.current = this._currentElement._owner; + nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); + } finally { + ReactCurrentOwner.current = null; + } + ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); + return nextChildren; + } + } + nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID); + ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID); + return nextChildren; + }, + + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildren Nested child maps. + * @return {array} An array of mounted representations. + * @internal + */ + mountChildren: function (nestedChildren, transaction, context) { + var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context); + this._renderedChildren = children; + + var mountImages = []; + var index = 0; + for (var name in children) { + if (children.hasOwnProperty(name)) { + var child = children[name]; + var selfDebugID = 0; + if (process.env.NODE_ENV !== 'production') { + selfDebugID = getDebugID(this); + } + var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID); + child._mountIndex = index++; + mountImages.push(mountImage); + } + } + + if (process.env.NODE_ENV !== 'production') { + setChildrenForInstrumentation.call(this, children); + } + + return mountImages; + }, + + /** + * Replaces any rendered children with a text content string. + * + * @param {string} nextContent String of content. + * @internal + */ + updateTextContent: function (nextContent) { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren, false); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; + } + } + // Set new text content. + var updates = [makeTextContent(nextContent)]; + processQueue(this, updates); + }, + + /** + * Replaces any rendered children with a markup string. + * + * @param {string} nextMarkup String of markup. + * @internal + */ + updateMarkup: function (nextMarkup) { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren, false); + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0; + } + } + var updates = [makeSetMarkup(nextMarkup)]; + processQueue(this, updates); + }, + + /** + * Updates the rendered children with new children. + * + * @param {?object} nextNestedChildrenElements Nested child element maps. + * @param {ReactReconcileTransaction} transaction + * @internal + */ + updateChildren: function (nextNestedChildrenElements, transaction, context) { + // Hook used by React ART + this._updateChildren(nextNestedChildrenElements, transaction, context); + }, + + /** + * @param {?object} nextNestedChildrenElements Nested child element maps. + * @param {ReactReconcileTransaction} transaction + * @final + * @protected + */ + _updateChildren: function (nextNestedChildrenElements, transaction, context) { + var prevChildren = this._renderedChildren; + var removedNodes = {}; + var mountImages = []; + var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context); + if (!nextChildren && !prevChildren) { + return; + } + var updates = null; + var name; + // `nextIndex` will increment for each child in `nextChildren`, but + // `lastIndex` will be the last index visited in `prevChildren`. + var nextIndex = 0; + var lastIndex = 0; + // `nextMountIndex` will increment for each newly mounted child. + var nextMountIndex = 0; + var lastPlacedNode = null; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + var prevChild = prevChildren && prevChildren[name]; + var nextChild = nextChildren[name]; + if (prevChild === nextChild) { + updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex)); + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + prevChild._mountIndex = nextIndex; + } else { + if (prevChild) { + // Update `lastIndex` before `_mountIndex` gets unset by unmounting. + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + // The `removedNodes` loop below will actually remove the child. + } + // The child must be instantiated before it's mounted. + updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context)); + nextMountIndex++; + } + nextIndex++; + lastPlacedNode = ReactReconciler.getHostNode(nextChild); + } + // Remove children that are no longer present. + for (name in removedNodes) { + if (removedNodes.hasOwnProperty(name)) { + updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name])); + } + } + if (updates) { + processQueue(this, updates); + } + this._renderedChildren = nextChildren; + + if (process.env.NODE_ENV !== 'production') { + setChildrenForInstrumentation.call(this, nextChildren); + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. It does not actually perform any + * backend operations. + * + * @internal + */ + unmountChildren: function (safely) { + var renderedChildren = this._renderedChildren; + ReactChildReconciler.unmountChildren(renderedChildren, safely); + this._renderedChildren = null; + }, + + /** + * Moves a child component to the supplied index. + * + * @param {ReactComponent} child Component to move. + * @param {number} toIndex Destination index of the element. + * @param {number} lastIndex Last index visited of the siblings of `child`. + * @protected + */ + moveChild: function (child, afterNode, toIndex, lastIndex) { + // If the index of `child` is less than `lastIndex`, then it needs to + // be moved. Otherwise, we do not need to move it because a child will be + // inserted or moved before `child`. + if (child._mountIndex < lastIndex) { + return makeMove(child, afterNode, toIndex); + } + }, + + /** + * Creates a child component. + * + * @param {ReactComponent} child Component to create. + * @param {string} mountImage Markup to insert. + * @protected + */ + createChild: function (child, afterNode, mountImage) { + return makeInsertMarkup(mountImage, afterNode, child._mountIndex); + }, + + /** + * Removes a child component. + * + * @param {ReactComponent} child Child to remove. + * @protected + */ + removeChild: function (child, node) { + return makeRemove(child, node); + }, + + /** + * Mounts a child with the supplied name. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to mount. + * @param {string} name Name of the child. + * @param {number} index Index at which to insert the child. + * @param {ReactReconcileTransaction} transaction + * @private + */ + _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) { + child._mountIndex = index; + return this.createChild(child, afterNode, mountImage); + }, + + /** + * Unmounts a rendered child. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to unmount. + * @private + */ + _unmountChild: function (child, node) { + var update = this.removeChild(child, node); + child._mountIndex = null; + return update; + } + + } + +}; + +module.exports = ReactMultiChild; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 417 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactReconciler = __webpack_require__(67); + +var instantiateReactComponent = __webpack_require__(232); +var KeyEscapeUtils = __webpack_require__(153); +var shouldUpdateReactComponent = __webpack_require__(152); +var traverseAllChildren = __webpack_require__(236); +var warning = __webpack_require__(11); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); +} + +function instantiateChild(childInstances, child, name, selfDebugID) { + // We found a component instance. + var keyUnique = childInstances[name] === undefined; + if (process.env.NODE_ENV !== 'production') { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (!keyUnique) { + process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; + } + } + if (child != null && keyUnique) { + childInstances[name] = instantiateReactComponent(child, true); + } +} + +/** + * ReactChildReconciler provides helpers for initializing or updating a set of + * children. Its output is suitable for passing it onto ReactMultiChild which + * does diffed reordering and insertion. + */ +var ReactChildReconciler = { + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildNodes Nested child maps. + * @return {?object} A set of child instances. + * @internal + */ + instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots + ) { + if (nestedChildNodes == null) { + return null; + } + var childInstances = {}; + + if (process.env.NODE_ENV !== 'production') { + traverseAllChildren(nestedChildNodes, function (childInsts, child, name) { + return instantiateChild(childInsts, child, name, selfDebugID); + }, childInstances); + } else { + traverseAllChildren(nestedChildNodes, instantiateChild, childInstances); + } + return childInstances; + }, + + /** + * Updates the rendered children and returns a new set of children. + * + * @param {?object} prevChildren Previously initialized set of children. + * @param {?object} nextChildren Flat child element maps. + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @return {?object} A new set of child instances. + * @internal + */ + updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots + ) { + // We currently don't have a way to track moves here but if we use iterators + // instead of for..in we can zip the iterators and check if an item has + // moved. + // TODO: If nothing has changed, return the prevChildren object so that we + // can quickly bailout if nothing has changed. + if (!nextChildren && !prevChildren) { + return; + } + var name; + var prevChild; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + prevChild = prevChildren && prevChildren[name]; + var prevElement = prevChild && prevChild._currentElement; + var nextElement = nextChildren[name]; + if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) { + ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context); + nextChildren[name] = prevChild; + } else { + if (prevChild) { + removedNodes[name] = ReactReconciler.getHostNode(prevChild); + ReactReconciler.unmountComponent(prevChild, false); + } + // The child must be instantiated before it's mounted. + var nextChildInstance = instantiateReactComponent(nextElement, true); + nextChildren[name] = nextChildInstance; + // Creating mount image now ensures refs are resolved in right order + // (see https://github.com/facebook/react/pull/7101 for explanation). + var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID); + mountImages.push(nextChildMountImage); + } + } + // Unmount children that are no longer present. + for (name in prevChildren) { + if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { + prevChild = prevChildren[name]; + removedNodes[name] = ReactReconciler.getHostNode(prevChild); + ReactReconciler.unmountComponent(prevChild, false); + } + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. + * + * @param {?object} renderedChildren Previously initialized set of children. + * @internal + */ + unmountChildren: function (renderedChildren, safely) { + for (var name in renderedChildren) { + if (renderedChildren.hasOwnProperty(name)) { + var renderedChild = renderedChildren[name]; + ReactReconciler.unmountComponent(renderedChild, safely); + } + } + } + +}; + +module.exports = ReactChildReconciler; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 418 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); + +var React = __webpack_require__(52); +var ReactComponentEnvironment = __webpack_require__(151); +var ReactCurrentOwner = __webpack_require__(27); +var ReactErrorUtils = __webpack_require__(143); +var ReactInstanceMap = __webpack_require__(80); +var ReactInstrumentation = __webpack_require__(23); +var ReactNodeTypes = __webpack_require__(233); +var ReactReconciler = __webpack_require__(67); + +if (process.env.NODE_ENV !== 'production') { + var checkReactTypeSpec = __webpack_require__(419); +} + +var emptyObject = __webpack_require__(95); +var invariant = __webpack_require__(10); +var shallowEqual = __webpack_require__(81); +var shouldUpdateReactComponent = __webpack_require__(152); +var warning = __webpack_require__(11); + +var CompositeTypes = { + ImpureClass: 0, + PureClass: 1, + StatelessFunctional: 2 +}; + +function StatelessComponent(Component) {} +StatelessComponent.prototype.render = function () { + var Component = ReactInstanceMap.get(this)._currentElement.type; + var element = Component(this.props, this.context, this.updater); + warnIfInvalidElement(Component, element); + return element; +}; + +function warnIfInvalidElement(Component, element) { + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0; + } +} + +function shouldConstruct(Component) { + return !!(Component.prototype && Component.prototype.isReactComponent); +} + +function isPureComponent(Component) { + return !!(Component.prototype && Component.prototype.isPureReactComponent); +} + +// Separated into a function to contain deoptimizations caused by try/finally. +function measureLifeCyclePerf(fn, debugID, timerType) { + if (debugID === 0) { + // Top-level wrappers (see ReactMount) and empty components (see + // ReactDOMEmptyComponent) are invisible to hooks and devtools. + // Both are implementation details that should go away in the future. + return fn(); + } + + ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType); + try { + return fn(); + } finally { + ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType); + } +} + +/** + * ------------------ The Life-Cycle of a Composite Component ------------------ + * + * - constructor: Initialization of state. The instance is now retained. + * - componentWillMount + * - render + * - [children's constructors] + * - [children's componentWillMount and render] + * - [children's componentDidMount] + * - componentDidMount + * + * Update Phases: + * - componentWillReceiveProps (only called if parent updated) + * - shouldComponentUpdate + * - componentWillUpdate + * - render + * - [children's constructors or receive props phases] + * - componentDidUpdate + * + * - componentWillUnmount + * - [children's componentWillUnmount] + * - [children destroyed] + * - (destroyed): The instance is now blank, released by React and ready for GC. + * + * ----------------------------------------------------------------------------- + */ + +/** + * An incrementing ID assigned to each component when it is mounted. This is + * used to enforce the order in which `ReactUpdates` updates dirty components. + * + * @private + */ +var nextMountID = 1; + +/** + * @lends {ReactCompositeComponent.prototype} + */ +var ReactCompositeComponent = { + + /** + * Base constructor for all composite component. + * + * @param {ReactElement} element + * @final + * @internal + */ + construct: function (element) { + this._currentElement = element; + this._rootNodeID = 0; + this._compositeType = null; + this._instance = null; + this._hostParent = null; + this._hostContainerInfo = null; + + // See ReactUpdateQueue + this._updateBatchNumber = null; + this._pendingElement = null; + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + this._renderedNodeType = null; + this._renderedComponent = null; + this._context = null; + this._mountOrder = 0; + this._topLevelWrapper = null; + + // See ReactUpdates and ReactUpdateQueue. + this._pendingCallbacks = null; + + // ComponentWillUnmount shall only be called once + this._calledComponentWillUnmount = false; + + if (process.env.NODE_ENV !== 'production') { + this._warnedAboutRefsInRender = false; + } + }, + + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {?object} hostParent + * @param {?object} hostContainerInfo + * @param {?object} context + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + var _this = this; + + this._context = context; + this._mountOrder = nextMountID++; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var publicProps = this._currentElement.props; + var publicContext = this._processContext(context); + + var Component = this._currentElement.type; + + var updateQueue = transaction.getUpdateQueue(); + + // Initialize the public class + var doConstruct = shouldConstruct(Component); + var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue); + var renderedElement; + + // Support functional components + if (!doConstruct && (inst == null || inst.render == null)) { + renderedElement = inst; + warnIfInvalidElement(Component, renderedElement); + !(inst === null || inst === false || React.isValidElement(inst)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0; + inst = new StatelessComponent(Component); + this._compositeType = CompositeTypes.StatelessFunctional; + } else { + if (isPureComponent(Component)) { + this._compositeType = CompositeTypes.PureClass; + } else { + this._compositeType = CompositeTypes.ImpureClass; + } + } + + if (process.env.NODE_ENV !== 'production') { + // This will throw later in _renderValidatedComponent, but add an early + // warning now to help debugging + if (inst.render == null) { + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0; + } + + var propsMutated = inst.props !== publicProps; + var componentName = Component.displayName || Component.name || 'Component'; + + process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName) : void 0; + } + + // These should be set up in the constructor, but as a convenience for + // simpler class abstractions, we set them up after the fact. + inst.props = publicProps; + inst.context = publicContext; + inst.refs = emptyObject; + inst.updater = updateQueue; + + this._instance = inst; + + // Store a reference from the instance back to the internal representation + ReactInstanceMap.set(inst, this); + + if (process.env.NODE_ENV !== 'production') { + // Since plain JS classes are defined without any special initialization + // logic, we can not catch common errors early. Therefore, we have to + // catch them here, at initialization time, instead. + process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0; + } + + var initialState = inst.state; + if (initialState === undefined) { + inst.state = initialState = null; + } + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0; + + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + var markup; + if (inst.unstable_handleError) { + markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context); + } else { + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } + + if (inst.componentDidMount) { + if (process.env.NODE_ENV !== 'production') { + transaction.getReactMountReady().enqueue(function () { + measureLifeCyclePerf(function () { + return inst.componentDidMount(); + }, _this._debugID, 'componentDidMount'); + }); + } else { + transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); + } + } + + return markup; + }, + + _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) { + if (process.env.NODE_ENV !== 'production') { + ReactCurrentOwner.current = this; + try { + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); + } finally { + ReactCurrentOwner.current = null; + } + } else { + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); + } + }, + + _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) { + var Component = this._currentElement.type; + + if (doConstruct) { + if (process.env.NODE_ENV !== 'production') { + return measureLifeCyclePerf(function () { + return new Component(publicProps, publicContext, updateQueue); + }, this._debugID, 'ctor'); + } else { + return new Component(publicProps, publicContext, updateQueue); + } + } + + // This can still be an instance in case of factory components + // but we'll count this as time spent rendering as the more common case. + if (process.env.NODE_ENV !== 'production') { + return measureLifeCyclePerf(function () { + return Component(publicProps, publicContext, updateQueue); + }, this._debugID, 'render'); + } else { + return Component(publicProps, publicContext, updateQueue); + } + }, + + performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { + var markup; + var checkpoint = transaction.checkpoint(); + try { + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } catch (e) { + // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint + transaction.rollback(checkpoint); + this._instance.unstable_handleError(e); + if (this._pendingStateQueue) { + this._instance.state = this._processPendingState(this._instance.props, this._instance.context); + } + checkpoint = transaction.checkpoint(); + + this._renderedComponent.unmountComponent(true); + transaction.rollback(checkpoint); + + // Try again - we've informed the component about the error, so they can render an error message this time. + // If this throws again, the error will bubble up (and can be caught by a higher error boundary). + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } + return markup; + }, + + performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) { + var inst = this._instance; + + var debugID = 0; + if (process.env.NODE_ENV !== 'production') { + debugID = this._debugID; + } + + if (inst.componentWillMount) { + if (process.env.NODE_ENV !== 'production') { + measureLifeCyclePerf(function () { + return inst.componentWillMount(); + }, debugID, 'componentWillMount'); + } else { + inst.componentWillMount(); + } + // When mounting, calls to `setState` by `componentWillMount` will set + // `this._pendingStateQueue` without triggering a re-render. + if (this._pendingStateQueue) { + inst.state = this._processPendingState(inst.props, inst.context); + } + } + + // If not a stateless component, we now render + if (renderedElement === undefined) { + renderedElement = this._renderValidatedComponent(); + } + + var nodeType = ReactNodeTypes.getType(renderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ + ); + this._renderedComponent = child; + + var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID); + + if (process.env.NODE_ENV !== 'production') { + if (debugID !== 0) { + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); + } + } + + return markup; + }, + + getHostNode: function () { + return ReactReconciler.getHostNode(this._renderedComponent); + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function (safely) { + if (!this._renderedComponent) { + return; + } + + var inst = this._instance; + + if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) { + inst._calledComponentWillUnmount = true; + + if (safely) { + var name = this.getName() + '.componentWillUnmount()'; + ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst)); + } else { + if (process.env.NODE_ENV !== 'production') { + measureLifeCyclePerf(function () { + return inst.componentWillUnmount(); + }, this._debugID, 'componentWillUnmount'); + } else { + inst.componentWillUnmount(); + } + } + } + + if (this._renderedComponent) { + ReactReconciler.unmountComponent(this._renderedComponent, safely); + this._renderedNodeType = null; + this._renderedComponent = null; + this._instance = null; + } + + // Reset pending fields + // Even if this component is scheduled for another update in ReactUpdates, + // it would still be ignored because these fields are reset. + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + this._pendingCallbacks = null; + this._pendingElement = null; + + // These fields do not really need to be reset since this object is no + // longer accessible. + this._context = null; + this._rootNodeID = 0; + this._topLevelWrapper = null; + + // Delete the reference from the instance to this internal representation + // which allow the internals to be properly cleaned up even if the user + // leaks a reference to the public instance. + ReactInstanceMap.remove(inst); + + // Some existing components rely on inst.props even after they've been + // destroyed (in event handlers). + // TODO: inst.props = null; + // TODO: inst.state = null; + // TODO: inst.context = null; + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes` + * + * @param {object} context + * @return {?object} + * @private + */ + _maskContext: function (context) { + var Component = this._currentElement.type; + var contextTypes = Component.contextTypes; + if (!contextTypes) { + return emptyObject; + } + var maskedContext = {}; + for (var contextName in contextTypes) { + maskedContext[contextName] = context[contextName]; + } + return maskedContext; + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes`, and asserts that they are valid. + * + * @param {object} context + * @return {?object} + * @private + */ + _processContext: function (context) { + var maskedContext = this._maskContext(context); + if (process.env.NODE_ENV !== 'production') { + var Component = this._currentElement.type; + if (Component.contextTypes) { + this._checkContextTypes(Component.contextTypes, maskedContext, 'context'); + } + } + return maskedContext; + }, + + /** + * @param {object} currentContext + * @return {object} + * @private + */ + _processChildContext: function (currentContext) { + var Component = this._currentElement.type; + var inst = this._instance; + var childContext; + + if (inst.getChildContext) { + if (process.env.NODE_ENV !== 'production') { + ReactInstrumentation.debugTool.onBeginProcessingChildContext(); + try { + childContext = inst.getChildContext(); + } finally { + ReactInstrumentation.debugTool.onEndProcessingChildContext(); + } + } else { + childContext = inst.getChildContext(); + } + } + + if (childContext) { + !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0; + if (process.env.NODE_ENV !== 'production') { + this._checkContextTypes(Component.childContextTypes, childContext, 'childContext'); + } + for (var name in childContext) { + !(name in Component.childContextTypes) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0; + } + return _assign({}, currentContext, childContext); + } + return currentContext; + }, + + /** + * Assert that the context types are valid + * + * @param {object} typeSpecs Map of context field to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @private + */ + _checkContextTypes: function (typeSpecs, values, location) { + if (process.env.NODE_ENV !== 'production') { + checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID); + } + }, + + receiveComponent: function (nextElement, transaction, nextContext) { + var prevElement = this._currentElement; + var prevContext = this._context; + + this._pendingElement = null; + + this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); + }, + + /** + * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate` + * is set, update the component. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function (transaction) { + if (this._pendingElement != null) { + ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context); + } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) { + this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context); + } else { + this._updateBatchNumber = null; + } + }, + + /** + * Perform an update to a mounted component. The componentWillReceiveProps and + * shouldComponentUpdate methods are called, then (assuming the update isn't + * skipped) the remaining update lifecycle methods are called and the DOM + * representation is updated. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevParentElement + * @param {ReactElement} nextParentElement + * @internal + * @overridable + */ + updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) { + var inst = this._instance; + !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0; + + var willReceive = false; + var nextContext; + + // Determine if the context has changed or not + if (this._context === nextUnmaskedContext) { + nextContext = inst.context; + } else { + nextContext = this._processContext(nextUnmaskedContext); + willReceive = true; + } + + var prevProps = prevParentElement.props; + var nextProps = nextParentElement.props; + + // Not a simple state update but a props update + if (prevParentElement !== nextParentElement) { + willReceive = true; + } + + // An update here will schedule an update but immediately set + // _pendingStateQueue which will ensure that any state updates gets + // immediately reconciled instead of waiting for the next batch. + if (willReceive && inst.componentWillReceiveProps) { + if (process.env.NODE_ENV !== 'production') { + measureLifeCyclePerf(function () { + return inst.componentWillReceiveProps(nextProps, nextContext); + }, this._debugID, 'componentWillReceiveProps'); + } else { + inst.componentWillReceiveProps(nextProps, nextContext); + } + } + + var nextState = this._processPendingState(nextProps, nextContext); + var shouldUpdate = true; + + if (!this._pendingForceUpdate) { + if (inst.shouldComponentUpdate) { + if (process.env.NODE_ENV !== 'production') { + shouldUpdate = measureLifeCyclePerf(function () { + return inst.shouldComponentUpdate(nextProps, nextState, nextContext); + }, this._debugID, 'shouldComponentUpdate'); + } else { + shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext); + } + } else { + if (this._compositeType === CompositeTypes.PureClass) { + shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState); + } + } + } + + if (process.env.NODE_ENV !== 'production') { + process.env.NODE_ENV !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0; + } + + this._updateBatchNumber = null; + if (shouldUpdate) { + this._pendingForceUpdate = false; + // Will set `this.props`, `this.state` and `this.context`. + this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext); + } else { + // If it's determined that a component should not update, we still want + // to set props and state but we shortcut the rest of the update. + this._currentElement = nextParentElement; + this._context = nextUnmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + } + }, + + _processPendingState: function (props, context) { + var inst = this._instance; + var queue = this._pendingStateQueue; + var replace = this._pendingReplaceState; + this._pendingReplaceState = false; + this._pendingStateQueue = null; + + if (!queue) { + return inst.state; + } + + if (replace && queue.length === 1) { + return queue[0]; + } + + var nextState = _assign({}, replace ? queue[0] : inst.state); + for (var i = replace ? 1 : 0; i < queue.length; i++) { + var partial = queue[i]; + _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial); + } + + return nextState; + }, + + /** + * Merges new props and state, notifies delegate methods of update and + * performs update. + * + * @param {ReactElement} nextElement Next element + * @param {object} nextProps Next public object to set as properties. + * @param {?object} nextState Next object to set as state. + * @param {?object} nextContext Next public object to set as context. + * @param {ReactReconcileTransaction} transaction + * @param {?object} unmaskedContext + * @private + */ + _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) { + var _this2 = this; + + var inst = this._instance; + + var hasComponentDidUpdate = Boolean(inst.componentDidUpdate); + var prevProps; + var prevState; + var prevContext; + if (hasComponentDidUpdate) { + prevProps = inst.props; + prevState = inst.state; + prevContext = inst.context; + } + + if (inst.componentWillUpdate) { + if (process.env.NODE_ENV !== 'production') { + measureLifeCyclePerf(function () { + return inst.componentWillUpdate(nextProps, nextState, nextContext); + }, this._debugID, 'componentWillUpdate'); + } else { + inst.componentWillUpdate(nextProps, nextState, nextContext); + } + } + + this._currentElement = nextElement; + this._context = unmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + + this._updateRenderedComponent(transaction, unmaskedContext); + + if (hasComponentDidUpdate) { + if (process.env.NODE_ENV !== 'production') { + transaction.getReactMountReady().enqueue(function () { + measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate'); + }); + } else { + transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); + } + } + }, + + /** + * Call the component's `render` method and update the DOM accordingly. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + _updateRenderedComponent: function (transaction, context) { + var prevComponentInstance = this._renderedComponent; + var prevRenderedElement = prevComponentInstance._currentElement; + var nextRenderedElement = this._renderValidatedComponent(); + + var debugID = 0; + if (process.env.NODE_ENV !== 'production') { + debugID = this._debugID; + } + + if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { + ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context)); + } else { + var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance); + ReactReconciler.unmountComponent(prevComponentInstance, false); + + var nodeType = ReactNodeTypes.getType(nextRenderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */ + ); + this._renderedComponent = child; + + var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID); + + if (process.env.NODE_ENV !== 'production') { + if (debugID !== 0) { + var childDebugIDs = child._debugID !== 0 ? [child._debugID] : []; + ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs); + } + } + + this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance); + } + }, + + /** + * Overridden in shallow rendering. + * + * @protected + */ + _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) { + ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance); + }, + + /** + * @protected + */ + _renderValidatedComponentWithoutOwnerOrContext: function () { + var inst = this._instance; + var renderedElement; + + if (process.env.NODE_ENV !== 'production') { + renderedElement = measureLifeCyclePerf(function () { + return inst.render(); + }, this._debugID, 'render'); + } else { + renderedElement = inst.render(); + } + + if (process.env.NODE_ENV !== 'production') { + // We allow auto-mocks to proceed as if they're returning null. + if (renderedElement === undefined && inst.render._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + renderedElement = null; + } + } + + return renderedElement; + }, + + /** + * @private + */ + _renderValidatedComponent: function () { + var renderedElement; + if (process.env.NODE_ENV !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) { + ReactCurrentOwner.current = this; + try { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } finally { + ReactCurrentOwner.current = null; + } + } else { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } + !( + // TODO: An `isValidNode` function would probably be more appropriate + renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0; + + return renderedElement; + }, + + /** + * Lazily allocates the refs object and stores `component` as `ref`. + * + * @param {string} ref Reference name. + * @param {component} component Component to store as `ref`. + * @final + * @private + */ + attachRef: function (ref, component) { + var inst = this.getPublicInstance(); + !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0; + var publicComponentInstance = component.getPublicInstance(); + if (process.env.NODE_ENV !== 'production') { + var componentName = component && component.getName ? component.getName() : 'a component'; + process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0; + } + var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs; + refs[ref] = publicComponentInstance; + }, + + /** + * Detaches a reference name. + * + * @param {string} ref Name to dereference. + * @final + * @private + */ + detachRef: function (ref) { + var refs = this.getPublicInstance().refs; + delete refs[ref]; + }, + + /** + * Get a text description of the component that can be used to identify it + * in error messages. + * @return {string} The name or null. + * @internal + */ + getName: function () { + var type = this._currentElement.type; + var constructor = this._instance && this._instance.constructor; + return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null; + }, + + /** + * Get the publicly accessible representation of this component - i.e. what + * is exposed by refs and returned by render. Can be null for stateless + * components. + * + * @return {ReactComponent} the public component instance. + * @internal + */ + getPublicInstance: function () { + var inst = this._instance; + if (this._compositeType === CompositeTypes.StatelessFunctional) { + return null; + } + return inst; + }, + + // Stub + _instantiateReactComponent: null + +}; + +module.exports = ReactCompositeComponent; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 419 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var ReactPropTypeLocationNames = __webpack_require__(420); +var ReactPropTypesSecret = __webpack_require__(230); + +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); +} + +var loggedTypeFailures = {}; + +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?object} element The React element that is being type-checked + * @param {?number} debugID The React component instance that is being type-checked + * @private + */ +function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) { + for (var typeSpecName in typeSpecs) { + if (typeSpecs.hasOwnProperty(typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0; + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0; + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var componentStackInfo = ''; + + if (process.env.NODE_ENV !== 'production') { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (debugID !== null) { + componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); + } else if (element !== null) { + componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); + } + } + + process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0; + } + } + } +} + +module.exports = checkReactTypeSpec; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 420 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var ReactPropTypeLocationNames = {}; + +if (process.env.NODE_ENV !== 'production') { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; +} + +module.exports = ReactPropTypeLocationNames; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 421 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var nextDebugID = 1; + +function getNextDebugID() { + return nextDebugID++; +} + +module.exports = getNextDebugID; + +/***/ }), +/* 422 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +// The Symbol used to tag the ReactElement type. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. + +var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; + +module.exports = REACT_ELEMENT_TYPE; + +/***/ }), +/* 423 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +/* global Symbol */ + +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + +/** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ +function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } +} + +module.exports = getIteratorFn; + +/***/ }), +/* 424 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var KeyEscapeUtils = __webpack_require__(153); +var traverseAllChildren = __webpack_require__(236); +var warning = __webpack_require__(11); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); +} + +/** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + * @param {number=} selfDebugID Optional debugID of the current internal instance. + */ +function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + // We found a component instance. + if (traverseContext && typeof traverseContext === 'object') { + var result = traverseContext; + var keyUnique = result[name] === undefined; + if (process.env.NODE_ENV !== 'production') { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (!keyUnique) { + process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; + } + } + if (keyUnique && child != null) { + result[name] = child; + } + } +} + +/** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ +function flattenChildren(children, selfDebugID) { + if (children == null) { + return children; + } + var result = {}; + + if (process.env.NODE_ENV !== 'production') { + traverseAllChildren(children, function (traverseContext, child, name) { + return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); + }, result); + } else { + traverseAllChildren(children, flattenSingleChildIntoContext, result); + } + return result; +} + +module.exports = flattenChildren; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 425 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var PooledClass = __webpack_require__(55); +var Transaction = __webpack_require__(99); +var ReactInstrumentation = __webpack_require__(23); +var ReactServerUpdateQueue = __webpack_require__(426); + +/** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ +var TRANSACTION_WRAPPERS = []; + +if (process.env.NODE_ENV !== 'production') { + TRANSACTION_WRAPPERS.push({ + initialize: ReactInstrumentation.debugTool.onBeginFlush, + close: ReactInstrumentation.debugTool.onEndFlush + }); +} + +var noopCallbackQueue = { + enqueue: function () {} +}; + +/** + * @class ReactServerRenderingTransaction + * @param {boolean} renderToStaticMarkup + */ +function ReactServerRenderingTransaction(renderToStaticMarkup) { + this.reinitializeTransaction(); + this.renderToStaticMarkup = renderToStaticMarkup; + this.useCreateElement = false; + this.updateQueue = new ReactServerUpdateQueue(this); +} + +var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array} Empty list of operation wrap procedures. + */ + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function () { + return noopCallbackQueue; + }, + + /** + * @return {object} The queue to collect React async events. + */ + getUpdateQueue: function () { + return this.updateQueue; + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be reused. + */ + destructor: function () {}, + + checkpoint: function () {}, + + rollback: function () {} +}; + +_assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin); + +PooledClass.addPoolingTo(ReactServerRenderingTransaction); + +module.exports = ReactServerRenderingTransaction; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 426 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var ReactUpdateQueue = __webpack_require__(154); + +var warning = __webpack_require__(11); + +function warnNoop(publicInstance, callerName) { + if (process.env.NODE_ENV !== 'production') { + var constructor = publicInstance.constructor; + process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0; + } +} + +/** + * This is the update queue used for server rendering. + * It delegates to ReactUpdateQueue while server rendering is in progress and + * switches to ReactNoopUpdateQueue after the transaction has completed. + * @class ReactServerUpdateQueue + * @param {Transaction} transaction + */ + +var ReactServerUpdateQueue = function () { + function ReactServerUpdateQueue(transaction) { + _classCallCheck(this, ReactServerUpdateQueue); + + this.transaction = transaction; + } + + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + + + ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) { + return false; + }; + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName); + } + }; + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueForceUpdate(publicInstance); + } else { + warnNoop(publicInstance, 'forceUpdate'); + } + }; + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object|function} completeState Next state. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState); + } else { + warnNoop(publicInstance, 'replaceState'); + } + }; + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object|function} partialState Next partial state to be merged with state. + * @internal + */ + + + ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) { + if (this.transaction.isInTransaction()) { + ReactUpdateQueue.enqueueSetState(publicInstance, partialState); + } else { + warnNoop(publicInstance, 'setState'); + } + }; + + return ReactServerUpdateQueue; +}(); + +module.exports = ReactServerUpdateQueue; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 427 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var DOMLazyTree = __webpack_require__(68); +var ReactDOMComponentTree = __webpack_require__(15); + +var ReactDOMEmptyComponent = function (instantiate) { + // ReactCompositeComponent uses this: + this._currentElement = null; + // ReactDOMComponentTree uses these: + this._hostNode = null; + this._hostParent = null; + this._hostContainerInfo = null; + this._domID = 0; +}; +_assign(ReactDOMEmptyComponent.prototype, { + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + var domID = hostContainerInfo._idCounter++; + this._domID = domID; + this._hostParent = hostParent; + this._hostContainerInfo = hostContainerInfo; + + var nodeValue = ' react-empty: ' + this._domID + ' '; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var node = ownerDocument.createComment(nodeValue); + ReactDOMComponentTree.precacheNode(this, node); + return DOMLazyTree(node); + } else { + if (transaction.renderToStaticMarkup) { + // Normally we'd insert a comment node, but since this is a situation + // where React won't take over (static pages), we can simply return + // nothing. + return ''; + } + return '<!--' + nodeValue + '-->'; + } + }, + receiveComponent: function () {}, + getHostNode: function () { + return ReactDOMComponentTree.getNodeFromInstance(this); + }, + unmountComponent: function () { + ReactDOMComponentTree.uncacheNode(this); + } +}); + +module.exports = ReactDOMEmptyComponent; + +/***/ }), +/* 428 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var invariant = __webpack_require__(10); + +/** + * Return the lowest common ancestor of A and B, or null if they are in + * different trees. + */ +function getLowestCommonAncestor(instA, instB) { + !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; + !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0; + + var depthA = 0; + for (var tempA = instA; tempA; tempA = tempA._hostParent) { + depthA++; + } + var depthB = 0; + for (var tempB = instB; tempB; tempB = tempB._hostParent) { + depthB++; + } + + // If A is deeper, crawl up. + while (depthA - depthB > 0) { + instA = instA._hostParent; + depthA--; + } + + // If B is deeper, crawl up. + while (depthB - depthA > 0) { + instB = instB._hostParent; + depthB--; + } + + // Walk in lockstep until we find a match. + var depth = depthA; + while (depth--) { + if (instA === instB) { + return instA; + } + instA = instA._hostParent; + instB = instB._hostParent; + } + return null; +} + +/** + * Return if A is an ancestor of B. + */ +function isAncestor(instA, instB) { + !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; + !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0; + + while (instB) { + if (instB === instA) { + return true; + } + instB = instB._hostParent; + } + return false; +} + +/** + * Return the parent instance of the passed-in instance. + */ +function getParentInstance(inst) { + !('_hostNode' in inst) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0; + + return inst._hostParent; +} + +/** + * Simulates the traversal of a two-phase, capture/bubble event dispatch. + */ +function traverseTwoPhase(inst, fn, arg) { + var path = []; + while (inst) { + path.push(inst); + inst = inst._hostParent; + } + var i; + for (i = path.length; i-- > 0;) { + fn(path[i], 'captured', arg); + } + for (i = 0; i < path.length; i++) { + fn(path[i], 'bubbled', arg); + } +} + +/** + * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that + * should would receive a `mouseEnter` or `mouseLeave` event. + * + * Does not invoke the callback on the nearest common ancestor because nothing + * "entered" or "left" that element. + */ +function traverseEnterLeave(from, to, fn, argFrom, argTo) { + var common = from && to ? getLowestCommonAncestor(from, to) : null; + var pathFrom = []; + while (from && from !== common) { + pathFrom.push(from); + from = from._hostParent; + } + var pathTo = []; + while (to && to !== common) { + pathTo.push(to); + to = to._hostParent; + } + var i; + for (i = 0; i < pathFrom.length; i++) { + fn(pathFrom[i], 'bubbled', argFrom); + } + for (i = pathTo.length; i-- > 0;) { + fn(pathTo[i], 'captured', argTo); + } +} + +module.exports = { + isAncestor: isAncestor, + getLowestCommonAncestor: getLowestCommonAncestor, + getParentInstance: getParentInstance, + traverseTwoPhase: traverseTwoPhase, + traverseEnterLeave: traverseEnterLeave +}; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 429 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13), + _assign = __webpack_require__(14); + +var DOMChildrenOperations = __webpack_require__(147); +var DOMLazyTree = __webpack_require__(68); +var ReactDOMComponentTree = __webpack_require__(15); + +var escapeTextContentForBrowser = __webpack_require__(102); +var invariant = __webpack_require__(10); +var validateDOMNesting = __webpack_require__(155); + +/** + * Text nodes violate a couple assumptions that React makes about components: + * + * - When mounting text into the DOM, adjacent text nodes are merged. + * - Text nodes cannot be assigned a React root ID. + * + * This component is used to wrap strings between comment nodes so that they + * can undergo the same reconciliation that is applied to elements. + * + * TODO: Investigate representing React components in the DOM with text nodes. + * + * @class ReactDOMTextComponent + * @extends ReactComponent + * @internal + */ +var ReactDOMTextComponent = function (text) { + // TODO: This is really a ReactText (ReactNode), not a ReactElement + this._currentElement = text; + this._stringText = '' + text; + // ReactDOMComponentTree uses these: + this._hostNode = null; + this._hostParent = null; + + // Properties + this._domID = 0; + this._mountIndex = 0; + this._closingComment = null; + this._commentNodes = null; +}; + +_assign(ReactDOMTextComponent.prototype, { + + /** + * Creates the markup for this text node. This node is not intended to have + * any features besides containing text content. + * + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {string} Markup for this text node. + * @internal + */ + mountComponent: function (transaction, hostParent, hostContainerInfo, context) { + if (process.env.NODE_ENV !== 'production') { + var parentInfo; + if (hostParent != null) { + parentInfo = hostParent._ancestorInfo; + } else if (hostContainerInfo != null) { + parentInfo = hostContainerInfo._ancestorInfo; + } + if (parentInfo) { + // parentInfo should always be present except for the top-level + // component when server rendering + validateDOMNesting(null, this._stringText, this, parentInfo); + } + } + + var domID = hostContainerInfo._idCounter++; + var openingValue = ' react-text: ' + domID + ' '; + var closingValue = ' /react-text '; + this._domID = domID; + this._hostParent = hostParent; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument; + var openingComment = ownerDocument.createComment(openingValue); + var closingComment = ownerDocument.createComment(closingValue); + var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment()); + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment)); + if (this._stringText) { + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText))); + } + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment)); + ReactDOMComponentTree.precacheNode(this, openingComment); + this._closingComment = closingComment; + return lazyTree; + } else { + var escapedText = escapeTextContentForBrowser(this._stringText); + + if (transaction.renderToStaticMarkup) { + // Normally we'd wrap this between comment nodes for the reasons stated + // above, but since this is a situation where React won't take over + // (static pages), we can simply return the text as it is. + return escapedText; + } + + return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->'; + } + }, + + /** + * Updates this component by updating the text content. + * + * @param {ReactText} nextText The next text content + * @param {ReactReconcileTransaction} transaction + * @internal + */ + receiveComponent: function (nextText, transaction) { + if (nextText !== this._currentElement) { + this._currentElement = nextText; + var nextStringText = '' + nextText; + if (nextStringText !== this._stringText) { + // TODO: Save this as pending props and use performUpdateIfNecessary + // and/or updateComponent to do the actual update for consistency with + // other component types? + this._stringText = nextStringText; + var commentNodes = this.getHostNode(); + DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText); + } + } + }, + + getHostNode: function () { + var hostNode = this._commentNodes; + if (hostNode) { + return hostNode; + } + if (!this._closingComment) { + var openingComment = ReactDOMComponentTree.getNodeFromInstance(this); + var node = openingComment.nextSibling; + while (true) { + !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0; + if (node.nodeType === 8 && node.nodeValue === ' /react-text ') { + this._closingComment = node; + break; + } + node = node.nextSibling; + } + } + hostNode = [this._hostNode, this._closingComment]; + this._commentNodes = hostNode; + return hostNode; + }, + + unmountComponent: function () { + this._closingComment = null; + this._commentNodes = null; + ReactDOMComponentTree.uncacheNode(this); + } + +}); + +module.exports = ReactDOMTextComponent; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 430 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var ReactUpdates = __webpack_require__(29); +var Transaction = __webpack_require__(99); + +var emptyFunction = __webpack_require__(21); + +var RESET_BATCHED_UPDATES = { + initialize: emptyFunction, + close: function () { + ReactDefaultBatchingStrategy.isBatchingUpdates = false; + } +}; + +var FLUSH_BATCHED_UPDATES = { + initialize: emptyFunction, + close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates) +}; + +var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES]; + +function ReactDefaultBatchingStrategyTransaction() { + this.reinitializeTransaction(); +} + +_assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, { + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + } +}); + +var transaction = new ReactDefaultBatchingStrategyTransaction(); + +var ReactDefaultBatchingStrategy = { + isBatchingUpdates: false, + + /** + * Call the provided function in a context within which calls to `setState` + * and friends are batched such that components aren't updated unnecessarily. + */ + batchedUpdates: function (callback, a, b, c, d, e) { + var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; + + ReactDefaultBatchingStrategy.isBatchingUpdates = true; + + // The code is written this way to avoid extra allocations + if (alreadyBatchingUpdates) { + return callback(a, b, c, d, e); + } else { + return transaction.perform(callback, null, a, b, c, d, e); + } + } +}; + +module.exports = ReactDefaultBatchingStrategy; + +/***/ }), +/* 431 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var EventListener = __webpack_require__(237); +var ExecutionEnvironment = __webpack_require__(18); +var PooledClass = __webpack_require__(55); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactUpdates = __webpack_require__(29); + +var getEventTarget = __webpack_require__(144); +var getUnboundedScrollPosition = __webpack_require__(432); + +/** + * Find the deepest React component completely containing the root of the + * passed-in instance (for use when entire React trees are nested within each + * other). If React trees are not nested, returns null. + */ +function findParent(inst) { + // TODO: It may be a good idea to cache this to prevent unnecessary DOM + // traversal, but caching is difficult to do correctly without using a + // mutation observer to listen for all DOM changes. + while (inst._hostParent) { + inst = inst._hostParent; + } + var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst); + var container = rootNode.parentNode; + return ReactDOMComponentTree.getClosestInstanceFromNode(container); +} + +// Used to store ancestor hierarchy in top level callback +function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { + this.topLevelType = topLevelType; + this.nativeEvent = nativeEvent; + this.ancestors = []; +} +_assign(TopLevelCallbackBookKeeping.prototype, { + destructor: function () { + this.topLevelType = null; + this.nativeEvent = null; + this.ancestors.length = 0; + } +}); +PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler); + +function handleTopLevelImpl(bookKeeping) { + var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent); + var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget); + + // Loop through the hierarchy, in case there's any nested components. + // It's important that we build the array of ancestors before calling any + // event handlers, because event handlers can modify the DOM, leading to + // inconsistencies with ReactMount's node cache. See #1105. + var ancestor = targetInst; + do { + bookKeeping.ancestors.push(ancestor); + ancestor = ancestor && findParent(ancestor); + } while (ancestor); + + for (var i = 0; i < bookKeeping.ancestors.length; i++) { + targetInst = bookKeeping.ancestors[i]; + ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); + } +} + +function scrollValueMonitor(cb) { + var scrollPosition = getUnboundedScrollPosition(window); + cb(scrollPosition); +} + +var ReactEventListener = { + _enabled: true, + _handleTopLevel: null, + + WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, + + setHandleTopLevel: function (handleTopLevel) { + ReactEventListener._handleTopLevel = handleTopLevel; + }, + + setEnabled: function (enabled) { + ReactEventListener._enabled = !!enabled; + }, + + isEnabled: function () { + return ReactEventListener._enabled; + }, + + /** + * Traps top-level events by using event bubbling. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} element Element on which to attach listener. + * @return {?object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapBubbledEvent: function (topLevelType, handlerBaseName, element) { + if (!element) { + return null; + } + return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); + }, + + /** + * Traps a top-level event by using event capturing. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} element Element on which to attach listener. + * @return {?object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapCapturedEvent: function (topLevelType, handlerBaseName, element) { + if (!element) { + return null; + } + return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); + }, + + monitorScrollValue: function (refresh) { + var callback = scrollValueMonitor.bind(null, refresh); + EventListener.listen(window, 'scroll', callback); + }, + + dispatchEvent: function (topLevelType, nativeEvent) { + if (!ReactEventListener._enabled) { + return; + } + + var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent); + try { + // Event queue being processed in the same cycle allows + // `preventDefault`. + ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping); + } finally { + TopLevelCallbackBookKeeping.release(bookKeeping); + } + } +}; + +module.exports = ReactEventListener; + +/***/ }), +/* 432 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + + + +/** + * Gets the scroll position of the supplied element or window. + * + * The return values are unbounded, unlike `getScrollPosition`. This means they + * may be negative or exceed the element boundaries (which is possible using + * inertial scrolling). + * + * @param {DOMWindow|DOMElement} scrollable + * @return {object} Map with `x` and `y` keys. + */ + +function getUnboundedScrollPosition(scrollable) { + if (scrollable.Window && scrollable instanceof scrollable.Window) { + return { + x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft, + y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop + }; + } + return { + x: scrollable.scrollLeft, + y: scrollable.scrollTop + }; +} + +module.exports = getUnboundedScrollPosition; + +/***/ }), +/* 433 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMProperty = __webpack_require__(42); +var EventPluginHub = __webpack_require__(78); +var EventPluginUtils = __webpack_require__(142); +var ReactComponentEnvironment = __webpack_require__(151); +var ReactEmptyComponent = __webpack_require__(234); +var ReactBrowserEventEmitter = __webpack_require__(103); +var ReactHostComponent = __webpack_require__(235); +var ReactUpdates = __webpack_require__(29); + +var ReactInjection = { + Component: ReactComponentEnvironment.injection, + DOMProperty: DOMProperty.injection, + EmptyComponent: ReactEmptyComponent.injection, + EventPluginHub: EventPluginHub.injection, + EventPluginUtils: EventPluginUtils.injection, + EventEmitter: ReactBrowserEventEmitter.injection, + HostComponent: ReactHostComponent.injection, + Updates: ReactUpdates.injection +}; + +module.exports = ReactInjection; + +/***/ }), +/* 434 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +var CallbackQueue = __webpack_require__(222); +var PooledClass = __webpack_require__(55); +var ReactBrowserEventEmitter = __webpack_require__(103); +var ReactInputSelection = __webpack_require__(238); +var ReactInstrumentation = __webpack_require__(23); +var Transaction = __webpack_require__(99); +var ReactUpdateQueue = __webpack_require__(154); + +/** + * Ensures that, when possible, the selection range (currently selected text + * input) is not disturbed by performing the transaction. + */ +var SELECTION_RESTORATION = { + /** + * @return {Selection} Selection information. + */ + initialize: ReactInputSelection.getSelectionInformation, + /** + * @param {Selection} sel Selection information returned from `initialize`. + */ + close: ReactInputSelection.restoreSelection +}; + +/** + * Suppresses events (blur/focus) that could be inadvertently dispatched due to + * high level DOM manipulations (like temporarily removing a text input from the + * DOM). + */ +var EVENT_SUPPRESSION = { + /** + * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before + * the reconciliation. + */ + initialize: function () { + var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); + ReactBrowserEventEmitter.setEnabled(false); + return currentlyEnabled; + }, + + /** + * @param {boolean} previouslyEnabled Enabled status of + * `ReactBrowserEventEmitter` before the reconciliation occurred. `close` + * restores the previous value. + */ + close: function (previouslyEnabled) { + ReactBrowserEventEmitter.setEnabled(previouslyEnabled); + } +}; + +/** + * Provides a queue for collecting `componentDidMount` and + * `componentDidUpdate` callbacks during the transaction. + */ +var ON_DOM_READY_QUEUEING = { + /** + * Initializes the internal `onDOMReady` queue. + */ + initialize: function () { + this.reactMountReady.reset(); + }, + + /** + * After DOM is flushed, invoke all registered `onDOMReady` callbacks. + */ + close: function () { + this.reactMountReady.notifyAll(); + } +}; + +/** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ +var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING]; + +if (process.env.NODE_ENV !== 'production') { + TRANSACTION_WRAPPERS.push({ + initialize: ReactInstrumentation.debugTool.onBeginFlush, + close: ReactInstrumentation.debugTool.onEndFlush + }); +} + +/** + * Currently: + * - The order that these are listed in the transaction is critical: + * - Suppresses events. + * - Restores selection range. + * + * Future: + * - Restore document/overflow scroll positions that were unintentionally + * modified via DOM insertions above the top viewport boundary. + * - Implement/integrate with customized constraint based layout system and keep + * track of which dimensions must be remeasured. + * + * @class ReactReconcileTransaction + */ +function ReactReconcileTransaction(useCreateElement) { + this.reinitializeTransaction(); + // Only server-side rendering really needs this option (see + // `ReactServerRendering`), but server-side uses + // `ReactServerRenderingTransaction` instead. This option is here so that it's + // accessible and defaults to false when `ReactDOMComponent` and + // `ReactDOMTextComponent` checks it in `mountComponent`.` + this.renderToStaticMarkup = false; + this.reactMountReady = CallbackQueue.getPooled(null); + this.useCreateElement = useCreateElement; +} + +var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array<object>} List of operation wrap procedures. + * TODO: convert to array<TransactionWrapper> + */ + getTransactionWrappers: function () { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function () { + return this.reactMountReady; + }, + + /** + * @return {object} The queue to collect React async events. + */ + getUpdateQueue: function () { + return ReactUpdateQueue; + }, + + /** + * Save current transaction state -- if the return value from this method is + * passed to `rollback`, the transaction will be reset to that state. + */ + checkpoint: function () { + // reactMountReady is the our only stateful wrapper + return this.reactMountReady.checkpoint(); + }, + + rollback: function (checkpoint) { + this.reactMountReady.rollback(checkpoint); + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be reused. + */ + destructor: function () { + CallbackQueue.release(this.reactMountReady); + this.reactMountReady = null; + } +}; + +_assign(ReactReconcileTransaction.prototype, Transaction, Mixin); + +PooledClass.addPoolingTo(ReactReconcileTransaction); + +module.exports = ReactReconcileTransaction; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 435 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ExecutionEnvironment = __webpack_require__(18); + +var getNodeForCharacterOffset = __webpack_require__(436); +var getTextContentAccessor = __webpack_require__(221); + +/** + * While `isCollapsed` is available on the Selection object and `collapsed` + * is available on the Range object, IE11 sometimes gets them wrong. + * If the anchor/focus nodes and offsets are the same, the range is collapsed. + */ +function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { + return anchorNode === focusNode && anchorOffset === focusOffset; +} + +/** + * Get the appropriate anchor and focus node/offset pairs for IE. + * + * The catch here is that IE's selection API doesn't provide information + * about whether the selection is forward or backward, so we have to + * behave as though it's always forward. + * + * IE text differs from modern selection in that it behaves as though + * block elements end with a new line. This means character offsets will + * differ between the two APIs. + * + * @param {DOMElement} node + * @return {object} + */ +function getIEOffsets(node) { + var selection = document.selection; + var selectedRange = selection.createRange(); + var selectedLength = selectedRange.text.length; + + // Duplicate selection so we can move range without breaking user selection. + var fromStart = selectedRange.duplicate(); + fromStart.moveToElementText(node); + fromStart.setEndPoint('EndToStart', selectedRange); + + var startOffset = fromStart.text.length; + var endOffset = startOffset + selectedLength; + + return { + start: startOffset, + end: endOffset + }; +} + +/** + * @param {DOMElement} node + * @return {?object} + */ +function getModernOffsets(node) { + var selection = window.getSelection && window.getSelection(); + + if (!selection || selection.rangeCount === 0) { + return null; + } + + var anchorNode = selection.anchorNode; + var anchorOffset = selection.anchorOffset; + var focusNode = selection.focusNode; + var focusOffset = selection.focusOffset; + + var currentRange = selection.getRangeAt(0); + + // In Firefox, range.startContainer and range.endContainer can be "anonymous + // divs", e.g. the up/down buttons on an <input type="number">. Anonymous + // divs do not seem to expose properties, triggering a "Permission denied + // error" if any of its properties are accessed. The only seemingly possible + // way to avoid erroring is to access a property that typically works for + // non-anonymous divs and catch any error that may otherwise arise. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 + try { + /* eslint-disable no-unused-expressions */ + currentRange.startContainer.nodeType; + currentRange.endContainer.nodeType; + /* eslint-enable no-unused-expressions */ + } catch (e) { + return null; + } + + // If the node and offset values are the same, the selection is collapsed. + // `Selection.isCollapsed` is available natively, but IE sometimes gets + // this value wrong. + var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset); + + var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length; + + var tempRange = currentRange.cloneRange(); + tempRange.selectNodeContents(node); + tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); + + var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset); + + var start = isTempRangeCollapsed ? 0 : tempRange.toString().length; + var end = start + rangeLength; + + // Detect whether the selection is backward. + var detectionRange = document.createRange(); + detectionRange.setStart(anchorNode, anchorOffset); + detectionRange.setEnd(focusNode, focusOffset); + var isBackward = detectionRange.collapsed; + + return { + start: isBackward ? end : start, + end: isBackward ? start : end + }; +} + +/** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ +function setIEOffsets(node, offsets) { + var range = document.selection.createRange().duplicate(); + var start, end; + + if (offsets.end === undefined) { + start = offsets.start; + end = start; + } else if (offsets.start > offsets.end) { + start = offsets.end; + end = offsets.start; + } else { + start = offsets.start; + end = offsets.end; + } + + range.moveToElementText(node); + range.moveStart('character', start); + range.setEndPoint('EndToStart', range); + range.moveEnd('character', end - start); + range.select(); +} + +/** + * In modern non-IE browsers, we can support both forward and backward + * selections. + * + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programmatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. + * + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ +function setModernOffsets(node, offsets) { + if (!window.getSelection) { + return; + } + + var selection = window.getSelection(); + var length = node[getTextContentAccessor()].length; + var start = Math.min(offsets.start, length); + var end = offsets.end === undefined ? start : Math.min(offsets.end, length); + + // IE 11 uses modern selection, but doesn't support the extend method. + // Flip backward selections, so we can set with a single range. + if (!selection.extend && start > end) { + var temp = end; + end = start; + start = temp; + } + + var startMarker = getNodeForCharacterOffset(node, start); + var endMarker = getNodeForCharacterOffset(node, end); + + if (startMarker && endMarker) { + var range = document.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + + if (start > end) { + selection.addRange(range); + selection.extend(endMarker.node, endMarker.offset); + } else { + range.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range); + } + } +} + +var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window); + +var ReactDOMSelection = { + /** + * @param {DOMElement} node + */ + getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, + + /** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets +}; + +module.exports = ReactDOMSelection; + +/***/ }), +/* 436 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +/** + * Given any node return the first leaf node without children. + * + * @param {DOMElement|DOMTextNode} node + * @return {DOMElement|DOMTextNode} + */ + +function getLeafNode(node) { + while (node && node.firstChild) { + node = node.firstChild; + } + return node; +} + +/** + * Get the next sibling within a container. This will walk up the + * DOM if a node's siblings have been exhausted. + * + * @param {DOMElement|DOMTextNode} node + * @return {?DOMElement|DOMTextNode} + */ +function getSiblingNode(node) { + while (node) { + if (node.nextSibling) { + return node.nextSibling; + } + node = node.parentNode; + } +} + +/** + * Get object describing the nodes which contain characters at offset. + * + * @param {DOMElement|DOMTextNode} root + * @param {number} offset + * @return {?object} + */ +function getNodeForCharacterOffset(root, offset) { + var node = getLeafNode(root); + var nodeStart = 0; + var nodeEnd = 0; + + while (node) { + if (node.nodeType === 3) { + nodeEnd = nodeStart + node.textContent.length; + + if (nodeStart <= offset && nodeEnd >= offset) { + return { + node: node, + offset: offset - nodeStart + }; + } + + nodeStart = nodeEnd; + } + + node = getLeafNode(getSiblingNode(node)); + } +} + +module.exports = getNodeForCharacterOffset; + +/***/ }), +/* 437 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + +var isTextNode = __webpack_require__(438); + +/*eslint-disable no-bitwise */ + +/** + * Checks if a given DOM node contains or is another DOM node. + */ +function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } +} + +module.exports = containsNode; + +/***/ }), +/* 438 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +var isNode = __webpack_require__(439); + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM text node. + */ +function isTextNode(object) { + return isNode(object) && object.nodeType == 3; +} + +module.exports = isTextNode; + +/***/ }), +/* 439 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + */ + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM node. + */ +function isNode(object) { + var doc = object ? object.ownerDocument || object : document; + var defaultView = doc.defaultView || window; + return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); +} + +module.exports = isNode; + +/***/ }), +/* 440 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var NS = { + xlink: 'http://www.w3.org/1999/xlink', + xml: 'http://www.w3.org/XML/1998/namespace' +}; + +// We use attributes for everything SVG so let's avoid some duplication and run +// code instead. +// The following are all specified in the HTML config already so we exclude here. +// - class (as className) +// - color +// - height +// - id +// - lang +// - max +// - media +// - method +// - min +// - name +// - style +// - target +// - type +// - width +var ATTRS = { + accentHeight: 'accent-height', + accumulate: 0, + additive: 0, + alignmentBaseline: 'alignment-baseline', + allowReorder: 'allowReorder', + alphabetic: 0, + amplitude: 0, + arabicForm: 'arabic-form', + ascent: 0, + attributeName: 'attributeName', + attributeType: 'attributeType', + autoReverse: 'autoReverse', + azimuth: 0, + baseFrequency: 'baseFrequency', + baseProfile: 'baseProfile', + baselineShift: 'baseline-shift', + bbox: 0, + begin: 0, + bias: 0, + by: 0, + calcMode: 'calcMode', + capHeight: 'cap-height', + clip: 0, + clipPath: 'clip-path', + clipRule: 'clip-rule', + clipPathUnits: 'clipPathUnits', + colorInterpolation: 'color-interpolation', + colorInterpolationFilters: 'color-interpolation-filters', + colorProfile: 'color-profile', + colorRendering: 'color-rendering', + contentScriptType: 'contentScriptType', + contentStyleType: 'contentStyleType', + cursor: 0, + cx: 0, + cy: 0, + d: 0, + decelerate: 0, + descent: 0, + diffuseConstant: 'diffuseConstant', + direction: 0, + display: 0, + divisor: 0, + dominantBaseline: 'dominant-baseline', + dur: 0, + dx: 0, + dy: 0, + edgeMode: 'edgeMode', + elevation: 0, + enableBackground: 'enable-background', + end: 0, + exponent: 0, + externalResourcesRequired: 'externalResourcesRequired', + fill: 0, + fillOpacity: 'fill-opacity', + fillRule: 'fill-rule', + filter: 0, + filterRes: 'filterRes', + filterUnits: 'filterUnits', + floodColor: 'flood-color', + floodOpacity: 'flood-opacity', + focusable: 0, + fontFamily: 'font-family', + fontSize: 'font-size', + fontSizeAdjust: 'font-size-adjust', + fontStretch: 'font-stretch', + fontStyle: 'font-style', + fontVariant: 'font-variant', + fontWeight: 'font-weight', + format: 0, + from: 0, + fx: 0, + fy: 0, + g1: 0, + g2: 0, + glyphName: 'glyph-name', + glyphOrientationHorizontal: 'glyph-orientation-horizontal', + glyphOrientationVertical: 'glyph-orientation-vertical', + glyphRef: 'glyphRef', + gradientTransform: 'gradientTransform', + gradientUnits: 'gradientUnits', + hanging: 0, + horizAdvX: 'horiz-adv-x', + horizOriginX: 'horiz-origin-x', + ideographic: 0, + imageRendering: 'image-rendering', + 'in': 0, + in2: 0, + intercept: 0, + k: 0, + k1: 0, + k2: 0, + k3: 0, + k4: 0, + kernelMatrix: 'kernelMatrix', + kernelUnitLength: 'kernelUnitLength', + kerning: 0, + keyPoints: 'keyPoints', + keySplines: 'keySplines', + keyTimes: 'keyTimes', + lengthAdjust: 'lengthAdjust', + letterSpacing: 'letter-spacing', + lightingColor: 'lighting-color', + limitingConeAngle: 'limitingConeAngle', + local: 0, + markerEnd: 'marker-end', + markerMid: 'marker-mid', + markerStart: 'marker-start', + markerHeight: 'markerHeight', + markerUnits: 'markerUnits', + markerWidth: 'markerWidth', + mask: 0, + maskContentUnits: 'maskContentUnits', + maskUnits: 'maskUnits', + mathematical: 0, + mode: 0, + numOctaves: 'numOctaves', + offset: 0, + opacity: 0, + operator: 0, + order: 0, + orient: 0, + orientation: 0, + origin: 0, + overflow: 0, + overlinePosition: 'overline-position', + overlineThickness: 'overline-thickness', + paintOrder: 'paint-order', + panose1: 'panose-1', + pathLength: 'pathLength', + patternContentUnits: 'patternContentUnits', + patternTransform: 'patternTransform', + patternUnits: 'patternUnits', + pointerEvents: 'pointer-events', + points: 0, + pointsAtX: 'pointsAtX', + pointsAtY: 'pointsAtY', + pointsAtZ: 'pointsAtZ', + preserveAlpha: 'preserveAlpha', + preserveAspectRatio: 'preserveAspectRatio', + primitiveUnits: 'primitiveUnits', + r: 0, + radius: 0, + refX: 'refX', + refY: 'refY', + renderingIntent: 'rendering-intent', + repeatCount: 'repeatCount', + repeatDur: 'repeatDur', + requiredExtensions: 'requiredExtensions', + requiredFeatures: 'requiredFeatures', + restart: 0, + result: 0, + rotate: 0, + rx: 0, + ry: 0, + scale: 0, + seed: 0, + shapeRendering: 'shape-rendering', + slope: 0, + spacing: 0, + specularConstant: 'specularConstant', + specularExponent: 'specularExponent', + speed: 0, + spreadMethod: 'spreadMethod', + startOffset: 'startOffset', + stdDeviation: 'stdDeviation', + stemh: 0, + stemv: 0, + stitchTiles: 'stitchTiles', + stopColor: 'stop-color', + stopOpacity: 'stop-opacity', + strikethroughPosition: 'strikethrough-position', + strikethroughThickness: 'strikethrough-thickness', + string: 0, + stroke: 0, + strokeDasharray: 'stroke-dasharray', + strokeDashoffset: 'stroke-dashoffset', + strokeLinecap: 'stroke-linecap', + strokeLinejoin: 'stroke-linejoin', + strokeMiterlimit: 'stroke-miterlimit', + strokeOpacity: 'stroke-opacity', + strokeWidth: 'stroke-width', + surfaceScale: 'surfaceScale', + systemLanguage: 'systemLanguage', + tableValues: 'tableValues', + targetX: 'targetX', + targetY: 'targetY', + textAnchor: 'text-anchor', + textDecoration: 'text-decoration', + textRendering: 'text-rendering', + textLength: 'textLength', + to: 0, + transform: 0, + u1: 0, + u2: 0, + underlinePosition: 'underline-position', + underlineThickness: 'underline-thickness', + unicode: 0, + unicodeBidi: 'unicode-bidi', + unicodeRange: 'unicode-range', + unitsPerEm: 'units-per-em', + vAlphabetic: 'v-alphabetic', + vHanging: 'v-hanging', + vIdeographic: 'v-ideographic', + vMathematical: 'v-mathematical', + values: 0, + vectorEffect: 'vector-effect', + version: 0, + vertAdvY: 'vert-adv-y', + vertOriginX: 'vert-origin-x', + vertOriginY: 'vert-origin-y', + viewBox: 'viewBox', + viewTarget: 'viewTarget', + visibility: 0, + widths: 0, + wordSpacing: 'word-spacing', + writingMode: 'writing-mode', + x: 0, + xHeight: 'x-height', + x1: 0, + x2: 0, + xChannelSelector: 'xChannelSelector', + xlinkActuate: 'xlink:actuate', + xlinkArcrole: 'xlink:arcrole', + xlinkHref: 'xlink:href', + xlinkRole: 'xlink:role', + xlinkShow: 'xlink:show', + xlinkTitle: 'xlink:title', + xlinkType: 'xlink:type', + xmlBase: 'xml:base', + xmlns: 0, + xmlnsXlink: 'xmlns:xlink', + xmlLang: 'xml:lang', + xmlSpace: 'xml:space', + y: 0, + y1: 0, + y2: 0, + yChannelSelector: 'yChannelSelector', + z: 0, + zoomAndPan: 'zoomAndPan' +}; + +var SVGDOMPropertyConfig = { + Properties: {}, + DOMAttributeNamespaces: { + xlinkActuate: NS.xlink, + xlinkArcrole: NS.xlink, + xlinkHref: NS.xlink, + xlinkRole: NS.xlink, + xlinkShow: NS.xlink, + xlinkTitle: NS.xlink, + xlinkType: NS.xlink, + xmlBase: NS.xml, + xmlLang: NS.xml, + xmlSpace: NS.xml + }, + DOMAttributeNames: {} +}; + +Object.keys(ATTRS).forEach(function (key) { + SVGDOMPropertyConfig.Properties[key] = 0; + if (ATTRS[key]) { + SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key]; + } +}); + +module.exports = SVGDOMPropertyConfig; + +/***/ }), +/* 441 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var EventPropagators = __webpack_require__(77); +var ExecutionEnvironment = __webpack_require__(18); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactInputSelection = __webpack_require__(238); +var SyntheticEvent = __webpack_require__(35); + +var getActiveElement = __webpack_require__(239); +var isTextInputElement = __webpack_require__(224); +var shallowEqual = __webpack_require__(81); + +var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11; + +var eventTypes = { + select: { + phasedRegistrationNames: { + bubbled: 'onSelect', + captured: 'onSelectCapture' + }, + dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange'] + } +}; + +var activeElement = null; +var activeElementInst = null; +var lastSelection = null; +var mouseDown = false; + +// Track whether a listener exists for this plugin. If none exist, we do +// not extract events. See #3639. +var hasListener = false; + +/** + * Get an object which is a unique representation of the current selection. + * + * The return value will not be consistent across nodes or browsers, but + * two identical selections on the same node will return identical objects. + * + * @param {DOMElement} node + * @return {object} + */ +function getSelection(node) { + if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) { + return { + start: node.selectionStart, + end: node.selectionEnd + }; + } else if (window.getSelection) { + var selection = window.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset + }; + } else if (document.selection) { + var range = document.selection.createRange(); + return { + parentElement: range.parentElement(), + text: range.text, + top: range.boundingTop, + left: range.boundingLeft + }; + } +} + +/** + * Poll selection to see whether it's changed. + * + * @param {object} nativeEvent + * @return {?SyntheticEvent} + */ +function constructSelectEvent(nativeEvent, nativeEventTarget) { + // Ensure we have the right element, and that the user is not dragging a + // selection (this matches native `select` event behavior). In HTML5, select + // fires only on input and textarea thus if there's no focused element we + // won't dispatch. + if (mouseDown || activeElement == null || activeElement !== getActiveElement()) { + return null; + } + + // Only fire when selection has actually changed. + var currentSelection = getSelection(activeElement); + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; + + var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget); + + syntheticEvent.type = 'select'; + syntheticEvent.target = activeElement; + + EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent); + + return syntheticEvent; + } + + return null; +} + +/** + * This plugin creates an `onSelect` event that normalizes select events + * across form elements. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - contentEditable + * + * This differs from native browser implementations in the following ways: + * - Fires on contentEditable fields as well as inputs. + * - Fires for collapsed selection. + * - Fires after user input. + */ +var SelectEventPlugin = { + + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (!hasListener) { + return null; + } + + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + + switch (topLevelType) { + // Track the input node that has focus. + case 'topFocus': + if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { + activeElement = targetNode; + activeElementInst = targetInst; + lastSelection = null; + } + break; + case 'topBlur': + activeElement = null; + activeElementInst = null; + lastSelection = null; + break; + + // Don't fire the event while the user is dragging. This matches the + // semantics of the native select event. + case 'topMouseDown': + mouseDown = true; + break; + case 'topContextMenu': + case 'topMouseUp': + mouseDown = false; + return constructSelectEvent(nativeEvent, nativeEventTarget); + + // Chrome and IE fire non-standard event when selection is changed (and + // sometimes when it hasn't). IE's event fires out of order with respect + // to key and input events on deletion, so we discard it. + // + // Firefox doesn't support selectionchange, so check selection status + // after each key entry. The selection changes after keydown and before + // keyup, but we check on keydown as well in the case of holding down a + // key, when multiple keydown events are fired but only one keyup is. + // This is also our approach for IE handling, for the reason above. + case 'topSelectionChange': + if (skipSelectionChangeEvent) { + break; + } + // falls through + case 'topKeyDown': + case 'topKeyUp': + return constructSelectEvent(nativeEvent, nativeEventTarget); + } + + return null; + }, + + didPutListener: function (inst, registrationName, listener) { + if (registrationName === 'onSelect') { + hasListener = true; + } + } +}; + +module.exports = SelectEventPlugin; + +/***/ }), +/* 442 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var EventListener = __webpack_require__(237); +var EventPropagators = __webpack_require__(77); +var ReactDOMComponentTree = __webpack_require__(15); +var SyntheticAnimationEvent = __webpack_require__(443); +var SyntheticClipboardEvent = __webpack_require__(444); +var SyntheticEvent = __webpack_require__(35); +var SyntheticFocusEvent = __webpack_require__(445); +var SyntheticKeyboardEvent = __webpack_require__(446); +var SyntheticMouseEvent = __webpack_require__(100); +var SyntheticDragEvent = __webpack_require__(448); +var SyntheticTouchEvent = __webpack_require__(449); +var SyntheticTransitionEvent = __webpack_require__(450); +var SyntheticUIEvent = __webpack_require__(79); +var SyntheticWheelEvent = __webpack_require__(451); + +var emptyFunction = __webpack_require__(21); +var getEventCharCode = __webpack_require__(156); +var invariant = __webpack_require__(10); + +/** + * Turns + * ['abort', ...] + * into + * eventTypes = { + * 'abort': { + * phasedRegistrationNames: { + * bubbled: 'onAbort', + * captured: 'onAbortCapture', + * }, + * dependencies: ['topAbort'], + * }, + * ... + * }; + * topLevelEventsToDispatchConfig = { + * 'topAbort': { sameConfig } + * }; + */ +var eventTypes = {}; +var topLevelEventsToDispatchConfig = {}; +['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) { + var capitalizedEvent = event[0].toUpperCase() + event.slice(1); + var onEvent = 'on' + capitalizedEvent; + var topEvent = 'top' + capitalizedEvent; + + var type = { + phasedRegistrationNames: { + bubbled: onEvent, + captured: onEvent + 'Capture' + }, + dependencies: [topEvent] + }; + eventTypes[event] = type; + topLevelEventsToDispatchConfig[topEvent] = type; +}); + +var onClickListeners = {}; + +function getDictionaryKey(inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 + return '.' + inst._rootNodeID; +} + +function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; +} + +var SimpleEventPlugin = { + + eventTypes: eventTypes, + + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + if (!dispatchConfig) { + return null; + } + var EventConstructor; + switch (topLevelType) { + case 'topAbort': + case 'topCanPlay': + case 'topCanPlayThrough': + case 'topDurationChange': + case 'topEmptied': + case 'topEncrypted': + case 'topEnded': + case 'topError': + case 'topInput': + case 'topInvalid': + case 'topLoad': + case 'topLoadedData': + case 'topLoadedMetadata': + case 'topLoadStart': + case 'topPause': + case 'topPlay': + case 'topPlaying': + case 'topProgress': + case 'topRateChange': + case 'topReset': + case 'topSeeked': + case 'topSeeking': + case 'topStalled': + case 'topSubmit': + case 'topSuspend': + case 'topTimeUpdate': + case 'topVolumeChange': + case 'topWaiting': + // HTML Events + // @see http://www.w3.org/TR/html5/index.html#events-0 + EventConstructor = SyntheticEvent; + break; + case 'topKeyPress': + // Firefox creates a keypress event for function keys too. This removes + // the unwanted keypress events. Enter is however both printable and + // non-printable. One would expect Tab to be as well (but it isn't). + if (getEventCharCode(nativeEvent) === 0) { + return null; + } + /* falls through */ + case 'topKeyDown': + case 'topKeyUp': + EventConstructor = SyntheticKeyboardEvent; + break; + case 'topBlur': + case 'topFocus': + EventConstructor = SyntheticFocusEvent; + break; + case 'topClick': + // Firefox creates a click event on right mouse clicks. This removes the + // unwanted click events. + if (nativeEvent.button === 2) { + return null; + } + /* falls through */ + case 'topDoubleClick': + case 'topMouseDown': + case 'topMouseMove': + case 'topMouseUp': + // TODO: Disabled elements should not respond to mouse events + /* falls through */ + case 'topMouseOut': + case 'topMouseOver': + case 'topContextMenu': + EventConstructor = SyntheticMouseEvent; + break; + case 'topDrag': + case 'topDragEnd': + case 'topDragEnter': + case 'topDragExit': + case 'topDragLeave': + case 'topDragOver': + case 'topDragStart': + case 'topDrop': + EventConstructor = SyntheticDragEvent; + break; + case 'topTouchCancel': + case 'topTouchEnd': + case 'topTouchMove': + case 'topTouchStart': + EventConstructor = SyntheticTouchEvent; + break; + case 'topAnimationEnd': + case 'topAnimationIteration': + case 'topAnimationStart': + EventConstructor = SyntheticAnimationEvent; + break; + case 'topTransitionEnd': + EventConstructor = SyntheticTransitionEvent; + break; + case 'topScroll': + EventConstructor = SyntheticUIEvent; + break; + case 'topWheel': + EventConstructor = SyntheticWheelEvent; + break; + case 'topCopy': + case 'topCut': + case 'topPaste': + EventConstructor = SyntheticClipboardEvent; + break; + } + !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0; + var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget); + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + }, + + didPutListener: function (inst, registrationName, listener) { + // Mobile Safari does not fire properly bubble click events on + // non-interactive elements, which means delegated click listeners do not + // fire. The workaround for this bug involves attaching an empty click + // listener on the target node. + // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + if (registrationName === 'onClick' && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + if (!onClickListeners[key]) { + onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction); + } + } + }, + + willDeleteListener: function (inst, registrationName) { + if (registrationName === 'onClick' && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + onClickListeners[key].remove(); + delete onClickListeners[key]; + } + } + +}; + +module.exports = SimpleEventPlugin; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 443 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(35); + +/** + * @interface Event + * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface + * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent + */ +var AnimationEventInterface = { + animationName: null, + elapsedTime: null, + pseudoElement: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface); + +module.exports = SyntheticAnimationEvent; + +/***/ }), +/* 444 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(35); + +/** + * @interface Event + * @see http://www.w3.org/TR/clipboard-apis/ + */ +var ClipboardEventInterface = { + clipboardData: function (event) { + return 'clipboardData' in event ? event.clipboardData : window.clipboardData; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); + +module.exports = SyntheticClipboardEvent; + +/***/ }), +/* 445 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticUIEvent = __webpack_require__(79); + +/** + * @interface FocusEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var FocusEventInterface = { + relatedTarget: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); + +module.exports = SyntheticFocusEvent; + +/***/ }), +/* 446 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticUIEvent = __webpack_require__(79); + +var getEventCharCode = __webpack_require__(156); +var getEventKey = __webpack_require__(447); +var getEventModifierState = __webpack_require__(146); + +/** + * @interface KeyboardEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var KeyboardEventInterface = { + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + // Legacy Interface + charCode: function (event) { + // `charCode` is the result of a KeyPress event and represents the value of + // the actual printable character. + + // KeyPress is deprecated, but its replacement is not yet final and not + // implemented in any major browser. Only KeyPress has charCode. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + return 0; + }, + keyCode: function (event) { + // `keyCode` is the result of a KeyDown/Up event and represents the value of + // physical keyboard key. + + // The actual meaning of the value depends on the users' keyboard layout + // which cannot be detected. Assuming that it is a US keyboard layout + // provides a surprisingly accurate mapping for US and European users. + // Due to this, it is left to the user to implement at this time. + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + }, + which: function (event) { + // `which` is an alias for either `keyCode` or `charCode` depending on the + // type of the event. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); + +module.exports = SyntheticKeyboardEvent; + +/***/ }), +/* 447 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var getEventCharCode = __webpack_require__(156); + +/** + * Normalization of deprecated HTML5 `key` values + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ +var normalizeKey = { + 'Esc': 'Escape', + 'Spacebar': ' ', + 'Left': 'ArrowLeft', + 'Up': 'ArrowUp', + 'Right': 'ArrowRight', + 'Down': 'ArrowDown', + 'Del': 'Delete', + 'Win': 'OS', + 'Menu': 'ContextMenu', + 'Apps': 'ContextMenu', + 'Scroll': 'ScrollLock', + 'MozPrintableKey': 'Unidentified' +}; + +/** + * Translation from legacy `keyCode` to HTML5 `key` + * Only special keys supported, all others depend on keyboard layout or browser + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ +var translateToKey = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6', + 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta' +}; + +/** + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `key` property. + */ +function getEventKey(nativeEvent) { + if (nativeEvent.key) { + // Normalize inconsistent values reported by browsers due to + // implementations of a working draft specification. + + // FireFox implements `key` but returns `MozPrintableKey` for all + // printable characters (normalized to `Unidentified`), ignore it. + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + if (key !== 'Unidentified') { + return key; + } + } + + // Browser does not implement `key`, polyfill as much of it as we can. + if (nativeEvent.type === 'keypress') { + var charCode = getEventCharCode(nativeEvent); + + // The enter-key is technically both printable and non-printable and can + // thus be captured by `keypress`, no other non-printable key should. + return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); + } + if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { + // While user keyboard layout determines the actual meaning of each + // `keyCode` value, almost all function keys have a universal value. + return translateToKey[nativeEvent.keyCode] || 'Unidentified'; + } + return ''; +} + +module.exports = getEventKey; + +/***/ }), +/* 448 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticMouseEvent = __webpack_require__(100); + +/** + * @interface DragEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var DragEventInterface = { + dataTransfer: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); + +module.exports = SyntheticDragEvent; + +/***/ }), +/* 449 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticUIEvent = __webpack_require__(79); + +var getEventModifierState = __webpack_require__(146); + +/** + * @interface TouchEvent + * @see http://www.w3.org/TR/touch-events/ + */ +var TouchEventInterface = { + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); + +module.exports = SyntheticTouchEvent; + +/***/ }), +/* 450 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticEvent = __webpack_require__(35); + +/** + * @interface Event + * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- + * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent + */ +var TransitionEventInterface = { + propertyName: null, + elapsedTime: null, + pseudoElement: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface); + +module.exports = SyntheticTransitionEvent; + +/***/ }), +/* 451 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var SyntheticMouseEvent = __webpack_require__(100); + +/** + * @interface WheelEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var WheelEventInterface = { + deltaX: function (event) { + return 'deltaX' in event ? event.deltaX : + // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + 'wheelDeltaX' in event ? -event.wheelDeltaX : 0; + }, + deltaY: function (event) { + return 'deltaY' in event ? event.deltaY : + // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + 'wheelDeltaY' in event ? -event.wheelDeltaY : + // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + 'wheelDelta' in event ? -event.wheelDelta : 0; + }, + deltaZ: null, + + // Browsers without "deltaMode" is reporting in raw wheel delta where one + // notch on the scroll is always +/- 120, roughly equivalent to pixels. + // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or + // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. + deltaMode: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticMouseEvent} + */ +function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); +} + +SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); + +module.exports = SyntheticWheelEvent; + +/***/ }), +/* 452 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var validateDOMNesting = __webpack_require__(155); + +var DOC_NODE_TYPE = 9; + +function ReactDOMContainerInfo(topLevelWrapper, node) { + var info = { + _topLevelWrapper: topLevelWrapper, + _idCounter: 1, + _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null, + _node: node, + _tag: node ? node.nodeName.toLowerCase() : null, + _namespaceURI: node ? node.namespaceURI : null + }; + if (process.env.NODE_ENV !== 'production') { + info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null; + } + return info; +} + +module.exports = ReactDOMContainerInfo; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 453 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactDOMFeatureFlags = { + useCreateElement: true, + useFiber: false +}; + +module.exports = ReactDOMFeatureFlags; + +/***/ }), +/* 454 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var adler32 = __webpack_require__(455); + +var TAG_END = /\/?>/; +var COMMENT_START = /^<\!\-\-/; + +var ReactMarkupChecksum = { + CHECKSUM_ATTR_NAME: 'data-react-checksum', + + /** + * @param {string} markup Markup string + * @return {string} Markup string with checksum attribute attached + */ + addChecksumToMarkup: function (markup) { + var checksum = adler32(markup); + + // Add checksum (handle both parent tags, comments and self-closing tags) + if (COMMENT_START.test(markup)) { + return markup; + } else { + return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&'); + } + }, + + /** + * @param {string} markup to use + * @param {DOMElement} element root React element + * @returns {boolean} whether or not the markup is the same + */ + canReuseMarkup: function (markup, element) { + var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + existingChecksum = existingChecksum && parseInt(existingChecksum, 10); + var markupChecksum = adler32(markup); + return markupChecksum === existingChecksum; + } +}; + +module.exports = ReactMarkupChecksum; + +/***/ }), +/* 455 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var MOD = 65521; + +// adler32 is not cryptographically strong, and is only used to sanity check that +// markup generated on the server matches the markup generated on the client. +// This implementation (a modified version of the SheetJS version) has been optimized +// for our use case, at the expense of conforming to the adler32 specification +// for non-ascii inputs. +function adler32(data) { + var a = 1; + var b = 0; + var i = 0; + var l = data.length; + var m = l & ~0x3; + while (i < m) { + var n = Math.min(i + 4096, m); + for (; i < n; i += 4) { + b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3)); + } + a %= MOD; + b %= MOD; + } + for (; i < l; i++) { + b += a += data.charCodeAt(i); + } + a %= MOD; + b %= MOD; + return a | b << 16; +} + +module.exports = adler32; + +/***/ }), +/* 456 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +module.exports = '15.4.2'; + +/***/ }), +/* 457 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _prodInvariant = __webpack_require__(13); + +var ReactCurrentOwner = __webpack_require__(27); +var ReactDOMComponentTree = __webpack_require__(15); +var ReactInstanceMap = __webpack_require__(80); + +var getHostComponentFromComposite = __webpack_require__(241); +var invariant = __webpack_require__(10); +var warning = __webpack_require__(11); + +/** + * Returns the DOM node rendered by this element. + * + * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode + * + * @param {ReactComponent|DOMElement} componentOrElement + * @return {?DOMElement} The root node of this element. + */ +function findDOMNode(componentOrElement) { + if (process.env.NODE_ENV !== 'production') { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0; + owner._warnedAboutRefsInRender = true; + } + } + if (componentOrElement == null) { + return null; + } + if (componentOrElement.nodeType === 1) { + return componentOrElement; + } + + var inst = ReactInstanceMap.get(componentOrElement); + if (inst) { + inst = getHostComponentFromComposite(inst); + return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null; + } + + if (typeof componentOrElement.render === 'function') { + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0; + } else { + true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0; + } +} + +module.exports = findDOMNode; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 458 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactMount = __webpack_require__(240); + +module.exports = ReactMount.renderSubtreeIntoContainer; + +/***/ }), +/* 459 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMProperty = __webpack_require__(42); +var EventPluginRegistry = __webpack_require__(98); +var ReactComponentTreeHook = __webpack_require__(19); + +var warning = __webpack_require__(11); + +if (process.env.NODE_ENV !== 'production') { + var reactProps = { + children: true, + dangerouslySetInnerHTML: true, + key: true, + ref: true, + + autoFocus: true, + defaultValue: true, + valueLink: true, + defaultChecked: true, + checkedLink: true, + innerHTML: true, + suppressContentEditableWarning: true, + onFocusIn: true, + onFocusOut: true + }; + var warnedProperties = {}; + + var validateProperty = function (tagName, name, debugID) { + if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) { + return true; + } + if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { + return true; + } + if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) { + return true; + } + warnedProperties[name] = true; + var lowerCasedName = name.toLowerCase(); + + // data-* attributes should be lowercase; suggest the lowercase version + var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null; + + var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null; + + if (standardName != null) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + return true; + } else if (registrationName != null) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + return true; + } else { + // We were unable to guess which prop the user intended. + // It is likely that the user was just blindly spreading/forwarding props + // Components should be careful to only render valid props/attributes. + // Warning will be invoked in warnUnknownProperties to allow grouping. + return false; + } + }; +} + +var warnUnknownProperties = function (debugID, element) { + var unknownProps = []; + for (var key in element.props) { + var isValid = validateProperty(element.type, key, debugID); + if (!isValid) { + unknownProps.push(key); + } + } + + var unknownPropString = unknownProps.map(function (prop) { + return '`' + prop + '`'; + }).join(', '); + + if (unknownProps.length === 1) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + } else if (unknownProps.length > 1) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown props %s on <%s> tag. Remove these props from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + } +}; + +function handleElement(debugID, element) { + if (element == null || typeof element.type !== 'string') { + return; + } + if (element.type.indexOf('-') >= 0 || element.props.is) { + return; + } + warnUnknownProperties(debugID, element); +} + +var ReactDOMUnknownPropertyHook = { + onBeforeMountComponent: function (debugID, element) { + handleElement(debugID, element); + }, + onBeforeUpdateComponent: function (debugID, element) { + handleElement(debugID, element); + } +}; + +module.exports = ReactDOMUnknownPropertyHook; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 460 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var ReactComponentTreeHook = __webpack_require__(19); + +var warning = __webpack_require__(11); + +var didWarnValueNull = false; + +function handleElement(debugID, element) { + if (element == null) { + return; + } + if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') { + return; + } + if (element.props != null && element.props.value === null && !didWarnValueNull) { + process.env.NODE_ENV !== 'production' ? warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + + didWarnValueNull = true; + } +} + +var ReactDOMNullInputValuePropHook = { + onBeforeMountComponent: function (debugID, element) { + handleElement(debugID, element); + }, + onBeforeUpdateComponent: function (debugID, element) { + handleElement(debugID, element); + } +}; + +module.exports = ReactDOMNullInputValuePropHook; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 461 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var DOMProperty = __webpack_require__(42); +var ReactComponentTreeHook = __webpack_require__(19); + +var warning = __webpack_require__(11); + +var warnedProperties = {}; +var rARIA = new RegExp('^(aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); + +function validateProperty(tagName, name, debugID) { + if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { + return true; + } + + if (rARIA.test(name)) { + var lowerCasedName = name.toLowerCase(); + var standardName = DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null; + + // If this is an aria-* attribute, but is not listed in the known DOM + // DOM properties, then it is an invalid aria-* attribute. + if (standardName == null) { + warnedProperties[name] = true; + return false; + } + // aria-* attributes should be lowercase; suggest the lowercase version. + if (name !== standardName) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Unknown ARIA attribute %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + warnedProperties[name] = true; + return true; + } + } + + return true; +} + +function warnInvalidARIAProps(debugID, element) { + var invalidProps = []; + + for (var key in element.props) { + var isValid = validateProperty(element.type, key, debugID); + if (!isValid) { + invalidProps.push(key); + } + } + + var unknownPropString = invalidProps.map(function (prop) { + return '`' + prop + '`'; + }).join(', '); + + if (invalidProps.length === 1) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + } else if (invalidProps.length > 1) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + } +} + +function handleElement(debugID, element) { + if (element == null || typeof element.type !== 'string') { + return; + } + if (element.type.indexOf('-') >= 0 || element.props.is) { + return; + } + + warnInvalidARIAProps(debugID, element); +} + +var ReactDOMInvalidARIAHook = { + onBeforeMountComponent: function (debugID, element) { + if (process.env.NODE_ENV !== 'production') { + handleElement(debugID, element); + } + }, + onBeforeUpdateComponent: function (debugID, element) { + if (process.env.NODE_ENV !== 'production') { + handleElement(debugID, element); + } + } +}; + +module.exports = ReactDOMInvalidARIAHook; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 462 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactAddonsTransitionGroup = __webpack_require__(105); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +var _ScaleInChild = __webpack_require__(466); + +var _ScaleInChild2 = _interopRequireDefault(_ScaleInChild); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ScaleIn = function (_Component) { + (0, _inherits3.default)(ScaleIn, _Component); + + function ScaleIn() { + (0, _classCallCheck3.default)(this, ScaleIn); + return (0, _possibleConstructorReturn3.default)(this, (ScaleIn.__proto__ || (0, _getPrototypeOf2.default)(ScaleIn)).apply(this, arguments)); + } + + (0, _createClass3.default)(ScaleIn, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + childStyle = _props.childStyle, + enterDelay = _props.enterDelay, + maxScale = _props.maxScale, + minScale = _props.minScale, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'childStyle', 'enterDelay', 'maxScale', 'minScale', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'relative', + overflow: 'hidden', + height: '100%' + }, style); + + var newChildren = _react2.default.Children.map(children, function (child) { + return _react2.default.createElement( + _ScaleInChild2.default, + { + key: child.key, + enterDelay: enterDelay, + maxScale: maxScale, + minScale: minScale, + style: childStyle + }, + child + ); + }); + + return _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + (0, _extends3.default)({}, other, { + style: prepareStyles(mergedRootStyles), + component: 'div' + }), + newChildren + ); + } + }]); + return ScaleIn; +}(_react.Component); + +ScaleIn.defaultProps = { + enterDelay: 0 +}; +ScaleIn.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? ScaleIn.propTypes = { + childStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + enterDelay: _react.PropTypes.number, + maxScale: _react.PropTypes.number, + minScale: _react.PropTypes.number, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = ScaleIn; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 463 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var _assign = __webpack_require__(14); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var React = __webpack_require__(52); +var ReactTransitionChildMapping = __webpack_require__(464); + +var propTypesFactory = __webpack_require__(216); +var PropTypes = propTypesFactory(React.isValidElement); + +var emptyFunction = __webpack_require__(21); + +/** + * A basis for animations. When children are declaratively added or removed, + * special lifecycle hooks are called. + * See https://facebook.github.io/react/docs/animation.html#low-level-api-reacttransitiongroup + */ + +var ReactTransitionGroup = function (_React$Component) { + _inherits(ReactTransitionGroup, _React$Component); + + function ReactTransitionGroup() { + var _temp, _this, _ret; + + _classCallCheck(this, ReactTransitionGroup); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { + // TODO: can we get useful debug information to show at this point? + children: ReactTransitionChildMapping.getChildMapping(_this.props.children) + }, _this.performAppear = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + + if (component.componentWillAppear) { + component.componentWillAppear(_this._handleDoneAppearing.bind(_this, key)); + } else { + _this._handleDoneAppearing(key); + } + }, _this._handleDoneAppearing = function (key) { + var component = _this.refs[key]; + if (component.componentDidAppear) { + component.componentDidAppear(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully appeared. Remove it. + _this.performLeave(key); + } + }, _this.performEnter = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + + if (component.componentWillEnter) { + component.componentWillEnter(_this._handleDoneEntering.bind(_this, key)); + } else { + _this._handleDoneEntering(key); + } + }, _this._handleDoneEntering = function (key) { + var component = _this.refs[key]; + if (component.componentDidEnter) { + component.componentDidEnter(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully entered. Remove it. + _this.performLeave(key); + } + }, _this.performLeave = function (key) { + _this.currentlyTransitioningKeys[key] = true; + + var component = _this.refs[key]; + if (component.componentWillLeave) { + component.componentWillLeave(_this._handleDoneLeaving.bind(_this, key)); + } else { + // Note that this is somewhat dangerous b/c it calls setState() + // again, effectively mutating the component before all the work + // is done. + _this._handleDoneLeaving(key); + } + }, _this._handleDoneLeaving = function (key) { + var component = _this.refs[key]; + + if (component.componentDidLeave) { + component.componentDidLeave(); + } + + delete _this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children); + + if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) { + // This entered again before it fully left. Add it again. + _this.performEnter(key); + } else { + _this.setState(function (state) { + var newChildren = _assign({}, state.children); + delete newChildren[key]; + return { children: newChildren }; + }); + } + }, _temp), _possibleConstructorReturn(_this, _ret); + } + + ReactTransitionGroup.prototype.componentWillMount = function componentWillMount() { + this.currentlyTransitioningKeys = {}; + this.keysToEnter = []; + this.keysToLeave = []; + }; + + ReactTransitionGroup.prototype.componentDidMount = function componentDidMount() { + var initialChildMapping = this.state.children; + for (var key in initialChildMapping) { + if (initialChildMapping[key]) { + this.performAppear(key); + } + } + }; + + ReactTransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + var nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children); + var prevChildMapping = this.state.children; + + this.setState({ + children: ReactTransitionChildMapping.mergeChildMappings(prevChildMapping, nextChildMapping) + }); + + var key; + + for (key in nextChildMapping) { + var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); + if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) { + this.keysToEnter.push(key); + } + } + + for (key in prevChildMapping) { + var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key); + if (prevChildMapping[key] && !hasNext && !this.currentlyTransitioningKeys[key]) { + this.keysToLeave.push(key); + } + } + + // If we want to someday check for reordering, we could do it here. + }; + + ReactTransitionGroup.prototype.componentDidUpdate = function componentDidUpdate() { + var keysToEnter = this.keysToEnter; + this.keysToEnter = []; + keysToEnter.forEach(this.performEnter); + + var keysToLeave = this.keysToLeave; + this.keysToLeave = []; + keysToLeave.forEach(this.performLeave); + }; + + ReactTransitionGroup.prototype.render = function render() { + // TODO: we could get rid of the need for the wrapper node + // by cloning a single child + var childrenToRender = []; + for (var key in this.state.children) { + var child = this.state.children[key]; + if (child) { + // You may need to apply reactive updates to a child as it is leaving. + // The normal React way to do it won't work since the child will have + // already been removed. In case you need this behavior you can provide + // a childFactory function to wrap every child, even the ones that are + // leaving. + childrenToRender.push(React.cloneElement(this.props.childFactory(child), { + ref: key, + key: key + })); + } + } + + // Do not forward ReactTransitionGroup props to primitive DOM nodes + var props = _assign({}, this.props); + delete props.transitionLeave; + delete props.transitionName; + delete props.transitionAppear; + delete props.transitionEnter; + delete props.childFactory; + delete props.transitionLeaveTimeout; + delete props.transitionEnterTimeout; + delete props.transitionAppearTimeout; + delete props.component; + + return React.createElement(this.props.component, props, childrenToRender); + }; + + return ReactTransitionGroup; +}(React.Component); + +ReactTransitionGroup.displayName = 'ReactTransitionGroup'; +ReactTransitionGroup.propTypes = { + component: PropTypes.any, + childFactory: PropTypes.func +}; +ReactTransitionGroup.defaultProps = { + component: 'span', + childFactory: emptyFunction.thatReturnsArgument +}; + + +module.exports = ReactTransitionGroup; + +/***/ }), +/* 464 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var flattenChildren = __webpack_require__(465); + +var ReactTransitionChildMapping = { + /** + * Given `this.props.children`, return an object mapping key to child. Just + * simple syntactic sugar around flattenChildren(). + * + * @param {*} children `this.props.children` + * @param {number=} selfDebugID Optional debugID of the current internal instance. + * @return {object} Mapping of key to child + */ + getChildMapping: function (children, selfDebugID) { + if (!children) { + return children; + } + + if (process.env.NODE_ENV !== 'production') { + return flattenChildren(children, selfDebugID); + } + + return flattenChildren(children); + }, + + /** + * When you're adding or removing children some may be added or removed in the + * same render pass. We want to show *both* since we want to simultaneously + * animate elements in and out. This function takes a previous set of keys + * and a new set of keys and merges them with its best guess of the correct + * ordering. In the future we may expose some of the utilities in + * ReactMultiChild to make this easy, but for now React itself does not + * directly have this concept of the union of prevChildren and nextChildren + * so we implement it here. + * + * @param {object} prev prev children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @param {object} next next children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @return {object} a key set that contains all keys in `prev` and all keys + * in `next` in a reasonable order. + */ + mergeChildMappings: function (prev, next) { + prev = prev || {}; + next = next || {}; + + function getValueForKey(key) { + if (next.hasOwnProperty(key)) { + return next[key]; + } else { + return prev[key]; + } + } + + // For each key of `next`, the list of keys to insert before that key in + // the combined list + var nextKeysPending = {}; + + var pendingKeys = []; + for (var prevKey in prev) { + if (next.hasOwnProperty(prevKey)) { + if (pendingKeys.length) { + nextKeysPending[prevKey] = pendingKeys; + pendingKeys = []; + } + } else { + pendingKeys.push(prevKey); + } + } + + var i; + var childMapping = {}; + for (var nextKey in next) { + if (nextKeysPending.hasOwnProperty(nextKey)) { + for (i = 0; i < nextKeysPending[nextKey].length; i++) { + var pendingNextKey = nextKeysPending[nextKey][i]; + childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); + } + } + childMapping[nextKey] = getValueForKey(nextKey); + } + + // Finally, add the keys which didn't appear before any key in `next` + for (i = 0; i < pendingKeys.length; i++) { + childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + } + + return childMapping; + } +}; + +module.exports = ReactTransitionChildMapping; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 465 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + + +var KeyEscapeUtils = __webpack_require__(214); +var traverseAllChildren = __webpack_require__(212); +var warning = __webpack_require__(11); + +var ReactComponentTreeHook; + +if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { + // Temporary hack. + // Inline requires don't work well with Jest: + // https://github.com/facebook/react/issues/7240 + // Remove the inline requires when we don't need them anymore: + // https://github.com/facebook/react/pull/7178 + ReactComponentTreeHook = __webpack_require__(19); +} + +/** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + * @param {number=} selfDebugID Optional debugID of the current internal instance. + */ +function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + // We found a component instance. + if (traverseContext && typeof traverseContext === 'object') { + var result = traverseContext; + var keyUnique = result[name] === undefined; + if (process.env.NODE_ENV !== 'production') { + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(19); + } + if (!keyUnique) { + process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0; + } + } + if (keyUnique && child != null) { + result[name] = child; + } + } +} + +/** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ +function flattenChildren(children, selfDebugID) { + if (children == null) { + return children; + } + var result = {}; + + if (process.env.NODE_ENV !== 'production') { + traverseAllChildren(children, function (traverseContext, child, name) { + return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID); + }, result); + } else { + traverseAllChildren(children, flattenSingleChildIntoContext, result); + } + return result; +} + +module.exports = flattenChildren; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 466 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _autoPrefix = __webpack_require__(104); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ScaleInChild = function (_Component) { + (0, _inherits3.default)(ScaleInChild, _Component); + + function ScaleInChild() { + (0, _classCallCheck3.default)(this, ScaleInChild); + return (0, _possibleConstructorReturn3.default)(this, (ScaleInChild.__proto__ || (0, _getPrototypeOf2.default)(ScaleInChild)).apply(this, arguments)); + } + + (0, _createClass3.default)(ScaleInChild, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentDidAppear', + value: function componentDidAppear() { + this.animate(); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + this.animate(); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.minScale + ')'); + + this.leaveTimer = setTimeout(callback, 450); + } + }, { + key: 'animate', + value: function animate() { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '1'; + _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.maxScale + ')'); + } + }, { + key: 'initializeAnimation', + value: function initializeAnimation(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'scale(0)'); + + this.enterTimer = setTimeout(callback, this.props.enterDelay); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + enterDelay = _props.enterDelay, + maxScale = _props.maxScale, + minScale = _props.minScale, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'maxScale', 'minScale', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'absolute', + height: '100%', + width: '100%', + top: 0, + left: 0, + transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) + }, style); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }), + children + ); + } + }]); + return ScaleInChild; +}(_react.Component); + +ScaleInChild.defaultProps = { + enterDelay: 0, + maxScale: 1, + minScale: 0 +}; +ScaleInChild.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? ScaleInChild.propTypes = { + children: _react.PropTypes.node, + enterDelay: _react.PropTypes.number, + maxScale: _react.PropTypes.number, + minScale: _react.PropTypes.number, + style: _react.PropTypes.object +} : void 0; +exports.default = ScaleInChild; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 467 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(56); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _autoPrefix = __webpack_require__(104); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CircleRipple = function (_Component) { + (0, _inherits3.default)(CircleRipple, _Component); + + function CircleRipple() { + (0, _classCallCheck3.default)(this, CircleRipple); + return (0, _possibleConstructorReturn3.default)(this, (CircleRipple.__proto__ || (0, _getPrototypeOf2.default)(CircleRipple)).apply(this, arguments)); + } + + (0, _createClass3.default)(CircleRipple, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + return !(0, _shallowEqual2.default)(this.props, nextProps); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.initializeAnimation(callback); + } + }, { + key: 'componentDidAppear', + value: function componentDidAppear() { + this.animate(); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + this.animate(); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = 0; + // If the animation is aborted, remove from the DOM immediately + var removeAfter = this.props.aborted ? 0 : 2000; + this.enterTimer = setTimeout(callback, removeAfter); + } + }, { + key: 'animate', + value: function animate() { + var style = _reactDom2.default.findDOMNode(this).style; + var transitionValue = _transitions2.default.easeOut('2s', 'opacity') + ', ' + _transitions2.default.easeOut('1s', 'transform'); + _autoPrefix2.default.set(style, 'transition', transitionValue); + _autoPrefix2.default.set(style, 'transform', 'scale(1)'); + } + }, { + key: 'initializeAnimation', + value: function initializeAnimation(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = this.props.opacity; + _autoPrefix2.default.set(style, 'transform', 'scale(0)'); + this.leaveTimer = setTimeout(callback, 0); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + aborted = _props.aborted, + color = _props.color, + opacity = _props.opacity, + style = _props.style, + touchGenerated = _props.touchGenerated, + other = (0, _objectWithoutProperties3.default)(_props, ['aborted', 'color', 'opacity', 'style', 'touchGenerated']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedStyles = (0, _simpleAssign2.default)({ + position: 'absolute', + top: 0, + left: 0, + height: '100%', + width: '100%', + borderRadius: '50%', + backgroundColor: color + }, style); + + return _react2.default.createElement('div', (0, _extends3.default)({}, other, { style: prepareStyles(mergedStyles) })); + } + }]); + return CircleRipple; +}(_react.Component); + +CircleRipple.defaultProps = { + opacity: 0.1, + aborted: false +}; +CircleRipple.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? CircleRipple.propTypes = { + aborted: _react.PropTypes.bool, + color: _react.PropTypes.string, + opacity: _react.PropTypes.number, + style: _react.PropTypes.object, + touchGenerated: _react.PropTypes.bool +} : void 0; +exports.default = CircleRipple; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 468 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +exports.__esModule = true; +exports["default"] = undefined; + +var _react = __webpack_require__(1); + +var _storeShape = __webpack_require__(245); + +var _storeShape2 = _interopRequireDefault(_storeShape); + +var _warning = __webpack_require__(246); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var didWarnAboutReceivingStore = false; +function warnAboutReceivingStore() { + if (didWarnAboutReceivingStore) { + return; + } + didWarnAboutReceivingStore = true; + + (0, _warning2["default"])('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.'); +} + +var Provider = function (_Component) { + _inherits(Provider, _Component); + + Provider.prototype.getChildContext = function getChildContext() { + return { store: this.store }; + }; + + function Provider(props, context) { + _classCallCheck(this, Provider); + + var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); + + _this.store = props.store; + return _this; + } + + Provider.prototype.render = function render() { + return _react.Children.only(this.props.children); + }; + + return Provider; +}(_react.Component); + +exports["default"] = Provider; + + +if (process.env.NODE_ENV !== 'production') { + Provider.prototype.componentWillReceiveProps = function (nextProps) { + var store = this.store; + var nextStore = nextProps.store; + + + if (store !== nextStore) { + warnAboutReceivingStore(); + } + }; +} + +Provider.propTypes = { + store: _storeShape2["default"].isRequired, + children: _react.PropTypes.element.isRequired +}; +Provider.childContextTypes = { + store: _storeShape2["default"].isRequired +}; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 469 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +exports["default"] = connect; + +var _react = __webpack_require__(1); + +var _storeShape = __webpack_require__(245); + +var _storeShape2 = _interopRequireDefault(_storeShape); + +var _shallowEqual = __webpack_require__(470); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _wrapActionCreators = __webpack_require__(471); + +var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators); + +var _warning = __webpack_require__(246); + +var _warning2 = _interopRequireDefault(_warning); + +var _isPlainObject = __webpack_require__(480); + +var _isPlainObject2 = _interopRequireDefault(_isPlainObject); + +var _hoistNonReactStatics = __webpack_require__(255); + +var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); + +var _invariant = __webpack_require__(82); + +var _invariant2 = _interopRequireDefault(_invariant); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var defaultMapStateToProps = function defaultMapStateToProps(state) { + return {}; +}; // eslint-disable-line no-unused-vars +var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) { + return { dispatch: dispatch }; +}; +var defaultMergeProps = function defaultMergeProps(stateProps, dispatchProps, parentProps) { + return _extends({}, parentProps, stateProps, dispatchProps); +}; + +function getDisplayName(WrappedComponent) { + return WrappedComponent.displayName || WrappedComponent.name || 'Component'; +} + +var errorObject = { value: null }; +function tryCatch(fn, ctx) { + try { + return fn.apply(ctx); + } catch (e) { + errorObject.value = e; + return errorObject; + } +} + +// Helps track hot reloading. +var nextVersion = 0; + +function connect(mapStateToProps, mapDispatchToProps, mergeProps) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + var shouldSubscribe = Boolean(mapStateToProps); + var mapState = mapStateToProps || defaultMapStateToProps; + + var mapDispatch = void 0; + if (typeof mapDispatchToProps === 'function') { + mapDispatch = mapDispatchToProps; + } else if (!mapDispatchToProps) { + mapDispatch = defaultMapDispatchToProps; + } else { + mapDispatch = (0, _wrapActionCreators2["default"])(mapDispatchToProps); + } + + var finalMergeProps = mergeProps || defaultMergeProps; + var _options$pure = options.pure, + pure = _options$pure === undefined ? true : _options$pure, + _options$withRef = options.withRef, + withRef = _options$withRef === undefined ? false : _options$withRef; + + var checkMergedEquals = pure && finalMergeProps !== defaultMergeProps; + + // Helps track hot reloading. + var version = nextVersion++; + + return function wrapWithConnect(WrappedComponent) { + var connectDisplayName = 'Connect(' + getDisplayName(WrappedComponent) + ')'; + + function checkStateShape(props, methodName) { + if (!(0, _isPlainObject2["default"])(props)) { + (0, _warning2["default"])(methodName + '() in ' + connectDisplayName + ' must return a plain object. ' + ('Instead received ' + props + '.')); + } + } + + function computeMergedProps(stateProps, dispatchProps, parentProps) { + var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps); + if (process.env.NODE_ENV !== 'production') { + checkStateShape(mergedProps, 'mergeProps'); + } + return mergedProps; + } + + var Connect = function (_Component) { + _inherits(Connect, _Component); + + Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() { + return !pure || this.haveOwnPropsChanged || this.hasStoreStateChanged; + }; + + function Connect(props, context) { + _classCallCheck(this, Connect); + + var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); + + _this.version = version; + _this.store = props.store || context.store; + + (0, _invariant2["default"])(_this.store, 'Could not find "store" in either the context or ' + ('props of "' + connectDisplayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + connectDisplayName + '".')); + + var storeState = _this.store.getState(); + _this.state = { storeState: storeState }; + _this.clearCache(); + return _this; + } + + Connect.prototype.computeStateProps = function computeStateProps(store, props) { + if (!this.finalMapStateToProps) { + return this.configureFinalMapState(store, props); + } + + var state = store.getState(); + var stateProps = this.doStatePropsDependOnOwnProps ? this.finalMapStateToProps(state, props) : this.finalMapStateToProps(state); + + if (process.env.NODE_ENV !== 'production') { + checkStateShape(stateProps, 'mapStateToProps'); + } + return stateProps; + }; + + Connect.prototype.configureFinalMapState = function configureFinalMapState(store, props) { + var mappedState = mapState(store.getState(), props); + var isFactory = typeof mappedState === 'function'; + + this.finalMapStateToProps = isFactory ? mappedState : mapState; + this.doStatePropsDependOnOwnProps = this.finalMapStateToProps.length !== 1; + + if (isFactory) { + return this.computeStateProps(store, props); + } + + if (process.env.NODE_ENV !== 'production') { + checkStateShape(mappedState, 'mapStateToProps'); + } + return mappedState; + }; + + Connect.prototype.computeDispatchProps = function computeDispatchProps(store, props) { + if (!this.finalMapDispatchToProps) { + return this.configureFinalMapDispatch(store, props); + } + + var dispatch = store.dispatch; + + var dispatchProps = this.doDispatchPropsDependOnOwnProps ? this.finalMapDispatchToProps(dispatch, props) : this.finalMapDispatchToProps(dispatch); + + if (process.env.NODE_ENV !== 'production') { + checkStateShape(dispatchProps, 'mapDispatchToProps'); + } + return dispatchProps; + }; + + Connect.prototype.configureFinalMapDispatch = function configureFinalMapDispatch(store, props) { + var mappedDispatch = mapDispatch(store.dispatch, props); + var isFactory = typeof mappedDispatch === 'function'; + + this.finalMapDispatchToProps = isFactory ? mappedDispatch : mapDispatch; + this.doDispatchPropsDependOnOwnProps = this.finalMapDispatchToProps.length !== 1; + + if (isFactory) { + return this.computeDispatchProps(store, props); + } + + if (process.env.NODE_ENV !== 'production') { + checkStateShape(mappedDispatch, 'mapDispatchToProps'); + } + return mappedDispatch; + }; + + Connect.prototype.updateStatePropsIfNeeded = function updateStatePropsIfNeeded() { + var nextStateProps = this.computeStateProps(this.store, this.props); + if (this.stateProps && (0, _shallowEqual2["default"])(nextStateProps, this.stateProps)) { + return false; + } + + this.stateProps = nextStateProps; + return true; + }; + + Connect.prototype.updateDispatchPropsIfNeeded = function updateDispatchPropsIfNeeded() { + var nextDispatchProps = this.computeDispatchProps(this.store, this.props); + if (this.dispatchProps && (0, _shallowEqual2["default"])(nextDispatchProps, this.dispatchProps)) { + return false; + } + + this.dispatchProps = nextDispatchProps; + return true; + }; + + Connect.prototype.updateMergedPropsIfNeeded = function updateMergedPropsIfNeeded() { + var nextMergedProps = computeMergedProps(this.stateProps, this.dispatchProps, this.props); + if (this.mergedProps && checkMergedEquals && (0, _shallowEqual2["default"])(nextMergedProps, this.mergedProps)) { + return false; + } + + this.mergedProps = nextMergedProps; + return true; + }; + + Connect.prototype.isSubscribed = function isSubscribed() { + return typeof this.unsubscribe === 'function'; + }; + + Connect.prototype.trySubscribe = function trySubscribe() { + if (shouldSubscribe && !this.unsubscribe) { + this.unsubscribe = this.store.subscribe(this.handleChange.bind(this)); + this.handleChange(); + } + }; + + Connect.prototype.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + } + }; + + Connect.prototype.componentDidMount = function componentDidMount() { + this.trySubscribe(); + }; + + Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + if (!pure || !(0, _shallowEqual2["default"])(nextProps, this.props)) { + this.haveOwnPropsChanged = true; + } + }; + + Connect.prototype.componentWillUnmount = function componentWillUnmount() { + this.tryUnsubscribe(); + this.clearCache(); + }; + + Connect.prototype.clearCache = function clearCache() { + this.dispatchProps = null; + this.stateProps = null; + this.mergedProps = null; + this.haveOwnPropsChanged = true; + this.hasStoreStateChanged = true; + this.haveStatePropsBeenPrecalculated = false; + this.statePropsPrecalculationError = null; + this.renderedElement = null; + this.finalMapDispatchToProps = null; + this.finalMapStateToProps = null; + }; + + Connect.prototype.handleChange = function handleChange() { + if (!this.unsubscribe) { + return; + } + + var storeState = this.store.getState(); + var prevStoreState = this.state.storeState; + if (pure && prevStoreState === storeState) { + return; + } + + if (pure && !this.doStatePropsDependOnOwnProps) { + var haveStatePropsChanged = tryCatch(this.updateStatePropsIfNeeded, this); + if (!haveStatePropsChanged) { + return; + } + if (haveStatePropsChanged === errorObject) { + this.statePropsPrecalculationError = errorObject.value; + } + this.haveStatePropsBeenPrecalculated = true; + } + + this.hasStoreStateChanged = true; + this.setState({ storeState: storeState }); + }; + + Connect.prototype.getWrappedInstance = function getWrappedInstance() { + (0, _invariant2["default"])(withRef, 'To access the wrapped instance, you need to specify ' + '{ withRef: true } as the fourth argument of the connect() call.'); + + return this.refs.wrappedInstance; + }; + + Connect.prototype.render = function render() { + var haveOwnPropsChanged = this.haveOwnPropsChanged, + hasStoreStateChanged = this.hasStoreStateChanged, + haveStatePropsBeenPrecalculated = this.haveStatePropsBeenPrecalculated, + statePropsPrecalculationError = this.statePropsPrecalculationError, + renderedElement = this.renderedElement; + + + this.haveOwnPropsChanged = false; + this.hasStoreStateChanged = false; + this.haveStatePropsBeenPrecalculated = false; + this.statePropsPrecalculationError = null; + + if (statePropsPrecalculationError) { + throw statePropsPrecalculationError; + } + + var shouldUpdateStateProps = true; + var shouldUpdateDispatchProps = true; + if (pure && renderedElement) { + shouldUpdateStateProps = hasStoreStateChanged || haveOwnPropsChanged && this.doStatePropsDependOnOwnProps; + shouldUpdateDispatchProps = haveOwnPropsChanged && this.doDispatchPropsDependOnOwnProps; + } + + var haveStatePropsChanged = false; + var haveDispatchPropsChanged = false; + if (haveStatePropsBeenPrecalculated) { + haveStatePropsChanged = true; + } else if (shouldUpdateStateProps) { + haveStatePropsChanged = this.updateStatePropsIfNeeded(); + } + if (shouldUpdateDispatchProps) { + haveDispatchPropsChanged = this.updateDispatchPropsIfNeeded(); + } + + var haveMergedPropsChanged = true; + if (haveStatePropsChanged || haveDispatchPropsChanged || haveOwnPropsChanged) { + haveMergedPropsChanged = this.updateMergedPropsIfNeeded(); + } else { + haveMergedPropsChanged = false; + } + + if (!haveMergedPropsChanged && renderedElement) { + return renderedElement; + } + + if (withRef) { + this.renderedElement = (0, _react.createElement)(WrappedComponent, _extends({}, this.mergedProps, { + ref: 'wrappedInstance' + })); + } else { + this.renderedElement = (0, _react.createElement)(WrappedComponent, this.mergedProps); + } + + return this.renderedElement; + }; + + return Connect; + }(_react.Component); + + Connect.displayName = connectDisplayName; + Connect.WrappedComponent = WrappedComponent; + Connect.contextTypes = { + store: _storeShape2["default"] + }; + Connect.propTypes = { + store: _storeShape2["default"] + }; + + if (process.env.NODE_ENV !== 'production') { + Connect.prototype.componentWillUpdate = function componentWillUpdate() { + if (this.version === version) { + return; + } + + // We are hot reloading! + this.version = version; + this.trySubscribe(); + this.clearCache(); + }; + } + + return (0, _hoistNonReactStatics2["default"])(Connect, WrappedComponent); + }; +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 470 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = shallowEqual; +function shallowEqual(objA, objB) { + if (objA === objB) { + return true; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + var hasOwn = Object.prototype.hasOwnProperty; + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { + return false; + } + } + + return true; +} + +/***/ }), +/* 471 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = wrapActionCreators; + +var _redux = __webpack_require__(157); + +function wrapActionCreators(actionCreators) { + return function (dispatch) { + return (0, _redux.bindActionCreators)(actionCreators, dispatch); + }; +} + +/***/ }), +/* 472 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(106); + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (getRawTag); + + +/***/ }), +/* 473 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (objectToString); + + +/***/ }), +/* 474 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(475); + + +/***/ }), +/* 475 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global, module) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _ponyfill = __webpack_require__(476); + +var _ponyfill2 = _interopRequireDefault(_ponyfill); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var root; /* global window */ + + +if (typeof self !== 'undefined') { + root = self; +} else if (typeof window !== 'undefined') { + root = window; +} else if (typeof global !== 'undefined') { + root = global; +} else if (true) { + root = module; +} else { + root = Function('return this')(); +} + +var result = (0, _ponyfill2['default'])(root); +exports['default'] = result; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46), __webpack_require__(251)(module))) + +/***/ }), +/* 476 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports['default'] = symbolObservablePonyfill; +function symbolObservablePonyfill(root) { + var result; + var _Symbol = root.Symbol; + + if (typeof _Symbol === 'function') { + if (_Symbol.observable) { + result = _Symbol.observable; + } else { + result = _Symbol('observable'); + _Symbol.observable = result; + } + } else { + result = '@@observable'; + } + + return result; +}; + +/***/ }), +/* 477 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = combineReducers; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(247); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(158); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(252); + + + + +function getUndefinedStateErrorMessage(key, action) { + var actionType = action && action.type; + var actionName = actionType && '"' + actionType.toString() + '"' || 'an action'; + + return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.'; +} + +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; + } + + if (!__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */](inputState)) { + return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"'); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + + if (unexpectedKeys.length > 0) { + return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.'); + } +} + +function assertReducerSanity(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT }); + + if (typeof initialState === 'undefined') { + throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.'); + } + + var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); + if (typeof reducer(undefined, { type: type }) === 'undefined') { + throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.'); + } + }); +} + +/** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ +function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (process.env.NODE_ENV !== 'production') { + if (typeof reducers[key] === 'undefined') { + __WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */]('No reducer provided for key "' + key + '"'); + } + } + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + var finalReducerKeys = Object.keys(finalReducers); + + if (process.env.NODE_ENV !== 'production') { + var unexpectedKeyCache = {}; + } + + var sanityError; + try { + assertReducerSanity(finalReducers); + } catch (e) { + sanityError = e; + } + + return function combination() { + var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var action = arguments[1]; + + if (sanityError) { + throw sanityError; + } + + if (process.env.NODE_ENV !== 'production') { + var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); + if (warningMessage) { + __WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */](warningMessage); + } + } + + var hasChanged = false; + var nextState = {}; + for (var i = 0; i < finalReducerKeys.length; i++) { + var key = finalReducerKeys[i]; + var reducer = finalReducers[key]; + var previousStateForKey = state[key]; + var nextStateForKey = reducer(previousStateForKey, action); + if (typeof nextStateForKey === 'undefined') { + var errorMessage = getUndefinedStateErrorMessage(key, action); + throw new Error(errorMessage); + } + nextState[key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + return hasChanged ? nextState : state; + }; +} +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(0))) + +/***/ }), +/* 478 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = bindActionCreators; +function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(undefined, arguments)); + }; +} + +/** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass a single function as the first argument, + * and get a function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ +function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?'); + } + + var keys = Object.keys(actionCreators); + var boundActionCreators = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var actionCreator = actionCreators[key]; + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + return boundActionCreators; +} + +/***/ }), +/* 479 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(253); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + +/** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ +function applyMiddleware() { + for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function (reducer, preloadedState, enhancer) { + var store = createStore(reducer, preloadedState, enhancer); + var _dispatch = store.dispatch; + var chain = []; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch(action) { + return _dispatch(action); + } + }; + chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__["a" /* default */].apply(undefined, chain)(store.dispatch); + + return _extends({}, store, { + dispatch: _dispatch + }); + }; + }; +} + +/***/ }), +/* 480 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(481), + getPrototype = __webpack_require__(486), + isObjectLike = __webpack_require__(488); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +module.exports = isPlainObject; + + +/***/ }), +/* 481 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(254), + getRawTag = __webpack_require__(484), + objectToString = __webpack_require__(485); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; + + +/***/ }), +/* 482 */ +/***/ (function(module, exports, __webpack_require__) { + +var freeGlobal = __webpack_require__(483); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + + +/***/ }), +/* 483 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46))) + +/***/ }), +/* 484 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(254); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; + + +/***/ }), +/* 485 */ +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; + + +/***/ }), +/* 486 */ +/***/ (function(module, exports, __webpack_require__) { + +var overArg = __webpack_require__(487); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; + + +/***/ }), +/* 487 */ +/***/ (function(module, exports) { + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; + + +/***/ }), +/* 488 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; + + +/***/ }), +/* 489 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var color = props.color, + hoverColor = props.hoverColor; + var baseTheme = context.muiTheme.baseTheme; + + var offColor = color || baseTheme.palette.textColor; + var onColor = hoverColor || offColor; + + return { + root: { + color: state.hovered ? onColor : offColor, + position: 'relative', + fontSize: baseTheme.spacing.iconSize, + display: 'inline-block', + userSelect: 'none', + transition: _transitions2.default.easeOut() + } + }; +} + +var FontIcon = function (_Component) { + (0, _inherits3.default)(FontIcon, _Component); + + function FontIcon() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, FontIcon); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FontIcon.__proto__ || (0, _getPrototypeOf2.default)(FontIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.handleMouseLeave = function (event) { + // hover is needed only when a hoverColor is defined + if (_this.props.hoverColor !== undefined) { + _this.setState({ hovered: false }); + } + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseEnter = function (event) { + // hover is needed only when a hoverColor is defined + if (_this.props.hoverColor !== undefined) { + _this.setState({ hovered: true }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(FontIcon, [{ + key: 'render', + value: function render() { + var _props = this.props, + hoverColor = _props.hoverColor, + onMouseLeave = _props.onMouseLeave, + onMouseEnter = _props.onMouseEnter, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['hoverColor', 'onMouseLeave', 'onMouseEnter', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement('span', (0, _extends3.default)({}, other, { + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + })); + } + }]); + return FontIcon; +}(_react.Component); + +FontIcon.muiName = 'FontIcon'; +FontIcon.defaultProps = { + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {} +}; +FontIcon.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? FontIcon.propTypes = { + /** + * This is the font color of the font icon. If not specified, + * this component will default to muiTheme.palette.textColor. + */ + color: _react.PropTypes.string, + /** + * This is the icon color when the mouse hovers over the icon. + */ + hoverColor: _react.PropTypes.string, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = FontIcon; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 490 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _propTypes = __webpack_require__(43); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _EnhancedButton = __webpack_require__(54); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _FontIcon = __webpack_require__(256); + +var _FontIcon2 = _interopRequireDefault(_FontIcon); + +var _Tooltip = __webpack_require__(491); + +var _Tooltip2 = _interopRequireDefault(_Tooltip); + +var _childUtils = __webpack_require__(97); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var baseTheme = context.muiTheme.baseTheme; + + + return { + root: { + boxSizing: 'border-box', + overflow: 'visible', + transition: _transitions2.default.easeOut(), + padding: baseTheme.spacing.iconSize / 2, + width: baseTheme.spacing.iconSize * 2, + height: baseTheme.spacing.iconSize * 2, + fontSize: 0 + }, + tooltip: { + boxSizing: 'border-box' + }, + disabled: { + color: baseTheme.palette.disabledColor, + fill: baseTheme.palette.disabledColor, + cursor: 'not-allowed' + } + }; +} + +var IconButton = function (_Component) { + (0, _inherits3.default)(IconButton, _Component); + + function IconButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, IconButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = IconButton.__proto__ || (0, _getPrototypeOf2.default)(IconButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + // Not to be confonded with the touch property. + // This state is to determined if it's a mobile device. + touch: false, + tooltipShown: false + }, _this.handleBlur = function (event) { + _this.hideTooltip(); + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleFocus = function (event) { + _this.showTooltip(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleMouseLeave = function (event) { + if (!_this.button.isKeyboardFocused()) { + _this.hideTooltip(); + } + _this.setState({ hovered: false }); + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseOut = function (event) { + if (_this.props.disabled) _this.hideTooltip(); + if (_this.props.onMouseOut) _this.props.onMouseOut(event); + }, _this.handleMouseEnter = function (event) { + _this.showTooltip(); + + // Cancel hover styles for touch devices + if (!_this.state.touch) { + _this.setState({ hovered: true }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); + + if (_this.props.onTouchStart) { + _this.props.onTouchStart(event); + } + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + var _this$props = _this.props, + disabled = _this$props.disabled, + onFocus = _this$props.onFocus, + onBlur = _this$props.onBlur, + onKeyboardFocus = _this$props.onKeyboardFocus; + + if (isKeyboardFocused && !disabled) { + _this.showTooltip(); + if (onFocus) { + onFocus(event); + } + } else { + _this.hideTooltip(); + if (onBlur) { + onBlur(event); + } + } + + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + if (onKeyboardFocus) { + onKeyboardFocus(event, isKeyboardFocused); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(IconButton, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.disabled) { + this.setState({ hovered: false }); + } + } + }, { + key: 'setKeyboardFocus', + value: function setKeyboardFocus() { + this.button.setKeyboardFocus(); + } + }, { + key: 'showTooltip', + value: function showTooltip() { + if (this.props.tooltip) { + this.setState({ tooltipShown: true }); + } + } + }, { + key: 'hideTooltip', + value: function hideTooltip() { + if (this.props.tooltip) this.setState({ tooltipShown: false }); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + disabled = _props.disabled, + hoveredStyle = _props.hoveredStyle, + disableTouchRipple = _props.disableTouchRipple, + children = _props.children, + iconClassName = _props.iconClassName, + style = _props.style, + tooltip = _props.tooltip, + tooltipPositionProp = _props.tooltipPosition, + tooltipStyles = _props.tooltipStyles, + touch = _props.touch, + iconStyle = _props.iconStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['disabled', 'hoveredStyle', 'disableTouchRipple', 'children', 'iconClassName', 'style', 'tooltip', 'tooltipPosition', 'tooltipStyles', 'touch', 'iconStyle']); + + var fonticon = void 0; + + var styles = getStyles(this.props, this.context); + var tooltipPosition = tooltipPositionProp.split('-'); + + var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled; + + var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style, hovered ? hoveredStyle : {}); + + var tooltipElement = tooltip ? _react2.default.createElement(_Tooltip2.default, { + label: tooltip, + show: this.state.tooltipShown, + touch: touch, + style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyles), + verticalPosition: tooltipPosition[0], + horizontalPosition: tooltipPosition[1] + }) : null; + + if (iconClassName) { + var iconHoverColor = iconStyle.iconHoverColor, + iconStyleFontIcon = (0, _objectWithoutProperties3.default)(iconStyle, ['iconHoverColor']); + + + fonticon = _react2.default.createElement( + _FontIcon2.default, + { + className: iconClassName, + hoverColor: disabled ? null : iconHoverColor, + style: (0, _simpleAssign2.default)({}, disabled && styles.disabled, iconStyleFontIcon), + color: this.context.muiTheme.baseTheme.palette.textColor + }, + children + ); + } + + var childrenStyle = disabled ? (0, _simpleAssign2.default)({}, iconStyle, styles.disabled) : iconStyle; + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({ + ref: function ref(_ref2) { + return _this2.button = _ref2; + } + }, other, { + centerRipple: true, + disabled: disabled, + onTouchStart: this.handleTouchStart, + style: mergedRootStyles, + disableTouchRipple: disableTouchRipple, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onMouseOut: this.handleMouseOut, + onKeyboardFocus: this.handleKeyboardFocus + }), + tooltipElement, + fonticon, + (0, _childUtils.extendChildren)(children, { + style: childrenStyle + }) + ); + } + }]); + return IconButton; +}(_react.Component); + +IconButton.muiName = 'IconButton'; +IconButton.defaultProps = { + disabled: false, + disableTouchRipple: false, + iconStyle: {}, + tooltipPosition: 'bottom-center', + touch: false +}; +IconButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? IconButton.propTypes = { + /** + * Can be used to pass a `FontIcon` element as the icon for the button. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the element's ripple effect will be disabled. + */ + disableTouchRipple: _react.PropTypes.bool, + /** + * If true, the element will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element when the component is hovered. + */ + hoveredStyle: _react.PropTypes.object, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * The CSS class name of the icon. Used for setting the icon with a stylesheet. + */ + iconClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the icon element. + * Note: you can specify iconHoverColor as a String inside this object. + */ + iconStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Callback function fired when the element is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the element. + * @param {boolean} keyboardFocused Indicates whether the element is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onMouseOut: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The text to supply to the element's tooltip. + */ + tooltip: _react.PropTypes.node, + /** + * The vertical and horizontal positions, respectively, of the element's tooltip. + * Possible values are: "bottom-center", "top-center", "bottom-right", "top-right", + * "bottom-left", and "top-left". + */ + tooltipPosition: _propTypes2.default.cornersAndCenter, + /** + * Override the inline-styles of the tooltip element. + */ + tooltipStyles: _react.PropTypes.object, + /** + * If true, increase the tooltip element's size. Useful for increasing tooltip + * readability on mobile devices. + */ + touch: _react.PropTypes.bool +} : void 0; +exports.default = IconButton; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 491 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var verticalPosition = props.verticalPosition; + var horizontalPosition = props.horizontalPosition; + var touchMarginOffset = props.touch ? 10 : 0; + var touchOffsetTop = props.touch ? -20 : -10; + var offset = verticalPosition === 'bottom' ? 14 + touchMarginOffset : -14 - touchMarginOffset; + + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + zIndex = _context$muiTheme.zIndex, + tooltip = _context$muiTheme.tooltip; + + + var styles = { + root: { + position: 'absolute', + fontFamily: baseTheme.fontFamily, + fontSize: '10px', + lineHeight: '22px', + padding: '0 8px', + zIndex: zIndex.tooltip, + color: tooltip.color, + overflow: 'hidden', + top: -10000, + borderRadius: 2, + userSelect: 'none', + opacity: 0, + right: horizontalPosition === 'left' ? 12 : null, + left: horizontalPosition === 'center' ? (state.offsetWidth - 48) / 2 * -1 : null, + transition: _transitions2.default.easeOut('0ms', 'top', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') + }, + label: { + position: 'relative', + whiteSpace: 'nowrap' + }, + ripple: { + position: 'absolute', + left: horizontalPosition === 'center' ? '50%' : horizontalPosition === 'left' ? '100%' : '0%', + top: verticalPosition === 'bottom' ? 0 : '100%', + transform: 'translate(-50%, -50%)', + borderRadius: '50%', + backgroundColor: 'transparent', + transition: _transitions2.default.easeOut('0ms', 'width', '450ms') + ', ' + _transitions2.default.easeOut('0ms', 'height', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') + }, + rootWhenShown: { + top: verticalPosition === 'top' ? touchOffsetTop : 36, + opacity: 0.9, + transform: 'translate(0px, ' + offset + 'px)', + transition: _transitions2.default.easeOut('0ms', 'top', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms') + }, + rootWhenTouched: { + fontSize: '14px', + lineHeight: '32px', + padding: '0 16px' + }, + rippleWhenShown: { + backgroundColor: tooltip.rippleBackgroundColor, + transition: _transitions2.default.easeOut('450ms', 'width', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'height', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms') + } + }; + + return styles; +} + +var Tooltip = function (_Component) { + (0, _inherits3.default)(Tooltip, _Component); + + function Tooltip() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Tooltip); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tooltip.__proto__ || (0, _getPrototypeOf2.default)(Tooltip)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + offsetWidth: null + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Tooltip, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setRippleSize(); + this.setTooltipPosition(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps() { + this.setTooltipPosition(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.setRippleSize(); + } + }, { + key: 'setRippleSize', + value: function setRippleSize() { + var ripple = this.refs.ripple; + var tooltip = this.refs.tooltip; + var tooltipWidth = parseInt(tooltip.offsetWidth, 10) / (this.props.horizontalPosition === 'center' ? 2 : 1); + var tooltipHeight = parseInt(tooltip.offsetHeight, 10); + + var rippleDiameter = Math.ceil(Math.sqrt(Math.pow(tooltipHeight, 2) + Math.pow(tooltipWidth, 2)) * 2); + if (this.props.show) { + ripple.style.height = rippleDiameter + 'px'; + ripple.style.width = rippleDiameter + 'px'; + } else { + ripple.style.width = '0px'; + ripple.style.height = '0px'; + } + } + }, { + key: 'setTooltipPosition', + value: function setTooltipPosition() { + this.setState({ offsetWidth: this.refs.tooltip.offsetWidth }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + horizontalPosition = _props.horizontalPosition, + label = _props.label, + show = _props.show, + touch = _props.touch, + verticalPosition = _props.verticalPosition, + other = (0, _objectWithoutProperties3.default)(_props, ['horizontalPosition', 'label', 'show', 'touch', 'verticalPosition']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { + ref: 'tooltip', + style: prepareStyles((0, _simpleAssign2.default)(styles.root, this.props.show && styles.rootWhenShown, this.props.touch && styles.rootWhenTouched, this.props.style)) + }), + _react2.default.createElement('div', { + ref: 'ripple', + style: prepareStyles((0, _simpleAssign2.default)(styles.ripple, this.props.show && styles.rippleWhenShown)) + }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + label + ) + ); + } + }]); + return Tooltip; +}(_react.Component); + +Tooltip.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Tooltip.propTypes = { + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + horizontalPosition: _react.PropTypes.oneOf(['left', 'right', 'center']), + label: _react.PropTypes.node.isRequired, + show: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + touch: _react.PropTypes.bool, + verticalPosition: _react.PropTypes.oneOf(['top', 'bottom']) +} : void 0; +exports.default = Tooltip; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 492 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reduxForm = __webpack_require__(159); + +var _reactRedux = __webpack_require__(36); + +var _MenuItem = __webpack_require__(116); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +var _RaisedButton = __webpack_require__(180); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _reduxFormMaterialUi = __webpack_require__(181); + +var _Styles = __webpack_require__(118); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _Utils = __webpack_require__(300); + +var Utils = _interopRequireWildcard(_Utils); + +var _FormValidators = __webpack_require__(187); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Menus = __webpack_require__(84); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStatesForCountry(country) { + switch (country) { + case 'USA': + return Utils.usaRegions; + case 'JAPAN': + return Utils.japanRegions; + case 'CANADA': + return Utils.canadaRegions; + default: + return []; + } +} + +var Billing = function Billing(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting, + country = props.country; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'biling-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_name', + validate: Validators.fullName, + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Firstname and Lastname', + hintText: 'Firstname and Lastname', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_email', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Email', + hintText: 'Email', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.email] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_tel', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Phone number', + hintText: 'Phone number', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'bo', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Address', + hintText: 'Address', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_city', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'City', + hintText: 'City', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'order_billing_country', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Country', + hintText: 'Country', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.countries.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); + }) + ) + ), + ['JAPAN', 'USA', 'CANADA'].indexOf(country) !== -1 && _react2.default.createElement( + _reduxForm.Field, + { + name: 'order_billing_state', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'State', + hintText: 'State', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + getStatesForCountry(country).map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text }); + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'order_billing_zip', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Zip', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_type', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Credit card type', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + _react2.default.createElement(_MenuItem2.default, { value: 'visa', primaryText: 'Visa' }), + _react2.default.createElement(_MenuItem2.default, { value: 'american_express', primaryText: 'American Express' }), + _react2.default.createElement(_MenuItem2.default, { value: 'master', primaryText: 'Mastercard' }), + _react2.default.createElement(_MenuItem2.default, { value: 'solo', primaryText: 'Solo' }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'cnb', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Credit Card Number', + hintText: 'Credit Card Number', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_month', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Expiry month', + hintText: 'Expiry month', + validate: [Validators.required], + style: _Styles2.default.fields.text + }, + Array.apply(null, new Array(12)).map(function (x, i) { + var month = ++i < 10 ? '0' + i : i; + return _react2.default.createElement(_MenuItem2.default, { key: month, value: month, primaryText: month }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'credit_card_year', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Expiry year', + hintText: 'Expiry year', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Array.apply(null, new Array(5)).map(function (x, i) { + var year = new Date().getFullYear() + i; + return _react2.default.createElement(_MenuItem2.default, { key: year, value: year, primaryText: year }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'vval', + component: _reduxFormMaterialUi.TextField, + hintText: 'CCV', + floatingLabelText: 'CCV', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; + +var BillingForm = (0, _reduxForm.reduxForm)({ + form: 'billing' +})(Billing); + +Billing.propTypes = { + shop: _react.PropTypes.string.isRequired +}; +var selector = (0, _reduxForm.formValueSelector)('billing'); + +function mapStateToProps(state, ownProps) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + initialValues: (settings[ownProps.shop] || {})[menus.MENU_BILLING] || {}, + country: selector(state, 'order_billing_country') + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps)(BillingForm); + +/***/ }), +/* 493 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reducer__ = __webpack_require__(494); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__reduxForm__ = __webpack_require__(520); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Field__ = __webpack_require__(606); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Fields__ = __webpack_require__(611); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__FieldArray__ = __webpack_require__(613); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__formValueSelector__ = __webpack_require__(616); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__values__ = __webpack_require__(617); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__selectors_getFormValues__ = __webpack_require__(618); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__selectors_getFormInitialValues__ = __webpack_require__(619); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__selectors_getFormSyncErrors__ = __webpack_require__(620); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__selectors_getFormAsyncErrors__ = __webpack_require__(621); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__selectors_getFormSubmitErrors__ = __webpack_require__(622); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__selectors_isDirty__ = __webpack_require__(623); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__selectors_isInvalid__ = __webpack_require__(624); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__selectors_isPristine__ = __webpack_require__(282); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__selectors_isValid__ = __webpack_require__(177); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__selectors_isSubmitting__ = __webpack_require__(625); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__selectors_hasSubmitSucceeded__ = __webpack_require__(626); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__selectors_hasSubmitFailed__ = __webpack_require__(627); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__Form__ = __webpack_require__(628); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__FormSection__ = __webpack_require__(629); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__SubmissionError__ = __webpack_require__(275); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__propTypes__ = __webpack_require__(630); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__actions__ = __webpack_require__(274); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__actionTypes__ = __webpack_require__(160); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + + + + + + + + + + + + + + + + + + + + + + + +var createAll = function createAll(structure) { + return _extends({ + // separate out field actions + actionTypes: __WEBPACK_IMPORTED_MODULE_24__actionTypes__ + }, __WEBPACK_IMPORTED_MODULE_23__actions__, { + Field: __WEBPACK_IMPORTED_MODULE_2__Field__["a" /* default */](structure), + Fields: __WEBPACK_IMPORTED_MODULE_3__Fields__["a" /* default */](structure), + FieldArray: __WEBPACK_IMPORTED_MODULE_4__FieldArray__["a" /* default */](structure), + Form: __WEBPACK_IMPORTED_MODULE_19__Form__["a" /* default */], + FormSection: __WEBPACK_IMPORTED_MODULE_20__FormSection__["a" /* default */], + formValueSelector: __WEBPACK_IMPORTED_MODULE_5__formValueSelector__["a" /* default */](structure), + getFormValues: __WEBPACK_IMPORTED_MODULE_7__selectors_getFormValues__["a" /* default */](structure), + getFormInitialValues: __WEBPACK_IMPORTED_MODULE_8__selectors_getFormInitialValues__["a" /* default */](structure), + getFormSyncErrors: __WEBPACK_IMPORTED_MODULE_9__selectors_getFormSyncErrors__["a" /* default */](structure), + getFormAsyncErrors: __WEBPACK_IMPORTED_MODULE_10__selectors_getFormAsyncErrors__["a" /* default */](structure), + getFormSubmitErrors: __WEBPACK_IMPORTED_MODULE_11__selectors_getFormSubmitErrors__["a" /* default */](structure), + isDirty: __WEBPACK_IMPORTED_MODULE_12__selectors_isDirty__["a" /* default */](structure), + isInvalid: __WEBPACK_IMPORTED_MODULE_13__selectors_isInvalid__["a" /* default */](structure), + isPristine: __WEBPACK_IMPORTED_MODULE_14__selectors_isPristine__["a" /* default */](structure), + isValid: __WEBPACK_IMPORTED_MODULE_15__selectors_isValid__["a" /* default */](structure), + isSubmitting: __WEBPACK_IMPORTED_MODULE_16__selectors_isSubmitting__["a" /* default */](structure), + hasSubmitSucceeded: __WEBPACK_IMPORTED_MODULE_17__selectors_hasSubmitSucceeded__["a" /* default */](structure), + hasSubmitFailed: __WEBPACK_IMPORTED_MODULE_18__selectors_hasSubmitFailed__["a" /* default */](structure), + propTypes: __WEBPACK_IMPORTED_MODULE_22__propTypes__["a" /* default */], + reduxForm: __WEBPACK_IMPORTED_MODULE_1__reduxForm__["a" /* default */](structure), + reducer: __WEBPACK_IMPORTED_MODULE_0__reducer__["a" /* default */](structure), + SubmissionError: __WEBPACK_IMPORTED_MODULE_21__SubmissionError__["a" /* default */], + values: __WEBPACK_IMPORTED_MODULE_6__values__["a" /* default */](structure) + }); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createAll); + +/***/ }), +/* 494 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(160); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__ = __webpack_require__(495); +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + +var createReducer = function createReducer(structure) { + var _behaviors; + + var deepEqual = structure.deepEqual, + empty = structure.empty, + getIn = structure.getIn, + setIn = structure.setIn, + deleteIn = structure.deleteIn, + fromJS = structure.fromJS, + keys = structure.keys, + size = structure.size, + splice = structure.splice; + + var deleteInWithCleanUp = __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__["a" /* default */](structure); + var doSplice = function doSplice(state, key, field, index, removeNum, value, force) { + var existing = getIn(state, key + '.' + field); + return existing || force ? setIn(state, key + '.' + field, splice(existing, index, removeNum, value)) : state; + }; + var rootKeys = ['values', 'fields', 'submitErrors', 'asyncErrors']; + var arraySplice = function arraySplice(state, field, index, removeNum, value) { + var result = state; + var nonValuesValue = value != null ? empty : undefined; + result = doSplice(result, 'values', field, index, removeNum, value, true); + result = doSplice(result, 'fields', field, index, removeNum, nonValuesValue); + result = doSplice(result, 'submitErrors', field, index, removeNum, nonValuesValue); + result = doSplice(result, 'asyncErrors', field, index, removeNum, nonValuesValue); + return result; + }; + + var behaviors = (_behaviors = {}, _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], function (state, _ref) { + var _ref$meta = _ref.meta, + field = _ref$meta.field, + index = _ref$meta.index, + payload = _ref.payload; + + return arraySplice(state, field, index, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], function (state, _ref2) { + var _ref2$meta = _ref2.meta, + field = _ref2$meta.field, + from = _ref2$meta.from, + to = _ref2$meta.to; + + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + var result = state; + if (length) { + rootKeys.forEach(function (key) { + var path = key + '.' + field; + if (getIn(result, path)) { + var value = getIn(result, path + '[' + from + ']'); + result = setIn(result, path, splice(getIn(result, path), from, 1)); // remove + result = setIn(result, path, splice(getIn(result, path), to, 0, value)); // insert + } + }); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], function (state, _ref3) { + var field = _ref3.meta.field; + + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return length ? arraySplice(state, field, length - 1, 1) : state; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], function (state, _ref4) { + var field = _ref4.meta.field, + payload = _ref4.payload; + + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return arraySplice(state, field, length, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], function (state, _ref5) { + var _ref5$meta = _ref5.meta, + field = _ref5$meta.field, + index = _ref5$meta.index; + + return arraySplice(state, field, index, 1); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], function (state, _ref6) { + var field = _ref6.meta.field; + + var array = getIn(state, 'values.' + field); + var length = array ? size(array) : 0; + return length ? arraySplice(state, field, 0, length) : state; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], function (state, _ref7) { + var field = _ref7.meta.field; + + return arraySplice(state, field, 0, 1); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], function (state, _ref8) { + var _ref8$meta = _ref8.meta, + field = _ref8$meta.field, + index = _ref8$meta.index, + removeNum = _ref8$meta.removeNum, + payload = _ref8.payload; + + return arraySplice(state, field, index, removeNum, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], function (state, _ref9) { + var _ref9$meta = _ref9.meta, + field = _ref9$meta.field, + indexA = _ref9$meta.indexA, + indexB = _ref9$meta.indexB; + + var result = state; + rootKeys.forEach(function (key) { + var valueA = getIn(result, key + '.' + field + '[' + indexA + ']'); + var valueB = getIn(result, key + '.' + field + '[' + indexB + ']'); + if (valueA !== undefined || valueB !== undefined) { + result = setIn(result, key + '.' + field + '[' + indexA + ']', valueB); + result = setIn(result, key + '.' + field + '[' + indexB + ']', valueA); + } + }); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], function (state, _ref10) { + var field = _ref10.meta.field, + payload = _ref10.payload; + + return arraySplice(state, field, 0, 0, payload); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], function (state, _ref11) { + var field = _ref11.meta.field, + payload = _ref11.payload; + + var result = state; + result = deleteInWithCleanUp(result, 'asyncErrors.' + field); + result = deleteInWithCleanUp(result, 'submitErrors.' + field); + result = setIn(result, 'fields.' + field + '.autofilled', true); + result = setIn(result, 'values.' + field, payload); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], function (state, _ref12) { + var _ref12$meta = _ref12.meta, + field = _ref12$meta.field, + touch = _ref12$meta.touch, + payload = _ref12.payload; + + var result = state; + var initial = getIn(result, 'initial.' + field); + if (initial === undefined && payload === '') { + result = deleteInWithCleanUp(result, 'values.' + field); + } else if (payload !== undefined) { + result = setIn(result, 'values.' + field, payload); + } + if (field === getIn(result, 'active')) { + result = deleteIn(result, 'active'); + } + result = deleteIn(result, 'fields.' + field + '.active'); + if (touch) { + result = setIn(result, 'fields.' + field + '.touched', true); + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], function (state, _ref13) { + var _ref13$meta = _ref13.meta, + field = _ref13$meta.field, + touch = _ref13$meta.touch, + persistentSubmitErrors = _ref13$meta.persistentSubmitErrors, + payload = _ref13.payload; + + var result = state; + var initial = getIn(result, 'initial.' + field); + if (initial === undefined && payload === '') { + result = deleteInWithCleanUp(result, 'values.' + field); + } else if (payload !== undefined) { + result = setIn(result, 'values.' + field, payload); + } + result = deleteInWithCleanUp(result, 'asyncErrors.' + field); + if (!persistentSubmitErrors) { + result = deleteInWithCleanUp(result, 'submitErrors.' + field); + } + result = deleteInWithCleanUp(result, 'fields.' + field + '.autofilled'); + if (touch) { + result = setIn(result, 'fields.' + field + '.touched', true); + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], function (state) { + return deleteIn(state, 'triggerSubmit'); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], function (state, _ref14) { + var field = _ref14.meta.field; + + return deleteIn(state, 'asyncErrors.' + field); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], function (state, _ref15) { + var field = _ref15.meta.field; + + var result = state; + var previouslyActive = getIn(state, 'active'); + result = deleteIn(result, 'fields.' + previouslyActive + '.active'); + result = setIn(result, 'fields.' + field + '.visited', true); + result = setIn(result, 'fields.' + field + '.active', true); + result = setIn(result, 'active', field); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], function (state, _ref16) { + var payload = _ref16.payload, + _ref16$meta = _ref16.meta, + keepDirty = _ref16$meta.keepDirty, + keepSubmitSucceeded = _ref16$meta.keepSubmitSucceeded; + + var mapData = fromJS(payload); + var result = empty; // clean all field state + + // persist old warnings, they will get recalculated if the new form values are different from the old values + var warning = getIn(state, 'warning'); + if (warning) { + result = setIn(result, 'warning', warning); + } + var syncWarnings = getIn(state, 'syncWarnings'); + if (syncWarnings) { + result = setIn(result, 'syncWarnings', syncWarnings); + } + + // persist old errors, they will get recalculated if the new form values are different from the old values + var error = getIn(state, 'error'); + if (error) { + result = setIn(result, 'error', error); + } + var syncErrors = getIn(state, 'syncErrors'); + if (syncErrors) { + result = setIn(result, 'syncErrors', syncErrors); + } + + var registeredFields = getIn(state, 'registeredFields'); + if (registeredFields) { + result = setIn(result, 'registeredFields', registeredFields); + } + var newValues = mapData; + if (keepDirty && registeredFields) { + (function () { + // + // Keep the value of dirty fields while updating the value of + // pristine fields. This way, apps can reinitialize forms while + // avoiding stomping on user edits. + // + // Note 1: The initialize action replaces all initial values + // regardless of keepDirty. + // + // Note 2: When a field is dirty, keepDirty is enabled, and the field + // value is the same as the new initial value for the field, the + // initialize action causes the field to become pristine. That effect + // is what we want. + // + var previousValues = getIn(state, 'values'); + var previousInitialValues = getIn(state, 'initial'); + keys(registeredFields).forEach(function (name) { + var previousInitialValue = getIn(previousInitialValues, name); + var previousValue = getIn(previousValues, name); + if (!deepEqual(previousValue, previousInitialValue)) { + // This field was dirty. Restore the dirty value. + newValues = setIn(newValues, name, previousValue); + } + }); + })(); + } + if (keepSubmitSucceeded && getIn(state, 'submitSucceeded')) { + result = setIn(result, 'submitSucceeded', true); + } + result = setIn(result, 'values', newValues); + result = setIn(result, 'initial', mapData); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], function (state, _ref17) { + var _ref17$payload = _ref17.payload, + name = _ref17$payload.name, + type = _ref17$payload.type; + + var key = 'registeredFields[\'' + name + '\']'; + var field = getIn(state, key); + if (field) { + var count = getIn(field, 'count') + 1; + field = setIn(field, 'count', count); + } else { + field = fromJS({ name: name, type: type, count: 1 }); + } + return setIn(state, key, field); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], function (state) { + var result = empty; + var registeredFields = getIn(state, 'registeredFields'); + if (registeredFields) { + result = setIn(result, 'registeredFields', registeredFields); + } + var values = getIn(state, 'initial'); + if (values) { + result = setIn(result, 'values', values); + result = setIn(result, 'initial', values); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], function (state) { + return setIn(state, 'triggerSubmit', true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], function (state, _ref18) { + var field = _ref18.meta.field; + + return setIn(state, 'asyncValidating', field || true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], function (state) { + return setIn(state, 'submitting', true); + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], function (state, _ref19) { + var payload = _ref19.payload; + + var result = state; + result = deleteIn(result, 'asyncValidating'); + if (payload && Object.keys(payload).length) { + var _error = payload._error, + fieldErrors = _objectWithoutProperties(payload, ['_error']); + + if (_error) { + result = setIn(result, 'error', _error); + } + if (Object.keys(fieldErrors).length) { + result = setIn(result, 'asyncErrors', fromJS(fieldErrors)); + } else { + result = deleteIn(result, 'asyncErrors'); + } + } else { + result = deleteIn(result, 'error'); + result = deleteIn(result, 'asyncErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], function (state, _ref20) { + var payload = _ref20.payload; + + var result = state; + result = deleteIn(result, 'submitting'); + result = deleteIn(result, 'submitFailed'); + result = deleteIn(result, 'submitSucceeded'); + if (payload && Object.keys(payload).length) { + var _error = payload._error, + fieldErrors = _objectWithoutProperties(payload, ['_error']); + + if (_error) { + result = setIn(result, 'error', _error); + } else { + result = deleteIn(result, 'error'); + } + if (Object.keys(fieldErrors).length) { + result = setIn(result, 'submitErrors', fromJS(fieldErrors)); + } else { + result = deleteIn(result, 'submitErrors'); + } + result = setIn(result, 'submitFailed', true); + } else { + result = setIn(result, 'submitSucceeded', true); + result = deleteIn(result, 'error'); + result = deleteIn(result, 'submitErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], function (state, _ref21) { + var fields = _ref21.meta.fields; + + var result = state; + result = setIn(result, 'submitFailed', true); + result = deleteIn(result, 'submitSucceeded'); + result = deleteIn(result, 'submitting'); + fields.forEach(function (field) { + return result = setIn(result, 'fields.' + field + '.touched', true); + }); + if (fields.length) { + result = setIn(result, 'anyTouched', true); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], function (state) { + var result = state; + result = deleteIn(result, 'submitFailed'); + result = setIn(result, 'submitSucceeded', true); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], function (state, _ref22) { + var fields = _ref22.meta.fields; + + var result = state; + fields.forEach(function (field) { + return result = setIn(result, 'fields.' + field + '.touched', true); + }); + result = setIn(result, 'anyTouched', true); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], function (state, _ref23) { + var _ref23$payload = _ref23.payload, + name = _ref23$payload.name, + destroyOnUnmount = _ref23$payload.destroyOnUnmount; + + var result = state; + var key = 'registeredFields[\'' + name + '\']'; + var field = getIn(result, key); + if (!field) { + return result; + } + + var count = getIn(field, 'count') - 1; + if (count <= 0 && destroyOnUnmount) { + result = deleteIn(result, key); + if (deepEqual(getIn(result, 'registeredFields'), empty)) { + result = deleteIn(result, 'registeredFields'); + } + } else { + field = setIn(field, 'count', count); + result = setIn(result, key, field); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], function (state, _ref24) { + var fields = _ref24.meta.fields; + + var result = state; + fields.forEach(function (field) { + return result = deleteIn(result, 'fields.' + field + '.touched'); + }); + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], function (state, _ref25) { + var _ref25$payload = _ref25.payload, + syncErrors = _ref25$payload.syncErrors, + error = _ref25$payload.error; + + var result = state; + if (error) { + result = setIn(result, 'error', error); + result = setIn(result, 'syncError', true); + } else { + result = deleteIn(result, 'error'); + result = deleteIn(result, 'syncError'); + } + if (Object.keys(syncErrors).length) { + result = setIn(result, 'syncErrors', syncErrors); + } else { + result = deleteIn(result, 'syncErrors'); + } + return result; + }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], function (state, _ref26) { + var _ref26$payload = _ref26.payload, + syncWarnings = _ref26$payload.syncWarnings, + warning = _ref26$payload.warning; + + var result = state; + if (warning) { + result = setIn(result, 'warning', warning); + } else { + result = deleteIn(result, 'warning'); + } + if (Object.keys(syncWarnings).length) { + result = setIn(result, 'syncWarnings', syncWarnings); + } else { + result = deleteIn(result, 'syncWarnings'); + } + return result; + }), _behaviors); + + var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments[1]; + + var behavior = behaviors[action.type]; + return behavior ? behavior(state, action) : state; + }; + + var byForm = function byForm(reducer) { + return function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var form = action && action.meta && action.meta.form; + if (!form) { + return state; + } + if (action.type === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"]) { + return action.meta.form.reduce(function (result, form) { + return deleteInWithCleanUp(result, form); + }, state); + } + var formState = getIn(state, form); + var result = reducer(formState, action); + return result === formState ? state : setIn(state, form, result); + }; + }; + + /** + * Adds additional functionality to the reducer + */ + function decorate(target) { + target.plugin = function plugin(reducers) { + var _this = this; + + // use 'function' keyword to enable 'this' + return decorate(function () { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty; + var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return Object.keys(reducers).reduce(function (accumulator, key) { + var previousState = getIn(accumulator, key); + var nextState = reducers[key](previousState, action, getIn(state, key)); + return nextState === previousState ? accumulator : setIn(accumulator, key, nextState); + }, _this(state, action)); + }); + }; + + return target; + } + + return decorate(byForm(reducer)); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createReducer); + +/***/ }), +/* 495 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(107); + + + +var createDeleteInWithCleanUp = function createDeleteInWithCleanUp(_ref) { + var deepEqual = _ref.deepEqual, + empty = _ref.empty, + getIn = _ref.getIn, + deleteIn = _ref.deleteIn, + setIn = _ref.setIn; + + + var deleteInWithCleanUp = function deleteInWithCleanUp(state, path) { + if (path[path.length - 1] === ']') { + // array path + var pathTokens = __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](path); + pathTokens.pop(); + var parent = getIn(state, pathTokens.join('.')); + return parent ? setIn(state, path, undefined) : state; + } + var result = deleteIn(state, path); + var dotIndex = path.lastIndexOf('.'); + if (dotIndex > 0) { + var parentPath = path.substring(0, dotIndex); + if (parentPath[parentPath.length - 1] !== ']') { + var _parent = getIn(result, parentPath); + if (deepEqual(_parent, empty)) { + return deleteInWithCleanUp(result, parentPath); + } + } + } + return result; + }; + + return deleteInWithCleanUp; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createDeleteInWithCleanUp); + +/***/ }), +/* 496 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoize_js__ = __webpack_require__(497); + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = __WEBPACK_IMPORTED_MODULE_0__memoize_js__["a" /* default */](func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (memoizeCapped); + + +/***/ }), +/* 497 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(161); + + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]); + return memoized; +} + +// Expose `MapCache`. +memoize.Cache = __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (memoize); + + +/***/ }), +/* 498 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Hash_js__ = __webpack_require__(499); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ListCache_js__ = __webpack_require__(110); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Map_js__ = __webpack_require__(163); + + + + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new __WEBPACK_IMPORTED_MODULE_0__Hash_js__["a" /* default */], + 'map': new (__WEBPACK_IMPORTED_MODULE_2__Map_js__["a" /* default */] || __WEBPACK_IMPORTED_MODULE_1__ListCache_js__["a" /* default */]), + 'string': new __WEBPACK_IMPORTED_MODULE_0__Hash_js__["a" /* default */] + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheClear); + + +/***/ }), +/* 499 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hashClear_js__ = __webpack_require__(500); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__ = __webpack_require__(505); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hashGet_js__ = __webpack_require__(506); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__hashHas_js__ = __webpack_require__(507); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__hashSet_js__ = __webpack_require__(508); + + + + + + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = __WEBPACK_IMPORTED_MODULE_0__hashClear_js__["a" /* default */]; +Hash.prototype['delete'] = __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__["a" /* default */]; +Hash.prototype.get = __WEBPACK_IMPORTED_MODULE_2__hashGet_js__["a" /* default */]; +Hash.prototype.has = __WEBPACK_IMPORTED_MODULE_3__hashHas_js__["a" /* default */]; +Hash.prototype.set = __WEBPACK_IMPORTED_MODULE_4__hashSet_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (Hash); + + +/***/ }), +/* 500 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(109); + + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */](null) : {}; + this.size = 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashClear); + + +/***/ }), +/* 501 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(162); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isMasked_js__ = __webpack_require__(502); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toSource_js__ = __webpack_require__(260); + + + + + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!__WEBPACK_IMPORTED_MODULE_2__isObject_js__["a" /* default */](value) || __WEBPACK_IMPORTED_MODULE_1__isMasked_js__["a" /* default */](value)) { + return false; + } + var pattern = __WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */](value) ? reIsNative : reIsHostCtor; + return pattern.test(__WEBPACK_IMPORTED_MODULE_3__toSource_js__["a" /* default */](value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsNative); + + +/***/ }), +/* 502 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__ = __webpack_require__(503); + + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(__WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */].keys && __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__["a" /* default */].keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/* harmony default export */ __webpack_exports__["a"] = (isMasked); + + +/***/ }), +/* 503 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(30); + + +/** Used to detect overreaching core-js shims. */ +var coreJsData = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */]['__core-js_shared__']; + +/* harmony default export */ __webpack_exports__["a"] = (coreJsData); + + +/***/ }), +/* 504 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/* harmony default export */ __webpack_exports__["a"] = (getValue); + + +/***/ }), +/* 505 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashDelete); + + +/***/ }), +/* 506 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(109); + + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */]) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashGet); + + +/***/ }), +/* 507 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(109); + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +/* harmony default export */ __webpack_exports__["a"] = (hashHas); + + +/***/ }), +/* 508 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(109); + + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (hashSet); + + +/***/ }), +/* 509 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheClear); + + +/***/ }), +/* 510 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(111); + + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheDelete); + + +/***/ }), +/* 511 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(111); + + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheGet); + + +/***/ }), +/* 512 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(111); + + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](this.__data__, key) > -1; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheHas); + + +/***/ }), +/* 513 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(111); + + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (listCacheSet); + + +/***/ }), +/* 514 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(112); + + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheDelete); + + +/***/ }), +/* 515 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/* harmony default export */ __webpack_exports__["a"] = (isKeyable); + + +/***/ }), +/* 516 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(112); + + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key).get(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheGet); + + +/***/ }), +/* 517 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(112); + + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key).has(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheHas); + + +/***/ }), +/* 518 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(112); + + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapCacheSet); + + +/***/ }), +/* 519 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(106); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(257); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(108); + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value)) { + // Recursively convert values (susceptible to call stack limits). + return __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */](value, baseToString) + ''; + } + if (__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */](value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseToString); + + +/***/ }), +/* 520 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__ = __webpack_require__(521); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__ = __webpack_require__(268); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = __webpack_require__(255); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux__ = __webpack_require__(36); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_redux__ = __webpack_require__(157); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_is_promise__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_is_promise__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util_getDisplayName__ = __webpack_require__(592); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__actions__ = __webpack_require__(274); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__handleSubmit__ = __webpack_require__(593); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__events_silenceEvent__ = __webpack_require__(276); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__events_silenceEvents__ = __webpack_require__(595); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__asyncValidation__ = __webpack_require__(596); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__defaultShouldAsyncValidate__ = __webpack_require__(597); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__defaultShouldValidate__ = __webpack_require__(598); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__structure_plain__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__generateValidator__ = __webpack_require__(604); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__selectors_isValid__ = __webpack_require__(177); + + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + + + + + + + + + + + + + + + +var isClassComponent = function isClassComponent(Component) { + return Boolean(Component && Component.prototype && _typeof(Component.prototype.isReactComponent) === 'object'); +}; + +// extract field-specific actions + +var arrayInsert = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayInsert"], + arrayMove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayMove"], + arrayPop = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPop"], + arrayPush = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPush"], + arrayRemove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemove"], + arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemoveAll"], + arrayShift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayShift"], + arraySplice = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySplice"], + arraySwap = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySwap"], + arrayUnshift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayUnshift"], + blur = __WEBPACK_IMPORTED_MODULE_8__actions__["blur"], + change = __WEBPACK_IMPORTED_MODULE_8__actions__["change"], + focus = __WEBPACK_IMPORTED_MODULE_8__actions__["focus"], + formActions = _objectWithoutProperties(__WEBPACK_IMPORTED_MODULE_8__actions__, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'blur', 'change', 'focus']); + +var arrayActions = { + arrayInsert: arrayInsert, + arrayMove: arrayMove, + arrayPop: arrayPop, + arrayPush: arrayPush, + arrayRemove: arrayRemove, + arrayRemoveAll: arrayRemoveAll, + arrayShift: arrayShift, + arraySplice: arraySplice, + arraySwap: arraySwap, + arrayUnshift: arrayUnshift +}; + +var propsToNotUpdateFor = [].concat(_toConsumableArray(Object.keys(__WEBPACK_IMPORTED_MODULE_8__actions__)), ['array', 'asyncErrors', 'initialized', 'initialValues', 'syncErrors', 'syncWarnings', 'values', 'registeredFields']); + +var checkSubmit = function checkSubmit(submit) { + if (!submit || typeof submit !== 'function') { + throw new Error('You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop'); + } + return submit; +}; + +/** + * The decorator that is the main API to redux-form + */ +var createReduxForm = function createReduxForm(structure) { + var deepEqual = structure.deepEqual, + empty = structure.empty, + getIn = structure.getIn, + setIn = structure.setIn, + keys = structure.keys, + fromJS = structure.fromJS; + + var isValid = __WEBPACK_IMPORTED_MODULE_17__selectors_isValid__["a" /* default */](structure); + return function (initialConfig) { + var config = _extends({ + touchOnBlur: true, + touchOnChange: false, + persistentSubmitErrors: false, + destroyOnUnmount: true, + shouldAsyncValidate: __WEBPACK_IMPORTED_MODULE_13__defaultShouldAsyncValidate__["a" /* default */], + shouldValidate: __WEBPACK_IMPORTED_MODULE_14__defaultShouldValidate__["a" /* default */], + enableReinitialize: false, + keepDirtyOnReinitialize: false, + getFormState: function getFormState(state) { + return getIn(state, 'form'); + }, + pure: true, + forceUnregisterOnUnmount: false + }, initialConfig); + + return function (WrappedComponent) { + var Form = function (_Component) { + _inherits(Form, _Component); + + function Form(props) { + _classCallCheck(this, Form); + + var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props)); + + _this.submit = _this.submit.bind(_this); + _this.reset = _this.reset.bind(_this); + _this.asyncValidate = _this.asyncValidate.bind(_this); + _this.getValues = _this.getValues.bind(_this); + _this.register = _this.register.bind(_this); + _this.unregister = _this.unregister.bind(_this); + _this.submitCompleted = _this.submitCompleted.bind(_this); + _this.submitFailed = _this.submitFailed.bind(_this); + _this.fieldValidators = {}; + _this.lastFieldValidatorKeys = []; + _this.fieldWarners = {}; + _this.lastFieldWarnerKeys = []; + return _this; + } + + _createClass(Form, [{ + key: 'getChildContext', + value: function getChildContext() { + var _this2 = this; + + return { + _reduxForm: _extends({}, this.props, { + getFormState: function getFormState(state) { + return getIn(_this2.props.getFormState(state), _this2.props.form); + }, + asyncValidate: this.asyncValidate, + getValues: this.getValues, + sectionPrefix: undefined, + register: this.register, + unregister: this.unregister, + registerInnerOnSubmit: function registerInnerOnSubmit(innerOnSubmit) { + return _this2.innerOnSubmit = innerOnSubmit; + } + }) + }; + } + }, { + key: 'initIfNeeded', + value: function initIfNeeded(nextProps) { + var enableReinitialize = this.props.enableReinitialize; + + if (nextProps) { + if ((enableReinitialize || !nextProps.initialized) && !deepEqual(this.props.initialValues, nextProps.initialValues)) { + var keepDirty = nextProps.initialized && this.props.keepDirtyOnReinitialize; + this.props.initialize(nextProps.initialValues, keepDirty); + } + } else if (this.props.initialValues && (!this.props.initialized || enableReinitialize)) { + this.props.initialize(this.props.initialValues, this.props.keepDirtyOnReinitialize); + } + } + }, { + key: 'updateSyncErrorsIfNeeded', + value: function updateSyncErrorsIfNeeded(nextSyncErrors, nextError) { + var _props = this.props, + error = _props.error, + syncErrors = _props.syncErrors, + updateSyncErrors = _props.updateSyncErrors; + + var noErrors = (!syncErrors || !Object.keys(syncErrors).length) && !error; + var nextNoErrors = (!nextSyncErrors || !Object.keys(nextSyncErrors).length) && !nextError; + if (!(noErrors && nextNoErrors) && (!__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(syncErrors, nextSyncErrors) || !__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(error, nextError))) { + updateSyncErrors(nextSyncErrors, nextError); + } + } + }, { + key: 'submitIfNeeded', + value: function submitIfNeeded(nextProps) { + var _props2 = this.props, + clearSubmit = _props2.clearSubmit, + triggerSubmit = _props2.triggerSubmit; + + if (!triggerSubmit && nextProps.triggerSubmit) { + clearSubmit(); + this.submit(); + } + } + }, { + key: 'validateIfNeeded', + value: function validateIfNeeded(nextProps) { + var _props3 = this.props, + shouldValidate = _props3.shouldValidate, + validate = _props3.validate, + values = _props3.values; + + var fieldLevelValidate = this.generateValidator(); + if (validate || fieldLevelValidate) { + var initialRender = nextProps === undefined; + var fieldValidatorKeys = Object.keys(this.fieldValidators); + var shouldValidateResult = shouldValidate({ + values: values, + nextProps: nextProps, + props: this.props, + initialRender: initialRender, + lastFieldValidatorKeys: this.lastFieldValidatorKeys, + fieldValidatorKeys: fieldValidatorKeys, + structure: structure + }); + + if (shouldValidateResult) { + var propsToValidate = initialRender ? this.props : nextProps; + + var _merge2 = __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */](validate ? validate(propsToValidate.values, propsToValidate) || {} : {}, fieldLevelValidate ? fieldLevelValidate(propsToValidate.values, propsToValidate) || {} : {}), + _error = _merge2._error, + nextSyncErrors = _objectWithoutProperties(_merge2, ['_error']); + + this.lastFieldValidatorKeys = fieldValidatorKeys; + this.updateSyncErrorsIfNeeded(nextSyncErrors, _error); + } + } + } + }, { + key: 'updateSyncWarningsIfNeeded', + value: function updateSyncWarningsIfNeeded(nextSyncWarnings, nextWarning) { + var _props4 = this.props, + warning = _props4.warning, + syncWarnings = _props4.syncWarnings, + updateSyncWarnings = _props4.updateSyncWarnings; + + var noWarnings = (!syncWarnings || !Object.keys(syncWarnings).length) && !warning; + var nextNoWarnings = (!nextSyncWarnings || !Object.keys(nextSyncWarnings).length) && !nextWarning; + if (!(noWarnings && nextNoWarnings) && (!__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(syncWarnings, nextSyncWarnings) || !__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(warning, nextWarning))) { + updateSyncWarnings(nextSyncWarnings, nextWarning); + } + } + }, { + key: 'warnIfNeeded', + value: function warnIfNeeded(nextProps) { + var _props5 = this.props, + shouldValidate = _props5.shouldValidate, + warn = _props5.warn, + values = _props5.values; + + var fieldLevelWarn = this.generateWarner(); + if (warn || fieldLevelWarn) { + var initialRender = nextProps === undefined; + var fieldWarnerKeys = Object.keys(this.fieldWarners); + var shouldWarnResult = shouldValidate({ + values: values, + nextProps: nextProps, + props: this.props, + initialRender: initialRender, + lastFieldValidatorKeys: this.lastFieldWarnerKeys, + fieldValidatorKeys: fieldWarnerKeys, + structure: structure + }); + + if (shouldWarnResult) { + var propsToWarn = initialRender ? this.props : nextProps; + + var _merge3 = __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */](warn ? warn(propsToWarn.values, propsToWarn) : {}, fieldLevelWarn ? fieldLevelWarn(propsToWarn.values, propsToWarn) : {}), + _warning = _merge3._warning, + nextSyncWarnings = _objectWithoutProperties(_merge3, ['_warning']); + + this.lastFieldWarnerKeys = fieldWarnerKeys; + this.updateSyncWarningsIfNeeded(nextSyncWarnings, _warning); + } + } + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + this.initIfNeeded(); + this.validateIfNeeded(); + this.warnIfNeeded(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.initIfNeeded(nextProps); + this.validateIfNeeded(nextProps); + this.warnIfNeeded(nextProps); + this.submitIfNeeded(nextProps); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this3 = this; + + if (!config.pure) return true; + return Object.keys(nextProps).some(function (prop) { + // useful to debug rerenders + // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { + // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) + // } + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); + }); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + var _props6 = this.props, + destroyOnUnmount = _props6.destroyOnUnmount, + destroy = _props6.destroy; + + if (destroyOnUnmount) { + this.destroyed = true; + destroy(); + } + } + }, { + key: 'getValues', + value: function getValues() { + return this.props.values; + } + }, { + key: 'isValid', + value: function isValid() { + return this.props.valid; + } + }, { + key: 'isPristine', + value: function isPristine() { + return this.props.pristine; + } + }, { + key: 'register', + value: function register(name, type, getValidator, getWarner) { + this.props.registerField(name, type); + if (getValidator) { + this.fieldValidators[name] = getValidator; + } + if (getWarner) { + this.fieldWarners[name] = getWarner; + } + } + }, { + key: 'unregister', + value: function unregister(name) { + if (!this.destroyed) { + if (this.props.destroyOnUnmount || this.props.forceUnregisterOnUnmount) { + this.props.unregisterField(name); + delete this.fieldValidators[name]; + delete this.fieldWarners[name]; + } else { + this.props.unregisterField(name, false); + } + } + } + }, { + key: 'getFieldList', + value: function getFieldList(options) { + var registeredFields = this.props.registeredFields; + var list = []; + if (!registeredFields) { + return list; + } + var keySeq = keys(registeredFields); + if (options && options.excludeFieldArray) { + keySeq = keySeq.filter(function (name) { + return getIn(registeredFields, '[\'' + name + '\'].type') !== 'FieldArray'; + }); + } + return fromJS(keySeq.reduce(function (acc, key) { + acc.push(key); + return acc; + }, list)); + } + }, { + key: 'generateValidator', + value: function generateValidator() { + var _this4 = this; + + var validators = {}; + Object.keys(this.fieldValidators).forEach(function (name) { + var validator = _this4.fieldValidators[name](); + if (validator) { + validators[name] = validator; + } + }); + return Object.keys(validators).length ? __WEBPACK_IMPORTED_MODULE_16__generateValidator__["a" /* default */](validators, structure) : undefined; + } + }, { + key: 'generateWarner', + value: function generateWarner() { + var _this5 = this; + + var warners = {}; + Object.keys(this.fieldWarners).forEach(function (name) { + var warner = _this5.fieldWarners[name](); + if (warner) { + warners[name] = warner; + } + }); + return Object.keys(warners).length ? __WEBPACK_IMPORTED_MODULE_16__generateValidator__["a" /* default */](warners, structure) : undefined; + } + }, { + key: 'asyncValidate', + value: function asyncValidate(name, value) { + var _this6 = this; + + var _props7 = this.props, + asyncBlurFields = _props7.asyncBlurFields, + asyncErrors = _props7.asyncErrors, + asyncValidate = _props7.asyncValidate, + dispatch = _props7.dispatch, + initialized = _props7.initialized, + pristine = _props7.pristine, + shouldAsyncValidate = _props7.shouldAsyncValidate, + startAsyncValidation = _props7.startAsyncValidation, + stopAsyncValidation = _props7.stopAsyncValidation, + syncErrors = _props7.syncErrors, + values = _props7.values; + + var submitting = !name; + if (asyncValidate) { + var _ret = function () { + var valuesToValidate = submitting ? values : setIn(values, name, value); + var syncValidationPasses = submitting || !getIn(syncErrors, name); + var isBlurredField = !submitting && (!asyncBlurFields || ~asyncBlurFields.indexOf(name.replace(/\[[0-9]+\]/g, '[]'))); + if ((isBlurredField || submitting) && shouldAsyncValidate({ + asyncErrors: asyncErrors, + initialized: initialized, + trigger: submitting ? 'submit' : 'blur', + blurredField: name, + pristine: pristine, + syncValidationPasses: syncValidationPasses + })) { + return { + v: __WEBPACK_IMPORTED_MODULE_12__asyncValidation__["a" /* default */](function () { + return asyncValidate(valuesToValidate, dispatch, _this6.props, name); + }, startAsyncValidation, stopAsyncValidation, name) + }; + } + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } + } + }, { + key: 'submitCompleted', + value: function submitCompleted(result) { + delete this.submitPromise; + return result; + } + }, { + key: 'submitFailed', + value: function submitFailed(error) { + delete this.submitPromise; + throw error; + } + }, { + key: 'listenToSubmit', + value: function listenToSubmit(promise) { + if (!__WEBPACK_IMPORTED_MODULE_6_is_promise___default.a(promise)) { + return promise; + } + this.submitPromise = promise; + return promise.then(this.submitCompleted, this.submitFailed); + } + }, { + key: 'submit', + value: function submit(submitOrEvent) { + var _this7 = this; + + var onSubmit = this.props.onSubmit; + + + if (!submitOrEvent || __WEBPACK_IMPORTED_MODULE_10__events_silenceEvent__["a" /* default */](submitOrEvent)) { + // submitOrEvent is an event: fire submit if not already submitting + if (!this.submitPromise) { + if (this.innerOnSubmit) { + // will call "submitOrEvent is the submit function" block below + return this.innerOnSubmit(); + } else { + return this.listenToSubmit(__WEBPACK_IMPORTED_MODULE_9__handleSubmit__["a" /* default */](checkSubmit(onSubmit), this.props, this.props.validExceptSubmit, this.asyncValidate, this.getFieldList({ excludeFieldArray: true }))); + } + } + } else { + // submitOrEvent is the submit function: return deferred submit thunk + return __WEBPACK_IMPORTED_MODULE_11__events_silenceEvents__["a" /* default */](function () { + return !_this7.submitPromise && _this7.listenToSubmit(__WEBPACK_IMPORTED_MODULE_9__handleSubmit__["a" /* default */](checkSubmit(submitOrEvent), _this7.props, _this7.props.validExceptSubmit, _this7.asyncValidate, _this7.getFieldList({ excludeFieldArray: true }))); + }); + } + } + }, { + key: 'reset', + value: function reset() { + this.props.reset(); + } + }, { + key: 'render', + value: function render() { + // remove some redux-form config-only props + /* eslint-disable no-unused-vars */ + var _props8 = this.props, + anyTouched = _props8.anyTouched, + arrayInsert = _props8.arrayInsert, + arrayMove = _props8.arrayMove, + arrayPop = _props8.arrayPop, + arrayPush = _props8.arrayPush, + arrayRemove = _props8.arrayRemove, + arrayRemoveAll = _props8.arrayRemoveAll, + arrayShift = _props8.arrayShift, + arraySplice = _props8.arraySplice, + arraySwap = _props8.arraySwap, + arrayUnshift = _props8.arrayUnshift, + asyncErrors = _props8.asyncErrors, + asyncValidate = _props8.asyncValidate, + asyncValidating = _props8.asyncValidating, + blur = _props8.blur, + change = _props8.change, + destroy = _props8.destroy, + destroyOnUnmount = _props8.destroyOnUnmount, + forceUnregisterOnUnmount = _props8.forceUnregisterOnUnmount, + dirty = _props8.dirty, + dispatch = _props8.dispatch, + enableReinitialize = _props8.enableReinitialize, + error = _props8.error, + focus = _props8.focus, + form = _props8.form, + getFormState = _props8.getFormState, + initialize = _props8.initialize, + initialized = _props8.initialized, + initialValues = _props8.initialValues, + invalid = _props8.invalid, + keepDirtyOnReinitialize = _props8.keepDirtyOnReinitialize, + pristine = _props8.pristine, + propNamespace = _props8.propNamespace, + registeredFields = _props8.registeredFields, + registerField = _props8.registerField, + reset = _props8.reset, + setSubmitFailed = _props8.setSubmitFailed, + setSubmitSucceeded = _props8.setSubmitSucceeded, + shouldAsyncValidate = _props8.shouldAsyncValidate, + shouldValidate = _props8.shouldValidate, + startAsyncValidation = _props8.startAsyncValidation, + startSubmit = _props8.startSubmit, + stopAsyncValidation = _props8.stopAsyncValidation, + stopSubmit = _props8.stopSubmit, + submitting = _props8.submitting, + submitFailed = _props8.submitFailed, + submitSucceeded = _props8.submitSucceeded, + touch = _props8.touch, + touchOnBlur = _props8.touchOnBlur, + touchOnChange = _props8.touchOnChange, + persistentSubmitErrors = _props8.persistentSubmitErrors, + syncErrors = _props8.syncErrors, + syncWarnings = _props8.syncWarnings, + unregisterField = _props8.unregisterField, + untouch = _props8.untouch, + updateSyncErrors = _props8.updateSyncErrors, + updateSyncWarnings = _props8.updateSyncWarnings, + valid = _props8.valid, + validExceptSubmit = _props8.validExceptSubmit, + values = _props8.values, + warning = _props8.warning, + rest = _objectWithoutProperties(_props8, ['anyTouched', 'arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'blur', 'change', 'destroy', 'destroyOnUnmount', 'forceUnregisterOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'focus', 'form', 'getFormState', 'initialize', 'initialized', 'initialValues', 'invalid', 'keepDirtyOnReinitialize', 'pristine', 'propNamespace', 'registeredFields', 'registerField', 'reset', 'setSubmitFailed', 'setSubmitSucceeded', 'shouldAsyncValidate', 'shouldValidate', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitting', 'submitFailed', 'submitSucceeded', 'touch', 'touchOnBlur', 'touchOnChange', 'persistentSubmitErrors', 'syncErrors', 'syncWarnings', 'unregisterField', 'untouch', 'updateSyncErrors', 'updateSyncWarnings', 'valid', 'validExceptSubmit', 'values', 'warning']); + /* eslint-enable no-unused-vars */ + + + var reduxFormProps = _extends({ + anyTouched: anyTouched, + asyncValidate: this.asyncValidate, + asyncValidating: asyncValidating + }, __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"]({ blur: blur, change: change }, dispatch), { + destroy: destroy, + dirty: dirty, + dispatch: dispatch, + error: error, + form: form, + handleSubmit: this.submit, + initialize: initialize, + initialized: initialized, + initialValues: initialValues, + invalid: invalid, + pristine: pristine, + reset: reset, + submitting: submitting, + submitFailed: submitFailed, + submitSucceeded: submitSucceeded, + touch: touch, + untouch: untouch, + valid: valid, + warning: warning + }); + var propsToPass = _extends({}, propNamespace ? _defineProperty({}, propNamespace, reduxFormProps) : reduxFormProps, rest); + if (isClassComponent(WrappedComponent)) { + propsToPass.ref = 'wrapped'; + } + return __WEBPACK_IMPORTED_MODULE_2_react__["createElement"](WrappedComponent, propsToPass); + } + }]); + + return Form; + }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); + + Form.displayName = 'Form(' + __WEBPACK_IMPORTED_MODULE_7__util_getDisplayName__["a" /* default */](WrappedComponent) + ')'; + Form.WrappedComponent = WrappedComponent; + Form.childContextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].object.isRequired + }; + Form.propTypes = { + destroyOnUnmount: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + forceUnregisterOnUnmount: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + form: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].string.isRequired, + initialValues: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].object, + getFormState: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + onSubmitFail: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + onSubmitSuccess: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + propNameSpace: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].string, + validate: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + warn: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func, + touchOnBlur: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + touchOnChange: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + triggerSubmit: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + persistentSubmitErrors: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool, + registeredFields: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].any + }; + + var connector = __WEBPACK_IMPORTED_MODULE_4_react_redux__["connect"](function (state, props) { + var form = props.form, + getFormState = props.getFormState, + initialValues = props.initialValues, + enableReinitialize = props.enableReinitialize, + keepDirtyOnReinitialize = props.keepDirtyOnReinitialize; + + var formState = getIn(getFormState(state) || empty, form) || empty; + var stateInitial = getIn(formState, 'initial'); + var initialized = !!stateInitial; + + var shouldUpdateInitialValues = enableReinitialize && initialized && !deepEqual(initialValues, stateInitial); + var shouldResetValues = shouldUpdateInitialValues && !keepDirtyOnReinitialize; + + var initial = initialValues || stateInitial || empty; + + if (shouldUpdateInitialValues) { + initial = stateInitial || empty; + } + + var values = getIn(formState, 'values') || initial; + + if (shouldResetValues) { + values = initial; + } + + var pristine = shouldResetValues || deepEqual(initial, values); + var asyncErrors = getIn(formState, 'asyncErrors'); + var syncErrors = getIn(formState, 'syncErrors') || {}; + var syncWarnings = getIn(formState, 'syncWarnings') || {}; + var registeredFields = getIn(formState, 'registeredFields'); + var valid = isValid(form, getFormState, false)(state); + var validExceptSubmit = isValid(form, getFormState, true)(state); + var anyTouched = !!getIn(formState, 'anyTouched'); + var submitting = !!getIn(formState, 'submitting'); + var submitFailed = !!getIn(formState, 'submitFailed'); + var submitSucceeded = !!getIn(formState, 'submitSucceeded'); + var error = getIn(formState, 'error'); + var warning = getIn(formState, 'warning'); + var triggerSubmit = getIn(formState, 'triggerSubmit'); + return { + anyTouched: anyTouched, + asyncErrors: asyncErrors, + asyncValidating: getIn(formState, 'asyncValidating') || false, + dirty: !pristine, + error: error, + initialized: initialized, + invalid: !valid, + pristine: pristine, + registeredFields: registeredFields, + submitting: submitting, + submitFailed: submitFailed, + submitSucceeded: submitSucceeded, + syncErrors: syncErrors, + syncWarnings: syncWarnings, + triggerSubmit: triggerSubmit, + values: values, + valid: valid, + validExceptSubmit: validExceptSubmit, + warning: warning + }; + }, function (dispatch, initialProps) { + var bindForm = function bindForm(actionCreator) { + return actionCreator.bind(null, initialProps.form); + }; + + // Bind the first parameter on `props.form` + var boundFormACs = __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */](formActions, bindForm); + var boundArrayACs = __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */](arrayActions, bindForm); + var boundBlur = function boundBlur(field, value) { + return blur(initialProps.form, field, value, !!initialProps.touchOnBlur); + }; + var boundChange = function boundChange(field, value) { + return change(initialProps.form, field, value, !!initialProps.touchOnChange, !!initialProps.persistentSubmitErrors); + }; + var boundFocus = bindForm(focus); + + // Wrap action creators with `dispatch` + var connectedFormACs = __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundFormACs, dispatch); + var connectedArrayACs = { + insert: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayInsert, dispatch), + move: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayMove, dispatch), + pop: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayPop, dispatch), + push: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayPush, dispatch), + remove: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayRemove, dispatch), + removeAll: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayRemoveAll, dispatch), + shift: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayShift, dispatch), + splice: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arraySplice, dispatch), + swap: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arraySwap, dispatch), + unshift: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayUnshift, dispatch) + }; + + var computedActions = _extends({}, connectedFormACs, boundArrayACs, { + blur: boundBlur, + change: boundChange, + array: connectedArrayACs, + focus: boundFocus, + dispatch: dispatch + }); + + return function () { + return computedActions; + }; + }, undefined, { withRef: true }); + var ConnectedForm = __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default.a(connector(Form), WrappedComponent); + ConnectedForm.defaultProps = config; + + // build outer component to expose instance api + return function (_Component2) { + _inherits(ReduxForm, _Component2); + + function ReduxForm() { + _classCallCheck(this, ReduxForm); + + return _possibleConstructorReturn(this, (ReduxForm.__proto__ || Object.getPrototypeOf(ReduxForm)).apply(this, arguments)); + } + + _createClass(ReduxForm, [{ + key: 'submit', + value: function submit() { + return this.refs.wrapped.getWrappedInstance().submit(); + } + }, { + key: 'reset', + value: function reset() { + return this.refs.wrapped.getWrappedInstance().reset(); + } + }, { + key: 'render', + value: function render() { + var _props9 = this.props, + initialValues = _props9.initialValues, + rest = _objectWithoutProperties(_props9, ['initialValues']); + + return __WEBPACK_IMPORTED_MODULE_2_react__["createElement"](ConnectedForm, _extends({}, rest, { + ref: 'wrapped', + // convert initialValues if need to + initialValues: fromJS(initialValues) + })); + } + }, { + key: 'valid', + get: function get() { + return this.refs.wrapped.getWrappedInstance().isValid(); + } + }, { + key: 'invalid', + get: function get() { + return !this.valid; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.wrapped.getWrappedInstance().isPristine(); + } + }, { + key: 'dirty', + get: function get() { + return !this.pristine; + } + }, { + key: 'values', + get: function get() { + return this.refs.wrapped.getWrappedInstance().getValues(); + } + }, { + key: 'fieldList', + get: function get() { + // mainly provided for testing + return this.refs.wrapped.getWrappedInstance().getFieldList(); + } + }, { + key: 'wrappedInstance', + get: function get() { + // for testine + return this.refs.wrapped.getWrappedInstance().refs.wrapped; + } + }]); + + return ReduxForm; + }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createReduxForm); + +/***/ }), +/* 521 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__ = __webpack_require__(522); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(547); + + + +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */](function(object, source, srcIndex) { + __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__["a" /* default */](object, source, srcIndex); +}); + +/* harmony default export */ __webpack_exports__["a"] = (merge); + + +/***/ }), +/* 522 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(164); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__ = __webpack_require__(262); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseFor_js__ = __webpack_require__(264); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__ = __webpack_require__(529); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isObject_js__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keysIn_js__ = __webpack_require__(266); + + + + + + + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + __WEBPACK_IMPORTED_MODULE_2__baseFor_js__["a" /* default */](source, function(srcValue, key) { + if (__WEBPACK_IMPORTED_MODULE_4__isObject_js__["a" /* default */](srcValue)) { + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__["a" /* default */](object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__["a" /* default */](object, key, newValue); + } + }, __WEBPACK_IMPORTED_MODULE_5__keysIn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMerge); + + +/***/ }), +/* 523 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(110); + + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */]; + this.size = 0; +} + +/* harmony default export */ __webpack_exports__["a"] = (stackClear); + + +/***/ }), +/* 524 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (stackDelete); + + +/***/ }), +/* 525 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (stackGet); + + +/***/ }), +/* 526 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (stackHas); + + +/***/ }), +/* 527 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(110); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(163); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MapCache_js__ = __webpack_require__(161); + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof __WEBPACK_IMPORTED_MODULE_0__ListCache_js__["a" /* default */]) { + var pairs = data.__data__; + if (!__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new __WEBPACK_IMPORTED_MODULE_2__MapCache_js__["a" /* default */](pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (stackSet); + + +/***/ }), +/* 528 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (createBaseFor); + + +/***/ }), +/* 529 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__ = __webpack_require__(262); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__ = __webpack_require__(530); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__ = __webpack_require__(531); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__copyArray_js__ = __webpack_require__(258); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__ = __webpack_require__(533); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArguments_js__ = __webpack_require__(167); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isArray_js__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__ = __webpack_require__(536); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__isFunction_js__ = __webpack_require__(162); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__isObject_js__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__ = __webpack_require__(158); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__ = __webpack_require__(170); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__ = __webpack_require__(541); + + + + + + + + + + + + + + + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */](object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = __WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */](srcValue), + isBuff = !isArr && __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__["a" /* default */](srcValue), + isTyped = !isArr && !isBuff && __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__["a" /* default */](srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */](objValue)) { + newValue = objValue; + } + else if (__WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__["a" /* default */](objValue)) { + newValue = __WEBPACK_IMPORTED_MODULE_3__copyArray_js__["a" /* default */](objValue); + } + else if (isBuff) { + isCommon = false; + newValue = __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__["a" /* default */](srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__["a" /* default */](srcValue, true); + } + else { + newValue = []; + } + } + else if (__WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__["a" /* default */](srcValue) || __WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */](srcValue)) { + newValue = objValue; + if (__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */](objValue)) { + newValue = __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__["a" /* default */](objValue); + } + else if (!__WEBPACK_IMPORTED_MODULE_10__isObject_js__["a" /* default */](objValue) || (srcIndex && __WEBPACK_IMPORTED_MODULE_9__isFunction_js__["a" /* default */](objValue))) { + newValue = __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__["a" /* default */](srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */](object, key, newValue); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMergeDeep); + + +/***/ }), +/* 530 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(30); + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneBuffer); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(165)(module))) + +/***/ }), +/* 531 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__ = __webpack_require__(532); + + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__["a" /* default */](typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneTypedArray); + + +/***/ }), +/* 532 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__ = __webpack_require__(265); + + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](result).set(new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](arrayBuffer)); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (cloneArrayBuffer); + + +/***/ }), +/* 533 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(534); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(249); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isPrototype_js__ = __webpack_require__(166); + + + + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !__WEBPACK_IMPORTED_MODULE_2__isPrototype_js__["a" /* default */](object)) + ? __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */](object)) + : {}; +} + +/* harmony default export */ __webpack_exports__["a"] = (initCloneObject); + + +/***/ }), +/* 534 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(44); + + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +/* harmony default export */ __webpack_exports__["a"] = (baseCreate); + + +/***/ }), +/* 535 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(69); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(57); + + + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) == argsTag; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsArguments); + + +/***/ }), +/* 536 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(114); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(57); + + + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (isArrayLikeObject); + + +/***/ }), +/* 537 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (stubFalse); + + +/***/ }), +/* 538 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(69); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(168); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(57); + + + + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */](value) && + __WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */](value.length) && !!typedArrayTags[__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value)]; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsTypedArray); + + +/***/ }), +/* 539 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseUnary); + + +/***/ }), +/* 540 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(248); + + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */].process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* harmony default export */ __webpack_exports__["a"] = (nodeUtil); + +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(165)(module))) + +/***/ }), +/* 541 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(542); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keysIn_js__ = __webpack_require__(266); + + + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return __WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */](value, __WEBPACK_IMPORTED_MODULE_1__keysIn_js__["a" /* default */](value)); +} + +/* harmony default export */ __webpack_exports__["a"] = (toPlainObject); + + +/***/ }), +/* 542 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignValue_js__ = __webpack_require__(543); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__ = __webpack_require__(113); + + + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__["a" /* default */](object, key, newValue); + } else { + __WEBPACK_IMPORTED_MODULE_0__assignValue_js__["a" /* default */](object, key, newValue); + } + } + return object; +} + +/* harmony default export */ __webpack_exports__["a"] = (copyObject); + + +/***/ }), +/* 543 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(113); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(85); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && __WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */](objValue, value)) || + (value === undefined && !(key in object))) { + __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](object, key, value); + } +} + +/* harmony default export */ __webpack_exports__["a"] = (assignValue); + + +/***/ }), +/* 544 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseTimes); + + +/***/ }), +/* 545 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(44); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__ = __webpack_require__(546); + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](object)) { + return __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__["a" /* default */](object); + } + var isProto = __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__["a" /* default */](object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseKeysIn); + + +/***/ }), +/* 546 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (nativeKeysIn); + + +/***/ }), +/* 547 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(548); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(555); + + + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return __WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */](function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */](sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +/* harmony default export */ __webpack_exports__["a"] = (createAssigner); + + +/***/ }), +/* 548 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(172); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__overRest_js__ = __webpack_require__(549); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setToString_js__ = __webpack_require__(551); + + + + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return __WEBPACK_IMPORTED_MODULE_2__setToString_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__overRest_js__["a" /* default */](func, start, __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */]), func + ''); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseRest); + + +/***/ }), +/* 549 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(550); + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return __WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */](func, this, otherArgs); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (overRest); + + +/***/ }), +/* 550 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/* harmony default export */ __webpack_exports__["a"] = (apply); + + +/***/ }), +/* 551 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__ = __webpack_require__(552); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shortOut_js__ = __webpack_require__(554); + + + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = __WEBPACK_IMPORTED_MODULE_1__shortOut_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__["a" /* default */]); + +/* harmony default export */ __webpack_exports__["a"] = (setToString); + + +/***/ }), +/* 552 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(553); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__ = __webpack_require__(263); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(172); + + + + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */] : function(func, string) { + return __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */](func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': __WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */](string), + 'writable': true + }); +}; + +/* harmony default export */ __webpack_exports__["a"] = (baseSetToString); + + +/***/ }), +/* 553 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (constant); + + +/***/ }), +/* 554 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (shortOut); + + +/***/ }), +/* 555 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(85); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(114); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isIndex_js__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isObject_js__ = __webpack_require__(44); + + + + + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!__WEBPACK_IMPORTED_MODULE_3__isObject_js__["a" /* default */](object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */](object) && __WEBPACK_IMPORTED_MODULE_2__isIndex_js__["a" /* default */](index, object.length)) + : (type == 'string' && index in object) + ) { + return __WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */](object[index], value); + } + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (isIterateeCall); + + +/***/ }), +/* 556 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFor_js__ = __webpack_require__(264); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(173); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && __WEBPACK_IMPORTED_MODULE_0__baseFor_js__["a" /* default */](object, iteratee, __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseForOwn); + + +/***/ }), +/* 557 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPrototype_js__ = __webpack_require__(166); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__ = __webpack_require__(558); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!__WEBPACK_IMPORTED_MODULE_0__isPrototype_js__["a" /* default */](object)) { + return __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__["a" /* default */](object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseKeys); + + +/***/ }), +/* 558 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(250); + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = __WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */](Object.keys, Object); + +/* harmony default export */ __webpack_exports__["a"] = (nativeKeys); + + +/***/ }), +/* 559 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__ = __webpack_require__(560); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__ = __webpack_require__(584); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(172); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__property_js__ = __webpack_require__(589); + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */]; + } + if (typeof value == 'object') { + return __WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */](value) + ? __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__["a" /* default */](value[0], value[1]) + : __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__["a" /* default */](value); + } + return __WEBPACK_IMPORTED_MODULE_4__property_js__["a" /* default */](value); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIteratee); + + +/***/ }), +/* 560 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__ = __webpack_require__(561); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__ = __webpack_require__(583); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__ = __webpack_require__(271); + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__["a" /* default */](source); + if (matchData.length == 1 && matchData[0][2]) { + return __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__["a" /* default */](matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__["a" /* default */](object, source, matchData); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMatches); + + +/***/ }), +/* 561 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(164); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__ = __webpack_require__(174); + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__["a" /* default */](srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsMatch); + + +/***/ }), +/* 562 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(164); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__ = __webpack_require__(269); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__ = __webpack_require__(568); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__ = __webpack_require__(571); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getTag_js__ = __webpack_require__(578); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArray_js__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__ = __webpack_require__(170); + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = __WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */](object), + othIsArr = __WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */](other), + objTag = objIsArr ? arrayTag : __WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */](object), + othTag = othIsArr ? arrayTag : __WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */](other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */](object)) { + if (!__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */](other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return (objIsArr || __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__["a" /* default */](object)) + ? __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__["a" /* default */](object, other, bitmask, customizer, equalFunc, stack) + : __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__["a" /* default */](object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]); + return __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__["a" /* default */](object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseIsEqualDeep); + + +/***/ }), +/* 563 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(161); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__ = __webpack_require__(564); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__ = __webpack_require__(565); + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */]; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__["a" /* default */]; +SetCache.prototype.has = __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__["a" /* default */]; + +/* harmony default export */ __webpack_exports__["a"] = (SetCache); + + +/***/ }), +/* 564 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/* harmony default export */ __webpack_exports__["a"] = (setCacheAdd); + + +/***/ }), +/* 565 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ __webpack_exports__["a"] = (setCacheHas); + + +/***/ }), +/* 566 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (arraySome); + + +/***/ }), +/* 567 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ __webpack_exports__["a"] = (cacheHas); + + +/***/ }), +/* 568 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(106); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__ = __webpack_require__(265); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__eq_js__ = __webpack_require__(85); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__ = __webpack_require__(269); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__ = __webpack_require__(569); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__setToArray_js__ = __webpack_require__(570); + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](object), new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return __WEBPACK_IMPORTED_MODULE_2__eq_js__["a" /* default */](+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__["a" /* default */]; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = __WEBPACK_IMPORTED_MODULE_5__setToArray_js__["a" /* default */]); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__["a" /* default */](convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ __webpack_exports__["a"] = (equalByTag); + + +/***/ }), +/* 569 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (mapToArray); + + +/***/ }), +/* 570 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (setToArray); + + +/***/ }), +/* 571 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__ = __webpack_require__(572); + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */](object), + objLength = objProps.length, + othProps = __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */](other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (equalObjects); + + +/***/ }), +/* 572 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__ = __webpack_require__(573); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__ = __webpack_require__(575); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(173); + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__["a" /* default */](object, __WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (getAllKeys); + + +/***/ }), +/* 573 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__ = __webpack_require__(574); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(31); + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return __WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */](object) ? result : __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__["a" /* default */](result, symbolsFunc(object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseGetAllKeys); + + +/***/ }), +/* 574 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayPush); + + +/***/ }), +/* 575 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(576); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubArray_js__ = __webpack_require__(577); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? __WEBPACK_IMPORTED_MODULE_1__stubArray_js__["a" /* default */] : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */](nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ __webpack_exports__["a"] = (getSymbols); + + +/***/ }), +/* 576 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (arrayFilter); + + +/***/ }), +/* 577 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ __webpack_exports__["a"] = (stubArray); + + +/***/ }), +/* 578 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DataView_js__ = __webpack_require__(579); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(163); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Promise_js__ = __webpack_require__(580); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Set_js__ = __webpack_require__(581); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__ = __webpack_require__(582); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__ = __webpack_require__(69); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toSource_js__ = __webpack_require__(260); + + + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */]), + mapCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]), + promiseCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */]), + setCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]), + weakMapCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */]; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */](new ArrayBuffer(1))) != dataViewTag) || + (__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]) != mapTag) || + (__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */] && getTag(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */].resolve()) != promiseTag) || + (__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]) != setTag) || + (__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]) != weakMapTag)) { + getTag = function(value) { + var result = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */](value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (getTag); + + +/***/ }), +/* 579 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(59); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(30); + + + +/* Built-in method references that are verified to be native. */ +var DataView = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'DataView'); + +/* harmony default export */ __webpack_exports__["a"] = (DataView); + + +/***/ }), +/* 580 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(59); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(30); + + + +/* Built-in method references that are verified to be native. */ +var Promise = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Promise'); + +/* harmony default export */ __webpack_exports__["a"] = (Promise); + + +/***/ }), +/* 581 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(59); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(30); + + + +/* Built-in method references that are verified to be native. */ +var Set = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Set'); + +/* harmony default export */ __webpack_exports__["a"] = (Set); + + +/***/ }), +/* 582 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(59); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(30); + + + +/* Built-in method references that are verified to be native. */ +var WeakMap = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'WeakMap'); + +/* harmony default export */ __webpack_exports__["a"] = (WeakMap); + + +/***/ }), +/* 583 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__ = __webpack_require__(270); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(173); + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */](object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__["a" /* default */](value)]; + } + return result; +} + +/* harmony default export */ __webpack_exports__["a"] = (getMatchData); + + +/***/ }), +/* 584 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__get_js__ = __webpack_require__(585); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hasIn_js__ = __webpack_require__(586); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isKey_js__ = __webpack_require__(175); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__ = __webpack_require__(270); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__ = __webpack_require__(271); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toKey_js__ = __webpack_require__(86); + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (__WEBPACK_IMPORTED_MODULE_3__isKey_js__["a" /* default */](path) && __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__["a" /* default */](srcValue)) { + return __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_6__toKey_js__["a" /* default */](path), srcValue); + } + return function(object) { + var objValue = __WEBPACK_IMPORTED_MODULE_1__get_js__["a" /* default */](object, path); + return (objValue === undefined && objValue === srcValue) + ? __WEBPACK_IMPORTED_MODULE_2__hasIn_js__["a" /* default */](object, path) + : __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */](srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseMatchesProperty); + + +/***/ }), +/* 585 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(272); + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : __WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */](object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ __webpack_exports__["a"] = (get); + + +/***/ }), +/* 586 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__ = __webpack_require__(587); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasPath_js__ = __webpack_require__(588); + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && __WEBPACK_IMPORTED_MODULE_1__hasPath_js__["a" /* default */](object, path, __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__["a" /* default */]); +} + +/* harmony default export */ __webpack_exports__["a"] = (hasIn); + + +/***/ }), +/* 587 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ __webpack_exports__["a"] = (baseHasIn); + + +/***/ }), +/* 588 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(273); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(167); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isIndex_js__ = __webpack_require__(171); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isLength_js__ = __webpack_require__(168); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(86); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = __WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */](path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */](path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && __WEBPACK_IMPORTED_MODULE_4__isLength_js__["a" /* default */](length) && __WEBPACK_IMPORTED_MODULE_3__isIndex_js__["a" /* default */](key, length) && + (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](object) || __WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */](object)); +} + +/* harmony default export */ __webpack_exports__["a"] = (hasPath); + + +/***/ }), +/* 589 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__ = __webpack_require__(590); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__ = __webpack_require__(591); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isKey_js__ = __webpack_require__(175); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toKey_js__ = __webpack_require__(86); + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return __WEBPACK_IMPORTED_MODULE_2__isKey_js__["a" /* default */](path) ? __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__toKey_js__["a" /* default */](path)) : __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__["a" /* default */](path); +} + +/* harmony default export */ __webpack_exports__["a"] = (property); + + +/***/ }), +/* 590 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (baseProperty); + + +/***/ }), +/* 591 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(272); + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return __WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */](object, path); + }; +} + +/* harmony default export */ __webpack_exports__["a"] = (basePropertyDeep); + + +/***/ }), +/* 592 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var getDisplayName = function getDisplayName(Comp) { + return Comp.displayName || Comp.name || 'Component'; +}; + +/* harmony default export */ __webpack_exports__["a"] = (getDisplayName); + +/***/ }), +/* 593 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubmissionError__ = __webpack_require__(275); +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + + + + +var handleSubmit = function handleSubmit(submit, props, valid, asyncValidate, fields) { + var dispatch = props.dispatch, + onSubmitFail = props.onSubmitFail, + onSubmitSuccess = props.onSubmitSuccess, + startSubmit = props.startSubmit, + stopSubmit = props.stopSubmit, + setSubmitFailed = props.setSubmitFailed, + setSubmitSucceeded = props.setSubmitSucceeded, + syncErrors = props.syncErrors, + touch = props.touch, + values = props.values, + persistentSubmitErrors = props.persistentSubmitErrors; + + + touch.apply(undefined, _toConsumableArray(fields)); // mark all fields as touched + + if (valid || persistentSubmitErrors) { + var _ret = function () { + var doSubmit = function doSubmit() { + var result = void 0; + try { + result = submit(values, dispatch, props); + } catch (submitError) { + var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; + stopSubmit(error); + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(error, dispatch, submitError, props); + } + if (error || onSubmitFail) { + // if you've provided an onSubmitFail callback, don't re-throw the error + return error; + } else { + throw submitError; + } + } + if (__WEBPACK_IMPORTED_MODULE_0_is_promise___default.a(result)) { + startSubmit(); + return result.then(function (submitResult) { + stopSubmit(); + setSubmitSucceeded(); + if (onSubmitSuccess) { + onSubmitSuccess(submitResult, dispatch, props); + } + return submitResult; + }, function (submitError) { + var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined; + stopSubmit(error); + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(error, dispatch, submitError, props); + } + if (error || onSubmitFail) { + // if you've provided an onSubmitFail callback, don't re-throw the error + return error; + } else { + throw submitError; + } + }); + } else { + setSubmitSucceeded(); + if (onSubmitSuccess) { + onSubmitSuccess(result, dispatch, props); + } + } + return result; + }; + + var asyncValidateResult = asyncValidate && asyncValidate(); + if (asyncValidateResult) { + return { + v: asyncValidateResult.then(function (asyncErrors) { + if (asyncErrors) { + throw asyncErrors; + } + return doSubmit(); + }).catch(function (asyncErrors) { + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(asyncErrors, dispatch, null, props); + } + return Promise.reject(asyncErrors); + }) + }; + } else { + return { + v: doSubmit() + }; + } + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } else { + setSubmitFailed.apply(undefined, _toConsumableArray(fields)); + if (onSubmitFail) { + onSubmitFail(syncErrors, dispatch, null, props); + } + return syncErrors; + } +}; + +/* harmony default export */ __webpack_exports__["a"] = (handleSubmit); + +/***/ }), +/* 594 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +function _extendableBuiltin(cls) { + function ExtendableBuiltin() { + cls.apply(this, arguments); + } + + ExtendableBuiltin.prototype = Object.create(cls.prototype, { + constructor: { + value: cls, + enumerable: false, + writable: true, + configurable: true + } + }); + + if (Object.setPrototypeOf) { + Object.setPrototypeOf(ExtendableBuiltin, cls); + } else { + ExtendableBuiltin.__proto__ = cls; + } + + return ExtendableBuiltin; +} + +var ExtendableError = function (_extendableBuiltin2) { + _inherits(ExtendableError, _extendableBuiltin2); + + function ExtendableError() { + var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + + _classCallCheck(this, ExtendableError); + + // extending Error is weird and does not propagate `message` + var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message)); + + Object.defineProperty(_this, 'message', { + configurable: true, + enumerable: false, + value: message, + writable: true + }); + + Object.defineProperty(_this, 'name', { + configurable: true, + enumerable: false, + value: _this.constructor.name, + writable: true + }); + + if (Error.hasOwnProperty('captureStackTrace')) { + Error.captureStackTrace(_this, _this.constructor); + return _possibleConstructorReturn(_this); + } + + Object.defineProperty(_this, 'stack', { + configurable: true, + enumerable: false, + value: new Error(message).stack, + writable: true + }); + return _this; + } + + return ExtendableError; +}(_extendableBuiltin(Error)); + +exports.default = ExtendableError; +module.exports = exports['default']; + + +/***/ }), +/* 595 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__silenceEvent__ = __webpack_require__(276); + + +var silenceEvents = function silenceEvents(fn) { + return function (event) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return __WEBPACK_IMPORTED_MODULE_0__silenceEvent__["a" /* default */](event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args)); + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (silenceEvents); + +/***/ }), +/* 596 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(176); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__); + + +var asyncValidation = function asyncValidation(fn, start, stop, field) { + start(field); + var promise = fn(); + if (!__WEBPACK_IMPORTED_MODULE_0_is_promise___default.a(promise)) { + throw new Error('asyncValidate function passed to reduxForm must return a promise'); + } + var handleErrors = function handleErrors(rejected) { + return function (errors) { + if (errors && Object.keys(errors).length) { + stop(errors); + return errors; + } else if (rejected) { + stop(); + throw new Error('Asynchronous validation promise was rejected without errors.'); + } + stop(); + return Promise.resolve(); + }; + }; + return promise.then(handleErrors(false), handleErrors(true)); +}; + +/* harmony default export */ __webpack_exports__["a"] = (asyncValidation); + +/***/ }), +/* 597 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var defaultShouldAsyncValidate = function defaultShouldAsyncValidate(_ref) { + var initialized = _ref.initialized, + trigger = _ref.trigger, + pristine = _ref.pristine, + syncValidationPasses = _ref.syncValidationPasses; + + if (!syncValidationPasses) { + return false; + } + switch (trigger) { + case 'blur': + // blurring + return true; + case 'submit': + // submitting, so only async validate if form is dirty or was never initialized + // conversely, DON'T async validate if the form is pristine just as it was initialized + return !pristine || !initialized; + default: + return false; + } +}; + +/* harmony default export */ __webpack_exports__["a"] = (defaultShouldAsyncValidate); + +/***/ }), +/* 598 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var defaultShouldValidate = function defaultShouldValidate(_ref) { + var values = _ref.values, + nextProps = _ref.nextProps, + initialRender = _ref.initialRender, + lastFieldValidatorKeys = _ref.lastFieldValidatorKeys, + fieldValidatorKeys = _ref.fieldValidatorKeys, + structure = _ref.structure; + + if (initialRender) { + return true; + } + return !structure.deepEqual(values, nextProps.values) || !structure.deepEqual(lastFieldValidatorKeys, fieldValidatorKeys); +}; + +/* harmony default export */ __webpack_exports__["a"] = (defaultShouldValidate); + +/***/ }), +/* 599 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var splice = function splice(array, index, removeNum, value) { + array = array || []; + + if (index < array.length) { + if (value === undefined && !removeNum) { + // inserting undefined + var _copy2 = [].concat(_toConsumableArray(array)); + _copy2.splice(index, 0, null); + _copy2[index] = undefined; + return _copy2; + } + if (value != null) { + var _copy3 = [].concat(_toConsumableArray(array)); + _copy3.splice(index, removeNum, value); // removing and adding + return _copy3; + } + var _copy = [].concat(_toConsumableArray(array)); + _copy.splice(index, removeNum); // removing + return _copy; + } + if (removeNum) { + // trying to remove non-existant item: return original array + return array; + } + // trying to add outside of range: just set value + var copy = [].concat(_toConsumableArray(array)); + copy[index] = value; + return copy; +}; + +/* harmony default export */ __webpack_exports__["a"] = (splice); + +/***/ }), +/* 600 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(107); + + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var setInWithPath = function setInWithPath(state, value, path, pathIndex) { + if (pathIndex >= path.length) { + return value; + } + + var first = path[pathIndex]; + var next = setInWithPath(state && state[first], value, path, pathIndex + 1); + + if (!state) { + var initialized = isNaN(first) ? {} : []; + initialized[first] = next; + return initialized; + } + + if (Array.isArray(state)) { + var copy = [].concat(state); + copy[first] = next; + return copy; + } + + return _extends({}, state, _defineProperty({}, first, next)); +}; + +var setIn = function setIn(state, field, value) { + return setInWithPath(state, value, __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field), 0); +}; + +/* harmony default export */ __webpack_exports__["a"] = (setIn); + +/***/ }), +/* 601 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(279); + + + +var customizer = function customizer(obj, other) { + if (obj === other) return true; + if ((obj == null || obj === '' || obj === false) && (other == null || other === '' || other === false)) return true; + + if (obj && other && obj._error !== other._error) return false; + if (obj && other && obj._warning !== other._warning) return false; +}; + +var deepEqual = function deepEqual(a, b) { + return __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](a, b, customizer); +}; + +/* harmony default export */ __webpack_exports__["a"] = (deepEqual); + +/***/ }), +/* 602 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(107); + + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var deleteInWithPath = function deleteInWithPath(state, first) { + for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + rest[_key - 2] = arguments[_key]; + } + + if (state === undefined || first === undefined) { + return state; + } + if (rest.length) { + if (Array.isArray(state)) { + if (first < state.length) { + var result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); + if (result !== state[first]) { + var copy = [].concat(_toConsumableArray(state)); + copy[first] = result; + return copy; + } + } + return state; + } + if (first in state) { + var _result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest)); + return state[first] === _result ? state : _extends({}, state, _defineProperty({}, first, _result)); + } + return state; + } + if (Array.isArray(state)) { + if (isNaN(first)) { + throw new Error('Cannot delete non-numerical index from an array'); + } + if (first < state.length) { + var _copy = [].concat(_toConsumableArray(state)); + _copy.splice(first, 1); + return _copy; + } + return state; + } + if (first in state) { + var _copy2 = _extends({}, state); + delete _copy2[first]; + return _copy2; + } + return state; +}; + +var deleteIn = function deleteIn(state, field) { + return deleteInWithPath.apply(undefined, [state].concat(_toConsumableArray(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field)))); +}; + +/* harmony default export */ __webpack_exports__["a"] = (deleteIn); + +/***/ }), +/* 603 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var keys = function keys(value) { + return value ? Object.keys(value) : []; +}; + +/* harmony default export */ __webpack_exports__["a"] = (keys); + +/***/ }), +/* 604 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain__ = __webpack_require__(45); + + +var toArray = function toArray(value) { + return Array.isArray(value) ? value : [value]; +}; + +var getError = function getError(value, values, props, validators) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = toArray(validators)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var validator = _step.value; + + var error = validator(value, values, props); + if (error) { + return error; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } +}; + +var generateValidator = function generateValidator(validators, _ref) { + var getIn = _ref.getIn; + return function (values, props) { + var errors = {}; + Object.keys(validators).forEach(function (name) { + var value = getIn(values, name); + var error = getError(value, values, props, validators[name]); + if (error) { + errors = __WEBPACK_IMPORTED_MODULE_0__structure_plain__["a" /* default */].setIn(errors, name, error); + } + }); + return errors; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (generateValidator); + +/***/ }), +/* 605 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain_getIn__ = __webpack_require__(278); + + +var getErrorKeys = function getErrorKeys(name, type) { + switch (type) { + case 'Field': + return [name, name + '._error']; + case 'FieldArray': + return [name + '._error']; + } +}; + +var createHasError = function createHasError(_ref) { + var getIn = _ref.getIn; + + var hasError = function hasError(field, syncErrors, asyncErrors, submitErrors) { + if (!syncErrors && !asyncErrors && !submitErrors) { + return false; + } + + var name = getIn(field, 'name'); + var type = getIn(field, 'type'); + return getErrorKeys(name, type).some(function (key) { + return __WEBPACK_IMPORTED_MODULE_0__structure_plain_getIn__["a" /* default */](syncErrors, key) || getIn(asyncErrors, key) || getIn(submitErrors, key); + }); + }; + return hasError; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createHasError); + +/***/ }), +/* 606 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(82); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedField__ = __webpack_require__(607); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(115); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + +var createField = function createField(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + setIn = _ref.setIn, + toJS = _ref.toJS; + + + var ConnectedField = __WEBPACK_IMPORTED_MODULE_2__ConnectedField__["a" /* default */]({ + deepEqual: deepEqual, + getIn: getIn, + toJS: toJS + }); + + var Field = function (_Component) { + _inherits(Field, _Component); + + function Field(props, context) { + _classCallCheck(this, Field); + + var _this = _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Field must be inside a component decorated with reduxForm()'); + } + + _this.normalize = _this.normalize.bind(_this); + return _this; + } + + _createClass(Field, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; + + this.context._reduxForm.register(this.name, 'Field', function () { + return _this2.props.validate; + }, function () { + return _this2.props.warn; + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.name !== nextProps.name) { + // unregister old name + this.context._reduxForm.unregister(this.name); + // register new name + this.context._reduxForm.register(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, nextProps.name), 'Field'); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context._reduxForm.unregister(this.name); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Field'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'normalize', + value: function normalize(name, value) { + var normalize = this.props.normalize; + + if (!normalize) { + return value; + } + var previousValues = this.context._reduxForm.getValues(); + var previousValue = this.value; + var nextValues = setIn(previousValues, name, value); + return normalize(value, previousValue, nextValues, previousValues); + } + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedField, _extends({}, this.props, { + name: this.name, + normalize: this.normalize, + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'name', + get: function get() { + return __WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, this.props.name); + } + }, { + key: 'dirty', + get: function get() { + return !this.pristine; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.connected.getWrappedInstance().isPristine(); + } + }, { + key: 'value', + get: function get() { + return this.refs.connected && this.refs.connected.getWrappedInstance().getValue(); + } + }]); + + return Field; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + Field.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + format: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + normalize: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onBlur: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onChange: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onFocus: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onDragStart: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + onDrop: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + parse: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + Field.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + + return Field; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createField); + +/***/ }), +/* 607 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(36); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createFieldProps__ = __webpack_require__(280); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__structure_plain__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(281); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__ = __webpack_require__(610); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + + +var propsToNotUpdateFor = ['_reduxForm']; + +var createConnectedField = function createConnectedField(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS; + + + var getSyncError = function getSyncError(syncErrors, name) { + var error = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncErrors, name); + // Because the error for this field might not be at a level in the error structure where + // it can be set directly, it might need to be unwrapped from the _error property + return error && error._error ? error._error : error; + }; + + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + var warning = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncWarnings, name); + // Because the warning for this field might not be at a level in the warning structure where + // it can be set directly, it might need to be unwrapped from the _warning property + return warning && warning._warning ? warning._warning : warning; + }; + + var ConnectedField = function (_Component) { + _inherits(ConnectedField, _Component); + + function ConnectedField(props) { + _classCallCheck(this, ConnectedField); + + var _this = _possibleConstructorReturn(this, (ConnectedField.__proto__ || Object.getPrototypeOf(ConnectedField)).call(this, props)); + + _this.handleChange = _this.handleChange.bind(_this); + _this.handleFocus = _this.handleFocus.bind(_this); + _this.handleBlur = _this.handleBlur.bind(_this); + _this.handleDragStart = _this.handleDragStart.bind(_this); + _this.handleDrop = _this.handleDrop.bind(_this); + return _this; + } + + _createClass(ConnectedField, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this2 = this; + + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); + }); + } + }, { + key: 'isPristine', + value: function isPristine() { + return this.props.pristine; + } + }, { + key: 'getValue', + value: function getValue() { + return this.props.value; + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'handleChange', + value: function handleChange(event) { + var _props = this.props, + name = _props.name, + dispatch = _props.dispatch, + parse = _props.parse, + normalize = _props.normalize, + onChange = _props.onChange, + _reduxForm = _props._reduxForm, + previousValue = _props.value; + + var newValue = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); + + var defaultPrevented = false; + if (onChange) { + onChange(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + }), newValue, previousValue); + } + if (!defaultPrevented) { + // dispatch change action + dispatch(_reduxForm.change(name, newValue)); + } + } + }, { + key: 'handleFocus', + value: function handleFocus(event) { + var _props2 = this.props, + name = _props2.name, + dispatch = _props2.dispatch, + onFocus = _props2.onFocus, + _reduxForm = _props2._reduxForm; + + + var defaultPrevented = false; + if (onFocus) { + onFocus(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + })); + } + + if (!defaultPrevented) { + dispatch(_reduxForm.focus(name)); + } + } + }, { + key: 'handleBlur', + value: function handleBlur(event) { + var _props3 = this.props, + name = _props3.name, + dispatch = _props3.dispatch, + parse = _props3.parse, + normalize = _props3.normalize, + onBlur = _props3.onBlur, + _reduxForm = _props3._reduxForm, + _value = _props3._value, + previousValue = _props3.value; + + var newValue = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); + + // for checkbox and radio, if the value property of checkbox or radio equals + // the value passed by blur event, then fire blur action with previousValue. + if (newValue === _value && _value !== undefined) { + newValue = previousValue; + } + + var defaultPrevented = false; + if (onBlur) { + onBlur(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + }), newValue, previousValue); + } + + if (!defaultPrevented) { + // dispatch blur action + dispatch(_reduxForm.blur(name, newValue)); + + // call post-blur callback + if (_reduxForm.asyncValidate) { + _reduxForm.asyncValidate(name, newValue); + } + } + } + }, { + key: 'handleDragStart', + value: function handleDragStart(event) { + var _props4 = this.props, + onDragStart = _props4.onDragStart, + value = _props4.value; + + event.dataTransfer.setData(__WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */], value == null ? '' : value); + + if (onDragStart) { + onDragStart(event); + } + } + }, { + key: 'handleDrop', + value: function handleDrop(event) { + var _props5 = this.props, + name = _props5.name, + dispatch = _props5.dispatch, + onDrop = _props5.onDrop, + _reduxForm = _props5._reduxForm, + previousValue = _props5.value; + + var newValue = event.dataTransfer.getData(__WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */]); + + var defaultPrevented = false; + if (onDrop) { + onDrop(_extends({}, event, { + preventDefault: function preventDefault() { + defaultPrevented = true; + return event.preventDefault(); + } + }), newValue, previousValue); + } + + if (!defaultPrevented) { + // dispatch change action + dispatch(_reduxForm.change(name, newValue)); + event.preventDefault(); + } + } + }, { + key: 'render', + value: function render() { + var _props6 = this.props, + component = _props6.component, + withRef = _props6.withRef, + name = _props6.name, + _reduxForm = _props6._reduxForm, + normalize = _props6.normalize, + onBlur = _props6.onBlur, + onChange = _props6.onChange, + onFocus = _props6.onFocus, + onDragStart = _props6.onDragStart, + onDrop = _props6.onDrop, + rest = _objectWithoutProperties(_props6, ['component', 'withRef', 'name', '_reduxForm', 'normalize', 'onBlur', 'onChange', 'onFocus', 'onDragStart', 'onDrop']); + + var _createFieldProps = __WEBPACK_IMPORTED_MODULE_2__createFieldProps__["a" /* default */]({ getIn: getIn, toJS: toJS }, name, _extends({}, rest, { + form: _reduxForm.form, + onBlur: this.handleBlur, + onChange: this.handleChange, + onDrop: this.handleDrop, + onDragStart: this.handleDragStart, + onFocus: this.handleFocus + })), + custom = _createFieldProps.custom, + props = _objectWithoutProperties(_createFieldProps, ['custom']); + + if (withRef) { + custom.ref = 'renderedComponent'; + } + if (typeof component === 'string') { + var input = props.input, + meta = props.meta; // eslint-disable-line no-unused-vars + // flatten input into other props + + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, input, custom)); + } else { + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, props, custom)); + } + } + }]); + + return ConnectedField; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + ConnectedField.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + + var connector = __WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"](function (state, ownProps) { + var name = ownProps.name, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; + + var formState = getFormState(state); + var initialState = getIn(formState, 'initial.' + name); + var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var submitting = getIn(formState, 'submitting'); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var pristine = value === initial; + return { + asyncError: getIn(formState, 'asyncErrors.' + name), + asyncValidating: getIn(formState, 'asyncValidating') === name, + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name), + submitFailed: getIn(formState, 'submitFailed'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + _value: ownProps.value // save value passed in (for checkboxes) + }; + }, undefined, undefined, { withRef: true }); + return connector(ConnectedField); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createConnectedField); + +/***/ }), +/* 608 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(277); + + +var getSelectedValues = function getSelectedValues(options) { + var result = []; + if (options) { + for (var index = 0; index < options.length; index++) { + var option = options[index]; + if (option.selected) { + result.push(option.value); + } + } + } + return result; +}; + +var getValue = function getValue(event, isReactNative) { + if (__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */](event)) { + if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) { + return event.nativeEvent.text; + } + if (isReactNative && event.nativeEvent !== undefined) { + return event.nativeEvent.text; + } + var _event$target = event.target, + type = _event$target.type, + value = _event$target.value, + checked = _event$target.checked, + files = _event$target.files, + dataTransfer = event.dataTransfer; + + if (type === 'checkbox') { + return checked; + } + if (type === 'file') { + return files || dataTransfer && dataTransfer.files; + } + if (type === 'select-multiple') { + return getSelectedValues(event.target.options); + } + return value; + } + return event; +}; + +/* harmony default export */ __webpack_exports__["a"] = (getValue); + +/***/ }), +/* 609 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var isReactNative = typeof window !== 'undefined' && window.navigator && window.navigator.product && window.navigator.product === 'ReactNative'; + +/* harmony default export */ __webpack_exports__["a"] = (isReactNative); + +/***/ }), +/* 610 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dataKey; }); +var dataKey = 'text'; + +/***/ }), +/* 611 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(82); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedFields__ = __webpack_require__(612); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__structure_plain__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_prefixName__ = __webpack_require__(115); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + + +var validateNameProp = function validateNameProp(prop) { + if (!prop) { + return new Error('No "names" prop was specified <Fields/>'); + } + if (!Array.isArray(prop) && !prop._isFieldArray) { + return new Error('Invalid prop "names" supplied to <Fields/>. Must be either an array of strings or the fields array generated by FieldArray.'); + } +}; + +var createFields = function createFields(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS, + size = _ref.size; + + + var ConnectedFields = __WEBPACK_IMPORTED_MODULE_2__ConnectedFields__["a" /* default */]({ + deepEqual: deepEqual, + getIn: getIn, + toJS: toJS, + size: size + }); + + var Fields = function (_Component) { + _inherits(Fields, _Component); + + function Fields(props, context) { + _classCallCheck(this, Fields); + + var _this = _possibleConstructorReturn(this, (Fields.__proto__ || Object.getPrototypeOf(Fields)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Fields must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(Fields, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var error = validateNameProp(this.props.names); + if (error) { + throw error; + } + var context = this.context; + var register = context._reduxForm.register; + + this.names.forEach(function (name) { + return register(name, 'Field'); + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; + + if (!__WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].deepEqual(this.props.names, nextProps.names)) { + (function () { + var context = _this2.context; + var _context$_reduxForm = context._reduxForm, + register = _context$_reduxForm.register, + unregister = _context$_reduxForm.unregister; + // unregister old name + + _this2.props.names.forEach(function (name) { + return unregister(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name)); + }); + // register new name + nextProps.names.forEach(function (name) { + return register(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name), 'Field'); + }); + })(); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + var context = this.context; + var unregister = context._reduxForm.unregister; + + this.props.names.forEach(function (name) { + return unregister(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name)); + }); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Fields'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'render', + value: function render() { + var context = this.context; + + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedFields, _extends({}, this.props, { + names: this.props.names.map(function (name) { + return __WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name); + }), + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'names', + get: function get() { + var context = this.context; + + return this.props.names.map(function (name) { + return __WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name); + }); + } + }, { + key: 'dirty', + get: function get() { + return this.refs.connected.getWrappedInstance().isDirty(); + } + }, { + key: 'pristine', + get: function get() { + return !this.dirty; + } + }, { + key: 'values', + get: function get() { + return this.refs.connected && this.refs.connected.getWrappedInstance().getValues(); + } + }]); + + return Fields; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + Fields.propTypes = { + names: function names(props, propName) { + return validateNameProp(props[propName]); + }, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + format: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + parse: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + Fields.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + + return Fields; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFields); + +/***/ }), +/* 612 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(36); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createFieldProps__ = __webpack_require__(280); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__structure_plain__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(281); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + +var propsToNotUpdateFor = ['_reduxForm']; + +var createConnectedFields = function createConnectedFields(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + toJS = _ref.toJS, + size = _ref.size; + + + var getSyncError = function getSyncError(syncErrors, name) { + var error = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncErrors, name); + // Because the error for this field might not be at a level in the error structure where + // it can be set directly, it might need to be unwrapped from the _error property + return error && error._error ? error._error : error; + }; + + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + var warning = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncWarnings, name); + // Because the warning for this field might not be at a level in the warning structure where + // it can be set directly, it might need to be unwrapped from the _warning property + return warning && warning._warning ? warning._warning : warning; + }; + + var ConnectedFields = function (_Component) { + _inherits(ConnectedFields, _Component); + + function ConnectedFields(props) { + _classCallCheck(this, ConnectedFields); + + var _this = _possibleConstructorReturn(this, (ConnectedFields.__proto__ || Object.getPrototypeOf(ConnectedFields)).call(this, props)); + + _this.handleChange = _this.handleChange.bind(_this); + _this.handleFocus = _this.handleFocus.bind(_this); + _this.handleBlur = _this.handleBlur.bind(_this); + + _this.onChangeFns = props.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this.handleChange(name, event); + }; + return acc; + }, {}); + + _this.onFocusFns = props.names.reduce(function (acc, name) { + acc[name] = function () { + return _this.handleFocus(name); + }; + return acc; + }, {}); + + _this.onBlurFns = props.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this.handleBlur(name, event); + }; + return acc; + }, {}); + return _this; + } + + _createClass(ConnectedFields, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var _this2 = this; + + if (this.props.names !== nextProps.names && (size(this.props.names) !== size(nextProps.names) || nextProps.names.some(function (nextName) { + return !_this2.props._fields[nextName]; + }))) { + + // names is changed. The cached event handlers need to be updated + this.onChangeFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this2.handleChange(name, event); + }; + return acc; + }, {}); + + this.onFocusFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function () { + return _this2.handleFocus(name); + }; + return acc; + }, {}); + + this.onBlurFns = nextProps.names.reduce(function (acc, name) { + acc[name] = function (event) { + return _this2.handleBlur(name, event); + }; + return acc; + }, {}); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this3 = this; + + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]); + }); + } + }, { + key: 'isDirty', + value: function isDirty() { + var _fields = this.props._fields; + + return Object.keys(_fields).some(function (name) { + return _fields[name].dirty; + }); + } + }, { + key: 'getValues', + value: function getValues() { + var _fields = this.props._fields; + + return Object.keys(_fields).reduce(function (accumulator, name) { + return __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].setIn(accumulator, name, _fields[name].value); + }, {}); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'handleChange', + value: function handleChange(name, event) { + var _props = this.props, + dispatch = _props.dispatch, + parse = _props.parse, + normalize = _props.normalize, + _reduxForm = _props._reduxForm; + + var value = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); + + dispatch(_reduxForm.change(name, value)); + } + }, { + key: 'handleFocus', + value: function handleFocus(name) { + var _props2 = this.props, + dispatch = _props2.dispatch, + _reduxForm = _props2._reduxForm; + + dispatch(_reduxForm.focus(name)); + } + }, { + key: 'handleBlur', + value: function handleBlur(name, event) { + var _props3 = this.props, + dispatch = _props3.dispatch, + parse = _props3.parse, + normalize = _props3.normalize, + _reduxForm = _props3._reduxForm; + + var value = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize }); + + // dispatch blur action + dispatch(_reduxForm.blur(name, value)); + + // call post-blur callback + if (_reduxForm.asyncValidate) { + _reduxForm.asyncValidate(name, value); + } + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + + var _props4 = this.props, + component = _props4.component, + withRef = _props4.withRef, + _fields = _props4._fields, + _reduxForm = _props4._reduxForm, + rest = _objectWithoutProperties(_props4, ['component', 'withRef', '_fields', '_reduxForm']); + + var sectionPrefix = _reduxForm.sectionPrefix; + + var _Object$keys$reduce = Object.keys(_fields).reduce(function (accumulator, name) { + var connectedProps = _fields[name]; + + var _createFieldProps = __WEBPACK_IMPORTED_MODULE_2__createFieldProps__["a" /* default */]({ getIn: getIn, toJS: toJS }, name, _extends({}, connectedProps, rest, { + onBlur: _this4.onBlurFns[name], + onChange: _this4.onChangeFns[name], + onFocus: _this4.onFocusFns[name] + })), + custom = _createFieldProps.custom, + fieldProps = _objectWithoutProperties(_createFieldProps, ['custom']); + + accumulator.custom = custom; + var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; + return __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].setIn(accumulator, fieldName, fieldProps); + }, {}), + custom = _Object$keys$reduce.custom, + props = _objectWithoutProperties(_Object$keys$reduce, ['custom']); + + if (withRef) { + props.ref = 'renderedComponent'; + } + + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, props, custom)); + } + }]); + + return ConnectedFields; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + ConnectedFields.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired, + _fields: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object.isRequired, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + + var connector = __WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"](function (state, ownProps) { + var names = ownProps.names, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; + + var formState = getFormState(state); + return { + _fields: names.reduce(function (accumulator, name) { + var initialState = getIn(formState, 'initial.' + name); + var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var submitting = getIn(formState, 'submitting'); + var pristine = value === initial; + accumulator[name] = { + asyncError: getIn(formState, 'asyncErrors.' + name), + asyncValidating: getIn(formState, 'asyncValidating') === name, + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name), + submitFailed: getIn(formState, 'submitFailed'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + _value: ownProps.value // save value passed in (for checkboxes) + }; + return accumulator; + }, {}) + }; + }, undefined, undefined, { withRef: true }); + return connector(ConnectedFields); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createConnectedFields); + +/***/ }), +/* 613 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(82); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedFieldArray__ = __webpack_require__(614); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(178); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(115); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + + + + + + +var toArray = function toArray(value) { + return Array.isArray(value) ? value : [value]; +}; + +var wrapError = function wrapError(fn, key) { + return fn && function () { + var validators = toArray(fn); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = validators[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var validator = _step.value; + + var result = validator.apply(undefined, arguments); + if (result) { + return _defineProperty({}, key, result); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + }; +}; + +var createFieldArray = function createFieldArray(_ref2) { + var deepEqual = _ref2.deepEqual, + getIn = _ref2.getIn, + size = _ref2.size; + + + var ConnectedFieldArray = __WEBPACK_IMPORTED_MODULE_2__ConnectedFieldArray__["a" /* default */]({ deepEqual: deepEqual, getIn: getIn, size: size }); + + var FieldArray = function (_Component) { + _inherits(FieldArray, _Component); + + function FieldArray(props, context) { + _classCallCheck(this, FieldArray); + + var _this = _possibleConstructorReturn(this, (FieldArray.__proto__ || Object.getPrototypeOf(FieldArray)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('FieldArray must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(FieldArray, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState) { + return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState); + } + }, { + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; + + this.context._reduxForm.register(this.name, 'FieldArray', function () { + return wrapError(_this2.props.validate, '_error'); + }, function () { + return wrapError(_this2.props.warn, '_warning'); + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.name !== nextProps.name) { + // unregister old name + this.context._reduxForm.unregister(this.name); + // register new name + this.context._reduxForm.register(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, nextProps.name), 'FieldArray'); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.context._reduxForm.unregister(this.name); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to FieldArray'); + return this.refs.connected.getWrappedInstance().getRenderedComponent(); + } + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedFieldArray, _extends({}, this.props, { + name: this.name, + syncError: this.syncError, + syncWarning: this.syncWarning, + _reduxForm: this.context._reduxForm, + ref: 'connected' + })); + } + }, { + key: 'name', + get: function get() { + return __WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, this.props.name); + } + }, { + key: 'dirty', + get: function get() { + return this.refs.connected.getWrappedInstance().dirty; + } + }, { + key: 'pristine', + get: function get() { + return this.refs.connected.getWrappedInstance().pristine; + } + }, { + key: 'value', + get: function get() { + return this.refs.connected.getWrappedInstance().value; + } + }]); + + return FieldArray; + }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + + FieldArray.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired, + props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + FieldArray.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object + }; + + return FieldArray; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFieldArray); + +/***/ }), +/* 614 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__ = __webpack_require__(268); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(36); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux__ = __webpack_require__(157); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createFieldArrayProps__ = __webpack_require__(615); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__structure_plain__ = __webpack_require__(45); + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + + + +var propsToNotUpdateFor = ['_reduxForm', 'value']; + +var createConnectedFieldArray = function createConnectedFieldArray(_ref) { + var deepEqual = _ref.deepEqual, + getIn = _ref.getIn, + size = _ref.size; + + + var getSyncError = function getSyncError(syncErrors, name) { + // For an array, the error can _ONLY_ be under _error. + // This is why this getSyncError is not the same as the + // one in Field. + return __WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error'); + }; + + var getSyncWarning = function getSyncWarning(syncWarnings, name) { + // For an array, the warning can _ONLY_ be under _warning. + // This is why this getSyncError is not the same as the + // one in Field. + return __WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].getIn(syncWarnings, name + '._warning'); + }; + + var ConnectedFieldArray = function (_Component) { + _inherits(ConnectedFieldArray, _Component); + + function ConnectedFieldArray() { + _classCallCheck(this, ConnectedFieldArray); + + var _this = _possibleConstructorReturn(this, (ConnectedFieldArray.__proto__ || Object.getPrototypeOf(ConnectedFieldArray)).call(this)); + + _this.getValue = _this.getValue.bind(_this); + return _this; + } + + _createClass(ConnectedFieldArray, [{ + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps) { + var _this2 = this; + + var nextPropsKeys = Object.keys(nextProps); + var thisPropsKeys = Object.keys(this.props); + return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) { + // useful to debug rerenders + // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) { + // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ]) + // } + return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]); + }); + } + }, { + key: 'getRenderedComponent', + value: function getRenderedComponent() { + return this.refs.renderedComponent; + } + }, { + key: 'getValue', + value: function getValue(index) { + return this.props.value && getIn(this.props.value, index); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + component = _props.component, + withRef = _props.withRef, + name = _props.name, + _reduxForm = _props._reduxForm, + validate = _props.validate, + warn = _props.warn, + rest = _objectWithoutProperties(_props, ['component', 'withRef', 'name', '_reduxForm', 'validate', 'warn']); + + var props = __WEBPACK_IMPORTED_MODULE_4__createFieldArrayProps__["a" /* default */](getIn, name, _reduxForm.sectionPrefix, this.getValue, rest); + if (withRef) { + props.ref = 'renderedComponent'; + } + return __WEBPACK_IMPORTED_MODULE_1_react__["createElement"](component, props); + } + }, { + key: 'dirty', + get: function get() { + return this.props.dirty; + } + }, { + key: 'pristine', + get: function get() { + return this.props.pristine; + } + }, { + key: 'value', + get: function get() { + return this.props.value; + } + }]); + + return ConnectedFieldArray; + }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); + + ConnectedFieldArray.propTypes = { + component: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].string]).isRequired, + props: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].object + }; + + ConnectedFieldArray.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].object + }; + + var connector = __WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"](function (state, ownProps) { + var name = ownProps.name, + _ownProps$_reduxForm = ownProps._reduxForm, + initialValues = _ownProps$_reduxForm.initialValues, + getFormState = _ownProps$_reduxForm.getFormState; + + var formState = getFormState(state); + var initial = getIn(formState, 'initial.' + name) || initialValues && getIn(initialValues, name); + var value = getIn(formState, 'values.' + name); + var submitting = getIn(formState, 'submitting'); + var syncError = getSyncError(getIn(formState, 'syncErrors'), name); + var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name); + var pristine = deepEqual(value, initial); + return { + asyncError: getIn(formState, 'asyncErrors.' + name + '._error'), + dirty: !pristine, + pristine: pristine, + state: getIn(formState, 'fields.' + name), + submitError: getIn(formState, 'submitErrors.' + name + '._error'), + submitting: submitting, + syncError: syncError, + syncWarning: syncWarning, + value: value, + length: size(value) + }; + }, function (dispatch, ownProps) { + var name = ownProps.name, + _reduxForm = ownProps._reduxForm; + var arrayInsert = _reduxForm.arrayInsert, + arrayMove = _reduxForm.arrayMove, + arrayPop = _reduxForm.arrayPop, + arrayPush = _reduxForm.arrayPush, + arrayRemove = _reduxForm.arrayRemove, + arrayRemoveAll = _reduxForm.arrayRemoveAll, + arrayShift = _reduxForm.arrayShift, + arraySplice = _reduxForm.arraySplice, + arraySwap = _reduxForm.arraySwap, + arrayUnshift = _reduxForm.arrayUnshift; + + return __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__["a" /* default */]({ + arrayInsert: arrayInsert, + arrayMove: arrayMove, + arrayPop: arrayPop, + arrayPush: arrayPush, + arrayRemove: arrayRemove, + arrayRemoveAll: arrayRemoveAll, + arrayShift: arrayShift, + arraySplice: arraySplice, + arraySwap: arraySwap, + arrayUnshift: arrayUnshift + }, function (actionCreator) { + return __WEBPACK_IMPORTED_MODULE_3_redux__["bindActionCreators"](actionCreator.bind(null, name), dispatch); + }); + }, undefined, { withRef: true }); + return connector(ConnectedFieldArray); +}; + +/* harmony default export */ __webpack_exports__["a"] = (createConnectedFieldArray); + +/***/ }), +/* 615 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var createFieldArrayProps = function createFieldArrayProps(getIn, name, sectionPrefix, getValue, _ref) { + var arrayInsert = _ref.arrayInsert, + arrayMove = _ref.arrayMove, + arrayPop = _ref.arrayPop, + arrayPush = _ref.arrayPush, + arrayRemove = _ref.arrayRemove, + arrayRemoveAll = _ref.arrayRemoveAll, + arrayShift = _ref.arrayShift, + arraySplice = _ref.arraySplice, + arraySwap = _ref.arraySwap, + arrayUnshift = _ref.arrayUnshift, + asyncError = _ref.asyncError, + dirty = _ref.dirty, + length = _ref.length, + pristine = _ref.pristine, + submitError = _ref.submitError, + state = _ref.state, + submitFailed = _ref.submitFailed, + submitting = _ref.submitting, + syncError = _ref.syncError, + syncWarning = _ref.syncWarning, + value = _ref.value, + props = _ref.props, + rest = _objectWithoutProperties(_ref, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncError', 'dirty', 'length', 'pristine', 'submitError', 'state', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'value', 'props']); + + var error = syncError || asyncError || submitError; + var warning = syncWarning; + var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name; + var finalProps = _extends({ + fields: { + _isFieldArray: true, + forEach: function forEach(callback) { + return (value || []).forEach(function (item, index) { + return callback(fieldName + '[' + index + ']', index, finalProps.fields); + }); + }, + get: getValue, + getAll: function getAll() { + return value; + }, + insert: arrayInsert, + length: length, + map: function map(callback) { + return (value || []).map(function (item, index) { + return callback(fieldName + '[' + index + ']', index, finalProps.fields); + }); + }, + move: arrayMove, + name: name, + pop: function pop() { + arrayPop(); + return getIn(value, length - 1); + }, + push: arrayPush, + reduce: function reduce(callback, initial) { + return (value || []).reduce(function (accumulator, item, index) { + return callback(accumulator, fieldName + '[' + index + ']', index, finalProps.fields); + }, initial); + }, + remove: arrayRemove, + removeAll: arrayRemoveAll, + shift: function shift() { + arrayShift(); + return getIn(value, 0); + }, + swap: arraySwap, + unshift: arrayUnshift + }, + meta: { + dirty: dirty, + error: error, + warning: warning, + invalid: !!error, + pristine: pristine, + submitting: submitting, + touched: !!(state && getIn(state, 'touched')), + valid: !error + } + }, props, rest); + return finalProps; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFieldArrayProps); + +/***/ }), +/* 616 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(82); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(45); + + + +var createFormValueSelector = function createFormValueSelector(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + + __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(form, 'Form value must be specified'); + return function (state) { + for (var _len = arguments.length, fields = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + fields[_key - 1] = arguments[_key]; + } + + __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(fields.length, 'No fields specified'); + return fields.length === 1 ? + // only selecting one field, so return its value + getIn(getFormState(state), form + '.values.' + fields[0]) : + // selecting many fields, so return an object of field values + fields.reduce(function (accumulator, field) { + var value = getIn(getFormState(state), form + '.values.' + field); + return value === undefined ? accumulator : __WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */].setIn(accumulator, field, value); + }, {}); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createFormValueSelector); + +/***/ }), +/* 617 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(36); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_redux__); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + + +var createValues = function createValues(_ref) { + var getIn = _ref.getIn; + return function (config) { + var _prop$getFormState$co = _extends({ + prop: 'values', + getFormState: function getFormState(state) { + return getIn(state, 'form'); + } + }, config), + form = _prop$getFormState$co.form, + prop = _prop$getFormState$co.prop, + getFormState = _prop$getFormState$co.getFormState; + + return __WEBPACK_IMPORTED_MODULE_0_react_redux__["connect"](function (state) { + return _defineProperty({}, prop, getIn(getFormState(state), form + '.values')); + }, function () { + return {}; + } // ignore dispatch + ); + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createValues); + +/***/ }), +/* 618 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormValues = function createGetFormValues(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.values'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormValues); + +/***/ }), +/* 619 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormInitialValues = function createGetFormInitialValues(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.initial'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormInitialValues); + +/***/ }), +/* 620 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormSyncErrors = function createGetFormSyncErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.syncErrors'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncErrors); + +/***/ }), +/* 621 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormAsyncErrors = function createGetFormAsyncErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.asyncErrors'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormAsyncErrors); + +/***/ }), +/* 622 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createGetFormSubmitErrors = function createGetFormSubmitErrors(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + return getIn(getFormState(state), form + '.submitErrors'); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createGetFormSubmitErrors); + +/***/ }), +/* 623 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPristine__ = __webpack_require__(282); + + +var createIsDirty = function createIsDirty(structure) { + return function (form, getFormState) { + var isPristine = __WEBPACK_IMPORTED_MODULE_0__isPristine__["a" /* default */](structure)(form, getFormState); + return function (state) { + return !isPristine(state); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsDirty); + +/***/ }), +/* 624 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isValid__ = __webpack_require__(177); + + +var createIsInvalid = function createIsInvalid(structure) { + return function (form, getFormState) { + var isValid = __WEBPACK_IMPORTED_MODULE_0__isValid__["a" /* default */](structure)(form, getFormState); + return function (state) { + return !isValid(state); + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsInvalid); + +/***/ }), +/* 625 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createIsSubmitting = function createIsSubmitting(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitting') || false; + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createIsSubmitting); + +/***/ }), +/* 626 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createHasSubmitSucceeded = function createHasSubmitSucceeded(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitSucceeded') || false; + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitSucceeded); + +/***/ }), +/* 627 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +var createHasSubmitFailed = function createHasSubmitFailed(_ref) { + var getIn = _ref.getIn; + return function (form) { + var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) { + return getIn(state, 'form'); + }; + return function (state) { + var formState = getFormState(state); + return getIn(formState, form + '.submitFailed') || false; + }; + }; +}; + +/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitFailed); + +/***/ }), +/* 628 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + +var Form = function (_Component) { + _inherits(Form, _Component); + + function Form(props, context) { + _classCallCheck(this, Form); + + var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('Form must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(Form, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit); + } + }, { + key: 'render', + value: function render() { + return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('form', this.props); + } + }]); + + return Form; +}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + +Form.propTypes = { + onSubmit: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired +}; +Form.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object +}; + +/* harmony default export */ __webpack_exports__["a"] = (Form); + +/***/ }), +/* 629 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_prefixName__ = __webpack_require__(115); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + +var FormSection = function (_Component) { + _inherits(FormSection, _Component); + + function FormSection(props, context) { + _classCallCheck(this, FormSection); + + var _this = _possibleConstructorReturn(this, (FormSection.__proto__ || Object.getPrototypeOf(FormSection)).call(this, props, context)); + + if (!context._reduxForm) { + throw new Error('FormSection must be inside a component decorated with reduxForm()'); + } + return _this; + } + + _createClass(FormSection, [{ + key: 'getChildContext', + value: function getChildContext() { + var context = this.context, + name = this.props.name; + + return { + _reduxForm: _extends({}, context._reduxForm, { + sectionPrefix: __WEBPACK_IMPORTED_MODULE_1__util_prefixName__["a" /* default */](context, name) + }) + }; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + name = _props.name, + component = _props.component, + rest = _objectWithoutProperties(_props, ['children', 'name', 'component']); + + if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(children)) { + return children; + } + + return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, rest, { + children: children + })); + } + }]); + + return FormSection; +}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); + +FormSection.propTypes = { + name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired, + component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]) +}; + +FormSection.defaultProps = { + component: 'div' +}; + +FormSection.childContextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object.isRequired +}; + +FormSection.contextTypes = { + _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object +}; + +/* harmony default export */ __webpack_exports__["a"] = (FormSection); + +/***/ }), +/* 630 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); + +var any = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].any, + bool = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].bool, + func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, + shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape; + + +var propTypes = { + // State: + asyncValidating: bool.isRequired, // true if async validation is running + dirty: bool.isRequired, // true if any values are different from initialValues + error: any, // form-wide error from '_error' key in validation result + warning: any, // form-wide warning from '_warning' key in validation result + invalid: bool.isRequired, // true if there are any validation errors + initialized: bool.isRequired, // true if the form has been initialized + pristine: bool.isRequired, // true if the values are the same as initialValues + submitting: bool.isRequired, // true if the form is in the process of being submitted + submitFailed: bool.isRequired, // true if the form was submitted and failed for any reason + submitSucceeded: bool.isRequired, // true if the form was successfully submitted + valid: bool.isRequired, // true if there are no validation errors + // Actions: + array: shape({ + insert: func.isRequired, // function to insert a value into an array field + move: func.isRequired, // function to move a value within an array field + pop: func.isRequired, // function to pop a value off of an array field + push: func.isRequired, // function to push a value onto an array field + remove: func.isRequired, // function to remove a value from an array field + removeAll: func.isRequired, // function to remove all the values from an array field + shift: func.isRequired, // function to shift a value out of an array field + splice: func.isRequired, // function to splice a value into an array field + swap: func.isRequired, // function to swap values in an array field + unshift: func.isRequired // function to unshift a value into an array field + }), + asyncValidate: func.isRequired, // function to trigger async validation + blur: func.isRequired, // action to mark a field as blurred + change: func.isRequired, // action to change the value of a field + destroy: func.isRequired, // action to destroy the form's data in Redux + dispatch: func.isRequired, // the Redux dispatch action + handleSubmit: func.isRequired, // function to submit the form + initialize: func.isRequired, // action to initialize form data + reset: func.isRequired, // action to reset the form data to previously initialized values + touch: func.isRequired, // action to mark fields as touched + untouch: func.isRequired // action to mark fields as untouched +}; + +/* harmony default export */ __webpack_exports__["a"] = (propTypes); + +/***/ }), +/* 631 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(632); + +/***/ }), +/* 632 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + + +var shallowEqual = __webpack_require__(81); + +/** + * Does a shallow comparison for props and state. + * See ReactComponentWithPureRenderMixin + * See also https://facebook.github.io/react/docs/shallow-compare.html + */ +function shallowCompare(instance, nextProps, nextState) { + return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState); +} + +module.exports = shallowCompare; + +/***/ }), +/* 633 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.passiveOption = exports.detachEvent = exports.attachEvent = exports.removeEventListener = exports.addEventListener = exports.canUseDOM = undefined; + +var _defineProperty = __webpack_require__(634); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Inspired by https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/ExecutionEnvironment.js +var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +var addEventListener = exports.addEventListener = canUseDOM && 'addEventListener' in window; +var removeEventListener = exports.removeEventListener = canUseDOM && 'removeEventListener' in window; + +// IE8+ Support +var attachEvent = exports.attachEvent = canUseDOM && 'attachEvent' in window; +var detachEvent = exports.detachEvent = canUseDOM && 'detachEvent' in window; + +// Passive options +// Inspired by https://github.com/Modernizr/Modernizr/blob/master/feature-detects/dom/passiveeventlisteners.js +var passiveOption = exports.passiveOption = function () { + var cache = null; + + return function () { + if (cache !== null) { + return cache; + } + + var supportsPassiveOption = false; + + try { + window.addEventListener('test', null, (0, _defineProperty2.default)({}, 'passive', { + get: function get() { + supportsPassiveOption = true; + } + })); + } catch (e) {} // eslint-disable-line no-empty + + cache = supportsPassiveOption; + + return supportsPassiveOption; + }(); +}(); + +/***/ }), +/* 634 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _defineProperty = __webpack_require__(138); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +exports.default = defineProperty; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// weak + +function defineProperty(o, p, attr) { + return (0, _defineProperty2.default)(o, p, attr); +} + +/***/ }), +/* 635 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(43); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var rounded = props.rounded, + circle = props.circle, + transitionEnabled = props.transitionEnabled, + zDepth = props.zDepth; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + paper = _context$muiTheme.paper; + + + return { + root: { + color: paper.color, + backgroundColor: paper.backgroundColor, + transition: transitionEnabled && _transitions2.default.easeOut(), + boxSizing: 'border-box', + fontFamily: baseTheme.fontFamily, + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + boxShadow: paper.zDepthShadows[zDepth - 1], // No shadow for 0 depth papers + borderRadius: circle ? '50%' : rounded ? '2px' : '0px' + } + }; +} + +var Paper = function (_Component) { + (0, _inherits3.default)(Paper, _Component); + + function Paper() { + (0, _classCallCheck3.default)(this, Paper); + return (0, _possibleConstructorReturn3.default)(this, (Paper.__proto__ || (0, _getPrototypeOf2.default)(Paper)).apply(this, arguments)); + } + + (0, _createClass3.default)(Paper, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + circle = _props.circle, + rounded = _props.rounded, + style = _props.style, + transitionEnabled = _props.transitionEnabled, + zDepth = _props.zDepth, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'circle', 'rounded', 'style', 'transitionEnabled', 'zDepth']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + children + ); + } + }]); + return Paper; +}(_react.Component); + +Paper.defaultProps = { + circle: false, + rounded: true, + transitionEnabled: true, + zDepth: 1 +}; +Paper.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Paper.propTypes = { + /** + * Children passed into the paper element. + */ + children: _react.PropTypes.node, + /** + * Set to true to generate a circlular paper container. + */ + circle: _react.PropTypes.bool, + /** + * By default, the paper container will have a border radius. + * Set this to false to generate a container with sharp corners. + */ + rounded: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Set to false to disable CSS transitions for the paper element. + */ + transitionEnabled: _react.PropTypes.bool, + /** + * This number represents the zDepth of the paper shadow. + */ + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = Paper; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 636 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + result = wait - timeSinceLastCall; + + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +module.exports = throttle; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46))) + +/***/ }), +/* 637 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(43); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _Paper = __webpack_require__(37); + +var _Paper2 = _interopRequireDefault(_Paper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var targetOrigin = props.targetOrigin; + var open = state.open; + var muiTheme = context.muiTheme; + + var horizontal = targetOrigin.horizontal.replace('middle', 'vertical'); + + return { + root: { + position: 'fixed', + zIndex: muiTheme.zIndex.popover, + opacity: open ? 1 : 0, + transform: open ? 'scale(1, 1)' : 'scale(0, 0)', + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity']), + maxHeight: '100%' + }, + horizontal: { + maxHeight: '100%', + overflowY: 'auto', + transform: open ? 'scaleX(1)' : 'scaleX(0)', + opacity: open ? 1 : 0, + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity']) + }, + vertical: { + opacity: open ? 1 : 0, + transform: open ? 'scaleY(1)' : 'scaleY(0)', + transformOrigin: horizontal + ' ' + targetOrigin.vertical, + transition: _transitions2.default.easeOut('500ms', ['transform', 'opacity']) + } + }; +} + +var PopoverAnimationDefault = function (_Component) { + (0, _inherits3.default)(PopoverAnimationDefault, _Component); + + function PopoverAnimationDefault() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, PopoverAnimationDefault); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PopoverAnimationDefault.__proto__ || (0, _getPrototypeOf2.default)(PopoverAnimationDefault)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(PopoverAnimationDefault, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.setState({ open: true }); // eslint-disable-line react/no-did-mount-set-state + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + this.setState({ + open: nextProps.open + }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + className = _props.className, + style = _props.style, + zDepth = _props.zDepth; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _Paper2.default, + { + style: (0, _simpleAssign2.default)(styles.root, style), + zDepth: zDepth, + className: className + }, + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.horizontal) }, + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.vertical) }, + this.props.children + ) + ) + ); + } + }]); + return PopoverAnimationDefault; +}(_react.Component); + +PopoverAnimationDefault.defaultProps = { + style: {}, + zDepth: 1 +}; +PopoverAnimationDefault.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? PopoverAnimationDefault.propTypes = { + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + targetOrigin: _propTypes2.default.origin.isRequired, + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = PopoverAnimationDefault; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 638 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** +* Returns a number of pixels from the top of the screen for given dom element. +* +* @param {object} dom element +* @returns {number} A position from the top of the screen in pixels +*/ +var getOffsetTop = exports.getOffsetTop = function getOffsetTop(elem) { + var yPos = elem.offsetTop; + var tempEl = elem.offsetParent; + + while (tempEl != null) { + yPos += tempEl.offsetTop; + tempEl = tempEl.offsetParent; + } + + return yPos; +}; + +var isIOS = exports.isIOS = function isIOS() { + return (/iPad|iPhone|iPod/.test(window.navigator.userAgent) && !window.MSStream + ); +}; + +/***/ }), +/* 639 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationCheck = function NavigationCheck(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' }) + ); +}; +NavigationCheck = (0, _pure2.default)(NavigationCheck); +NavigationCheck.displayName = 'NavigationCheck'; +NavigationCheck.muiName = 'SvgIcon'; + +exports.default = NavigationCheck; + +/***/ }), +/* 640 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _react = __webpack_require__(1); + +var _createHelper = __webpack_require__(285); + +var _createHelper2 = _interopRequireDefault(_createHelper); + +var _createEagerFactory = __webpack_require__(643); + +var _createEagerFactory2 = _interopRequireDefault(_createEagerFactory); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var shouldUpdate = function shouldUpdate(test) { + return function (BaseComponent) { + var factory = (0, _createEagerFactory2.default)(BaseComponent); + return function (_Component) { + _inherits(_class, _Component); + + function _class() { + _classCallCheck(this, _class); + + return _possibleConstructorReturn(this, _Component.apply(this, arguments)); + } + + _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return test(this.props, nextProps); + }; + + _class.prototype.render = function render() { + return factory(this.props); + }; + + return _class; + }(_react.Component); + }; +}; + +exports.default = (0, _createHelper2.default)(shouldUpdate, 'shouldUpdate'); + +/***/ }), +/* 641 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _getDisplayName = __webpack_require__(642); + +var _getDisplayName2 = _interopRequireDefault(_getDisplayName); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) { + return hocName + '(' + (0, _getDisplayName2.default)(BaseComponent) + ')'; +}; + +exports.default = wrapDisplayName; + +/***/ }), +/* 642 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var getDisplayName = function getDisplayName(Component) { + if (typeof Component === 'string') { + return Component; + } + + if (!Component) { + return undefined; + } + + return Component.displayName || Component.name || 'Component'; +}; + +exports.default = getDisplayName; + +/***/ }), +/* 643 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _createEagerElementUtil = __webpack_require__(644); + +var _createEagerElementUtil2 = _interopRequireDefault(_createEagerElementUtil); + +var _isReferentiallyTransparentFunctionComponent = __webpack_require__(645); + +var _isReferentiallyTransparentFunctionComponent2 = _interopRequireDefault(_isReferentiallyTransparentFunctionComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createFactory = function createFactory(type) { + var isReferentiallyTransparent = (0, _isReferentiallyTransparentFunctionComponent2.default)(type); + return function (p, c) { + return (0, _createEagerElementUtil2.default)(false, isReferentiallyTransparent, type, p, c); + }; +}; + +exports.default = createFactory; + +/***/ }), +/* 644 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var createEagerElementUtil = function createEagerElementUtil(hasKey, isReferentiallyTransparent, type, props, children) { + if (!hasKey && isReferentiallyTransparent) { + if (children) { + return type(_extends({}, props, { children: children })); + } + return type(props); + } + + var Component = type; + + if (children) { + return _react2.default.createElement( + Component, + props, + children + ); + } + + return _react2.default.createElement(Component, props); +}; + +exports.default = createEagerElementUtil; + +/***/ }), +/* 645 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +exports.__esModule = true; + +var _isClassComponent = __webpack_require__(646); + +var _isClassComponent2 = _interopRequireDefault(_isClassComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isReferentiallyTransparentFunctionComponent = function isReferentiallyTransparentFunctionComponent(Component) { + return Boolean(typeof Component === 'function' && !(0, _isClassComponent2.default)(Component) && !Component.defaultProps && !Component.contextTypes && (process.env.NODE_ENV === 'production' || !Component.propTypes)); +}; + +exports.default = isReferentiallyTransparentFunctionComponent; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 646 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +var isClassComponent = function isClassComponent(Component) { + return Boolean(Component && Component.prototype && typeof Component.prototype.isReactComponent === 'object'); +}; + +exports.default = isClassComponent; + +/***/ }), +/* 647 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SvgIcon = function (_Component) { + (0, _inherits3.default)(SvgIcon, _Component); + + function SvgIcon() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, SvgIcon); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = SvgIcon.__proto__ || (0, _getPrototypeOf2.default)(SvgIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false + }, _this.handleMouseLeave = function (event) { + _this.setState({ hovered: false }); + _this.props.onMouseLeave(event); + }, _this.handleMouseEnter = function (event) { + _this.setState({ hovered: true }); + _this.props.onMouseEnter(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(SvgIcon, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + color = _props.color, + hoverColor = _props.hoverColor, + onMouseEnter = _props.onMouseEnter, + onMouseLeave = _props.onMouseLeave, + style = _props.style, + viewBox = _props.viewBox, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'color', 'hoverColor', 'onMouseEnter', 'onMouseLeave', 'style', 'viewBox']); + var _context$muiTheme = this.context.muiTheme, + svgIcon = _context$muiTheme.svgIcon, + prepareStyles = _context$muiTheme.prepareStyles; + + + var offColor = color ? color : 'currentColor'; + var onColor = hoverColor ? hoverColor : offColor; + + var mergedStyles = (0, _simpleAssign2.default)({ + display: 'inline-block', + color: svgIcon.color, + fill: this.state.hovered ? onColor : offColor, + height: 24, + width: 24, + userSelect: 'none', + transition: _transitions2.default.easeOut() + }, style); + + return _react2.default.createElement( + 'svg', + (0, _extends3.default)({}, other, { + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + style: prepareStyles(mergedStyles), + viewBox: viewBox + }), + children + ); + } + }]); + return SvgIcon; +}(_react.Component); + +SvgIcon.muiName = 'SvgIcon'; +SvgIcon.defaultProps = { + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + viewBox: '0 0 24 24' +}; +SvgIcon.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? SvgIcon.propTypes = { + /** + * Elements passed into the SVG Icon. + */ + children: _react.PropTypes.node, + /** + * This is the fill color of the svg icon. + * If not specified, this component will default + * to muiTheme.palette.textColor. + */ + color: _react.PropTypes.string, + /** + * This is the icon color when the mouse hovers over the icon. + */ + hoverColor: _react.PropTypes.string, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Allows you to redefine what the coordinates + * without units mean inside an svg element. For example, + * if the SVG element is 500 (width) by 200 (height), and you + * pass viewBox="0 0 50 20", this means that the coordinates inside + * the svg will go from the top left corner (0,0) to bottom right (50,20) + * and each unit will be worth 10px. + */ + viewBox: _react.PropTypes.string +} : void 0; +exports.default = SvgIcon; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 648 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(56); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _colorManipulator = __webpack_require__(70); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _EnhancedButton = __webpack_require__(54); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _IconButton = __webpack_require__(83); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _expandLess = __webpack_require__(649); + +var _expandLess2 = _interopRequireDefault(_expandLess); + +var _expandMore = __webpack_require__(650); + +var _expandMore2 = _interopRequireDefault(_expandMore); + +var _NestedList = __webpack_require__(651); + +var _NestedList2 = _interopRequireDefault(_NestedList); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var insetChildren = props.insetChildren, + leftAvatar = props.leftAvatar, + leftCheckbox = props.leftCheckbox, + leftIcon = props.leftIcon, + nestedLevel = props.nestedLevel, + rightAvatar = props.rightAvatar, + rightIcon = props.rightIcon, + rightIconButton = props.rightIconButton, + rightToggle = props.rightToggle, + secondaryText = props.secondaryText, + secondaryTextLines = props.secondaryTextLines; + var muiTheme = context.muiTheme; + var listItem = muiTheme.listItem; + + + var textColor = muiTheme.baseTheme.palette.textColor; + var hoverColor = props.hoverColor || (0, _colorManipulator.fade)(textColor, 0.1); + var singleAvatar = !secondaryText && (leftAvatar || rightAvatar); + var singleNoAvatar = !secondaryText && !(leftAvatar || rightAvatar); + var twoLine = secondaryText && secondaryTextLines === 1; + var threeLine = secondaryText && secondaryTextLines > 1; + + var styles = { + root: { + backgroundColor: (state.isKeyboardFocused || state.hovered) && !state.rightIconButtonHovered && !state.rightIconButtonKeyboardFocused ? hoverColor : null, + color: textColor, + display: 'block', + fontSize: 16, + lineHeight: '16px', + position: 'relative', + transition: _transitions2.default.easeOut() + }, + + // This inner div is needed so that ripples will span the entire container + innerDiv: { + marginLeft: nestedLevel * listItem.nestedLevelDepth, + paddingLeft: leftIcon || leftAvatar || leftCheckbox || insetChildren ? 72 : 16, + paddingRight: rightIcon || rightAvatar || rightIconButton ? 56 : rightToggle ? 72 : 16, + paddingBottom: singleAvatar ? 20 : 16, + paddingTop: singleNoAvatar || threeLine ? 16 : 20, + position: 'relative' + }, + + icons: { + height: 24, + width: 24, + display: 'block', + position: 'absolute', + top: twoLine ? 12 : singleAvatar ? 4 : 0, + margin: 12 + }, + + leftIcon: { + left: 4 + }, + + rightIcon: { + right: 4 + }, + + avatars: { + position: 'absolute', + top: singleAvatar ? 8 : 16 + }, + + label: { + cursor: 'pointer' + }, + + leftAvatar: { + left: 16 + }, + + rightAvatar: { + right: 16 + }, + + leftCheckbox: { + position: 'absolute', + display: 'block', + width: 24, + top: twoLine ? 24 : singleAvatar ? 16 : 12, + left: 16 + }, + + primaryText: {}, + + rightIconButton: { + position: 'absolute', + display: 'block', + top: twoLine ? 12 : singleAvatar ? 4 : 0, + right: 4 + }, + + rightToggle: { + position: 'absolute', + display: 'block', + width: 54, + top: twoLine ? 25 : singleAvatar ? 17 : 13, + right: 8 + }, + + secondaryText: { + fontSize: 14, + lineHeight: threeLine ? '18px' : '16px', + height: threeLine ? 36 : 16, + margin: 0, + marginTop: 4, + color: listItem.secondaryTextColor, + + // needed for 2 and 3 line ellipsis + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: threeLine ? null : 'nowrap', + display: threeLine ? '-webkit-box' : null, + WebkitLineClamp: threeLine ? 2 : null, + WebkitBoxOrient: threeLine ? 'vertical' : null + } + }; + + return styles; +} + +var ListItem = function (_Component) { + (0, _inherits3.default)(ListItem, _Component); + + function ListItem() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ListItem); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ListItem.__proto__ || (0, _getPrototypeOf2.default)(ListItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + open: false, + rightIconButtonHovered: false, + rightIconButtonKeyboardFocused: false, + touch: false + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + _this.props.onKeyboardFocus(event, isKeyboardFocused); + }, _this.handleMouseEnter = function (event) { + if (!_this.state.touch) _this.setState({ hovered: true }); + _this.props.onMouseEnter(event); + }, _this.handleMouseLeave = function (event) { + _this.setState({ hovered: false }); + _this.props.onMouseLeave(event); + }, _this.handleNestedListToggle = function (event) { + event.stopPropagation(); + + if (_this.props.open === null) { + _this.setState({ open: !_this.state.open }, function () { + _this.props.onNestedListToggle(_this); + }); + } else { + // Exposing `this` in the callback is quite a bad API. + // I'm doing a one level deep clone to expose a fake state.open. + _this.props.onNestedListToggle((0, _extends3.default)({}, _this, { + state: { + open: !_this.state.open + } + })); + } + }, _this.handleRightIconButtonKeyboardFocus = function (event, isKeyboardFocused) { + if (isKeyboardFocused) { + _this.setState({ + isKeyboardFocused: false, + rightIconButtonKeyboardFocused: isKeyboardFocused + }); + } + + var iconButton = _this.props.rightIconButton; + + if (iconButton && iconButton.props.onKeyboardFocus) iconButton.props.onKeyboardFocus(event, isKeyboardFocused); + }, _this.handleRightIconButtonMouseLeave = function (event) { + var iconButton = _this.props.rightIconButton; + _this.setState({ rightIconButtonHovered: false }); + if (iconButton && iconButton.props.onMouseLeave) iconButton.props.onMouseLeave(event); + }, _this.handleRightIconButtonMouseEnter = function (event) { + var iconButton = _this.props.rightIconButton; + _this.setState({ rightIconButtonHovered: true }); + if (iconButton && iconButton.props.onMouseEnter) iconButton.props.onMouseEnter(event); + }, _this.handleRightIconButtonMouseUp = function (event) { + var iconButton = _this.props.rightIconButton; + event.stopPropagation(); + if (iconButton && iconButton.props.onMouseUp) iconButton.props.onMouseUp(event); + }, _this.handleRightIconButtonTouchTap = function (event) { + var iconButton = _this.props.rightIconButton; + + // Stop the event from bubbling up to the list-item + event.stopPropagation(); + if (iconButton && iconButton.props.onTouchTap) iconButton.props.onTouchTap(event); + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); + _this.props.onTouchStart(event); + }, _this.handleTouchEnd = function (event) { + _this.setState({ touch: true }); + _this.props.onTouchEnd(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ListItem, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + open: this.props.open === null ? this.props.initiallyOpen === true : this.props.open + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + // update the state when the component is controlled. + if (nextProps.open !== null) this.setState({ open: nextProps.open }); + if (nextProps.disabled && this.state.hovered) this.setState({ hovered: false }); + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + + // This method is needed by the `MenuItem` component. + + }, { + key: 'applyFocusState', + value: function applyFocusState(focusState) { + var button = this.refs.enhancedButton; + + if (button) { + var buttonEl = _reactDom2.default.findDOMNode(button); + + switch (focusState) { + case 'none': + buttonEl.blur(); + break; + case 'focused': + buttonEl.focus(); + break; + case 'keyboard-focused': + button.setKeyboardFocus(); + buttonEl.focus(); + break; + } + } + } + }, { + key: 'createDisabledElement', + value: function createDisabledElement(styles, contentChildren, additionalProps) { + var _props = this.props, + innerDivStyle = _props.innerDivStyle, + style = _props.style; + + + var mergedDivStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, style); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, additionalProps, { + style: this.context.muiTheme.prepareStyles(mergedDivStyles) + }), + contentChildren + ); + } + }, { + key: 'createLabelElement', + value: function createLabelElement(styles, contentChildren, additionalProps) { + var _props2 = this.props, + innerDivStyle = _props2.innerDivStyle, + style = _props2.style; + + + var mergedLabelStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, styles.label, style); + + return _react2.default.createElement( + 'label', + (0, _extends3.default)({}, additionalProps, { + style: this.context.muiTheme.prepareStyles(mergedLabelStyles) + }), + contentChildren + ); + } + }, { + key: 'createTextElement', + value: function createTextElement(styles, data, key) { + var prepareStyles = this.context.muiTheme.prepareStyles; + + if (_react2.default.isValidElement(data)) { + var style = (0, _simpleAssign2.default)({}, styles, data.props.style); + if (typeof data.type === 'string') { + // if element is a native dom node + style = prepareStyles(style); + } + return _react2.default.cloneElement(data, { + key: key, + style: style + }); + } + + return _react2.default.createElement( + 'div', + { key: key, style: prepareStyles(styles) }, + data + ); + } + }, { + key: 'pushElement', + value: function pushElement(children, element, baseStyles, additionalProps) { + if (element) { + var styles = (0, _simpleAssign2.default)({}, baseStyles, element.props.style); + children.push(_react2.default.cloneElement(element, (0, _extends3.default)({ + key: children.length, + style: styles + }, additionalProps))); + } + } + }, { + key: 'render', + value: function render() { + var _props3 = this.props, + autoGenerateNestedIndicator = _props3.autoGenerateNestedIndicator, + children = _props3.children, + disabled = _props3.disabled, + disableKeyboardFocus = _props3.disableKeyboardFocus, + hoverColor = _props3.hoverColor, + initiallyOpen = _props3.initiallyOpen, + innerDivStyle = _props3.innerDivStyle, + insetChildren = _props3.insetChildren, + leftAvatar = _props3.leftAvatar, + leftCheckbox = _props3.leftCheckbox, + leftIcon = _props3.leftIcon, + nestedItems = _props3.nestedItems, + nestedLevel = _props3.nestedLevel, + nestedListStyle = _props3.nestedListStyle, + onKeyboardFocus = _props3.onKeyboardFocus, + onMouseEnter = _props3.onMouseEnter, + onMouseLeave = _props3.onMouseLeave, + onNestedListToggle = _props3.onNestedListToggle, + onTouchStart = _props3.onTouchStart, + onTouchTap = _props3.onTouchTap, + rightAvatar = _props3.rightAvatar, + rightIcon = _props3.rightIcon, + rightIconButton = _props3.rightIconButton, + rightToggle = _props3.rightToggle, + primaryText = _props3.primaryText, + primaryTogglesNestedList = _props3.primaryTogglesNestedList, + secondaryText = _props3.secondaryText, + secondaryTextLines = _props3.secondaryTextLines, + style = _props3.style, + other = (0, _objectWithoutProperties3.default)(_props3, ['autoGenerateNestedIndicator', 'children', 'disabled', 'disableKeyboardFocus', 'hoverColor', 'initiallyOpen', 'innerDivStyle', 'insetChildren', 'leftAvatar', 'leftCheckbox', 'leftIcon', 'nestedItems', 'nestedLevel', 'nestedListStyle', 'onKeyboardFocus', 'onMouseEnter', 'onMouseLeave', 'onNestedListToggle', 'onTouchStart', 'onTouchTap', 'rightAvatar', 'rightIcon', 'rightIconButton', 'rightToggle', 'primaryText', 'primaryTogglesNestedList', 'secondaryText', 'secondaryTextLines', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var contentChildren = [children]; + + if (leftIcon) { + var additionalProps = { + color: leftIcon.props.color || this.context.muiTheme.listItem.leftIconColor + }; + this.pushElement(contentChildren, leftIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.leftIcon), additionalProps); + } + + if (rightIcon) { + var _additionalProps = { + color: rightIcon.props.color || this.context.muiTheme.listItem.rightIconColor + }; + this.pushElement(contentChildren, rightIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.rightIcon), _additionalProps); + } + + if (leftAvatar) { + this.pushElement(contentChildren, leftAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.leftAvatar)); + } + + if (rightAvatar) { + this.pushElement(contentChildren, rightAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.rightAvatar)); + } + + if (leftCheckbox) { + this.pushElement(contentChildren, leftCheckbox, (0, _simpleAssign2.default)({}, styles.leftCheckbox)); + } + + // RightIconButtonElement + var hasNestListItems = nestedItems.length; + var hasRightElement = rightAvatar || rightIcon || rightIconButton || rightToggle; + var needsNestedIndicator = hasNestListItems && autoGenerateNestedIndicator && !hasRightElement; + + if (rightIconButton || needsNestedIndicator) { + var rightIconButtonElement = rightIconButton; + var rightIconButtonHandlers = { + onKeyboardFocus: this.handleRightIconButtonKeyboardFocus, + onMouseEnter: this.handleRightIconButtonMouseEnter, + onMouseLeave: this.handleRightIconButtonMouseLeave, + onTouchTap: this.handleRightIconButtonTouchTap, + onMouseDown: this.handleRightIconButtonMouseUp, + onMouseUp: this.handleRightIconButtonMouseUp + }; + + // Create a nested list indicator icon if we don't have an icon on the right + if (needsNestedIndicator) { + rightIconButtonElement = this.state.open ? _react2.default.createElement( + _IconButton2.default, + null, + _react2.default.createElement(_expandLess2.default, null) + ) : _react2.default.createElement( + _IconButton2.default, + null, + _react2.default.createElement(_expandMore2.default, null) + ); + rightIconButtonHandlers.onTouchTap = this.handleNestedListToggle; + } + + this.pushElement(contentChildren, rightIconButtonElement, (0, _simpleAssign2.default)({}, styles.rightIconButton), rightIconButtonHandlers); + } + + if (rightToggle) { + this.pushElement(contentChildren, rightToggle, (0, _simpleAssign2.default)({}, styles.rightToggle)); + } + + if (primaryText) { + var primaryTextElement = this.createTextElement(styles.primaryText, primaryText, 'primaryText'); + contentChildren.push(primaryTextElement); + } + + if (secondaryText) { + var secondaryTextElement = this.createTextElement(styles.secondaryText, secondaryText, 'secondaryText'); + contentChildren.push(secondaryTextElement); + } + + var nestedList = nestedItems.length ? _react2.default.createElement( + _NestedList2.default, + { nestedLevel: nestedLevel, open: this.state.open, style: nestedListStyle }, + nestedItems + ) : undefined; + + var simpleLabel = !primaryTogglesNestedList && (leftCheckbox || rightToggle); + + return _react2.default.createElement( + 'div', + null, + simpleLabel ? this.createLabelElement(styles, contentChildren, other) : disabled ? this.createDisabledElement(styles, contentChildren, other) : _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({ + containerElement: 'span' + }, other, { + disableKeyboardFocus: disableKeyboardFocus || this.state.rightIconButtonKeyboardFocused, + onKeyboardFocus: this.handleKeyboardFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd, + onTouchTap: primaryTogglesNestedList ? this.handleNestedListToggle : onTouchTap, + ref: 'enhancedButton', + style: (0, _simpleAssign2.default)({}, styles.root, style) + }), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.innerDiv, innerDivStyle)) }, + contentChildren + ) + ), + nestedList + ); + } + }]); + return ListItem; +}(_react.Component); + +ListItem.muiName = 'ListItem'; +ListItem.defaultProps = { + autoGenerateNestedIndicator: true, + disableKeyboardFocus: false, + disabled: false, + initiallyOpen: false, + insetChildren: false, + nestedItems: [], + nestedLevel: 0, + onKeyboardFocus: function onKeyboardFocus() {}, + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + onNestedListToggle: function onNestedListToggle() {}, + onTouchEnd: function onTouchEnd() {}, + onTouchStart: function onTouchStart() {}, + open: null, + primaryTogglesNestedList: false, + secondaryTextLines: 1 +}; +ListItem.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? ListItem.propTypes = { + /** + * If true, generate a nested-list-indicator icon when nested list + * items are detected. Note that an indicator will not be created + * if a `rightIcon` or `rightIconButton` has been provided to + * the element. + */ + autoGenerateNestedIndicator: _react.PropTypes.bool, + /** + * Children passed into the `ListItem`. + */ + children: _react.PropTypes.node, + /** + * If true, the element will not be able to be focused by the keyboard. + */ + disableKeyboardFocus: _react.PropTypes.bool, + /** + * If true, the element will not be clickable + * and will not display hover effects. + * This is automatically disabled if either `leftCheckbox` + * or `rightToggle` is set. + */ + disabled: _react.PropTypes.bool, + /** + * Override the hover background color. + */ + hoverColor: _react.PropTypes.string, + /** + * If true, the nested `ListItem`s are initially displayed. + */ + initiallyOpen: _react.PropTypes.bool, + /** + * Override the inline-styles of the inner div element. + */ + innerDivStyle: _react.PropTypes.object, + /** + * If true, the children will be indented by 72px. + * This is useful if there is no left avatar or left icon. + */ + insetChildren: _react.PropTypes.bool, + /** + * This is the `Avatar` element to be displayed on the left side. + */ + leftAvatar: _react.PropTypes.element, + /** + * This is the `Checkbox` element to be displayed on the left side. + */ + leftCheckbox: _react.PropTypes.element, + /** + * This is the `SvgIcon` or `FontIcon` to be displayed on the left side. + */ + leftIcon: _react.PropTypes.element, + /** + * An array of `ListItem`s to nest underneath the current `ListItem`. + */ + nestedItems: _react.PropTypes.arrayOf(_react.PropTypes.element), + /** + * Controls how deep a `ListItem` appears. + * This property is automatically managed, so modify at your own risk. + */ + nestedLevel: _react.PropTypes.number, + /** + * Override the inline-styles of the nested items' `NestedList`. + */ + nestedListStyle: _react.PropTypes.object, + /** + * Callback function fired when the `ListItem` is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the `ListItem`. + * @param {boolean} isKeyboardFocused If true, the `ListItem` is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** + * Callbak function fired when the `ListItem` toggles its nested list. + * + * @param {object} listItem The `ListItem`. + */ + onNestedListToggle: _react.PropTypes.func, + /** @ignore */ + onTouchEnd: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** @ignore */ + onTouchTap: _react.PropTypes.func, + /** + * Control toggle state of nested list. + */ + open: _react.PropTypes.bool, + /** + * This is the block element that contains the primary text. + * If a string is passed in, a div tag will be rendered. + */ + primaryText: _react.PropTypes.node, + /** + * If true, clicking or tapping the primary text of the `ListItem` + * toggles the nested list. + */ + primaryTogglesNestedList: _react.PropTypes.bool, + /** + * This is the `Avatar` element to be displayed on the right side. + */ + rightAvatar: _react.PropTypes.element, + /** + * This is the `SvgIcon` or `FontIcon` to be displayed on the right side. + */ + rightIcon: _react.PropTypes.element, + /** + * This is the `IconButton` to be displayed on the right side. + * Hovering over this button will remove the `ListItem` hover. + * Also, clicking on this button will not trigger a + * ripple on the `ListItem`; the event will be stopped and prevented + * from bubbling up to cause a `ListItem` click. + */ + rightIconButton: _react.PropTypes.element, + /** + * This is the `Toggle` element to display on the right side. + */ + rightToggle: _react.PropTypes.element, + /** + * This is the block element that contains the secondary text. + * If a string is passed in, a div tag will be rendered. + */ + secondaryText: _react.PropTypes.node, + /** + * Can be 1 or 2. This is the number of secondary + * text lines before ellipsis will show. + */ + secondaryTextLines: _react.PropTypes.oneOf([1, 2]), + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = ListItem; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 649 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationExpandLess = function NavigationExpandLess(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z' }) + ); +}; +NavigationExpandLess = (0, _pure2.default)(NavigationExpandLess); +NavigationExpandLess.displayName = 'NavigationExpandLess'; +NavigationExpandLess.muiName = 'SvgIcon'; + +exports.default = NavigationExpandLess; + +/***/ }), +/* 650 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationExpandMore = function NavigationExpandMore(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z' }) + ); +}; +NavigationExpandMore = (0, _pure2.default)(NavigationExpandMore); +NavigationExpandMore.displayName = 'NavigationExpandMore'; +NavigationExpandMore.muiName = 'SvgIcon'; + +exports.default = NavigationExpandMore; + +/***/ }), +/* 651 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _List = __webpack_require__(286); + +var _List2 = _interopRequireDefault(_List); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NestedList = function NestedList(props) { + var children = props.children, + open = props.open, + nestedLevel = props.nestedLevel, + style = props.style; + + + if (!open) { + return null; + } + + return _react2.default.createElement( + _List2.default, + { style: style }, + _react.Children.map(children, function (child) { + return (0, _react.isValidElement)(child) ? (0, _react.cloneElement)(child, { + nestedLevel: nestedLevel + 1 + }) : child; + }) + ); +}; + +process.env.NODE_ENV !== "production" ? NestedList.propTypes = { + children: _react.PropTypes.node, + nestedLevel: _react.PropTypes.number.isRequired, + open: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +exports.default = NestedList; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 652 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Subheader = __webpack_require__(653); + +var _Subheader2 = _interopRequireDefault(_Subheader); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Subheader2.default; + +/***/ }), +/* 653 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Subheader = function Subheader(props, context) { + var children = props.children, + inset = props.inset, + style = props.style, + other = (0, _objectWithoutProperties3.default)(props, ['children', 'inset', 'style']); + var _context$muiTheme = context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + subheader = _context$muiTheme.subheader; + + + var styles = { + root: { + boxSizing: 'border-box', + color: subheader.color, + fontSize: 14, + fontWeight: subheader.fontWeight, + lineHeight: '48px', + paddingLeft: inset ? 72 : 16, + width: '100%' + } + }; + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + children + ); +}; + +Subheader.muiName = 'Subheader'; + +process.env.NODE_ENV !== "production" ? Subheader.propTypes = { + /** + * Node that will be placed inside the `Subheader`. + */ + children: _react.PropTypes.node, + /** + * If true, the `Subheader` will be indented. + */ + inset: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +Subheader.defaultProps = { + inset: false +}; + +Subheader.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +exports.default = Subheader; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 654 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _events = __webpack_require__(140); + +var _events2 = _interopRequireDefault(_events); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isDescendant = function isDescendant(el, target) { + if (target !== null) { + return el === target || isDescendant(el, target.parentNode); + } + return false; +}; + +var clickAwayEvents = ['mouseup', 'touchend']; +var bind = function bind(callback) { + return clickAwayEvents.forEach(function (event) { + return _events2.default.on(document, event, callback); + }); +}; +var unbind = function unbind(callback) { + return clickAwayEvents.forEach(function (event) { + return _events2.default.off(document, event, callback); + }); +}; + +var ClickAwayListener = function (_Component) { + (0, _inherits3.default)(ClickAwayListener, _Component); + + function ClickAwayListener() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClickAwayListener); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClickAwayListener.__proto__ || (0, _getPrototypeOf2.default)(ClickAwayListener)).call.apply(_ref, [this].concat(args))), _this), _this.handleClickAway = function (event) { + if (event.defaultPrevented) { + return; + } + + // IE11 support, which trigger the handleClickAway even after the unbind + if (_this.isCurrentlyMounted) { + var el = _reactDom2.default.findDOMNode(_this); + + if (document.documentElement.contains(event.target) && !isDescendant(el, event.target)) { + _this.props.onClickAway(event); + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClickAwayListener, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.isCurrentlyMounted = true; + if (this.props.onClickAway) { + bind(this.handleClickAway); + } + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps) { + if (prevProps.onClickAway !== this.props.onClickAway) { + unbind(this.handleClickAway); + if (this.props.onClickAway) { + bind(this.handleClickAway); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.isCurrentlyMounted = false; + unbind(this.handleClickAway); + } + }, { + key: 'render', + value: function render() { + return this.props.children; + } + }]); + return ClickAwayListener; +}(_react.Component); + +process.env.NODE_ENV !== "production" ? ClickAwayListener.propTypes = { + children: _react.PropTypes.element, + onClickAway: _react.PropTypes.func +} : void 0; +exports.default = ClickAwayListener; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 655 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.HotKeyHolder = undefined; + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var HotKeyHolder = exports.HotKeyHolder = function () { + function HotKeyHolder() { + var _this = this; + + (0, _classCallCheck3.default)(this, HotKeyHolder); + + this.clear = function () { + _this.timerId = null; + _this.lastKeys = null; + }; + } + + (0, _createClass3.default)(HotKeyHolder, [{ + key: 'append', + value: function append(key) { + clearTimeout(this.timerId); + this.timerId = setTimeout(this.clear, 500); + return this.lastKeys = (this.lastKeys || '') + key; + } + }]); + return HotKeyHolder; +}(); + +/***/ }), +/* 656 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _colorManipulator = __webpack_require__(70); + +var _childUtils = __webpack_require__(97); + +var _EnhancedButton = __webpack_require__(54); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _Paper = __webpack_require__(37); + +var _Paper2 = _interopRequireDefault(_Paper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validateLabel(props, propName, componentName) { + if (process.env.NODE_ENV !== 'production') { + if (!props.children && props.label !== 0 && !props.label && !props.icon) { + return new Error('Required prop label or children or icon was not specified in ' + componentName + '.'); + } + } +} + +function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + button = _context$muiTheme.button, + raisedButton = _context$muiTheme.raisedButton; + var disabled = props.disabled, + disabledBackgroundColor = props.disabledBackgroundColor, + disabledLabelColor = props.disabledLabelColor, + fullWidth = props.fullWidth, + icon = props.icon, + label = props.label, + labelPosition = props.labelPosition, + primary = props.primary, + secondary = props.secondary, + style = props.style; + + + var amount = primary || secondary ? 0.4 : 0.08; + + var backgroundColor = raisedButton.color; + var labelColor = raisedButton.textColor; + + if (disabled) { + backgroundColor = disabledBackgroundColor || raisedButton.disabledColor; + labelColor = disabledLabelColor || raisedButton.disabledTextColor; + } else if (primary) { + backgroundColor = raisedButton.primaryColor; + labelColor = raisedButton.primaryTextColor; + } else if (secondary) { + backgroundColor = raisedButton.secondaryColor; + labelColor = raisedButton.secondaryTextColor; + } else { + if (props.backgroundColor) { + backgroundColor = props.backgroundColor; + } + if (props.labelColor) { + labelColor = props.labelColor; + } + } + + var buttonHeight = style && style.height || button.height; + var borderRadius = 2; + + return { + root: { + display: 'inline-block', + transition: _transitions2.default.easeOut(), + minWidth: fullWidth ? '100%' : button.minWidth + }, + button: { + height: buttonHeight, + lineHeight: buttonHeight + 'px', + width: '100%', + padding: 0, + borderRadius: borderRadius, + transition: _transitions2.default.easeOut(), + backgroundColor: backgroundColor, + // That's the default value for a button but not a link + textAlign: 'center' + }, + label: { + position: 'relative', + opacity: 1, + fontSize: raisedButton.fontSize, + letterSpacing: 0, + textTransform: raisedButton.textTransform || button.textTransform || 'uppercase', + fontWeight: raisedButton.fontWeight, + margin: 0, + userSelect: 'none', + paddingLeft: icon && labelPosition !== 'before' ? 8 : baseTheme.spacing.desktopGutterLess, + paddingRight: icon && labelPosition === 'before' ? 8 : baseTheme.spacing.desktopGutterLess, + color: labelColor + }, + icon: { + verticalAlign: 'middle', + marginLeft: label && labelPosition !== 'before' ? 12 : 0, + marginRight: label && labelPosition === 'before' ? 12 : 0 + }, + overlay: { + height: buttonHeight, + borderRadius: borderRadius, + backgroundColor: (state.keyboardFocused || state.hovered) && !disabled && (0, _colorManipulator.fade)(labelColor, amount), + transition: _transitions2.default.easeOut(), + top: 0 + }, + ripple: { + color: labelColor, + opacity: !(primary || secondary) ? 0.1 : 0.16 + } + }; +} + +var RaisedButton = function (_Component) { + (0, _inherits3.default)(RaisedButton, _Component); + + function RaisedButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RaisedButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RaisedButton.__proto__ || (0, _getPrototypeOf2.default)(RaisedButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + keyboardFocused: false, + touched: false, + initialZDepth: 0, + zDepth: 0 + }, _this.handleMouseDown = function (event) { + // only listen to left clicks + if (event.button === 0) { + _this.setState({ + zDepth: _this.state.initialZDepth + 1 + }); + } + if (_this.props.onMouseDown) { + _this.props.onMouseDown(event); + } + }, _this.handleMouseUp = function (event) { + _this.setState({ + zDepth: _this.state.initialZDepth + }); + if (_this.props.onMouseUp) { + _this.props.onMouseUp(event); + } + }, _this.handleMouseLeave = function (event) { + if (!_this.state.keyboardFocused) { + _this.setState({ + zDepth: _this.state.initialZDepth, + hovered: false + }); + } + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } + }, _this.handleMouseEnter = function (event) { + if (!_this.state.keyboardFocused && !_this.state.touched) { + _this.setState({ + hovered: true + }); + } + if (_this.props.onMouseEnter) { + _this.props.onMouseEnter(event); + } + }, _this.handleTouchStart = function (event) { + _this.setState({ + touched: true, + zDepth: _this.state.initialZDepth + 1 + }); + + if (_this.props.onTouchStart) { + _this.props.onTouchStart(event); + } + }, _this.handleTouchEnd = function (event) { + _this.setState({ + touched: true, + zDepth: _this.state.initialZDepth + }); + + if (_this.props.onTouchEnd) { + _this.props.onTouchEnd(event); + } + }, _this.handleKeyboardFocus = function (event, keyboardFocused) { + var zDepth = keyboardFocused && !_this.props.disabled ? _this.state.initialZDepth + 1 : _this.state.initialZDepth; + + _this.setState({ + zDepth: zDepth, + keyboardFocused: keyboardFocused + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(RaisedButton, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var zDepth = this.props.disabled ? 0 : 1; + this.setState({ + zDepth: zDepth, + initialZDepth: zDepth + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + var zDepth = nextProps.disabled ? 0 : 1; + var nextState = { + zDepth: zDepth, + initialZDepth: zDepth + }; + + if (nextProps.disabled) { + nextState.hovered = false; + } + + this.setState(nextState); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + backgroundColor = _props.backgroundColor, + buttonStyle = _props.buttonStyle, + children = _props.children, + className = _props.className, + disabled = _props.disabled, + disabledBackgroundColor = _props.disabledBackgroundColor, + disabledLabelColor = _props.disabledLabelColor, + fullWidth = _props.fullWidth, + icon = _props.icon, + label = _props.label, + labelColor = _props.labelColor, + labelPosition = _props.labelPosition, + labelStyle = _props.labelStyle, + overlayStyle = _props.overlayStyle, + primary = _props.primary, + rippleStyle = _props.rippleStyle, + secondary = _props.secondary, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['backgroundColor', 'buttonStyle', 'children', 'className', 'disabled', 'disabledBackgroundColor', 'disabledLabelColor', 'fullWidth', 'icon', 'label', 'labelColor', 'labelPosition', 'labelStyle', 'overlayStyle', 'primary', 'rippleStyle', 'secondary', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var mergedRippleStyles = (0, _simpleAssign2.default)({}, styles.ripple, rippleStyle); + + var buttonEventHandlers = disabled ? {} : { + onMouseDown: this.handleMouseDown, + onMouseUp: this.handleMouseUp, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd, + onKeyboardFocus: this.handleKeyboardFocus + }; + + var labelElement = label && _react2.default.createElement( + 'span', + { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) }, + label + ); + + var iconCloned = icon && (0, _react.cloneElement)(icon, { + color: icon.props.color || styles.label.color, + style: (0, _simpleAssign2.default)(styles.icon, icon.props.style) + }); + + // Place label before or after children. + var childrenFragment = labelPosition === 'before' ? { + labelElement: labelElement, + iconCloned: iconCloned, + children: children + } : { + children: children, + iconCloned: iconCloned, + labelElement: labelElement + }; + + var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment); + + return _react2.default.createElement( + _Paper2.default, + { + className: className, + style: (0, _simpleAssign2.default)(styles.root, style), + zDepth: this.state.zDepth + }, + _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, buttonEventHandlers, { + ref: 'container', + disabled: disabled, + style: (0, _simpleAssign2.default)(styles.button, buttonStyle), + focusRippleColor: mergedRippleStyles.color, + touchRippleColor: mergedRippleStyles.color, + focusRippleOpacity: mergedRippleStyles.opacity, + touchRippleOpacity: mergedRippleStyles.opacity + }), + _react2.default.createElement( + 'div', + { + ref: 'overlay', + style: prepareStyles((0, _simpleAssign2.default)(styles.overlay, overlayStyle)) + }, + enhancedButtonChildren + ) + ) + ); + } + }]); + return RaisedButton; +}(_react.Component); + +RaisedButton.muiName = 'RaisedButton'; +RaisedButton.defaultProps = { + disabled: false, + labelPosition: 'after', + fullWidth: false, + primary: false, + secondary: false +}; +RaisedButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? RaisedButton.propTypes = { + /** + * Override the default background color for the button, + * but not the default disabled background color + * (use `disabledBackgroundColor` for this). + */ + backgroundColor: _react.PropTypes.string, + /** + * Override the inline-styles of the button element. + */ + buttonStyle: _react.PropTypes.object, + /** + * The content of the button. + * If a label is provided via the `label` prop, the text within the label + * will be displayed in addition to the content provided here. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * If true, the button will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the default background color for the button + * when it is disabled. + */ + disabledBackgroundColor: _react.PropTypes.string, + /** + * The color of the button's label when the button is disabled. + */ + disabledLabelColor: _react.PropTypes.string, + /** + * If true, the button will take up the full width of its container. + */ + fullWidth: _react.PropTypes.bool, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * An icon to be displayed within the button. + */ + icon: _react.PropTypes.node, + /** + * The label to be displayed within the button. + * If content is provided via the `children` prop, that content will be + * displayed in addition to the label provided here. + */ + label: validateLabel, + /** + * The color of the button's label. + */ + labelColor: _react.PropTypes.string, + /** + * The position of the button's label relative to the button's `children`. + */ + labelPosition: _react.PropTypes.oneOf(['before', 'after']), + /** + * Override the inline-styles of the button's label element. + */ + labelStyle: _react.PropTypes.object, + /** @ignore */ + onMouseDown: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onMouseUp: _react.PropTypes.func, + /** @ignore */ + onTouchEnd: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * Override the inline style of the button overlay. + */ + overlayStyle: _react.PropTypes.object, + /** + * If true, the button will use the theme's primary color. + */ + primary: _react.PropTypes.bool, + /** + * Override the inline style of the ripple element. + */ + rippleStyle: _react.PropTypes.object, + /** + * If true, the button will use the theme's secondary color. + * If both `secondary` and `primary` are true, the button will use + * the theme's primary color. + */ + secondary: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = RaisedButton; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 657 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _AutoComplete = __webpack_require__(658); + +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); + +var _createComponent = __webpack_require__(38); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(61); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_AutoComplete2.default, function (_ref) { + var _ref$input = _ref.input, + onChange = _ref$input.onChange, + value = _ref$input.value, + _onNewRequest = _ref.onNewRequest, + dataSourceConfig = _ref.dataSourceConfig, + props = _objectWithoutProperties(_ref, ['input', 'onNewRequest', 'dataSourceConfig']); + + return _extends({}, (0, _mapError2.default)(props), { + dataSourceConfig: dataSourceConfig, + searchText: dataSourceConfig ? value[dataSourceConfig.text] : value, + onNewRequest: function onNewRequest(value) { + onChange((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && dataSourceConfig ? value[dataSourceConfig.value] : value); + if (_onNewRequest) { + _onNewRequest(value); + } + }, + onUpdateInput: function onUpdateInput(value) { + if (!dataSourceConfig) { + onChange(value); + } + } + }); +}); + +/***/ }), +/* 658 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _AutoComplete = __webpack_require__(659); + +var _AutoComplete2 = _interopRequireDefault(_AutoComplete); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _AutoComplete2.default; + +/***/ }), +/* 659 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _typeof2 = __webpack_require__(50); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _keycode = __webpack_require__(28); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _TextField = __webpack_require__(87); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _Menu = __webpack_require__(665); + +var _Menu2 = _interopRequireDefault(_Menu); + +var _MenuItem = __webpack_require__(116); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +var _Divider = __webpack_require__(666); + +var _Divider2 = _interopRequireDefault(_Divider); + +var _Popover = __webpack_require__(117); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _propTypes = __webpack_require__(43); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var anchorEl = state.anchorEl; + var fullWidth = props.fullWidth; + + + var styles = { + root: { + display: 'inline-block', + position: 'relative', + width: fullWidth ? '100%' : 256 + }, + menu: { + width: '100%' + }, + list: { + display: 'block', + width: fullWidth ? '100%' : 256 + }, + innerDiv: { + overflow: 'hidden' + } + }; + + if (anchorEl && fullWidth) { + styles.popover = { + width: anchorEl.clientWidth + }; + } + + return styles; +} + +var AutoComplete = function (_Component) { + (0, _inherits3.default)(AutoComplete, _Component); + + function AutoComplete() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, AutoComplete); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoComplete.__proto__ || (0, _getPrototypeOf2.default)(AutoComplete)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + anchorEl: null, + focusTextField: true, + open: false, + searchText: undefined + }, _this.handleRequestClose = function () { + // Only take into account the Popover clickAway when we are + // not focusing the TextField. + if (!_this.state.focusTextField) { + _this.close(); + } + }, _this.handleMouseDown = function (event) { + // Keep the TextField focused + event.preventDefault(); + }, _this.handleItemTouchTap = function (event, child) { + var dataSource = _this.props.dataSource; + + var index = parseInt(child.key, 10); + var chosenRequest = dataSource[index]; + var searchText = _this.chosenRequestText(chosenRequest); + + _this.setState({ + searchText: searchText + }, function () { + _this.props.onUpdateInput(searchText, _this.props.dataSource, { + source: 'touchTap' + }); + + _this.timerTouchTapCloseId = setTimeout(function () { + _this.timerTouchTapCloseId = null; + _this.close(); + _this.props.onNewRequest(chosenRequest, index); + }, _this.props.menuCloseDelay); + }); + }, _this.chosenRequestText = function (chosenRequest) { + if (typeof chosenRequest === 'string') { + return chosenRequest; + } else { + return chosenRequest[_this.props.dataSourceConfig.text]; + } + }, _this.handleEscKeyDown = function () { + _this.close(); + }, _this.handleKeyDown = function (event) { + if (_this.props.onKeyDown) _this.props.onKeyDown(event); + + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.close(); + var searchText = _this.state.searchText; + if (searchText !== '') { + _this.props.onNewRequest(searchText, -1); + } + break; + + case 'esc': + _this.close(); + break; + + case 'down': + event.preventDefault(); + _this.setState({ + open: true, + focusTextField: false, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }); + break; + + default: + break; + } + }, _this.handleChange = function (event) { + var searchText = event.target.value; + + // Make sure that we have a new searchText. + // Fix an issue with a Cordova Webview + if (searchText === _this.state.searchText) { + return; + } + + _this.setState({ + searchText: searchText, + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }, function () { + _this.props.onUpdateInput(searchText, _this.props.dataSource, { + source: 'change' + }); + }); + }, _this.handleBlur = function (event) { + if (_this.state.focusTextField && _this.timerTouchTapCloseId === null) { + _this.timerBlurClose = setTimeout(function () { + _this.close(); + }, 0); + } + + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleFocus = function (event) { + if (!_this.state.open && _this.props.openOnFocus) { + _this.setState({ + open: true, + anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField) + }); + } + + _this.setState({ + focusTextField: true + }); + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(AutoComplete, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.requestsList = []; + this.setState({ + open: this.props.open, + searchText: this.props.searchText + }); + this.timerTouchTapCloseId = null; + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.searchText !== nextProps.searchText) { + this.setState({ + searchText: nextProps.searchText + }); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.timerTouchTapCloseId); + clearTimeout(this.timerBlurClose); + } + }, { + key: 'close', + value: function close() { + this.setState({ + open: false, + anchorEl: null + }); + + if (this.props.onClose) { + this.props.onClose(); + } + } + }, { + key: 'blur', + value: function blur() { + this.refs.searchTextField.blur(); + } + }, { + key: 'focus', + value: function focus() { + this.refs.searchTextField.focus(); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + anchorOrigin = _props.anchorOrigin, + animated = _props.animated, + animation = _props.animation, + dataSource = _props.dataSource, + dataSourceConfig = _props.dataSourceConfig, + disableFocusRipple = _props.disableFocusRipple, + errorStyle = _props.errorStyle, + floatingLabelText = _props.floatingLabelText, + filter = _props.filter, + fullWidth = _props.fullWidth, + style = _props.style, + hintText = _props.hintText, + maxSearchResults = _props.maxSearchResults, + menuCloseDelay = _props.menuCloseDelay, + textFieldStyle = _props.textFieldStyle, + menuStyle = _props.menuStyle, + menuProps = _props.menuProps, + listStyle = _props.listStyle, + targetOrigin = _props.targetOrigin, + onClose = _props.onClose, + onNewRequest = _props.onNewRequest, + onUpdateInput = _props.onUpdateInput, + openOnFocus = _props.openOnFocus, + popoverProps = _props.popoverProps, + searchTextProp = _props.searchText, + other = (0, _objectWithoutProperties3.default)(_props, ['anchorOrigin', 'animated', 'animation', 'dataSource', 'dataSourceConfig', 'disableFocusRipple', 'errorStyle', 'floatingLabelText', 'filter', 'fullWidth', 'style', 'hintText', 'maxSearchResults', 'menuCloseDelay', 'textFieldStyle', 'menuStyle', 'menuProps', 'listStyle', 'targetOrigin', 'onClose', 'onNewRequest', 'onUpdateInput', 'openOnFocus', 'popoverProps', 'searchText']); + + var _ref2 = popoverProps || {}, + popoverStyle = _ref2.style, + popoverOther = (0, _objectWithoutProperties3.default)(_ref2, ['style']); + + var _state = this.state, + open = _state.open, + anchorEl = _state.anchorEl, + searchText = _state.searchText, + focusTextField = _state.focusTextField; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + var requestsList = []; + + dataSource.every(function (item, index) { + switch (typeof item === 'undefined' ? 'undefined' : (0, _typeof3.default)(item)) { + case 'string': + if (filter(searchText, item, item)) { + requestsList.push({ + text: item, + value: _react2.default.createElement(_MenuItem2.default, { + innerDivStyle: styles.innerDiv, + value: item, + primaryText: item, + disableFocusRipple: disableFocusRipple, + key: index + }) + }); + } + break; + + case 'object': + if (item && typeof item[_this2.props.dataSourceConfig.text] === 'string') { + var itemText = item[_this2.props.dataSourceConfig.text]; + if (!_this2.props.filter(searchText, itemText, item)) break; + + var itemValue = item[_this2.props.dataSourceConfig.value]; + if (itemValue.type && (itemValue.type.muiName === _MenuItem2.default.muiName || itemValue.type.muiName === _Divider2.default.muiName)) { + requestsList.push({ + text: itemText, + value: _react2.default.cloneElement(itemValue, { + key: index, + disableFocusRipple: disableFocusRipple + }) + }); + } else { + requestsList.push({ + text: itemText, + value: _react2.default.createElement(_MenuItem2.default, { + innerDivStyle: styles.innerDiv, + primaryText: itemText, + disableFocusRipple: disableFocusRipple, + key: index + }) + }); + } + } + break; + + default: + // Do nothing + } + + return !(maxSearchResults && maxSearchResults > 0 && requestsList.length === maxSearchResults); + }); + + this.requestsList = requestsList; + + var menu = open && requestsList.length > 0 && _react2.default.createElement( + _Menu2.default, + (0, _extends3.default)({}, menuProps, { + ref: 'menu', + autoWidth: false, + disableAutoFocus: focusTextField, + onEscKeyDown: this.handleEscKeyDown, + initiallyKeyboardFocused: true, + onItemTouchTap: this.handleItemTouchTap, + onMouseDown: this.handleMouseDown, + style: (0, _simpleAssign2.default)(styles.menu, menuStyle), + listStyle: (0, _simpleAssign2.default)(styles.list, listStyle) + }), + requestsList.map(function (i) { + return i.value; + }) + ); + + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + ref: 'searchTextField', + autoComplete: 'off', + value: searchText, + onChange: this.handleChange, + onBlur: this.handleBlur, + onFocus: this.handleFocus, + onKeyDown: this.handleKeyDown, + floatingLabelText: floatingLabelText, + hintText: hintText, + fullWidth: fullWidth, + multiLine: false, + errorStyle: errorStyle, + style: textFieldStyle + })), + _react2.default.createElement( + _Popover2.default, + (0, _extends3.default)({ + style: (0, _simpleAssign2.default)({}, styles.popover, popoverStyle), + canAutoPosition: false, + anchorOrigin: anchorOrigin, + targetOrigin: targetOrigin, + open: open, + anchorEl: anchorEl, + useLayerForClickAway: false, + onRequestClose: this.handleRequestClose, + animated: animated, + animation: animation + }, popoverOther), + menu + ) + ); + } + }]); + return AutoComplete; +}(_react.Component); + +AutoComplete.defaultProps = { + anchorOrigin: { + vertical: 'bottom', + horizontal: 'left' + }, + animated: true, + dataSourceConfig: { + text: 'text', + value: 'value' + }, + disableFocusRipple: true, + filter: function filter(searchText, key) { + return searchText !== '' && key.indexOf(searchText) !== -1; + }, + fullWidth: false, + open: false, + openOnFocus: false, + onUpdateInput: function onUpdateInput() {}, + onNewRequest: function onNewRequest() {}, + searchText: '', + menuCloseDelay: 300, + targetOrigin: { + vertical: 'top', + horizontal: 'left' + } +}; +AutoComplete.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? AutoComplete.propTypes = { + /** + * Location of the anchor for the auto complete. + */ + anchorOrigin: _propTypes2.default.origin, + /** + * If true, the auto complete is animated as it is toggled. + */ + animated: _react.PropTypes.bool, + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * Array of strings or nodes used to populate the list. + */ + dataSource: _react.PropTypes.array.isRequired, + /** + * Config for objects list dataSource. + * + * @typedef {Object} dataSourceConfig + * + * @property {string} text `dataSource` element key used to find a string to be matched for search + * and shown as a `TextField` input value after choosing the result. + * @property {string} value `dataSource` element key used to find a string to be shown in search results. + */ + dataSourceConfig: _react.PropTypes.object, + /** + * Disables focus ripple when true. + */ + disableFocusRipple: _react.PropTypes.bool, + /** + * Override style prop for error. + */ + errorStyle: _react.PropTypes.object, + /** + * The error content to display. + */ + errorText: _react.PropTypes.node, + /** + * Callback function used to filter the auto complete. + * + * @param {string} searchText The text to search for within `dataSource`. + * @param {string} key `dataSource` element, or `text` property on that element if it's not a string. + * @returns {boolean} `true` indicates the auto complete list will include `key` when the input is `searchText`. + */ + filter: _react.PropTypes.func, + /** + * The content to use for adding floating label element. + */ + floatingLabelText: _react.PropTypes.node, + /** + * If true, the field receives the property `width: 100%`. + */ + fullWidth: _react.PropTypes.bool, + /** + * The hint content to display. + */ + hintText: _react.PropTypes.node, + /** + * Override style for list. + */ + listStyle: _react.PropTypes.object, + /** + * The max number of search results to be shown. + * By default it shows all the items which matches filter. + */ + maxSearchResults: _react.PropTypes.number, + /** + * Delay for closing time of the menu. + */ + menuCloseDelay: _react.PropTypes.number, + /** + * Props to be passed to menu. + */ + menuProps: _react.PropTypes.object, + /** + * Override style for menu. + */ + menuStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function fired when the menu is closed. + */ + onClose: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** @ignore */ + onKeyDown: _react.PropTypes.func, + /** + * Callback function that is fired when a list item is selected, or enter is pressed in the `TextField`. + * + * @param {string} chosenRequest Either the `TextField` input value, if enter is pressed in the `TextField`, + * or the text value of the corresponding list item that was selected. + * @param {number} index The index in `dataSource` of the list item selected, or `-1` if enter is pressed in the + * `TextField`. + */ + onNewRequest: _react.PropTypes.func, + /** + * Callback function that is fired when the user updates the `TextField`. + * + * @param {string} searchText The auto-complete's `searchText` value. + * @param {array} dataSource The auto-complete's `dataSource` array. + * @param {object} params Additional information linked the update. + */ + onUpdateInput: _react.PropTypes.func, + /** + * Auto complete menu is open if true. + */ + open: _react.PropTypes.bool, + /** + * If true, the list item is showed when a focus event triggers. + */ + openOnFocus: _react.PropTypes.bool, + /** + * Props to be passed to popover. + */ + popoverProps: _react.PropTypes.object, + /** + * Text being input to auto complete. + */ + searchText: _react.PropTypes.string, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Origin for location of target. + */ + targetOrigin: _propTypes2.default.origin, + /** + * Override the inline-styles of AutoComplete's TextField element. + */ + textFieldStyle: _react.PropTypes.object +} : void 0; + + +AutoComplete.levenshteinDistance = function (searchText, key) { + var current = []; + var prev = void 0; + var value = void 0; + + for (var i = 0; i <= key.length; i++) { + for (var j = 0; j <= searchText.length; j++) { + if (i && j) { + if (searchText.charAt(j - 1) === key.charAt(i - 1)) value = prev;else value = Math.min(current[j], current[j - 1], prev) + 1; + } else { + value = i + j; + } + prev = current[j]; + current[j] = value; + } + } + return current.pop(); +}; + +AutoComplete.noFilter = function () { + return true; +}; + +AutoComplete.defaultFilter = AutoComplete.caseSensitiveFilter = function (searchText, key) { + return searchText !== '' && key.indexOf(searchText) !== -1; +}; + +AutoComplete.caseInsensitiveFilter = function (searchText, key) { + return key.toLowerCase().indexOf(searchText.toLowerCase()) !== -1; +}; + +AutoComplete.levenshteinDistanceFilter = function (distanceLessThan) { + if (distanceLessThan === undefined) { + return AutoComplete.levenshteinDistance; + } else if (typeof distanceLessThan !== 'number') { + throw 'Error: AutoComplete.levenshteinDistanceFilter is a filter generator, not a filter!'; + } + + return function (s, k) { + return AutoComplete.levenshteinDistance(s, k) < distanceLessThan; + }; +}; + +AutoComplete.fuzzyFilter = function (searchText, key) { + var compareString = key.toLowerCase(); + searchText = searchText.toLowerCase(); + + var searchTextIndex = 0; + for (var index = 0; index < key.length; index++) { + if (compareString[index] === searchText[searchTextIndex]) { + searchTextIndex += 1; + } + } + + return searchTextIndex === searchText.length; +}; + +AutoComplete.Item = _MenuItem2.default; +AutoComplete.Divider = _Divider2.default; + +exports.default = AutoComplete; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 660 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _shallowEqual = __webpack_require__(56); + +var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _EnhancedTextarea = __webpack_require__(661); + +var _EnhancedTextarea2 = _interopRequireDefault(_EnhancedTextarea); + +var _TextFieldHint = __webpack_require__(662); + +var _TextFieldHint2 = _interopRequireDefault(_TextFieldHint); + +var _TextFieldLabel = __webpack_require__(663); + +var _TextFieldLabel2 = _interopRequireDefault(_TextFieldLabel); + +var _TextFieldUnderline = __webpack_require__(664); + +var _TextFieldUnderline2 = _interopRequireDefault(_TextFieldUnderline); + +var _warning = __webpack_require__(24); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var getStyles = function getStyles(props, context, state) { + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + _context$muiTheme$tex = _context$muiTheme.textField, + floatingLabelColor = _context$muiTheme$tex.floatingLabelColor, + focusColor = _context$muiTheme$tex.focusColor, + textColor = _context$muiTheme$tex.textColor, + disabledTextColor = _context$muiTheme$tex.disabledTextColor, + backgroundColor = _context$muiTheme$tex.backgroundColor, + errorColor = _context$muiTheme$tex.errorColor; + + + var styles = { + root: { + fontSize: 16, + lineHeight: '24px', + width: props.fullWidth ? '100%' : 256, + height: (props.rows - 1) * 24 + (props.floatingLabelText ? 72 : 48), + display: 'inline-block', + position: 'relative', + backgroundColor: backgroundColor, + fontFamily: baseTheme.fontFamily, + transition: _transitions2.default.easeOut('200ms', 'height'), + cursor: props.disabled ? 'not-allowed' : 'auto' + }, + error: { + position: 'relative', + bottom: 2, + fontSize: 12, + lineHeight: '12px', + color: errorColor, + transition: _transitions2.default.easeOut() + }, + floatingLabel: { + color: props.disabled ? disabledTextColor : floatingLabelColor, + pointerEvents: 'none' + }, + input: { + padding: 0, + position: 'relative', + width: '100%', + border: 'none', + outline: 'none', + backgroundColor: 'rgba(0,0,0,0)', + color: props.disabled ? disabledTextColor : textColor, + cursor: 'inherit', + font: 'inherit', + WebkitTapHighlightColor: 'rgba(0,0,0,0)' }, + inputNative: { + appearance: 'textfield' } + }; + + styles.textarea = (0, _simpleAssign2.default)({}, styles.input, { + marginTop: props.floatingLabelText ? 36 : 12, + marginBottom: props.floatingLabelText ? -36 : -12, + boxSizing: 'border-box', + font: 'inherit' + }); + + // Do not assign a height to the textarea as he handles it on his own. + styles.input.height = '100%'; + + if (state.isFocused) { + styles.floatingLabel.color = focusColor; + } + + if (props.floatingLabelText) { + styles.input.boxSizing = 'border-box'; + + if (!props.multiLine) { + styles.input.marginTop = 14; + } + + if (state.errorText) { + styles.error.bottom = !props.multiLine ? styles.error.fontSize + 3 : 3; + } + } + + if (state.errorText) { + if (state.isFocused) { + styles.floatingLabel.color = styles.error.color; + } + } + + return styles; +}; + +/** + * Check if a value is valid to be displayed inside an input. + * + * @param The value to check. + * @returns True if the string provided is valid, false otherwise. + */ +function isValid(value) { + return value !== '' && value !== undefined && value !== null; +} + +var TextField = function (_Component) { + (0, _inherits3.default)(TextField, _Component); + + function TextField() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TextField); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TextField.__proto__ || (0, _getPrototypeOf2.default)(TextField)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + isFocused: false, + errorText: undefined, + hasValue: false + }, _this.handleInputBlur = function (event) { + _this.setState({ isFocused: false }); + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleInputChange = function (event) { + _this.setState({ hasValue: isValid(event.target.value) }); + if (_this.props.onChange) { + _this.props.onChange(event, event.target.value); + } + }, _this.handleInputFocus = function (event) { + if (_this.props.disabled) { + return; + } + _this.setState({ isFocused: true }); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleHeightChange = function (event, height) { + var newHeight = height + 24; + if (_this.props.floatingLabelText) { + newHeight += 24; + } + _reactDom2.default.findDOMNode(_this).style.height = newHeight + 'px'; + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TextField, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + children = _props.children, + name = _props.name, + hintText = _props.hintText, + floatingLabelText = _props.floatingLabelText, + id = _props.id; + + + var propsLeaf = children ? children.props : this.props; + + this.setState({ + errorText: this.props.errorText, + hasValue: isValid(propsLeaf.value) || isValid(propsLeaf.defaultValue) + }); + + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(name || hintText || floatingLabelText || id, 'Material-UI: We don\'t have enough information\n to build a robust unique id for the TextField component. Please provide an id or a name.') : void 0; + + var uniqueId = name + '-' + hintText + '-' + floatingLabelText + '-' + Math.floor(Math.random() * 0xFFFF); + this.uniqueId = uniqueId.replace(/[^A-Za-z0-9-]/gi, ''); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.errorText !== this.props.errorText) { + this.setState({ + errorText: nextProps.errorText + }); + } + + if (nextProps.children && nextProps.children.props) { + nextProps = nextProps.children.props; + } + + if (nextProps.hasOwnProperty('value')) { + var hasValue = isValid(nextProps.value); + + this.setState({ + hasValue: hasValue + }); + } + } + }, { + key: 'shouldComponentUpdate', + value: function shouldComponentUpdate(nextProps, nextState, nextContext) { + return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext); + } + }, { + key: 'blur', + value: function blur() { + if (this.input) { + this.getInputNode().blur(); + } + } + }, { + key: 'focus', + value: function focus() { + if (this.input) { + this.getInputNode().focus(); + } + } + }, { + key: 'select', + value: function select() { + if (this.input) { + this.getInputNode().select(); + } + } + }, { + key: 'getValue', + value: function getValue() { + return this.input ? this.getInputNode().value : undefined; + } + }, { + key: 'getInputNode', + value: function getInputNode() { + return this.props.children || this.props.multiLine ? this.input.getInputNode() : _reactDom2.default.findDOMNode(this.input); + } + }, { + key: '_isControlled', + value: function _isControlled() { + return this.props.hasOwnProperty('value'); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props2 = this.props, + children = _props2.children, + className = _props2.className, + disabled = _props2.disabled, + errorStyle = _props2.errorStyle, + errorText = _props2.errorText, + floatingLabelFixed = _props2.floatingLabelFixed, + floatingLabelFocusStyle = _props2.floatingLabelFocusStyle, + floatingLabelShrinkStyle = _props2.floatingLabelShrinkStyle, + floatingLabelStyle = _props2.floatingLabelStyle, + floatingLabelText = _props2.floatingLabelText, + fullWidth = _props2.fullWidth, + hintText = _props2.hintText, + hintStyle = _props2.hintStyle, + id = _props2.id, + inputStyle = _props2.inputStyle, + multiLine = _props2.multiLine, + onBlur = _props2.onBlur, + onChange = _props2.onChange, + onFocus = _props2.onFocus, + style = _props2.style, + type = _props2.type, + underlineDisabledStyle = _props2.underlineDisabledStyle, + underlineFocusStyle = _props2.underlineFocusStyle, + underlineShow = _props2.underlineShow, + underlineStyle = _props2.underlineStyle, + rows = _props2.rows, + rowsMax = _props2.rowsMax, + textareaStyle = _props2.textareaStyle, + other = (0, _objectWithoutProperties3.default)(_props2, ['children', 'className', 'disabled', 'errorStyle', 'errorText', 'floatingLabelFixed', 'floatingLabelFocusStyle', 'floatingLabelShrinkStyle', 'floatingLabelStyle', 'floatingLabelText', 'fullWidth', 'hintText', 'hintStyle', 'id', 'inputStyle', 'multiLine', 'onBlur', 'onChange', 'onFocus', 'style', 'type', 'underlineDisabledStyle', 'underlineFocusStyle', 'underlineShow', 'underlineStyle', 'rows', 'rowsMax', 'textareaStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var inputId = id || this.uniqueId; + + var errorTextElement = this.state.errorText && _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.error, errorStyle)) }, + this.state.errorText + ); + + var floatingLabelTextElement = floatingLabelText && _react2.default.createElement( + _TextFieldLabel2.default, + { + muiTheme: this.context.muiTheme, + style: (0, _simpleAssign2.default)(styles.floatingLabel, floatingLabelStyle, this.state.isFocused ? floatingLabelFocusStyle : null), + shrinkStyle: floatingLabelShrinkStyle, + htmlFor: inputId, + shrink: this.state.hasValue || this.state.isFocused || floatingLabelFixed, + disabled: disabled + }, + floatingLabelText + ); + + var inputProps = { + id: inputId, + ref: function ref(elem) { + return _this2.input = elem; + }, + disabled: this.props.disabled, + onBlur: this.handleInputBlur, + onChange: this.handleInputChange, + onFocus: this.handleInputFocus + }; + + var childStyleMerged = (0, _simpleAssign2.default)(styles.input, inputStyle); + + var inputElement = void 0; + if (children) { + inputElement = _react2.default.cloneElement(children, (0, _extends3.default)({}, inputProps, children.props, { + style: (0, _simpleAssign2.default)(childStyleMerged, children.props.style) + })); + } else { + inputElement = multiLine ? _react2.default.createElement(_EnhancedTextarea2.default, (0, _extends3.default)({ + style: childStyleMerged, + textareaStyle: (0, _simpleAssign2.default)(styles.textarea, styles.inputNative, textareaStyle), + rows: rows, + rowsMax: rowsMax + }, other, inputProps, { + onHeightChange: this.handleHeightChange + })) : _react2.default.createElement('input', (0, _extends3.default)({ + type: type, + style: prepareStyles((0, _simpleAssign2.default)(styles.inputNative, childStyleMerged)) + }, other, inputProps)); + } + + var rootProps = {}; + + if (children) { + rootProps = other; + } + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, rootProps, { + className: className, + style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) + }), + floatingLabelTextElement, + hintText ? _react2.default.createElement(_TextFieldHint2.default, { + muiTheme: this.context.muiTheme, + show: !(this.state.hasValue || floatingLabelText && !this.state.isFocused) || !this.state.hasValue && floatingLabelText && floatingLabelFixed && !this.state.isFocused, + style: hintStyle, + text: hintText + }) : null, + inputElement, + underlineShow ? _react2.default.createElement(_TextFieldUnderline2.default, { + disabled: disabled, + disabledStyle: underlineDisabledStyle, + error: !!this.state.errorText, + errorStyle: errorStyle, + focus: this.state.isFocused, + focusStyle: underlineFocusStyle, + muiTheme: this.context.muiTheme, + style: underlineStyle + }) : null, + errorTextElement + ); + } + }]); + return TextField; +}(_react.Component); + +TextField.defaultProps = { + disabled: false, + floatingLabelFixed: false, + multiLine: false, + fullWidth: false, + type: 'text', + underlineShow: true, + rows: 1 +}; +TextField.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? TextField.propTypes = { + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The text string to use for the default value. + */ + defaultValue: _react.PropTypes.any, + /** + * Disables the text field if set to true. + */ + disabled: _react.PropTypes.bool, + /** + * The style object to use to override error styles. + */ + errorStyle: _react.PropTypes.object, + /** + * The error content to display. + */ + errorText: _react.PropTypes.node, + /** + * If true, the floating label will float even when there is no value. + */ + floatingLabelFixed: _react.PropTypes.bool, + /** + * The style object to use to override floating label styles when focused. + */ + floatingLabelFocusStyle: _react.PropTypes.object, + /** + * The style object to use to override floating label styles when shrunk. + */ + floatingLabelShrinkStyle: _react.PropTypes.object, + /** + * The style object to use to override floating label styles. + */ + floatingLabelStyle: _react.PropTypes.object, + /** + * The content to use for the floating label element. + */ + floatingLabelText: _react.PropTypes.node, + /** + * If true, the field receives the property width 100%. + */ + fullWidth: _react.PropTypes.bool, + /** + * Override the inline-styles of the TextField's hint text element. + */ + hintStyle: _react.PropTypes.object, + /** + * The hint content to display. + */ + hintText: _react.PropTypes.node, + /** + * The id prop for the text field. + */ + id: _react.PropTypes.string, + /** + * Override the inline-styles of the TextField's input element. + * When multiLine is false: define the style of the input element. + * When multiLine is true: define the style of the container of the textarea. + */ + inputStyle: _react.PropTypes.object, + /** + * If true, a textarea element will be rendered. + * The textarea also grows and shrinks according to the number of lines. + */ + multiLine: _react.PropTypes.bool, + /** + * Name applied to the input. + */ + name: _react.PropTypes.string, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function that is fired when the textfield's value changes. + * + * @param {object} event Change event targeting the text field. + * @param {string} newValue The new value of the text field. + */ + onChange: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Number of rows to display when multiLine option is set to true. + */ + rows: _react.PropTypes.number, + /** + * Maximum number of rows to display when + * multiLine option is set to true. + */ + rowsMax: _react.PropTypes.number, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of the TextField's textarea element. + * The TextField use either a textarea or an input, + * this property has effects only when multiLine is true. + */ + textareaStyle: _react.PropTypes.object, + /** + * Specifies the type of input to display + * such as "password" or "text". + */ + type: _react.PropTypes.string, + /** + * Override the inline-styles of the + * TextField's underline element when disabled. + */ + underlineDisabledStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the TextField's + * underline element when focussed. + */ + underlineFocusStyle: _react.PropTypes.object, + /** + * If true, shows the underline for the text field. + */ + underlineShow: _react.PropTypes.bool, + /** + * Override the inline-styles of the TextField's underline element. + */ + underlineStyle: _react.PropTypes.object, + /** + * The value of the text field. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = TextField; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 661 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(60); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var rowsHeight = 24; + +function getStyles(props, context, state) { + return { + root: { + position: 'relative' }, + textarea: { + height: state.height, + width: '100%', + resize: 'none', + font: 'inherit', + padding: 0, + cursor: 'inherit' + }, + shadow: { + resize: 'none', + // Overflow also needed to here to remove the extra row + // added to textareas in Firefox. + overflow: 'hidden', + // Visibility needed to hide the extra text area on ipads + visibility: 'hidden', + position: 'absolute', + height: 'initial' + } + }; +} + +var EnhancedTextarea = function (_Component) { + (0, _inherits3.default)(EnhancedTextarea, _Component); + + function EnhancedTextarea() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, EnhancedTextarea); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedTextarea.__proto__ || (0, _getPrototypeOf2.default)(EnhancedTextarea)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + height: null + }, _this.handleResize = function (event) { + _this.syncHeightWithShadow(undefined, event); + }, _this.handleChange = function (event) { + _this.syncHeightWithShadow(event.target.value); + + if (_this.props.hasOwnProperty('valueLink')) { + _this.props.valueLink.requestChange(event.target.value); + } + + if (_this.props.onChange) { + _this.props.onChange(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(EnhancedTextarea, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + height: this.props.rows * rowsHeight + }); + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + this.syncHeightWithShadow(); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== this.props.value) { + this.syncHeightWithShadow(nextProps.value); + } + } + }, { + key: 'getInputNode', + value: function getInputNode() { + return this.refs.input; + } + }, { + key: 'setValue', + value: function setValue(value) { + this.getInputNode().value = value; + this.syncHeightWithShadow(value); + } + }, { + key: 'syncHeightWithShadow', + value: function syncHeightWithShadow(newValue, event) { + var shadow = this.refs.shadow; + + if (newValue !== undefined) { + shadow.value = newValue; + } + + var newHeight = shadow.scrollHeight; + + // Guarding for jsdom, where scrollHeight isn't present. + // See https://github.com/tmpvar/jsdom/issues/1013 + if (newHeight === undefined) return; + + if (this.props.rowsMax >= this.props.rows) { + newHeight = Math.min(this.props.rowsMax * rowsHeight, newHeight); + } + + newHeight = Math.max(newHeight, rowsHeight); + + if (this.state.height !== newHeight) { + this.setState({ + height: newHeight + }); + + if (this.props.onHeightChange) { + this.props.onHeightChange(event, newHeight); + } + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + onChange = _props.onChange, + onHeightChange = _props.onHeightChange, + rows = _props.rows, + rowsMax = _props.rowsMax, + shadowStyle = _props.shadowStyle, + style = _props.style, + textareaStyle = _props.textareaStyle, + valueLink = _props.valueLink, + other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'onHeightChange', 'rows', 'rowsMax', 'shadowStyle', 'style', 'textareaStyle', 'valueLink']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var rootStyles = (0, _simpleAssign2.default)(styles.root, style); + var textareaStyles = (0, _simpleAssign2.default)(styles.textarea, textareaStyle); + var shadowStyles = (0, _simpleAssign2.default)({}, textareaStyles, styles.shadow, shadowStyle); + + if (this.props.hasOwnProperty('valueLink')) { + other.value = this.props.valueLink.value; + } + + return _react2.default.createElement( + 'div', + { style: prepareStyles(rootStyles) }, + _react2.default.createElement(_reactEventListener2.default, { target: 'window', onResize: this.handleResize }), + _react2.default.createElement('textarea', { + ref: 'shadow', + style: prepareStyles(shadowStyles), + tabIndex: '-1', + rows: this.props.rows, + defaultValue: this.props.defaultValue, + readOnly: true, + value: this.props.value, + valueLink: this.props.valueLink + }), + _react2.default.createElement('textarea', (0, _extends3.default)({}, other, { + ref: 'input', + rows: this.props.rows, + style: prepareStyles(textareaStyles), + onChange: this.handleChange + })) + ); + } + }]); + return EnhancedTextarea; +}(_react.Component); + +EnhancedTextarea.defaultProps = { + rows: 1 +}; +EnhancedTextarea.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? EnhancedTextarea.propTypes = { + defaultValue: _react.PropTypes.any, + disabled: _react.PropTypes.bool, + onChange: _react.PropTypes.func, + onHeightChange: _react.PropTypes.func, + rows: _react.PropTypes.number, + rowsMax: _react.PropTypes.number, + shadowStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + textareaStyle: _react.PropTypes.object, + value: _react.PropTypes.string, + valueLink: _react.PropTypes.object +} : void 0; +exports.default = EnhancedTextarea; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 662 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props) { + var hintColor = props.muiTheme.textField.hintColor, + show = props.show; + + + return { + root: { + position: 'absolute', + opacity: show ? 1 : 0, + color: hintColor, + transition: _transitions2.default.easeOut(), + bottom: 12 + } + }; +} + +var TextFieldHint = function TextFieldHint(props) { + var prepareStyles = props.muiTheme.prepareStyles, + style = props.style, + text = props.text; + + + var styles = getStyles(props); + + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + text + ); +}; + +process.env.NODE_ENV !== "production" ? TextFieldHint.propTypes = { + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * True if the hint text should be visible. + */ + show: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The hint text displayed. + */ + text: _react.PropTypes.node +} : void 0; + +TextFieldHint.defaultProps = { + show: true +}; + +exports.default = TextFieldHint; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 663 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props) { + var defaultStyles = { + position: 'absolute', + lineHeight: '22px', + top: 38, + transition: _transitions2.default.easeOut(), + zIndex: 1, // Needed to display label above Chrome's autocomplete field background + transform: 'scale(1) translate(0, 0)', + transformOrigin: 'left top', + pointerEvents: 'auto', + userSelect: 'none' + }; + + var shrinkStyles = props.shrink ? (0, _simpleAssign2.default)({ + transform: 'scale(0.75) translate(0, -28px)', + pointerEvents: 'none' + }, props.shrinkStyle) : null; + + return { + root: (0, _simpleAssign2.default)(defaultStyles, props.style, shrinkStyles) + }; +} + +var TextFieldLabel = function TextFieldLabel(props) { + var muiTheme = props.muiTheme, + className = props.className, + children = props.children, + htmlFor = props.htmlFor, + onTouchTap = props.onTouchTap; + var prepareStyles = muiTheme.prepareStyles; + + var styles = getStyles(props); + + return _react2.default.createElement( + 'label', + { + className: className, + style: prepareStyles(styles.root), + htmlFor: htmlFor, + onTouchTap: onTouchTap + }, + children + ); +}; + +process.env.NODE_ENV !== "production" ? TextFieldLabel.propTypes = { + /** + * The label contents. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Disables the label if set to true. + */ + disabled: _react.PropTypes.bool, + /** + * The id of the target element that this label should refer to. + */ + htmlFor: _react.PropTypes.string, + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * Callback function for when the label is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the text field label. + */ + onTouchTap: _react.PropTypes.func, + /** + * True if the floating label should shrink. + */ + shrink: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element when shrunk. + */ + shrinkStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +TextFieldLabel.defaultProps = { + disabled: false, + shrink: false +}; + +exports.default = TextFieldLabel; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 664 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var propTypes = { + /** + * True if the parent `TextField` is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` is disabled. + */ + disabledStyle: _react.PropTypes.object, + /** + * True if the parent `TextField` has an error. + */ + error: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` has an error. + */ + errorStyle: _react.PropTypes.object, + /** + * True if the parent `TextField` is focused. + */ + focus: _react.PropTypes.bool, + /** + * Override the inline-styles of the underline when parent `TextField` is focused. + */ + focusStyle: _react.PropTypes.object, + /** + * @ignore + * The material-ui theme applied to this component. + */ + muiTheme: _react.PropTypes.object.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +}; + +var defaultProps = { + disabled: false, + disabledStyle: {}, + error: false, + errorStyle: {}, + focus: false, + focusStyle: {}, + style: {} +}; + +var TextFieldUnderline = function TextFieldUnderline(props) { + var disabled = props.disabled, + disabledStyle = props.disabledStyle, + error = props.error, + errorStyle = props.errorStyle, + focus = props.focus, + focusStyle = props.focusStyle, + muiTheme = props.muiTheme, + style = props.style; + var errorStyleColor = errorStyle.color; + var prepareStyles = muiTheme.prepareStyles, + _muiTheme$textField = muiTheme.textField, + borderColor = _muiTheme$textField.borderColor, + disabledTextColor = _muiTheme$textField.disabledTextColor, + errorColor = _muiTheme$textField.errorColor, + focusColor = _muiTheme$textField.focusColor; + + + var styles = { + root: { + borderTop: 'none', + borderLeft: 'none', + borderRight: 'none', + borderBottom: 'solid 1px', + borderColor: borderColor, + bottom: 8, + boxSizing: 'content-box', + margin: 0, + position: 'absolute', + width: '100%' + }, + disabled: { + borderBottom: 'dotted 2px', + borderColor: disabledTextColor + }, + focus: { + borderBottom: 'solid 2px', + borderColor: focusColor, + transform: 'scaleX(0)', + transition: _transitions2.default.easeOut() + }, + error: { + borderColor: errorStyleColor ? errorStyleColor : errorColor, + transform: 'scaleX(1)' + } + }; + + var underline = (0, _simpleAssign2.default)({}, styles.root, style); + var focusedUnderline = (0, _simpleAssign2.default)({}, underline, styles.focus, focusStyle); + + if (disabled) underline = (0, _simpleAssign2.default)({}, underline, styles.disabled, disabledStyle); + if (focus) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, { transform: 'scaleX(1)' }); + if (error) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, styles.error); + + return _react2.default.createElement( + 'div', + null, + _react2.default.createElement('hr', { style: prepareStyles(underline) }), + _react2.default.createElement('hr', { style: prepareStyles(focusedUnderline) }) + ); +}; + +process.env.NODE_ENV !== "production" ? TextFieldUnderline.propTypes = propTypes : void 0; +TextFieldUnderline.defaultProps = defaultProps; + +exports.default = TextFieldUnderline; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 665 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.MenuItem = exports.Menu = undefined; + +var _Menu2 = __webpack_require__(179); + +var _Menu3 = _interopRequireDefault(_Menu2); + +var _MenuItem2 = __webpack_require__(116); + +var _MenuItem3 = _interopRequireDefault(_MenuItem2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.Menu = _Menu3.default; +exports.MenuItem = _MenuItem3.default; +exports.default = _Menu3.default; + +/***/ }), +/* 666 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Divider = __webpack_require__(667); + +var _Divider2 = _interopRequireDefault(_Divider); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Divider2.default; + +/***/ }), +/* 667 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Divider = function Divider(props, context) { + var inset = props.inset, + style = props.style, + other = (0, _objectWithoutProperties3.default)(props, ['inset', 'style']); + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + prepareStyles = _context$muiTheme.prepareStyles; + + + var styles = { + root: { + margin: 0, + marginTop: -1, + marginLeft: inset ? 72 : 0, + height: 1, + border: 'none', + backgroundColor: baseTheme.palette.borderColor + } + }; + + return _react2.default.createElement('hr', (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) })); +}; + +Divider.muiName = 'Divider'; + +process.env.NODE_ENV !== "production" ? Divider.propTypes = { + /** + * If true, the `Divider` will be indented. + */ + inset: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +Divider.defaultProps = { + inset: false +}; + +Divider.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; + +exports.default = Divider; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 668 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _Checkbox = __webpack_require__(669); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +var _createComponent = __webpack_require__(38); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_Checkbox2.default, function (_ref) { + var _ref$input = _ref.input, + onChange = _ref$input.onChange, + value = _ref$input.value, + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']), + meta = _ref.meta, + _onCheck = _ref.onCheck, + defaultChecked = _ref.defaultChecked, + props = _objectWithoutProperties(_ref, ['input', 'meta', 'onCheck', 'defaultChecked']); + + return _extends({}, inputProps, props, { + checked: value ? true : false, + onCheck: function onCheck(event, isInputChecked) { + onChange(isInputChecked); + if (_onCheck) { + _onCheck(isInputChecked); + } + } + }); +}); + +/***/ }), +/* 669 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Checkbox = __webpack_require__(670); + +var _Checkbox2 = _interopRequireDefault(_Checkbox); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Checkbox2.default; + +/***/ }), +/* 670 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _EnhancedSwitch = __webpack_require__(182); + +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _checkBoxOutlineBlank = __webpack_require__(671); + +var _checkBoxOutlineBlank2 = _interopRequireDefault(_checkBoxOutlineBlank); + +var _checkBox = __webpack_require__(672); + +var _checkBox2 = _interopRequireDefault(_checkBox); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var checkbox = context.muiTheme.checkbox; + + var checkboxSize = 24; + + return { + icon: { + height: checkboxSize, + width: checkboxSize + }, + check: { + position: 'absolute', + opacity: 0, + transform: 'scale(0)', + transitionOrigin: '50% 50%', + transition: _transitions2.default.easeOut('450ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('0ms', 'transform', '450ms'), + fill: checkbox.checkedColor + }, + checkWhenSwitched: { + opacity: 1, + transform: 'scale(1)', + transition: _transitions2.default.easeOut('0ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('800ms', 'transform', '0ms') + }, + checkWhenDisabled: { + fill: checkbox.disabledColor + }, + box: { + position: 'absolute', + opacity: 1, + fill: checkbox.boxColor, + transition: _transitions2.default.easeOut('1000ms', 'opacity', '200ms') + }, + boxWhenSwitched: { + opacity: 0, + transition: _transitions2.default.easeOut('650ms', 'opacity', '150ms'), + fill: checkbox.checkedColor + }, + boxWhenDisabled: { + fill: props.checked ? 'transparent' : checkbox.disabledColor + }, + label: { + color: props.disabled ? checkbox.labelDisabledColor : checkbox.labelColor + } + }; +} + +var Checkbox = function (_Component) { + (0, _inherits3.default)(Checkbox, _Component); + + function Checkbox() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Checkbox); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Checkbox.__proto__ || (0, _getPrototypeOf2.default)(Checkbox)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + switched: false + }, _this.handleStateChange = function (newSwitched) { + _this.setState({ + switched: newSwitched + }); + }, _this.handleCheck = function (event, isInputChecked) { + if (_this.props.onCheck) { + _this.props.onCheck(event, isInputChecked); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Checkbox, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + checked = _props.checked, + defaultChecked = _props.defaultChecked, + valueLink = _props.valueLink; + + + if (checked || defaultChecked || valueLink && valueLink.value) { + this.setState({ + switched: true + }); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.checked !== nextProps.checked) { + this.setState({ + switched: nextProps.checked + }); + } + } + }, { + key: 'isChecked', + value: function isChecked() { + return this.refs.enhancedSwitch.isSwitched(); + } + }, { + key: 'setChecked', + value: function setChecked(newCheckedValue) { + this.refs.enhancedSwitch.setSwitched(newCheckedValue); + } + }, { + key: 'render', + value: function render() { + var _props2 = this.props, + iconStyle = _props2.iconStyle, + onCheck = _props2.onCheck, + checkedIcon = _props2.checkedIcon, + uncheckedIcon = _props2.uncheckedIcon, + other = (0, _objectWithoutProperties3.default)(_props2, ['iconStyle', 'onCheck', 'checkedIcon', 'uncheckedIcon']); + + var styles = getStyles(this.props, this.context); + var boxStyles = (0, _simpleAssign2.default)(styles.box, this.state.switched && styles.boxWhenSwitched, iconStyle, this.props.disabled && styles.boxWhenDisabled); + var checkStyles = (0, _simpleAssign2.default)(styles.check, this.state.switched && styles.checkWhenSwitched, iconStyle, this.props.disabled && styles.checkWhenDisabled); + + var checkedElement = checkedIcon ? _react2.default.cloneElement(checkedIcon, { + style: (0, _simpleAssign2.default)(checkStyles, checkedIcon.props.style) + }) : _react2.default.createElement(_checkBox2.default, { + style: checkStyles + }); + + var unCheckedElement = uncheckedIcon ? _react2.default.cloneElement(uncheckedIcon, { + style: (0, _simpleAssign2.default)(boxStyles, uncheckedIcon.props.style) + }) : _react2.default.createElement(_checkBoxOutlineBlank2.default, { + style: boxStyles + }); + + var checkboxElement = _react2.default.createElement( + 'div', + null, + unCheckedElement, + checkedElement + ); + + var rippleColor = this.state.switched ? checkStyles.fill : boxStyles.fill; + var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle); + + var labelStyle = (0, _simpleAssign2.default)(styles.label, this.props.labelStyle); + + var enhancedSwitchProps = { + ref: 'enhancedSwitch', + inputType: 'checkbox', + switched: this.state.switched, + switchElement: checkboxElement, + rippleColor: rippleColor, + iconStyle: mergedIconStyle, + onSwitch: this.handleCheck, + labelStyle: labelStyle, + onParentShouldUpdate: this.handleStateChange, + labelPosition: this.props.labelPosition + }; + + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps)); + } + }]); + return Checkbox; +}(_react.Component); + +Checkbox.defaultProps = { + labelPosition: 'right', + disabled: false +}; +Checkbox.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Checkbox.propTypes = { + /** + * Checkbox is checked if true. + */ + checked: _react.PropTypes.bool, + /** + * The SvgIcon to use for the checked state. + * This is useful to create icon toggles. + */ + checkedIcon: _react.PropTypes.element, + /** + * The default state of our checkbox component. + * **Warning:** This cannot be used in conjunction with `checked`. + * Decide between using a controlled or uncontrolled input element and remove one of these props. + * More info: https://fb.me/react-controlled-components + */ + defaultChecked: _react.PropTypes.bool, + /** + * Disabled if true. + */ + disabled: _react.PropTypes.bool, + /** + * Overrides the inline-styles of the icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Overrides the inline-styles of the input element. + */ + inputStyle: _react.PropTypes.object, + /** + * Where the label will be placed next to the checkbox. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * Overrides the inline-styles of the Checkbox element label. + */ + labelStyle: _react.PropTypes.object, + /** + * Callback function that is fired when the checkbox is checked. + * + * @param {object} event `change` event targeting the underlying checkbox `input`. + * @param {boolean} isInputChecked The `checked` value of the underlying checkbox `input`. + */ + onCheck: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The SvgIcon to use for the unchecked state. + * This is useful to create icon toggles. + */ + uncheckedIcon: _react.PropTypes.element, + /** + * ValueLink for when using controlled checkbox. + */ + valueLink: _react.PropTypes.object +} : void 0; +exports.default = Checkbox; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 671 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ToggleCheckBoxOutlineBlank = function ToggleCheckBoxOutlineBlank(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z' }) + ); +}; +ToggleCheckBoxOutlineBlank = (0, _pure2.default)(ToggleCheckBoxOutlineBlank); +ToggleCheckBoxOutlineBlank.displayName = 'ToggleCheckBoxOutlineBlank'; +ToggleCheckBoxOutlineBlank.muiName = 'SvgIcon'; + +exports.default = ToggleCheckBoxOutlineBlank; + +/***/ }), +/* 672 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ToggleCheckBox = function ToggleCheckBox(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z' }) + ); +}; +ToggleCheckBox = (0, _pure2.default)(ToggleCheckBox); +ToggleCheckBox.displayName = 'ToggleCheckBox'; +ToggleCheckBox.muiName = 'SvgIcon'; + +exports.default = ToggleCheckBox; + +/***/ }), +/* 673 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _DatePicker = __webpack_require__(674); + +var _DatePicker2 = _interopRequireDefault(_DatePicker); + +var _createComponent = __webpack_require__(38); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(61); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_DatePicker2.default, function (_ref) { + var _ref$input = _ref.input, + onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onBlur']), + defaultDate = _ref.defaultDate, + _onChange = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'defaultDate', 'onChange']); + + return _extends({}, inputProps, (0, _mapError2.default)(props), { + onChange: function onChange(event, value) { + inputProps.onChange(value); + if (_onChange) { + _onChange(value); + } + } + }); +}); + +/***/ }), +/* 674 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _DatePicker = __webpack_require__(675); + +var _DatePicker2 = _interopRequireDefault(_DatePicker); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _DatePicker2.default; + +/***/ }), +/* 675 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _dateUtils = __webpack_require__(71); + +var _DatePickerDialog = __webpack_require__(676); + +var _DatePickerDialog2 = _interopRequireDefault(_DatePickerDialog); + +var _TextField = __webpack_require__(87); + +var _TextField2 = _interopRequireDefault(_TextField); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DatePicker = function (_Component) { + (0, _inherits3.default)(DatePicker, _Component); + + function DatePicker() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DatePicker); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePicker.__proto__ || (0, _getPrototypeOf2.default)(DatePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + date: undefined + }, _this.handleAccept = function (date) { + if (!_this.isControlled()) { + _this.setState({ + date: date + }); + } + if (_this.props.onChange) { + _this.props.onChange(null, date); + } + }, _this.handleFocus = function (event) { + event.target.blur(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + + if (!_this.props.disabled) { + setTimeout(function () { + _this.openDialog(); + }, 0); + } + }, _this.formatDate = function (date) { + if (_this.props.locale) { + var DateTimeFormat = _this.props.DateTimeFormat || _dateUtils.dateTimeFormat; + return new DateTimeFormat(_this.props.locale, { + day: 'numeric', + month: 'numeric', + year: 'numeric' + }).format(date); + } else { + return (0, _dateUtils.formatIso)(date); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DatePicker, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + date: this.isControlled() ? this.getControlledDate() : this.props.defaultDate + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.isControlled()) { + var newDate = this.getControlledDate(nextProps); + if (!(0, _dateUtils.isEqualDate)(this.state.date, newDate)) { + this.setState({ + date: newDate + }); + } + } + } + }, { + key: 'getDate', + value: function getDate() { + return this.state.date; + } + + /** + * Open the date-picker dialog programmatically from a parent. + */ + + }, { + key: 'openDialog', + value: function openDialog() { + /** + * if the date is not selected then set it to new date + * (get the current system date while doing so) + * else set it to the currently selected date + */ + if (this.state.date !== undefined) { + this.setState({ + dialogDate: this.getDate() + }, this.refs.dialogWindow.show); + } else { + this.setState({ + dialogDate: new Date() + }, this.refs.dialogWindow.show); + } + } + + /** + * Alias for `openDialog()` for an api consistent with TextField. + */ + + }, { + key: 'focus', + value: function focus() { + this.openDialog(); + } + }, { + key: 'isControlled', + value: function isControlled() { + return this.props.hasOwnProperty('value'); + } + }, { + key: 'getControlledDate', + value: function getControlledDate() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; + + if (props.value instanceof Date) { + return props.value; + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + autoOk = _props.autoOk, + cancelLabel = _props.cancelLabel, + className = _props.className, + container = _props.container, + defaultDate = _props.defaultDate, + dialogContainerStyle = _props.dialogContainerStyle, + disableYearSelection = _props.disableYearSelection, + firstDayOfWeek = _props.firstDayOfWeek, + formatDateProp = _props.formatDate, + locale = _props.locale, + maxDate = _props.maxDate, + minDate = _props.minDate, + mode = _props.mode, + okLabel = _props.okLabel, + onDismiss = _props.onDismiss, + onFocus = _props.onFocus, + onShow = _props.onShow, + onTouchTap = _props.onTouchTap, + shouldDisableDate = _props.shouldDisableDate, + style = _props.style, + textFieldStyle = _props.textFieldStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'className', 'container', 'defaultDate', 'dialogContainerStyle', 'disableYearSelection', 'firstDayOfWeek', 'formatDate', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onDismiss', 'onFocus', 'onShow', 'onTouchTap', 'shouldDisableDate', 'style', 'textFieldStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var formatDate = formatDateProp || this.formatDate; + + return _react2.default.createElement( + 'div', + { className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + onFocus: this.handleFocus, + onTouchTap: this.handleTouchTap, + ref: 'input', + style: textFieldStyle, + value: this.state.date ? formatDate(this.state.date) : '' + })), + _react2.default.createElement(_DatePickerDialog2.default, { + DateTimeFormat: DateTimeFormat, + autoOk: autoOk, + cancelLabel: cancelLabel, + container: container, + containerStyle: dialogContainerStyle, + disableYearSelection: disableYearSelection, + firstDayOfWeek: firstDayOfWeek, + initialDate: this.state.dialogDate, + locale: locale, + maxDate: maxDate, + minDate: minDate, + mode: mode, + okLabel: okLabel, + onAccept: this.handleAccept, + onShow: onShow, + onDismiss: onDismiss, + ref: 'dialogWindow', + shouldDisableDate: shouldDisableDate + }) + ); + } + }]); + return DatePicker; +}(_react.Component); + +DatePicker.defaultProps = { + autoOk: false, + container: 'dialog', + disabled: false, + disableYearSelection: false, + firstDayOfWeek: 1, + style: {} +}; +DatePicker.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? DatePicker.propTypes = { + /** + * Constructor for date formatting for the specified `locale`. + * The constructor must follow this specification: ECMAScript Internationalization API 1.0 (ECMA-402). + * `Intl.DateTimeFormat` is supported by most modern browsers, see http://caniuse.com/#search=intl, + * otherwise https://github.com/andyearnshaw/Intl.js is a good polyfill. + * + * By default, a built-in `DateTimeFormat` is used which supports the 'en-US' `locale`. + */ + DateTimeFormat: _react.PropTypes.func, + /** + * If true, automatically accept and close the picker on select a date. + */ + autoOk: _react.PropTypes.bool, + /** + * Override the default text of the 'Cancel' button. + */ + cancelLabel: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Used to control how the Date Picker will be displayed when the input field is focused. + * `dialog` (default) displays the DatePicker as a dialog with a modal. + * `inline` displays the DatePicker below the input field (similar to auto complete). + */ + container: _react.PropTypes.oneOf(['dialog', 'inline']), + /** + * This is the initial date value of the component. + * If either `value` or `valueLink` is provided they will override this + * prop with `value` taking precedence. + */ + defaultDate: _react.PropTypes.object, + /** + * Override the inline-styles of DatePickerDialog's Container element. + */ + dialogContainerStyle: _react.PropTypes.object, + /** + * Disables the year selection in the date picker. + */ + disableYearSelection: _react.PropTypes.bool, + /** + * Disables the DatePicker. + */ + disabled: _react.PropTypes.bool, + /** + * Used to change the first day of week. It varies from + * Saturday to Monday between different locales. + * The allowed range is 0 (Sunday) to 6 (Saturday). + * The default is `1`, Monday, as per ISO 8601. + */ + firstDayOfWeek: _react.PropTypes.number, + /** + * This function is called to format the date displayed in the input field, and should return a string. + * By default if no `locale` and `DateTimeFormat` is provided date objects are formatted to ISO 8601 YYYY-MM-DD. + * + * @param {object} date Date object to be formatted. + * @returns {any} The formatted date. + */ + formatDate: _react.PropTypes.func, + /** + * Locale used for formatting the `DatePicker` date strings. Other than for 'en-US', you + * must provide a `DateTimeFormat` that supports the chosen `locale`. + */ + locale: _react.PropTypes.string, + /** + * The ending of a range of valid dates. The range includes the endDate. + * The default value is current date + 100 years. + */ + maxDate: _react.PropTypes.object, + /** + * The beginning of a range of valid dates. The range includes the startDate. + * The default value is current date - 100 years. + */ + minDate: _react.PropTypes.object, + /** + * Tells the component to display the picker in portrait or landscape mode. + */ + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + /** + * Override the default text of the 'OK' button. + */ + okLabel: _react.PropTypes.node, + /** + * Callback function that is fired when the date value changes. + * + * @param {null} null Since there is no particular event associated with the change, + * the first argument will always be null. + * @param {object} date The new date. + */ + onChange: _react.PropTypes.func, + /** + * Callback function that is fired when the Date Picker's dialog is dismissed. + */ + onDismiss: _react.PropTypes.func, + /** + * Callback function that is fired when the Date Picker's `TextField` gains focus. + */ + onFocus: _react.PropTypes.func, + /** + * Callback function that is fired when the Date Picker's dialog is shown. + */ + onShow: _react.PropTypes.func, + /** + * Callback function that is fired when a touch tap event occurs on the Date Picker's `TextField`. + * + * @param {object} event TouchTap event targeting the `TextField`. + */ + onTouchTap: _react.PropTypes.func, + /** + * Callback function used to determine if a day's entry should be disabled on the calendar. + * + * @param {object} day Date object of a day. + * @returns {boolean} Indicates whether the day should be disabled. + */ + shouldDisableDate: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of DatePicker's TextField element. + */ + textFieldStyle: _react.PropTypes.object, + /** + * Sets the date for the Date Picker programmatically. + */ + value: _react.PropTypes.object +} : void 0; +exports.default = DatePicker; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 676 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(60); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(28); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _Calendar = __webpack_require__(677); + +var _Calendar2 = _interopRequireDefault(_Calendar); + +var _Dialog = __webpack_require__(288); + +var _Dialog2 = _interopRequireDefault(_Dialog); + +var _Popover = __webpack_require__(117); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _PopoverAnimationVertical = __webpack_require__(289); + +var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical); + +var _dateUtils = __webpack_require__(71); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DatePickerDialog = function (_Component) { + (0, _inherits3.default)(DatePickerDialog, _Component); + + function DatePickerDialog() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DatePickerDialog); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(DatePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.show = function () { + if (_this.props.onShow && !_this.state.open) { + _this.props.onShow(); + } + + _this.setState({ + open: true + }); + }, _this.dismiss = function () { + if (_this.props.onDismiss && _this.state.open) { + _this.props.onDismiss(); + } + + _this.setState({ + open: false + }); + }, _this.handleTouchTapDay = function () { + if (_this.props.autoOk) { + setTimeout(_this.handleTouchTapOk, 300); + } + }, _this.handleTouchTapCancel = function () { + _this.dismiss(); + }, _this.handleRequestClose = function () { + _this.dismiss(); + }, _this.handleTouchTapOk = function () { + if (_this.props.onAccept && !_this.refs.calendar.isSelectedDateDisabled()) { + _this.props.onAccept(_this.refs.calendar.getSelectedDate()); + } + + _this.setState({ + open: false + }); + }, _this.handleWindowKeyUp = function (event) { + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.handleTouchTapOk(); + break; + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DatePickerDialog, [{ + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + autoOk = _props.autoOk, + cancelLabel = _props.cancelLabel, + container = _props.container, + containerStyle = _props.containerStyle, + disableYearSelection = _props.disableYearSelection, + initialDate = _props.initialDate, + firstDayOfWeek = _props.firstDayOfWeek, + locale = _props.locale, + maxDate = _props.maxDate, + minDate = _props.minDate, + mode = _props.mode, + okLabel = _props.okLabel, + onAccept = _props.onAccept, + onDismiss = _props.onDismiss, + onShow = _props.onShow, + shouldDisableDate = _props.shouldDisableDate, + style = _props.style, + animation = _props.animation, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'container', 'containerStyle', 'disableYearSelection', 'initialDate', 'firstDayOfWeek', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onAccept', 'onDismiss', 'onShow', 'shouldDisableDate', 'style', 'animation']); + var open = this.state.open; + + + var styles = { + dialogContent: { + width: mode === 'landscape' ? 479 : 310 + }, + dialogBodyContent: { + padding: 0, + minHeight: mode === 'landscape' ? 330 : 434, + minWidth: mode === 'landscape' ? 479 : 310 + } + }; + + var Container = container === 'inline' ? _Popover2.default : _Dialog2.default; + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { ref: 'root' }), + _react2.default.createElement( + Container, + { + anchorEl: this.refs.root // For Popover + , animation: animation || _PopoverAnimationVertical2.default // For Popover + , bodyStyle: styles.dialogBodyContent, + contentStyle: styles.dialogContent, + ref: 'dialog', + repositionOnUpdate: true, + open: open, + onRequestClose: this.handleRequestClose, + style: (0, _simpleAssign2.default)(styles.dialogBodyContent, containerStyle) + }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyUp: this.handleWindowKeyUp + }), + _react2.default.createElement(_Calendar2.default, { + autoOk: autoOk, + DateTimeFormat: DateTimeFormat, + cancelLabel: cancelLabel, + disableYearSelection: disableYearSelection, + firstDayOfWeek: firstDayOfWeek, + initialDate: initialDate, + locale: locale, + onTouchTapDay: this.handleTouchTapDay, + maxDate: maxDate, + minDate: minDate, + mode: mode, + open: open, + ref: 'calendar', + onTouchTapCancel: this.handleTouchTapCancel, + onTouchTapOk: this.handleTouchTapOk, + okLabel: okLabel, + shouldDisableDate: shouldDisableDate + }) + ) + ); + } + }]); + return DatePickerDialog; +}(_react.Component); + +DatePickerDialog.defaultProps = { + DateTimeFormat: _dateUtils.dateTimeFormat, + cancelLabel: 'Cancel', + container: 'dialog', + locale: 'en-US', + okLabel: 'OK' +}; +DatePickerDialog.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? DatePickerDialog.propTypes = { + DateTimeFormat: _react.PropTypes.func, + animation: _react.PropTypes.func, + autoOk: _react.PropTypes.bool, + cancelLabel: _react.PropTypes.node, + container: _react.PropTypes.oneOf(['dialog', 'inline']), + containerStyle: _react.PropTypes.object, + disableYearSelection: _react.PropTypes.bool, + firstDayOfWeek: _react.PropTypes.number, + initialDate: _react.PropTypes.object, + locale: _react.PropTypes.string, + maxDate: _react.PropTypes.object, + minDate: _react.PropTypes.object, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + okLabel: _react.PropTypes.node, + onAccept: _react.PropTypes.func, + onDismiss: _react.PropTypes.func, + onShow: _react.PropTypes.func, + open: _react.PropTypes.bool, + shouldDisableDate: _react.PropTypes.func, + style: _react.PropTypes.object +} : void 0; +exports.default = DatePickerDialog; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 677 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _toConsumableArray2 = __webpack_require__(76); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(60); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(28); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _CalendarActionButtons = __webpack_require__(678); + +var _CalendarActionButtons2 = _interopRequireDefault(_CalendarActionButtons); + +var _CalendarMonth = __webpack_require__(681); + +var _CalendarMonth2 = _interopRequireDefault(_CalendarMonth); + +var _CalendarYear = __webpack_require__(683); + +var _CalendarYear2 = _interopRequireDefault(_CalendarYear); + +var _CalendarToolbar = __webpack_require__(685); + +var _CalendarToolbar2 = _interopRequireDefault(_CalendarToolbar); + +var _DateDisplay = __webpack_require__(689); + +var _DateDisplay2 = _interopRequireDefault(_DateDisplay); + +var _SlideIn = __webpack_require__(183); + +var _SlideIn2 = _interopRequireDefault(_SlideIn); + +var _dateUtils = __webpack_require__(71); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var daysArray = [].concat((0, _toConsumableArray3.default)(Array(7))); + +var Calendar = function (_Component) { + (0, _inherits3.default)(Calendar, _Component); + + function Calendar() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Calendar); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Calendar.__proto__ || (0, _getPrototypeOf2.default)(Calendar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + displayDate: undefined, + displayMonthDay: true, + selectedDate: undefined, + transitionDirection: 'left', + transitionEnter: true + }, _this.handleTouchTapDay = function (event, date) { + _this.setSelectedDate(date); + if (_this.props.onTouchTapDay) _this.props.onTouchTapDay(event, date); + }, _this.handleMonthChange = function (months) { + _this.setState({ + transitionDirection: months >= 0 ? 'left' : 'right', + displayDate: (0, _dateUtils.addMonths)(_this.state.displayDate, months) + }); + }, _this.handleTouchTapYear = function (event, year) { + var date = (0, _dateUtils.cloneDate)(_this.state.selectedDate); + date.setFullYear(year); + _this.setSelectedDate(date, event); + _this.handleTouchTapDateDisplayMonthDay(); + }, _this.handleTouchTapDateDisplayMonthDay = function () { + _this.setState({ + displayMonthDay: true + }); + }, _this.handleTouchTapDateDisplayYear = function () { + _this.setState({ + displayMonthDay: false + }); + }, _this.handleWindowKeyDown = function (event) { + if (_this.props.open) { + switch ((0, _keycode2.default)(event)) { + case 'up': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(-1); + } else if (event.shiftKey) { + _this.addSelectedMonths(-1); + } else { + _this.addSelectedDays(-7); + } + break; + + case 'down': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(1); + } else if (event.shiftKey) { + _this.addSelectedMonths(1); + } else { + _this.addSelectedDays(7); + } + break; + + case 'right': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(1); + } else if (event.shiftKey) { + _this.addSelectedMonths(1); + } else { + _this.addSelectedDays(1); + } + break; + + case 'left': + if (event.altKey && event.shiftKey) { + _this.addSelectedYears(-1); + } else if (event.shiftKey) { + _this.addSelectedMonths(-1); + } else { + _this.addSelectedDays(-1); + } + break; + } + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Calendar, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + displayDate: (0, _dateUtils.getFirstDayOfMonth)(this.props.initialDate), + selectedDate: this.props.initialDate + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.initialDate !== this.props.initialDate) { + var date = nextProps.initialDate || new Date(); + this.setState({ + displayDate: (0, _dateUtils.getFirstDayOfMonth)(date), + selectedDate: date + }); + } + } + }, { + key: 'getSelectedDate', + value: function getSelectedDate() { + return this.state.selectedDate; + } + }, { + key: 'isSelectedDateDisabled', + value: function isSelectedDateDisabled() { + if (!this.state.displayMonthDay) { + return false; + } + + return this.refs.calendar.isSelectedDateDisabled(); + } + }, { + key: 'addSelectedDays', + value: function addSelectedDays(days) { + this.setSelectedDate((0, _dateUtils.addDays)(this.state.selectedDate, days)); + } + }, { + key: 'addSelectedMonths', + value: function addSelectedMonths(months) { + this.setSelectedDate((0, _dateUtils.addMonths)(this.state.selectedDate, months)); + } + }, { + key: 'addSelectedYears', + value: function addSelectedYears(years) { + this.setSelectedDate((0, _dateUtils.addYears)(this.state.selectedDate, years)); + } + }, { + key: 'setDisplayDate', + value: function setDisplayDate(date, newSelectedDate) { + var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(date); + var direction = newDisplayDate > this.state.displayDate ? 'left' : 'right'; + + if (newDisplayDate !== this.state.displayDate) { + this.setState({ + displayDate: newDisplayDate, + transitionDirection: direction, + selectedDate: newSelectedDate || this.state.selectedDate + }); + } + } + }, { + key: 'setSelectedDate', + value: function setSelectedDate(date) { + var adjustedDate = date; + if ((0, _dateUtils.isBeforeDate)(date, this.props.minDate)) { + adjustedDate = this.props.minDate; + } else if ((0, _dateUtils.isAfterDate)(date, this.props.maxDate)) { + adjustedDate = this.props.maxDate; + } + + var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(adjustedDate); + if (newDisplayDate !== this.state.displayDate) { + this.setDisplayDate(newDisplayDate, adjustedDate); + } else { + this.setState({ + selectedDate: adjustedDate + }); + } + } + }, { + key: 'getToolbarInteractions', + value: function getToolbarInteractions() { + return { + prevMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.minDate) > 0, + nextMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.maxDate) < 0 + }; + } + }, { + key: 'yearSelector', + value: function yearSelector() { + if (!this.props.disableYearSelection) { + return _react2.default.createElement(_CalendarYear2.default, { + key: 'years', + DateTimeFormat: this.props.DateTimeFormat, + locale: this.props.locale, + onTouchTapYear: this.handleTouchTapYear, + selectedDate: this.state.selectedDate, + minDate: this.props.minDate, + maxDate: this.props.maxDate + }); + } + } + }, { + key: 'render', + value: function render() { + var prepareStyles = this.context.muiTheme.prepareStyles; + + var toolbarInteractions = this.getToolbarInteractions(); + var isLandscape = this.props.mode === 'landscape'; + var calendarTextColor = this.context.muiTheme.datePicker.calendarTextColor; + + + var styles = { + root: { + color: calendarTextColor, + userSelect: 'none', + width: isLandscape ? 479 : 310 + }, + calendar: { + display: 'flex', + flexDirection: 'column' + }, + calendarContainer: { + display: 'flex', + alignContent: 'space-between', + justifyContent: 'space-between', + flexDirection: 'column', + fontSize: 12, + fontWeight: 400, + padding: '0px 8px', + transition: _transitions2.default.easeOut() + }, + yearContainer: { + display: 'flex', + justifyContent: 'space-between', + flexDirection: 'column', + height: 272, + marginTop: 10, + overflow: 'hidden', + width: 310 + }, + weekTitle: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'space-between', + fontWeight: '500', + height: 20, + lineHeight: '15px', + opacity: '0.5', + textAlign: 'center' + }, + weekTitleDay: { + width: 42 + }, + transitionSlide: { + height: 214 + } + }; + + var weekTitleDayStyle = prepareStyles(styles.weekTitleDay); + + var _props = this.props, + minDate = _props.minDate, + maxDate = _props.maxDate, + cancelLabel = _props.cancelLabel, + DateTimeFormat = _props.DateTimeFormat, + firstDayOfWeek = _props.firstDayOfWeek, + locale = _props.locale, + okLabel = _props.okLabel, + onTouchTapCancel = _props.onTouchTapCancel, + onTouchTapOk = _props.onTouchTapOk; + + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyDown: this.handleWindowKeyDown + }), + _react2.default.createElement(_DateDisplay2.default, { + DateTimeFormat: DateTimeFormat, + disableYearSelection: this.props.disableYearSelection, + onTouchTapMonthDay: this.handleTouchTapDateDisplayMonthDay, + onTouchTapYear: this.handleTouchTapDateDisplayYear, + locale: locale, + monthDaySelected: this.state.displayMonthDay, + mode: this.props.mode, + selectedDate: this.state.selectedDate + }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.calendar) }, + this.state.displayMonthDay && _react2.default.createElement( + 'div', + { style: prepareStyles(styles.calendarContainer) }, + _react2.default.createElement(_CalendarToolbar2.default, { + DateTimeFormat: DateTimeFormat, + locale: locale, + displayDate: this.state.displayDate, + onMonthChange: this.handleMonthChange, + prevMonth: toolbarInteractions.prevMonth, + nextMonth: toolbarInteractions.nextMonth + }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.weekTitle) }, + daysArray.map(function (event, i) { + return _react2.default.createElement( + 'span', + { key: i, style: weekTitleDayStyle }, + (0, _dateUtils.localizedWeekday)(DateTimeFormat, locale, i, firstDayOfWeek) + ); + }) + ), + _react2.default.createElement( + _SlideIn2.default, + { direction: this.state.transitionDirection, style: styles.transitionSlide }, + _react2.default.createElement(_CalendarMonth2.default, { + DateTimeFormat: DateTimeFormat, + locale: locale, + displayDate: this.state.displayDate, + firstDayOfWeek: this.props.firstDayOfWeek, + key: this.state.displayDate.toDateString(), + minDate: minDate, + maxDate: maxDate, + onTouchTapDay: this.handleTouchTapDay, + ref: 'calendar', + selectedDate: this.state.selectedDate, + shouldDisableDate: this.props.shouldDisableDate + }) + ) + ), + !this.state.displayMonthDay && _react2.default.createElement( + 'div', + { style: prepareStyles(styles.yearContainer) }, + this.yearSelector() + ), + okLabel && _react2.default.createElement(_CalendarActionButtons2.default, { + autoOk: this.props.autoOk, + cancelLabel: cancelLabel, + okLabel: okLabel, + onTouchTapCancel: onTouchTapCancel, + onTouchTapOk: onTouchTapOk + }) + ) + ); + } + }]); + return Calendar; +}(_react.Component); + +Calendar.defaultProps = { + DateTimeFormat: _dateUtils.dateTimeFormat, + disableYearSelection: false, + initialDate: new Date(), + locale: 'en-US', + minDate: (0, _dateUtils.addYears)(new Date(), -100), + maxDate: (0, _dateUtils.addYears)(new Date(), 100) +}; +Calendar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Calendar.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + autoOk: _react.PropTypes.bool, + cancelLabel: _react.PropTypes.node, + disableYearSelection: _react.PropTypes.bool, + firstDayOfWeek: _react.PropTypes.number, + initialDate: _react.PropTypes.object, + locale: _react.PropTypes.string.isRequired, + maxDate: _react.PropTypes.object, + minDate: _react.PropTypes.object, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + okLabel: _react.PropTypes.node, + onTouchTapCancel: _react.PropTypes.func, + onTouchTapDay: _react.PropTypes.func, + onTouchTapOk: _react.PropTypes.func, + open: _react.PropTypes.bool, + shouldDisableDate: _react.PropTypes.func +} : void 0; +exports.default = Calendar; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 678 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _FlatButton = __webpack_require__(287); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CalendarActionButton = function (_Component) { + (0, _inherits3.default)(CalendarActionButton, _Component); + + function CalendarActionButton() { + (0, _classCallCheck3.default)(this, CalendarActionButton); + return (0, _possibleConstructorReturn3.default)(this, (CalendarActionButton.__proto__ || (0, _getPrototypeOf2.default)(CalendarActionButton)).apply(this, arguments)); + } + + (0, _createClass3.default)(CalendarActionButton, [{ + key: 'render', + value: function render() { + var _props = this.props, + cancelLabel = _props.cancelLabel, + okLabel = _props.okLabel; + + + var styles = { + root: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'flex-end', + margin: 0, + maxHeight: 48, + padding: 0 + }, + flatButtons: { + fontsize: 14, + margin: '4px 8px 8px 0px', + maxHeight: 36, + minWidth: 64, + padding: 0 + } + }; + + return _react2.default.createElement( + 'div', + { style: styles.root }, + _react2.default.createElement(_FlatButton2.default, { + label: cancelLabel, + onTouchTap: this.props.onTouchTapCancel, + primary: true, + style: styles.flatButtons + }), + !this.props.autoOk && _react2.default.createElement(_FlatButton2.default, { + disabled: this.refs.calendar !== undefined && this.refs.calendar.isSelectedDateDisabled(), + label: okLabel, + onTouchTap: this.props.onTouchTapOk, + primary: true, + style: styles.flatButtons + }) + ); + } + }]); + return CalendarActionButton; +}(_react.Component); + +process.env.NODE_ENV !== "production" ? CalendarActionButton.propTypes = { + autoOk: _react.PropTypes.bool, + cancelLabel: _react.PropTypes.node, + okLabel: _react.PropTypes.node, + onTouchTapCancel: _react.PropTypes.func, + onTouchTapOk: _react.PropTypes.func +} : void 0; +exports.default = CalendarActionButton; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 679 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _childUtils = __webpack_require__(97); + +var _colorManipulator = __webpack_require__(70); + +var _EnhancedButton = __webpack_require__(54); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +var _FlatButtonLabel = __webpack_require__(680); + +var _FlatButtonLabel2 = _interopRequireDefault(_FlatButtonLabel); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validateLabel(props, propName, componentName) { + if (process.env.NODE_ENV !== 'production') { + if (!props.children && props.label !== 0 && !props.label && !props.icon) { + return new Error('Required prop label or children or icon was not specified in ' + componentName + '.'); + } + } +} + +var FlatButton = function (_Component) { + (0, _inherits3.default)(FlatButton, _Component); + + function FlatButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, FlatButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FlatButton.__proto__ || (0, _getPrototypeOf2.default)(FlatButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hovered: false, + isKeyboardFocused: false, + touch: false + }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) { + _this.setState({ isKeyboardFocused: isKeyboardFocused }); + _this.props.onKeyboardFocus(event, isKeyboardFocused); + }, _this.handleMouseEnter = function (event) { + // Cancel hover styles for touch devices + if (!_this.state.touch) _this.setState({ hovered: true }); + _this.props.onMouseEnter(event); + }, _this.handleMouseLeave = function (event) { + _this.setState({ hovered: false }); + _this.props.onMouseLeave(event); + }, _this.handleTouchStart = function (event) { + _this.setState({ touch: true }); + _this.props.onTouchStart(event); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(FlatButton, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.disabled) { + this.setState({ + hovered: false + }); + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + disabled = _props.disabled, + hoverColor = _props.hoverColor, + backgroundColor = _props.backgroundColor, + icon = _props.icon, + label = _props.label, + labelStyle = _props.labelStyle, + labelPosition = _props.labelPosition, + primary = _props.primary, + rippleColor = _props.rippleColor, + secondary = _props.secondary, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'disabled', 'hoverColor', 'backgroundColor', 'icon', 'label', 'labelStyle', 'labelPosition', 'primary', 'rippleColor', 'secondary', 'style']); + var _context$muiTheme = this.context.muiTheme, + _context$muiTheme$but = _context$muiTheme.button, + buttonHeight = _context$muiTheme$but.height, + buttonMinWidth = _context$muiTheme$but.minWidth, + buttonTextTransform = _context$muiTheme$but.textTransform, + _context$muiTheme$fla = _context$muiTheme.flatButton, + buttonFilterColor = _context$muiTheme$fla.buttonFilterColor, + buttonColor = _context$muiTheme$fla.color, + disabledTextColor = _context$muiTheme$fla.disabledTextColor, + fontSize = _context$muiTheme$fla.fontSize, + fontWeight = _context$muiTheme$fla.fontWeight, + primaryTextColor = _context$muiTheme$fla.primaryTextColor, + secondaryTextColor = _context$muiTheme$fla.secondaryTextColor, + textColor = _context$muiTheme$fla.textColor, + _context$muiTheme$fla2 = _context$muiTheme$fla.textTransform, + textTransform = _context$muiTheme$fla2 === undefined ? buttonTextTransform || 'uppercase' : _context$muiTheme$fla2; + + var defaultTextColor = disabled ? disabledTextColor : primary ? primaryTextColor : secondary ? secondaryTextColor : textColor; + + var defaultHoverColor = (0, _colorManipulator.fade)(buttonFilterColor, 0.2); + var defaultRippleColor = buttonFilterColor; + var buttonHoverColor = hoverColor || defaultHoverColor; + var buttonRippleColor = rippleColor || defaultRippleColor; + var buttonBackgroundColor = backgroundColor || buttonColor; + var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled; + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + height: buttonHeight, + lineHeight: buttonHeight + 'px', + minWidth: buttonMinWidth, + color: defaultTextColor, + transition: _transitions2.default.easeOut(), + borderRadius: 2, + userSelect: 'none', + overflow: 'hidden', + backgroundColor: hovered ? buttonHoverColor : buttonBackgroundColor, + padding: 0, + margin: 0, + textAlign: 'center' + }, style); + + var iconCloned = void 0; + var labelStyleIcon = {}; + + if (icon) { + var iconStyles = (0, _simpleAssign2.default)({ + verticalAlign: 'middle', + marginLeft: label && labelPosition !== 'before' ? 12 : 0, + marginRight: label && labelPosition === 'before' ? 12 : 0 + }, icon.props.style); + iconCloned = _react2.default.cloneElement(icon, { + color: icon.props.color || mergedRootStyles.color, + style: iconStyles + }); + + if (labelPosition === 'before') { + labelStyleIcon.paddingRight = 8; + } else { + labelStyleIcon.paddingLeft = 8; + } + } + + var mergedLabelStyles = (0, _simpleAssign2.default)({ + letterSpacing: 0, + textTransform: textTransform, + fontWeight: fontWeight, + fontSize: fontSize + }, labelStyleIcon, labelStyle); + + var labelElement = label ? _react2.default.createElement(_FlatButtonLabel2.default, { label: label, style: mergedLabelStyles }) : undefined; + + // Place label before or after children. + var childrenFragment = labelPosition === 'before' ? { + labelElement: labelElement, + iconCloned: iconCloned, + children: children + } : { + children: children, + iconCloned: iconCloned, + labelElement: labelElement + }; + + var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment); + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + disabled: disabled, + focusRippleColor: buttonRippleColor, + focusRippleOpacity: 0.3, + onKeyboardFocus: this.handleKeyboardFocus, + onMouseLeave: this.handleMouseLeave, + onMouseEnter: this.handleMouseEnter, + onTouchStart: this.handleTouchStart, + style: mergedRootStyles, + touchRippleColor: buttonRippleColor, + touchRippleOpacity: 0.3 + }), + enhancedButtonChildren + ); + } + }]); + return FlatButton; +}(_react.Component); + +FlatButton.muiName = 'FlatButton'; +FlatButton.defaultProps = { + disabled: false, + labelStyle: {}, + labelPosition: 'after', + onKeyboardFocus: function onKeyboardFocus() {}, + onMouseEnter: function onMouseEnter() {}, + onMouseLeave: function onMouseLeave() {}, + onTouchStart: function onTouchStart() {}, + primary: false, + secondary: false +}; +FlatButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? FlatButton.propTypes = { + /** + * Color of button when mouse is not hovering over it. + */ + backgroundColor: _react.PropTypes.string, + /** + * This is what will be displayed inside the button. + * If a label is specified, the text within the label prop will + * be displayed. Otherwise, the component will expect children + * which will then be displayed. (In our example, + * we are nesting an `<input type="file" />` and a `span` + * that acts as our label to be displayed.) This only + * applies to flat and raised buttons. + */ + children: _react.PropTypes.node, + /** + * Disables the button if set to true. + */ + disabled: _react.PropTypes.bool, + /** + * Color of button when mouse hovers over. + */ + hoverColor: _react.PropTypes.string, + /** + * The URL to link to when the button is clicked. + */ + href: _react.PropTypes.string, + /** + * Use this property to display an icon. + */ + icon: _react.PropTypes.node, + /** + * Label for the button. + */ + label: validateLabel, + /** + * Place label before or after the passed children. + */ + labelPosition: _react.PropTypes.oneOf(['before', 'after']), + /** + * Override the inline-styles of the button's label element. + */ + labelStyle: _react.PropTypes.object, + /** + * Callback function fired when the element is focused or blurred by the keyboard. + * + * @param {object} event `focus` or `blur` event targeting the element. + * @param {boolean} isKeyboardFocused Indicates whether the element is focused. + */ + onKeyboardFocus: _react.PropTypes.func, + /** @ignore */ + onMouseEnter: _react.PropTypes.func, + /** @ignore */ + onMouseLeave: _react.PropTypes.func, + /** @ignore */ + onTouchStart: _react.PropTypes.func, + /** + * If true, colors button according to + * primaryTextColor from the Theme. + */ + primary: _react.PropTypes.bool, + /** + * Color for the ripple after button is clicked. + */ + rippleColor: _react.PropTypes.string, + /** + * If true, colors button according to secondaryTextColor from the theme. + * The primary prop has precendent if set to true. + */ + secondary: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = FlatButton; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 680 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var baseTheme = context.muiTheme.baseTheme; + + + return { + root: { + position: 'relative', + paddingLeft: baseTheme.spacing.desktopGutterLess, + paddingRight: baseTheme.spacing.desktopGutterLess, + verticalAlign: 'middle' + } + }; +} + +var FlatButtonLabel = function (_Component) { + (0, _inherits3.default)(FlatButtonLabel, _Component); + + function FlatButtonLabel() { + (0, _classCallCheck3.default)(this, FlatButtonLabel); + return (0, _possibleConstructorReturn3.default)(this, (FlatButtonLabel.__proto__ || (0, _getPrototypeOf2.default)(FlatButtonLabel)).apply(this, arguments)); + } + + (0, _createClass3.default)(FlatButtonLabel, [{ + key: 'render', + value: function render() { + var _props = this.props, + label = _props.label, + style = _props.style; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + 'span', + { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }, + label + ); + } + }]); + return FlatButtonLabel; +}(_react.Component); + +FlatButtonLabel.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? FlatButtonLabel.propTypes = { + label: _react.PropTypes.node, + style: _react.PropTypes.object +} : void 0; +exports.default = FlatButtonLabel; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 681 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _dateUtils = __webpack_require__(71); + +var _DayButton = __webpack_require__(682); + +var _DayButton2 = _interopRequireDefault(_DayButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + root: { + display: 'flex', + flexDirection: 'column', + justifyContent: 'flex-start', + fontWeight: 400, + height: 228, + lineHeight: 2, + position: 'relative', + textAlign: 'center', + MozPaddingStart: 0 + }, + week: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'space-around', + height: 34, + marginBottom: 2 + } +}; + +var CalendarMonth = function (_Component) { + (0, _inherits3.default)(CalendarMonth, _Component); + + function CalendarMonth() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, CalendarMonth); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarMonth.__proto__ || (0, _getPrototypeOf2.default)(CalendarMonth)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapDay = function (event, date) { + if (_this.props.onTouchTapDay) { + _this.props.onTouchTapDay(event, date); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(CalendarMonth, [{ + key: 'isSelectedDateDisabled', + value: function isSelectedDateDisabled() { + return this.selectedDateDisabled; + } + }, { + key: 'shouldDisableDate', + value: function shouldDisableDate(day) { + if (day === null) return false; + var disabled = !(0, _dateUtils.isBetweenDates)(day, this.props.minDate, this.props.maxDate); + if (!disabled && this.props.shouldDisableDate) disabled = this.props.shouldDisableDate(day); + + return disabled; + } + }, { + key: 'getWeekElements', + value: function getWeekElements() { + var _this2 = this; + + var weekArray = (0, _dateUtils.getWeekArray)(this.props.displayDate, this.props.firstDayOfWeek); + + return weekArray.map(function (week, i) { + return _react2.default.createElement( + 'div', + { key: i, style: styles.week }, + _this2.getDayElements(week, i) + ); + }, this); + } + }, { + key: 'getDayElements', + value: function getDayElements(week, i) { + var _this3 = this; + + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + locale = _props.locale, + selectedDate = _props.selectedDate; + + + return week.map(function (day, j) { + var isSameDate = (0, _dateUtils.isEqualDate)(selectedDate, day); + var disabled = _this3.shouldDisableDate(day); + var selected = !disabled && isSameDate; + + if (isSameDate) { + _this3.selectedDateDisabled = disabled; + } + + return _react2.default.createElement(_DayButton2.default, { + DateTimeFormat: DateTimeFormat, + locale: locale, + date: day, + disabled: disabled, + key: 'db' + (i + j), + onTouchTap: _this3.handleTouchTapDay, + selected: selected + }); + }, this); + } + }, { + key: 'render', + value: function render() { + return _react2.default.createElement( + 'div', + { style: styles.root }, + this.getWeekElements() + ); + } + }]); + return CalendarMonth; +}(_react.Component); + +process.env.NODE_ENV !== "production" ? CalendarMonth.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + autoOk: _react.PropTypes.bool, + displayDate: _react.PropTypes.object.isRequired, + firstDayOfWeek: _react.PropTypes.number, + locale: _react.PropTypes.string.isRequired, + maxDate: _react.PropTypes.object, + minDate: _react.PropTypes.object, + onTouchTapDay: _react.PropTypes.func, + selectedDate: _react.PropTypes.object.isRequired, + shouldDisableDate: _react.PropTypes.func +} : void 0; +exports.default = CalendarMonth; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 682 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _dateUtils = __webpack_require__(71); + +var _EnhancedButton = __webpack_require__(54); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var date = props.date, + disabled = props.disabled, + selected = props.selected; + var hover = state.hover; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + datePicker = _context$muiTheme.datePicker; + + + var labelColor = baseTheme.palette.textColor; + var buttonStateOpacity = 0; + var buttonStateTransform = 'scale(0)'; + + if (hover || selected) { + labelColor = datePicker.selectTextColor; + buttonStateOpacity = selected ? 1 : 0.6; + buttonStateTransform = 'scale(1)'; + } else if ((0, _dateUtils.isEqualDate)(date, new Date())) { + labelColor = datePicker.color; + } + + return { + root: { + boxSizing: 'border-box', + fontWeight: '400', + opacity: disabled && '0.4', + padding: '4px 0px', + position: 'relative', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + width: 42 + }, + label: { + color: labelColor, + fontWeight: '400', + position: 'relative' + }, + buttonState: { + backgroundColor: datePicker.selectColor, + borderRadius: '50%', + height: 34, + left: 4, + opacity: buttonStateOpacity, + position: 'absolute', + top: 0, + transform: buttonStateTransform, + transition: _transitions2.default.easeOut(), + width: 34 + } + }; +} + +var DayButton = function (_Component) { + (0, _inherits3.default)(DayButton, _Component); + + function DayButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DayButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DayButton.__proto__ || (0, _getPrototypeOf2.default)(DayButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hover: false + }, _this.handleMouseEnter = function () { + if (!_this.props.disabled) { + _this.setState({ hover: true }); + } + }, _this.handleMouseLeave = function () { + if (!_this.props.disabled) { + _this.setState({ hover: false }); + } + }, _this.handleTouchTap = function (event) { + if (!_this.props.disabled && _this.props.onTouchTap) { + _this.props.onTouchTap(event, _this.props.date); + } + }, _this.handleKeyboardFocus = function (event, keyboardFocused) { + if (!_this.props.disabled && _this.props.onKeyboardFocus) { + _this.props.onKeyboardFocus(event, keyboardFocused, _this.props.date); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DayButton, [{ + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + date = _props.date, + disabled = _props.disabled, + locale = _props.locale, + onTouchTap = _props.onTouchTap, + selected = _props.selected, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'date', 'disabled', 'locale', 'onTouchTap', 'selected']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return date ? _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + disabled: disabled, + disableFocusRipple: true, + disableTouchRipple: true, + onKeyboardFocus: this.handleKeyboardFocus, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onTouchTap: this.handleTouchTap, + style: styles.root + }), + _react2.default.createElement('div', { style: prepareStyles(styles.buttonState) }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + new DateTimeFormat(locale, { + day: 'numeric' + }).format(date) + ) + ) : _react2.default.createElement('span', { style: prepareStyles(styles.root) }); + } + }]); + return DayButton; +}(_react.Component); + +DayButton.defaultProps = { + selected: false, + disabled: false +}; +DayButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? DayButton.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + date: _react.PropTypes.object, + disabled: _react.PropTypes.bool, + locale: _react.PropTypes.string.isRequired, + onKeyboardFocus: _react.PropTypes.func, + onTouchTap: _react.PropTypes.func, + selected: _react.PropTypes.bool +} : void 0; +exports.default = DayButton; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 683 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _YearButton = __webpack_require__(684); + +var _YearButton2 = _interopRequireDefault(_YearButton); + +var _dateUtils = __webpack_require__(71); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CalendarYear = function (_Component) { + (0, _inherits3.default)(CalendarYear, _Component); + + function CalendarYear() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, CalendarYear); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarYear.__proto__ || (0, _getPrototypeOf2.default)(CalendarYear)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapYear = function (event, year) { + if (_this.props.onTouchTapYear) { + _this.props.onTouchTapYear(event, year); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(CalendarYear, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.scrollToSelectedYear(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.scrollToSelectedYear(); + } + }, { + key: 'getYears', + value: function getYears() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + locale = _props.locale, + minDate = _props.minDate, + maxDate = _props.maxDate, + selectedDate = _props.selectedDate; + + + var minYear = minDate.getFullYear(); + var maxYear = maxDate.getFullYear(); + var years = []; + var dateCheck = (0, _dateUtils.cloneDate)(selectedDate); + + for (var year = minYear; year <= maxYear; year++) { + dateCheck.setFullYear(year); + var selected = selectedDate.getFullYear() === year; + var selectedProps = {}; + if (selected) { + selectedProps.ref = 'selectedYearButton'; + } + + var yearFormated = new DateTimeFormat(locale, { + year: 'numeric' + }).format(dateCheck); + + var yearButton = _react2.default.createElement( + _YearButton2.default, + (0, _extends3.default)({ + key: 'yb' + year, + onTouchTap: this.handleTouchTapYear, + selected: selected, + year: year + }, selectedProps), + yearFormated + ); + + years.push(yearButton); + } + + return years; + } + }, { + key: 'scrollToSelectedYear', + value: function scrollToSelectedYear() { + if (this.refs.selectedYearButton === undefined) { + return; + } + + var container = _reactDom2.default.findDOMNode(this); + var yearButtonNode = _reactDom2.default.findDOMNode(this.refs.selectedYearButton); + + var containerHeight = container.clientHeight; + var yearButtonNodeHeight = yearButtonNode.clientHeight || 32; + + var scrollYOffset = yearButtonNode.offsetTop + yearButtonNodeHeight / 2 - containerHeight / 2; + container.scrollTop = scrollYOffset; + } + }, { + key: 'render', + value: function render() { + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + calendarYearBackgroundColor = _context$muiTheme.datePicker.calendarYearBackgroundColor; + + + var styles = { + root: { + backgroundColor: calendarYearBackgroundColor, + height: 'inherit', + lineHeight: '35px', + overflowX: 'hidden', + overflowY: 'scroll', + position: 'relative' + }, + child: { + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + minHeight: '100%' + } + }; + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.child) }, + this.getYears() + ) + ); + } + }]); + return CalendarYear; +}(_react.Component); + +CalendarYear.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? CalendarYear.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + locale: _react.PropTypes.string.isRequired, + maxDate: _react.PropTypes.object.isRequired, + minDate: _react.PropTypes.object.isRequired, + onTouchTapYear: _react.PropTypes.func, + selectedDate: _react.PropTypes.object.isRequired, + wordings: _react.PropTypes.object +} : void 0; +exports.default = CalendarYear; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 684 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _EnhancedButton = __webpack_require__(54); + +var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var selected = props.selected, + year = props.year; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + datePicker = _context$muiTheme.datePicker; + var hover = state.hover; + + + return { + root: { + boxSizing: 'border-box', + color: year === new Date().getFullYear() && datePicker.color, + display: 'block', + fontSize: 14, + margin: '0 auto', + position: 'relative', + textAlign: 'center', + lineHeight: 'inherit', + WebkitTapHighlightColor: 'rgba(0,0,0,0)' }, + label: { + alignSelf: 'center', + color: hover || selected ? datePicker.color : baseTheme.palette.textColor, + fontSize: selected ? 26 : 17, + fontWeight: hover ? 450 : selected ? 500 : 400, + position: 'relative', + top: -1 + } + }; +} + +var YearButton = function (_Component) { + (0, _inherits3.default)(YearButton, _Component); + + function YearButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, YearButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = YearButton.__proto__ || (0, _getPrototypeOf2.default)(YearButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + hover: false + }, _this.handleMouseEnter = function () { + _this.setState({ hover: true }); + }, _this.handleMouseLeave = function () { + _this.setState({ hover: false }); + }, _this.handleTouchTap = function (event) { + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event, _this.props.year); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(YearButton, [{ + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + className = _props.className, + onTouchTap = _props.onTouchTap, + selected = _props.selected, + year = _props.year, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'onTouchTap', 'selected', 'year']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + return _react2.default.createElement( + _EnhancedButton2.default, + (0, _extends3.default)({}, other, { + disableFocusRipple: true, + disableTouchRipple: true, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onTouchTap: this.handleTouchTap, + style: styles.root + }), + _react2.default.createElement( + 'span', + { style: prepareStyles(styles.label) }, + children + ) + ); + } + }]); + return YearButton; +}(_react.Component); + +YearButton.defaultProps = { + selected: false +}; +YearButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? YearButton.propTypes = { + children: _react.PropTypes.node.isRequired, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + onTouchTap: _react.PropTypes.func, + selected: _react.PropTypes.bool, + year: _react.PropTypes.number.isRequired +} : void 0; +exports.default = YearButton; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 685 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _IconButton = __webpack_require__(83); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _chevronLeft = __webpack_require__(686); + +var _chevronLeft2 = _interopRequireDefault(_chevronLeft); + +var _chevronRight = __webpack_require__(687); + +var _chevronRight2 = _interopRequireDefault(_chevronRight); + +var _SlideIn = __webpack_require__(183); + +var _SlideIn2 = _interopRequireDefault(_SlideIn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + root: { + display: 'flex', + justifyContent: 'space-between', + backgroundColor: 'inherit', + height: 48 + }, + titleDiv: { + fontSize: 14, + fontWeight: '500', + textAlign: 'center', + width: '100%' + }, + titleText: { + height: 'inherit', + paddingTop: 12 + } +}; + +var CalendarToolbar = function (_Component) { + (0, _inherits3.default)(CalendarToolbar, _Component); + + function CalendarToolbar() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, CalendarToolbar); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarToolbar.__proto__ || (0, _getPrototypeOf2.default)(CalendarToolbar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + transitionDirection: 'up' + }, _this.handleTouchTapPrevMonth = function () { + if (_this.props.onMonthChange) { + _this.props.onMonthChange(-1); + } + }, _this.handleTouchTapNextMonth = function () { + if (_this.props.onMonthChange) { + _this.props.onMonthChange(1); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(CalendarToolbar, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.displayDate !== this.props.displayDate) { + var direction = nextProps.displayDate > this.props.displayDate ? 'left' : 'right'; + this.setState({ + transitionDirection: direction + }); + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + locale = _props.locale, + displayDate = _props.displayDate; + + + var dateTimeFormatted = new DateTimeFormat(locale, { + month: 'long', + year: 'numeric' + }).format(displayDate); + + return _react2.default.createElement( + 'div', + { style: styles.root }, + _react2.default.createElement( + _IconButton2.default, + { + disabled: !this.props.prevMonth, + onTouchTap: this.handleTouchTapPrevMonth + }, + _react2.default.createElement(_chevronLeft2.default, null) + ), + _react2.default.createElement( + _SlideIn2.default, + { + direction: this.state.transitionDirection, + style: styles.titleDiv + }, + _react2.default.createElement( + 'div', + { key: dateTimeFormatted, style: styles.titleText }, + dateTimeFormatted + ) + ), + _react2.default.createElement( + _IconButton2.default, + { + disabled: !this.props.nextMonth, + onTouchTap: this.handleTouchTapNextMonth + }, + _react2.default.createElement(_chevronRight2.default, null) + ) + ); + } + }]); + return CalendarToolbar; +}(_react.Component); + +CalendarToolbar.defaultProps = { + nextMonth: true, + prevMonth: true +}; +process.env.NODE_ENV !== "production" ? CalendarToolbar.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + displayDate: _react.PropTypes.object.isRequired, + locale: _react.PropTypes.string.isRequired, + nextMonth: _react.PropTypes.bool, + onMonthChange: _react.PropTypes.func, + prevMonth: _react.PropTypes.bool +} : void 0; +exports.default = CalendarToolbar; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 686 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationChevronLeft = function NavigationChevronLeft(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z' }) + ); +}; +NavigationChevronLeft = (0, _pure2.default)(NavigationChevronLeft); +NavigationChevronLeft.displayName = 'NavigationChevronLeft'; +NavigationChevronLeft.muiName = 'SvgIcon'; + +exports.default = NavigationChevronLeft; + +/***/ }), +/* 687 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationChevronRight = function NavigationChevronRight(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z' }) + ); +}; +NavigationChevronRight = (0, _pure2.default)(NavigationChevronRight); +NavigationChevronRight.displayName = 'NavigationChevronRight'; +NavigationChevronRight.muiName = 'SvgIcon'; + +exports.default = NavigationChevronRight; + +/***/ }), +/* 688 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _autoPrefix = __webpack_require__(104); + +var _autoPrefix2 = _interopRequireDefault(_autoPrefix); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SlideInChild = function (_Component) { + (0, _inherits3.default)(SlideInChild, _Component); + + function SlideInChild() { + (0, _classCallCheck3.default)(this, SlideInChild); + return (0, _possibleConstructorReturn3.default)(this, (SlideInChild.__proto__ || (0, _getPrototypeOf2.default)(SlideInChild)).apply(this, arguments)); + } + + (0, _createClass3.default)(SlideInChild, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimer); + clearTimeout(this.leaveTimer); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + var x = this.props.direction === 'left' ? '100%' : this.props.direction === 'right' ? '-100%' : '0'; + var y = this.props.direction === 'up' ? '100%' : this.props.direction === 'down' ? '-100%' : '0'; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'translate(' + x + ', ' + y + ')'); + + this.enterTimer = setTimeout(callback, this.props.enterDelay); + } + }, { + key: 'componentDidEnter', + value: function componentDidEnter() { + var style = _reactDom2.default.findDOMNode(this).style; + style.opacity = '1'; + _autoPrefix2.default.set(style, 'transform', 'translate(0,0)'); + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + var style = _reactDom2.default.findDOMNode(this).style; + var direction = this.props.getLeaveDirection(); + var x = direction === 'left' ? '-100%' : direction === 'right' ? '100%' : '0'; + var y = direction === 'up' ? '-100%' : direction === 'down' ? '100%' : '0'; + + style.opacity = '0'; + _autoPrefix2.default.set(style, 'transform', 'translate(' + x + ', ' + y + ')'); + + this.leaveTimer = setTimeout(callback, 450); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + children = _props.children, + enterDelay = _props.enterDelay, + getLeaveDirection = _props.getLeaveDirection, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'getLeaveDirection', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var mergedRootStyles = (0, _simpleAssign2.default)({}, { + position: 'absolute', + height: '100%', + width: '100%', + top: 0, + left: 0, + transition: _transitions2.default.easeOut(null, ['transform', 'opacity']) + }, style); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }), + children + ); + } + }]); + return SlideInChild; +}(_react.Component); + +SlideInChild.defaultProps = { + enterDelay: 0 +}; +SlideInChild.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? SlideInChild.propTypes = { + children: _react.PropTypes.node, + direction: _react.PropTypes.string, + enterDelay: _react.PropTypes.number, + // This callback is needed bacause the direction could change when leaving the DOM + getLeaveDirection: _react.PropTypes.func.isRequired, + style: _react.PropTypes.object +} : void 0; +exports.default = SlideInChild; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 689 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _SlideIn = __webpack_require__(183); + +var _SlideIn2 = _interopRequireDefault(_SlideIn); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var datePicker = context.muiTheme.datePicker; + var selectedYear = state.selectedYear; + + var isLandscape = props.mode === 'landscape'; + + var styles = { + root: { + width: isLandscape ? 165 : '100%', + height: isLandscape ? 330 : 'auto', + float: isLandscape ? 'left' : 'none', + fontWeight: 700, + display: 'inline-block', + backgroundColor: datePicker.selectColor, + borderTopLeftRadius: 2, + borderTopRightRadius: isLandscape ? 0 : 2, + borderBottomLeftRadius: isLandscape ? 2 : 0, + color: datePicker.textColor, + padding: 20, + boxSizing: 'border-box' + }, + monthDay: { + display: 'block', + fontSize: 36, + lineHeight: '36px', + height: props.mode === 'landscape' ? '100%' : 38, + opacity: selectedYear ? 0.7 : 1, + transition: _transitions2.default.easeOut(), + width: '100%', + fontWeight: '500' + }, + monthDayTitle: { + cursor: !selectedYear ? 'default' : 'pointer', + width: '100%', + display: 'block' + }, + year: { + margin: 0, + fontSize: 16, + fontWeight: '500', + lineHeight: '16px', + height: 16, + opacity: selectedYear ? 1 : 0.7, + transition: _transitions2.default.easeOut(), + marginBottom: 10 + }, + yearTitle: { + cursor: props.disableYearSelection ? 'not-allowed' : !selectedYear ? 'pointer' : 'default' + } + }; + + return styles; +} + +var DateDisplay = function (_Component) { + (0, _inherits3.default)(DateDisplay, _Component); + + function DateDisplay() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DateDisplay); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DateDisplay.__proto__ || (0, _getPrototypeOf2.default)(DateDisplay)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + selectedYear: false, + transitionDirection: 'up' + }, _this.handleTouchTapMonthDay = function () { + if (_this.props.onTouchTapMonthDay && _this.state.selectedYear) { + _this.props.onTouchTapMonthDay(); + } + + _this.setState({ selectedYear: false }); + }, _this.handleTouchTapYear = function () { + if (_this.props.onTouchTapYear && !_this.props.disableYearSelection && !_this.state.selectedYear) { + _this.props.onTouchTapYear(); + } + + if (!_this.props.disableYearSelection) { + _this.setState({ selectedYear: true }); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(DateDisplay, [{ + key: 'componentWillMount', + value: function componentWillMount() { + if (!this.props.monthDaySelected) { + this.setState({ selectedYear: true }); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.selectedDate !== this.props.selectedDate) { + var direction = nextProps.selectedDate > this.props.selectedDate ? 'up' : 'down'; + this.setState({ + transitionDirection: direction + }); + } + + if (nextProps.monthDaySelected !== undefined) { + this.setState({ + selectedYear: !nextProps.monthDaySelected + }); + } + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + DateTimeFormat = _props.DateTimeFormat, + disableYearSelection = _props.disableYearSelection, + locale = _props.locale, + mode = _props.mode, + monthDaySelected = _props.monthDaySelected, + onTouchTapMonthDay = _props.onTouchTapMonthDay, + onTouchTapYear = _props.onTouchTapYear, + selectedDate = _props.selectedDate, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'disableYearSelection', 'locale', 'mode', 'monthDaySelected', 'onTouchTapMonthDay', 'onTouchTapYear', 'selectedDate', 'style']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + var year = new DateTimeFormat(locale, { + year: 'numeric' + }).format(selectedDate); + + var dateTime = new DateTimeFormat(locale, { + month: 'short', + weekday: 'short', + day: '2-digit' + }).format(selectedDate); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(styles.root, style) }), + _react2.default.createElement( + _SlideIn2.default, + { style: styles.year, direction: this.state.transitionDirection }, + _react2.default.createElement( + 'div', + { key: year, style: styles.yearTitle, onTouchTap: this.handleTouchTapYear }, + year + ) + ), + _react2.default.createElement( + _SlideIn2.default, + { style: styles.monthDay, direction: this.state.transitionDirection }, + _react2.default.createElement( + 'div', + { + key: dateTime, + onTouchTap: this.handleTouchTapMonthDay, + style: styles.monthDayTitle + }, + dateTime + ) + ) + ); + } + }]); + return DateDisplay; +}(_react.Component); + +DateDisplay.defaultProps = { + disableYearSelection: false, + monthDaySelected: true +}; +DateDisplay.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? DateDisplay.propTypes = { + DateTimeFormat: _react.PropTypes.func.isRequired, + disableYearSelection: _react.PropTypes.bool, + locale: _react.PropTypes.string.isRequired, + mode: _react.PropTypes.oneOf(['portrait', 'landscape']), + monthDaySelected: _react.PropTypes.bool, + onTouchTapMonthDay: _react.PropTypes.func, + onTouchTapYear: _react.PropTypes.func, + selectedDate: _react.PropTypes.object.isRequired, + style: _react.PropTypes.object +} : void 0; +exports.default = DateDisplay; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 690 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _reactEventListener = __webpack_require__(60); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(28); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _Overlay = __webpack_require__(691); + +var _Overlay2 = _interopRequireDefault(_Overlay); + +var _RenderToLayer = __webpack_require__(284); + +var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer); + +var _Paper = __webpack_require__(37); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _reactAddonsTransitionGroup = __webpack_require__(105); + +var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TransitionItem = function (_Component) { + (0, _inherits3.default)(TransitionItem, _Component); + + function TransitionItem() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TransitionItem); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TransitionItem.__proto__ || (0, _getPrototypeOf2.default)(TransitionItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + style: {} + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TransitionItem, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + clearTimeout(this.enterTimeout); + clearTimeout(this.leaveTimeout); + } + }, { + key: 'componentWillEnter', + value: function componentWillEnter(callback) { + this.componentWillAppear(callback); + } + }, { + key: 'componentWillAppear', + value: function componentWillAppear(callback) { + var spacing = this.context.muiTheme.baseTheme.spacing; + + this.setState({ + style: { + opacity: 1, + transform: 'translate(0, ' + spacing.desktopKeylineIncrement + 'px)' + } + }); + + this.enterTimeout = setTimeout(callback, 450); // matches transition duration + } + }, { + key: 'componentWillLeave', + value: function componentWillLeave(callback) { + this.setState({ + style: { + opacity: 0, + transform: 'translate(0, 0)' + } + }); + + this.leaveTimeout = setTimeout(callback, 450); // matches transition duration + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + style = _props.style, + children = _props.children, + other = (0, _objectWithoutProperties3.default)(_props, ['style', 'children']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, this.state.style, style)) }), + children + ); + } + }]); + return TransitionItem; +}(_react.Component); + +TransitionItem.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? TransitionItem.propTypes = { + children: _react.PropTypes.node, + style: _react.PropTypes.object +} : void 0; + + +function getStyles(props, context) { + var autoScrollBodyContent = props.autoScrollBodyContent, + open = props.open; + var _context$muiTheme = context.muiTheme, + _context$muiTheme$bas = _context$muiTheme.baseTheme, + spacing = _context$muiTheme$bas.spacing, + palette = _context$muiTheme$bas.palette, + dialog = _context$muiTheme.dialog, + zIndex = _context$muiTheme.zIndex; + + + var gutter = spacing.desktopGutter; + var borderScroll = '1px solid ' + palette.borderColor; + + return { + root: { + position: 'fixed', + boxSizing: 'border-box', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + zIndex: zIndex.dialog, + top: 0, + left: open ? 0 : -10000, + width: '100%', + height: '100%', + transition: open ? _transitions2.default.easeOut('0ms', 'left', '0ms') : _transitions2.default.easeOut('0ms', 'left', '450ms') + }, + content: { + boxSizing: 'border-box', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + transition: _transitions2.default.easeOut(), + position: 'relative', + width: '75%', + maxWidth: spacing.desktopKeylineIncrement * 12, + margin: '0 auto', + zIndex: zIndex.dialog + }, + actionsContainer: { + boxSizing: 'border-box', + WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated) + padding: 8, + width: '100%', + textAlign: 'right', + marginTop: autoScrollBodyContent ? -1 : 0, + borderTop: autoScrollBodyContent ? borderScroll : 'none' + }, + overlay: { + zIndex: zIndex.dialogOverlay + }, + title: { + margin: 0, + padding: gutter + 'px ' + gutter + 'px 20px ' + gutter + 'px', + color: palette.textColor, + fontSize: dialog.titleFontSize, + lineHeight: '32px', + fontWeight: 400, + marginBottom: autoScrollBodyContent ? -1 : 0, + borderBottom: autoScrollBodyContent ? borderScroll : 'none' + }, + body: { + fontSize: dialog.bodyFontSize, + color: dialog.bodyColor, + padding: (props.title ? 0 : gutter) + 'px ' + gutter + 'px ' + gutter + 'px', + boxSizing: 'border-box', + overflowY: autoScrollBodyContent ? 'auto' : 'hidden' + } + }; +} + +var DialogInline = function (_Component2) { + (0, _inherits3.default)(DialogInline, _Component2); + + function DialogInline() { + var _ref2; + + var _temp2, _this2, _ret2; + + (0, _classCallCheck3.default)(this, DialogInline); + + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + return _ret2 = (_temp2 = (_this2 = (0, _possibleConstructorReturn3.default)(this, (_ref2 = DialogInline.__proto__ || (0, _getPrototypeOf2.default)(DialogInline)).call.apply(_ref2, [this].concat(args))), _this2), _this2.handleTouchTapOverlay = function () { + _this2.requestClose(false); + }, _this2.handleKeyUp = function (event) { + if ((0, _keycode2.default)(event) === 'esc') { + _this2.requestClose(false); + } + }, _this2.handleResize = function () { + _this2.positionDialog(); + }, _temp2), (0, _possibleConstructorReturn3.default)(_this2, _ret2); + } + + (0, _createClass3.default)(DialogInline, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.positionDialog(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.positionDialog(); + } + }, { + key: 'positionDialog', + value: function positionDialog() { + var _props2 = this.props, + actions = _props2.actions, + autoDetectWindowHeight = _props2.autoDetectWindowHeight, + autoScrollBodyContent = _props2.autoScrollBodyContent, + bodyStyle = _props2.bodyStyle, + open = _props2.open, + repositionOnUpdate = _props2.repositionOnUpdate, + title = _props2.title; + + + if (!open) { + return; + } + + var clientHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; + var container = _reactDom2.default.findDOMNode(this); + var dialogWindow = _reactDom2.default.findDOMNode(this.refs.dialogWindow); + var dialogContent = _reactDom2.default.findDOMNode(this.refs.dialogContent); + var minPaddingTop = 16; + + // Reset the height in case the window was resized. + dialogWindow.style.height = ''; + dialogContent.style.height = ''; + + var dialogWindowHeight = dialogWindow.offsetHeight; + var paddingTop = (clientHeight - dialogWindowHeight) / 2 - 64; + if (paddingTop < minPaddingTop) paddingTop = minPaddingTop; + + // Vertically center the dialog window, but make sure it doesn't + // transition to that position. + if (repositionOnUpdate || !container.style.paddingTop) { + container.style.paddingTop = paddingTop + 'px'; + } + + // Force a height if the dialog is taller than clientHeight + if (autoDetectWindowHeight || autoScrollBodyContent) { + var styles = getStyles(this.props, this.context); + styles.body = (0, _simpleAssign2.default)(styles.body, bodyStyle); + var maxDialogContentHeight = clientHeight - 2 * 64; + + if (title) maxDialogContentHeight -= dialogContent.previousSibling.offsetHeight; + + if (_react2.default.Children.count(actions)) { + maxDialogContentHeight -= dialogContent.nextSibling.offsetHeight; + } + + dialogContent.style.maxHeight = maxDialogContentHeight + 'px'; + } + } + }, { + key: 'requestClose', + value: function requestClose(buttonClicked) { + if (!buttonClicked && this.props.modal) { + return; + } + + if (this.props.onRequestClose) { + this.props.onRequestClose(!!buttonClicked); + } + } + }, { + key: 'render', + value: function render() { + var _props3 = this.props, + actions = _props3.actions, + actionsContainerClassName = _props3.actionsContainerClassName, + actionsContainerStyle = _props3.actionsContainerStyle, + bodyClassName = _props3.bodyClassName, + bodyStyle = _props3.bodyStyle, + children = _props3.children, + className = _props3.className, + contentClassName = _props3.contentClassName, + contentStyle = _props3.contentStyle, + overlayClassName = _props3.overlayClassName, + overlayStyle = _props3.overlayStyle, + open = _props3.open, + titleClassName = _props3.titleClassName, + titleStyle = _props3.titleStyle, + title = _props3.title, + style = _props3.style; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + styles.root = (0, _simpleAssign2.default)(styles.root, style); + styles.content = (0, _simpleAssign2.default)(styles.content, contentStyle); + styles.body = (0, _simpleAssign2.default)(styles.body, bodyStyle); + styles.actionsContainer = (0, _simpleAssign2.default)(styles.actionsContainer, actionsContainerStyle); + styles.overlay = (0, _simpleAssign2.default)(styles.overlay, overlayStyle); + styles.title = (0, _simpleAssign2.default)(styles.title, titleStyle); + + var actionsContainer = _react2.default.Children.count(actions) > 0 && _react2.default.createElement( + 'div', + { className: actionsContainerClassName, style: prepareStyles(styles.actionsContainer) }, + _react2.default.Children.toArray(actions) + ); + + var titleElement = title; + if (_react2.default.isValidElement(title)) { + titleElement = _react2.default.cloneElement(title, { + className: title.props.className || titleClassName, + style: prepareStyles((0, _simpleAssign2.default)(styles.title, title.props.style)) + }); + } else if (typeof title === 'string') { + titleElement = _react2.default.createElement( + 'h3', + { className: titleClassName, style: prepareStyles(styles.title) }, + title + ); + } + + return _react2.default.createElement( + 'div', + { className: className, style: prepareStyles(styles.root) }, + open && _react2.default.createElement(_reactEventListener2.default, { + target: 'window', + onKeyUp: this.handleKeyUp, + onResize: this.handleResize + }), + _react2.default.createElement( + _reactAddonsTransitionGroup2.default, + { + component: 'div', + ref: 'dialogWindow', + transitionAppear: true, + transitionAppearTimeout: 450, + transitionEnter: true, + transitionEnterTimeout: 450 + }, + open && _react2.default.createElement( + TransitionItem, + { + className: contentClassName, + style: styles.content + }, + _react2.default.createElement( + _Paper2.default, + { zDepth: 4 }, + titleElement, + _react2.default.createElement( + 'div', + { + ref: 'dialogContent', + className: bodyClassName, + style: prepareStyles(styles.body) + }, + children + ), + actionsContainer + ) + ) + ), + _react2.default.createElement(_Overlay2.default, { + show: open, + className: overlayClassName, + style: styles.overlay, + onTouchTap: this.handleTouchTapOverlay + }) + ); + } + }]); + return DialogInline; +}(_react.Component); + +DialogInline.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? DialogInline.propTypes = { + actions: _react.PropTypes.node, + actionsContainerClassName: _react.PropTypes.string, + actionsContainerStyle: _react.PropTypes.object, + autoDetectWindowHeight: _react.PropTypes.bool, + autoScrollBodyContent: _react.PropTypes.bool, + bodyClassName: _react.PropTypes.string, + bodyStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + className: _react.PropTypes.string, + contentClassName: _react.PropTypes.string, + contentStyle: _react.PropTypes.object, + modal: _react.PropTypes.bool, + onRequestClose: _react.PropTypes.func, + open: _react.PropTypes.bool.isRequired, + overlayClassName: _react.PropTypes.string, + overlayStyle: _react.PropTypes.object, + repositionOnUpdate: _react.PropTypes.bool, + style: _react.PropTypes.object, + title: _react.PropTypes.node, + titleClassName: _react.PropTypes.string, + titleStyle: _react.PropTypes.object +} : void 0; + +var Dialog = function (_Component3) { + (0, _inherits3.default)(Dialog, _Component3); + + function Dialog() { + var _ref3; + + var _temp3, _this3, _ret3; + + (0, _classCallCheck3.default)(this, Dialog); + + for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + + return _ret3 = (_temp3 = (_this3 = (0, _possibleConstructorReturn3.default)(this, (_ref3 = Dialog.__proto__ || (0, _getPrototypeOf2.default)(Dialog)).call.apply(_ref3, [this].concat(args))), _this3), _this3.renderLayer = function () { + return _react2.default.createElement(DialogInline, _this3.props); + }, _temp3), (0, _possibleConstructorReturn3.default)(_this3, _ret3); + } + + (0, _createClass3.default)(Dialog, [{ + key: 'render', + value: function render() { + return _react2.default.createElement(_RenderToLayer2.default, { render: this.renderLayer, open: true, useLayerForClickAway: false }); + } + }]); + return Dialog; +}(_react.Component); + +Dialog.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +Dialog.defaultProps = { + autoDetectWindowHeight: true, + autoScrollBodyContent: false, + modal: false, + repositionOnUpdate: true +}; +process.env.NODE_ENV !== "production" ? Dialog.propTypes = { + /** + * Action buttons to display below the Dialog content (`children`). + * This property accepts either a React element, or an array of React elements. + */ + actions: _react.PropTypes.node, + /** + * The `className` to add to the actions container's root element. + */ + actionsContainerClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the actions container's root element. + */ + actionsContainerStyle: _react.PropTypes.object, + /** + * If set to true, the height of the `Dialog` will be auto detected. A max height + * will be enforced so that the content does not extend beyond the viewport. + */ + autoDetectWindowHeight: _react.PropTypes.bool, + /** + * If set to true, the body content of the `Dialog` will be scrollable. + */ + autoScrollBodyContent: _react.PropTypes.bool, + /** + * The `className` to add to the content's root element under the title. + */ + bodyClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the content's root element under the title. + */ + bodyStyle: _react.PropTypes.object, + /** + * The contents of the `Dialog`. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The `className` to add to the content container. + */ + contentClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the content container. + */ + contentStyle: _react.PropTypes.object, + /** + * Force the user to use one of the actions in the `Dialog`. + * Clicking outside the `Dialog` will not trigger the `onRequestClose`. + */ + modal: _react.PropTypes.bool, + /** + * Fired when the `Dialog` is requested to be closed by a click outside the `Dialog` or on the buttons. + * + * @param {bool} buttonClicked Determines whether a button click triggered this request. + */ + onRequestClose: _react.PropTypes.func, + /** + * Controls whether the Dialog is opened or not. + */ + open: _react.PropTypes.bool.isRequired, + /** + * The `className` to add to the `Overlay` component that is rendered behind the `Dialog`. + */ + overlayClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the `Overlay` component that is rendered behind the `Dialog`. + */ + overlayStyle: _react.PropTypes.object, + /** + * Determines whether the `Dialog` should be repositioned when it's contents are updated. + */ + repositionOnUpdate: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The title to display on the `Dialog`. Could be number, string, element or an array containing these types. + */ + title: _react.PropTypes.node, + /** + * The `className` to add to the title's root container element. + */ + titleClassName: _react.PropTypes.string, + /** + * Overrides the inline-styles of the title's root container element. + */ + titleStyle: _react.PropTypes.object +} : void 0; +exports.default = Dialog; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 691 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _AutoLockScrolling = __webpack_require__(692); + +var _AutoLockScrolling2 = _interopRequireDefault(_AutoLockScrolling); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var overlay = context.muiTheme.overlay; + + + var style = { + root: { + position: 'fixed', + height: '100%', + width: '100%', + top: 0, + left: '-100%', + opacity: 0, + backgroundColor: overlay.backgroundColor, + WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)', // Remove mobile color flashing (deprecated) + + // Two ways to promote overlay to its own render layer + willChange: 'opacity', + transform: 'translateZ(0)', + + transition: props.transitionEnabled && _transitions2.default.easeOut('0ms', 'left', '400ms') + ', ' + _transitions2.default.easeOut('400ms', 'opacity') + } + }; + + if (props.show) { + (0, _simpleAssign2.default)(style.root, { + left: 0, + opacity: 1, + transition: _transitions2.default.easeOut('0ms', 'left') + ', ' + _transitions2.default.easeOut('400ms', 'opacity') + }); + } + + return style; +} + +var Overlay = function (_Component) { + (0, _inherits3.default)(Overlay, _Component); + + function Overlay() { + (0, _classCallCheck3.default)(this, Overlay); + return (0, _possibleConstructorReturn3.default)(this, (Overlay.__proto__ || (0, _getPrototypeOf2.default)(Overlay)).apply(this, arguments)); + } + + (0, _createClass3.default)(Overlay, [{ + key: 'setOpacity', + value: function setOpacity(opacity) { + this.refs.overlay.style.opacity = opacity; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + autoLockScrolling = _props.autoLockScrolling, + show = _props.show, + style = _props.style, + transitionEnabled = _props.transitionEnabled, + other = (0, _objectWithoutProperties3.default)(_props, ['autoLockScrolling', 'show', 'style', 'transitionEnabled']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { ref: 'overlay', style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }), + autoLockScrolling && _react2.default.createElement(_AutoLockScrolling2.default, { lock: show }) + ); + } + }]); + return Overlay; +}(_react.Component); + +Overlay.defaultProps = { + autoLockScrolling: true, + style: {}, + transitionEnabled: true +}; +Overlay.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Overlay.propTypes = { + autoLockScrolling: _react.PropTypes.bool, + show: _react.PropTypes.bool.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + transitionEnabled: _react.PropTypes.bool +} : void 0; +exports.default = Overlay; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 692 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var originalBodyOverflow = null; +var lockingCounter = 0; + +var AutoLockScrolling = function (_Component) { + (0, _inherits3.default)(AutoLockScrolling, _Component); + + function AutoLockScrolling() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, AutoLockScrolling); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoLockScrolling.__proto__ || (0, _getPrototypeOf2.default)(AutoLockScrolling)).call.apply(_ref, [this].concat(args))), _this), _this.locked = false, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(AutoLockScrolling, [{ + key: 'componentDidMount', + value: function componentDidMount() { + if (this.props.lock === true) { + this.preventScrolling(); + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (this.props.lock !== nextProps.lock) { + if (nextProps.lock) { + this.preventScrolling(); + } else { + this.allowScrolling(); + } + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.allowScrolling(); + } + + // force to only lock/unlock once + + }, { + key: 'preventScrolling', + value: function preventScrolling() { + if (this.locked === true) { + return; + } + + lockingCounter = lockingCounter + 1; + this.locked = true; + + // only lock the first time the component is mounted. + if (lockingCounter === 1) { + var body = document.getElementsByTagName('body')[0]; + originalBodyOverflow = body.style.overflow; + body.style.overflow = 'hidden'; + } + } + }, { + key: 'allowScrolling', + value: function allowScrolling() { + if (this.locked === true) { + lockingCounter = lockingCounter - 1; + this.locked = false; + } + + if (lockingCounter === 0 && originalBodyOverflow !== null) { + var body = document.getElementsByTagName('body')[0]; + body.style.overflow = originalBodyOverflow || ''; + originalBodyOverflow = null; + } + } + }, { + key: 'render', + value: function render() { + return null; + } + }]); + return AutoLockScrolling; +}(_react.Component); + +process.env.NODE_ENV !== "production" ? AutoLockScrolling.propTypes = { + lock: _react.PropTypes.bool.isRequired +} : void 0; +exports.default = AutoLockScrolling; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 693 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _RadioButton = __webpack_require__(290); + +var _createComponent = __webpack_require__(38); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(61); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +var mapValueToValueSelected = function mapValueToValueSelected(_ref, errorProp) { + var inputProps = _objectWithoutProperties(_ref.input, []), + props = _objectWithoutProperties(_ref, ['input']); + + return (0, _mapError2.default)(_extends({}, props, { + input: _extends({}, inputProps, { valueSelected: inputProps.value }) + }), errorProp); +}; + +exports.default = (0, _createComponent2.default)(_RadioButton.RadioButtonGroup, mapValueToValueSelected); + +/***/ }), +/* 694 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _EnhancedSwitch = __webpack_require__(182); + +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + +var _radioButtonUnchecked = __webpack_require__(695); + +var _radioButtonUnchecked2 = _interopRequireDefault(_radioButtonUnchecked); + +var _radioButtonChecked = __webpack_require__(696); + +var _radioButtonChecked2 = _interopRequireDefault(_radioButtonChecked); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var radioButton = context.muiTheme.radioButton; + + + return { + icon: { + height: radioButton.size, + width: radioButton.size + }, + target: { + transition: _transitions2.default.easeOut(), + position: 'absolute', + opacity: 1, + transform: 'scale(1)', + fill: radioButton.borderColor + }, + fill: { + position: 'absolute', + opacity: 1, + transform: 'scale(0)', + transformOrigin: '50% 50%', + transition: _transitions2.default.easeOut(), + fill: radioButton.checkedColor + }, + targetWhenChecked: { + opacity: 0, + transform: 'scale(0)' + }, + fillWhenChecked: { + opacity: 1, + transform: 'scale(1)' + }, + targetWhenDisabled: { + fill: radioButton.disabledColor + }, + fillWhenDisabled: { + fill: radioButton.disabledColor + }, + label: { + color: props.disabled ? radioButton.labelDisabledColor : radioButton.labelColor + }, + ripple: { + color: props.checked ? radioButton.checkedColor : radioButton.borderColor + } + }; +} + +var RadioButton = function (_Component) { + (0, _inherits3.default)(RadioButton, _Component); + + function RadioButton() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RadioButton); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RadioButton.__proto__ || (0, _getPrototypeOf2.default)(RadioButton)).call.apply(_ref, [this].concat(args))), _this), _this.handleSwitch = function (event) { + if (_this.props.onCheck) { + _this.props.onCheck(event, _this.props.value); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + // Only called when selected, not when unselected. + + + (0, _createClass3.default)(RadioButton, [{ + key: 'isChecked', + value: function isChecked() { + return this.refs.enhancedSwitch.isSwitched(); + } + + // Use RadioButtonGroup.setSelectedValue(newSelectionValue) to set a + // RadioButton's checked value. + + }, { + key: 'setChecked', + value: function setChecked(newCheckedValue) { + this.refs.enhancedSwitch.setSwitched(newCheckedValue); + } + }, { + key: 'getValue', + value: function getValue() { + return this.refs.enhancedSwitch.getValue(); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + checkedIcon = _props.checkedIcon, + checked = _props.checked, + iconStyle = _props.iconStyle, + labelStyle = _props.labelStyle, + labelPosition = _props.labelPosition, + onCheck = _props.onCheck, + uncheckedIcon = _props.uncheckedIcon, + disabled = _props.disabled, + other = (0, _objectWithoutProperties3.default)(_props, ['checkedIcon', 'checked', 'iconStyle', 'labelStyle', 'labelPosition', 'onCheck', 'uncheckedIcon', 'disabled']); + + + var styles = getStyles(this.props, this.context); + + var uncheckedStyles = (0, _simpleAssign2.default)(styles.target, checked && styles.targetWhenChecked, iconStyle, disabled && styles.targetWhenDisabled); + + var checkedStyles = (0, _simpleAssign2.default)(styles.fill, checked && styles.fillWhenChecked, iconStyle, disabled && styles.fillWhenDisabled); + + var uncheckedElement = _react2.default.isValidElement(uncheckedIcon) ? _react2.default.cloneElement(uncheckedIcon, { + style: (0, _simpleAssign2.default)(uncheckedStyles, uncheckedIcon.props.style) + }) : _react2.default.createElement(_radioButtonUnchecked2.default, { style: uncheckedStyles }); + + var checkedElement = _react2.default.isValidElement(checkedIcon) ? _react2.default.cloneElement(checkedIcon, { + style: (0, _simpleAssign2.default)(checkedStyles, checkedIcon.props.style) + }) : _react2.default.createElement(_radioButtonChecked2.default, { style: checkedStyles }); + + var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle); + var mergedLabelStyle = (0, _simpleAssign2.default)(styles.label, labelStyle); + + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, { + ref: 'enhancedSwitch', + inputType: 'radio', + checked: checked, + switched: checked, + disabled: disabled, + rippleColor: styles.ripple.color, + iconStyle: mergedIconStyle, + labelStyle: mergedLabelStyle, + labelPosition: labelPosition, + onSwitch: this.handleSwitch, + switchElement: _react2.default.createElement( + 'div', + null, + uncheckedElement, + checkedElement + ) + })); + } + }]); + return RadioButton; +}(_react.Component); + +RadioButton.defaultProps = { + checked: false, + disabled: false, + labelPosition: 'right' +}; +RadioButton.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? RadioButton.propTypes = { + /** + * @ignore + * checked if true + * Used internally by `RadioButtonGroup`. + */ + checked: _react.PropTypes.bool, + /** + * The icon element to show when the radio button is checked. + */ + checkedIcon: _react.PropTypes.element, + /** + * If true, the radio button is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the input element. + */ + inputStyle: _react.PropTypes.object, + /** + * @ignore + * Used internally by `RadioButtonGroup`. Use the `labelPosition` property of `RadioButtonGroup` instead. + * Where the label will be placed next to the radio button. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * Override the inline-styles of the label element. + */ + labelStyle: _react.PropTypes.object, + /** + * @ignore + * Callback function fired when the radio button is checked. Note that this + * function will not be called if the radio button is part of a + * radio button group: in this case, use the `onChange` property of + * `RadioButtonGroup`. + * + * @param {object} event `change` event targeting the element. + * @param {string} value The element's `value`. + */ + onCheck: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The icon element to show when the radio button is unchecked. + */ + uncheckedIcon: _react.PropTypes.element, + /** + * The value of the radio button. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = RadioButton; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 695 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ToggleRadioButtonUnchecked = function ToggleRadioButtonUnchecked(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z' }) + ); +}; +ToggleRadioButtonUnchecked = (0, _pure2.default)(ToggleRadioButtonUnchecked); +ToggleRadioButtonUnchecked.displayName = 'ToggleRadioButtonUnchecked'; +ToggleRadioButtonUnchecked.muiName = 'SvgIcon'; + +exports.default = ToggleRadioButtonUnchecked; + +/***/ }), +/* 696 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ToggleRadioButtonChecked = function ToggleRadioButtonChecked(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z' }) + ); +}; +ToggleRadioButtonChecked = (0, _pure2.default)(ToggleRadioButtonChecked); +ToggleRadioButtonChecked.displayName = 'ToggleRadioButtonChecked'; +ToggleRadioButtonChecked.muiName = 'SvgIcon'; + +exports.default = ToggleRadioButtonChecked; + +/***/ }), +/* 697 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _RadioButton = __webpack_require__(290); + +var _RadioButton2 = _interopRequireDefault(_RadioButton); + +var _warning = __webpack_require__(24); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var RadioButtonGroup = function (_Component) { + (0, _inherits3.default)(RadioButtonGroup, _Component); + + function RadioButtonGroup() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, RadioButtonGroup); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RadioButtonGroup.__proto__ || (0, _getPrototypeOf2.default)(RadioButtonGroup)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + numberCheckedRadioButtons: 0, + selected: '' + }, _this.handleChange = function (event, newSelection) { + _this.updateRadioButtons(newSelection); + + // Successful update + if (_this.state.numberCheckedRadioButtons === 0) { + if (_this.props.onChange) _this.props.onChange(event, newSelection); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(RadioButtonGroup, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _this2 = this; + + var cnt = 0; + var selected = ''; + var _props = this.props, + valueSelected = _props.valueSelected, + defaultSelected = _props.defaultSelected; + + if (valueSelected !== undefined) { + selected = valueSelected; + } else if (defaultSelected !== undefined) { + selected = defaultSelected; + } + + _react2.default.Children.forEach(this.props.children, function (option) { + if (_this2.hasCheckAttribute(option)) cnt++; + }, this); + + this.setState({ + numberCheckedRadioButtons: cnt, + selected: selected + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.hasOwnProperty('valueSelected')) { + this.setState({ + selected: nextProps.valueSelected + }); + } + } + }, { + key: 'hasCheckAttribute', + value: function hasCheckAttribute(radioButton) { + return radioButton.props.hasOwnProperty('checked') && radioButton.props.checked; + } + }, { + key: 'updateRadioButtons', + value: function updateRadioButtons(newSelection) { + if (this.state.numberCheckedRadioButtons === 0) { + this.setState({ selected: newSelection }); + } else { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: Cannot select a different radio button while another radio button\n has the \'checked\' property set to true.') : void 0; + } + } + }, { + key: 'getSelectedValue', + value: function getSelectedValue() { + return this.state.selected; + } + }, { + key: 'setSelectedValue', + value: function setSelectedValue(newSelectionValue) { + this.updateRadioButtons(newSelectionValue); + } + }, { + key: 'clearValue', + value: function clearValue() { + this.setSelectedValue(''); + } + }, { + key: 'render', + value: function render() { + var _this3 = this; + + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var options = _react2.default.Children.map(this.props.children, function (option) { + var _option$props = option.props, + name = _option$props.name, + value = _option$props.value, + label = _option$props.label, + onCheck = _option$props.onCheck, + other = (0, _objectWithoutProperties3.default)(_option$props, ['name', 'value', 'label', 'onCheck']); + + + return _react2.default.createElement(_RadioButton2.default, (0, _extends3.default)({}, other, { + ref: option.props.value, + name: _this3.props.name, + key: option.props.value, + value: option.props.value, + label: option.props.label, + labelPosition: _this3.props.labelPosition, + onCheck: _this3.handleChange, + checked: option.props.value === _this3.state.selected + })); + }, this); + + return _react2.default.createElement( + 'div', + { + style: prepareStyles((0, _simpleAssign2.default)({}, this.props.style)), + className: this.props.className + }, + options + ); + } + }]); + return RadioButtonGroup; +}(_react.Component); + +RadioButtonGroup.defaultProps = { + style: {} +}; +RadioButtonGroup.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? RadioButtonGroup.propTypes = { + /** + * Should be used to pass `RadioButton` components. + */ + children: _react.PropTypes.node, + /** + * The CSS class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The `value` property of the radio button that will be + * selected by default. This takes precedence over the `checked` property + * of the `RadioButton` elements. + */ + defaultSelected: _react.PropTypes.any, + /** + * Where the label will be placed for all child radio buttons. + * This takes precedence over the `labelPosition` property of the + * `RadioButton` elements. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * The name that will be applied to all child radio buttons. + */ + name: _react.PropTypes.string.isRequired, + /** + * Callback function that is fired when a radio button has + * been checked. + * + * @param {object} event `change` event targeting the selected + * radio button. + * @param {*} value The `value` of the selected radio button. + */ + onChange: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The `value` of the currently selected radio button. + */ + valueSelected: _react.PropTypes.any +} : void 0; +exports.default = RadioButtonGroup; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 698 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _SelectField = __webpack_require__(699); + +var _SelectField2 = _interopRequireDefault(_SelectField); + +var _createComponent = __webpack_require__(38); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(61); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_SelectField2.default, function (_ref) { + var _ref$input = _ref.input, + _onChange = _ref$input.onChange, + value = _ref$input.value, + _onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value', 'onBlur']), + onChangeFromField = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'onChange']); + + return _extends({}, (0, _mapError2.default)(props), inputProps, { + value: value, + onChange: function onChange(event, index, value) { + _onChange(value); + if (onChangeFromField) { + onChangeFromField(value); + } + }, + onBlur: function onBlur() { + return _onBlur(value); + } + }); +}); + +/***/ }), +/* 699 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _SelectField = __webpack_require__(700); + +var _SelectField2 = _interopRequireDefault(_SelectField); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _SelectField2.default; + +/***/ }), +/* 700 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _TextField = __webpack_require__(87); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _DropDownMenu = __webpack_require__(701); + +var _DropDownMenu2 = _interopRequireDefault(_DropDownMenu); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props) { + return { + label: { + paddingLeft: 0, + top: props.floatingLabelText ? 6 : -4 + }, + icon: { + right: 0, + top: props.floatingLabelText ? 8 : 0 + }, + hideDropDownUnderline: { + borderTop: 'none' + }, + dropDownMenu: { + display: 'block' + } + }; +} + +var SelectField = function (_Component) { + (0, _inherits3.default)(SelectField, _Component); + + function SelectField() { + (0, _classCallCheck3.default)(this, SelectField); + return (0, _possibleConstructorReturn3.default)(this, (SelectField.__proto__ || (0, _getPrototypeOf2.default)(SelectField)).apply(this, arguments)); + } + + (0, _createClass3.default)(SelectField, [{ + key: 'render', + value: function render() { + var _props = this.props, + autoWidth = _props.autoWidth, + children = _props.children, + style = _props.style, + labelStyle = _props.labelStyle, + iconStyle = _props.iconStyle, + id = _props.id, + underlineDisabledStyle = _props.underlineDisabledStyle, + underlineFocusStyle = _props.underlineFocusStyle, + menuItemStyle = _props.menuItemStyle, + selectedMenuItemStyle = _props.selectedMenuItemStyle, + underlineStyle = _props.underlineStyle, + errorStyle = _props.errorStyle, + disabled = _props.disabled, + floatingLabelFixed = _props.floatingLabelFixed, + floatingLabelText = _props.floatingLabelText, + floatingLabelStyle = _props.floatingLabelStyle, + hintStyle = _props.hintStyle, + hintText = _props.hintText, + fullWidth = _props.fullWidth, + errorText = _props.errorText, + listStyle = _props.listStyle, + maxHeight = _props.maxHeight, + menuStyle = _props.menuStyle, + onFocus = _props.onFocus, + onBlur = _props.onBlur, + onChange = _props.onChange, + value = _props.value, + other = (0, _objectWithoutProperties3.default)(_props, ['autoWidth', 'children', 'style', 'labelStyle', 'iconStyle', 'id', 'underlineDisabledStyle', 'underlineFocusStyle', 'menuItemStyle', 'selectedMenuItemStyle', 'underlineStyle', 'errorStyle', 'disabled', 'floatingLabelFixed', 'floatingLabelText', 'floatingLabelStyle', 'hintStyle', 'hintText', 'fullWidth', 'errorText', 'listStyle', 'maxHeight', 'menuStyle', 'onFocus', 'onBlur', 'onChange', 'value']); + + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement( + _TextField2.default, + (0, _extends3.default)({}, other, { + style: style, + disabled: disabled, + floatingLabelFixed: floatingLabelFixed, + floatingLabelText: floatingLabelText, + floatingLabelStyle: floatingLabelStyle, + hintStyle: hintStyle, + hintText: !hintText && !floatingLabelText ? ' ' : hintText, + fullWidth: fullWidth, + errorText: errorText, + underlineStyle: underlineStyle, + errorStyle: errorStyle, + onFocus: onFocus, + onBlur: onBlur, + id: id, + underlineDisabledStyle: underlineDisabledStyle, + underlineFocusStyle: underlineFocusStyle + }), + _react2.default.createElement( + _DropDownMenu2.default, + { + disabled: disabled, + style: (0, _simpleAssign2.default)(styles.dropDownMenu, menuStyle), + labelStyle: (0, _simpleAssign2.default)(styles.label, labelStyle), + iconStyle: (0, _simpleAssign2.default)(styles.icon, iconStyle), + menuItemStyle: menuItemStyle, + selectedMenuItemStyle: selectedMenuItemStyle, + underlineStyle: styles.hideDropDownUnderline, + listStyle: listStyle, + autoWidth: autoWidth, + value: value, + onChange: onChange, + maxHeight: maxHeight + }, + children + ) + ); + } + }]); + return SelectField; +}(_react.Component); + +SelectField.defaultProps = { + autoWidth: false, + disabled: false, + fullWidth: false +}; +SelectField.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? SelectField.propTypes = { + /** + * If true, the width will automatically be set according to the + * items inside the menu. + * To control the width in CSS instead, leave this prop set to `false`. + */ + autoWidth: _react.PropTypes.bool, + /** + * The `MenuItem` elements to populate the select field with. + * If the menu items have a `label` prop, that value will + * represent the selected menu item in the rendered select field. + */ + children: _react.PropTypes.node, + /** + * If true, the select field will be disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Override the inline-styles of the error element. + */ + errorStyle: _react.PropTypes.object, + /** + * The error content to display. + */ + errorText: _react.PropTypes.node, + /** + * If true, the floating label will float even when no value is selected. + */ + floatingLabelFixed: _react.PropTypes.bool, + /** + * Override the inline-styles of the floating label. + */ + floatingLabelStyle: _react.PropTypes.object, + /** + * The content of the floating label. + */ + floatingLabelText: _react.PropTypes.node, + /** + * If true, the select field will take up the full width of its container. + */ + fullWidth: _react.PropTypes.bool, + /** + * Override the inline-styles of the hint element. + */ + hintStyle: _react.PropTypes.object, + /** + * The hint content to display. + */ + hintText: _react.PropTypes.node, + /** + * Override the inline-styles of the icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * The id prop for the text field. + */ + id: _react.PropTypes.string, + /** + * Override the label style when the select field is inactive. + */ + labelStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the underlying `List` element. + */ + listStyle: _react.PropTypes.object, + /** + * Override the default max-height of the underlying `DropDownMenu` element. + */ + maxHeight: _react.PropTypes.number, + /** + * Override the inline-styles of menu items. + */ + menuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the underlying `DropDownMenu` element. + */ + menuStyle: _react.PropTypes.object, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function fired when a menu item is selected. + * + * @param {object} event TouchTap event targeting the menu item + * that was selected. + * @param {number} key The index of the selected menu item. + * @param {any} payload The `value` prop of the selected menu item. + */ + onChange: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Override the inline-styles of selected menu items. + */ + selectedMenuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of the underline element when the select + * field is disabled. + */ + underlineDisabledStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the underline element when the select field + * is focused. + */ + underlineFocusStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the underline element. + */ + underlineStyle: _react.PropTypes.object, + /** + * The value that is currently selected. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = SelectField; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 701 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.MenuItem = exports.DropDownMenu = undefined; + +var _DropDownMenu2 = __webpack_require__(702); + +var _DropDownMenu3 = _interopRequireDefault(_DropDownMenu2); + +var _MenuItem2 = __webpack_require__(283); + +var _MenuItem3 = _interopRequireDefault(_MenuItem2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.DropDownMenu = _DropDownMenu3.default; +exports.MenuItem = _MenuItem3.default; +exports.default = _DropDownMenu3.default; + +/***/ }), +/* 702 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _arrowDropDown = __webpack_require__(703); + +var _arrowDropDown2 = _interopRequireDefault(_arrowDropDown); + +var _Menu = __webpack_require__(179); + +var _Menu2 = _interopRequireDefault(_Menu); + +var _ClearFix = __webpack_require__(704); + +var _ClearFix2 = _interopRequireDefault(_ClearFix); + +var _Popover = __webpack_require__(117); + +var _Popover2 = _interopRequireDefault(_Popover); + +var _PopoverAnimationVertical = __webpack_require__(289); + +var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical); + +var _keycode = __webpack_require__(28); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _events = __webpack_require__(140); + +var _events2 = _interopRequireDefault(_events); + +var _IconButton = __webpack_require__(83); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var anchorOrigin = { + vertical: 'top', + horizontal: 'left' +}; + +function getStyles(props, context) { + var disabled = props.disabled; + + var spacing = context.muiTheme.baseTheme.spacing; + var palette = context.muiTheme.baseTheme.palette; + var accentColor = context.muiTheme.dropDownMenu.accentColor; + return { + control: { + cursor: disabled ? 'not-allowed' : 'pointer', + height: '100%', + position: 'relative', + width: '100%' + }, + icon: { + fill: accentColor, + position: 'absolute', + right: spacing.desktopGutterLess, + top: (spacing.iconSize - 24) / 2 + spacing.desktopGutterMini / 2 + }, + iconChildren: { + fill: 'inherit' + }, + label: { + color: disabled ? palette.disabledColor : palette.textColor, + lineHeight: spacing.desktopToolbarHeight + 'px', + overflow: 'hidden', + opacity: 1, + position: 'relative', + paddingLeft: spacing.desktopGutter, + paddingRight: spacing.iconSize * 2 + spacing.desktopGutterMini, + textOverflow: 'ellipsis', + top: 0, + whiteSpace: 'nowrap' + }, + labelWhenOpen: { + opacity: 0, + top: spacing.desktopToolbarHeight / 8 + }, + root: { + display: 'inline-block', + fontSize: spacing.desktopDropDownMenuFontSize, + height: spacing.desktopSubheaderHeight, + fontFamily: context.muiTheme.baseTheme.fontFamily, + outline: 'none', + position: 'relative', + transition: _transitions2.default.easeOut() + }, + rootWhenOpen: { + opacity: 1 + }, + underline: { + borderTop: 'solid 1px ' + accentColor, + bottom: 1, + left: 0, + margin: '-1px ' + spacing.desktopGutter + 'px', + right: 0, + position: 'absolute' + } + }; +} + +var DropDownMenu = function (_Component) { + (0, _inherits3.default)(DropDownMenu, _Component); + + function DropDownMenu() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, DropDownMenu); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DropDownMenu.__proto__ || (0, _getPrototypeOf2.default)(DropDownMenu)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.rootNode = undefined, _this.arrowNode = undefined, _this.handleTouchTapControl = function (event) { + event.preventDefault(); + if (!_this.props.disabled) { + _this.setState({ + open: !_this.state.open, + anchorEl: _this.rootNode + }); + } + }, _this.handleRequestCloseMenu = function () { + _this.close(false); + }, _this.handleEscKeyDownMenu = function () { + _this.close(true); + }, _this.handleKeyDown = function (event) { + switch ((0, _keycode2.default)(event)) { + case 'up': + case 'down': + case 'space': + case 'enter': + event.preventDefault(); + _this.setState({ + open: true, + anchorEl: _this.rootNode + }); + break; + } + }, _this.handleItemTouchTap = function (event, child, index) { + event.persist(); + _this.setState({ + open: false + }, function () { + if (_this.props.onChange) { + _this.props.onChange(event, index, child.props.value); + } + + _this.close(_events2.default.isKeyboard(event)); + }); + }, _this.close = function (isKeyboard) { + _this.setState({ + open: false + }, function () { + if (_this.props.onClose) { + _this.props.onClose(); + } + + if (isKeyboard) { + var dropArrow = _this.arrowNode; + var dropNode = _reactDom2.default.findDOMNode(dropArrow); + dropNode.focus(); + dropArrow.setKeyboardFocus(true); + } + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + // The nested styles for drop-down-menu are modified by toolbar and possibly + // other user components, so it will give full access to its js styles rather + // than just the parent. + + + (0, _createClass3.default)(DropDownMenu, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var _this2 = this; + + if (this.props.autoWidth) { + this.setWidth(); + } + if (this.props.openImmediately) { + // TODO: Temporary fix to make openImmediately work with popover. + /* eslint-disable react/no-did-mount-set-state */ + setTimeout(function () { + return _this2.setState({ + open: true, + anchorEl: _this2.rootNode + }); + }, 0); + /* eslint-enable react/no-did-mount-set-state */ + } + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps() { + if (this.props.autoWidth) { + this.setWidth(); + } + } + }, { + key: 'getInputNode', + + + /** + * This method is deprecated but still here because the TextField + * need it in order to work. TODO: That will be addressed later. + */ + value: function getInputNode() { + var _this3 = this; + + var rootNode = this.rootNode; + + rootNode.focus = function () { + if (!_this3.props.disabled) { + _this3.setState({ + open: !_this3.state.open, + anchorEl: _this3.rootNode + }); + } + }; + + return rootNode; + } + }, { + key: 'setWidth', + value: function setWidth() { + var el = this.rootNode; + if (!this.props.style || !this.props.style.hasOwnProperty('width')) { + el.style.width = 'auto'; + } + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + + var _props = this.props, + animated = _props.animated, + animation = _props.animation, + autoWidth = _props.autoWidth, + children = _props.children, + className = _props.className, + iconStyle = _props.iconStyle, + labelStyle = _props.labelStyle, + listStyle = _props.listStyle, + maxHeight = _props.maxHeight, + menuStyleProp = _props.menuStyle, + onClose = _props.onClose, + openImmediately = _props.openImmediately, + menuItemStyle = _props.menuItemStyle, + selectedMenuItemStyle = _props.selectedMenuItemStyle, + style = _props.style, + underlineStyle = _props.underlineStyle, + value = _props.value, + other = (0, _objectWithoutProperties3.default)(_props, ['animated', 'animation', 'autoWidth', 'children', 'className', 'iconStyle', 'labelStyle', 'listStyle', 'maxHeight', 'menuStyle', 'onClose', 'openImmediately', 'menuItemStyle', 'selectedMenuItemStyle', 'style', 'underlineStyle', 'value']); + var _state = this.state, + anchorEl = _state.anchorEl, + open = _state.open; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var displayValue = ''; + _react2.default.Children.forEach(children, function (child) { + if (child && value === child.props.value) { + // This will need to be improved (in case primaryText is a node) + displayValue = child.props.label || child.props.primaryText; + } + }); + + var menuStyle = void 0; + if (anchorEl && !autoWidth) { + menuStyle = (0, _simpleAssign2.default)({ + width: anchorEl.clientWidth + }, menuStyleProp); + } else { + menuStyle = menuStyleProp; + } + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { + ref: function ref(node) { + _this4.rootNode = node; + }, + className: className, + style: prepareStyles((0, _simpleAssign2.default)({}, styles.root, open && styles.rootWhenOpen, style)) + }), + _react2.default.createElement( + _ClearFix2.default, + { style: styles.control, onTouchTap: this.handleTouchTapControl }, + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.label, open && styles.labelWhenOpen, labelStyle)) }, + displayValue + ), + _react2.default.createElement( + _IconButton2.default, + { + tabIndex: this.props.disabled ? -1 : undefined, + onKeyDown: this.handleKeyDown, + ref: function ref(node) { + _this4.arrowNode = node; + }, + style: (0, _simpleAssign2.default)({}, styles.icon, iconStyle), + iconStyle: styles.iconChildren + }, + _react2.default.createElement(_arrowDropDown2.default, null) + ), + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.underline, underlineStyle)) }) + ), + _react2.default.createElement( + _Popover2.default, + { + anchorOrigin: anchorOrigin, + anchorEl: anchorEl, + animation: animation || _PopoverAnimationVertical2.default, + open: open, + animated: animated, + onRequestClose: this.handleRequestCloseMenu + }, + _react2.default.createElement( + _Menu2.default, + { + maxHeight: maxHeight, + desktop: true, + value: value, + onEscKeyDown: this.handleEscKeyDownMenu, + style: menuStyle, + listStyle: listStyle, + onItemTouchTap: this.handleItemTouchTap, + menuItemStyle: menuItemStyle, + selectedMenuItemStyle: selectedMenuItemStyle + }, + children + ) + ) + ); + } + }]); + return DropDownMenu; +}(_react.Component); + +DropDownMenu.muiName = 'DropDownMenu'; +DropDownMenu.defaultProps = { + animated: true, + autoWidth: true, + disabled: false, + openImmediately: false, + maxHeight: 500 +}; +DropDownMenu.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? DropDownMenu.propTypes = { + /** + * If true, the popover will apply transitions when + * it gets added to the DOM. + */ + animated: _react.PropTypes.bool, + /** + * Override the default animation component used. + */ + animation: _react.PropTypes.func, + /** + * The width will automatically be set according to the items inside the menu. + * To control this width in css instead, set this prop to `false`. + */ + autoWidth: _react.PropTypes.bool, + /** + * The `MenuItem`s to populate the `Menu` with. If the `MenuItems` have the + * prop `label` that value will be used to render the representation of that + * item within the field. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * Disables the menu. + */ + disabled: _react.PropTypes.bool, + /** + * Overrides the styles of icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Overrides the styles of label when the `DropDownMenu` is inactive. + */ + labelStyle: _react.PropTypes.object, + /** + * The style object to use to override underlying list style. + */ + listStyle: _react.PropTypes.object, + /** + * The maximum height of the `Menu` when it is displayed. + */ + maxHeight: _react.PropTypes.number, + /** + * Override the inline-styles of menu items. + */ + menuItemStyle: _react.PropTypes.object, + /** + * Overrides the styles of `Menu` when the `DropDownMenu` is displayed. + */ + menuStyle: _react.PropTypes.object, + /** + * Callback function fired when a menu item is clicked, other than the one currently selected. + * + * @param {object} event TouchTap event targeting the menu item that was clicked. + * @param {number} key The index of the clicked menu item in the `children` collection. + * @param {any} payload The `value` prop of the clicked menu item. + */ + onChange: _react.PropTypes.func, + /** + * Callback function fired when the menu is closed. + */ + onClose: _react.PropTypes.func, + /** + * Set to true to have the `DropDownMenu` automatically open on mount. + */ + openImmediately: _react.PropTypes.bool, + /** + * Override the inline-styles of selected menu items. + */ + selectedMenuItemStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Overrides the inline-styles of the underline. + */ + underlineStyle: _react.PropTypes.object, + /** + * The value that is currently selected. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = DropDownMenu; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 703 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationArrowDropDown = function NavigationArrowDropDown(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M7 10l5 5 5-5z' }) + ); +}; +NavigationArrowDropDown = (0, _pure2.default)(NavigationArrowDropDown); +NavigationArrowDropDown.displayName = 'NavigationArrowDropDown'; +NavigationArrowDropDown.muiName = 'SvgIcon'; + +exports.default = NavigationArrowDropDown; + +/***/ }), +/* 704 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _BeforeAfterWrapper = __webpack_require__(705); + +var _BeforeAfterWrapper2 = _interopRequireDefault(_BeforeAfterWrapper); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + before: { + content: "' '", + display: 'table' + }, + after: { + content: "' '", + clear: 'both', + display: 'table' + } +}; + +var ClearFix = function ClearFix(_ref) { + var style = _ref.style, + children = _ref.children, + other = (0, _objectWithoutProperties3.default)(_ref, ['style', 'children']); + return _react2.default.createElement( + _BeforeAfterWrapper2.default, + (0, _extends3.default)({}, other, { + beforeStyle: styles.before, + afterStyle: styles.after, + style: style + }), + children + ); +}; + +ClearFix.muiName = 'ClearFix'; + +process.env.NODE_ENV !== "production" ? ClearFix.propTypes = { + children: _react.PropTypes.node, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; + +exports.default = ClearFix; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 705 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * BeforeAfterWrapper + * An alternative for the ::before and ::after css pseudo-elements for + * components whose styles are defined in javascript instead of css. + * + * Usage: For the element that we want to apply before and after elements to, + * wrap its children with BeforeAfterWrapper. For example: + * + * <Paper> + * <Paper> <div> // See notice + * <BeforeAfterWrapper> renders <div/> // before element + * [children of paper] ------> [children of paper] + * </BeforeAfterWrapper> <div/> // after element + * </Paper> </div> + * </Paper> + * + * Notice: Notice that this div bundles together our elements. If the element + * that we want to apply before and after elements is a HTML tag (i.e. a + * div, p, or button tag), we can avoid this extra nesting by passing using + * the BeforeAfterWrapper in place of said tag like so: + * + * <p> + * <BeforeAfterWrapper> do this instead <BeforeAfterWrapper elementType='p'> + * [children of p] ------> [children of p] + * </BeforeAfterWrapper> </BeforeAfterWrapper> + * </p> + * + * BeforeAfterWrapper features spread functionality. This means that we can + * pass HTML tag properties directly into the BeforeAfterWrapper tag. + * + * When using BeforeAfterWrapper, ensure that the parent of the beforeElement + * and afterElement have a defined style position. + */ + +var styles = { + box: { + boxSizing: 'border-box' + } +}; + +var BeforeAfterWrapper = function (_Component) { + (0, _inherits3.default)(BeforeAfterWrapper, _Component); + + function BeforeAfterWrapper() { + (0, _classCallCheck3.default)(this, BeforeAfterWrapper); + return (0, _possibleConstructorReturn3.default)(this, (BeforeAfterWrapper.__proto__ || (0, _getPrototypeOf2.default)(BeforeAfterWrapper)).apply(this, arguments)); + } + + (0, _createClass3.default)(BeforeAfterWrapper, [{ + key: 'render', + value: function render() { + var _props = this.props, + beforeStyle = _props.beforeStyle, + afterStyle = _props.afterStyle, + beforeElementType = _props.beforeElementType, + afterElementType = _props.afterElementType, + elementType = _props.elementType, + other = (0, _objectWithoutProperties3.default)(_props, ['beforeStyle', 'afterStyle', 'beforeElementType', 'afterElementType', 'elementType']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + + var beforeElement = void 0; + var afterElement = void 0; + + if (beforeStyle) { + beforeElement = _react2.default.createElement(this.props.beforeElementType, { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.box, beforeStyle)), + key: '::before' + }); + } + + if (afterStyle) { + afterElement = _react2.default.createElement(this.props.afterElementType, { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.box, afterStyle)), + key: '::after' + }); + } + + var children = [beforeElement, this.props.children, afterElement]; + + var props = other; + props.style = prepareStyles((0, _simpleAssign2.default)({}, this.props.style)); + + return _react2.default.createElement(this.props.elementType, props, children); + } + }]); + return BeforeAfterWrapper; +}(_react.Component); + +BeforeAfterWrapper.defaultProps = { + beforeElementType: 'div', + afterElementType: 'div', + elementType: 'div' +}; +BeforeAfterWrapper.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? BeforeAfterWrapper.propTypes = { + afterElementType: _react.PropTypes.string, + afterStyle: _react.PropTypes.object, + beforeElementType: _react.PropTypes.string, + beforeStyle: _react.PropTypes.object, + children: _react.PropTypes.node, + elementType: _react.PropTypes.string, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object +} : void 0; +exports.default = BeforeAfterWrapper; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 706 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _Slider = __webpack_require__(707); + +var _Slider2 = _interopRequireDefault(_Slider); + +var _createComponent = __webpack_require__(38); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(61); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_Slider2.default, function (_ref) { + var _ref$input = _ref.input, + onDragStart = _ref$input.onDragStart, + _onChange = _ref$input.onChange, + inputProps = _objectWithoutProperties(_ref$input, ['onDragStart', 'onChange']), + onChangeFromField = _ref.onChange, + defaultValue = _ref.defaultValue, + props = _objectWithoutProperties(_ref, ['input', 'onChange', 'defaultValue']); + + return _extends({}, (0, _mapError2.default)(_extends({}, props, { input: inputProps }), 'error'), { + onChange: function onChange(event, value) { + _onChange(value); + if (onChangeFromField) { + onChangeFromField(value); + } + } + }); +}); + +/***/ }), +/* 707 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Slider = __webpack_require__(708); + +var _Slider2 = _interopRequireDefault(_Slider); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Slider2.default; + +/***/ }), +/* 708 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _defineProperty2 = __webpack_require__(709); + +var _defineProperty3 = _interopRequireDefault(_defineProperty2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _keycode = __webpack_require__(28); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _warning = __webpack_require__(24); + +var _warning2 = _interopRequireDefault(_warning); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _FocusRipple = __webpack_require__(141); + +var _FocusRipple2 = _interopRequireDefault(_FocusRipple); + +var _deprecatedPropType = __webpack_require__(710); + +var _deprecatedPropType2 = _interopRequireDefault(_deprecatedPropType); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Verifies min/max range. + * @param {Object} props Properties of the React component. + * @param {String} propName Name of the property to validate. + * @param {String} componentName Name of the component whose property is being validated. + * @returns {Object} Returns an Error if min >= max otherwise null. + */ +var minMaxPropType = function minMaxPropType(props, propName, componentName) { + for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { + rest[_key - 3] = arguments[_key]; + } + + var error = _react.PropTypes.number.apply(_react.PropTypes, [props, propName, componentName].concat(rest)); + if (error !== null) { + return error; + } + + if (props.min >= props.max) { + var errorMsg = propName === 'min' ? 'min should be less than max' : 'max should be greater than min'; + return new Error(errorMsg); + } +}; + +/** + * Verifies value is within the min/max range. + * @param {Object} props Properties of the React component. + * @param {String} propName Name of the property to validate. + * @param {String} componentName Name of the component whose property is being validated. + * @returns {Object} Returns an Error if the value is not within the range otherwise null. + */ +var valueInRangePropType = function valueInRangePropType(props, propName, componentName) { + for (var _len2 = arguments.length, rest = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) { + rest[_key2 - 3] = arguments[_key2]; + } + + var error = _react.PropTypes.number.apply(_react.PropTypes, [props, propName, componentName].concat(rest)); + if (error !== null) { + return error; + } + + var value = props[propName]; + if (value < props.min || props.max < value) { + return new Error(propName + ' should be within the range specified by min and max'); + } +}; + +var crossAxisProperty = { + x: 'height', + 'x-reverse': 'height', + y: 'width', + 'y-reverse': 'width' +}; + +var crossAxisOffsetProperty = { + x: 'top', + 'x-reverse': 'top', + y: 'left', + 'y-reverse': 'left' +}; + +var mainAxisProperty = { + x: 'width', + 'x-reverse': 'width', + y: 'height', + 'y-reverse': 'height' +}; + +var mainAxisMarginFromEnd = { + x: 'marginRight', + 'x-reverse': 'marginLeft', + y: 'marginTop', + 'y-reverse': 'marginBottom' +}; + +var mainAxisMarginFromStart = { + x: 'marginLeft', + 'x-reverse': 'marginRight', + y: 'marginBottom', + 'y-reverse': 'marginTop' +}; + +var mainAxisOffsetProperty = { + x: 'left', + 'x-reverse': 'right', + y: 'bottom', + 'y-reverse': 'top' +}; + +var mainAxisClientProperty = { + x: 'clientWidth', + 'x-reverse': 'clientWidth', + y: 'clientHeight', + 'y-reverse': 'clientHeight' +}; + +var mainAxisClientOffsetProperty = { + x: 'clientX', + 'x-reverse': 'clientX', + y: 'clientY', + 'y-reverse': 'clientY' +}; + +var reverseMainAxisOffsetProperty = { + x: 'right', + 'x-reverse': 'left', + y: 'top', + 'y-reverse': 'bottom' +}; + +var isMouseControlInverted = function isMouseControlInverted(axis) { + return axis === 'x-reverse' || axis === 'y'; +}; + +function getPercent(value, min, max) { + var percent = (value - min) / (max - min); + if (isNaN(percent)) { + percent = 0; + } + + return percent; +} + +var getStyles = function getStyles(props, context, state) { + var _slider, _track, _filledAndRemaining, _handle, _objectAssign2, _objectAssign3; + + var axis = props.axis, + disabled = props.disabled, + max = props.max, + min = props.min; + var _context$muiTheme$sli = context.muiTheme.slider, + handleColorZero = _context$muiTheme$sli.handleColorZero, + handleFillColor = _context$muiTheme$sli.handleFillColor, + handleSize = _context$muiTheme$sli.handleSize, + handleSizeDisabled = _context$muiTheme$sli.handleSizeDisabled, + handleSizeActive = _context$muiTheme$sli.handleSizeActive, + trackSize = _context$muiTheme$sli.trackSize, + trackColor = _context$muiTheme$sli.trackColor, + trackColorSelected = _context$muiTheme$sli.trackColorSelected, + rippleColor = _context$muiTheme$sli.rippleColor, + selectionColor = _context$muiTheme$sli.selectionColor; + + + var fillGutter = handleSize / 2; + var disabledGutter = trackSize + handleSizeDisabled / 2; + var calcDisabledSpacing = disabled ? ' - ' + disabledGutter + 'px' : ''; + var percent = getPercent(state.value, min, max); + + var styles = { + slider: (_slider = { + touchCallout: 'none', + userSelect: 'none', + cursor: 'default' + }, (0, _defineProperty3.default)(_slider, crossAxisProperty[axis], handleSizeActive), (0, _defineProperty3.default)(_slider, mainAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_slider, 'position', 'relative'), (0, _defineProperty3.default)(_slider, 'marginTop', 24), (0, _defineProperty3.default)(_slider, 'marginBottom', 48), _slider), + track: (_track = { + position: 'absolute' + }, (0, _defineProperty3.default)(_track, crossAxisOffsetProperty[axis], (handleSizeActive - trackSize) / 2), (0, _defineProperty3.default)(_track, mainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_track, mainAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_track, crossAxisProperty[axis], trackSize), _track), + filledAndRemaining: (_filledAndRemaining = { + position: 'absolute' + }, (0, _defineProperty3.default)(_filledAndRemaining, crossAxisOffsetProperty, 0), (0, _defineProperty3.default)(_filledAndRemaining, crossAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_filledAndRemaining, 'transition', _transitions2.default.easeOut(null, 'margin')), _filledAndRemaining), + handle: (_handle = { + boxSizing: 'border-box', + position: 'absolute', + cursor: 'pointer', + pointerEvents: 'inherit' + }, (0, _defineProperty3.default)(_handle, crossAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_handle, mainAxisOffsetProperty[axis], percent === 0 ? '0%' : percent * 100 + '%'), (0, _defineProperty3.default)(_handle, 'zIndex', 1), (0, _defineProperty3.default)(_handle, 'margin', { + x: trackSize / 2 + 'px 0 0 0', + 'x-reverse': trackSize / 2 + 'px 0 0 0', + y: '0 0 0 ' + trackSize / 2 + 'px', + 'y-reverse': '0 0 0 ' + trackSize / 2 + 'px' + }[axis]), (0, _defineProperty3.default)(_handle, 'width', handleSize), (0, _defineProperty3.default)(_handle, 'height', handleSize), (0, _defineProperty3.default)(_handle, 'backgroundColor', selectionColor), (0, _defineProperty3.default)(_handle, 'backgroundClip', 'padding-box'), (0, _defineProperty3.default)(_handle, 'border', '0px solid transparent'), (0, _defineProperty3.default)(_handle, 'borderRadius', '50%'), (0, _defineProperty3.default)(_handle, 'transform', { + x: 'translate(-50%, -50%)', + 'x-reverse': 'translate(50%, -50%)', + y: 'translate(-50%, 50%)', + 'y-reverse': 'translate(-50%, -50%)' + }[axis]), (0, _defineProperty3.default)(_handle, 'transition', _transitions2.default.easeOut('450ms', 'background') + ', ' + _transitions2.default.easeOut('450ms', 'border-color') + ', ' + _transitions2.default.easeOut('450ms', 'width') + ', ' + _transitions2.default.easeOut('450ms', 'height')), (0, _defineProperty3.default)(_handle, 'overflow', 'visible'), (0, _defineProperty3.default)(_handle, 'outline', 'none'), _handle), + handleWhenDisabled: { + boxSizing: 'content-box', + cursor: 'not-allowed', + backgroundColor: trackColor, + width: handleSizeDisabled, + height: handleSizeDisabled, + border: 'none' + }, + handleWhenPercentZero: { + border: trackSize + 'px solid ' + handleColorZero, + backgroundColor: handleFillColor, + boxShadow: 'none' + }, + handleWhenPercentZeroAndDisabled: { + cursor: 'not-allowed', + width: handleSizeDisabled, + height: handleSizeDisabled + }, + handleWhenPercentZeroAndFocused: { + border: trackSize + 'px solid ' + trackColorSelected + }, + handleWhenActive: { + width: handleSizeActive, + height: handleSizeActive + }, + ripple: { + height: handleSize, + width: handleSize, + overflow: 'visible' + }, + rippleWhenPercentZero: { + top: -trackSize, + left: -trackSize + }, + rippleInner: { + height: '300%', + width: '300%', + top: -handleSize, + left: -handleSize + }, + rippleColor: { + fill: percent === 0 ? handleColorZero : rippleColor + } + }; + styles.filled = (0, _simpleAssign2.default)({}, styles.filledAndRemaining, (_objectAssign2 = {}, (0, _defineProperty3.default)(_objectAssign2, mainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_objectAssign2, 'backgroundColor', disabled ? trackColor : selectionColor), (0, _defineProperty3.default)(_objectAssign2, mainAxisMarginFromEnd[axis], fillGutter), (0, _defineProperty3.default)(_objectAssign2, mainAxisProperty[axis], 'calc(' + percent * 100 + '%' + calcDisabledSpacing + ')'), _objectAssign2)); + styles.remaining = (0, _simpleAssign2.default)({}, styles.filledAndRemaining, (_objectAssign3 = {}, (0, _defineProperty3.default)(_objectAssign3, reverseMainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_objectAssign3, 'backgroundColor', (state.hovered || state.focused) && !disabled ? trackColorSelected : trackColor), (0, _defineProperty3.default)(_objectAssign3, mainAxisMarginFromStart[axis], fillGutter), (0, _defineProperty3.default)(_objectAssign3, mainAxisProperty[axis], 'calc(' + (1 - percent) * 100 + '%' + calcDisabledSpacing + ')'), _objectAssign3)); + + return styles; +}; + +var Slider = function (_Component) { + (0, _inherits3.default)(Slider, _Component); + + function Slider() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Slider); + + for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Slider.__proto__ || (0, _getPrototypeOf2.default)(Slider)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + active: false, + dragging: false, + focused: false, + hovered: false, + value: 0 + }, _this.track = null, _this.handle = null, _this.handleKeyDown = function (event) { + var _this$props = _this.props, + axis = _this$props.axis, + min = _this$props.min, + max = _this$props.max, + step = _this$props.step; + + + var action = void 0; + + switch ((0, _keycode2.default)(event)) { + case 'page down': + case 'down': + if (axis === 'y-reverse') { + action = 'increase'; + } else { + action = 'decrease'; + } + break; + case 'left': + if (axis === 'x-reverse') { + action = 'increase'; + } else { + action = 'decrease'; + } + break; + case 'page up': + case 'up': + if (axis === 'y-reverse') { + action = 'decrease'; + } else { + action = 'increase'; + } + break; + case 'right': + if (axis === 'x-reverse') { + action = 'decrease'; + } else { + action = 'increase'; + } + break; + case 'home': + action = 'min'; + break; + case 'end': + action = 'max'; + break; + } + + if (action) { + var newValue = void 0; + + // Cancel scroll + event.preventDefault(); + + switch (action) { + case 'decrease': + newValue = _this.state.value - step; + break; + case 'increase': + newValue = _this.state.value + step; + break; + case 'min': + newValue = min; + break; + case 'max': + newValue = max; + break; + } + + // We need to use toFixed() because of float point errors. + // For example, 0.01 + 0.06 = 0.06999999999999999 + newValue = parseFloat(newValue.toFixed(5)); + + if (newValue > max) { + newValue = max; + } else if (newValue < min) { + newValue = min; + } + + if (_this.state.value !== newValue) { + _this.setState({ + value: newValue + }); + + if (_this.props.onChange) { + _this.props.onChange(event, newValue); + } + } + } + }, _this.handleDragMouseMove = function (event) { + _this.onDragUpdate(event, 'mouse'); + }, _this.handleTouchMove = function (event) { + _this.onDragUpdate(event, 'touch'); + }, _this.handleMouseEnd = function (event) { + document.removeEventListener('mousemove', _this.handleDragMouseMove); + document.removeEventListener('mouseup', _this.handleMouseEnd); + + _this.onDragStop(event); + }, _this.handleTouchEnd = function (event) { + document.removeEventListener('touchmove', _this.handleTouchMove); + document.removeEventListener('touchup', _this.handleTouchEnd); + document.removeEventListener('touchend', _this.handleTouchEnd); + document.removeEventListener('touchcancel', _this.handleTouchEnd); + + _this.onDragStop(event); + }, _this.handleTouchStart = function (event) { + if (_this.props.disabled) { + return; + } + + var position = void 0; + if (isMouseControlInverted(_this.props.axis)) { + position = _this.getTrackOffset() - event.touches[0][mainAxisClientOffsetProperty[_this.props.axis]]; + } else { + position = event.touches[0][mainAxisClientOffsetProperty[_this.props.axis]] - _this.getTrackOffset(); + } + _this.setValueFromPosition(event, position); + + document.addEventListener('touchmove', _this.handleTouchMove); + document.addEventListener('touchup', _this.handleTouchEnd); + document.addEventListener('touchend', _this.handleTouchEnd); + document.addEventListener('touchcancel', _this.handleTouchEnd); + + _this.onDragStart(event); + + // Cancel scroll and context menu + event.preventDefault(); + }, _this.handleFocus = function (event) { + _this.setState({ + focused: true + }); + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleBlur = function (event) { + _this.setState({ + focused: false, + active: false + }); + + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + }, _this.handleMouseDown = function (event) { + if (_this.props.disabled) { + return; + } + + var position = void 0; + if (isMouseControlInverted(_this.props.axis)) { + position = _this.getTrackOffset() - event[mainAxisClientOffsetProperty[_this.props.axis]]; + } else { + position = event[mainAxisClientOffsetProperty[_this.props.axis]] - _this.getTrackOffset(); + } + _this.setValueFromPosition(event, position); + + document.addEventListener('mousemove', _this.handleDragMouseMove); + document.addEventListener('mouseup', _this.handleMouseEnd); + + // Cancel text selection + event.preventDefault(); + + // Set focus manually since we called preventDefault() + _this.handle.focus(); + + _this.onDragStart(event); + }, _this.handleMouseUp = function () { + if (!_this.props.disabled) { + _this.setState({ + active: false + }); + } + }, _this.handleMouseEnter = function () { + _this.setState({ + hovered: true + }); + }, _this.handleMouseLeave = function () { + _this.setState({ + hovered: false + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Slider, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + valueProp = _props.value, + defaultValue = _props.defaultValue, + min = _props.min, + max = _props.max; + + + var value = valueProp; + if (value === undefined) { + value = defaultValue !== undefined ? defaultValue : min; + } + + if (value > max) { + value = max; + } else if (value < min) { + value = min; + } + + this.setState({ + value: value + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== undefined && !this.state.dragging) { + this.setState({ + value: nextProps.value + }); + } + } + }, { + key: 'getValue', + value: function getValue() { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI Slider: getValue() method is deprecated.\n Use the onChange callbacks instead.\n It will be removed with v0.17.0.') : void 0; + + return this.state.value; + } + }, { + key: 'clearValue', + value: function clearValue() { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI Slider: clearValue() method is deprecated.\n Use the value property to control the component instead.\n It will be removed with v0.17.0.') : void 0; + + this.setState({ + value: this.props.min + }); + } + }, { + key: 'getTrackOffset', + value: function getTrackOffset() { + return this.track.getBoundingClientRect()[mainAxisOffsetProperty[this.props.axis]]; + } + }, { + key: 'onDragStart', + value: function onDragStart(event) { + this.setState({ + dragging: true, + active: true + }); + + if (this.props.onDragStart) { + this.props.onDragStart(event); + } + } + }, { + key: 'onDragUpdate', + value: function onDragUpdate(event, type) { + var _this2 = this; + + if (this.dragRunning) { + return; + } + this.dragRunning = true; + + requestAnimationFrame(function () { + _this2.dragRunning = false; + + var source = type === 'touch' ? event.touches[0] : event; + + var position = void 0; + if (isMouseControlInverted(_this2.props.axis)) { + position = _this2.getTrackOffset() - source[mainAxisClientOffsetProperty[_this2.props.axis]]; + } else { + position = source[mainAxisClientOffsetProperty[_this2.props.axis]] - _this2.getTrackOffset(); + } + + if (!_this2.props.disabled) { + _this2.setValueFromPosition(event, position); + } + }); + } + }, { + key: 'onDragStop', + value: function onDragStop(event) { + this.setState({ + dragging: false, + active: false + }); + + if (this.props.onDragStop) { + this.props.onDragStop(event); + } + } + }, { + key: 'setValueFromPosition', + value: function setValueFromPosition(event, position) { + var positionMax = this.track[mainAxisClientProperty[this.props.axis]]; + if (position < 0) { + position = 0; + } else if (position > positionMax) { + position = positionMax; + } + + var _props2 = this.props, + step = _props2.step, + min = _props2.min, + max = _props2.max; + + + var value = void 0; + value = position / positionMax * (max - min); + value = Math.round(value / step) * step + min; + value = parseFloat(value.toFixed(5)); + + if (value > max) { + value = max; + } else if (value < min) { + value = min; + } + + if (this.state.value !== value) { + this.setState({ + value: value + }); + + if (this.props.onChange) { + this.props.onChange(event, value); + } + } + } + }, { + key: 'render', + value: function render() { + var _this3 = this; + + var _props3 = this.props, + axis = _props3.axis, + description = _props3.description, + disabled = _props3.disabled, + disableFocusRipple = _props3.disableFocusRipple, + error = _props3.error, + max = _props3.max, + min = _props3.min, + name = _props3.name, + onBlur = _props3.onBlur, + onChange = _props3.onChange, + onDragStart = _props3.onDragStart, + onDragStop = _props3.onDragStop, + onFocus = _props3.onFocus, + required = _props3.required, + sliderStyle = _props3.sliderStyle, + step = _props3.step, + style = _props3.style, + other = (0, _objectWithoutProperties3.default)(_props3, ['axis', 'description', 'disabled', 'disableFocusRipple', 'error', 'max', 'min', 'name', 'onBlur', 'onChange', 'onDragStart', 'onDragStop', 'onFocus', 'required', 'sliderStyle', 'step', 'style']); + var _state = this.state, + active = _state.active, + focused = _state.focused, + hovered = _state.hovered, + value = _state.value; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + var percent = getPercent(value, min, max); + + var handleStyles = {}; + if (percent === 0) { + handleStyles = (0, _simpleAssign2.default)({}, styles.handle, styles.handleWhenPercentZero, active && styles.handleWhenActive, (hovered || focused) && !disabled && styles.handleWhenPercentZeroAndFocused, disabled && styles.handleWhenPercentZeroAndDisabled); + } else { + handleStyles = (0, _simpleAssign2.default)({}, styles.handle, active && styles.handleWhenActive, disabled && styles.handleWhenDisabled); + } + + var rippleStyle = (0, _simpleAssign2.default)({}, styles.ripple, percent === 0 && styles.rippleWhenPercentZero); + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, style)) }), + _react2.default.createElement( + 'span', + null, + description + ), + _react2.default.createElement( + 'span', + null, + error + ), + _react2.default.createElement( + 'div', + { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.slider, sliderStyle)), + onFocus: this.handleFocus, + onBlur: this.handleBlur, + onMouseDown: this.handleMouseDown, + onMouseEnter: this.handleMouseEnter, + onMouseLeave: this.handleMouseLeave, + onMouseUp: this.handleMouseUp, + onTouchStart: this.handleTouchStart, + onKeyDown: !disabled && this.handleKeyDown + }, + _react2.default.createElement( + 'div', + { ref: function ref(node) { + return _this3.track = node; + }, style: prepareStyles(styles.track) }, + _react2.default.createElement('div', { style: prepareStyles(styles.filled) }), + _react2.default.createElement('div', { style: prepareStyles(styles.remaining) }), + _react2.default.createElement( + 'div', + { + ref: function ref(node) { + return _this3.handle = node; + }, + style: prepareStyles(handleStyles), + tabIndex: 0 + }, + !disabled && !disableFocusRipple && _react2.default.createElement(_FocusRipple2.default, { + style: rippleStyle, + innerStyle: styles.rippleInner, + show: (hovered || focused) && !active, + color: styles.rippleColor.fill + }) + ) + ) + ), + _react2.default.createElement('input', { + type: 'hidden', + name: name, + value: value, + required: required, + min: min, + max: max, + step: step + }) + ); + } + }]); + return Slider; +}(_react.Component); + +Slider.defaultProps = { + axis: 'x', + disabled: false, + disableFocusRipple: false, + max: 1, + min: 0, + required: true, + step: 0.01, + style: {} +}; +Slider.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Slider.propTypes = { + /** + * The axis on which the slider will slide. + */ + axis: _react.PropTypes.oneOf(['x', 'x-reverse', 'y', 'y-reverse']), + /** + * The default value of the slider. + */ + defaultValue: valueInRangePropType, + /** + * Describe the slider. + */ + description: (0, _deprecatedPropType2.default)(_react.PropTypes.node, 'Use a sibling node element instead. It will be removed with v0.17.0.'), + /** + * Disables focus ripple if set to true. + */ + disableFocusRipple: _react.PropTypes.bool, + /** + * If true, the slider will not be interactable. + */ + disabled: _react.PropTypes.bool, + /** + * An error message for the slider. + */ + error: (0, _deprecatedPropType2.default)(_react.PropTypes.node, 'Use a sibling node element instead. It will be removed with v0.17.0.'), + /** + * The maximum value the slider can slide to on + * a scale from 0 to 1 inclusive. Cannot be equal to min. + */ + max: minMaxPropType, + /** + * The minimum value the slider can slide to on a scale + * from 0 to 1 inclusive. Cannot be equal to max. + */ + min: minMaxPropType, + /** + * The name of the slider. Behaves like the name attribute + * of an input element. + */ + name: _react.PropTypes.string, + /** @ignore */ + onBlur: _react.PropTypes.func, + /** + * Callback function that is fired when the slider's value changed. + * + * @param {object} event KeyDown event targeting the slider. + * @param {number} newValue The new value of the slider. + */ + onChange: _react.PropTypes.func, + /** + * Callback function that is fired when the slider has begun to move. + * + * @param {object} event MouseDown or TouchStart event targeting the slider. + */ + onDragStart: _react.PropTypes.func, + /** + * Callback function that is fired when the slide has stopped moving. + * + * @param {object} event MouseEnd or TouchEnd event targeting the slider. + */ + onDragStop: _react.PropTypes.func, + /** @ignore */ + onFocus: _react.PropTypes.func, + /** + * Whether or not the slider is required in a form. + */ + required: _react.PropTypes.bool, + /** + * Override the inline-styles of the inner slider element. + */ + sliderStyle: _react.PropTypes.object, + /** + * The granularity the slider can step through values. + */ + step: _react.PropTypes.number, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The value of the slider. + */ + value: valueInRangePropType +} : void 0; +exports.default = Slider; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 709 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _defineProperty = __webpack_require__(138); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (obj, key, value) { + if (key in obj) { + (0, _defineProperty2.default)(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +}; + +/***/ }), +/* 710 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = deprecated; + +var _warning = __webpack_require__(24); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var warned = {}; /** + * This module is taken from https://github.com/react-bootstrap/react-prop-types. + * It's not a dependency to reduce build size / install time. + * It should be pretty stable. + */ +function deprecated(validator, reason) { + return function validate(props, propName, componentName, location, propFullName) { + var componentNameSafe = componentName || '<<anonymous>>'; + var propFullNameSafe = propFullName || propName; + + if (props[propName] != null) { + var messageKey = componentName + '.' + propName; + + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason)) : void 0; + + warned[messageKey] = true; + } + + for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { + args[_key - 5] = arguments[_key]; + } + + return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args)); + }; +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 711 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _TextField = __webpack_require__(87); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _createComponent = __webpack_require__(38); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(61); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_TextField2.default, function (_ref) { + var defaultValue = _ref.defaultValue, + props = _objectWithoutProperties(_ref, ['defaultValue']); + + return (0, _mapError2.default)(props); +}); + +/***/ }), +/* 712 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _TimePicker = __webpack_require__(713); + +var _TimePicker2 = _interopRequireDefault(_TimePicker); + +var _createComponent = __webpack_require__(38); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +var _mapError = __webpack_require__(61); + +var _mapError2 = _interopRequireDefault(_mapError); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_TimePicker2.default, function (_ref) { + var _ref$input = _ref.input, + onBlur = _ref$input.onBlur, + inputProps = _objectWithoutProperties(_ref$input, ['onBlur']), + defaultTime = _ref.defaultTime, + _onChange = _ref.onChange, + props = _objectWithoutProperties(_ref, ['input', 'defaultTime', 'onChange']); + + return _extends({}, inputProps, (0, _mapError2.default)(props), { + onChange: function onChange(event, value) { + inputProps.onChange(value); + if (_onChange) { + _onChange(value); + } + } + }); +}); + +/***/ }), +/* 713 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _TimePicker = __webpack_require__(714); + +var _TimePicker2 = _interopRequireDefault(_TimePicker); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _TimePicker2.default; + +/***/ }), +/* 714 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _TimePickerDialog = __webpack_require__(715); + +var _TimePickerDialog2 = _interopRequireDefault(_TimePickerDialog); + +var _TextField = __webpack_require__(87); + +var _TextField2 = _interopRequireDefault(_TextField); + +var _timeUtils = __webpack_require__(88); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var emptyTime = new Date(); +emptyTime.setHours(0); +emptyTime.setMinutes(0); +emptyTime.setSeconds(0); +emptyTime.setMilliseconds(0); + +var TimePicker = function (_Component) { + (0, _inherits3.default)(TimePicker, _Component); + + function TimePicker() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TimePicker); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimePicker.__proto__ || (0, _getPrototypeOf2.default)(TimePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + time: null, + dialogTime: new Date() + }, _this.handleAcceptDialog = function (time) { + _this.setState({ + time: time + }); + if (_this.props.onChange) _this.props.onChange(null, time); + }, _this.handleFocusInput = function (event) { + event.target.blur(); + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + }, _this.handleTouchTapInput = function (event) { + event.preventDefault(); + + if (!_this.props.disabled) { + _this.openDialog(); + } + + if (_this.props.onTouchTap) { + _this.props.onTouchTap(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TimePicker, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + time: this.isControlled() ? this.getControlledTime() : this.props.defaultTime + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.value !== this.props.value) { + this.setState({ + time: this.getControlledTime(nextProps) + }); + } + } + + /** + * Alias for `openDialog()` for an api consistent with TextField. + */ + + }, { + key: 'focus', + value: function focus() { + this.openDialog(); + } + }, { + key: 'openDialog', + value: function openDialog() { + this.setState({ + dialogTime: this.state.time + }); + this.refs.dialogWindow.show(); + } + }, { + key: 'isControlled', + value: function isControlled() { + return this.props.value !== null; + } + }, { + key: 'getControlledTime', + value: function getControlledTime() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; + + var result = null; + if (props.value instanceof Date) { + result = props.value; + } + return result; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + autoOk = _props.autoOk, + cancelLabel = _props.cancelLabel, + defaultTime = _props.defaultTime, + dialogBodyStyle = _props.dialogBodyStyle, + dialogStyle = _props.dialogStyle, + format = _props.format, + okLabel = _props.okLabel, + onFocus = _props.onFocus, + onTouchTap = _props.onTouchTap, + onShow = _props.onShow, + onDismiss = _props.onDismiss, + pedantic = _props.pedantic, + style = _props.style, + textFieldStyle = _props.textFieldStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['autoOk', 'cancelLabel', 'defaultTime', 'dialogBodyStyle', 'dialogStyle', 'format', 'okLabel', 'onFocus', 'onTouchTap', 'onShow', 'onDismiss', 'pedantic', 'style', 'textFieldStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + var time = this.state.time; + + + return _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, + _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, { + style: textFieldStyle, + ref: 'input', + value: time === emptyTime ? null : (0, _timeUtils.formatTime)(time, format, pedantic), + onFocus: this.handleFocusInput, + onTouchTap: this.handleTouchTapInput + })), + _react2.default.createElement(_TimePickerDialog2.default, { + ref: 'dialogWindow', + bodyStyle: dialogBodyStyle, + initialTime: this.state.dialogTime, + onAccept: this.handleAcceptDialog, + onShow: onShow, + onDismiss: onDismiss, + format: format, + okLabel: okLabel, + cancelLabel: cancelLabel, + autoOk: autoOk, + style: dialogStyle + }) + ); + } + }]); + return TimePicker; +}(_react.Component); + +TimePicker.defaultProps = { + autoOk: false, + cancelLabel: 'Cancel', + defaultTime: null, + disabled: false, + format: 'ampm', + okLabel: 'OK', + pedantic: false, + style: {}, + value: null +}; +TimePicker.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? TimePicker.propTypes = { + /** + * If true, automatically accept and close the picker on set minutes. + */ + autoOk: _react.PropTypes.bool, + /** + * Override the label of the 'Cancel' button. + */ + cancelLabel: _react.PropTypes.node, + /** + * The initial time value of the TimePicker. + */ + defaultTime: _react.PropTypes.object, + /** + * Override the inline-styles of TimePickerDialog's body element. + */ + dialogBodyStyle: _react.PropTypes.object, + /** + * Override the inline-styles of TimePickerDialog's root element. + */ + dialogStyle: _react.PropTypes.object, + /** + * If true, the TimePicker is disabled. + */ + disabled: _react.PropTypes.bool, + /** + * Tells the component to display the picker in `ampm` (12hr) format or `24hr` format. + */ + format: _react.PropTypes.oneOf(['ampm', '24hr']), + /** + * Override the label of the 'OK' button. + */ + okLabel: _react.PropTypes.node, + /** + * Callback function that is fired when the time value changes. The time value is passed in a Date Object. + * Since there is no particular event associated with the change the first argument will always be null + * and the second argument will be the new Date instance. + */ + onChange: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker dialog is dismissed. + */ + onDismiss: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker `TextField` gains focus. + */ + onFocus: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker dialog is shown. + */ + onShow: _react.PropTypes.func, + /** + * Callback function fired when the TimePicker is tapped or clicked. + */ + onTouchTap: _react.PropTypes.func, + /** + * If true, uses ("noon" / "midnight") instead of ("12 a.m." / "12 p.m."). + * + * It's technically more correct to refer to "12 noon" and "12 midnight" rather than "12 a.m." and "12 p.m." + * and it avoids confusion between different locales. By default (for compatibility reasons) TimePicker uses + * ("12 a.m." / "12 p.m."). + */ + pedantic: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of TimePicker's TextField element. + */ + textFieldStyle: _react.PropTypes.object, + /** + * Sets the time for the Time Picker programmatically. + */ + value: _react.PropTypes.object +} : void 0; +exports.default = TimePicker; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 715 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactEventListener = __webpack_require__(60); + +var _reactEventListener2 = _interopRequireDefault(_reactEventListener); + +var _keycode = __webpack_require__(28); + +var _keycode2 = _interopRequireDefault(_keycode); + +var _Clock = __webpack_require__(716); + +var _Clock2 = _interopRequireDefault(_Clock); + +var _Dialog = __webpack_require__(288); + +var _Dialog2 = _interopRequireDefault(_Dialog); + +var _FlatButton = __webpack_require__(287); + +var _FlatButton2 = _interopRequireDefault(_FlatButton); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TimePickerDialog = function (_Component) { + (0, _inherits3.default)(TimePickerDialog, _Component); + + function TimePickerDialog() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TimePickerDialog); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(TimePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + open: false + }, _this.handleRequestClose = function () { + _this.dismiss(); + }, _this.handleTouchTapCancel = function () { + _this.dismiss(); + }, _this.handleTouchTapOK = function () { + if (_this.props.onAccept) { + _this.props.onAccept(_this.refs.clock.getSelectedTime()); + } + _this.setState({ + open: false + }); + }, _this.handleKeyUp = function (event) { + switch ((0, _keycode2.default)(event)) { + case 'enter': + _this.handleTouchTapOK(); + break; + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TimePickerDialog, [{ + key: 'show', + value: function show() { + if (this.props.onShow && !this.state.open) this.props.onShow(); + this.setState({ + open: true + }); + } + }, { + key: 'dismiss', + value: function dismiss() { + if (this.props.onDismiss && this.state.open) this.props.onDismiss(); + this.setState({ + open: false + }); + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + bodyStyle = _props.bodyStyle, + initialTime = _props.initialTime, + onAccept = _props.onAccept, + format = _props.format, + autoOk = _props.autoOk, + okLabel = _props.okLabel, + cancelLabel = _props.cancelLabel, + style = _props.style, + other = (0, _objectWithoutProperties3.default)(_props, ['bodyStyle', 'initialTime', 'onAccept', 'format', 'autoOk', 'okLabel', 'cancelLabel', 'style']); + + + var styles = { + root: { + fontSize: 14, + color: this.context.muiTheme.timePicker.clockColor + }, + dialogContent: { + width: 280 + }, + body: { + padding: 0 + } + }; + + var actions = [_react2.default.createElement(_FlatButton2.default, { + key: 0, + label: cancelLabel, + primary: true, + onTouchTap: this.handleTouchTapCancel + }), _react2.default.createElement(_FlatButton2.default, { + key: 1, + label: okLabel, + primary: true, + onTouchTap: this.handleTouchTapOK + })]; + + var onClockChangeMinutes = autoOk === true ? this.handleTouchTapOK : undefined; + var open = this.state.open; + + return _react2.default.createElement( + _Dialog2.default, + (0, _extends3.default)({}, other, { + style: (0, _simpleAssign2.default)(styles.root, style), + bodyStyle: (0, _simpleAssign2.default)(styles.body, bodyStyle), + actions: actions, + contentStyle: styles.dialogContent, + repositionOnUpdate: false, + open: open, + onRequestClose: this.handleRequestClose + }), + open && _react2.default.createElement(_reactEventListener2.default, { target: 'window', onKeyUp: this.handleKeyUp }), + open && _react2.default.createElement(_Clock2.default, { + ref: 'clock', + format: format, + initialTime: initialTime, + onChangeMinutes: onClockChangeMinutes + }) + ); + } + }]); + return TimePickerDialog; +}(_react.Component); + +TimePickerDialog.defaultProps = { + okLabel: 'OK', + cancelLabel: 'Cancel' +}; +TimePickerDialog.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? TimePickerDialog.propTypes = { + autoOk: _react.PropTypes.bool, + bodyStyle: _react.PropTypes.object, + cancelLabel: _react.PropTypes.node, + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialTime: _react.PropTypes.object, + okLabel: _react.PropTypes.node, + onAccept: _react.PropTypes.func, + onDismiss: _react.PropTypes.func, + onShow: _react.PropTypes.func, + style: _react.PropTypes.object +} : void 0; +exports.default = TimePickerDialog; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 716 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _TimeDisplay = __webpack_require__(717); + +var _TimeDisplay2 = _interopRequireDefault(_TimeDisplay); + +var _ClockHours = __webpack_require__(721); + +var _ClockHours2 = _interopRequireDefault(_ClockHours); + +var _ClockMinutes = __webpack_require__(722); + +var _ClockMinutes2 = _interopRequireDefault(_ClockMinutes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Clock = function (_Component) { + (0, _inherits3.default)(Clock, _Component); + + function Clock() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Clock); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Clock.__proto__ || (0, _getPrototypeOf2.default)(Clock)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + selectedTime: null, + mode: 'hour' + }, _this.setMode = function (mode) { + setTimeout(function () { + _this.setState({ + mode: mode + }); + }, 100); + }, _this.handleSelectAffix = function (affix) { + if (affix === _this.getAffix()) return; + + var hours = _this.state.selectedTime.getHours(); + + if (affix === 'am') { + _this.handleChangeHours(hours - 12, affix); + return; + } + + _this.handleChangeHours(hours + 12, affix); + }, _this.handleChangeHours = function (hours, finished) { + var time = new Date(_this.state.selectedTime); + var affix = void 0; + + if (typeof finished === 'string') { + affix = finished; + finished = undefined; + } + if (!affix) { + affix = _this.getAffix(); + } + if (affix === 'pm' && hours < 12) { + hours += 12; + } + + time.setHours(hours); + _this.setState({ + selectedTime: time + }); + + if (finished) { + setTimeout(function () { + _this.setState({ + mode: 'minute' + }); + + var onChangeHours = _this.props.onChangeHours; + + if (onChangeHours) { + onChangeHours(time); + } + }, 100); + } + }, _this.handleChangeMinutes = function (minutes, finished) { + var time = new Date(_this.state.selectedTime); + time.setMinutes(minutes); + _this.setState({ + selectedTime: time + }); + + var onChangeMinutes = _this.props.onChangeMinutes; + + if (onChangeMinutes && finished) { + setTimeout(function () { + onChangeMinutes(time); + }, 0); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Clock, [{ + key: 'componentWillMount', + value: function componentWillMount() { + this.setState({ + selectedTime: this.props.initialTime || new Date() + }); + } + }, { + key: 'getAffix', + value: function getAffix() { + if (this.props.format !== 'ampm') return ''; + + var hours = this.state.selectedTime.getHours(); + if (hours < 12) { + return 'am'; + } + + return 'pm'; + } + }, { + key: 'getSelectedTime', + value: function getSelectedTime() { + return this.state.selectedTime; + } + }, { + key: 'render', + value: function render() { + var clock = null; + + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + timePicker = _context$muiTheme.timePicker; + + + var styles = { + root: { + userSelect: 'none' + }, + container: { + height: 280, + padding: 10, + position: 'relative', + boxSizing: 'content-box' + }, + circle: { + position: 'absolute', + top: 20, + width: 260, + height: 260, + borderRadius: '100%', + backgroundColor: timePicker.clockCircleColor + } + }; + + if (this.state.mode === 'hour') { + clock = _react2.default.createElement(_ClockHours2.default, { + key: 'hours', + format: this.props.format, + onChange: this.handleChangeHours, + initialHours: this.state.selectedTime.getHours() + }); + } else { + clock = _react2.default.createElement(_ClockMinutes2.default, { + key: 'minutes', + onChange: this.handleChangeMinutes, + initialMinutes: this.state.selectedTime.getMinutes() + }); + } + + return _react2.default.createElement( + 'div', + { style: prepareStyles(styles.root) }, + _react2.default.createElement(_TimeDisplay2.default, { + selectedTime: this.state.selectedTime, + mode: this.state.mode, + format: this.props.format, + affix: this.getAffix(), + onSelectAffix: this.handleSelectAffix, + onSelectHour: this.setMode.bind(this, 'hour'), + onSelectMin: this.setMode.bind(this, 'minute') + }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.container) }, + _react2.default.createElement('div', { style: prepareStyles(styles.circle) }), + clock + ) + ); + } + }]); + return Clock; +}(_react.Component); + +Clock.defaultProps = { + initialTime: new Date() +}; +Clock.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Clock.propTypes = { + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialTime: _react.PropTypes.object, + onChangeHours: _react.PropTypes.func, + onChangeMinutes: _react.PropTypes.func +} : void 0; +exports.default = Clock; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 717 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _slicedToArray2 = __webpack_require__(291); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var TimeDisplay = function (_Component) { + (0, _inherits3.default)(TimeDisplay, _Component); + + function TimeDisplay() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, TimeDisplay); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimeDisplay.__proto__ || (0, _getPrototypeOf2.default)(TimeDisplay)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + transitionDirection: 'up' + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(TimeDisplay, [{ + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(nextProps) { + if (nextProps.selectedTime !== this.props.selectedTime) { + var direction = nextProps.selectedTime > this.props.selectedTime ? 'up' : 'down'; + + this.setState({ + transitionDirection: direction + }); + } + } + }, { + key: 'sanitizeTime', + value: function sanitizeTime() { + var hour = this.props.selectedTime.getHours(); + var min = this.props.selectedTime.getMinutes().toString(); + + if (this.props.format === 'ampm') { + hour %= 12; + hour = hour || 12; + } + + hour = hour.toString(); + if (hour.length < 2) hour = '0' + hour; + if (min.length < 2) min = '0' + min; + + return [hour, min]; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + affix = _props.affix, + format = _props.format, + mode = _props.mode, + onSelectAffix = _props.onSelectAffix, + onSelectHour = _props.onSelectHour, + onSelectMin = _props.onSelectMin, + selectedTime = _props.selectedTime, + other = (0, _objectWithoutProperties3.default)(_props, ['affix', 'format', 'mode', 'onSelectAffix', 'onSelectHour', 'onSelectMin', 'selectedTime']); + var _context$muiTheme = this.context.muiTheme, + prepareStyles = _context$muiTheme.prepareStyles, + timePicker = _context$muiTheme.timePicker; + + + var styles = { + root: { + padding: '14px 0', + borderTopLeftRadius: 2, + borderTopRightRadius: 2, + backgroundColor: timePicker.headerColor, + color: timePicker.textColor + }, + text: { + margin: '6px 0', + lineHeight: '58px', + height: 58, + fontSize: 58, + display: 'flex', + justifyContent: 'center', + alignItems: 'baseline' + }, + time: { + margin: '0 10px' + }, + affix: { + flex: 1, + position: 'relative', + lineHeight: '17px', + height: 17, + fontSize: 17 + }, + affixTop: { + position: 'absolute', + top: -20, + left: 0 + }, + clickable: { + cursor: 'pointer' + }, + inactive: { + opacity: 0.7 + } + }; + + var _sanitizeTime = this.sanitizeTime(), + _sanitizeTime2 = (0, _slicedToArray3.default)(_sanitizeTime, 2), + hour = _sanitizeTime2[0], + min = _sanitizeTime2[1]; + + var buttons = []; + if (format === 'ampm') { + buttons = [_react2.default.createElement( + 'div', + { + key: 'pm', + style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, affix === 'pm' ? {} : styles.inactive)), + onTouchTap: function onTouchTap() { + return onSelectAffix('pm'); + } + }, + 'PM' + ), _react2.default.createElement( + 'div', + { + key: 'am', + style: prepareStyles((0, _simpleAssign2.default)({}, styles.affixTop, styles.clickable, affix === 'am' ? {} : styles.inactive)), + onTouchTap: function onTouchTap() { + return onSelectAffix('am'); + } + }, + 'AM' + )]; + } + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({}, other, { style: prepareStyles(styles.root) }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.text) }, + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.affix)) }), + _react2.default.createElement( + 'div', + { style: prepareStyles(styles.time) }, + _react2.default.createElement( + 'span', + { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, mode === 'hour' ? {} : styles.inactive)), + onTouchTap: onSelectHour + }, + hour + ), + _react2.default.createElement( + 'span', + null, + ':' + ), + _react2.default.createElement( + 'span', + { + style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, mode === 'minute' ? {} : styles.inactive)), + onTouchTap: onSelectMin + }, + min + ) + ), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.affix)) }, + buttons + ) + ) + ); + } + }]); + return TimeDisplay; +}(_react.Component); + +TimeDisplay.defaultProps = { + affix: '', + mode: 'hour' +}; +TimeDisplay.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? TimeDisplay.propTypes = { + affix: _react.PropTypes.oneOf(['', 'pm', 'am']), + format: _react.PropTypes.oneOf(['ampm', '24hr']), + mode: _react.PropTypes.oneOf(['hour', 'minute']), + onSelectAffix: _react.PropTypes.func, + onSelectHour: _react.PropTypes.func, + onSelectMin: _react.PropTypes.func, + selectedTime: _react.PropTypes.object.isRequired +} : void 0; +exports.default = TimeDisplay; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 718 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(719), __esModule: true }; + +/***/ }), +/* 719 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(92); +__webpack_require__(72); +module.exports = __webpack_require__(720); + +/***/ }), +/* 720 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(133) + , ITERATOR = __webpack_require__(20)('iterator') + , Iterators = __webpack_require__(65); +module.exports = __webpack_require__(16).isIterable = function(it){ + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + || Iterators.hasOwnProperty(classof(O)); +}; + +/***/ }), +/* 721 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reactDom = __webpack_require__(17); + +var _reactDom2 = _interopRequireDefault(_reactDom); + +var _ClockNumber = __webpack_require__(292); + +var _ClockNumber2 = _interopRequireDefault(_ClockNumber); + +var _ClockPointer = __webpack_require__(293); + +var _ClockPointer2 = _interopRequireDefault(_ClockPointer); + +var _timeUtils = __webpack_require__(88); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ClockHours = function (_Component) { + (0, _inherits3.default)(ClockHours, _Component); + + function ClockHours() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClockHours); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockHours.__proto__ || (0, _getPrototypeOf2.default)(ClockHours)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) { + event.preventDefault(); + _this.setClock(event.nativeEvent, true); + }, _this.handleMove = function (event) { + event.preventDefault(); + if (_this.isMousePressed(event) !== 1) return; + _this.setClock(event.nativeEvent, false); + }, _this.handleTouchMove = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], false); + }, _this.handleTouchEnd = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], true); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClockHours, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var clockElement = _reactDom2.default.findDOMNode(this.refs.mask); + + this.center = { + x: clockElement.offsetWidth / 2, + y: clockElement.offsetHeight / 2 + }; + + this.basePoint = { + x: this.center.x, + y: 0 + }; + } + }, { + key: 'isMousePressed', + value: function isMousePressed(event) { + if (typeof event.buttons === 'undefined') { + return event.nativeEvent.which; + } + + return event.buttons; + } + }, { + key: 'setClock', + value: function setClock(event, finish) { + if (typeof event.offsetX === 'undefined') { + var offset = (0, _timeUtils.getTouchEventOffsetValues)(event); + + event.offsetX = offset.offsetX; + event.offsetY = offset.offsetY; + } + + var hours = this.getHours(event.offsetX, event.offsetY); + + this.props.onChange(hours, finish); + } + }, { + key: 'getHours', + value: function getHours(offsetX, offsetY) { + var step = 30; + var x = offsetX - this.center.x; + var y = offsetY - this.center.y; + var cx = this.basePoint.x - this.center.x; + var cy = this.basePoint.y - this.center.y; + + var atan = Math.atan2(cx, cy) - Math.atan2(x, y); + + var deg = (0, _timeUtils.rad2deg)(atan); + deg = Math.round(deg / step) * step; + deg %= 360; + + var value = Math.floor(deg / step) || 0; + + var delta = Math.pow(x, 2) + Math.pow(y, 2); + var distance = Math.sqrt(delta); + + value = value || 12; + if (this.props.format === '24hr') { + if (distance < 90) { + value += 12; + value %= 24; + } + } else { + value %= 12; + } + + return value; + } + }, { + key: 'getSelected', + value: function getSelected() { + var hour = this.props.initialHours; + + if (this.props.format === 'ampm') { + hour %= 12; + hour = hour || 12; + } + + return hour; + } + }, { + key: 'getHourNumbers', + value: function getHourNumbers() { + var _this2 = this; + + var style = { + pointerEvents: 'none' + }; + var hourSize = this.props.format === 'ampm' ? 12 : 24; + + var hours = []; + for (var i = 1; i <= hourSize; i++) { + hours.push(i % 24); + } + + return hours.map(function (hour) { + var isSelected = _this2.getSelected() === hour; + return _react2.default.createElement(_ClockNumber2.default, { + key: hour, + style: style, + isSelected: isSelected, + type: 'hour', + value: hour + }); + }); + } + }, { + key: 'render', + value: function render() { + var styles = { + root: { + height: '100%', + width: '100%', + borderRadius: '100%', + position: 'relative', + pointerEvents: 'none', + boxSizing: 'border-box' + }, + + hitMask: { + height: '100%', + width: '100%', + pointerEvents: 'auto' + } + }; + + var prepareStyles = this.context.muiTheme.prepareStyles; + + var hours = this.getSelected(); + var numbers = this.getHourNumbers(); + + return _react2.default.createElement( + 'div', + { ref: 'clock', style: prepareStyles(styles.root) }, + _react2.default.createElement(_ClockPointer2.default, { hasSelected: true, value: hours, type: 'hour' }), + numbers, + _react2.default.createElement('div', { + ref: 'mask', style: prepareStyles(styles.hitMask), onTouchMove: this.handleTouchMove, + onTouchEnd: this.handleTouchEnd, onMouseUp: this.handleUp, onMouseMove: this.handleMove + }) + ); + } + }]); + return ClockHours; +}(_react.Component); + +ClockHours.defaultProps = { + initialHours: new Date().getHours(), + onChange: function onChange() {}, + format: 'ampm' +}; +ClockHours.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? ClockHours.propTypes = { + format: _react.PropTypes.oneOf(['ampm', '24hr']), + initialHours: _react.PropTypes.number, + onChange: _react.PropTypes.func +} : void 0; +exports.default = ClockHours; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 722 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _ClockNumber = __webpack_require__(292); + +var _ClockNumber2 = _interopRequireDefault(_ClockNumber); + +var _ClockPointer = __webpack_require__(293); + +var _ClockPointer2 = _interopRequireDefault(_ClockPointer); + +var _timeUtils = __webpack_require__(88); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ClockMinutes = function (_Component) { + (0, _inherits3.default)(ClockMinutes, _Component); + + function ClockMinutes() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, ClockMinutes); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockMinutes.__proto__ || (0, _getPrototypeOf2.default)(ClockMinutes)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) { + event.preventDefault(); + _this.setClock(event.nativeEvent, true); + }, _this.handleMove = function (event) { + event.preventDefault(); + if (_this.isMousePressed(event) !== 1) { + return; + } + _this.setClock(event.nativeEvent, false); + }, _this.handleTouch = function (event) { + event.preventDefault(); + _this.setClock(event.changedTouches[0], event.type === 'touchend'); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(ClockMinutes, [{ + key: 'componentDidMount', + value: function componentDidMount() { + var clockElement = this.refs.mask; + + this.center = { + x: clockElement.offsetWidth / 2, + y: clockElement.offsetHeight / 2 + }; + + this.basePoint = { + x: this.center.x, + y: 0 + }; + } + }, { + key: 'isMousePressed', + value: function isMousePressed(event) { + if (typeof event.buttons === 'undefined') { + return event.nativeEvent.which; + } + return event.buttons; + } + }, { + key: 'setClock', + value: function setClock(event, finish) { + if (typeof event.offsetX === 'undefined') { + var offset = (0, _timeUtils.getTouchEventOffsetValues)(event); + + event.offsetX = offset.offsetX; + event.offsetY = offset.offsetY; + } + + var minutes = this.getMinutes(event.offsetX, event.offsetY); + + this.props.onChange(minutes, finish); + } + }, { + key: 'getMinutes', + value: function getMinutes(offsetX, offsetY) { + var step = 6; + var x = offsetX - this.center.x; + var y = offsetY - this.center.y; + var cx = this.basePoint.x - this.center.x; + var cy = this.basePoint.y - this.center.y; + + var atan = Math.atan2(cx, cy) - Math.atan2(x, y); + + var deg = (0, _timeUtils.rad2deg)(atan); + deg = Math.round(deg / step) * step; + deg %= 360; + + var value = Math.floor(deg / step) || 0; + + return value; + } + }, { + key: 'getMinuteNumbers', + value: function getMinuteNumbers() { + var minutes = []; + for (var i = 0; i < 12; i++) { + minutes.push(i * 5); + } + var selectedMinutes = this.props.initialMinutes; + var hasSelected = false; + + var numbers = minutes.map(function (minute) { + var isSelected = selectedMinutes === minute; + if (isSelected) { + hasSelected = true; + } + return _react2.default.createElement(_ClockNumber2.default, { + key: minute, + isSelected: isSelected, + type: 'minute', + value: minute + }); + }); + + return { + numbers: numbers, + hasSelected: hasSelected, + selected: selectedMinutes + }; + } + }, { + key: 'render', + value: function render() { + var styles = { + root: { + height: '100%', + width: '100%', + borderRadius: '100%', + position: 'relative', + pointerEvents: 'none', + boxSizing: 'border-box' + }, + + hitMask: { + height: '100%', + width: '100%', + pointerEvents: 'auto' + } + }; + + var prepareStyles = this.context.muiTheme.prepareStyles; + + var minutes = this.getMinuteNumbers(); + + return _react2.default.createElement( + 'div', + { ref: 'clock', style: prepareStyles(styles.root) }, + _react2.default.createElement(_ClockPointer2.default, { value: minutes.selected, type: 'minute', hasSelected: minutes.hasSelected }), + minutes.numbers, + _react2.default.createElement('div', { + ref: 'mask', + style: prepareStyles(styles.hitMask), + onTouchMove: this.handleTouch, + onTouchEnd: this.handleTouch, + onMouseUp: this.handleUp, + onMouseMove: this.handleMove + }) + ); + } + }]); + return ClockMinutes; +}(_react.Component); + +ClockMinutes.defaultProps = { + initialMinutes: new Date().getMinutes(), + onChange: function onChange() {} +}; +ClockMinutes.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? ClockMinutes.propTypes = { + initialMinutes: _react.PropTypes.number, + onChange: _react.PropTypes.func +} : void 0; +exports.default = ClockMinutes; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 723 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _Toggle = __webpack_require__(724); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +var _createComponent = __webpack_require__(38); + +var _createComponent2 = _interopRequireDefault(_createComponent); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + +exports.default = (0, _createComponent2.default)(_Toggle2.default, function (_ref) { + var _ref$input = _ref.input, + onChange = _ref$input.onChange, + value = _ref$input.value, + inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']), + defaultToggled = _ref.defaultToggled, + meta = _ref.meta, + props = _objectWithoutProperties(_ref, ['input', 'defaultToggled', 'meta']); + + return _extends({}, inputProps, props, { + onToggle: onChange, + toggled: !!value + }); +}); + +/***/ }), +/* 724 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _Toggle = __webpack_require__(725); + +var _Toggle2 = _interopRequireDefault(_Toggle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _Toggle2.default; + +/***/ }), +/* 725 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +var _Paper = __webpack_require__(37); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _EnhancedSwitch = __webpack_require__(182); + +var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context, state) { + var disabled = props.disabled, + elementStyle = props.elementStyle, + trackSwitchedStyle = props.trackSwitchedStyle, + thumbSwitchedStyle = props.thumbSwitchedStyle, + trackStyle = props.trackStyle, + thumbStyle = props.thumbStyle, + iconStyle = props.iconStyle, + rippleStyle = props.rippleStyle, + labelStyle = props.labelStyle; + var _context$muiTheme = context.muiTheme, + baseTheme = _context$muiTheme.baseTheme, + toggle = _context$muiTheme.toggle; + + + var toggleSize = 20; + var toggleTrackWidth = 36; + var styles = { + icon: { + width: 36, + padding: '4px 0px 6px 2px' + }, + ripple: { + top: -10, + left: -10, + color: state.switched ? toggle.thumbOnColor : baseTheme.palette.textColor + }, + toggleElement: { + width: toggleTrackWidth + }, + track: { + transition: _transitions2.default.easeOut(), + width: '100%', + height: 14, + borderRadius: 30, + backgroundColor: toggle.trackOffColor + }, + thumb: { + transition: _transitions2.default.easeOut(), + position: 'absolute', + top: 1, + left: 0, + width: toggleSize, + height: toggleSize, + lineHeight: '24px', + borderRadius: '50%', + backgroundColor: toggle.thumbOffColor + }, + trackWhenSwitched: { + backgroundColor: toggle.trackOnColor + }, + thumbWhenSwitched: { + backgroundColor: toggle.thumbOnColor, + left: '100%' + }, + trackWhenDisabled: { + backgroundColor: toggle.trackDisabledColor + }, + thumbWhenDisabled: { + backgroundColor: toggle.thumbDisabledColor + }, + label: { + color: disabled ? toggle.labelDisabledColor : toggle.labelColor, + width: 'calc(100% - ' + (toggleTrackWidth + 10) + 'px)' + } + }; + + (0, _simpleAssign2.default)(styles.track, trackStyle, state.switched && styles.trackWhenSwitched, state.switched && trackSwitchedStyle, disabled && styles.trackWhenDisabled); + + (0, _simpleAssign2.default)(styles.thumb, thumbStyle, state.switched && styles.thumbWhenSwitched, state.switched && thumbSwitchedStyle, disabled && styles.thumbWhenDisabled); + + if (state.switched) { + styles.thumb.marginLeft = 0 - styles.thumb.width; + } + + (0, _simpleAssign2.default)(styles.icon, iconStyle); + + (0, _simpleAssign2.default)(styles.ripple, rippleStyle); + + (0, _simpleAssign2.default)(styles.label, labelStyle); + + (0, _simpleAssign2.default)(styles.toggleElement, elementStyle); + + return styles; +} + +var Toggle = function (_Component) { + (0, _inherits3.default)(Toggle, _Component); + + function Toggle() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Toggle); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Toggle.__proto__ || (0, _getPrototypeOf2.default)(Toggle)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + switched: false + }, _this.handleStateChange = function (newSwitched) { + _this.setState({ + switched: newSwitched + }); + }, _this.handleToggle = function (event, isInputChecked) { + if (_this.props.onToggle) { + _this.props.onToggle(event, isInputChecked); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Toggle, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var _props = this.props, + toggled = _props.toggled, + defaultToggled = _props.defaultToggled, + valueLink = _props.valueLink; + + + if (toggled || defaultToggled || valueLink && valueLink.value) { + this.setState({ + switched: true + }); + } + } + }, { + key: 'isToggled', + value: function isToggled() { + return this.refs.enhancedSwitch.isSwitched(); + } + }, { + key: 'setToggled', + value: function setToggled(newToggledValue) { + this.refs.enhancedSwitch.setSwitched(newToggledValue); + } + }, { + key: 'render', + value: function render() { + var _props2 = this.props, + defaultToggled = _props2.defaultToggled, + elementStyle = _props2.elementStyle, + onToggle = _props2.onToggle, + trackSwitchedStyle = _props2.trackSwitchedStyle, + thumbSwitchedStyle = _props2.thumbSwitchedStyle, + toggled = _props2.toggled, + other = (0, _objectWithoutProperties3.default)(_props2, ['defaultToggled', 'elementStyle', 'onToggle', 'trackSwitchedStyle', 'thumbSwitchedStyle', 'toggled']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context, this.state); + + var toggleElement = _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)({}, styles.toggleElement)) }, + _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.track)) }), + _react2.default.createElement(_Paper2.default, { style: styles.thumb, circle: true, zDepth: 1 }) + ); + + var enhancedSwitchProps = { + ref: 'enhancedSwitch', + inputType: 'checkbox', + switchElement: toggleElement, + rippleStyle: styles.ripple, + rippleColor: styles.ripple.color, + iconStyle: styles.icon, + trackStyle: styles.track, + thumbStyle: styles.thumb, + labelStyle: styles.label, + switched: this.state.switched, + onSwitch: this.handleToggle, + onParentShouldUpdate: this.handleStateChange, + labelPosition: this.props.labelPosition + }; + + if (this.props.hasOwnProperty('toggled')) { + enhancedSwitchProps.checked = toggled; + } else if (this.props.hasOwnProperty('defaultToggled')) { + enhancedSwitchProps.defaultChecked = defaultToggled; + } + + return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps)); + } + }]); + return Toggle; +}(_react.Component); + +Toggle.defaultProps = { + defaultToggled: false, + disabled: false, + labelPosition: 'left' +}; +Toggle.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Toggle.propTypes = { + /** + * Determines whether the Toggle is initially turned on. + * **Warning:** This cannot be used in conjunction with `toggled`. + * Decide between using a controlled or uncontrolled input element and remove one of these props. + * More info: https://fb.me/react-controlled-components + */ + defaultToggled: _react.PropTypes.bool, + /** + * Will disable the toggle if true. + */ + disabled: _react.PropTypes.bool, + /** + * Overrides the inline-styles of the Toggle element. + */ + elementStyle: _react.PropTypes.object, + /** + * Overrides the inline-styles of the Icon element. + */ + iconStyle: _react.PropTypes.object, + /** + * Overrides the inline-styles of the input element. + */ + inputStyle: _react.PropTypes.object, + /** + * Label for toggle. + */ + label: _react.PropTypes.node, + /** + * Where the label will be placed next to the toggle. + */ + labelPosition: _react.PropTypes.oneOf(['left', 'right']), + /** + * Overrides the inline-styles of the Toggle element label. + */ + labelStyle: _react.PropTypes.object, + /** + * Callback function that is fired when the toggle switch is toggled. + */ + onToggle: _react.PropTypes.func, + /** + * Override style of ripple. + */ + rippleStyle: _react.PropTypes.object, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override style for thumb. + */ + thumbStyle: _react.PropTypes.object, + /** + * Override the inline styles for thumb when the toggle switch is toggled on. + */ + thumbSwitchedStyle: _react.PropTypes.object, + /** + * Toggled if set to true. + */ + toggled: _react.PropTypes.bool, + /** + * Override style for track. + */ + trackStyle: _react.PropTypes.object, + /** + * Override the inline styles for track when the toggle switch is toggled on. + */ + trackSwitchedStyle: _react.PropTypes.object, + /** + * ValueLink prop for when using controlled toggle. + */ + valueLink: _react.PropTypes.object +} : void 0; +exports.default = Toggle; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 726 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, module) {/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Adds the key-value `pair` to `map`. + * + * @private + * @param {Object} map The map to modify. + * @param {Array} pair The key-value pair to add. + * @returns {Object} Returns `map`. + */ +function addMapEntry(map, pair) { + // Don't return `map.set` because it's not chainable in IE 11. + map.set(pair[0], pair[1]); + return map; +} + +/** + * Adds `value` to `set`. + * + * @private + * @param {Object} set The set to modify. + * @param {*} value The value to add. + * @returns {Object} Returns `set`. + */ +function addSetEntry(set, value) { + // Don't return `set.add` because it's not chainable in IE 11. + set.add(value); + return set; +} + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array ? array.length : 0; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + this.__data__ = new ListCache(entries); +} + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; +} + +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + return this.__data__['delete'](key); +} + +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) + ? baseTimes(value.length, String) + : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; +} + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (typeof key == 'number' && value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {boolean} [isFull] Specify a clone including symbols. + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, isDeep, isFull, customizer, key, object, stack) { + var result; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + if (isHostObject(value)) { + return object ? value : {}; + } + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (!isArr) { + var props = isFull ? getAllKeys(value) : keys(value); + } + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); + }); + return result; +} + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ +function baseCreate(proto) { + return isObject(proto) ? objectCreate(proto) : {}; +} + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +/** + * The base implementation of `getTag`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + return objectToString.call(value); +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; +} + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + if (!(isArray(source) || isTypedArray(source))) { + var props = baseKeysIn(source); + } + arrayEach(props || source, function(srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; + } + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(object[key], srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }); +} + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = object[key], + srcValue = source[key], + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + newValue = srcValue; + if (isArray(srcValue) || isTypedArray(srcValue)) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else { + isCommon = false; + newValue = baseClone(srcValue, true); + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + isCommon = false; + newValue = baseClone(srcValue, true); + } + else { + newValue = objValue; + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; +} + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var result = new buffer.constructor(buffer.length); + buffer.copy(result); + return result; +} + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/** + * Creates a clone of `map`. + * + * @private + * @param {Object} map The map to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned map. + */ +function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor); +} + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/** + * Creates a clone of `set`. + * + * @private + * @param {Object} set The set to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned set. + */ +function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor); +} + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; +} + +/** + * Copies own symbol properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Creates an array of the own enumerable symbol properties of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11, +// for data views in Edge < 14, and promises in Node.js. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = objectToString.call(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : undefined; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {Function} cloneFunc The function to clone values. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || + objectToString.call(value) != objectTag || isHostObject(value)) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return (typeof Ctor == 'function' && + Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); +} + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return copyObject(value, keysIn(value)); +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); +}); + +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = merge; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46), __webpack_require__(251)(module))) + +/***/ }), +/* 727 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = __webpack_require__(50); + +var _typeof3 = _interopRequireDefault(_typeof2); + +exports.default = function (muiTheme) { + var isClient = typeof navigator !== 'undefined'; + var userAgent = muiTheme.userAgent; + + if (userAgent === undefined && isClient) { + userAgent = navigator.userAgent; + } + + if (userAgent === undefined && !hasWarnedAboutUserAgent) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: userAgent should be supplied in the muiTheme context\n for server-side rendering.') : void 0; + + hasWarnedAboutUserAgent = true; + } + + if (userAgent === false) { + // Disabled autoprefixer + return null; + } else if (userAgent === 'all' || userAgent === undefined) { + // Prefix for all user agent + return function (style) { + var isFlex = ['flex', 'inline-flex'].indexOf(style.display) !== -1; + var stylePrefixed = _inlineStylePrefixer2.default.prefixAll(style); + + if (isFlex) { + var display = stylePrefixed.display; + if (isClient) { + // We can't apply this join with react-dom: + // #https://github.com/facebook/react/issues/6467 + stylePrefixed.display = display[display.length - 1]; + } else { + stylePrefixed.display = display.join('; display: '); + } + } + + return stylePrefixed; + }; + } else { + var _ret = function () { + var prefixer = new _inlineStylePrefixer2.default({ + userAgent: userAgent + }); + + return { + v: function v(style) { + return prefixer.prefix(style); + } + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v; + } +}; + +var _inlineStylePrefixer = __webpack_require__(728); + +var _inlineStylePrefixer2 = _interopRequireDefault(_inlineStylePrefixer); + +var _warning = __webpack_require__(24); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var hasWarnedAboutUserAgent = false; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 728 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +// special flexbox specifications + + +var _prefixAll2 = __webpack_require__(729); + +var _prefixAll3 = _interopRequireDefault(_prefixAll2); + +var _getBrowserInformation = __webpack_require__(740); + +var _getBrowserInformation2 = _interopRequireDefault(_getBrowserInformation); + +var _getPrefixedKeyframes = __webpack_require__(743); + +var _getPrefixedKeyframes2 = _interopRequireDefault(_getPrefixedKeyframes); + +var _capitalizeString = __webpack_require__(185); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _sortPrefixedStyle = __webpack_require__(297); + +var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); + +var _prefixProps = __webpack_require__(744); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +var _position = __webpack_require__(745); + +var _position2 = _interopRequireDefault(_position); + +var _calc = __webpack_require__(746); + +var _calc2 = _interopRequireDefault(_calc); + +var _zoomCursor = __webpack_require__(747); + +var _zoomCursor2 = _interopRequireDefault(_zoomCursor); + +var _grabCursor = __webpack_require__(748); + +var _grabCursor2 = _interopRequireDefault(_grabCursor); + +var _flex = __webpack_require__(749); + +var _flex2 = _interopRequireDefault(_flex); + +var _sizing = __webpack_require__(750); + +var _sizing2 = _interopRequireDefault(_sizing); + +var _gradient = __webpack_require__(751); + +var _gradient2 = _interopRequireDefault(_gradient); + +var _transition = __webpack_require__(752); + +var _transition2 = _interopRequireDefault(_transition); + +var _flexboxIE = __webpack_require__(754); + +var _flexboxIE2 = _interopRequireDefault(_flexboxIE); + +var _flexboxOld = __webpack_require__(755); + +var _flexboxOld2 = _interopRequireDefault(_flexboxOld); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var plugins = [_position2.default, _calc2.default, _zoomCursor2.default, _grabCursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, +// this must be run AFTER the flexbox specs +_flex2.default]; + +var Prefixer = function () { + /** + * Instantiante a new prefixer + * @param {string} userAgent - userAgent to gather prefix information according to caniuse.com + * @param {string} keepUnprefixed - keeps unprefixed properties and values + */ + + function Prefixer() { + var _this = this; + + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + _classCallCheck(this, Prefixer); + + var defaultUserAgent = typeof navigator !== 'undefined' ? navigator.userAgent : undefined; + + this._userAgent = options.userAgent || defaultUserAgent; + this._keepUnprefixed = options.keepUnprefixed || false; + + this._browserInfo = (0, _getBrowserInformation2.default)(this._userAgent); + + // Checks if the userAgent was resolved correctly + if (this._browserInfo && this._browserInfo.prefix) { + // set additional prefix information + this.cssPrefix = this._browserInfo.prefix.css; + this.jsPrefix = this._browserInfo.prefix.inline; + this.prefixedKeyframes = (0, _getPrefixedKeyframes2.default)(this._browserInfo); + } else { + this._usePrefixAllFallback = true; + return false; + } + + var data = this._browserInfo.browser && _prefixProps2.default[this._browserInfo.browser]; + if (data) { + this._requiresPrefix = Object.keys(data).filter(function (key) { + return data[key] >= _this._browserInfo.version; + }).reduce(function (result, name) { + result[name] = true; + return result; + }, {}); + this._hasPropsRequiringPrefix = Object.keys(this._requiresPrefix).length > 0; + } else { + this._usePrefixAllFallback = true; + } + } + + /** + * Returns a prefixed version of the style object + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ + + + _createClass(Prefixer, [{ + key: 'prefix', + value: function prefix(styles) { + var _this2 = this; + + // use prefixAll as fallback if userAgent can not be resolved + if (this._usePrefixAllFallback) { + return (0, _prefixAll3.default)(styles); + } + + // only add prefixes if needed + if (!this._hasPropsRequiringPrefix) { + return styles; + } + + Object.keys(styles).forEach(function (property) { + var value = styles[property]; + if (value instanceof Object && !Array.isArray(value)) { + // recurse through nested style objects + styles[property] = _this2.prefix(value); + } else { + // add prefixes if needed + if (_this2._requiresPrefix[property]) { + styles[_this2.jsPrefix + (0, _capitalizeString2.default)(property)] = value; + if (!_this2._keepUnprefixed) { + delete styles[property]; + } + } + } + }); + + Object.keys(styles).forEach(function (property) { + [].concat(styles[property]).forEach(function (value) { + // resolve plugins + plugins.forEach(function (plugin) { + // generates a new plugin interface with current data + assignStyles(styles, plugin({ + property: property, + value: value, + styles: styles, + browserInfo: _this2._browserInfo, + prefix: { + js: _this2.jsPrefix, + css: _this2.cssPrefix, + keyframes: _this2.prefixedKeyframes + }, + keepUnprefixed: _this2._keepUnprefixed, + requiresPrefix: _this2._requiresPrefix + }), value, _this2._keepUnprefixed); + }); + }); + }); + + return (0, _sortPrefixedStyle2.default)(styles); + } + + /** + * Returns a prefixed version of the style object using all vendor prefixes + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ + + }], [{ + key: 'prefixAll', + value: function prefixAll(styles) { + return (0, _prefixAll3.default)(styles); + } + }]); + + return Prefixer; +}(); + +exports.default = Prefixer; + + +function assignStyles(base) { + var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var value = arguments[2]; + var keepUnprefixed = arguments[3]; + + Object.keys(extend).forEach(function (property) { + var baseValue = base[property]; + if (Array.isArray(baseValue)) { + [].concat(extend[property]).forEach(function (val) { + if (base[property].indexOf(val) === -1) { + base[property].splice(baseValue.indexOf(value), keepUnprefixed ? 0 : 1, val); + } + }); + } else { + base[property] = extend[property]; + } + }); +} +module.exports = exports['default']; + +/***/ }), +/* 729 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = prefixAll; + +var _prefixProps = __webpack_require__(296); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +var _capitalizeString = __webpack_require__(185); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _sortPrefixedStyle = __webpack_require__(297); + +var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle); + +var _position = __webpack_require__(731); + +var _position2 = _interopRequireDefault(_position); + +var _calc = __webpack_require__(732); + +var _calc2 = _interopRequireDefault(_calc); + +var _cursor = __webpack_require__(733); + +var _cursor2 = _interopRequireDefault(_cursor); + +var _flex = __webpack_require__(734); + +var _flex2 = _interopRequireDefault(_flex); + +var _sizing = __webpack_require__(735); + +var _sizing2 = _interopRequireDefault(_sizing); + +var _gradient = __webpack_require__(736); + +var _gradient2 = _interopRequireDefault(_gradient); + +var _transition = __webpack_require__(737); + +var _transition2 = _interopRequireDefault(_transition); + +var _flexboxIE = __webpack_require__(738); + +var _flexboxIE2 = _interopRequireDefault(_flexboxIE); + +var _flexboxOld = __webpack_require__(739); + +var _flexboxOld2 = _interopRequireDefault(_flexboxOld); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// special flexbox specifications + + +var plugins = [_position2.default, _calc2.default, _cursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, _flex2.default]; + +/** + * Returns a prefixed version of the style object using all vendor prefixes + * @param {Object} styles - Style object that gets prefixed properties added + * @returns {Object} - Style object with prefixed properties and values + */ +function prefixAll(styles) { + Object.keys(styles).forEach(function (property) { + var value = styles[property]; + if (value instanceof Object && !Array.isArray(value)) { + // recurse through nested style objects + styles[property] = prefixAll(value); + } else { + Object.keys(_prefixProps2.default).forEach(function (prefix) { + var properties = _prefixProps2.default[prefix]; + // add prefixes if needed + if (properties[property]) { + styles[prefix + (0, _capitalizeString2.default)(property)] = value; + } + }); + } + }); + + Object.keys(styles).forEach(function (property) { + [].concat(styles[property]).forEach(function (value, index) { + // resolve every special plugins + plugins.forEach(function (plugin) { + return assignStyles(styles, plugin(property, value)); + }); + }); + }); + + return (0, _sortPrefixedStyle2.default)(styles); +} + +function assignStyles(base) { + var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + Object.keys(extend).forEach(function (property) { + var baseValue = base[property]; + if (Array.isArray(baseValue)) { + [].concat(extend[property]).forEach(function (value) { + var valueIndex = baseValue.indexOf(value); + if (valueIndex > -1) { + base[property].splice(valueIndex, 1); + } + base[property].push(value); + }); + } else { + base[property] = extend[property]; + } + }); +} +module.exports = exports['default']; + +/***/ }), +/* 730 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (property) { + return property.match(/^(Webkit|Moz|O|ms)/) !== null; +}; + +module.exports = exports["default"]; + +/***/ }), +/* 731 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = position; +function position(property, value) { + if (property === 'position' && value === 'sticky') { + return { position: ['-webkit-sticky', 'sticky'] }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 732 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = calc; + +var _joinPrefixedValue = __webpack_require__(120); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +var _isPrefixedValue = __webpack_require__(186); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function calc(property, value) { + if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('calc(') > -1) { + return (0, _joinPrefixedValue2.default)(property, value, function (prefix, value) { + return value.replace(/calc\(/g, prefix + 'calc('); + }); + } +} +module.exports = exports['default']; + +/***/ }), +/* 733 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cursor; + +var _joinPrefixedValue = __webpack_require__(120); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { + 'zoom-in': true, + 'zoom-out': true, + grab: true, + grabbing: true +}; + +function cursor(property, value) { + if (property === 'cursor' && values[value]) { + return (0, _joinPrefixedValue2.default)(property, value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 734 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flex; +var values = { flex: true, 'inline-flex': true }; + +function flex(property, value) { + if (property === 'display' && values[value]) { + return { + display: ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value] + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 735 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sizing; + +var _joinPrefixedValue = __webpack_require__(120); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var properties = { + maxHeight: true, + maxWidth: true, + width: true, + height: true, + columnWidth: true, + minWidth: true, + minHeight: true +}; +var values = { + 'min-content': true, + 'max-content': true, + 'fill-available': true, + 'fit-content': true, + 'contain-floats': true +}; + +function sizing(property, value) { + if (properties[property] && values[value]) { + return (0, _joinPrefixedValue2.default)(property, value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 736 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gradient; + +var _joinPrefixedValue = __webpack_require__(120); + +var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue); + +var _isPrefixedValue = __webpack_require__(186); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; + +function gradient(property, value) { + if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.match(values) !== null) { + return (0, _joinPrefixedValue2.default)(property, value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 737 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = transition; + +var _hyphenateStyleName = __webpack_require__(298); + +var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); + +var _capitalizeString = __webpack_require__(185); + +var _capitalizeString2 = _interopRequireDefault(_capitalizeString); + +var _isPrefixedValue = __webpack_require__(186); + +var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue); + +var _prefixProps = __webpack_require__(296); + +var _prefixProps2 = _interopRequireDefault(_prefixProps); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { + transition: true, + transitionProperty: true, + WebkitTransition: true, + WebkitTransitionProperty: true +}; + +function transition(property, value) { + // also check for already prefixed transitions + if (typeof value === 'string' && properties[property]) { + var _ref2; + + var outputValue = prefixValue(value); + var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (value) { + return value.match(/-moz-|-ms-/) === null; + }).join(','); + + // if the property is already prefixed + if (property.indexOf('Webkit') > -1) { + return _defineProperty({}, property, webkitOutput); + } + + return _ref2 = {}, _defineProperty(_ref2, 'Webkit' + (0, _capitalizeString2.default)(property), webkitOutput), _defineProperty(_ref2, property, outputValue), _ref2; + } +} + +function prefixValue(value) { + if ((0, _isPrefixedValue2.default)(value)) { + return value; + } + + // only split multi values, not cubic beziers + var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); + + // iterate each single value and check for transitioned properties + // that need to be prefixed as well + multipleValues.forEach(function (val, index) { + multipleValues[index] = Object.keys(_prefixProps2.default).reduce(function (out, prefix) { + var dashCasePrefix = '-' + prefix.toLowerCase() + '-'; + + Object.keys(_prefixProps2.default[prefix]).forEach(function (prop) { + var dashCaseProperty = (0, _hyphenateStyleName2.default)(prop); + + if (val.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') { + // join all prefixes and create a new value + out = val.replace(dashCaseProperty, dashCasePrefix + dashCaseProperty) + ',' + out; + } + }); + return out; + }, val); + }); + + return multipleValues.join(','); +} +module.exports = exports['default']; + +/***/ }), +/* 738 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxIE; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'distribute', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end' +}; +var alternativeProps = { + alignContent: 'msFlexLinePack', + alignSelf: 'msFlexItemAlign', + alignItems: 'msFlexAlign', + justifyContent: 'msFlexPack', + order: 'msFlexOrder', + flexGrow: 'msFlexPositive', + flexShrink: 'msFlexNegative', + flexBasis: 'msPreferredSize' +}; + +function flexboxIE(property, value) { + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 739 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxOld; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'justify', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + 'wrap-reverse': 'multiple', + wrap: 'multiple' +}; + +var alternativeProps = { + alignItems: 'WebkitBoxAlign', + justifyContent: 'WebkitBoxPack', + flexWrap: 'WebkitBoxLines' +}; + +function flexboxOld(property, value) { + if (property === 'flexDirection' && typeof value === 'string') { + return { + WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', + WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } +} +module.exports = exports['default']; + +/***/ }), +/* 740 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _bowser = __webpack_require__(741); + +var _bowser2 = _interopRequireDefault(_bowser); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var vendorPrefixes = { + Webkit: ['chrome', 'safari', 'ios', 'android', 'phantom', 'opera', 'webos', 'blackberry', 'bada', 'tizen', 'chromium', 'vivaldi'], + Moz: ['firefox', 'seamonkey', 'sailfish'], + ms: ['msie', 'msedge'] +}; +var browsers = { + chrome: [['chrome'], ['chromium']], + safari: [['safari']], + firefox: [['firefox']], + edge: [['msedge']], + opera: [['opera'], ['vivaldi']], + ios_saf: [['ios', 'mobile'], ['ios', 'tablet']], + ie: [['msie']], + op_mini: [['opera', 'mobile'], ['opera', 'tablet']], + and_uc: [['android', 'mobile'], ['android', 'tablet']], + android: [['android', 'mobile'], ['android', 'tablet']] +}; + +var browserByInfo = function browserByInfo(info) { + if (info.firefox) { + return 'firefox'; + } + var name = ''; + + Object.keys(browsers).forEach(function (browser) { + browsers[browser].forEach(function (condition) { + var match = 0; + condition.forEach(function (single) { + if (info[single]) { + match += 1; + } + }); + if (condition.length === match) { + name = browser; + } + }); + }); + + return name; +}; + +/** + * Uses bowser to get default browser information such as version and name + * Evaluates bowser info and adds vendorPrefix information + * @param {string} userAgent - userAgent that gets evaluated + */ + +exports.default = function (userAgent) { + if (!userAgent) { + return false; + } + var info = _bowser2.default._detect(userAgent); + + Object.keys(vendorPrefixes).forEach(function (prefix) { + vendorPrefixes[prefix].forEach(function (browser) { + if (info[browser]) { + info.prefix = { + inline: prefix, + css: '-' + prefix.toLowerCase() + '-' + }; + } + }); + }); + + info.browser = browserByInfo(info); + + // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN + info.version = info.version ? parseFloat(info.version) : parseInt(parseFloat(info.osversion), 10); + info.osversion = parseFloat(info.osversion); + + // iOS forces all browsers to use Safari under the hood + // as the Safari version seems to match the iOS version + // we just explicitely use the osversion instead + // https://github.com/rofrischmann/inline-style-prefixer/issues/72 + if (info.browser === 'ios_saf' && info.version > info.osversion) { + info.version = info.osversion; + info.safari = true; + } + + // seperate native android chrome + // https://github.com/rofrischmann/inline-style-prefixer/issues/45 + if (info.browser === 'android' && info.chrome && info.version > 37) { + info.browser = 'and_chr'; + } + + // For android < 4.4 we want to check the osversion + // not the chrome version, see issue #26 + // https://github.com/rofrischmann/inline-style-prefixer/issues/26 + if (info.browser === 'android' && info.osversion < 5) { + info.version = info.osversion; + } + + return info; +}; + +module.exports = exports['default']; + +/***/ }), +/* 741 */ +/***/ (function(module, exports, __webpack_require__) { + +/*! + * Bowser - a browser detector + * https://github.com/ded/bowser + * MIT License | (c) Dustin Diaz 2015 + */ + +!function (root, name, definition) { + if (typeof module != 'undefined' && module.exports) module.exports = definition() + else if (true) __webpack_require__(742)(name, definition) + else root[name] = definition() +}(this, 'bowser', function () { + /** + * See useragents.js for examples of navigator.userAgent + */ + + var t = true + + function detect(ua) { + + function getFirstMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[1]) || ''; + } + + function getSecondMatch(regex) { + var match = ua.match(regex); + return (match && match.length > 1 && match[2]) || ''; + } + + var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase() + , likeAndroid = /like android/i.test(ua) + , android = !likeAndroid && /android/i.test(ua) + , nexusMobile = /nexus\s*[0-6]\s*/i.test(ua) + , nexusTablet = !nexusMobile && /nexus\s*[0-9]+/i.test(ua) + , chromeos = /CrOS/.test(ua) + , silk = /silk/i.test(ua) + , sailfish = /sailfish/i.test(ua) + , tizen = /tizen/i.test(ua) + , webos = /(web|hpw)os/i.test(ua) + , windowsphone = /windows phone/i.test(ua) + , samsungBrowser = /SamsungBrowser/i.test(ua) + , windows = !windowsphone && /windows/i.test(ua) + , mac = !iosdevice && !silk && /macintosh/i.test(ua) + , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua) + , edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i) + , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i) + , tablet = /tablet/i.test(ua) + , mobile = !tablet && /[^-]mobi/i.test(ua) + , xbox = /xbox/i.test(ua) + , result + + if (/opera/i.test(ua)) { + // an old Opera + result = { + name: 'Opera' + , opera: t + , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i) + } + } else if (/opr|opios/i.test(ua)) { + // a new Opera + result = { + name: 'Opera' + , opera: t + , version: getFirstMatch(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i) || versionIdentifier + } + } + else if (/SamsungBrowser/i.test(ua)) { + result = { + name: 'Samsung Internet for Android' + , samsungBrowser: t + , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/coast/i.test(ua)) { + result = { + name: 'Opera Coast' + , coast: t + , version: versionIdentifier || getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/yabrowser/i.test(ua)) { + result = { + name: 'Yandex Browser' + , yandexbrowser: t + , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i) + } + } + else if (/ucbrowser/i.test(ua)) { + result = { + name: 'UC Browser' + , ucbrowser: t + , version: getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/mxios/i.test(ua)) { + result = { + name: 'Maxthon' + , maxthon: t + , version: getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/epiphany/i.test(ua)) { + result = { + name: 'Epiphany' + , epiphany: t + , version: getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/puffin/i.test(ua)) { + result = { + name: 'Puffin' + , puffin: t + , version: getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i) + } + } + else if (/sleipnir/i.test(ua)) { + result = { + name: 'Sleipnir' + , sleipnir: t + , version: getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/k-meleon/i.test(ua)) { + result = { + name: 'K-Meleon' + , kMeleon: t + , version: getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (windowsphone) { + result = { + name: 'Windows Phone' + , windowsphone: t + } + if (edgeVersion) { + result.msedge = t + result.version = edgeVersion + } + else { + result.msie = t + result.version = getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i) + } + } + else if (/msie|trident/i.test(ua)) { + result = { + name: 'Internet Explorer' + , msie: t + , version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i) + } + } else if (chromeos) { + result = { + name: 'Chrome' + , chromeos: t + , chromeBook: t + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } else if (/chrome.+? edge/i.test(ua)) { + result = { + name: 'Microsoft Edge' + , msedge: t + , version: edgeVersion + } + } + else if (/vivaldi/i.test(ua)) { + result = { + name: 'Vivaldi' + , vivaldi: t + , version: getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i) || versionIdentifier + } + } + else if (sailfish) { + result = { + name: 'Sailfish' + , sailfish: t + , version: getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i) + } + } + else if (/seamonkey\//i.test(ua)) { + result = { + name: 'SeaMonkey' + , seamonkey: t + , version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i) + } + } + else if (/firefox|iceweasel|fxios/i.test(ua)) { + result = { + name: 'Firefox' + , firefox: t + , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i) + } + if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) { + result.firefoxos = t + } + } + else if (silk) { + result = { + name: 'Amazon Silk' + , silk: t + , version : getFirstMatch(/silk\/(\d+(\.\d+)?)/i) + } + } + else if (/phantom/i.test(ua)) { + result = { + name: 'PhantomJS' + , phantom: t + , version: getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i) + } + } + else if (/slimerjs/i.test(ua)) { + result = { + name: 'SlimerJS' + , slimer: t + , version: getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i) + } + } + else if (/blackberry|\bbb\d+/i.test(ua) || /rim\stablet/i.test(ua)) { + result = { + name: 'BlackBerry' + , blackberry: t + , version: versionIdentifier || getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i) + } + } + else if (webos) { + result = { + name: 'WebOS' + , webos: t + , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i) + }; + /touchpad\//i.test(ua) && (result.touchpad = t) + } + else if (/bada/i.test(ua)) { + result = { + name: 'Bada' + , bada: t + , version: getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i) + }; + } + else if (tizen) { + result = { + name: 'Tizen' + , tizen: t + , version: getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || versionIdentifier + }; + } + else if (/qupzilla/i.test(ua)) { + result = { + name: 'QupZilla' + , qupzilla: t + , version: getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || versionIdentifier + } + } + else if (/chromium/i.test(ua)) { + result = { + name: 'Chromium' + , chromium: t + , version: getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || versionIdentifier + } + } + else if (/chrome|crios|crmo/i.test(ua)) { + result = { + name: 'Chrome' + , chrome: t + , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i) + } + } + else if (android) { + result = { + name: 'Android' + , version: versionIdentifier + } + } + else if (/safari|applewebkit/i.test(ua)) { + result = { + name: 'Safari' + , safari: t + } + if (versionIdentifier) { + result.version = versionIdentifier + } + } + else if (iosdevice) { + result = { + name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod' + } + // WTF: version is not part of user agent in web apps + if (versionIdentifier) { + result.version = versionIdentifier + } + } + else if(/googlebot/i.test(ua)) { + result = { + name: 'Googlebot' + , googlebot: t + , version: getFirstMatch(/googlebot\/(\d+(\.\d+))/i) || versionIdentifier + } + } + else { + result = { + name: getFirstMatch(/^(.*)\/(.*) /), + version: getSecondMatch(/^(.*)\/(.*) /) + }; + } + + // set webkit or gecko flag for browsers based on these engines + if (!result.msedge && /(apple)?webkit/i.test(ua)) { + if (/(apple)?webkit\/537\.36/i.test(ua)) { + result.name = result.name || "Blink" + result.blink = t + } else { + result.name = result.name || "Webkit" + result.webkit = t + } + if (!result.version && versionIdentifier) { + result.version = versionIdentifier + } + } else if (!result.opera && /gecko\//i.test(ua)) { + result.name = result.name || "Gecko" + result.gecko = t + result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i) + } + + // set OS flags for platforms that have multiple browsers + if (!result.windowsphone && !result.msedge && (android || result.silk)) { + result.android = t + } else if (!result.windowsphone && !result.msedge && iosdevice) { + result[iosdevice] = t + result.ios = t + } else if (mac) { + result.mac = t + } else if (xbox) { + result.xbox = t + } else if (windows) { + result.windows = t + } else if (linux) { + result.linux = t + } + + // OS version extraction + var osVersion = ''; + if (result.windowsphone) { + osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i); + } else if (iosdevice) { + osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i); + osVersion = osVersion.replace(/[_\s]/g, '.'); + } else if (android) { + osVersion = getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i); + } else if (result.webos) { + osVersion = getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i); + } else if (result.blackberry) { + osVersion = getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i); + } else if (result.bada) { + osVersion = getFirstMatch(/bada\/(\d+(\.\d+)*)/i); + } else if (result.tizen) { + osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i); + } + if (osVersion) { + result.osversion = osVersion; + } + + // device type extraction + var osMajorVersion = osVersion.split('.')[0]; + if ( + tablet + || nexusTablet + || iosdevice == 'ipad' + || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile))) + || result.silk + ) { + result.tablet = t + } else if ( + mobile + || iosdevice == 'iphone' + || iosdevice == 'ipod' + || android + || nexusMobile + || result.blackberry + || result.webos + || result.bada + ) { + result.mobile = t + } + + // Graded Browser Support + // http://developer.yahoo.com/yui/articles/gbs + if (result.msedge || + (result.msie && result.version >= 10) || + (result.yandexbrowser && result.version >= 15) || + (result.vivaldi && result.version >= 1.0) || + (result.chrome && result.version >= 20) || + (result.samsungBrowser && result.version >= 4) || + (result.firefox && result.version >= 20.0) || + (result.safari && result.version >= 6) || + (result.opera && result.version >= 10.0) || + (result.ios && result.osversion && result.osversion.split(".")[0] >= 6) || + (result.blackberry && result.version >= 10.1) + || (result.chromium && result.version >= 20) + ) { + result.a = t; + } + else if ((result.msie && result.version < 10) || + (result.chrome && result.version < 20) || + (result.firefox && result.version < 20.0) || + (result.safari && result.version < 6) || + (result.opera && result.version < 10.0) || + (result.ios && result.osversion && result.osversion.split(".")[0] < 6) + || (result.chromium && result.version < 20) + ) { + result.c = t + } else result.x = t + + return result + } + + var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '') + + bowser.test = function (browserList) { + for (var i = 0; i < browserList.length; ++i) { + var browserItem = browserList[i]; + if (typeof browserItem=== 'string') { + if (browserItem in bowser) { + return true; + } + } + } + return false; + } + + /** + * Get version precisions count + * + * @example + * getVersionPrecision("1.10.3") // 3 + * + * @param {string} version + * @return {number} + */ + function getVersionPrecision(version) { + return version.split(".").length; + } + + /** + * Array::map polyfill + * + * @param {Array} arr + * @param {Function} iterator + * @return {Array} + */ + function map(arr, iterator) { + var result = [], i; + if (Array.prototype.map) { + return Array.prototype.map.call(arr, iterator); + } + for (i = 0; i < arr.length; i++) { + result.push(iterator(arr[i])); + } + return result; + } + + /** + * Calculate browser version weight + * + * @example + * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1 + * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1 + * compareVersions(['1.10.2.1', '1.10.2.1']); // 0 + * compareVersions(['1.10.2.1', '1.0800.2']); // -1 + * + * @param {Array<String>} versions versions to compare + * @return {Number} comparison result + */ + function compareVersions(versions) { + // 1) get common precision for both versions, for example for "10.0" and "9" it should be 2 + var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1])); + var chunks = map(versions, function (version) { + var delta = precision - getVersionPrecision(version); + + // 2) "9" -> "9.0" (for precision = 2) + version = version + new Array(delta + 1).join(".0"); + + // 3) "9.0" -> ["000000000"", "000000009"] + return map(version.split("."), function (chunk) { + return new Array(20 - chunk.length).join("0") + chunk; + }).reverse(); + }); + + // iterate in reverse order by reversed chunks array + while (--precision >= 0) { + // 4) compare: "000000009" > "000000010" = false (but "9" > "10" = true) + if (chunks[0][precision] > chunks[1][precision]) { + return 1; + } + else if (chunks[0][precision] === chunks[1][precision]) { + if (precision === 0) { + // all version chunks are same + return 0; + } + } + else { + return -1; + } + } + } + + /** + * Check if browser is unsupported + * + * @example + * bowser.isUnsupportedBrowser({ + * msie: "10", + * firefox: "23", + * chrome: "29", + * safari: "5.1", + * opera: "16", + * phantom: "534" + * }); + * + * @param {Object} minVersions map of minimal version to browser + * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map + * @param {String} [ua] user agent string + * @return {Boolean} + */ + function isUnsupportedBrowser(minVersions, strictMode, ua) { + var _bowser = bowser; + + // make strictMode param optional with ua param usage + if (typeof strictMode === 'string') { + ua = strictMode; + strictMode = void(0); + } + + if (strictMode === void(0)) { + strictMode = false; + } + if (ua) { + _bowser = detect(ua); + } + + var version = "" + _bowser.version; + for (var browser in minVersions) { + if (minVersions.hasOwnProperty(browser)) { + if (_bowser[browser]) { + if (typeof minVersions[browser] !== 'string') { + throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions)); + } + + // browser version and min supported version. + return compareVersions([version, minVersions[browser]]) < 0; + } + } + } + + return strictMode; // not found + } + + /** + * Check if browser is supported + * + * @param {Object} minVersions map of minimal version to browser + * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map + * @param {String} [ua] user agent string + * @return {Boolean} + */ + function check(minVersions, strictMode, ua) { + return !isUnsupportedBrowser(minVersions, strictMode, ua); + } + + bowser.isUnsupportedBrowser = isUnsupportedBrowser; + bowser.compareVersions = compareVersions; + bowser.check = check; + + /* + * Set our detect method to the main bowser object so we can + * reuse it to test other user agents. + * This is needed to implement future tests. + */ + bowser._detect = detect; + + return bowser +}); + + +/***/ }), +/* 742 */ +/***/ (function(module, exports) { + +module.exports = function() { + throw new Error("define cannot be used indirect"); +}; + + +/***/ }), +/* 743 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (_ref) { + var browser = _ref.browser; + var version = _ref.version; + var prefix = _ref.prefix; + + var prefixedKeyframes = 'keyframes'; + + if (browser === 'chrome' && version < 43 || (browser === 'safari' || browser === 'ios_saf') && version < 9 || browser === 'opera' && version < 30 || browser === 'android' && version <= 4.4 || browser === 'and_uc') { + prefixedKeyframes = prefix.css + prefixedKeyframes; + } + return prefixedKeyframes; +}; + +module.exports = exports['default']; + +/***/ }), +/* 744 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = { "chrome": { "transform": 35, "transformOrigin": 35, "transformOriginX": 35, "transformOriginY": 35, "backfaceVisibility": 35, "perspective": 35, "perspectiveOrigin": 35, "transformStyle": 35, "transformOriginZ": 35, "animation": 42, "animationDelay": 42, "animationDirection": 42, "animationFillMode": 42, "animationDuration": 42, "animationIterationCount": 42, "animationName": 42, "animationPlayState": 42, "animationTimingFunction": 42, "appearance": 55, "userSelect": 55, "fontKerning": 32, "textEmphasisPosition": 55, "textEmphasis": 55, "textEmphasisStyle": 55, "textEmphasisColor": 55, "boxDecorationBreak": 55, "clipPath": 55, "maskImage": 55, "maskMode": 55, "maskRepeat": 55, "maskPosition": 55, "maskClip": 55, "maskOrigin": 55, "maskSize": 55, "maskComposite": 55, "mask": 55, "maskBorderSource": 55, "maskBorderMode": 55, "maskBorderSlice": 55, "maskBorderWidth": 55, "maskBorderOutset": 55, "maskBorderRepeat": 55, "maskBorder": 55, "maskType": 55, "textDecorationStyle": 55, "textDecorationSkip": 55, "textDecorationLine": 55, "textDecorationColor": 55, "filter": 52, "fontFeatureSettings": 47, "breakAfter": 49, "breakBefore": 49, "breakInside": 49, "columnCount": 49, "columnFill": 49, "columnGap": 49, "columnRule": 49, "columnRuleColor": 49, "columnRuleStyle": 49, "columnRuleWidth": 49, "columns": 49, "columnSpan": 49, "columnWidth": 49 }, "safari": { "flex": 8, "flexBasis": 8, "flexDirection": 8, "flexGrow": 8, "flexFlow": 8, "flexShrink": 8, "flexWrap": 8, "alignContent": 8, "alignItems": 8, "alignSelf": 8, "justifyContent": 8, "order": 8, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8, "transformOrigin": 8, "transformOriginX": 8, "transformOriginY": 8, "backfaceVisibility": 8, "perspective": 8, "perspectiveOrigin": 8, "transformStyle": 8, "transformOriginZ": 8, "animation": 8, "animationDelay": 8, "animationDirection": 8, "animationFillMode": 8, "animationDuration": 8, "animationIterationCount": 8, "animationName": 8, "animationPlayState": 8, "animationTimingFunction": 8, "appearance": 10, "userSelect": 10, "backdropFilter": 10, "fontKerning": 9, "scrollSnapType": 10, "scrollSnapPointsX": 10, "scrollSnapPointsY": 10, "scrollSnapDestination": 10, "scrollSnapCoordinate": 10, "textEmphasisPosition": 7, "textEmphasis": 7, "textEmphasisStyle": 7, "textEmphasisColor": 7, "boxDecorationBreak": 10, "clipPath": 10, "maskImage": 10, "maskMode": 10, "maskRepeat": 10, "maskPosition": 10, "maskClip": 10, "maskOrigin": 10, "maskSize": 10, "maskComposite": 10, "mask": 10, "maskBorderSource": 10, "maskBorderMode": 10, "maskBorderSlice": 10, "maskBorderWidth": 10, "maskBorderOutset": 10, "maskBorderRepeat": 10, "maskBorder": 10, "maskType": 10, "textDecorationStyle": 10, "textDecorationSkip": 10, "textDecorationLine": 10, "textDecorationColor": 10, "shapeImageThreshold": 10, "shapeImageMargin": 10, "shapeImageOutside": 10, "filter": 9, "hyphens": 10, "flowInto": 10, "flowFrom": 10, "breakBefore": 8, "breakAfter": 8, "breakInside": 8, "regionFragment": 10, "columnCount": 8, "columnFill": 8, "columnGap": 8, "columnRule": 8, "columnRuleColor": 8, "columnRuleStyle": 8, "columnRuleWidth": 8, "columns": 8, "columnSpan": 8, "columnWidth": 8 }, "firefox": { "appearance": 51, "userSelect": 51, "boxSizing": 28, "textAlignLast": 48, "textDecorationStyle": 35, "textDecorationSkip": 35, "textDecorationLine": 35, "textDecorationColor": 35, "tabSize": 51, "hyphens": 42, "fontFeatureSettings": 33, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "opera": { "flex": 16, "flexBasis": 16, "flexDirection": 16, "flexGrow": 16, "flexFlow": 16, "flexShrink": 16, "flexWrap": 16, "alignContent": 16, "alignItems": 16, "alignSelf": 16, "justifyContent": 16, "order": 16, "transform": 22, "transformOrigin": 22, "transformOriginX": 22, "transformOriginY": 22, "backfaceVisibility": 22, "perspective": 22, "perspectiveOrigin": 22, "transformStyle": 22, "transformOriginZ": 22, "animation": 29, "animationDelay": 29, "animationDirection": 29, "animationFillMode": 29, "animationDuration": 29, "animationIterationCount": 29, "animationName": 29, "animationPlayState": 29, "animationTimingFunction": 29, "appearance": 41, "userSelect": 41, "fontKerning": 19, "textEmphasisPosition": 41, "textEmphasis": 41, "textEmphasisStyle": 41, "textEmphasisColor": 41, "boxDecorationBreak": 41, "clipPath": 41, "maskImage": 41, "maskMode": 41, "maskRepeat": 41, "maskPosition": 41, "maskClip": 41, "maskOrigin": 41, "maskSize": 41, "maskComposite": 41, "mask": 41, "maskBorderSource": 41, "maskBorderMode": 41, "maskBorderSlice": 41, "maskBorderWidth": 41, "maskBorderOutset": 41, "maskBorderRepeat": 41, "maskBorder": 41, "maskType": 41, "textDecorationStyle": 41, "textDecorationSkip": 41, "textDecorationLine": 41, "textDecorationColor": 41, "filter": 39, "fontFeatureSettings": 34, "breakAfter": 36, "breakBefore": 36, "breakInside": 36, "columnCount": 36, "columnFill": 36, "columnGap": 36, "columnRule": 36, "columnRuleColor": 36, "columnRuleStyle": 36, "columnRuleWidth": 36, "columns": 36, "columnSpan": 36, "columnWidth": 36 }, "ie": { "flex": 10, "flexDirection": 10, "flexFlow": 10, "flexWrap": 10, "transform": 9, "transformOrigin": 9, "transformOriginX": 9, "transformOriginY": 9, "userSelect": 11, "wrapFlow": 11, "wrapThrough": 11, "wrapMargin": 11, "scrollSnapType": 11, "scrollSnapPointsX": 11, "scrollSnapPointsY": 11, "scrollSnapDestination": 11, "scrollSnapCoordinate": 11, "touchAction": 10, "hyphens": 11, "flowInto": 11, "flowFrom": 11, "breakBefore": 11, "breakAfter": 11, "breakInside": 11, "regionFragment": 11, "gridTemplateColumns": 11, "gridTemplateRows": 11, "gridTemplateAreas": 11, "gridTemplate": 11, "gridAutoColumns": 11, "gridAutoRows": 11, "gridAutoFlow": 11, "grid": 11, "gridRowStart": 11, "gridColumnStart": 11, "gridRowEnd": 11, "gridRow": 11, "gridColumn": 11, "gridColumnEnd": 11, "gridColumnGap": 11, "gridRowGap": 11, "gridArea": 11, "gridGap": 11, "textSizeAdjust": 11 }, "edge": { "userSelect": 14, "wrapFlow": 14, "wrapThrough": 14, "wrapMargin": 14, "scrollSnapType": 14, "scrollSnapPointsX": 14, "scrollSnapPointsY": 14, "scrollSnapDestination": 14, "scrollSnapCoordinate": 14, "hyphens": 14, "flowInto": 14, "flowFrom": 14, "breakBefore": 14, "breakAfter": 14, "breakInside": 14, "regionFragment": 14, "gridTemplateColumns": 14, "gridTemplateRows": 14, "gridTemplateAreas": 14, "gridTemplate": 14, "gridAutoColumns": 14, "gridAutoRows": 14, "gridAutoFlow": 14, "grid": 14, "gridRowStart": 14, "gridColumnStart": 14, "gridRowEnd": 14, "gridRow": 14, "gridColumn": 14, "gridColumnEnd": 14, "gridColumnGap": 14, "gridRowGap": 14, "gridArea": 14, "gridGap": 14 }, "ios_saf": { "flex": 8.1, "flexBasis": 8.1, "flexDirection": 8.1, "flexGrow": 8.1, "flexFlow": 8.1, "flexShrink": 8.1, "flexWrap": 8.1, "alignContent": 8.1, "alignItems": 8.1, "alignSelf": 8.1, "justifyContent": 8.1, "order": 8.1, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8.1, "transformOrigin": 8.1, "transformOriginX": 8.1, "transformOriginY": 8.1, "backfaceVisibility": 8.1, "perspective": 8.1, "perspectiveOrigin": 8.1, "transformStyle": 8.1, "transformOriginZ": 8.1, "animation": 8.1, "animationDelay": 8.1, "animationDirection": 8.1, "animationFillMode": 8.1, "animationDuration": 8.1, "animationIterationCount": 8.1, "animationName": 8.1, "animationPlayState": 8.1, "animationTimingFunction": 8.1, "appearance": 9.3, "userSelect": 9.3, "backdropFilter": 9.3, "fontKerning": 9.3, "scrollSnapType": 9.3, "scrollSnapPointsX": 9.3, "scrollSnapPointsY": 9.3, "scrollSnapDestination": 9.3, "scrollSnapCoordinate": 9.3, "boxDecorationBreak": 9.3, "clipPath": 9.3, "maskImage": 9.3, "maskMode": 9.3, "maskRepeat": 9.3, "maskPosition": 9.3, "maskClip": 9.3, "maskOrigin": 9.3, "maskSize": 9.3, "maskComposite": 9.3, "mask": 9.3, "maskBorderSource": 9.3, "maskBorderMode": 9.3, "maskBorderSlice": 9.3, "maskBorderWidth": 9.3, "maskBorderOutset": 9.3, "maskBorderRepeat": 9.3, "maskBorder": 9.3, "maskType": 9.3, "textSizeAdjust": 9.3, "textDecorationStyle": 9.3, "textDecorationSkip": 9.3, "textDecorationLine": 9.3, "textDecorationColor": 9.3, "shapeImageThreshold": 9.3, "shapeImageMargin": 9.3, "shapeImageOutside": 9.3, "filter": 9, "hyphens": 9.3, "flowInto": 9.3, "flowFrom": 9.3, "breakBefore": 8.1, "breakAfter": 8.1, "breakInside": 8.1, "regionFragment": 9.3, "columnCount": 8.1, "columnFill": 8.1, "columnGap": 8.1, "columnRule": 8.1, "columnRuleColor": 8.1, "columnRuleStyle": 8.1, "columnRuleWidth": 8.1, "columns": 8.1, "columnSpan": 8.1, "columnWidth": 8.1 }, "android": { "flex": 4.2, "flexBasis": 4.2, "flexDirection": 4.2, "flexGrow": 4.2, "flexFlow": 4.2, "flexShrink": 4.2, "flexWrap": 4.2, "alignContent": 4.2, "alignItems": 4.2, "alignSelf": 4.2, "justifyContent": 4.2, "order": 4.2, "transition": 4.2, "transitionDelay": 4.2, "transitionDuration": 4.2, "transitionProperty": 4.2, "transitionTimingFunction": 4.2, "transform": 4.4, "transformOrigin": 4.4, "transformOriginX": 4.4, "transformOriginY": 4.4, "backfaceVisibility": 4.4, "perspective": 4.4, "perspectiveOrigin": 4.4, "transformStyle": 4.4, "transformOriginZ": 4.4, "animation": 4.4, "animationDelay": 4.4, "animationDirection": 4.4, "animationFillMode": 4.4, "animationDuration": 4.4, "animationIterationCount": 4.4, "animationName": 4.4, "animationPlayState": 4.4, "animationTimingFunction": 4.4, "appearance": 51, "userSelect": 51, "fontKerning": 4.4, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "filter": 51, "fontFeatureSettings": 4.4, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "and_chr": { "appearance": 51, "userSelect": 51, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "textDecorationStyle": 51, "textDecorationSkip": 51, "textDecorationLine": 51, "textDecorationColor": 51, "filter": 51 }, "and_uc": { "flex": 9.9, "flexBasis": 9.9, "flexDirection": 9.9, "flexGrow": 9.9, "flexFlow": 9.9, "flexShrink": 9.9, "flexWrap": 9.9, "alignContent": 9.9, "alignItems": 9.9, "alignSelf": 9.9, "justifyContent": 9.9, "order": 9.9, "transition": 9.9, "transitionDelay": 9.9, "transitionDuration": 9.9, "transitionProperty": 9.9, "transitionTimingFunction": 9.9, "transform": 9.9, "transformOrigin": 9.9, "transformOriginX": 9.9, "transformOriginY": 9.9, "backfaceVisibility": 9.9, "perspective": 9.9, "perspectiveOrigin": 9.9, "transformStyle": 9.9, "transformOriginZ": 9.9, "animation": 9.9, "animationDelay": 9.9, "animationDirection": 9.9, "animationFillMode": 9.9, "animationDuration": 9.9, "animationIterationCount": 9.9, "animationName": 9.9, "animationPlayState": 9.9, "animationTimingFunction": 9.9, "appearance": 9.9, "userSelect": 9.9, "fontKerning": 9.9, "textEmphasisPosition": 9.9, "textEmphasis": 9.9, "textEmphasisStyle": 9.9, "textEmphasisColor": 9.9, "maskImage": 9.9, "maskMode": 9.9, "maskRepeat": 9.9, "maskPosition": 9.9, "maskClip": 9.9, "maskOrigin": 9.9, "maskSize": 9.9, "maskComposite": 9.9, "mask": 9.9, "maskBorderSource": 9.9, "maskBorderMode": 9.9, "maskBorderSlice": 9.9, "maskBorderWidth": 9.9, "maskBorderOutset": 9.9, "maskBorderRepeat": 9.9, "maskBorder": 9.9, "maskType": 9.9, "textSizeAdjust": 9.9, "filter": 9.9, "hyphens": 9.9, "flowInto": 9.9, "flowFrom": 9.9, "breakBefore": 9.9, "breakAfter": 9.9, "breakInside": 9.9, "regionFragment": 9.9, "fontFeatureSettings": 9.9, "columnCount": 9.9, "columnFill": 9.9, "columnGap": 9.9, "columnRule": 9.9, "columnRuleColor": 9.9, "columnRuleStyle": 9.9, "columnRuleWidth": 9.9, "columns": 9.9, "columnSpan": 9.9, "columnWidth": 9.9 }, "op_mini": {} }; +module.exports = exports["default"]; + +/***/ }), +/* 745 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = position; + +var _getPrefixedValue = __webpack_require__(39); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function position(_ref) { + var property = _ref.property; + var value = _ref.value; + var browser = _ref.browserInfo.browser; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'position' && value === 'sticky' && (browser === 'safari' || browser === 'ios_saf')) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 746 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = calc; + +var _getPrefixedValue = __webpack_require__(39); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function calc(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (typeof value === 'string' && value.indexOf('calc(') > -1 && (browser === 'firefox' && version < 15 || browser === 'chrome' && version < 25 || browser === 'safari' && version < 6.1 || browser === 'ios_saf' && version < 7)) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(value.replace(/calc\(/g, css + 'calc('), value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 747 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = zoomCursor; + +var _getPrefixedValue = __webpack_require__(39); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { 'zoom-in': true, 'zoom-out': true }; + +function zoomCursor(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'cursor' && values[value] && (browser === 'firefox' && version < 24 || browser === 'chrome' && version < 37 || browser === 'safari' && version < 9 || browser === 'opera' && version < 24)) { + return { + cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 748 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = grabCursor; + +var _getPrefixedValue = __webpack_require__(39); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { grab: true, grabbing: true }; + +function grabCursor(_ref) { + var property = _ref.property; + var value = _ref.value; + var browser = _ref.browserInfo.browser; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + // adds prefixes for firefox, chrome, safari, and opera regardless of version until a reliable brwoser support info can be found (see: https://github.com/rofrischmann/inline-style-prefixer/issues/79) + if (property === 'cursor' && values[value] && (browser === 'firefox' || browser === 'chrome' || browser === 'safari' || browser === 'opera')) { + return { + cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 749 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flex; + +var _getPrefixedValue = __webpack_require__(39); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var values = { flex: true, 'inline-flex': true }; + +function flex(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (property === 'display' && values[value] && (browser === 'chrome' && version < 29 && version > 20 || (browser === 'safari' || browser === 'ios_saf') && version < 9 && version > 6 || browser === 'opera' && (version == 15 || version == 16))) { + return { + display: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed) + }; + } +} +module.exports = exports['default']; + +/***/ }), +/* 750 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = sizing; + +var _getPrefixedValue = __webpack_require__(39); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { + maxHeight: true, + maxWidth: true, + width: true, + height: true, + columnWidth: true, + minWidth: true, + minHeight: true +}; +var values = { + 'min-content': true, + 'max-content': true, + 'fill-available': true, + 'fit-content': true, + 'contain-floats': true +}; + +function sizing(_ref) { + var property = _ref.property; + var value = _ref.value; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + // This might change in the future + // Keep an eye on it + if (properties[property] && values[value]) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 751 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gradient; + +var _getPrefixedValue = __webpack_require__(39); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/; + +function gradient(_ref) { + var property = _ref.property; + var value = _ref.value; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if (typeof value === 'string' && value.match(values) !== null && (browser === 'firefox' && version < 16 || browser === 'chrome' && version < 26 || (browser === 'safari' || browser === 'ios_saf') && version < 7 || (browser === 'opera' || browser === 'op_mini') && version < 12.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { + return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)); + } +} +module.exports = exports['default']; + +/***/ }), +/* 752 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + +exports.default = transition; + +var _hyphenateStyleName = __webpack_require__(298); + +var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName); + +var _unprefixProperty = __webpack_require__(753); + +var _unprefixProperty2 = _interopRequireDefault(_unprefixProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var properties = { transition: true, transitionProperty: true }; + +function transition(_ref) { + var property = _ref.property; + var value = _ref.value; + var css = _ref.prefix.css; + var requiresPrefix = _ref.requiresPrefix; + var keepUnprefixed = _ref.keepUnprefixed; + + // also check for already prefixed transitions + var unprefixedProperty = (0, _unprefixProperty2.default)(property); + + if (typeof value === 'string' && properties[unprefixedProperty]) { + var _ret = function () { + // TODO: memoize this array + var requiresPrefixDashCased = Object.keys(requiresPrefix).map(function (prop) { + return (0, _hyphenateStyleName2.default)(prop); + }); + + // only split multi values, not cubic beziers + var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g); + + requiresPrefixDashCased.forEach(function (prop) { + multipleValues.forEach(function (val, index) { + if (val.indexOf(prop) > -1 && prop !== 'order') { + multipleValues[index] = val.replace(prop, css + prop) + (keepUnprefixed ? ',' + val : ''); + } + }); + }); + + return { + v: _defineProperty({}, property, multipleValues.join(',')) + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } +} +module.exports = exports['default']; + +/***/ }), +/* 753 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (property) { + var unprefixed = property.replace(/^(ms|Webkit|Moz|O)/, ''); + return unprefixed.charAt(0).toLowerCase() + unprefixed.slice(1); +}; + +module.exports = exports['default']; + +/***/ }), +/* 754 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxIE; + +var _getPrefixedValue = __webpack_require__(39); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'distribute', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + flex: 'flexbox', + 'inline-flex': 'inline-flexbox' +}; +var alternativeProps = { + alignContent: 'msFlexLinePack', + alignSelf: 'msFlexItemAlign', + alignItems: 'msFlexAlign', + justifyContent: 'msFlexPack', + order: 'msFlexOrder', + flexGrow: 'msFlexPositive', + flexShrink: 'msFlexNegative', + flexBasis: 'msPreferredSize' +}; + +function flexboxIE(_ref) { + var property = _ref.property; + var value = _ref.value; + var styles = _ref.styles; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if ((alternativeProps[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'ie_mob' || browser === 'ie') && version == 10) { + if (!keepUnprefixed && !Array.isArray(styles[property])) { + delete styles[property]; + } + if (property === 'display' && alternativeValues[value]) { + return { + display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } + } +} +module.exports = exports['default']; + +/***/ }), +/* 755 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = flexboxOld; + +var _getPrefixedValue = __webpack_require__(39); + +var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var alternativeValues = { + 'space-around': 'justify', + 'space-between': 'justify', + 'flex-start': 'start', + 'flex-end': 'end', + 'wrap-reverse': 'multiple', + wrap: 'multiple', + flex: 'box', + 'inline-flex': 'inline-box' +}; + +var alternativeProps = { + alignItems: 'WebkitBoxAlign', + justifyContent: 'WebkitBoxPack', + flexWrap: 'WebkitBoxLines' +}; + +var otherProps = ['alignContent', 'alignSelf', 'order', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection']; +var properties = Object.keys(alternativeProps).concat(otherProps); + +function flexboxOld(_ref) { + var property = _ref.property; + var value = _ref.value; + var styles = _ref.styles; + var _ref$browserInfo = _ref.browserInfo; + var browser = _ref$browserInfo.browser; + var version = _ref$browserInfo.version; + var css = _ref.prefix.css; + var keepUnprefixed = _ref.keepUnprefixed; + + if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'firefox' && version < 22 || browser === 'chrome' && version < 21 || (browser === 'safari' || browser === 'ios_saf') && version <= 6.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) { + if (!keepUnprefixed && !Array.isArray(styles[property])) { + delete styles[property]; + } + if (property === 'flexDirection' && typeof value === 'string') { + return { + WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal', + WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal' + }; + } + if (property === 'display' && alternativeValues[value]) { + return { + display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed) + }; + } + if (alternativeProps[property]) { + return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value); + } + } +} +module.exports = exports['default']; + +/***/ }), +/* 756 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = callOnce; + +var _warning = __webpack_require__(24); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var CALLED_ONCE = 'muiPrepared'; + +function callOnce() { + if (process.env.NODE_ENV !== 'production') { + return function (style) { + if (style[CALLED_ONCE]) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: You cannot call prepareStyles() on the same style object more than once.') : void 0; + } + style[CALLED_ONCE] = true; + return style; + }; + } +} +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 757 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(51); + +var _keys2 = _interopRequireDefault(_keys); + +exports.default = rtl; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var reTranslate = /((^|\s)translate(3d|X)?\()(\-?[\d]+)/; +var reSkew = /((^|\s)skew(x|y)?\()\s*(\-?[\d]+)(deg|rad|grad)(,\s*(\-?[\d]+)(deg|rad|grad))?/; + +/** + * This function ensures that `style` supports both ltr and rtl directions by + * checking `styleConstants` in `muiTheme` and replacing attribute keys if + * necessary. + */ +function rtl(muiTheme) { + if (muiTheme.isRtl) { + return function (style) { + if (style.directionInvariant === true) { + return style; + } + + var flippedAttributes = { + // Keys and their replacements. + right: 'left', + left: 'right', + marginRight: 'marginLeft', + marginLeft: 'marginRight', + paddingRight: 'paddingLeft', + paddingLeft: 'paddingRight', + borderRight: 'borderLeft', + borderLeft: 'borderRight' + }; + + var newStyle = {}; + + (0, _keys2.default)(style).forEach(function (attribute) { + var value = style[attribute]; + var key = attribute; + + if (flippedAttributes.hasOwnProperty(attribute)) { + key = flippedAttributes[attribute]; + } + + switch (attribute) { + case 'float': + case 'textAlign': + if (value === 'right') { + value = 'left'; + } else if (value === 'left') { + value = 'right'; + } + break; + + case 'direction': + if (value === 'ltr') { + value = 'rtl'; + } else if (value === 'rtl') { + value = 'ltr'; + } + break; + + case 'transform': + if (!value) break; + var matches = void 0; + if (matches = value.match(reTranslate)) { + value = value.replace(matches[0], matches[1] + -parseFloat(matches[4])); + } + if (matches = value.match(reSkew)) { + value = value.replace(matches[0], matches[1] + -parseFloat(matches[4]) + matches[5] + matches[6] ? ', ' + (-parseFloat(matches[7]) + matches[8]) : ''); + } + break; + + case 'transformOrigin': + if (!value) break; + if (value.indexOf('right') > -1) { + value = value.replace('right', 'left'); + } else if (value.indexOf('left') > -1) { + value = value.replace('left', 'right'); + } + break; + } + + newStyle[key] = value; + }); + + return newStyle; + }; + } +} + +/***/ }), +/* 758 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = compose; +function compose() { + for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(undefined, arguments)); + }; + }); +} + +/***/ }), +/* 759 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.zIndex = exports.typography = exports.transitions = exports.spacing = exports.muiThemeable = exports.getMuiTheme = exports.LightRawTheme = exports.lightBaseTheme = exports.DarkRawTheme = exports.darkBaseTheme = exports.colors = exports.MuiThemeProvider = undefined; + +var _MuiThemeProvider2 = __webpack_require__(760); + +var _MuiThemeProvider3 = _interopRequireDefault(_MuiThemeProvider2); + +var _colors2 = __webpack_require__(58); + +var _colors = _interopRequireWildcard(_colors2); + +var _darkBaseTheme2 = __webpack_require__(761); + +var _darkBaseTheme3 = _interopRequireDefault(_darkBaseTheme2); + +var _lightBaseTheme2 = __webpack_require__(294); + +var _lightBaseTheme3 = _interopRequireDefault(_lightBaseTheme2); + +var _getMuiTheme2 = __webpack_require__(119); + +var _getMuiTheme3 = _interopRequireDefault(_getMuiTheme2); + +var _muiThemeable2 = __webpack_require__(762); + +var _muiThemeable3 = _interopRequireDefault(_muiThemeable2); + +var _spacing2 = __webpack_require__(184); + +var _spacing3 = _interopRequireDefault(_spacing2); + +var _transitions2 = __webpack_require__(12); + +var _transitions3 = _interopRequireDefault(_transitions2); + +var _typography2 = __webpack_require__(299); + +var _typography3 = _interopRequireDefault(_typography2); + +var _zIndex2 = __webpack_require__(295); + +var _zIndex3 = _interopRequireDefault(_zIndex2); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.MuiThemeProvider = _MuiThemeProvider3.default; +exports.colors = _colors; +exports.darkBaseTheme = _darkBaseTheme3.default; +exports.DarkRawTheme = _darkBaseTheme3.default; +exports.lightBaseTheme = _lightBaseTheme3.default; +exports.LightRawTheme = _lightBaseTheme3.default; +exports.getMuiTheme = _getMuiTheme3.default; +exports.muiThemeable = _muiThemeable3.default; +exports.spacing = _spacing3.default; +exports.transitions = _transitions3.default; +exports.typography = _typography3.default; +exports.zIndex = _zIndex3.default; + +/***/ }), +/* 760 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var _getMuiTheme = __webpack_require__(119); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MuiThemeProvider = function (_Component) { + (0, _inherits3.default)(MuiThemeProvider, _Component); + + function MuiThemeProvider() { + (0, _classCallCheck3.default)(this, MuiThemeProvider); + return (0, _possibleConstructorReturn3.default)(this, (MuiThemeProvider.__proto__ || (0, _getPrototypeOf2.default)(MuiThemeProvider)).apply(this, arguments)); + } + + (0, _createClass3.default)(MuiThemeProvider, [{ + key: 'getChildContext', + value: function getChildContext() { + return { + muiTheme: this.props.muiTheme || (0, _getMuiTheme2.default)() + }; + } + }, { + key: 'render', + value: function render() { + return this.props.children; + } + }]); + return MuiThemeProvider; +}(_react.Component); + +MuiThemeProvider.childContextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? MuiThemeProvider.propTypes = { + children: _react.PropTypes.element, + muiTheme: _react.PropTypes.object +} : void 0; +exports.default = MuiThemeProvider; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 761 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _colors = __webpack_require__(58); + +var _colorManipulator = __webpack_require__(70); + +var _spacing = __webpack_require__(184); + +var _spacing2 = _interopRequireDefault(_spacing); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = { + spacing: _spacing2.default, + fontFamily: 'Roboto, sans-serif', + palette: { + primary1Color: _colors.cyan700, + primary2Color: _colors.cyan700, + primary3Color: _colors.grey600, + accent1Color: _colors.pinkA200, + accent2Color: _colors.pinkA400, + accent3Color: _colors.pinkA100, + textColor: _colors.fullWhite, + secondaryTextColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.7), + alternateTextColor: '#303030', + canvasColor: '#303030', + borderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), + disabledColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3), + pickerHeaderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12), + clockCircleColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12) + } +}; + +/***/ }), +/* 762 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +exports.default = muiThemeable; + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _getMuiTheme = __webpack_require__(119); + +var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DEFAULT_THEME = void 0; + +function getDefaultTheme() { + if (!DEFAULT_THEME) { + DEFAULT_THEME = (0, _getMuiTheme2.default)(); + } + return DEFAULT_THEME; +} + +function muiThemeable() { + return function (Component) { + var MuiComponent = function MuiComponent(props, context) { + var _context$muiTheme = context.muiTheme, + muiTheme = _context$muiTheme === undefined ? getDefaultTheme() : _context$muiTheme; + + + return _react2.default.createElement(Component, (0, _extends3.default)({ muiTheme: muiTheme }, props)); + }; + + MuiComponent.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired + }; + + return MuiComponent; + }; +} + +/***/ }), +/* 763 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _assign = __webpack_require__(96); + +var _assign2 = _interopRequireDefault(_assign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reduxForm = __webpack_require__(159); + +var _reactRedux = __webpack_require__(36); + +var _RaisedButton = __webpack_require__(180); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _reduxFormMaterialUi = __webpack_require__(181); + +var _Styles = __webpack_require__(118); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _FormValidators = __webpack_require__(187); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Menus = __webpack_require__(84); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var defaultValues = { + autoCheckout: false, + autoPay: false, + strictSize: true, + hideSoldOut: false, + captchaBypass: false, + addToCartDelay: 200, + checkoutDelay: 2000 +}; + +var Options = function Options(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'options-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'autoCheckout', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable auto checkout', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'autoPay', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable auto payment', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'strictSize', + component: _reduxFormMaterialUi.Toggle, + label: 'Enable strict size checking', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'hideSoldOut', + component: _reduxFormMaterialUi.Toggle, + label: 'Hide sold out products', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'captchaBypass', + component: _reduxFormMaterialUi.Toggle, + label: 'Bypass captcha (beta)', + style: _Styles2.default.fields.text + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'addToCartDelay', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Add to cart delay (ms)', + hintText: 'Add to cart delay (ms)', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'checkoutDelay', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Checkout delay (ms)', + hintText: 'Checkout delay (ms)', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'maxPrice', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Maximum product price', + hintText: 'Maximum product price', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_reduxForm.Field, { + name: 'minPrice', + component: _reduxFormMaterialUi.TextField, + floatingLabelText: 'Minimum product price', + hintText: 'Minimum product price', + style: _Styles2.default.fields.text, + validate: [Validators.required, Validators.number] + }) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; + +function mapStateToProps(state, ownProps) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + initialValues: (0, _assign2.default)({}, defaultValues, (settings[ownProps.shop] || {})[menus.MENU_OPTIONS] || {}) + }; +} + +Options.propTypes = { + shop: _react.PropTypes.string.isRequired +}; + +exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({ + form: 'options' +})(Options)); + +/***/ }), +/* 764 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _reduxForm = __webpack_require__(159); + +var _reactRedux = __webpack_require__(36); + +var _MenuItem = __webpack_require__(116); + +var _MenuItem2 = _interopRequireDefault(_MenuItem); + +var _RaisedButton = __webpack_require__(180); + +var _RaisedButton2 = _interopRequireDefault(_RaisedButton); + +var _reduxFormMaterialUi = __webpack_require__(181); + +var _Styles = __webpack_require__(118); + +var _Styles2 = _interopRequireDefault(_Styles); + +var _Utils = __webpack_require__(300); + +var Utils = _interopRequireWildcard(_Utils); + +var _FormValidators = __webpack_require__(187); + +var Validators = _interopRequireWildcard(_FormValidators); + +var _Menus = __webpack_require__(84); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Sizes = function Sizes(props) { + var handleSubmit = props.handleSubmit, + pristine = props.pristine, + submitting = props.submitting; + + return _react2.default.createElement( + 'form', + { onSubmit: handleSubmit, id: 'biling-form' }, + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'accessories', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Accessories', + hintText: 'Accessories', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 't-shirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'T-Shirts', + hintText: 'T-Shirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'pants', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Pants', + hintText: 'Pants', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizesPants.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shorts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shorts', + hintText: 'Shorts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizesPants.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'sweatshirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Sweatshirts', + hintText: 'Sweatshirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'tops-sweaters', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Tops/Sweaters', + hintText: 'Tops/Sweaters', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shirts', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shirts', + hintText: 'Shirts', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'jackets', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Jackets', + hintText: 'Jackets', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.sizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement( + _reduxForm.Field, + { + name: 'shoes', + component: _reduxFormMaterialUi.SelectField, + floatingLabelText: 'Shoes', + hintText: 'Shoes', + style: _Styles2.default.fields.text, + validate: [Validators.required] + }, + Utils.shoeSizes.map(function (x) { + return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x }); + }) + ) + ), + _react2.default.createElement( + 'div', + null, + _react2.default.createElement(_RaisedButton2.default, { + label: 'Save', + disabled: pristine || submitting, + type: 'submit' + }) + ) + ); +}; + +Sizes.propTypes = { + shop: _react.PropTypes.string.isRequired +}; + +function mapStateToProps(state, ownProps) { + var currentProfile = state.profiles.currentProfile; + var settings = state.profiles.profiles.filter(function (x) { + return x.name === currentProfile; + })[0].settings; + return { + initialValues: (settings[ownProps.shop] || {})[menus.MENU_SIZES] || {} + }; +} + +exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({ + form: 'sizes' +})(Sizes)); + +/***/ }), +/* 765 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _assign = __webpack_require__(96); + +var _assign2 = _interopRequireDefault(_assign); + +exports.default = Layout; + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _AppBar = __webpack_require__(766); + +var _AppBar2 = _interopRequireDefault(_AppBar); + +var _Tabs = __webpack_require__(769); + +var _Tabs2 = _interopRequireDefault(_Tabs); + +var _Paper = __webpack_require__(37); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _Styles = __webpack_require__(118); + +var _Styles2 = _interopRequireDefault(_Styles); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function Layout(props) { + var children = props.children, + title = props.title, + contentStyle = props.contentStyle, + tabs = props.tabs, + currentTab = props.currentTab; + + + var appBarStyles = (0, _assign2.default)({}, _Styles2.default.appBar); + + if (tabs) { + appBarStyles.marginBottom = 64; + } + + return _react2.default.createElement( + 'div', + { style: _Styles2.default.container }, + _react2.default.createElement( + _AppBar2.default, + { title: title, showMenuIconButton: false, style: appBarStyles }, + tabs && _react2.default.createElement( + 'div', + { style: { width: '100%' } }, + _react2.default.createElement( + _Tabs2.default, + { style: _Styles2.default.tabs, value: currentTab }, + tabs + ) + ) + ), + _react2.default.createElement( + 'div', + { style: { width: '100%' } }, + _react2.default.createElement( + 'div', + { style: (0, _assign2.default)({}, _Styles2.default.content, contentStyle) }, + _react2.default.createElement( + _Paper2.default, + { style: _Styles2.default.paper }, + children + ) + ) + ) + ); +} + +Layout.propTypes = { + children: _react.PropTypes.node, + title: _react.PropTypes.string.isRequired, + contentStyle: _react.PropTypes.object, + tabs: _react.PropTypes.arrayOf(_react.PropTypes.node), + currentTab: _react.PropTypes.any +}; + +/***/ }), +/* 766 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = undefined; + +var _AppBar = __webpack_require__(767); + +var _AppBar2 = _interopRequireDefault(_AppBar); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _AppBar2.default; + +/***/ }), +/* 767 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _keys = __webpack_require__(51); + +var _keys2 = _interopRequireDefault(_keys); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +exports.getStyles = getStyles; + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _IconButton = __webpack_require__(83); + +var _IconButton2 = _interopRequireDefault(_IconButton); + +var _menu = __webpack_require__(768); + +var _menu2 = _interopRequireDefault(_menu); + +var _Paper = __webpack_require__(37); + +var _Paper2 = _interopRequireDefault(_Paper); + +var _propTypes = __webpack_require__(43); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _warning = __webpack_require__(24); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var _context$muiTheme = context.muiTheme, + appBar = _context$muiTheme.appBar, + iconButtonSize = _context$muiTheme.button.iconButtonSize, + zIndex = _context$muiTheme.zIndex; + + + var flatButtonSize = 36; + + var styles = { + root: { + position: 'relative', + zIndex: zIndex.appBar, + width: '100%', + display: 'flex', + backgroundColor: appBar.color, + paddingLeft: appBar.padding, + paddingRight: appBar.padding + }, + title: { + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', + margin: 0, + paddingTop: 0, + letterSpacing: 0, + fontSize: 24, + fontWeight: appBar.titleFontWeight, + color: appBar.textColor, + height: appBar.height, + lineHeight: appBar.height + 'px' + }, + mainElement: { + boxFlex: 1, + flex: '1' + }, + iconButtonStyle: { + marginTop: (appBar.height - iconButtonSize) / 2, + marginRight: 8, + marginLeft: -16 + }, + iconButtonIconStyle: { + fill: appBar.textColor, + color: appBar.textColor + }, + flatButton: { + color: appBar.textColor, + marginTop: (iconButtonSize - flatButtonSize) / 2 + 1 + } + }; + + return styles; +} + +var AppBar = function (_Component) { + (0, _inherits3.default)(AppBar, _Component); + + function AppBar() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, AppBar); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AppBar.__proto__ || (0, _getPrototypeOf2.default)(AppBar)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapLeftIconButton = function (event) { + if (_this.props.onLeftIconButtonTouchTap) { + _this.props.onLeftIconButtonTouchTap(event); + } + }, _this.handleTouchTapRightIconButton = function (event) { + if (_this.props.onRightIconButtonTouchTap) { + _this.props.onRightIconButtonTouchTap(event); + } + }, _this.handleTitleTouchTap = function (event) { + if (_this.props.onTitleTouchTap) { + _this.props.onTitleTouchTap(event); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(AppBar, [{ + key: 'componentDidMount', + value: function componentDidMount() { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(!this.props.iconElementLeft || !this.props.iconClassNameLeft, 'Material-UI: Properties iconElementLeft\n and iconClassNameLeft cannot be simultaneously defined. Please use one or the other.') : void 0; + + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(!this.props.iconElementRight || !this.props.iconClassNameRight, 'Material-UI: Properties iconElementRight\n and iconClassNameRight cannot be simultaneously defined. Please use one or the other.') : void 0; + } + }, { + key: 'render', + value: function render() { + var _props = this.props, + title = _props.title, + titleStyle = _props.titleStyle, + iconStyleLeft = _props.iconStyleLeft, + iconStyleRight = _props.iconStyleRight, + onTitleTouchTap = _props.onTitleTouchTap, + showMenuIconButton = _props.showMenuIconButton, + iconElementLeft = _props.iconElementLeft, + iconElementRight = _props.iconElementRight, + iconClassNameLeft = _props.iconClassNameLeft, + iconClassNameRight = _props.iconClassNameRight, + onLeftIconButtonTouchTap = _props.onLeftIconButtonTouchTap, + onRightIconButtonTouchTap = _props.onRightIconButtonTouchTap, + className = _props.className, + style = _props.style, + zDepth = _props.zDepth, + children = _props.children, + other = (0, _objectWithoutProperties3.default)(_props, ['title', 'titleStyle', 'iconStyleLeft', 'iconStyleRight', 'onTitleTouchTap', 'showMenuIconButton', 'iconElementLeft', 'iconElementRight', 'iconClassNameLeft', 'iconClassNameRight', 'onLeftIconButtonTouchTap', 'onRightIconButtonTouchTap', 'className', 'style', 'zDepth', 'children']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + var menuElementLeft = void 0; + var menuElementRight = void 0; + + // If the title is a string, wrap in an h1 tag. + // If not, wrap in a div tag. + var titleComponent = typeof title === 'string' || title instanceof String ? 'h1' : 'div'; + + var titleElement = _react2.default.createElement(titleComponent, { + onTouchTap: this.handleTitleTouchTap, + style: prepareStyles((0, _simpleAssign2.default)(styles.title, styles.mainElement, titleStyle)) + }, title); + + var iconLeftStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, iconStyleLeft); + + if (showMenuIconButton) { + if (iconElementLeft) { + var iconElementLeftProps = {}; + + if (iconElementLeft.type.muiName === 'IconButton') { + var iconElemLeftChildren = iconElementLeft.props.children; + var iconButtonIconStyle = !(iconElemLeftChildren && iconElemLeftChildren.props && iconElemLeftChildren.props.color) ? styles.iconButtonIconStyle : null; + + iconElementLeftProps.iconStyle = (0, _simpleAssign2.default)({}, iconButtonIconStyle, iconElementLeft.props.iconStyle); + } + + if (!iconElementLeft.props.onTouchTap && this.props.onLeftIconButtonTouchTap) { + iconElementLeftProps.onTouchTap = this.handleTouchTapLeftIconButton; + } + + menuElementLeft = _react2.default.createElement( + 'div', + { style: prepareStyles(iconLeftStyle) }, + (0, _keys2.default)(iconElementLeftProps).length > 0 ? (0, _react.cloneElement)(iconElementLeft, iconElementLeftProps) : iconElementLeft + ); + } else { + menuElementLeft = _react2.default.createElement( + _IconButton2.default, + { + style: iconLeftStyle, + iconStyle: styles.iconButtonIconStyle, + iconClassName: iconClassNameLeft, + onTouchTap: this.handleTouchTapLeftIconButton + }, + iconClassNameLeft ? '' : _react2.default.createElement(_menu2.default, { style: (0, _simpleAssign2.default)({}, styles.iconButtonIconStyle) }) + ); + } + } + + var iconRightStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, { + marginRight: -16, + marginLeft: 'auto' + }, iconStyleRight); + + if (iconElementRight) { + var iconElementRightProps = {}; + + switch (iconElementRight.type.muiName) { + case 'IconMenu': + case 'IconButton': + var iconElemRightChildren = iconElementRight.props.children; + var _iconButtonIconStyle = !(iconElemRightChildren && iconElemRightChildren.props && iconElemRightChildren.props.color) ? styles.iconButtonIconStyle : null; + + iconElementRightProps.iconStyle = (0, _simpleAssign2.default)({}, _iconButtonIconStyle, iconElementRight.props.iconStyle); + break; + + case 'FlatButton': + iconElementRightProps.style = (0, _simpleAssign2.default)({}, styles.flatButton, iconElementRight.props.style); + break; + + default: + } + + if (!iconElementRight.props.onTouchTap && this.props.onRightIconButtonTouchTap) { + iconElementRightProps.onTouchTap = this.handleTouchTapRightIconButton; + } + + menuElementRight = _react2.default.createElement( + 'div', + { style: prepareStyles(iconRightStyle) }, + (0, _keys2.default)(iconElementRightProps).length > 0 ? (0, _react.cloneElement)(iconElementRight, iconElementRightProps) : iconElementRight + ); + } else if (iconClassNameRight) { + menuElementRight = _react2.default.createElement(_IconButton2.default, { + style: iconRightStyle, + iconStyle: styles.iconButtonIconStyle, + iconClassName: iconClassNameRight, + onTouchTap: this.handleTouchTapRightIconButton + }); + } + + return _react2.default.createElement( + _Paper2.default, + (0, _extends3.default)({}, other, { + rounded: false, + className: className, + style: (0, _simpleAssign2.default)({}, styles.root, style), + zDepth: zDepth + }), + menuElementLeft, + titleElement, + menuElementRight, + children + ); + } + }]); + return AppBar; +}(_react.Component); + +AppBar.muiName = 'AppBar'; +AppBar.defaultProps = { + showMenuIconButton: true, + title: '', + zDepth: 1 +}; +AppBar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? AppBar.propTypes = { + /** + * Can be used to render a tab inside an app bar for instance. + */ + children: _react.PropTypes.node, + /** + * Applied to the app bar's root element. + */ + className: _react.PropTypes.string, + /** + * The classname of the icon on the left of the app bar. + * If you are using a stylesheet for your icons, enter the class name for the icon to be used here. + */ + iconClassNameLeft: _react.PropTypes.string, + /** + * Similiar to the iconClassNameLeft prop except that + * it applies to the icon displayed on the right of the app bar. + */ + iconClassNameRight: _react.PropTypes.string, + /** + * The custom element to be displayed on the left side of the + * app bar such as an SvgIcon. + */ + iconElementLeft: _react.PropTypes.element, + /** + * Similiar to the iconElementLeft prop except that this element is displayed on the right of the app bar. + */ + iconElementRight: _react.PropTypes.element, + /** + * Override the inline-styles of the element displayed on the left side of the app bar. + */ + iconStyleLeft: _react.PropTypes.object, + /** + * Override the inline-styles of the element displayed on the right side of the app bar. + */ + iconStyleRight: _react.PropTypes.object, + /** + * Callback function for when the left icon is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the left `IconButton`. + */ + onLeftIconButtonTouchTap: _react.PropTypes.func, + /** + * Callback function for when the right icon is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the right `IconButton`. + */ + onRightIconButtonTouchTap: _react.PropTypes.func, + /** + * Callback function for when the title text is selected via a touch tap. + * + * @param {object} event TouchTap event targeting the `title` node. + */ + onTitleTouchTap: _react.PropTypes.func, + /** + * Determines whether or not to display the Menu icon next to the title. + * Setting this prop to false will hide the icon. + */ + showMenuIconButton: _react.PropTypes.bool, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * The title to display on the app bar. + */ + title: _react.PropTypes.node, + /** + * Override the inline-styles of the app bar's title element. + */ + titleStyle: _react.PropTypes.object, + /** + * The zDepth of the component. + * The shadow of the app bar is also dependent on this property. + */ + zDepth: _propTypes2.default.zDepth +} : void 0; +exports.default = AppBar; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 768 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _pure = __webpack_require__(25); + +var _pure2 = _interopRequireDefault(_pure); + +var _SvgIcon = __webpack_require__(26); + +var _SvgIcon2 = _interopRequireDefault(_SvgIcon); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var NavigationMenu = function NavigationMenu(props) { + return _react2.default.createElement( + _SvgIcon2.default, + props, + _react2.default.createElement('path', { d: 'M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z' }) + ); +}; +NavigationMenu = (0, _pure2.default)(NavigationMenu); +NavigationMenu.displayName = 'NavigationMenu'; +NavigationMenu.muiName = 'SvgIcon'; + +exports.default = NavigationMenu; + +/***/ }), +/* 769 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(8); + +var _extends3 = _interopRequireDefault(_extends2); + +var _objectWithoutProperties2 = __webpack_require__(9); + +var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _warning = __webpack_require__(24); + +var _warning2 = _interopRequireDefault(_warning); + +var _TabTemplate = __webpack_require__(770); + +var _TabTemplate2 = _interopRequireDefault(_TabTemplate); + +var _InkBar = __webpack_require__(771); + +var _InkBar2 = _interopRequireDefault(_InkBar); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var tabs = context.muiTheme.tabs; + + + return { + tabItemContainer: { + width: '100%', + backgroundColor: tabs.backgroundColor, + whiteSpace: 'nowrap', + display: 'flex' + } + }; +} + +var Tabs = function (_Component) { + (0, _inherits3.default)(Tabs, _Component); + + function Tabs() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Tabs); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tabs.__proto__ || (0, _getPrototypeOf2.default)(Tabs)).call.apply(_ref, [this].concat(args))), _this), _this.state = { selectedIndex: 0 }, _this.handleTabTouchTap = function (value, event, tab) { + var valueLink = _this.getValueLink(_this.props); + var index = tab.props.index; + + if (valueLink.value && valueLink.value !== value || _this.state.selectedIndex !== index) { + valueLink.requestChange(value, event, tab); + } + + _this.setState({ selectedIndex: index }); + + if (tab.props.onActive) { + tab.props.onActive(tab); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Tabs, [{ + key: 'componentWillMount', + value: function componentWillMount() { + var valueLink = this.getValueLink(this.props); + var initialIndex = this.props.initialSelectedIndex; + + this.setState({ + selectedIndex: valueLink.value !== undefined ? this.getSelectedIndex(this.props) : initialIndex < this.getTabCount() ? initialIndex : 0 + }); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(newProps, nextContext) { + var valueLink = this.getValueLink(newProps); + var newState = { + muiTheme: nextContext.muiTheme || this.context.muiTheme + }; + + if (valueLink.value !== undefined) { + newState.selectedIndex = this.getSelectedIndex(newProps); + } + + this.setState(newState); + } + }, { + key: 'getTabs', + value: function getTabs() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; + + var tabs = []; + + _react.Children.forEach(props.children, function (tab) { + if ((0, _react.isValidElement)(tab)) { + tabs.push(tab); + } + }); + + return tabs; + } + }, { + key: 'getTabCount', + value: function getTabCount() { + return this.getTabs().length; + } + + // Do not use outside of this component, it will be removed once valueLink is deprecated + + }, { + key: 'getValueLink', + value: function getValueLink(props) { + return props.valueLink || { + value: props.value, + requestChange: props.onChange + }; + } + }, { + key: 'getSelectedIndex', + value: function getSelectedIndex(props) { + var valueLink = this.getValueLink(props); + var selectedIndex = -1; + + this.getTabs(props).forEach(function (tab, index) { + if (valueLink.value === tab.props.value) { + selectedIndex = index; + } + }); + + return selectedIndex; + } + }, { + key: 'getSelected', + value: function getSelected(tab, index) { + var valueLink = this.getValueLink(this.props); + return valueLink.value ? valueLink.value === tab.props.value : this.state.selectedIndex === index; + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + contentContainerClassName = _props.contentContainerClassName, + contentContainerStyle = _props.contentContainerStyle, + initialSelectedIndex = _props.initialSelectedIndex, + inkBarStyle = _props.inkBarStyle, + onChange = _props.onChange, + style = _props.style, + tabItemContainerStyle = _props.tabItemContainerStyle, + tabTemplate = _props.tabTemplate, + tabTemplateStyle = _props.tabTemplateStyle, + other = (0, _objectWithoutProperties3.default)(_props, ['contentContainerClassName', 'contentContainerStyle', 'initialSelectedIndex', 'inkBarStyle', 'onChange', 'style', 'tabItemContainerStyle', 'tabTemplate', 'tabTemplateStyle']); + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + var valueLink = this.getValueLink(this.props); + var tabValue = valueLink.value; + var tabContent = []; + var width = 100 / this.getTabCount(); + + var tabs = this.getTabs().map(function (tab, index) { + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(tab.type && tab.type.muiName === 'Tab', 'Material-UI: Tabs only accepts Tab Components as children.\n Found ' + (tab.type.muiName || tab.type) + ' as child number ' + (index + 1) + ' of Tabs') : void 0; + + process.env.NODE_ENV !== "production" ? (0, _warning2.default)(!tabValue || tab.props.value !== undefined, 'Material-UI: Tabs value prop has been passed, but Tab ' + index + '\n does not have a value prop. Needs value if Tabs is going\n to be a controlled component.') : void 0; + + tabContent.push(tab.props.children ? (0, _react.createElement)(tabTemplate || _TabTemplate2.default, { + key: index, + selected: _this2.getSelected(tab, index), + style: tabTemplateStyle + }, tab.props.children) : undefined); + + return (0, _react.cloneElement)(tab, { + key: index, + index: index, + selected: _this2.getSelected(tab, index), + width: width + '%', + onTouchTap: _this2.handleTabTouchTap + }); + }); + + var inkBar = this.state.selectedIndex !== -1 ? _react2.default.createElement(_InkBar2.default, { + left: width * this.state.selectedIndex + '%', + width: width + '%', + style: inkBarStyle + }) : null; + + var inkBarContainerWidth = tabItemContainerStyle ? tabItemContainerStyle.width : '100%'; + + return _react2.default.createElement( + 'div', + (0, _extends3.default)({ style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, other), + _react2.default.createElement( + 'div', + { style: prepareStyles((0, _simpleAssign2.default)(styles.tabItemContainer, tabItemContainerStyle)) }, + tabs + ), + _react2.default.createElement( + 'div', + { style: { width: inkBarContainerWidth } }, + inkBar + ), + _react2.default.createElement( + 'div', + { + style: prepareStyles((0, _simpleAssign2.default)({}, contentContainerStyle)), + className: contentContainerClassName + }, + tabContent + ) + ); + } + }]); + return Tabs; +}(_react.Component); + +Tabs.defaultProps = { + initialSelectedIndex: 0, + onChange: function onChange() {} +}; +Tabs.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? Tabs.propTypes = { + /** + * Should be used to pass `Tab` components. + */ + children: _react.PropTypes.node, + /** + * The css class name of the root element. + */ + className: _react.PropTypes.string, + /** + * The css class name of the content's container. + */ + contentContainerClassName: _react.PropTypes.string, + /** + * Override the inline-styles of the content's container. + */ + contentContainerStyle: _react.PropTypes.object, + /** + * Specify initial visible tab index. + * If `initialSelectedIndex` is set but larger than the total amount of specified tabs, + * `initialSelectedIndex` will revert back to default. + * If `initialSelectedIndex` is set to any negative value, no tab will be selected intially. + */ + initialSelectedIndex: _react.PropTypes.number, + /** + * Override the inline-styles of the InkBar. + */ + inkBarStyle: _react.PropTypes.object, + /** + * Called when the selected value change. + */ + onChange: _react.PropTypes.func, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + /** + * Override the inline-styles of the tab-labels container. + */ + tabItemContainerStyle: _react.PropTypes.object, + /** + * Override the default tab template used to wrap the content of each tab element. + */ + tabTemplate: _react.PropTypes.func, + /** + * Override the inline-styles of the tab template. + */ + tabTemplateStyle: _react.PropTypes.object, + /** + * Makes Tabs controllable and selects the tab whose value prop matches this prop. + */ + value: _react.PropTypes.any +} : void 0; +exports.default = Tabs; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 770 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var styles = { + width: '100%', + position: 'relative', + textAlign: 'initial' +}; + +var TabTemplate = function TabTemplate(_ref) { + var children = _ref.children, + selected = _ref.selected, + style = _ref.style; + + var templateStyle = (0, _simpleAssign2.default)({}, styles, style); + if (!selected) { + templateStyle.height = 0; + templateStyle.overflow = 'hidden'; + } + + return _react2.default.createElement( + 'div', + { style: templateStyle }, + children + ); +}; + +process.env.NODE_ENV !== "production" ? TabTemplate.propTypes = { + children: _react.PropTypes.node, + selected: _react.PropTypes.bool, + style: _react.PropTypes.object +} : void 0; + +exports.default = TabTemplate; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 771 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(2); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(3); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(5); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(6); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _simpleAssign = __webpack_require__(7); + +var _simpleAssign2 = _interopRequireDefault(_simpleAssign); + +var _react = __webpack_require__(1); + +var _react2 = _interopRequireDefault(_react); + +var _transitions = __webpack_require__(12); + +var _transitions2 = _interopRequireDefault(_transitions); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getStyles(props, context) { + var inkBar = context.muiTheme.inkBar; + + + return { + root: { + left: props.left, + width: props.width, + bottom: 0, + display: 'block', + backgroundColor: props.color || inkBar.backgroundColor, + height: 2, + marginTop: -2, + position: 'relative', + transition: _transitions2.default.easeOut('1s', 'left') + } + }; +} + +var InkBar = function (_Component) { + (0, _inherits3.default)(InkBar, _Component); + + function InkBar() { + (0, _classCallCheck3.default)(this, InkBar); + return (0, _possibleConstructorReturn3.default)(this, (InkBar.__proto__ || (0, _getPrototypeOf2.default)(InkBar)).apply(this, arguments)); + } + + (0, _createClass3.default)(InkBar, [{ + key: 'render', + value: function render() { + var style = this.props.style; + var prepareStyles = this.context.muiTheme.prepareStyles; + + var styles = getStyles(this.props, this.context); + + return _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }); + } + }]); + return InkBar; +}(_react.Component); + +InkBar.contextTypes = { + muiTheme: _react.PropTypes.object.isRequired +}; +process.env.NODE_ENV !== "production" ? InkBar.propTypes = { + color: _react.PropTypes.string, + left: _react.PropTypes.string.isRequired, + /** + * Override the inline-styles of the root element. + */ + style: _react.PropTypes.object, + width: _react.PropTypes.string.isRequired +} : void 0; +exports.default = InkBar; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0))) + +/***/ }), +/* 772 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys = __webpack_require__(51); + +var _keys2 = _interopRequireDefault(_keys); + +exports.changeMenu = changeMenu; + +var _ActionTypes = __webpack_require__(188); + +var types = _interopRequireWildcard(_ActionTypes); + +var _Menus = __webpack_require__(84); + +var menus = _interopRequireWildcard(_Menus); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function changeMenu(newMenu) { + var keys = (0, _keys2.default)(menus).map(function (x) { + return menus[x]; + }); + if (keys.indexOf(newMenu) !== -1) { + return { type: types.CHANGE_MENU, menu: newMenu }; + } + throw new Error('Invalid menu : ' + newMenu); +} + +/***/ }), +/* 773 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createProfile = createProfile; +exports.setProfileEnabled = setProfileEnabled; +exports.removeProfile = removeProfile; +exports.updateProfileSettings = updateProfileSettings; + +var _ActionTypes = __webpack_require__(188); + +var types = _interopRequireWildcard(_ActionTypes); + +var _notification = __webpack_require__(774); + +var _notification2 = _interopRequireDefault(_notification); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function createProfile(name, description) { + return function (dispatch) { + dispatch((0, _notification2.default)('Profile created')); + dispatch({ + type: types.PROFILE_CREATE, + name: name, + description: description + }); + }; +} + +function setProfileEnabled(name) { + return function (dispatch) { + dispatch((0, _notification2.default)('Profile set to ' + name)); + dispatch({ + type: types.PROFILE_SET_ENABLED, + name: name + }); + }; +} + +function removeProfile(name) { + return function (dispatch) { + dispatch((0, _notification2.default)('Profile created')); + dispatch({ + type: types.PROFILE_REMOVE, + name: name + }); + }; +} + +function updateProfileSettings(profileName, shop, key, value) { + return function (dispatch) { + dispatch((0, _notification2.default)('Settings saved')); + var obj = {}; + obj[key] = value; + dispatch({ + type: types.PROFILE_UPDATE_SETTINGS, + name: profileName, + value: obj, + shop: shop + }); + }; +} + +/***/ }), +/* 774 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = addNotification; + +var _ActionTypes = __webpack_require__(188); + +var types = _interopRequireWildcard(_ActionTypes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function addNotification(message) { + return { + type: types.NOTIFICATION_ADD, + message: message + }; +} + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/bot/build/manifest.json b/bot/build/manifest.json index 99943b0..33fd9c5 100644 --- a/bot/build/manifest.json +++ b/bot/build/manifest.json @@ -3,6 +3,9 @@ "name": "SupremeOATC", "description": "Supreme Open-Source add to cart bot", "version": "0.1", + "background": { + "scripts": ["background.js"] + }, "browser_action": { "default_popup": "index.html", "default_icon": "assets/img/icon.png" diff --git a/bot/manifest.json b/bot/manifest.json index 99943b0..33fd9c5 100644 --- a/bot/manifest.json +++ b/bot/manifest.json @@ -3,6 +3,9 @@ "name": "SupremeOATC", "description": "Supreme Open-Source add to cart bot", "version": "0.1", + "background": { + "scripts": ["background.js"] + }, "browser_action": { "default_popup": "index.html", "default_icon": "assets/img/icon.png" diff --git a/bot/package.json b/bot/package.json index 52c10db..3fe0b0e 100644 --- a/bot/package.json +++ b/bot/package.json @@ -53,8 +53,10 @@ "webpack-hot-middleware": "^2.18.0" }, "dependencies": { + "browser-request": "^0.3.3", "lodash": "^4.17.4", "material-ui": "^0.16.7", + "material-ui-chip-input": "^0.17.0", "react": "^15.6.1", "react-dom": "^15.4.0", "react-redux": "^4.4.6", diff --git a/bot/src/app/actions/atc.js b/bot/src/app/actions/atc.js new file mode 100644 index 0000000..f0829f3 --- /dev/null +++ b/bot/src/app/actions/atc.js @@ -0,0 +1,31 @@ +import * as types from '../constants/ActionTypes'; +import addNotification from '../actions/notification'; + +export function addAtcProduct(data) { + return function (dispatch) { + dispatch(addNotification(`Atc product ${data.name} added`)); + dispatch({ + type: types.ATC_PRODUCT_ADD, + name, + data, + }); + }; +} + +export function removeAtcProduct(name) { + return function (dispatch) { + dispatch(addNotification(`Atc product ${name} removed`)); + dispatch({ + type: types.ATC_PRODUCT_REMOVE, + name, + }); + }; +} + +export function setAtcProductEnabled(name, enabled = true) { + return { + type: types.ATC_SET_PRODUCT_ENABLED, + name, + enabled, + }; +} diff --git a/bot/src/app/actions/profiles.js b/bot/src/app/actions/profiles.js new file mode 100644 index 0000000..239abd0 --- /dev/null +++ b/bot/src/app/actions/profiles.js @@ -0,0 +1,47 @@ +import * as types from '../constants/ActionTypes'; +import addNotification from '../actions/notification'; + +export function createProfile(name, description) { + return function(dispatch) { + dispatch(addNotification('Profile created')); + dispatch({ + type: types.PROFILE_CREATE, + name, + description, + }); + }; +} + +export function setProfileEnabled(name) { + return function(dispatch) { + dispatch(addNotification(`Profile set to ${name}`)); + dispatch({ + type: types.PROFILE_SET_ENABLED, + name, + }); + }; +} + +export function removeProfile(name) { + return function(dispatch) { + dispatch(addNotification('Profile created')); + dispatch({ + type: types.PROFILE_REMOVE, + name, + }); + }; +} + +export function updateProfileSettings(profileName, shop, key, value) { + return function(dispatch) { + dispatch(addNotification('Settings saved')); + const obj = {}; + obj[key] = value; + dispatch({ + type: types.PROFILE_UPDATE_SETTINGS, + name: profileName, + value: obj, + shop, + }); + }; +} diff --git a/bot/src/app/actions/settings.js b/bot/src/app/actions/settings.js deleted file mode 100644 index 86451aa..0000000 --- a/bot/src/app/actions/settings.js +++ /dev/null @@ -1,15 +0,0 @@ -import * as types from '../constants/ActionTypes'; -import addNotification from '../actions/notification'; - -export function updateSettings(shop, key, value) { - return function(dispatch) { - dispatch(addNotification('Settings saved')); - const obj = {}; - obj[key] = value; - dispatch({ - type: types.UPDATE_SETTINGS, - value: obj, - shop, - }); - }; -} diff --git a/bot/src/app/components/AtcCreateForm.jsx b/bot/src/app/components/AtcCreateForm.jsx new file mode 100644 index 0000000..e8c6ea8 --- /dev/null +++ b/bot/src/app/components/AtcCreateForm.jsx @@ -0,0 +1,149 @@ +import React, { Component, PropTypes } from 'react'; +import { reduxForm, Field } from 'redux-form'; +import { connect } from 'react-redux'; +import ChipInput from 'material-ui-chip-input'; +import MenuItem from 'material-ui/MenuItem'; +import { + TextField, + SelectField, + Toggle, +} from 'redux-form-material-ui'; +import RaisedButton from 'material-ui/RaisedButton'; +import FlatButton from 'material-ui/FlatButton'; +import * as Validators from '../constants/FormValidators'; +import Styles from '../constants/Styles'; +import { categories } from '../constants/Utils'; + +class AtcCreateForm extends Component { + render() { + const { handleSubmit, pristine, submitting, onRequestClose, atcProducts } = this.props; + const renderChip = ({input, hintText, floatingLabelText, meta: {touched, error} }) => ( + <ChipInput + {...input} + chipContainerStyle={Styles.fields.text} + fullWidth + value = { input.value || []} + onRequestAdd={(addedChip) => { + let values = input.value || []; + values = values.slice(); + values.push(addedChip); + input.onChange(values); + }} + onRequestDelete={(deletedChip) => { + let values = input.value || []; + values = values.filter(v => v !== deletedChip); + input.onChange(values); + }} + onBlur={() => input.onBlur()} + hintText={hintText} + floatingLabelText={floatingLabelText} + errorText={(touched && error) ? error : ''} + /> + ); + const buttonStyle = { + margin: 6, + float: 'right', + }; + + return ( + <form onSubmit={handleSubmit} id="atc-form"> + <div> + <Field + name="name" + validate={[Validators.required, Validators.unique(atcProducts.map(x => x.name))]} + component={TextField} + floatingLabelText="Name" + hintText="Name" + style={Styles.fields.text} + /> + </div> + + <div> + <Field + name="keywords" + component={renderChip} + floatingLabelText="Product keywords, press enter to validate a keyword" + hintText="Product keywords" + style={Styles.fields.text} + labelStyle={Styles.fields.text} + validate={[Validators.required, Validators.notEmpty]} + /> + </div> + + <div> + <Field + name="color" + component={TextField} + floatingLabelText="Color" + hintText="Color" + style={Styles.fields.text} + /> + </div> + + <div> + <Field + name="category" + component={SelectField} + floatingLabelText="Product category" + style={Styles.fields.text} + validate={[Validators.required]} + > + { + categories.map((x) => { + return ( + <MenuItem key={x} value={x} primaryText={x} /> + ); + }) + } + </Field> + </div> + <br /> + <div> + <Field + name="enabled" + component={Toggle} + label="Enabled" + style={Styles.fields.text} + /> + </div> + + <div> + <RaisedButton + label="Add" + style={buttonStyle} + disabled={pristine || submitting} + type="submit" + /> + <FlatButton + label="Cancel" + style={buttonStyle} + onTouchTap={() => { + if (onRequestClose) { + onRequestClose(); + } + }} + /> + </div> + </form> + ); + } +} + +AtcCreateForm.propTypes = { + onRequestClose: PropTypes.function, +}; + +const Form = reduxForm({ + form: 'atc-form', +})(AtcCreateForm); + +function mapStateToProps(state) { + return { + atcProducts: state.atc.atcProducts, + initialValues: { + enabled: true, + }, + }; +} + +export default connect(mapStateToProps)(Form); diff --git a/bot/src/app/components/Profile.jsx b/bot/src/app/components/Profile.jsx new file mode 100644 index 0000000..195939d --- /dev/null +++ b/bot/src/app/components/Profile.jsx @@ -0,0 +1,122 @@ +import React, { Component, PropTypes } from 'react'; +import { connect } from 'react-redux'; +import { + Table, + TableBody, + TableHeader, + TableHeaderColumn, + TableRow, + TableRowColumn, +} from 'material-ui/Table'; +import { red300 } from 'material-ui/styles/colors'; +import Dialog from 'material-ui/Dialog'; +import Toggle from 'material-ui/Toggle'; +import IconButton from 'material-ui/IconButton'; +import DeleteButton from 'material-ui/svg-icons/action/delete'; +import RaisedButton from 'material-ui/RaisedButton'; +import { createProfile, setProfileEnabled, removeProfile } from '../actions/profiles'; +import Layout from '../containers/Layout.jsx'; +import ProfileCreateForm from './ProfileCreateForm'; +import ProfileToggle from './ProfileToggle'; + +class Profile extends Component { + constructor(props) { + super(props); + this.state = { + createModalOpen: false, + }; + } + + onSetProfile(profileName) { + this.props.setProfileEnabled(profileName); + } + + requestCloseModal() { + this.setState({ + createModalOpen: false, + }); + } + + requestModalOpen() { + this.setState({ + createModalOpen: true, + }); + } + + onRequestDeleteProfile(name) { + this.props.removeProfile(name); + } + + handleSubmit(data) { + this.props.createProfile(data.name, data.description); + this.requestCloseModal(); + } + + render() { + const { profiles, currentProfile } = this.props; + + return ( + <Layout title="Profiles"> + <Dialog + open={this.state.createModalOpen} + title="Create a new profile" + modal={false} + onRequestClose={() => this.requestCloseModal()} + > + <ProfileCreateForm + onSubmit={data => this.handleSubmit(data)} + onRequestClose={() => this.requestCloseModal()} + /> + </Dialog> + <RaisedButton label="Add new" onTouchTap={() => this.requestModalOpen()} primary /> + <Table selectable={false}> + <TableHeader displaySelectAll={false} adjustForCheckbox={false}> + <TableRow> + <TableHeaderColumn>Name</TableHeaderColumn> + <TableHeaderColumn>Description</TableHeaderColumn> + <TableHeaderColumn>Enabled</TableHeaderColumn> + <TableHeaderColumn>Delete</TableHeaderColumn> + </TableRow> + </TableHeader> + <TableBody displayRowCheckbox={false} stripedRows> + { + profiles.map((x, i) => { + return ( + <TableRow key={i}> + <TableRowColumn>{x.name}</TableRowColumn> + <TableRowColumn>{x.description}</TableRowColumn> + <TableRowColumn> + <ProfileToggle profile={x} /> + </TableRowColumn> + <TableRowColumn> + <IconButton onTouchTap={() => this.onRequestDeleteProfile(x.name)} disabled={x.name === 'default'}> + <DeleteButton color={red300} /> + </IconButton> + </TableRowColumn> + </TableRow> + ); + }) + } + </TableBody> + </Table> + </Layout> + ); + } +} + +function mapStateToProps(state) { + return { + profiles: state.profiles.profiles, + currentProfile: state.profiles.currentProfile, + }; +} + +function mapDispatchToProps(dispatch) { + return { + createProfile: (name, description) => dispatch(createProfile(name, description)), + setProfileEnabled: name => dispatch(setProfileEnabled(name)), + removeProfile: name => dispatch(removeProfile(name)), + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(Profile); diff --git a/bot/src/app/components/ProfileCreateForm.jsx b/bot/src/app/components/ProfileCreateForm.jsx new file mode 100644 index 0000000..f44d3d4 --- /dev/null +++ b/bot/src/app/components/ProfileCreateForm.jsx @@ -0,0 +1,81 @@ +import React, { Component, PropTypes } from 'react'; +import { connect } from 'react-redux'; +import { reduxForm, Field } from 'redux-form'; +import { + TextField, +} from 'redux-form-material-ui'; +import RaisedButton from 'material-ui/RaisedButton'; +import FlatButton from 'material-ui/FlatButton'; +import * as Validators from '../constants/FormValidators'; +import Styles from '../constants/Styles'; + + +class ProfileCreateForm extends Component { + render() { + const { handleSubmit, pristine, submitting, onRequestClose, profiles } = this.props; + const buttonStyle = { + margin: 6, + float: 'right', + }; + + return ( + <form onSubmit={handleSubmit} id="profile-form"> + <div> + <Field + name="name" + validate={[Validators.required, Validators.unique(profiles.map(x => x.name))]} + component={TextField} + floatingLabelText="Name" + hintText="Name" + style={Styles.fields.text} + /> + </div> + + <div> + <Field + name="description" + component={TextField} + floatingLabelText="Description" + hintText="Description" + style={Styles.fields.text} + validate={[Validators.required]} + /> + </div> + <div> + <RaisedButton + label="Add" + style={buttonStyle} + disabled={pristine || submitting} + type="submit" + /> + <FlatButton + label="Cancel" + style={buttonStyle} + onTouchTap={() => { + if (onRequestClose) { + onRequestClose(); + } + }} + /> + </div> + </form> + ); + } +} + +ProfileCreateForm.propTypes = { + onRequestClose: PropTypes.function, +}; + +function mapStateToProps(state) { + return { + profiles: state.profiles.profiles, + currentProfile: state.profiles.currentProfile, + }; +} + +const Form = reduxForm({ + form: 'profile-form', +})(ProfileCreateForm); + +export default connect(mapStateToProps)(Form); diff --git a/bot/src/app/components/ProfileToggle.jsx b/bot/src/app/components/ProfileToggle.jsx new file mode 100644 index 0000000..00d91ad --- /dev/null +++ b/bot/src/app/components/ProfileToggle.jsx @@ -0,0 +1,33 @@ +import React, { Component, PropTypes } from 'react'; +import { connect } from 'react-redux'; +import Toggle from 'material-ui/Toggle'; +import { setProfileEnabled } from '../actions/profiles'; + +class ProfileToggle extends Component { + onSetProfile(profileName) { + this.props.setProfileEnabled(profileName); + } + + render() { + const { profile, currentProfile } = this.props; + return (<Toggle toggled={profile.name === currentProfile} onToggle={() => this.onSetProfile(profile.name)} />); + } +} + +function mapStateToProps(state) { + return { + currentProfile: state.profiles.currentProfile, + }; +} + +function mapDispatchToProps(dispatch) { + return { + setProfileEnabled: name => dispatch(setProfileEnabled(name)), + }; +} + +ProfileToggle.PropTypes = { + profile: PropTypes.object.isRequired, +}; + +export default connect(mapStateToProps, mapDispatchToProps)(ProfileToggle); diff --git a/bot/src/app/components/menus/Atc.jsx b/bot/src/app/components/menus/Atc.jsx new file mode 100644 index 0000000..8021f3e --- /dev/null +++ b/bot/src/app/components/menus/Atc.jsx @@ -0,0 +1,120 @@ +import React, { Component, PropTypes } from 'react'; +import { connect } from 'react-redux'; +import { + Table, + TableBody, + TableHeader, + TableHeaderColumn, + TableRow, + TableRowColumn, +} from 'material-ui/Table'; +import { red300 } from 'material-ui/styles/colors'; +import Dialog from 'material-ui/Dialog'; +import IconButton from 'material-ui/IconButton'; +import DeleteButton from 'material-ui/svg-icons/action/delete'; +import RaisedButton from 'material-ui/RaisedButton'; +import Toggle from 'material-ui/Toggle'; +import { addAtcProduct, removeAtcProduct, setAtcProductEnabled } from '../../actions/atc'; +import AtcCreateForm from '../AtcCreateForm'; + +class Atc extends Component { + constructor(props) { + super(props); + this.state = { + createModalOpen: false, + }; + } + + requestCloseModal() { + this.setState({ + createModalOpen: false, + }); + } + + requestModalOpen() { + this.setState({ + createModalOpen: true, + }); + } + + onRequestDeleteAtc(atcName) { + this.props.removeAtcProduct(atcName); + } + + handleSubmit(data) { + this.requestCloseModal(); + this.props.addAtcProduct(data); + } + + toggleAtc(name, enabled) { + this.props.setAtcProductEnabled(name, enabled); + } + + render() { + const { atcProducts } = this.props; + + return ( + <div> + <Dialog + open={this.state.createModalOpen} + title="Add a new atc product" + modal={false} + onRequestClose={() => this.requestCloseModal()} + > + <AtcCreateForm onRequestClose={() => this.requestCloseModal()} onSubmit={data => this.handleSubmit(data)} /> + </Dialog> + <RaisedButton label="Add new" onTouchTap={() => this.requestModalOpen()} primary /> + <Table selectable={false}> + <TableHeader displaySelectAll={false} adjustForCheckbox={false}> + <TableRow> + <TableHeaderColumn>Name</TableHeaderColumn> + <TableHeaderColumn>Keywords</TableHeaderColumn> + <TableHeaderColumn>Color</TableHeaderColumn> + <TableHeaderColumn>Category</TableHeaderColumn> + <TableHeaderColumn>Enabled</TableHeaderColumn> + <TableHeaderColumn>Delete</TableHeaderColumn> + </TableRow> + </TableHeader> + <TableBody displayRowCheckbox={false} stripedRows> + { + atcProducts.map((x) => { + return ( + <TableRow key={x.name}> + <TableRowColumn>{x.name}</TableRowColumn> + <TableRowColumn>{x.keywords.join(', ')}</TableRowColumn> + <TableRowColumn>{x.color || 'ANY'}</TableRowColumn> + <TableRowColumn>{x.category}</TableRowColumn> + <TableRowColumn> + <Toggle toggled={x.enabled} onToggle={() => this.toggleAtc(x.name, !x.enabled)} /> + </TableRowColumn> + <TableRowColumn> + <IconButton onTouchTap={() => this.onRequestDeleteAtc(x.name)}> + <DeleteButton color={red300} /> + </IconButton> + </TableRowColumn> + </TableRow> + ); + }) + } + </TableBody> + </Table> + </div> + ); + } +} + +function mapStateToProps(state) { + return { + atcProducts: state.atc.atcProducts, + }; +} + +function mapDispatchToProps(dispatch) { + return { + addAtcProduct: data => dispatch(addAtcProduct(data)), + removeAtcProduct: data => dispatch(removeAtcProduct(data)), + setAtcProductEnabled: (name, enabled) => dispatch(setAtcProductEnabled(name, enabled)), + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(Atc); diff --git a/bot/src/app/components/menus/Billing.jsx b/bot/src/app/components/menus/Billing.jsx index 0e2d98d..9d09848 100644 --- a/bot/src/app/components/menus/Billing.jsx +++ b/bot/src/app/components/menus/Billing.jsx @@ -131,10 +131,11 @@ const Billing = props => { style={Styles.fields.text} validate={[Validators.required]} > - <MenuItem value="visa" primaryText="Visa"/> - <MenuItem value="american_express" primaryText="American Express"/> - <MenuItem value="master" primaryText="Mastercard"/> - <MenuItem value="solo" primaryText="Solo"/> + { + (country === 'JAPAN' ? Utils.japanCreditCards : Utils.creditCards).map(x => + <MenuItem value={x.value} primaryText={x.text} key={x.value} />, + ) + } </Field> </div> @@ -216,8 +217,10 @@ Billing.propTypes = { const selector = formValueSelector('billing'); function mapStateToProps(state, ownProps) { + const currentProfile = state.profiles.currentProfile; + const settings = state.profiles.profiles.filter(x => x.name === currentProfile)[0].settings; return { - initialValues: (state.settings.values[ownProps.shop] || {})[menus.MENU_BILLING] || {}, + initialValues: (settings[ownProps.shop] || {})[menus.MENU_BILLING] || {}, country: selector(state, 'order_billing_country'), }; } diff --git a/bot/src/app/components/menus/Options.jsx b/bot/src/app/components/menus/Options.jsx index f625b2e..e790735 100644 --- a/bot/src/app/components/menus/Options.jsx +++ b/bot/src/app/components/menus/Options.jsx @@ -1,11 +1,11 @@ import React, { PropTypes } from 'react'; -import { reduxForm, Field } from 'redux-form'; +import { reduxForm, Field, formValueSelector } from 'redux-form'; import { connect } from 'react-redux'; import RaisedButton from 'material-ui/RaisedButton'; import { TextField, Toggle, -} from 'redux-form-material-ui'; + } from 'redux-form-material-ui'; import Styles from '../../constants/Styles'; import * as Validators from '../../constants/FormValidators'; import * as menus from '../../constants/Menus'; @@ -21,7 +21,7 @@ const defaultValues = { }; const Options = props => { - const { handleSubmit, pristine, submitting } = props; + const { handleSubmit, pristine, submitting, atcEnabled } = props; return ( <form onSubmit={handleSubmit} id="options-form"> <div> @@ -69,6 +69,30 @@ const Options = props => { /> </div> + <div> + <Field + name="atcEnabled" + component={Toggle} + label="Enable AutoCop (Autocheckout required)" + style={Styles.fields.text} + /> + </div> + + { + atcEnabled && + <div> + <Field + name="atcStartTime" + component={TextField} + floatingLabelText="ATC Start time (hh:mm:ss) 24hour format" + hintText="ATC Start time" + style={Styles.fields.text} + validate={[Validators.required, Validators.time24]} + /> + <br /> + </div> + } + <div> <Field name="addToCartDelay" @@ -124,9 +148,18 @@ const Options = props => { ); }; +const OptionsForm = reduxForm({ + form: 'options', +})(Options); + +const selector = formValueSelector('options'); + function mapStateToProps(state, ownProps) { + const currentProfile = state.profiles.currentProfile; + const settings = state.profiles.profiles.filter(x => x.name === currentProfile)[0].settings; return { - initialValues: Object.assign(defaultValues, (state.settings.values[ownProps.shop] || {})[menus.MENU_OPTIONS] || {}), + initialValues: Object.assign({}, defaultValues, (settings[ownProps.shop] || {})[menus.MENU_OPTIONS] || {}), + atcEnabled: selector(state, 'atcEnabled'), }; } @@ -134,6 +167,5 @@ Options.propTypes = { shop: PropTypes.string.isRequired, }; -export default connect(mapStateToProps)(reduxForm({ - form: 'options', -})(Options)); + +export default connect(mapStateToProps)(OptionsForm); diff --git a/bot/src/app/components/menus/Sizes.jsx b/bot/src/app/components/menus/Sizes.jsx index fa6de20..e2d276e 100644 --- a/bot/src/app/components/menus/Sizes.jsx +++ b/bot/src/app/components/menus/Sizes.jsx @@ -150,6 +150,21 @@ const Sizes = props => { } </Field> </div> + + <div> + <Field + name="skate" + component={SelectField} + floatingLabelText="Skate" + hintText="Skate" + style={Styles.fields.text} + validate={[Validators.required]} + > + { + Utils.skateSizes.map(x => <MenuItem key={x} value={x} primaryText={x} />) + } + </Field> + </div> <div> <RaisedButton label="Save" @@ -166,8 +181,10 @@ Sizes.propTypes = { }; function mapStateToProps(state, ownProps) { + const currentProfile = state.profiles.currentProfile; + const settings = state.profiles.profiles.filter(x => x.name === currentProfile)[0].settings; return { - initialValues: (state.settings.values[ownProps.shop] || {})[menus.MENU_SIZES] || {}, + initialValues: (settings[ownProps.shop] || {})[menus.MENU_SIZES] || {}, }; } diff --git a/bot/src/app/components/shops/Supreme.jsx b/bot/src/app/components/shops/Supreme.jsx index 5e1a4a3..24eb0f5 100644 --- a/bot/src/app/components/shops/Supreme.jsx +++ b/bot/src/app/components/shops/Supreme.jsx @@ -8,9 +8,11 @@ import * as menus from '../../constants/Menus'; import Billing from './../menus/Billing'; import Options from './../menus/Options'; import Sizes from './../menus/Sizes'; +import Atc from './../menus/Atc'; import Layout from '../../containers/Layout.jsx'; +import Badge from 'material-ui/Badge'; import { changeMenu } from '../../actions/menu'; -import { updateSettings } from '../../actions/settings'; +import { updateProfileSettings } from '../../actions/profiles'; export const SHOP_NAME = 'Supreme'; @@ -23,6 +25,8 @@ class Supreme extends Component { return (<Options onSubmit={data => this.onSubmit(menu, data)} shop={SHOP_NAME} />); case menus.MENU_SIZES: return (<Sizes onSubmit={data => this.onSubmit(menu, data)} shop={SHOP_NAME} />); + case menus.MENU_ATC: + return (<Atc shop={SHOP_NAME} />); default: return null; } @@ -49,7 +53,7 @@ class Supreme extends Component { onSubmit(menu, data) { const newObj = this.transform(menu, data, this.strToNumberReducer); - this.props.updateSettings(SHOP_NAME, menu, newObj); + this.props.updateSettings(this.props.currentProfile, SHOP_NAME, menu, newObj); } componentWillMount() { @@ -59,6 +63,19 @@ class Supreme extends Component { } getIconForTabMenu(menu) { + if (menu === menus.MENU_ATC) { + return ( + <IconButton iconStyle={{ color: 'white' }} style={{ padding: 0 }} tooltipPosition="top-center" tooltipStyles={{ color: 'white' }}> + <Badge + badgeStyle={{ top: -24, right: 12 }} + badgeContent={this.props.atcProducts.length} + primary + > + <FontIcon style={{ color: 'white', top: -24, right: 12 }} className="material-icons" >done</FontIcon> + </Badge> + </IconButton> + ); + } const isIncomplete = !this.props.settings[SHOP_NAME] || !this.props.settings[SHOP_NAME][menu]; const color = isIncomplete ? red300 : 'white'; const tip = isIncomplete ? 'This tab hasn\'t been configured yet' : ''; @@ -95,6 +112,13 @@ class Supreme extends Component { value={menus.MENU_SIZES} onClick={() => this.props.changeMenu(menus.MENU_SIZES)} />, + <Tab + label="AutoCop" + key={4} + icon={this.getIconForTabMenu(menus.MENU_ATC)} + value={menus.MENU_ATC} + onClick={() => this.props.changeMenu(menus.MENU_ATC)} + />, ]; } @@ -109,16 +133,20 @@ class Supreme extends Component { } function mapStateToProps(state) { + const currentProfile = state.profiles.currentProfile; + const settings = state.profiles.profiles.filter(x => x.name === currentProfile)[0].settings; return { menu: state.menu.currentMenu, - settings: state.settings.values, + settings: settings, + atcProducts: state.atc.atcProducts, + currentProfile, }; } function mapDispatchToProps(dispatch) { return { changeMenu: menu => dispatch(changeMenu(menu)), - updateSettings: (shop, key, value) => dispatch(updateSettings(shop, key, value)) + updateSettings: (currentProfile, shop, key, value) => dispatch(updateProfileSettings(currentProfile, shop, key, value)), }; } diff --git a/bot/src/app/constants/ActionTypes.js b/bot/src/app/constants/ActionTypes.js index 2dbd10a..1c7b6b8 100644 --- a/bot/src/app/constants/ActionTypes.js +++ b/bot/src/app/constants/ActionTypes.js @@ -1,3 +1,9 @@ export const CHANGE_MENU = 'CHANGE_MENU'; -export const UPDATE_SETTINGS = 'UPDATE_SETTINGS'; export const NOTIFICATION_ADD = 'NOTIFICATION_ADD'; +export const PROFILE_CREATE = 'PROFILE_CREATE'; +export const PROFILE_UPDATE_SETTINGS = 'PROFILE_UPDATE_SETTINGS'; +export const PROFILE_REMOVE = 'PROFILE_REMOVE'; +export const PROFILE_SET_ENABLED = 'PROFILE_SET_ENABLED'; +export const ATC_PRODUCT_ADD = 'ATC_PRODUCT_ADD'; +export const ATC_PRODUCT_REMOVE = 'ATC_PRODUCT_REMOVE'; +export const ATC_SET_PRODUCT_ENABLED = 'ATC_SET_PRODUCT_ENABLED'; diff --git a/bot/src/app/constants/FormValidators.js b/bot/src/app/constants/FormValidators.js index f17e8f1..a8fcb5e 100644 --- a/bot/src/app/constants/FormValidators.js +++ b/bot/src/app/constants/FormValidators.js @@ -1,3 +1,5 @@ +import * as Helpers from '../utils/Helpers'; + export function email(input) { const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(input) ? undefined : 'Please enter a valid email'; @@ -8,12 +10,18 @@ export function required(value) { return empty ? 'Required field' : undefined; } +export function notEmpty(arr) { + if (!Array.isArray(arr) || !arr.length) { + return 'This field must not be empty'; + } +} + export function simpleText(value) { return value && !value.match(/^[0-9a-zA-Z_]{1,64}$/) ? 'Only use characters (a-z, A-Z, 0-9, _)' : undefined; } export function number(value) { - return value && isNaN(Number(value)) ? 'This field must be a number' : undefined; + return value && (isNaN(Number(value)) || +value < 0) ? 'This field must be a positive number' : undefined; } export function minValue(min) { @@ -27,3 +35,24 @@ export function maxValue(max) { export function fullName(value) { return !value || value.split(' ').filter(x => x !== "").length < 2 ? 'Please enter a valid full name (firstname + lastname)' : undefined; } + +export function unique(candidates) { + return value => { + if (candidates.indexOf(value) !== -1) { + return 'This value already exists and must be unique'; + } + return undefined; + }; +} + +export function date(val) { + const d = new Date(val); + return isNaN(d.getTime()) ? 'Required date' : undefined; +} + +export function time24(val) { + const msg = 'Invalid time'; + if (!Helpers.setTimeForToday(val)) { + return msg; + } +} diff --git a/bot/src/app/constants/Menus.js b/bot/src/app/constants/Menus.js index 6e2989f..c9d7382 100644 --- a/bot/src/app/constants/Menus.js +++ b/bot/src/app/constants/Menus.js @@ -1,3 +1,4 @@ export const MENU_OPTIONS = 'Options'; export const MENU_BILLING = 'Billing'; export const MENU_SIZES = 'Sizes'; +export const MENU_ATC = 'AutoCop'; diff --git a/bot/src/app/constants/Utils.js b/bot/src/app/constants/Utils.js index 1ac7caa..9b33bf9 100644 --- a/bot/src/app/constants/Utils.js +++ b/bot/src/app/constants/Utils.js @@ -2,6 +2,10 @@ export const countries = [{"text":"USA","value":"USA"},{"text":"CANADA","value": export const sizes = ["Small", "Medium", "Large", "XLarge"]; export const sizesPants = [28, 30, 32, 34, 36, 38, 40]; export const shoeSizes = [4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5]; +export const skateSizes = [7.5, 7.7, 7.75, 7.8, 7.875, 8, 8.06, 8.125, 8.13, 8.18, 8.2, 8.25, 8.375, 8.38, 8.5, 8.6, 8.625, 8.75, 8.8, 9, 9.25, 9.5, 10, 10]; export const usaRegions = [{"text":"AL","value":"AL"},{"text":"AK","value":"AK"},{"text":"AS","value":"AS"},{"text":"AZ","value":"AZ"},{"text":"AR","value":"AR"},{"text":"CA","value":"CA"},{"text":"CO","value":"CO"},{"text":"CT","value":"CT"},{"text":"DE","value":"DE"},{"text":"DC","value":"DC"},{"text":"FM","value":"FM"},{"text":"FL","value":"FL"},{"text":"GA","value":"GA"},{"text":"GU","value":"GU"},{"text":"HI","value":"HI"},{"text":"ID","value":"ID"},{"text":"IL","value":"IL"},{"text":"IN","value":"IN"},{"text":"IA","value":"IA"},{"text":"KS","value":"KS"},{"text":"KY","value":"KY"},{"text":"LA","value":"LA"},{"text":"ME","value":"ME"},{"text":"MH","value":"MH"},{"text":"MD","value":"MD"},{"text":"MA","value":"MA"},{"text":"MI","value":"MI"},{"text":"MN","value":"MN"},{"text":"MS","value":"MS"},{"text":"MO","value":"MO"},{"text":"MT","value":"MT"},{"text":"NE","value":"NE"},{"text":"NV","value":"NV"},{"text":"NH","value":"NH"},{"text":"NJ","value":"NJ"},{"text":"NM","value":"NM"},{"text":"NY","value":"NY"},{"text":"NC","value":"NC"},{"text":"ND","value":"ND"},{"text":"MP","value":"MP"},{"text":"OH","value":"OH"},{"text":"OK","value":"OK"},{"text":"OR","value":"OR"},{"text":"PW","value":"PW"},{"text":"PA","value":"PA"},{"text":"PR","value":"PR"},{"text":"RI","value":"RI"},{"text":"SC","value":"SC"},{"text":"SD","value":"SD"},{"text":"TN","value":"TN"},{"text":"TX","value":"TX"},{"text":"UT","value":"UT"},{"text":"VT","value":"VT"},{"text":"VI","value":"VI"},{"text":"VA","value":"VA"},{"text":"WA","value":"WA"},{"text":"WV","value":"WV"},{"text":"WI","value":"WI"},{"text":"WY","value":"WY"}]; export const canadaRegions = [{"text":"AB","value":"AB"},{"text":"BC","value":"BC"},{"text":"MB","value":"MB"},{"text":"NB","value":"NB"},{"text":"NL","value":"NL"},{"text":"NT","value":"NT"},{"text":"NS","value":"NS"},{"text":"NU","value":"NU"},{"text":"ON","value":"ON"},{"text":"PE","value":"PE"},{"text":"QC","value":"QC"},{"text":"SK","value":"SK"},{"text":"YT","value":"YT"}]; export const japanRegions = [{"text":" 北海道","value":" 北海道"},{"text":" 青森県","value":" 青森県"},{"text":" 岩手県","value":" 岩手県"},{"text":" 宮城県","value":" 宮城県"},{"text":" 秋田県","value":" 秋田県"},{"text":" 山形県","value":" 山形県"},{"text":" 福島県","value":" 福島県"},{"text":" 茨城県","value":" 茨城県"},{"text":" 栃木県","value":" 栃木県"},{"text":" 群馬県","value":" 群馬県"},{"text":" 埼玉県","value":" 埼玉県"},{"text":" 千葉県","value":" 千葉県"},{"text":" 東京都","value":" 東京都"},{"text":" 神奈川県","value":" 神奈川県"},{"text":" 新潟県","value":" 新潟県"},{"text":" 富山県","value":" 富山県"},{"text":" 石川県","value":" 石川県"},{"text":" 福井県","value":" 福井県"},{"text":" 山梨県","value":" 山梨県"},{"text":" 長野県","value":" 長野県"},{"text":" 岐阜県","value":" 岐阜県"},{"text":" 静岡県","value":" 静岡県"},{"text":" 愛知県","value":" 愛知県"},{"text":" 三重県","value":" 三重県"},{"text":" 滋賀県","value":" 滋賀県"},{"text":" 京都府","value":" 京都府"},{"text":" 大阪府","value":" 大阪府"},{"text":" 兵庫県","value":" 兵庫県"},{"text":" 奈良県","value":" 奈良県"},{"text":" 和歌山県","value":" 和歌山県"},{"text":" 鳥取県","value":" 鳥取県"},{"text":" 島根県","value":" 島根県"},{"text":" 岡山県","value":" 岡山県"},{"text":" 広島県","value":" 広島県"},{"text":" 山口県","value":" 山口県"},{"text":" 徳島県","value":" 徳島県"},{"text":" 香川県","value":" 香川県"},{"text":" 愛媛県","value":" 愛媛県"},{"text":" 高知県","value":" 高知県"},{"text":" 福岡県","value":" 福岡県"},{"text":" 佐賀県","value":" 佐賀県"},{"text":" 長崎県","value":" 長崎県"},{"text":" 熊本県","value":" 熊本県"},{"text":" 大分県","value":" 大分県"},{"text":" 宮崎県","value":" 宮崎県"},{"text":" 鹿児島県","value":" 鹿児島県"},{"text":" 沖縄県","value":" 沖縄県"}]; +export const categories = ['accessories', 't-shirts', 'pants', 'shorts', 'sweatshirts', 'tops-sweaters', 'shirts', 'jackets', 'shoes', 'skate']; +export const creditCards = [{ text: 'Visa', value: 'visa' }, { text: 'American Express', value: 'american_express' }, { text: 'Mastercard', value: 'master' }, { text: 'Solo', value: 'solo'}]; +export const japanCreditCards = creditCards.concat([ { text: 'JCB', value: 'jcb' }, { text: '代金引換', value: 'cod' }]).filter(x => x.value !== 'solo'); diff --git a/bot/src/app/containers/AppDrawer.jsx b/bot/src/app/containers/AppDrawer.jsx index 9ee89c4..9c2af95 100644 --- a/bot/src/app/containers/AppDrawer.jsx +++ b/bot/src/app/containers/AppDrawer.jsx @@ -1,11 +1,16 @@ import React, { PropTypes, Component } from 'react'; +import { connect } from 'react-redux'; import { Link } from 'react-router'; import { List, ListItem, makeSelectable } from 'material-ui/List'; import Drawer from 'material-ui/Drawer'; import Subheader from 'material-ui/Subheader'; import CodeIcon from 'material-ui/svg-icons/action/code'; import ShopIcon from 'material-ui/svg-icons/action/shop'; +import AccountIcon from 'material-ui/svg-icons/action/account-circle'; +import IncompleteIcon from 'material-ui/svg-icons/alert/error'; import Styles from '../constants/Styles'; +import { SHOP_NAME as SupremeShopName } from '../components/shops/Supreme'; +import * as Menus from '../constants/Menus'; const SelectableList = makeSelectable(List); @@ -14,20 +19,38 @@ function openUrlInNewTab(url) { win.focus(); } -export default function AppDrawer(props) { - const { location } = props; +function getIconForShop(settings, shopName) { + const menus = Object.keys(Menus).map(x => Menus[x]); + const isIncomplete = !settings[shopName] || menus.some(x => !settings[shopName][x]); + if (isIncomplete) { + return <IncompleteIcon />; + } + return <ShopIcon />; +} + +function AppDrawer(props) { + const { location, currentProfile, settings } = props; const paths = location.pathname.split('/').filter(x => !!x); const currentPage = paths[0]; return ( <Drawer open> - <div style={Styles.logo}>Supreme Auto Checkout</div> + <div style={Styles.logo}> + Supreme Auto Checkout + </div> <SelectableList value={currentPage}> <Subheader>Shops</Subheader> <ListItem value="supreme" primaryText="Supreme" containerElement={<Link to={'/supreme/'} />} - leftIcon={<ShopIcon />} + leftIcon={getIconForShop(settings, SupremeShopName)} + /> + <Subheader>Settings</Subheader> + <ListItem + value="profiles" + primaryText={`Profiles (${currentProfile})`} + containerElement={<Link to={'/profiles/'} />} + leftIcon={<AccountIcon />} /> <Subheader>Other</Subheader> <ListItem @@ -45,4 +68,15 @@ AppDrawer.propTypes = { location: PropTypes.shape({ pathname: PropTypes.string.isRequired, }), + currentProfile: PropTypes.string, }; + +function mapStateToProps(state) { + const currentProfile = state.profiles.currentProfile; + return { + settings: state.profiles.profiles.filter(x => x.name === currentProfile)[0].settings, + currentProfile, + }; +} + +export default connect(mapStateToProps)(AppDrawer); diff --git a/bot/src/app/index.jsx b/bot/src/app/index.jsx index 04b5c1c..06624fc 100644 --- a/bot/src/app/index.jsx +++ b/bot/src/app/index.jsx @@ -23,22 +23,29 @@ if (process.env.NODE_ENV !== 'production') { } const savedState = loadSavedState(VERSION); -const store = createStore( - combineReducers(Object.assign({}, reducers, { - routing: routerReducer, - form: formReducer, - })), - savedState, - applyMiddleware(...middleware), -); +const appReducer = combineReducers(Object.assign({}, reducers, { + routing: routerReducer, + form: formReducer, +})); + +const rootReducer = (state, action) => { + if (action.type === 'PROFILE_CHANGE') { + return appReducer(undefined, action); + } + return appReducer(state, action); +}; +const store = createStore(rootReducer, savedState, applyMiddleware(...middleware)); // Save state in localStorage automatically store.subscribe(() => { const state = store.getState(); if (state) { - saveState({ menu: state.menu, settings: state.settings }, VERSION); + saveState({ menu: state.menu, profiles: state.profiles, atc: state.atc }, VERSION); + const currentProfile = state.profiles.currentProfile; + const settings = state.profiles.profiles.filter(x => x.name === currentProfile)[0].settings; if (typeof (chrome) !== 'undefined' && typeof (chrome.storage) !== 'undefined') { - saveToChromeStorage('settings', state.settings.values || {}); + saveToChromeStorage('settings', settings || {}); + saveToChromeStorage('atc', state.atc || {}); } } }); diff --git a/bot/src/app/reducers/atc.js b/bot/src/app/reducers/atc.js new file mode 100644 index 0000000..10362e6 --- /dev/null +++ b/bot/src/app/reducers/atc.js @@ -0,0 +1,35 @@ +import * as types from '../constants/ActionTypes'; + +export default function atc(state = { + atcProducts: [], +}, action) { + if (action.type === types.ATC_PRODUCT_ADD) { + if (!action.data.name || state.atcProducts.filter(x => x.name === action.data.name).length) { + return state; + } + const atcList = state.atcProducts.map(x => Object.assign({}, x)); + atcList.push(action.data); + return { atcProducts: atcList }; + } else if (action.type === types.ATC_PRODUCT_REMOVE) { + if (!action.name) { + return state; + } + return { + atcProducts: state.atcProducts.map(x => Object.assign({}, x)).filter(x => x.name !== action.name), + }; + } else if (action.type === types.ATC_SET_PRODUCT_ENABLED) { + const atcProduct = state.atcProducts.filter(x => x.name === action.name)[0]; + if (!atcProduct) return state; + + const newList = state.atcProducts.map((x) => { + if (x.name === action.name) { + return Object.assign({}, x, { enabled: action.enabled }); + } + return Object.assign({}, x); + }); + return { + atcProducts: newList, + }; + } + return state; +} diff --git a/bot/src/app/reducers/index.js b/bot/src/app/reducers/index.js index 3648436..b87b977 100644 --- a/bot/src/app/reducers/index.js +++ b/bot/src/app/reducers/index.js @@ -1,3 +1,4 @@ export { default as menu } from './menu'; -export { default as settings } from './settings'; export { default as notification } from './notification'; +export { default as profiles } from './profiles'; +export { default as atc } from './atc'; diff --git a/bot/src/app/reducers/profiles.js b/bot/src/app/reducers/profiles.js new file mode 100644 index 0000000..44fadea --- /dev/null +++ b/bot/src/app/reducers/profiles.js @@ -0,0 +1,49 @@ +import * as types from '../constants/ActionTypes'; + +export default function profiles(state = { + currentProfile: 'default', + profiles: [{ + name: 'default', + description: 'Default profile', + settings: {}, + }], +}, action) { + if (action.type === types.PROFILE_CREATE) { + const list = state.profiles.map(x => Object.assign({}, x)); + list.push({ + name: action.name, + description: action.description, + settings: {}, + }); + return Object.assign({}, state, { profiles: list }); + } else if (action.type === types.PROFILE_SET_ENABLED) { + if (!state.profiles.filter(x => x.name === action.name)) { + return state; + } + return Object.assign({}, state, { currentProfile: action.name }); + } else if (action.type === types.PROFILE_REMOVE) { + if (action.name === 'default') { + return state; + } + return Object.assign({}, state, { + profiles: state.profiles.filter(x => x.name !== action.name), + currentProfile: state.currentProfile === action.name ? 'default' : state.currentProfile, + }); + } else if (action.type === types.PROFILE_UPDATE_SETTINGS) { + const profile = state.profiles.filter(x => x.name === action.name)[0]; + if (!profile) { + return state; + } + + const settingsObj = Object.assign({}, profile.settings); + settingsObj[action.shop] = Object.assign({}, profile.settings[action.shop], action.value); + const profileList = state.profiles.map(x => { + if (x.name === action.name) { + return Object.assign({}, x, { settings: settingsObj }); + } + return x; + }); + return Object.assign({}, state, { profiles: profileList }); + } + return state; +} diff --git a/bot/src/app/reducers/settings.js b/bot/src/app/reducers/settings.js deleted file mode 100644 index f205ebc..0000000 --- a/bot/src/app/reducers/settings.js +++ /dev/null @@ -1,14 +0,0 @@ -import * as types from '../constants/ActionTypes'; - -export default function settings(state = { - values: {}, -}, action) { - switch (action.type) { - case types.UPDATE_SETTINGS: - const data = Object.assign({}, state.values); - data[action.shop] = Object.assign({}, state.values[action.shop], action.value); - return Object.assign({}, state, { values: data }); - default: - return state; - } -} diff --git a/bot/src/app/routes.jsx b/bot/src/app/routes.jsx index c5e7127..18e11c8 100644 --- a/bot/src/app/routes.jsx +++ b/bot/src/app/routes.jsx @@ -2,11 +2,13 @@ import React from 'react'; import { Route, Redirect } from 'react-router'; import App from './containers/App'; import Supreme from './components/shops/Supreme'; +import Profile from './components/Profile'; export default () => { return ( <Route component={App}> <Route path="supreme/" component={Supreme} /> + <Route path="profiles/" component={Profile} /> <Redirect from="/" to="supreme/" /> </Route> ); diff --git a/bot/src/app/utils/Helpers.js b/bot/src/app/utils/Helpers.js index 181917c..11bf03c 100644 --- a/bot/src/app/utils/Helpers.js +++ b/bot/src/app/utils/Helpers.js @@ -3,13 +3,45 @@ export function isObjectEmpty(obj) { } export function getQueryStringValue(key) { - return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1")); + const urlParams = new URLSearchParams(window.location.search); + return urlParams.get(key); } export function pageHasNodeOfClass(className) { - return document.querySelectorAll('.' + className).length > 0; + return document.getElementsByClassName(className).length > 0; } export function hasStringInPath(value) { return location.pathname.substring(1).split('/').filter(x => !!x && x === value).length > 0; } + +export function pathCount() { + return location.pathname.substring(1).split('/').length; +} + +export function setTimeForToday(time) { + const d = new Date(); + const split = time.split(':'); + if (!split.length || split.length > 3) { + return null; + } + const hour = +split[0]; + const minute = +split[1]; + const seconds = +split[2]; + if (isNaN(hour) || hour > 24) { + return null; + } + + if (isNaN(minute) || minute > 60 || (hour === 24 && minute > 0)) { + return null; + } + + if (isNaN(seconds) || seconds > 60) { + return null; + } + if (hour < 0 || minute < 0 || seconds < 0) return null; + d.setHours(hour); + d.setMinutes(minute); + d.setSeconds(seconds); + return d; +} diff --git a/bot/src/extension/InputProcessor.js b/bot/src/extension/InputProcessor.js new file mode 100644 index 0000000..9e60f07 --- /dev/null +++ b/bot/src/extension/InputProcessor.js @@ -0,0 +1,264 @@ +const ignoredIds = ['g-recaptcha-response', 'number_v', 'oba3', 'order_billing_address_3']; + +export function setInputValue(input, value, dispatchEvent=true) { + input.value = value; + if (dispatchEvent) { + input.dispatchEvent(new Event('change')); + } + return input; +} + +export function processField(input, settings) { + const id = input.id; + if (ignoredIds.indexOf(id) !== -1) { + return true; + } + + if (typeof (settings[id]) !== 'undefined') { + setInputValue(input, settings[id]); + return true; + } + return processUnknownField(input, settings); +} + +export function processUnknownField(input, settings) { + const splittedName = settings['order_billing_name'].split(' '); + if (input.name === 'credit_card[last_name]') { + setInputValue(input, splittedName[0]); + return true; + } + if (input.name === 'credit_card[first_name]') { + setInputValue(input, splittedName[1]); + return true; + } + if (input.name === 'order[billing_name]') { + setInputValue(input, settings['order_billing_name']); + return true; + } + + if (input.name === 'order[email]') { + setInputValue(input, settings['order_email']); + return true; + } + + if (input.name === 'order[tel]') { + setInputValue(input, settings['order_tel']); + return true; + } + + if (input.name === 'order[billing_address]') { + setInputValue(input, settings['bo']); + return true; + } + + if (input.name === 'order[billing_city]') { + setInputValue(input, settings['order_billing_city']); + return true; + } + + if (input.name === 'order[billing_zip]') { + setInputValue(input, settings['order_billing_zip']); + return true; + } + + if (input.name === 'order[billing_state]') { + setInputValue(input, settings['order_billing_state']); + return true; + } + + if (input.name === 'order[billing_country]') { + setInputValue(input, settings['order_billing_country']); + return true; + } + + if (input.name === 'credit_card[type]') { + setInputValue(input, settings['credit_card_type']); + return true; + } + + if (input.name === 'credit_card[month]') { + setInputValue(input, settings['credit_card_month']); + return true; + } + + if (input.name === 'credit_card[year]') { + setInputValue(input, settings['credit_card_year']); + return true; + } + + if (input.name === 'credit_card[nlb]' || input.name === 'credit_card[cnb]') { + setInputValue(input, settings['cnb']); + return true; + } + + if (input.name === 'credit_card[rvv]' || input.name === 'credit_card[vval]') { + setInputValue(input, settings['vval']); + return true; + } + + return processByLabel(input, settings); +} + +export function processByLabel(input, settings) { + let parent = input.parentNode; + let label = parent.getElementsByTagName('label')[0] || parent.querySelector('.sr-label'); + if (!label) { + const children = parent.childNodes; + for (let i = 0; i < children.length; i += 1) { + const hasClass = [...children[i].classList].filter(x => x.toLowerCase().indexOf('label') !== -1).length > 0; + if (hasClass) { + label = children[i]; + break; + } + } + } + if (!label) return false; + + const text = label.innerText; + if (!text) { + return; + } + + const inArray = function(txt, arr) { + return arr.map(x => x.toLowerCase()).indexOf(txt.toLowerCase()) !== -1; + }; + + const hasText = arr => inArray(text, arr); + + if (hasText(['nom', 'name', 'firstname', 'lastname', 'nom', 'prenom'])) { + setInputValue(input, settings['order_billing_name']); + return true; + } + if (hasText(['email', 'Eメール'])) { + setInputValue(input, settings['order_email']); + return true; + } + if (hasText(['tel', 'phone', 'phone number', '電話番号'])) { + setInputValue(input, settings['order_tel']); + return true; + } + if (hasText(['address', 'adresse', 'addresse', '住所'])) { + setInputValue(input, settings['bo']); + return true; + } + if (hasText(['city', 'ville', '区市町村'])) { + setInputValue(input, settings['order_billing_city']); + return true; + } + if (hasText(['zip', 'code postal', 'codepostal', 'code_postal', 'postal code', 'postalcode', '郵便番号'])) { + setInputValue(input, settings['order_billing_zip']); + return true; + } + if (hasText(['country', 'pays'])) { + setInputValue(input, settings['order_billing_country']); + return true; + } + if (hasText(['state', 'état', 'etat', 'province', '都道府県'])) { + setInputValue(input, settings['order_billing_state']); + return true; + } + if (hasText(['type', 'type de carte', 'credit card type', '支払い方法'])) { + setInputValue(input, settings['credit_card_type']); + return true; + } + if (hasText(['numéro', 'number', 'numero', 'カード番号'])) { + setInputValue(input, settings['cnb']); + return true; + } + if (hasText(['exp. date', 'exp date', 'expiry date', 'date d’exp.', 'date d\'exp.', 'date d\'expiration', '有効期限'])) { + if (input.type === 'select-one') { + const isMonth = input.options && input.options[0] && input.options[0].value[0] === '0'; + setInputValue(input, settings[isMonth ? 'credit_card_month' : 'credit_card_year']); + return true; + } + } + if (hasText(['CVV', 'CVV番号'])) { + setInputValue(input, settings['vval']); + return true; + } + return processByName(input, settings); +} + +export function processByName(input, settings) { + if (Object.keys(settings).indexOf(input.name) !== -1) { + setInputValue(input, settings[input.name]); + return true; + } + return processByParent(input, settings); +} + +export function processByParent(input, settings) { + const parent = input.parentNode; + if (!parent) { + return false; + } + const classList = [...parent.classList]; + if (classList.indexOf('credit_card_verification_value') !== -1) { + setInputValue(input, settings['vval']); + return true; + } + + if (classList.indexOf('credit_card_number') !== -1) { + setInputValue(input, settings['cnb']); + return true; + } + + // probably a card detail input + if(parent.parentNode && parent.parentNode.id === 'card_details') { + // either month/year of expiry date + if (input.type === 'select-one') { + const isMonth = input.options && input.options[0] && input.options[0].value[0] === '0'; + setInputValue(input, settings[isMonth ? 'credit_card_month' : 'credit_card_year']); + return true; + } + + // probably cvv + if (input.attributes['maxlength']) { + setInputValue(input, settings['vval']); + return true; + } + + // otherwise its probably cc number + setInputValue(input, settings['cnb']); + } +} + +export function cleanup(inputs, settings) { + const input = document.getElementById('order_billing_state') || document.querySelector('[name="order[billing_state]"]'); + if (input) { + setInputValue(input, settings['order_billing_state'], false); + return true; + } + const stateLabel = document.querySelector('#state_label'); + if (stateLabel && stateLabel.parentNode) { + const stateSelect = stateLabel.parentNode.querySelector('select'); + if (stateLabel) { + setInputValue(stateSelect, settings['order_billing_state'], false); + return true; + } + } + + const stateInputParent = document.querySelector('.order_billing_state'); + if (stateInputParent) { + const selector = stateInputParent.querySelector('select'); + if (selector) { + setInputValue(selector, settings['order_billing_state'], false); + return true; + } + } + return false; +} + +export function processFields(inputs, settings) { + const successes = []; + for (let i = 0; i < inputs.length; i += 1) { + const success = processField(inputs[i], settings); + successes.push(success); + if (!success) { + console.info(`Unknown field id : ${inputs[i].id}`); + } + } + cleanup(inputs, settings); + return successes.every(x => x === true); +} + diff --git a/bot/src/extension/background/index.js b/bot/src/extension/background/index.js new file mode 100644 index 0000000..32fb260 --- /dev/null +++ b/bot/src/extension/background/index.js @@ -0,0 +1,86 @@ +import { getFromChromeStorage } from '../../app/utils/StorageManager'; +import * as menus from '../../app/constants/Menus'; +import * as Helpers from '../../app/utils/Helpers'; + + +async function getEnabledAtcProducts() { + const atc = await getFromChromeStorage('atc'); + if (atc && atc.atcProducts) { + return atc.atcProducts.filter(x => x.enabled); + } + return []; +} + +async function getSettings() { + const settings = await getFromChromeStorage('settings'); + if (settings && settings['Supreme']) { + return settings['Supreme']; + } + return null; +} + +async function processProducts(products) { + for (let i = 0; i < products.length; i += 1) { + const product = products[i]; + let category = product.category; + if (category === 'tops-sweaters') { + category = 'tops_sweaters'; + } + const keywords = product.keywords; + const color = product.color; + let url = `http://supremenewyork.com/shop/all/${category}?atc-kw=${keywords.join(';')}`; + if (color) { + url = `${url}&atc-color=${color}`; + } + chrome.tabs.create({ url }); + } +} + +function getAtcStartTime(settings) { + if (!settings || !settings[menus.MENU_OPTIONS] || !settings[menus.MENU_OPTIONS].atcEnabled) { + return null; + } + const atcStartTime = settings[menus.MENU_OPTIONS].atcStartTime; + if (!atcStartTime) { + return null; + } + return Helpers.setTimeForToday(atcStartTime); +} + +async function sleep(ms) { + return new Promise((resolve) => { + setTimeout(() => resolve(), ms); + }); +} + +async function timeout(ms, callback) { + await sleep(ms); + callback(); +} + +async function loop() { + const now = new Date(); + const settings = await getSettings(); + const startTime = getAtcStartTime(settings); + if (!startTime) { + await timeout(1000, () => loop()); + return; + } + const diffTime = (startTime.getTime() - now.getTime()) / 1000; + console.log(`ATC starting in ${diffTime} seconds...`); + + if (diffTime <= 0 && Math.abs(diffTime) < 3) { + const products = await getEnabledAtcProducts(); + await processProducts(products); + await timeout(4000, () => loop()); + return; + } + await timeout(1000, () => loop()); +} + + +async function start() { + await loop(); +} + +start(); diff --git a/bot/src/extension/supreme.js b/bot/src/extension/supreme.js index 94d5110..60ba0f3 100644 --- a/bot/src/extension/supreme.js +++ b/bot/src/extension/supreme.js @@ -1,5 +1,6 @@ import BaseManager from './BaseManager'; import * as Helpers from '../app/utils/Helpers'; +import * as InputProcessor from './InputProcessor'; export default class SupremeManager extends BaseManager { constructor(preferences, sizings, billing) { @@ -33,6 +34,8 @@ export default class SupremeManager extends BaseManager { this.processCart(); } else if (this.isCheckout()) { this.processCheckout(); + } else if (this.isShopCategoryPage()) { + this.processAtc(); } } @@ -44,7 +47,7 @@ export default class SupremeManager extends BaseManager { * Attach an event on product links of the page to reload the page instead of loading in ajax */ processLinks() { - let links = document.links; + const links = document.links; for (let link of links) { link.addEventListener('click', function (e) { @@ -91,32 +94,14 @@ export default class SupremeManager extends BaseManager { */ processCheckout() { const checkoutDelay = this.preferences.checkoutDelay; + const inputs = [...document.querySelectorAll('input, textarea, select')] + .filter(x => ['hidden', 'submit', 'button', 'checkbox'].indexOf(x.type) === -1); + const successFill = InputProcessor.processFields(inputs, this.billing); + const terms = document.getElementsByName('order[terms]'); if (terms.length) { terms[0].click(); } - for (let key of Object.keys(this.billing)) { - let el = document.getElementById(key); - if (el) { - el.value = this.billing[key]; - el.dispatchEvent(new Event('change')); - } - } - - // Process card number and CVV - const card_field = document.getElementsByName('credit_card[nlb]'); - if (card_field) { - const f = card_field[0]; - f.value = this.billing['cnb']; - f.dispatchEvent(new Event('change')); - } - - const cvv_field = document.getElementsByName('credit_card[rvv]'); - if (cvv_field) { - const f = cvv_field[0]; - f.value = this.billing['vval']; - f.dispatchEvent(new Event('change')); - } if (this.preferences.captchaBypass) { let captcha = document.querySelector('.g-recaptcha'); @@ -202,6 +187,57 @@ export default class SupremeManager extends BaseManager { } } + processAtc() { + const queryString = Helpers.getQueryStringValue('atc-kw'); + if (!queryString) { + return; + } + const keywords = queryString.split(';'); + const kwColor = Helpers.getQueryStringValue('atc-color'); + const innerArticles = [...document.querySelectorAll('.inner-article')]; + const products = []; + for (let i = 0; i < innerArticles.length; i += 1) { + const h1 = innerArticles[i].querySelector('h1'); + const a = innerArticles[i].querySelector('a'); + const p = innerArticles[i].querySelector('p'); + if (h1 && a && h1.innerText && a.href) { + const product = { + matches: 0, + url: a.href, + }; + const name = h1.innerText.toLowerCase().trim(); + let color = null; + if (p && p.innerText) { + color = p.innerText.toLowerCase().trim(); + } + for (let j = 0; j < keywords.length; j += 1) { + const keyword = keywords[j].toLowerCase().trim(); + const regexp = new RegExp(keyword); + // name matches + if (regexp.test(name)) { + if (kwColor && color) { + const regexColor = new RegExp(color); + if (regexColor.test(kwColor)) { + product.matches += 1; + } + } + product.matches += 1; + } + } + + products.push(product); + } + } + const bestMatch = products.filter(x => x.matches > 0).sort((a, b) => b.matches - a.matches)[0]; + if (bestMatch) { + window.location.href = bestMatch.url; + } + } + + isShopCategoryPage() { + return Helpers.hasStringInPath('shop') && Helpers.hasStringInPath('all') && Helpers.pathCount() === 3; + } + /** * Check if the user is currently on a product page */ @@ -229,8 +265,8 @@ export default class SupremeManager extends BaseManager { * Returns the product category when the user is on a product page */ getProductCategory() { - let category = Helpers.getQueryStringValue('atc-category'); - return category === "" ? location.pathname.substring(1).split('/')[1] : category; + const category = Helpers.getQueryStringValue('atc-category'); + return !category ? location.pathname.substring(1).split('/')[1] : category; } /** diff --git a/bot/webpack.config.js b/bot/webpack.config.js index e9e77f9..68aa901 100644 --- a/bot/webpack.config.js +++ b/bot/webpack.config.js @@ -34,6 +34,38 @@ const extConfig = { }, }; +const backgroundConfig = { + entry: [ + './src/extension/background/index.js', + ], + output: { + path: __dirname + '/dist', + filename: 'background.js', + publicPath: '/', + }, + resolve: { + extensions: ['.js', '.jsx'], + alias: { + request: 'browser-request', + }, + }, + module: { + loaders: [ + { + test: /\.(js|jsx)$/, + loader: 'babel-loader', + exclude: /node_modules/, + query: { + presets: ['es2015', 'react'], + plugins: [ + 'transform-runtime', + ], + }, + }, + ], + }, +}; + const optionsConfig = { devtool: '#eval-source-map', entry: [ @@ -104,4 +136,4 @@ const optionsConfig = { }, }; -module.exports = [optionsConfig, extConfig]; +module.exports = [optionsConfig, extConfig, backgroundConfig]; diff --git a/bot/webpack.config.prod.js b/bot/webpack.config.prod.js index e095939..316fe6f 100644 --- a/bot/webpack.config.prod.js +++ b/bot/webpack.config.prod.js @@ -52,6 +52,38 @@ const extConfig = { }, }; +const backgroundConfig = { + entry: [ + './src/extension/background/index.js', + ], + output: { + path: path.resolve('build'), + filename: 'background.js', + publicPath: '/', + }, + resolve: { + extensions: ['.js', '.jsx'], + alias: { + request: 'browser-request', + }, + }, + module: { + loaders: [ + { + test: /\.(js|jsx)$/, + loader: 'babel-loader', + exclude: /node_modules/, + query: { + presets: ['es2015', 'react'], + plugins: [ + 'transform-runtime', + ], + }, + }, + ], + }, +}; + const optionsConfig = { entry: './src/app/index.jsx', output: { @@ -83,4 +115,4 @@ const optionsConfig = { plugins: [HtmlWebpackPluginConfig, CopyWebPackPluginConfig, DefinePlugin], }; -module.exports = [optionsConfig, extConfig]; +module.exports = [optionsConfig, extConfig, backgroundConfig]; diff --git a/bot/yarn.lock b/bot/yarn.lock index b0a2904..da1fb3c 100644 --- a/bot/yarn.lock +++ b/bot/yarn.lock @@ -1184,6 +1184,10 @@ browser-pack@^6.0.1: through2 "^2.0.0" umd "^3.0.0" +browser-request@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/browser-request/-/browser-request-0.3.3.tgz#9ece5b5aca89a29932242e18bf933def9876cc17" + browser-resolve@^1.11.0, browser-resolve@^1.7.0: version "1.11.2" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" @@ -3921,6 +3925,12 @@ map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" +material-ui-chip-input@^0.17.0: + version "0.17.0" + resolved "https://registry.yarnpkg.com/material-ui-chip-input/-/material-ui-chip-input-0.17.0.tgz#b1151b3e3f00d6a7edbd1906cf4e8aa3bbfa7f31" + dependencies: + prop-types "^15.5.7" + material-ui@^0.16.7: version "0.16.7" resolved "https://registry.yarnpkg.com/material-ui/-/material-ui-0.16.7.tgz#5ec5080d5f227817092c449105df9cbc8807941c" @@ -4853,7 +4863,7 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -prop-types@^15.5.10, prop-types@^15.5.4: +prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.7: version "15.5.10" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" dependencies: